From a8916904cca88f09bdee55511dce670bf09571fa Mon Sep 17 00:00:00 2001 From: zoomchan-cxj Date: Thu, 30 Sep 2021 22:51:20 +0800 Subject: [PATCH] feat(hippy-vue,hippy-react): add text shadow --- CHANGELOG.md | 1 - docs/style/appearance.md | 72 ++++++ examples/android-demo/res/index.android.js | 2 +- examples/android-demo/res/vendor.android.js | 20 +- .../src/components/Text/index.jsx | 31 ++- .../src/components/View/index.jsx | 19 +- .../src/components/demos/demo-div.vue | 16 +- .../src/components/demos/demo-p.vue | 26 +- examples/ios-demo/res/index.ios.js | 2 +- examples/ios-demo/res/vendor.ios.js | 20 +- packages/hippy-react/src/dom/element-node.ts | 23 ++ .../hippy-vue-css-loader/src/css-parser.js | 15 ++ .../src/elements/__tests__/index.test.js | 5 +- packages/hippy-vue/src/elements/built-in.js | 52 ++++ .../renderer/__tests__/element-node.test.js | 9 + .../hippy-vue/src/renderer/element-node.js | 34 +++ .../renderer/native/__tests__/index.test.js | 241 +++++++++++++++++- .../hippy-vue/src/renderer/native/index.js | 23 +- 18 files changed, 570 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02231e8cbbb..a05bf1c7992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * **ios:** improve stability for websocket module ([d5595ea](https://github.com/Tencent/Hippy/commit/d5595ea2f9a9b7a404bbcce27addce7937f93e34)) * **ios:** reset tableview top padding to zero in ios15 ([#1000](https://github.com/Tencent/Hippy/issues/1000)) ([a5184cf](https://github.com/Tencent/Hippy/commit/a5184cfe5d4777ede135cdff52da23ab5b59f89a)) * **vue-example:** fix loop animation height ([dc3d948](https://github.com/Tencent/Hippy/commit/dc3d948b836bcab5a9f7c35ee0be840f4a050b3c)) -* **vue-example:** fix loop animation height ([f7dad4d](https://github.com/Tencent/Hippy/commit/f7dad4d53039a74c3550f6c53bb8408e08a107d9)) diff --git a/docs/style/appearance.md b/docs/style/appearance.md index 6c61d85252e..e761521c4a7 100644 --- a/docs/style/appearance.md +++ b/docs/style/appearance.md @@ -154,6 +154,78 @@ | ------ | -------- | --- | | number | 否 | All +# textShadowColor + +> 最低支持版本 2.10.0 + +[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx) + +[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue) + +文字阴影颜色 + +| 类型 | 必需 | 平台 | +| ------ | -------- | --------| +| [color](style/color.md) | 否 | 双平台支持 | + +# textShadowOffset + +> 最低支持版本 2.10.0 + +[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx) + +[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue) + +文字阴影偏移量 + +| 类型 | 必需 | 平台 | +| ------ | -------- | --------| +| object: { x: number, y: number } | 否 | 双平台支持 | + +# textShadowOffsetX + +> * 最低支持版本 2.10.0 +> * 注意 hippy-vue class 样式只支持合并写法 `text-shadow-offset: 1px 1px`,不支持拆分 + +[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx) + +[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue) + +文字阴影X轴偏移量 + +| 类型 | 必需 | 平台 | +| ------ | -------- | --------| +| number | 否 | 双平台支持 | + +# textShadowOffsetY + +> * 最低支持版本 2.10.0 +> * 注意 hippy-vue class 样式只支持合并写法 `text-shadow-offset: 1px 1px`,不支持拆分 + +[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx) + +[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue) + +文字阴影Y轴偏移量 + +| 类型 | 必需 | 平台 | +| ------ | -------- | --------| +| number | 否 | 双平台支持 | + +# textShadowRadius + +> 最低支持版本 2.10.0 + +[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx) + +[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue) + +文字阴影半径 + +| 类型 | 必需 | 平台 | +| ------ | -------- | --------| +| number | 否 | 双平台支持 | + # visibility | 类型 | 必需 | 支持平台 diff --git a/examples/android-demo/res/index.android.js b/examples/android-demo/res/index.android.js index 13a9dd73a8f..2760adc45b6 100644 --- a/examples/android-demo/res/index.android.js +++ b/examples/android-demo/res/index.android.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 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,h=o?Symbol.for("react.context"):60110,u=o?Symbol.for("react.async_mode"):60111,m=o?Symbol.for("react.concurrent_mode"):60111,d=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 E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case m:case a:case s:case l:case f:return e;default:switch(e=e&&e.$$typeof){case h:case d:case y:case g:case c:return e;default:return t}}case i:return t}}}function C(e){return E(e)===m}t.AsyncMode=u,t.ConcurrentMode=m,t.ContextConsumer=h,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,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 C(e)||E(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===h},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===l},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===m||e===s||e===l||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===h||e.$$typeof===d||e.$$typeof===b||e.$$typeof===x||e.$$typeof===S||e.$$typeof===w)},t.typeOf=E},"./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 u?t:u,i=Object.create(r.prototype),a=new C(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===h)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===h)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 h={};function u(){}function m(){}function d(){}var f={};l(f,r,(function(){return this}));var p=Object.getPrototypeOf,g=p&&p(p(T([])));g&&g!==t&&n.call(g,r)&&(f=g);var y=d.prototype=u.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 h=s.arg,u=h.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(u).then((function(e){h.value=e,a(h)}),(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 h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=c(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;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,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}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 E(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 T(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),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},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 W})),n.d(o,"Image",(function(){return q})),n.d(o,"ListView",(function(){return X})),n.d(o,"Modal",(function(){return ne})),n.d(o,"RefreshWrapper",(function(){return Ce})),n.d(o,"PullHeader",(function(){return ve})),n.d(o,"ScrollView",(function(){return Ve})),n.d(o,"Text",(function(){return ke})),n.d(o,"TextInput",(function(){return De})),n.d(o,"View",(function(){return Pe})),n.d(o,"ViewPager",(function(){return Ke})),n.d(o,"WebView",(function(){return Ge})),n.d(o,"BoxShadow",(function(){return Ye})),n.d(o,"WaterfallView",(function(){return Ze}));var r={};n.r(r),n.d(r,"Animation",(function(){return nt})),n.d(r,"AsyncStorage",(function(){return rt})),n.d(r,"Clipboard",(function(){return at})),n.d(r,"NativeEvent",(function(){return st})),n.d(r,"NetInfo",(function(){return ht})),n.d(r,"TestModule",(function(){return mt})),n.d(r,"WebSocket",(function(){return yt})),n.d(r,"UIManagerModule",(function(){return Et}));var i={};n.r(i),n.d(i,"MyView",(function(){return At})),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}));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 h(){return(h=Object.assign||function(e){for(var t=1;t=0;h--){var d=r[h];"."===d?m(r,h):".."===d?(m(r,h),c++):c&&(m(r,h),c--)}if(!l)for(;c--;c)r.unshift("..");!l||""===r[0]||r[0]&&u(r[0])||r.unshift("");var f=r.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};var f=function(e,t){if(!e)throw new Error("Invariant failed")};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 g(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=h({},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=d(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function y(){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),u({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=g(e,t,m(),S.location);c.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(S.entries[S.index]=o,u({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 T=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),v=n.n(T),A=function(e){var t=Object(x.a)();return t.displayName=e,t}("Router"),V=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(A.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 R=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 H=n.p+"assets/defaultSource.jpg";const N="https://static.res.qq.com/nav/3b202b2c44af478caf1319dece33fff2.png",K=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 q(){return s.a.createElement(a.ScrollView,{style:K.container_style},s.a.createElement(a.Text,{style:K.info_style},"Contain:"),s.a.createElement(a.Image,{style:[K.image_style],resizeMode:a.Image.resizeMode.contain,defaultSource:H,source:{uri:N},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:K.info_style},"Cover:"),s.a.createElement(a.Image,{style:[K.image_style],defaultSource:H,source:{uri:N},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Text,{style:K.info_style},"Center:"),s.a.createElement(a.Image,{style:[K.image_style],defaultSource:H,source:{uri:N},resizeMode:a.Image.resizeMode.center}),s.a.createElement(a.Text,{style:K.info_style},"Cover GIF:"),s.a.createElement(a.Image,{style:[K.image_style],resizeMode:a.Image.resizeMode.cover,defaultSource:H,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}],U=a.StyleSheet.create({container:{backgroundColor:"#fff",collapsable:!1},itemContainer:{padding:12},separatorLine:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Q({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 1 UI"))}function Y({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 2 UI"))}function J({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 5 UI"))}class X 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(Q,{index:e});break;case 2:n=s.a.createElement(Y,{index:e});break;case 5:n=s.a.createElement(J,{index:e});break;case 100:n=s.a.createElement(a.Text,{style:U.loading},"Loading now...")}return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.View,{style:U.itemContainer},n),r?null:s.a.createElement(a.View,{style:U.separatorLine}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=100?e([]):e(G)),1e3)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{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 Z="#4c9afa",$="#f44837",ee="#fff",te=a.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:Z,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:Z,textAlign:"center",textAlignVertical:"center"}});class ne 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:te.container},s.a.createElement(a.View,{onPressIn:()=>this.feedback("in"),onPressOut:()=>this.feedback.bind("out"),onClick:this.show,style:[te.buttonView,{borderColor:Z,opacity:e?.5:1}]},s.a.createElement(a.Text,{style:[te.buttonText,{color:Z}]},"点击弹出浮层"))),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:$,marginTop:300,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.Text,{style:{color:ee,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}const oe="http://res.imtt.qq.com/tps/expo-listview-1.jpg",re={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[oe,oe,oe],subInfo:["三图评论","11评"]}},ie={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播放"]}};var le=[ae,re,ie,re,ie,re,ie,ae,re];var se={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 ce=(se.getScreenWidth()-24-12)/3,he=Math.floor(ce/1.35),ue=a.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:he,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:ce,height:he},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function me(e){const{itemBean:{title:t,picList:n}}=e;let{itemBean:{subInfo:o}}=e,r=null;if(o&&o.length){o=se.uniqueArray(o);const e=o.join(" ");r=s.a.createElement(a.Text,{style:ue.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,e,s.a.createElement(a.Text,{style:[ue.title],numberOfLines:2,enableScale:!0},t),s.a.createElement(a.View,{style:ue.imageContainer},s.a.createElement(a.Image,{style:ue.image,source:{uri:n[0]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:[ue.image,{marginLeft:6,marginRight:6}],source:{uri:n[1]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:ue.image,source:{uri:n[2]},resizeMode:a.Image.resizeMode.cover})),r?s.a.createElement(a.View,{style:ue.tagLine},r):null)}const de=se.getScreenWidth()-24,fe=Math.floor(de-12)/3,pe=Math.floor(fe/1.35),ge=a.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:pe},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:fe,height:pe},image:{width:fe,height:pe},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 ye(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=se.uniqueArray(i);const e=i.join(" ");n=s.a.createElement(a.Text,{style:ge.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,{style:ge.container},s.a.createElement(a.View,{style:ge.leftContainer},s.a.createElement(a.Text,{style:ge.title,numberOfLines:2,enableScale:!0},o),n?s.a.createElement(a.View,{style:ge.tagLine},n):null),s.a.createElement(a.View,{style:ge.imageContainer},s.a.createElement(a.Image,{resizeMode:a.Image.resizeMode.cover,style:ge.image,source:{uri:r}})))}const we=se.getScreenWidth()-24,be=Math.floor(188*we/336),xe=a.StyleSheet.create({text:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:we,height:be,alignSelf:"center"},image:{width:we,height:be},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Se(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=se.uniqueArray(r);const e=r.join(" ");i=s.a.createElement(a.Text,{style:xe.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:xe.text,numberOfLines:2,enableScale:!0},n),s.a.createElement(a.View,{style:xe.playerView},s.a.createElement(a.Image,{style:xe.image,source:{uri:o},resizeMode:a.Image.resizeMode.cover})),i?s.a.createElement(a.View,{style:xe.tagLine},i):null)}const Ee=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 Ce 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(me,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(ye,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Se,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:Ee.loading},n)}return s.a.createElement(a.View,{style:Ee.container},s.a.createElement(a.View,{style:Ee.itemContainer},o),i?null:s.a.createElement(a.View,{style:Ee.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(le)),1e3)})}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 Te=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 ve 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>Te.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}onClickItem(e){console.log(`item: ${e} is clicked..`)}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=le),e(t)},2e3)})}renderPullHeader(){const{pullingText:e}=this.state;return s.a.createElement(a.View,{style:Te.pullContainer},s.a.createElement(a.Text,{style:Te.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(me,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(ye,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Se,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:Te.loading},n)}return s.a.createElement(a.View,{style:Te.container},s.a.createElement(a.View,{style:Te.itemContainer},o),i?null:s.a.createElement(a.View,{style:Te.splitter}))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{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 Ae=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 Ve(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:Ae.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:Ae.itemStyle},"A"),s.a.createElement(a.Text,{style:Ae.itemStyle},"B"),s.a.createElement(a.Text,{style:Ae.itemStyle},"C"),s.a.createElement(a.Text,{style:Ae.itemStyle},"D"),s.a.createElement(a.Text,{style:Ae.itemStyle},"E"),s.a.createElement(a.Text,{style:Ae.itemStyle},"F"),s.a.createElement(a.Text,{style:Ae.itemStyle},"A"))),s.a.createElement(a.View,{style:Ae.itemTitle},s.a.createElement(a.Text,null,"Vertical ScrollView")),s.a.createElement(a.ScrollView,{bounces:!0,horizontal:!1,style:Ae.verticalScrollView,showsVerticalScrollIndicator:!1},s.a.createElement(a.Text,{style:Ae.itemStyle},"A"),s.a.createElement(a.Text,{style:Ae.itemStyle},"B"),s.a.createElement(a.Text,{style:Ae.itemStyle},"C"),s.a.createElement(a.Text,{style:Ae.itemStyle},"D"),s.a.createElement(a.Text,{style:Ae.itemStyle},"E"),s.a.createElement(a.Text,{style:Ae.itemStyle},"F"),s.a.createElement(a.Text,{style:Ae.itemStyle},"A")))}const Re=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"}});class ke extends s.a.Component{constructor(e){super(e),this.state={fontSize:16},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}=this.state,t=e=>s.a.createElement(a.View,{style:Re.itemTitle},s.a.createElement(a.Text,{style:!0},e));return s.a.createElement(a.ScrollView,{style:{padding:10}},t("color"),s.a.createElement(a.View,{style:[Re.itemContent]},s.a.createElement(a.Text,{style:[Re.normalText,{color:"#242424"}]},"Text color is black"),s.a.createElement(a.Text,{style:[Re.normalText,{color:"blue"}]},"Text color is blue"),s.a.createElement(a.Text,{style:[Re.normalText,{color:"rgb(228,61,36)"}]},"This is red")),t("fontSize"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:[Re.normalText,{fontSize:e}]},"Text fontSize is "+e),s.a.createElement(a.View,{style:Re.button,onClick:this.incrementFontSize},s.a.createElement(a.Text,{style:Re.buttonText},"放大字体")),s.a.createElement(a.View,{style:Re.button,onClick:this.decrementFontSize},s.a.createElement(a.Text,{style:Re.buttonText},"缩小字体"))),t("fontStyle"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:[Re.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),s.a.createElement(a.Text,{style:[Re.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),t("numberOfLines"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:Re.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:Re.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")),t("Nest Text"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:3},s.a.createElement(a.Text,{numberOfLines:3,style:[Re.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),s.a.createElement(a.Text,{numberOfLines:3,style:Re.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),t("Custom font"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:Re.customFont},"Hippy 跨端框架")),t("Text Nested"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:"android"===a.Platform.OS?this.androidNestedTextWrapperStyle:{}},s.a.createElement(a.Text,{numberOfLines:1,style:Re.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:Re.customFont},"前面有张图片"))))}}const Ie=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 De 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:Ie.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:Ie.container_style},t("text"),s.a.createElement(a.TextInput,{ref:e=>{this.input=e},style:Ie.input_style,placeholder:"text",defaultValue:e}),s.a.createElement(a.View,{style:Ie.button,onClick:this.changeInputContent},s.a.createElement(a.Text,null,"点击改变输入框内容")),s.a.createElement(a.View,{style:Ie.button,onClick:this.focus},s.a.createElement(a.Text,null,"Focus")),s.a.createElement(a.View,{style:Ie.button,onClick:this.blur},s.a.createElement(a.Text,null,"Blur")),t("numeric"),s.a.createElement(a.TextInput,{style:Ie.input_style,keyboardType:"numeric",placeholder:"numeric"}),t("phone-pad"),s.a.createElement(a.TextInput,{style:Ie.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),t("password"),s.a.createElement(a.TextInput,{style:Ie.input_style,keyboardType:"password",placeholder:"password"}),t("maxLength"),s.a.createElement(a.TextInput,{style:Ie.input_style,placeholder:"maxLength=5",maxLength:5}))}}var je=n.p+"assets/defaultSource.jpg";const Oe=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 Pe(){const e=e=>s.a.createElement(a.View,{style:Oe.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:[Oe.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),s.a.createElement(a.View,{style:[Oe.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:je}]},s.a.createElement(a.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),s.a.createElement(a.View,{style:[Oe.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:[Oe.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),s.a.createElement(a.View,{style:[Oe.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},s.a.createElement(a.View,{style:[Oe.smallRectangle,{backgroundColor:"yellow"}]}),s.a.createElement(a.View,{style:[Oe.smallRectangle,{backgroundColor:"blue"}]}),s.a.createElement(a.View,{style:[Oe.smallRectangle,{backgroundColor:"green"}]})))}const Le=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:"#f44837",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}}),Me="SquarePagerView",Be="TrianglePagerView",ze="CirclePagerView";function Fe(e,t){const n=t=>s.a.createElement(a.View,{style:Le.pageContainer,key:t},s.a.createElement(a.View,{style:[Le.shapeBase,e]}),s.a.createElement(a.View,{style:Le.mainRec},t?s.a.createElement(a.Text,{style:Le.title},t):null));return n.displayName=t,n}const _e=Fe(Le.square,Me),We=Fe(Le.triangle,Be),He=Fe(Le.circle,ze),Ne=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 Ke extends s.a.Component{constructor(e){super(e),_()(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:Ne.buttonContainer},s.a.createElement(a.View,{style:Ne.button,onClick:()=>{this.viewpager.setPage(2)}},s.a.createElement(a.Text,{style:Ne.buttonText},"动效滑到第3页")),s.a.createElement(a.View,{style:Ne.button,onClick:()=>this.viewpager.setPageWithoutAnimation(0)},s.a.createElement(a.Text,{style:Ne.buttonText},"直接滑到第1页"))),s.a.createElement(a.ViewPager,{ref:e=>{this.viewpager=e},style:Ne.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[_e(),We(),He()]),s.a.createElement(a.View,{style:Ne.dotContainer},new Array(3).fill(0).map((t,n)=>{const o=n===e;return s.a.createElement(a.View,{style:[Ne.dot,o?Ne.selectDot:null]})})))}}const qe=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 Ge(){return s.a.createElement(a.View,{style:{padding:10}},s.a.createElement(a.View,{style:qe.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:qe.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 Ue=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"}}),Qe=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 Ye(){return s.a.createElement(a.View,{style:Ue.shadowDemo},"android"===a.Platform.OS?s.a.createElement(a.View,{style:Ue.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Ue.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Ue.text},"没有偏移阴影样式"))):s.a.createElement(a.View,{style:Ue.shadowDemoCubeIos},s.a.createElement(a.View,{style:Ue.shadowDemoContentIos},s.a.createElement(a.Text,{style:Ue.text},"没有偏移阴影样式"))),"android"===a.Platform.OS?s.a.createElement(a.View,{style:Qe.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Qe.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Qe.text},"偏移阴影样式"))):s.a.createElement(a.View,{style:Qe.shadowDemoCubeIos},s.a.createElement(a.View,{style:Qe.shadowDemoContentIos},s.a.createElement(a.Text,{style:Qe.text},"偏移阴影样式"))))}const Je=le.filter(e=>2!==e.style),Xe=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 Ze 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:Xe.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(me,{itemBean:o.itemBean});break;case 2:n=s.a.createElement(ye,{itemBean:o.itemBean});break;case 5:n=s.a.createElement(Se,{itemBean:o.itemBean})}return s.a.createElement(a.View,{onClick:()=>this.onItemClick(e),style:Xe.container},s.a.createElement(a.View,{style:Xe.itemContainer},n),s.a.createElement(a.View,{style:Xe.splitter}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>{const t=[...Je,...Je];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 $e="#4c9afa",et="#f44837",tt=a.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:et},showArea:{height:150,marginVertical:10},button:{borderColor:$e,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:$e,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}});class nt 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:tt.container},s.a.createElement(a.Text,{style:tt.title},"水平位移动画"),s.a.createElement(a.View,{style:tt.buttonContainer},s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.horizonAnimation.start()}},s.a.createElement(a.Text,{style:tt.buttonText},"开始")),s.a.createElement(a.View,{style:[tt.button],onClick:()=>{this.horizonAnimation.pause()}},s.a.createElement(a.Text,{style:tt.buttonText},"暂停")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.horizonAnimation.resume()}},s.a.createElement(a.Text,{style:tt.buttonText},"继续")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},s.a.createElement(a.Text,{style:tt.buttonText},"更新"))),s.a.createElement(a.View,{style:tt.showArea},s.a.createElement(a.View,{ref:e=>{this.horizonRef=e},style:[tt.square,{transform:[{translateX:this.horizonAnimation}]}]})),s.a.createElement(a.Text,{style:tt.title},"高度形变动画"),s.a.createElement(a.View,{style:tt.buttonContainer},s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.verticalAnimation.start()}},s.a.createElement(a.Text,{style:tt.buttonText},"开始")),s.a.createElement(a.View,{style:[tt.button],onClick:()=>{this.verticalAnimation.pause()}},s.a.createElement(a.Text,{style:tt.buttonText},"暂停")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.verticalAnimation.resume()}},s.a.createElement(a.Text,{style:tt.buttonText},"继续"))),s.a.createElement(a.View,{style:tt.showArea},s.a.createElement(a.View,{ref:e=>{this.verticalRef=e},style:[tt.square,{height:this.verticalAnimation}]})),s.a.createElement(a.Text,{style:tt.title},"组合形变动画"),s.a.createElement(a.View,{style:tt.buttonContainer},s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.scaleAnimationSet.start()}},s.a.createElement(a.Text,{style:tt.buttonText},"开始")),s.a.createElement(a.View,{style:[tt.button],onClick:()=>{this.scaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:tt.buttonText},"暂停")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.scaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:tt.buttonText},"继续"))),s.a.createElement(a.View,{style:[tt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.scaleRef=e},style:[tt.square,{transform:[{scale:this.scaleAnimationSet}]}]})),s.a.createElement(a.Text,{style:tt.title},"颜色渐变动画(文字渐变仅Android支持)"),s.a.createElement(a.View,{style:tt.buttonContainer},s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.bgColorAnimationSet.start(),this.txtColorAnimationSet.start()}},s.a.createElement(a.Text,{style:tt.buttonText},"开始")),s.a.createElement(a.View,{style:[tt.button],onClick:()=>{this.bgColorAnimationSet.pause(),this.txtColorAnimationSet.pause()}},s.a.createElement(a.Text,{style:tt.buttonText},"暂停")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.bgColorAnimationSet.resume(),this.txtColorAnimationSet.resume()}},s.a.createElement(a.Text,{style:tt.buttonText},"继续"))),s.a.createElement(a.View,{style:[tt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.bgColorRef=e},style:[tt.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},s.a.createElement(a.Text,{ref:e=>{this.textColorRef=e},style:[tt.colorText,{color:"android"===a.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),s.a.createElement(a.Text,{style:tt.title},"贝塞尔曲线动画"),s.a.createElement(a.View,{style:tt.buttonContainer},s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.cubicBezierScaleAnimationSet.start()}},s.a.createElement(a.Text,{style:tt.buttonText},"开始")),s.a.createElement(a.View,{style:[tt.button],onClick:()=>{this.cubicBezierScaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:tt.buttonText},"暂停")),s.a.createElement(a.View,{style:tt.button,onClick:()=>{this.cubicBezierScaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:tt.buttonText},"继续"))),s.a.createElement(a.View,{style:[tt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.cubicBezierScaleRef=e},style:[tt.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}const ot=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 rt 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:ot.containerStyle},s.a.createElement(a.View,{style:ot.viewGroupStyle},s.a.createElement(a.Text,{style:ot.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:ot.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:ot.viewGroupStyle},s.a.createElement(a.Text,{style:ot.infoStyle},"Value:"),s.a.createElement(a.TextInput,{style:ot.inputStyle,onChangeText:this.onTextChangeValue})),s.a.createElement(a.View,{style:ot.itemGroupStyle,onClick:this.onClickSet},s.a.createElement(a.Text,{style:ot.buttonStyle},"Set")),s.a.createElement(a.View,{style:[ot.viewGroupStyle,{marginTop:60}]},s.a.createElement(a.Text,{style:ot.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:ot.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:[ot.viewGroupStyle,{display:"none"}]},s.a.createElement(a.Text,{style:ot.infoStyle},"Value:"),s.a.createElement(a.Text,{style:[ot.infoStyle,{width:200}]},e)),s.a.createElement(a.View,{style:ot.itemGroupStyle,onClick:this.onClickGet},s.a.createElement(a.Text,{style:ot.buttonStyle},"Get")))}}const it=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 at 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:it.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:it.defaultText},n),s.a.createElement(a.View,{style:it.button,onClick:()=>{a.Clipboard.setString(n),this.setState({hasCopied:!0})}},s.a.createElement(a.Text,{style:it.buttonText},"点击复制以上文案"+r)),e("获取剪贴板内容"),s.a.createElement(a.View,{style:it.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:it.buttonText},"点击获取剪贴板内容")),s.a.createElement(a.Text,{style:[it.defaultText,it.copiedText]},o))}}const lt=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 st 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:lt.container},s.a.createElement(a.View,{style:lt.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:lt.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 ct=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}});class ht 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:ct.container},s.a.createElement(a.Text,{style:ct.text},e))}}var ut={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 mt extends s.a.Component{constructor(e){super(e),this.state={hello:"TestModule log"}}componentDidMount(){ut.log("hello i am from js"),ut.helloNative({hello:"i am form js"}),ut.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 dt=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"}}),ft="wss://echo.websocket.org",pt="Rock it with Hippy WebSocket";let gt;var yt=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:dt.fullScreen},s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:dt.title},"Url:"),s.a.createElement(a.TextInput,{ref:e,value:ft,style:dt.input}),s.a.createElement(a.View,{style:dt.row},s.a.createElement(a.Text,{onClick:()=>{e.current.getValue().then(e=>{gt&&1===gt.readyState&>.close(),gt=new WebSocket(e),gt.onopen=()=>r("[Opened] "+gt.url),gt.onclose=()=>r("[Closed] "+gt.url),gt.onerror=e=>r("[Error] "+e.reason),gt.onmessage=e=>r("[Received] "+e.data)})},style:dt.button},"Connect"),s.a.createElement(a.Text,{onClick:()=>gt.close(),style:dt.button},"Disconnect"))),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:dt.title},"Message:"),s.a.createElement(a.TextInput,{ref:t,value:pt,style:dt.input}),s.a.createElement(a.Text,{onClick:()=>t.current.getValue().then(e=>{r("[Sent] "+e),gt.send(e)}),style:dt.button},"Send")),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:dt.title},"Log:"),s.a.createElement(a.ScrollView,{style:dt.fullScreen},n.map((e,t)=>s.a.createElement(a.Text,{key:t,style:dt.output},e)))))};function wt(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 bt(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}),h=bt(bt({},xt.box),o);return s.a.createElement(a.View,{style:xt.full},s.a.createElement(a.View,{style:xt.demoContent},s.a.createElement(a.View,{ref:e,style:h},s.a.createElement(a.Text,{style:xt.text},"I am the box"))),s.a.createElement(a.View,{style:xt.buttonContainer},s.a.createElement(a.View,{onClick:()=>{const e=St(0,t),o=St(0,n-300),i=St(50,120);r({left:e,top:o,width:i,height:i})},style:xt.button},s.a.createElement(a.Text,{style:xt.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:xt.button},s.a.createElement(a.Text,{style:xt.buttonText},"Measure box in window"))),s.a.createElement(a.View,{style:xt.row},s.a.createElement(a.View,{style:xt.full},s.a.createElement(a.Text,null,"Box style:"),s.a.createElement(a.Text,{style:xt.black},"Width: "+h.width),s.a.createElement(a.Text,{style:xt.black},"Height: "+h.height),s.a.createElement(a.Text,{style:xt.black},"Left: "+h.left),s.a.createElement(a.Text,{style:xt.black},"Top: "+h.top)),s.a.createElement(a.View,{style:xt.full},s.a.createElement(a.Text,null,"measureInWindow output:"),s.a.createElement(a.Text,{style:xt.black},"Width: "+i.width),s.a.createElement(a.Text,{style:xt.black},"Height: "+i.height),s.a.createElement(a.Text,{style:xt.black},"X: "+i.x),s.a.createElement(a.Text,{style:xt.black},"Y: "+i.y))))},Ct=n("./node_modules/@babel/runtime/helpers/extends.js"),Tt=n.n(Ct);class vt extends s.a.Component{changeColor(e){a.UIManagerModule.callUIFunction(this.mytext,"changeColor",[e])}render(){return s.a.createElement("div",Tt()({nativeName:"MyView",ref:e=>{this.mytext=e}},this.props))}}class At 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 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}))}}_()(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 _e(e);case 1:return He(e);case 2:return We(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=se.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:e=>this.onViewPagerChange(e.position)},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}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:e=>this.onTouchDown1(e),onTouchMove:e=>this.onTouchMove1(e)},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:e=>this.onTouchDown2(e),onTouchMove:e=>this.onTouchMove2(e)},s.a.createElement(a.View,{style:[Mt.nativeDemo2Point,{left:e}]})))}}const zt=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: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 _t=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:_t.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"}`)))}}function Ht(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 Nt(e){for(var t=1;t0===e.index?s.a.createElement(a.View,{style:[Qt.container]},s.a.createElement(a.View,{style:{backgroundColor:Qt.title.backgroundColor,marginLeft:12}},s.a.createElement(a.Text,{numberOfLines:1,style:[Qt.title,{fontWeight:"bold"}]},t.name)),s.a.createElement(a.View,{style:Qt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Qt.title},"v",a.default.version))):s.a.createElement(a.View,{style:[Qt.container]},s.a.createElement(a.View,{onClick:()=>e.goBack(),style:[Qt.headerButton,"ios"===a.Platform.OS?null:{marginLeft:20}]},s.a.createElement(a.Image,{style:Qt.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:Qt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Qt.title},t.name))));const Jt="#4c9afa",Xt="#f44837",Zt=a.StyleSheet.create({rowContainer:{alignItems:"center"},buttonView:{borderColor:Jt,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:Jt,textAlign:"center",textAlignVertical:"center"}});class $t extends l.Component{constructor(e){super(e),this.state={pressItem:"",dataSource:[...qt]},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:Zt.rowContainer},s.a.createElement(a.View,{onPressIn:()=>this.feedback(o.path),onPressOut:()=>this.feedback(),onClick:()=>this.clickTo(o.path),style:[Zt.buttonView,{borderColor:1===r?Jt:Xt,opacity:n===o.path?.5:1}]},s.a.createElement(a.Text,{style:[Zt.buttonText,{color:1===r?Jt:Xt}]},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 en=[{path:"/Gallery",name:"Hippy React 示例",component:z($t),meta:{style:1}},...qt];var tn=()=>s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(R,{initialEntries:["/Gallery"]},en.map(e=>{const t=e.component;return s.a.createElement(j,{key:e.path,exact:!0,path:""+e.path},s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(Yt,{route:e}),s.a.createElement(t,{meta:e.meta||{}})))})));const nn=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 on 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:nn.container},e.map((e,t)=>s.a.createElement(a.Text,{style:nn.stepText,key:"steps-"+t},e)),s.a.createElement(a.View,{style:nn.buttonContainer},s.a.createElement(a.View,{style:nn.button,onClick:this.clickToDebug},s.a.createElement(a.Text,{style:nn.buttonText,numberOfLines:1},"点击调试"))))}}const rn=a.StyleSheet.create({container:{flex:1}});class an 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(tn,null);case 1:case 2:return s.a.createElement(on,{instanceId:n});default:return s.a.createElement(a.View,{style:ln.blankPage})}})(),s.a.createElement(a.View,{style:ln.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:ln.button,onClick:()=>this.setState({pageIndex:n})},s.a.createElement(a.Text,{style:[ln.buttonText,n===e?{color:"#4c9afa"}:null],numberOfLines:1},t)))})()))}}new a.Hippy({appName:"Demo",entryPage:sn}).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,h=o?Symbol.for("react.context"):60110,u=o?Symbol.for("react.async_mode"):60111,m=o?Symbol.for("react.concurrent_mode"):60111,d=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 E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case m:case a:case s:case l:case f:return e;default:switch(e=e&&e.$$typeof){case h:case d:case y:case g:case c:return e;default:return t}}case i:return t}}}function C(e){return E(e)===m}t.AsyncMode=u,t.ConcurrentMode=m,t.ContextConsumer=h,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,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 C(e)||E(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===h},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===l},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===m||e===s||e===l||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===h||e.$$typeof===d||e.$$typeof===b||e.$$typeof===x||e.$$typeof===S||e.$$typeof===w)},t.typeOf=E},"./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 u?t:u,i=Object.create(r.prototype),a=new C(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===h)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===h)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 h={};function u(){}function m(){}function d(){}var f={};l(f,r,(function(){return this}));var p=Object.getPrototypeOf,g=p&&p(p(T([])));g&&g!==t&&n.call(g,r)&&(f=g);var y=d.prototype=u.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 h=s.arg,u=h.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(u).then((function(e){h.value=e,a(h)}),(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 h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=c(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;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,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}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 E(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 T(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),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},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 W})),n.d(o,"Image",(function(){return q})),n.d(o,"ListView",(function(){return X})),n.d(o,"Modal",(function(){return ne})),n.d(o,"RefreshWrapper",(function(){return Ce})),n.d(o,"PullHeader",(function(){return ve})),n.d(o,"ScrollView",(function(){return Ve})),n.d(o,"Text",(function(){return Ie})),n.d(o,"TextInput",(function(){return je})),n.d(o,"View",(function(){return Le})),n.d(o,"ViewPager",(function(){return qe})),n.d(o,"WebView",(function(){return Ue})),n.d(o,"BoxShadow",(function(){return Je})),n.d(o,"WaterfallView",(function(){return $e}));var r={};n.r(r),n.d(r,"Animation",(function(){return ot})),n.d(r,"AsyncStorage",(function(){return it})),n.d(r,"Clipboard",(function(){return lt})),n.d(r,"NativeEvent",(function(){return ct})),n.d(r,"NetInfo",(function(){return ut})),n.d(r,"TestModule",(function(){return dt})),n.d(r,"WebSocket",(function(){return wt})),n.d(r,"UIManagerModule",(function(){return Ct}));var i={};n.r(i),n.d(i,"MyView",(function(){return Vt})),n.d(i,"Slider",(function(){return Ot})),n.d(i,"TabHost",(function(){return Lt})),n.d(i,"SetNativeProps",(function(){return zt})),n.d(i,"DynamicImport",(function(){return _t})),n.d(i,"Localization",(function(){return Ht}));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 h(){return(h=Object.assign||function(e){for(var t=1;t=0;h--){var d=r[h];"."===d?m(r,h):".."===d?(m(r,h),c++):c&&(m(r,h),c--)}if(!l)for(;c--;c)r.unshift("..");!l||""===r[0]||r[0]&&u(r[0])||r.unshift("");var f=r.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};var f=function(e,t){if(!e)throw new Error("Invariant failed")};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 g(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=h({},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=d(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function y(){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),u({action:"PUSH",location:o,index:t,entries:n})}}))},replace:function(e,t){var o=g(e,t,m(),S.location);c.confirmTransitionTo(o,"REPLACE",n,(function(e){e&&(S.entries[S.index]=o,u({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 T=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),v=n.n(T),A=function(e){var t=Object(x.a)();return t.displayName=e,t}("Router"),V=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(A.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 R=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 H=n.p+"assets/defaultSource.jpg";const N="https://static.res.qq.com/nav/3b202b2c44af478caf1319dece33fff2.png",K=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 q(){return s.a.createElement(a.ScrollView,{style:K.container_style},s.a.createElement(a.Text,{style:K.info_style},"Contain:"),s.a.createElement(a.Image,{style:[K.image_style],resizeMode:a.Image.resizeMode.contain,defaultSource:H,source:{uri:N},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:K.info_style},"Cover:"),s.a.createElement(a.Image,{style:[K.image_style],defaultSource:H,source:{uri:N},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Text,{style:K.info_style},"Center:"),s.a.createElement(a.Image,{style:[K.image_style],defaultSource:H,source:{uri:N},resizeMode:a.Image.resizeMode.center}),s.a.createElement(a.Text,{style:K.info_style},"Cover GIF:"),s.a.createElement(a.Image,{style:[K.image_style],resizeMode:a.Image.resizeMode.cover,defaultSource:H,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}],U=a.StyleSheet.create({container:{backgroundColor:"#fff",collapsable:!1},itemContainer:{padding:12},separatorLine:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Q({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 1 UI"))}function Y({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 2 UI"))}function J({index:e}){return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.Text,{numberOfLines:1},e+": Style 5 UI"))}class X 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(Q,{index:e});break;case 2:n=s.a.createElement(Y,{index:e});break;case 5:n=s.a.createElement(J,{index:e});break;case 100:n=s.a.createElement(a.Text,{style:U.loading},"Loading now...")}return s.a.createElement(a.View,{style:U.container},s.a.createElement(a.View,{style:U.itemContainer},n),r?null:s.a.createElement(a.View,{style:U.separatorLine}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=100?e([]):e(G)),1e3)})}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{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 Z="#4c9afa",$="#f44837",ee="#fff",te=a.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:Z,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:Z,textAlign:"center",textAlignVertical:"center"}});class ne 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:te.container},s.a.createElement(a.View,{onPressIn:()=>this.feedback("in"),onPressOut:()=>this.feedback.bind("out"),onClick:this.show,style:[te.buttonView,{borderColor:Z,opacity:e?.5:1}]},s.a.createElement(a.Text,{style:[te.buttonText,{color:Z}]},"点击弹出浮层"))),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:$,marginTop:300,flexDirection:"row",justifyContent:"center"}},s.a.createElement(a.Text,{style:{color:ee,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}const oe="http://res.imtt.qq.com/tps/expo-listview-1.jpg",re={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[oe,oe,oe],subInfo:["三图评论","11评"]}},ie={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播放"]}};var le=[ae,re,ie,re,ie,re,ie,ae,re];var se={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 ce=(se.getScreenWidth()-24-12)/3,he=Math.floor(ce/1.35),ue=a.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:he,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:ce,height:he},title:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function me(e){const{itemBean:{title:t,picList:n}}=e;let{itemBean:{subInfo:o}}=e,r=null;if(o&&o.length){o=se.uniqueArray(o);const e=o.join(" ");r=s.a.createElement(a.Text,{style:ue.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,e,s.a.createElement(a.Text,{style:[ue.title],numberOfLines:2,enableScale:!0},t),s.a.createElement(a.View,{style:ue.imageContainer},s.a.createElement(a.Image,{style:ue.image,source:{uri:n[0]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:[ue.image,{marginLeft:6,marginRight:6}],source:{uri:n[1]},resizeMode:a.Image.resizeMode.cover}),s.a.createElement(a.Image,{style:ue.image,source:{uri:n[2]},resizeMode:a.Image.resizeMode.cover})),r?s.a.createElement(a.View,{style:ue.tagLine},r):null)}const de=se.getScreenWidth()-24,fe=Math.floor(de-12)/3,pe=Math.floor(fe/1.35),ge=a.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:pe},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:fe,height:pe},image:{width:fe,height:pe},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 ye(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=se.uniqueArray(i);const e=i.join(" ");n=s.a.createElement(a.Text,{style:ge.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,{style:ge.container},s.a.createElement(a.View,{style:ge.leftContainer},s.a.createElement(a.Text,{style:ge.title,numberOfLines:2,enableScale:!0},o),n?s.a.createElement(a.View,{style:ge.tagLine},n):null),s.a.createElement(a.View,{style:ge.imageContainer},s.a.createElement(a.Image,{resizeMode:a.Image.resizeMode.cover,style:ge.image,source:{uri:r}})))}const we=se.getScreenWidth()-24,be=Math.floor(188*we/336),xe=a.StyleSheet.create({text:{fontSize:"android"===a.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:we,height:be,alignSelf:"center"},image:{width:we,height:be},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Se(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=se.uniqueArray(r);const e=r.join(" ");i=s.a.createElement(a.Text,{style:xe.normalText,numberOfLines:1},e)}return s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:xe.text,numberOfLines:2,enableScale:!0},n),s.a.createElement(a.View,{style:xe.playerView},s.a.createElement(a.Image,{style:xe.image,source:{uri:o},resizeMode:a.Image.resizeMode.cover})),i?s.a.createElement(a.View,{style:xe.tagLine},i):null)}const Ee=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 Ce 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(me,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(ye,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Se,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:Ee.loading},n)}return s.a.createElement(a.View,{style:Ee.container},s.a.createElement(a.View,{style:Ee.itemContainer},o),i?null:s.a.createElement(a.View,{style:Ee.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(le)),1e3)})}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 Te=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 ve 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>Te.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}onClickItem(e){console.log(`item: ${e} is clicked..`)}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=le),e(t)},2e3)})}renderPullHeader(){const{pullingText:e}=this.state;return s.a.createElement(a.View,{style:Te.pullContainer},s.a.createElement(a.Text,{style:Te.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(me,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=s.a.createElement(ye,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=s.a.createElement(Se,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=s.a.createElement(a.Text,{style:Te.loading},n)}return s.a.createElement(a.View,{style:Te.container},s.a.createElement(a.View,{style:Te.itemContainer},o),i?null:s.a.createElement(a.View,{style:Te.splitter}))}render(){const{dataSource:e}=this.state;return s.a.createElement(a.ListView,{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 Ae=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 Ve(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.View,{style:Ae.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:Ae.itemStyle},"A"),s.a.createElement(a.Text,{style:Ae.itemStyle},"B"),s.a.createElement(a.Text,{style:Ae.itemStyle},"C"),s.a.createElement(a.Text,{style:Ae.itemStyle},"D"),s.a.createElement(a.Text,{style:Ae.itemStyle},"E"),s.a.createElement(a.Text,{style:Ae.itemStyle},"F"),s.a.createElement(a.Text,{style:Ae.itemStyle},"A"))),s.a.createElement(a.View,{style:Ae.itemTitle},s.a.createElement(a.Text,null,"Vertical ScrollView")),s.a.createElement(a.ScrollView,{bounces:!0,horizontal:!1,style:Ae.verticalScrollView,showsVerticalScrollIndicator:!1},s.a.createElement(a.Text,{style:Ae.itemStyle},"A"),s.a.createElement(a.Text,{style:Ae.itemStyle},"B"),s.a.createElement(a.Text,{style:Ae.itemStyle},"C"),s.a.createElement(a.Text,{style:Ae.itemStyle},"D"),s.a.createElement(a.Text,{style:Ae.itemStyle},"E"),s.a.createElement(a.Text,{style:Ae.itemStyle},"F"),s.a.createElement(a.Text,{style:Ae.itemStyle},"A")))}const Re=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 ke=0;class Ie 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:Re.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:[Re.itemContent],onClick:()=>{let e="red",t={x:10,y:1};ke%2==1&&(e="grey",t={x:1,y:10}),ke+=1,this.setState({textShadowColor:e,textShadowOffset:t})}},s.a.createElement(a.Text,{style:[Re.normalText,{color:"#242424",textShadowOffset:n,textShadowOffsetY:1,textShadowRadius:3,textShadowColor:t}]},"Text shadow is grey with radius 3 and offset 1")),o("color"),s.a.createElement(a.View,{style:[Re.itemContent]},s.a.createElement(a.Text,{style:[Re.normalText,{color:"#242424"}]},"Text color is black"),s.a.createElement(a.Text,{style:[Re.normalText,{color:"blue"}]},"Text color is blue"),s.a.createElement(a.Text,{style:[Re.normalText,{color:"rgb(228,61,36)"}]},"This is red")),o("fontSize"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:[Re.normalText,{fontSize:e}]},"Text fontSize is "+e),s.a.createElement(a.View,{style:Re.button,onClick:this.incrementFontSize},s.a.createElement(a.Text,{style:Re.buttonText},"放大字体")),s.a.createElement(a.View,{style:Re.button,onClick:this.decrementFontSize},s.a.createElement(a.Text,{style:Re.buttonText},"缩小字体"))),o("fontStyle"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:[Re.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),s.a.createElement(a.Text,{style:[Re.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),o("numberOfLines"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:Re.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:Re.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("Nest Text"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:3},s.a.createElement(a.Text,{numberOfLines:3,style:[Re.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),s.a.createElement(a.Text,{numberOfLines:3,style:Re.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:Re.itemContent},s.a.createElement(a.Text,{numberOfLines:1,style:Re.customFont},"Hippy 跨端框架")),o("Text Nested"),s.a.createElement(a.View,{style:Re.itemContent},s.a.createElement(a.Text,{style:"android"===a.Platform.OS?this.androidNestedTextWrapperStyle:{}},s.a.createElement(a.Text,{numberOfLines:1,style:Re.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:Re.customFont},"前面有张图片"))))}}const De=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 je 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:De.itemTitle},s.a.createElement(a.Text,null,e));return s.a.createElement(a.ScrollView,{style:De.container_style},t("text"),s.a.createElement(a.TextInput,{ref:e=>{this.input=e},style:De.input_style,placeholder:"text",defaultValue:e}),s.a.createElement(a.View,{style:De.button,onClick:this.changeInputContent},s.a.createElement(a.Text,null,"点击改变输入框内容")),s.a.createElement(a.View,{style:De.button,onClick:this.focus},s.a.createElement(a.Text,null,"Focus")),s.a.createElement(a.View,{style:De.button,onClick:this.blur},s.a.createElement(a.Text,null,"Blur")),t("numeric"),s.a.createElement(a.TextInput,{style:De.input_style,keyboardType:"numeric",placeholder:"numeric"}),t("phone-pad"),s.a.createElement(a.TextInput,{style:De.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),t("password"),s.a.createElement(a.TextInput,{style:De.input_style,keyboardType:"password",placeholder:"password"}),t("maxLength"),s.a.createElement(a.TextInput,{style:De.input_style,placeholder:"maxLength=5",maxLength:5}))}}var Oe=n.p+"assets/defaultSource.jpg";const Pe=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 Le(){const e=e=>s.a.createElement(a.View,{style:Pe.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:[Pe.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),s.a.createElement(a.View,{style:[Pe.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:Oe}],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:[Pe.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:[Pe.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),s.a.createElement(a.View,{style:[Pe.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},s.a.createElement(a.View,{style:[Pe.smallRectangle,{backgroundColor:"yellow"}]}),s.a.createElement(a.View,{style:[Pe.smallRectangle,{backgroundColor:"blue"}]}),s.a.createElement(a.View,{style:[Pe.smallRectangle,{backgroundColor:"green"}]})))}const Me=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:"#f44837",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}}),Be="SquarePagerView",ze="TrianglePagerView",Fe="CirclePagerView";function _e(e,t){const n=t=>s.a.createElement(a.View,{style:Me.pageContainer,key:t},s.a.createElement(a.View,{style:[Me.shapeBase,e]}),s.a.createElement(a.View,{style:Me.mainRec},t?s.a.createElement(a.Text,{style:Me.title},t):null));return n.displayName=t,n}const We=_e(Me.square,Be),He=_e(Me.triangle,ze),Ne=_e(Me.circle,Fe),Ke=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),_()(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:Ke.buttonContainer},s.a.createElement(a.View,{style:Ke.button,onClick:()=>{this.viewpager.setPage(2)}},s.a.createElement(a.Text,{style:Ke.buttonText},"动效滑到第3页")),s.a.createElement(a.View,{style:Ke.button,onClick:()=>this.viewpager.setPageWithoutAnimation(0)},s.a.createElement(a.Text,{style:Ke.buttonText},"直接滑到第1页"))),s.a.createElement(a.ViewPager,{ref:e=>{this.viewpager=e},style:Ke.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[We(),He(),Ne()]),s.a.createElement(a.View,{style:Ke.dotContainer},new Array(3).fill(0).map((t,n)=>{const o=n===e;return s.a.createElement(a.View,{style:[Ke.dot,o?Ke.selectDot:null]})})))}}const Ge=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 Ue(){return s.a.createElement(a.View,{style:{padding:10}},s.a.createElement(a.View,{style:Ge.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:Ge.webViewStyle}))}const Qe=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"}}),Ye=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 Je(){return s.a.createElement(a.View,{style:Qe.shadowDemo},"android"===a.Platform.OS?s.a.createElement(a.View,{style:Qe.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Qe.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Qe.text},"没有偏移阴影样式"))):s.a.createElement(a.View,{style:Qe.shadowDemoCubeIos},s.a.createElement(a.View,{style:Qe.shadowDemoContentIos},s.a.createElement(a.Text,{style:Qe.text},"没有偏移阴影样式"))),"android"===a.Platform.OS?s.a.createElement(a.View,{style:Ye.shadowDemoCubeAndroid},s.a.createElement(a.View,{style:Ye.shadowDemoContentAndroid},s.a.createElement(a.Text,{style:Ye.text},"偏移阴影样式"))):s.a.createElement(a.View,{style:Ye.shadowDemoCubeIos},s.a.createElement(a.View,{style:Ye.shadowDemoContentIos},s.a.createElement(a.Text,{style:Ye.text},"偏移阴影样式"))))}const Xe=le.filter(e=>2!==e.style),Ze=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 $e 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:Ze.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(me,{itemBean:o.itemBean});break;case 2:n=s.a.createElement(ye,{itemBean:o.itemBean});break;case 5:n=s.a.createElement(Se,{itemBean:o.itemBean})}return s.a.createElement(a.View,{onClick:()=>this.onItemClick(e),style:Ze.container},s.a.createElement(a.View,{style:Ze.itemContainer},n),s.a.createElement(a.View,{style:Ze.splitter}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>{const t=[...Xe,...Xe];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 et="#4c9afa",tt="#f44837",nt=a.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:tt},showArea:{height:150,marginVertical:10},button:{borderColor:et,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:et,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}});class ot 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:nt.container},s.a.createElement(a.Text,{style:nt.title},"水平位移动画"),s.a.createElement(a.View,{style:nt.buttonContainer},s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.horizonAnimation.start()}},s.a.createElement(a.Text,{style:nt.buttonText},"开始")),s.a.createElement(a.View,{style:[nt.button],onClick:()=>{this.horizonAnimation.pause()}},s.a.createElement(a.Text,{style:nt.buttonText},"暂停")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.horizonAnimation.resume()}},s.a.createElement(a.Text,{style:nt.buttonText},"继续")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},s.a.createElement(a.Text,{style:nt.buttonText},"更新"))),s.a.createElement(a.View,{style:nt.showArea},s.a.createElement(a.View,{ref:e=>{this.horizonRef=e},style:[nt.square,{transform:[{translateX:this.horizonAnimation}]}]})),s.a.createElement(a.Text,{style:nt.title},"高度形变动画"),s.a.createElement(a.View,{style:nt.buttonContainer},s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.verticalAnimation.start()}},s.a.createElement(a.Text,{style:nt.buttonText},"开始")),s.a.createElement(a.View,{style:[nt.button],onClick:()=>{this.verticalAnimation.pause()}},s.a.createElement(a.Text,{style:nt.buttonText},"暂停")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.verticalAnimation.resume()}},s.a.createElement(a.Text,{style:nt.buttonText},"继续"))),s.a.createElement(a.View,{style:nt.showArea},s.a.createElement(a.View,{ref:e=>{this.verticalRef=e},style:[nt.square,{height:this.verticalAnimation}]})),s.a.createElement(a.Text,{style:nt.title},"组合形变动画"),s.a.createElement(a.View,{style:nt.buttonContainer},s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.scaleAnimationSet.start()}},s.a.createElement(a.Text,{style:nt.buttonText},"开始")),s.a.createElement(a.View,{style:[nt.button],onClick:()=>{this.scaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:nt.buttonText},"暂停")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.scaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:nt.buttonText},"继续"))),s.a.createElement(a.View,{style:[nt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.scaleRef=e},style:[nt.square,{transform:[{scale:this.scaleAnimationSet}]}]})),s.a.createElement(a.Text,{style:nt.title},"颜色渐变动画(文字渐变仅Android支持)"),s.a.createElement(a.View,{style:nt.buttonContainer},s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.bgColorAnimationSet.start(),this.txtColorAnimationSet.start()}},s.a.createElement(a.Text,{style:nt.buttonText},"开始")),s.a.createElement(a.View,{style:[nt.button],onClick:()=>{this.bgColorAnimationSet.pause(),this.txtColorAnimationSet.pause()}},s.a.createElement(a.Text,{style:nt.buttonText},"暂停")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.bgColorAnimationSet.resume(),this.txtColorAnimationSet.resume()}},s.a.createElement(a.Text,{style:nt.buttonText},"继续"))),s.a.createElement(a.View,{style:[nt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.bgColorRef=e},style:[nt.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},s.a.createElement(a.Text,{ref:e=>{this.textColorRef=e},style:[nt.colorText,{color:"android"===a.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),s.a.createElement(a.Text,{style:nt.title},"贝塞尔曲线动画"),s.a.createElement(a.View,{style:nt.buttonContainer},s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.cubicBezierScaleAnimationSet.start()}},s.a.createElement(a.Text,{style:nt.buttonText},"开始")),s.a.createElement(a.View,{style:[nt.button],onClick:()=>{this.cubicBezierScaleAnimationSet.pause()}},s.a.createElement(a.Text,{style:nt.buttonText},"暂停")),s.a.createElement(a.View,{style:nt.button,onClick:()=>{this.cubicBezierScaleAnimationSet.resume()}},s.a.createElement(a.Text,{style:nt.buttonText},"继续"))),s.a.createElement(a.View,{style:[nt.showArea,{marginVertical:20}]},s.a.createElement(a.View,{ref:e=>{this.cubicBezierScaleRef=e},style:[nt.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}const rt=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 it 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:rt.containerStyle},s.a.createElement(a.View,{style:rt.viewGroupStyle},s.a.createElement(a.Text,{style:rt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:rt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:rt.viewGroupStyle},s.a.createElement(a.Text,{style:rt.infoStyle},"Value:"),s.a.createElement(a.TextInput,{style:rt.inputStyle,onChangeText:this.onTextChangeValue})),s.a.createElement(a.View,{style:rt.itemGroupStyle,onClick:this.onClickSet},s.a.createElement(a.Text,{style:rt.buttonStyle},"Set")),s.a.createElement(a.View,{style:[rt.viewGroupStyle,{marginTop:60}]},s.a.createElement(a.Text,{style:rt.infoStyle},"Key:"),s.a.createElement(a.TextInput,{style:rt.inputStyle,onChangeText:this.onTextChangeKey})),s.a.createElement(a.View,{style:[rt.viewGroupStyle,{display:"none"}]},s.a.createElement(a.Text,{style:rt.infoStyle},"Value:"),s.a.createElement(a.Text,{style:[rt.infoStyle,{width:200}]},e)),s.a.createElement(a.View,{style:rt.itemGroupStyle,onClick:this.onClickGet},s.a.createElement(a.Text,{style:rt.buttonStyle},"Get")))}}const at=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 lt 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:at.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:at.defaultText},n),s.a.createElement(a.View,{style:at.button,onClick:()=>{a.Clipboard.setString(n),this.setState({hasCopied:!0})}},s.a.createElement(a.Text,{style:at.buttonText},"点击复制以上文案"+r)),e("获取剪贴板内容"),s.a.createElement(a.View,{style:at.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:at.buttonText},"点击获取剪贴板内容")),s.a.createElement(a.Text,{style:[at.defaultText,at.copiedText]},o))}}const st=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 ct 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:st.container},s.a.createElement(a.View,{style:st.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:st.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 ht=a.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}});class ut 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:ht.container},s.a.createElement(a.Text,{style:ht.text},e))}}var mt={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 dt extends s.a.Component{constructor(e){super(e),this.state={hello:"TestModule log"}}componentDidMount(){mt.log("hello i am from js"),mt.helloNative({hello:"i am form js"}),mt.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 ft=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"}}),pt="wss://echo.websocket.org",gt="Rock it with Hippy WebSocket";let yt;var wt=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:ft.fullScreen},s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:ft.title},"Url:"),s.a.createElement(a.TextInput,{ref:e,value:pt,style:ft.input}),s.a.createElement(a.View,{style:ft.row},s.a.createElement(a.Text,{onClick:()=>{e.current.getValue().then(e=>{yt&&1===yt.readyState&&yt.close(),yt=new WebSocket(e),yt.onopen=()=>r("[Opened] "+yt.url),yt.onclose=()=>r("[Closed] "+yt.url),yt.onerror=e=>r("[Error] "+e.reason),yt.onmessage=e=>r("[Received] "+e.data)})},style:ft.button},"Connect"),s.a.createElement(a.Text,{onClick:()=>yt.close(),style:ft.button},"Disconnect"))),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:ft.title},"Message:"),s.a.createElement(a.TextInput,{ref:t,value:gt,style:ft.input}),s.a.createElement(a.Text,{onClick:()=>t.current.getValue().then(e=>{r("[Sent] "+e),yt.send(e)}),style:ft.button},"Send")),s.a.createElement(a.View,null,s.a.createElement(a.Text,{style:ft.title},"Log:"),s.a.createElement(a.ScrollView,{style:ft.fullScreen},n.map((e,t)=>s.a.createElement(a.Text,{key:t,style:ft.output},e)))))};function bt(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 xt(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}),h=xt(xt({},St.box),o);return s.a.createElement(a.View,{style:St.full},s.a.createElement(a.View,{style:St.demoContent},s.a.createElement(a.View,{ref:e,style:h},s.a.createElement(a.Text,{style:St.text},"I am the box"))),s.a.createElement(a.View,{style:St.buttonContainer},s.a.createElement(a.View,{onClick:()=>{const e=Et(0,t),o=Et(0,n-300),i=Et(50,120);r({left:e,top:o,width:i,height:i})},style:St.button},s.a.createElement(a.Text,{style:St.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:St.button},s.a.createElement(a.Text,{style:St.buttonText},"Measure box in window"))),s.a.createElement(a.View,{style:St.row},s.a.createElement(a.View,{style:St.full},s.a.createElement(a.Text,null,"Box style:"),s.a.createElement(a.Text,{style:St.black},"Width: "+h.width),s.a.createElement(a.Text,{style:St.black},"Height: "+h.height),s.a.createElement(a.Text,{style:St.black},"Left: "+h.left),s.a.createElement(a.Text,{style:St.black},"Top: "+h.top)),s.a.createElement(a.View,{style:St.full},s.a.createElement(a.Text,null,"measureInWindow output:"),s.a.createElement(a.Text,{style:St.black},"Width: "+i.width),s.a.createElement(a.Text,{style:St.black},"Height: "+i.height),s.a.createElement(a.Text,{style:St.black},"X: "+i.x),s.a.createElement(a.Text,{style:St.black},"Y: "+i.y))))},Tt=n("./node_modules/@babel/runtime/helpers/extends.js"),vt=n.n(Tt);class At extends s.a.Component{changeColor(e){a.UIManagerModule.callUIFunction(this.mytext,"changeColor",[e])}render(){return s.a.createElement("div",vt()({nativeName:"MyView",ref:e=>{this.mytext=e}},this.props))}}class Vt extends s.a.Component{componentDidMount(){setTimeout(()=>{this.myview.changeColor("#0055f0")},1e3)}render(){return s.a.createElement(At,{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 Rt=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 kt 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(kt,{ref:e=>{this.indicator=e},count:this.itemCount}))}}_()(It,"defaultProps",{duration:0,currentPage:0,images:[]});const Dt=["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"],jt=a.StyleSheet.create({sliderStyle:{width:400,height:180},infoStyle:{height:40,fontSize:16,color:"#4c9afa",marginTop:15}});function Ot(){return s.a.createElement(a.ScrollView,null,s.a.createElement(a.Text,{style:jt.infoStyle},"Auto:"),s.a.createElement(It,{style:jt.sliderStyle,images:Dt,duration:1e3}),s.a.createElement(a.Text,{style:jt.infoStyle},"Manual:"),s.a.createElement(It,{style:jt.sliderStyle,images:Dt,duration:0}))}const Pt=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 Lt 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 We(e);case 1:return Ne(e);case 2:return He(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=se.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:Pt.container},s.a.createElement(a.ScrollView,{style:Pt.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:e=>{this.navScrollView=e}},e.map((e,n)=>s.a.createElement(a.View,{style:Pt.navItem,key:"nav_"+e,activeOpacity:.5,onClick:()=>this.pressNavItem(n)},s.a.createElement(a.Text,{style:[Pt.navItemText,t===n?Pt.navItemTextBlue:Pt.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)=>Lt.getPage(e,t))))}}const{width:Mt}=a.Dimensions.get("window"),Bt=a.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:Mt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Mt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}});class zt 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,Mt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchMove1(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Mt),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}onTouchDown2(e){const{page_x:t}=e,n=t-40;console.log("touchdown x",t,n,Mt),this.setState({demo2Left:n})}onTouchMove2(e){const{page_x:t}=e,n=t-40;console.log("touchmove x",t,n,Mt),this.setState({demo2Left:n})}render(){const{demo2Left:e}=this.state;return s.a.createElement(a.View,{style:Bt.setNativePropsDemo},s.a.createElement(a.Text,null,"setNativeProps实现拖动效果"),s.a.createElement(a.View,{style:Bt.nativeDemo1Drag,onTouchDown:e=>this.onTouchDown1(e),onTouchMove:e=>this.onTouchMove1(e)},s.a.createElement(a.View,{onLayout:()=>this.onDemon1Layout(),style:Bt.nativeDemo1Point,ref:this.demon1Point})),s.a.createElement(a.View,{style:Bt.splitter}),s.a.createElement(a.Text,null,"普通渲染实现拖动效果"),s.a.createElement(a.View,{style:Bt.nativeDemo2Drag,onTouchDown:e=>this.onTouchDown2(e),onTouchMove:e=>this.onTouchMove2(e)},s.a.createElement(a.View,{style:[Bt.nativeDemo2Point,{left:e}]})))}}const Ft=a.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class _t 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:Ft.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 Wt=a.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Ht extends s.a.Component{render(){const{country:e,language:t,direction:n}=a.Platform.Localization||{};return s.a.createElement(a.View,{style:Wt.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"}`)))}}function Nt(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 Kt(e){for(var t=1;t0===e.index?s.a.createElement(a.View,{style:[Yt.container]},s.a.createElement(a.View,{style:{backgroundColor:Yt.title.backgroundColor,marginLeft:12}},s.a.createElement(a.Text,{numberOfLines:1,style:[Yt.title,{fontWeight:"bold"}]},t.name)),s.a.createElement(a.View,{style:Yt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Yt.title},"v",a.default.version))):s.a.createElement(a.View,{style:[Yt.container]},s.a.createElement(a.View,{onClick:()=>e.goBack(),style:[Yt.headerButton,"ios"===a.Platform.OS?null:{marginLeft:20}]},s.a.createElement(a.Image,{style:Yt.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:Yt.headerButton},s.a.createElement(a.Text,{numberOfLines:1,style:Yt.title},t.name))));const Xt="#4c9afa",Zt="#f44837",$t=a.StyleSheet.create({rowContainer:{alignItems:"center"},buttonView:{borderColor:Xt,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:Xt,textAlign:"center",textAlignVertical:"center"}});class en 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:$t.rowContainer},s.a.createElement(a.View,{onPressIn:()=>this.feedback(o.path),onPressOut:()=>this.feedback(),onClick:()=>this.clickTo(o.path),style:[$t.buttonView,{borderColor:1===r?Xt:Zt,opacity:n===o.path?.5:1}]},s.a.createElement(a.Text,{style:[$t.buttonText,{color:1===r?Xt:Zt}]},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 tn=[{path:"/Gallery",name:"Hippy React 示例",component:z(en),meta:{style:1}},...Gt];var nn=()=>s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(R,{initialEntries:["/Gallery"]},tn.map(e=>{const t=e.component;return s.a.createElement(j,{key:e.path,exact:!0,path:""+e.path},s.a.createElement(a.View,{style:{flex:1,backgroundColor:"#fff"}},s.a.createElement(Jt,{route:e}),s.a.createElement(t,{meta:e.meta||{}})))})));const on=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 rn 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:on.container},e.map((e,t)=>s.a.createElement(a.Text,{style:on.stepText,key:"steps-"+t},e)),s.a.createElement(a.View,{style:on.buttonContainer},s.a.createElement(a.View,{style:on.button,onClick:this.clickToDebug},s.a.createElement(a.Text,{style:on.buttonText,numberOfLines:1},"点击调试"))))}}const an=a.StyleSheet.create({container:{flex:1}});class ln 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(nn,null);case 1:case 2:return s.a.createElement(rn,{instanceId:n});default:return s.a.createElement(a.View,{style:sn.blankPage})}})(),s.a.createElement(a.View,{style:sn.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:sn.button,onClick:()=>this.setState({pageIndex:n})},s.a.createElement(a.Text,{style:[sn.buttonText,n===e?{color:"#4c9afa"}:null],numberOfLines:1},t)))})()))}}new a.Hippy({appName:"Demo",entryPage:cn}).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 58540b1bc94..1c1e5c677ce 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 Ht})),n.d(t,"Animation",(function(){return he})),n.d(t,"AnimationSet",(function(){return ye})),n.d(t,"AppRegistry",(function(){return zt})),n.d(t,"AsyncStorage",(function(){return yn})),n.d(t,"BackAndroid",(function(){return gn})),n.d(t,"Clipboard",(function(){return vn})),n.d(t,"ConsoleModule",(function(){return An})),n.d(t,"Dimensions",(function(){return Hn})),n.d(t,"Easing",(function(){return Ut})),n.d(t,"Focusable",(function(){return sn})),n.d(t,"Hippy",(function(){return On})),n.d(t,"HippyEventEmitter",(function(){return ee})),n.d(t,"HippyEventListener",(function(){return J})),n.d(t,"HippyRegister",(function(){return En})),n.d(t,"Image",(function(){return Mt})),n.d(t,"ImageBackground",(function(){return jn})),n.d(t,"ImageLoaderModule",(function(){return kn})),n.d(t,"ListView",(function(){return qt})),n.d(t,"ListViewItem",(function(){return Dt})),n.d(t,"Modal",(function(){return un})),n.d(t,"Navigator",(function(){return Gt})),n.d(t,"NetInfo",(function(){return Sn})),n.d(t,"NetworkModule",(function(){return wn})),n.d(t,"PixelRatio",(function(){return Un})),n.d(t,"Platform",(function(){return Rn})),n.d(t,"PullFooter",(function(){return Vt})),n.d(t,"PullHeader",(function(){return Wt})),n.d(t,"RNfqb",(function(){return zn})),n.d(t,"RNfqbEventEmitter",(function(){return Ln})),n.d(t,"RNfqbEventListener",(function(){return Mn})),n.d(t,"RNfqbRegister",(function(){return Fn})),n.d(t,"RefreshWrapper",(function(){return Qt})),n.d(t,"ScrollView",(function(){return ln})),n.d(t,"StyleSheet",(function(){return rn})),n.d(t,"Text",(function(){return Lt})),n.d(t,"TextInput",(function(){return Zt})),n.d(t,"TimerModule",(function(){return _n})),n.d(t,"UIManagerModule",(function(){return Cn})),n.d(t,"View",(function(){return jt})),n.d(t,"ViewPager",(function(){return Xt})),n.d(t,"WaterfallView",(function(){return mn})),n.d(t,"WebSocket",(function(){return dn})),n.d(t,"WebView",(function(){return cn})),n.d(t,"callNative",(function(){return Tn})),n.d(t,"callNativeWithCallbackId",(function(){return In})),n.d(t,"callNativeWithPromise",(function(){return Nn})),n.d(t,"colorParse",(function(){return wt})),n.d(t,"removeNativeCallback",(function(){return Pn}));var r=n("./node_modules/react/index.js"),i=n.n(r),o=n("./node_modules/react-reconciler/index.js"),l=n.n(o);const a=["children"],u=["collapsable","style"],s=["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"],y=["component"],g=["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 x(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 Mt})),n.d(t,"Animation",(function(){return he})),n.d(t,"AnimationSet",(function(){return ge})),n.d(t,"AppRegistry",(function(){return zt})),n.d(t,"AsyncStorage",(function(){return gn})),n.d(t,"BackAndroid",(function(){return yn})),n.d(t,"Clipboard",(function(){return vn})),n.d(t,"ConsoleModule",(function(){return An})),n.d(t,"Dimensions",(function(){return Mn})),n.d(t,"Easing",(function(){return Ut})),n.d(t,"Focusable",(function(){return un})),n.d(t,"Hippy",(function(){return On})),n.d(t,"HippyEventEmitter",(function(){return ee})),n.d(t,"HippyEventListener",(function(){return J})),n.d(t,"HippyRegister",(function(){return kn})),n.d(t,"Image",(function(){return Ht})),n.d(t,"ImageBackground",(function(){return Tn})),n.d(t,"ImageLoaderModule",(function(){return En})),n.d(t,"ListView",(function(){return qt})),n.d(t,"ListViewItem",(function(){return Dt})),n.d(t,"Modal",(function(){return sn})),n.d(t,"Navigator",(function(){return Gt})),n.d(t,"NetInfo",(function(){return xn})),n.d(t,"NetworkModule",(function(){return wn})),n.d(t,"PixelRatio",(function(){return Un})),n.d(t,"Platform",(function(){return Ln})),n.d(t,"PullFooter",(function(){return Bt})),n.d(t,"PullHeader",(function(){return Wt})),n.d(t,"RNfqb",(function(){return zn})),n.d(t,"RNfqbEventEmitter",(function(){return Fn})),n.d(t,"RNfqbEventListener",(function(){return Hn})),n.d(t,"RNfqbRegister",(function(){return jn})),n.d(t,"RefreshWrapper",(function(){return Qt})),n.d(t,"ScrollView",(function(){return an})),n.d(t,"StyleSheet",(function(){return rn})),n.d(t,"Text",(function(){return Ft})),n.d(t,"TextInput",(function(){return Zt})),n.d(t,"TimerModule",(function(){return Rn})),n.d(t,"UIManagerModule",(function(){return Cn})),n.d(t,"View",(function(){return Tt})),n.d(t,"ViewPager",(function(){return Xt})),n.d(t,"WaterfallView",(function(){return mn})),n.d(t,"WebSocket",(function(){return fn})),n.d(t,"WebView",(function(){return cn})),n.d(t,"callNative",(function(){return Nn})),n.d(t,"callNativeWithCallbackId",(function(){return Pn})),n.d(t,"callNativeWithPromise",(function(){return In})),n.d(t,"colorParse",(function(){return wt})),n.d(t,"removeNativeCallback",(function(){return _n}));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"],d=["children"],f=["children"],p=["children","style","renderRow","renderPullHeader","renderPullFooter","getRowType","getRowStyle","getRowKey","dataSource","initialListSize","rowShouldSticky","onRowLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","onAppear","onDisappear","onWillAppear","onWillDisappear"],h=["children"],m=["initialRoute"],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 S(e){for(var t=1;t=0||(i[n]=e[n]);return i} /*! - * @hippy/react v2.9.2 - * Build at: Tue Oct 12 2021 21:43:31 GMT+0800 (China Standard Time) + * @hippy/react v2.2.1 + * Build at: Thu Sep 30 2021 22:00:49 GMT+0800 (China Standard Time) * * Tencent is pleased to support the open source community by making * Hippy available. @@ -20,13 +20,13 @@ 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__:S}=e;S.nodeId=0,S.animationId=0,S.renderCount=0;const{asyncStorage:C,bridge:T,device:N,document:I,register:P,on:_,off:A,emit:R}=e.Hippy;var O=Object.freeze({__proto__:null,addEventListener:_,removeEventListener:A,dispatchEvent:R,AsyncStorage:C,Bridge:T,Device:N,HippyRegister:P,UIManager:I});let z,j;function F(e,t){j=e,z=t}function L(){if(!j)throw new Error("getRootViewId must execute after setRootContainer");return j}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 H(e){return M(t=>t.stateNode&&t.stateNode.nodeId===e)}const U=new RegExp(/^\d+$/);let D=!1;function W(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const V=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function B(e){return"[object Function]"===Object.prototype.toString.call(e)}function $(e){D=e}function q(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}class Q{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}}const K=new Map;function G(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: "+e);return K.get(e)||null}const Y={registerNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: "+e);let t=K.get(e);return t||(t=new Q(e),K.set(e,t)),t},getHippyEventHub:G,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: "+e);K.has(e)&&K.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=G(t);r&&r.notifyEvent(n)},receiveNativeGesture:function(e){if(!e)return;const{id:t}=e,n=H(t);if(!n)return;let r=!1,i=n,{name:o}=e;do{if(i.memoizedProps&&!i.memoizedProps[o]&&"onClick"===o&&i.memoizedProps.onPress&&(o="onPress"),i.memoizedProps&&i.memoizedProps[o]&&"function"==typeof i.memoizedProps[o])try{r=i.memoizedProps[o](e)}catch(e){console.reportUncaughtException(e)}if("boolean"!=typeof r&&(r=!0),!1===r)for(i=i.return;i&&5!==i.tag;)i=i.return}while(!r&&i)},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=H(t);i&&i.memoizedProps&&i.memoizedProps[n]&&"function"==typeof i.memoizedProps[n]&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=Y);class X{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 J{constructor(e){this.eventName=e,this.listenerIds=[]}addCallback(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");const n=Y.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=Y.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 le.set(r,r),new ue(n,t)},removeEventListener:se,fetch:function(){return T.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function fe(e){return"loop"===e?-1:e}const de=new ee;function pe(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?wt(t):t}class he{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=pe(e.valueType,n)}const n=pe(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=fe(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=lt.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=de.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=de.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=de.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=de.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),lt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),lt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){lt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){lt.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 he)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=pe(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=fe(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),lt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:pe(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 me=new ee;class ye{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=lt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:fe(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=me.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=me.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=me.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=me.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),lt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&<.callNative("AnimationModule","destroyAnimation",e.animationId)),lt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){lt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){lt.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 ge={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let be=!0,ve=[];function we(){be&&Ve()}function xe(e){be&&(be=!1,Promise.resolve().then(()=>{(function(e){const t=[];for(let n=0;n{switch(t.type){case ge.createNode:t.nodes,He(e,t.nodes);break;case ge.updateNode:t.nodes,"ios"===N.platform.OS?t.nodes.forEach(t=>Ue(e,[t])):Ue(e,t.nodes);break;case ge.deleteNode:t.nodes,"ios"===N.platform.OS?t.nodes.forEach(t=>De(e,[t])):De(e,t.nodes)}}),Be(),ve=[],be=!0}))}function Ee(e){const t=e.attributes,{children:n}=t;return k(t,a)}function ke(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:x(x({},Ee(t)),{},{style:t.style})}}function Se(e,t){const n=[];return t.traverseChildren(t=>{const r=ke(e,t);r&&n.push(r)}),n}function Ce(e){return!!z&&e instanceof z.containerInfo.constructor}function Te(e,t,n=-1){if(!e)return;if(t.meta.skipAddToDom)return;const r=L();if(Ce(e)&&!e.isMounted){const n=Se(r,t);we(),ve.push({type:ge.createNode,nodes:n}),xe(r),e.traverseChildren(e=>{e.isMounted||(e.isMounted=!0)})}else if(e.isMounted&&!t.isMounted){const e=Se(r,t);we(),ve.push({type:ge.createNode,nodes:e}),xe(r),t.traverseChildren(e=>{e.isMounted||(e.isMounted=!0)})}}function Ne(e,t){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.traverseChildren(e=>{e.isMounted&&(e.isMounted=!1)});const n=L(),r=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:n,index:t.index}];we(),ve.push({type:ge.deleteNode,nodes:r}),xe(n)}function Ie(e){if(!e.isMounted)return;const t=L(),n=ke(t,e);we(),n&&ve.push({type:ge.updateNode,nodes:[n]}),xe(t)}let Pe=0;class _e{constructor(){this.meta={component:{}},this._isMounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.prevSibling=null,this.nextSibling=null,this.nodeId=(Pe+=1,Pe%10==0&&(Pe+=1),Pe)}toString(){return this.constructor.name}get firstChild(){return this.childNodes.length?this.childNodes[0]:null}get lastChild(){return this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}get isMounted(){return this._isMounted}set isMounted(e){this._isMounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");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,e.nextSibling=t,e.prevSibling=this.childNodes[n-1],t.prevSibling=e,this.childNodes.splice(n,0,e),Te(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't mvoe child.");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),r=this.childNodes.indexOf(t);if(r===n)return e;e.nextSibling=t,e.prevSibling=t.prevSibling,t.prevSibling=e,this.childNodes[r-1]&&(this.childNodes[r-1].nextSibling=e),this.childNodes[r+1]&&(this.childNodes[r+1].prevSibling=e),this.childNodes[n-1]&&(this.childNodes[n-1].nextSibling=this.childNodes[n+1]),this.childNodes[n+1]&&(this.childNodes[n+1].prevSibling=this.childNodes[n-1]),Ne(0,e),this.childNodes.splice(r,0,e),this.childNodes.splice(n+(re.index>-1).indexOf(e))}appendChild(e){if(!e)throw new Error("Can't append child.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.lastChild&&(e.prevSibling=this.lastChild,this.lastChild.nextSibling=e),this.childNodes.push(e),Te(this,e,this.childNodes.length-1)}removeChild(e){if(!e)throw new Error("Can't remove child.");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.");e.meta.skipAddToDom||(Ne(0,e),e.prevSibling&&(e.prevSibling.nextSibling=e.nextSibling,e.prevSibling=null),e.nextSibling&&(e.nextSibling.prevSibling=e.prevSibling,e.nextSibling=null),this.childNodes=this.childNodes.filter(t=>t!==e))}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t!e.meta.skipAddToDom).indexOf(this):0,this.index=t,e(this),this.childNodes.length&&this.childNodes.forEach(t=>{this.traverseChildren.call(t,e)})}}const Ae={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Re={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},Oe="turn",ze="rad",je="deg";function Fe(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,l]=n;return o&&l?r=function(e,t=je){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case Oe:r=""+(360*n).toFixed(2);break;case ze:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,l):i&&void 0!==Re[i]&&(r=Re[i]),r}function Le(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:wt(n)}:void 0:{color:wt(n)}}class Me extends _e{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,U.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=x(x({},n),e)}):"object"==typeof e&&e&&(n=x(x({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Ae,e)&&(e=Ae[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 he||r instanceof ye?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 null===t&&void 0!==this.style[e]?this.style[e]=void 0:t instanceof he||t instanceof ye?this.style[e]={animationId:t.animationId}:e.toLowerCase().indexOf("colors")>-1?this.style[e]=xt(t):e.toLowerCase().indexOf("color")>-1?this.style[e]=wt(t):"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=Fe(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Le(e);t&&r.push(t)}}else{const t=Le(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=q(t);return 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 Ie(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=L(),n=Se(t,e);we(),ve.push({type:ge.updateNode,nodes:n}),xe(t)}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=W(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["numberOfRows"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,"ios"!==at.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:()=>(this.attributes[e]="function"==typeof t||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?xt(r):i.toLowerCase().indexOf("color")>-1?wt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&V.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Ie(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)}),Ie(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=W(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:He,updateNode:Ue,deleteNode:De,flushBatch:We,startBatch:Ve,endBatch:Be,sendRenderError:$e}=I,qe=H;function Qe(e){if(e instanceof Me)return e;const t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){let e=t.child;for(;e&&!(e.stateNode instanceof Me);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function Ke(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=Qe(t);return e?e.nodeId:0}return t.nodeId}function Ge(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=Qe(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=[],l]=n;B(o)&&(l=o,o=[]);null!==L()&&("ios"===N.platform.OS?(B(l)&&Array.isArray(o)&&o.push(l),T.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===N.platform.OS&&(B(l)?T.callNative("UIManagerModule","callUIFunction",[i,t,o],l):T.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function Ye(e,t,n){const r=Ke(t);return new Promise((t,i)=>r?T.callNative("UIManagerModule",e,r,e=>(n&&B(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&B(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var Xe=Object.freeze({__proto__:null,createNode:He,updateNode:Ue,deleteNode:De,flushBatch:We,startBatch:Ve,endBatch:Be,sendRenderError:$e,getNodeById:qe,getNodeIdByRef:Ke,getElementFromFiberRef:Qe,callUIFunction:Ge,measureInWindow:function(e,t){return Ye("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===N.platform.OS?Ye("measureInWindow",e,t):Ye("measureInAppWindow",e,t)}});const Je=new ee,Ze=new Set,et={exitApp(){T.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(T.callNative("DeviceEventModule","setListenBackPress",!0),Ze.add(e),{remove(){et.removeListener(e)}}),removeListener(e){Ze.delete(e),0===Ze.size&&T.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){Je.addListener("hardwareBackPress",()=>{let e=!0;[...Ze].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&et.exitApp()})}},tt=(et.initEventListener(),et),{addEventListener:nt,removeEventListener:rt,dispatchEvent:it,AsyncStorage:ot,Bridge:lt,Device:at,HippyRegister:ut}=O;var st=Object.freeze({__proto__:null,addEventListener:nt,removeEventListener:rt,dispatchEvent:it,AsyncStorage:ot,BackAndroid:tt,Bridge:lt,Clipboard:te,Cookie:ne,Device:at,HippyRegister:ut,ImageLoader:oe,NetworkInfo:ce,UIManager:Xe});function ct(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const ft={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},dt="[-+]?\\d*\\.?\\d+",pt={rgb:new RegExp("rgb"+ct(dt,dt,dt)),rgba:new RegExp("rgba"+ct(dt,dt,dt,dt)),hsl:new RegExp("hsl"+ct(dt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+ct(dt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",dt)),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 ht(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function mt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function yt(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 gt(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=yt(i,r,e+1/3),l=yt(i,r,e),a=yt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function bt(e){return(parseFloat(e)%360+360)%360/360}function vt(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function wt(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=pt.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(ft,e)?ft[e]:(t=pt.rgb.exec(e),Array.isArray(t)?(ht(t[1])<<24|ht(t[2])<<16|ht(t[3])<<8|255)>>>0:(t=pt.rgba.exec(e),t?(ht(t[1])<<24|ht(t[2])<<16|ht(t[3])<<8|mt(t[4]))>>>0:(t=pt.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=pt.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=pt.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=pt.hsl.exec(e),t?(255|gt(bt(t[1]),vt(t[2]),vt(t[3])))>>>0:(t=pt.hsla.exec(e),t?(gt(bt(t[1]),vt(t[2]),vt(t[3]))|mt(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 xt(e,t){return Array.isArray(e)?e.map(e=>wt(e,t)):[0]}class Et extends _e{constructor(){super(),this.documentElement=new Me("document")}createElement(e){return new Me(e)}createElementNS(e,t){return new Me(`${e}:${t}`)}}Et.createElement=Et.prototype.createElement,Et.createElementNS=Et.prototype.createElementNS;var kt=Array.isArray,St=Object.keys,Ct=Object.prototype.hasOwnProperty;const Tt=setTimeout,Nt=clearTimeout;var It=Object.freeze({__proto__:null,scheduleTimeout:Tt,cancelTimeout:Nt,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(e){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t){Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},clearContainer:function(e){},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),o},createTextInstance:function(e,t){const n=t.createElement("p");return n.setAttribute("text",W(e)),n.meta={component:{name:"Text",skipAddToDom:!0}},n},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(e){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(e){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(e){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(e){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(e){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(e){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(e){},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"==typeof t&&"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,l=kt(t),a=kt(n);if(l&&a){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(l!=a)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=St(t);if((i=d.length)!==St(n).length)return!1;for(r=i;0!=r--;)if(!Ct.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)},removeChildFromContainer:function(e,t){e.removeChild(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(e){throw new Error("Not yet implemented.")},unhideTextInstance:function(e,t){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=x(x({},t),{},{style:x(x({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(e){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 Pt=l()(x(x({},It),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{createContainer:_t,updateContainer:At,getPublicRootInstance:Rt}=Pt;class Ot{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 Et;this.rootContainer=_t(t,!1,!1)}static get Native(){return st}start(){ut.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,callback:o=(()=>{})}=this.config,{__instanceId__:l}=e;this.rootContainer.containerInfo.nodeId=l,r&&$(r),F(l,this.rootContainer);const a=i.a.createElement(n,e);return At(a,this.rootContainer,null,o),Rt(this.rootContainer)}}Ot.version="2.9.2";const zt={registerComponent(e,t){new Ot({appName:e,entryPage:t}).start()}};class jt extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=k(e,u),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function Ft(e,t){let{style:n}=e,r=k(e,s);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=W(r.children);else if("number"==typeof r.children)r.text=W(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=W(e),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}Ft.displayName="Text";const Lt=i.a.forwardRef(Ft);Lt.displayName="Text";class Mt 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=re(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=>q(e))),i}handleTintColor(e,t,n){t&&(e.tintColor=wt(t)),Array.isArray(n)&&(e.tintColors=xt(n))}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:l,sources:a,src:u,srcs:s,tintColor:f,tintColors:d}=e,p=k(e,c),h=this.getImageUrls({src:u,srcs:s,source:l,sources:a});"ios"===at.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===at.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=q(p.defaultSource));const m=x({},n);return this.handleTintColor(m,f,d),p.style=m,t?i.a.createElement(jt,{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}))}}Mt.prefetch=ie;class Ht{constructor(){this.Value=Ht.Value}static Value(e){return e}static timing(e,t){return new he({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}Ht.View=jt,Ht.Text=Lt,Ht.Image=Mt;const Ut={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 Dt(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}class Wt extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){Ge(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===at.platform.OS?Ge(this.instance,"collapsePullHeader",[e]):void 0!==e?Ge(this.instance,"collapsePullHeaderWithOptions",[e]):Ge(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=k(e,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class Vt extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){Ge(this.instance,"expandPullFooter",[])}collapsePullFooter(){Ge(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=k(e,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}Vt.defaultProps={sticky:!0};const Bt={onDisappear:"onDisAppear"},$t={onDisappear:"onDisappear"};class qt 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){let t=e;return t.indexOf("bound")>=0&&(t=t.substring("bound".length+1)),"android"===at.platform.OS&&Bt[t]?Bt[t]:"ios"===at.platform.OS&&$t[t]?$t[t]:t}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Ge(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Ge(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(Wt,{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(Vt,{ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleRowProps(e,t,{getRowKey:n,getRowStyle:r,onRowLayout:i,getRowType:o,rowShouldSticky:l}){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 l&&(e.sticky=l(t))}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:o,renderPullFooter:l,getRowType:a,getRowStyle:u,getRowKey:s,dataSource:c,initialListSize:f,rowShouldSticky:d,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:y,onFooterPulling:g,onFooterReleased:b,onAppear:v,onDisappear:w,onWillAppear:E,onWillDisappear:S}=e,C=k(e,p),T=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const p=this.getPullHeader(o,m,y),k=this.getPullFooter(l,g,b);!t&&c&&(t=c.length),e||(t=Math.min(t,f||10));for(let e=0;e{"function"==typeof n&&(t[this.convertName(n.name)]=()=>{n(e)})}),n&&T.push(i.a.createElement(Dt,Object.assign({},t),n))}p&&T.unshift(p),k&&T.push(k),"function"==typeof d&&Object.assign(C,{rowShouldSticky:!0});const N=[v,w,E,S];C.exposureEventEnabled=N.some(e=>"function"==typeof e),C.numberOfRows=T.length,C.initialListSize=f,C.style=x({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),T.length?T:t)}}qt.defaultProps={numberOfRows:0};class Qt 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(){Ge(this.instance,"startRefresh",null)}refreshCompleted(){Ge(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=k(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 Kt{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 Ot({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),Ge(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),Ge(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=k(e.initialRoute,y),r=k(e,m);return r.initialRoute=n,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function Yt(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 Xt 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&&Ge(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&Ge(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=k(e,g);let o=[];return Array.isArray(t)?o=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),i.a.createElement(Yt,Object.assign({},t),e)}):o.push(i.a.createElement(Yt,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 Jt(){const e=N.platform.Localization;return!!e&&1===e.direction}class Zt 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=>{Ge(this.instance,"getValue",t=>e(t.text))})}setValue(e){return Ge(this.instance,"setValue",[e]),e}focus(){Ge(this.instance,"focusTextInput",[])}blur(){Ge(this.instance,"blurTextInput",[])}showInputMethod(){Ge(this.instance,"showInputMethod",[])}hideInputMethod(){Ge(this.instance,"hideInputMethod",[])}clear(){Ge(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"===at.platform.OS&&(n.keyboardHeight/=at.screen.scale),"function"==typeof t&&t(n)}render(){const e=x({},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)}),Jt()&&(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 en=at.window.scale;let tn=Math.round(.4*en)/en;function nn(e){return e}0===tn&&(tn=1/en);var rn=Object.freeze({__proto__:null,get hairlineWidth(){return tn},create:nn});const on={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 ln 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,Ge(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){Ge(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?on.contentContainerHorizontal:on.contentContainerVertical,t],l=e?Object.assign({},on.baseHorizontal,r):Object.assign({},on.baseVertical,r);return e&&(l.flexDirection=Jt()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props,{style:l}),i.a.createElement(jt,{style:o},n))}}const an={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}};class un extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===at.platform.OS&&(this.eventSubscription=new J("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===at.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 l={backgroundColor:n?"transparent":"white"};return o||(o="none",r&&(o="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:o,transparent:n,style:an.modal},this.props),i.a.createElement(jt,{style:[an.container,l]},e))}}un.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:l,style:a,noFocusStyle:u,focusStyle:s,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&&Ke(n),m=r&&Ke(r),y=o&&Ke(o),g=l&&Ke(l);let b=a;if("Text"!==p){const e=d.memoizedProps.style;b=x(x({},b),e)}if(Object.assign(b,f?s:u),"Text"===p)return i.a.createElement(jt,{focusable:!0,nextFocusDownId:h,nextFocusUpId:m,nextFocusLeftId:y,nextFocusRightId:g,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:l,requestFocus:e,onClick:c,focusable:!0,children:v,style:b,onFocus:this.handleFocus})}}function cn(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}let fn;class dn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),fn||(fn=new J("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=x({},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=fn.addCallback(this.onWebSocketEvent),T.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,T.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);T.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,fn.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}class pn extends i.a.Component{render(){const e=this.props,{collapsable:t,style:n={}}=e,r=k(e,b),o=n;return"boolean"==typeof t&&(o.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:o},r))}}function hn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}class mn 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}){Ge(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){Ge(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(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(Wt,{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(Vt,{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:l=0,numberOfItems:a=0,preloadItemNumber:u=0,renderItem:s,renderPullHeader:c,renderPullFooter:f,getItemType:d,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:y,onHeaderPulling:g,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:E,containPullHeader:S=!1,containPullFooter:C=!1,containBannerView:T=!1}=e,N=x(x({},k(e,v)),{},{style:t,numberOfColumns:r,columnSpacing:o,interItemSpacing:l,preloadItemNumber:u,contentInset:m,containPullHeader:S,containPullFooter:C,containBannerView:T}),I=[];if("function"==typeof n){const e=n();e&&(I.push(i.a.createElement(pn,{key:"bannerView"},i.a.cloneElement(e))),N.containBannerView=!0)}if("function"==typeof s){const e=this.getPullHeader(c,g,b),n=this.getPullFooter(f,w,E);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},N),I)}}e.WebSocket=dn;const{AsyncStorage:yn,BackAndroid:gn,Bridge:bn,Clipboard:vn,Cookie:wn,Device:xn,HippyRegister:En,ImageLoader:kn,NetworkInfo:Sn,UIManager:Cn}=st,{callNative:Tn,callNativeWithPromise:Nn,callNativeWithCallbackId:In,removeNativeCallback:Pn}=bn,_n=null,An=console,Rn=xn.platform,On=Ot,zn=Ot,jn=Mt,Fn=En,Ln=ee,Mn=J,Hn={get:e=>xn[e]},Un={get:()=>xn.screen.scale};t.default=Ot}.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;function j(e,t){T=e,z=t}function F(){if(!T)throw new Error("getRootViewId must execute after setRootContainer");return T}function H(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 M(e){return H(t=>t.stateNode&&t.stateNode.nodeId===e)}const U=new RegExp(/^\d+$/);let D=!1;function W(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const B=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function V(e){return"[object Function]"===Object.prototype.toString.call(e)}function $(e){D=e}function q(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}class Q{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}}const K=new Map;function G(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: "+e);return K.get(e)||null}const Y={registerNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: "+e);let t=K.get(e);return t||(t=new Q(e),K.set(e,t)),t},getHippyEventHub:G,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: "+e);K.has(e)&&K.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=G(t);r&&r.notifyEvent(n)},receiveNativeGesture:function(e){if(!e)return;const{id:t}=e,n=M(t);if(!n)return;let r=!1,i=n,{name:o}=e;do{if(i.memoizedProps&&!i.memoizedProps[o]&&"onClick"===o&&i.memoizedProps.onPress&&(o="onPress"),i.memoizedProps&&i.memoizedProps[o]&&"function"==typeof i.memoizedProps[o])try{r=i.memoizedProps[o](e)}catch(e){console.reportUncaughtException(e)}if("boolean"!=typeof r&&(r=!0),!1===r)for(i=i.return;i&&5!==i.tag;)i=i.return}while(!r&&i)},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=M(t);i&&i.memoizedProps&&i.memoizedProps[n]&&"function"==typeof i.memoizedProps[n]&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=Y);class X{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 J{constructor(e){this.eventName=e,this.listenerIds=[]}addCallback(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");const n=Y.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=Y.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 ae.set(r,r),new se(n,t)},removeEventListener:ue,fetch:function(){return N.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function de(e){return"loop"===e?-1:e}const fe=new ee;function pe(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?wt(t):t}class he{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=pe(e.valueType,n)}const n=pe(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=de(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=at.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=fe.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=fe.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=fe.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=fe.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),at.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),at.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){at.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){at.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 he)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=pe(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=de(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),at.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:pe(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 me=new ee;class ge{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=at.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:de(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=me.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=me.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=me.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=me.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),at.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&at.callNative("AnimationModule","destroyAnimation",e.animationId)),at.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){at.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){at.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 ye={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let be=!0,ve=[];function we(){be&&Be()}function Se(e){be&&(be=!1,Promise.resolve().then(()=>{(function(e){const t=[];for(let n=0;n{switch(t.type){case ye.createNode:t.nodes,Me(e,t.nodes);break;case ye.updateNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>Ue(e,[t])):Ue(e,t.nodes);break;case ye.deleteNode:t.nodes,"ios"===I.platform.OS?t.nodes.forEach(t=>De(e,[t])):De(e,t.nodes)}}),Ve(),ve=[],be=!0}))}function ke(e){const t=e.attributes,{children:n}=t;return E(t,l)}function Ee(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:S(S({},ke(t)),{},{style:t.style})}}function xe(e,t){const n=[];return t.traverseChildren(t=>{const r=Ee(e,t);r&&n.push(r)}),n}function Ce(e){return!!z&&e instanceof z.containerInfo.constructor}function Ne(e,t,n=-1){if(!e)return;if(t.meta.skipAddToDom)return;const r=F();if(Ce(e)&&!e.isMounted){const n=xe(r,t);we(),ve.push({type:ye.createNode,nodes:n}),Se(r),e.traverseChildren(e=>{e.isMounted||(e.isMounted=!0)})}else if(e.isMounted&&!t.isMounted){const e=xe(r,t);we(),ve.push({type:ye.createNode,nodes:e}),Se(r),t.traverseChildren(e=>{e.isMounted||(e.isMounted=!0)})}}function Ie(e,t){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.traverseChildren(e=>{e.isMounted&&(e.isMounted=!1)});const n=F(),r=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:n,index:t.index}];we(),ve.push({type:ye.deleteNode,nodes:r}),Se(n)}function Pe(e){if(!e.isMounted)return;const t=F(),n=Ee(t,e);we(),n&&ve.push({type:ye.updateNode,nodes:[n]}),Se(t)}let _e=0;class Re{constructor(){this.meta={component:{}},this._isMounted=!1,this.index=0,this.childNodes=[],this.parentNode=null,this.prevSibling=null,this.nextSibling=null,this.nodeId=(_e+=1,_e%10==0&&(_e+=1),_e)}toString(){return this.constructor.name}get firstChild(){return this.childNodes.length?this.childNodes[0]:null}get lastChild(){return this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}get isMounted(){return this._isMounted}set isMounted(e){this._isMounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");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,e.nextSibling=t,e.prevSibling=this.childNodes[n-1],t.prevSibling=e,this.childNodes.splice(n,0,e),Ne(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't mvoe child.");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),r=this.childNodes.indexOf(t);if(r===n)return e;e.nextSibling=t,e.prevSibling=t.prevSibling,t.prevSibling=e,this.childNodes[r-1]&&(this.childNodes[r-1].nextSibling=e),this.childNodes[r+1]&&(this.childNodes[r+1].prevSibling=e),this.childNodes[n-1]&&(this.childNodes[n-1].nextSibling=this.childNodes[n+1]),this.childNodes[n+1]&&(this.childNodes[n+1].prevSibling=this.childNodes[n-1]),Ie(0,e),this.childNodes.splice(r,0,e),this.childNodes.splice(n+(re.index>-1).indexOf(e))}appendChild(e){if(!e)throw new Error("Can't append child.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.lastChild&&(e.prevSibling=this.lastChild,this.lastChild.nextSibling=e),this.childNodes.push(e),Ne(this,e,this.childNodes.length-1)}removeChild(e){if(!e)throw new Error("Can't remove child.");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.");e.meta.skipAddToDom||(Ie(0,e),e.prevSibling&&(e.prevSibling.nextSibling=e.nextSibling,e.prevSibling=null),e.nextSibling&&(e.nextSibling.prevSibling=e.prevSibling,e.nextSibling=null),this.childNodes=this.childNodes.filter(t=>t!==e))}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t!e.meta.skipAddToDom).indexOf(this):0,this.index=t,e(this),this.childNodes.length&&this.childNodes.forEach(t=>{this.traverseChildren.call(t,e)})}}const Ae={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Le={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},Oe="turn",ze="rad",Te="deg";function je(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=Te){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case Oe:r=""+(360*n).toFixed(2);break;case ze:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==Le[i]&&(r=Le[i]),r}function Fe(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:wt(n)}:void 0:{color:wt(n)}}class He extends Re{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,U.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=S(S({},n),e)}):"object"==typeof e&&e&&(n=S(S({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Ae,e)&&(e=Ae[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 he||r instanceof ge?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 he||t instanceof ge)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=St(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=wt(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=je(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Fe(e);t&&r.push(t)}}else{const t=Fe(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=q(t);return n}(e,t,this.style);else if("textShadowOffset"===e&&t){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 Pe(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=F(),n=xe(t,e);we(),ve.push({type:ye.updateNode,nodes:n}),Se(t)}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=W(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["numberOfRows"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,"ios"!==lt.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:()=>(this.attributes[e]="function"==typeof t||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?St(r):i.toLowerCase().indexOf("color")>-1?wt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&B.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Pe(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)}),Pe(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=W(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:Me,updateNode:Ue,deleteNode:De,flushBatch:We,startBatch:Be,endBatch:Ve,sendRenderError:$e}=P,qe=M;function Qe(e){if(e instanceof He)return e;const t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){let e=t.child;for(;e&&!(e.stateNode instanceof He);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function Ke(e){let t=e;if("string"==typeof e){const n=H(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=Qe(t);return e?e.nodeId:0}return t.nodeId}function Ge(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=Qe(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;V(o)&&(a=o,o=[]);null!==F()&&("ios"===I.platform.OS?(V(a)&&Array.isArray(o)&&o.push(a),N.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===I.platform.OS&&(V(a)?N.callNative("UIManagerModule","callUIFunction",[i,t,o],a):N.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function Ye(e,t,n){const r=Ke(t);return new Promise((t,i)=>r?N.callNative("UIManagerModule",e,r,e=>(n&&V(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&V(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var Xe=Object.freeze({__proto__:null,createNode:Me,updateNode:Ue,deleteNode:De,flushBatch:We,startBatch:Be,endBatch:Ve,sendRenderError:$e,getNodeById:qe,getNodeIdByRef:Ke,getElementFromFiberRef:Qe,callUIFunction:Ge,measureInWindow:function(e,t){return Ye("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===I.platform.OS?Ye("measureInWindow",e,t):Ye("measureInAppWindow",e,t)}});const Je=new ee,Ze=new Set,et={exitApp(){N.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(N.callNative("DeviceEventModule","setListenBackPress",!0),Ze.add(e),{remove(){et.removeListener(e)}}),removeListener(e){Ze.delete(e),0===Ze.size&&N.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){Je.addListener("hardwareBackPress",()=>{let e=!0;[...Ze].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&et.exitApp()})}},tt=(et.initEventListener(),et),{addEventListener:nt,removeEventListener:rt,dispatchEvent:it,AsyncStorage:ot,Bridge:at,Device:lt,HippyRegister:st}=O;var ut=Object.freeze({__proto__:null,addEventListener:nt,removeEventListener:rt,dispatchEvent:it,AsyncStorage:ot,BackAndroid:tt,Bridge:at,Clipboard:te,Cookie:ne,Device:lt,HippyRegister:st,ImageLoader:oe,NetworkInfo:ce,UIManager:Xe});function ct(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const dt={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},ft="[-+]?\\d*\\.?\\d+",pt={rgb:new RegExp("rgb"+ct(ft,ft,ft)),rgba:new RegExp("rgba"+ct(ft,ft,ft,ft)),hsl:new RegExp("hsl"+ct(ft,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+ct(ft,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",ft)),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 ht(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function mt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function gt(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 yt(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=gt(i,r,e+1/3),a=gt(i,r,e),l=gt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function bt(e){return(parseFloat(e)%360+360)%360/360}function vt(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function wt(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=pt.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(dt,e)?dt[e]:(t=pt.rgb.exec(e),Array.isArray(t)?(ht(t[1])<<24|ht(t[2])<<16|ht(t[3])<<8|255)>>>0:(t=pt.rgba.exec(e),t?(ht(t[1])<<24|ht(t[2])<<16|ht(t[3])<<8|mt(t[4]))>>>0:(t=pt.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=pt.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=pt.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=pt.hsl.exec(e),t?(255|yt(bt(t[1]),vt(t[2]),vt(t[3])))>>>0:(t=pt.hsla.exec(e),t?(yt(bt(t[1]),vt(t[2]),vt(t[3]))|mt(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 St(e,t){return Array.isArray(e)?e.map(e=>wt(e,t)):[0]}class kt extends Re{constructor(){super(),this.documentElement=new He("document")}createElement(e){return new He(e)}createElementNS(e,t){return new He(`${e}:${t}`)}}kt.createElement=kt.prototype.createElement,kt.createElementNS=kt.prototype.createElementNS;var Et=Array.isArray,xt=Object.keys,Ct=Object.prototype.hasOwnProperty;const Nt=setTimeout,It=clearTimeout;var Pt=Object.freeze({__proto__:null,scheduleTimeout:Nt,cancelTimeout:It,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(e){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t){Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},clearContainer:function(e){},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),o},createTextInstance:function(e,t){const n=t.createElement("p");return n.setAttribute("text",W(e)),n.meta={component:{name:"Text",skipAddToDom:!0}},n},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(e){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(e){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(e){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(e){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(e){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(e){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(e){},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"==typeof t&&"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=Et(t),l=Et(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,d=n instanceof RegExp;if(c!=d)return!1;if(c&&d)return t.toString()==n.toString();var f=xt(t);if((i=f.length)!==xt(n).length)return!1;for(r=i;0!=r--;)if(!Ct.call(n,f[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=f[r]],n[o]))return!1;return!0}return t!=t&&n!=n}(t,o)||(i[e]=o)}}),Object.keys(i).length?i:null},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){e.removeChild(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(e){throw new Error("Not yet implemented.")},unhideTextInstance:function(e,t){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=S(S({},t),{},{style:S(S({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(e){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 _t=a()(S(S({},Pt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{createContainer:Rt,updateContainer:At,getPublicRootInstance:Lt}=_t;class Ot{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 kt;this.rootContainer=Rt(t,!1,!1)}static get Native(){return ut}start(){st.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,callback:o=(()=>{})}=this.config,{__instanceId__:a}=e;this.rootContainer.containerInfo.nodeId=a,r&&$(r),j(a,this.rootContainer);const l=i.a.createElement(n,e);return At(l,this.rootContainer,null,o),Lt(this.rootContainer)}}Ot.version="2.2.1";const zt={registerComponent(e,t){new Ot({appName:e,entryPage:t}).start()}};class Tt 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 jt(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=W(r.children);else if("number"==typeof r.children)r.text=W(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=W(e),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}jt.displayName="Text";const Ft=i.a.forwardRef(jt);Ft.displayName="Text";class Ht 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=re(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=>q(e))),i}handleTintColor(e,t,n){t&&(e.tintColor=wt(t)),Array.isArray(n)&&(e.tintColors=St(n))}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:a,sources:l,src:s,srcs:u,tintColor:d,tintColors:f}=e,p=E(e,c),h=this.getImageUrls({src:s,srcs:u,source:a,sources:l});"ios"===lt.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===lt.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=q(p.defaultSource));const m=S({},n);return this.handleTintColor(m,d,f),p.style=m,t?i.a.createElement(Tt,{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}))}}Ht.prefetch=ie;class Mt{constructor(){this.Value=Mt.Value}static Value(e){return e}static timing(e,t){return new he({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}Mt.View=Tt,Mt.Text=Ft,Mt.Image=Ht;const Ut={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 Dt(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}class Wt extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){Ge(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===lt.platform.OS?Ge(this.instance,"collapsePullHeader",[e]):void 0!==e?Ge(this.instance,"collapsePullHeaderWithOptions",[e]):Ge(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=E(e,d);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class Bt extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){Ge(this.instance,"expandPullFooter",[])}collapsePullFooter(){Ge(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=E(e,f);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}Bt.defaultProps={sticky:!0};const Vt={onDisappear:"onDisAppear"},$t={onDisappear:"onDisappear"};class qt 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){let t=e;return t.indexOf("bound")>=0&&(t=t.substring("bound".length+1)),"android"===lt.platform.OS&&Vt[t]?Vt[t]:"ios"===lt.platform.OS&&$t[t]?$t[t]:t}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Ge(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Ge(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(Wt,{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(Bt,{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:d,rowShouldSticky:f,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:g,onFooterPulling:y,onFooterReleased:b,onAppear:v,onDisappear:w,onWillAppear:k,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,d||10));for(let e=0;e{"function"==typeof n&&(t[this.convertName(n.name)]=()=>{n(e)})}),n&&N.push(i.a.createElement(Dt,Object.assign({},t),n))}p&&N.unshift(p),E&&N.push(E),"function"==typeof f&&Object.assign(C,{rowShouldSticky:!0});const I=[v,w,k,x];C.exposureEventEnabled=I.some(e=>"function"==typeof e),C.numberOfRows=N.length,C.initialListSize=d,C.style=S({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)}}qt.defaultProps={numberOfRows:0};class Qt 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(){Ge(this.instance,"startRefresh",null)}refreshCompleted(){Ge(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 Kt{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 Ot({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),Ge(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),Ge(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 Yt(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 Xt 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&&Ge(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&Ge(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(Yt,Object.assign({},t),e)}):o.push(i.a.createElement(Yt,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 Jt(){const e=I.platform.Localization;return!!e&&1===e.direction}class Zt 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=>{Ge(this.instance,"getValue",t=>e(t.text))})}setValue(e){return Ge(this.instance,"setValue",[e]),e}focus(){Ge(this.instance,"focusTextInput",[])}blur(){Ge(this.instance,"blurTextInput",[])}showInputMethod(){Ge(this.instance,"showInputMethod",[])}hideInputMethod(){Ge(this.instance,"hideInputMethod",[])}clear(){Ge(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"===lt.platform.OS&&(n.keyboardHeight/=lt.screen.scale),"function"==typeof t&&t(n)}render(){const e=S({},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)}),Jt()&&(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 en=lt.window.scale;let tn=Math.round(.4*en)/en;function nn(e){return e}0===tn&&(tn=1/en);var rn=Object.freeze({__proto__:null,get hairlineWidth(){return tn},create:nn});const on={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 an 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,Ge(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){Ge(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?on.contentContainerHorizontal:on.contentContainerVertical,t],a=e?Object.assign({},on.baseHorizontal,r):Object.assign({},on.baseVertical,r);return e&&(a.flexDirection=Jt()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props,{style:a}),i.a.createElement(Tt,{style:o},n))}}const ln={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}};class sn extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===lt.platform.OS&&(this.eventSubscription=new J("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===lt.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:ln.modal},this.props),i.a.createElement(Tt,{style:[ln.container,a]},e))}}sn.defaultProps={visible:!0};class un 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:d}=this.state,f=i.a.Children.only(t);let p;f&&f.child&&f.child.memoizedProps&&f.child.memoizedProps.nativeName?p=f.child.memoizedProps.nativeName:f&&f.type&&f.type.displayName&&(p=f.type.displayName);const h=n&&Ke(n),m=r&&Ke(r),g=o&&Ke(o),y=a&&Ke(a);let b=l;if("Text"!==p){const e=f.memoizedProps.style;b=S(S({},b),e)}if(Object.assign(b,d?u:s),"Text"===p)return i.a.createElement(Tt,{focusable:!0,nextFocusDownId:h,nextFocusUpId:m,nextFocusLeftId:g,nextFocusRightId:y,requestFocus:e,style:b,onClick:c,onFocus:this.handleFocus},f);const{children:v}=f.memoizedProps;return i.a.cloneElement(f,{nextFocusDownId:n,nextFocusUpId:r,nextFocusLeftId:o,nextFocusRightId:a,requestFocus:e,onClick:c,focusable:!0,children:v,style:b,onFocus:this.handleFocus})}}function cn(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}let dn;class fn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),dn||(dn=new J("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=S({},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=dn.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,dn.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}class pn 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 hn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}class mn 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}){Ge(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){Ge(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(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(Wt,{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(Bt,{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:d,getItemType:f,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:g,onHeaderPulling:y,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:k,containPullHeader:x=!1,containPullFooter:C=!1,containBannerView:N=!1}=e,I=S(S({},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(pn,{key:"bannerView"},i.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,y,b),n=this.getPullFooter(d,w,k);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}}e.WebSocket=fn;const{AsyncStorage:gn,BackAndroid:yn,Bridge:bn,Clipboard:vn,Cookie:wn,Device:Sn,HippyRegister:kn,ImageLoader:En,NetworkInfo:xn,UIManager:Cn}=ut,{callNative:Nn,callNativeWithPromise:In,callNativeWithCallbackId:Pn,removeNativeCallback:_n}=bn,Rn=null,An=console,Ln=Sn.platform,On=Ot,zn=Ot,Tn=Ht,jn=kn,Fn=ee,Hn=J,Mn={get:e=>Sn[e]},Un={get:()=>Sn.screen.scale};t.default=Ot}.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 @license MIT -*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function l(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=l(e),s=1;sCe||(e.current=Se[Ce],Se[Ce]=null,Ce--)}function Ne(e,t){Ce++,Se[Ce]=e.current,e.current=t}var Ie={},Pe={current:Ie},_e={current:!1},Ae=Ie;function Re(e,t){var n=e.type.contextTypes;if(!n)return Ie;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oe(e){return null!=(e=e.childContextTypes)}function ze(e){Te(_e),Te(Pe)}function je(e){Te(_e),Te(Pe)}function Fe(e,t,n){if(Pe.current!==Ie)throw a(Error(168));Ne(Pe,t),Ne(_e,n)}function Le(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw a(Error(108),C(t)||"Unknown",o);return i({},n,r)}function Me(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Ie,Ae=Pe.current,Ne(Pe,t),Ne(_e,_e.current),!0}function He(e,t,n){var r=e.stateNode;if(!r)throw a(Error(169));n?(t=Le(e,t,Ae),r.__reactInternalMemoizedMergedChildContext=t,Te(_e),Te(Pe),Ne(Pe,t)):Te(_e),Ne(_e,n)}var Ue=l.unstable_runWithPriority,De=l.unstable_scheduleCallback,We=l.unstable_cancelCallback,Ve=l.unstable_shouldYield,Be=l.unstable_requestPaint,$e=l.unstable_now,qe=l.unstable_getCurrentPriorityLevel,Qe=l.unstable_ImmediatePriority,Ke=l.unstable_UserBlockingPriority,Ge=l.unstable_NormalPriority,Ye=l.unstable_LowPriority,Xe=l.unstable_IdlePriority,Je={},Ze=void 0!==Be?Be:function(){},et=null,tt=null,nt=!1,rt=$e(),it=1e4>rt?$e:function(){return $e()-rt};function ot(){switch(qe()){case Qe:return 99;case Ke:return 98;case Ge:return 97;case Ye:return 96;case Xe:return 95;default:throw a(Error(332))}}function lt(e){switch(e){case 99:return Qe;case 98:return Ke;case 97:return Ge;case 96:return Ye;case 95:return Xe;default:throw a(Error(332))}}function at(e,t){return e=lt(e),Ue(e,t)}function ut(e,t,n){return e=lt(e),De(e,t,n)}function st(e){return null===et?(et=[e],tt=De(Qe,ft)):et.push(e),Je}function ct(){null!==tt&&We(tt),ft()}function ft(){if(!nt&&null!==et){nt=!0;var e=0;try{var t=et;at(99,(function(){for(;e=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function pt(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var ht=Object.prototype.hasOwnProperty;function mt(e,t){if(pt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r=t&&(Zn=!0),e.firstContext=null)}function Tt(e,t){if(wt!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(wt=e,t=1073741823),t={context:e,observedBits:t,next:null},null===vt){if(null===bt)throw a(Error(308));vt=t,bt.dependencies={expirationTime:0,firstContext:t,responders:null}}else vt=vt.next=t;return $?e._currentValue:e._currentValue2}var Nt=!1;function It(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pt(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function _t(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function At(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Rt(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=It(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=It(e.memoizedState),i=n.updateQueue=It(n.memoizedState)):r=e.updateQueue=Pt(i):null===i&&(i=n.updateQueue=Pt(r));null===i||r===i?At(r,t):null===r.lastUpdate||null===i.lastUpdate?(At(r,t),At(i,t)):(At(r,t),i.lastUpdate=t)}function Ot(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=It(e.memoizedState):zt(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function zt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Pt(t)),t}function jt(e,t,n,r,o,l){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(l,r,o):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null==(o="function"==typeof(e=n.payload)?e.call(l,r,o):e))break;return i({},r,o);case 2:Nt=!0}return r}function Ft(e,t,n,r,i){Nt=!1;for(var o=(t=zt(e,t)).baseState,l=null,a=0,u=t.firstUpdate,s=o;null!==u;){var c=u.expirationTime;cd?(p=f,f=null):p=f.sibling;var h=y(i,f,a[d],u);if(null===h){null===f&&(f=p);break}e&&f&&null===h.alternate&&t(i,f),l=o(h,l,d),null===c?s=h:c.sibling=h,c=h,f=p}if(d===a.length)return n(i,f),s;if(null===f){for(;dp?(h=d,d=null):h=d.sibling;var v=y(i,d,b.value,s);if(null===v){null===d&&(d=h);break}e&&d&&null===v.alternate&&t(i,d),l=o(v,l,p),null===f?c=v:f.sibling=v,f=v,d=h}if(b.done)return n(i,d),c;if(null===d){for(;!b.done;p++,b=u.next())null!==(b=m(i,b.value,s))&&(l=o(b,l,p),null===f?c=b:f.sibling=b,f=b);return c}for(d=r(i,d);!b.done;p++,b=u.next())null!==(b=g(d,i,p,b.value,s))&&(e&&null!==b.alternate&&d.delete(null===b.key?p:b.key),l=o(b,l,p),null===f?c=b:f.sibling=b,f=b);return e&&d.forEach((function(e){return t(i,e)})),c}return function(e,r,o,u){var s="object"==typeof o&&null!==o&&o.type===d&&null===o.key;s&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case c:e:{for(p=o.key,s=r;null!==s;){if(s.key===p){if(7===s.tag?o.type===d:s.elementType===o.type){n(e,s.sibling),(r=i(s,o.type===d?o.props.children:o.props)).ref=Kt(e,s,o),r.return=e,e=r;break e}n(e,s);break}t(e,s),s=s.sibling}o.type===d?((r=Li(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Fi(o.type,o.key,o.props,null,e.mode,u)).ref=Kt(e,r,o),u.return=e,e=u)}return l(e);case f:e:{for(s=o.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Hi(o,e.mode,u)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Mi(o,e.mode,u)).return=e,e=r),l(e);if(Qt(o))return b(e,r,o,u);if(S(o))return v(e,r,o,u);if(p&&Gt(e,o),void 0===o&&!s)switch(e.tag){case 1:case 0:throw e=e.type,a(Error(152),e.displayName||e.name||"Component")}return n(e,r)}}var Xt=Yt(!0),Jt=Yt(!1),Zt={},en={current:Zt},tn={current:Zt},nn={current:Zt};function rn(e){if(e===Zt)throw a(Error(174));return e}function on(e,t){Ne(nn,t),Ne(tn,e),Ne(en,Zt),t=A(t),Te(en),Ne(en,t)}function ln(e){Te(en),Te(tn),Te(nn)}function an(e){var t=rn(nn.current),n=rn(en.current);n!==(t=R(n,e.type,t))&&(Ne(tn,e),Ne(en,t))}function un(e){tn.current===e&&(Te(en),Te(tn))}var sn={current:0};function cn(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function fn(e,t){return{responder:e,props:t}}var dn=u.ReactCurrentDispatcher,pn=0,hn=null,mn=null,yn=null,gn=null,bn=null,vn=null,wn=0,xn=null,En=0,kn=!1,Sn=null,Cn=0;function Tn(){throw a(Error(321))}function Nn(e,t){if(null===t)return!1;for(var n=0;nwn&&(wn=f)):(bi(f,s.suspenseConfig),o=s.eagerReducer===e?s.eagerState:e(o,s.action)),l=s,s=s.next}while(null!==s&&s!==r);c||(u=l,i=o),pt(o,t.memoizedState)||(Zn=!0),t.memoizedState=o,t.baseUpdate=u,t.baseState=i,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function zn(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===xn?(xn={lastEffect:null}).lastEffect=e.next=e:null===(t=xn.lastEffect)?xn.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,xn.lastEffect=e),e}function jn(e,t,n,r){var i=_n();En|=e,i.memoizedState=zn(t,n,void 0,void 0===r?null:r)}function Fn(e,t,n,r){var i=An();r=void 0===r?null:r;var o=void 0;if(null!==mn){var l=mn.memoizedState;if(o=l.destroy,null!==r&&Nn(r,l.deps))return void zn(0,n,o,r)}En|=e,i.memoizedState=zn(t,n,o,r)}function Ln(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Mn(){}function Hn(e,t,n){if(!(25>Cn))throw a(Error(301));var r=e.alternate;if(e===hn||null!==r&&r===hn)if(kn=!0,e={expirationTime:pn,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Sn&&(Sn=new Map),void 0===(n=Sn.get(t)))Sn.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=si(),o=Ht.suspense;o={expirationTime:i=ci(i,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var l=t.last;if(null===l)o.next=o;else{var u=l.next;null!==u&&(o.next=u),l.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var s=t.lastRenderedState,c=r(s,n);if(o.eagerReducer=r,o.eagerState=c,pt(c,s))return}catch(e){}di(e,i)}}var Un={readContext:Tt,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useResponder:Tn},Dn={readContext:Tt,useCallback:function(e,t){return _n().memoizedState=[e,void 0===t?null:t],e},useContext:Tt,useEffect:function(e,t){return jn(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,jn(4,36,Ln.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jn(4,36,e,t)},useMemo:function(e,t){var n=_n();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_n();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Hn.bind(null,hn,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},_n().memoizedState=e},useState:function(e){var t=_n();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Rn,lastRenderedState:e}).dispatch=Hn.bind(null,hn,e),[t.memoizedState,e]},useDebugValue:Mn,useResponder:fn},Wn={readContext:Tt,useCallback:function(e,t){var n=An();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Nn(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Tt,useEffect:function(e,t){return Fn(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fn(4,36,Ln.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fn(4,36,e,t)},useMemo:function(e,t){var n=An();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Nn(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:On,useRef:function(){return An().memoizedState},useState:function(e){return On(Rn)},useDebugValue:Mn,useResponder:fn},Vn=null,Bn=null,$n=!1;function qn(e,t){var n=Oi(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Qn(e,t){switch(e.tag){case 5:return null!==(t=ye(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=ge(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function Kn(e){if($n){var t=Bn;if(t){var n=t;if(!Qn(e,t)){if(!(t=be(n))||!Qn(e,t))return e.effectTag|=2,$n=!1,void(Vn=e);qn(Vn,n)}Vn=e,Bn=ve(t)}else e.effectTag|=2,$n=!1,Vn=e}}function Gn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;Vn=e}function Yn(e){if(!K||e!==Vn)return!1;if(!$n)return Gn(e),$n=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!H(t,e.memoizedProps))for(t=Bn;t;)qn(e,t),t=be(t);return Gn(e),Bn=Vn?be(e.stateNode):null,!0}function Xn(){K&&(Bn=Vn=null,$n=!1)}var Jn=u.ReactCurrentOwner,Zn=!1;function er(e,t,n,r){t.child=null===e?Jt(t,null,n,r):Xt(t,e.child,n,r)}function tr(e,t,n,r,i){n=n.render;var o=t.ref;return Ct(t,i),r=In(e,t,n,r,o,i),null===e||Zn?(t.effectTag|=1,er(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),pr(e,t,i))}function nr(e,t,n,r,i,o){if(null===e){var l=n.type;return"function"!=typeof l||zi(l)||void 0!==l.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Fi(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=l,rr(e,t,l,r,i,o))}return l=e.child,it)&&oi.set(e,t))}}function pi(e,t){e.expirationTimei.firstPendingTime&&(i.firstPendingTime=t),0===(e=i.lastPendingTime)||t component higher in the tree to provide a loading indicator or placeholder to display."+ke(s))}4!==$r&&($r=1),c=Er(c,s),s=u;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=f,Ot(s,f=Fr(s,c,f));break e;case 1:if(d=c,l=s.type,u=s.stateNode,0==(64&s.effectTag)&&("function"==typeof l.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===ei||!ei.has(u)))){s.effectTag|=2048,s.expirationTime=f,Ot(s,f=Lr(s,d,f));break e}}s=s.return}while(null!==s)}Vr=wi(o)}if(Dr=r,xt(),Hr.current=i,null!==Vr)return gi.bind(null,e,t)}if(e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,function(e,t){var n=e.firstBatch;return!!(null!==n&&n._defer&&n._expirationTime>=t)&&(ut(97,(function(){return n._onComplete(),null})),!0)}(e,t))return null;switch(Wr=null,$r){case 0:throw a(Error(328));case 1:return(r=e.lastPendingTime)(n=(r=it())-n)&&(n=0),(t=10*(1073741821-t)-r)<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Mr(n/1960))-n)&&(n=t)),10=(t=0|(i=Kr).busyMinDurationMs)?t=0:(n=0|i.busyDelayMs,t=(r=it()-(10*(1073741821-r)-(0|i.timeoutMs||5e3)))<=n?0:n+t-r),10i.tailExpiration&&1r&&(r=o),(l=i.childExpirationTime)>r&&(r=l),i=i.sibling;n.childExpirationTime=r}if(null!==t)return t;null!==e&&0==(1024&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Vr.firstEffect),null!==Vr.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Vr.firstEffect),e.lastEffect=Vr.lastEffect),1i?o:i,e.firstPendingTime=i,i=n?cr(e,t,n):(Ne(sn,1&sn.current),null!==(t=pr(e,t,n))?t.sibling:null);Ne(sn,1&sn.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return dr(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),Ne(sn,sn.current),!r)return null}return pr(e,t,n)}}else Zn=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=Re(t,Pe.current),Ct(t,n),i=In(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,Pn(),Oe(r)){var o=!0;Me(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var l=r.getDerivedStateFromProps;"function"==typeof l&&Dt(t,r,l,e),i.updater=Wt,t.stateNode=i,i._reactInternalFiber=t,qt(t,r,e,n),t=ar(null,t,r,!0,o,n)}else t.tag=0,er(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(i),t.type=i,o=t.tag=function(e){if("function"==typeof e)return zi(e)?1:0;if(null!=e){if((e=e.$$typeof)===b)return 11;if(e===x)return 14}return 2}(i),e=yt(i,e),o){case 0:t=or(null,t,i,e,n);break;case 1:t=lr(null,t,i,e,n);break;case 11:t=tr(null,t,i,e,n);break;case 14:t=nr(null,t,i,yt(i.type,e),r,n);break;default:throw a(Error(306),i,"")}return t;case 0:return r=t.type,i=t.pendingProps,or(e,t,r,i=t.elementType===r?i:yt(r,i),n);case 1:return r=t.type,i=t.pendingProps,lr(e,t,r,i=t.elementType===r?i:yt(r,i),n);case 3:if(ur(t),null===(r=t.updateQueue))throw a(Error(282));return i=null!==(i=t.memoizedState)?i.element:null,Ft(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?(Xn(),t=pr(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(K?(Bn=ve(t.stateNode.containerInfo),Vn=t,i=$n=!0):i=!1),i?(t.effectTag|=2,t.child=Jt(t,null,r,n)):(er(e,t,r,n),Xn()),t=t.child),t;case 5:return an(t),null===e&&Kn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,l=i.children,H(r,i)?l=null:null!==o&&H(r,o)&&(t.effectTag|=16),ir(e,t),4&t.mode&&1!==n&&U(r,i)?(t.expirationTime=t.childExpirationTime=1,t=null):(er(e,t,l,n),t=t.child),t;case 6:return null===e&&Kn(t),null;case 13:return cr(e,t,n);case 4:return on(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xt(t,null,r,n):er(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,tr(e,t,r,i=t.elementType===r?i:yt(r,i),n);case 7:return er(e,t,t.pendingProps,n),t.child;case 8:case 12:return er(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,Et(t,o=i.value),null!==l){var u=l.value;if(0===(o=pt(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(l.children===i.children&&!_e.current){t=pr(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){l=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=_t(n,null)).tag=2,Rt(u,c)),u.expirationTime--l||i[a]!==o[l])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{Qe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qe(e):""}var Ge=[],Ye=-1;function Xe(e){return{current:e}}function Je(e){0>Ye||(e.current=Ge[Ye],Ge[Ye]=null,Ye--)}function Ze(e,t){Ye++,Ge[Ye]=e.current,e.current=t}var et={},tt=Xe(et),nt=Xe(!1),rt=et;function it(e,t){var n=e.type.contextTypes;if(!n)return et;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ot(e){return null!=(e=e.childContextTypes)}function at(){Je(nt),Je(tt)}function lt(e,t,n){if(tt.current!==et)throw Error(l(168));Ze(tt,t),Ze(nt,n)}function st(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(l(108,P(t)||"Unknown",o));return i({},n,r)}function ut(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||et,rt=tt.current,Ze(tt,e),Ze(nt,nt.current),!0}function ct(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(e=st(e,t,rt),r.__reactInternalMemoizedMergedChildContext=e,Je(nt),Je(tt),Ze(tt,e)):Je(nt),Ze(nt,n)}var dt=null,ft=null;(0,a.unstable_now)();var pt=0,ht=8;function mt(e){if(0!=(1&e))return ht=15,1;if(0!=(2&e))return ht=14,2;if(0!=(4&e))return ht=13,4;var t=24&e;return 0!==t?(ht=12,t):0!=(32&e)?(ht=11,32):0!==(t=192&e)?(ht=10,t):0!=(256&e)?(ht=9,256):0!==(t=3584&e)?(ht=8,t):0!=(4096&e)?(ht=7,4096):0!==(t=4186112&e)?(ht=6,t):0!==(t=62914560&e)?(ht=5,t):67108864&e?(ht=4,67108864):0!=(134217728&e)?(ht=3,134217728):0!==(t=805306368&e)?(ht=2,t):0!=(1073741824&e)?(ht=1,1073741824):(ht=8,e)}function gt(e,t){var n=e.pendingLanes;if(0===n)return ht=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,i=ht=15;else if(0!==(o=134217727&n)){var s=o&~a;0!==s?(r=mt(s),i=ht):0!==(l&=o)&&(r=mt(l),i=ht)}else 0!==(o=n&~a)?(r=mt(o),i=ht):0!==l&&(r=mt(l),i=ht);if(0===r)return 0;if(r=n&((0>(r=31-kt(r))?0:1<n;n++)t.push(e);return t}function St(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-kt(t)]=n}var kt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Et(e)/xt|0)|0},Et=Math.log,xt=Math.LN2;var Ct=a.unstable_runWithPriority,Nt=a.unstable_scheduleCallback,It=a.unstable_cancelCallback,Pt=a.unstable_shouldYield,_t=a.unstable_requestPaint,Rt=a.unstable_now,At=a.unstable_getCurrentPriorityLevel,Lt=a.unstable_ImmediatePriority,Ot=a.unstable_UserBlockingPriority,zt=a.unstable_NormalPriority,Tt=a.unstable_LowPriority,jt=a.unstable_IdlePriority,Ft={},Ht=void 0!==_t?_t:function(){},Mt=null,Ut=null,Dt=!1,Wt=Rt(),Bt=1e4>Wt?Rt:function(){return Rt()-Wt};function Vt(){switch(At()){case Lt:return 99;case Ot:return 98;case zt:return 97;case Tt:return 96;case jt:return 95;default:throw Error(l(332))}}function $t(e){switch(e){case 99:return Lt;case 98:return Ot;case 97:return zt;case 96:return Tt;case 95:return jt;default:throw Error(l(332))}}function qt(e,t){return e=$t(e),Ct(e,t)}function Qt(e,t,n){return e=$t(e),Nt(e,t,n)}function Kt(){if(null!==Ut){var e=Ut;Ut=null,It(e)}Gt()}function Gt(){if(!Dt&&null!==Mt){Dt=!0;var e=0;try{var t=Mt;qt(99,(function(){for(;ef?(p=d,d=null):p=d.sibling;var h=g(i,d,l[f],s);if(null===h){null===d&&(d=p);break}e&&d&&null===h.alternate&&t(i,d),a=o(h,a,f),null===c?u=h:c.sibling=h,c=h,d=p}if(f===l.length)return n(i,d),u;if(null===d){for(;fp?(h=f,f=null):h=f.sibling;var v=g(i,f,b.value,u);if(null===v){null===f&&(f=h);break}e&&f&&null===v.alternate&&t(i,f),a=o(v,a,p),null===d?c=v:d.sibling=v,d=v,f=h}if(b.done)return n(i,f),c;if(null===f){for(;!b.done;p++,b=s.next())null!==(b=m(i,b.value,u))&&(a=o(b,a,p),null===d?c=b:d.sibling=b,d=b);return c}for(f=r(i,f);!b.done;p++,b=s.next())null!==(b=y(f,i,p,b.value,u))&&(e&&null!==b.alternate&&f.delete(null===b.key?p:b.key),a=o(b,a,p),null===d?c=b:d.sibling=b,d=b);return e&&f.forEach((function(e){return t(i,e)})),c}return function(e,r,o,s){var f="object"==typeof o&&null!==o&&o.type===d&&null===o.key;f&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case u:e:{for(p=o.key,f=r;null!==f;){if(f.key===p){switch(f.tag){case 7:if(o.type===d){n(e,f.sibling),(r=i(f,o.props.children)).return=e,e=r;break e}break;default:if(f.elementType===o.type){n(e,f.sibling),(r=i(f,o.props)).ref=_n(e,f,o),r.return=e,e=r;break e}}n(e,f);break}t(e,f),f=f.sibling}o.type===d?((r=xa(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=Ea(o.type,o.key,o.props,null,e.mode,s)).ref=_n(e,r,o),s.return=e,e=s)}return a(e);case c:e:{for(f=o.key;null!==r;){if(r.key===f){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ia(o,e.mode,s)).return=e,e=r}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Na(o,e.mode,s)).return=e,e=r),a(e);if(Pn(o))return b(e,r,o,s);if(I(o))return v(e,r,o,s);if(p&&Rn(e,o),void 0===o&&!f)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(l(152,P(e.type)||"Component"))}return n(e,r)}}var Ln=An(!0),On=An(!1),zn={},Tn=Xe(zn),jn=Xe(zn),Fn=Xe(zn);function Hn(e){if(e===zn)throw Error(l(174));return e}function Mn(e,t){Ze(Fn,t),Ze(jn,e),Ze(Tn,zn),e=j(t),Je(Tn),Ze(Tn,e)}function Un(){Je(Tn),Je(jn),Je(Fn)}function Dn(e){var t=Hn(Fn.current),n=Hn(Tn.current);n!==(t=F(n,e.type,t))&&(Ze(jn,e),Ze(Tn,t))}function Wn(e){jn.current===e&&(Je(Tn),Je(jn))}var Bn=Xe(0);function Vn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Fe(n)||He(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $n=null,qn=null,Qn=!1;function Kn(e,t){var n=wa(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Gn(e,t){switch(e.tag){case 5:return null!==(t=Te(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=je(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function Yn(e){if(Qn){var t=qn;if(t){var n=t;if(!Gn(e,t)){if(!(t=Me(n))||!Gn(e,t))return e.flags=-1025&e.flags|2,Qn=!1,void($n=e);Kn($n,n)}$n=e,qn=Ue(t)}else e.flags=-1025&e.flags|2,Qn=!1,$n=e}}function Xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;$n=e}function Jn(e){if(!J||e!==$n)return!1;if(!Qn)return Xn(e),Qn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!V(t,e.memoizedProps))for(t=qn;t;)Kn(e,t),t=Me(t);if(Xn(e),13===e.tag){if(!J)throw Error(l(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));qn=Be(e)}else qn=$n?Me(e.stateNode):null;return!0}function Zn(){J&&(qn=$n=null,Qn=!1)}var er=[];function tr(){for(var e=0;eo))throw Error(l(301));o+=1,lr=ar=null,t.updateQueue=null,nr.current=Ur,e=n(r,i)}while(ur)}if(nr.current=Fr,t=null!==ar&&null!==ar.next,ir=0,lr=ar=or=null,sr=!1,t)throw Error(l(300));return e}function pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lr?or.memoizedState=lr=e:lr=lr.next=e,lr}function hr(){if(null===ar){var e=or.alternate;e=null!==e?e.memoizedState:null}else e=ar.next;var t=null===lr?or.memoizedState:lr.next;if(null!==t)lr=t,ar=e;else{if(null===e)throw Error(l(310));e={memoizedState:(ar=e).memoizedState,baseState:ar.baseState,baseQueue:ar.baseQueue,queue:ar.queue,next:null},null===lr?or.memoizedState=lr=e:lr=lr.next=e}return lr}function mr(e,t){return"function"==typeof t?t(e):t}function gr(e){var t=hr(),n=t.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=e;var r=ar,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var s=a=o=null,u=i;do{var c=u.lane;if((ir&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(a=s=d,o=r):s=s.next=d,or.lanes|=c,uo|=c}u=u.next}while(null!==u&&u!==i);null===s?o=r:s.next=a,Xt(r,t.memoizedState)||(Wr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function yr(e){var t=hr(),n=t.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Xt(o,t.memoizedState)||(Wr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function br(e,t,n){var r=t._getVersion;r=r(t._source);var i=G?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(ir&e)===e)&&(G?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,er.push(t))),e)return n(t._source);throw er.push(t),Error(l(350))}function vr(e,t,n,r){var i=to;if(null===i)throw Error(l(349));var o=t._getVersion,a=o(t._source),s=nr.current,u=s.useState((function(){return br(i,t,n)})),c=u[1],d=u[0];u=lr;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var g=or;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!Xt(a,e)){e=n(t._source),Xt(d,e)||(c(e),e=jo(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,l=e;0n?98:n,(function(){e(!0)})),qt(97mo&&(t.flags|=64,i=!0,hi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Vn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),hi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!Qn)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Bt()-r.renderingStartTime>mo&&1073741824!==n&&(t.flags|=64,i=!0,hi(r,!1),t.lanes=33554432);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Bt(),e.sibling=null,t=Bn.current,Ze(Bn,i?1&t|2:1&t),e):null;case 23:case 24:return qo(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(l(156,t.tag))}function gi(e){switch(e.tag){case 1:ot(e.type)&&at();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Un(),Je(nt),Je(tt),tr(),0!=(64&(t=e.flags)))throw Error(l(285));return e.flags=-4097&t|64,e;case 5:return Wn(e),null;case 13:return Je(Bn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return Je(Bn),null;case 4:return Un(),null;case 10:return un(e),null;case 23:case 24:return qo(),null;default:return null}}function yi(e,t){try{var n="",r=t;do{n+=en(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function bi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var vi="function"==typeof WeakMap?WeakMap:Map;function wi(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){vo||(vo=!0,wo=r),bi(0,t)},n}function Si(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return bi(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===So?So=new Set([this]):So.add(this),bi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ki="function"==typeof WeakSet?WeakSet:Set;function Ei(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){ua(e,t)}else t.current=null}function xi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:tn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(Y&&256&t.flags&&Ie(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(l(163))}function Ci(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Ni(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(aa(n,e),oa(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:tn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&wn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=T(n.child.stateNode);break;case 1:e=n.child.stateNode}wn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ge(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:return;case 13:return void(J&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&$e(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(l(163))}function Ii(e,t){if(Y)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?Ee(r):Ce(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?xe(r):Ne(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Pi(e,t){if(ft&&"function"==typeof ft.onCommitFiberUnmount)try{ft.onCommitFiberUnmount(dt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))aa(t,n);else{r=t;try{i()}catch(e){ua(r,e)}}n=n.next}while(n!==e)}break;case 1:if(Ei(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){ua(t,e)}break;case 5:Ei(t);break;case 4:Y?Oi(e,t):X&&X&&(t=t.stateNode.containerInfo,e=_e(t),Le(t,e))}}function _i(e,t){for(var n=t;;)if(Pi(e,n),null===n.child||Y&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Ri(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Ai(e){return 5===e.tag||3===e.tag||4===e.tag}function Li(e){if(Y){e:{for(var t=e.return;null!==t;){if(Ai(t))break e;t=t.return}throw Error(l(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(l(161))}16&n.flags&&(ke(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ai(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?ve(r,t,n):he(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?be(r,t,n):pe(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}}function Oi(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(l(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag)_i(e,i),r?Se(n,i.stateNode):we(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Pi(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function zi(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ci(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ye(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(l(162));return n=t.memoizedProps,void me(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(J&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,Ve(t.containerInfo))));case 12:return;case 13:return Ti(t),void ji(t);case 19:return void ji(t);case 17:return;case 23:case 24:return void Ii(t,null!==t.memoizedState)}throw Error(l(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ci(3,t);case 12:return;case 13:return Ti(t),void ji(t);case 19:return void ji(t);case 3:J&&((n=t.stateNode).hydrate&&(n.hydrate=!1,Ve(n.containerInfo)));break;case 23:case 24:return}e:if(X){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,Le(t.containerInfo,t.pendingChildren);break e}throw Error(l(163))}}function Ti(e){null!==e.memoizedState&&(ho=Bt(),Y&&Ii(e.child,!0))}function ji(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ki),t.forEach((function(t){var r=da.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Fi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Hi=0,Mi=1,Ui=2,Di=3,Wi=4;if("function"==typeof Symbol&&Symbol.for){var Bi=Symbol.for;Hi=Bi("selector.component"),Mi=Bi("selector.has_pseudo_class"),Ui=Bi("selector.role"),Di=Bi("selector.test_id"),Wi=Bi("selector.text")}function Vi(e){var t=Z(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(l(364));return t}if(null===(e=ae(e)))throw Error(l(362));return e.stateNode.current}function $i(e,t){switch(t.$$typeof){case Hi:if(e.type===t.value)return!0;break;case Mi:e:{t=t.value,e=[e,0];for(var n=0;n";case Mi:return":has("+(qi(e)||"")+")";case Ui:return'[role="'+e.value+'"]';case Wi:return'"'+e.value+'"';case Di:return'[data-testname="'+e.value+'"]';default:throw Error(l(365,e))}}function Qi(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Bt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Yi(n/1960))-n)){e.timeoutHandle=q(ta.bind(null,e),n);break}ta(e);break;case 5:ta(e);break;default:throw Error(l(329))}}return Mo(e,Bt()),e.callbackNode===t?Uo.bind(null,e):null}function Do(e,t){for(t&=~fo,t&=~co,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==ao&&(ao=2),s=yi(s,l),f=a;do{switch(f.tag){case 3:o=s,f.flags|=4096,t&=-t,f.lanes|=t,bn(f,wi(0,o,t));break e;case 1:o=s;var S=f.type,k=f.stateNode;if(0==(64&f.flags)&&("function"==typeof S.getDerivedStateFromError||null!==k&&"function"==typeof k.componentDidCatch&&(null===So||!So.has(k)))){f.flags|=4096,t&=-t,f.lanes|=t,bn(f,Si(f,o,t));break e}}f=f.return}while(null!==f)}ea(n)}catch(e){t=e,no===n&&null!==n&&(no=n=n.return);continue}break}}function Go(){var e=Xi.current;return Xi.current=Fr,null===e?Fr:e}function Yo(e,t){var n=eo;eo|=16;var r=Go();for(to===e&&ro===t||Qo(e,t);;)try{Xo();break}catch(t){Ko(e,t)}if(ln(),eo=n,Xi.current=r,null!==no)throw Error(l(261));return to=null,ro=0,ao}function Xo(){for(;null!==no;)Zo(no)}function Jo(){for(;null!==no&&!Pt();)Zo(no)}function Zo(e){var t=yo(e.alternate,e,io);e.memoizedProps=e.pendingProps,null===t?ea(e):no=t,Ji.current=null}function ea(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=mi(n,t,io)))return void(no=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&io)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1Bt()-ho?Qo(e,0):fo|=n),Mo(e,t)}function da(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Vt()?1:2:(0===Ao&&(Ao=so),0===(t=vt(62914560&~Ao))&&(t=4194304))),n=To(),null!==(e=Ho(e,t))&&(St(e,t,n),Mo(e,n))}yo=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||nt.current)Wr=!0;else{if(0==(n&r)){switch(Wr=!1,t.tag){case 3:Jr(t),Zn();break;case 5:Dn(t);break;case 1:ot(t.type)&&ut(t);break;case 4:Mn(t,t.stateNode.containerInfo);break;case 10:sn(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?ii(e,t,n):(Ze(Bn,1&Bn.current),null!==(t=di(e,t,n))?t.sibling:null);Ze(Bn,1&Bn.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return ci(e,t,n);t.flags|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ze(Bn,Bn.current),r)break;return null;case 23:case 24:return t.lanes=0,Qr(e,t,n)}return di(e,t,n)}Wr=0!=(16384&e.flags)}else Wr=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=it(t,tt.current),dn(t,n),i=fr(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(r)){var o=!0;ut(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,hn(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&kn(t,r,a,e),i.updater=En,t.stateNode=i,i._reactInternals=t,In(t,r,e,n),t=Xr(null,t,r,!0,o,n)}else t.tag=0,Br(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Sa(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===v)return 14}return 2}(i),e=tn(i,e),o){case 0:t=Gr(null,t,i,e,n);break e;case 1:t=Yr(null,t,i,e,n);break e;case 11:t=Vr(null,t,i,e,n);break e;case 14:t=$r(null,t,i,tn(i.type,e),r,n);break e}throw Error(l(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Gr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Yr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 3:if(Jr(t),r=t.updateQueue,null===e||null===r)throw Error(l(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,mn(e,t),vn(t,r,null,n),(r=t.memoizedState.element)===i)Zn(),t=di(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(J?(qn=Ue(t.stateNode.containerInfo),$n=t,o=Qn=!0):o=!1),o){if(J&&null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i=c&&o>=f&&i<=d&&a<=p){e.splice(t,1);break}if(!(r!==c||n.width!==u.width||pa)){f>o&&(u.height+=f-o,u.y=o),pi)){c>r&&(u.width+=c-r,u.x=r),dn&&(n=a)),a ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},r.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return T(e.child.stateNode);default:return e.child.stateNode}},r.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:La,findFiberByHostInstance:e.findFiberByHostInstance||Oa,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{dt=t.inject(e),ft=t}catch(e){}e=!0}return e},r.observeVisibleRects=function(e,t,n,r){if(!oe)throw Error(l(363));e=Ki(e,t);var i=fe(e,n,r).disconnect;return{disconnect:function(){i()}}},r.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},r.runWithPriority=function(e,t){var n=pt;try{return pt=e,t()}finally{pt=n}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(e,t){var n=eo;eo&=-2,eo|=8;try{return e(t)}finally{0===(eo=n)&&(go(),Kt())}},r.updateContainer=function(e,t,n,r){var i=t.current,o=To(),a=jo(i);e:if(n){t:{if(_(n=n._reactInternals)!==n||1!==n.tag)throw Error(l(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ot(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(l(171))}if(1===n.tag){var u=n.type;if(ot(u)){n=st(n,u,s);break e}}n=s}else n=et;return null===t.context?t.context=n:t.pendingContext=n,(t=gn(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),yn(i,t),Fo(i,a,o),a},r}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/react-reconciler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react-reconciler/cjs/react-reconciler.production.min.js")},"./node_modules/react/cjs/react.production.min.js":function(e,t,n){"use strict"; /** @license React v16.14.0 * react.production.min.js * @@ -42,12 +42,12 @@ e.exports=function t(r){"use strict";var i=n("./node_modules/object-assign/index * * 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/object-assign/index.js"),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,l=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n_.length&&_.push(e)}function O(e,t,n){return null==e?0:function e(t,n,r,i){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case l:u=!0}}if(u)return r(i,t,""===n?"."+z(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sR.length&&R.push(e)}function O(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var s=!1;if(null===t)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return r(i,t,""===n?"."+z(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u=E},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0I(l,n))void 0!==u&&0>I(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[o]=n,r=o);else{if(!(void 0!==u&&0>I(u,n)))break e;e[r]=u,e[a]=n,r=a}}}return t}return null}function I(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],_=[],A=1,R=null,O=3,z=!1,j=!1,F=!1;function L(e){for(var t=T(_);null!==t;){if(null===t.callback)N(_);else{if(!(t.startTime<=e))break;N(_),t.sortIndex=t.expirationTime,C(P,t)}t=T(_)}}function M(e){if(F=!1,L(e),!j)if(null!==T(P))j=!0,r(H);else{var t=T(_);null!==t&&i(M,t.startTime-e)}}function H(e,n){j=!1,F&&(F=!1,o()),z=!0;var r=O;try{for(L(n),R=T(P);null!==R&&(!(R.expirationTime>n)||e&&!l());){var a=R.callback;if(null!==a){R.callback=null,O=R.priorityLevel;var u=a(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?R.callback=u:R===T(P)&&N(P),L(n)}else N(P);R=T(P)}if(null!==R)var s=!0;else{var c=T(_);null!==c&&i(M,c.startTime-n),s=!1}return s}finally{R=null,O=r,z=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var D=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||z||(j=!0,r(H))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(P)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=D,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,l){var a=t.unstable_now();if("object"==typeof l&&null!==l){var u=l.delay;u="number"==typeof u&&0a?(e.sortIndex=u,C(_,e),null===T(P)&&e===T(_)&&(F?o():F=!0,i(M,u-a))):(e.sortIndex=l,C(P,e),j||z||(j=!0,r(H))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=T(P);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0N(a,n))void 0!==s&&0>N(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==s&&0>N(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function N(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var I=[],P=[],_=1,R=null,A=3,L=!1,O=!1,z=!1;function T(e){for(var t=x(P);null!==t;){if(null===t.callback)C(P);else{if(!(t.startTime<=e))break;C(P),t.sortIndex=t.expirationTime,E(I,t)}t=x(P)}}function j(e){if(z=!1,T(e),!O)if(null!==x(I))O=!0,r(F);else{var t=x(P);null!==t&&i(j,t.startTime-e)}}function F(e,n){O=!1,z&&(z=!1,o()),L=!0;var r=A;try{for(T(n),R=x(I);null!==R&&(!(R.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=R.callback;if("function"==typeof a){R.callback=null,A=R.priorityLevel;var l=a(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?R.callback=l:R===x(I)&&C(I),T(n)}else C(I);R=x(I)}if(null!==R)var s=!0;else{var u=x(P);null!==u&&i(j,u.startTime-n),s=!1}return s}finally{R=null,A=r,L=!1}}var H=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||L||(O=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return x(I)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=H,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,n,a){var l=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,E(P,e),null===x(I)&&e===x(P)&&(z?o():z=!0,i(j,a-l))):(e.sortIndex=s,E(I,e),O||L||(O=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},"./node_modules/scheduler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/scheduler/cjs/scheduler.production.min.js")},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./scripts/vendor.js":function(e,t,n){n("../../packages/hippy-react/dist/index.js")},0:function(e,t,n){e.exports=n}}); \ No newline at end of file diff --git a/examples/hippy-react-demo/src/components/Text/index.jsx b/examples/hippy-react-demo/src/components/Text/index.jsx index 5dce7a33e96..c72f0020184 100644 --- a/examples/hippy-react-demo/src/components/Text/index.jsx +++ b/examples/hippy-react-demo/src/components/Text/index.jsx @@ -53,12 +53,17 @@ const styles = StyleSheet.create({ fontFamily: 'TTTGB', }, }); - +let i = 0; export default class TextExpo extends React.Component { constructor(props) { super(props); this.state = { fontSize: 16, + textShadowColor: 'grey', + textShadowOffset: { + x: 1, + y: 1, + }, }; this.incrementFontSize = this.incrementFontSize.bind(this); this.decrementFontSize = this.decrementFontSize.bind(this); @@ -87,7 +92,7 @@ export default class TextExpo extends React.Component { } render() { - const { fontSize } = this.state; + const { fontSize, textShadowColor, textShadowOffset } = this.state; const renderTitle = title => ( {title} @@ -95,6 +100,28 @@ export default class TextExpo extends React.Component { ); return ( + {renderTitle('shadow')} + { + let textShadowColor = 'red'; + let textShadowOffset = { x: 10, y: 1 }; + if (i % 2 === 1) { + textShadowColor = 'grey'; + textShadowOffset = { x: 1, y: 10 }; + } + i += 1; + this.setState({ + textShadowColor, + textShadowOffset, + }); + }}> + Text shadow is grey with radius 3 and offset 1 + {renderTitle('color')} Text color is black diff --git a/examples/hippy-react-demo/src/components/View/index.jsx b/examples/hippy-react-demo/src/components/View/index.jsx index 203bea56255..76dcd82ec15 100644 --- a/examples/hippy-react-demo/src/components/View/index.jsx +++ b/examples/hippy-react-demo/src/components/View/index.jsx @@ -56,7 +56,24 @@ export default function ViewExpo() { justifyContent: 'center', marginTop: 20, backgroundImage: imageUrl, - }]} >背景图 + }]} + accessible={true} + accessibilityLabel={'背景图'} + accessibilityRole={'image'} + accessibilityState={{ + disabled: false, + selected: true, + checked: false, + expanded: false, + busy: true, + }} + accessibilityValue={{ + min: 1, + max: 10, + now: 5, + text: 'middle', + }} + >背景图 {renderTitle('backgroundImage linear-gradient')}
-
+

Hippy 背景图展示

diff --git a/examples/hippy-vue-demo/src/components/demos/demo-p.vue b/examples/hippy-vue-demo/src/components/demos/demo-p.vue index 55c3ea113b0..069819ecf88 100644 --- a/examples/hippy-vue-demo/src/components/demos/demo-p.vue +++ b/examples/hippy-vue-demo/src/components/demos/demo-p.vue @@ -33,6 +33,13 @@

腾讯字体 Hippy

+ +

+ 这里是文字灰色阴影 +

@@ -43,6 +50,17 @@ export default { isClicked: false, isPressing: false, labelTouchStatus: '', + textShadow: { + // textShadowOffset: { + // x: 1, + // y: 1, + // }, + // support declare textShadowOffsetX & textShadowOffsetY separately + // textShadowOffsetX: 1, + // textShadowOffsetY: 1, + // textShadowRadius: 3, + // textShadowColor: 'grey', + }, }; }, methods: { @@ -70,7 +88,7 @@ export default { }; - diff --git a/examples/ios-demo/res/index.ios.js b/examples/ios-demo/res/index.ios.js index 27ac623487f..4168b8cbb3d 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,h=o?Symbol.for("react.async_mode"):60111,d=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 E(e){if("object"===r(e)&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case h:case d: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 E(e)===d}t.AsyncMode=h,t.ConcurrentMode=d,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)||E(e)===h},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===f},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"===r(e)&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===l},t.isLazy=function(e){return E(e)===b},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===c},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===d||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=E},"./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 h?t:h,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 R()}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 h(){}function d(){}function m(){}var p={};c(p,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(T([])));g&&g!==n&&r.call(g,a)&&(p=g);var b=m.prototype=h.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,h=f.value;return h&&"object"===t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):n.resolve(h).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 E(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 T(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),E(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;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(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){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./src/main.js":function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Focusable",(function(){return ee})),n.d(r,"Image",(function(){return oe})),n.d(r,"ListView",(function(){return ge})),n.d(r,"Modal",(function(){return Ee})),n.d(r,"RefreshWrapper",(function(){return qe})),n.d(r,"PullHeader",(function(){return Qe})),n.d(r,"ScrollView",(function(){return Je})),n.d(r,"Text",(function(){return $e})),n.d(r,"TextInput",(function(){return nt})),n.d(r,"View",(function(){return at})),n.d(r,"ViewPager",(function(){return yt})),n.d(r,"WebView",(function(){return bt})),n.d(r,"BoxShadow",(function(){return xt})),n.d(r,"WaterfallView",(function(){return Tt}));var o={};n.r(o),n.d(o,"Animation",(function(){return jt})),n.d(o,"AsyncStorage",(function(){return Dt})),n.d(o,"Clipboard",(function(){return Lt})),n.d(o,"NativeEvent",(function(){return zt})),n.d(o,"NetInfo",(function(){return Ht})),n.d(o,"TestModule",(function(){return Gt})),n.d(o,"WebSocket",(function(){return Zt})),n.d(o,"UIManagerModule",(function(){return rn}));var a={};n.r(a),n.d(a,"MyView",(function(){return un})),n.d(a,"Slider",(function(){return gn})),n.d(a,"TabHost",(function(){return wn})),n.d(a,"SetNativeProps",(function(){return Cn})),n.d(a,"DynamicImport",(function(){return kn})),n.d(a,"Localization",(function(){return jn}));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"),h=n.n(f),d=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(d),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]&&E(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var R=function(e,t){if(!e)throw new Error("Invariant failed")};function k(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 A(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=T(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function V(){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=A(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 L=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),B=n.n(L),M=function(e){var t=Object(O.a)();return t.displayName=e,t}("Router"),z=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(M.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 F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(he)}),1e3)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{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 be(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 ve="#4c9afa",we="#f44837",xe="#fff",Se=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:ve,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:ve,textAlign:"center",textAlignVertical:"center"}}),Ee=function(e){h()(n,e);var t=be(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(ce()(r)),r.hide=r.hide.bind(ce()(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:Se.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback.bind("out")},onClick:this.show,style:[Se.buttonView,{borderColor:ve,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Se.buttonText,{color:ve}]},"点击弹出浮层"))),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:we,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:xe,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),Ce="http://res.imtt.qq.com/tps/expo-listview-1.jpg",Te={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[Ce,Ce,Ce],subInfo:["三图评论","11评"]}},Re={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},ke={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}},Ae=[ke,Te,Re,Te,Re,Te,Re,ke,Te],Ve={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}},je=(Ve.getScreenWidth()-24-12)/3,Ie=Math.floor(je/1.35),Oe=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:Ie,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:je,height:Ie},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function De(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=Ve.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Oe.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:[Oe.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Oe.imageContainer},b.a.createElement(i.Image,{style:Oe.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[Oe.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:Oe.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Oe.tagLine},a):null)}var Pe=Ve.getScreenWidth()-24,_e=Math.floor(Pe-12)/3,Le=Math.floor(_e/1.35),Be=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:Le},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:_e,height:Le},image:{width:_e,height:Le},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 Me(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=Ve.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:Be.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,{style:Be.container},b.a.createElement(i.View,{style:Be.leftContainer},b.a.createElement(i.Text,{style:Be.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:Be.tagLine},n):null),b.a.createElement(i.View,{style:Be.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:Be.image,source:{uri:o}})))}var ze=Ve.getScreenWidth()-24,Fe=Math.floor(188*ze/336),We=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:ze,height:Fe,alignSelf:"center"},image:{width:ze,height:Fe},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function He(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=Ve.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:We.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:We.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:We.playerView},b.a.createElement(i.Image,{style:We.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:We.tagLine},a):null)}function Ne(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 Ke=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){h()(o,e);var t,n,r=Ne(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(ce()(t)),t.onRefresh=t.onRefresh.bind(ce()(t)),t.getRefresh=t.getRefresh.bind(ce()(t)),t.getRenderRow=t.getRenderRow.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.getRowType=t.getRowType.bind(ce()(t)),t.getRowKey=t.getRowKey.bind(ce()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r,o,a;return ue.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(ie()(ue.a.mark((function t(){var n;return ue.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(De,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(Me,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ke.loading},o)}return b.a.createElement(i.View,{style:Ke.container},b.a.createElement(i.View,{style:Ke.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ke.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(Ae)}),1e3)}))}},{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 Ge(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 Ue=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"}}),Qe=function(e){h()(a,e);var t,n,r,o=Ge(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(ce()(t)),t.renderRow=t.renderRow.bind(ce()(t)),t.getRowType=t.getRowType.bind(ce()(t)),t.getRowKey=t.getRowKey.bind(ce()(t)),t.renderPullHeader=t.renderPullHeader.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(ce()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(ce()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r,o;return ue.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=ie()(ue.a.mark((function e(){var t,n=this;return ue.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>Ue.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{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=Ae),t(n)}),2e3)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Ue.pullContainer},b.a.createElement(i.Text,{style:Ue.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(De,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(Me,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ue.loading},o)}return b.a.createElement(i.View,{style:Ue.container},b.a.createElement(i.View,{style:Ue.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ue.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{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),Ye=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 Je(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ye.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:Ye.itemStyle},"A"),b.a.createElement(i.Text,{style:Ye.itemStyle},"B"),b.a.createElement(i.Text,{style:Ye.itemStyle},"C"),b.a.createElement(i.Text,{style:Ye.itemStyle},"D"),b.a.createElement(i.Text,{style:Ye.itemStyle},"E"),b.a.createElement(i.Text,{style:Ye.itemStyle},"F"),b.a.createElement(i.Text,{style:Ye.itemStyle},"A"))),b.a.createElement(i.View,{style:Ye.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:Ye.verticalScrollView,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:Ye.itemStyle},"A"),b.a.createElement(i.Text,{style:Ye.itemStyle},"B"),b.a.createElement(i.Text,{style:Ye.itemStyle},"C"),b.a.createElement(i.Text,{style:Ye.itemStyle},"D"),b.a.createElement(i.Text,{style:Ye.itemStyle},"E"),b.a.createElement(i.Text,{style:Ye.itemStyle},"F"),b.a.createElement(i.Text,{style:Ye.itemStyle},"A")))}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ze=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"}}),$e=function(e){h()(n,e);var t=Xe(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={fontSize:16},r.incrementFontSize=r.incrementFontSize.bind(ce()(r)),r.decrementFontSize=r.decrementFontSize.bind(ce()(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.state.fontSize,t=function(e){return b.a.createElement(i.View,{style:Ze.itemTitle},b.a.createElement(i.Text,{style:!0},e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},t("color"),b.a.createElement(i.View,{style:[Ze.itemContent]},b.a.createElement(i.Text,{style:[Ze.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[Ze.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[Ze.normalText,{color:"rgb(228,61,36)"}]},"This is red")),t("fontSize"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:[Ze.normalText,{fontSize:e}]},"Text fontSize is ".concat(e)),b.a.createElement(i.View,{style:Ze.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:Ze.buttonText},"放大字体")),b.a.createElement(i.View,{style:Ze.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:Ze.buttonText},"缩小字体"))),t("fontStyle"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:[Ze.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[Ze.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),t("numberOfLines"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.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:Ze.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")),t("Nest Text"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[Ze.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:Ze.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),t("Custom font"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.customFont},"Hippy 跨端框架")),t("Text Nested"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.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:Ze.customFont},"前面有张图片"))))}}]),n}(b.a.Component);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({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}}),nt=function(e){h()(n,e);var t=et(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(ce()(r)),r.focus=r.focus.bind(ce()(r)),r.blur=r.blur.bind(ce()(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:tt.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:tt.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:tt.input_style,placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:tt.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:tt.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:tt.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:tt.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:tt.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:tt.input_style,keyboardType:"password",placeholder:"password"}),n("maxLength"),b.a.createElement(i.TextInput,{style:tt.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),rt=n.p+"assets/defaultSource.jpg",ot=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 at(){var e=function(e){return b.a.createElement(i.View,{style:ot.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:[ot.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[ot.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:rt}]},b.a.createElement(i.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),b.a.createElement(i.View,{style:[ot.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:[ot.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[ot.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[ot.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[ot.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[ot.smallRectangle,{backgroundColor:"green"}]})))}var it=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:"#f44837",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}}),lt="SquarePagerView",ct="TrianglePagerView",st="CirclePagerView";function ut(e,t){var n=function(t){return b.a.createElement(i.View,{style:it.pageContainer,key:t},b.a.createElement(i.View,{style:[it.shapeBase,e]}),b.a.createElement(i.View,{style:it.mainRec},t?b.a.createElement(i.Text,{style:it.title},t):null))};return n.displayName=t,n}var ft=ut(it.square,lt),ht=ut(it.triangle,ct),dt=ut(it.circle,st);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 pt=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"}}),yt=function(e){h()(n,e);var t=mt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),Z()(ce()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(ce()(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:pt.buttonContainer},b.a.createElement(i.View,{style:pt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:pt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:pt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:pt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:pt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[ft(),ht(),dt()]),b.a.createElement(i.View,{style:pt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[pt.dot,r?pt.selectDot:null]})}))))}}]),n}(b.a.Component),gt=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 bt(){return b.a.createElement(i.View,{style:{padding:10}},b.a.createElement(i.View,{style:gt.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:gt.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 vt=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"}}),wt=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 xt(){return b.a.createElement(i.View,{style:vt.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:vt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:vt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:vt.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:vt.shadowDemoCubeIos},b.a.createElement(i.View,{style:vt.shadowDemoContentIos},b.a.createElement(i.Text,{style:vt.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:wt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:wt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:wt.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:wt.shadowDemoCubeIos},b.a.createElement(i.View,{style:wt.shadowDemoContentIos},b.a.createElement(i.Text,{style:wt.text},"偏移阴影样式"))))}function St(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 Et=Ae.filter((function(e){return 2!==e.style})),Ct=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"}}),Tt=function(e){h()(a,e);var t,n,r,o=St(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(ce()(t)),t.renderItem=t.renderItem.bind(ce()(t)),t.getItemType=t.getItemType.bind(ce()(t)),t.getItemKey=t.getItemKey.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.onRefresh=t.onRefresh.bind(ce()(t)),t.getRefresh=t.getRefresh.bind(ce()(t)),t.renderPullFooter=t.renderPullFooter.bind(ce()(t)),t.renderBanner=t.renderBanner.bind(ce()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r;return ue.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:Ct.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=ie()(ue.a.mark((function e(){var t=this;return ue.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(ie()(ue.a.mark((function e(){var n;return ue.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(De,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(Me,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(He,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:Ct.container},b.a.createElement(i.View,{style:Ct.itemContainer},n),b.a.createElement(i.View,{style:Ct.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(w()(Et),w()(Et));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 Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var kt="#4c9afa",At="#f44837",Vt=i.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:At},showArea:{height:150,marginVertical:10},button:{borderColor:kt,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:kt,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}}),jt=function(e){h()(n,e);var t=Rt(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:Vt.container},b.a.createElement(i.Text,{style:Vt.title},"水平位移动画"),b.a.createElement(i.View,{style:Vt.buttonContainer},b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.horizonAnimation.start()}},b.a.createElement(i.Text,{style:Vt.buttonText},"开始")),b.a.createElement(i.View,{style:[Vt.button],onClick:function(){e.horizonAnimation.pause()}},b.a.createElement(i.Text,{style:Vt.buttonText},"暂停")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.horizonAnimation.resume()}},b.a.createElement(i.Text,{style:Vt.buttonText},"继续")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},b.a.createElement(i.Text,{style:Vt.buttonText},"更新"))),b.a.createElement(i.View,{style:Vt.showArea},b.a.createElement(i.View,{ref:function(t){e.horizonRef=t},style:[Vt.square,{transform:[{translateX:this.horizonAnimation}]}]})),b.a.createElement(i.Text,{style:Vt.title},"高度形变动画"),b.a.createElement(i.View,{style:Vt.buttonContainer},b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.verticalAnimation.start()}},b.a.createElement(i.Text,{style:Vt.buttonText},"开始")),b.a.createElement(i.View,{style:[Vt.button],onClick:function(){e.verticalAnimation.pause()}},b.a.createElement(i.Text,{style:Vt.buttonText},"暂停")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.verticalAnimation.resume()}},b.a.createElement(i.Text,{style:Vt.buttonText},"继续"))),b.a.createElement(i.View,{style:Vt.showArea},b.a.createElement(i.View,{ref:function(t){e.verticalRef=t},style:[Vt.square,{height:this.verticalAnimation}]})),b.a.createElement(i.Text,{style:Vt.title},"组合形变动画"),b.a.createElement(i.View,{style:Vt.buttonContainer},b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.scaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Vt.buttonText},"开始")),b.a.createElement(i.View,{style:[Vt.button],onClick:function(){e.scaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Vt.buttonText},"暂停")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.scaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Vt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Vt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.scaleRef=t},style:[Vt.square,{transform:[{scale:this.scaleAnimationSet}]}]})),b.a.createElement(i.Text,{style:Vt.title},"颜色渐变动画(文字渐变仅Android支持)"),b.a.createElement(i.View,{style:Vt.buttonContainer},b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.bgColorAnimationSet.start(),e.txtColorAnimationSet.start()}},b.a.createElement(i.Text,{style:Vt.buttonText},"开始")),b.a.createElement(i.View,{style:[Vt.button],onClick:function(){e.bgColorAnimationSet.pause(),e.txtColorAnimationSet.pause()}},b.a.createElement(i.Text,{style:Vt.buttonText},"暂停")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.bgColorAnimationSet.resume(),e.txtColorAnimationSet.resume()}},b.a.createElement(i.Text,{style:Vt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Vt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.bgColorRef=t},style:[Vt.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},b.a.createElement(i.Text,{ref:function(t){e.textColorRef=t},style:[Vt.colorText,{color:"android"===i.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),b.a.createElement(i.Text,{style:Vt.title},"贝塞尔曲线动画"),b.a.createElement(i.View,{style:Vt.buttonContainer},b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.cubicBezierScaleAnimationSet.start()}},b.a.createElement(i.Text,{style:Vt.buttonText},"开始")),b.a.createElement(i.View,{style:[Vt.button],onClick:function(){e.cubicBezierScaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:Vt.buttonText},"暂停")),b.a.createElement(i.View,{style:Vt.button,onClick:function(){e.cubicBezierScaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:Vt.buttonText},"继续"))),b.a.createElement(i.View,{style:[Vt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.cubicBezierScaleRef=t},style:[Vt.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}]),n}(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 Ot=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}}),Dt=function(e){h()(n,e);var t=It(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={result:""},r.onTextChangeKey=r.onTextChangeKey.bind(ce()(r)),r.onTextChangeValue=r.onTextChangeValue.bind(ce()(r)),r.onClickSet=r.onClickSet.bind(ce()(r)),r.onTextChangeKey=r.onTextChangeKey.bind(ce()(r)),r.onClickGet=r.onClickGet.bind(ce()(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:Ot.containerStyle},b.a.createElement(i.View,{style:Ot.viewGroupStyle},b.a.createElement(i.Text,{style:Ot.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Ot.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:Ot.viewGroupStyle},b.a.createElement(i.Text,{style:Ot.infoStyle},"Value:"),b.a.createElement(i.TextInput,{style:Ot.inputStyle,onChangeText:this.onTextChangeValue})),b.a.createElement(i.View,{style:Ot.itemGroupStyle,onClick:this.onClickSet},b.a.createElement(i.Text,{style:Ot.buttonStyle},"Set")),b.a.createElement(i.View,{style:[Ot.viewGroupStyle,{marginTop:60}]},b.a.createElement(i.Text,{style:Ot.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Ot.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:[Ot.viewGroupStyle,{display:"none"}]},b.a.createElement(i.Text,{style:Ot.infoStyle},"Value:"),b.a.createElement(i.Text,{style:[Ot.infoStyle,{width:200}]},e)),b.a.createElement(i.View,{style:Ot.itemGroupStyle,onClick:this.onClickGet},b.a.createElement(i.Text,{style:Ot.buttonStyle},"Get")))}}]),n}(b.a.Component);function Pt(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 _t=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"}}),Lt=function(e){h()(n,e);var t=Pt(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:_t.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:_t.defaultText},o),b.a.createElement(i.View,{style:_t.button,onClick:function(){i.Clipboard.setString(o),e.setState({hasCopied:!0})}},b.a.createElement(i.Text,{style:_t.buttonText},"点击复制以上文案".concat(l))),t("获取剪贴板内容"),b.a.createElement(i.View,{style:_t.button,onClick:ie()(ue.a.mark((function t(){var n;return ue.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:_t.buttonText},"点击获取剪贴板内容")),b.a.createElement(i.Text,{style:[_t.defaultText,_t.copiedText]},a))}}]),n}(b.a.Component);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 Mt=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"}}),zt=function(e){h()(n,e);var t=Bt(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:Mt.container},b.a.createElement(i.View,{style:Mt.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:Mt.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 Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Wt=i.StyleSheet.create({text:{fontSize:14,color:"#242424",alignSelf:"center"},container:{flex:1,justifyContent:"center"}}),Ht=function(e){h()(r,e);var t,n=Ft(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=ie()(ue.a.mark((function e(){var t,n;return ue.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:Wt.container},b.a.createElement(i.Text,{style:Wt.text},e))}}]),r}(b.a.Component),Nt={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 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,Gt=function(e){h()(n,e);var t=Kt(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;Nt.log("hello i am from js"),Nt.helloNative({hello:"i am form js"}),Nt.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),Ut=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Qt=n.n(Ut),Yt=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"}}),Jt="wss://echo.websocket.org",Xt="Rock it with Hippy WebSocket";var Zt=function(){var e=Object(g.useRef)(null),t=Object(g.useRef)(null),n=Object(g.useState)([]),r=Qt()(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:Yt.fullScreen},b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Yt.title},"Url:"),b.a.createElement(i.TextInput,{ref:e,value:Jt,style:Yt.input}),b.a.createElement(i.View,{style:Yt.row},b.a.createElement(i.Text,{onClick:function(){e.current.getValue().then((function(e){qt&&1===qt.readyState&&qt.close(),(qt=new WebSocket(e)).onopen=function(){return l("[Opened] ".concat(qt.url))},qt.onclose=function(){return l("[Closed] ".concat(qt.url))},qt.onerror=function(e){return l("[Error] ".concat(e.reason))},qt.onmessage=function(e){return l("[Received] ".concat(e.data))}}))},style:Yt.button},"Connect"),b.a.createElement(i.Text,{onClick:function(){return qt.close()},style:Yt.button},"Disconnect"))),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Yt.title},"Message:"),b.a.createElement(i.TextInput,{ref:t,value:Xt,style:Yt.input}),b.a.createElement(i.Text,{onClick:function(){return t.current.getValue().then((function(e){l("[Sent] ".concat(e)),qt.send(e)}))},style:Yt.button},"Send")),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Yt.title},"Log:"),b.a.createElement(i.ScrollView,{style:Yt.fullScreen},o.map((function(e,t){return b.a.createElement(i.Text,{key:t,style:Yt.output},e)})))))};function $t(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 en(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:vn.container},b.a.createElement(i.ScrollView,{style:vn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:vn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[vn.navItemText,r===n?vn.navItemTextBlue:vn.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 ft(e);case 1:return dt(e);case 2:return ht(e);default:return null}}}]),n}(b.a.Component);function xn(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 Sn=i.Dimensions.get("window").width,En=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:Sn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Sn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}}),Cn=function(e){h()(n,e);var t=xn(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,Sn),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,Sn),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,Sn),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,Sn),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 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 Rn=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),kn=function(e){h()(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(ce()(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:Rn.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 An(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 Vn=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),jn=function(e){h()(n,e);var t=An(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:Vn.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);function In(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 Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:Gn.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:Gn.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:Gn.buttonContainer},b.a.createElement(i.View,{style:Gn.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:Gn.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function Qn(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 Yn=i.StyleSheet.create({container:{flex:1}}),Jn=function(e){h()(n,e);var t=Qn(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),E(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;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(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 ee})),n.d(r,"Image",(function(){return oe})),n.d(r,"ListView",(function(){return ge})),n.d(r,"Modal",(function(){return Ee})),n.d(r,"RefreshWrapper",(function(){return qe})),n.d(r,"PullHeader",(function(){return Qe})),n.d(r,"ScrollView",(function(){return Je})),n.d(r,"Text",(function(){return et})),n.d(r,"TextInput",(function(){return rt})),n.d(r,"View",(function(){return it})),n.d(r,"ViewPager",(function(){return gt})),n.d(r,"WebView",(function(){return vt})),n.d(r,"BoxShadow",(function(){return St})),n.d(r,"WaterfallView",(function(){return Rt}));var o={};n.r(o),n.d(o,"Animation",(function(){return It})),n.d(o,"AsyncStorage",(function(){return Pt})),n.d(o,"Clipboard",(function(){return Bt})),n.d(o,"NativeEvent",(function(){return Ft})),n.d(o,"NetInfo",(function(){return Nt})),n.d(o,"TestModule",(function(){return Ut})),n.d(o,"WebSocket",(function(){return $t})),n.d(o,"UIManagerModule",(function(){return on}));var a={};n.r(a),n.d(a,"MyView",(function(){return fn})),n.d(a,"Slider",(function(){return bn})),n.d(a,"TabHost",(function(){return xn})),n.d(a,"SetNativeProps",(function(){return Tn})),n.d(a,"DynamicImport",(function(){return An})),n.d(a,"Localization",(function(){return In}));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"),h=n.n(f),d=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(d),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]&&E(o[0])||o.unshift("");var h=o.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var R=function(e,t){if(!e)throw new Error("Invariant failed")};function k(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 A(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=T(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function V(){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=A(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 L=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),B=n.n(L),M=function(e){var t=Object(O.a)();return t.displayName=e,t}("Router"),z=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(M.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 F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(he)}),1e3)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{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 be(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 ve="#4c9afa",we="#f44837",xe="#fff",Se=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:ve,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:ve,textAlign:"center",textAlignVertical:"center"}}),Ee=function(e){h()(n,e);var t=be(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(ce()(r)),r.hide=r.hide.bind(ce()(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:Se.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback.bind("out")},onClick:this.show,style:[Se.buttonView,{borderColor:ve,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Se.buttonText,{color:ve}]},"点击弹出浮层"))),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:we,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:xe,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),Ce="http://res.imtt.qq.com/tps/expo-listview-1.jpg",Te={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[Ce,Ce,Ce],subInfo:["三图评论","11评"]}},Re={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"http://res.imtt.qq.com/tps/expo-listview-2.jpg",subInfo:["左文右图"]}},ke={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"http://res.imtt.qq.com/tps/expo-listview-3.jpg",subInfo:["六眼神魔 5234播放"]}},Ae=[ke,Te,Re,Te,Re,Te,Re,ke,Te],Ve={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}},je=(Ve.getScreenWidth()-24-12)/3,Ie=Math.floor(je/1.35),Oe=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:Ie,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:je,height:Ie},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function De(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=Ve.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Oe.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:[Oe.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Oe.imageContainer},b.a.createElement(i.Image,{style:Oe.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[Oe.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:Oe.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Oe.tagLine},a):null)}var Pe=Ve.getScreenWidth()-24,_e=Math.floor(Pe-12)/3,Le=Math.floor(_e/1.35),Be=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:Le},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:_e,height:Le},image:{width:_e,height:Le},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 Me(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=Ve.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:Be.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,{style:Be.container},b.a.createElement(i.View,{style:Be.leftContainer},b.a.createElement(i.Text,{style:Be.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:Be.tagLine},n):null),b.a.createElement(i.View,{style:Be.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:Be.image,source:{uri:o}})))}var ze=Ve.getScreenWidth()-24,Fe=Math.floor(188*ze/336),We=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:ze,height:Fe,alignSelf:"center"},image:{width:ze,height:Fe},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function He(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=Ve.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:We.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:We.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:We.playerView},b.a.createElement(i.Image,{style:We.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:We.tagLine},a):null)}function Ne(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 Ke=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){h()(o,e);var t,n,r=Ne(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(ce()(t)),t.onRefresh=t.onRefresh.bind(ce()(t)),t.getRefresh=t.getRefresh.bind(ce()(t)),t.getRenderRow=t.getRenderRow.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.getRowType=t.getRowType.bind(ce()(t)),t.getRowKey=t.getRowKey.bind(ce()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r,o,a;return ue.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(ie()(ue.a.mark((function t(){var n;return ue.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(De,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(Me,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ke.loading},o)}return b.a.createElement(i.View,{style:Ke.container},b.a.createElement(i.View,{style:Ke.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ke.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(Ae)}),1e3)}))}},{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 Ge(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 Ue=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"}}),Qe=function(e){h()(a,e);var t,n,r,o=Ge(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(ce()(t)),t.renderRow=t.renderRow.bind(ce()(t)),t.getRowType=t.getRowType.bind(ce()(t)),t.getRowKey=t.getRowKey.bind(ce()(t)),t.renderPullHeader=t.renderPullHeader.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(ce()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(ce()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r,o;return ue.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=ie()(ue.a.mark((function e(){var t,n=this;return ue.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>Ue.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{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=Ae),t(n)}),2e3)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Ue.pullContainer},b.a.createElement(i.Text,{style:Ue.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(De,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(Me,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Ue.loading},o)}return b.a.createElement(i.View,{style:Ue.container},b.a.createElement(i.View,{style:Ue.itemContainer},a),c?null:b.a.createElement(i.View,{style:Ue.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{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),Ye=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 Je(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ye.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:Ye.itemStyle},"A"),b.a.createElement(i.Text,{style:Ye.itemStyle},"B"),b.a.createElement(i.Text,{style:Ye.itemStyle},"C"),b.a.createElement(i.Text,{style:Ye.itemStyle},"D"),b.a.createElement(i.Text,{style:Ye.itemStyle},"E"),b.a.createElement(i.Text,{style:Ye.itemStyle},"F"),b.a.createElement(i.Text,{style:Ye.itemStyle},"A"))),b.a.createElement(i.View,{style:Ye.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:Ye.verticalScrollView,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:Ye.itemStyle},"A"),b.a.createElement(i.Text,{style:Ye.itemStyle},"B"),b.a.createElement(i.Text,{style:Ye.itemStyle},"C"),b.a.createElement(i.Text,{style:Ye.itemStyle},"D"),b.a.createElement(i.Text,{style:Ye.itemStyle},"E"),b.a.createElement(i.Text,{style:Ye.itemStyle},"F"),b.a.createElement(i.Text,{style:Ye.itemStyle},"A")))}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Ze=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"}}),$e=0,et=function(e){h()(n,e);var t=Xe(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(ce()(r)),r.decrementFontSize=r.decrementFontSize.bind(ce()(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:Ze.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:[Ze.itemContent],onClick:function(){var t="red",n={x:10,y:1};$e%2==1&&(t="grey",n={x:1,y:10}),$e+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},b.a.createElement(i.Text,{style:[Ze.normalText,{color:"#242424",textShadowOffset:o,textShadowOffsetY:1,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),b.a.createElement(i.View,{style:[Ze.itemContent]},b.a.createElement(i.Text,{style:[Ze.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[Ze.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[Ze.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:[Ze.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),b.a.createElement(i.View,{style:Ze.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:Ze.buttonText},"放大字体")),b.a.createElement(i.View,{style:Ze.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:Ze.buttonText},"缩小字体"))),a("fontStyle"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:[Ze.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[Ze.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.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:Ze.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("Nest Text"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[Ze.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:Ze.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:Ze.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.customFont},"Hippy 跨端框架")),a("Text Nested"),b.a.createElement(i.View,{style:Ze.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:Ze.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:Ze.customFont},"前面有张图片"))))}}]),n}(b.a.Component);function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var nt=i.StyleSheet.create({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}}),rt=function(e){h()(n,e);var t=tt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(ce()(r)),r.focus=r.focus.bind(ce()(r)),r.blur=r.blur.bind(ce()(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:nt.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:nt.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:nt.input_style,placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:nt.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:nt.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:nt.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:nt.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:nt.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:nt.input_style,keyboardType:"password",placeholder:"password"}),n("maxLength"),b.a.createElement(i.TextInput,{style:nt.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),ot=n.p+"assets/defaultSource.jpg",at=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 it(){var e=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:{padding:10}},e("backgroundColor"),b.a.createElement(i.View,{style:[at.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[at.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:ot}],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:[at.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:[at.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[at.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[at.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[at.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[at.smallRectangle,{backgroundColor:"green"}]})))}var lt=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:"#f44837",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}}),ct="SquarePagerView",st="TrianglePagerView",ut="CirclePagerView";function ft(e,t){var n=function(t){return b.a.createElement(i.View,{style:lt.pageContainer,key:t},b.a.createElement(i.View,{style:[lt.shapeBase,e]}),b.a.createElement(i.View,{style:lt.mainRec},t?b.a.createElement(i.Text,{style:lt.title},t):null))};return n.displayName=t,n}var ht=ft(lt.square,ct),dt=ft(lt.triangle,st),mt=ft(lt.circle,ut);function pt(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=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"}}),gt=function(e){h()(n,e);var t=pt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),Z()(ce()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(ce()(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:yt.buttonContainer},b.a.createElement(i.View,{style:yt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:yt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:yt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:yt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:yt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[ht(),dt(),mt()]),b.a.createElement(i.View,{style:yt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[yt.dot,r?yt.selectDot:null]})}))))}}]),n}(b.a.Component),bt=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 vt(){return b.a.createElement(i.View,{style:{padding:10}},b.a.createElement(i.View,{style:bt.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:bt.webViewStyle}))}var wt=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"}}),xt=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 St(){return b.a.createElement(i.View,{style:wt.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:wt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:wt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:wt.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:wt.shadowDemoCubeIos},b.a.createElement(i.View,{style:wt.shadowDemoContentIos},b.a.createElement(i.Text,{style:wt.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:xt.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:xt.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:xt.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:xt.shadowDemoCubeIos},b.a.createElement(i.View,{style:xt.shadowDemoContentIos},b.a.createElement(i.Text,{style:xt.text},"偏移阴影样式"))))}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 Ct=Ae.filter((function(e){return 2!==e.style})),Tt=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"}}),Rt=function(e){h()(a,e);var t,n,r,o=Et(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(ce()(t)),t.renderItem=t.renderItem.bind(ce()(t)),t.getItemType=t.getItemType.bind(ce()(t)),t.getItemKey=t.getItemKey.bind(ce()(t)),t.onEndReached=t.onEndReached.bind(ce()(t)),t.onRefresh=t.onRefresh.bind(ce()(t)),t.getRefresh=t.getRefresh.bind(ce()(t)),t.renderPullFooter=t.renderPullFooter.bind(ce()(t)),t.renderBanner=t.renderBanner.bind(ce()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ie()(ue.a.mark((function e(){var t;return ue.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=ie()(ue.a.mark((function e(){var t,n,r;return ue.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:Tt.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=ie()(ue.a.mark((function e(){var t=this;return ue.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(ie()(ue.a.mark((function e(){var n;return ue.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(De,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(Me,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(He,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:Tt.container},b.a.createElement(i.View,{style:Tt.itemContainer},n),b.a.createElement(i.View,{style:Tt.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(w()(Ct),w()(Ct));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 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 At="#4c9afa",Vt="#f44837",jt=i.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:Vt},showArea:{height:150,marginVertical:10},button:{borderColor:At,borderWidth:2,justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:At,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}}),It=function(e){h()(n,e);var t=kt(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:jt.container},b.a.createElement(i.Text,{style:jt.title},"水平位移动画"),b.a.createElement(i.View,{style:jt.buttonContainer},b.a.createElement(i.View,{style:jt.button,onClick:function(){e.horizonAnimation.start()}},b.a.createElement(i.Text,{style:jt.buttonText},"开始")),b.a.createElement(i.View,{style:[jt.button],onClick:function(){e.horizonAnimation.pause()}},b.a.createElement(i.Text,{style:jt.buttonText},"暂停")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.horizonAnimation.resume()}},b.a.createElement(i.Text,{style:jt.buttonText},"继续")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},b.a.createElement(i.Text,{style:jt.buttonText},"更新"))),b.a.createElement(i.View,{style:jt.showArea},b.a.createElement(i.View,{ref:function(t){e.horizonRef=t},style:[jt.square,{transform:[{translateX:this.horizonAnimation}]}]})),b.a.createElement(i.Text,{style:jt.title},"高度形变动画"),b.a.createElement(i.View,{style:jt.buttonContainer},b.a.createElement(i.View,{style:jt.button,onClick:function(){e.verticalAnimation.start()}},b.a.createElement(i.Text,{style:jt.buttonText},"开始")),b.a.createElement(i.View,{style:[jt.button],onClick:function(){e.verticalAnimation.pause()}},b.a.createElement(i.Text,{style:jt.buttonText},"暂停")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.verticalAnimation.resume()}},b.a.createElement(i.Text,{style:jt.buttonText},"继续"))),b.a.createElement(i.View,{style:jt.showArea},b.a.createElement(i.View,{ref:function(t){e.verticalRef=t},style:[jt.square,{height:this.verticalAnimation}]})),b.a.createElement(i.Text,{style:jt.title},"组合形变动画"),b.a.createElement(i.View,{style:jt.buttonContainer},b.a.createElement(i.View,{style:jt.button,onClick:function(){e.scaleAnimationSet.start()}},b.a.createElement(i.Text,{style:jt.buttonText},"开始")),b.a.createElement(i.View,{style:[jt.button],onClick:function(){e.scaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:jt.buttonText},"暂停")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.scaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:jt.buttonText},"继续"))),b.a.createElement(i.View,{style:[jt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.scaleRef=t},style:[jt.square,{transform:[{scale:this.scaleAnimationSet}]}]})),b.a.createElement(i.Text,{style:jt.title},"颜色渐变动画(文字渐变仅Android支持)"),b.a.createElement(i.View,{style:jt.buttonContainer},b.a.createElement(i.View,{style:jt.button,onClick:function(){e.bgColorAnimationSet.start(),e.txtColorAnimationSet.start()}},b.a.createElement(i.Text,{style:jt.buttonText},"开始")),b.a.createElement(i.View,{style:[jt.button],onClick:function(){e.bgColorAnimationSet.pause(),e.txtColorAnimationSet.pause()}},b.a.createElement(i.Text,{style:jt.buttonText},"暂停")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.bgColorAnimationSet.resume(),e.txtColorAnimationSet.resume()}},b.a.createElement(i.Text,{style:jt.buttonText},"继续"))),b.a.createElement(i.View,{style:[jt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.bgColorRef=t},style:[jt.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},b.a.createElement(i.Text,{ref:function(t){e.textColorRef=t},style:[jt.colorText,{color:"android"===i.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),b.a.createElement(i.Text,{style:jt.title},"贝塞尔曲线动画"),b.a.createElement(i.View,{style:jt.buttonContainer},b.a.createElement(i.View,{style:jt.button,onClick:function(){e.cubicBezierScaleAnimationSet.start()}},b.a.createElement(i.Text,{style:jt.buttonText},"开始")),b.a.createElement(i.View,{style:[jt.button],onClick:function(){e.cubicBezierScaleAnimationSet.pause()}},b.a.createElement(i.Text,{style:jt.buttonText},"暂停")),b.a.createElement(i.View,{style:jt.button,onClick:function(){e.cubicBezierScaleAnimationSet.resume()}},b.a.createElement(i.Text,{style:jt.buttonText},"继续"))),b.a.createElement(i.View,{style:[jt.showArea,{marginVertical:20}]},b.a.createElement(i.View,{ref:function(t){e.cubicBezierScaleRef=t},style:[jt.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}]),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 Dt=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}}),Pt=function(e){h()(n,e);var t=Ot(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={result:""},r.onTextChangeKey=r.onTextChangeKey.bind(ce()(r)),r.onTextChangeValue=r.onTextChangeValue.bind(ce()(r)),r.onClickSet=r.onClickSet.bind(ce()(r)),r.onTextChangeKey=r.onTextChangeKey.bind(ce()(r)),r.onClickGet=r.onClickGet.bind(ce()(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:Dt.containerStyle},b.a.createElement(i.View,{style:Dt.viewGroupStyle},b.a.createElement(i.Text,{style:Dt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Dt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:Dt.viewGroupStyle},b.a.createElement(i.Text,{style:Dt.infoStyle},"Value:"),b.a.createElement(i.TextInput,{style:Dt.inputStyle,onChangeText:this.onTextChangeValue})),b.a.createElement(i.View,{style:Dt.itemGroupStyle,onClick:this.onClickSet},b.a.createElement(i.Text,{style:Dt.buttonStyle},"Set")),b.a.createElement(i.View,{style:[Dt.viewGroupStyle,{marginTop:60}]},b.a.createElement(i.Text,{style:Dt.infoStyle},"Key:"),b.a.createElement(i.TextInput,{style:Dt.inputStyle,onChangeText:this.onTextChangeKey})),b.a.createElement(i.View,{style:[Dt.viewGroupStyle,{display:"none"}]},b.a.createElement(i.Text,{style:Dt.infoStyle},"Value:"),b.a.createElement(i.Text,{style:[Dt.infoStyle,{width:200}]},e)),b.a.createElement(i.View,{style:Dt.itemGroupStyle,onClick:this.onClickGet},b.a.createElement(i.Text,{style:Dt.buttonStyle},"Get")))}}]),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({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"}}),Bt=function(e){h()(n,e);var t=_t(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:Lt.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:Lt.defaultText},o),b.a.createElement(i.View,{style:Lt.button,onClick:function(){i.Clipboard.setString(o),e.setState({hasCopied:!0})}},b.a.createElement(i.Text,{style:Lt.buttonText},"点击复制以上文案".concat(l))),t("获取剪贴板内容"),b.a.createElement(i.View,{style:Lt.button,onClick:ie()(ue.a.mark((function t(){var n;return ue.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:Lt.buttonText},"点击获取剪贴板内容")),b.a.createElement(i.Text,{style:[Lt.defaultText,Lt.copiedText]},a))}}]),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({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"}}),Ft=function(e){h()(n,e);var t=Mt(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:zt.container},b.a.createElement(i.View,{style:zt.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:zt.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 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,justifyContent:"center"}}),Nt=function(e){h()(r,e);var t,n=Wt(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=ie()(ue.a.mark((function e(){var t,n;return ue.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:Ht.container},b.a.createElement(i.Text,{style:Ht.text},e))}}]),r}(b.a.Component),Kt={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 Gt,Ut=function(e){h()(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;Kt.log("hello i am from js"),Kt.helloNative({hello:"i am form js"}),Kt.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),Qt=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Yt=n.n(Qt),Jt=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"}}),Xt="wss://echo.websocket.org",Zt="Rock it with Hippy WebSocket";var $t=function(){var e=Object(g.useRef)(null),t=Object(g.useRef)(null),n=Object(g.useState)([]),r=Yt()(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:Jt.fullScreen},b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Jt.title},"Url:"),b.a.createElement(i.TextInput,{ref:e,value:Xt,style:Jt.input}),b.a.createElement(i.View,{style:Jt.row},b.a.createElement(i.Text,{onClick:function(){e.current.getValue().then((function(e){Gt&&1===Gt.readyState&&Gt.close(),(Gt=new WebSocket(e)).onopen=function(){return l("[Opened] ".concat(Gt.url))},Gt.onclose=function(){return l("[Closed] ".concat(Gt.url))},Gt.onerror=function(e){return l("[Error] ".concat(e.reason))},Gt.onmessage=function(e){return l("[Received] ".concat(e.data))}}))},style:Jt.button},"Connect"),b.a.createElement(i.Text,{onClick:function(){return Gt.close()},style:Jt.button},"Disconnect"))),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Jt.title},"Message:"),b.a.createElement(i.TextInput,{ref:t,value:Zt,style:Jt.input}),b.a.createElement(i.Text,{onClick:function(){return t.current.getValue().then((function(e){l("[Sent] ".concat(e)),Gt.send(e)}))},style:Jt.button},"Send")),b.a.createElement(i.View,null,b.a.createElement(i.Text,{style:Jt.title},"Log:"),b.a.createElement(i.ScrollView,{style:Jt.fullScreen},o.map((function(e,t){return b.a.createElement(i.Text,{key:t,style:Jt.output},e)})))))};function en(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 tn(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:wn.container},b.a.createElement(i.ScrollView,{style:wn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:wn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[wn.navItemText,r===n?wn.navItemTextBlue:wn.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 ht(e);case 1:return mt(e);case 2:return dt(e);default:return null}}}]),n}(b.a.Component);function Sn(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 En=i.Dimensions.get("window").width,Cn=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:En,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:En,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#ff0000",backgroundColor:"#ff0000",position:"absolute",left:0},splitter:{marginTop:50}}),Tn=function(e){h()(n,e);var t=Sn(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,En),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,En),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,En),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,En),this.setState({demo2Left:n})}},{key:"render",value:function(){var e=this,t=this.state.demo2Left;return b.a.createElement(i.View,{style:Cn.setNativePropsDemo},b.a.createElement(i.Text,null,"setNativeProps实现拖动效果"),b.a.createElement(i.View,{style:Cn.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:Cn.nativeDemo1Point,ref:this.demon1Point})),b.a.createElement(i.View,{style:Cn.splitter}),b.a.createElement(i.Text,null,"普通渲染实现拖动效果"),b.a.createElement(i.View,{style:Cn.nativeDemo2Drag,onTouchDown:function(t){return e.onTouchDown2(t)},onTouchMove:function(t){return e.onTouchMove2(t)}},b.a.createElement(i.View,{style:[Cn.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 kn=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),An=function(e){h()(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(ce()(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:kn.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 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 jn=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),In=function(e){h()(n,e);var t=Vn(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);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 Dn(e){for(var t=1;t Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:Un.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:Un.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:Un.buttonContainer},b.a.createElement(i.View,{style:Un.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:Un.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function Yn(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}}),Xn=function(e){h()(n,e);var t=Yn(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||(i[n]=e[n]);return i}(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}function A(e){return(A="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 R(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,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(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 j(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)?j(e,t):void 0}}function j(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 o=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,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(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-1){return"".concat("hpfile://","./").concat(e)}return e}var ce=function(){function e(t){z(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return L(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}(),se=new Map,fe=["%c[event]%c","color: green","color: auto"];function de(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: ".concat(e));return se.get(e)||null}var pe={registerNativeEventHub:function(e){if(ne.apply(void 0,fe.concat(["registerNativeEventHub",e])),"string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: ".concat(e));var t=se.get(e);return t||(t=new ce(e),se.set(e,t)),t},getHippyEventHub:de,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: ".concat(e));se.has(e)&&se.delete(e)},receiveNativeEvent:function(e){if(ne.apply(void 0,fe.concat(["receiveNativeEvent",e])),!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: ".concat(JSON.stringify(e)));var t=R(e,2),n=t[0],r=t[1];if("string"!=typeof n)throw new TypeError("Invalid arguments");var i=de(n);i&&i.notifyEvent(r)},receiveNativeGesture:function(e){if(ne.apply(void 0,fe.concat(["receiveNativeGesture",e])),e){var t=ee(e.id);if(t){var n=!1,r=t,i=e.name;do{if(r.memoizedProps&&!r.memoizedProps[i]&&"onClick"===i&&r.memoizedProps.onPress&&(i="onPress"),r.memoizedProps&&r.memoizedProps[i]&&"function"==typeof r.memoizedProps[i])try{n=r.memoizedProps[i](e)}catch(e){console.reportUncaughtException(e)}if("boolean"!=typeof n&&(n=!0),!1===n)for(r=r.return;r&&5!==r.tag;)r=r.return}while(!n&&r)}}},receiveUIComponentEvent:function(e){if(ne.apply(void 0,fe.concat(["receiveUIComponentEvent",e])),e&&Array.isArray(e)&&!(e.length<2)){var t=R(e,3),n=t[0],r=t[1],i=t[2];if("number"==typeof n&&"string"==typeof r){var o=ee(n);o&&o.memoizedProps&&o.memoizedProps[r]&&"function"==typeof o.memoizedProps[r]&&o.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=pe);var he=function(){function e(t,n){z(this,e),this.callback=t,this.bindListener=n}return L(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),me=function(){function e(t){z(this,e),this.eventName=t,this.listenerIds=[]}return L(e,[{key:"addCallback",value:function(e,t){if("function"!=typeof e)throw new TypeError("Invalid arguments");var n=pe.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=pe.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?Dt(t):t}var Ae=function(){function e(t){z(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=_e(t.valueType,r)}var i=_e(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=Ie(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Ct.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 L(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"===Tt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Pe.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Pe.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Pe.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Pe.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ct.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Ct.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ct.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ct.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==A(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 o=0;if(t.startValue instanceof e)o={animationId:t.startValue.animationId};else{var a=t.startValue;o=_e(n.valueType,a)}n.startValue=o||0}else"repeatCount"===r?n.repeatCount=Ie(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Ct.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:_e(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}(),Re=new ve,Oe=function(){function e(t){var n=this;z(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Ct.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Ie(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 L(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"===Tt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Re.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Re.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Re.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Re.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ct.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)&&Ct.callNative("AnimationModule","destroyAnimation",e.animationId)})),Ct.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ct.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ct.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}(),je=["%c[native]%c","color: red","color: auto"],ze={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")},Fe=!0,Le=[];function Me(){Fe&<()}function He(e){Fe&&(Fe=!1,Promise.resolve().then((function(){(function(e){for(var t=[],n=0;n-1})).indexOf(e)))}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.lastChild&&(e.prevSibling=this.lastChild,this.lastChild.nextSibling=e),this.childNodes.push(e),Be(this,e,this.childNodes.length-1)}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");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.");e.meta.skipAddToDom||(qe(0,e),e.prevSibling&&(e.prevSibling.nextSibling=e.nextSibling,e.prevSibling=null),e.nextSibling&&(e.nextSibling.prevSibling=e.prevSibling,e.nextSibling=null),this.childNodes=this.childNodes.filter((function(t){return t!==e})))}},{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]:Ze,n=parseFloat(e),r=e||"",i=e.split("."),o=R(i,2),a=o[1];switch(a&&a.length>2&&(r=n.toFixed(2)),t){case Xe:r="".concat((360*n).toFixed(2));break;case Je:r="".concat((180/Math.PI*n).toFixed(2))}return r}(a,l):o&&void 0!==Ye[o]&&(r=Ye[o]),r}}function tt(e){var t=R((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:Dt(n)}:void 0:{color:Dt(n)}}var nt=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.tagName=e,r}return L(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,te.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var o={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){o=I(I({},o),e)})):"object"===A(e)&&e&&(o=I(I({},o),e))})),Object.keys(o).forEach((function(e){var n=o[e];if(Object.prototype.hasOwnProperty.call(Ge,e)&&(e=Ge[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 Ae||n instanceof Oe?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 null===n&&void 0!==t.style[e]?t.style[e]=void 0:n instanceof Ae||n instanceof Oe?t.style[e]={animationId:n.animationId}:e.toLowerCase().indexOf("colors")>-1?t.style[e]=Wt(n):e.toLowerCase().indexOf("color")>-1?t.style[e]=Dt(n):"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=et(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var o=tt(e);o&&i.push(o)}}else{var a=tt(e);a&&i.push(a)}})),n.linearGradient.colorStopList=i}else n[e]=ue(t);return 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 $e(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=J(),n=We(t,e);Me(),Le.push({type:ze.updateNode,nodes:n}),He(t)}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=re(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"!==Tt.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"!==A(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){return n.attributes[e]="function"==typeof t||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(Ge,e)&&(i=Ge[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Wt(r):i.toLowerCase().indexOf("color")>-1?Dt(r):oe(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||$e(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)})),$e(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=re(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(Ke),rt=q.createNode,it=q.updateNode,ot=q.deleteNode,at=q.flushBatch,lt=q.startBatch,ut=q.endBatch,ct=q.sendRenderError,st=ee;function ft(e){if(e instanceof nt)return e;var t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){for(var n=t.child;n&&!(n.stateNode instanceof nt);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function dt(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=Z((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=ft(t);return r?r.nodeId:0}return t.nodeId}function pt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=ft(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 o=arguments.length,a=new Array(o>2?o-2:0),l=2;l255?255:t}function zt(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ft(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 Lt(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Ft(i,r,e+1/3),a=Ft(i,r,e),l=Ft(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Mt(e){return(parseFloat(e)%360+360)%360/360}function Ht(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ut(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ot.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(_t,e)?_t[e]:(t=Ot.rgb.exec(e),Array.isArray(t)?(jt(t[1])<<24|jt(t[2])<<16|jt(t[3])<<8|255)>>>0:(t=Ot.rgba.exec(e))?(jt(t[1])<<24|jt(t[2])<<16|jt(t[3])<<8|zt(t[4]))>>>0:(t=Ot.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=Ot.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=Ot.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ot.hsl.exec(e))?(255|Lt(Mt(t[1]),Ht(t[2]),Ht(t[3])))>>>0:(t=Ot.hsla.exec(e))?(Lt(Mt(t[1]),Ht(t[2]),Ht(t[3]))|zt(t[4]))>>>0:null))}function Dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=Ut(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function Wt(e,t){return Array.isArray(e)?e.map((function(e){return Dt(e,t)})):[0]}var Vt=function(e){w(n,e);var t=x(n);function n(){var e;return z(this,n),(e=t.call(this)).documentElement=new nt("document"),e}return L(n,[{key:"createElement",value:function(e){return new nt(e)}},{key:"createElementNS",value:function(e,t){return new nt("".concat(e,":").concat(t))}}]),n}(Ke);Vt.createElement=Vt.prototype.createElement,Vt.createElementNS=Vt.prototype.createElementNS;var Bt=Array.isArray,qt=Object.keys,$t=Object.prototype.hasOwnProperty;var Qt=setTimeout,Kt=clearTimeout,Gt=Object.freeze({__proto__:null,scheduleTimeout:Qt,cancelTimeout:Kt,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(e){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t){Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},clearContainer:function(e){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var o=n.createElement(e);return Object.keys(t).forEach((function(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),o},createTextInstance:function(e,t){var n=t.createElement("p");return n.setAttribute("text",re(e)),n.meta={component:{name:"Text",skipAddToDom:!0}},n},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(e){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(e){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(e){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(e){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(e){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(e){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(e){},prepareUpdate:function(e,t,n,r){var i={};return 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||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==A(t)&&"object"==A(n)){var r,i,o,a=Bt(t),l=Bt(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 u=t instanceof Date,c=n instanceof Date;if(u!=c)return!1;if(u&&c)return t.getTime()==n.getTime();var s=t instanceof RegExp,f=n instanceof RegExp;if(s!=f)return!1;if(s&&f)return t.toString()==n.toString();var d=qt(t);if((i=d.length)!==qt(n).length)return!1;for(r=i;0!=r--;)if(!$t.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)},removeChildFromContainer:function(e,t){e.removeChild(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(e){throw new Error("Not yet implemented.")},unhideTextInstance:function(e,t){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=I(I({},t),{},{style:I(I({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(e){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}}),Yt=a()(I(I({},Gt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Xt=Yt.createContainer,Jt=Yt.updateContainer,Zt=Yt.getPublicRootInstance,en=['%c[Hippy-React "2.9.2"]%c',"color: #61dafb","color: auto"],tn=function(){function e(t){if(z(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 Vt;this.rootContainer=Xt(n,!1,!1)}return L(e,[{key:"start",value:function(){Nt.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,o=t.silent,a=void 0!==o&&o,l=t.callback,u=void 0===l?function(){}:l,c=e.__instanceId__;ne.apply(void 0,en.concat(["Start",n,"with rootViewId",c,e])),this.rootContainer.containerInfo.nodeId=c,a&&le(a),X(c,this.rootContainer);var s=i.a.createElement(r,e);return Jt(s,this.rootContainer,null,u),Zt(this.rootContainer)}}],[{key:"Native",get:function(){return It}}]),e}();tn.version="2.9.2";var nn={registerComponent:function(e,t){new tn({appName:e,entryPage:t}).start()}},rn=function(e){w(n,e);var t=x(n);function n(){return z(this,n),t.apply(this,arguments)}return L(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,o=_(e,u),a=r;return"boolean"==typeof t&&(a.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:a},o))}}]),n}(i.a.Component);function on(e,t){var n=e.style,r=_(e,c),o=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===A(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(o[0].color="#000"):"object"===A(n)&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=re(r.children);else if("number"==typeof r.children)r.text=re(r.children.toString());else if(Array.isArray(r.children)){var a=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");a&&(r.text=re(a),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}on.displayName="Text";var an=i.a.forwardRef(on);an.displayName="Text";var ln=function(e){w(n,e);var t=x(n);function n(){return z(this,n),t.apply(this,arguments)}return L(n,[{key:"getImageUrls",value:function(e){var t=e.src,n=e.srcs,r=e.source,i=e.sources,o=[];if("string"==typeof t&&o.push(t),Array.isArray(n)&&(o=[].concat(k(o),k(n))),r)if("string"==typeof r)o.push(r);else if("object"===A(r)&&null!==r){var a=r.uri;a&&o.push(a)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?o.push(e):"object"===A(e)&&null!==e&&e.uri&&o.push(e.uri)})),o.length&&(o=o.map((function(e){return ue(e)}))),o}},{key:"handleTintColor",value:function(e,t,n){t&&(e.tintColor=Dt(t)),Array.isArray(n)&&(e.tintColors=Wt(n))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,o=e.imageRef,a=e.source,l=e.sources,u=e.src,c=e.srcs,f=e.tintColor,d=e.tintColors,p=_(e,s),h=this.getImageUrls({src:u,srcs:c,source:a,sources:l});if("ios"===Tt.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===Tt.platform.OS)if(1===h.length){var m=R(h,1);p.src=m[0]}else h.length>1&&(p.srcs=h);"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ue(p.defaultSource));var y=I({},n);return this.handleTintColor(y,f,d),p.style=y,t?i.a.createElement(rn,{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}))}}],[{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=ke(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);ln.prefetch=we;var un=function(){function e(){z(this,e),this.Value=e.Value}return L(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new Ae({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();un.View=rn,un.Text=an,un.Image=ln;var cn={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 fn=function(e){w(n,e);var t=x(n);function n(){var e;return z(this,n),(e=t.apply(this,arguments)).instance=null,e}return L(n,[{key:"expandPullHeader",value:function(){pt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Tt.platform.OS?pt(this.instance,"collapsePullHeader",[e]):void 0!==e?pt(this.instance,"collapsePullHeaderWithOptions",[e]):pt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=_(t,f);return i.a.createElement("div",Object.assign({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component),dn=function(e){w(n,e);var t=x(n);function n(){var e;return z(this,n),(e=t.apply(this,arguments)).instance=null,e}return L(n,[{key:"expandPullFooter",value:function(){pt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){pt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=_(t,d);return i.a.createElement("div",Object.assign({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component);dn.defaultProps={sticky:!0};var pn={onDisappear:"onDisAppear"},hn={onDisappear:"onDisappear"},mn=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(C(r)),r.state={initialListReady:!1},r}return L(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"convertName",value:function(e){var t=e;return t.indexOf("bound")>=0&&(t=t.substring("bound".length+1)),"android"===Tt.platform.OS&&pn[t]?pn[t]:"ios"===Tt.platform.OS&&hn[t]?hn[t]:t}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&pt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&pt(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,o=null;return"function"==typeof e&&(o=i.a.createElement(fn,{ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),o}},{key:"getPullFooter",value:function(e,t,n){var r=this,o=null;return"function"==typeof e&&(o=i.a.createElement(dn,{ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),o}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,o=n.onRowLayout,a=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof o&&(e.onLayout=function(e){o(e,t)}),"function"==typeof a){var u=a(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,o=t.renderRow,a=t.renderPullHeader,l=t.renderPullFooter,u=t.getRowType,c=t.getRowStyle,s=t.getRowKey,f=t.dataSource,d=t.initialListSize,h=t.rowShouldSticky,m=t.onRowLayout,y=t.onHeaderPulling,v=t.onHeaderReleased,b=t.onFooterPulling,g=t.onFooterReleased,k=t.onAppear,w=t.onDisappear,E=t.onWillAppear,x=t.onWillDisappear,S=_(t,p),C=[];if("function"==typeof o){var T=this.state.initialListReady,N=this.props.numberOfRows,P=this.getPullHeader(a,y,v),A=this.getPullFooter(l,b,g);!N&&f&&(N=f.length),T||(N=Math.min(N,d||10));for(var R=function(t){var n={},r=void 0;r=f?o(f[t],null,t):o(t),e.handleRowProps(n,t,{getRowKey:s,getRowStyle:c,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[k,w,E,x].forEach((function(r){"function"==typeof r&&(n[e.convertName(r.name)]=function(){r(t)})})),r&&C.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 tn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),pt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),pt(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,_(n,m)),o=_(t,y);return o.initialRoute=r,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:function(t){e.instance=t}},o))}}]),n}(i.a.Component);function gn(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 kn=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(C(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(C(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(C(r)),r}return L(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&pt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&pt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,o=_(t,v),a=[];return Array.isArray(n)?a=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(gn,Object.assign({},t),e)})):a.push(i.a.createElement(gn,null,n)),"function"==typeof r&&(o.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:function(t){e.instance=t}},o),a)}}]),n}(i.a.Component);function wn(){var e=B.platform.Localization;return!!e&&1===e.direction}var En=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r._onChangeText=r._onChangeText.bind(C(r)),r._onKeyboardWillShow=r._onKeyboardWillShow.bind(C(r)),r}return L(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){pt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return pt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){pt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){pt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){pt(this.instance,"showInputMethod",[])}},{key:"hideInputMethod",value:function(){pt(this.instance,"hideInputMethod",[])}},{key:"clear",value:function(){pt(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"===Tt.platform.OS&&(n.keyboardHeight/=Tt.screen.scale),"function"==typeof t&&t(n)}},{key:"render",value:function(){var e=this,t=I({},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"===A(t.style)?t.style[n]=e.props[n]:t.style={[n]:e.props[n]},t[n]=void 0)})),wn()&&(t.style?"object"!==A(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),xn=Tt.window.scale,Sn=Math.round(.4*xn)/xn;function Cn(e){return e}0===Sn&&(Sn=1/xn);var Tn=Object.freeze({__proto__:null,get hairlineWidth(){return Sn},create:Cn}),Nn={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"}},In=function(e){w(n,e);var t=x(n);function n(){var e;return z(this,n),(e=t.apply(this,arguments)).instance=null,e}return L(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,o=n;"number"==typeof e||"object"===A(e)&&e&&(r=e.x,i=e.y,o=e.animated),r=r||0,i=i||0,o=!!o,pt(this.instance,"scrollTo",[r,i,o])}},{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;pt(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,o=t.children,a=t.style,l=[n?Nn.contentContainerHorizontal:Nn.contentContainerVertical,r],u=n?Object.assign({},Nn.baseHorizontal,a):Object.assign({},Nn.baseVertical,a);return n&&(u.flexDirection=wn()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props,{style:u}),i.a.createElement(rn,{style:l},o))}}]),n}(i.a.Component),Pn={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}},_n=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this,e)).eventSubscription=null,r}return L(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Tt.platform.OS&&(this.eventSubscription=new me("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"===Tt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,o=e.animated,a=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return a||(a="none",o&&(a="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:a,transparent:r,style:Pn.modal},this.props),i.a.createElement(rn,{style:[Pn.container,l]},t))}}]),n}(i.a.Component);_n.defaultProps={visible:!0};var An=function(e){w(n,e);var t=x(n);function n(e){var r;z(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(C(r)),r}return L(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,o=t.nextFocusDownId,a=t.nextFocusUpId,l=t.nextFocusLeftId,u=t.nextFocusRightId,c=t.style,s=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=o&&dt(o),y=a&&dt(a),v=l&&dt(l),b=u&&dt(u),g=c;if("Text"!==e){var k=h.memoizedProps.style;g=I(I({},g),k)}if(Object.assign(g,p?f:s),"Text"===e)return i.a.createElement(rn,{focusable:!0,nextFocusDownId:m,nextFocusUpId:y,nextFocusLeftId:v,nextFocusRightId:b,requestFocus:n,style:g,onClick:d,onFocus:this.handleFocus},h);var w=h.memoizedProps.children;return i.a.cloneElement(h,{nextFocusDownId:o,nextFocusUpId:a,nextFocusLeftId:l,nextFocusRightId:u,requestFocus:n,onClick:d,focusable:!0,children:w,style:g,onFocus:this.handleFocus})}}]),n}(i.a.Component);function Rn(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}var On,jn=function(){function e(t,n,r){var i=this;if(z(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),On||(On=new me("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var o=I({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)o["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");o["Sec-WebSocket-Protocol"]=n}var a={headers:o,url:t};this.url=t,this.webSocketCallbackId=On.addCallback(this.onWebSocketEvent),V.callNativeWithPromise("websocket","connect",a).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return L(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,V.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(A(e)));V.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"===A(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,On.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}(),zn=function(e){w(n,e);var t=x(n);function n(){return z(this,n),t.apply(this,arguments)}return L(n,[{key:"render",value:function(){var e=this.props,t=e.collapsable,n=e.style,r=void 0===n?{}:n,o=_(e,b),a=r;return"boolean"==typeof t&&(a.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:a},o))}}]),n}(i.a.Component);function Fn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}var Ln=function(e){w(n,e);var t=x(n);function n(e){var r;return z(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(C(r)),r}return L(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;pt(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,o=e.animated,a=void 0===o||o;pt(this.instance,"scrollToContentOffset",[n,i,a])}},{key:"handleRowProps",value:function(e,t,n){var r=n.getItemKey,i=n.getItemStyle,o=n.onItemLayout,a=n.getItemType;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof o&&(e.onLayout=function(e){o(e,t)}),"function"==typeof a){var l=a(t);Number.isInteger(l),e.type=l}}},{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,o=null;return"function"==typeof e&&(o=i.a.createElement(fn,{key:"PullHeader",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),o}},{key:"getPullFooter",value:function(e,t,n){var r=this,o=null;return"function"==typeof e&&(o=i.a.createElement(dn,{key:"PullFooter",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),o}},{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,o=t.renderBanner,a=t.numberOfColumns,l=void 0===a?2:a,u=t.columnSpacing,c=void 0===u?0:u,s=t.interItemSpacing,f=void 0===s?0:s,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,y=t.renderItem,v=t.renderPullHeader,b=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,E=t.getItemStyle,x=t.contentInset,S=void 0===x?{top:0,left:0,bottom:0,right:0}:x,C=t.onItemLayout,T=t.onHeaderPulling,N=t.onHeaderReleased,P=t.onFooterPulling,A=t.onFooterReleased,R=t.containPullHeader,O=void 0!==R&&R,j=t.containPullFooter,z=void 0!==j&&j,F=t.containBannerView,L=void 0!==F&&F,M=I(I({},_(t,g)),{},{style:r,numberOfColumns:l,columnSpacing:c,interItemSpacing:f,preloadItemNumber:m,contentInset:S,containPullHeader:O,containPullFooter:z,containBannerView:L}),H=[];if("function"==typeof o){var U=o();U&&(H.push(i.a.createElement(zn,{key:"bannerView"},i.a.cloneElement(U))),M.containBannerView=!0)}if("function"==typeof y){for(var D=this.getPullHeader(v,T,N),W=this.getPullFooter(b,P,A),V=0;V-1){return"".concat("hpfile://","./").concat(e)}return e}var se=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}(),ce=new Map,fe=["%c[event]%c","color: green","color: auto"];function de(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: ".concat(e));return ce.get(e)||null}var pe={registerNativeEventHub:function(e){if(ne.apply(void 0,fe.concat(["registerNativeEventHub",e])),"string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: ".concat(e));var t=ce.get(e);return t||(t=new se(e),ce.set(e,t)),t},getHippyEventHub:de,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: ".concat(e));ce.has(e)&&ce.delete(e)},receiveNativeEvent:function(e){if(ne.apply(void 0,fe.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=de(n);i&&i.notifyEvent(r)},receiveNativeGesture:function(e){if(ne.apply(void 0,fe.concat(["receiveNativeGesture",e])),e){var t=ee(e.id);if(t){var n=!1,r=t,i=e.name;do{if(r.memoizedProps&&!r.memoizedProps[i]&&"onClick"===i&&r.memoizedProps.onPress&&(i="onPress"),r.memoizedProps&&r.memoizedProps[i]&&"function"==typeof r.memoizedProps[i])try{n=r.memoizedProps[i](e)}catch(e){console.reportUncaughtException(e)}if("boolean"!=typeof n&&(n=!0),!1===n)for(r=r.return;r&&5!==r.tag;)r=r.return}while(!n&&r)}}},receiveUIComponentEvent:function(e){if(ne.apply(void 0,fe.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 o=ee(n);o&&o.memoizedProps&&o.memoizedProps[r]&&"function"==typeof o.memoizedProps[r]&&o.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=pe);var he=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}(),me=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=pe.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=pe.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?Dt(t):t}var Re=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=Ae(t.valueType,r)}var i=Ae(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=Pe(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Ct.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"===Nt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=_e.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=_e.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=_e.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=_e.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ct.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Ct.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ct.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ct.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 o=0;if(t.startValue instanceof e)o={animationId:t.startValue.animationId};else{var a=t.startValue;o=Ae(n.valueType,a)}n.startValue=o||0}else"repeatCount"===r?n.repeatCount=Pe(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Ct.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Ae(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}(),Le=new ye,Oe=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=Ct.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Pe(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"===Nt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Le.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Le.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Le.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Le.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Ct.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)&&Ct.callNative("AnimationModule","destroyAnimation",e.animationId)})),Ct.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Ct.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Ct.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}(),ze=["%c[native]%c","color: red","color: auto"],Te={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")},je=!0,Fe=[];function Me(){je&<()}function He(e){je&&(je=!1,Promise.resolve().then((function(){(function(e){for(var t=[],n=0;n-1})).indexOf(e)))}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.lastChild&&(e.prevSibling=this.lastChild,this.lastChild.nextSibling=e),this.childNodes.push(e),Ve(this,e,this.childNodes.length-1)}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");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.");e.meta.skipAddToDom||($e(0,e),e.prevSibling&&(e.prevSibling.nextSibling=e.nextSibling,e.prevSibling=null),e.nextSibling&&(e.nextSibling.prevSibling=e.prevSibling,e.nextSibling=null),this.childNodes=this.childNodes.filter((function(t){return t!==e})))}},{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]:Ze,n=parseFloat(e),r=e||"",i=e.split("."),o=L(i,2),a=o[1];switch(a&&a.length>2&&(r=n.toFixed(2)),t){case Xe:r="".concat((360*n).toFixed(2));break;case Je:r="".concat((180/Math.PI*n).toFixed(2))}return r}(a,l):o&&void 0!==Ye[o]&&(r=Ye[o]),r}}function tt(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:Dt(n)}:void 0:{color:Dt(n)}}var nt=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,te.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var o={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){o=P(P({},o),e)})):"object"===R(e)&&e&&(o=P(P({},o),e))})),Object.keys(o).forEach((function(e){var n=o[e];if(Object.prototype.hasOwnProperty.call(Ge,e)&&(e=Ge[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 Re||n instanceof Oe?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 Re||n instanceof Oe)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=Wt(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=Dt(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=et(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var o=tt(e);o&&i.push(o)}}else{var a=tt(e);a&&i.push(a)}})),n.linearGradient.colorStopList=i}else n[e]=ue(t);return n}(e,n,t.style);else if("textShadowOffset"===e&&n){var a=n||{},l=a.x,u=void 0===l?0:l,s=a.width,c=void 0===s?0:s,f=a.y,d=void 0===f?0:f,p=a.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 qe(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=J(),n=We(t,e);Me(),Fe.push({type:Te.updateNode,nodes:n}),He(t)}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=re(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"!==Nt.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(){return n.attributes[e]="function"==typeof t||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(Ge,e)&&(i=Ge[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Wt(r):i.toLowerCase().indexOf("color")>-1?Dt(r):oe(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||qe(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)})),qe(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=re(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(Ke),rt=$.createNode,it=$.updateNode,ot=$.deleteNode,at=$.flushBatch,lt=$.startBatch,ut=$.endBatch,st=$.sendRenderError,ct=ee;function ft(e){if(e instanceof nt)return e;var t=e._reactInternalFiber||e._reactInternals;if(t&&t.child){for(var n=t.child;n&&!(n.stateNode instanceof nt);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function dt(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=Z((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=ft(t);return r?r.nodeId:0}return t.nodeId}function pt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=ft(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 o=arguments.length,a=new Array(o>2?o-2:0),l=2;l255?255:t}function Tt(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function jt(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 Ft(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=jt(i,r,e+1/3),a=jt(i,r,e),l=jt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Mt(e){return(parseFloat(e)%360+360)%360/360}function Ht(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ut(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ot.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(At,e)?At[e]:(t=Ot.rgb.exec(e),Array.isArray(t)?(zt(t[1])<<24|zt(t[2])<<16|zt(t[3])<<8|255)>>>0:(t=Ot.rgba.exec(e))?(zt(t[1])<<24|zt(t[2])<<16|zt(t[3])<<8|Tt(t[4]))>>>0:(t=Ot.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=Ot.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=Ot.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ot.hsl.exec(e))?(255|Ft(Mt(t[1]),Ht(t[2]),Ht(t[3])))>>>0:(t=Ot.hsla.exec(e))?(Ft(Mt(t[1]),Ht(t[2]),Ht(t[3]))|Tt(t[4]))>>>0:null))}function Dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=Ut(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function Wt(e,t){return Array.isArray(e)?e.map((function(e){return Dt(e,t)})):[0]}var Bt=function(e){w(n,e);var t=E(n);function n(){var e;return T(this,n),(e=t.call(this)).documentElement=new nt("document"),e}return F(n,[{key:"createElement",value:function(e){return new nt(e)}},{key:"createElementNS",value:function(e,t){return new nt("".concat(e,":").concat(t))}}]),n}(Ke);Bt.createElement=Bt.prototype.createElement,Bt.createElementNS=Bt.prototype.createElementNS;var Vt=Array.isArray,$t=Object.keys,qt=Object.prototype.hasOwnProperty;var Qt=setTimeout,Kt=clearTimeout,Gt=Object.freeze({__proto__:null,scheduleTimeout:Qt,cancelTimeout:Kt,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(e){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t){Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},clearContainer:function(e){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var o=n.createElement(e);return Object.keys(t).forEach((function(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),o},createTextInstance:function(e,t){var n=t.createElement("p");return n.setAttribute("text",re(e)),n.meta={component:{name:"Text",skipAddToDom:!0}},n},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(e){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(e){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(e){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(e){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(e){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(e){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(e){},prepareUpdate:function(e,t,n,r){var i={};return 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||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==R(t)&&"object"==R(n)){var r,i,o,a=Vt(t),l=Vt(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 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=$t(t);if((i=d.length)!==$t(n).length)return!1;for(r=i;0!=r--;)if(!qt.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)},removeChildFromContainer:function(e,t){e.removeChild(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(e){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(e){throw new Error("Not yet implemented.")},unhideTextInstance:function(e,t){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(e){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}}),Yt=a()(P(P({},Gt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Xt=Yt.createContainer,Jt=Yt.updateContainer,Zt=Yt.getPublicRootInstance,en=['%c[Hippy-React "2.2.1"]%c',"color: #61dafb","color: auto"],tn=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 Bt;this.rootContainer=Xt(n,!1,!1)}return F(e,[{key:"start",value:function(){It.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,o=t.silent,a=void 0!==o&&o,l=t.callback,u=void 0===l?function(){}:l,s=e.__instanceId__;ne.apply(void 0,en.concat(["Start",n,"with rootViewId",s,e])),this.rootContainer.containerInfo.nodeId=s,a&&le(a),X(s,this.rootContainer);var c=i.a.createElement(r,e);return Jt(c,this.rootContainer,null,u),Zt(this.rootContainer)}}],[{key:"Native",get:function(){return Pt}}]),e}();tn.version="2.2.1";var nn={registerComponent:function(e,t){new tn({appName:e,entryPage:t}).start()}},rn=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,o=A(e,u),a=r;return"boolean"==typeof t&&(a.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:a},o))}}]),n}(i.a.Component);function on(e,t){var n=e.style,r=A(e,s),o=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===R(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(o[0].color="#000"):"object"===R(n)&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=re(r.children);else if("number"==typeof r.children)r.text=re(r.children.toString());else if(Array.isArray(r.children)){var a=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");a&&(r.text=re(a),r.children=r.text)}return i.a.createElement("p",Object.assign({ref:t,nativeName:"Text",style:o},r))}on.displayName="Text";var an=i.a.forwardRef(on);an.displayName="Text";var ln=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,o=[];if("string"==typeof t&&o.push(t),Array.isArray(n)&&(o=[].concat(k(o),k(n))),r)if("string"==typeof r)o.push(r);else if("object"===R(r)&&null!==r){var a=r.uri;a&&o.push(a)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?o.push(e):"object"===R(e)&&null!==e&&e.uri&&o.push(e.uri)})),o.length&&(o=o.map((function(e){return ue(e)}))),o}},{key:"handleTintColor",value:function(e,t,n){t&&(e.tintColor=Dt(t)),Array.isArray(n)&&(e.tintColors=Wt(n))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,o=e.imageRef,a=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:a,sources:l});if("ios"===Nt.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===Nt.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=ue(p.defaultSource));var v=P({},n);return this.handleTintColor(v,f,d),p.style=v,t?i.a.createElement(rn,{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}))}}],[{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=ke(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);ln.prefetch=we;var un=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 Re({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();un.View=rn,un.Text=an,un.Image=ln;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 cn(e){return i.a.createElement("li",Object.assign({nativeName:"ListViewItem"},e))}var fn=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(){pt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Nt.platform.OS?pt(this.instance,"collapsePullHeader",[e]):void 0!==e?pt(this.instance,"collapsePullHeaderWithOptions",[e]):pt(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),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:"expandPullFooter",value:function(){pt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){pt(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);dn.defaultProps={sticky:!0};var pn={onDisappear:"onDisAppear"},hn={onDisappear:"onDisappear"},mn=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(C(r)),r.state={initialListReady:!1},r}return F(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"convertName",value:function(e){var t=e;return t.indexOf("bound")>=0&&(t=t.substring("bound".length+1)),"android"===Nt.platform.OS&&pn[t]?pn[t]:"ios"===Nt.platform.OS&&hn[t]?hn[t]:t}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&pt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&pt(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,o=null;return"function"==typeof e&&(o=i.a.createElement(fn,{ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),o}},{key:"getPullFooter",value:function(e,t,n){var r=this,o=null;return"function"==typeof e&&(o=i.a.createElement(dn,{ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),o}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,o=n.onRowLayout,a=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof o&&(e.onLayout=function(e){o(e,t)}),"function"==typeof a){var u=a(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,o=t.renderRow,a=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,x=A(t,p),C=[];if("function"==typeof o){var N=this.state.initialListReady,I=this.props.numberOfRows,_=this.getPullHeader(a,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?o(f[t],null,t):o(t),e.handleRowProps(n,t,{getRowKey:c,getRowStyle:s,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[k,w,S,E].forEach((function(r){"function"==typeof r&&(n[e.convertName(r.name)]=function(){r(t)})})),r&&C.push(i.a.createElement(cn,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 tn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),pt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),pt(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)),o=A(t,v);return o.initialRoute=r,i.a.createElement("div",Object.assign({nativeName:"Navigator",ref:function(t){e.instance=t}},o))}}]),n}(i.a.Component);function bn(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 kn=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(C(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(C(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(C(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&&pt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&pt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,o=A(t,y),a=[];return Array.isArray(n)?a=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(bn,Object.assign({},t),e)})):a.push(i.a.createElement(bn,null,n)),"function"==typeof r&&(o.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",Object.assign({nativeName:"ViewPager",ref:function(t){e.instance=t}},o),a)}}]),n}(i.a.Component);function wn(){var e=V.platform.Localization;return!!e&&1===e.direction}var Sn=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(C(r)),r._onKeyboardWillShow=r._onKeyboardWillShow.bind(C(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){pt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return pt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){pt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){pt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){pt(this.instance,"showInputMethod",[])}},{key:"hideInputMethod",value:function(){pt(this.instance,"hideInputMethod",[])}},{key:"clear",value:function(){pt(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"===Nt.platform.OS&&(n.keyboardHeight/=Nt.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)})),wn()&&(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),En=Nt.window.scale,xn=Math.round(.4*En)/En;function Cn(e){return e}0===xn&&(xn=1/En);var Nn=Object.freeze({__proto__:null,get hairlineWidth(){return xn},create:Cn}),In={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"}},Pn=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,o=n;"number"==typeof e||"object"===R(e)&&e&&(r=e.x,i=e.y,o=e.animated),r=r||0,i=i||0,o=!!o,pt(this.instance,"scrollTo",[r,i,o])}},{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;pt(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,o=t.children,a=t.style,l=[n?In.contentContainerHorizontal:In.contentContainerVertical,r],u=n?Object.assign({},In.baseHorizontal,a):Object.assign({},In.baseVertical,a);return n&&(u.flexDirection=wn()?"row-reverse":"row"),i.a.createElement("div",Object.assign({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props,{style:u}),i.a.createElement(rn,{style:l},o))}}]),n}(i.a.Component),_n={modal:{position:"absolute"},container:{position:"absolute",left:0,top:0}},An=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"===Nt.platform.OS&&(this.eventSubscription=new me("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"===Nt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,o=e.animated,a=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return a||(a="none",o&&(a="slide")),i.a.createElement("div",Object.assign({nativeName:"Modal",animationType:a,transparent:r,style:_n.modal},this.props),i.a.createElement(rn,{style:[_n.container,l]},t))}}]),n}(i.a.Component);An.defaultProps={visible:!0};var Rn=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(C(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,o=t.nextFocusDownId,a=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=o&&dt(o),v=a&&dt(a),y=l&&dt(l),g=u&&dt(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(rn,{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:o,nextFocusUpId:a,nextFocusLeftId:l,nextFocusRightId:u,requestFocus:n,onClick:d,focusable:!0,children:w,style:b,onFocus:this.handleFocus})}}]),n}(i.a.Component);function Ln(e){return i.a.createElement("iframe",Object.assign({title:"hippy",nativeName:"WebView"},e))}var On,zn=function(){function e(t,n,r){var i=this;if(T(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),On||(On=new me("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var o=P({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)o["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");o["Sec-WebSocket-Protocol"]=n}var a={headers:o,url:t};this.url=t,this.webSocketCallbackId=On.addCallback(this.onWebSocketEvent),B.callNativeWithPromise("websocket","connect",a).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,On.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}(),Tn=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,o=A(e,g),a=r;return"boolean"==typeof t&&(a.collapsable=t),i.a.createElement("div",Object.assign({nativeName:"View",style:a},o))}}]),n}(i.a.Component);function jn(e){return i.a.createElement("li",Object.assign({nativeName:"WaterfallItem"},e))}var Fn=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(C(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;pt(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,o=e.animated,a=void 0===o||o;pt(this.instance,"scrollToContentOffset",[n,i,a])}},{key:"handleRowProps",value:function(e,t,n){var r=n.getItemKey,i=n.getItemStyle,o=n.onItemLayout,a=n.getItemType;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof o&&(e.onLayout=function(e){o(e,t)}),"function"==typeof a){var l=a(t);Number.isInteger(l),e.type=l}}},{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,o=null;return"function"==typeof e&&(o=i.a.createElement(fn,{key:"PullHeader",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),o}},{key:"getPullFooter",value:function(e,t,n){var r=this,o=null;return"function"==typeof e&&(o=i.a.createElement(dn,{key:"PullFooter",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),o}},{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,o=t.renderBanner,a=t.numberOfColumns,l=void 0===a?2:a,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,x=void 0===E?{top:0,left:0,bottom:0,right:0}:E,C=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,M=P(P({},A(t,b)),{},{style:r,numberOfColumns:l,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:x,containPullHeader:O,containPullFooter:T,containBannerView:F}),H=[];if("function"==typeof o){var U=o();U&&(H.push(i.a.createElement(Tn,{key:"bannerView"},i.a.cloneElement(U))),M.containBannerView=!0)}if("function"==typeof v){for(var D=this.getPullHeader(y,N,I),W=this.getPullFooter(g,_,R),B=0;BTe||(e.current=Ce[Te],Ce[Te]=null,Te--)}function Ie(e,t){Te++,Ce[Te]=e.current,e.current=t}var Pe={},_e={current:Pe},Ae={current:!1},Re=Pe;function Oe(e,t){var n=e.type.contextTypes;if(!n)return Pe;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function je(e){return null!=(e=e.childContextTypes)}function ze(e){Ne(Ae),Ne(_e)}function Fe(e){Ne(Ae),Ne(_e)}function Le(e,t,n){if(_e.current!==Pe)throw u(Error(168));Ie(_e,t),Ie(Ae,n)}function Me(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw u(Error(108),T(t)||"Unknown",i);return o({},n,r)}function He(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pe,Re=_e.current,Ie(_e,t),Ie(Ae,Ae.current),!0}function Ue(e,t,n){var r=e.stateNode;if(!r)throw u(Error(169));n?(t=Me(e,t,Re),r.__reactInternalMemoizedMergedChildContext=t,Ne(Ae),Ne(_e),Ie(_e,t)):Ne(Ae),Ie(Ae,n)}var De=l.unstable_runWithPriority,We=l.unstable_scheduleCallback,Ve=l.unstable_cancelCallback,Be=l.unstable_shouldYield,qe=l.unstable_requestPaint,$e=l.unstable_now,Qe=l.unstable_getCurrentPriorityLevel,Ke=l.unstable_ImmediatePriority,Ge=l.unstable_UserBlockingPriority,Ye=l.unstable_NormalPriority,Xe=l.unstable_LowPriority,Je=l.unstable_IdlePriority,Ze={},et=void 0!==qe?qe:function(){},tt=null,nt=null,rt=!1,it=$e(),ot=1e4>it?$e:function(){return $e()-it};function at(){switch(Qe()){case Ke:return 99;case Ge:return 98;case Ye:return 97;case Xe:return 96;case Je:return 95;default:throw u(Error(332))}}function lt(e){switch(e){case 99:return Ke;case 98:return Ge;case 97:return Ye;case 96:return Xe;case 95:return Je;default:throw u(Error(332))}}function ut(e,t){return e=lt(e),De(e,t)}function ct(e,t,n){return e=lt(e),We(e,t,n)}function st(e){return null===tt?(tt=[e],nt=We(Ke,dt)):tt.push(e),Ze}function ft(){null!==nt&&Ve(nt),dt()}function dt(){if(!rt&&null!==tt){rt=!0;var e=0;try{var t=tt;ut(99,(function(){for(;e=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function ht(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var mt=Object.prototype.hasOwnProperty;function yt(e,t){if(ht(e,t))return!0;if("object"!==r(e)||null===e||"object"!==r(t)||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i=t&&(er=!0),e.firstContext=null)}function Nt(e,t){if(wt!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(wt=e,t=1073741823),t={context:e,observedBits:t,next:null},null===kt){if(null===gt)throw u(Error(308));kt=t,gt.dependencies={expirationTime:0,firstContext:t,responders:null}}else kt=kt.next=t;return $?e._currentValue:e._currentValue2}var It=!1;function Pt(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function _t(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function At(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Rt(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Ot(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=Pt(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=Pt(e.memoizedState),i=n.updateQueue=Pt(n.memoizedState)):r=e.updateQueue=_t(i):null===i&&(i=n.updateQueue=_t(r));null===i||r===i?Rt(r,t):null===r.lastUpdate||null===i.lastUpdate?(Rt(r,t),Rt(i,t)):(Rt(r,t),i.lastUpdate=t)}function jt(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Pt(e.memoizedState):zt(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function zt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=_t(t)),t}function Ft(e,t,n,r,i,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null==(i="function"==typeof(e=n.payload)?e.call(a,r,i):e))break;return o({},r,i);case 2:It=!0}return r}function Lt(e,t,n,r,i){It=!1;for(var o=(t=zt(e,t)).baseState,a=null,l=0,u=t.firstUpdate,c=o;null!==u;){var s=u.expirationTime;sd?(p=f,f=null):p=f.sibling;var h=v(r,f,l[d],u);if(null===h){null===f&&(f=p);break}e&&f&&null===h.alternate&&t(r,f),o=a(h,o,d),null===s?c=h:s.sibling=h,s=h,f=p}if(d===l.length)return n(r,f),c;if(null===f){for(;dp?(h=d,d=null):h=d.sibling;var g=v(r,d,m.value,c);if(null===g){null===d&&(d=h);break}e&&d&&null===g.alternate&&t(r,d),o=a(g,o,p),null===f?s=g:f.sibling=g,f=g,d=h}if(m.done)return n(r,d),s;if(null===d){for(;!m.done;p++,m=l.next())null!==(m=y(r,m.value,c))&&(o=a(m,o,p),null===f?s=m:f.sibling=m,f=m);return s}for(d=i(r,d);!m.done;p++,m=l.next())null!==(m=b(d,r,p,m.value,c))&&(e&&null!==m.alternate&&d.delete(null===m.key?p:m.key),o=a(m,o,p),null===f?s=m:f.sibling=m,f=m);return e&&d.forEach((function(e){return t(r,e)})),s}return function(e,i,a,c){var s="object"===r(a)&&null!==a&&a.type===p&&null===a.key;s&&(a=a.props.children);var h="object"===r(a)&&null!==a;if(h)switch(a.$$typeof){case f:e:{for(h=a.key,s=i;null!==s;){if(s.key===h){if(7===s.tag?a.type===p:s.elementType===a.type){n(e,s.sibling),(i=o(s,a.type===p?a.props.children:a.props)).ref=Gt(e,s,a),i.return=e,e=i;break e}n(e,s);break}t(e,s),s=s.sibling}a.type===p?((i=Li(a.props.children,e.mode,c,a.key)).return=e,e=i):((c=Fi(a.type,a.key,a.props,null,e.mode,c)).ref=Gt(e,i,a),c.return=e,e=c)}return l(e);case d:e:{for(s=a.key;null!==i;){if(i.key===s){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),(i=o(i,a.children||[])).return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}(i=Hi(a,e.mode,c)).return=e,e=i}return l(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),(i=o(i,a)).return=e,e=i):(n(e,i),(i=Mi(a,e.mode,c)).return=e,e=i),l(e);if(Kt(a))return g(e,i,a,c);if(C(a))return k(e,i,a,c);if(h&&Yt(e,a),void 0===a&&!s)switch(e.tag){case 1:case 0:throw e=e.type,u(Error(152),e.displayName||e.name||"Component")}return n(e,i)}}var Jt=Xt(!0),Zt=Xt(!1),en={},tn={current:en},nn={current:en},rn={current:en};function on(e){if(e===en)throw u(Error(174));return e}function an(e,t){Ie(rn,t),Ie(nn,e),Ie(tn,en),t=R(t),Ne(tn),Ie(tn,t)}function ln(e){Ne(tn),Ne(nn),Ne(rn)}function un(e){var t=on(rn.current),n=on(tn.current);n!==(t=O(n,e.type,t))&&(Ie(nn,e),Ie(tn,t))}function cn(e){nn.current===e&&(Ne(tn),Ne(nn))}var sn={current:0};function fn(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function dn(e,t){return{responder:e,props:t}}var pn=c.ReactCurrentDispatcher,hn=0,mn=null,yn=null,vn=null,bn=null,gn=null,kn=null,wn=0,En=null,xn=0,Sn=!1,Cn=null,Tn=0;function Nn(){throw u(Error(321))}function In(e,t){if(null===t)return!1;for(var n=0;nwn&&(wn=f)):(bi(f,c.suspenseConfig),o=c.eagerReducer===e?c.eagerState:e(o,c.action)),a=c,c=c.next}while(null!==c&&c!==r);s||(l=a,i=o),ht(o,t.memoizedState)||(er=!0),t.memoizedState=o,t.baseUpdate=l,t.baseState=i,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function zn(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===En?(En={lastEffect:null}).lastEffect=e.next=e:null===(t=En.lastEffect)?En.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,En.lastEffect=e),e}function Fn(e,t,n,r){var i=An();xn|=e,i.memoizedState=zn(t,n,void 0,void 0===r?null:r)}function Ln(e,t,n,r){var i=Rn();r=void 0===r?null:r;var o=void 0;if(null!==yn){var a=yn.memoizedState;if(o=a.destroy,null!==r&&In(r,a.deps))return void zn(0,n,o,r)}xn|=e,i.memoizedState=zn(t,n,o,r)}function Mn(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Hn(){}function Un(e,t,n){if(!(25>Tn))throw u(Error(301));var r=e.alternate;if(e===mn||null!==r&&r===mn)if(Sn=!0,e={expirationTime:hn,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Cn&&(Cn=new Map),void 0===(n=Cn.get(t)))Cn.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=ci(),o=Ut.suspense;o={expirationTime:i=si(i,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var a=t.last;if(null===a)o.next=o;else{var l=a.next;null!==l&&(o.next=l),a.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var c=t.lastRenderedState,s=r(c,n);if(o.eagerReducer=r,o.eagerState=s,ht(s,c))return}catch(e){}di(e,i)}}var Dn={readContext:Nt,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useResponder:Nn},Wn={readContext:Nt,useCallback:function(e,t){return An().memoizedState=[e,void 0===t?null:t],e},useContext:Nt,useEffect:function(e,t){return Fn(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fn(4,36,Mn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fn(4,36,e,t)},useMemo:function(e,t){var n=An();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=An();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Un.bind(null,mn,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},An().memoizedState=e},useState:function(e){var t=An();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:On,lastRenderedState:e}).dispatch=Un.bind(null,mn,e),[t.memoizedState,e]},useDebugValue:Hn,useResponder:dn},Vn={readContext:Nt,useCallback:function(e,t){var n=Rn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&In(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Nt,useEffect:function(e,t){return Ln(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ln(4,36,Mn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ln(4,36,e,t)},useMemo:function(e,t){var n=Rn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&In(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:jn,useRef:function(){return Rn().memoizedState},useState:function(e){return jn(On)},useDebugValue:Hn,useResponder:dn},Bn=null,qn=null,$n=!1;function Qn(e,t){var n=Oi(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Kn(e,t){switch(e.tag){case 5:return null!==(t=ve(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=be(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function Gn(e){if($n){var t=qn;if(t){var n=t;if(!Kn(e,t)){if(!(t=ge(n))||!Kn(e,t))return e.effectTag|=2,$n=!1,void(Bn=e);Qn(Bn,n)}Bn=e,qn=ke(t)}else e.effectTag|=2,$n=!1,Bn=e}}function Yn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;Bn=e}function Xn(e){if(!G||e!==Bn)return!1;if(!$n)return Yn(e),$n=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!U(t,e.memoizedProps))for(t=qn;t;)Qn(e,t),t=ge(t);return Yn(e),qn=Bn?ge(e.stateNode):null,!0}function Jn(){G&&(qn=Bn=null,$n=!1)}var Zn=c.ReactCurrentOwner,er=!1;function tr(e,t,n,r){t.child=null===e?Zt(t,null,n,r):Jt(t,e.child,n,r)}function nr(e,t,n,r,i){n=n.render;var o=t.ref;return Tt(t,i),r=Pn(e,t,n,r,o,i),null===e||er?(t.effectTag|=1,tr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),hr(e,t,i))}function rr(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||ji(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Fi(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ir(e,t,a,r,i,o))}return a=e.child,it)&&oi.set(e,t))}}function pi(e,t){e.expirationTimei.firstPendingTime&&(i.firstPendingTime=t),0===(e=i.lastPendingTime)||t component higher in the tree to provide a loading indicator or placeholder to display."+Se(s))}4!==qr&&(qr=1),f=Er(f,s),s=c;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=d,jt(s,d=Fr(s,f,d));break e;case 1:if(p=f,l=s.type,c=s.stateNode,0==(64&s.effectTag)&&("function"==typeof l.getDerivedStateFromError||null!==c&&"function"==typeof c.componentDidCatch&&(null===ei||!ei.has(c)))){s.effectTag|=2048,s.expirationTime=d,jt(s,d=Lr(s,p,d));break e}}s=s.return}while(null!==s)}Vr=ki(a)}if(Dr=i,Et(),Hr.current=o,null!==Vr)return vi.bind(null,e,t)}if(e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,function(e,t){var n=e.firstBatch;return!!(null!==n&&n._defer&&n._expirationTime>=t)&&(ct(97,(function(){return n._onComplete(),null})),!0)}(e,t))return null;switch(Wr=null,qr){case 0:throw u(Error(328));case 1:return(i=e.lastPendingTime)(n=(i=ot())-n)&&(n=0),(t=10*(1073741821-t)-i)<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Mr(n/1960))-n)&&(n=t)),10=(t=0|(o=Kr).busyMinDurationMs)?t=0:(n=0|o.busyDelayMs,t=(i=ot()-(10*(1073741821-i)-(0|o.timeoutMs||5e3)))<=n?0:n+t-i),10i.tailExpiration&&1r&&(r=o),(a=i.childExpirationTime)>r&&(r=a),i=i.sibling;n.childExpirationTime=r}if(null!==t)return t;null!==e&&0==(1024&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Vr.firstEffect),null!==Vr.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Vr.firstEffect),e.lastEffect=Vr.lastEffect),1i?o:i,e.firstPendingTime=i,i=n?fr(e,t,n):(Ie(sn,1&sn.current),null!==(t=hr(e,t,n))?t.sibling:null);Ie(sn,1&sn.current);break;case 19:if(i=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(i)return pr(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),Ie(sn,sn.current),!i)return null}return hr(e,t,n)}}else er=!1;switch(t.expirationTime=0,t.tag){case 2:if(i=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=Oe(t,_e.current),Tt(t,n),o=Pn(null,t,i,e,o,n),t.effectTag|=1,"object"===r(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,_n(),je(i)){var a=!0;He(t)}else a=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var l=i.getDerivedStateFromProps;"function"==typeof l&&Wt(t,i,l,e),o.updater=Vt,t.stateNode=o,o._reactInternalFiber=t,Qt(t,i,e,n),t=ur(null,t,i,!0,a,n)}else t.tag=0,tr(null,t,o,n),t=t.child;return t;case 16:switch(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(o),t.type=o,a=t.tag=function(e){if("function"==typeof e)return ji(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===E)return 14}return 2}(o),e=vt(o,e),a){case 0:t=ar(null,t,o,e,n);break;case 1:t=lr(null,t,o,e,n);break;case 11:t=nr(null,t,o,e,n);break;case 14:t=rr(null,t,o,vt(o.type,e),i,n);break;default:throw u(Error(306),o,"")}return t;case 0:return i=t.type,o=t.pendingProps,ar(e,t,i,o=t.elementType===i?o:vt(i,o),n);case 1:return i=t.type,o=t.pendingProps,lr(e,t,i,o=t.elementType===i?o:vt(i,o),n);case 3:if(cr(t),null===(i=t.updateQueue))throw u(Error(282));return o=null!==(o=t.memoizedState)?o.element:null,Lt(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(Jn(),t=hr(e,t,n)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(G?(qn=ke(t.stateNode.containerInfo),Bn=t,o=$n=!0):o=!1),o?(t.effectTag|=2,t.child=Zt(t,null,i,n)):(tr(e,t,i,n),Jn()),t=t.child),t;case 5:return un(t),null===e&&Gn(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,l=o.children,U(i,o)?l=null:null!==a&&U(i,a)&&(t.effectTag|=16),or(e,t),4&t.mode&&1!==n&&D(i,o)?(t.expirationTime=t.childExpirationTime=1,t=null):(tr(e,t,l,n),t=t.child),t;case 6:return null===e&&Gn(t),null;case 13:return fr(e,t,n);case 4:return an(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Jt(t,null,i,n):tr(e,t,i,n),t.child;case 11:return i=t.type,o=t.pendingProps,nr(e,t,i,o=t.elementType===i?o:vt(i,o),n);case 7:return tr(e,t,t.pendingProps,n),t.child;case 8:case 12:return tr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,l=t.memoizedProps,xt(t,a=o.value),null!==l){var c=l.value;if(0===(a=ht(c,a)?0:0|("function"==typeof i._calculateChangedBits?i._calculateChangedBits(c,a):1073741823))){if(l.children===o.children&&!Ae.current){t=hr(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var s=c.dependencies;if(null!==s){l=c.child;for(var f=s.firstContext;null!==f;){if(f.context===i&&0!=(f.observedBits&a)){1===c.tag&&((f=At(n,null)).tag=2,Ot(c,f)),c.expirationTime--u||o[l]!==a[u])return"\n"+o[l].replace(" at new "," at ")}while(1<=l&&0<=u);break}}}finally{Ke=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Qe(e):""}var Ye=[],Xe=-1;function Je(e){return{current:e}}function Ze(e){0>Xe||(e.current=Ye[Xe],Ye[Xe]=null,Xe--)}function et(e,t){Xe++,Ye[Xe]=e.current,e.current=t}var tt={},nt=Je(tt),rt=Je(!1),it=tt;function ot(e,t){var n=e.type.contextTypes;if(!n)return tt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function at(e){return null!=(e=e.childContextTypes)}function lt(){Ze(rt),Ze(nt)}function ut(e,t,n){if(nt.current!==tt)throw Error(u(168));et(nt,t),et(rt,n)}function st(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(u(108,_(t)||"Unknown",i));return o({},n,r)}function ct(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tt,it=nt.current,et(nt,e),et(rt,rt.current),!0}function ft(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=st(e,t,it),r.__reactInternalMemoizedMergedChildContext=e,Ze(rt),Ze(nt),et(nt,e)):Ze(rt),et(rt,n)}var dt=null,pt=null;(0,l.unstable_now)();var ht=0,mt=8;function vt(e){if(0!=(1&e))return mt=15,1;if(0!=(2&e))return mt=14,2;if(0!=(4&e))return mt=13,4;var t=24&e;return 0!==t?(mt=12,t):0!=(32&e)?(mt=11,32):0!==(t=192&e)?(mt=10,t):0!=(256&e)?(mt=9,256):0!==(t=3584&e)?(mt=8,t):0!=(4096&e)?(mt=7,4096):0!==(t=4186112&e)?(mt=6,t):0!==(t=62914560&e)?(mt=5,t):67108864&e?(mt=4,67108864):0!=(134217728&e)?(mt=3,134217728):0!==(t=805306368&e)?(mt=2,t):0!=(1073741824&e)?(mt=1,1073741824):(mt=8,e)}function yt(e,t){var n=e.pendingLanes;if(0===n)return mt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,i=mt=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=vt(u),i=mt):0!==(l&=o)&&(r=vt(l),i=mt)}else 0!==(o=n&~a)?(r=vt(o),i=mt):0!==l&&(r=vt(l),i=mt);if(0===r)return 0;if(r=n&((0>(r=31-Et(r))?0:1<n;n++)t.push(e);return t}function St(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Et(t)]=n}var Et=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(xt(e)/Ct|0)|0},xt=Math.log,Ct=Math.LN2;var Nt=l.unstable_runWithPriority,It=l.unstable_scheduleCallback,Pt=l.unstable_cancelCallback,_t=l.unstable_shouldYield,At=l.unstable_requestPaint,Rt=l.unstable_now,Lt=l.unstable_getCurrentPriorityLevel,Ot=l.unstable_ImmediatePriority,zt=l.unstable_UserBlockingPriority,Tt=l.unstable_NormalPriority,jt=l.unstable_LowPriority,Ft=l.unstable_IdlePriority,Mt={},Ht=void 0!==At?At:function(){},Ut=null,Dt=null,Wt=!1,Bt=Rt(),Vt=1e4>Bt?Rt:function(){return Rt()-Bt};function $t(){switch(Lt()){case Ot:return 99;case zt:return 98;case Tt:return 97;case jt:return 96;case Ft:return 95;default:throw Error(u(332))}}function qt(e){switch(e){case 99:return Ot;case 98:return zt;case 97:return Tt;case 96:return jt;case 95:return Ft;default:throw Error(u(332))}}function Qt(e,t){return e=qt(e),Nt(e,t)}function Kt(e,t,n){return e=qt(e),It(e,t,n)}function Gt(){if(null!==Dt){var e=Dt;Dt=null,Pt(e)}Yt()}function Yt(){if(!Wt&&null!==Ut){Wt=!0;var e=0;try{var t=Ut;Qt(99,(function(){for(;ed?(p=f,f=null):p=f.sibling;var h=y(t,f,l[d],u);if(null===h){null===f&&(f=p);break}e&&f&&null===h.alternate&&n(t,f),o=a(h,o,d),null===c?s=h:c.sibling=h,c=h,f=p}if(d===l.length)return r(t,f),s;if(null===f){for(;dp?(h=d,d=null):h=d.sibling;var b=y(t,d,m.value,s);if(null===b){null===d&&(d=h);break}e&&d&&null===b.alternate&&n(t,d),o=a(b,o,p),null===f?c=b:f.sibling=b,f=b,d=h}if(m.done)return r(t,d),c;if(null===d){for(;!m.done;p++,m=l.next())null!==(m=v(t,m.value,s))&&(o=a(m,o,p),null===f?c=m:f.sibling=m,f=m);return c}for(d=i(t,d);!m.done;p++,m=l.next())null!==(m=g(d,t,p,m.value,s))&&(e&&null!==m.alternate&&d.delete(null===m.key?p:m.key),o=a(m,o,p),null===f?c=m:f.sibling=m,f=m);return e&&d.forEach((function(e){return n(t,e)})),c}return function(e,i,a,s){var p="object"===t(a)&&null!==a&&a.type===d&&null===a.key;p&&(a=a.props.children);var h="object"===t(a)&&null!==a;if(h)switch(a.$$typeof){case c:e:{for(h=a.key,p=i;null!==p;){if(p.key===h){switch(p.tag){case 7:if(a.type===d){r(e,p.sibling),(i=o(p,a.props.children)).return=e,e=i;break e}break;default:if(p.elementType===a.type){r(e,p.sibling),(i=o(p,a.props)).ref=An(e,p,a),i.return=e,e=i;break e}}r(e,p);break}n(e,p),p=p.sibling}a.type===d?((i=xa(a.props.children,e.mode,s,a.key)).return=e,e=i):((s=Ea(a.type,a.key,a.props,null,e.mode,s)).ref=An(e,i,a),s.return=e,e=s)}return l(e);case f:e:{for(p=a.key;null!==i;){if(i.key===p){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(e,i.sibling),(i=o(i,a.children||[])).return=e,e=i;break e}r(e,i);break}n(e,i),i=i.sibling}(i=Ia(a,e.mode,s)).return=e,e=i}return l(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==i&&6===i.tag?(r(e,i.sibling),(i=o(i,a)).return=e,e=i):(r(e,i),(i=Na(a,e.mode,s)).return=e,e=i),l(e);if(_n(a))return b(e,i,a,s);if(P(a))return k(e,i,a,s);if(h&&Rn(e,a),void 0===a&&!p)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(u(152,_(e.type)||"Component"))}return r(e,i)}}var On=Ln(!0),zn=Ln(!1),Tn={},jn=Je(Tn),Fn=Je(Tn),Mn=Je(Tn);function Hn(e){if(e===Tn)throw Error(u(174));return e}function Un(e,t){et(Mn,t),et(Fn,e),et(jn,Tn),e=F(t),Ze(jn),et(jn,e)}function Dn(){Ze(jn),Ze(Fn),Ze(Mn)}function Wn(e){var t=Hn(Mn.current),n=Hn(jn.current);n!==(t=M(n,e.type,t))&&(et(Fn,e),et(jn,t))}function Bn(e){Fn.current===e&&(Ze(jn),Ze(Fn))}var Vn=Je(0);function $n(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Me(n)||He(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var qn=null,Qn=null,Kn=!1;function Gn(e,t){var n=ka(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Yn(e,t){switch(e.tag){case 5:return null!==(t=je(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=Fe(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function Xn(e){if(Kn){var t=Qn;if(t){var n=t;if(!Yn(e,t)){if(!(t=Ue(n))||!Yn(e,t))return e.flags=-1025&e.flags|2,Kn=!1,void(qn=e);Gn(qn,n)}qn=e,Qn=De(t)}else e.flags=-1025&e.flags|2,Kn=!1,qn=e}}function Jn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;qn=e}function Zn(e){if(!Z||e!==qn)return!1;if(!Kn)return Jn(e),Kn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$(t,e.memoizedProps))for(t=Qn;t;)Gn(e,t),t=Ue(t);if(Jn(e),13===e.tag){if(!Z)throw Error(u(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(u(317));Qn=Ve(e)}else Qn=qn?Ue(e.stateNode):null;return!0}function er(){Z&&(Qn=qn=null,Kn=!1)}var tr=[];function nr(){for(var e=0;eo))throw Error(u(301));o+=1,ur=lr=null,t.updateQueue=null,rr.current=Dr,e=n(r,i)}while(cr)}if(rr.current=Mr,t=null!==lr&&null!==lr.next,or=0,ur=lr=ar=null,sr=!1,t)throw Error(u(300));return e}function hr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ur?ar.memoizedState=ur=e:ur=ur.next=e,ur}function mr(){if(null===lr){var e=ar.alternate;e=null!==e?e.memoizedState:null}else e=lr.next;var t=null===ur?ar.memoizedState:ur.next;if(null!==t)ur=t,lr=e;else{if(null===e)throw Error(u(310));e={memoizedState:(lr=e).memoizedState,baseState:lr.baseState,baseQueue:lr.baseQueue,queue:lr.queue,next:null},null===ur?ar.memoizedState=ur=e:ur=ur.next=e}return ur}function vr(e,t){return"function"==typeof t?t(e):t}function yr(e){var t=mr(),n=t.queue;if(null===n)throw Error(u(311));n.lastRenderedReducer=e;var r=lr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=a=o=null,s=i;do{var c=s.lane;if((or&c)===c)null!==l&&(l=l.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===l?(a=l=f,o=r):l=l.next=f,ar.lanes|=c,so|=c}s=s.next}while(null!==s&&s!==i);null===l?o=r:l.next=a,Jt(r,t.memoizedState)||(Br=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function gr(e){var t=mr(),n=t.queue;if(null===n)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Jt(o,t.memoizedState)||(Br=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function br(e,t,n){var r=t._getVersion;r=r(t._source);var i=Y?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(or&e)===e)&&(Y?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,tr.push(t))),e)return n(t._source);throw tr.push(t),Error(u(350))}function kr(e,t,n,r){var i=to;if(null===i)throw Error(u(349));var o=t._getVersion,a=o(t._source),l=rr.current,s=l.useState((function(){return br(i,t,n)})),c=s[1],f=s[0];s=ur;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,m=d.source;d=d.subscribe;var v=ar;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!Jt(a,e)){e=n(t._source),Jt(f,e)||(c(e),e=jo(v),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,l=e;0n?98:n,(function(){e(!0)})),Qt(97mo&&(t.flags|=64,i=!0,hi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=$n(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),hi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!Kn)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vt()-r.renderingStartTime>mo&&1073741824!==n&&(t.flags|=64,i=!0,hi(r,!1),t.lanes=33554432);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vt(),e.sibling=null,t=Vn.current,et(Vn,i?1&t|2:1&t),e):null;case 23:case 24:return qo(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(u(156,t.tag))}function vi(e){switch(e.tag){case 1:at(e.type)&<();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Dn(),Ze(rt),Ze(nt),nr(),0!=(64&(t=e.flags)))throw Error(u(285));return e.flags=-4097&t|64,e;case 5:return Bn(e),null;case 13:return Ze(Vn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return Ze(Vn),null;case 4:return Dn(),null;case 10:return cn(e),null;case 23:case 24:return qo(),null;default:return null}}function yi(e,t){try{var n="",r=t;do{n+=tn(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function gi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi="function"==typeof WeakMap?WeakMap:Map;function ki(e,t,n){(n=yn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bo||(bo=!0,ko=r),gi(0,t)},n}function wi(e,t,n){(n=yn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return gi(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===wo?wo=new Set([this]):wo.add(this),gi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var Si="function"==typeof WeakSet?WeakSet:Set;function Ei(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){sa(e,t)}else t.current=null}function xi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:nn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(X&&256&t.flags&&Pe(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(u(163))}function Ci(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Ni(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(aa(n,e),oa(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:nn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&wn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=j(n.child.stateNode);break;case 1:e=n.child.stateNode}wn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ye(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:return;case 13:return void(Z&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&qe(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(u(163))}function Ii(e,t){if(X)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?xe(r):Ne(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?Ce(r):Ie(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Pi(e,t){if(pt&&"function"==typeof pt.onCommitFiberUnmount)try{pt.onCommitFiberUnmount(dt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))aa(t,n);else{r=t;try{i()}catch(e){sa(r,e)}}n=n.next}while(n!==e)}break;case 1:if(Ei(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){sa(t,e)}break;case 5:Ei(t);break;case 4:X?Oi(e,t):J&&J&&(t=t.stateNode.containerInfo,e=Ae(t),Oe(t,e))}}function _i(e,t){for(var n=t;;)if(Pi(e,n),null===n.child||X&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Ai(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Ri(e){return 5===e.tag||3===e.tag||4===e.tag}function Li(e){if(X){e:{for(var t=e.return;null!==t;){if(Ri(t))break e;t=t.return}throw Error(u(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(u(161))}16&n.flags&&(Ee(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ri(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?ke(r,t,n):me(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?be(r,t,n):he(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}}function Oi(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(u(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag)_i(e,i),r?Se(n,i.stateNode):we(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Pi(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function zi(e,t){if(X){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ci(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ge(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(u(162));return n=t.memoizedProps,void ve(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Z&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,$e(t.containerInfo))));case 12:return;case 13:return Ti(t),void ji(t);case 19:return void ji(t);case 17:return;case 23:case 24:return void Ii(t,null!==t.memoizedState)}throw Error(u(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ci(3,t);case 12:return;case 13:return Ti(t),void ji(t);case 19:return void ji(t);case 3:Z&&((n=t.stateNode).hydrate&&(n.hydrate=!1,$e(n.containerInfo)));break;case 23:case 24:return}e:if(J){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,Oe(t.containerInfo,t.pendingChildren);break e}throw Error(u(163))}}function Ti(e){null!==e.memoizedState&&(ho=Vt(),X&&Ii(e.child,!0))}function ji(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Si),t.forEach((function(t){var r=fa.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Fi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Mi=0,Hi=1,Ui=2,Di=3,Wi=4;if("function"==typeof Symbol&&Symbol.for){var Bi=Symbol.for;Mi=Bi("selector.component"),Hi=Bi("selector.has_pseudo_class"),Ui=Bi("selector.role"),Di=Bi("selector.test_id"),Wi=Bi("selector.text")}function Vi(e){var t=ee(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(u(364));return t}if(null===(e=le(e)))throw Error(u(362));return e.stateNode.current}function $i(e,t){switch(t.$$typeof){case Mi:if(e.type===t.value)return!0;break;case Hi:e:{t=t.value,e=[e,0];for(var n=0;n";case Hi:return":has("+(qi(e)||"")+")";case Ui:return'[role="'+e.value+'"]';case Wi:return'"'+e.value+'"';case Di:return'[data-testname="'+e.value+'"]';default:throw Error(u(365,e))}}function Qi(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Vt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Yi(n/1960))-n)){e.timeoutHandle=Q(ta.bind(null,e),n);break}ta(e);break;case 5:ta(e);break;default:throw Error(u(329))}}return Ho(e,Vt()),e.callbackNode===t?Uo.bind(null,e):null}function Do(e,t){for(t&=~fo,t&=~co,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==ao&&(ao=2),s=yi(s,u),p=l;do{switch(p.tag){case 3:a=s,p.flags|=4096,n&=-n,p.lanes|=n,bn(p,ki(0,a,n));break e;case 1:a=s;var S=p.type,E=p.stateNode;if(0==(64&p.flags)&&("function"==typeof S.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===wo||!wo.has(E)))){p.flags|=4096,n&=-n,p.lanes|=n,bn(p,wi(p,a,n));break e}}p=p.return}while(null!==p)}ea(r)}catch(e){n=e,no===r&&null!==r&&(no=r=r.return);continue}break}}function Go(){var e=Xi.current;return Xi.current=Mr,null===e?Mr:e}function Yo(e,t){var n=eo;eo|=16;var r=Go();for(to===e&&ro===t||Qo(e,t);;)try{Xo();break}catch(t){Ko(e,t)}if(un(),eo=n,Xi.current=r,null!==no)throw Error(u(261));return to=null,ro=0,ao}function Xo(){for(;null!==no;)Zo(no)}function Jo(){for(;null!==no&&!_t();)Zo(no)}function Zo(e){var t=yo(e.alternate,e,io);e.memoizedProps=e.pendingProps,null===t?ea(e):no=t,Ji.current=null}function ea(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=mi(n,t,io)))return void(no=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&io)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1Vt()-ho?Qo(e,0):fo|=n),Ho(e,t)}function fa(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===$t()?1:2:(0===Ro&&(Ro=uo),0===(t=kt(62914560&~Ro))&&(t=4194304))),n=To(),null!==(e=Mo(e,t))&&(St(e,t,n),Ho(e,n))}yo=function(e,n,r){var i=n.lanes;if(null!==e)if(e.memoizedProps!==n.pendingProps||rt.current)Br=!0;else{if(0==(r&i)){switch(Br=!1,n.tag){case 3:Zr(n),er();break;case 5:Wn(n);break;case 1:at(n.type)&&ct(n);break;case 4:Un(n,n.stateNode.containerInfo);break;case 10:sn(n,n.memoizedProps.value);break;case 13:if(null!==n.memoizedState)return 0!=(r&n.child.childLanes)?oi(e,n,r):(et(Vn,1&Vn.current),null!==(n=di(e,n,r))?n.sibling:null);et(Vn,1&Vn.current);break;case 19:if(i=0!=(r&n.childLanes),0!=(64&e.flags)){if(i)return fi(e,n,r);n.flags|=64}var o=n.memoizedState;if(null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null),et(Vn,Vn.current),i)break;return null;case 23:case 24:return n.lanes=0,Kr(e,n,r)}return di(e,n,r)}Br=0!=(16384&e.flags)}else Br=!1;switch(n.lanes=0,n.tag){case 2:if(i=n.type,null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,o=ot(n,nt.current),dn(n,r),o=pr(null,n,i,e,o,r),n.flags|=1,"object"===t(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(n.tag=1,n.memoizedState=null,n.updateQueue=null,at(i)){var a=!0;ct(n)}else a=!1;n.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,mn(n);var l=i.getDerivedStateFromProps;"function"==typeof l&&En(n,i,l,e),o.updater=xn,n.stateNode=o,o._reactInternals=n,Pn(n,i,e,r),n=Jr(null,n,i,!0,a,r)}else n.tag=0,Vr(null,n,o,r),n=n.child;return n;case 16:o=n.elementType;e:{switch(null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,o=(a=o._init)(o._payload),n.type=o,a=n.tag=function(e){if("function"==typeof e)return wa(e)?1:0;if(null!=e){if((e=e.$$typeof)===y)return 11;if(e===k)return 14}return 2}(o),e=nn(o,e),a){case 0:n=Yr(null,n,o,e,r);break e;case 1:n=Xr(null,n,o,e,r);break e;case 11:n=$r(null,n,o,e,r);break e;case 14:n=qr(null,n,o,nn(o.type,e),i,r);break e}throw Error(u(306,o,""))}return n;case 0:return i=n.type,o=n.pendingProps,Yr(e,n,i,o=n.elementType===i?o:nn(i,o),r);case 1:return i=n.type,o=n.pendingProps,Xr(e,n,i,o=n.elementType===i?o:nn(i,o),r);case 3:if(Zr(n),i=n.updateQueue,null===e||null===i)throw Error(u(282));if(i=n.pendingProps,o=null!==(o=n.memoizedState)?o.element:null,vn(e,n),kn(n,i,null,r),(i=n.memoizedState.element)===o)er(),n=di(e,n,r);else{if((a=(o=n.stateNode).hydrate)&&(Z?(Qn=De(n.stateNode.containerInfo),qn=n,a=Kn=!0):a=!1),a){if(Z&&null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o=c&&o>=d&&i<=f&&a<=p){e.splice(t,1);break}if(!(r!==c||n.width!==s.width||pa)){d>o&&(s.height+=d-o,s.y=o),pi)){c>r&&(s.width+=c-r,s.x=r),fn&&(n=a)),a ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},i.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return j(e.child.stateNode);default:return e.child.stateNode}},i.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:La,findFiberByHostInstance:e.findFiberByHostInstance||Oa,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{dt=t.inject(e),pt=t}catch(e){}e=!0}return e},i.observeVisibleRects=function(e,t,n,r){if(!ae)throw Error(u(363));e=Ki(e,t);var i=pe(e,n,r).disconnect;return{disconnect:function(){i()}}},i.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},i.runWithPriority=function(e,t){var n=ht;try{return ht=e,t()}finally{ht=n}},i.shouldSuspend=function(){return!1},i.unbatchedUpdates=function(e,t){var n=eo;eo&=-2,eo|=8;try{return e(t)}finally{0===(eo=n)&&(vo(),Gt())}},i.updateContainer=function(e,t,n,r){var i=t.current,o=To(),a=jo(i);e:if(n){t:{if(A(n=n._reactInternals)!==n||1!==n.tag)throw Error(u(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(at(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(u(171))}if(1===n.tag){var s=n.type;if(at(s)){n=st(n,s,l);break e}}n=l}else n=tt;return null===t.context?t.context=n:t.pendingContext=n,(t=yn(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),gn(i,t),Fo(i,a,o),a},i}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/react-reconciler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react-reconciler/cjs/react-reconciler.production.min.js")},"./node_modules/react/cjs/react.production.min.js":function(e,t,n){"use strict"; /** @license React v16.14.0 * react.production.min.js * @@ -41,12 +41,12 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */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)}var i=n("./node_modules/object-assign/index.js"),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,l=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nA.length&&A.push(e)}function j(e,t,n){return null==e?0:function e(t,n,i,o){var u=r(t);"undefined"!==u&&"boolean"!==u||(t=null);var c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case a:case l:c=!0}}if(c)return i(o,t,""===n?"."+z(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sR.length&&R.push(e)}function z(e,t,n){return null==e?0:function e(t,n,i,o){var u=r(t);"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case a:case l:s=!0}}if(s)return i(o,t,""===n?"."+T(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c=x},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0P(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var _=[],A=[],R=1,O=null,j=3,z=!1,F=!1,L=!1;function M(e){for(var t=N(A);null!==t;){if(null===t.callback)I(A);else{if(!(t.startTime<=e))break;I(A),t.sortIndex=t.expirationTime,T(_,t)}t=N(A)}}function H(e){if(L=!1,M(e),!F)if(null!==N(_))F=!0,i(U);else{var t=N(A);null!==t&&o(H,t.startTime-e)}}function U(e,n){F=!1,L&&(L=!1,a()),z=!0;var r=j;try{for(M(n),O=N(_);null!==O&&(!(O.expirationTime>n)||e&&!l());){var i=O.callback;if(null!==i){O.callback=null,j=O.priorityLevel;var u=i(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?O.callback=u:O===N(_)&&I(_),M(n)}else I(_);O=N(_)}if(null!==O)var c=!0;else{var s=N(A);null!==s&&o(H,s.startTime-n),c=!1}return c}finally{O=null,j=r,z=!1}}function D(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=u;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||z||(F=!0,i(U))},t.unstable_getCurrentPriorityLevel=function(){return j},t.unstable_getFirstCallbackNode=function(){return N(_)},t.unstable_next=function(e){switch(j){case 1:case 2:case 3:var t=3;break;default:t=j}var n=j;j=t;try{return e()}finally{j=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=W,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=j;j=e;try{return t()}finally{j=n}},t.unstable_scheduleCallback=function(e,n,l){var u=t.unstable_now();if("object"===r(l)&&null!==l){var c=l.delay;c="number"==typeof c&&0u?(e.sortIndex=c,T(A,e),null===N(_)&&e===N(A)&&(L?a():L=!0,o(H,c-u))):(e.sortIndex=l,T(_,e),F||z||(F=!0,i(U))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var n=N(_);return n!==O&&null!==O&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime=w},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0I(a,n))void 0!==u&&0>I(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>I(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function I(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],_=[],A=1,R=null,L=3,O=!1,z=!1,T=!1;function j(e){for(var t=C(_);null!==t;){if(null===t.callback)N(_);else{if(!(t.startTime<=e))break;N(_),t.sortIndex=t.expirationTime,x(P,t)}t=C(_)}}function F(e){if(T=!1,j(e),!z)if(null!==C(P))z=!0,i(M);else{var t=C(_);null!==t&&o(F,t.startTime-e)}}function M(e,n){z=!1,T&&(T=!1,a()),O=!0;var r=L;try{for(j(n),R=C(P);null!==R&&(!(R.expirationTime>n)||e&&!t.unstable_shouldYield());){var i=R.callback;if("function"==typeof i){R.callback=null,L=R.priorityLevel;var l=i(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?R.callback=l:R===C(P)&&N(P),j(n)}else N(P);R=C(P)}if(null!==R)var u=!0;else{var s=C(_);null!==s&&o(F,s.startTime-n),u=!1}return u}finally{R=null,L=r,O=!1}}var H=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){z||O||(z=!0,i(M))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return C(P)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=H,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,n,l){var u=t.unstable_now();switch("object"===r(l)&&null!==l?l="number"==typeof(l=l.delay)&&0u?(e.sortIndex=l,x(_,e),null===C(P)&&e===C(_)&&(T?a():T=!0,o(F,l-u))):(e.sortIndex=s,x(P,e),z||O||(z=!0,i(M))),e},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},"./node_modules/scheduler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/scheduler/cjs/scheduler.production.min.js")},"./node_modules/webpack/buildin/global.js":function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./scripts/vendor.js":function(e,t,n){n("../../packages/hippy-react/dist/index.js")},0:function(e,t,n){e.exports=n}}); \ No newline at end of file diff --git a/packages/hippy-react/src/dom/element-node.ts b/packages/hippy-react/src/dom/element-node.ts index 0f97d6bdcc9..5f68fb2e19b 100644 --- a/packages/hippy-react/src/dom/element-node.ts +++ b/packages/hippy-react/src/dom/element-node.ts @@ -175,6 +175,24 @@ function parseBackgroundImage(styleKey: string, styleValue: string, style: any) return style; } +/** + * parse text shadow offset + * @param styleKey + * @param styleValue + * @param style + */ +function parseTextShadowOffset(styleKey: string, styleValue: number, style: any) { + const offsetMap: PropertiesMap = { + textShadowOffsetX: 'width', + textShadowOffsetY: 'height', + }; + style.textShadowOffset = style.textShadowOffset || {}; + Object.assign(style.textShadowOffset, { + [offsetMap[styleKey]]: styleValue || 0, + }); + return style; +} + class ElementNode extends ViewNode { tagName: string; @@ -310,6 +328,11 @@ class ElementNode extends ViewNode { (this.style as any)[styleKey] = colorParse((styleValue as Color)); } else if (styleKey === 'backgroundImage' && styleValue) { this.style = parseBackgroundImage(styleKey, styleValue, this.style); + } else if (styleKey === 'textShadowOffset') { + const { x = 0, width = 0, y = 0, height = 0 } = styleValue || {}; + (this.style as any)[styleKey] = { width: x || width, height: y || height }; + } else if (['textShadowOffsetX', 'textShadowOffsetY'].indexOf(styleKey) >= 0) { + this.style = parseTextShadowOffset(styleKey as string, styleValue as number, this.style); } else { (this.style as any)[styleKey] = styleValue; } diff --git a/packages/hippy-vue-css-loader/src/css-parser.js b/packages/hippy-vue-css-loader/src/css-parser.js index 9a987b43cd8..ffbb364b40a 100644 --- a/packages/hippy-vue-css-loader/src/css-parser.js +++ b/packages/hippy-vue-css-loader/src/css-parser.js @@ -481,6 +481,21 @@ function parseCSS(css, options) { case 'fontWeight': // Keep string and going on. break; + case 'textShadowOffset': { + const pos = value.split(' ') + .filter(v => v) + .map(v => convertPxUnitToPt(v)); + const [width] = pos; + let [, height] = pos; + if (!height) { + height = width; + } + value = { + width, + height, + }; + break; + } case 'shadowOffset': { const pos = value.split(' ') .filter(v => v) diff --git a/packages/hippy-vue/src/elements/__tests__/index.test.js b/packages/hippy-vue/src/elements/__tests__/index.test.js index 3cf1918c326..8e81eb87341 100644 --- a/packages/hippy-vue/src/elements/__tests__/index.test.js +++ b/packages/hippy-vue/src/elements/__tests__/index.test.js @@ -86,10 +86,7 @@ test('registerElement with mustUseProp', (t) => { name: 'Test', }, mustUseProp(attr) { - if (attr === 'testAttr') { - return true; - } - return false; + return attr === 'testAttr'; }, }); const viewMeta = elements.getViewMeta(elementName); diff --git a/packages/hippy-vue/src/elements/built-in.js b/packages/hippy-vue/src/elements/built-in.js index e0da4056323..ec5c3d0b6dc 100644 --- a/packages/hippy-vue/src/elements/built-in.js +++ b/packages/hippy-vue/src/elements/built-in.js @@ -24,6 +24,47 @@ const INPUT_VALUE_MAP = { search: 'web-search', }; +const accessibilityAttrMaps = { + role: 'accessibilityRole', + 'aria-label': 'accessibilityLabel', + 'aria-disabled': { + jointKey: 'accessibilityState', + name: 'disabled', + }, + 'aria-selected': { + jointKey: 'accessibilityState', + name: 'selected', + }, + 'aria-checked': { + jointKey: 'accessibilityState', + name: 'checked', + }, + 'aria-busy': { + jointKey: 'accessibilityState', + name: 'busy', + }, + 'aria-expanded': { + jointKey: 'accessibilityState', + name: 'expanded', + }, + 'aria-valuemin': { + jointKey: 'accessibilityValue', + name: 'min', + }, + 'aria-valuemax': { + jointKey: 'accessibilityValue', + name: 'max', + }, + 'aria-valuenow': { + jointKey: 'accessibilityValue', + name: 'now', + }, + 'aria-valuetext': { + jointKey: 'accessibilityValue', + name: 'text', + }, +}; + // View area const div = { symbol: components.View, @@ -36,6 +77,9 @@ const div = { ['touchend', 'onTouchEnd'], ['touchcancel', 'onTouchCancel'], ]), + attributeMaps: { + ...accessibilityAttrMaps, + }, processEventData(event, nativeEventName, nativeEventParams) { switch (nativeEventName) { case 'onScroll': @@ -115,6 +159,7 @@ const img = { src(value) { return convertImageLocalPath(value); }, + ...accessibilityAttrMaps, }, }, }; @@ -132,6 +177,9 @@ const ul = { return arrayCount(node.childNodes, childNode => !childNode.meta.skipAddToDom); }, }, + attributeMaps: { + ...accessibilityAttrMaps, + }, eventNamesMap: mapEvent('listReady', 'initialListReady'), processEventData(event, nativeEventName, nativeEventParams) { switch (nativeEventName) { @@ -153,6 +201,9 @@ const li = { symbol: components.ListViewItem, component: { name: NATIVE_COMPONENT_NAME_MAP[components.ListViewItem], + attributeMaps: { + ...accessibilityAttrMaps, + }, }, eventNamesMap: mapEvent([ ['disappear', (__PLATFORM__ === 'android' || Native.Platform === 'android') ? 'onDisAppear' : 'onDisappear'], @@ -223,6 +274,7 @@ const input = { }, value: 'defaultValue', maxlength: 'maxLength', + ...accessibilityAttrMaps, }, nativeProps: { numberOfLines: 1, diff --git a/packages/hippy-vue/src/renderer/__tests__/element-node.test.js b/packages/hippy-vue/src/renderer/__tests__/element-node.test.js index c8d635bbae3..de9a2cc321f 100644 --- a/packages/hippy-vue/src/renderer/__tests__/element-node.test.js +++ b/packages/hippy-vue/src/renderer/__tests__/element-node.test.js @@ -173,6 +173,15 @@ test('Element.setStyle test', (t) => { t.deepEqual(node.style.linearGradient, { angle: '10.12', colorStopList: [{ color: 4294901760 }, { color: 4294967040, ratio: 0.1 }, { color: 4278190335, ratio: 0.1 }] }); node.setStyle('backgroundImage', 'linear-gradient(10.12341234deg, rgba(55, 11, 43, 0.5) 5%, rgb(55, 13, 43) 10%, rgba(55, 11, 43, 0.1) 23%)'); t.deepEqual(node.style.linearGradient, { angle: '10.12', colorStopList: [{ ratio: 0.05, color: 2151090987 }, { ratio: 0.1, color: 4281797931 }, { ratio: 0.23, color: 439814955 }] }); + node.setStyle('textShadowRadius', 1); + t.deepEqual(node.style.textShadowRadius, 1); + node.setStyle('textShadowColor', '#abcdef'); + t.deepEqual(node.style.textShadowColor, 4289449455); + node.setStyle('textShadowOffsetX', 1); + node.setStyle('textShadowOffsetY', 2); + t.deepEqual(node.style.textShadowOffset, { width: 1, height: 2 }); + node.setStyle('textShadowOffset', { x: 10, y: 8 }); + node.setStyle('textShadowOffset', { width: 10, height: 8 }); }); test('Element.setStyle with pre-processed style test', (t) => { diff --git a/packages/hippy-vue/src/renderer/element-node.js b/packages/hippy-vue/src/renderer/element-node.js index 26070df00f8..1fa9cc77072 100644 --- a/packages/hippy-vue/src/renderer/element-node.js +++ b/packages/hippy-vue/src/renderer/element-node.js @@ -150,6 +150,30 @@ function parseBackgroundImage(property, value) { return [processedProperty, processedValue]; } +/** + * parse text shadow offset + * @param property + * @param value + * @param style + * @returns {(*|number)[]} + */ +function parseTextShadowOffset(property, value = 0, style) { + const offsetMap = { + textShadowOffsetX: 'width', + textShadowOffsetY: 'height', + }; + if (!style.textShadowOffset) { + style.textShadowOffset = { + [offsetMap[property]]: value, + }; + } else { + Object.assign(style.textShadowOffset, { + [offsetMap[property]]: value, + }); + } + return [property, value]; +} + class ElementNode extends ViewNode { constructor(tagName) { super(); @@ -317,6 +341,16 @@ class ElementNode extends ViewNode { [p, v] = parseBackgroundImage(p, v); break; } + case 'textShadowOffsetX': + case 'textShadowOffsetY': { + [p, v] = parseTextShadowOffset(p, v, this.style); + break; + } + case 'textShadowOffset': { + const { x = 0, width = 0, y = 0, height = 0 } = v || {}; + v = { width: x || width, height: y || height }; + break; + } default: { // Convert the property to W3C standard. if (Object.prototype.hasOwnProperty.call(PROPERTIES_MAP, p)) { diff --git a/packages/hippy-vue/src/renderer/native/__tests__/index.test.js b/packages/hippy-vue/src/renderer/native/__tests__/index.test.js index f394e091c50..609e33f6204 100644 --- a/packages/hippy-vue/src/renderer/native/__tests__/index.test.js +++ b/packages/hippy-vue/src/renderer/native/__tests__/index.test.js @@ -82,6 +82,17 @@ test('renderToNative test with children --debug mode', (t) => { const childNode6 = DocumentNode.createElement('textarea'); childNode6.setAttribute('rows', 10); childNode6.setAttribute('type', 'url'); + childNode6.setAttribute('role', 'back button'); + childNode6.setAttribute('aria-label', 'back to home'); + childNode6.setAttribute('aria-disabled', false); + childNode6.setAttribute('aria-selected', true); + childNode6.setAttribute('aria-checked', false); + childNode6.setAttribute('aria-busy', true); + childNode6.setAttribute('aria-expanded', false); + childNode6.setAttribute('aria-valuemin', 2); + childNode6.setAttribute('aria-valuemax', 10); + childNode6.setAttribute('aria-valuenow', 7); + childNode6.setAttribute('aria-valuetext', 'high'); childNode6.addEventListener('typing', () => {}); parentNode.appendChild(childNode1); parentNode.appendChild(childNode2); @@ -205,6 +216,32 @@ test('renderToNative test with children --debug mode', (t) => { id: '', rows: 10, type: 'url', + 'aria-busy': true, + 'aria-checked': false, + 'aria-disabled': false, + 'aria-expanded': false, + 'aria-label': 'back to home', + 'aria-selected': true, + 'aria-valuemax': 10, + 'aria-valuemin': 2, + 'aria-valuenow': 7, + 'aria-valuetext': 'high', + role: 'back button', + }, + accessibilityRole: 'back button', + accessibilityLabel: 'back to home', + accessibilityState: { + disabled: false, + selected: true, + checked: false, + busy: true, + expanded: false, + }, + accessibilityValue: { + now: 7, + min: 2, + max: 10, + text: 'high', }, multiline: true, onTyping: true, @@ -891,6 +928,108 @@ test('Image.setStyle(background-color) test --production mode', (t) => { }); }); +test('img with accessibility test --debug mode', (t) => { + process.env.NODE_ENV = 'test'; + const node = DocumentNode.createElement('img'); + node.setAttribute('role', 'back button'); + node.setAttribute('aria-label', 'back to home'); + node.setAttribute('aria-disabled', false); + node.setAttribute('aria-selected', true); + node.setAttribute('aria-checked', false); + node.setAttribute('aria-busy', true); + node.setAttribute('aria-expanded', false); + node.setAttribute('aria-valuemin', 2); + node.setAttribute('aria-valuemax', 10); + node.setAttribute('aria-valuenow', 7); + node.setAttribute('aria-valuetext', 'high'); + const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); + t.deepEqual(nativeLanguage, { + id: 56, + index: 0, + name: 'Image', + pId: 10, + props: { + attributes: { + class: '', + id: '', + 'aria-busy': true, + 'aria-checked': false, + 'aria-disabled': false, + 'aria-expanded': false, + 'aria-label': 'back to home', + 'aria-selected': true, + 'aria-valuemax': 10, + 'aria-valuemin': 2, + 'aria-valuenow': 7, + 'aria-valuetext': 'high', + role: 'back button', + }, + accessibilityRole: 'back button', + accessibilityLabel: 'back to home', + accessibilityState: { + disabled: false, + selected: true, + checked: false, + busy: true, + expanded: false, + }, + accessibilityValue: { + now: 7, + min: 2, + max: 10, + text: 'high', + }, + style: { + backgroundColor: 0, + }, + }, + tagName: 'img', + }); +}); + +test('img with accessibility test --production mode', (t) => { + process.env.NODE_ENV = 'production'; + const node = DocumentNode.createElement('img'); + node.setAttribute('role', 'back button'); + node.setAttribute('aria-label', 'back to home'); + node.setAttribute('aria-disabled', false); + node.setAttribute('aria-selected', true); + node.setAttribute('aria-checked', false); + node.setAttribute('aria-busy', true); + node.setAttribute('aria-expanded', false); + node.setAttribute('aria-valuemin', 2); + node.setAttribute('aria-valuemax', 10); + node.setAttribute('aria-valuenow', 7); + node.setAttribute('aria-valuetext', 'high'); + const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); + t.deepEqual(nativeLanguage, { + id: 57, + index: 0, + name: 'Image', + pId: 10, + props: { + accessibilityRole: 'back button', + accessibilityLabel: 'back to home', + accessibilityState: { + disabled: false, + selected: true, + checked: false, + busy: true, + expanded: false, + }, + accessibilityValue: { + now: 7, + min: 2, + max: 10, + text: 'high', + }, + style: { + backgroundColor: 0, + }, + }, + }); +}); + test('div with backgroundImage local path test --debug mode', (t) => { process.env.NODE_ENV = 'test'; const node = DocumentNode.createElement('div'); @@ -898,7 +1037,7 @@ test('div with backgroundImage local path test --debug mode', (t) => { node.setStyle('backgroundImage', originalPath); const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); t.deepEqual(nativeLanguage, { - id: 56, + id: 58, index: 0, name: 'View', pId: ROOT_VIEW_ID, @@ -922,7 +1061,7 @@ test('div with backgroundImage local path test --production mode', (t) => { node.setStyle('backgroundImage', originalPath); const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); t.deepEqual(nativeLanguage, { - id: 57, + id: 59, index: 0, name: 'View', pId: ROOT_VIEW_ID, @@ -933,3 +1072,101 @@ test('div with backgroundImage local path test --production mode', (t) => { }, }); }); + +test('div with accessibility test --debug mode', (t) => { + process.env.NODE_ENV = 'test'; + const node = DocumentNode.createElement('div'); + node.setAttribute('role', 'back button'); + node.setAttribute('aria-label', 'back to home'); + node.setAttribute('aria-disabled', false); + node.setAttribute('aria-selected', true); + node.setAttribute('aria-checked', false); + node.setAttribute('aria-busy', true); + node.setAttribute('aria-expanded', false); + node.setAttribute('aria-valuemin', 2); + node.setAttribute('aria-valuemax', 10); + node.setAttribute('aria-valuenow', 7); + node.setAttribute('aria-valuetext', 'high'); + const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); + t.deepEqual(nativeLanguage, { + id: 61, + index: 0, + name: 'View', + pId: ROOT_VIEW_ID, + props: { + attributes: { + class: '', + id: '', + 'aria-busy': true, + 'aria-checked': false, + 'aria-disabled': false, + 'aria-expanded': false, + 'aria-selected': true, + 'aria-label': 'back to home', + 'aria-valuemax': 10, + 'aria-valuemin': 2, + 'aria-valuenow': 7, + 'aria-valuetext': 'high', + role: 'back button', + }, + accessibilityRole: 'back button', + accessibilityLabel: 'back to home', + accessibilityState: { + disabled: false, + selected: true, + checked: false, + busy: true, + expanded: false, + }, + accessibilityValue: { + now: 7, + min: 2, + max: 10, + text: 'high', + }, + style: {}, + }, + tagName: 'div', + }); +}); + +test('div with accessibility test --production mode', (t) => { + process.env.NODE_ENV = 'production'; + const node = DocumentNode.createElement('div'); + node.setAttribute('role', 'back button'); + node.setAttribute('aria-label', 'back to home'); + node.setAttribute('aria-disabled', false); + node.setAttribute('aria-selected', true); + node.setAttribute('aria-checked', false); + node.setAttribute('aria-busy', true); + node.setAttribute('aria-expanded', false); + node.setAttribute('aria-valuemin', 2); + node.setAttribute('aria-valuemax', 10); + node.setAttribute('aria-valuenow', 7); + node.setAttribute('aria-valuetext', 'high'); + const nativeLanguage = renderToNative(ROOT_VIEW_ID, node); + t.deepEqual(nativeLanguage, { + id: 62, + index: 0, + name: 'View', + pId: ROOT_VIEW_ID, + props: { + accessibilityRole: 'back button', + accessibilityLabel: 'back to home', + accessibilityState: { + disabled: false, + selected: true, + checked: false, + busy: true, + expanded: false, + }, + accessibilityValue: { + now: 7, + min: 2, + max: 10, + text: 'high', + }, + style: {}, + }, + }); +}); diff --git a/packages/hippy-vue/src/renderer/native/index.js b/packages/hippy-vue/src/renderer/native/index.js index b480b2f84f3..1c6db7ac9ff 100644 --- a/packages/hippy-vue/src/renderer/native/index.js +++ b/packages/hippy-vue/src/renderer/native/index.js @@ -168,11 +168,7 @@ function getNativeProps(node) { let value = node.getAttribute(key); // No defined map - if (!node.meta.component.attributeMaps) { - props[key] = value; - return; - } - if (!node.meta.component.attributeMaps[key]) { + if (!node.meta.component.attributeMaps || !node.meta.component.attributeMaps[key]) { props[key] = value; return; } @@ -191,11 +187,24 @@ function getNativeProps(node) { } // Defined object map with value - const { name: propsKey, propsValue } = map; + const { name: propsKey, propsValue, jointKey } = map; if (isFunction(propsValue)) { value = propsValue(value); } - props[propsKey] = value; + // if jointKey set, multi attributes will be assigned to the same jointKey object + if (jointKey) { + if (props[jointKey] === undefined) { + props[jointKey] = { + [propsKey]: value, + }; + } else { + Object.assign(props[jointKey], { + [propsKey]: value, + }); + } + } else { + props[propsKey] = value; + } }); // Get the force props from meta, it's can't be override