diff --git a/CHANGELOG.md b/CHANGELOG.md index 0195e17fbe1..dde292c568e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package hippy + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/compare/2.11.2...2.11.3) (2021-12-08) diff --git a/android/sdk/gradle.properties b/android/sdk/gradle.properties index 35af87a2db7..e24b293b831 100644 --- a/android/sdk/gradle.properties +++ b/android/sdk/gradle.properties @@ -50,7 +50,7 @@ NDK_VERSION=21.4.7075529 # Equals to setting android.defaultConfig.versionCode and versionName property # in the build.gradle file. # -VERSION_NAME=2.11.3 +VERSION_NAME=2.11.4 VERSION_CODE=1 # diff --git a/examples/android-demo/res/index.android.js b/examples/android-demo/res/index.android.js index 31db5a3ad84..252f22baed0 100644 --- a/examples/android-demo/res/index.android.js +++ b/examples/android-demo/res/index.android.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var n,r,i=t[0],a=t[1],l=0,c=[];l0===l.indexOf(e))){var s=l.split("/"),c=s[s.length-1],u=c.split(".")[0];(h=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=h+c)}else{var h;u=l.split(".")[0];(h=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=h+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=o[e];0!==n&&n&&n[1](t),o[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.oe=function(e){throw console.error(e),e};var i=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l0===l.indexOf(e))){var s=l.split("/"),c=s[s.length-1],u=c.split(".")[0];(h=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=h+c)}else{var h;u=l.split(".")[0];(h=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=h+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=o[e];0!==n&&n&&n[1](t),o[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.oe=function(e){throw console.error(e),e};var i=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var o={};n.r(o),n.d(o,"Focusable",(function(){return H})),n.d(o,"Image",(function(){return U})),n.d(o,"ListView",(function(){return Z})),n.d(o,"Modal",(function(){return oe})),n.d(o,"RefreshWrapper",(function(){return Ae})),n.d(o,"PullHeader",(function(){return Re})),n.d(o,"ScrollView",(function(){return Ie})),n.d(o,"Text",(function(){return Oe})),n.d(o,"TextInput",(function(){return Le})),n.d(o,"View",(function(){return _e})),n.d(o,"ViewPager",(function(){return Qe})),n.d(o,"WebView",(function(){return Je})),n.d(o,"BoxShadow",(function(){return $e})),n.d(o,"WaterfallView",(function(){return nt}));var r={};n.r(r),n.d(r,"Animation",(function(){return at})),n.d(r,"AsyncStorage",(function(){return st})),n.d(r,"Clipboard",(function(){return ut})),n.d(r,"NativeEvent",(function(){return dt})),n.d(r,"NetInfo",(function(){return ft})),n.d(r,"TestModule",(function(){return pt})),n.d(r,"WebSocket",(function(){return St})),n.d(r,"UIManagerModule",(function(){return At}));var i={};n.r(i),n.d(i,"MyView",(function(){return Rt})),n.d(i,"Slider",(function(){return Pt})),n.d(i,"TabHost",(function(){return Mt})),n.d(i,"SetNativeProps",(function(){return Ft})),n.d(i,"DynamicImport",(function(){return Wt})),n.d(i,"Localization",(function(){return Nt})),n.d(i,"Turbo",(function(){return qt}));var a=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/react/index.js"),s=n.n(l),c=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/prop-types/index.js");function u(){return(u=Object.assign||function(e){for(var t=1;t=0;u--){var m=r[u];"."===m?d(r,u):".."===m?(d(r,u),c++):c&&(d(r,u),c--)}if(!l)for(;c--;c)r.unshift("..");!l||""===r[0]||r[0]&&h(r[0])||r.unshift("");var f=r.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};var f="Invariant failed";function g(e,t){if(!e)throw new Error(f)}function p(e){var t=e.pathname,n=e.search,o=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function y(e,t,n,o){var r;"string"==typeof e?(r=function(e){var t=e||"/",n="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===o?"":o}}(e)).state=t:(void 0===(r=u({},e)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==t&&void 0===r.state&&(r.state=t));try{r.pathname=decodeURI(r.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=m(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function w(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,o,r){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(!1!==i)}else r(!0)},appendListener:function(e){var n=!0;function o(){n&&e.apply(void 0,arguments)}return t.push(o),function(){n=!1,t=t.filter((function(e){return e!==o}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),o=0;ot?n.splice(t,n.length-t,o):n.push(o),h({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=y(e,t,d(),S.location);c.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(S.entries[S.index]=o,h({action:"REPLACE",location:o}))}))},go:x,goBack:function(){x(-1)},goForward:function(){x(1)},canGo:function(e){var t=S.index+e;return t>=0&&t=0||(r[n]=e[n]);return r}var v=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),A=n.n(v),V=function(e){var t=Object(S.a)();return t.displayName=e,t}("Router"),R=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(c.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return s.a.createElement(V.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(s.a.Component);var k=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;rthis.onClick(e),requestFocus:0===e,focusStyle:{backgroundColor:"red"},noFocusStyle:{backgroundColor:"blue"}},s.a.createElement(a.Text,{style:{color:"white"}},t===e?"我被点击了"+e:"没有被点击"+e)))}render(){return s.a.createElement(a.ScrollView,null,this.getRenderRow(0),this.getRenderRow(1),this.getRenderRow(2),this.getRenderRow(3),this.getRenderRow(4),this.getRenderRow(5),this.getRenderRow(6),this.getRenderRow(7),this.getRenderRow(8),this.getRenderRow(9),this.getRenderRow(10),this.getRenderRow(11),this.getRenderRow(12),this.getRenderRow(13),this.getRenderRow(14),this.getRenderRow(15),this.getRenderRow(16),this.getRenderRow(17),this.getRenderRow(18))}}var N=n.p+"assets/defaultSource.jpg";const K="https://static.res.qq.com/nav/3b202b2c44af478caf1319dece33fff2.png",q=a.StyleSheet.create({container_style:{alignItems:"center"},image_style:{width:300,height:180,margin:16,borderColor:"#4c9afa",borderWidth:1,borderRadius:4},info_style:{marginTop:15,marginLeft:16,fontSize:16,color:"#4c9afa"}});function U(){return s.a.createElement(a.ScrollView,{style:q.container_style},s.a.createElement(a.Text,{style:q.info_style},"Contain:"),s.a.createElement(a.Image,{style:[q.image_style],resizeMode:a.Image.resizeMode.contain,defaultSource:N,source:{uri:K},onLoadStart:()=>{console.log("===image onloadStart===")},onLoad:()=>{console.log("===image onLoad===")},onError:e=>{console.log("===image onError===",e)},onLoadEnd:()=>{console.log("===image onLoadEnd===")}}),s.a.createElement(a.Text,{style:q.info_style},"Cover:"),s.a.createElement(a.Image,{style:[q.image_style],defaultSource:N,source:{uri:K},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Text,{style:q.info_style},"Center:"),s.a.createElement(a.Image,{style:[q.image_style],defaultSource:N,source:{uri:K},resizeMode:a.Image.resizeMode.center}),s.a.createElement(a.Text,{style:q.info_style},"Cover GIF:"),s.a.createElement(a.Image,{style:[q.image_style],resizeMode:a.Image.resizeMode.cover,defaultSource:N,source:{uri:"http://img.qdaily.com/article/article_show/20180226115511QR0IMWjcBZmo8FaV.gif"},onLoadEnd:()=>{console.log("gif onLoadEnd")}}))}const G=[{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5}],Q=a.StyleSheet.create({container:{backgroundColor:"#fff",collapsable:!1},itemContainer:{padding:12},separatorLine:{marginLeft:12,marginRight:12,height:1,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Y({index:e}){return s.a.createElement(a.View,{style:Q.container,onClickCapture:e=>{console.log("onClickCapture style1",e.target.nodeId,e.currentTarget.nodeId)},onTouchDown:e=>(e.stopPropagation(),console.log("onTouchDown style1",e.target.nodeId,e.currentTarget.nodeId),!1),onClick:e=>(console.log("click style1",e.target.nodeId,e.currentTarget.nodeId),!1)},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 1 UI"))}function J({index:e}){return s.a.createElement(a.View,{style:Q.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 2 UI"))}function X({index:e}){return s.a.createElement(a.View,{style:Q.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 5 UI"))}class Z extends s.a.Component{constructor(e){super(e),this.state={dataSource:G,fetchingDataFlag:!1},this.fetchTimes=0,this.delText="Delete",this.mockFetchData=this.mockFetchData.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.onEndReached=this.onEndReached.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.getRowStyle=this.getRowStyle.bind(this),this.onDelete=this.onDelete.bind(this)}onDelete({index:e}){const{dataSource:t}=this.state,n=t.filter((t,n)=>e!==n);this.setState({dataSource:n})}async onEndReached(){const{dataSource:e,fetchingDataFlag:t}=this.state;if(t)return;this.setState({fetchingDataFlag:!0,dataSource:e.concat([{style:100}])});const n=await this.mockFetchData(),o=e[e.length-1];o&&100===o.style&&e.pop();const r=e.concat(n);this.setState({dataSource:r})}onAppear(e){console.log("onAppear",e)}onDisappear(e){console.log("onDisappear",e)}onWillAppear(e){console.log("onWillAppear",e)}onWillDisappear(e){console.log("onWillDisappear",e)}getRowType(e){return this.state.dataSource[e].style}getRowStyle(){return{width:100,height:50}}getRowKey(e){return"row-"+e}getRenderRow(e){const{dataSource:t}=this.state;let n=null;const o=t[e],r=t.length===e+1;switch(o.style){case 1:n=s.a.createElement(Y,{index:e});break;case 2:n=s.a.createElement(J,{index:e});break;case 5:n=s.a.createElement(X,{index:e});break;case 100:n=s.a.createElement(a.Text,{style:Q.loading},"Loading now...")}return s.a.createElement(a.View,{style:Q.container,onClick:e=>(console.log("click style outer",e.target.nodeId,e.currentTarget.nodeId),!1)},s.a.createElement(a.View,{style:Q.itemContainer},n),r?null:s.a.createElement(a.View,{style:Q.separatorLine}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=100?e([]):e(G)),600)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{onTouchDown:e=>{console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:e=>{console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:e=>(console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!1),bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:e=>2===e,onAppear:e=>this.onAppear(e),onDisappear:e=>this.onDisappear(e),onWillAppear:e=>this.onWillAppear(e),onWillDisappear:e=>this.onWillDisappear(e)})}}const $="#4c9afa",ee="#f44837",te="#fff",ne=a.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:$,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:$,textAlign:"center",textAlignVertical:"center"}});class oe extends s.a.Component{constructor(e){super(e),this.state={visible:!1,press:!1},this.show=this.show.bind(this),this.hide=this.hide.bind(this)}feedback(e){this.setState({press:"in"===e})}show(){this.setState({visible:!0})}hide(){this.setState({visible:!1})}render(){const{press:e,visible:t}=this.state;return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:ne.container},s.a.createElement(a.View,{onPressIn:()=>this.feedback("in"),onPressOut:()=>this.feedback.bind("out"),onClick:this.show,style:[ne.buttonView,{borderColor:$,opacity:e?.5:1}]},s.a.createElement(a.Text,{style:[ne.buttonText,{color:$}]},"点击弹出浮层"))),s.a.createElement(a.Modal,{transparent:!0,animationType:"slide_fade",visible:t,onRequestClose:()=>{},supportedOrientations:["portrait"]},s.a.createElement(a.View,{style:{flex:1,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:ee,marginTop:300,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.Text,{style:{color:te,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}const re="http://res.imtt.qq.com/tps/expo-listview-1.jpg",ie={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[re,re,re],subInfo:["三图评论","11评"]}},ae={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},le={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}};var se=[le,ie,ae,ie,ae,ie,ae,le,ie],ce=n("./node_modules/@babel/runtime/helpers/extends.js"),ue=n.n(ce);var he={getScreenWidth(){const e=a.Dimensions.get("screen").width,t=a.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray(e){const t=[];for(let n=0;n=812&&a.PixelRatio.get()>=2&&(e=!0),e}};const de=(he.getScreenWidth()-24-12)/3,me=Math.floor(de/1.35),fe=a.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:me,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:de,height:me},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function ge(e){const{itemBean:{title:t,picList:n}}=e;let{itemBean:{subInfo:o}}=e,r=null;if(o&&o.length){o=he.uniqueArray(o);const e=o.join(" ");r=s.a.createElement(a.Text,{style:fe.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,ue()({},e,{style:{collapsable:!1}}),s.a.createElement(a.Text,{style:[fe.title],numberOfLines:2,enableScale:!0},t),s.a.createElement(a.View,{style:fe.imageContainer},s.a.createElement(a.Image,{style:fe.image,source:{uri:n[0]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:[fe.image,{marginLeft:6,marginRight:6}],source:{uri:n[1]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:fe.image,source:{uri:n[2]},resizeMode:a.Image.resizeMode.cover})),r?s.a.createElement(a.View,{style:fe.tagLine},r):null)}const pe=he.getScreenWidth()-24,ye=Math.floor(pe-12)/3,we=Math.floor(ye/1.35),be=a.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:we},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ye,height:we},image:{width:ye,height:we},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function xe(e){if("undefined"===e)return null;const{itemBean:t}=e;if(!t)return null;let n=null;const{title:o,picUrl:r}=t;let{subInfo:i}=t;if(i&&i.length){i=he.uniqueArray(i);const e=i.join(" ");n=s.a.createElement(a.Text,{style:be.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,ue()({},e,{style:be.container}),s.a.createElement(a.View,{style:be.leftContainer},s.a.createElement(a.Text,{style:be.title,numberOfLines:2,enableScale:!0},o),n?s.a.createElement(a.View,{style:be.tagLine},n):null),s.a.createElement(a.View,{style:be.imageContainer},s.a.createElement(a.Image,{resizeMode:a.Image.resizeMode.cover,style:be.image,source:{uri:r}})))}const Se=he.getScreenWidth()-24,Te=Math.floor(188*Se/336),Ee=a.StyleSheet.create({text:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Se,height:Te,alignSelf:"center"},image:{width:Se,height:Te},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Ce(e){if("undefined"===e)return null;const{itemBean:t}=e;if(!t)return null;const{title:n,picUrl:o}=t;let{subInfo:r}=t,i=null;if(r&&r.length){r=he.uniqueArray(r);const e=r.join(" ");i=s.a.createElement(a.Text,{style:Ee.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,e,s.a.createElement(a.Text,{style:Ee.text,numberOfLines:2,enableScale:!0},n),s.a.createElement(a.View,{style:Ee.playerView},s.a.createElement(a.Image,{style:Ee.image,source:{uri:o},resizeMode:a.Image.resizeMode.cover})),i?s.a.createElement(a.View,{style:Ee.tagLine},i):null)}const ve=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});class Ae extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],loadingState:"正在加载..."},this.fetchTimes=0,this.mockFetchData=this.mockFetchData.bind(this),this.onRefresh=this.onRefresh.bind(this),this.getRefresh=this.getRefresh.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.onEndReached=this.onEndReached.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e})}async onEndReached(){const{dataSource:e,fetchingDataFlag:t}=this.state;if(t)return;this.setState({fetchingDataFlag:!0,dataSource:e.concat([{style:100}])});const n=await this.mockFetchData(),o=e[e.length-1];o&&100===o.style&&e.pop();const r=e.concat(n);this.setState({dataSource:r})}onRefresh(){setTimeout(async()=>{const e=await this.mockFetchData();this.setState({dataSource:e}),this.refresh.refreshComplected()},1e3)}onClickItem(e){console.log(`item: ${e} is clicked..`)}getRenderRow(e){const{dataSource:t,loadingState:n}=this.state;let o=null;const r=t[e],i=t.length===e+1;switch(r.style){case 1:o=s.a.createElement(ge,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(xe,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Ce,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:ve.loading},n)}return s.a.createElement(a.View,{style:ve.container},s.a.createElement(a.View,{style:ve.itemContainer},o),i?null:s.a.createElement(a.View,{style:ve.spliter}))}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}getRefresh(){return s.a.createElement(a.View,{style:{flex:1,height:30}},s.a.createElement(a.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=50?e([]):e(se)),600)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},s.a.createElement(a.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}const Ve=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}});class Re extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},this.fetchTimes=0,this.mockFetchData=this.mockFetchData.bind(this),this.renderRow=this.renderRow.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.renderPullHeader=this.renderPullHeader.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onHeaderReleased=this.onHeaderReleased.bind(this),this.onHeaderPulling=this.onHeaderPulling.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e}),this.listView.collapsePullHeader()}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({dataSource:e.concat([{style:100}])});let t=[];try{t=await this.mockFetchData()}catch(e){}const n=e[e.length-1];n&&100===n.style&&e.pop();const o=e.concat(t);this.loadMoreDataFlag=!1,this.setState({dataSource:o})}async onHeaderReleased(){if(this.fetchingDataFlag)return;this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"});let e=[];try{e=await this.mockFetchData()}catch(e){}this.fetchingDataFlag=!1,this.setState({dataSource:e},()=>{this.listView.collapsePullHeader(),this.fetchTimes=0})}onHeaderPulling(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Ve.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}onClickItem(e,t){console.log(`item: ${e} is clicked..`,t.target.nodeId,t.currentTarget.nodeId)}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}mockFetchData(){return new Promise(e=>{setTimeout(()=>{this.fetchTimes+=1;let t=[];return this.fetchTimes<50&&(t=se),e(t)},600)})}renderPullHeader(){const{pullingText:e}=this.state;return s.a.createElement(a.View,{style:Ve.pullContainer},s.a.createElement(a.Text,{style:Ve.pullContent},e))}renderRow(e){const{dataSource:t,loadingState:n}=this.state;let o=null;const r=t[e],i=t.length===e+1;switch(r.style){case 1:o=s.a.createElement(ge,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 2:o=s.a.createElement(xe,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 5:o=s.a.createElement(Ce,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 100:o=s.a.createElement(a.Text,{style:Ve.loading},n)}return s.a.createElement(a.View,{style:Ve.container},s.a.createElement(a.View,{style:Ve.itemContainer},o),i?null:s.a.createElement(a.View,{style:Ve.splitter}))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{onClick:e=>console.log("ListView",e.target.nodeId,e.currentTarget.nodeId),ref:e=>{this.listView=e},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}const ke=a.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function Ie(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:ke.itemTitle},s.a.createElement(a.Text,null,"Horizontal ScrollView")),s.a.createElement(a.View,null,s.a.createElement(a.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,bounces:!0},s.a.createElement(a.Text,{style:ke.itemStyle},"A"),s.a.createElement(a.Text,{style:ke.itemStyle},"B"),s.a.createElement(a.Text,{style:ke.itemStyle},"C"),s.a.createElement(a.Text,{style:ke.itemStyle},"D"),s.a.createElement(a.Text,{style:ke.itemStyle},"E"),s.a.createElement(a.Text,{style:ke.itemStyle},"F"),s.a.createElement(a.Text,{style:ke.itemStyle},"A"))),s.a.createElement(a.View,{style:ke.itemTitle},s.a.createElement(a.Text,null,"Vertical ScrollView")),s.a.createElement(a.ScrollView,{bounces:!0,horizontal:!1,style:ke.verticalScrollView,showsVerticalScrollIndicator:!1},s.a.createElement(a.Text,{style:ke.itemStyle},"A"),s.a.createElement(a.Text,{style:ke.itemStyle},"B"),s.a.createElement(a.Text,{style:ke.itemStyle},"C"),s.a.createElement(a.Text,{style:ke.itemStyle},"D"),s.a.createElement(a.Text,{style:ke.itemStyle},"E"),s.a.createElement(a.Text,{style:ke.itemStyle},"F"),s.a.createElement(a.Text,{style:ke.itemStyle},"A")))}const De=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}});let je=0;class Oe extends s.a.Component{constructor(e){super(e),this.state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},this.incrementFontSize=this.incrementFontSize.bind(this),this.decrementFontSize=this.decrementFontSize.bind(this),this.androidNestedTextWrapperStyle={height:100,lineHeight:100}}incrementFontSize(){const{fontSize:e}=this.state;24!==e&&this.setState({fontSize:e+1})}decrementFontSize(){const{fontSize:e}=this.state;6!==e&&this.setState({fontSize:e-1})}render(){const{fontSize:e,textShadowColor:t,textShadowOffset:n}=this.state,o=e=>s.a.createElement(a.View,{style:De.itemTitle},s.a.createElement(a.Text,{style:!0},e));return s.a.createElement(a.ScrollView,{style:{padding:10}},o("shadow"),s.a.createElement(a.View,{style:[De.itemContent],onClick:()=>{let e="red",t={x:10,y:1};je%2==1&&(e="grey",t={x:1,y:1}),je+=1,this.setState({textShadowColor:e,textShadowOffset:t})}},s.a.createElement(a.Text,{style:[De.normalText,{color:"#242424",textShadowOffset:n,textShadowRadius:3,textShadowColor:t}]},"Text shadow is grey with radius 3 and offset 1")),o("color"),s.a.createElement(a.View,{style:[De.itemContent]},s.a.createElement(a.Text,{style:[De.normalText,{color:"#242424"}]},"Text color is black"),s.a.createElement(a.Text,{style:[De.normalText,{color:"blue"}]},"Text color is blue"),s.a.createElement(a.Text,{style:[De.normalText,{color:"rgb(228,61,36)"}]},"This is red")),o("fontSize"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:[De.normalText,{fontSize:e}]},"Text fontSize is "+e),s.a.createElement(a.View,{style:De.button,onClick:this.incrementFontSize},s.a.createElement(a.Text,{style:De.buttonText},"放大字体")),s.a.createElement(a.View,{style:De.button,onClick:this.decrementFontSize},s.a.createElement(a.Text,{style:De.buttonText},"缩小字体"))),o("fontStyle"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:[De.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),s.a.createElement(a.Text,{style:[De.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),o("numberOfLines"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:De.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),s.a.createElement(a.Text,{numberOfLines:2,style:De.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),o("textDecoration"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:[De.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),s.a.createElement(a.Text,{numberOfLines:1,style:[De.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),o("Nest Text"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:3},s.a.createElement(a.Text,{numberOfLines:3,style:[De.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),s.a.createElement(a.Text,{numberOfLines:3,style:De.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),o("Custom font"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:De.customFont},"Hippy 跨端框架")),o("Text Nested"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:"android"===a.Platform.OS?this.androidNestedTextWrapperStyle:{}},s.a.createElement(a.Text,{numberOfLines:1,style:De.normalText},"后面有张图片"),s.a.createElement(a.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),s.a.createElement(a.Text,{numberOfLines:1,style:De.customFont},"前面有张图片"))))}}const Pe=a.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,placeholderTextColor:"#aaaaaa",fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}});class Le extends l.Component{constructor(e){super(e),this.state={textContent:""},this.changeInputContent=this.changeInputContent.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this)}changeInputContent(){this.setState({textContent:"当前时间毫秒:"+Date.now()})}focus(){this.input.focus()}blur(){this.input.blur()}render(){const{textContent:e}=this.state,t=e=>s.a.createElement(a.View,{style:Pe.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:Pe.container_style},t("text"),s.a.createElement(a.TextInput,{ref:e=>{this.input=e},style:Pe.input_style,placeholder:"text",defaultValue:e}),s.a.createElement(a.View,{style:Pe.button,onClick:this.changeInputContent},s.a.createElement(a.Text,null,"点击改变输入框内容")),s.a.createElement(a.View,{style:Pe.button,onClick:this.focus},s.a.createElement(a.Text,null,"Focus")),s.a.createElement(a.View,{style:Pe.button,onClick:this.blur},s.a.createElement(a.Text,null,"Blur")),t("numeric"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"numeric",placeholder:"numeric"}),t("phone-pad"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),t("password"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),t("maxLength"),s.a.createElement(a.TextInput,{style:Pe.input_style,placeholder:"maxLength=5",maxLength:5}))}}var Me=n.p+"assets/defaultSource.jpg";const Be=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function _e(){const e=e=>s.a.createElement(a.View,{style:Be.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:{padding:10}},e("backgroundColor"),s.a.createElement(a.View,{style:[Be.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),s.a.createElement(a.View,{style:[Be.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:Me}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},s.a.createElement(a.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),s.a.createElement(a.View,{style:[Be.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},s.a.createElement(a.Text,{style:{color:"white"}},"渐变色")),e("border props"),s.a.createElement(a.View,{style:[Be.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),s.a.createElement(a.View,{style:[Be.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"yellow"}]}),s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"blue"}]}),s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"green"}]})))}const Fe=a.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),ze="SquarePagerView",We="TrianglePagerView",He="CirclePagerView";function Ne(e,t){const n=t=>s.a.createElement(a.View,{style:Fe.pageContainer,key:t},s.a.createElement(a.View,{style:[Fe.shapeBase,e],key:"shape"}),s.a.createElement(a.View,{style:Fe.mainRec,key:"title"},t?s.a.createElement(a.Text,{style:Fe.title},t):null));return n.displayName=t,n}const Ke=Ne(Fe.square,ze),qe=Ne(Fe.triangle,We),Ue=Ne(Fe.circle,He),Ge=a.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}});class Qe extends s.a.Component{constructor(e){super(e),W()(this,"state",{selectedIndex:0}),this.onPageSelected=this.onPageSelected.bind(this)}onPageSelected(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}onPageScrollStateChanged(e){console.log("onPageScrollStateChanged===",e)}onPageScroll({offset:e,position:t}){console.log("onPageScroll",e,t)}render(){const{selectedIndex:e}=this.state;return s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#ffffff"}},s.a.createElement(a.View,{style:Ge.buttonContainer},s.a.createElement(a.View,{style:Ge.button,onClick:()=>{this.viewpager.setPage(2)}},s.a.createElement(a.Text,{style:Ge.buttonText},"动效滑到第3页")),s.a.createElement(a.View,{style:Ge.button,onClick:()=>this.viewpager.setPageWithoutAnimation(0)},s.a.createElement(a.Text,{style:Ge.buttonText},"直接滑到第1页"))),s.a.createElement(a.ViewPager,{ref:e=>{this.viewpager=e},style:Ge.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[Ke("squarePager"),qe("TrianglePager"),Ue("CirclePager")]),s.a.createElement(a.View,{style:Ge.dotContainer},new Array(3).fill(0).map((t,n)=>{const o=n===e;return s.a.createElement(a.View,{style:[Ge.dot,o?Ge.selectDot:null],key:"dot_"+n})})))}}const Ye=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{width:300,height:300,borderRadius:10}});function Je(){return s.a.createElement(a.View,{style:{padding:10}},s.a.createElement(a.View,{style:Ye.itemTitle},s.a.createElement(a.Text,null,"WebView 示例")),s.a.createElement(a.WebView,{source:{uri:"https://www.qq.com"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:Ye.webViewStyle,onLoad:({url:e})=>console.log("webview onload",e),onLoadStart:({url:e})=>console.log("webview onLoadStart",e),onLoadEnd:({url:e})=>console.log("webview onLoadEnd",e)}))}const Xe=a.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Ze=a.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function $e(){return s.a.createElement(a.View,{style:Xe.shadowDemo},"android"===a.Platform.OS?s.a.createElement(a.View,{style:Xe.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Xe.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Xe.text},"没有偏移阴影样式"))):s.a.createElement(a.View,{style:Xe.shadowDemoCubeIos},s.a.createElement(a.View,{style:Xe.shadowDemoContentIos},s.a.createElement(a.Text,{style:Xe.text},"没有偏移阴影样式"))),"android"===a.Platform.OS?s.a.createElement(a.View,{style:Ze.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Ze.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Ze.text},"偏移阴影样式"))):s.a.createElement(a.View,{style:Ze.shadowDemoCubeIos},s.a.createElement(a.View,{style:Ze.shadowDemoContentIos},s.a.createElement(a.Text,{style:Ze.text},"偏移阴影样式"))))}const et=se.filter(e=>2!==e.style),tt=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}});class nt extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},this.numberOfColumns=2,this.columnSpacing=6,this.interItemSpacing=6,this.mockFetchData=this.mockFetchData.bind(this),this.renderItem=this.renderItem.bind(this),this.getItemType=this.getItemType.bind(this),this.getItemKey=this.getItemKey.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onRefresh=this.onRefresh.bind(this),this.getRefresh=this.getRefresh.bind(this),this.renderPullFooter=this.renderPullFooter.bind(this),this.renderBanner=this.renderBanner.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e})}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."});let t=[];try{t=await this.mockFetchData()}catch(e){}0===t.length&&this.setState({loadingState:"没有更多数据"});const n=[...e,...t];this.setState({dataSource:n}),this.loadMoreDataFlag=!1}renderPullFooter(){return 0===this.state.dataSource.length?null:s.a.createElement(a.View,{style:tt.pullFooter},s.a.createElement(a.Text,{style:{color:"white"}},this.state.loadingState))}async onRefresh(){setTimeout(async()=>{const e=await this.mockFetchData();this.setState({dataSource:e}),this.refresh.refreshComplected()},1e3)}getRefresh(){return s.a.createElement(a.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},s.a.createElement(a.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}onClickItem(e){console.log(`item: ${e} is clicked..`)}getItemType(e){return this.state.dataSource[e].style}getItemKey(e){return"row-"+e}onItemClick(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}renderBanner(){return"android"===a.Platform.OS||0===this.state.dataSource.length?null:s.a.createElement(a.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},s.a.createElement(a.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}renderItem(e){const{dataSource:t}=this.state;let n=null;const o=t[e];switch(o.style){case 1:n=s.a.createElement(ge,{itemBean:o.itemBean});break;case 2:n=s.a.createElement(xe,{itemBean:o.itemBean});break;case 5:n=s.a.createElement(Ce,{itemBean:o.itemBean})}return s.a.createElement(a.View,{onClick:()=>this.onItemClick(e),style:tt.container},s.a.createElement(a.View,{style:tt.itemContainer},n),s.a.createElement(a.View,{style:tt.splitter}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>{const t=[...et,...et];return e(t)},600)})}getWaterfallContentInset(){return{top:0,left:5,bottom:0,right:5}}getItemStyle(){const{numberOfColumns:e,columnSpacing:t}=this,n=a.Dimensions.get("screen").width,o=this.getWaterfallContentInset();return{width:(n-o.left-o.right-(e-1)*t)/e}}render(){const{dataSource:e}=this.state,{numberOfColumns:t,columnSpacing:n,interItemSpacing:o}=this,r=this.getWaterfallContentInset();return s.a.createElement(a.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},s.a.createElement(a.WaterfallView,{ref:e=>{this.listView=e},renderBanner:this.renderBanner,numberOfColumns:t,columnSpacing:n,interItemSpacing:o,numberOfItems:e.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:r,getItemStyle:()=>this.getItemStyle(),containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}const ot="#4c9afa",rt="#f44837",it=a.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:rt},showArea:{height:150,marginVertical:10},button:{borderColor:ot,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:ot,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}});class at extends s.a.Component{constructor(e){super(e),this.state={}}componentWillMount(){this.horizonAnimation=new a.Animation({startValue:150,toValue:20,duration:1e3,delay:500,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.verticalAnimation=new a.Animation({startValue:80,toValue:40,duration:1e3,delay:0,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.scaleAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:1,toValue:1.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:1.2,toValue:.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.bgColorAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:"red",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:"yellow",toValue:"blue",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.txtColorAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:"white",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:"yellow",toValue:"white",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.cubicBezierScaleAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:0,toValue:1,duration:1e3,delay:0,mode:"timing",timingFunction:"cubic-bezier(.45,2.84,.38,.5)"}),follow:!1},{animation:new a.Animation({startValue:1,toValue:0,duration:1e3,mode:"timing",timingFunction:"cubic-bezier(.17,1.45,.78,.14)"}),follow:!0}],repeatCount:"loop"})}componentDidMount(){"web"===a.Platform.OS&&(this.verticalAnimation.setRef(this.verticalRef),this.horizonAnimation.setRef(this.horizonRef),this.scaleAnimationSet.setRef(this.scaleRef),this.bgColorAnimationSet.setRef(this.bgColorRef),this.txtColorAnimationSet.setRef(this.textColorRef),this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef)),this.horizonAnimation.onHippyAnimationStart(()=>{console.log("on animation start!!!")}),this.horizonAnimation.onHippyAnimationEnd(()=>{console.log("on animation end!!!")}),this.horizonAnimation.onHippyAnimationCancel(()=>{console.log("on animation cancel!!!")}),this.horizonAnimation.onHippyAnimationRepeat(()=>{console.log("on animation end!!!")})}componentWillUnmount(){this.scaleAnimationSet&&this.scaleAnimationSet.destroy(),this.horizonAnimation&&this.horizonAnimation.destroy(),this.verticalAnimation&&this.verticalAnimation.destroy(),this.cubicBezierScaleAnimationSet&&this.cubicBezierScaleAnimationSet.destroy()}render(){return s.a.createElement(a.ScrollView,{style:it.container},s.a.createElement(a.Text,{style:it.title},"水平位移动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.horizonAnimation.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},s.a.createElement(a.Text,{style:it.buttonText},"更新"))),s.a.createElement(a.View,{style:it.showArea},s.a.createElement(a.View,{ref:e=>{this.horizonRef=e},style:[it.square,{transform:[{translateX:this.horizonAnimation}]}]})),s.a.createElement(a.Text,{style:it.title},"高度形变动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.verticalAnimation.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.verticalAnimation.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.verticalAnimation.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:it.showArea},s.a.createElement(a.View,{ref:e=>{this.verticalRef=e},style:[it.square,{height:this.verticalAnimation}]})),s.a.createElement(a.Text,{style:it.title},"组合形变动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.scaleAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.scaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.scaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.scaleRef=e},style:[it.square,{transform:[{scale:this.scaleAnimationSet}]}]})),s.a.createElement(a.Text,{style:it.title},"颜色渐变动画(文字渐变仅Android支持)"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.bgColorAnimationSet.start(),this.txtColorAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.bgColorAnimationSet.pause(),this.txtColorAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.bgColorAnimationSet.resume(),this.txtColorAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.bgColorRef=e},style:[it.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},s.a.createElement(a.Text,{ref:e=>{this.textColorRef=e},style:[it.colorText,{color:"android"===a.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),s.a.createElement(a.Text,{style:it.title},"贝塞尔曲线动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.cubicBezierScaleAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.cubicBezierScaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.cubicBezierScaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.cubicBezierScaleRef=e},style:[it.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}const lt=a.StyleSheet.create({containerStyle:{margin:20,alignItems:"center",flexDirection:"column"},itemGroupStyle:{flexDirection:"row",marginTop:10,borderColor:"#4c9afa",borderWidth:1,width:100,height:40,justifyContent:"center",alignItems:"center"},viewGroupStyle:{flexDirection:"row",marginTop:10},infoStyle:{width:60,height:40,fontSize:16,color:"#4c9afa",textAlign:"center"},inputStyle:{width:200,height:40,placeholderTextColor:"#aaaaaa",underlineColorAndroid:"#4c9afa",fontSize:16,color:"#242424",textAlign:"left"},buttonStyle:{textAlign:"center",fontSize:16,color:"#4c9afa",backgroundColor:"#4c9afa11",marginLeft:10,marginRight:10}});class st extends s.a.Component{constructor(e){super(e),this.state={result:""},this.onTextChangeKey=this.onTextChangeKey.bind(this),this.onTextChangeValue=this.onTextChangeValue.bind(this),this.onClickSet=this.onClickSet.bind(this),this.onTextChangeKey=this.onTextChangeKey.bind(this),this.onClickGet=this.onClickGet.bind(this)}onClickSet(){const{key:e,value:t}=this.state;e&&a.AsyncStorage.setItem(e,t)}onClickGet(){const{key:e}=this.state;e&&a.AsyncStorage.getItem(e).then(e=>{this.setState({result:e})})}onTextChangeKey(e){this.setState({key:e})}onTextChangeValue(e){this.setState({value:e})}render(){const{result:e}=this.state;return s.a.createElement(a.ScrollView,{style:lt.containerStyle},s.a.createElement(a.View,{style:lt.viewGroupStyle},s.a.createElement(a.Text,{style:lt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:lt.viewGroupStyle},s.a.createElement(a.Text,{style:lt.infoStyle},"Value:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeValue})),s.a.createElement(a.View,{style:lt.itemGroupStyle,onClick:this.onClickSet},s.a.createElement(a.Text,{style:lt.buttonStyle},"Set")),s.a.createElement(a.View,{style:[lt.viewGroupStyle,{marginTop:60}]},s.a.createElement(a.Text,{style:lt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:[lt.viewGroupStyle,{display:"none"}]},s.a.createElement(a.Text,{style:lt.infoStyle},"Value:"),s.a.createElement(a.Text,{style:[lt.infoStyle,{width:200}]},e)),s.a.createElement(a.View,{style:lt.itemGroupStyle,onClick:this.onClickGet},s.a.createElement(a.Text,{style:lt.buttonStyle},"Get")))}}const ct=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},defaultText:{marginVertical:4,fontSize:18,lineHeight:24,color:"#242424"},copiedText:{color:"#aaa"},button:{backgroundColor:"#4c9afa",borderRadius:4,height:30,marginVertical:4,paddingHorizontal:6,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"white"}});class ut extends s.a.Component{constructor(e){super(e),this.state={hasCopied:!1,text:"Winter is coming",clipboardText:"快点上面的按钮啊魂淡"}}render(){const e=e=>s.a.createElement(a.View,{style:ct.itemTitle},s.a.createElement(a.Text,null,e)),{hasCopied:t,text:n,clipboardText:o}=this.state,r=t?" (已复制) ":"";return s.a.createElement(a.ScrollView,{style:{padding:10}},e("文本复制到剪贴板"),s.a.createElement(a.Text,{style:ct.defaultText},n),s.a.createElement(a.View,{style:ct.button,onClick:()=>{a.Clipboard.setString(n),this.setState({hasCopied:!0})}},s.a.createElement(a.Text,{style:ct.buttonText},"点击复制以上文案"+r)),e("获取剪贴板内容"),s.a.createElement(a.View,{style:ct.button,onClick:async()=>{try{const e=await a.Clipboard.getString();this.setState({clipboardText:e})}catch(e){console.error(e)}}},s.a.createElement(a.Text,{style:ct.buttonText},"点击获取剪贴板内容")),s.a.createElement(a.Text,{style:[ct.defaultText,ct.copiedText]},o))}}const ht=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:80,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"}});class dt extends s.a.Component{constructor(e){super(e),this.state={infoText:"",infoText2:""}}render(){const{infoText:e,infoText2:t}=this.state;return s.a.createElement(a.ScrollView,{style:ht.container},s.a.createElement(a.View,{style:ht.itemTitle,onPress:()=>{const e=new a.HippyEventEmitter;this.call=e.addListener("NORMAL_EVENT",e=>{this.setState({infoText:JSON.stringify(e)})}),Object(a.callNative)("MyEvent","btnClicked")}},s.a.createElement(a.Text,null,"客户端向前端单向通信"),s.a.createElement(a.Text,null,"点此终端会发送NORMAL_EVENT事件"),s.a.createElement(a.Text,null,"事件接收结果:"+e)),s.a.createElement(a.View,{style:ht.itemTitle,onPress:()=>{const e=new a.HippyEventEmitter;this.call=e.addListener("COUNT_DOWN",e=>{this.setState({infoText2:JSON.stringify(e)})}),Object(a.callNative)("MyEvent","addListener","COUNT_DOWN")}},s.a.createElement(a.Text,null,"客户端向前端单向通信的进阶用法"),s.a.createElement(a.Text,null,"点此终端会发送COUNT_DOWN事件"),s.a.createElement(a.Text,null,"事件接收结果:"+t)))}}const mt=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}});class ft extends s.a.Component{constructor(e){super(e),this.state={infoText:"正在获取.."},this.listener=null}async componentWillMount(){const e=this,t=await a.NetInfo.fetch();this.setState({infoText:t}),this.listener=a.NetInfo.addEventListener("change",t=>{e.setState({infoText:"收到通知: "+t.network_info})})}componentDidMount(){const e=this;this.listener&&a.NetInfo.removeEventListener("change",this.listener),fetch("https://m.baidu.com",{headers:{Refer:"https://now.qq.com",Cookie:["harry=guo5","xxx=5"]}}).then(t=>(console.log("成功",t),e.setState({infoText:"成功: "+t.body}),t)).catch(t=>{e.setState({infoText:"收到错误: "+t}),console.error("收到错误:",t)}),a.NetworkModule.setCookie("http://3gxx.qq.com","name=harryguo;gender=male"),a.NetworkModule.getCookies("http://3gxx.qq.com").then(e=>{console.log("cookie: "+e)})}render(){const{infoText:e}=this.state;return s.a.createElement(a.ScrollView,{style:mt.container},s.a.createElement(a.Text,{style:mt.text},e))}}var gt={log(e){Object(a.callNative)("TestModule","log",e)},helloNative(e){Object(a.callNative)("TestModule","helloNative",e)},helloNativeWithPromise:e=>Object(a.callNativeWithPromise)("TestModule","helloNativeWithPromise",e)};class pt extends s.a.Component{constructor(e){super(e),this.state={hello:"TestModule log"}}componentDidMount(){gt.log("hello i am from js"),gt.helloNative({hello:"i am form js"}),gt.helloNativeWithPromise({hello:"i am form js"}).then(e=>{this.setState({hello:JSON.stringify(e)})})}render(){const{hello:e}=this.state;return s.a.createElement(a.Text,{style:{color:"red"}},e)}}const yt=a.StyleSheet.create({fullScreen:{flex:1},row:{flexDirection:"row"},title:{color:"#ccc"},button:{height:56,backgroundColor:"#4c9afa",borderColor:"#5dabfb",borderStyle:"solid",borderWidth:1,paddingHorizontal:20,fontSize:16,textAlign:"center",lineHeight:56,color:"#fff",margin:10},input:{color:"black",flex:1,height:36,lineHeight:36,fontSize:14,borderBottomColor:"#4c9afa",borderBottomStyle:"solid",borderBottomWidth:1,padding:0},output:{color:"black"}}),wt="wss://echo.websocket.org",bt="Rock it with Hippy WebSocket";let xt;var St=function(){const e=Object(l.useRef)(null),t=Object(l.useRef)(null),[n,o]=Object(l.useState)([]),r=e=>{o(t=>[e,...t])};return s.a.createElement(a.View,{style:yt.fullScreen},s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Url:"),s.a.createElement(a.TextInput,{ref:e,value:wt,style:yt.input}),s.a.createElement(a.View,{style:yt.row},s.a.createElement(a.Text,{onClick:()=>{e.current.getValue().then(e=>{xt&&1===xt.readyState&&xt.close(),xt=new WebSocket(e),xt.onopen=()=>r("[Opened] "+xt.url),xt.onclose=()=>r("[Closed] "+xt.url),xt.onerror=e=>r("[Error] "+e.reason),xt.onmessage=e=>r("[Received] "+e.data)})},style:yt.button},"Connect"),s.a.createElement(a.Text,{onClick:()=>xt.close(),style:yt.button},"Disconnect"))),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Message:"),s.a.createElement(a.TextInput,{ref:t,value:bt,style:yt.input}),s.a.createElement(a.Text,{onClick:()=>t.current.getValue().then(e=>{r("[Sent] "+e),xt.send(e)}),style:yt.button},"Send")),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Log:"),s.a.createElement(a.ScrollView,{style:yt.fullScreen},n.map((e,t)=>s.a.createElement(a.Text,{key:t,style:yt.output},e)))))};function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Et(e){for(var t=1;t{const e=a.Dimensions.get("window");({width:t,height:n}=e)});const[o,r]=Object(l.useState)({width:100,height:100,top:10,left:10}),[i,c]=Object(l.useState)({width:0,height:0,x:0,y:0}),u=Et(Et({},Ct.box),o);return s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.View,{style:Ct.demoContent},s.a.createElement(a.View,{ref:e,style:u},s.a.createElement(a.Text,{style:Ct.text},"I am the box"))),s.a.createElement(a.View,{style:Ct.buttonContainer},s.a.createElement(a.View,{onClick:()=>{const e=vt(0,t),o=vt(0,n-300),i=vt(50,120);r({left:e,top:o,width:i,height:i})},style:Ct.button},s.a.createElement(a.Text,{style:Ct.buttonText},"Move the random position")),s.a.createElement(a.View,{onClick:async()=>{try{const t=await a.UIManagerModule.measureInWindow(e.current);c(t)}catch(e){}},style:Ct.button},s.a.createElement(a.Text,{style:Ct.buttonText},"Measure box in window"))),s.a.createElement(a.View,{style:Ct.row},s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.Text,null,"Box style:"),s.a.createElement(a.Text,{style:Ct.black},"Width: "+u.width),s.a.createElement(a.Text,{style:Ct.black},"Height: "+u.height),s.a.createElement(a.Text,{style:Ct.black},"Left: "+u.left),s.a.createElement(a.Text,{style:Ct.black},"Top: "+u.top)),s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.Text,null,"measureInWindow output:"),s.a.createElement(a.Text,{style:Ct.black},"Width: "+i.width),s.a.createElement(a.Text,{style:Ct.black},"Height: "+i.height),s.a.createElement(a.Text,{style:Ct.black},"X: "+i.x),s.a.createElement(a.Text,{style:Ct.black},"Y: "+i.y))))};class Vt extends s.a.Component{changeColor(e){a.UIManagerModule.callUIFunction(this.mytext,"changeColor",[e])}render(){return s.a.createElement("div",ue()({nativeName:"MyView",ref:e=>{this.mytext=e}},this.props))}}class Rt extends s.a.Component{componentDidMount(){setTimeout(()=>{this.myview.changeColor("#0055f0")},1e3)}render(){return s.a.createElement(Vt,{ref:e=>{this.myview=e},text:"你好,我是MyView",style:{width:250,height:100,color:"black"}},s.a.createElement(a.Text,{style:{marginTop:2,marginLeft:2,fontSize:16,color:"#4c0afa"}},"内部子View的文字"))}}const kt=a.StyleSheet.create({style_indicator_item:{width:4,height:4,marginLeft:2.5,marginRight:2.5,borderRadius:2},style_indicator:{position:"absolute",bottom:6,left:0,right:0,marginLeft:0,marginRight:0,alignItems:"center",justifyContent:"center",flexDirection:"row"}});class It extends s.a.Component{constructor(e){super(e),this.state={current:e.current||0}}update(e){const{current:t}=this.state;t!==e&&this.setState({current:e})}render(){const{count:e}=this.props,{current:t}=this.state,n=[];for(let o=0;o=r||(this.indicator.update(o),this.currentIndex=o)}onScrollBeginDrag(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}onScrollEndDrag(){this.doCreateTimer()}onLayout(e){this.width=e.layout.width}doSwitchPage(e){this.scrollview.scrollTo(this.imgWidth*e,0,!0)}doCreateTimer(){this.doClearTimer(),this.duration<=0||(this.interval=setInterval(()=>{this.doSwitchPage((this.currentIndex+1)%this.itemCount)},this.duration))}doClearTimer(){this.interval&&clearInterval(this.interval),this.interval=null}render(){const{images:e}=this.props,t=[];for(let n=0;n{this.scrollview=e}},t),s.a.createElement(It,{ref:e=>{this.indicator=e},count:this.itemCount}))}}W()(Dt,"defaultProps",{duration:0,currentPage:0,images:[]});const jt=["http://res.imtt.qq.com/circle/real/1528701933567-.jpg","http://res.imtt.qq.com/circle/real/1527758982390-20180530184743.jpg","http://res.imtt.qq.com/circle/real/1527670660574-.jpg"],Ot=a.StyleSheet.create({sliderStyle:{width:400,height:180},infoStyle:{height:40,fontSize:16,color:"#4c9afa",marginTop:15}});function Pt(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.Text,{style:Ot.infoStyle},"Auto:"),s.a.createElement(Dt,{style:Ot.sliderStyle,images:jt,duration:1e3}),s.a.createElement(a.Text,{style:Ot.infoStyle},"Manual:"),s.a.createElement(Dt,{style:Ot.sliderStyle,images:jt,duration:0}))}const Lt=a.StyleSheet.create({container:{height:45,paddingLeft:4,flexDirection:"row",backgroundColor:"#ffffff",borderBottomColor:"#E5E5E5",borderBottomWidth:1},scroll:{flex:1,height:44},navItem:{width:60,height:44,paddingTop:13},navItemText:{fontSize:16,lineHeight:17,textAlign:"center",backgroundColor:"#ffffff"},navItemTextNormal:{color:"#666666"},navItemTextBlue:{color:"#2D73FF"}});class Mt extends s.a.Component{constructor(e){super(e),this.state={curIndex:0,navList:["头条","推荐","圈子","NBA","中超","英超","西甲","CBA","澳网","电影","本地","娱乐","小说","生活","直播","游戏"]},this.navScrollView=null,this.viewPager=null,this.onViewPagerChange=this.onViewPagerChange.bind(this),this.pressNavItem=this.pressNavItem.bind(this),this.scrollSV=this.scrollSV.bind(this)}static getPage(e,t){switch(t%3){case 0:return Ke(e);case 1:return Ue(e);case 2:return qe(e);default:return null}}componentDidUpdate(){this.scrollSV()}onViewPagerChange(e){this.setState({curIndex:e})}scrollSV(){if(this.navScrollView){const{curIndex:e,navList:t}=this.state,n=t.length,o=he.getScreenWidth(),r=o/2/60,i=60*nn-r?60*n-o:60*e-60*r+30,this.navScrollView.scrollTo({x:a,y:0,animated:!0})}}pressNavItem(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}renderNav(){const{navList:e,curIndex:t}=this.state;return s.a.createElement(a.View,{style:Lt.container},s.a.createElement(a.ScrollView,{style:Lt.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:e=>{this.navScrollView=e}},e.map((e,n)=>s.a.createElement(a.View,{style:Lt.navItem,key:"nav_"+e,activeOpacity:.5,onClick:()=>this.pressNavItem(n)},s.a.createElement(a.Text,{style:[Lt.navItemText,t===n?Lt.navItemTextBlue:Lt.navItemTextNormal],numberOfLines:1},e)))))}render(){const{navList:e}=this.state;return s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),s.a.createElement(a.ViewPager,{ref:e=>{this.viewPager=e},style:{flex:1},initialPage:0,onPageSelected:e=>this.onViewPagerChange(e.position)},e.map((e,t)=>Mt.getPage(e,t))))}}const{width:Bt}=a.Dimensions.get("window"),_t=a.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:Bt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Bt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}});class Ft extends s.a.Component{constructor(e){super(e),this.demon1Point=s.a.createRef(),this.demo1PointDom=null,this.state={demo2Left:0},this.isDemon1Layouted=!1,this.idDemon2Layouted=!1}componentDidMount(){}onDemon1Layout(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=a.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}onTouchDown1(e){const{page_x:t}=e,n=t-40;console.log("touchdown x",t,n,Bt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchMove1(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Bt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchDown2(e){const{page_x:t}=e,n=t-40;console.log("touchdown x",t,n,Bt),this.setState({demo2Left:n})}onTouchMove2(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Bt),this.setState({demo2Left:n})}render(){const{demo2Left:e}=this.state;return s.a.createElement(a.View,{style:_t.setNativePropsDemo},s.a.createElement(a.Text,null,"setNativeProps实现拖动效果"),s.a.createElement(a.View,{style:_t.nativeDemo1Drag,onTouchDown:e=>this.onTouchDown1(e),onTouchMove:e=>this.onTouchMove1(e)},s.a.createElement(a.View,{onLayout:()=>this.onDemon1Layout(),style:_t.nativeDemo1Point,ref:this.demon1Point})),s.a.createElement(a.View,{style:_t.splitter}),s.a.createElement(a.Text,null,"普通渲染实现拖动效果"),s.a.createElement(a.View,{style:_t.nativeDemo2Drag,onTouchDown:e=>this.onTouchDown2(e),onTouchMove:e=>this.onTouchMove2(e)},s.a.createElement(a.View,{style:[_t.nativeDemo2Point,{left:e}]})))}}const zt=a.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Wt extends s.a.Component{constructor(e){super(e),this.state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},this.onAsyncComponentLoad=this.onAsyncComponentLoad.bind(this)}onAsyncComponentLoad(){console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then(e=>{this.setState({AsyncComponentFromLocal:e.default||e})}).catch(e=>console.error("import async local component error",e)),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then(e=>{this.setState({AsyncComponentFromHttp:e.default||e})}).catch(e=>console.error("import async remote component error",e))}render(){const{AsyncComponentFromLocal:e,AsyncComponentFromHttp:t}=this.state;return s.a.createElement(a.View,{style:zt.dynamicImportDemo},s.a.createElement(a.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},s.a.createElement(a.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),s.a.createElement(a.View,{style:{marginTop:20}},e?s.a.createElement(e,null):null,t?s.a.createElement(t,null):null))}}const Ht=a.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Nt extends s.a.Component{render(){const{country:e,language:t,direction:n}=a.Platform.Localization||{};return s.a.createElement(a.View,{style:Ht.LocalizationDemo},s.a.createElement(a.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},s.a.createElement(a.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},`国际化相关信息:国家 ${e} | 语言 ${t} | 方向 ${1===n?"RTL":"LTR"}`)))}}const Kt=a.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}});class qt extends s.a.Component{constructor(e){super(e),this.state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},this.onTurboFunc=this.onTurboFunc.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.getRowKey=this.getRowKey.bind(this)}async onTurboFunc(e){let t;if("nativeWithPromise"===e)t=await(async e=>turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(e))("aaa");else if("getTurboConfig"===e)this.config=getTurboModule("demoTurbo").getTurboConfig(),t="获取到config对象";else if("printTurboConfig"===e)n=this.config,t=getTurboModule("demoTurbo").printTurboConfig(n);else if("getInfo"===e)t=this.config.getInfo();else if("setInfo"===e)this.config.setInfo("Hello World"),t="设置config信息成功";else{t={getString:()=>{return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:()=>{return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:()=>{return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:()=>{return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:()=>{return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:()=>{return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[e]()}var n;this.setState({result:t})}renderResultView(){return s.a.createElement(a.View,{style:Kt.resultView},s.a.createElement(a.Text,{style:{backgroundColor:"darkseagreen"}},""+this.state.result))}getRenderRow(e){const{funList:t}=this.state;return s.a.createElement(a.View,{style:Kt.cellContentView},s.a.createElement(a.View,{style:Kt.funcInfo},s.a.createElement(a.Text,{numberofLines:0},"函数名:",t[e])),s.a.createElement(a.Text,{style:Kt.actionButton,onClick:()=>this.onTurboFunc(t[e])},"执行"))}getRowKey(e){const{funList:t}=this.state;return t[e]}render(){const{funList:e}=this.state;return s.a.createElement(a.View,{style:Kt.container},this.renderResultView(),s.a.createElement(a.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Gt(e){for(var t=1;t0===e.index?s.a.createElement(a.View,{style:[Zt.container]},s.a.createElement(a.View,{style:{backgroundColor:Zt.title.backgroundColor,marginLeft:12}},s.a.createElement(a.Text,{numberOfLines:1,style:[Zt.title,{fontWeight:"bold"}]},t.name)),s.a.createElement(a.View,{style:Zt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Zt.title},"ver: ","2.2.1"!==a.default.version?""+a.default.version:"master"))):s.a.createElement(a.View,{style:[Zt.container]},s.a.createElement(a.View,{onClick:()=>e.goBack(),style:[Zt.headerButton,"ios"===a.Platform.OS?null:{marginLeft:20}]},s.a.createElement(a.Image,{style:Zt.backIcon,source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAIPUlEQVR4Xu2dT8xeQxTGn1O0GiWEaEJCWJCwQLBo/WnRSqhEJUQT0W60G+1Ku1SS2mlXaqM2KqJSSUlajVb9TViwYEHCQmlCQghRgqKPTHLK7Zfvfd97Zt5535l7z91+58zce57fnfe7d+Y+I/Cj1xWQXl+9XzwcgJ5D4AA4AD2vQM8v30cAB6DnFZjA5ZO8VUTenEBX5i58BDCXzJZA8ikA6wFsFpEttuz80Q5AxhqTfAbA2kYXW0VkU8YuzU07AOaStUsg+RyA1bNEFwWBA9BOz9ZRJOcAeAHAqiFJ20VkQ+tGMwY6AGMsLslTAOwGcE+LZneIyLoWcVlDHIAxlVfFfxXACkOTO0VkjSF+7KEOwJhKSnIfgDuNzf0M4BoR+cqYN7ZwByCxlCTnAtgLYLmxqR8ALBGRz4x5Yw13ABLKSfJ0APsBLDU28x2Am0XkC2Pe2MMdgMiSkjwDwAEAi41NBPEXichhY16WcAcgoqwkzwRwCMD1xvRvANxUivjh3B0Ao4IkzwbwFoCrjalf67B/xJiXNdwBMJSX5LkA3gFwpSEthH6pd/63xrzs4Q5AyxKTPB/AuwAub5lyIuxzvfO/N+ZNJNwBaFFmkhcAeA/ApS3CmyGf6qPej8a8iYU7ACNKTfIivfMvNqryMYBbRCS87Cn2cACGSKPivw/gQqOCQfzwnH/UmDfxcAdgQMlJXqLDvlX8DwHcVoP4/hg4WPzLdNhfaLwlw2hxu4j8ZsybWriPADNKT/IKfdQ7z6jK2wDuEJE/jHlTDXcAGuUneZW+5DnHqMpBAHeJyDFj3tTDHQCVgOR1+nr3LKMqYRp4pYj8bcwrItwBAEBykU7sLDCqsgfAfSLyjzGvmPDeA0ByiU7pzjeqEsS/V0SOG/OKCu81ACSX6WKOeUZVdgF4oHbxe/0YSDIs33oFwGlG8ae+js94vkPDezkCkFypq3dPNRaziJW8xnN2AJoVIHm/rtsPS7gtRzFr+S0nPSq2VyOAiv9ixEKYor7mGSWq5e+9AYDkgwDC51rWa94iIpstRa0p1lqMmq7tv3Ml+RCA8KGm9Xo3isi2Ki+65UlbC9Ky2XLCSD4MYHvEGXVe/M4/BpJ8BMDWCPHXi8jTEXnVpXR2BCD5OIDHjIoQwDoRedaYV214JwEg+SSAjUZVgvhrROR5Y17V4Z0DoGHJYhEmTOaEV7svWZK6ENspAGaxZGmjUZjGDTN64bVw747OADDEkmWYqEH8u0Xktd4prxdcPQAtLVlm0/cvXcjRW/GrfwxU8V9uacnShOBPXcL1Rl/v/BPXXe0IYPTjaer8uy7eDN/49f6oEgCSYRo3/NNm8eMJYv+qy7Y/6L3ytf4PkGDJ8ot+sPGRi/9/BaoaARIsWX7S7/Q+cfFPrkA1ACRYsgTxb5y2GVOp4FUBQIIlSxFOXKWKX8VjYIIlSzFOXA5AZAUSLFmKM2OKLEH2tGJ/AhIsWYo0Y8quZGQHRQKQYMlSrBlTpD7Z04oDIMGSpWgzpuxKRnZQFACJ4t8gIsWaMUXqkz2tGAASLFmKd+LKrmJCB0UAQDLWkqUKJ64EfbKnTh2ABEuWqsyYsisZ2cFUAUiwZKnOjClSn+xpUwMgwZKlSjOm7EpGdlAjAOHuDz58VblxReqTPW1qAIQr85+A7PqO7GCqACgEsb58/k/gSHlHB0wdAIXAHwNHa5UloggAFIJYb15/EZSARjEAKASx1uw+DxAJQVEAKASxmzP4TGAEBMUBoBCE7VnC0m3rDh1hLcBiESlub54IbSaSUiQADQhi9ujxBSEGdIoFQCGI3aXLl4S1hKBoABSC2H36fFFoCwiKB0AhiN2p05eFj4CgCgAUgti9ev2roCEQVAOAQhC7W3f4LjDs4uWfhs2AoSoAFIK5avG+vMVPXDPEPw6dpWDVAaAQ+OfhRvoHhVcJgEIQ3L53R7iDuEFEg4ZqAVAI5qj1+yrjDeEWMVqwqgE4ITrJYAFvhcBNoiLcs4032uTCE2zieusRGNTpxAjQGAmCJfxaI3bBJTTs/uVGkcbCFRnuVrE2WTo1AjRGAjeLbslBJwHQJ4RgFR8s4y2H28VbqlV6rG8YMVqhzo4AjZ8D3zJmCAedB0B/DnzTqAEQ9AIAhSB227gnROTR0YNpnRG9AUAhCLuG+saRXZkLiLnnfOvYk6vWqxGg8Y+hbx7dpcmgyJHAt4/v2lyAFQSSy3R10Txj7i7dZey4Ma+48F7+BDRVILkEwH4A843q7NFJpKoh6D0A+nSwCMABAAsiIAjTyWFGscrDAVDZEjyL9unuY2ELuuoOB6AhWYJlzUHdhexYbQQ4ADMUS/AtrNK9zAGY5ZZNcC6tzr/QARgwZqt3cfAoWGgc1qsyr3IAhqibYGAdPIzDp2hHjfBMPNwBGFHyBAv7KoysHYAW91zCDibFO5g5AC0A0JdFwbcoxrKmaAczB6AlAApBrGVNsQ5mDoABAIUg1rKmSPMqB8AIgEIQa1kTzKuCjd2RiG6zpDgAkWVN2Mu4KAczByASAB0JYi1rinEwcwASAFAIgmXN6wCWGpsqwsHMATCqNiic5F4AK4zNBQeza0XksDFvbOEOwJhKSTLGt2iniKwZ0ylENeMARJVt9iSSFt+iHSKybozdRzXlAESVbXASyTa+RdtFZMOYu45qzgGIKtvopCGWNVtFZNPoFiYT4QBkrDPJmZY1W0Rkc8YuzU07AOaS2RIaljUbRWSbLTt/tAOQv8Zhf8Sw0eWhCXRl7sIBMJesWwkOQLf0NF+NA2AuWbcSHIBu6Wm+GgfAXLJuJTgA3dLTfDX/AlSTmJ/JwwOoAAAAAElFTkSuQmCC"}})),s.a.createElement(a.View,{style:Zt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Zt.title},t.name))));const en="#4c9afa",tn="#f44837",nn=a.StyleSheet.create({rowContainer:{alignItems:"center"},buttonView:{borderColor:en,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:en,textAlign:"center",textAlignVertical:"center"}});class on extends l.Component{constructor(e){super(e),this.state={pressItem:"",dataSource:[...Yt]},this.renderRow=this.renderRow.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.clickTo=this.clickTo.bind(this)}componentDidMount(){const{history:e}=this.props;"android"===a.Platform.OS&&a.BackAndroid.addListener(()=>(console.log("BackAndroid"),0===e.index&&(e.goBack(),!0)))}getRowType(e){const{dataSource:t}=this.state;return t[e].meta.style}getRowKey(e){const{dataSource:t}=this.state;return t[e].path||""+e}feedback(e){const t=e||"";this.setState({pressItem:t})}clickTo(e){const{history:t}=this.props;t.push(e)}renderRow(e){const{dataSource:t,pressItem:n}=this.state,o=t[e],{style:r}=o.meta;return s.a.createElement(a.View,{style:nn.rowContainer},s.a.createElement(a.View,{onPressIn:()=>this.feedback(o.path),onPressOut:()=>this.feedback(),onClick:()=>this.clickTo(o.path),style:[nn.buttonView,{borderColor:1===r?en:tn,opacity:n===o.path?.5:1}]},s.a.createElement(a.Text,{style:[nn.buttonText,{color:1===r?en:tn}]},o.name)))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.renderRow,getRowType:this.getRowType,getRowKey:this.getRowKey})}}const rn=[{path:"/Gallery",name:"Hippy React 示例",component:F(on),meta:{style:1}},...Yt];var an=()=>s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(k,{initialEntries:["/Gallery"]},rn.map(e=>{const t=e.component;return s.a.createElement(O,{key:e.path,exact:!0,path:""+e.path},s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"},onClick:()=>{console.log("click router")}},s.a.createElement($t,{route:e}),s.a.createElement(t,{meta:e.meta||{}})))})));const ln=a.StyleSheet.create({stepText:{color:"#242424",marginBottom:12},container:{flex:1,backgroundColor:"#fff",justifyContent:"center",padding:20},button:{width:120,height:40,borderRadius:8,backgroundColor:"#4c9afa",alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,textAlign:"center",lineHeight:40,color:"#fff"},buttonContainer:{alignItems:"center",marginTop:12,justifyContent:"center"}});class sn extends l.Component{constructor(e){super(e),this.clickToDebug=this.clickToDebug.bind(this)}clickToDebug(){const{instanceId:e}=this.props;Object(a.callNative)("TestModule","debug",e)}render(){const e=["2. 在前端项目中使用 npm install 安装依赖","3. 在前端项目中运行 npm run hippy:dev 编译调试包","4. 另开一个命令行窗口,运行 npm run hippy:debug 启动调试服务","5. 点击下方的“开始调试”按钮开始调试业务包"];"android"===a.Platform.OS?(e.unshift("1. 使用 USB 线连接 Android 手机和电脑,并启动 Hippy"),e.push("6. 打开 chrome://inspect,需要确保 localhost:38989 在 Discover network targets 右侧的 Configuration 弹窗中,下方会出现设备列表,点击 Inspect 进行调试")):"ios"===a.Platform.OS&&(e.unshift("1. 启动 iOS 模拟器并启动打开 HippyDemo"),e.push("6. 打开 Safari -> Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return s.a.createElement(a.ScrollView,{style:ln.container},e.map((e,t)=>s.a.createElement(a.Text,{style:ln.stepText,key:"steps-"+t},e)),s.a.createElement(a.View,{style:ln.buttonContainer},s.a.createElement(a.View,{style:ln.button,onClick:this.clickToDebug},s.a.createElement(a.Text,{style:ln.buttonText,numberOfLines:1},"点击调试"))))}}const cn=a.StyleSheet.create({container:{flex:1}});class un extends l.Component{constructor(e){super(e);const{width:t}=a.Dimensions.get("window"),{height:n}=a.Dimensions.get("window");this.state={isVertical:t{const{width:t,height:n}=e.layout;this.setState({isVertical:t{switch(e){case 0:return s.a.createElement(an,null);case 1:case 2:return s.a.createElement(sn,{instanceId:n});default:return s.a.createElement(a.View,{style:hn.blankPage})}})(),s.a.createElement(a.View,{style:hn.buttonContainer},(()=>{let n=["API","本地调试"];return"ios"!==a.Platform.OS||t||(n=["API"]),n.map((t,n)=>s.a.createElement(a.View,{key:"button_"+t,style:hn.button,onClick:()=>this.setState({pageIndex:n})},s.a.createElement(a.Text,{style:[hn.buttonText,n===e?{color:"#4c9afa"}:null],numberOfLines:1},t)))})()))}}new a.Hippy({appName:"Demo",entryPage:dn,bubbles:!1,silent:!1}).start()},0:function(e,t,n){n("./node_modules/regenerator-runtime/runtime.js"),e.exports=n("./src/main.js")},"dll-reference hippyReactBase":function(e,t){e.exports=hippyReactBase}}); \ No newline at end of file + */var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,m=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,p=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116,w=o?Symbol.for("react.block"):60121,b=o?Symbol.for("react.fundamental"):60117,x=o?Symbol.for("react.responder"):60118,S=o?Symbol.for("react.scope"):60119;function T(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case h:case d:case a:case s:case l:case f:return e;default:switch(e=e&&e.$$typeof){case u:case m:case y:case g:case c:return e;default:return t}}case i:return t}}}function E(e){return T(e)===d}t.AsyncMode=h,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=m,t.Fragment=a,t.Lazy=y,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=l,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||T(e)===h},t.isConcurrentMode=E,t.isContextConsumer=function(e){return T(e)===u},t.isContextProvider=function(e){return T(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return T(e)===m},t.isFragment=function(e){return T(e)===a},t.isLazy=function(e){return T(e)===y},t.isMemo=function(e){return T(e)===g},t.isPortal=function(e){return T(e)===i},t.isProfiler=function(e){return T(e)===s},t.isStrictMode=function(e){return T(e)===l},t.isSuspense=function(e){return T(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===l||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===m||e.$$typeof===b||e.$$typeof===x||e.$$typeof===S||e.$$typeof===w)},t.typeOf=T},"./node_modules/react-is/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/react/index.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/react/index.js")},"./node_modules/regenerator-runtime/runtime.js":function(e,t,n){var o=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,o){var r=t&&t.prototype instanceof h?t:h,i=Object.create(r.prototype),a=new E(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return v()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var s=c(e,t,n);if("normal"===s.type){if(o=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function h(){}function d(){}function m(){}var f={};l(f,r,(function(){return this}));var p=Object.getPrototypeOf,g=p&&p(p(C([])));g&&g!==t&&n.call(g,r)&&(f=g);var y=m.prototype=h.prototype=Object.create(f);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var o;this._invoke=function(r,i){function a(){return new t((function(o,a){!function o(r,i,a,l){var s=c(e[r],e,i);if("throw"!==s.type){var u=s.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return o("throw",e,a,l)}))}l(s.arg)}(r,i,o,a)}))}return o=o?o.then(a,a):a()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=c(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var o={};n.r(o),n.d(o,"Focusable",(function(){return H})),n.d(o,"Image",(function(){return U})),n.d(o,"ListView",(function(){return Z})),n.d(o,"Modal",(function(){return oe})),n.d(o,"RefreshWrapper",(function(){return Ae})),n.d(o,"PullHeader",(function(){return Re})),n.d(o,"ScrollView",(function(){return Ie})),n.d(o,"Text",(function(){return Oe})),n.d(o,"TextInput",(function(){return Le})),n.d(o,"View",(function(){return _e})),n.d(o,"ViewPager",(function(){return Qe})),n.d(o,"WebView",(function(){return Je})),n.d(o,"BoxShadow",(function(){return $e})),n.d(o,"WaterfallView",(function(){return nt}));var r={};n.r(r),n.d(r,"Animation",(function(){return at})),n.d(r,"AsyncStorage",(function(){return st})),n.d(r,"Clipboard",(function(){return ut})),n.d(r,"NativeEvent",(function(){return dt})),n.d(r,"NetInfo",(function(){return ft})),n.d(r,"TestModule",(function(){return gt})),n.d(r,"WebSocket",(function(){return St})),n.d(r,"UIManagerModule",(function(){return At}));var i={};n.r(i),n.d(i,"Slider",(function(){return jt})),n.d(i,"TabHost",(function(){return Pt})),n.d(i,"SetNativeProps",(function(){return Bt})),n.d(i,"DynamicImport",(function(){return Ft})),n.d(i,"Localization",(function(){return Wt})),n.d(i,"Turbo",(function(){return Nt}));var a=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/react/index.js"),s=n.n(l),c=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/prop-types/index.js");function u(){return(u=Object.assign||function(e){for(var t=1;t=0;u--){var m=r[u];"."===m?d(r,u):".."===m?(d(r,u),c++):c&&(d(r,u),c--)}if(!l)for(;c--;c)r.unshift("..");!l||""===r[0]||r[0]&&h(r[0])||r.unshift("");var f=r.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};var f="Invariant failed";function p(e,t){if(!e)throw new Error(f)}function g(e){var t=e.pathname,n=e.search,o=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function y(e,t,n,o){var r;"string"==typeof e?(r=function(e){var t=e||"/",n="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===o?"":o}}(e)).state=t:(void 0===(r=u({},e)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==t&&void 0===r.state&&(r.state=t));try{r.pathname=decodeURI(r.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=m(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function w(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,o,r){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(!1!==i)}else r(!0)},appendListener:function(e){var n=!0;function o(){n&&e.apply(void 0,arguments)}return t.push(o),function(){n=!1,t=t.filter((function(e){return e!==o}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),o=0;ot?n.splice(t,n.length-t,o):n.push(o),h({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=y(e,t,d(),S.location);c.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(S.entries[S.index]=o,h({action:"REPLACE",location:o}))}))},go:x,goBack:function(){x(-1)},goForward:function(){x(1)},canGo:function(e){var t=S.index+e;return t>=0&&t=0||(r[n]=e[n]);return r}var v=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),A=n.n(v),V=function(e){var t=Object(S.a)();return t.displayName=e,t}("Router"),R=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(c.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return s.a.createElement(V.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(s.a.Component);var k=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;rthis.onClick(e),requestFocus:0===e,focusStyle:{backgroundColor:"red"},noFocusStyle:{backgroundColor:"blue"}},s.a.createElement(a.Text,{style:{color:"white"}},t===e?"我被点击了"+e:"没有被点击"+e)))}render(){return s.a.createElement(a.ScrollView,null,this.getRenderRow(0),this.getRenderRow(1),this.getRenderRow(2),this.getRenderRow(3),this.getRenderRow(4),this.getRenderRow(5),this.getRenderRow(6),this.getRenderRow(7),this.getRenderRow(8),this.getRenderRow(9),this.getRenderRow(10),this.getRenderRow(11),this.getRenderRow(12),this.getRenderRow(13),this.getRenderRow(14),this.getRenderRow(15),this.getRenderRow(16),this.getRenderRow(17),this.getRenderRow(18))}}var N=n.p+"assets/defaultSource.jpg";const K="https://static.res.qq.com/nav/3b202b2c44af478caf1319dece33fff2.png",q=a.StyleSheet.create({container_style:{alignItems:"center"},image_style:{width:300,height:180,margin:16,borderColor:"#4c9afa",borderWidth:1,borderRadius:4},info_style:{marginTop:15,marginLeft:16,fontSize:16,color:"#4c9afa"}});function U(){return s.a.createElement(a.ScrollView,{style:q.container_style},s.a.createElement(a.Text,{style:q.info_style},"Contain:"),s.a.createElement(a.Image,{style:[q.image_style],resizeMode:a.Image.resizeMode.contain,defaultSource:N,source:{uri:K},onLoadStart:()=>{console.log("===image onloadStart===")},onLoad:()=>{console.log("===image onLoad===")},onError:e=>{console.log("===image onError===",e)},onLoadEnd:()=>{console.log("===image onLoadEnd===")}}),s.a.createElement(a.Text,{style:q.info_style},"Cover:"),s.a.createElement(a.Image,{style:[q.image_style],defaultSource:N,source:{uri:K},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Text,{style:q.info_style},"Center:"),s.a.createElement(a.Image,{style:[q.image_style],defaultSource:N,source:{uri:K},resizeMode:a.Image.resizeMode.center}),s.a.createElement(a.Text,{style:q.info_style},"Cover GIF:"),s.a.createElement(a.Image,{style:[q.image_style],resizeMode:a.Image.resizeMode.cover,defaultSource:N,source:{uri:"http://img.qdaily.com/article/article_show/20180226115511QR0IMWjcBZmo8FaV.gif"},onLoadEnd:()=>{console.log("gif onLoadEnd")}}))}const G=[{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5},{style:1},{style:2},{style:5}],Q=a.StyleSheet.create({container:{backgroundColor:"#fff",collapsable:!1},itemContainer:{padding:12},separatorLine:{marginLeft:12,marginRight:12,height:1,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Y({index:e}){return s.a.createElement(a.View,{style:Q.container,onClickCapture:e=>{console.log("onClickCapture style1",e.target.nodeId,e.currentTarget.nodeId)},onTouchDown:e=>(e.stopPropagation(),console.log("onTouchDown style1",e.target.nodeId,e.currentTarget.nodeId),!1),onClick:e=>(console.log("click style1",e.target.nodeId,e.currentTarget.nodeId),!1)},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 1 UI"))}function J({index:e}){return s.a.createElement(a.View,{style:Q.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 2 UI"))}function X({index:e}){return s.a.createElement(a.View,{style:Q.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 5 UI"))}class Z extends s.a.Component{constructor(e){super(e),this.state={dataSource:G,fetchingDataFlag:!1},this.fetchTimes=0,this.delText="Delete",this.mockFetchData=this.mockFetchData.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.onEndReached=this.onEndReached.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.getRowStyle=this.getRowStyle.bind(this),this.onDelete=this.onDelete.bind(this),this.onAppear=this.onAppear.bind(this),this.onDisappear=this.onDisappear.bind(this),this.onWillAppear=this.onWillAppear.bind(this),this.onWillDisappear=this.onWillDisappear.bind(this),this.rowShouldSticky=this.rowShouldSticky.bind(this)}onDelete({index:e}){const{dataSource:t}=this.state,n=t.filter((t,n)=>e!==n);this.setState({dataSource:n})}async onEndReached(){const{dataSource:e,fetchingDataFlag:t}=this.state;if(t)return;this.setState({fetchingDataFlag:!0,dataSource:e.concat([{style:100}])});const n=await this.mockFetchData(),o=e[e.length-1];o&&100===o.style&&e.pop();const r=e.concat(n);this.setState({dataSource:r})}onAppear(e){console.log("onAppear",e)}onDisappear(e){console.log("onDisappear",e)}onWillAppear(e){console.log("onWillAppear",e)}onWillDisappear(e){console.log("onWillDisappear",e)}rowShouldSticky(e){return 2===e}getRowType(e){return this.state.dataSource[e].style}getRowStyle(){return{width:100,height:50}}getRowKey(e){return"row-"+e}getRenderRow(e){const{dataSource:t}=this.state;let n=null;const o=t[e],r=t.length===e+1;switch(o.style){case 1:n=s.a.createElement(Y,{index:e});break;case 2:n=s.a.createElement(J,{index:e});break;case 5:n=s.a.createElement(X,{index:e});break;case 100:n=s.a.createElement(a.Text,{style:Q.loading},"Loading now...")}return s.a.createElement(a.View,{style:Q.container,onClick:e=>(console.log("click style outer",e.target.nodeId,e.currentTarget.nodeId),!1)},s.a.createElement(a.View,{style:Q.itemContainer},n),r?null:s.a.createElement(a.View,{style:Q.separatorLine}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=100?e([]):e(G)),600)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{onTouchDown:e=>{console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:e=>{console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:e=>(console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!1),bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:this.rowShouldSticky,onAppear:this.onAppear,onDisappear:this.onDisappear,onWillAppear:this.onWillAppear,onWillDisappear:this.onWillDisappear})}}const $="#4c9afa",ee="#f44837",te="#fff",ne=a.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:$,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:$,textAlign:"center",textAlignVertical:"center"}});class oe extends s.a.Component{constructor(e){super(e),this.state={visible:!1,press:!1},this.show=this.show.bind(this),this.hide=this.hide.bind(this)}feedback(e){this.setState({press:"in"===e})}show(){this.setState({visible:!0})}hide(){this.setState({visible:!1})}render(){const{press:e,visible:t}=this.state;return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:ne.container},s.a.createElement(a.View,{onPressIn:()=>this.feedback("in"),onPressOut:()=>this.feedback.bind("out"),onClick:this.show,style:[ne.buttonView,{borderColor:$,opacity:e?.5:1}]},s.a.createElement(a.Text,{style:[ne.buttonText,{color:$}]},"点击弹出浮层"))),s.a.createElement(a.Modal,{transparent:!0,animationType:"slide_fade",visible:t,onRequestClose:()=>{},supportedOrientations:["portrait"]},s.a.createElement(a.View,{style:{flex:1,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:ee,marginTop:300,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.Text,{style:{color:te,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}const re="http://res.imtt.qq.com/tps/expo-listview-1.jpg",ie={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[re,re,re],subInfo:["三图评论","11评"]}},ae={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},le={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}};var se=[le,ie,ae,ie,ae,ie,ae,le,ie],ce=n("./node_modules/@babel/runtime/helpers/extends.js"),ue=n.n(ce);var he={getScreenWidth(){const e=a.Dimensions.get("screen").width,t=a.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray(e){const t=[];for(let n=0;n=812&&a.PixelRatio.get()>=2&&(e=!0),e}};const de=(he.getScreenWidth()-24-12)/3,me=Math.floor(de/1.35),fe=a.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:me,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:de,height:me},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function pe(e){const{itemBean:{title:t,picList:n}}=e;let{itemBean:{subInfo:o}}=e,r=null;if(o&&o.length){o=he.uniqueArray(o);const e=o.join(" ");r=s.a.createElement(a.Text,{style:fe.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,ue()({},e,{style:{collapsable:!1}}),s.a.createElement(a.Text,{style:[fe.title],numberOfLines:2,enableScale:!0},t),s.a.createElement(a.View,{style:fe.imageContainer},s.a.createElement(a.Image,{style:fe.image,source:{uri:n[0]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:[fe.image,{marginLeft:6,marginRight:6}],source:{uri:n[1]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:fe.image,source:{uri:n[2]},resizeMode:a.Image.resizeMode.cover})),r?s.a.createElement(a.View,{style:fe.tagLine},r):null)}const ge=he.getScreenWidth()-24,ye=Math.floor(ge-12)/3,we=Math.floor(ye/1.35),be=a.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:we},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ye,height:we},image:{width:ye,height:we},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function xe(e){if("undefined"===e)return null;const{itemBean:t}=e;if(!t)return null;let n=null;const{title:o,picUrl:r}=t;let{subInfo:i}=t;if(i&&i.length){i=he.uniqueArray(i);const e=i.join(" ");n=s.a.createElement(a.Text,{style:be.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,ue()({},e,{style:be.container}),s.a.createElement(a.View,{style:be.leftContainer},s.a.createElement(a.Text,{style:be.title,numberOfLines:2,enableScale:!0},o),n?s.a.createElement(a.View,{style:be.tagLine},n):null),s.a.createElement(a.View,{style:be.imageContainer},s.a.createElement(a.Image,{resizeMode:a.Image.resizeMode.cover,style:be.image,source:{uri:r}})))}const Se=he.getScreenWidth()-24,Te=Math.floor(188*Se/336),Ee=a.StyleSheet.create({text:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Se,height:Te,alignSelf:"center"},image:{width:Se,height:Te},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Ce(e){if("undefined"===e)return null;const{itemBean:t}=e;if(!t)return null;const{title:n,picUrl:o}=t;let{subInfo:r}=t,i=null;if(r&&r.length){r=he.uniqueArray(r);const e=r.join(" ");i=s.a.createElement(a.Text,{style:Ee.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,e,s.a.createElement(a.Text,{style:Ee.text,numberOfLines:2,enableScale:!0},n),s.a.createElement(a.View,{style:Ee.playerView},s.a.createElement(a.Image,{style:Ee.image,source:{uri:o},resizeMode:a.Image.resizeMode.cover})),i?s.a.createElement(a.View,{style:Ee.tagLine},i):null)}const ve=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});class Ae extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],loadingState:"正在加载..."},this.fetchTimes=0,this.mockFetchData=this.mockFetchData.bind(this),this.onRefresh=this.onRefresh.bind(this),this.getRefresh=this.getRefresh.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.onEndReached=this.onEndReached.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e})}async onEndReached(){const{dataSource:e,fetchingDataFlag:t}=this.state;if(t)return;this.setState({fetchingDataFlag:!0,dataSource:e.concat([{style:100}])});const n=await this.mockFetchData(),o=e[e.length-1];o&&100===o.style&&e.pop();const r=e.concat(n);this.setState({dataSource:r})}onRefresh(){setTimeout(async()=>{const e=await this.mockFetchData();this.setState({dataSource:e}),this.refresh.refreshComplected()},1e3)}onClickItem(e){console.log(`item: ${e} is clicked..`)}getRenderRow(e){const{dataSource:t,loadingState:n}=this.state;let o=null;const r=t[e],i=t.length===e+1;switch(r.style){case 1:o=s.a.createElement(pe,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(xe,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Ce,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:ve.loading},n)}return s.a.createElement(a.View,{style:ve.container},s.a.createElement(a.View,{style:ve.itemContainer},o),i?null:s.a.createElement(a.View,{style:ve.spliter}))}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}getRefresh(){return s.a.createElement(a.View,{style:{flex:1,height:30}},s.a.createElement(a.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=50?e([]):e(se)),600)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},s.a.createElement(a.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}const Ve=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}});class Re extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},this.fetchTimes=0,this.mockFetchData=this.mockFetchData.bind(this),this.renderRow=this.renderRow.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.renderPullHeader=this.renderPullHeader.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onHeaderReleased=this.onHeaderReleased.bind(this),this.onHeaderPulling=this.onHeaderPulling.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e}),this.listView.collapsePullHeader()}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({dataSource:e.concat([{style:100}])});let t=[];try{t=await this.mockFetchData()}catch(e){}const n=e[e.length-1];n&&100===n.style&&e.pop();const o=e.concat(t);this.loadMoreDataFlag=!1,this.setState({dataSource:o})}async onHeaderReleased(){if(this.fetchingDataFlag)return;this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"});let e=[];try{e=await this.mockFetchData()}catch(e){}this.fetchingDataFlag=!1,this.setState({dataSource:e},()=>{this.listView.collapsePullHeader(),this.fetchTimes=0})}onHeaderPulling(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Ve.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}onClickItem(e,t){console.log(`item: ${e} is clicked..`,t.target.nodeId,t.currentTarget.nodeId)}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}mockFetchData(){return new Promise(e=>{setTimeout(()=>{this.fetchTimes+=1;let t=[];return this.fetchTimes<50&&(t=se),e(t)},600)})}renderPullHeader(){const{pullingText:e}=this.state;return s.a.createElement(a.View,{style:Ve.pullContainer},s.a.createElement(a.Text,{style:Ve.pullContent},e))}renderRow(e){const{dataSource:t,loadingState:n}=this.state;let o=null;const r=t[e],i=t.length===e+1;switch(r.style){case 1:o=s.a.createElement(pe,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 2:o=s.a.createElement(xe,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 5:o=s.a.createElement(Ce,{itemBean:r.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 100:o=s.a.createElement(a.Text,{style:Ve.loading},n)}return s.a.createElement(a.View,{style:Ve.container},s.a.createElement(a.View,{style:Ve.itemContainer},o),i?null:s.a.createElement(a.View,{style:Ve.splitter}))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{onClick:e=>console.log("ListView",e.target.nodeId,e.currentTarget.nodeId),ref:e=>{this.listView=e},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}const ke=a.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function Ie(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:ke.itemTitle},s.a.createElement(a.Text,null,"Horizontal ScrollView")),s.a.createElement(a.View,null,s.a.createElement(a.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,bounces:!0},s.a.createElement(a.Text,{style:ke.itemStyle},"A"),s.a.createElement(a.Text,{style:ke.itemStyle},"B"),s.a.createElement(a.Text,{style:ke.itemStyle},"C"),s.a.createElement(a.Text,{style:ke.itemStyle},"D"),s.a.createElement(a.Text,{style:ke.itemStyle},"E"),s.a.createElement(a.Text,{style:ke.itemStyle},"F"),s.a.createElement(a.Text,{style:ke.itemStyle},"A"))),s.a.createElement(a.View,{style:ke.itemTitle},s.a.createElement(a.Text,null,"Vertical ScrollView")),s.a.createElement(a.ScrollView,{bounces:!0,horizontal:!1,style:ke.verticalScrollView,showsVerticalScrollIndicator:!1},s.a.createElement(a.Text,{style:ke.itemStyle},"A"),s.a.createElement(a.Text,{style:ke.itemStyle},"B"),s.a.createElement(a.Text,{style:ke.itemStyle},"C"),s.a.createElement(a.Text,{style:ke.itemStyle},"D"),s.a.createElement(a.Text,{style:ke.itemStyle},"E"),s.a.createElement(a.Text,{style:ke.itemStyle},"F"),s.a.createElement(a.Text,{style:ke.itemStyle},"A")))}const De=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}});let je=0;class Oe extends s.a.Component{constructor(e){super(e),this.state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},this.incrementFontSize=this.incrementFontSize.bind(this),this.decrementFontSize=this.decrementFontSize.bind(this),this.androidNestedTextWrapperStyle={height:100,lineHeight:100}}incrementFontSize(){const{fontSize:e}=this.state;24!==e&&this.setState({fontSize:e+1})}decrementFontSize(){const{fontSize:e}=this.state;6!==e&&this.setState({fontSize:e-1})}render(){const{fontSize:e,textShadowColor:t,textShadowOffset:n}=this.state,o=e=>s.a.createElement(a.View,{style:De.itemTitle},s.a.createElement(a.Text,{style:!0},e));return s.a.createElement(a.ScrollView,{style:{padding:10}},o("shadow"),s.a.createElement(a.View,{style:[De.itemContent],onClick:()=>{let e="red",t={x:10,y:1};je%2==1&&(e="grey",t={x:1,y:1}),je+=1,this.setState({textShadowColor:e,textShadowOffset:t})}},s.a.createElement(a.Text,{style:[De.normalText,{color:"#242424",textShadowOffset:n,textShadowRadius:3,textShadowColor:t}]},"Text shadow is grey with radius 3 and offset 1")),o("color"),s.a.createElement(a.View,{style:[De.itemContent]},s.a.createElement(a.Text,{style:[De.normalText,{color:"#242424"}]},"Text color is black"),s.a.createElement(a.Text,{style:[De.normalText,{color:"blue"}]},"Text color is blue"),s.a.createElement(a.Text,{style:[De.normalText,{color:"rgb(228,61,36)"}]},"This is red")),o("fontSize"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:[De.normalText,{fontSize:e}]},"Text fontSize is "+e),s.a.createElement(a.View,{style:De.button,onClick:this.incrementFontSize},s.a.createElement(a.Text,{style:De.buttonText},"放大字体")),s.a.createElement(a.View,{style:De.button,onClick:this.decrementFontSize},s.a.createElement(a.Text,{style:De.buttonText},"缩小字体"))),o("fontStyle"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:[De.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),s.a.createElement(a.Text,{style:[De.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),o("numberOfLines"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:De.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),s.a.createElement(a.Text,{numberOfLines:2,style:De.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),o("textDecoration"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:[De.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),s.a.createElement(a.Text,{numberOfLines:1,style:[De.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),o("Nest Text"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:3},s.a.createElement(a.Text,{numberOfLines:3,style:[De.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),s.a.createElement(a.Text,{numberOfLines:3,style:De.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),o("Custom font"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:De.customFont},"Hippy 跨端框架")),o("Text Nested"),s.a.createElement(a.View,{style:De.itemContent},s.a.createElement(a.Text,{style:"android"===a.Platform.OS?this.androidNestedTextWrapperStyle:{}},s.a.createElement(a.Text,{numberOfLines:1,style:De.normalText},"后面有张图片"),s.a.createElement(a.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),s.a.createElement(a.Text,{numberOfLines:1,style:De.customFont},"前面有张图片"))))}}const Pe=a.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,placeholderTextColor:"#aaaaaa",fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}});class Le extends l.Component{constructor(e){super(e),this.state={textContent:""},this.changeInputContent=this.changeInputContent.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this)}changeInputContent(){this.setState({textContent:"当前时间毫秒:"+Date.now()})}focus(){this.input.focus()}blur(){this.input.blur()}render(){const{textContent:e}=this.state,t=e=>s.a.createElement(a.View,{style:Pe.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:Pe.container_style},t("text"),s.a.createElement(a.TextInput,{ref:e=>{this.input=e},style:Pe.input_style,placeholder:"text",defaultValue:e}),s.a.createElement(a.View,{style:Pe.button,onClick:this.changeInputContent},s.a.createElement(a.Text,null,"点击改变输入框内容")),s.a.createElement(a.View,{style:Pe.button,onClick:this.focus},s.a.createElement(a.Text,null,"Focus")),s.a.createElement(a.View,{style:Pe.button,onClick:this.blur},s.a.createElement(a.Text,null,"Blur")),t("numeric"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"numeric",placeholder:"numeric"}),t("phone-pad"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),t("password"),s.a.createElement(a.TextInput,{style:Pe.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),t("maxLength"),s.a.createElement(a.TextInput,{style:Pe.input_style,placeholder:"maxLength=5",maxLength:5}))}}var Me=n.p+"assets/defaultSource.jpg";const Be=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function _e(){const e=e=>s.a.createElement(a.View,{style:Be.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:{padding:10}},e("backgroundColor"),s.a.createElement(a.View,{style:[Be.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),s.a.createElement(a.View,{style:[Be.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:Me}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},s.a.createElement(a.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),s.a.createElement(a.View,{style:[Be.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},s.a.createElement(a.Text,{style:{color:"white"}},"渐变色")),e("border props"),s.a.createElement(a.View,{style:[Be.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),s.a.createElement(a.View,{style:[Be.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"yellow"}]}),s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"blue"}]}),s.a.createElement(a.View,{style:[Be.smallRectangle,{backgroundColor:"green"}]})))}const Fe=a.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),ze="SquarePagerView",We="TrianglePagerView",He="CirclePagerView";function Ne(e,t){const n=t=>s.a.createElement(a.View,{style:Fe.pageContainer,key:t},s.a.createElement(a.View,{style:[Fe.shapeBase,e],key:"shape"}),s.a.createElement(a.View,{style:Fe.mainRec,key:"title"},t?s.a.createElement(a.Text,{style:Fe.title},t):null));return n.displayName=t,n}const Ke=Ne(Fe.square,ze),qe=Ne(Fe.triangle,We),Ue=Ne(Fe.circle,He),Ge=a.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}});class Qe extends s.a.Component{constructor(e){super(e),W()(this,"state",{selectedIndex:0}),this.onPageSelected=this.onPageSelected.bind(this)}onPageSelected(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}onPageScrollStateChanged(e){console.log("onPageScrollStateChanged===",e)}onPageScroll({offset:e,position:t}){console.log("onPageScroll",e,t)}render(){const{selectedIndex:e}=this.state;return s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#ffffff"}},s.a.createElement(a.View,{style:Ge.buttonContainer},s.a.createElement(a.View,{style:Ge.button,onClick:()=>{this.viewpager.setPage(2)}},s.a.createElement(a.Text,{style:Ge.buttonText},"动效滑到第3页")),s.a.createElement(a.View,{style:Ge.button,onClick:()=>this.viewpager.setPageWithoutAnimation(0)},s.a.createElement(a.Text,{style:Ge.buttonText},"直接滑到第1页"))),s.a.createElement(a.ViewPager,{ref:e=>{this.viewpager=e},style:Ge.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[Ke("squarePager"),qe("TrianglePager"),Ue("CirclePager")]),s.a.createElement(a.View,{style:Ge.dotContainer},new Array(3).fill(0).map((t,n)=>{const o=n===e;return s.a.createElement(a.View,{style:[Ge.dot,o?Ge.selectDot:null],key:"dot_"+n})})))}}const Ye=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{width:300,height:300,borderRadius:10}});function Je(){return s.a.createElement(a.View,{style:{padding:10}},s.a.createElement(a.View,{style:Ye.itemTitle},s.a.createElement(a.Text,null,"WebView 示例")),s.a.createElement(a.WebView,{source:{uri:"https://www.qq.com"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:Ye.webViewStyle,onLoad:({url:e})=>console.log("webview onload",e),onLoadStart:({url:e})=>console.log("webview onLoadStart",e),onLoadEnd:({url:e})=>console.log("webview onLoadEnd",e)}))}const Xe=a.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Ze=a.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function $e(){return s.a.createElement(a.View,{style:Xe.shadowDemo},"android"===a.Platform.OS?s.a.createElement(a.View,{style:Xe.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Xe.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Xe.text},"没有偏移阴影样式"))):s.a.createElement(a.View,{style:Xe.shadowDemoCubeIos},s.a.createElement(a.View,{style:Xe.shadowDemoContentIos},s.a.createElement(a.Text,{style:Xe.text},"没有偏移阴影样式"))),"android"===a.Platform.OS?s.a.createElement(a.View,{style:Ze.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Ze.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Ze.text},"偏移阴影样式"))):s.a.createElement(a.View,{style:Ze.shadowDemoCubeIos},s.a.createElement(a.View,{style:Ze.shadowDemoContentIos},s.a.createElement(a.Text,{style:Ze.text},"偏移阴影样式"))))}const et=se.filter(e=>2!==e.style),tt=a.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}});class nt extends s.a.Component{constructor(e){super(e),this.state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},this.numberOfColumns=2,this.columnSpacing=6,this.interItemSpacing=6,this.mockFetchData=this.mockFetchData.bind(this),this.renderItem=this.renderItem.bind(this),this.getItemType=this.getItemType.bind(this),this.getItemKey=this.getItemKey.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onRefresh=this.onRefresh.bind(this),this.getRefresh=this.getRefresh.bind(this),this.renderPullFooter=this.renderPullFooter.bind(this),this.renderBanner=this.renderBanner.bind(this),this.getItemStyle=this.getItemStyle.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e})}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."});let t=[];try{t=await this.mockFetchData()}catch(e){}0===t.length&&this.setState({loadingState:"没有更多数据"});const n=[...e,...t];this.setState({dataSource:n}),this.loadMoreDataFlag=!1}renderPullFooter(){return 0===this.state.dataSource.length?null:s.a.createElement(a.View,{style:tt.pullFooter},s.a.createElement(a.Text,{style:{color:"white"}},this.state.loadingState))}async onRefresh(){setTimeout(async()=>{const e=await this.mockFetchData();this.setState({dataSource:e}),this.refresh.refreshComplected()},1e3)}getRefresh(){return s.a.createElement(a.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},s.a.createElement(a.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}onClickItem(e){console.log(`item: ${e} is clicked..`)}getItemType(e){return this.state.dataSource[e].style}getItemKey(e){return"row-"+e}onItemClick(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}renderBanner(){return"android"===a.Platform.OS||0===this.state.dataSource.length?null:s.a.createElement(a.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},s.a.createElement(a.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}renderItem(e){const{dataSource:t}=this.state;let n=null;const o=t[e];switch(o.style){case 1:n=s.a.createElement(pe,{itemBean:o.itemBean});break;case 2:n=s.a.createElement(xe,{itemBean:o.itemBean});break;case 5:n=s.a.createElement(Ce,{itemBean:o.itemBean})}return s.a.createElement(a.View,{onClick:()=>this.onItemClick(e),style:tt.container},s.a.createElement(a.View,{style:tt.itemContainer},n),s.a.createElement(a.View,{style:tt.splitter}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>{const t=[...et,...et];return e(t)},600)})}getWaterfallContentInset(){return{top:0,left:5,bottom:0,right:5}}getItemStyle(){const{numberOfColumns:e,columnSpacing:t}=this,n=a.Dimensions.get("screen").width,o=this.getWaterfallContentInset();return{width:(n-o.left-o.right-(e-1)*t)/e}}render(){const{dataSource:e}=this.state,{numberOfColumns:t,columnSpacing:n,interItemSpacing:o}=this,r=this.getWaterfallContentInset();return s.a.createElement(a.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},s.a.createElement(a.WaterfallView,{ref:e=>{this.listView=e},renderBanner:this.renderBanner,numberOfColumns:t,columnSpacing:n,interItemSpacing:o,numberOfItems:e.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:r,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}const ot="#4c9afa",rt="#f44837",it=a.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:rt},showArea:{height:150,marginVertical:10},button:{borderColor:ot,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:ot,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}});class at extends s.a.Component{constructor(e){super(e),this.state={}}componentWillMount(){this.horizonAnimation=new a.Animation({startValue:150,toValue:20,duration:1e3,delay:500,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.verticalAnimation=new a.Animation({startValue:80,toValue:40,duration:1e3,delay:0,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.scaleAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:1,toValue:1.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:1.2,toValue:.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.bgColorAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:"red",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:"yellow",toValue:"blue",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.txtColorAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:"white",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new a.Animation({startValue:"yellow",toValue:"white",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.cubicBezierScaleAnimationSet=new a.AnimationSet({children:[{animation:new a.Animation({startValue:0,toValue:1,duration:1e3,delay:0,mode:"timing",timingFunction:"cubic-bezier(.45,2.84,.38,.5)"}),follow:!1},{animation:new a.Animation({startValue:1,toValue:0,duration:1e3,mode:"timing",timingFunction:"cubic-bezier(.17,1.45,.78,.14)"}),follow:!0}],repeatCount:"loop"})}componentDidMount(){"web"===a.Platform.OS&&(this.verticalAnimation.setRef(this.verticalRef),this.horizonAnimation.setRef(this.horizonRef),this.scaleAnimationSet.setRef(this.scaleRef),this.bgColorAnimationSet.setRef(this.bgColorRef),this.txtColorAnimationSet.setRef(this.textColorRef),this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef)),this.horizonAnimation.onHippyAnimationStart(()=>{console.log("on animation start!!!")}),this.horizonAnimation.onHippyAnimationEnd(()=>{console.log("on animation end!!!")}),this.horizonAnimation.onHippyAnimationCancel(()=>{console.log("on animation cancel!!!")}),this.horizonAnimation.onHippyAnimationRepeat(()=>{console.log("on animation end!!!")})}componentWillUnmount(){this.scaleAnimationSet&&this.scaleAnimationSet.destroy(),this.horizonAnimation&&this.horizonAnimation.destroy(),this.verticalAnimation&&this.verticalAnimation.destroy(),this.cubicBezierScaleAnimationSet&&this.cubicBezierScaleAnimationSet.destroy()}render(){return s.a.createElement(a.ScrollView,{style:it.container},s.a.createElement(a.Text,{style:it.title},"水平位移动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.horizonAnimation.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},s.a.createElement(a.Text,{style:it.buttonText},"更新"))),s.a.createElement(a.View,{style:it.showArea},s.a.createElement(a.View,{ref:e=>{this.horizonRef=e},style:[it.square,{transform:[{translateX:this.horizonAnimation}]}]})),s.a.createElement(a.Text,{style:it.title},"高度形变动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.verticalAnimation.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.verticalAnimation.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.verticalAnimation.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:it.showArea},s.a.createElement(a.View,{ref:e=>{this.verticalRef=e},style:[it.square,{height:this.verticalAnimation}]})),s.a.createElement(a.Text,{style:it.title},"组合形变动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.scaleAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.scaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.scaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.scaleRef=e},style:[it.square,{transform:[{scale:this.scaleAnimationSet}]}]})),s.a.createElement(a.Text,{style:it.title},"颜色渐变动画(文字渐变仅Android支持)"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.bgColorAnimationSet.start(),this.txtColorAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.bgColorAnimationSet.pause(),this.txtColorAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.bgColorAnimationSet.resume(),this.txtColorAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.bgColorRef=e},style:[it.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},s.a.createElement(a.Text,{ref:e=>{this.textColorRef=e},style:[it.colorText,{color:"android"===a.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),s.a.createElement(a.Text,{style:it.title},"贝塞尔曲线动画"),s.a.createElement(a.View,{style:it.buttonContainer},s.a.createElement(a.View,{style:it.button,onClick:()=>{this.cubicBezierScaleAnimationSet.start()}},s.a.createElement(a.Text,{style:it.buttonText},"开始")),s.a.createElement(a.View,{style:[it.button],onClick:()=>{this.cubicBezierScaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:it.buttonText},"暂停")),s.a.createElement(a.View,{style:it.button,onClick:()=>{this.cubicBezierScaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:it.buttonText},"继续"))),s.a.createElement(a.View,{style:[it.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.cubicBezierScaleRef=e},style:[it.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}const lt=a.StyleSheet.create({containerStyle:{margin:20,alignItems:"center",flexDirection:"column"},itemGroupStyle:{flexDirection:"row",marginTop:10,borderColor:"#4c9afa",borderWidth:1,width:100,height:40,justifyContent:"center",alignItems:"center"},viewGroupStyle:{flexDirection:"row",marginTop:10},infoStyle:{width:60,height:40,fontSize:16,color:"#4c9afa",textAlign:"center"},inputStyle:{width:200,height:40,placeholderTextColor:"#aaaaaa",underlineColorAndroid:"#4c9afa",fontSize:16,color:"#242424",textAlign:"left"},buttonStyle:{textAlign:"center",fontSize:16,color:"#4c9afa",backgroundColor:"#4c9afa11",marginLeft:10,marginRight:10}});class st extends s.a.Component{constructor(e){super(e),this.state={result:""},this.onTextChangeKey=this.onTextChangeKey.bind(this),this.onTextChangeValue=this.onTextChangeValue.bind(this),this.onClickSet=this.onClickSet.bind(this),this.onTextChangeKey=this.onTextChangeKey.bind(this),this.onClickGet=this.onClickGet.bind(this)}onClickSet(){const{key:e,value:t}=this.state;e&&a.AsyncStorage.setItem(e,t)}onClickGet(){const{key:e}=this.state;e&&a.AsyncStorage.getItem(e).then(e=>{this.setState({result:e})})}onTextChangeKey(e){this.setState({key:e})}onTextChangeValue(e){this.setState({value:e})}render(){const{result:e}=this.state;return s.a.createElement(a.ScrollView,{style:lt.containerStyle},s.a.createElement(a.View,{style:lt.viewGroupStyle},s.a.createElement(a.Text,{style:lt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:lt.viewGroupStyle},s.a.createElement(a.Text,{style:lt.infoStyle},"Value:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeValue})),s.a.createElement(a.View,{style:lt.itemGroupStyle,onClick:this.onClickSet},s.a.createElement(a.Text,{style:lt.buttonStyle},"Set")),s.a.createElement(a.View,{style:[lt.viewGroupStyle,{marginTop:60}]},s.a.createElement(a.Text,{style:lt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:lt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:[lt.viewGroupStyle,{display:"none"}]},s.a.createElement(a.Text,{style:lt.infoStyle},"Value:"),s.a.createElement(a.Text,{style:[lt.infoStyle,{width:200}]},e)),s.a.createElement(a.View,{style:lt.itemGroupStyle,onClick:this.onClickGet},s.a.createElement(a.Text,{style:lt.buttonStyle},"Get")))}}const ct=a.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},defaultText:{marginVertical:4,fontSize:18,lineHeight:24,color:"#242424"},copiedText:{color:"#aaa"},button:{backgroundColor:"#4c9afa",borderRadius:4,height:30,marginVertical:4,paddingHorizontal:6,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"white"}});class ut extends s.a.Component{constructor(e){super(e),this.state={hasCopied:!1,text:"Winter is coming",clipboardText:"快点上面的按钮啊魂淡"}}render(){const e=e=>s.a.createElement(a.View,{style:ct.itemTitle},s.a.createElement(a.Text,null,e)),{hasCopied:t,text:n,clipboardText:o}=this.state,r=t?" (已复制) ":"";return s.a.createElement(a.ScrollView,{style:{padding:10}},e("文本复制到剪贴板"),s.a.createElement(a.Text,{style:ct.defaultText},n),s.a.createElement(a.View,{style:ct.button,onClick:()=>{a.Clipboard.setString(n),this.setState({hasCopied:!0})}},s.a.createElement(a.Text,{style:ct.buttonText},"点击复制以上文案"+r)),e("获取剪贴板内容"),s.a.createElement(a.View,{style:ct.button,onClick:async()=>{try{const e=await a.Clipboard.getString();this.setState({clipboardText:e})}catch(e){console.error(e)}}},s.a.createElement(a.Text,{style:ct.buttonText},"点击获取剪贴板内容")),s.a.createElement(a.Text,{style:[ct.defaultText,ct.copiedText]},o))}}const ht=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:80,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"}});class dt extends s.a.Component{constructor(e){super(e),this.state={infoText:"",infoText2:""}}render(){const{infoText:e,infoText2:t}=this.state;return s.a.createElement(a.ScrollView,{style:ht.container},s.a.createElement(a.View,{style:ht.itemTitle,onPress:()=>{const e=new a.HippyEventEmitter;this.call=e.addListener("NORMAL_EVENT",e=>{this.setState({infoText:JSON.stringify(e)})}),Object(a.callNative)("MyEvent","btnClicked")}},s.a.createElement(a.Text,null,"客户端向前端单向通信"),s.a.createElement(a.Text,null,"点此终端会发送NORMAL_EVENT事件"),s.a.createElement(a.Text,null,"事件接收结果:"+e)),s.a.createElement(a.View,{style:ht.itemTitle,onPress:()=>{const e=new a.HippyEventEmitter;this.call=e.addListener("COUNT_DOWN",e=>{this.setState({infoText2:JSON.stringify(e)})}),Object(a.callNative)("MyEvent","addListener","COUNT_DOWN")}},s.a.createElement(a.Text,null,"客户端向前端单向通信的进阶用法"),s.a.createElement(a.Text,null,"点此终端会发送COUNT_DOWN事件"),s.a.createElement(a.Text,null,"事件接收结果:"+t)))}}const mt=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}});class ft extends s.a.Component{constructor(e){super(e),this.state={infoText:"正在获取.."},this.listener=null}async componentWillMount(){const e=this,t=await a.NetInfo.fetch();this.setState({infoText:t}),this.listener=a.NetInfo.addEventListener("change",t=>{e.setState({infoText:"收到通知: "+t.network_info})})}componentDidMount(){const e=this;this.listener&&a.NetInfo.removeEventListener("change",this.listener),fetch("https://m.baidu.com",{headers:{Refer:"https://now.qq.com",Cookie:["harry=guo5","xxx=5"]}}).then(t=>(console.log("成功",t),e.setState({infoText:"成功: "+t.body}),t)).catch(t=>{e.setState({infoText:"收到错误: "+t}),console.error("收到错误:",t)}),a.NetworkModule.setCookie("http://3gxx.qq.com","name=harryguo;gender=male"),a.NetworkModule.getCookies("http://3gxx.qq.com").then(e=>{console.log("cookie: "+e)})}render(){const{infoText:e}=this.state;return s.a.createElement(a.ScrollView,{style:mt.container},s.a.createElement(a.Text,{style:mt.text},e))}}var pt={log(e){Object(a.callNative)("TestModule","log",e)},helloNative(e){Object(a.callNative)("TestModule","helloNative",e)},helloNativeWithPromise:e=>Object(a.callNativeWithPromise)("TestModule","helloNativeWithPromise",e)};class gt extends s.a.Component{constructor(e){super(e),this.state={hello:"TestModule log"}}componentDidMount(){pt.log("hello i am from js"),pt.helloNative({hello:"i am form js"}),pt.helloNativeWithPromise({hello:"i am form js"}).then(e=>{this.setState({hello:JSON.stringify(e)})})}render(){const{hello:e}=this.state;return s.a.createElement(a.Text,{style:{color:"red"}},e)}}const yt=a.StyleSheet.create({fullScreen:{flex:1},row:{flexDirection:"row"},title:{color:"#ccc"},button:{height:56,backgroundColor:"#4c9afa",borderColor:"#5dabfb",borderStyle:"solid",borderWidth:1,paddingHorizontal:20,fontSize:16,textAlign:"center",lineHeight:56,color:"#fff",margin:10},input:{color:"black",flex:1,height:36,lineHeight:36,fontSize:14,borderBottomColor:"#4c9afa",borderBottomStyle:"solid",borderBottomWidth:1,padding:0},output:{color:"black"}}),wt="wss://echo.websocket.org",bt="Rock it with Hippy WebSocket";let xt;var St=function(){const e=Object(l.useRef)(null),t=Object(l.useRef)(null),[n,o]=Object(l.useState)([]),r=e=>{o(t=>[e,...t])};return s.a.createElement(a.View,{style:yt.fullScreen},s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Url:"),s.a.createElement(a.TextInput,{ref:e,value:wt,style:yt.input}),s.a.createElement(a.View,{style:yt.row},s.a.createElement(a.Text,{onClick:()=>{e.current.getValue().then(e=>{xt&&1===xt.readyState&&xt.close(),xt=new WebSocket(e),xt.onopen=()=>r("[Opened] "+xt.url),xt.onclose=()=>r("[Closed] "+xt.url),xt.onerror=e=>r("[Error] "+e.reason),xt.onmessage=e=>r("[Received] "+e.data)})},style:yt.button},"Connect"),s.a.createElement(a.Text,{onClick:()=>xt.close(),style:yt.button},"Disconnect"))),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Message:"),s.a.createElement(a.TextInput,{ref:t,value:bt,style:yt.input}),s.a.createElement(a.Text,{onClick:()=>t.current.getValue().then(e=>{r("[Sent] "+e),xt.send(e)}),style:yt.button},"Send")),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:yt.title},"Log:"),s.a.createElement(a.ScrollView,{style:yt.fullScreen},n.map((e,t)=>s.a.createElement(a.Text,{key:t,style:yt.output},e)))))};function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Et(e){for(var t=1;t{const e=a.Dimensions.get("window");({width:t,height:n}=e)});const[o,r]=Object(l.useState)({width:100,height:100,top:10,left:10}),[i,c]=Object(l.useState)({width:0,height:0,x:0,y:0}),u=Et(Et({},Ct.box),o);return s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.View,{style:Ct.demoContent},s.a.createElement(a.View,{ref:e,style:u},s.a.createElement(a.Text,{style:Ct.text},"I am the box"))),s.a.createElement(a.View,{style:Ct.buttonContainer},s.a.createElement(a.View,{onClick:()=>{const e=vt(0,t),o=vt(0,n-300),i=vt(50,120);r({left:e,top:o,width:i,height:i})},style:Ct.button},s.a.createElement(a.Text,{style:Ct.buttonText},"Move the random position")),s.a.createElement(a.View,{onClick:async()=>{try{const t=await a.UIManagerModule.measureInWindow(e.current);c(t)}catch(e){}},style:Ct.button},s.a.createElement(a.Text,{style:Ct.buttonText},"Measure box in window"))),s.a.createElement(a.View,{style:Ct.row},s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.Text,null,"Box style:"),s.a.createElement(a.Text,{style:Ct.black},"Width: "+u.width),s.a.createElement(a.Text,{style:Ct.black},"Height: "+u.height),s.a.createElement(a.Text,{style:Ct.black},"Left: "+u.left),s.a.createElement(a.Text,{style:Ct.black},"Top: "+u.top)),s.a.createElement(a.View,{style:Ct.full},s.a.createElement(a.Text,null,"measureInWindow output:"),s.a.createElement(a.Text,{style:Ct.black},"Width: "+i.width),s.a.createElement(a.Text,{style:Ct.black},"Height: "+i.height),s.a.createElement(a.Text,{style:Ct.black},"X: "+i.x),s.a.createElement(a.Text,{style:Ct.black},"Y: "+i.y))))};const Vt=a.StyleSheet.create({style_indicator_item:{width:4,height:4,marginLeft:2.5,marginRight:2.5,borderRadius:2},style_indicator:{position:"absolute",bottom:6,left:0,right:0,marginLeft:0,marginRight:0,alignItems:"center",justifyContent:"center",flexDirection:"row"}});class Rt extends s.a.Component{constructor(e){super(e),this.state={current:e.current||0}}update(e){const{current:t}=this.state;t!==e&&this.setState({current:e})}render(){const{count:e}=this.props,{current:t}=this.state,n=[];for(let o=0;o=r||(this.indicator.update(o),this.currentIndex=o)}onScrollBeginDrag(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}onScrollEndDrag(){this.doCreateTimer()}onLayout(e){this.width=e.layout.width}doSwitchPage(e){this.scrollview.scrollTo(this.imgWidth*e,0,!0)}doCreateTimer(){this.doClearTimer(),this.duration<=0||(this.interval=setInterval(()=>{this.doSwitchPage((this.currentIndex+1)%this.itemCount)},this.duration))}doClearTimer(){this.interval&&clearInterval(this.interval),this.interval=null}render(){const{images:e}=this.props,t=[];for(let n=0;n{this.scrollview=e}},t),s.a.createElement(Rt,{ref:e=>{this.indicator=e},count:this.itemCount}))}}W()(kt,"defaultProps",{duration:0,currentPage:0,images:[]});const It=["http://res.imtt.qq.com/circle/real/1528701933567-.jpg","http://res.imtt.qq.com/circle/real/1527758982390-20180530184743.jpg","http://res.imtt.qq.com/circle/real/1527670660574-.jpg"],Dt=a.StyleSheet.create({sliderStyle:{width:400,height:180},infoStyle:{height:40,fontSize:16,color:"#4c9afa",marginTop:15}});function jt(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.Text,{style:Dt.infoStyle},"Auto:"),s.a.createElement(kt,{style:Dt.sliderStyle,images:It,duration:1e3}),s.a.createElement(a.Text,{style:Dt.infoStyle},"Manual:"),s.a.createElement(kt,{style:Dt.sliderStyle,images:It,duration:0}))}const Ot=a.StyleSheet.create({container:{height:45,paddingLeft:4,flexDirection:"row",backgroundColor:"#ffffff",borderBottomColor:"#E5E5E5",borderBottomWidth:1},scroll:{flex:1,height:44},navItem:{width:60,height:44,paddingTop:13},navItemText:{fontSize:16,lineHeight:17,textAlign:"center",backgroundColor:"#ffffff"},navItemTextNormal:{color:"#666666"},navItemTextBlue:{color:"#2D73FF"}});class Pt extends s.a.Component{constructor(e){super(e),this.state={curIndex:0,navList:["头条","推荐","圈子","NBA","中超","英超","西甲","CBA","澳网","电影","本地","娱乐","小说","生活","直播","游戏"]},this.navScrollView=null,this.viewPager=null,this.onViewPagerChange=this.onViewPagerChange.bind(this),this.pressNavItem=this.pressNavItem.bind(this),this.scrollSV=this.scrollSV.bind(this)}static getPage(e,t){switch(t%3){case 0:return Ke(e);case 1:return Ue(e);case 2:return qe(e);default:return null}}componentDidUpdate(){this.scrollSV()}onViewPagerChange({position:e}){this.setState({curIndex:e})}scrollSV(){if(this.navScrollView){const{curIndex:e,navList:t}=this.state,n=t.length,o=he.getScreenWidth(),r=o/2/60,i=60*nn-r?60*n-o:60*e-60*r+30,this.navScrollView.scrollTo({x:a,y:0,animated:!0})}}pressNavItem(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}renderNav(){const{navList:e,curIndex:t}=this.state;return s.a.createElement(a.View,{style:Ot.container},s.a.createElement(a.ScrollView,{style:Ot.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:e=>{this.navScrollView=e}},e.map((e,n)=>s.a.createElement(a.View,{style:Ot.navItem,key:"nav_"+e,activeOpacity:.5,onClick:()=>this.pressNavItem(n)},s.a.createElement(a.Text,{style:[Ot.navItemText,t===n?Ot.navItemTextBlue:Ot.navItemTextNormal],numberOfLines:1},e)))))}render(){const{navList:e}=this.state;return s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),s.a.createElement(a.ViewPager,{ref:e=>{this.viewPager=e},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},e.map((e,t)=>Pt.getPage(e,t))))}}const{width:Lt}=a.Dimensions.get("window"),Mt=a.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:Lt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Lt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}});class Bt extends s.a.Component{constructor(e){super(e),this.demon1Point=s.a.createRef(),this.demo1PointDom=null,this.state={demo2Left:0},this.isDemon1Layouted=!1,this.idDemon2Layouted=!1,this.onTouchDown1=this.onTouchDown1.bind(this),this.onDemon1Layout=this.onDemon1Layout.bind(this),this.onTouchMove1=this.onTouchMove1.bind(this),this.onTouchDown2=this.onTouchDown2.bind(this),this.onTouchMove2=this.onTouchMove2.bind(this)}componentDidMount(){}onDemon1Layout(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=a.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}onTouchDown1(e){const{page_x:t}=e,n=t-40;console.log("touchdown x",t,n,Lt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchMove1(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Lt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchDown2(e){const{page_x:t}=e,n=t-40;console.log("touchdown x",t,n,Lt),this.setState({demo2Left:n})}onTouchMove2(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Lt),this.setState({demo2Left:n})}render(){const{demo2Left:e}=this.state;return s.a.createElement(a.View,{style:Mt.setNativePropsDemo},s.a.createElement(a.Text,null,"setNativeProps实现拖动效果"),s.a.createElement(a.View,{style:Mt.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},s.a.createElement(a.View,{onLayout:this.onDemon1Layout,style:Mt.nativeDemo1Point,ref:this.demon1Point})),s.a.createElement(a.View,{style:Mt.splitter}),s.a.createElement(a.Text,null,"普通渲染实现拖动效果"),s.a.createElement(a.View,{style:Mt.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},s.a.createElement(a.View,{style:[Mt.nativeDemo2Point,{left:e}]})))}}const _t=a.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Ft extends s.a.Component{constructor(e){super(e),this.state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},this.onAsyncComponentLoad=this.onAsyncComponentLoad.bind(this)}onAsyncComponentLoad(){console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then(e=>{this.setState({AsyncComponentFromLocal:e.default||e})}).catch(e=>console.error("import async local component error",e)),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then(e=>{this.setState({AsyncComponentFromHttp:e.default||e})}).catch(e=>console.error("import async remote component error",e))}render(){const{AsyncComponentFromLocal:e,AsyncComponentFromHttp:t}=this.state;return s.a.createElement(a.View,{style:_t.dynamicImportDemo},s.a.createElement(a.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},s.a.createElement(a.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),s.a.createElement(a.View,{style:{marginTop:20}},e?s.a.createElement(e,null):null,t?s.a.createElement(t,null):null))}}const zt=a.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Wt extends s.a.Component{render(){const{country:e,language:t,direction:n}=a.Platform.Localization||{};return s.a.createElement(a.View,{style:zt.LocalizationDemo},s.a.createElement(a.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},s.a.createElement(a.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},`国际化相关信息:国家 ${e} | 语言 ${t} | 方向 ${1===n?"RTL":"LTR"}`)))}}const Ht=a.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}});class Nt extends s.a.Component{constructor(e){super(e),this.state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},this.onTurboFunc=this.onTurboFunc.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.getRowKey=this.getRowKey.bind(this)}async onTurboFunc(e){let t;if("nativeWithPromise"===e)t=await(async e=>turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(e))("aaa");else if("getTurboConfig"===e)this.config=getTurboModule("demoTurbo").getTurboConfig(),t="获取到config对象";else if("printTurboConfig"===e)n=this.config,t=getTurboModule("demoTurbo").printTurboConfig(n);else if("getInfo"===e)t=this.config.getInfo();else if("setInfo"===e)this.config.setInfo("Hello World"),t="设置config信息成功";else{t={getString:()=>{return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:()=>{return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:()=>{return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:()=>{return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:()=>{return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:()=>{return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[e]()}var n;this.setState({result:t})}renderResultView(){return s.a.createElement(a.View,{style:Ht.resultView},s.a.createElement(a.Text,{style:{backgroundColor:"darkseagreen"}},""+this.state.result))}getRenderRow(e){const{funList:t}=this.state;return s.a.createElement(a.View,{style:Ht.cellContentView},s.a.createElement(a.View,{style:Ht.funcInfo},s.a.createElement(a.Text,{numberofLines:0},"函数名:",t[e])),s.a.createElement(a.Text,{style:Ht.actionButton,onClick:()=>this.onTurboFunc(t[e])},"执行"))}getRowKey(e){const{funList:t}=this.state;return t[e]}render(){const{funList:e}=this.state;return s.a.createElement(a.View,{style:Ht.container},this.renderResultView(),s.a.createElement(a.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}function Kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qt(e){for(var t=1;t0===e.index?s.a.createElement(a.View,{style:[Jt.container]},s.a.createElement(a.View,{style:{backgroundColor:Jt.title.backgroundColor,marginLeft:12}},s.a.createElement(a.Text,{numberOfLines:1,style:[Jt.title,{fontWeight:"bold"}]},t.name)),s.a.createElement(a.View,{style:Jt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Jt.title},"ver: ","2.2.1"!==a.default.version?""+a.default.version:"master"))):s.a.createElement(a.View,{style:[Jt.container]},s.a.createElement(a.View,{onClick:()=>e.goBack(),style:[Jt.headerButton,"ios"===a.Platform.OS?null:{marginLeft:20}]},s.a.createElement(a.Image,{style:Jt.backIcon,source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAIPUlEQVR4Xu2dT8xeQxTGn1O0GiWEaEJCWJCwQLBo/WnRSqhEJUQT0W60G+1Ku1SS2mlXaqM2KqJSSUlajVb9TViwYEHCQmlCQghRgqKPTHLK7Zfvfd97Zt5535l7z91+58zce57fnfe7d+Y+I/Cj1xWQXl+9XzwcgJ5D4AA4AD2vQM8v30cAB6DnFZjA5ZO8VUTenEBX5i58BDCXzJZA8ikA6wFsFpEttuz80Q5AxhqTfAbA2kYXW0VkU8YuzU07AOaStUsg+RyA1bNEFwWBA9BOz9ZRJOcAeAHAqiFJ20VkQ+tGMwY6AGMsLslTAOwGcE+LZneIyLoWcVlDHIAxlVfFfxXACkOTO0VkjSF+7KEOwJhKSnIfgDuNzf0M4BoR+cqYN7ZwByCxlCTnAtgLYLmxqR8ALBGRz4x5Yw13ABLKSfJ0APsBLDU28x2Am0XkC2Pe2MMdgMiSkjwDwAEAi41NBPEXichhY16WcAcgoqwkzwRwCMD1xvRvANxUivjh3B0Ao4IkzwbwFoCrjalf67B/xJiXNdwBMJSX5LkA3gFwpSEthH6pd/63xrzs4Q5AyxKTPB/AuwAub5lyIuxzvfO/N+ZNJNwBaFFmkhcAeA/ApS3CmyGf6qPej8a8iYU7ACNKTfIivfMvNqryMYBbRCS87Cn2cACGSKPivw/gQqOCQfzwnH/UmDfxcAdgQMlJXqLDvlX8DwHcVoP4/hg4WPzLdNhfaLwlw2hxu4j8ZsybWriPADNKT/IKfdQ7z6jK2wDuEJE/jHlTDXcAGuUneZW+5DnHqMpBAHeJyDFj3tTDHQCVgOR1+nr3LKMqYRp4pYj8bcwrItwBAEBykU7sLDCqsgfAfSLyjzGvmPDeA0ByiU7pzjeqEsS/V0SOG/OKCu81ACSX6WKOeUZVdgF4oHbxe/0YSDIs33oFwGlG8ae+js94vkPDezkCkFypq3dPNRaziJW8xnN2AJoVIHm/rtsPS7gtRzFr+S0nPSq2VyOAiv9ixEKYor7mGSWq5e+9AYDkgwDC51rWa94iIpstRa0p1lqMmq7tv3Ml+RCA8KGm9Xo3isi2Ki+65UlbC9Ky2XLCSD4MYHvEGXVe/M4/BpJ8BMDWCPHXi8jTEXnVpXR2BCD5OIDHjIoQwDoRedaYV214JwEg+SSAjUZVgvhrROR5Y17V4Z0DoGHJYhEmTOaEV7svWZK6ENspAGaxZGmjUZjGDTN64bVw747OADDEkmWYqEH8u0Xktd4prxdcPQAtLVlm0/cvXcjRW/GrfwxU8V9uacnShOBPXcL1Rl/v/BPXXe0IYPTjaer8uy7eDN/49f6oEgCSYRo3/NNm8eMJYv+qy7Y/6L3ytf4PkGDJ8ot+sPGRi/9/BaoaARIsWX7S7/Q+cfFPrkA1ACRYsgTxb5y2GVOp4FUBQIIlSxFOXKWKX8VjYIIlSzFOXA5AZAUSLFmKM2OKLEH2tGJ/AhIsWYo0Y8quZGQHRQKQYMlSrBlTpD7Z04oDIMGSpWgzpuxKRnZQFACJ4t8gIsWaMUXqkz2tGAASLFmKd+LKrmJCB0UAQDLWkqUKJ64EfbKnTh2ABEuWqsyYsisZ2cFUAUiwZKnOjClSn+xpUwMgwZKlSjOm7EpGdlAjAOHuDz58VblxReqTPW1qAIQr85+A7PqO7GCqACgEsb58/k/gSHlHB0wdAIXAHwNHa5UloggAFIJYb15/EZSARjEAKASx1uw+DxAJQVEAKASxmzP4TGAEBMUBoBCE7VnC0m3rDh1hLcBiESlub54IbSaSUiQADQhi9ujxBSEGdIoFQCGI3aXLl4S1hKBoABSC2H36fFFoCwiKB0AhiN2p05eFj4CgCgAUgti9ev2roCEQVAOAQhC7W3f4LjDs4uWfhs2AoSoAFIK5avG+vMVPXDPEPw6dpWDVAaAQ+OfhRvoHhVcJgEIQ3L53R7iDuEFEg4ZqAVAI5qj1+yrjDeEWMVqwqgE4ITrJYAFvhcBNoiLcs4032uTCE2zieusRGNTpxAjQGAmCJfxaI3bBJTTs/uVGkcbCFRnuVrE2WTo1AjRGAjeLbslBJwHQJ4RgFR8s4y2H28VbqlV6rG8YMVqhzo4AjZ8D3zJmCAedB0B/DnzTqAEQ9AIAhSB227gnROTR0YNpnRG9AUAhCLuG+saRXZkLiLnnfOvYk6vWqxGg8Y+hbx7dpcmgyJHAt4/v2lyAFQSSy3R10Txj7i7dZey4Ma+48F7+BDRVILkEwH4A843q7NFJpKoh6D0A+nSwCMABAAsiIAjTyWFGscrDAVDZEjyL9unuY2ELuuoOB6AhWYJlzUHdhexYbQQ4ADMUS/AtrNK9zAGY5ZZNcC6tzr/QARgwZqt3cfAoWGgc1qsyr3IAhqibYGAdPIzDp2hHjfBMPNwBGFHyBAv7KoysHYAW91zCDibFO5g5AC0A0JdFwbcoxrKmaAczB6AlAApBrGVNsQ5mDoABAIUg1rKmSPMqB8AIgEIQa1kTzKuCjd2RiG6zpDgAkWVN2Mu4KAczByASAB0JYi1rinEwcwASAFAIgmXN6wCWGpsqwsHMATCqNiic5F4AK4zNBQeza0XksDFvbOEOwJhKSTLGt2iniKwZ0ylENeMARJVt9iSSFt+iHSKybozdRzXlAESVbXASyTa+RdtFZMOYu45qzgGIKtvopCGWNVtFZNPoFiYT4QBkrDPJmZY1W0Rkc8YuzU07AOaS2RIaljUbRWSbLTt/tAOQv8Zhf8Sw0eWhCXRl7sIBMJesWwkOQLf0NF+NA2AuWbcSHIBu6Wm+GgfAXLJuJTgA3dLTfDX/AlSTmJ/JwwOoAAAAAElFTkSuQmCC"}})),s.a.createElement(a.View,{style:Jt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Jt.title},t.name))));const Zt="#4c9afa",$t="#f44837",en=a.StyleSheet.create({rowContainer:{alignItems:"center"},buttonView:{borderColor:Zt,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:Zt,textAlign:"center",textAlignVertical:"center"}});class tn extends l.Component{constructor(e){super(e),this.state={pressItem:"",dataSource:[...Gt]},this.renderRow=this.renderRow.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.clickTo=this.clickTo.bind(this)}componentDidMount(){const{history:e}=this.props;"android"===a.Platform.OS&&a.BackAndroid.addListener(()=>(console.log("BackAndroid"),0===e.index&&(e.goBack(),!0)))}getRowType(e){const{dataSource:t}=this.state;return t[e].meta.style}getRowKey(e){const{dataSource:t}=this.state;return t[e].path||""+e}feedback(e){const t=e||"";this.setState({pressItem:t})}clickTo(e){const{history:t}=this.props;t.push(e)}renderRow(e){const{dataSource:t,pressItem:n}=this.state,o=t[e],{style:r}=o.meta;return s.a.createElement(a.View,{style:en.rowContainer},s.a.createElement(a.View,{onPressIn:()=>this.feedback(o.path),onPressOut:()=>this.feedback(),onClick:()=>this.clickTo(o.path),style:[en.buttonView,{borderColor:1===r?Zt:$t,opacity:n===o.path?.5:1}]},s.a.createElement(a.Text,{style:[en.buttonText,{color:1===r?Zt:$t}]},o.name)))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.renderRow,getRowType:this.getRowType,getRowKey:this.getRowKey})}}const nn=[{path:"/Gallery",name:"Hippy React 示例",component:F(tn),meta:{style:1}},...Gt];var on=()=>s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(k,{initialEntries:["/Gallery"]},nn.map(e=>{const t=e.component;return s.a.createElement(O,{key:e.path,exact:!0,path:""+e.path},s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(Xt,{route:e}),s.a.createElement(t,{meta:e.meta||{}})))})));const rn=a.StyleSheet.create({stepText:{color:"#242424",marginBottom:12},container:{flex:1,backgroundColor:"#fff",justifyContent:"center",padding:20},button:{width:120,height:40,borderRadius:8,backgroundColor:"#4c9afa",alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,textAlign:"center",lineHeight:40,color:"#fff"},buttonContainer:{alignItems:"center",marginTop:12,justifyContent:"center"}});class an extends l.Component{constructor(e){super(e),this.clickToDebug=this.clickToDebug.bind(this)}clickToDebug(){const{instanceId:e}=this.props;Object(a.callNative)("TestModule","debug",e)}render(){const e=["2. 在前端项目中使用 npm install 安装依赖","3. 在前端项目中运行 npm run hippy:dev 编译调试包","4. 另开一个命令行窗口,运行 npm run hippy:debug 启动调试服务","5. 点击下方的“开始调试”按钮开始调试业务包"];"android"===a.Platform.OS?(e.unshift("1. 使用 USB 线连接 Android 手机和电脑,并启动 Hippy"),e.push("6. 打开 chrome://inspect,需要确保 localhost:38989 在 Discover network targets 右侧的 Configuration 弹窗中,下方会出现设备列表,点击 Inspect 进行调试")):"ios"===a.Platform.OS&&(e.unshift("1. 启动 iOS 模拟器并启动打开 HippyDemo"),e.push("6. 打开 Safari -> Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return s.a.createElement(a.ScrollView,{style:rn.container},e.map((e,t)=>s.a.createElement(a.Text,{style:rn.stepText,key:"steps-"+t},e)),s.a.createElement(a.View,{style:rn.buttonContainer},s.a.createElement(a.View,{style:rn.button,onClick:this.clickToDebug},s.a.createElement(a.Text,{style:rn.buttonText,numberOfLines:1},"点击调试"))))}}const ln=a.StyleSheet.create({container:{flex:1}});class sn extends l.Component{constructor(e){super(e);const{width:t,height:n}=a.Dimensions.get("screen");this.state={isVertical:t{switch(e){case 0:return s.a.createElement(on,null);case 1:case 2:return s.a.createElement(an,{instanceId:n});default:return s.a.createElement(a.View,{style:cn.blankPage})}})(),s.a.createElement(a.View,{style:cn.buttonContainer},(()=>{let n=["API","本地调试"];return"ios"!==a.Platform.OS||t||(n=["API"]),n.map((t,n)=>s.a.createElement(a.View,{key:"button_"+t,style:cn.button,onClick:()=>this.setState({pageIndex:n})},s.a.createElement(a.Text,{style:[cn.buttonText,n===e?{color:"#4c9afa"}:null],numberOfLines:1},t)))})()))}}new a.Hippy({appName:"Demo",entryPage:un,bubbles:!1,silent:!1}).start()},0:function(e,t,n){n("./node_modules/regenerator-runtime/runtime.js"),e.exports=n("./src/main.js")},"dll-reference hippyReactBase":function(e,t){e.exports=hippyReactBase}}); \ No newline at end of file diff --git a/examples/android-demo/res/vendor.android.js b/examples/android-demo/res/vendor.android.js index 79fc691cd44..96ae553306e 100644 --- a/examples/android-demo/res/vendor.android.js +++ b/examples/android-demo/res/vendor.android.js @@ -1,7 +1,7 @@ -var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"../../packages/hippy-react/dist/index.js":function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Animated",(function(){return Xt})),n.d(t,"Animation",(function(){return Ne})),n.d(t,"AnimationSet",(function(){return Pe})),n.d(t,"AppRegistry",(function(){return qt})),n.d(t,"AsyncStorage",(function(){return Pn})),n.d(t,"BackAndroid",(function(){return _n})),n.d(t,"Clipboard",(function(){return An})),n.d(t,"ConsoleModule",(function(){return Bn})),n.d(t,"Dimensions",(function(){return Xn})),n.d(t,"Easing",(function(){return Jt})),n.d(t,"Focusable",(function(){return kn})),n.d(t,"Hippy",(function(){return $n})),n.d(t,"HippyEventEmitter",(function(){return de})),n.d(t,"HippyEventListener",(function(){return ce})),n.d(t,"HippyRegister",(function(){return zn})),n.d(t,"Image",(function(){return Yt})),n.d(t,"ImageBackground",(function(){return Qn})),n.d(t,"ImageLoaderModule",(function(){return Tn})),n.d(t,"ListView",(function(){return on})),n.d(t,"ListViewItem",(function(){return Zt})),n.d(t,"Modal",(function(){return wn})),n.d(t,"Navigator",(function(){return sn})),n.d(t,"NetInfo",(function(){return jn})),n.d(t,"NetworkModule",(function(){return Ln})),n.d(t,"PixelRatio",(function(){return Jn})),n.d(t,"Platform",(function(){return Vn})),n.d(t,"PullFooter",(function(){return tn})),n.d(t,"PullHeader",(function(){return en})),n.d(t,"RNfqb",(function(){return qn})),n.d(t,"RNfqbEventEmitter",(function(){return Gn})),n.d(t,"RNfqbEventListener",(function(){return Yn})),n.d(t,"RNfqbRegister",(function(){return Kn})),n.d(t,"RefreshWrapper",(function(){return an})),n.d(t,"ScrollView",(function(){return bn})),n.d(t,"StyleSheet",(function(){return gn})),n.d(t,"Text",(function(){return Gt})),n.d(t,"TextInput",(function(){return dn})),n.d(t,"TimerModule",(function(){return Wn})),n.d(t,"UIManagerModule",(function(){return Fn})),n.d(t,"View",(function(){return Qt})),n.d(t,"ViewPager",(function(){return cn})),n.d(t,"WaterfallView",(function(){return In})),n.d(t,"WebSocket",(function(){return xn})),n.d(t,"WebView",(function(){return Sn})),n.d(t,"callNative",(function(){return Hn})),n.d(t,"callNativeWithCallbackId",(function(){return Dn})),n.d(t,"callNativeWithPromise",(function(){return Mn})),n.d(t,"colorParse",(function(){return Lt})),n.d(t,"removeNativeCallback",(function(){return Un}));var r=n("./node_modules/react/index.js"),i=n.n(r),o=n("./node_modules/react-reconciler/index.js"),a=n.n(o);const l=["children"],s=["collapsable","style"],u=["style"],c=["children","style","imageStyle","imageRef","source","sources","src","srcs","tintColor","tintColors"],f=["children"],d=["children"],p=["children","style","renderRow","renderPullHeader","renderPullFooter","getRowType","getRowStyle","getRowKey","dataSource","initialListSize","rowShouldSticky","onRowLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","onAppear","onDisappear","onWillAppear","onWillDisappear"],h=["children"],m=["initialRoute"],g=["component"],y=["children","onPageScrollStateChanged"],b=["collapsable","style"],v=["style","renderBanner","numberOfColumns","columnSpacing","interItemSpacing","numberOfItems","preloadItemNumber","renderItem","renderPullHeader","renderPullFooter","getItemType","getItemKey","getItemStyle","contentInset","onItemLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","containPullHeader","containPullFooter","containBannerView"];function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t=0||(i[n]=e[n]);return i} +var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"../../packages/hippy-react/dist/index.js":function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Animated",(function(){return Jt})),n.d(t,"Animation",(function(){return Ne})),n.d(t,"AnimationSet",(function(){return Pe})),n.d(t,"AppRegistry",(function(){return Qt})),n.d(t,"AsyncStorage",(function(){return _n})),n.d(t,"BackAndroid",(function(){return Rn})),n.d(t,"Clipboard",(function(){return Ln})),n.d(t,"ConsoleModule",(function(){return Vn})),n.d(t,"Dimensions",(function(){return Jn})),n.d(t,"Easing",(function(){return Zt})),n.d(t,"Focusable",(function(){return Sn})),n.d(t,"Hippy",(function(){return qn})),n.d(t,"HippyEventEmitter",(function(){return de})),n.d(t,"HippyEventListener",(function(){return ce})),n.d(t,"HippyRegister",(function(){return Tn})),n.d(t,"Image",(function(){return Xt})),n.d(t,"ImageBackground",(function(){return Kn})),n.d(t,"ImageLoaderModule",(function(){return jn})),n.d(t,"ListView",(function(){return an})),n.d(t,"ListViewItem",(function(){return en})),n.d(t,"Modal",(function(){return kn})),n.d(t,"Navigator",(function(){return un})),n.d(t,"NetInfo",(function(){return Fn})),n.d(t,"NetworkModule",(function(){return On})),n.d(t,"PixelRatio",(function(){return Zn})),n.d(t,"Platform",(function(){return $n})),n.d(t,"PullFooter",(function(){return nn})),n.d(t,"PullHeader",(function(){return tn})),n.d(t,"RNfqb",(function(){return Qn})),n.d(t,"RNfqbEventEmitter",(function(){return Yn})),n.d(t,"RNfqbEventListener",(function(){return Xn})),n.d(t,"RNfqbRegister",(function(){return Gn})),n.d(t,"RefreshWrapper",(function(){return ln})),n.d(t,"ScrollView",(function(){return vn})),n.d(t,"StyleSheet",(function(){return yn})),n.d(t,"Text",(function(){return Yt})),n.d(t,"TextInput",(function(){return pn})),n.d(t,"TimerModule",(function(){return Bn})),n.d(t,"UIManagerModule",(function(){return Hn})),n.d(t,"View",(function(){return Kt})),n.d(t,"ViewPager",(function(){return fn})),n.d(t,"WaterfallView",(function(){return Pn})),n.d(t,"WebSocket",(function(){return Cn})),n.d(t,"WebView",(function(){return En})),n.d(t,"callNative",(function(){return Mn})),n.d(t,"callNativeWithCallbackId",(function(){return Un})),n.d(t,"callNativeWithPromise",(function(){return Dn})),n.d(t,"colorParse",(function(){return Lt})),n.d(t,"removeNativeCallback",(function(){return Wn}));var r=n("./node_modules/react/index.js"),i=n.n(r),o=n("./node_modules/react-reconciler/index.js"),a=n.n(o);const l=["children"],s=["collapsable","style"],u=["style"],c=["children","style","imageStyle","imageRef","source","sources","src","srcs","tintColor","tintColors"],f=["children"],d=["children"],p=["children","style","renderRow","renderPullHeader","renderPullFooter","getRowType","getRowStyle","getRowKey","dataSource","initialListSize","rowShouldSticky","onRowLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","onAppear","onDisappear","onWillAppear","onWillDisappear"],h=["children"],m=["initialRoute"],g=["component"],y=["children","onPageScrollStateChanged"],b=["collapsable","style"],v=["style","renderBanner","numberOfColumns","columnSpacing","interItemSpacing","numberOfItems","preloadItemNumber","renderItem","renderPullHeader","renderPullFooter","getItemType","getItemKey","getItemStyle","contentInset","onItemLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","containPullHeader","containPullFooter","containBannerView"];function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t=0||(i[n]=e[n]);return i} /*! - * @hippy/react v2.11.3 - * Build at: Thu Dec 09 2021 01:35:52 GMT+0800 (China Standard Time) + * @hippy/react v2.11.4 + * Build at: Fri Dec 10 2021 12:24:02 GMT+0800 (China Standard Time) * * Tencent is pleased to support the open source community by making * Hippy available. @@ -20,7 +20,7 @@ var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].export * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={});const{__GLOBAL__:x}=e;x.nodeId=0,x.animationId=0,x.renderCount=0;const{asyncStorage:C,bridge:N,device:I,document:P,register:_,on:R,off:A,emit:L}=e.Hippy;var O=Object.freeze({__proto__:null,addEventListener:R,removeEventListener:A,dispatchEvent:L,AsyncStorage:C,Bridge:N,Device:I,HippyRegister:_,UIManager:P});let z,T;const j=new Map;function F(e,t){T=e,z=t}function H(){if(!T)throw new Error("getRootViewId must execute after setRootContainer");return T}function M(e){if(!z)return null;const{current:t}=z,n=[t];for(;n.length;){const t=n.shift();if(!t)break;if(e(t))return t;t.child&&n.push(t.child),t.sibling&&n.push(t.sibling)}return null}function D(e,t){j.set(t,e)}function U(e){j.delete(e)}function W(e){return e&&e.stateNode||null}function B(e){return j.get(e)||null}function V(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?U(t):t&&(U(t.nodeId),t.childNodes&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const $=new RegExp(/^\d+$/);let q=!1,Q=!1;function K(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const G=new RegExp("^on.+Capture$");const Y=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function X(e){return"[object Function]"===Object.prototype.toString.call(e)}function J(e){q=e}function Z(){return Q}function ee(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function te(e){return 5===e}class ne{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}notifyEvent(e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,e):n.eventHandler(e))})}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}}class re{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}}const ie=new Map;function oe(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: "+e);return ie.get(e)||null}function ae(e,t){let n=e;return t.memoizedProps&&!t.memoizedProps[e]&&"onClick"===e&&t.memoizedProps.onPress&&(n="onPress"),n}function le(e,t){return!(!t.memoizedProps||"function"!=typeof t.memoizedProps[e])}const se={registerNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: "+e);let t=ie.get(e);return t||(t=new ne(e),ie.set(e,t)),t},getHippyEventHub:oe,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: "+e);ie.has(e)&&ie.delete(e)},receiveNativeEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: "+JSON.stringify(e));const[t,n]=e;if("string"!=typeof t)throw new TypeError("Invalid arguments");const r=oe(t);r&&r.notifyEvent(n)},receiveNativeGesture:function(e){if(!e)return;const{id:t}=e,n=B(t);if(!n)return;let r=!0,{name:i}=e;i=ae(i,n);const o=i+"Capture",a=n;n.memoizedProps&&"function"!=typeof n.memoizedProps[o]&&(r=!1),r?function(e,t,n){const r=[];let i=n,o=e;for(;i;){o=ae(o,i);const e=o+"Capture";for(le(e,i)&&r.unshift({eventName:e,listener:i.memoizedProps[e],isCapture:!0,currentTarget:W(i)}),le(o,i)&&r.push({eventName:o,listener:i.memoizedProps[o],isCapture:!1,currentTarget:W(i)}),i=i.return;i&&!te(i.tag);)i=i.return}if(r.length>0){let e,i=!1;const o=W(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new re(n,r,o);Object.assign(s,t),l?a(s):(i=a(s),"boolean"!=typeof i&&(i=!Z()),s.bubbles||(i=!0))}catch(e){console.reportUncaughtException(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=W(n);do{if(o=ae(o,i),le(o,i))try{const e=W(i),n=new re(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!Z()),n.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!te(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=B(t);i&&le(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=se);class ue{constructor(e,t){this.callback=e,this.bindListener=t}remove(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}class ce{constructor(e){this.eventName=e,this.listenerIds=[]}addCallback(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");const n=se.registerNativeEventHub(this.eventName);if(!n)throw new ReferenceError("No listeners for "+this.eventName);const r=n.addEventHandler(e,t);if("number"!=typeof r)throw new Error("Fail to addEventHandler");return this.listenerIds.push(r),r}removeCallback(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");const t=se.getHippyEventHub(this.eventName);if(!t)throw new ReferenceError("No listeners for "+this.eventName);t.removeEventHandler(e);const n=this.listenerIds.length;for(let t=0;t{t(e)});return be.set(r,r),new we(n,t)},removeEventListener:ke,fetch:function(){return N.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function Ee(e){return"loop"===e?-1:e}const xe=new de;function Ce(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Lt(t):t}class Ne{constructor(e){let t=0;if(e.startValue&&e.startValue.constructor&&"Animation"===e.startValue.constructor.name)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=Ce(e.valueType,n)}const n=Ce(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=t||0,this.toValue=n||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=Ee(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=bt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();let e="onAnimation";e="onHippyAnimation","function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=xe.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=xe.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=xe.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=xe.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),bt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),bt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){bt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){bt.callNative("AnimationModule","resumeAnimation",this.animationId)}updateAnimation(e){if("object"!=typeof e)throw new TypeError("Invalid arguments");if("string"==typeof e.mode&&e.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(e).forEach(t=>{const n=e[t];if("startValue"===t){let t=0;if(e.startValue instanceof Ne)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=Ce(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=Ee(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),bt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Ce(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const Ie=new de;class Pe{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=bt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Ee(e.repeatCount||0),children:this.animationList,virtual:e.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();let e="onAnimation";e="onHippyAnimation","function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ie.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ie.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ie.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ie.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),bt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&bt.callNative("AnimationModule","destroyAnimation",e.animationId)),bt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){bt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){bt.callNative("AnimationModule","resumeAnimation",this.animationId)}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const _e={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let Re=!0,Ae=[];function Le(){Re&&tt()}function Oe(e){Re&&(Re=!1,Promise.resolve().then(()=>{(function(e){const t=[];for(let n=0;n{switch(t.type){case _e.createNode:t.nodes,Xe(e,t.nodes);break;case _e.updateNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>Je(e,[t])):Je(e,t.nodes);break;case _e.deleteNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>Ze(e,[t])):Ze(e,t.nodes)}}),nt(),Ae=[],Re=!0}))}function ze(e){const t=e.attributes,{children:n}=t;return E(t,l)}function Te(e,t){if(!t.nativeName)return null;if(t.meta.skipAddToDom)return null;if(!t.meta.component)throw new Error("Specific tag is not supported yet: "+t.tagName);return{id:t.nodeId,pId:t.parentNode&&t.parentNode.nodeId||e,index:t.index,name:t.nativeName,props:k(k({},ze(t)),{},{style:t.style})}}function je(e,t,n,r){const i=[];let o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const n=Te(e,t);n&&i.push(n),"function"==typeof r&&r(t)},o),i}function Fe(e){return!!z&&e instanceof z.containerInfo.constructor}function He(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=H();if(Fe(e)&&!e.isMounted){const e=je(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Le(),Ae.push({type:_e.createNode,nodes:e}),Oe(r)}else if(e.isMounted&&!t.isMounted){const e=je(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Le(),Ae.push({type:_e.createNode,nodes:e}),Oe(r)}}function Me(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=H(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Le(),Ae.push({type:_e.deleteNode,nodes:i}),Oe(r)}function De(e){if(!e.isMounted)return;const t=H(),n=Te(t,e);Le(),n&&Ae.push({type:_e.updateNode,nodes:[n]}),Oe(t)}let Ue=0;class We{constructor(){this.meta={component:{}},this.mounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.nodeId=(Ue+=1,Ue%10==0&&(Ue+=1),Ue)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),He(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),Me(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),He(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),He(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),Me(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Be={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Ve={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},$e="turn",qe="rad",Qe="deg";function Ke(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=Qe){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case $e:r=""+(360*n).toFixed(2);break;case qe:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==Ve[i]&&(r=Ve[i]),r}function Ge(e){const t=(e||"").replace(/\s+/g," ").trim(),[n,r]=t.split(/\s+(?![^(]*?\))/),i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Lt(n)}:void 0:{color:Lt(n)}}class Ye extends We{constructor(e){super(),this.id="",this.style={},this.attributes={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}hasAttribute(e){return!!this.attributes[e]}getAttribute(e){return this.attributes[e]}setStyleAttribute(e){this.style={};let t=e;if(!Array.isArray(t)&&Object.hasOwnProperty.call(t,0)){const e=[],n={};Object.keys(t).forEach(r=>{var i;i=r,$.test(i)?e.push(t[r]):n[r]=t[r]}),t=[...e,n]}Array.isArray(t)||(t=[t]);let n={};t.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n=k(k({},n),e)}):"object"==typeof e&&e&&(n=k(k({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Be,e)&&(e=Be[e]),"transform"===e){const e={};if(!Array.isArray(t))throw new TypeError("transform only support array args");t.forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n];r instanceof Ne||r instanceof Pe?e[n]={animationId:r.animationId}:null===r?e[n]&&delete e[n]:void 0!==r&&(e[n]=r)})});const n=Object.keys(e);n.length&&(Array.isArray(this.style.transform)||(this.style.transform=[]),n.forEach(t=>this.style.transform.push({[t]:e[t]})))}else if(null===t&&void 0!==this.style[e])this.style[e]=void 0;else if(t instanceof Ne||t instanceof Pe)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Ot(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Lt(t);else if("backgroundImage"===e&&t)this.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){const e=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),r=[];n.linearGradient=n.linearGradient||{},e.forEach((e,t)=>{if(0===t){const t=Ke(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Ge(e);t&&r.push(t)}}else{const t=Ge(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=ee(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttribute(e,t){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void De(this);let n=!1;if([{match:()=>["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=H(),n=je(t,e);Le(),Ae.push({type:_e.updateNode,nodes:n}),Oe(t)}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=K(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["numberOfRows"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,"ios"!==vt.platform.OS)},{match:()=>["onPress"].indexOf(e)>=0,action:()=>(this.attributes.onClick=!0,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{var n;return"function"==typeof t?(n=e,G.test(n)&&(e=e.replace("Capture","")),this.attributes[e]=!0):this.attributes[e]=t,!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n)return;let r=!1;Object.keys(this.style).some(e=>{const t=this.style[e];if(t&&Array.isArray(t)&&"transform"===e)for(let e=0;e-1?Ot(r):i.toLowerCase().indexOf("color")>-1?Lt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&Y.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||De(this))}setNativeProps(e){if(e){const{style:t}=e;if(t){const e=t;Object.keys(e).forEach(t=>{this.setStyle(t,e[t],!0)}),De(this)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=K(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:Xe,updateNode:Je,deleteNode:Ze,flushBatch:et,startBatch:tt,endBatch:nt,sendRenderError:rt}=P,it=function(e){return M(t=>t.stateNode&&t.stateNode.nodeId===e)};function ot(e){if(e instanceof Ye)return e;const t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){let e=t.child;for(;e&&!(e.stateNode instanceof Ye);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function at(e){let t=e;if("string"==typeof e){const n=M(t=>!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e);if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){const e=ot(t);return e?e.nodeId:0}return t.nodeId}function lt(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=ot(e);t&&({nodeId:i,nativeName:r}=t)}if(!r)throw new Error("callUIFunction is calling a unnamed component");if(!i)throw new Error("callUIFunction is calling a component have no nodeId");let[o=[],a]=n;X(o)&&(a=o,o=[]);null!==H()&&("ios"===I.platform.OS?(X(a)&&Array.isArray(o)&&o.push(a),N.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===I.platform.OS&&(X(a)?N.callNative("UIManagerModule","callUIFunction",[i,t,o],a):N.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function st(e,t,n){const r=at(t);return new Promise((t,i)=>r?N.callNative("UIManagerModule",e,r,e=>(n&&X(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&X(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var ut=Object.freeze({__proto__:null,createNode:Xe,updateNode:Je,deleteNode:Ze,flushBatch:et,startBatch:tt,endBatch:nt,sendRenderError:rt,getNodeById:it,getNodeIdByRef:at,getElementFromFiberRef:ot,callUIFunction:lt,measureInWindow:function(e,t){return st("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===I.platform.OS?st("measureInWindow",e,t):st("measureInAppWindow",e,t)}});const ct=new de,ft=new Set,dt={exitApp(){N.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(N.callNative("DeviceEventModule","setListenBackPress",!0),ft.add(e),{remove(){dt.removeListener(e)}}),removeListener(e){ft.delete(e),0===ft.size&&N.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){ct.addListener("hardwareBackPress",()=>{let e=!0;[...ft].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&dt.exitApp()})}},pt=(dt.initEventListener(),dt),{addEventListener:ht,removeEventListener:mt,dispatchEvent:gt,AsyncStorage:yt,Bridge:bt,Device:vt,HippyRegister:wt}=O;var kt=Object.freeze({__proto__:null,addEventListener:ht,removeEventListener:mt,dispatchEvent:gt,AsyncStorage:yt,BackAndroid:pt,Bridge:bt,Clipboard:pe,Cookie:he,Device:vt,HippyRegister:wt,ImageLoader:ye,NetworkInfo:Se,UIManager:ut});function St(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const Et={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},xt="[-+]?\\d*\\.?\\d+",Ct={rgb:new RegExp("rgb"+St(xt,xt,xt)),rgba:new RegExp("rgba"+St(xt,xt,xt,xt)),hsl:new RegExp("hsl"+St(xt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+St(xt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",xt)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function Nt(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function It(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Pt(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function _t(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Pt(i,r,e+1/3),a=Pt(i,r,e),l=Pt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Rt(e){return(parseFloat(e)%360+360)%360/360}function At(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Lt(e,t={}){if(Number.isInteger(e))return e;let n=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ct.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(Et,e)?Et[e]:(t=Ct.rgb.exec(e),Array.isArray(t)?(Nt(t[1])<<24|Nt(t[2])<<16|Nt(t[3])<<8|255)>>>0:(t=Ct.rgba.exec(e),t?(Nt(t[1])<<24|Nt(t[2])<<16|Nt(t[3])<<8|It(t[4]))>>>0:(t=Ct.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ct.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=Ct.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ct.hsl.exec(e),t?(255|_t(Rt(t[1]),At(t[2]),At(t[3])))>>>0:(t=Ct.hsla.exec(e),t?(_t(Rt(t[1]),At(t[2]),At(t[3]))|It(t[4]))>>>0:null))))))))}(e);return t.platform||(t.platform="android"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function Ot(e,t){return Array.isArray(e)?e.map(e=>Lt(e,t)):[0]}class zt extends We{constructor(){super(),this.documentElement=new Ye("document")}createElement(e){return new Ye(e)}createElementNS(e,t){return new Ye(`${e}:${t}`)}}zt.createElement=zt.prototype.createElement,zt.createElementNS=zt.prototype.createElementNS;var Tt=Array.isArray,jt=Object.keys,Ft=Object.prototype.hasOwnProperty;const Ht=setTimeout,Mt=clearTimeout;var Dt=Object.freeze({__proto__:null,scheduleTimeout:Ht,cancelTimeout:Mt,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){if(!t)return;D(o,e.nodeId);const a=Object.entries(t).filter(([,e])=>"function"!=typeof e);0!==a.length&&a.forEach(([t,n])=>e.setAttribute(t,n))},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),D(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",K(e)),i.meta={component:{name:"Text"}},D(r,i.nodeId),i},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};return Object.keys(r).forEach(e=>{const t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:(function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=Tt(t),l=Tt(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=jt(t);if((i=d.length)!==jt(n).length)return!1;for(r=i;0!=r--;)if(!Ft.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=d[r]],n[o]))return!1;return!0}return t!=t&&n!=n})(t,o)||(i[e]=o)}}),Object.keys(i).length?i:null},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),V(t)},removeChildFromContainer:function(e,t){e.removeChild(t),V(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=k(k({},t),{},{style:k(k({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){const{children:e}=t;return"string"==typeof e||"number"==typeof e}return!1}});const Ut=a()(k(k({},Dt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{createContainer:Wt,updateContainer:Bt,getPublicRootInstance:Vt}=Ut;class $t{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new zt;this.rootContainer=Wt(t,!1,!1)}static get Native(){return kt}start(){wt.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:o=!1,callback:a=(()=>{})}=this.config,{__instanceId__:l}=e;this.rootContainer.containerInfo.nodeId=l,r&&J(r),o&&function(e=!1){Q=e}(o),F(l,this.rootContainer);const s=i.a.createElement(n,e);return Bt(s,this.rootContainer,null,a),Vt(this.rootContainer)}}$t.version="2.11.3";const qt={registerComponent(e,t){new $t({appName:e,entryPage:t}).start()}};class Qt extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=E(e,s),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function Kt(e,t){let{style:n}=e,r=E(e,u);const o=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(o[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=K(r.children);else if("number"==typeof r.children)r.text=K(r.children.toString());else if(Array.isArray(r.children)){const e=r.children.filter(e=>"string"==typeof e||"number"==typeof e).join("");e&&(r.text=K(e),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}Kt.displayName="Text";const Gt=i.a.forwardRef(Kt);Gt.displayName="Text";class Yt extends i.a.Component{static get resizeMode(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}static getSize(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");const r=me(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}getImageUrls({src:e,srcs:t,source:n,sources:r}){let i=[];if("string"==typeof e&&i.push(e),Array.isArray(t)&&(i=[...i,...t]),n)if("string"==typeof n)i.push(n);else if("object"==typeof n&&null!==n){const{uri:e}=n;e&&i.push(e)}return r&&Array.isArray(r)&&r.forEach(e=>{"string"==typeof e?i.push(e):"object"==typeof e&&null!==e&&e.uri&&i.push(e.uri)}),i.length&&(i=i.map(e=>ee(e))),i}handleTintColor(e,t,n){t&&(e.tintColor=Lt(t)),Array.isArray(n)&&(e.tintColors=Ot(n))}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:a,sources:l,src:s,srcs:u,tintColor:f,tintColors:d}=e,p=E(e,c),h=this.getImageUrls({src:s,srcs:u,source:a,sources:l});"ios"===vt.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===vt.platform.OS&&(1===h.length?[p.src]=h:h.length>1&&(p.srcs=h)),"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ee(p.defaultSource));const m=k({},n);return this.handleTintColor(m,f,d),p.style=m,t?i.a.createElement(Qt,{style:n},i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:o,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:o}))}}Yt.prefetch=ge;class Xt{constructor(){this.Value=Xt.Value}static Value(e){return e}static timing(e,t){return new Ne({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}Xt.View=Qt,Xt.Text=Gt,Xt.Image=Yt;const Jt={step0:e=>e>0?1:0,step1:e=>e>=1?1:0,linear:()=>"linear",ease:()=>"ease",quad:e=>e**2,cubic:e=>e**3,poly:e=>t=>t**e,sin:e=>1-Math.cos(e*Math.PI/2),circle:e=>1-Math.sqrt(1-e*e),exp:e=>2**(10*(e-1)),elastic:()=>"elastic",back:(e=1.70158)=>t=>t*t*((e+1)*t-e),bounce(e){let t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?(t-=1.5/2.75,7.5625*t*t+.75):t<2.5/2.75?(t-=2.25/2.75,7.5625*t*t+.9375):(t-=2.625/2.75,7.5625*t*t+.984375)},bezier:()=>"bezier",in:()=>"ease-in",out:()=>"ease-out",inOut:()=>"ease-in-out"};function Zt(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}class en extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){lt(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===vt.platform.OS?lt(this.instance,"collapsePullHeader",[e]):void 0!==e?lt(this.instance,"collapsePullHeaderWithOptions",[e]):lt(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=E(e,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class tn extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){lt(this.instance,"expandPullFooter",[])}collapsePullFooter(){lt(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=E(e,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}tn.defaultProps={sticky:!0};const nn={onDisappear:"onDisAppear"},rn={onDisappear:"onDisappear"};class on extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this),this.state={initialListReady:!1}}componentDidMount(){const{getRowKey:e}=this.props}convertName(e){return"android"===vt.platform.OS&&nn[e]?nn[e]:"ios"===vt.platform.OS&&rn[e]?rn[e]:e}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&<(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&<(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(en,{key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(tn,{key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleRowProps(e,t,{getRowKey:n,getRowStyle:r,onRowLayout:i,getRowType:o,rowShouldSticky:a}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i(e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}"function"==typeof a&&(e.sticky=a(t))}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:o,renderPullFooter:a,getRowType:l,getRowStyle:s,getRowKey:u,dataSource:c,initialListSize:f,rowShouldSticky:d,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:g,onFooterPulling:y,onFooterReleased:b,onAppear:v,onDisappear:w,onWillAppear:S,onWillDisappear:x}=e,C=E(e,p),N=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const p=this.getPullHeader(o,m,g),E=this.getPullFooter(a,y,b);!t&&c&&(t=c.length),e||(t=Math.min(t,f||10));for(let e=0;e{"function"==typeof n&&(t[this.convertName(r)]=()=>{n(e)})}),n&&N.push(i.a.createElement(Zt,Object.assign({},t),n))}p&&N.unshift(p),E&&N.push(E),"function"==typeof d&&Object.assign(C,{rowShouldSticky:!0});const I=[v,w,S,x];C.exposureEventEnabled=I.some(e=>"function"==typeof e),C.numberOfRows=N.length,C.initialListSize=f,C.style=k({overflow:"scroll"},n)}return!C.onLoadMore&&C.onEndReached&&(C.onLoadMore=C.onEndReached),i.a.createElement("ul",Object.assign({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},C),N.length?N:t)}}on.defaultProps={numberOfRows:0};class an extends i.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}startRefresh(){lt(this.instance,"startRefresh",null)}refreshCompleted(){lt(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=E(e,h);return i.a.createElement("div",Object.assign({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}}class ln{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(e&&e.component){if(!this.routeList[e.routeName]){new $t({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),lt(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),lt(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=E(e.initialRoute,g),r=E(e,m);return r.initialRoute=n,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function un(e){return i.a.createElement("div",Object.assign({nativeName:"ViewPagerItem"},e,{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class cn extends i.a.Component{constructor(e){super(e),this.instance=null,this.setPage=this.setPage.bind(this),this.setPageWithoutAnimation=this.setPageWithoutAnimation.bind(this),this.onPageScrollStateChanged=this.onPageScrollStateChanged.bind(this)}onPageScrollStateChanged(e){const{onPageScrollStateChanged:t}=this.props;t&&t(e.pageScrollState)}setPage(e){"number"==typeof e&<(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&<(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=E(e,y);let o=[];return Array.isArray(t)?o=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),i.a.createElement(un,Object.assign({},t),e)}):o.push(i.a.createElement(un,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),o)}}function fn(){const e=I.platform.Localization;return!!e&&1===e.direction}class dn extends i.a.Component{constructor(e){super(e),this.instance=null,this._lastNativeText="",this.onChangeText=this.onChangeText.bind(this),this.onKeyboardWillShow=this.onKeyboardWillShow.bind(this)}componentDidMount(){const{value:e,autoFocus:t}=this.props;this._lastNativeText=e,t&&this.focus()}componentWillUnmount(){this.blur()}getValue(){return new Promise(e=>{lt(this.instance,"getValue",t=>e(t.text))})}setValue(e){return lt(this.instance,"setValue",[e]),e}focus(){lt(this.instance,"focusTextInput",[])}blur(){lt(this.instance,"blurTextInput",[])}showInputMethod(){lt(this.instance,"showInputMethod",[])}hideInputMethod(){lt(this.instance,"hideInputMethod",[])}clear(){lt(this.instance,"clear",[])}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props,n=e;"android"===vt.platform.OS&&(n.keyboardHeight/=vt.screen.scale),"function"==typeof t&&t(n)}render(){const e=k({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors"].forEach(t=>{"string"==typeof this.props[t]&&(Array.isArray(e.style)?e.style.push({[t]:this.props[t]}):e.style&&"object"==typeof e.style?e.style[t]=this.props[t]:e.style={[t]:this.props[t]},e[t]=void 0)}),fn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),i.a.createElement("div",Object.assign({nativeName:"TextInput"},e,{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}}const pn=vt.window.scale;let hn=Math.round(.4*pn)/pn;function mn(e){return e}0===hn&&(hn=1/pn);var gn=Object.freeze({__proto__:null,get hairlineWidth(){return hn},create:mn});const yn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}};class bn extends i.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"number"==typeof e||"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,lt(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){lt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?yn.contentContainerHorizontal:yn.contentContainerVertical,t],a=e?Object.assign({},yn.baseHorizontal,r):Object.assign({},yn.baseVertical,r);return e&&(a.flexDirection=fn()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props,{style:a}),i.a.createElement(Qt,{style:o},n))}}const vn={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}};class wn extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===vt.platform.OS&&(this.eventSubscription=new ce("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===vt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:o}=this.props;if(!1===t)return null;const a={backgroundColor:n?"transparent":"white"};return o||(o="none",r&&(o="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:o,transparent:n,style:vn.modal},this.props),i.a.createElement(Qt,{style:[vn.container,a]},e))}}wn.defaultProps={visible:!0};class kn extends i.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}render(){const{requestFocus:e,children:t,nextFocusDownId:n,nextFocusUpId:r,nextFocusLeftId:o,nextFocusRightId:a,style:l,noFocusStyle:s,focusStyle:u,onClick:c}=this.props,{isFocus:f}=this.state,d=i.a.Children.only(t);let p;d&&d.child&&d.child.memoizedProps&&d.child.memoizedProps.nativeName?p=d.child.memoizedProps.nativeName:d&&d.type&&d.type.displayName&&(p=d.type.displayName);const h=n&&at(n),m=r&&at(r),g=o&&at(o),y=a&&at(a);let b=l;if("Text"!==p){const e=d.memoizedProps.style;b=k(k({},b),e)}if(Object.assign(b,f?u:s),"Text"===p)return i.a.createElement(Qt,{focusable:!0,nextFocusDownId:h,nextFocusUpId:m,nextFocusLeftId:g,nextFocusRightId:y,requestFocus:e,style:b,onClick:c,onFocus:this.handleFocus},d);const{children:v}=d.memoizedProps;return i.a.cloneElement(d,{nextFocusDownId:n,nextFocusUpId:r,nextFocusLeftId:o,nextFocusRightId:a,requestFocus:e,onClick:c,focusable:!0,children:v,style:b,onFocus:this.handleFocus})}}function Sn(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}let En;class xn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),En||(En=new ce("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=k({},n);if(void 0!==t)if(Array.isArray(t)&&t.length>0)r["Sec-WebSocket-Protocol"]=t.join(",");else{if("string"!=typeof t)throw new TypeError("Invalid WebSocket protocols");r["Sec-WebSocket-Protocol"]=t}const i={headers:r,url:e};this.url=e,this.webSocketCallbackId=En.addCallback(this.onWebSocketEvent),N.callNativeWithPromise("websocket","connect",i).then(e=>{e&&0===e.code&&"number"==typeof e.id&&(this.webSocketId=e.id)})}close(e,t){1===this.readyState&&(this.readyState=2,N.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}send(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: "+typeof e);N.callNative("websocket","send",{id:this.webSocketId,data:e})}}set onopen(e){this.webSocketCallbacks.onOpen=e}set onclose(e){this.webSocketCallbacks.onClose=e}set onerror(e){this.webSocketCallbacks.onError=e}set onmessage(e){this.webSocketCallbacks.onMessage=e}onWebSocketEvent(e){if("object"!=typeof e||e.id!==this.webSocketId)return;const{type:t}=e;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,En.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}class Cn extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=E(e,b),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function Nn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}class In extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}componentDidMount(){const{getItemKey:e}=this.props}scrollToIndex({index:e=0,animated:t=!0}){lt(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){lt(this.instance,"scrollToContentOffset",[e,t,n])}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(en,{key:"PullHeader",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(tn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:o=0,interItemSpacing:a=0,numberOfItems:l=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:f,getItemType:d,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:g,onHeaderPulling:y,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:S,containPullHeader:x=!1,containPullFooter:C=!1,containBannerView:N=!1}=e,I=k(k({},E(e,v)),{},{style:t,numberOfColumns:r,columnSpacing:o,interItemSpacing:a,preloadItemNumber:s,contentInset:m,containPullHeader:x,containPullFooter:C,containBannerView:N}),P=[];if("function"==typeof n){const e=n();e&&(P.push(i.a.createElement(Cn,{key:"bannerView"},i.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,y,b),n=this.getPullFooter(f,w,S);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}}e.WebSocket=xn;const{AsyncStorage:Pn,BackAndroid:_n,Bridge:Rn,Clipboard:An,Cookie:Ln,Device:On,HippyRegister:zn,ImageLoader:Tn,NetworkInfo:jn,UIManager:Fn}=kt,{callNative:Hn,callNativeWithPromise:Mn,callNativeWithCallbackId:Dn,removeNativeCallback:Un}=Rn,Wn=null,Bn=e.ConsoleModule||e.console,Vn=On.platform,$n=$t,qn=$t,Qn=Yt,Kn=zn,Gn=de,Yn=ce,Xn={get:e=>On[e]},Jn={get:()=>On.screen.scale};t.default=$t}.call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/object-assign/index.js":function(e,t,n){"use strict"; + */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={});const{__GLOBAL__:x}=e;x.nodeId=0,x.animationId=0,x.renderCount=0;const{asyncStorage:C,bridge:N,device:I,document:P,register:_,on:R,off:A,emit:L}=e.Hippy;var O=Object.freeze({__proto__:null,addEventListener:R,removeEventListener:A,dispatchEvent:L,AsyncStorage:C,Bridge:N,Device:I,HippyRegister:_,UIManager:P});let z,T;const j=new Map;function F(e,t){T=e,z=t}function H(){if(!T)throw new Error("getRootViewId must execute after setRootContainer");return T}function M(e){if(!z)return null;const{current:t}=z,n=[t];for(;n.length;){const t=n.shift();if(!t)break;if(e(t))return t;t.child&&n.push(t.child),t.sibling&&n.push(t.sibling)}return null}function D(e,t){j.set(t,e)}function U(e){j.delete(e)}function W(e){return e&&e.stateNode||null}function B(e){return j.get(e)||null}function V(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?U(t):t&&(U(t.nodeId),t.childNodes&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const $=new RegExp(/^\d+$/);let q=!1,Q=!1;function K(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const G=new RegExp("^on.+Capture$");const Y=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function X(e){return"[object Function]"===Object.prototype.toString.call(e)}function J(e){q=e}function Z(){return Q}function ee(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function te(e){return 5===e}class ne{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}notifyEvent(e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,e):n.eventHandler(e))})}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}}class re{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}}const ie=new Map;function oe(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: "+e);return ie.get(e)||null}function ae(e,t){let n=e;return t.memoizedProps&&!t.memoizedProps[e]&&"onClick"===e&&t.memoizedProps.onPress&&(n="onPress"),n}function le(e,t){return!(!t.memoizedProps||"function"!=typeof t.memoizedProps[e])}const se={registerNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: "+e);let t=ie.get(e);return t||(t=new ne(e),ie.set(e,t)),t},getHippyEventHub:oe,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: "+e);ie.has(e)&&ie.delete(e)},receiveNativeEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: "+JSON.stringify(e));const[t,n]=e;if("string"!=typeof t)throw new TypeError("Invalid arguments");const r=oe(t);r&&r.notifyEvent(n)},receiveNativeGesture:function(e){if(!e)return;const{id:t}=e,n=B(t);if(!n)return;let r=!0,{name:i}=e;i=ae(i,n);const o=i+"Capture",a=n;n.memoizedProps&&"function"!=typeof n.memoizedProps[o]&&(r=!1),r?function(e,t,n){const r=[];let i=n,o=e;for(;i;){o=ae(o,i);const e=o+"Capture";for(le(e,i)&&r.unshift({eventName:e,listener:i.memoizedProps[e],isCapture:!0,currentTarget:W(i)}),le(o,i)&&r.push({eventName:o,listener:i.memoizedProps[o],isCapture:!1,currentTarget:W(i)}),i=i.return;i&&!te(i.tag);)i=i.return}if(r.length>0){let e,i=!1;const o=W(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new re(n,r,o);Object.assign(s,t),l?a(s):(i=a(s),"boolean"!=typeof i&&(i=!Z()),s.bubbles||(i=!0))}catch(e){console.reportUncaughtException(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=W(n);do{if(o=ae(o,i),le(o,i))try{const e=W(i),n=new re(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!Z()),n.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!te(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=B(t);i&&le(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=se);class ue{constructor(e,t){this.callback=e,this.bindListener=t}remove(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}class ce{constructor(e){this.eventName=e,this.listenerIds=[]}addCallback(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");const n=se.registerNativeEventHub(this.eventName);if(!n)throw new ReferenceError("No listeners for "+this.eventName);const r=n.addEventHandler(e,t);if("number"!=typeof r)throw new Error("Fail to addEventHandler");return this.listenerIds.push(r),r}removeCallback(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");const t=se.getHippyEventHub(this.eventName);if(!t)throw new ReferenceError("No listeners for "+this.eventName);t.removeEventHandler(e);const n=this.listenerIds.length;for(let t=0;t{t(e)});return be.set(r,r),new we(n,t)},removeEventListener:ke,fetch:function(){return N.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function Ee(e){return"loop"===e?-1:e}const xe=new de;function Ce(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Lt(t):t}class Ne{constructor(e){let t=0;if(e.startValue&&e.startValue.constructor&&"Animation"===e.startValue.constructor.name)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=Ce(e.valueType,n)}const n=Ce(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=t||0,this.toValue=n||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=Ee(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=bt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();let e="onAnimation";e="onHippyAnimation","function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=xe.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=xe.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=xe.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=xe.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),bt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),bt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){bt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){bt.callNative("AnimationModule","resumeAnimation",this.animationId)}updateAnimation(e){if("object"!=typeof e)throw new TypeError("Invalid arguments");if("string"==typeof e.mode&&e.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(e).forEach(t=>{const n=e[t];if("startValue"===t){let t=0;if(e.startValue instanceof Ne)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=Ce(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=Ee(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),bt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Ce(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const Ie=new de;class Pe{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=bt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Ee(e.repeatCount||0),children:this.animationList,virtual:e.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();let e="onAnimation";e="onHippyAnimation","function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ie.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ie.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ie.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ie.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),bt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&bt.callNative("AnimationModule","destroyAnimation",e.animationId)),bt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){bt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){bt.callNative("AnimationModule","resumeAnimation",this.animationId)}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const _e={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let Re=!0,Ae=[];function Le(){Re&&tt()}function Oe(e){Re&&(Re=!1,Promise.resolve().then(()=>{(function(e){const t=[];for(let n=0;n{switch(t.type){case _e.createNode:t.nodes,Xe(e,t.nodes);break;case _e.updateNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>Je(e,[t])):Je(e,t.nodes);break;case _e.deleteNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>Ze(e,[t])):Ze(e,t.nodes)}}),nt(),Ae=[],Re=!0}))}function ze(e){const t=e.attributes,{children:n}=t;return E(t,l)}function Te(e,t){if(!t.nativeName)return null;if(t.meta.skipAddToDom)return null;if(!t.meta.component)throw new Error("Specific tag is not supported yet: "+t.tagName);return{id:t.nodeId,pId:t.parentNode&&t.parentNode.nodeId||e,index:t.index,name:t.nativeName,props:k(k({},ze(t)),{},{style:t.style})}}function je(e,t,n,r){const i=[];let o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const n=Te(e,t);n&&i.push(n),"function"==typeof r&&r(t)},o),i}function Fe(e){return!!z&&e instanceof z.containerInfo.constructor}function He(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=H();if(Fe(e)&&!e.isMounted){const e=je(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Le(),Ae.push({type:_e.createNode,nodes:e}),Oe(r)}else if(e.isMounted&&!t.isMounted){const e=je(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Le(),Ae.push({type:_e.createNode,nodes:e}),Oe(r)}}function Me(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=H(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Le(),Ae.push({type:_e.deleteNode,nodes:i}),Oe(r)}function De(e){if(!e.isMounted)return;const t=H(),n=Te(t,e);Le(),n&&Ae.push({type:_e.updateNode,nodes:[n]}),Oe(t)}let Ue=0;class We{constructor(){this.meta={component:{}},this.mounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.nodeId=(Ue+=1,Ue%10==0&&(Ue+=1),Ue)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),He(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),Me(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),He(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),He(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),Me(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Be={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Ve={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},$e="turn",qe="rad",Qe="deg";function Ke(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=Qe){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case $e:r=""+(360*n).toFixed(2);break;case qe:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==Ve[i]&&(r=Ve[i]),r}function Ge(e){const t=(e||"").replace(/\s+/g," ").trim(),[n,r]=t.split(/\s+(?![^(]*?\))/),i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Lt(n)}:void 0:{color:Lt(n)}}class Ye extends We{constructor(e){super(),this.id="",this.style={},this.attributes={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}hasAttribute(e){return!!this.attributes[e]}getAttribute(e){return this.attributes[e]}setStyleAttribute(e){this.style={};let t=e;if(!Array.isArray(t)&&Object.hasOwnProperty.call(t,0)){const e=[],n={};Object.keys(t).forEach(r=>{var i;i=r,$.test(i)?e.push(t[r]):n[r]=t[r]}),t=[...e,n]}Array.isArray(t)||(t=[t]);let n={};t.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n=k(k({},n),e)}):"object"==typeof e&&e&&(n=k(k({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Be,e)&&(e=Be[e]),"transform"===e){const e={};if(!Array.isArray(t))throw new TypeError("transform only support array args");t.forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n];r instanceof Ne||r instanceof Pe?e[n]={animationId:r.animationId}:null===r?e[n]&&delete e[n]:void 0!==r&&(e[n]=r)})});const n=Object.keys(e);n.length&&(Array.isArray(this.style.transform)||(this.style.transform=[]),n.forEach(t=>this.style.transform.push({[t]:e[t]})))}else if(null===t&&void 0!==this.style[e])this.style[e]=void 0;else if(t instanceof Ne||t instanceof Pe)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Ot(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Lt(t);else if("backgroundImage"===e&&t)this.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){const e=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),r=[];n.linearGradient=n.linearGradient||{},e.forEach((e,t)=>{if(0===t){const t=Ke(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Ge(e);t&&r.push(t)}}else{const t=Ge(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=ee(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttribute(e,t){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void De(this);let n=!1;if([{match:()=>["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=H(),n=je(t,e);Le(),Ae.push({type:_e.updateNode,nodes:n}),Oe(t)}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=K(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["numberOfRows"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,"ios"!==vt.platform.OS)},{match:()=>["onPress"].indexOf(e)>=0,action:()=>(this.attributes.onClick=!0,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{var n;return"function"==typeof t?(n=e,G.test(n)&&(e=e.replace("Capture","")),this.attributes[e]=!0):this.attributes[e]=t,!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n)return;let r=!1;Object.keys(this.style).some(e=>{const t=this.style[e];if(t&&Array.isArray(t)&&"transform"===e)for(let e=0;e-1?Ot(r):i.toLowerCase().indexOf("color")>-1?Lt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&Y.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||De(this))}setNativeProps(e){if(e){const{style:t}=e;if(t){const e=t;Object.keys(e).forEach(t=>{this.setStyle(t,e[t],!0)}),De(this)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=K(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:Xe,updateNode:Je,deleteNode:Ze,flushBatch:et,startBatch:tt,endBatch:nt,sendRenderError:rt}=P,it=function(e){return M(t=>t.stateNode&&t.stateNode.nodeId===e)};function ot(e){if(e instanceof Ye)return e;const t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){let e=t.child;for(;e&&!(e.stateNode instanceof Ye);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function at(e){let t=e;if("string"==typeof e){const n=M(t=>!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e);if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){const e=ot(t);return e?e.nodeId:0}return t.nodeId}function lt(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=ot(e);t&&({nodeId:i,nativeName:r}=t)}if(!r)throw new Error("callUIFunction is calling a unnamed component");if(!i)throw new Error("callUIFunction is calling a component have no nodeId");let[o=[],a]=n;X(o)&&(a=o,o=[]);null!==H()&&("ios"===I.platform.OS?(X(a)&&Array.isArray(o)&&o.push(a),N.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===I.platform.OS&&(X(a)?N.callNative("UIManagerModule","callUIFunction",[i,t,o],a):N.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function st(e,t,n){const r=at(t);return new Promise((t,i)=>r?N.callNative("UIManagerModule",e,r,e=>(n&&X(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&X(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var ut=Object.freeze({__proto__:null,createNode:Xe,updateNode:Je,deleteNode:Ze,flushBatch:et,startBatch:tt,endBatch:nt,sendRenderError:rt,getNodeById:it,getNodeIdByRef:at,getElementFromFiberRef:ot,callUIFunction:lt,measureInWindow:function(e,t){return st("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===I.platform.OS?st("measureInWindow",e,t):st("measureInAppWindow",e,t)}});const ct=new de,ft=new Set,dt={exitApp(){N.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(N.callNative("DeviceEventModule","setListenBackPress",!0),ft.add(e),{remove(){dt.removeListener(e)}}),removeListener(e){ft.delete(e),0===ft.size&&N.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){ct.addListener("hardwareBackPress",()=>{let e=!0;[...ft].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&dt.exitApp()})}},pt=(dt.initEventListener(),dt),{addEventListener:ht,removeEventListener:mt,dispatchEvent:gt,AsyncStorage:yt,Bridge:bt,Device:vt,HippyRegister:wt}=O;var kt=Object.freeze({__proto__:null,addEventListener:ht,removeEventListener:mt,dispatchEvent:gt,AsyncStorage:yt,BackAndroid:pt,Bridge:bt,Clipboard:pe,Cookie:he,Device:vt,HippyRegister:wt,ImageLoader:ye,NetworkInfo:Se,UIManager:ut});function St(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const Et={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},xt="[-+]?\\d*\\.?\\d+",Ct={rgb:new RegExp("rgb"+St(xt,xt,xt)),rgba:new RegExp("rgba"+St(xt,xt,xt,xt)),hsl:new RegExp("hsl"+St(xt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+St(xt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",xt)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function Nt(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function It(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Pt(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function _t(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Pt(i,r,e+1/3),a=Pt(i,r,e),l=Pt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Rt(e){return(parseFloat(e)%360+360)%360/360}function At(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Lt(e,t={}){if(Number.isInteger(e))return e;let n=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ct.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(Et,e)?Et[e]:(t=Ct.rgb.exec(e),Array.isArray(t)?(Nt(t[1])<<24|Nt(t[2])<<16|Nt(t[3])<<8|255)>>>0:(t=Ct.rgba.exec(e),t?(Nt(t[1])<<24|Nt(t[2])<<16|Nt(t[3])<<8|It(t[4]))>>>0:(t=Ct.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ct.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=Ct.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ct.hsl.exec(e),t?(255|_t(Rt(t[1]),At(t[2]),At(t[3])))>>>0:(t=Ct.hsla.exec(e),t?(_t(Rt(t[1]),At(t[2]),At(t[3]))|It(t[4]))>>>0:null))))))))}(e);return t.platform||(t.platform="android"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function Ot(e,t){return Array.isArray(e)?e.map(e=>Lt(e,t)):[0]}class zt extends We{constructor(){super(),this.documentElement=new Ye("document")}createElement(e){return new Ye(e)}createElementNS(e,t){return new Ye(`${e}:${t}`)}}zt.createElement=zt.prototype.createElement,zt.createElementNS=zt.prototype.createElementNS;var Tt=Array.isArray,jt=Object.keys,Ft=Object.prototype.hasOwnProperty,Ht=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=Tt(t),l=Tt(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=jt(t);if((i=d.length)!==jt(n).length)return!1;for(r=i;0!=r--;)if(!Ft.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=d[r]],n[o]))return!1;return!0}return t!=t&&n!=n};const Mt=setTimeout,Dt=clearTimeout;var Ut=Object.freeze({__proto__:null,scheduleTimeout:Mt,cancelTimeout:Dt,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){D(o,e.nodeId);const a=Object.keys(t);0!==a.length&&a.forEach(n=>e.setAttribute(n,t[n]))},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),D(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",K(e)),i.meta={component:{name:"Text"}},D(r,i.nodeId),i},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};let o=!1;Object.keys(r).forEach(e=>{const t=n[e],a=r[e];switch(e){case"children":t===a||"number"!=typeof a&&"string"!=typeof a||(i[e]=a);break;default:"function"!=typeof t||"function"!=typeof a||Ht(t,a)?Ht(t,a)||(i[e]=a):o=!0}});const a=0===Object.keys(i).length;return a&&o?{}:a?null:i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),V(t)},removeChildFromContainer:function(e,t){e.removeChild(t),V(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=k(k({},t),{},{style:k(k({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){const{children:e}=t;return"string"==typeof e||"number"==typeof e}return!1}});const Wt=a()(k(k({},Ut),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{createContainer:Bt,updateContainer:Vt,getPublicRootInstance:$t}=Wt;class qt{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new zt;this.rootContainer=Bt(t,!1,!1)}static get Native(){return kt}start(){wt.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:o=!1,callback:a=(()=>{})}=this.config,{__instanceId__:l}=e;this.rootContainer.containerInfo.nodeId=l,r&&J(r),o&&function(e=!1){Q=e}(o),F(l,this.rootContainer);const s=i.a.createElement(n,e);return Vt(s,this.rootContainer,null,a),$t(this.rootContainer)}}qt.version="2.11.4";const Qt={registerComponent(e,t){new qt({appName:e,entryPage:t}).start()}};class Kt extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=E(e,s),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function Gt(e,t){let{style:n}=e,r=E(e,u);const o=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(o[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=K(r.children);else if("number"==typeof r.children)r.text=K(r.children.toString());else if(Array.isArray(r.children)){const e=r.children.filter(e=>"string"==typeof e||"number"==typeof e).join("");e&&(r.text=K(e),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}Gt.displayName="Text";const Yt=i.a.forwardRef(Gt);Yt.displayName="Text";class Xt extends i.a.Component{static get resizeMode(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}static getSize(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");const r=me(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}getImageUrls({src:e,srcs:t,source:n,sources:r}){let i=[];if("string"==typeof e&&i.push(e),Array.isArray(t)&&(i=[...i,...t]),n)if("string"==typeof n)i.push(n);else if("object"==typeof n&&null!==n){const{uri:e}=n;e&&i.push(e)}return r&&Array.isArray(r)&&r.forEach(e=>{"string"==typeof e?i.push(e):"object"==typeof e&&null!==e&&e.uri&&i.push(e.uri)}),i.length&&(i=i.map(e=>ee(e))),i}handleTintColor(e,t,n){t&&(e.tintColor=Lt(t)),Array.isArray(n)&&(e.tintColors=Ot(n))}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:a,sources:l,src:s,srcs:u,tintColor:f,tintColors:d}=e,p=E(e,c),h=this.getImageUrls({src:s,srcs:u,source:a,sources:l});"ios"===vt.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===vt.platform.OS&&(1===h.length?[p.src]=h:h.length>1&&(p.srcs=h)),"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ee(p.defaultSource));const m=k({},n);return this.handleTintColor(m,f,d),p.style=m,t?i.a.createElement(Kt,{style:n},i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:o,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:o}))}}Xt.prefetch=ge;class Jt{constructor(){this.Value=Jt.Value}static Value(e){return e}static timing(e,t){return new Ne({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}Jt.View=Kt,Jt.Text=Yt,Jt.Image=Xt;const Zt={step0:e=>e>0?1:0,step1:e=>e>=1?1:0,linear:()=>"linear",ease:()=>"ease",quad:e=>e**2,cubic:e=>e**3,poly:e=>t=>t**e,sin:e=>1-Math.cos(e*Math.PI/2),circle:e=>1-Math.sqrt(1-e*e),exp:e=>2**(10*(e-1)),elastic:()=>"elastic",back:(e=1.70158)=>t=>t*t*((e+1)*t-e),bounce(e){let t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?(t-=1.5/2.75,7.5625*t*t+.75):t<2.5/2.75?(t-=2.25/2.75,7.5625*t*t+.9375):(t-=2.625/2.75,7.5625*t*t+.984375)},bezier:()=>"bezier",in:()=>"ease-in",out:()=>"ease-out",inOut:()=>"ease-in-out"};function en(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}class tn extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){lt(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===vt.platform.OS?lt(this.instance,"collapsePullHeader",[e]):void 0!==e?lt(this.instance,"collapsePullHeaderWithOptions",[e]):lt(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=E(e,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class nn extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){lt(this.instance,"expandPullFooter",[])}collapsePullFooter(){lt(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=E(e,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}nn.defaultProps={sticky:!0};const rn={onDisappear:"onDisAppear"},on={onDisappear:"onDisappear"};class an extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this),this.state={initialListReady:!1}}componentDidMount(){const{getRowKey:e}=this.props}convertName(e){return"android"===vt.platform.OS&&rn[e]?rn[e]:"ios"===vt.platform.OS&&on[e]?on[e]:e}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&<(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&<(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(tn,{key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(nn,{key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleRowProps(e,t,{getRowKey:n,getRowStyle:r,onRowLayout:i,getRowType:o,rowShouldSticky:a}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i(e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}"function"==typeof a&&(e.sticky=a(t))}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:o,renderPullFooter:a,getRowType:l,getRowStyle:s,getRowKey:u,dataSource:c,initialListSize:f,rowShouldSticky:d,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:g,onFooterPulling:y,onFooterReleased:b,onAppear:v,onDisappear:w,onWillAppear:S,onWillDisappear:x}=e,C=E(e,p),N=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const p=this.getPullHeader(o,m,g),E=this.getPullFooter(a,y,b);!t&&c&&(t=c.length),e||(t=Math.min(t,f||10));for(let e=0;e{"function"==typeof n&&(t[this.convertName(r)]=()=>{n(e)})}),n&&N.push(i.a.createElement(en,Object.assign({},t),n))}p&&N.unshift(p),E&&N.push(E),"function"==typeof d&&Object.assign(C,{rowShouldSticky:!0});const I=[v,w,S,x];C.exposureEventEnabled=I.some(e=>"function"==typeof e),C.numberOfRows=N.length,C.initialListSize=f,C.style=k({overflow:"scroll"},n)}return!C.onLoadMore&&C.onEndReached&&(C.onLoadMore=C.onEndReached),i.a.createElement("ul",Object.assign({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},C),N.length?N:t)}}an.defaultProps={numberOfRows:0};class ln extends i.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}startRefresh(){lt(this.instance,"startRefresh",null)}refreshCompleted(){lt(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=E(e,h);return i.a.createElement("div",Object.assign({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}}class sn{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(e&&e.component){if(!this.routeList[e.routeName]){new qt({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),lt(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),lt(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=E(e.initialRoute,g),r=E(e,m);return r.initialRoute=n,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function cn(e){return i.a.createElement("div",Object.assign({nativeName:"ViewPagerItem"},e,{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class fn extends i.a.Component{constructor(e){super(e),this.instance=null,this.setPage=this.setPage.bind(this),this.setPageWithoutAnimation=this.setPageWithoutAnimation.bind(this),this.onPageScrollStateChanged=this.onPageScrollStateChanged.bind(this)}onPageScrollStateChanged(e){const{onPageScrollStateChanged:t}=this.props;t&&t(e.pageScrollState)}setPage(e){"number"==typeof e&<(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&<(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=E(e,y);let o=[];return Array.isArray(t)?o=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),i.a.createElement(cn,Object.assign({},t),e)}):o.push(i.a.createElement(cn,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),o)}}function dn(){const e=I.platform.Localization;return!!e&&1===e.direction}class pn extends i.a.Component{constructor(e){super(e),this.instance=null,this._lastNativeText="",this.onChangeText=this.onChangeText.bind(this),this.onKeyboardWillShow=this.onKeyboardWillShow.bind(this)}componentDidMount(){const{value:e,autoFocus:t}=this.props;this._lastNativeText=e,t&&this.focus()}componentWillUnmount(){this.blur()}getValue(){return new Promise(e=>{lt(this.instance,"getValue",t=>e(t.text))})}setValue(e){return lt(this.instance,"setValue",[e]),e}focus(){lt(this.instance,"focusTextInput",[])}blur(){lt(this.instance,"blurTextInput",[])}showInputMethod(){lt(this.instance,"showInputMethod",[])}hideInputMethod(){lt(this.instance,"hideInputMethod",[])}clear(){lt(this.instance,"clear",[])}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props,n=e;"android"===vt.platform.OS&&(n.keyboardHeight/=vt.screen.scale),"function"==typeof t&&t(n)}render(){const e=k({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors"].forEach(t=>{"string"==typeof this.props[t]&&(Array.isArray(e.style)?e.style.push({[t]:this.props[t]}):e.style&&"object"==typeof e.style?e.style[t]=this.props[t]:e.style={[t]:this.props[t]},e[t]=void 0)}),dn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),i.a.createElement("div",Object.assign({nativeName:"TextInput"},e,{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}}const hn=vt.window.scale;let mn=Math.round(.4*hn)/hn;function gn(e){return e}0===mn&&(mn=1/hn);var yn=Object.freeze({__proto__:null,get hairlineWidth(){return mn},create:gn});const bn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}};class vn extends i.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"number"==typeof e||"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,lt(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){lt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?bn.contentContainerHorizontal:bn.contentContainerVertical,t],a=e?Object.assign({},bn.baseHorizontal,r):Object.assign({},bn.baseVertical,r);return e&&(a.flexDirection=dn()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props,{style:a}),i.a.createElement(Kt,{style:o},n))}}const wn={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}};class kn extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===vt.platform.OS&&(this.eventSubscription=new ce("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===vt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:o}=this.props;if(!1===t)return null;const a={backgroundColor:n?"transparent":"white"};return o||(o="none",r&&(o="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:o,transparent:n,style:wn.modal},this.props),i.a.createElement(Kt,{style:[wn.container,a]},e))}}kn.defaultProps={visible:!0};class Sn extends i.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}render(){const{requestFocus:e,children:t,nextFocusDownId:n,nextFocusUpId:r,nextFocusLeftId:o,nextFocusRightId:a,style:l,noFocusStyle:s,focusStyle:u,onClick:c}=this.props,{isFocus:f}=this.state,d=i.a.Children.only(t);let p;d&&d.child&&d.child.memoizedProps&&d.child.memoizedProps.nativeName?p=d.child.memoizedProps.nativeName:d&&d.type&&d.type.displayName&&(p=d.type.displayName);const h=n&&at(n),m=r&&at(r),g=o&&at(o),y=a&&at(a);let b=l;if("Text"!==p){const e=d.memoizedProps.style;b=k(k({},b),e)}if(Object.assign(b,f?u:s),"Text"===p)return i.a.createElement(Kt,{focusable:!0,nextFocusDownId:h,nextFocusUpId:m,nextFocusLeftId:g,nextFocusRightId:y,requestFocus:e,style:b,onClick:c,onFocus:this.handleFocus},d);const{children:v}=d.memoizedProps;return i.a.cloneElement(d,{nextFocusDownId:n,nextFocusUpId:r,nextFocusLeftId:o,nextFocusRightId:a,requestFocus:e,onClick:c,focusable:!0,children:v,style:b,onFocus:this.handleFocus})}}function En(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}let xn;class Cn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),xn||(xn=new ce("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=k({},n);if(void 0!==t)if(Array.isArray(t)&&t.length>0)r["Sec-WebSocket-Protocol"]=t.join(",");else{if("string"!=typeof t)throw new TypeError("Invalid WebSocket protocols");r["Sec-WebSocket-Protocol"]=t}const i={headers:r,url:e};this.url=e,this.webSocketCallbackId=xn.addCallback(this.onWebSocketEvent),N.callNativeWithPromise("websocket","connect",i).then(e=>{e&&0===e.code&&"number"==typeof e.id&&(this.webSocketId=e.id)})}close(e,t){1===this.readyState&&(this.readyState=2,N.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}send(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: "+typeof e);N.callNative("websocket","send",{id:this.webSocketId,data:e})}}set onopen(e){this.webSocketCallbacks.onOpen=e}set onclose(e){this.webSocketCallbacks.onClose=e}set onerror(e){this.webSocketCallbacks.onError=e}set onmessage(e){this.webSocketCallbacks.onMessage=e}onWebSocketEvent(e){if("object"!=typeof e||e.id!==this.webSocketId)return;const{type:t}=e;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,xn.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}class Nn extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=E(e,b),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function In(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}class Pn extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}componentDidMount(){const{getItemKey:e}=this.props}scrollToIndex({index:e=0,animated:t=!0}){lt(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){lt(this.instance,"scrollToContentOffset",[e,t,n])}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(tn,{key:"PullHeader",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(nn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:o=0,interItemSpacing:a=0,numberOfItems:l=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:f,getItemType:d,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:g,onHeaderPulling:y,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:S,containPullHeader:x=!1,containPullFooter:C=!1,containBannerView:N=!1}=e,I=k(k({},E(e,v)),{},{style:t,numberOfColumns:r,columnSpacing:o,interItemSpacing:a,preloadItemNumber:s,contentInset:m,containPullHeader:x,containPullFooter:C,containBannerView:N}),P=[];if("function"==typeof n){const e=n();e&&(P.push(i.a.createElement(Nn,{key:"bannerView"},i.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,y,b),n=this.getPullFooter(f,w,S);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}}e.WebSocket=Cn;const{AsyncStorage:_n,BackAndroid:Rn,Bridge:An,Clipboard:Ln,Cookie:On,Device:zn,HippyRegister:Tn,ImageLoader:jn,NetworkInfo:Fn,UIManager:Hn}=kt,{callNative:Mn,callNativeWithPromise:Dn,callNativeWithCallbackId:Un,removeNativeCallback:Wn}=An,Bn=null,Vn=e.ConsoleModule||e.console,$n=zn.platform,qn=qt,Qn=qt,Kn=Xt,Gn=Tn,Yn=de,Xn=ce,Jn={get:e=>zn[e]},Zn={get:()=>zn.screen.scale};t.default=qt}.call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/object-assign/index.js":function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus diff --git a/examples/ios-demo/res/index.ios.js b/examples/ios-demo/res/index.ios.js index 42830ce1195..386280a4d76 100644 --- a/examples/ios-demo/res/index.ios.js +++ b/examples/ios-demo/res/index.ios.js @@ -6,4 +6,4 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r=n("./node_modules/@babel/runtime/helpers/typeof.js"),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,h=o?Symbol.for("react.concurrent_mode"):60111,m=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,b=o?Symbol.for("react.lazy"):60116,v=o?Symbol.for("react.block"):60121,w=o?Symbol.for("react.fundamental"):60117,x=o?Symbol.for("react.responder"):60118,S=o?Symbol.for("react.scope"):60119;function T(e){if("object"===r(e)&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case h:case l:case s:case c:case p:return e;default:switch(e=e&&e.$$typeof){case f:case m:case b:case g:case u:return e;default:return t}}case i:return t}}}function C(e){return T(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=u,t.Element=a,t.ForwardRef=m,t.Fragment=l,t.Lazy=b,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=c,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||T(e)===d},t.isConcurrentMode=C,t.isContextConsumer=function(e){return T(e)===f},t.isContextProvider=function(e){return T(e)===u},t.isElement=function(e){return"object"===r(e)&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return T(e)===m},t.isFragment=function(e){return T(e)===l},t.isLazy=function(e){return T(e)===b},t.isMemo=function(e){return T(e)===g},t.isPortal=function(e){return T(e)===i},t.isProfiler=function(e){return T(e)===s},t.isStrictMode=function(e){return T(e)===c},t.isSuspense=function(e){return T(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===h||e===s||e===c||e===p||e===y||"object"===r(e)&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===u||e.$$typeof===f||e.$$typeof===m||e.$$typeof===w||e.$$typeof===x||e.$$typeof===S||e.$$typeof===v)},t.typeOf=T},"./node_modules/react-is/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/react/index.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/react/index.js")},"./node_modules/regenerator-runtime/runtime.js":function(e,t,n){(function(e){var t=n("./node_modules/@babel/runtime/helpers/typeof.js"),r=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f={};function d(){}function h(){}function m(){}var p={};c(p,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(E([])));g&&g!==n&&r.call(g,a)&&(p=g);var b=m.prototype=d.prototype=Object.create(p);function v(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,n){var o;this._invoke=function(a,i){function l(){return new n((function(o,l){!function o(a,i,l,c){var s=u(e[a],e,i);if("throw"!==s.type){var f=s.arg,d=f.value;return d&&"object"===t(d)&&r.call(d,"__await")?n.resolve(d.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):n.resolve(d).then((function(e){f.value=e,l(f)}),(function(e){return o("throw",e,l,c)}))}c(s.arg)}(a,i,o,l)}))}return o=o?o.then(l,l):l()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./node_modules/webpack/buildin/module.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/module.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return ae})),n.d(r,"ListView",(function(){return be})),n.d(r,"Modal",(function(){return Ce})),n.d(r,"RefreshWrapper",(function(){return Qe})),n.d(r,"PullHeader",(function(){return Xe})),n.d(r,"ScrollView",(function(){return $e})),n.d(r,"Text",(function(){return rt})),n.d(r,"TextInput",(function(){return it})),n.d(r,"View",(function(){return st})),n.d(r,"ViewPager",(function(){return wt})),n.d(r,"WebView",(function(){return St})),n.d(r,"BoxShadow",(function(){return Et})),n.d(r,"WaterfallView",(function(){return Vt}));var o={};n.r(o),n.d(o,"Animation",(function(){return Dt})),n.d(o,"AsyncStorage",(function(){return Bt})),n.d(o,"Clipboard",(function(){return Ft})),n.d(o,"NativeEvent",(function(){return Nt})),n.d(o,"NetInfo",(function(){return Ut})),n.d(o,"TestModule",(function(){return Jt})),n.d(o,"WebSocket",(function(){return nn})),n.d(o,"UIManagerModule",(function(){return cn}));var a={};n.r(a),n.d(a,"MyView",(function(){return dn})),n.d(a,"Slider",(function(){return vn})),n.d(a,"TabHost",(function(){return Sn})),n.d(a,"SetNativeProps",(function(){return kn})),n.d(a,"DynamicImport",(function(){return Vn})),n.d(a,"Localization",(function(){return On})),n.d(a,"Turbo",(function(){return Ln}));var i=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),c=n.n(l),s=n("./node_modules/@babel/runtime/helpers/createClass.js"),u=n.n(s),f=n("./node_modules/@babel/runtime/helpers/inherits.js"),d=n.n(f),h=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(h),p=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),y=n.n(p),g=n("./node_modules/react/index.js"),b=n.n(g),v=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),w=n.n(v),x=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/prop-types/index.js"),n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign||function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?C(o,u):".."===f?(C(o,u),s++):s&&(C(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&T(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var k="Invariant failed";function R(e,t){if(!e)throw new Error(k)}function A(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=E(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),y.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(y.entries[y.index]=r,u({action:"REPLACE",location:r}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(e){var t=y.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),z=function(e){var t=Object(P.a)();return t.displayName=e,t}("Router"),F=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(x.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return b.a.createElement(z.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(b.a.Component);var W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(he)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{onTouchDown:function(e){console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:function(e){console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:function(e){return console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!1},bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:function(e){return 2===e},onAppear:function(t){return e.onAppear(t)},onDisappear:function(t){return e.onDisappear(t)},onWillAppear:function(t){return e.onWillAppear(t)},onWillDisappear:function(t){return e.onWillDisappear(t)}})}}]),r}(b.a.Component);function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var we="#4c9afa",xe="#f44837",Se="#fff",Te=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:we,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:we,textAlign:"center",textAlignVertical:"center"}}),Ce=function(e){d()(n,e);var t=ve(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={visible:!1,press:!1},r.show=r.show.bind(se()(r)),r.hide=r.hide.bind(se()(r)),r}return u()(n,[{key:"feedback",value:function(e){this.setState({press:"in"===e})}},{key:"show",value:function(){this.setState({visible:!0})}},{key:"hide",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.press,r=t.visible;return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Te.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback.bind("out")},onClick:this.show,style:[Te.buttonView,{borderColor:we,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Te.buttonText,{color:we}]},"点击弹出浮层"))),b.a.createElement(i.Modal,{transparent:!0,animationType:"slide_fade",visible:r,onRequestClose:function(){},supportedOrientations:["portrait"]},b.a.createElement(i.View,{style:{flex:1,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:xe,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:Se,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),Ee="http://res.imtt.qq.com/tps/expo-listview-1.jpg",ke={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[Ee,Ee,Ee],subInfo:["三图评论","11评"]}},Re={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},Ae={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}},Ve=[Ae,ke,Re,ke,Re,ke,Re,Ae,ke],Ie=n("./node_modules/@babel/runtime/helpers/extends.js"),je=n.n(Ie),Oe={getScreenWidth:function(){var e=i.Dimensions.get("screen").width,t=i.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&i.PixelRatio.get()>=2&&(e=!0),e}},Pe=(Oe.getScreenWidth()-24-12)/3,De=Math.floor(Pe/1.35),_e=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:De,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:Pe,height:De},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Le(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=Oe.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:_e.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,je()({},e,{style:{collapsable:!1}}),b.a.createElement(i.Text,{style:[_e.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:_e.imageContainer},b.a.createElement(i.Image,{style:_e.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[_e.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:_e.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:_e.tagLine},a):null)}var Be=Oe.getScreenWidth()-24,Me=Math.floor(Be-12)/3,ze=Math.floor(Me/1.35),Fe=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:ze},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:Me,height:ze},image:{width:Me,height:ze},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function We(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=null,r=t.title,o=t.picUrl,a=t.subInfo;if(a&&a.length){var l=(a=Oe.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:Fe.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,je()({},e,{style:Fe.container}),b.a.createElement(i.View,{style:Fe.leftContainer},b.a.createElement(i.Text,{style:Fe.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:Fe.tagLine},n):null),b.a.createElement(i.View,{style:Fe.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:Fe.image,source:{uri:o}})))}var He=Oe.getScreenWidth()-24,Ne=Math.floor(188*He/336),Ke=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:He,height:Ne,alignSelf:"center"},image:{width:He,height:Ne},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function qe(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var l=(o=Oe.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Ke.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:Ke.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Ke.playerView},b.a.createElement(i.Image,{style:Ke.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Ke.tagLine},a):null)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ge=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Qe=function(e){d()(o,e);var t,n,r=Ue(o);function o(e){var t;return c()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.onRefresh=t.onRefresh.bind(se()(t)),t.getRefresh=t.getRefresh.bind(se()(t)),t.getRenderRow=t.getRenderRow.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.getRowType=t.getRowType.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onEndReached",value:(t=le()(fe.a.mark((function e(){var t,n,r,o,a;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.dataSource,!t.fetchingDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.setState({fetchingDataFlag:!0,dataSource:n.concat([{style:100}])}),e.next=6,this.mockFetchData();case 6:r=e.sent,(o=n[n.length-1])&&100===o.style&&n.pop(),a=n.concat(r),this.setState({dataSource:a});case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"onRefresh",value:function(){var e=this;setTimeout(le()(fe.a.mark((function t(){var n;return fe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.mockFetchData();case 2:n=t.sent,e.setState({dataSource:n}),e.refresh.refreshComplected();case 5:case"end":return t.stop()}}),t)}))),1e3)}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Le,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(We,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(qe,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ge.loading},o)}return b.a.createElement(i.View,{style:Ge.container},b.a.createElement(i.View,{style:Ge.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ge.spliter}))}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:30}},b.a.createElement(i.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){return e.setState({fetchingDataFlag:!1}),e.fetchTimes+=1,e.fetchTimes>=50?t([]):t(Ve)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(b.a.Component);function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Je=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}}),Xe=function(e){d()(a,e);var t,n,r,o=Ye(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.renderRow=t.renderRow.bind(se()(t)),t.getRowType=t.getRowType.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t.renderPullHeader=t.renderPullHeader.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(se()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(se()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t}),this.listView.collapsePullHeader();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=le()(fe.a.mark((function e(){var t,n,r,o;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({dataSource:t.concat([{style:100}])}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:(r=t[t.length-1])&&100===r.style&&t.pop(),o=t.concat(n),this.loadMoreDataFlag=!1,this.setState({dataSource:o});case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=le()(fe.a.mark((function e(){var t,n=this;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.fetchingDataFlag){e.next=2;break}return e.abrupt("return");case 2:return this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:this.fetchingDataFlag=!1,this.setState({dataSource:t},(function(){n.listView.collapsePullHeader(),n.fetchTimes=0}));case 16:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Je.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){e.fetchTimes+=1;var n=[];return e.fetchTimes<50&&(n=Ve),t(n)}),600)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Je.pullContainer},b.a.createElement(i.Text,{style:Je.pullContent},e))}},{key:"renderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Le,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:a=b.a.createElement(We,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:a=b.a.createElement(qe,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 100:a=b.a.createElement(i.Text,{style:Je.loading},o)}return b.a.createElement(i.View,{style:Je.container},b.a.createElement(i.View,{style:Je.itemContainer},a),c?null:b.a.createElement(i.View,{style:Je.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}]),a}(b.a.Component),Ze=i.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function $e(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ze.itemTitle},b.a.createElement(i.Text,null,"Horizontal ScrollView")),b.a.createElement(i.View,null,b.a.createElement(i.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,bounces:!0},b.a.createElement(i.Text,{style:Ze.itemStyle},"A"),b.a.createElement(i.Text,{style:Ze.itemStyle},"B"),b.a.createElement(i.Text,{style:Ze.itemStyle},"C"),b.a.createElement(i.Text,{style:Ze.itemStyle},"D"),b.a.createElement(i.Text,{style:Ze.itemStyle},"E"),b.a.createElement(i.Text,{style:Ze.itemStyle},"F"),b.a.createElement(i.Text,{style:Ze.itemStyle},"A"))),b.a.createElement(i.View,{style:Ze.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:Ze.verticalScrollView,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:Ze.itemStyle},"A"),b.a.createElement(i.Text,{style:Ze.itemStyle},"B"),b.a.createElement(i.Text,{style:Ze.itemStyle},"C"),b.a.createElement(i.Text,{style:Ze.itemStyle},"D"),b.a.createElement(i.Text,{style:Ze.itemStyle},"E"),b.a.createElement(i.Text,{style:Ze.itemStyle},"F"),b.a.createElement(i.Text,{style:Ze.itemStyle},"A")))}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var tt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),nt=0,rt=function(e){d()(n,e);var t=et(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},r.incrementFontSize=r.incrementFontSize.bind(se()(r)),r.decrementFontSize=r.decrementFontSize.bind(se()(r)),r.androidNestedTextWrapperStyle={height:100,lineHeight:100},r}return u()(n,[{key:"incrementFontSize",value:function(){var e=this.state.fontSize;24!==e&&this.setState({fontSize:e+1})}},{key:"decrementFontSize",value:function(){var e=this.state.fontSize;6!==e&&this.setState({fontSize:e-1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=function(e){return b.a.createElement(i.View,{style:tt.itemTitle},b.a.createElement(i.Text,{style:!0},e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},a("shadow"),b.a.createElement(i.View,{style:[tt.itemContent],onClick:function(){var t="red",n={x:10,y:1};nt%2==1&&(t="grey",n={x:1,y:1}),nt+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},b.a.createElement(i.Text,{style:[tt.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),b.a.createElement(i.View,{style:[tt.itemContent]},b.a.createElement(i.Text,{style:[tt.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[tt.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[tt.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:[tt.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),b.a.createElement(i.View,{style:tt.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:tt.buttonText},"放大字体")),b.a.createElement(i.View,{style:tt.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:tt.buttonText},"缩小字体"))),a("fontStyle"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:[tt.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[tt.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:tt.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),b.a.createElement(i.Text,{numberOfLines:2,style:tt.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),a("textDecoration"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:[tt.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),b.a.createElement(i.Text,{numberOfLines:1,style:[tt.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),a("Nest Text"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[tt.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:tt.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),a("Custom font"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:tt.customFont},"Hippy 跨端框架")),a("Text Nested"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:tt.normalText},"后面有张图片"),b.a.createElement(i.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),b.a.createElement(i.Text,{numberOfLines:1,style:tt.customFont},"前面有张图片"))))}}]),n}(b.a.Component);function ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var at=i.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,placeholderTextColor:"#aaaaaa",fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}}),it=function(e){d()(n,e);var t=ot(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(se()(r)),r.focus=r.focus.bind(se()(r)),r.blur=r.blur.bind(se()(r)),r}return u()(n,[{key:"changeInputContent",value:function(){this.setState({textContent:"当前时间毫秒:".concat(Date.now())})}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=this.state.textContent,n=function(e){return b.a.createElement(i.View,{style:at.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:at.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:at.input_style,placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:at.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:at.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:at.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),n("maxLength"),b.a.createElement(i.TextInput,{style:at.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),lt=n.p+"assets/defaultSource.jpg",ct=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function st(){var e=function(e){return b.a.createElement(i.View,{style:ct.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},e("backgroundColor"),b.a.createElement(i.View,{style:[ct.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[ct.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:lt}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},b.a.createElement(i.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),b.a.createElement(i.View,{style:[ct.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},b.a.createElement(i.Text,{style:{color:"white"}},"渐变色")),e("border props"),b.a.createElement(i.View,{style:[ct.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[ct.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"green"}]})))}var ut=i.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),ft="SquarePagerView",dt="TrianglePagerView",ht="CirclePagerView";function mt(e,t){var n=function(t){return b.a.createElement(i.View,{style:ut.pageContainer,key:t},b.a.createElement(i.View,{style:[ut.shapeBase,e],key:"shape"}),b.a.createElement(i.View,{style:ut.mainRec,key:"title"},t?b.a.createElement(i.Text,{style:ut.title},t):null))};return n.displayName=t,n}var pt=mt(ut.square,ft),yt=mt(ut.triangle,dt),gt=mt(ut.circle,ht);function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var vt=i.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}}),wt=function(e){d()(n,e);var t=bt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),$()(se()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(se()(r)),r}return u()(n,[{key:"onPageSelected",value:function(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}},{key:"onPageScrollStateChanged",value:function(e){console.log("onPageScrollStateChanged===",e)}},{key:"onPageScroll",value:function(e){var t=e.offset,n=e.position;console.log("onPageScroll",t,n)}},{key:"render",value:function(){var e=this,t=this.state.selectedIndex;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},b.a.createElement(i.View,{style:vt.buttonContainer},b.a.createElement(i.View,{style:vt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:vt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:vt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:vt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:vt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[pt("squarePager"),yt("TrianglePager"),gt("CirclePager")]),b.a.createElement(i.View,{style:vt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[vt.dot,r?vt.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(b.a.Component),xt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{width:300,height:300,borderRadius:10}});function St(){return b.a.createElement(i.View,{style:{padding:10}},b.a.createElement(i.View,{style:xt.itemTitle},b.a.createElement(i.Text,null,"WebView 示例")),b.a.createElement(i.WebView,{source:{uri:"https://www.qq.com"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:xt.webViewStyle,onLoad:function(e){var t=e.url;return console.log("webview onload",t)},onLoadStart:function(e){var t=e.url;return console.log("webview onLoadStart",t)},onLoadEnd:function(e){var t=e.url;return console.log("webview onLoadEnd",t)}}))}var Tt=i.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Ct=i.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function Et(){return b.a.createElement(i.View,{style:Tt.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:Tt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Tt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Tt.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:Tt.shadowDemoCubeIos},b.a.createElement(i.View,{style:Tt.shadowDemoContentIos},b.a.createElement(i.Text,{style:Tt.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:Ct.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Ct.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:Ct.shadowDemoCubeIos},b.a.createElement(i.View,{style:Ct.shadowDemoContentIos},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))))}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Rt=Ve.filter((function(e){return 2!==e.style})),At=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),Vt=function(e){d()(a,e);var t,n,r,o=kt(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.numberOfColumns=2,t.columnSpacing=6,t.interItemSpacing=6,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.renderItem=t.renderItem.bind(se()(t)),t.getItemType=t.getItemType.bind(se()(t)),t.getItemKey=t.getItemKey.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.onRefresh=t.onRefresh.bind(se()(t)),t.getRefresh=t.getRefresh.bind(se()(t)),t.renderPullFooter=t.renderPullFooter.bind(se()(t)),t.renderBanner=t.renderBanner.bind(se()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=le()(fe.a.mark((function e(){var t,n,r;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:0===n.length&&this.setState({loadingState:"没有更多数据"}),r=[].concat(w()(t),w()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1;case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"renderPullFooter",value:function(){return 0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:At.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=le()(fe.a.mark((function e(){var t=this;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(le()(fe.a.mark((function e(){var n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.mockFetchData();case 2:n=e.sent,t.setState({dataSource:n}),t.refresh.refreshComplected();case 5:case"end":return e.stop()}}),e)}))),1e3);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getItemType",value:function(e){return this.state.dataSource[e].style}},{key:"getItemKey",value:function(e){return"row-".concat(e)}},{key:"onItemClick",value:function(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}},{key:"renderBanner",value:function(){return"android"===i.Platform.OS||0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},b.a.createElement(i.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}},{key:"renderItem",value:function(e){var t=this,n=null,r=this.state.dataSource[e];switch(r.style){case 1:n=b.a.createElement(Le,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(We,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(qe,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:At.container},b.a.createElement(i.View,{style:At.itemContainer},n),b.a.createElement(i.View,{style:At.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(w()(Rt),w()(Rt));return e(t)}),600)}))}},{key:"getWaterfallContentInset",value:function(){return{top:0,left:5,bottom:0,right:5}}},{key:"getItemStyle",value:function(){var e=this.numberOfColumns,t=this.columnSpacing,n=i.Dimensions.get("screen").width,r=this.getWaterfallContentInset();return{width:(n-r.left-r.right-(e-1)*t)/e}}},{key:"render",value:function(){var e=this,t=this.state.dataSource,n=this.numberOfColumns,r=this.columnSpacing,o=this.interItemSpacing,a=this.getWaterfallContentInset();return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:function(){return e.getItemStyle()},containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(b.a.Component);function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var jt="#4c9afa",Ot="#f44837",Pt=i.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:Ot},showArea:{height:150,marginVertical:10},button:{borderColor:jt,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:jt,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}}),Dt=function(e){d()(n,e);var t=It(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={},r}return u()(n,[{key:"componentWillMount",value:function(){this.horizonAnimation=new i.Animation({startValue:150,toValue:20,duration:1e3,delay:500,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.verticalAnimation=new i.Animation({startValue:80,toValue:40,duration:1e3,delay:0,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.scaleAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:1,toValue:1.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:1.2,toValue:.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.bgColorAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:"red",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:"yellow",toValue:"blue",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.txtColorAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:"white",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:"yellow",toValue:"white",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.cubicBezierScaleAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:0,toValue:1,duration:1e3,delay:0,mode:"timing",timingFunction:"cubic-bezier(.45,2.84,.38,.5)"}),follow:!1},{animation:new i.Animation({startValue:1,toValue:0,duration:1e3,mode:"timing",timingFunction:"cubic-bezier(.17,1.45,.78,.14)"}),follow:!0}],repeatCount:"loop"})}},{key:"componentDidMount",value:function(){"web"===i.Platform.OS&&(this.verticalAnimation.setRef(this.verticalRef),this.horizonAnimation.setRef(this.horizonRef),this.scaleAnimationSet.setRef(this.scaleRef),this.bgColorAnimationSet.setRef(this.bgColorRef),this.txtColorAnimationSet.setRef(this.textColorRef),this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef)),this.horizonAnimation.onHippyAnimationStart((function(){console.log("on animation start!!!")})),this.horizonAnimation.onHippyAnimationEnd((function(){console.log("on animation end!!!")})),this.horizonAnimation.onHippyAnimationCancel((function(){console.log("on animation cancel!!!")})),this.horizonAnimation.onHippyAnimationRepeat((function(){console.log("on animation end!!!")}))}},{key:"componentWillUnmount",value:function(){this.scaleAnimationSet&&this.scaleAnimationSet.destroy(),this.horizonAnimation&&this.horizonAnimation.destroy(),this.verticalAnimation&&this.verticalAnimation.destroy(),this.cubicBezierScaleAnimationSet&&this.cubicBezierScaleAnimationSet.destroy()}},{key:"render",value:function(){var e=this;return b.a.createElement(i.ScrollView,{style:Pt.container},b.a.createElement(i.Text,{style:Pt.title},"水平位移动画"),b.a.createElement(i.View,{style:Pt.buttonContainer},b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.horizonAnimation.start()}},b.a.createElement(i.Text,{style:Pt.buttonText},"开始")),b.a.createElement(i.View,{style:[Pt.button],onClick:function(){e.horizonAnimation.pause()}},b.a.createElement(i.Text,{style:Pt.buttonText},"暂停")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.horizonAnimation.resume()}},b.a.createElement(i.Text,{style:Pt.buttonText},"继续")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},b.a.createElement(i.Text,{style:Pt.buttonText},"更新"))),b.a.createElement(i.View,{style:Pt.showArea},b.a.createElement(i.View,{ref:function(t){e.horizonRef=t},style:[Pt.square,{transform:[{translateX:this.horizonAnimation}]}]})),b.a.createElement(i.Text,{style:Pt.title},"高度形变动画"),b.a.createElement(i.View,{style:Pt.buttonContainer},b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.verticalAnimation.start()}},b.a.createElement(i.Text,{style:Pt.buttonText},"开始")),b.a.createElement(i.View,{style:[Pt.button],onClick:function(){e.verticalAnimation.pause()}},b.a.createElement(i.Text,{style:Pt.buttonText},"暂停")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.verticalAnimation.resume()}},b.a.createElement(i.Text,{style:Pt.buttonText},"继续"))),b.a.createElement(i.View,{style:Pt.showArea},b.a.createElement(i.View,{ref:function(t){e.verticalRef=t},style:[Pt.square,{height:this.verticalAnimation}]})),b.a.createElement(i.Text,{style:Pt.title},"组合形变动画"),b.a.createElement(i.View,{style:Pt.buttonContainer},b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.scaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Pt.buttonText},"开始")),b.a.createElement(i.View,{style:[Pt.button],onClick:function(){e.scaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Pt.buttonText},"暂停")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.scaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Pt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Pt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.scaleRef=t},style:[Pt.square,{transform:[{scale:this.scaleAnimationSet}]}]})),b.a.createElement(i.Text,{style:Pt.title},"颜色渐变动画(文字渐变仅Android支持)"),b.a.createElement(i.View,{style:Pt.buttonContainer},b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.bgColorAnimationSet.start(),e.txtColorAnimationSet.start()}},b.a.createElement(i.Text,{style:Pt.buttonText},"开始")),b.a.createElement(i.View,{style:[Pt.button],onClick:function(){e.bgColorAnimationSet.pause(),e.txtColorAnimationSet.pause()}},b.a.createElement(i.Text,{style:Pt.buttonText},"暂停")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.bgColorAnimationSet.resume(),e.txtColorAnimationSet.resume()}},b.a.createElement(i.Text,{style:Pt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Pt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.bgColorRef=t},style:[Pt.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},b.a.createElement(i.Text,{ref:function(t){e.textColorRef=t},style:[Pt.colorText,{color:"android"===i.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),b.a.createElement(i.Text,{style:Pt.title},"贝塞尔曲线动画"),b.a.createElement(i.View,{style:Pt.buttonContainer},b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.cubicBezierScaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Pt.buttonText},"开始")),b.a.createElement(i.View,{style:[Pt.button],onClick:function(){e.cubicBezierScaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Pt.buttonText},"暂停")),b.a.createElement(i.View,{style:Pt.button,onClick:function(){e.cubicBezierScaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Pt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Pt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.cubicBezierScaleRef=t},style:[Pt.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}]),n}(b.a.Component);function _t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Lt=i.StyleSheet.create({containerStyle:{margin:20,alignItems:"center",flexDirection:"column"},itemGroupStyle:{flexDirection:"row",marginTop:10,borderColor:"#4c9afa",borderWidth:1,width:100,height:40,justifyContent:"center",alignItems:"center"},viewGroupStyle:{flexDirection:"row",marginTop:10},infoStyle:{width:60,height:40,fontSize:16,color:"#4c9afa",textAlign:"center"},inputStyle:{width:200,height:40,placeholderTextColor:"#aaaaaa",underlineColorAndroid:"#4c9afa",fontSize:16,color:"#242424",textAlign:"left"},buttonStyle:{textAlign:"center",fontSize:16,color:"#4c9afa",backgroundColor:"#4c9afa11",marginLeft:10,marginRight:10}}),Bt=function(e){d()(n,e);var t=_t(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={result:""},r.onTextChangeKey=r.onTextChangeKey.bind(se()(r)),r.onTextChangeValue=r.onTextChangeValue.bind(se()(r)),r.onClickSet=r.onClickSet.bind(se()(r)),r.onTextChangeKey=r.onTextChangeKey.bind(se()(r)),r.onClickGet=r.onClickGet.bind(se()(r)),r}return u()(n,[{key:"onClickSet",value:function(){var e=this.state,t=e.key,n=e.value;t&&i.AsyncStorage.setItem(t,n)}},{key:"onClickGet",value:function(){var e=this,t=this.state.key;t&&i.AsyncStorage.getItem(t).then((function(t){e.setState({result:t})}))}},{key:"onTextChangeKey",value:function(e){this.setState({key:e})}},{key:"onTextChangeValue",value:function(e){this.setState({value:e})}},{key:"render",value:function(){var e=this.state.result;return b.a.createElement(i.ScrollView,{style:Lt.containerStyle},b.a.createElement(i.View,{style:Lt.viewGroupStyle},b.a.createElement(i.Text,{style:Lt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:Lt.viewGroupStyle},b.a.createElement(i.Text,{style:Lt.infoStyle},"Value:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeValue})),b.a.createElement(i.View,{style:Lt.itemGroupStyle,onClick:this.onClickSet},b.a.createElement(i.Text,{style:Lt.buttonStyle},"Set")),b.a.createElement(i.View,{style:[Lt.viewGroupStyle,{marginTop:60}]},b.a.createElement(i.Text,{style:Lt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:[Lt.viewGroupStyle,{display:"none"}]},b.a.createElement(i.Text,{style:Lt.infoStyle},"Value:"),b.a.createElement(i.Text,{style:[Lt.infoStyle,{width:200}]},e)),b.a.createElement(i.View,{style:Lt.itemGroupStyle,onClick:this.onClickGet},b.a.createElement(i.Text,{style:Lt.buttonStyle},"Get")))}}]),n}(b.a.Component);function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var zt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},defaultText:{marginVertical:4,fontSize:18,lineHeight:24,color:"#242424"},copiedText:{color:"#aaa"},button:{backgroundColor:"#4c9afa",borderRadius:4,height:30,marginVertical:4,paddingHorizontal:6,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"white"}}),Ft=function(e){d()(n,e);var t=Mt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={hasCopied:!1,text:"Winter is coming",clipboardText:"快点上面的按钮啊魂淡"},r}return u()(n,[{key:"render",value:function(){var e=this,t=function(e){return b.a.createElement(i.View,{style:zt.itemTitle},b.a.createElement(i.Text,null,e))},n=this.state,r=n.hasCopied,o=n.text,a=n.clipboardText,l=r?" (已复制) ":"";return b.a.createElement(i.ScrollView,{style:{padding:10}},t("文本复制到剪贴板"),b.a.createElement(i.Text,{style:zt.defaultText},o),b.a.createElement(i.View,{style:zt.button,onClick:function(){i.Clipboard.setString(o),e.setState({hasCopied:!0})}},b.a.createElement(i.Text,{style:zt.buttonText},"点击复制以上文案".concat(l))),t("获取剪贴板内容"),b.a.createElement(i.View,{style:zt.button,onClick:le()(fe.a.mark((function t(){var n;return fe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.Clipboard.getString();case 3:n=t.sent,e.setState({clipboardText:n}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))},b.a.createElement(i.Text,{style:zt.buttonText},"点击获取剪贴板内容")),b.a.createElement(i.Text,{style:[zt.defaultText,zt.copiedText]},a))}}]),n}(b.a.Component);function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ht=i.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:80,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"}}),Nt=function(e){d()(n,e);var t=Wt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={infoText:"",infoText2:""},r}return u()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.infoText,r=t.infoText2;return b.a.createElement(i.ScrollView,{style:Ht.container},b.a.createElement(i.View,{style:Ht.itemTitle,onPress:function(){var t=new i.HippyEventEmitter;e.call=t.addListener("NORMAL_EVENT",(function(t){e.setState({infoText:JSON.stringify(t)})})),Object(i.callNative)("MyEvent","btnClicked")}},b.a.createElement(i.Text,null,"客户端向前端单向通信"),b.a.createElement(i.Text,null,"点此终端会发送NORMAL_EVENT事件"),b.a.createElement(i.Text,null,"事件接收结果:".concat(n))),b.a.createElement(i.View,{style:Ht.itemTitle,onPress:function(){var t=new i.HippyEventEmitter;e.call=t.addListener("COUNT_DOWN",(function(t){e.setState({infoText2:JSON.stringify(t)})})),Object(i.callNative)("MyEvent","addListener","COUNT_DOWN")}},b.a.createElement(i.Text,null,"客户端向前端单向通信的进阶用法"),b.a.createElement(i.Text,null,"点此终端会发送COUNT_DOWN事件"),b.a.createElement(i.Text,null,"事件接收结果:".concat(r))))}}]),n}(b.a.Component);function Kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var qt=i.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}}),Ut=function(e){d()(r,e);var t,n=Kt(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={infoText:"正在获取.."},t.listener=null,t}return u()(r,[{key:"componentWillMount",value:(t=le()(fe.a.mark((function e(){var t,n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,i.NetInfo.fetch();case 3:n=e.sent,this.setState({infoText:n}),this.listener=i.NetInfo.addEventListener("change",(function(e){t.setState({infoText:"收到通知: ".concat(e.network_info)})}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"componentDidMount",value:function(){var e=this;this.listener&&i.NetInfo.removeEventListener("change",this.listener),fetch("https://m.baidu.com",{headers:{Refer:"https://now.qq.com",Cookie:["harry=guo5","xxx=5"]}}).then((function(t){return console.log("成功",t),e.setState({infoText:"成功: ".concat(t.body)}),t})).catch((function(t){e.setState({infoText:"收到错误: ".concat(t)}),console.error("收到错误:",t)})),i.NetworkModule.setCookie("http://3gxx.qq.com","name=harryguo;gender=male"),i.NetworkModule.getCookies("http://3gxx.qq.com").then((function(e){console.log("cookie: ".concat(e))}))}},{key:"render",value:function(){var e=this.state.infoText;return b.a.createElement(i.ScrollView,{style:qt.container},b.a.createElement(i.Text,{style:qt.text},e))}}]),r}(b.a.Component),Gt={log:function(e){Object(i.callNative)("TestModule","log",e)},helloNative:function(e){Object(i.callNative)("TestModule","helloNative",e)},helloNativeWithPromise:function(e){return Object(i.callNativeWithPromise)("TestModule","helloNativeWithPromise",e)}};function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Yt,Jt=function(e){d()(n,e);var t=Qt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={hello:"TestModule log"},r}return u()(n,[{key:"componentDidMount",value:function(){var e=this;Gt.log("hello i am from js"),Gt.helloNative({hello:"i am form js"}),Gt.helloNativeWithPromise({hello:"i am form js"}).then((function(t){e.setState({hello:JSON.stringify(t)})}))}},{key:"render",value:function(){var e=this.state.hello;return b.a.createElement(i.Text,{style:{color:"red"}},e)}}]),n}(b.a.Component),Xt=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Zt=n.n(Xt),$t=i.StyleSheet.create({fullScreen:{flex:1},row:{flexDirection:"row"},title:{color:"#ccc"},button:{height:56,backgroundColor:"#4c9afa",borderColor:"#5dabfb",borderStyle:"solid",borderWidth:1,paddingHorizontal:20,fontSize:16,textAlign:"center",lineHeight:56,color:"#fff",margin:10},input:{color:"black",flex:1,height:36,lineHeight:36,fontSize:14,borderBottomColor:"#4c9afa",borderBottomStyle:"solid",borderBottomWidth:1,padding:0},output:{color:"black"}}),en="wss://echo.websocket.org",tn="Rock it with Hippy WebSocket";var nn=function(){var e=Object(g.useRef)(null),t=Object(g.useRef)(null),n=Object(g.useState)([]),r=Zt()(n,2),o=r[0],a=r[1],l=function(e){a((function(t){return[e].concat(w()(t))}))};return b.a.createElement(i.View,{style:$t.fullScreen},b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Url:"),b.a.createElement(i.TextInput,{ref:e,value:en,style:$t.input}),b.a.createElement(i.View,{style:$t.row},b.a.createElement(i.Text,{onClick:function(){e.current.getValue().then((function(e){Yt&&1===Yt.readyState&&Yt.close(),(Yt=new WebSocket(e)).onopen=function(){return l("[Opened] ".concat(Yt.url))},Yt.onclose=function(){return l("[Closed] ".concat(Yt.url))},Yt.onerror=function(e){return l("[Error] ".concat(e.reason))},Yt.onmessage=function(e){return l("[Received] ".concat(e.data))}}))},style:$t.button},"Connect"),b.a.createElement(i.Text,{onClick:function(){return Yt.close()},style:$t.button},"Disconnect"))),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Message:"),b.a.createElement(i.TextInput,{ref:t,value:tn,style:$t.input}),b.a.createElement(i.Text,{onClick:function(){return t.current.getValue().then((function(e){l("[Sent] ".concat(e)),Yt.send(e)}))},style:$t.button},"Send")),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Log:"),b.a.createElement(i.ScrollView,{style:$t.fullScreen},o.map((function(e,t){return b.a.createElement(i.Text,{key:t,style:$t.output},e)})))))};function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t=o||(this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollview.scrollTo(this.imgWidth*e,0,!0)}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return b.a.createElement(i.View,{style:xn.container},b.a.createElement(i.ScrollView,{style:xn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:xn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[xn.navItemText,r===n?xn.navItemTextBlue:xn.navItemTextNormal],numberOfLines:1},t))}))))}},{key:"render",value:function(){var e=this,t=this.state.navList;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),b.a.createElement(i.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:function(t){return e.onViewPagerChange(t.position)}},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return pt(e);case 1:return gt(e);case 2:return yt(e);default:return null}}}]),n}(b.a.Component);function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Cn=i.Dimensions.get("window").width,En=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:Cn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Cn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}}),kn=function(e){d()(n,e);var t=Tn(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).demon1Point=b.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r}return u()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=i.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}},{key:"onTouchDown1",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,Cn),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchMove1",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,Cn),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchDown2",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,Cn),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,Cn),this.setState({demo2Left:n})}},{key:"render",value:function(){var e=this,t=this.state.demo2Left;return b.a.createElement(i.View,{style:En.setNativePropsDemo},b.a.createElement(i.Text,null,"setNativeProps实现拖动效果"),b.a.createElement(i.View,{style:En.nativeDemo1Drag,onTouchDown:function(t){return e.onTouchDown1(t)},onTouchMove:function(t){return e.onTouchMove1(t)}},b.a.createElement(i.View,{onLayout:function(){return e.onDemon1Layout()},style:En.nativeDemo1Point,ref:this.demon1Point})),b.a.createElement(i.View,{style:En.splitter}),b.a.createElement(i.Text,null,"普通渲染实现拖动效果"),b.a.createElement(i.View,{style:En.nativeDemo2Drag,onTouchDown:function(t){return e.onTouchDown2(t)},onTouchMove:function(t){return e.onTouchMove2(t)}},b.a.createElement(i.View,{style:[En.nativeDemo2Point,{left:t}]})))}}]),n}(b.a.Component);function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var An=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),Vn=function(e){d()(r,e);var t=Rn(r);function r(e){var n;return c()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(se()(n)),n}return u()(r,[{key:"onAsyncComponentLoad",value:function(){var e=this;console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then((function(t){e.setState({AsyncComponentFromLocal:t.default||t})})).catch((function(e){return console.error("import async local component error",e)})),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then((function(t){e.setState({AsyncComponentFromHttp:t.default||t})})).catch((function(e){return console.error("import async remote component error",e)}))}},{key:"render",value:function(){var e=this.state,t=e.AsyncComponentFromLocal,n=e.AsyncComponentFromHttp;return b.a.createElement(i.View,{style:An.dynamicImportDemo},b.a.createElement(i.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),b.a.createElement(i.View,{style:{marginTop:20}},t?b.a.createElement(t,null):null,n?b.a.createElement(n,null):null))}}]),r}(b.a.Component);function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var jn=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),On=function(e){d()(n,e);var t=In(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){var e=i.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return b.a.createElement(i.View,{style:jn.LocalizationDemo},b.a.createElement(i.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(b.a.Component),Pn=function(){var e=le()(fe.a.mark((function e(t){return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var _n=i.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),Ln=function(e){d()(r,e);var t,n=Dn(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(se()(t)),t.getRenderRow=t.getRenderRow.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t}return u()(r,[{key:"onTurboFunc",value:(t=le()(fe.a.mark((function e(t){var n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,Pn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=getTurboModule("demoTurbo").getTurboConfig(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config,n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=this.config.getInfo():"setInfo"===t?(this.config.setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return b.a.createElement(i.View,{style:_n.resultView},b.a.createElement(i.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return b.a.createElement(i.View,{style:_n.cellContentView},b.a.createElement(i.View,{style:_n.funcInfo},b.a.createElement(i.Text,{numberofLines:0},"函数名:",n[e])),b.a.createElement(i.Text,{style:_n.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return b.a.createElement(i.View,{style:_n.container},this.renderResultView(),b.a.createElement(i.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(b.a.Component);function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:Zn.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:Zn.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:Zn.buttonContainer},b.a.createElement(i.View,{style:Zn.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:Zn.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var tr=i.StyleSheet.create({container:{flex:1}}),nr=function(e){d()(n,e);var t=er(n);function n(e){var r;c()(this,n),r=t.call(this,e);var o=i.Dimensions.get("window").width,a=i.Dimensions.get("window").height;return r.state={isVertical:o=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./node_modules/webpack/buildin/module.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/module.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return ae})),n.d(r,"ListView",(function(){return be})),n.d(r,"Modal",(function(){return Ce})),n.d(r,"RefreshWrapper",(function(){return Qe})),n.d(r,"PullHeader",(function(){return Xe})),n.d(r,"ScrollView",(function(){return $e})),n.d(r,"Text",(function(){return rt})),n.d(r,"TextInput",(function(){return it})),n.d(r,"View",(function(){return st})),n.d(r,"ViewPager",(function(){return wt})),n.d(r,"WebView",(function(){return St})),n.d(r,"BoxShadow",(function(){return Et})),n.d(r,"WaterfallView",(function(){return Vt}));var o={};n.r(o),n.d(o,"Animation",(function(){return Pt})),n.d(o,"AsyncStorage",(function(){return Bt})),n.d(o,"Clipboard",(function(){return Ft})),n.d(o,"NativeEvent",(function(){return Nt})),n.d(o,"NetInfo",(function(){return Ut})),n.d(o,"TestModule",(function(){return Jt})),n.d(o,"WebSocket",(function(){return nn})),n.d(o,"UIManagerModule",(function(){return cn}));var a={};n.r(a),n.d(a,"Slider",(function(){return pn})),n.d(a,"TabHost",(function(){return bn})),n.d(a,"SetNativeProps",(function(){return Sn})),n.d(a,"DynamicImport",(function(){return En})),n.d(a,"Localization",(function(){return An})),n.d(a,"Turbo",(function(){return Dn}));var i=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),c=n.n(l),s=n("./node_modules/@babel/runtime/helpers/createClass.js"),u=n.n(s),f=n("./node_modules/@babel/runtime/helpers/inherits.js"),d=n.n(f),h=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(h),p=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),y=n.n(p),g=n("./node_modules/react/index.js"),b=n.n(g),v=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),w=n.n(v),x=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/prop-types/index.js"),n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign||function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?C(o,u):".."===f?(C(o,u),s++):s&&(C(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&T(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var k="Invariant failed";function R(e,t){if(!e)throw new Error(k)}function A(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=E(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),y.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(y.entries[y.index]=r,u({action:"REPLACE",location:r}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(e){var t=y.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),z=function(e){var t=Object(O.a)();return t.displayName=e,t}("Router"),F=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(x.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return b.a.createElement(z.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(b.a.Component);var W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(he)}),600)}))}},{key:"render",value:function(){var e=this.state.dataSource;return b.a.createElement(i.ListView,{onTouchDown:function(e){console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:function(e){console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:function(e){return console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!1},bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:this.rowShouldSticky,onAppear:this.onAppear,onDisappear:this.onDisappear,onWillAppear:this.onWillAppear,onWillDisappear:this.onWillDisappear})}}]),r}(b.a.Component);function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var we="#4c9afa",xe="#f44837",Se="#fff",Te=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:we,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:we,textAlign:"center",textAlignVertical:"center"}}),Ce=function(e){d()(n,e);var t=ve(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={visible:!1,press:!1},r.show=r.show.bind(se()(r)),r.hide=r.hide.bind(se()(r)),r}return u()(n,[{key:"feedback",value:function(e){this.setState({press:"in"===e})}},{key:"show",value:function(){this.setState({visible:!0})}},{key:"hide",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.press,r=t.visible;return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Te.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback.bind("out")},onClick:this.show,style:[Te.buttonView,{borderColor:we,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Te.buttonText,{color:we}]},"点击弹出浮层"))),b.a.createElement(i.Modal,{transparent:!0,animationType:"slide_fade",visible:r,onRequestClose:function(){},supportedOrientations:["portrait"]},b.a.createElement(i.View,{style:{flex:1,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:xe,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:Se,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),Ee="http://res.imtt.qq.com/tps/expo-listview-1.jpg",ke={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[Ee,Ee,Ee],subInfo:["三图评论","11评"]}},Re={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},Ae={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}},Ve=[Ae,ke,Re,ke,Re,ke,Re,Ae,ke],Ie=n("./node_modules/@babel/runtime/helpers/extends.js"),je=n.n(Ie),De={getScreenWidth:function(){var e=i.Dimensions.get("screen").width,t=i.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&i.PixelRatio.get()>=2&&(e=!0),e}},Oe=(De.getScreenWidth()-24-12)/3,Pe=Math.floor(Oe/1.35),_e=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:Pe,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:Oe,height:Pe},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Le(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=De.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:_e.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,je()({},e,{style:{collapsable:!1}}),b.a.createElement(i.Text,{style:[_e.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:_e.imageContainer},b.a.createElement(i.Image,{style:_e.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[_e.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:_e.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:_e.tagLine},a):null)}var Be=De.getScreenWidth()-24,Me=Math.floor(Be-12)/3,ze=Math.floor(Me/1.35),Fe=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:ze},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:Me,height:ze},image:{width:Me,height:ze},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function We(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=null,r=t.title,o=t.picUrl,a=t.subInfo;if(a&&a.length){var l=(a=De.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:Fe.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,je()({},e,{style:Fe.container}),b.a.createElement(i.View,{style:Fe.leftContainer},b.a.createElement(i.Text,{style:Fe.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:Fe.tagLine},n):null),b.a.createElement(i.View,{style:Fe.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:Fe.image,source:{uri:o}})))}var He=De.getScreenWidth()-24,Ne=Math.floor(188*He/336),Ke=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:He,height:Ne,alignSelf:"center"},image:{width:He,height:Ne},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function qe(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var l=(o=De.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Ke.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:Ke.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Ke.playerView},b.a.createElement(i.Image,{style:Ke.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Ke.tagLine},a):null)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ge=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Qe=function(e){d()(o,e);var t,n,r=Ue(o);function o(e){var t;return c()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.onRefresh=t.onRefresh.bind(se()(t)),t.getRefresh=t.getRefresh.bind(se()(t)),t.getRenderRow=t.getRenderRow.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.getRowType=t.getRowType.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onEndReached",value:(t=le()(fe.a.mark((function e(){var t,n,r,o,a;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.dataSource,!t.fetchingDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.setState({fetchingDataFlag:!0,dataSource:n.concat([{style:100}])}),e.next=6,this.mockFetchData();case 6:r=e.sent,(o=n[n.length-1])&&100===o.style&&n.pop(),a=n.concat(r),this.setState({dataSource:a});case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"onRefresh",value:function(){var e=this;setTimeout(le()(fe.a.mark((function t(){var n;return fe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.mockFetchData();case 2:n=t.sent,e.setState({dataSource:n}),e.refresh.refreshComplected();case 5:case"end":return t.stop()}}),t)}))),1e3)}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Le,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(We,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(qe,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ge.loading},o)}return b.a.createElement(i.View,{style:Ge.container},b.a.createElement(i.View,{style:Ge.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ge.spliter}))}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:30}},b.a.createElement(i.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){return e.setState({fetchingDataFlag:!1}),e.fetchTimes+=1,e.fetchTimes>=50?t([]):t(Ve)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(b.a.Component);function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Je=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}}),Xe=function(e){d()(a,e);var t,n,r,o=Ye(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.renderRow=t.renderRow.bind(se()(t)),t.getRowType=t.getRowType.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t.renderPullHeader=t.renderPullHeader.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(se()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(se()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t}),this.listView.collapsePullHeader();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=le()(fe.a.mark((function e(){var t,n,r,o;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({dataSource:t.concat([{style:100}])}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:(r=t[t.length-1])&&100===r.style&&t.pop(),o=t.concat(n),this.loadMoreDataFlag=!1,this.setState({dataSource:o});case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=le()(fe.a.mark((function e(){var t,n=this;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.fetchingDataFlag){e.next=2;break}return e.abrupt("return");case 2:return this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:this.fetchingDataFlag=!1,this.setState({dataSource:t},(function(){n.listView.collapsePullHeader(),n.fetchTimes=0}));case 16:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Je.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){e.fetchTimes+=1;var n=[];return e.fetchTimes<50&&(n=Ve),t(n)}),600)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Je.pullContainer},b.a.createElement(i.Text,{style:Je.pullContent},e))}},{key:"renderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Le,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:a=b.a.createElement(We,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:a=b.a.createElement(qe,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 100:a=b.a.createElement(i.Text,{style:Je.loading},o)}return b.a.createElement(i.View,{style:Je.container},b.a.createElement(i.View,{style:Je.itemContainer},a),c?null:b.a.createElement(i.View,{style:Je.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}]),a}(b.a.Component),Ze=i.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function $e(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ze.itemTitle},b.a.createElement(i.Text,null,"Horizontal ScrollView")),b.a.createElement(i.View,null,b.a.createElement(i.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,bounces:!0},b.a.createElement(i.Text,{style:Ze.itemStyle},"A"),b.a.createElement(i.Text,{style:Ze.itemStyle},"B"),b.a.createElement(i.Text,{style:Ze.itemStyle},"C"),b.a.createElement(i.Text,{style:Ze.itemStyle},"D"),b.a.createElement(i.Text,{style:Ze.itemStyle},"E"),b.a.createElement(i.Text,{style:Ze.itemStyle},"F"),b.a.createElement(i.Text,{style:Ze.itemStyle},"A"))),b.a.createElement(i.View,{style:Ze.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:Ze.verticalScrollView,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:Ze.itemStyle},"A"),b.a.createElement(i.Text,{style:Ze.itemStyle},"B"),b.a.createElement(i.Text,{style:Ze.itemStyle},"C"),b.a.createElement(i.Text,{style:Ze.itemStyle},"D"),b.a.createElement(i.Text,{style:Ze.itemStyle},"E"),b.a.createElement(i.Text,{style:Ze.itemStyle},"F"),b.a.createElement(i.Text,{style:Ze.itemStyle},"A")))}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var tt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),nt=0,rt=function(e){d()(n,e);var t=et(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},r.incrementFontSize=r.incrementFontSize.bind(se()(r)),r.decrementFontSize=r.decrementFontSize.bind(se()(r)),r.androidNestedTextWrapperStyle={height:100,lineHeight:100},r}return u()(n,[{key:"incrementFontSize",value:function(){var e=this.state.fontSize;24!==e&&this.setState({fontSize:e+1})}},{key:"decrementFontSize",value:function(){var e=this.state.fontSize;6!==e&&this.setState({fontSize:e-1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=function(e){return b.a.createElement(i.View,{style:tt.itemTitle},b.a.createElement(i.Text,{style:!0},e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},a("shadow"),b.a.createElement(i.View,{style:[tt.itemContent],onClick:function(){var t="red",n={x:10,y:1};nt%2==1&&(t="grey",n={x:1,y:1}),nt+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},b.a.createElement(i.Text,{style:[tt.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),b.a.createElement(i.View,{style:[tt.itemContent]},b.a.createElement(i.Text,{style:[tt.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[tt.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[tt.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:[tt.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),b.a.createElement(i.View,{style:tt.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:tt.buttonText},"放大字体")),b.a.createElement(i.View,{style:tt.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:tt.buttonText},"缩小字体"))),a("fontStyle"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:[tt.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[tt.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:tt.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),b.a.createElement(i.Text,{numberOfLines:2,style:tt.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),a("textDecoration"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:[tt.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),b.a.createElement(i.Text,{numberOfLines:1,style:[tt.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),a("Nest Text"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[tt.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:tt.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),a("Custom font"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:tt.customFont},"Hippy 跨端框架")),a("Text Nested"),b.a.createElement(i.View,{style:tt.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:tt.normalText},"后面有张图片"),b.a.createElement(i.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),b.a.createElement(i.Text,{numberOfLines:1,style:tt.customFont},"前面有张图片"))))}}]),n}(b.a.Component);function ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var at=i.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,placeholderTextColor:"#aaaaaa",fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}}),it=function(e){d()(n,e);var t=ot(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(se()(r)),r.focus=r.focus.bind(se()(r)),r.blur=r.blur.bind(se()(r)),r}return u()(n,[{key:"changeInputContent",value:function(){this.setState({textContent:"当前时间毫秒:".concat(Date.now())})}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=this.state.textContent,n=function(e){return b.a.createElement(i.View,{style:at.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:at.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:at.input_style,placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:at.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:at.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:at.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:at.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),n("maxLength"),b.a.createElement(i.TextInput,{style:at.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),lt=n.p+"assets/defaultSource.jpg",ct=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function st(){var e=function(e){return b.a.createElement(i.View,{style:ct.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},e("backgroundColor"),b.a.createElement(i.View,{style:[ct.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[ct.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:lt}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},b.a.createElement(i.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),b.a.createElement(i.View,{style:[ct.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},b.a.createElement(i.Text,{style:{color:"white"}},"渐变色")),e("border props"),b.a.createElement(i.View,{style:[ct.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[ct.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[ct.smallRectangle,{backgroundColor:"green"}]})))}var ut=i.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),ft="SquarePagerView",dt="TrianglePagerView",ht="CirclePagerView";function mt(e,t){var n=function(t){return b.a.createElement(i.View,{style:ut.pageContainer,key:t},b.a.createElement(i.View,{style:[ut.shapeBase,e],key:"shape"}),b.a.createElement(i.View,{style:ut.mainRec,key:"title"},t?b.a.createElement(i.Text,{style:ut.title},t):null))};return n.displayName=t,n}var pt=mt(ut.square,ft),yt=mt(ut.triangle,dt),gt=mt(ut.circle,ht);function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var vt=i.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}}),wt=function(e){d()(n,e);var t=bt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),$()(se()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(se()(r)),r}return u()(n,[{key:"onPageSelected",value:function(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}},{key:"onPageScrollStateChanged",value:function(e){console.log("onPageScrollStateChanged===",e)}},{key:"onPageScroll",value:function(e){var t=e.offset,n=e.position;console.log("onPageScroll",t,n)}},{key:"render",value:function(){var e=this,t=this.state.selectedIndex;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},b.a.createElement(i.View,{style:vt.buttonContainer},b.a.createElement(i.View,{style:vt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:vt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:vt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:vt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:vt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[pt("squarePager"),yt("TrianglePager"),gt("CirclePager")]),b.a.createElement(i.View,{style:vt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[vt.dot,r?vt.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(b.a.Component),xt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{width:300,height:300,borderRadius:10}});function St(){return b.a.createElement(i.View,{style:{padding:10}},b.a.createElement(i.View,{style:xt.itemTitle},b.a.createElement(i.Text,null,"WebView 示例")),b.a.createElement(i.WebView,{source:{uri:"https://www.qq.com"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:xt.webViewStyle,onLoad:function(e){var t=e.url;return console.log("webview onload",t)},onLoadStart:function(e){var t=e.url;return console.log("webview onLoadStart",t)},onLoadEnd:function(e){var t=e.url;return console.log("webview onLoadEnd",t)}}))}var Tt=i.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Ct=i.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function Et(){return b.a.createElement(i.View,{style:Tt.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:Tt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Tt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Tt.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:Tt.shadowDemoCubeIos},b.a.createElement(i.View,{style:Tt.shadowDemoContentIos},b.a.createElement(i.Text,{style:Tt.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:Ct.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Ct.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:Ct.shadowDemoCubeIos},b.a.createElement(i.View,{style:Ct.shadowDemoContentIos},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))))}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Rt=Ve.filter((function(e){return 2!==e.style})),At=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),Vt=function(e){d()(a,e);var t,n,r,o=kt(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.numberOfColumns=2,t.columnSpacing=6,t.interItemSpacing=6,t.mockFetchData=t.mockFetchData.bind(se()(t)),t.renderItem=t.renderItem.bind(se()(t)),t.getItemType=t.getItemType.bind(se()(t)),t.getItemKey=t.getItemKey.bind(se()(t)),t.onEndReached=t.onEndReached.bind(se()(t)),t.onRefresh=t.onRefresh.bind(se()(t)),t.getRefresh=t.getRefresh.bind(se()(t)),t.renderPullFooter=t.renderPullFooter.bind(se()(t)),t.renderBanner=t.renderBanner.bind(se()(t)),t.getItemStyle=t.getItemStyle.bind(se()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=le()(fe.a.mark((function e(){var t;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=le()(fe.a.mark((function e(){var t,n,r;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:0===n.length&&this.setState({loadingState:"没有更多数据"}),r=[].concat(w()(t),w()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1;case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"renderPullFooter",value:function(){return 0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:At.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=le()(fe.a.mark((function e(){var t=this;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(le()(fe.a.mark((function e(){var n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.mockFetchData();case 2:n=e.sent,t.setState({dataSource:n}),t.refresh.refreshComplected();case 5:case"end":return e.stop()}}),e)}))),1e3);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getItemType",value:function(e){return this.state.dataSource[e].style}},{key:"getItemKey",value:function(e){return"row-".concat(e)}},{key:"onItemClick",value:function(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}},{key:"renderBanner",value:function(){return"android"===i.Platform.OS||0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},b.a.createElement(i.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}},{key:"renderItem",value:function(e){var t=this,n=null,r=this.state.dataSource[e];switch(r.style){case 1:n=b.a.createElement(Le,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(We,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(qe,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:At.container},b.a.createElement(i.View,{style:At.itemContainer},n),b.a.createElement(i.View,{style:At.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(w()(Rt),w()(Rt));return e(t)}),600)}))}},{key:"getWaterfallContentInset",value:function(){return{top:0,left:5,bottom:0,right:5}}},{key:"getItemStyle",value:function(){var e=this.numberOfColumns,t=this.columnSpacing,n=i.Dimensions.get("screen").width,r=this.getWaterfallContentInset();return{width:(n-r.left-r.right-(e-1)*t)/e}}},{key:"render",value:function(){var e=this,t=this.state.dataSource,n=this.numberOfColumns,r=this.columnSpacing,o=this.interItemSpacing,a=this.getWaterfallContentInset();return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(b.a.Component);function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var jt="#4c9afa",Dt="#f44837",Ot=i.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:Dt},showArea:{height:150,marginVertical:10},button:{borderColor:jt,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:jt,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}}),Pt=function(e){d()(n,e);var t=It(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={},r}return u()(n,[{key:"componentWillMount",value:function(){this.horizonAnimation=new i.Animation({startValue:150,toValue:20,duration:1e3,delay:500,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.verticalAnimation=new i.Animation({startValue:80,toValue:40,duration:1e3,delay:0,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.scaleAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:1,toValue:1.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:1.2,toValue:.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.bgColorAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:"red",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:"yellow",toValue:"blue",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.txtColorAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:"white",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new i.Animation({startValue:"yellow",toValue:"white",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.cubicBezierScaleAnimationSet=new i.AnimationSet({children:[{animation:new i.Animation({startValue:0,toValue:1,duration:1e3,delay:0,mode:"timing",timingFunction:"cubic-bezier(.45,2.84,.38,.5)"}),follow:!1},{animation:new i.Animation({startValue:1,toValue:0,duration:1e3,mode:"timing",timingFunction:"cubic-bezier(.17,1.45,.78,.14)"}),follow:!0}],repeatCount:"loop"})}},{key:"componentDidMount",value:function(){"web"===i.Platform.OS&&(this.verticalAnimation.setRef(this.verticalRef),this.horizonAnimation.setRef(this.horizonRef),this.scaleAnimationSet.setRef(this.scaleRef),this.bgColorAnimationSet.setRef(this.bgColorRef),this.txtColorAnimationSet.setRef(this.textColorRef),this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef)),this.horizonAnimation.onHippyAnimationStart((function(){console.log("on animation start!!!")})),this.horizonAnimation.onHippyAnimationEnd((function(){console.log("on animation end!!!")})),this.horizonAnimation.onHippyAnimationCancel((function(){console.log("on animation cancel!!!")})),this.horizonAnimation.onHippyAnimationRepeat((function(){console.log("on animation end!!!")}))}},{key:"componentWillUnmount",value:function(){this.scaleAnimationSet&&this.scaleAnimationSet.destroy(),this.horizonAnimation&&this.horizonAnimation.destroy(),this.verticalAnimation&&this.verticalAnimation.destroy(),this.cubicBezierScaleAnimationSet&&this.cubicBezierScaleAnimationSet.destroy()}},{key:"render",value:function(){var e=this;return b.a.createElement(i.ScrollView,{style:Ot.container},b.a.createElement(i.Text,{style:Ot.title},"水平位移动画"),b.a.createElement(i.View,{style:Ot.buttonContainer},b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.horizonAnimation.start()}},b.a.createElement(i.Text,{style:Ot.buttonText},"开始")),b.a.createElement(i.View,{style:[Ot.button],onClick:function(){e.horizonAnimation.pause()}},b.a.createElement(i.Text,{style:Ot.buttonText},"暂停")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.horizonAnimation.resume()}},b.a.createElement(i.Text,{style:Ot.buttonText},"继续")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},b.a.createElement(i.Text,{style:Ot.buttonText},"更新"))),b.a.createElement(i.View,{style:Ot.showArea},b.a.createElement(i.View,{ref:function(t){e.horizonRef=t},style:[Ot.square,{transform:[{translateX:this.horizonAnimation}]}]})),b.a.createElement(i.Text,{style:Ot.title},"高度形变动画"),b.a.createElement(i.View,{style:Ot.buttonContainer},b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.verticalAnimation.start()}},b.a.createElement(i.Text,{style:Ot.buttonText},"开始")),b.a.createElement(i.View,{style:[Ot.button],onClick:function(){e.verticalAnimation.pause()}},b.a.createElement(i.Text,{style:Ot.buttonText},"暂停")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.verticalAnimation.resume()}},b.a.createElement(i.Text,{style:Ot.buttonText},"继续"))),b.a.createElement(i.View,{style:Ot.showArea},b.a.createElement(i.View,{ref:function(t){e.verticalRef=t},style:[Ot.square,{height:this.verticalAnimation}]})),b.a.createElement(i.Text,{style:Ot.title},"组合形变动画"),b.a.createElement(i.View,{style:Ot.buttonContainer},b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.scaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Ot.buttonText},"开始")),b.a.createElement(i.View,{style:[Ot.button],onClick:function(){e.scaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Ot.buttonText},"暂停")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.scaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Ot.buttonText},"继续"))),b.a.createElement(i.View,{style:[Ot.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.scaleRef=t},style:[Ot.square,{transform:[{scale:this.scaleAnimationSet}]}]})),b.a.createElement(i.Text,{style:Ot.title},"颜色渐变动画(文字渐变仅Android支持)"),b.a.createElement(i.View,{style:Ot.buttonContainer},b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.bgColorAnimationSet.start(),e.txtColorAnimationSet.start()}},b.a.createElement(i.Text,{style:Ot.buttonText},"开始")),b.a.createElement(i.View,{style:[Ot.button],onClick:function(){e.bgColorAnimationSet.pause(),e.txtColorAnimationSet.pause()}},b.a.createElement(i.Text,{style:Ot.buttonText},"暂停")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.bgColorAnimationSet.resume(),e.txtColorAnimationSet.resume()}},b.a.createElement(i.Text,{style:Ot.buttonText},"继续"))),b.a.createElement(i.View,{style:[Ot.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.bgColorRef=t},style:[Ot.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},b.a.createElement(i.Text,{ref:function(t){e.textColorRef=t},style:[Ot.colorText,{color:"android"===i.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),b.a.createElement(i.Text,{style:Ot.title},"贝塞尔曲线动画"),b.a.createElement(i.View,{style:Ot.buttonContainer},b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.cubicBezierScaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Ot.buttonText},"开始")),b.a.createElement(i.View,{style:[Ot.button],onClick:function(){e.cubicBezierScaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Ot.buttonText},"暂停")),b.a.createElement(i.View,{style:Ot.button,onClick:function(){e.cubicBezierScaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Ot.buttonText},"继续"))),b.a.createElement(i.View,{style:[Ot.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.cubicBezierScaleRef=t},style:[Ot.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}]),n}(b.a.Component);function _t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Lt=i.StyleSheet.create({containerStyle:{margin:20,alignItems:"center",flexDirection:"column"},itemGroupStyle:{flexDirection:"row",marginTop:10,borderColor:"#4c9afa",borderWidth:1,width:100,height:40,justifyContent:"center",alignItems:"center"},viewGroupStyle:{flexDirection:"row",marginTop:10},infoStyle:{width:60,height:40,fontSize:16,color:"#4c9afa",textAlign:"center"},inputStyle:{width:200,height:40,placeholderTextColor:"#aaaaaa",underlineColorAndroid:"#4c9afa",fontSize:16,color:"#242424",textAlign:"left"},buttonStyle:{textAlign:"center",fontSize:16,color:"#4c9afa",backgroundColor:"#4c9afa11",marginLeft:10,marginRight:10}}),Bt=function(e){d()(n,e);var t=_t(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={result:""},r.onTextChangeKey=r.onTextChangeKey.bind(se()(r)),r.onTextChangeValue=r.onTextChangeValue.bind(se()(r)),r.onClickSet=r.onClickSet.bind(se()(r)),r.onTextChangeKey=r.onTextChangeKey.bind(se()(r)),r.onClickGet=r.onClickGet.bind(se()(r)),r}return u()(n,[{key:"onClickSet",value:function(){var e=this.state,t=e.key,n=e.value;t&&i.AsyncStorage.setItem(t,n)}},{key:"onClickGet",value:function(){var e=this,t=this.state.key;t&&i.AsyncStorage.getItem(t).then((function(t){e.setState({result:t})}))}},{key:"onTextChangeKey",value:function(e){this.setState({key:e})}},{key:"onTextChangeValue",value:function(e){this.setState({value:e})}},{key:"render",value:function(){var e=this.state.result;return b.a.createElement(i.ScrollView,{style:Lt.containerStyle},b.a.createElement(i.View,{style:Lt.viewGroupStyle},b.a.createElement(i.Text,{style:Lt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:Lt.viewGroupStyle},b.a.createElement(i.Text,{style:Lt.infoStyle},"Value:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeValue})),b.a.createElement(i.View,{style:Lt.itemGroupStyle,onClick:this.onClickSet},b.a.createElement(i.Text,{style:Lt.buttonStyle},"Set")),b.a.createElement(i.View,{style:[Lt.viewGroupStyle,{marginTop:60}]},b.a.createElement(i.Text,{style:Lt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Lt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:[Lt.viewGroupStyle,{display:"none"}]},b.a.createElement(i.Text,{style:Lt.infoStyle},"Value:"),b.a.createElement(i.Text,{style:[Lt.infoStyle,{width:200}]},e)),b.a.createElement(i.View,{style:Lt.itemGroupStyle,onClick:this.onClickGet},b.a.createElement(i.Text,{style:Lt.buttonStyle},"Get")))}}]),n}(b.a.Component);function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var zt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},defaultText:{marginVertical:4,fontSize:18,lineHeight:24,color:"#242424"},copiedText:{color:"#aaa"},button:{backgroundColor:"#4c9afa",borderRadius:4,height:30,marginVertical:4,paddingHorizontal:6,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"white"}}),Ft=function(e){d()(n,e);var t=Mt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={hasCopied:!1,text:"Winter is coming",clipboardText:"快点上面的按钮啊魂淡"},r}return u()(n,[{key:"render",value:function(){var e=this,t=function(e){return b.a.createElement(i.View,{style:zt.itemTitle},b.a.createElement(i.Text,null,e))},n=this.state,r=n.hasCopied,o=n.text,a=n.clipboardText,l=r?" (已复制) ":"";return b.a.createElement(i.ScrollView,{style:{padding:10}},t("文本复制到剪贴板"),b.a.createElement(i.Text,{style:zt.defaultText},o),b.a.createElement(i.View,{style:zt.button,onClick:function(){i.Clipboard.setString(o),e.setState({hasCopied:!0})}},b.a.createElement(i.Text,{style:zt.buttonText},"点击复制以上文案".concat(l))),t("获取剪贴板内容"),b.a.createElement(i.View,{style:zt.button,onClick:le()(fe.a.mark((function t(){var n;return fe.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.Clipboard.getString();case 3:n=t.sent,e.setState({clipboardText:n}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))},b.a.createElement(i.Text,{style:zt.buttonText},"点击获取剪贴板内容")),b.a.createElement(i.Text,{style:[zt.defaultText,zt.copiedText]},a))}}]),n}(b.a.Component);function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ht=i.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:80,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"}}),Nt=function(e){d()(n,e);var t=Wt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={infoText:"",infoText2:""},r}return u()(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.infoText,r=t.infoText2;return b.a.createElement(i.ScrollView,{style:Ht.container},b.a.createElement(i.View,{style:Ht.itemTitle,onPress:function(){var t=new i.HippyEventEmitter;e.call=t.addListener("NORMAL_EVENT",(function(t){e.setState({infoText:JSON.stringify(t)})})),Object(i.callNative)("MyEvent","btnClicked")}},b.a.createElement(i.Text,null,"客户端向前端单向通信"),b.a.createElement(i.Text,null,"点此终端会发送NORMAL_EVENT事件"),b.a.createElement(i.Text,null,"事件接收结果:".concat(n))),b.a.createElement(i.View,{style:Ht.itemTitle,onPress:function(){var t=new i.HippyEventEmitter;e.call=t.addListener("COUNT_DOWN",(function(t){e.setState({infoText2:JSON.stringify(t)})})),Object(i.callNative)("MyEvent","addListener","COUNT_DOWN")}},b.a.createElement(i.Text,null,"客户端向前端单向通信的进阶用法"),b.a.createElement(i.Text,null,"点此终端会发送COUNT_DOWN事件"),b.a.createElement(i.Text,null,"事件接收结果:".concat(r))))}}]),n}(b.a.Component);function Kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var qt=i.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}}),Ut=function(e){d()(r,e);var t,n=Kt(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={infoText:"正在获取.."},t.listener=null,t}return u()(r,[{key:"componentWillMount",value:(t=le()(fe.a.mark((function e(){var t,n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,i.NetInfo.fetch();case 3:n=e.sent,this.setState({infoText:n}),this.listener=i.NetInfo.addEventListener("change",(function(e){t.setState({infoText:"收到通知: ".concat(e.network_info)})}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"componentDidMount",value:function(){var e=this;this.listener&&i.NetInfo.removeEventListener("change",this.listener),fetch("https://m.baidu.com",{headers:{Refer:"https://now.qq.com",Cookie:["harry=guo5","xxx=5"]}}).then((function(t){return console.log("成功",t),e.setState({infoText:"成功: ".concat(t.body)}),t})).catch((function(t){e.setState({infoText:"收到错误: ".concat(t)}),console.error("收到错误:",t)})),i.NetworkModule.setCookie("http://3gxx.qq.com","name=harryguo;gender=male"),i.NetworkModule.getCookies("http://3gxx.qq.com").then((function(e){console.log("cookie: ".concat(e))}))}},{key:"render",value:function(){var e=this.state.infoText;return b.a.createElement(i.ScrollView,{style:qt.container},b.a.createElement(i.Text,{style:qt.text},e))}}]),r}(b.a.Component),Gt={log:function(e){Object(i.callNative)("TestModule","log",e)},helloNative:function(e){Object(i.callNative)("TestModule","helloNative",e)},helloNativeWithPromise:function(e){return Object(i.callNativeWithPromise)("TestModule","helloNativeWithPromise",e)}};function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Yt,Jt=function(e){d()(n,e);var t=Qt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={hello:"TestModule log"},r}return u()(n,[{key:"componentDidMount",value:function(){var e=this;Gt.log("hello i am from js"),Gt.helloNative({hello:"i am form js"}),Gt.helloNativeWithPromise({hello:"i am form js"}).then((function(t){e.setState({hello:JSON.stringify(t)})}))}},{key:"render",value:function(){var e=this.state.hello;return b.a.createElement(i.Text,{style:{color:"red"}},e)}}]),n}(b.a.Component),Xt=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Zt=n.n(Xt),$t=i.StyleSheet.create({fullScreen:{flex:1},row:{flexDirection:"row"},title:{color:"#ccc"},button:{height:56,backgroundColor:"#4c9afa",borderColor:"#5dabfb",borderStyle:"solid",borderWidth:1,paddingHorizontal:20,fontSize:16,textAlign:"center",lineHeight:56,color:"#fff",margin:10},input:{color:"black",flex:1,height:36,lineHeight:36,fontSize:14,borderBottomColor:"#4c9afa",borderBottomStyle:"solid",borderBottomWidth:1,padding:0},output:{color:"black"}}),en="wss://echo.websocket.org",tn="Rock it with Hippy WebSocket";var nn=function(){var e=Object(g.useRef)(null),t=Object(g.useRef)(null),n=Object(g.useState)([]),r=Zt()(n,2),o=r[0],a=r[1],l=function(e){a((function(t){return[e].concat(w()(t))}))};return b.a.createElement(i.View,{style:$t.fullScreen},b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Url:"),b.a.createElement(i.TextInput,{ref:e,value:en,style:$t.input}),b.a.createElement(i.View,{style:$t.row},b.a.createElement(i.Text,{onClick:function(){e.current.getValue().then((function(e){Yt&&1===Yt.readyState&&Yt.close(),(Yt=new WebSocket(e)).onopen=function(){return l("[Opened] ".concat(Yt.url))},Yt.onclose=function(){return l("[Closed] ".concat(Yt.url))},Yt.onerror=function(e){return l("[Error] ".concat(e.reason))},Yt.onmessage=function(e){return l("[Received] ".concat(e.data))}}))},style:$t.button},"Connect"),b.a.createElement(i.Text,{onClick:function(){return Yt.close()},style:$t.button},"Disconnect"))),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Message:"),b.a.createElement(i.TextInput,{ref:t,value:tn,style:$t.input}),b.a.createElement(i.Text,{onClick:function(){return t.current.getValue().then((function(e){l("[Sent] ".concat(e)),Yt.send(e)}))},style:$t.button},"Send")),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:$t.title},"Log:"),b.a.createElement(i.ScrollView,{style:$t.fullScreen},o.map((function(e,t){return b.a.createElement(i.Text,{key:t,style:$t.output},e)})))))};function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t=o||(this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollview.scrollTo(this.imgWidth*e,0,!0)}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return b.a.createElement(i.View,{style:gn.container},b.a.createElement(i.ScrollView,{style:gn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:gn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[gn.navItemText,r===n?gn.navItemTextBlue:gn.navItemTextNormal],numberOfLines:1},t))}))))}},{key:"render",value:function(){var e=this,t=this.state.navList;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),b.a.createElement(i.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return pt(e);case 1:return gt(e);case 2:return yt(e);default:return null}}}]),n}(b.a.Component);function vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var wn=i.Dimensions.get("window").width,xn=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:wn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:wn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}}),Sn=function(e){d()(n,e);var t=vn(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).demon1Point=b.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r.onTouchDown1=r.onTouchDown1.bind(se()(r)),r.onDemon1Layout=r.onDemon1Layout.bind(se()(r)),r.onTouchMove1=r.onTouchMove1.bind(se()(r)),r.onTouchDown2=r.onTouchDown2.bind(se()(r)),r.onTouchMove2=r.onTouchMove2.bind(se()(r)),r}return u()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=i.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}},{key:"onTouchDown1",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,wn),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchMove1",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,wn),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchDown2",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,wn),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,wn),this.setState({demo2Left:n})}},{key:"render",value:function(){var e=this.state.demo2Left;return b.a.createElement(i.View,{style:xn.setNativePropsDemo},b.a.createElement(i.Text,null,"setNativeProps实现拖动效果"),b.a.createElement(i.View,{style:xn.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},b.a.createElement(i.View,{onLayout:this.onDemon1Layout,style:xn.nativeDemo1Point,ref:this.demon1Point})),b.a.createElement(i.View,{style:xn.splitter}),b.a.createElement(i.Text,null,"普通渲染实现拖动效果"),b.a.createElement(i.View,{style:xn.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},b.a.createElement(i.View,{style:[xn.nativeDemo2Point,{left:e}]})))}}]),n}(b.a.Component);function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Cn=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),En=function(e){d()(r,e);var t=Tn(r);function r(e){var n;return c()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(se()(n)),n}return u()(r,[{key:"onAsyncComponentLoad",value:function(){var e=this;console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then((function(t){e.setState({AsyncComponentFromLocal:t.default||t})})).catch((function(e){return console.error("import async local component error",e)})),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then((function(t){e.setState({AsyncComponentFromHttp:t.default||t})})).catch((function(e){return console.error("import async remote component error",e)}))}},{key:"render",value:function(){var e=this.state,t=e.AsyncComponentFromLocal,n=e.AsyncComponentFromHttp;return b.a.createElement(i.View,{style:Cn.dynamicImportDemo},b.a.createElement(i.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),b.a.createElement(i.View,{style:{marginTop:20}},t?b.a.createElement(t,null):null,n?b.a.createElement(n,null):null))}}]),r}(b.a.Component);function kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Rn=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),An=function(e){d()(n,e);var t=kn(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){var e=i.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return b.a.createElement(i.View,{style:Rn.LocalizationDemo},b.a.createElement(i.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(b.a.Component),Vn=function(){var e=le()(fe.a.mark((function e(t){return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var jn=i.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),Dn=function(e){d()(r,e);var t,n=In(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(se()(t)),t.getRenderRow=t.getRenderRow.bind(se()(t)),t.getRowKey=t.getRowKey.bind(se()(t)),t}return u()(r,[{key:"onTurboFunc",value:(t=le()(fe.a.mark((function e(t){var n;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,Vn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=getTurboModule("demoTurbo").getTurboConfig(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config,n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=this.config.getInfo():"setInfo"===t?(this.config.setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return b.a.createElement(i.View,{style:jn.resultView},b.a.createElement(i.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return b.a.createElement(i.View,{style:jn.cellContentView},b.a.createElement(i.View,{style:jn.funcInfo},b.a.createElement(i.Text,{numberofLines:0},"函数名:",n[e])),b.a.createElement(i.Text,{style:jn.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return b.a.createElement(i.View,{style:jn.container},this.renderResultView(),b.a.createElement(i.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(b.a.Component);function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:Qn.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:Qn.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:Qn.buttonContainer},b.a.createElement(i.View,{style:Qn.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:Qn.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Xn=i.StyleSheet.create({container:{flex:1}}),Zn=function(e){d()(n,e);var t=Jn(n);function n(e){var r;c()(this,n),r=t.call(this,e);var o=i.Dimensions.get("screen"),a=o.width,l=o.height;return r.state={isVertical:a=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw i}}return a}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw i}}return a}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||e.didTimeout)&&function e(t){"number"==typeof t?ne(t):t&&(ne(t.nodeId),t.childNodes&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var oe=new RegExp(/^\d+$/),le=!1;function ue(){}function se(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var ce=new RegExp("^on.+Capture$");var fe=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function de(e){if("number"==typeof e)return e;if("string"==typeof e&&fe.test(e))try{return parseFloat(e)}catch(t){return e}return e}function pe(e){return"[object Function]"===Object.prototype.toString.call(e)}function he(e){e}function me(){return le}function ve(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function ye(e){return 5===e}var ge=function(){function e(t){T(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return F(e,[{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"removeEventHandler",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");var t="eventHandler_".concat(e);this.handlerContainer[t]&&delete this.handlerContainer[t]}},{key:"notifyEvent",value:function(e){var t=this;Object.keys(this.handlerContainer).forEach((function(n){var r=t.handlerContainer[n];r&&r.eventHandler&&(r.context?r.eventHandler.call(r.context,e):r.eventHandler(e))}))}},{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}}]),e}(),be=function(){function e(t,n,r){T(this,e),this.type=t,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=n,this.target=r}return F(e,[{key:"stopPropagation",value:function(){this.bubbles=!1}}]),e}(),ke=new Map,we=["%c[event]%c","color: green","color: auto"];function Se(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: ".concat(e));return ke.get(e)||null}function Ee(e,t){var n=e;return t.memoizedProps&&!t.memoizedProps[e]&&"onClick"===e&&t.memoizedProps.onPress&&(n="onPress"),n}function Ce(e,t){return!(!t.memoizedProps||"function"!=typeof t.memoizedProps[e])}var xe={registerNativeEventHub:function(e){if(ue.apply(void 0,we.concat(["registerNativeEventHub",e])),"string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: ".concat(e));var t=ke.get(e);return t||(t=new ge(e),ke.set(e,t)),t},getHippyEventHub:Se,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: ".concat(e));ke.has(e)&&ke.delete(e)},receiveNativeEvent:function(e){if(ue.apply(void 0,we.concat(["receiveNativeEvent",e])),!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: ".concat(JSON.stringify(e)));var t=L(e,2),n=t[0],r=t[1];if("string"!=typeof n)throw new TypeError("Invalid arguments");var i=Se(n);i&&i.notifyEvent(r)},receiveNativeGesture:function(e){if(ue.apply(void 0,we.concat(["receiveNativeGesture",e])),e){var t=ie(e.id);if(t){var n=!0,r=e.name;r=Ee(r,t);var i="".concat(r,"Capture"),a=t;t.memoizedProps&&"function"!=typeof t.memoizedProps[i]&&(n=!1),n?function(e,t,n){for(var r=[],i=n,a=e;i;){a=Ee(a,i);var o="".concat(a,"Capture");for(Ce(o,i)&&r.unshift({eventName:o,listener:i.memoizedProps[o],isCapture:!0,currentTarget:re(i)}),Ce(a,i)&&r.push({eventName:a,listener:i.memoizedProps[a],isCapture:!1,currentTarget:re(i)}),i=i.return;i&&!ye(i.tag);)i=i.return}if(r.length>0)for(var l,u=!1,s=re(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new be(f,d,s);Object.assign(m,t),h?p(m):("boolean"!=typeof(u=p(m))&&(u=!me()),m.bubbles||(u=!0))}catch(e){console.reportUncaughtException(e)}}(r,e,a):function(e,t,n){var r=!1,i=n,a=e,o=re(n);do{if(Ce(a=Ee(a,i),i))try{var l=re(i),u=new be(a,l,o);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[a](u))&&(r=!me()),u.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!ye(i.tag);)i=i.return}while(!r&&i)}(r,e,a)}}},receiveUIComponentEvent:function(e){if(ue.apply(void 0,we.concat(["receiveUIComponentEvent",e])),e&&Array.isArray(e)&&!(e.length<2)){var t=L(e,3),n=t[0],r=t[1],i=t[2];if("number"==typeof n&&"string"==typeof r){var a=ie(n);a&&Ce(r,a)&&a.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=xe);var Ne=function(){function e(t,n){T(this,e),this.callback=t,this.bindListener=n}return F(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),Ie=function(){function e(t){T(this,e),this.eventName=t,this.listenerIds=[]}return F(e,[{key:"addCallback",value:function(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");var n=xe.registerNativeEventHub(this.eventName);if(!n)throw new ReferenceError("No listeners for ".concat(this.eventName));var r=n.addEventHandler(e,t);if("number"!=typeof r)throw new Error("Fail to addEventHandler");return this.listenerIds.push(r),r}},{key:"removeCallback",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");var t=xe.getHippyEventHub(this.eventName);if(!t)throw new ReferenceError("No listeners for ".concat(this.eventName));t.removeEventHandler(e);for(var n=this.listenerIds.length,r=0;r=0?Zt(t):t}var Be=function(){function e(t){T(this,e);var n=0;if(t.startValue&&t.startValue.constructor&&"Animation"===t.startValue.constructor.name)n={animationId:t.startValue.animationId};else{var r=t.startValue;n=We(t.valueType,r)}var i=We(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=n||0,this.toValue=i||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Ue(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return F(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();var t="onAnimation";"android"===Ht.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=De.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=De.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=De.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=De.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ft.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ft.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==R(t))throw new TypeError("Invalid arguments");if("string"==typeof t.mode&&t.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(t).forEach((function(r){var i=t[r];if("startValue"===r){var a=0;if(t.startValue instanceof e)a={animationId:t.startValue.animationId};else{var o=t.startValue;a=We(n.valueType,o)}n.startValue=a||0}else"repeatCount"===r?n.repeatCount=Ue(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Ft.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:We(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),Ve=new _e,$e=function(){function e(t){var n=this;T(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Ue(t.repeatCount||0),children:this.animationList,virtual:t.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return F(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();var t="onAnimation";"android"===Ht.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ve.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ve.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ve.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ve.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ft.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),this.animationList.forEach((function(e){return Number.isInteger(e.animationId)&&Ft.callNative("AnimationModule","destroyAnimation",e.animationId)})),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ft.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),qe=["%c[native]%c","color: red","color: auto"],Qe={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")},Ke=!0,Ge=[];function Ye(){Ke&&bt()}function Xe(e){Ke&&(Ke=!1,Promise.resolve().then((function(){(function(e){for(var t=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=Z();if(tt(e)&&!e.isMounted){var i=et(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));Ye(),Ge.push({type:Qe.createNode,nodes:i}),Xe(r)}else if(e.isMounted&&!t.isMounted){var a=et(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));Ye(),Ge.push({type:Qe.createNode,nodes:a}),Xe(r)}}}function rt(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=Z(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Ye(),Ge.push({type:Qe.deleteNode,nodes:i}),Xe(r)}}function it(e){if(e.isMounted){var t=Z(),n=Ze(t,e);Ye(),n&&Ge.push({type:Qe.updateNode,nodes:[n]}),Xe(t)}}var at=0;var ot=function(){function e(){T(this,e),this.meta={component:{}},this.mounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.nodeId=((at+=1)%10==0&&(at+=1),at)}return F(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),nt(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),rt(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),nt(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),nt(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),rt(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),lt={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},ut={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},st="turn",ct="rad",ft="deg";function dt(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(Array.isArray(n)){var r="180",i=L(n,3),a=i[0],o=i[1],l=i[2];return o&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft,n=parseFloat(e),r=e||"",i=e.split("."),a=L(i,2),o=a[1];switch(o&&o.length>2&&(r=n.toFixed(2)),t){case st:r="".concat((360*n).toFixed(2));break;case ct:r="".concat((180/Math.PI*n).toFixed(2))}return r}(o,l):a&&void 0!==ut[a]&&(r=ut[a]),r}}function pt(e){var t=L((e||"").replace(/\s+/g," ").trim().split(/\s+(?![^(]*?\))/),2),n=t[0],r=t[1],i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Zt(n)}:void 0:{color:Zt(n)}}var ht=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.tagName=e,r}return F(n,[{key:"nativeName",get:function(){return this.meta.component.name}},{key:"toString",value:function(){return"".concat(this.tagName,":(").concat(this.nativeName,")")}},{key:"hasAttribute",value:function(e){return!!this.attributes[e]}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setStyleAttribute",value:function(e){var t=this;this.style={};var n=e;if(!Array.isArray(n)&&Object.hasOwnProperty.call(n,0)){var r=[],i={};Object.keys(n).forEach((function(e){var t;t=e,oe.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var a={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){a=P(P({},a),e)})):"object"===R(e)&&e&&(a=P(P({},a),e))})),Object.keys(a).forEach((function(e){var n=a[e];if(Object.prototype.hasOwnProperty.call(lt,e)&&(e=lt[e]),"transform"===e){var r={};if(!Array.isArray(n))throw new TypeError("transform only support array args");n.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n instanceof Be||n instanceof $e?r[t]={animationId:n.animationId}:null===n?r[t]&&delete r[t]:void 0!==n&&(r[t]=n)}))}));var i=Object.keys(r);i.length&&(Array.isArray(t.style.transform)||(t.style.transform=[]),i.forEach((function(e){return t.style.transform.push({[e]:r[e]})})))}else if(null===n&&void 0!==t.style[e])t.style[e]=void 0;else if(n instanceof Be||n instanceof $e)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=en(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=Zt(n);else if("backgroundImage"===e&&n)t.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){var r=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),i=[];n.linearGradient=n.linearGradient||{},r.forEach((function(e,t){if(0===t){var r=dt(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var a=pt(e);a&&i.push(a)}}else{var o=pt(e);o&&i.push(o)}})),n.linearGradient.colorStopList=i}else n[e]=ve(t);return n}(e,n,t.style);else if("textShadowOffset"===e){var o=n||{},l=o.x,u=void 0===l?0:l,s=o.width,c=void 0===s?0:s,f=o.y,d=void 0===f?0:f,p=o.height,h=void 0===p?0:p;t.style[e]={width:u||c,height:d||h}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?t.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,n,t.style):t.style[e]=n}))}},{key:"setAttribute",value:function(e,t){var n=this;try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void it(this);var r=!1;if([{match:function(){return["id"].indexOf(e)>=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=Z(),n=et(t,e);Ye(),Ge.push({type:Qe.updateNode,nodes:n}),Xe(t)}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=se(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["numberOfRows"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,"ios"!==Ht.platform.OS}},{match:function(){return["onPress"].indexOf(e)>=0},action:function(){return n.attributes.onClick=!0,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==R(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){var r;return"function"==typeof t?(r=e,ce.test(r)&&(e=e.replace("Capture","")),n.attributes[e]=!0):n.attributes[e]=t,!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r)return;var i=!1;Object.keys(this.style).some((function(e){var t=n.style[e];if(t&&Array.isArray(t)&&"transform"===e)for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(lt,e)&&(i=lt[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?en(r):i.toLowerCase().indexOf("color")>-1?Zt(r):de(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||it(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),it(this)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=se(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(ot),mt=$.createNode,vt=$.updateNode,yt=$.deleteNode,gt=$.flushBatch,bt=$.startBatch,kt=$.endBatch,wt=$.sendRenderError,St=function(e){return ee((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function Et(e){if(e instanceof ht)return e;var t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){for(var n=t.child;n&&!(n.stateNode instanceof ht);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function Ct(e){var t=e;if("string"==typeof e){"getNodeIdByRef('".concat(e,"') use string ref will affect to performance, recommend use reference to the ref instead");var n=ee((function(t){return!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e}));if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){var r=Et(t);return r?r.nodeId:0}return t.nodeId}function xt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=Et(e);i&&(r=i.nodeId,n=i.nativeName)}if(!n)throw new Error("callUIFunction is calling a unnamed component");if(!r)throw new Error("callUIFunction is calling a component have no nodeId");for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l255?255:t}function Qt(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Kt(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Gt(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Kt(i,r,e+1/3),o=Kt(i,r,e),l=Kt(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*l)<<8}function Yt(e){return(parseFloat(e)%360+360)%360/360}function Xt(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function Jt(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$t.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(Wt,e)?Wt[e]:(t=$t.rgb.exec(e),Array.isArray(t)?(qt(t[1])<<24|qt(t[2])<<16|qt(t[3])<<8|255)>>>0:(t=$t.rgba.exec(e))?(qt(t[1])<<24|qt(t[2])<<16|qt(t[3])<<8|Qt(t[4]))>>>0:(t=$t.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=$t.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=$t.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=$t.hsl.exec(e))?(255|Gt(Yt(t[1]),Xt(t[2]),Xt(t[3])))>>>0:(t=$t.hsla.exec(e))?(Gt(Yt(t[1]),Xt(t[2]),Xt(t[3]))|Qt(t[4]))>>>0:null))}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=Jt(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function en(e,t){return Array.isArray(e)?e.map((function(e){return Zt(e,t)})):[0]}var tn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.call(this)).documentElement=new ht("document"),e}return F(n,[{key:"createElement",value:function(e){return new ht(e)}},{key:"createElementNS",value:function(e,t){return new ht("".concat(e,":").concat(t))}}]),n}(ot);tn.createElement=tn.prototype.createElement,tn.createElementNS=tn.prototype.createElementNS;var nn=Array.isArray,rn=Object.keys,an=Object.prototype.hasOwnProperty;var on=setTimeout,ln=clearTimeout,un=Object.freeze({__proto__:null,scheduleTimeout:on,cancelTimeout:ln,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,a){if(t){te(a,e.nodeId);var o=Object.entries(t).filter((function(e){return"function"!=typeof L(e,2)[1]}));0!==o.length&&o.forEach((function(t){var n=L(t,2),r=n[0],i=n[1];return e.setAttribute(r,i)}))}},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var a=n.createElement(e);return Object.keys(t).forEach((function(e){switch(e){case"children":break;case"nativeName":a.meta.component.name=t.nativeName;break;default:a.setAttribute(e,t[e])}})),[5,7].indexOf(i.tag)<0&&(a.meta.skipAddToDom=!0),te(i,a.nodeId),a},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",se(e)),i.meta={component:{name:"Text"}},te(r,i.nodeId),i},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={};return Object.keys(r).forEach((function(e){var t=n[e],a=r[e];switch(e){case"children":t===a||"number"!=typeof a&&"string"!=typeof a||(i[e]=a);break;default:(function e(t,n){if(t===n)return!0;if(t&&n&&"object"==R(t)&&"object"==R(n)){var r,i,a,o=nn(t),l=nn(n);if(o&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(o!=l)return!1;var u=t instanceof Date,s=n instanceof Date;if(u!=s)return!1;if(u&&s)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=rn(t);if((i=d.length)!==rn(n).length)return!1;for(r=i;0!=r--;)if(!an.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[a=d[r]],n[a]))return!1;return!0}return t!=t&&n!=n})(t,a)||(i[e]=a)}})),Object.keys(i).length?i:null},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),ae(t)},removeChildFromContainer:function(e,t){e.removeChild(t),ae(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=P(P({},t),{},{style:P(P({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),sn=o()(P(P({},un),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),cn=sn.createContainer,fn=sn.updateContainer,dn=sn.getPublicRootInstance,pn=['%c[Hippy-React "2.11.3"]%c',"color: #61dafb","color: auto"],hn=function(){function e(t){if(T(this,e),!t.appName||!t.entryPage)throw new TypeError("Invalid arguments");this.config=t,this.regist=this.start,this.render=this.render.bind(this);var n=new tn;this.rootContainer=cn(n,!1,!1)}return F(e,[{key:"start",value:function(){Mt.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,a=t.silent,o=void 0!==a&&a,l=t.bubbles,u=void 0!==l&&l,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;ue.apply(void 0,pn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&he(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];le=e}(u),J(f,this.rootContainer);var d=i.a.createElement(r,e);return fn(d,this.rootContainer,null,c),dn(this.rootContainer)}}],[{key:"Native",get:function(){return Ut}}]),e}();hn.version="2.11.3";var mn={registerComponent:function(e,t){new hn({appName:e,entryPage:t}).start()}},vn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,a=A(e,u),o=r;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},a))}}]),n}(i.a.Component);function yn(e,t){var n=e.style,r=A(e,s),a=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===R(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(a[0].color="#000"):"object"===R(n)&&void 0===n.color&&void 0===n.colors&&(a.color="#000")),r.text="","string"==typeof r.children)r.text=se(r.children);else if("number"==typeof r.children)r.text=se(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=se(o),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:a},r))}yn.displayName="Text";var gn=i.a.forwardRef(yn);gn.displayName="Text";var bn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"getImageUrls",value:function(e){var t=e.src,n=e.srcs,r=e.source,i=e.sources,a=[];if("string"==typeof t&&a.push(t),Array.isArray(n)&&(a=[].concat(k(a),k(n))),r)if("string"==typeof r)a.push(r);else if("object"===R(r)&&null!==r){var o=r.uri;o&&a.push(o)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?a.push(e):"object"===R(e)&&null!==e&&e.uri&&a.push(e.uri)})),a.length&&(a=a.map((function(e){return ve(e)}))),a}},{key:"handleTintColor",value:function(e,t,n){t&&(e.tintColor=Zt(t)),Array.isArray(n)&&(e.tintColors=en(n))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,a=e.imageRef,o=e.source,l=e.sources,u=e.src,s=e.srcs,f=e.tintColor,d=e.tintColors,p=A(e,c),h=this.getImageUrls({src:u,srcs:s,source:o,sources:l});if("ios"===Ht.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===Ht.platform.OS)if(1===h.length){var m=L(h,1);p.src=m[0]}else h.length>1&&(p.srcs=h);"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ve(p.defaultSource));var v=P({},n);return this.handleTintColor(v,f,d),p.style=v,t?i.a.createElement(vn,{style:n},i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:a,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:a}))}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=Le(e);return"function"==typeof t&&r.then((function(e){return t(e.width,e.height)})),"function"==typeof n?r.catch(n):r.catch((function(t){"Failed to get size for image: ".concat(e)})),r}}]),n}(i.a.Component);bn.prefetch=Oe;var kn=function(){function e(){T(this,e),this.Value=e.Value}return F(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new Be({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();kn.View=vn,kn.Text=gn,kn.Image=bn;var wn={step0:function(e){return e>0?1:0},step1:function(e){return e>=1?1:0},linear:function(){return"linear"},ease:function(){return"ease"},quad:function(e){return Math.pow(e,2)},cubic:function(e){return Math.pow(e,3)},poly:function(e){return function(t){return Math.pow(t,e)}},sin:function(e){return 1-Math.cos(e*Math.PI/2)},circle:function(e){return 1-Math.sqrt(1-e*e)},exp:function(e){return Math.pow(2,10*(e-1))},elastic:function(){return"elastic"},back:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(t){return t*t*((e+1)*t-e)}},bounce:function(e){var t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bezier:function(){return"bezier"},in:function(){return"ease-in"},out:function(){return"ease-out"},inOut:function(){return"ease-in-out"}};function Sn(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}var En=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"expandPullHeader",value:function(){xt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Ht.platform.OS?xt(this.instance,"collapsePullHeader",[e]):void 0!==e?xt(this.instance,"collapsePullHeaderWithOptions",[e]):xt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component),Cn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"expandPullFooter",value:function(){xt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){xt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component);Cn.defaultProps={sticky:!0};var xn={onDisappear:"onDisAppear"},Nn={onDisappear:"onDisappear"},In=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(x(r)),r.state={initialListReady:!1},r}return F(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"convertName",value:function(e){return"android"===Ht.platform.OS&&xn[e]?xn[e]:"ios"===Ht.platform.OS&&Nn[e]?Nn[e]:e}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&xt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&xt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"handleInitialListReady",value:function(){this.setState({initialListReady:!0})}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(En,{key:"pull-header",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Cn,{key:"pull-footer",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,a=n.onRowLayout,o=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof a&&(e.onLayout=function(e){a(e,t)}),"function"==typeof o){var u=o(t);Number.isInteger(u),e.type=u}"function"==typeof l&&(e.sticky=l(t))}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.style,a=t.renderRow,o=t.renderPullHeader,l=t.renderPullFooter,u=t.getRowType,s=t.getRowStyle,c=t.getRowKey,f=t.dataSource,d=t.initialListSize,h=t.rowShouldSticky,m=t.onRowLayout,v=t.onHeaderPulling,y=t.onHeaderReleased,g=t.onFooterPulling,b=t.onFooterReleased,k=t.onAppear,w=t.onDisappear,S=t.onWillAppear,E=t.onWillDisappear,C=A(t,p),x=[];if("function"==typeof a){var N=this.state.initialListReady,I=this.props.numberOfRows,_=this.getPullHeader(o,v,y),R=this.getPullFooter(l,g,b);!I&&f&&(I=f.length),N||(I=Math.min(I,d||10));for(var L=function(t){var n={},r=void 0;r=f?a(f[t],null,t):a(t),e.handleRowProps(n,t,{getRowKey:c,getRowStyle:s,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[{func:k,name:"onAppear"},{func:w,name:"onDisappear"},{func:S,name:"onWillAppear"},{func:E,name:"onWillDisappear"}].forEach((function(r){var i=r.func,a=r.name;"function"==typeof i&&(n[e.convertName(a)]=function(){i(t)})})),r&&x.push(i.a.createElement(Sn,Object.assign({},n),r))},O=0;O0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(e&&e.component){if(!this.routeList[e.routeName])new hn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),xt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),xt(this.instance,"pop",t)}}},{key:"clear",value:function(){this.stack.clear()}},{key:"render",value:function(){var e=this,t=this.props,n=t.initialRoute,r=(n.component,A(n,m)),a=A(t,v);return a.initialRoute=r,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:function(t){e.instance=t}},a))}}]),n}(i.a.Component);function Rn(e){return i.a.createElement("div",Object.assign({nativeName:"ViewPagerItem"},e,{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var Ln=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(x(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(x(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(x(r)),r}return F(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&xt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&xt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,a=A(t,y),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(Rn,Object.assign({},t),e)})):o.push(i.a.createElement(Rn,null,n)),"function"==typeof r&&(a.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:function(t){e.instance=t}},a),o)}}]),n}(i.a.Component);function On(){var e=V.platform.Localization;return!!e&&1===e.direction}var zn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(x(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(x(r)),r}return F(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.value,n=e.autoFocus;this._lastNativeText=t,n&&this.focus()}},{key:"componentWillUnmount",value:function(){this.blur()}},{key:"getValue",value:function(){var e=this;return new Promise((function(t){xt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return xt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){xt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){xt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){xt(this.instance,"showInputMethod",[])}},{key:"hideInputMethod",value:function(){xt(this.instance,"hideInputMethod",[])}},{key:"clear",value:function(){xt(this.instance,"clear",[])}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow,n=e;"android"===Ht.platform.OS&&(n.keyboardHeight/=Ht.screen.scale),"function"==typeof t&&t(n)}},{key:"render",value:function(){var e=this,t=P({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors"].forEach((function(n){"string"==typeof e.props[n]&&(Array.isArray(t.style)?t.style.push({[n]:e.props[n]}):t.style&&"object"===R(t.style)?t.style[n]=e.props[n]:t.style={[n]:e.props[n]},t[n]=void 0)})),On()&&(t.style?"object"!==R(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),i.a.createElement("div",Object.assign({nativeName:"TextInput"},t,{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}}]),n}(i.a.Component),Tn=Ht.window.scale,jn=Math.round(.4*Tn)/Tn;function Fn(e){return e}0===jn&&(jn=1/Tn);var Hn=Object.freeze({__proto__:null,get hairlineWidth(){return jn},create:Fn}),Mn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}},Un=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,a=n;"number"==typeof e||"object"===R(e)&&e&&(r=e.x,i=e.y,a=e.animated),r=r||0,i=i||0,a=!!a,xt(this.instance,"scrollTo",[r,i,a])}},{key:"scrollToWithDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;xt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}},{key:"render",value:function(){var e=this,t=this.props,n=t.horizontal,r=t.contentContainerStyle,a=t.children,o=t.style,l=[n?Mn.contentContainerHorizontal:Mn.contentContainerVertical,r],u=n?Object.assign({},Mn.baseHorizontal,o):Object.assign({},Mn.baseVertical,o);return n&&(u.flexDirection=On()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props,{style:u}),i.a.createElement(vn,{style:l},a))}}]),n}(i.a.Component),Dn={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}},Wn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).eventSubscription=null,r}return F(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Ht.platform.OS&&(this.eventSubscription=new Ie("modalDismissed"),this.eventSubscription.addCallback((function(t){var n=e.props,r=n.primaryKey,i=n.onDismiss;t.primaryKey===r&&"function"==typeof i&&i()})))}},{key:"componentWillUnmount",value:function(){"ios"===Ht.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,a=e.animated,o=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return o||(o="none",a&&(o="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:o,transparent:r,style:Dn.modal},this.props),i.a.createElement(vn,{style:[Dn.container,l]},t))}}]),n}(i.a.Component);Wn.defaultProps={visible:!0};var Bn=function(e){w(n,e);var t=E(n);function n(e){var r;T(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(x(r)),r}return F(n,[{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}},{key:"render",value:function(){var e,t=this.props,n=t.requestFocus,r=t.children,a=t.nextFocusDownId,o=t.nextFocusUpId,l=t.nextFocusLeftId,u=t.nextFocusRightId,s=t.style,c=t.noFocusStyle,f=t.focusStyle,d=t.onClick,p=this.state.isFocus,h=i.a.Children.only(r);h&&h.child&&h.child.memoizedProps&&h.child.memoizedProps.nativeName?e=h.child.memoizedProps.nativeName:h&&h.type&&h.type.displayName&&(e=h.type.displayName);var m=a&&Ct(a),v=o&&Ct(o),y=l&&Ct(l),g=u&&Ct(u),b=s;if("Text"!==e){var k=h.memoizedProps.style;b=P(P({},b),k)}if(Object.assign(b,p?f:c),"Text"===e)return i.a.createElement(vn,{focusable:!0,nextFocusDownId:m,nextFocusUpId:v,nextFocusLeftId:y,nextFocusRightId:g,requestFocus:n,style:b,onClick:d,onFocus:this.handleFocus},h);var w=h.memoizedProps.children;return i.a.cloneElement(h,{nextFocusDownId:a,nextFocusUpId:o,nextFocusLeftId:l,nextFocusRightId:u,requestFocus:n,onClick:d,focusable:!0,children:w,style:b,onFocus:this.handleFocus})}}]),n}(i.a.Component);function Vn(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}var $n,qn=function(){function e(t,n,r){var i=this;if(T(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),$n||($n=new Ie("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var a=P({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)a["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");a["Sec-WebSocket-Protocol"]=n}var o={headers:a,url:t};this.url=t,this.webSocketCallbackId=$n.addCallback(this.onWebSocketEvent),B.callNativeWithPromise("websocket","connect",o).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return F(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,B.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}},{key:"send",value:function(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: ".concat(R(e)));B.callNative("websocket","send",{id:this.webSocketId,data:e})}}},{key:"onopen",set:function(e){this.webSocketCallbacks.onOpen=e}},{key:"onclose",set:function(e){this.webSocketCallbacks.onClose=e}},{key:"onerror",set:function(e){this.webSocketCallbacks.onError=e}},{key:"onmessage",set:function(e){this.webSocketCallbacks.onMessage=e}},{key:"onWebSocketEvent",value:function(e){if("object"===R(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,$n.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}(),Qn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,a=A(e,g),o=r;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},a))}}]),n}(i.a.Component);function Kn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}var Gn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(x(r)),r}return F(n,[{key:"componentDidMount",value:function(){this.props.getItemKey}},{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;xt(this.instance,"scrollToIndex",[n,n,i])}},{key:"scrollToContentOffset",value:function(e){var t=e.xOffset,n=void 0===t?0:t,r=e.yOffset,i=void 0===r?0:r,a=e.animated,o=void 0===a||a;xt(this.instance,"scrollToContentOffset",[n,i,o])}},{key:"handleRowProps",value:function(e,t,n){var r=this,i=n.getItemKey,a=n.getItemStyle,o=n.onItemLayout,l=n.getItemType;if("function"==typeof i&&(e.key=i(t)),"function"==typeof a&&(e.style=a(t)),"function"==typeof o&&(e.onLayout=function(e){o.call(r,e,t)}),"function"==typeof l){var u=l(t);Number.isInteger(u),e.type=u}}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(En,{key:"PullHeader",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Cn,{key:"PullFooter",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleInitialListReady",value:function(){var e=this.props.onInitialListReady;"function"==typeof e&&e()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,a=t.renderBanner,o=t.numberOfColumns,l=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,g=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,N=t.onHeaderPulling,I=t.onHeaderReleased,_=t.onFooterPulling,R=t.onFooterReleased,L=t.containPullHeader,O=void 0!==L&&L,z=t.containPullFooter,T=void 0!==z&&z,j=t.containBannerView,F=void 0!==j&&j,H=P(P({},A(t,b)),{},{style:r,numberOfColumns:l,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:O,containPullFooter:T,containBannerView:F}),M=[];if("function"==typeof a){var U=a();U&&(M.push(i.a.createElement(Qn,{key:"bannerView"},i.a.cloneElement(U))),H.containBannerView=!0)}if("function"==typeof v){for(var D=this.getPullHeader(y,N,I),W=this.getPullFooter(g,_,R),B=0;B0||e.didTimeout)&&function e(t){"number"==typeof t?ne(t):t&&(ne(t.nodeId),t.childNodes&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var oe=new RegExp(/^\d+$/),le=!1;function ue(){}function se(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var ce=new RegExp("^on.+Capture$");var fe=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function de(e){if("number"==typeof e)return e;if("string"==typeof e&&fe.test(e))try{return parseFloat(e)}catch(t){return e}return e}function pe(e){return"[object Function]"===Object.prototype.toString.call(e)}function he(e){e}function me(){return le}function ve(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function ye(e){return 5===e}var ge=function(){function e(t){T(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return F(e,[{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"removeEventHandler",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");var t="eventHandler_".concat(e);this.handlerContainer[t]&&delete this.handlerContainer[t]}},{key:"notifyEvent",value:function(e){var t=this;Object.keys(this.handlerContainer).forEach((function(n){var r=t.handlerContainer[n];r&&r.eventHandler&&(r.context?r.eventHandler.call(r.context,e):r.eventHandler(e))}))}},{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}}]),e}(),be=function(){function e(t,n,r){T(this,e),this.type=t,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=n,this.target=r}return F(e,[{key:"stopPropagation",value:function(){this.bubbles=!1}}]),e}(),ke=new Map,we=["%c[event]%c","color: green","color: auto"];function Se(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: ".concat(e));return ke.get(e)||null}function Ee(e,t){var n=e;return t.memoizedProps&&!t.memoizedProps[e]&&"onClick"===e&&t.memoizedProps.onPress&&(n="onPress"),n}function Ce(e,t){return!(!t.memoizedProps||"function"!=typeof t.memoizedProps[e])}var xe={registerNativeEventHub:function(e){if(ue.apply(void 0,we.concat(["registerNativeEventHub",e])),"string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: ".concat(e));var t=ke.get(e);return t||(t=new ge(e),ke.set(e,t)),t},getHippyEventHub:Se,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: ".concat(e));ke.has(e)&&ke.delete(e)},receiveNativeEvent:function(e){if(ue.apply(void 0,we.concat(["receiveNativeEvent",e])),!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: ".concat(JSON.stringify(e)));var t=L(e,2),n=t[0],r=t[1];if("string"!=typeof n)throw new TypeError("Invalid arguments");var i=Se(n);i&&i.notifyEvent(r)},receiveNativeGesture:function(e){if(ue.apply(void 0,we.concat(["receiveNativeGesture",e])),e){var t=ie(e.id);if(t){var n=!0,r=e.name;r=Ee(r,t);var i="".concat(r,"Capture"),a=t;t.memoizedProps&&"function"!=typeof t.memoizedProps[i]&&(n=!1),n?function(e,t,n){for(var r=[],i=n,a=e;i;){a=Ee(a,i);var o="".concat(a,"Capture");for(Ce(o,i)&&r.unshift({eventName:o,listener:i.memoizedProps[o],isCapture:!0,currentTarget:re(i)}),Ce(a,i)&&r.push({eventName:a,listener:i.memoizedProps[a],isCapture:!1,currentTarget:re(i)}),i=i.return;i&&!ye(i.tag);)i=i.return}if(r.length>0)for(var l,u=!1,s=re(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new be(f,d,s);Object.assign(m,t),h?p(m):("boolean"!=typeof(u=p(m))&&(u=!me()),m.bubbles||(u=!0))}catch(e){console.reportUncaughtException(e)}}(r,e,a):function(e,t,n){var r=!1,i=n,a=e,o=re(n);do{if(Ce(a=Ee(a,i),i))try{var l=re(i),u=new be(a,l,o);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[a](u))&&(r=!me()),u.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!ye(i.tag);)i=i.return}while(!r&&i)}(r,e,a)}}},receiveUIComponentEvent:function(e){if(ue.apply(void 0,we.concat(["receiveUIComponentEvent",e])),e&&Array.isArray(e)&&!(e.length<2)){var t=L(e,3),n=t[0],r=t[1],i=t[2];if("number"==typeof n&&"string"==typeof r){var a=ie(n);a&&Ce(r,a)&&a.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=xe);var Ne=function(){function e(t,n){T(this,e),this.callback=t,this.bindListener=n}return F(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),Ie=function(){function e(t){T(this,e),this.eventName=t,this.listenerIds=[]}return F(e,[{key:"addCallback",value:function(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");var n=xe.registerNativeEventHub(this.eventName);if(!n)throw new ReferenceError("No listeners for ".concat(this.eventName));var r=n.addEventHandler(e,t);if("number"!=typeof r)throw new Error("Fail to addEventHandler");return this.listenerIds.push(r),r}},{key:"removeCallback",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments");var t=xe.getHippyEventHub(this.eventName);if(!t)throw new ReferenceError("No listeners for ".concat(this.eventName));t.removeEventHandler(e);for(var n=this.listenerIds.length,r=0;r=0?Zt(t):t}var Be=function(){function e(t){T(this,e);var n=0;if(t.startValue&&t.startValue.constructor&&"Animation"===t.startValue.constructor.name)n={animationId:t.startValue.animationId};else{var r=t.startValue;n=We(t.valueType,r)}var i=We(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=n||0,this.toValue=i||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Ue(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return F(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();var t="onAnimation";"android"===Ht.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=De.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=De.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=De.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=De.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ft.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ft.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==R(t))throw new TypeError("Invalid arguments");if("string"==typeof t.mode&&t.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(t).forEach((function(r){var i=t[r];if("startValue"===r){var a=0;if(t.startValue instanceof e)a={animationId:t.startValue.animationId};else{var o=t.startValue;a=We(n.valueType,o)}n.startValue=a||0}else"repeatCount"===r?n.repeatCount=Ue(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Ft.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:We(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),Ve=new _e,$e=function(){function e(t){var n=this;T(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Ue(t.repeatCount||0),children:this.animationList,virtual:t.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return F(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();var t="onAnimation";"android"===Ht.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ve.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ve.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ve.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ve.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ft.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),this.animationList.forEach((function(e){return Number.isInteger(e.animationId)&&Ft.callNative("AnimationModule","destroyAnimation",e.animationId)})),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ft.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),qe=["%c[native]%c","color: red","color: auto"],Qe={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")},Ke=!0,Ge=[];function Ye(){Ke&&bt()}function Xe(e){Ke&&(Ke=!1,Promise.resolve().then((function(){(function(e){for(var t=[],n=0;n2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=Z();if(tt(e)&&!e.isMounted){var i=et(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));Ye(),Ge.push({type:Qe.createNode,nodes:i}),Xe(r)}else if(e.isMounted&&!t.isMounted){var a=et(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));Ye(),Ge.push({type:Qe.createNode,nodes:a}),Xe(r)}}}function rt(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=Z(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Ye(),Ge.push({type:Qe.deleteNode,nodes:i}),Xe(r)}}function it(e){if(e.isMounted){var t=Z(),n=Ze(t,e);Ye(),n&&Ge.push({type:Qe.updateNode,nodes:[n]}),Xe(t)}}var at=0;var ot=function(){function e(){T(this,e),this.meta={component:{}},this.mounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.nodeId=((at+=1)%10==0&&(at+=1),at)}return F(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),nt(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),rt(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),nt(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),nt(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),rt(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),lt={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},ut={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},st="turn",ct="rad",ft="deg";function dt(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(Array.isArray(n)){var r="180",i=L(n,3),a=i[0],o=i[1],l=i[2];return o&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft,n=parseFloat(e),r=e||"",i=e.split("."),a=L(i,2),o=a[1];switch(o&&o.length>2&&(r=n.toFixed(2)),t){case st:r="".concat((360*n).toFixed(2));break;case ct:r="".concat((180/Math.PI*n).toFixed(2))}return r}(o,l):a&&void 0!==ut[a]&&(r=ut[a]),r}}function pt(e){var t=L((e||"").replace(/\s+/g," ").trim().split(/\s+(?![^(]*?\))/),2),n=t[0],r=t[1],i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Zt(n)}:void 0:{color:Zt(n)}}var ht=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.tagName=e,r}return F(n,[{key:"nativeName",get:function(){return this.meta.component.name}},{key:"toString",value:function(){return"".concat(this.tagName,":(").concat(this.nativeName,")")}},{key:"hasAttribute",value:function(e){return!!this.attributes[e]}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setStyleAttribute",value:function(e){var t=this;this.style={};var n=e;if(!Array.isArray(n)&&Object.hasOwnProperty.call(n,0)){var r=[],i={};Object.keys(n).forEach((function(e){var t;t=e,oe.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var a={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){a=P(P({},a),e)})):"object"===R(e)&&e&&(a=P(P({},a),e))})),Object.keys(a).forEach((function(e){var n=a[e];if(Object.prototype.hasOwnProperty.call(lt,e)&&(e=lt[e]),"transform"===e){var r={};if(!Array.isArray(n))throw new TypeError("transform only support array args");n.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n instanceof Be||n instanceof $e?r[t]={animationId:n.animationId}:null===n?r[t]&&delete r[t]:void 0!==n&&(r[t]=n)}))}));var i=Object.keys(r);i.length&&(Array.isArray(t.style.transform)||(t.style.transform=[]),i.forEach((function(e){return t.style.transform.push({[e]:r[e]})})))}else if(null===n&&void 0!==t.style[e])t.style[e]=void 0;else if(n instanceof Be||n instanceof $e)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=en(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=Zt(n);else if("backgroundImage"===e&&n)t.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){var r=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),i=[];n.linearGradient=n.linearGradient||{},r.forEach((function(e,t){if(0===t){var r=dt(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var a=pt(e);a&&i.push(a)}}else{var o=pt(e);o&&i.push(o)}})),n.linearGradient.colorStopList=i}else n[e]=ve(t);return n}(e,n,t.style);else if("textShadowOffset"===e){var o=n||{},l=o.x,u=void 0===l?0:l,s=o.width,c=void 0===s?0:s,f=o.y,d=void 0===f?0:f,p=o.height,h=void 0===p?0:p;t.style[e]={width:u||c,height:d||h}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?t.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,n,t.style):t.style[e]=n}))}},{key:"setAttribute",value:function(e,t){var n=this;try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void it(this);var r=!1;if([{match:function(){return["id"].indexOf(e)>=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=Z(),n=et(t,e);Ye(),Ge.push({type:Qe.updateNode,nodes:n}),Xe(t)}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=se(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["numberOfRows"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,"ios"!==Ht.platform.OS}},{match:function(){return["onPress"].indexOf(e)>=0},action:function(){return n.attributes.onClick=!0,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==R(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){var r;return"function"==typeof t?(r=e,ce.test(r)&&(e=e.replace("Capture","")),n.attributes[e]=!0):n.attributes[e]=t,!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r)return;var i=!1;Object.keys(this.style).some((function(e){var t=n.style[e];if(t&&Array.isArray(t)&&"transform"===e)for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(lt,e)&&(i=lt[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?en(r):i.toLowerCase().indexOf("color")>-1?Zt(r):de(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||it(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),it(this)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=se(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(ot),mt=$.createNode,vt=$.updateNode,yt=$.deleteNode,gt=$.flushBatch,bt=$.startBatch,kt=$.endBatch,wt=$.sendRenderError,St=function(e){return ee((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function Et(e){if(e instanceof ht)return e;var t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){for(var n=t.child;n&&!(n.stateNode instanceof ht);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function Ct(e){var t=e;if("string"==typeof e){"getNodeIdByRef('".concat(e,"') use string ref will affect to performance, recommend use reference to the ref instead");var n=ee((function(t){return!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e}));if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){var r=Et(t);return r?r.nodeId:0}return t.nodeId}function xt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=Et(e);i&&(r=i.nodeId,n=i.nativeName)}if(!n)throw new Error("callUIFunction is calling a unnamed component");if(!r)throw new Error("callUIFunction is calling a component have no nodeId");for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l255?255:t}function Qt(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Kt(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Gt(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Kt(i,r,e+1/3),o=Kt(i,r,e),l=Kt(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*l)<<8}function Yt(e){return(parseFloat(e)%360+360)%360/360}function Xt(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function Jt(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$t.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(Wt,e)?Wt[e]:(t=$t.rgb.exec(e),Array.isArray(t)?(qt(t[1])<<24|qt(t[2])<<16|qt(t[3])<<8|255)>>>0:(t=$t.rgba.exec(e))?(qt(t[1])<<24|qt(t[2])<<16|qt(t[3])<<8|Qt(t[4]))>>>0:(t=$t.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=$t.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=$t.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=$t.hsl.exec(e))?(255|Gt(Yt(t[1]),Xt(t[2]),Xt(t[3])))>>>0:(t=$t.hsla.exec(e))?(Gt(Yt(t[1]),Xt(t[2]),Xt(t[3]))|Qt(t[4]))>>>0:null))}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=Jt(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function en(e,t){return Array.isArray(e)?e.map((function(e){return Zt(e,t)})):[0]}var tn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.call(this)).documentElement=new ht("document"),e}return F(n,[{key:"createElement",value:function(e){return new ht(e)}},{key:"createElementNS",value:function(e,t){return new ht("".concat(e,":").concat(t))}}]),n}(ot);tn.createElement=tn.prototype.createElement,tn.createElementNS=tn.prototype.createElementNS;var nn=Array.isArray,rn=Object.keys,an=Object.prototype.hasOwnProperty,on=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==R(t)&&"object"==R(n)){var r,i,a,o=nn(t),l=nn(n);if(o&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(o!=l)return!1;var u=t instanceof Date,s=n instanceof Date;if(u!=s)return!1;if(u&&s)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=rn(t);if((i=d.length)!==rn(n).length)return!1;for(r=i;0!=r--;)if(!an.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[a=d[r]],n[a]))return!1;return!0}return t!=t&&n!=n};var ln=setTimeout,un=clearTimeout,sn=Object.freeze({__proto__:null,scheduleTimeout:ln,cancelTimeout:un,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,a){te(a,e.nodeId);var o=Object.keys(t);0!==o.length&&o.forEach((function(n){return e.setAttribute(n,t[n])}))},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var a=n.createElement(e);return Object.keys(t).forEach((function(e){switch(e){case"children":break;case"nativeName":a.meta.component.name=t.nativeName;break;default:a.setAttribute(e,t[e])}})),[5,7].indexOf(i.tag)<0&&(a.meta.skipAddToDom=!0),te(i,a.nodeId),a},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",se(e)),i.meta={component:{name:"Text"}},te(r,i.nodeId),i},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={},a=!1;Object.keys(r).forEach((function(e){var t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:"function"!=typeof t||"function"!=typeof o||on(t,o)?on(t,o)||(i[e]=o):a=!0}}));var o=0===Object.keys(i).length;return o&&a?{}:o?null:i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),ae(t)},removeChildFromContainer:function(e,t){e.removeChild(t),ae(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=P(P({},t),{},{style:P(P({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),cn=o()(P(P({},sn),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),fn=cn.createContainer,dn=cn.updateContainer,pn=cn.getPublicRootInstance,hn=['%c[Hippy-React "2.11.4"]%c',"color: #61dafb","color: auto"],mn=function(){function e(t){if(T(this,e),!t.appName||!t.entryPage)throw new TypeError("Invalid arguments");this.config=t,this.regist=this.start,this.render=this.render.bind(this);var n=new tn;this.rootContainer=fn(n,!1,!1)}return F(e,[{key:"start",value:function(){Mt.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,a=t.silent,o=void 0!==a&&a,l=t.bubbles,u=void 0!==l&&l,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;ue.apply(void 0,hn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&he(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];le=e}(u),J(f,this.rootContainer);var d=i.a.createElement(r,e);return dn(d,this.rootContainer,null,c),pn(this.rootContainer)}}],[{key:"Native",get:function(){return Ut}}]),e}();mn.version="2.11.4";var vn={registerComponent:function(e,t){new mn({appName:e,entryPage:t}).start()}},yn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,a=A(e,u),o=r;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},a))}}]),n}(i.a.Component);function gn(e,t){var n=e.style,r=A(e,s),a=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===R(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(a[0].color="#000"):"object"===R(n)&&void 0===n.color&&void 0===n.colors&&(a.color="#000")),r.text="","string"==typeof r.children)r.text=se(r.children);else if("number"==typeof r.children)r.text=se(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=se(o),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:a},r))}gn.displayName="Text";var bn=i.a.forwardRef(gn);bn.displayName="Text";var kn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"getImageUrls",value:function(e){var t=e.src,n=e.srcs,r=e.source,i=e.sources,a=[];if("string"==typeof t&&a.push(t),Array.isArray(n)&&(a=[].concat(k(a),k(n))),r)if("string"==typeof r)a.push(r);else if("object"===R(r)&&null!==r){var o=r.uri;o&&a.push(o)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?a.push(e):"object"===R(e)&&null!==e&&e.uri&&a.push(e.uri)})),a.length&&(a=a.map((function(e){return ve(e)}))),a}},{key:"handleTintColor",value:function(e,t,n){t&&(e.tintColor=Zt(t)),Array.isArray(n)&&(e.tintColors=en(n))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,a=e.imageRef,o=e.source,l=e.sources,u=e.src,s=e.srcs,f=e.tintColor,d=e.tintColors,p=A(e,c),h=this.getImageUrls({src:u,srcs:s,source:o,sources:l});if("ios"===Ht.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===Ht.platform.OS)if(1===h.length){var m=L(h,1);p.src=m[0]}else h.length>1&&(p.srcs=h);"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ve(p.defaultSource));var v=P({},n);return this.handleTintColor(v,f,d),p.style=v,t?i.a.createElement(yn,{style:n},i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:a,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",Object.assign({},p,{nativeName:"Image",alt:"",ref:a}))}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=Le(e);return"function"==typeof t&&r.then((function(e){return t(e.width,e.height)})),"function"==typeof n?r.catch(n):r.catch((function(t){"Failed to get size for image: ".concat(e)})),r}}]),n}(i.a.Component);kn.prefetch=Oe;var wn=function(){function e(){T(this,e),this.Value=e.Value}return F(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new Be({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();wn.View=yn,wn.Text=bn,wn.Image=kn;var Sn={step0:function(e){return e>0?1:0},step1:function(e){return e>=1?1:0},linear:function(){return"linear"},ease:function(){return"ease"},quad:function(e){return Math.pow(e,2)},cubic:function(e){return Math.pow(e,3)},poly:function(e){return function(t){return Math.pow(t,e)}},sin:function(e){return 1-Math.cos(e*Math.PI/2)},circle:function(e){return 1-Math.sqrt(1-e*e)},exp:function(e){return Math.pow(2,10*(e-1))},elastic:function(){return"elastic"},back:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(t){return t*t*((e+1)*t-e)}},bounce:function(e){var t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bezier:function(){return"bezier"},in:function(){return"ease-in"},out:function(){return"ease-out"},inOut:function(){return"ease-in-out"}};function En(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}var Cn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"expandPullHeader",value:function(){xt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Ht.platform.OS?xt(this.instance,"collapsePullHeader",[e]):void 0!==e?xt(this.instance,"collapsePullHeaderWithOptions",[e]):xt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component),xn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"expandPullFooter",value:function(){xt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){xt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component);xn.defaultProps={sticky:!0};var Nn={onDisappear:"onDisAppear"},In={onDisappear:"onDisappear"},Pn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(x(r)),r.state={initialListReady:!1},r}return F(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"convertName",value:function(e){return"android"===Ht.platform.OS&&Nn[e]?Nn[e]:"ios"===Ht.platform.OS&&In[e]?In[e]:e}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&xt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&xt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"handleInitialListReady",value:function(){this.setState({initialListReady:!0})}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Cn,{key:"pull-header",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(xn,{key:"pull-footer",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,a=n.onRowLayout,o=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof a&&(e.onLayout=function(e){a(e,t)}),"function"==typeof o){var u=o(t);Number.isInteger(u),e.type=u}"function"==typeof l&&(e.sticky=l(t))}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.style,a=t.renderRow,o=t.renderPullHeader,l=t.renderPullFooter,u=t.getRowType,s=t.getRowStyle,c=t.getRowKey,f=t.dataSource,d=t.initialListSize,h=t.rowShouldSticky,m=t.onRowLayout,v=t.onHeaderPulling,y=t.onHeaderReleased,g=t.onFooterPulling,b=t.onFooterReleased,k=t.onAppear,w=t.onDisappear,S=t.onWillAppear,E=t.onWillDisappear,C=A(t,p),x=[];if("function"==typeof a){var N=this.state.initialListReady,I=this.props.numberOfRows,_=this.getPullHeader(o,v,y),R=this.getPullFooter(l,g,b);!I&&f&&(I=f.length),N||(I=Math.min(I,d||10));for(var L=function(t){var n={},r=void 0;r=f?a(f[t],null,t):a(t),e.handleRowProps(n,t,{getRowKey:c,getRowStyle:s,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[{func:k,name:"onAppear"},{func:w,name:"onDisappear"},{func:S,name:"onWillAppear"},{func:E,name:"onWillDisappear"}].forEach((function(r){var i=r.func,a=r.name;"function"==typeof i&&(n[e.convertName(a)]=function(){i(t)})})),r&&x.push(i.a.createElement(En,Object.assign({},n),r))},O=0;O0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(e&&e.component){if(!this.routeList[e.routeName])new mn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),xt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),xt(this.instance,"pop",t)}}},{key:"clear",value:function(){this.stack.clear()}},{key:"render",value:function(){var e=this,t=this.props,n=t.initialRoute,r=(n.component,A(n,m)),a=A(t,v);return a.initialRoute=r,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:function(t){e.instance=t}},a))}}]),n}(i.a.Component);function Ln(e){return i.a.createElement("div",Object.assign({nativeName:"ViewPagerItem"},e,{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var On=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(x(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(x(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(x(r)),r}return F(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&xt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&xt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,a=A(t,y),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(Ln,Object.assign({},t),e)})):o.push(i.a.createElement(Ln,null,n)),"function"==typeof r&&(a.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:function(t){e.instance=t}},a),o)}}]),n}(i.a.Component);function zn(){var e=V.platform.Localization;return!!e&&1===e.direction}var Tn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(x(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(x(r)),r}return F(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.value,n=e.autoFocus;this._lastNativeText=t,n&&this.focus()}},{key:"componentWillUnmount",value:function(){this.blur()}},{key:"getValue",value:function(){var e=this;return new Promise((function(t){xt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return xt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){xt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){xt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){xt(this.instance,"showInputMethod",[])}},{key:"hideInputMethod",value:function(){xt(this.instance,"hideInputMethod",[])}},{key:"clear",value:function(){xt(this.instance,"clear",[])}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow,n=e;"android"===Ht.platform.OS&&(n.keyboardHeight/=Ht.screen.scale),"function"==typeof t&&t(n)}},{key:"render",value:function(){var e=this,t=P({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors"].forEach((function(n){"string"==typeof e.props[n]&&(Array.isArray(t.style)?t.style.push({[n]:e.props[n]}):t.style&&"object"===R(t.style)?t.style[n]=e.props[n]:t.style={[n]:e.props[n]},t[n]=void 0)})),zn()&&(t.style?"object"!==R(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),i.a.createElement("div",Object.assign({nativeName:"TextInput"},t,{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}}]),n}(i.a.Component),jn=Ht.window.scale,Fn=Math.round(.4*jn)/jn;function Hn(e){return e}0===Fn&&(Fn=1/jn);var Mn=Object.freeze({__proto__:null,get hairlineWidth(){return Fn},create:Hn}),Un={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}},Dn=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.apply(this,arguments)).instance=null,e}return F(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,a=n;"number"==typeof e||"object"===R(e)&&e&&(r=e.x,i=e.y,a=e.animated),r=r||0,i=i||0,a=!!a,xt(this.instance,"scrollTo",[r,i,a])}},{key:"scrollToWithDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;xt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}},{key:"render",value:function(){var e=this,t=this.props,n=t.horizontal,r=t.contentContainerStyle,a=t.children,o=t.style,l=[n?Un.contentContainerHorizontal:Un.contentContainerVertical,r],u=n?Object.assign({},Un.baseHorizontal,o):Object.assign({},Un.baseVertical,o);return n&&(u.flexDirection=zn()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props,{style:u}),i.a.createElement(yn,{style:l},a))}}]),n}(i.a.Component),Wn={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}},Bn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).eventSubscription=null,r}return F(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Ht.platform.OS&&(this.eventSubscription=new Ie("modalDismissed"),this.eventSubscription.addCallback((function(t){var n=e.props,r=n.primaryKey,i=n.onDismiss;t.primaryKey===r&&"function"==typeof i&&i()})))}},{key:"componentWillUnmount",value:function(){"ios"===Ht.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,a=e.animated,o=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return o||(o="none",a&&(o="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:o,transparent:r,style:Wn.modal},this.props),i.a.createElement(yn,{style:[Wn.container,l]},t))}}]),n}(i.a.Component);Bn.defaultProps={visible:!0};var Vn=function(e){w(n,e);var t=E(n);function n(e){var r;T(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(x(r)),r}return F(n,[{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}},{key:"render",value:function(){var e,t=this.props,n=t.requestFocus,r=t.children,a=t.nextFocusDownId,o=t.nextFocusUpId,l=t.nextFocusLeftId,u=t.nextFocusRightId,s=t.style,c=t.noFocusStyle,f=t.focusStyle,d=t.onClick,p=this.state.isFocus,h=i.a.Children.only(r);h&&h.child&&h.child.memoizedProps&&h.child.memoizedProps.nativeName?e=h.child.memoizedProps.nativeName:h&&h.type&&h.type.displayName&&(e=h.type.displayName);var m=a&&Ct(a),v=o&&Ct(o),y=l&&Ct(l),g=u&&Ct(u),b=s;if("Text"!==e){var k=h.memoizedProps.style;b=P(P({},b),k)}if(Object.assign(b,p?f:c),"Text"===e)return i.a.createElement(yn,{focusable:!0,nextFocusDownId:m,nextFocusUpId:v,nextFocusLeftId:y,nextFocusRightId:g,requestFocus:n,style:b,onClick:d,onFocus:this.handleFocus},h);var w=h.memoizedProps.children;return i.a.cloneElement(h,{nextFocusDownId:a,nextFocusUpId:o,nextFocusLeftId:l,nextFocusRightId:u,requestFocus:n,onClick:d,focusable:!0,children:w,style:b,onFocus:this.handleFocus})}}]),n}(i.a.Component);function $n(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}var qn,Qn=function(){function e(t,n,r){var i=this;if(T(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),qn||(qn=new Ie("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var a=P({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)a["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");a["Sec-WebSocket-Protocol"]=n}var o={headers:a,url:t};this.url=t,this.webSocketCallbackId=qn.addCallback(this.onWebSocketEvent),B.callNativeWithPromise("websocket","connect",o).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return F(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,B.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}},{key:"send",value:function(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: ".concat(R(e)));B.callNative("websocket","send",{id:this.webSocketId,data:e})}}},{key:"onopen",set:function(e){this.webSocketCallbacks.onOpen=e}},{key:"onclose",set:function(e){this.webSocketCallbacks.onClose=e}},{key:"onerror",set:function(e){this.webSocketCallbacks.onError=e}},{key:"onmessage",set:function(e){this.webSocketCallbacks.onMessage=e}},{key:"onWebSocketEvent",value:function(e){if("object"===R(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,qn.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}(),Kn=function(e){w(n,e);var t=E(n);function n(){return T(this,n),t.apply(this,arguments)}return F(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,a=A(e,g),o=r;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},a))}}]),n}(i.a.Component);function Gn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}var Yn=function(e){w(n,e);var t=E(n);function n(e){var r;return T(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(x(r)),r}return F(n,[{key:"componentDidMount",value:function(){this.props.getItemKey}},{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;xt(this.instance,"scrollToIndex",[n,n,i])}},{key:"scrollToContentOffset",value:function(e){var t=e.xOffset,n=void 0===t?0:t,r=e.yOffset,i=void 0===r?0:r,a=e.animated,o=void 0===a||a;xt(this.instance,"scrollToContentOffset",[n,i,o])}},{key:"handleRowProps",value:function(e,t,n){var r=this,i=n.getItemKey,a=n.getItemStyle,o=n.onItemLayout,l=n.getItemType;if("function"==typeof i&&(e.key=i(t)),"function"==typeof a&&(e.style=a(t)),"function"==typeof o&&(e.onLayout=function(e){o.call(r,e,t)}),"function"==typeof l){var u=l(t);Number.isInteger(u),e.type=u}}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Cn,{key:"PullHeader",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(xn,{key:"PullFooter",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleInitialListReady",value:function(){var e=this.props.onInitialListReady;"function"==typeof e&&e()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,a=t.renderBanner,o=t.numberOfColumns,l=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,g=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,N=t.onHeaderPulling,I=t.onHeaderReleased,_=t.onFooterPulling,R=t.onFooterReleased,L=t.containPullHeader,O=void 0!==L&&L,z=t.containPullFooter,T=void 0!==z&&z,j=t.containBannerView,F=void 0!==j&&j,H=P(P({},A(t,b)),{},{style:r,numberOfColumns:l,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:O,containPullFooter:T,containBannerView:F}),M=[];if("function"==typeof a){var U=a();U&&(M.push(i.a.createElement(Kn,{key:"bannerView"},i.a.cloneElement(U))),H.containBannerView=!0)}if("function"==typeof v){for(var D=this.getPullHeader(y,N,I),W=this.getPullFooter(g,_,R),B=0;B *HippyModuleClasses; NSArray *HippyGetModuleClasses(void) { diff --git a/lerna.json b/lerna.json index 438dcdd827f..6cb4961d37a 100644 --- a/lerna.json +++ b/lerna.json @@ -3,5 +3,5 @@ "packages": [ "packages/*" ], - "version": "2.11.3" + "version": "2.11.4" } diff --git a/packages/hippy-debug-server/CHANGELOG.md b/packages/hippy-debug-server/CHANGELOG.md index b5ad2dfca68..b59d4633213 100644 --- a/packages/hippy-debug-server/CHANGELOG.md +++ b/packages/hippy-debug-server/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-debug-server/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/debug-server + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-debug-server/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/debug-server diff --git a/packages/hippy-debug-server/package-lock.json b/packages/hippy-debug-server/package-lock.json index 21ceaec0ab6..ba8a2d6b92c 100644 --- a/packages/hippy-debug-server/package-lock.json +++ b/packages/hippy-debug-server/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/debug-server", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-debug-server/package.json b/packages/hippy-debug-server/package.json index 827f20b1450..5d61591da8b 100644 --- a/packages/hippy-debug-server/package.json +++ b/packages/hippy-debug-server/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/debug-server", - "version": "2.11.3", + "version": "2.11.4", "description": "Dev server for hippy-core.", "repository": "https://github.com/Tencent/Hippy/tree/master/packages/hippy-debug-server", "homepage": "http://hippyjs.org", diff --git a/packages/hippy-react-web/CHANGELOG.md b/packages/hippy-react-web/CHANGELOG.md index 5ebb2eed8ee..d76d40b90ea 100644 --- a/packages/hippy-react-web/CHANGELOG.md +++ b/packages/hippy-react-web/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-react-web/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/react-web + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-react-web/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/react-web diff --git a/packages/hippy-react-web/package-lock.json b/packages/hippy-react-web/package-lock.json index 966fdd59143..5bba5475df4 100644 --- a/packages/hippy-react-web/package-lock.json +++ b/packages/hippy-react-web/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/react-web", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-react-web/package.json b/packages/hippy-react-web/package.json index f86dcaac32c..7d2223b57a8 100644 --- a/packages/hippy-react-web/package.json +++ b/packages/hippy-react-web/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/react-web", - "version": "2.11.3", + "version": "2.11.4", "description": "Web Adapter for Hippy React", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/hippy-react/CHANGELOG.md b/packages/hippy-react/CHANGELOG.md index d19f14147c7..65ad6840a91 100644 --- a/packages/hippy-react/CHANGELOG.md +++ b/packages/hippy-react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-react/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/react + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-react/compare/2.11.2...2.11.3) (2021-12-08) diff --git a/packages/hippy-react/package-lock.json b/packages/hippy-react/package-lock.json index 19255df7b46..999f4621782 100644 --- a/packages/hippy-react/package-lock.json +++ b/packages/hippy-react/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/react", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-react/package.json b/packages/hippy-react/package.json index 3c06d386582..560ea251dfd 100644 --- a/packages/hippy-react/package.json +++ b/packages/hippy-react/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/react", - "version": "2.11.3", + "version": "2.11.4", "description": "Hippy react framework", "main": "dist/index.js", "homepage": "http://hippyjs.org", diff --git a/packages/hippy-vue-css-loader/CHANGELOG.md b/packages/hippy-vue-css-loader/CHANGELOG.md index 2f18b53737d..037a00a7276 100644 --- a/packages/hippy-vue-css-loader/CHANGELOG.md +++ b/packages/hippy-vue-css-loader/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-css-loader/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/vue-css-loader + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-css-loader/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/vue-css-loader diff --git a/packages/hippy-vue-css-loader/package-lock.json b/packages/hippy-vue-css-loader/package-lock.json index ed4c066c9a2..6c6d498f384 100644 --- a/packages/hippy-vue-css-loader/package-lock.json +++ b/packages/hippy-vue-css-loader/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-css-loader", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-vue-css-loader/package.json b/packages/hippy-vue-css-loader/package.json index bb4d148a8ed..418a0791bb7 100644 --- a/packages/hippy-vue-css-loader/package.json +++ b/packages/hippy-vue-css-loader/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-css-loader", - "version": "2.11.3", + "version": "2.11.4", "description": "hippy-vue style loader module for webpack", "main": "dist/index.js", "homepage": "http://hippyjs.org", diff --git a/packages/hippy-vue-native-components/CHANGELOG.md b/packages/hippy-vue-native-components/CHANGELOG.md index ad9d86fa70b..b15172155b0 100644 --- a/packages/hippy-vue-native-components/CHANGELOG.md +++ b/packages/hippy-vue-native-components/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-native-components/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/vue-native-components + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-native-components/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/vue-native-components diff --git a/packages/hippy-vue-native-components/package.json b/packages/hippy-vue-native-components/package.json index a34a2700399..48693f39eab 100644 --- a/packages/hippy-vue-native-components/package.json +++ b/packages/hippy-vue-native-components/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-native-components", - "version": "2.11.3", + "version": "2.11.4", "description": "Native components middleware for Hippy-Vue, the components only for native, can't compatible with web.", "main": "dist/index.js", "homepage": "http://hippyjs.org", diff --git a/packages/hippy-vue-router/CHANGELOG.md b/packages/hippy-vue-router/CHANGELOG.md index 5731e238f1b..8cca817503b 100644 --- a/packages/hippy-vue-router/CHANGELOG.md +++ b/packages/hippy-vue-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-router/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/vue-router + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue-router/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/vue-router diff --git a/packages/hippy-vue-router/package-lock.json b/packages/hippy-vue-router/package-lock.json index dff647fbc4c..2dca2aa10ef 100644 --- a/packages/hippy-vue-router/package-lock.json +++ b/packages/hippy-vue-router/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-router", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-vue-router/package.json b/packages/hippy-vue-router/package.json index 09ee62519a6..9cc12885c4f 100644 --- a/packages/hippy-vue-router/package.json +++ b/packages/hippy-vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-router", - "version": "2.11.3", + "version": "2.11.4", "description": "Official router for hippy-vue", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/hippy-vue/CHANGELOG.md b/packages/hippy-vue/CHANGELOG.md index bdb07e1e488..aad46d75f53 100644 --- a/packages/hippy-vue/CHANGELOG.md +++ b/packages/hippy-vue/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.4](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue/compare/2.11.3...2.11.4) (2021-12-10) + +**Note:** Version bump only for package @hippy/vue + + + + + ## [2.11.3](https://github.com/Tencent/Hippy/tree/master/packages/hippy-vue/compare/2.11.2...2.11.3) (2021-12-08) **Note:** Version bump only for package @hippy/vue diff --git a/packages/hippy-vue/package-lock.json b/packages/hippy-vue/package-lock.json index 1eac0cebc52..0e2fae200c4 100644 --- a/packages/hippy-vue/package-lock.json +++ b/packages/hippy-vue/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue", - "version": "2.11.3", + "version": "2.11.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/hippy-vue/package.json b/packages/hippy-vue/package.json index 24b354fbb1d..a26121899ef 100644 --- a/packages/hippy-vue/package.json +++ b/packages/hippy-vue/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue", - "version": "2.11.3", + "version": "2.11.4", "description": "Vue binding for Hippy native framework", "author": "XQ Kuang ", "license": "Apache-2.0",