diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dc19309ded..672c4dfe96a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + + +### Bug Fixes + +* **android:** color value in animation lose precision ([afff2a3](https://github.com/Tencent/Hippy/commit/afff2a339fda73f0dee60839215ff73aaccb35c0)) +* **Android:** Demo uses NoSnapshot by default ([1afa9d0](https://github.com/Tencent/Hippy/commit/1afa9d0fe608a2958800ac4f966067b551afe820)) +* **android:** memory leak of `RecyclerViewEventHelper` ([144524f](https://github.com/Tencent/Hippy/commit/144524f103ae4d8f1225924875395d55fa1db8a6)) +* **android:** reset backgroundImage doesn't work ([71b3569](https://github.com/Tencent/Hippy/commit/71b35693fb724009849914db4856622a659b82a0)) +* **android:** text default color ([40f3ff4](https://github.com/Tencent/Hippy/commit/40f3ff4d560a2eafe6f46b62c509bb6c2b88c48a)) +* **android:** waterfall scrolling error with small content height ([36ea10d](https://github.com/Tencent/Hippy/commit/36ea10d89c1a5a4ddbb81161e109d9c872959546)) +* **core:** fix multithreading bug ([be8b6f9](https://github.com/Tencent/Hippy/commit/be8b6f92b5838e00d0b332d92f2341e65a465beb)) +* **core:** fix promise crash ([a4a000f](https://github.com/Tencent/Hippy/commit/a4a000f7294a3ecaa9e67d4cf42f8e0e29229441)) +* **core:** fix snapshot bug when using dynamicLoad ([7e907cd](https://github.com/Tencent/Hippy/commit/7e907cd9c081d566de5795ce9c4c5c52c04aaecb)) +* **ios:** animation module multi-thread crash ([cb50109](https://github.com/Tencent/Hippy/commit/cb501097731d32caee47882a0511a3b5b9c26ffe)) +* **ios:** fix rounding error using double instead of float ([20ee3b8](https://github.com/Tencent/Hippy/commit/20ee3b847590a8e7a848e3ae3ca142718d1d7bec)) +* **ios:** strange shaped character rendering bug ([cc966f7](https://github.com/Tencent/Hippy/commit/cc966f781d11800eabbf2c5ec6deb0690704db26)) +* **vue:** remove redundant props & perf cache logic ([d635977](https://github.com/Tencent/Hippy/commit/d635977224f9e4e0f68f07fc2b70a0f429dfe660)) +* **vue:** support static style diff in updateNode ([1f4abfd](https://github.com/Tencent/Hippy/commit/1f4abfd6ad2f6c71e16bc2a8237c10b0a85f0ab2)) + + +### Features + +* **core:** add readme for snapshot ([f8910b3](https://github.com/Tencent/Hippy/commit/f8910b3cb2685b65e59508de0bde20cda13e1af5)) +* **ios, js:** remove clipboard module ([fb29d4b](https://github.com/Tencent/Hippy/commit/fb29d4b2709aa32175454d7b5e3d54cead733605)) +* **ios:** add inspectable for jscontext ([e651e1b](https://github.com/Tencent/Hippy/commit/e651e1b3e08414e84b1cf8d71888c98c21bdbd26)) +* **ios:** support skipping inner decoding when use custom image loader ([7770385](https://github.com/Tencent/Hippy/commit/77703858fad7e9d74bde6b44dd8011e812f0ab9a)) +* **ios:** support skipping inner decoding when use custom image loader ([1ca0777](https://github.com/Tencent/Hippy/commit/1ca0777bd7b6d345c4ff791b4b9a3bb9b6ce67e7)) +* **java:** add default method for moduleListener interface ([37ea414](https://github.com/Tencent/Hippy/commit/37ea414aa70a78d8ee24d60ca1f4977b3319f23c)) +* **react,vue:** show nodeId in debug mode ([68f9c02](https://github.com/Tencent/Hippy/commit/68f9c02829b26df7fbef545bfe2a3dad3a817e3b)) + + +### Reverts + +* Revert "refactor(ios): refactor reusable mechanism for list and waterfall" ([af6938b](https://github.com/Tencent/Hippy/commit/af6938b37d822d3b93555655d2d36a605bb6c0ec)) + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) diff --git a/android/sdk/gradle.properties b/android/sdk/gradle.properties index ba9e79292ec..1d319f715e1 100644 --- a/android/sdk/gradle.properties +++ b/android/sdk/gradle.properties @@ -49,7 +49,7 @@ NDK_VERSION=25.0.8775105 # # Specifies SDK version # -VERSION_NAME=2.16.3 +VERSION_NAME=2.16.4 # # Whether to skip build C/C++ code diff --git a/examples/android-demo/res/index.android.js b/examples/android-demo/res/index.android.js index 2df7a21d5f4..e5a53b99ee5 100644 --- a/examples/android-demo/res/index.android.js +++ b/examples/android-demo/res/index.android.js @@ -1,1262 +1,9 @@ -!(function (e) { - function t(t) { - for (var n, r, i = t[0], a = t[1], l = 0, c = [];l < i.length;l++)r = i[l], Object.prototype.hasOwnProperty.call(o, r) && o[r] && c.push(o[r][0]), o[r] = 0;for (n in a)Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);for (s && s(t);c.length;)c.shift()(); - } const n = {}; var o = { 2: 0 };function r(t) { - if (n[t]) return n[t].exports;const o = n[t] = { i: t, l: !1, exports: {} };return e[t].call(o.exports, o, o.exports, r), o.l = !0, o.exports; - }r.e = function (e) { - const t = []; let n = o[e];if (0 !== n) if (n)t.push(n[2]);else { - const i = new Promise(((t, r) => { - n = o[e] = [t, r]; - }));if (t.push(n[2] = i), !global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__) try { - const a = JSON.parse('{"asyncComponentFromHttp":"https://raw.githubusercontent.com/Tencent/Hippy/master/static/hippy-react/"}');global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__ = a; - } catch (e) { - console.error('parse __DYNAMIC_LOAD_CUSTOM_PATH_MAP__ error', e); - } let l = (function (e) { - return `${r.p}${{ 0: 'asyncComponentFromHttp', 1: 'asyncComponentFromLocal' }[e] || e}.android.js`; - }(e));if (l && global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__) if (['https://', 'http://', '//'].some(e => 0 === l.indexOf(e))) { - const s = l.split('/'); const c = s[s.length - 1]; var h = c.split('.')[0];(u = global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[h]) && (l = u + c); - } else { - var u;h = l.split('.')[0];(u = global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[h]) && (l = u + l); - }onScriptComplete = function (t) { - if (t instanceof Error) { - t.message += `, load chunk ${e} failed, path is ${l}`;const n = o[e];0 !== n && n && n[1](t), o[e] = void 0; - } - }, global.dynamicLoad(l, onScriptComplete); - } return Promise.all(t); - }, r.m = e, r.c = n, r.d = function (e, t, n) { - r.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n }); - }, r.r = function (e) { - 'undefined' !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }), Object.defineProperty(e, '__esModule', { value: !0 }); - }, r.t = function (e, t) { - if (1 & t && (e = r(e)), 8 & t) return e;if (4 & t && 'object' === typeof e && e && e.__esModule) return e;const n = Object.create(null);if (r.r(n), Object.defineProperty(n, 'default', { enumerable: !0, value: e }), 2 & t && 'string' !== typeof e) for (const o in e)r.d(n, o, (t => e[t]).bind(null, o));return n; - }, r.n = function (e) { - const t = e && e.__esModule ? function () { - return e.default; - } : function () { - return e; - };return r.d(t, 'a', t), t; - }, r.o = function (e, t) { - return Object.prototype.hasOwnProperty.call(e, t); - }, r.p = '', r.oe = function (e) { - throw console.error(e), e; - };let i = (0, eval)('this').webpackJsonp = (0, eval)('this').webpackJsonp || []; const a = i.push.bind(i);i.push = t, i = i.slice();for (let l = 0;l < i.length;l++)t(i[l]);var s = a;r(r.s = 0); -}({ '../../packages/hippy-react/dist/index.js'(e, t, n) { - e.exports = n('dll-reference hippyReactBase')('../../packages/hippy-react/dist/index.js'); -}, './node_modules/@babel/runtime/helpers/defineProperty.js'(e, t, n) { - const o = n('./node_modules/@babel/runtime/helpers/toPropertyKey.js');e.exports = function (e, t, n) { - return (t = o(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; - }, e.exports.__esModule = !0, e.exports.default = e.exports; -}, './node_modules/@babel/runtime/helpers/esm/inheritsLoose.js'(e, t, n) { - 'use strict';function o(e, t) { - return (o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) { - return e.__proto__ = t, e; - })(e, t); - } function r(e, t) { - e.prototype = Object.create(t.prototype), e.prototype.constructor = e, o(e, t); - }n.d(t, 'a', (() => r)); -}, './node_modules/@babel/runtime/helpers/extends.js'(e, t) { - function n() { - return e.exports = n = Object.assign ? Object.assign.bind() : function (e) { - for (let t = 1;t < arguments.length;t++) { - const n = arguments[t];for (const o in n)Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]); - } return e; - }, e.exports.__esModule = !0, e.exports.default = e.exports, n.apply(this, arguments); - }e.exports = n, e.exports.__esModule = !0, e.exports.default = e.exports; -}, './node_modules/@babel/runtime/helpers/toPrimitive.js'(e, t, n) { - const o = n('./node_modules/@babel/runtime/helpers/typeof.js').default;e.exports = function (e, t) { - if ('object' !== o(e) || null === e) return e;const n = e[Symbol.toPrimitive];if (void 0 !== n) { - const r = n.call(e, t || 'default');if ('object' !== o(r)) return r;throw new TypeError('@@toPrimitive must return a primitive value.'); - } return ('string' === t ? String : Number)(e); - }, e.exports.__esModule = !0, e.exports.default = e.exports; -}, './node_modules/@babel/runtime/helpers/toPropertyKey.js'(e, t, n) { - const o = n('./node_modules/@babel/runtime/helpers/typeof.js').default; const r = n('./node_modules/@babel/runtime/helpers/toPrimitive.js');e.exports = function (e) { - const t = r(e, 'string');return 'symbol' === o(t) ? t : String(t); - }, e.exports.__esModule = !0, e.exports.default = e.exports; -}, './node_modules/@babel/runtime/helpers/typeof.js'(e, t) { - function n(t) { - return e.exports = n = 'function' === typeof Symbol && 'symbol' === typeof Symbol.iterator ? function (e) { - return typeof e; - } : function (e) { - return e && 'function' === typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e; - }, e.exports.__esModule = !0, e.exports.default = e.exports, n(t); - }e.exports = n, e.exports.__esModule = !0, e.exports.default = e.exports; -}, './node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js'(e, t, n) { - 'use strict';const o = n('./node_modules/react-is/index.js'); const r = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }; const i = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }; const a = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }; const l = {};function s(e) { - return o.isMemo(e) ? a : l[e.$$typeof] || r; - }l[o.ForwardRef] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, l[o.Memo] = a;const c = Object.defineProperty; const h = Object.getOwnPropertyNames; const u = Object.getOwnPropertySymbols; const d = Object.getOwnPropertyDescriptor; const m = Object.getPrototypeOf; const g = Object.prototype;e.exports = function e(t, n, o) { - if ('string' !== typeof n) { - if (g) { - const r = m(n);r && r !== g && e(t, r, o); - } let a = h(n);u && (a = a.concat(u(n)));for (let l = s(t), f = s(n), y = 0;y < a.length;++y) { - const p = a[y];if (!(i[p] || o && o[p] || f && f[p] || l && l[p])) { - const b = d(n, p);try { - c(t, p, b); - } catch (e) {} - } - } - } return t; - }; -}, './node_modules/isarray/index.js'(e, t) { - e.exports = Array.isArray || function (e) { - return '[object Array]' == Object.prototype.toString.call(e); - }; -}, './node_modules/mini-create-react-context/dist/esm/index.js'(e, t, n) { - 'use strict';(function (e) { - const o = n('./node_modules/react/index.js'); const r = n.n(o); const i = n('./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js'); const a = n('./node_modules/prop-types/index.js'); const l = n.n(a); const s = 'undefined' !== typeof globalThis ? globalThis : 'undefined' !== typeof window ? window : void 0 !== e ? e : {};function c(e) { - let t = [];return { on(e) { - t.push(e); - }, off(e) { - t = t.filter((t => t !== e)); - }, get() { - return e; - }, set(n, o) { - e = n, t.forEach((t => t(e, o))); - } }; - } const h = r.a.createContext || function (e, t) { - let n; let r; let a; const h = `__create-react-context-${s[a = '__global_unique_id__'] = (s[a] || 0) + 1}__`; const u = (function (e) { - function n() { - let t;return (t = e.apply(this, arguments) || this).emitter = c(t.props.value), t; - }Object(i.a)(n, e);const o = n.prototype;return o.getChildContext = function () { - let e;return (e = {})[h] = this.emitter, e; - }, o.componentWillReceiveProps = function (e) { - if (this.props.value !== e.value) { - let n; const o = this.props.value; const r = e.value;((i = o) === (a = r) ? 0 !== i || 1 / i == 1 / a : i != i && a != a) ? n = 0 : (n = 'function' === typeof t ? t(o, r) : 1073741823, 0 !== (n |= 0) && this.emitter.set(e.value, n)); - } let i; let a; - }, o.render = function () { - return this.props.children; - }, n; - }(o.Component));u.childContextTypes = ((n = {})[h] = l.a.object.isRequired, n);const d = (function (t) { - function n() { - let e;return (e = t.apply(this, arguments) || this).state = { value: e.getValue() }, e.onUpdate = function (t, n) { - 0 != ((0 | e.observedBits) & n) && e.setState({ value: e.getValue() }); - }, e; - }Object(i.a)(n, t);const o = n.prototype;return o.componentWillReceiveProps = function (e) { - const t = e.observedBits;this.observedBits = null == t ? 1073741823 : t; - }, o.componentDidMount = function () { - this.context[h] && this.context[h].on(this.onUpdate);const e = this.props.observedBits;this.observedBits = null == e ? 1073741823 : e; - }, o.componentWillUnmount = function () { - this.context[h] && this.context[h].off(this.onUpdate); - }, o.getValue = function () { - return this.context[h] ? this.context[h].get() : e; - }, o.render = function () { - return (e = this.props.children, Array.isArray(e) ? e[0] : e)(this.state.value);let e; - }, n; - }(o.Component));return d.contextTypes = ((r = {})[h] = l.a.object, r), { Provider: u, Consumer: d }; - };t.a = h; - }).call(this, n('./node_modules/webpack/buildin/global.js')); -}, './node_modules/path-to-regexp/index.js'(e, t, n) { - const o = n('./node_modules/isarray/index.js');e.exports = m, e.exports.parse = i, e.exports.compile = function (e, t) { - return l(i(e, t), t); - }, e.exports.tokensToFunction = l, e.exports.tokensToRegExp = d;const r = new RegExp(['(\\\\.)', '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'].join('|'), 'g');function i(e, t) { - for (var n, o = [], i = 0, a = 0, l = '', h = t && t.delimiter || '/';null != (n = r.exec(e));) { - const u = n[0]; const d = n[1]; const m = n.index;if (l += e.slice(a, m), a = m + u.length, d)l += d[1];else { - const g = e[a]; const f = n[2]; const y = n[3]; const p = n[4]; const b = n[5]; const w = n[6]; const x = n[7];l && (o.push(l), l = '');const S = null != f && null != g && g !== f; const E = '+' === w || '*' === w; const T = '?' === w || '*' === w; const C = n[2] || h; const A = p || b;o.push({ name: y || i++, prefix: f || '', delimiter: C, optional: T, repeat: E, partial: S, asterisk: !!x, pattern: A ? c(A) : x ? '.*' : `[^${s(C)}]+?` }); - } - } return a < e.length && (l += e.substr(a)), l && o.push(l), o; - } function a(e) { - return encodeURI(e).replace(/[\/?#]/g, (e => `%${e.charCodeAt(0).toString(16) - .toUpperCase()}`)); - } function l(e, t) { - for (var n = new Array(e.length), r = 0;r < e.length;r++)'object' === typeof e[r] && (n[r] = new RegExp(`^(?:${e[r].pattern})$`, u(t)));return function (t, r) { - for (var i = '', l = t || {}, s = (r || {}).pretty ? a : encodeURIComponent, c = 0;c < e.length;c++) { - const h = e[c];if ('string' !== typeof h) { - var u; const d = l[h.name];if (null == d) { - if (h.optional) { - h.partial && (i += h.prefix);continue; - } throw new TypeError(`Expected "${h.name}" to be defined`); - } if (o(d)) { - if (!h.repeat) throw new TypeError(`Expected "${h.name}" to not repeat, but received \`${JSON.stringify(d)}\``);if (0 === d.length) { - if (h.optional) continue;throw new TypeError(`Expected "${h.name}" to not be empty`); - } for (let m = 0;m < d.length;m++) { - if (u = s(d[m]), !n[c].test(u)) throw new TypeError(`Expected all "${h.name}" to match "${h.pattern}", but received \`${JSON.stringify(u)}\``);i += (0 === m ? h.prefix : h.delimiter) + u; - } - } else { - if (u = h.asterisk ? encodeURI(d).replace(/[?#]/g, (e => `%${e.charCodeAt(0).toString(16) - .toUpperCase()}`)) : s(d), !n[c].test(u)) throw new TypeError(`Expected "${h.name}" to match "${h.pattern}", but received "${u}"`);i += h.prefix + u; - } - } else i += h; - } return i; - }; - } function s(e) { - return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1'); - } function c(e) { - return e.replace(/([=!:$\/()])/g, '\\$1'); - } function h(e, t) { - return e.keys = t, e; - } function u(e) { - return e && e.sensitive ? '' : 'i'; - } function d(e, t, n) { - o(t) || (n = t || n, t = []);for (var r = (n = n || {}).strict, i = !1 !== n.end, a = '', l = 0;l < e.length;l++) { - const c = e[l];if ('string' === typeof c)a += s(c);else { - const d = s(c.prefix); let m = `(?:${c.pattern})`;t.push(c), c.repeat && (m += `(?:${d}${m})*`), a += m = c.optional ? c.partial ? `${d}(${m})?` : `(?:${d}(${m}))?` : `${d}(${m})`; - } - } const g = s(n.delimiter || '/'); const f = a.slice(-g.length) === g;return r || (a = `${f ? a.slice(0, -g.length) : a}(?:${g}(?=$))?`), a += i ? '$' : r && f ? '' : `(?=${g}|$)`, h(new RegExp(`^${a}`, u(n)), t); - } function m(e, t, n) { - return o(t) || (n = t || n, t = []), n = n || {}, e instanceof RegExp ? (function (e, t) { - const n = e.source.match(/\((?!\?)/g);if (n) for (let o = 0;o < n.length;o++)t.push({ name: o, prefix: null, delimiter: null, optional: !1, repeat: !1, partial: !1, asterisk: !1, pattern: null });return h(e, t); - }(e, t)) : o(e) ? (function (e, t, n) { - for (var o = [], r = 0;r < e.length;r++)o.push(m(e[r], t, n).source);return h(new RegExp(`(?:${o.join('|')})`, u(n)), t); - }(e, t, n)) : (function (e, t, n) { - return d(i(e, n), t, n); - }(e, t, n)); - } -}, './node_modules/prop-types/factoryWithThrowingShims.js'(e, t, n) { - 'use strict';const o = n('./node_modules/prop-types/lib/ReactPropTypesSecret.js');function r() {} function i() {}i.resetWarningCache = r, e.exports = function () { - function e(e, t, n, r, i, a) { - if (a !== o) { - const l = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types');throw l.name = 'Invariant Violation', l; - } - } function t() { - return e; - }e.isRequired = e;const n = { array: e, bigint: e, bool: e, func: e, number: e, object: e, string: e, symbol: e, any: e, arrayOf: t, element: e, elementType: e, instanceOf: t, node: e, objectOf: t, oneOf: t, oneOfType: t, shape: t, exact: t, checkPropTypes: i, resetWarningCache: r };return n.PropTypes = n, n; - }; -}, './node_modules/prop-types/index.js'(e, t, n) { - e.exports = n('./node_modules/prop-types/factoryWithThrowingShims.js')(); -}, './node_modules/prop-types/lib/ReactPropTypesSecret.js'(e, t, n) { - 'use strict';e.exports = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -}, './node_modules/react-is/cjs/react-is.production.min.js'(e, t, n) { - 'use strict'; - /** @license React v16.13.1 +!function(e){function t(t){for(var n,r,i=t[0],a=t[1],l=0,c=[];l0===l.indexOf(e))){var s=l.split("/"),c=s[s.length-1],h=c.split(".")[0];(u=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[h])&&(l=u+c)}else{var u;h=l.split(".")[0];(u=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[h])&&(l=u+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=o[e];0!==n&&n&&n[1](t),o[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},r.m=e,r.c=n,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.oe=function(e){throw console.error(e),e};var i=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l { - l(e, t, (function (e) { - return this._invoke(t, e); - })); - })); - } function w(e, t) { - let o;this._invoke = function (r, i) { - function a() { - return new t(((o, a) => { - !(function o(r, i, a, l) { - const s = c(e[r], e, i);if ('throw' !== s.type) { - const h = s.arg; const u = h.value;return u && 'object' === typeof u && n.call(u, '__await') ? t.resolve(u.__await).then(((e) => { - o('next', e, a, l); - }), ((e) => { - o('throw', e, a, l); - })) : t.resolve(u).then(((e) => { - h.value = e, a(h); - }), (e => o('throw', e, a, l))); - }l(s.arg); - }(r, i, o, a)); - })); - } return o = o ? o.then(a, a) : a(); - }; - } function x(e, t) { - const 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; - } const o = c(n, e.iterator, t.arg);if ('throw' === o.type) return t.method = 'throw', t.arg = o.arg, t.delegate = null, h;const 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) { - const 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) { - const t = e.completion || {};t.type = 'normal', delete t.arg, e.completion = t; - } function A(e) { - this.tryEntries = [{ tryLoc: 'root' }], e.forEach(S, this), this.reset(!0); - } function T(e) { - if (e) { - const t = e[r];if (t) return t.call(e);if ('function' === typeof e.next) return e;if (!isNaN(e.length)) { - let o = -1; const i = function t() { - for (;++o < e.length;) if (n.call(e, o)) return t.value = e[o], t.done = !1, t;return t.value = void 0, t.done = !0, t; - };return i.next = i; - } - } return { next: C }; - } function C() { - return { value: void 0, done: !0 }; - } return d.prototype = m, l(p, 'constructor', m), l(m, 'constructor', d), d.displayName = l(m, a, 'GeneratorFunction'), e.isGeneratorFunction = function (e) { - const t = 'function' === typeof e && e.constructor;return !!t && (t === d || 'GeneratorFunction' === (t.displayName || t.name)); - }, e.mark = function (e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, m) : (e.__proto__ = m, l(e, a, 'GeneratorFunction')), e.prototype = Object.create(p), e; - }, e.awrap = function (e) { - return { __await: e }; - }, b(w.prototype), l(w.prototype, i, (function () { - return this; - })), e.AsyncIterator = w, e.async = function (t, n, o, r, i) { - void 0 === i && (i = Promise);const a = new w(s(t, n, o, r), i);return e.isGeneratorFunction(n) ? a : a.next().then((e => (e.done ? e.value : a.next()))); - }, b(p), l(p, a, 'Generator'), l(p, r, (function () { - return this; - })), l(p, 'toString', (() => '[object Generator]')), e.keys = function (e) { - const t = [];for (const n in e)t.push(n);return t.reverse(), function n() { - for (;t.length;) { - const o = t.pop();if (o in e) return n.value = o, n.done = !1, n; - } return n.done = !0, n; - }; - }, e.values = T, A.prototype = { constructor: A, reset(e) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = 'next', this.arg = void 0, this.tryEntries.forEach(E), !e) for (const t in this)'t' === t.charAt(0) && n.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0); - }, stop() { - this.done = !0;const e = this.tryEntries[0].completion;if ('throw' === e.type) throw e.arg;return this.rval; - }, dispatchException(e) { - if (this.done) throw e;const t = this;function o(n, o) { - return a.type = 'throw', a.arg = e, t.next = n, o && (t.method = 'next', t.arg = void 0), !!o; - } for (let r = this.tryEntries.length - 1;r >= 0;--r) { - const i = this.tryEntries[r]; var a = i.completion;if ('root' === i.tryLoc) return o('end');if (i.tryLoc <= this.prev) { - const l = n.call(i, 'catchLoc'); const s = n.call(i, 'finallyLoc');if (l && s) { - if (this.prev < i.catchLoc) return o(i.catchLoc, !0);if (this.prev < i.finallyLoc) return o(i.finallyLoc); - } else if (l) { - if (this.prev < i.catchLoc) return o(i.catchLoc, !0); - } else { - if (!s) throw new Error('try statement without catch or finally');if (this.prev < i.finallyLoc) return o(i.finallyLoc); - } - } - } - }, abrupt(e, t) { - for (let o = this.tryEntries.length - 1;o >= 0;--o) { - const r = this.tryEntries[o];if (r.tryLoc <= this.prev && n.call(r, 'finallyLoc') && this.prev < r.finallyLoc) { - var i = r;break; - } - }i && ('break' === e || 'continue' === e) && i.tryLoc <= t && t <= i.finallyLoc && (i = null);const a = i ? i.completion : {};return a.type = e, a.arg = t, i ? (this.method = 'next', this.next = i.finallyLoc, h) : this.complete(a); - }, complete(e, t) { - if ('throw' === e.type) throw e.arg;return 'break' === e.type || 'continue' === e.type ? this.next = e.arg : 'return' === e.type ? (this.rval = this.arg = e.arg, this.method = 'return', this.next = 'end') : 'normal' === e.type && t && (this.next = t), h; - }, finish(e) { - for (let t = this.tryEntries.length - 1;t >= 0;--t) { - const n = this.tryEntries[t];if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), E(n), h; - } - }, catch(e) { - for (let t = this.tryEntries.length - 1;t >= 0;--t) { - const n = this.tryEntries[t];if (n.tryLoc === e) { - const o = n.completion;if ('throw' === o.type) { - var r = o.arg;E(n); - } return r; - } - } throw new Error('illegal catch attempt'); - }, delegateYield(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'(e, t, n) { - e.exports = n('dll-reference hippyReactBase')('./node_modules/webpack/buildin/global.js'); -}, './src/app.jsx'(e, t, n) { - 'use strict';n.d(t, 'a', (() => pn));const o = {};n.r(o), n.d(o, 'Focusable', (() => W)), n.d(o, 'Image', (() => q)), n.d(o, 'ListView', (() => $)), n.d(o, 'Modal', (() => re)), n.d(o, 'RefreshWrapper', (() => ke)), n.d(o, 'PullHeaderFooter', (() => Re)), n.d(o, 'ScrollView', (() => De)), n.d(o, 'Text', (() => Fe)), n.d(o, 'TextInput', (() => Be)), n.d(o, 'View', (() => He)), n.d(o, 'ViewPager', (() => Je)), n.d(o, 'WebView', (() => $e)), n.d(o, 'BoxShadow', (() => nt)), n.d(o, 'WaterfallView', (() => it)), n.d(o, 'RippleViewAndroid', (() => dt));const r = {};n.r(r), n.d(r, 'Animation', (() => yt)), n.d(r, 'AsyncStorage', (() => bt)), n.d(r, 'NetInfo', (() => xt)), n.d(r, 'WebSocket', (() => Ct)), n.d(r, 'UIManagerModule', (() => It));const i = {};n.r(i), n.d(i, 'Slider', (() => Ft)), n.d(i, 'TabHost', (() => Bt)), n.d(i, 'SetNativeProps', (() => Ht)), n.d(i, 'DynamicImport', (() => Nt)), n.d(i, 'Localization', (() => Ut)), n.d(i, 'Turbo', (() => Qt)), n.d(i, 'NestedScroll', (() => Xt));const a = n('./node_modules/react/index.js'); const l = n.n(a); const s = n('../../packages/hippy-react/dist/index.js'); const c = n('./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js');function h() { - return (h = Object.assign ? Object.assign.bind() : function (e) { - for (let t = 1;t < arguments.length;t++) { - const n = arguments[t];for (const o in n)Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]); - } return e; - }).apply(this, arguments); - } function u(e) { - return '/' === e.charAt(0); - } function d(e, t) { - for (let n = t, o = n + 1, r = e.length;o < r;n += 1, o += 1)e[n] = e[o];e.pop(); - } const m = function (e, t) { - void 0 === t && (t = '');let n; const o = e && e.split('/') || []; let r = t && t.split('/') || []; const i = e && u(e); const a = t && u(t); const l = i || a;if (e && u(e) ? r = o : o.length && (r.pop(), r = r.concat(o)), !r.length) return '/';if (r.length) { - const s = r[r.length - 1];n = '.' === s || '..' === s || '' === s; - } else n = !1;for (var c = 0, h = r.length;h >= 0;h--) { - const m = r[h];'.' === m ? d(r, h) : '..' === m ? (d(r, h), c++) : c && (d(r, h), c--); - } if (!l) for (;c--;c)r.unshift('..');!l || '' === r[0] || r[0] && u(r[0]) || r.unshift('');let g = r.join('/');return n && '/' !== g.substr(-1) && (g += '/'), g; - };const g = 'Invariant failed';function f(e, t) { - if (!e) throw new Error(g); - } function y(e) { - const t = e.pathname; const n = e.search; const o = e.hash; let r = t || '/';return n && '?' !== n && (r += '?' === n.charAt(0) ? n : `?${n}`), o && '#' !== o && (r += '#' === o.charAt(0) ? o : `#${o}`), r; - } function p(e, t, n, o) { - let r;'string' === typeof e ? (r = (function (e) { - let t = e || '/'; let n = ''; let o = ''; const r = t.indexOf('#');-1 !== r && (o = t.substr(r), t = t.substr(0, r));const 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 = m(r.pathname, o.pathname)) : r.pathname = o.pathname : r.pathname || (r.pathname = '/'), r; - } function b() { - let e = null;let t = [];return { setPrompt(t) { - return e = t, function () { - e === t && (e = null); - }; - }, confirmTransitionTo(t, n, o, r) { - if (null != e) { - const 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(e) { - let n = !0;function o() { - n && e.apply(void 0, arguments); - } return t.push(o), function () { - n = !1, t = t.filter((e => e !== o)); - }; - }, notifyListeners() { - for (var e = arguments.length, n = new Array(e), o = 0;o < e;o++)n[o] = arguments[o];t.forEach((e => e.apply(void 0, n))); - } }; - }'undefined' === typeof window || !window.document || window.document.createElement;function w(e, t, n) { - return Math.min(Math.max(e, t), n); - } function x(e) { - void 0 === e && (e = {});const t = e; const n = t.getUserConfirmation; const o = t.initialEntries; const r = void 0 === o ? ['/'] : o; const i = t.initialIndex; const a = void 0 === i ? 0 : i; const l = t.keyLength; const s = void 0 === l ? 6 : l; const c = b();function u(e) { - h(S, e), S.length = S.entries.length, c.notifyListeners(S.location, S.action); - } function d() { - return Math.random().toString(36) - .substr(2, s); - } const m = w(a, 0, r.length - 1); const g = r.map((e => p(e, void 0, 'string' === typeof e ? d() : e.key || d()))); const f = y;function x(e) { - const t = w(S.index + e, 0, S.entries.length - 1); const o = S.entries[t];c.confirmTransitionTo(o, 'POP', n, ((e) => { - e ? u({ action: 'POP', location: o, index: t }) : u(); - })); - } var S = { length: g.length, action: 'POP', location: g[m], index: m, entries: g, createHref: f, push(e, t) { - const o = p(e, t, d(), S.location);c.confirmTransitionTo(o, 'PUSH', n, ((e) => { - if (e) { - const t = S.index + 1; const n = S.entries.slice(0);n.length > t ? n.splice(t, n.length - t, o) : n.push(o), u({ action: 'PUSH', location: o, index: t, entries: n }); - } - })); - }, replace(e, t) { - const o = p(e, t, d(), S.location);c.confirmTransitionTo(o, 'REPLACE', n, ((e) => { - e && (S.entries[S.index] = o, u({ action: 'REPLACE', location: o })); - })); - }, go: x, goBack() { - x(-1); - }, goForward() { - x(1); - }, canGo(e) { - const t = S.index + e;return t >= 0 && t < S.entries.length; - }, block(e) { - return void 0 === e && (e = !1), c.setPrompt(e); - }, listen(e) { - return c.appendListener(e); - } };return S; - } const S = n('./node_modules/mini-create-react-context/dist/esm/index.js'); const E = n('./node_modules/path-to-regexp/index.js'); const A = n.n(E);n('./node_modules/react-is/index.js');function T(e, t) { - if (null == e) return {};let n; let o; const r = {}; const i = Object.keys(e);for (o = 0;o < i.length;o++)n = i[o], t.indexOf(n) >= 0 || (r[n] = e[n]);return r; - } const C = n('./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js'); const v = n.n(C); const k = (function (e) { - const t = Object(S.a)();return t.displayName = e, t; - }('Router')); const V = (function (e) { - function t(t) { - let 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(((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 }; - };const 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 l.a.createElement(k.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; - }(l.a.Component));const R = (function (e) { - function t() { - for (var t, n = arguments.length, o = new Array(n), r = 0;r < n;r++)o[r] = arguments[r];return (t = e.call.apply(e, [this].concat(o)) || this).history = x(t.props), t; - } return Object(c.a)(t, e), t.prototype.render = function () { - return l.a.createElement(V, { history: this.history, children: this.props.children }); - }, t; - }(l.a.Component));l.a.Component;const I = {}; let D = 0;function O(e, t) { - void 0 === t && (t = {}), ('string' === typeof t || Array.isArray(t)) && (t = { path: t });const n = t; const o = n.path; const r = n.exact; const i = void 0 !== r && r; const a = n.strict; const l = void 0 !== a && a; const s = n.sensitive; const c = void 0 !== s && s;return [].concat(o).reduce(((t, n) => { - if (!n && '' !== n) return null;if (t) return t;const o = (function (e, t) { - const n = `${t.end}${t.strict}${t.sensitive}`; const o = I[n] || (I[n] = {});if (o[e]) return o[e];const r = []; const i = { regexp: A()(e, r, t), keys: r };return D < 1e4 && (o[e] = i, D++), i; - }(n, { end: i, strict: l, sensitive: c })); const r = o.regexp; const a = o.keys; const s = r.exec(e);if (!s) return null;const h = s[0]; const u = s.slice(1); const d = e === h;return i && !d ? null : { path: n, url: '/' === n && '' === h ? '/' : h, isExact: d, params: a.reduce(((e, t, n) => (e[t.name] = u[n], e)), {}) }; - }), null); - } const P = (function (e) { - function t() { - return e.apply(this, arguments) || this; - } return Object(c.a)(t, e), t.prototype.render = function () { - const e = this;return l.a.createElement(k.Consumer, null, ((t) => { - t || f(!1);const n = e.props.location || t.location; const o = h({}, t, { location: n, match: e.props.computedMatch ? e.props.computedMatch : e.props.path ? O(n.pathname, e.props) : t.match }); const r = e.props; let i = r.children; const a = r.component; const s = r.render;return Array.isArray(i) && 0 === i.length && (i = null), l.a.createElement(k.Provider, { value: o }, o.match ? i ? 'function' === typeof i ? i(o) : i : a ? l.a.createElement(a, o) : s ? s(o) : null : 'function' === typeof i ? i(o) : null); - })); - }, t; - }(l.a.Component));function L(e) { - return '/' === e.charAt(0) ? e : `/${e}`; - } function j(e, t) { - if (!e) return t;const n = L(e);return 0 !== t.pathname.indexOf(n) ? t : h({}, t, { pathname: t.pathname.substr(n.length) }); - } function F(e) { - return 'string' === typeof e ? e : y(e); - } function z(e) { - return function () { - f(!1); - }; - } function B() {}l.a.Component;l.a.Component;function M(e) { - const t = `withRouter(${e.displayName || e.name})`; const n = function (t) { - const n = t.wrappedComponentRef; const o = T(t, ['wrappedComponentRef']);return l.a.createElement(k.Consumer, null, (t => (t || f(!1), l.a.createElement(e, h({}, o, t, { ref: n }))))); - };return n.displayName = t, n.WrappedComponent = e, v()(n, e); - }l.a.useContext;const _ = n('./node_modules/@babel/runtime/helpers/defineProperty.js'); const H = n.n(_);class W extends l.a.Component { - constructor(e) { - super(e), this.state = { clickindex: 0 }; - }onClick(e) { - this.setState({ clickindex: e }); - }getRenderRow(e) { - const { clickindex: t } = this.state;return l.a.createElement(s.View, null, l.a.createElement(s.Focusable, { style: { height: 80 }, onClick: () => this.onClick(e), requestFocus: 0 === e, focusStyle: { backgroundColor: 'red' }, noFocusStyle: { backgroundColor: 'blue' } }, l.a.createElement(s.Text, { style: { color: 'white' } }, t === e ? `我被点击了${e}` : `没有被点击${e}`))); - }render() { - return l.a.createElement(s.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)); - } - } const N = `${n.p}assets/defaultSource.jpg`; const K = `${n.p}assets/hippyLogoWhite.png`;const U = 'https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png'; const G = s.StyleSheet.create({ container_style: { alignItems: 'center' }, image_style: { width: 300, height: 180, margin: 16, borderColor: '#4c9afa', borderWidth: 1, borderStyle: 'solid', borderRadius: 4 }, info_style: { marginTop: 15, marginLeft: 16, fontSize: 16, color: '#4c9afa' }, img_result: { width: 300, marginTop: -15, marginLeft: 16, fontSize: 16, color: '#4c9afa', borderColor: '#4c9afa', borderWidth: 1, borderStyle: 'solid', borderRadius: 4 } });class q extends l.a.Component { - constructor(e) { - super(e), this.state = { gifLoadResult: {} }; - }render() { - const { width: e, height: t, url: n } = this.state.gifLoadResult;return l.a.createElement(s.ScrollView, { style: G.container_style }, l.a.createElement(s.Text, { style: G.info_style }, 'Contain:'), l.a.createElement(s.Image, { style: [G.image_style], resizeMode: s.Image.resizeMode.contain, defaultSource: N, source: { uri: U }, onProgress: (e) => { - console.log('onProgress', e); - }, onLoadStart: () => { - console.log('image onloadStart'); - }, onLoad: () => { - console.log('image onLoad'); - }, onError: (e) => { - console.log('image onError', e); - }, onLoadEnd: () => { - console.log('image onLoadEnd'); - } }), l.a.createElement(s.Text, { style: G.info_style }, 'Cover:'), l.a.createElement(s.Image, { style: [G.image_style], defaultSource: N, source: { uri: U }, resizeMode: s.Image.resizeMode.cover }), l.a.createElement(s.Text, { style: G.info_style }, 'Center:'), l.a.createElement(s.Image, { style: [G.image_style], defaultSource: N, source: { uri: U }, resizeMode: s.Image.resizeMode.center }), l.a.createElement(s.Text, { style: G.info_style }, 'CapInsets:'), l.a.createElement(s.Image, { style: [G.image_style], defaultSource: N, source: { uri: U }, capInsets: { top: 50, left: 50, bottom: 50, right: 50 }, resizeMode: s.Image.resizeMode.cover }), l.a.createElement(s.Text, { style: G.info_style }, 'TintColor:'), l.a.createElement(s.Image, { style: [G.image_style, { tintColor: '#4c9afa99' }], defaultSource: N, source: { uri: K }, resizeMode: s.Image.resizeMode.center }), l.a.createElement(s.Text, { style: G.info_style }, 'Cover GIF:'), l.a.createElement(s.Image, { style: [G.image_style], resizeMode: s.Image.resizeMode.cover, defaultSource: N, source: { uri: 'https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif' }, onLoad: (e) => { - console.log(`gif onLoad result: ${e}`);const { width: t, height: n, url: o } = e;this.setState({ gifLoadResult: { width: t, height: n, url: o } }); - } }), l.a.createElement(s.Text, { style: G.img_result }, `gifLoadResult: { width: ${e}, height: ${t}, url: ${n} }`)); - } - } const Q = [{ 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 }]; const Y = s.StyleSheet.create({ container: { backgroundColor: '#fff', collapsable: !1 }, itemContainer: { padding: 12 }, separatorLine: { marginLeft: 12, marginRight: 12, height: 1, backgroundColor: '#e5e5e5' }, loading: { fontSize: 11, color: '#aaaaaa', alignSelf: 'center' } });function X({ index: e }) { - return l.a.createElement(s.View, { style: Y.container, onClickCapture: (e) => { - console.log('onClickCapture style1', e.target.nodeId, e.currentTarget.nodeId); - }, onTouchDown: e => (e.stopPropagation(), console.log('onTouchDown style1', e.target.nodeId, e.currentTarget.nodeId), !1), onClick: e => (console.log('click style1', e.target.nodeId, e.currentTarget.nodeId), !1) }, l.a.createElement(s.Text, { numberOfLines: 1 }, `${e}: Style 1 UI`)); - } function J({ index: e }) { - return l.a.createElement(s.View, { style: Y.container }, l.a.createElement(s.Text, { numberOfLines: 1 }, `${e}: Style 2 UI`)); - } function Z({ index: e }) { - return l.a.createElement(s.View, { style: Y.container }, l.a.createElement(s.Text, { numberOfLines: 1 }, `${e}: Style 5 UI`)); - } class $ extends l.a.Component { - constructor(e) { - super(e), this.state = { dataSource: Q, fetchingDataFlag: !1, horizontal: void 0 }, this.delText = 'Delete', this.mockFetchData = this.mockFetchData.bind(this), this.getRenderRow = this.getRenderRow.bind(this), this.onEndReached = this.onEndReached.bind(this), this.getRowType = this.getRowType.bind(this), this.getRowKey = this.getRowKey.bind(this), this.getRowStyle = this.getRowStyle.bind(this), this.onDelete = this.onDelete.bind(this), this.onAppear = this.onAppear.bind(this), this.onDisappear = this.onDisappear.bind(this), this.onWillAppear = this.onWillAppear.bind(this), this.onWillDisappear = this.onWillDisappear.bind(this), this.rowShouldSticky = this.rowShouldSticky.bind(this), this.onScroll = this.onScroll.bind(this); - }onDelete({ index: e }) { - const { dataSource: t } = this.state; const 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(); const o = e.concat(n);this.setState({ dataSource: o, fetchingDataFlag: !1 }); - }onAppear(e) { - console.log('onAppear', e); - }onScroll(e) { - console.log('onScroll', e.contentOffset.y), e.contentOffset.y <= 0 ? this.topReached || (this.topReached = !0, console.log('onTopReached')) : this.topReached = !1; - }onDisappear(e) { - console.log('onDisappear', e); - }onWillAppear(e) { - console.log('onWillAppear', e); - }onWillDisappear(e) { - console.log('onWillDisappear', e); - }rowShouldSticky(e) { - return 2 === e; - }getRowType(e) { - return this.state.dataSource[e].style; - }getRowStyle() { - const { horizontal: e } = this.state;return e ? { width: 100, height: 50 } : {}; - }getRowKey(e) { - return `row-${e}`; - }getRenderRow(e) { - const { dataSource: t } = this.state;let n = null;const o = t[e]; const r = t.length === e + 1;switch (o.style) { - case 1:n = l.a.createElement(X, { index: e });break;case 2:n = l.a.createElement(J, { index: e });break;case 5:n = l.a.createElement(Z, { index: e });break;case 100:n = l.a.createElement(s.Text, { style: Y.loading }, 'Loading now...'); - } return l.a.createElement(s.View, { style: Y.container, onClickCapture: (e) => { - console.log('onClickCapture style outer', e.target.nodeId, e.currentTarget.nodeId); - }, onTouchDown: e => (console.log('onTouchDown style outer', e.target.nodeId, e.currentTarget.nodeId), !1), onClick: e => (console.log('click style outer', e.target.nodeId, e.currentTarget.nodeId), !1) }, l.a.createElement(s.View, { style: Y.itemContainer }, n), r ? null : l.a.createElement(s.View, { style: Y.separatorLine })); - }mockFetchData() { - return new Promise((e) => { - setTimeout(() => e(Q), 600); - }); - }changeDirection() { - this.setState({ horizontal: void 0 === this.state.horizontal || void 0 }); - }render() { - const { dataSource: e, horizontal: t } = this.state;return l.a.createElement(s.View, { style: { flex: 1, collapsable: !1 } }, l.a.createElement(s.ListView, { onTouchDown: (e) => { - console.log('onTouchDown ListView', e.target.nodeId, e.currentTarget.nodeId); - }, onClickCapture: (e) => { - console.log('onClickCapture listview', e.target.nodeId, e.currentTarget.nodeId); - }, onClick: e => (console.log('click listview', e.target.nodeId, e.currentTarget.nodeId), !0), bounces: !0, horizontal: t, style: [{ backgroundColor: '#ffffff' }, t ? { height: 50 } : { flex: 1 }], numberOfRows: e.length, renderRow: this.getRenderRow, onEndReached: this.onEndReached, getRowType: this.getRowType, onDelete: this.onDelete, onMomentumScrollBegin: e => console.log('onMomentumScrollBegin', e), onMomentumScrollEnd: e => console.log('onMomentumScrollEnd', e), onScrollBeginDrag: e => console.log('onScrollBeginDrag', e), onScrollEndDrag: e => console.log('onScrollEndDrag', e), delText: this.delText, editable: !0, getRowStyle: this.getRowStyle, getRowKey: this.getRowKey, initialListSize: 15, rowShouldSticky: this.rowShouldSticky, onAppear: this.onAppear, onDisappear: this.onDisappear, onWillAppear: this.onWillAppear, onWillDisappear: this.onWillDisappear, onScroll: this.onScroll, scrollEventThrottle: 1e3 }), 'android' === s.Platform.OS ? l.a.createElement(s.View, { onClick: () => this.changeDirection(), style: { position: 'absolute', right: 20, bottom: 20, width: 67, height: 67, borderRadius: 30, boxShadowOpacity: .6, boxShadowRadius: 5, boxShadowOffsetX: 3, boxShadowOffsetY: 3, boxShadowColor: '#4c9afa' } }, l.a.createElement(s.View, { style: { width: 60, height: 60, borderRadius: 30, backgroundColor: '#4c9afa', display: 'flex', justifyContent: 'center', alignItems: 'center' } }, l.a.createElement(s.Text, { style: { color: 'white' } }, '切换方向'))) : null); - } - } const ee = '#4c9afa'; const te = '#4c9afa'; const ne = 'white'; const oe = s.StyleSheet.create({ container: { flex: 1, flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'center' }, buttonView: { borderColor: ee, borderWidth: 2, borderStyle: 'solid', borderRadius: 8, justifyContent: 'center', alignItems: 'center', width: 250, height: 50, marginTop: 30 }, buttonText: { fontSize: 20, color: ee, textAlign: 'center', textAlignVertical: 'center' }, selectionText: { fontSize: 20, color: ee, textAlign: 'center', textAlignVertical: 'center', marginLeft: 10, marginRight: 10 } });class re extends l.a.Component { - constructor(e) { - super(e), this.state = { visible: !1, press: !1, animationType: 'fade' }, 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 l.a.createElement(s.ScrollView, null, l.a.createElement(s.View, { style: oe.container }, l.a.createElement(s.View, { onPressIn: () => this.feedback('in'), onPressOut: () => this.feedback('out'), onClick: this.show, style: [oe.buttonView, { borderColor: ee, opacity: e ? .5 : 1 }] }, l.a.createElement(s.Text, { style: [oe.buttonText, { color: ee }] }, '点击弹出浮层'))), l.a.createElement(s.View, { style: { flexDirection: 'row', justifyContent: 'center', marginTop: 20 } }, l.a.createElement(s.Text, { onClick: () => { - this.setState({ animationType: 'fade' }); - }, style: [oe.selectionText, { backgroundColor: 'fade' === this.state.animationType ? 'rgba(255, 0, 0, 0.5)' : '#FFFFFF' }] }, 'fade'), l.a.createElement(s.Text, { onClick: () => { - this.setState({ animationType: 'slide' }); - }, style: [oe.selectionText, { backgroundColor: 'slide' === this.state.animationType ? 'rgba(255, 0, 0, 0.5)' : '#FFFFFF' }] }, 'slide'), l.a.createElement(s.Text, { onClick: () => { - this.setState({ animationType: 'slide_fade' }); - }, style: [oe.selectionText, { backgroundColor: 'slide_fade' === this.state.animationType ? 'rgba(255, 0, 0, 0.5)' : '#FFFFFF' }] }, 'slide_fade')), l.a.createElement(s.Modal, { transparent: !0, animationType: this.state.animationType, visible: t, onRequestClose: () => {}, supportedOrientations: ['portrait'], immersionStatusBar: !0 }, l.a.createElement(s.View, { style: { flex: 1, flexDirection: 'row', justifyContent: 'center', backgroundColor: '#4c9afa88' } }, l.a.createElement(s.View, { onClick: this.hide, style: { width: 200, height: 200, backgroundColor: te, marginTop: 300, flexDirection: 'row', justifyContent: 'center' } }, l.a.createElement(s.Text, { style: { color: ne, fontSize: 22, marginTop: 80 } }, '点击关闭浮层'))))); - } - } const ie = 'https://user-images.githubusercontent.com/12878546/148736841-59ce5d1c-8010-46dc-8632-01c380159237.jpg'; const ae = { style: 1, itemBean: { title: '非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾', picList: [ie, ie, ie], subInfo: ['三图评论', '11评'] } }; const le = { style: 2, itemBean: { title: '彼得·泰尔:认知未来是投资人的谋生之道', picUrl: 'https://user-images.githubusercontent.com/12878546/148736850-4fc13304-25d4-4b6a-ada3-cbf0745666f5.jpg', subInfo: ['左文右图'] } }; const se = { style: 5, itemBean: { title: '愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?', picUrl: 'https://user-images.githubusercontent.com/12878546/148736859-29e3a5b2-612a-4fdd-ad21-dc5d29fa538f.jpg', subInfo: ['六眼神魔 5234播放'] } };const ce = [se, ae, le, ae, le, ae, le, se, ae]; const he = n('./node_modules/@babel/runtime/helpers/extends.js'); const ue = n.n(he);const de = { getScreenWidth() { - const e = s.Dimensions.get('screen').width; const t = s.Dimensions.get('screen').height; const n = e > t ? t : e;return Math.floor(n); - }, uniqueArray(e) { - const t = [];for (let n = 0;n < e.length;n += 1)-1 === t.indexOf(e[n]) && t.push(e[n]);return t; - }, isiPhoneX() { - let e = !1;if ('android' === s.Platform.OS) return e;const { height: t } = s.Dimensions.get('window');return t >= 812 && s.PixelRatio.get() >= 2 && (e = !0), e; - } };const me = (de.getScreenWidth() - 24 - 12) / 3; const ge = Math.floor(me / 1.35); const fe = s.StyleSheet.create({ imageContainer: { flexDirection: 'row', justifyContent: 'center', height: ge, marginTop: 8 }, normalText: { fontSize: 11, color: '#aaaaaa', alignSelf: 'center' }, image: { width: me, height: ge }, title: { fontSize: 'android' === s.Platform.OS ? 17 : 18, lineHeight: 24, color: '#242424' }, tagLine: { marginTop: 8, height: 20, flexDirection: 'row', justifyContent: 'flex-start' } });function ye(e) { - const { itemBean: { title: t, picList: n } } = e;let { itemBean: { subInfo: o } } = e; let r = null;if (o && o.length) { - o = de.uniqueArray(o);const e = o.join(' ');r = l.a.createElement(s.Text, { style: fe.normalText, numberOfLines: 1 }, e); - } return l.a.createElement(s.View, ue()({}, e, { style: { collapsable: !1 } }), l.a.createElement(s.Text, { style: [fe.title], numberOfLines: 2, enableScale: !0 }, t), l.a.createElement(s.View, { style: fe.imageContainer }, l.a.createElement(s.Image, { style: fe.image, source: { uri: n[0] }, resizeMode: s.Image.resizeMode.cover }), l.a.createElement(s.Image, { style: [fe.image, { marginLeft: 6, marginRight: 6 }], source: { uri: n[1] }, resizeMode: s.Image.resizeMode.cover }), l.a.createElement(s.Image, { style: fe.image, source: { uri: n[2] }, resizeMode: s.Image.resizeMode.cover })), r ? l.a.createElement(s.View, { style: fe.tagLine }, r) : null); - } const pe = de.getScreenWidth() - 24; const be = Math.floor(pe - 12) / 3; const we = Math.floor(be / 1.35); const xe = s.StyleSheet.create({ container: { flexDirection: 'row', justifyContent: 'space-between', height: we }, leftContainer: { flex: 1, flexDirection: 'column', justifyContent: 'center', marginRight: 8 }, imageContainer: { width: be, height: we }, image: { width: be, height: we }, title: { fontSize: 'android' === s.Platform.OS ? 17 : 18, lineHeight: 24 }, tagLine: { marginTop: 8, height: 20, flexDirection: 'row', justifyContent: 'flex-start' }, normalText: { fontSize: 11, color: '#aaaaaa', alignSelf: 'center' } });function Se(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 = de.uniqueArray(i);const e = i.join(' ');n = l.a.createElement(s.Text, { style: xe.normalText, numberOfLines: 1 }, e); - } return l.a.createElement(s.View, ue()({}, e, { style: xe.container }), l.a.createElement(s.View, { style: xe.leftContainer }, l.a.createElement(s.Text, { style: xe.title, numberOfLines: 2, enableScale: !0 }, o), n ? l.a.createElement(s.View, { style: xe.tagLine }, n) : null), l.a.createElement(s.View, { style: xe.imageContainer }, l.a.createElement(s.Image, { resizeMode: s.Image.resizeMode.cover, style: xe.image, source: { uri: r } }))); - } const Ee = de.getScreenWidth() - 24; const Ae = Math.floor(188 * Ee / 336); const Te = s.StyleSheet.create({ text: { fontSize: 'android' === s.Platform.OS ? 17 : 18, lineHeight: 24, color: '#242424' }, playerView: { marginTop: 8, alignItems: 'center', width: Ee, height: Ae, alignSelf: 'center' }, image: { width: Ee, height: Ae }, normalText: { fontSize: 11, color: '#aaaaaa', alignSelf: 'center' }, tagLine: { marginTop: 8, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' } });function Ce(e) { - if ('undefined' === e) return null;const { itemBean: t } = e;if (!t) return null;const { title: n, picUrl: o } = t;let { subInfo: r } = t; let i = null;if (r && r.length) { - r = de.uniqueArray(r);const e = r.join(' ');i = l.a.createElement(s.Text, { style: Te.normalText, numberOfLines: 1 }, e); - } return l.a.createElement(s.View, e, l.a.createElement(s.Text, { style: Te.text, numberOfLines: 2, enableScale: !0 }, n), l.a.createElement(s.View, { style: Te.playerView }, l.a.createElement(s.Image, { style: Te.image, source: { uri: o }, resizeMode: s.Image.resizeMode.cover })), i ? l.a.createElement(s.View, { style: Te.tagLine }, i) : null); - } const ve = s.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 ke extends l.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(); const 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]; const i = t.length === e + 1;switch (r.style) { - case 1:o = l.a.createElement(ye, { itemBean: r.itemBean, onClick: () => this.onClickItem(e) });break;case 2:o = l.a.createElement(Se, { itemBean: r.itemBean, onClick: () => this.onClickItem(e) });break;case 5:o = l.a.createElement(Ce, { itemBean: r.itemBean, onClick: () => this.onClickItem(e) });break;case 100:o = l.a.createElement(s.Text, { style: ve.loading }, n); - } return l.a.createElement(s.View, { style: ve.container }, l.a.createElement(s.View, { style: ve.itemContainer }, o), i ? null : l.a.createElement(s.View, { style: ve.spliter })); - }getRowType(e) { - return this.state.dataSource[e].style; - }getRowKey(e) { - return `row-${e}`; - }getRefresh() { - return l.a.createElement(s.View, { style: { flex: 1, height: 30 } }, l.a.createElement(s.Text, { style: { flex: 1, textAlign: 'center' } }, '下拉刷新中...')); - }mockFetchData() { - return new Promise((e) => { - setTimeout(() => (this.setState({ fetchingDataFlag: !1 }), this.fetchTimes += 1, this.fetchTimes >= 50 ? e([]) : e(ce)), 600); - }); - }render() { - const { dataSource: e } = this.state;return l.a.createElement(s.RefreshWrapper, { ref: (e) => { - this.refresh = e; - }, style: { flex: 1 }, onRefresh: this.onRefresh, bounceTime: 100, getRefresh: this.getRefresh }, l.a.createElement(s.ListView, { style: { flex: 1, backgroundColor: '#ffffff' }, numberOfRows: e.length, renderRow: this.getRenderRow, onEndReached: this.onEndReached, getRowType: this.getRowType, getRowKey: this.getRowKey })); - } - } const Ve = s.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: { flex: 1, height: 50, backgroundColor: '#4c9afa' }, pullContent: { lineHeight: 50, color: 'white', height: 50, textAlign: 'center' }, pullFooter: { height: 40, flex: 1, backgroundColor: '#4c9afa', justifyContent: 'center', alignItems: 'center' } });class Re extends l.a.Component { - constructor(e) { - super(e), this.state = { dataSource: [], headerRefreshText: '继续下拉触发刷新', footerRefreshText: '正在加载...', horizontal: void 0 }, this.loadMoreDataFlag = !1, this.fetchingDataFlag = !1, 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.getHeaderStyle = this.getHeaderStyle.bind(this), this.getFooterStyle = this.getFooterStyle.bind(this), this.getRowStyle = this.getRowStyle.bind(this), this.renderPullHeader = this.renderPullHeader.bind(this), this.renderPullFooter = this.renderPullFooter.bind(this), this.onEndReached = this.onEndReached.bind(this), this.onHeaderReleased = this.onHeaderReleased.bind(this), this.onHeaderPulling = this.onHeaderPulling.bind(this), this.onFooterPulling = this.onFooterPulling.bind(this); - } async componentDidMount() { - const e = await this.mockFetchData();this.setState({ dataSource: e }), this.listView.collapsePullHeader(); - }mockFetchData() { - return new Promise((e) => { - setTimeout(() => e(ce), 800); - }); - } async onEndReached() { - const { dataSource: e } = this.state;if (this.loadMoreDataFlag) return;this.loadMoreDataFlag = !0, this.setState({ footerRefreshText: '加载更多...' });let t = [];try { - t = await this.mockFetchData(); - } catch (e) {}0 === t.length && this.setState({ footerRefreshText: '没有更多数据' });const n = [...e, ...t];this.setState({ dataSource: n }), this.loadMoreDataFlag = !1, this.listView.collapsePullFooter(); - } async onHeaderReleased() { - if (this.fetchingDataFlag) return;this.fetchingDataFlag = !0, console.log('onHeaderReleased'), this.setState({ headerRefreshText: '刷新数据中,请稍等' });let e = [];try { - e = await this.mockFetchData(), e = e.reverse(); - } catch (e) {} this.fetchingDataFlag = !1, this.setState({ dataSource: e, headerRefreshText: '2秒后收起' }, () => { - this.listView.collapsePullHeader({ time: 2e3 }); - }); - }onHeaderPulling(e) { - this.fetchingDataFlag || (console.log('onHeaderPulling', e.contentOffset), e.contentOffset > Ve.pullContent.height ? this.setState({ headerRefreshText: '松手,即可触发刷新' }) : this.setState({ headerRefreshText: '继续下拉,触发刷新' })); - }onFooterPulling(e) { - console.log('onFooterPulling', e); - }onClickItem(e, t) { - console.log(`item: ${e} is clicked..`, t.target.nodeId, t.currentTarget.nodeId); - }getRowType(e) { - return this.state.dataSource[e].style; - }getRowKey(e) { - return `row-${e}`; - }getHeaderStyle() { - const { horizontal: e } = this.state;return e ? { width: 50 } : {}; - }renderPullHeader() { - const { headerRefreshText: e, horizontal: t } = this.state;return t ? l.a.createElement(s.View, { style: { width: 40, height: 300, backgroundColor: '#4c9afa', justifyContent: 'center', alignItems: 'center' } }, l.a.createElement(s.Text, { style: { lineHeight: 25, color: 'white', width: 40, paddingHorizontal: 15 } }, e)) : l.a.createElement(s.View, { style: Ve.pullContainer }, l.a.createElement(s.Text, { style: Ve.pullContent }, e)); - }getFooterStyle() { - const { horizontal: e } = this.state;return e ? { width: 40 } : {}; - }renderPullFooter() { - const { horizontal: e } = this.state;return e ? l.a.createElement(s.View, { style: { width: 40, height: 300, backgroundColor: '#4c9afa', justifyContent: 'center', alignItems: 'center' } }, l.a.createElement(s.Text, { style: { color: 'white', lineHeight: 25, width: 40, paddingHorizontal: 15 } }, this.state.footerRefreshText)) : l.a.createElement(s.View, { style: Ve.pullFooter }, l.a.createElement(s.Text, { style: { color: 'white' } }, this.state.footerRefreshText)); - }renderRow(e) { - const { dataSource: t } = this.state;let n = null;const o = t[e]; const r = t.length === e + 1;switch (o.style) { - case 1:n = l.a.createElement(ye, { itemBean: o.itemBean, onClick: t => this.onClickItem(e, t) });break;case 2:n = l.a.createElement(Se, { itemBean: o.itemBean, onClick: t => this.onClickItem(e, t) });break;case 5:n = l.a.createElement(Ce, { itemBean: o.itemBean, onClick: t => this.onClickItem(e, t) }); - } return l.a.createElement(s.View, { style: Ve.container }, l.a.createElement(s.View, { style: Ve.itemContainer }, n), r ? null : l.a.createElement(s.View, { style: Ve.splitter })); - }getRowStyle() { - const { horizontal: e } = this.state;return e ? { height: 300, justifyContent: 'center', alignItems: 'center' } : {}; - }changeDirection() { - this.setState({ horizontal: void 0 === this.state.horizontal || void 0 }); - }render() { - const { dataSource: e, horizontal: t } = this.state;return l.a.createElement(s.View, { style: { flex: 1, collapsable: !1 } }, l.a.createElement(s.ListView, { horizontal: t, onClick: e => console.log('ListView', e.target.nodeId, e.currentTarget.nodeId), ref: (e) => { - this.listView = e; - }, style: [{ backgroundColor: '#ffffff' }, t ? { height: 300 } : { flex: 1 }], numberOfRows: e.length, getRowType: this.getRowType, getRowKey: this.getRowKey, getHeaderStyle: this.getHeaderStyle, getFooterStyle: this.getFooterStyle, getRowStyle: this.getRowStyle, renderRow: this.renderRow, renderPullHeader: this.renderPullHeader, renderPullFooter: this.renderPullFooter, onHeaderReleased: this.onHeaderReleased, onHeaderPulling: this.onHeaderPulling, onFooterReleased: this.onEndReached, onFooterPulling: this.onFooterPulling, rowShouldSticky: e => 0 === e }), 'android' === s.Platform.OS ? l.a.createElement(s.View, { onClick: () => this.changeDirection(), style: { position: 'absolute', right: 20, bottom: 20, width: 67, height: 67, borderRadius: 30, boxShadowOpacity: .6, boxShadowRadius: 5, boxShadowOffsetX: 3, boxShadowOffsetY: 3, boxShadowColor: '#4c9afa' } }, l.a.createElement(s.View, { style: { width: 60, height: 60, borderRadius: 30, backgroundColor: '#4c9afa', display: 'flex', justifyContent: 'center', alignItems: 'center' } }, l.a.createElement(s.Text, { style: { color: 'white' } }, '切换方向'))) : null); - } - } const Ie = s.StyleSheet.create({ itemStyle: { width: 100, height: 100, lineHeight: 100, borderWidth: 1, borderStyle: 'solid', borderColor: '#4c9afa', fontSize: 80, margin: 20, color: '#4c9afa', textAlign: 'center' }, verticalScrollView: { height: 300, width: 140, margin: 20, borderColor: '#eee', borderWidth: 1, borderStyle: 'solid' }, itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', borderColor: '#e0e0e0', borderRadius: 2, backgroundColor: '#fafafa', padding: 10, marginTop: 10 } });function De() { - return l.a.createElement(s.ScrollView, null, l.a.createElement(s.View, { style: Ie.itemTitle }, l.a.createElement(s.Text, null, 'Horizontal ScrollView')), l.a.createElement(s.View, null, l.a.createElement(s.ScrollView, { horizontal: !0, bounces: !0, showsHorizontalScrollIndicator: !1, showScrollIndicator: !1, onScroll: e => console.log('onScroll', e), onMomentumScrollBegin: e => console.log('onMomentumScrollBegin', e), onMomentumScrollEnd: e => console.log('onMomentumScrollEnd', e), onScrollBeginDrag: e => console.log('onScrollBeginDrag', e), onScrollEndDrag: e => console.log('onScrollEndDrag', e) }, l.a.createElement(s.Text, { style: Ie.itemStyle }, 'A'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'B'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'C'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'D'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'E'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'F'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'A'))), l.a.createElement(s.View, { style: Ie.itemTitle }, l.a.createElement(s.Text, null, 'Vertical ScrollView')), l.a.createElement(s.ScrollView, { bounces: !0, horizontal: !1, style: Ie.verticalScrollView, showScrollIndicator: !1, showsVerticalScrollIndicator: !1 }, l.a.createElement(s.Text, { style: Ie.itemStyle }, 'A'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'B'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'C'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'D'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'E'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'F'), l.a.createElement(s.Text, { style: Ie.itemStyle }, 'A'))); - } const Oe = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEXRSTlMA9QlZEMPc2Mmmj2VkLEJ4Rsx+pEgAAAChSURBVCjPjVLtEsMgCDOAdbbaNu//sttVPes+zvGD8wgQCLp/TORbUGMAQtQ3UBeSAMlF7/GV9Cmb5eTJ9R7H1t4bOqLE3rN2UCvvwpLfarhILfDjJL6WRKaXfzxc84nxAgLzCGSGiwKwsZUB8hPorZwUV1s1cnGKw+yAOrnI+7hatNIybl9Q3OkBfzopCw6SmDVJJiJ+yD451OS0/TNM7QnuAAbvCG0TSAAAAABJRU5ErkJggg=='; const Pe = 'https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif'; const Le = s.StyleSheet.create({ itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', borderColor: '#e0e0e0', borderRadius: 2, backgroundColor: '#fafafa', padding: 10, marginTop: 10 }, itemContent: { alignItems: 'flex-start', justifyContent: 'center', borderWidth: 1, borderStyle: 'solid', borderRadius: 2, borderColor: '#e0e0e0', backgroundColor: '#ffffff', padding: 10 }, normalText: { fontSize: 14, lineHeight: 18, color: 'black' }, buttonBar: { flexDirection: 'row', marginTop: 10, flexGrow: 1 }, button: { height: 24, borderColor: '#4c9afa', borderWidth: 1, borderStyle: 'solid', flexGrow: 1, flexShrink: 1 }, buttonText: { lineHeight: 24, textAlign: 'center', paddingHorizontal: 20 }, customFont: { color: '#0052d9', fontSize: 32, fontFamily: 'TTTGB' } });let je = 0;class Fe extends l.a.Component { - constructor(e) { - super(e), this.state = { fontSize: 16, textShadowColor: 'grey', textShadowOffset: { x: 1, y: 1 }, numberOfLines: 2, ellipsizeMode: void 0 }, this.incrementFontSize = this.incrementFontSize.bind(this), this.decrementFontSize = this.decrementFontSize.bind(this), this.incrementLine = this.incrementLine.bind(this), this.decrementLine = this.decrementLine.bind(this), this.changeMode = this.changeMode.bind(this); - }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 }); - }incrementLine() { - const { numberOfLines: e } = this.state;e < 6 && this.setState({ numberOfLines: e + 1 }); - }decrementLine() { - const { numberOfLines: e } = this.state;e > 1 && this.setState({ numberOfLines: e - 1 }); - }changeMode(e) { - this.setState({ ellipsizeMode: e }); - }changeBreakStrategy(e) { - this.setState({ breakStrategy: e }); - }render() { - const { fontSize: e, textShadowColor: t, textShadowOffset: n, numberOfLines: o, ellipsizeMode: r, breakStrategy: i } = this.state; const a = e => l.a.createElement(s.View, { style: Le.itemTitle }, l.a.createElement(s.Text, { style: !0 }, e));return l.a.createElement(s.ScrollView, { style: { paddingHorizontal: 10 } }, a('shadow'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 60 }], onClick: () => { - let e = 'red'; let t = { x: 10, y: 1 };je % 2 == 1 && (e = 'grey', t = { x: 1, y: 1 }), je += 1, this.setState({ textShadowColor: e, textShadowOffset: t }); - } }, l.a.createElement(s.Text, { style: [Le.normalText, { color: '#242424', textShadowOffset: n, textShadowRadius: 3, textShadowColor: t }] }, 'Text shadow is grey with radius 3 and offset 1')), a('color'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 80 }] }, l.a.createElement(s.Text, { style: [Le.normalText, { color: '#242424' }] }, 'Text color is black'), l.a.createElement(s.Text, { style: [Le.normalText, { color: 'blue' }] }, 'Text color is blue'), l.a.createElement(s.Text, { style: [Le.normalText, { color: 'rgb(228,61,36)' }] }, 'This is red')), a('fontSize'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { style: [Le.normalText, { fontSize: e }] }, `Text fontSize is ${e}`), l.a.createElement(s.View, { style: Le.button, onClick: this.incrementFontSize }, l.a.createElement(s.Text, { style: Le.buttonText }, '放大字体')), l.a.createElement(s.View, { style: Le.button, onClick: this.decrementFontSize }, l.a.createElement(s.Text, { style: Le.buttonText }, '缩小字体'))), a('fontStyle'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { style: [Le.normalText, { fontStyle: 'normal' }] }, 'Text fontStyle is normal'), l.a.createElement(s.Text, { style: [Le.normalText, { fontStyle: 'italic' }] }, 'Text fontStyle is italic')), a('numberOfLines and ellipsizeMode'), l.a.createElement(s.View, { style: [Le.itemContent] }, l.a.createElement(s.Text, { style: [Le.normalText, { marginBottom: 10 }] }, `numberOfLines=${o} | ellipsizeMode=${r}`), l.a.createElement(s.Text, { numberOfLines: o, ellipsizeMode: r, style: [Le.normalText, { lineHeight: void 0, backgroundColor: '#4c9afa', marginBottom: 10, paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Text, { style: { fontSize: 19, color: 'white' } }, '先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。'), l.a.createElement(s.Text, null, '然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。')), l.a.createElement(s.Text, { numberOfLines: o, ellipsizeMode: r, style: [Le.normalText, { backgroundColor: '#4c9afa', marginBottom: 10, color: 'white', paddingHorizontal: 10, paddingVertical: 5 }] }, 'line 1\n\nline 3\n\nline 5'), l.a.createElement(s.Text, { numberOfLines: o, ellipsizeMode: r, style: [Le.normalText, { lineHeight: void 0, backgroundColor: '#4c9afa', marginBottom: 10, paddingHorizontal: 10, paddingVertical: 5, verticalAlign: 'middle' }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24 }, source: { uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEnRSTlMA/QpX7WQU2m27pi3Ej9KEQXaD5HhjAAAAqklEQVQoz41SWxLDIAh0RcFXTHL/yzZSO01LMpP9WJEVUNA9gfdXTioCSKE/kQQTQmf/ArRYva+xAcuPP37seFII2L7FN4BmXdHzlEPIpDHiZ0A7eIViPcw2QwqipkvMSdNEFBUE1bmMNOyE7FyFaIkAP4jHhhG80lvgkzBODTKpwhRMcexuR7fXzcp08UDq6GRbootp4oRtO3NNpd4NKtnR9hB6oaefweIFQU0EfnGDRoQAAAAASUVORK5CYII=' } }), l.a.createElement(s.Text, null, 'Text + Attachment')), l.a.createElement(s.View, { style: Le.buttonBar }, l.a.createElement(s.View, { style: Le.button, onClick: this.incrementLine }, l.a.createElement(s.Text, { style: Le.buttonText }, '加一行')), l.a.createElement(s.View, { style: Le.button, onClick: this.decrementLine }, l.a.createElement(s.Text, { style: Le.buttonText }, '减一行'))), l.a.createElement(s.View, { style: Le.buttonBar }, l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeMode('clip') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'clip')), l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeMode('head') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'head')), l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeMode('middle') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'middle')), l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeMode('tail') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'tail')))), a('textDecoration'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.normalText, { textDecorationLine: 'underline', textDecorationStyle: 'dotted' }] }, 'underline'), l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.normalText, { textDecorationLine: 'line-through', textDecorationColor: 'red' }] }, 'line-through')), a('LetterSpacing'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.normalText, { letterSpacing: -1 }] }, 'Text width letter-spacing -1'), l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.normalText, { letterSpacing: 5 }] }, 'Text width letter-spacing 5')), a('Nest Text'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 3 }, l.a.createElement(s.Text, { numberOfLines: 3, style: [Le.normalText, { color: '#4c9afa' }] }, '#SpiderMan#'), l.a.createElement(s.Text, { numberOfLines: 3, style: Le.normalText }, 'Hello world, I am a spider man and I have five friends in other universe.'))), a('Custom font'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: Le.customFont }, 'Hippy 跨端框架')), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.customFont, { fontWeight: 'bold' }] }, 'Hippy 跨端框架 粗体')), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.customFont, { fontStyle: 'italic' }] }, 'Hippy 跨端框架 斜体')), l.a.createElement(s.View, { style: [Le.itemContent, { height: 100 }] }, l.a.createElement(s.Text, { numberOfLines: 1, style: [Le.customFont, { fontWeight: 'bold', fontStyle: 'italic' }] }, 'Hippy 跨端框架 粗斜体')), a('Text Nested'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 150 }] }, l.a.createElement(s.Text, { style: { height: 100, lineHeight: 50 } }, l.a.createElement(s.Text, { numberOfLines: 1, style: Le.normalText }, '后面有张图片'), l.a.createElement(s.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' } }), l.a.createElement(s.Text, { numberOfLines: 1, style: Le.customFont }, '前面有张图片')), l.a.createElement(s.View, { style: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', paddingHorizontal: 10, paddingVertical: 5, backgroundColor: '#4c9afa' } }, l.a.createElement(s.Image, { style: { width: 24, height: 24, alignSelf: 'center' }, source: { uri: Oe } }), l.a.createElement(s.Text, { style: { fontSize: 15, alignItems: 'center', justifyContent: 'center' } }, 'Image+Text'))), 'android' === s.Platform.OS && a('breakStrategy'), 'android' === s.Platform.OS && l.a.createElement(s.View, { style: Le.itemContent }, l.a.createElement(s.Text, { style: [Le.normalText, { borderWidth: 1, borderColor: 'gray' }], breakStrategy: i }, 'The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales.'), l.a.createElement(s.Text, { style: Le.normalText }, `breakStrategy: ${i}`), l.a.createElement(s.View, { style: Le.buttonBar }, l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeBreakStrategy('simple') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'simple')), l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeBreakStrategy('high_quality') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'high_quality')), l.a.createElement(s.View, { style: Le.button, onClick: () => this.changeBreakStrategy('balanced') }, l.a.createElement(s.Text, { style: Le.buttonText }, 'balanced')))), a('verticalAlign'), l.a.createElement(s.View, { style: [Le.itemContent, { height: 'android' === s.Platform.OS ? 160 : 70 }] }, l.a.createElement(s.Text, { style: [Le.normalText, { lineHeight: 50, backgroundColor: '#4c9afa', paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'top' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 18, height: 12, verticalAlign: 'middle' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 12, verticalAlign: 'baseline' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 36, height: 24, verticalAlign: 'bottom' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'top' }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 18, height: 12, verticalAlign: 'middle' }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 24, height: 12, verticalAlign: 'baseline' }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 36, height: 24, verticalAlign: 'bottom' }, source: { uri: Pe } }), l.a.createElement(s.Text, { style: { fontSize: 16, verticalAlign: 'top' } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16, verticalAlign: 'middle' } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16, verticalAlign: 'baseline' } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16, verticalAlign: 'bottom' } }, '字')), 'android' === s.Platform.OS && l.a.createElement(l.a.Fragment, null, l.a.createElement(s.Text, null, 'legacy mode:'), l.a.createElement(s.Text, { style: [Le.normalText, { lineHeight: 50, backgroundColor: '#4c9afa', marginBottom: 10, paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlignment: 0 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 18, height: 12, verticalAlignment: 1 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 12, verticalAlignment: 2 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 36, height: 24, verticalAlignment: 3 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, top: -10 }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 18, height: 12, top: -5 }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 24, height: 12 }, source: { uri: Pe } }), l.a.createElement(s.Image, { style: { width: 36, height: 24, top: 3 }, source: { uri: Pe } }), l.a.createElement(s.Text, { style: { fontSize: 16 } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16 } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16 } }, '字'), l.a.createElement(s.Text, { style: { fontSize: 16 } }, '字')))), a('tintColor & backgroundColor'), l.a.createElement(s.View, { style: [Le.itemContent] }, l.a.createElement(s.Text, { style: [Le.normalText, { lineHeight: 30, backgroundColor: '#4c9afa', paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'middle', tintColor: 'orange' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'middle', tintColor: 'orange', backgroundColor: '#ccc' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'middle', backgroundColor: '#ccc' }, source: { uri: Oe } }), l.a.createElement(s.Text, { style: { verticalAlign: 'middle', backgroundColor: '#090' } }, 'text')), 'android' === s.Platform.OS && l.a.createElement(l.a.Fragment, null, l.a.createElement(s.Text, null, 'legacy mode:'), l.a.createElement(s.Text, { style: [Le.normalText, { lineHeight: 30, backgroundColor: '#4c9afa', marginBottom: 10, paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, tintColor: 'orange' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, tintColor: 'orange', backgroundColor: '#ccc' }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, backgroundColor: '#ccc' }, source: { uri: Oe } })))), a('margin'), l.a.createElement(s.View, { style: [Le.itemContent] }, l.a.createElement(s.Text, { style: [{ lineHeight: 50, backgroundColor: '#4c9afa', marginBottom: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'top', backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'middle', backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'baseline', backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlign: 'bottom', backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } })), 'android' === s.Platform.OS && l.a.createElement(l.a.Fragment, null, l.a.createElement(s.Text, null, 'legacy mode:'), l.a.createElement(s.Text, { style: [Le.normalText, { lineHeight: 50, backgroundColor: '#4c9afa', marginBottom: 10, paddingHorizontal: 10, paddingVertical: 5 }] }, l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlignment: 0, backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlignment: 1, backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlignment: 2, backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }), l.a.createElement(s.Image, { style: { width: 24, height: 24, verticalAlignment: 3, backgroundColor: '#ccc', margin: 5 }, source: { uri: Oe } }))))); - } - } const ze = s.StyleSheet.create({ container_style: { padding: 10 }, input_style: { width: 300, marginVertical: 10, fontSize: 16, color: '#242424', height: 30, lineHeight: 30 }, input_style_block: { height: 100, lineHeight: 20, fontSize: 15, borderWidth: 1, borderColor: 'gray', underlineColorAndroid: 'transparent' }, itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', borderColor: '#e0e0e0', borderRadius: 2, backgroundColor: '#fafafa', padding: 10, marginTop: 10 }, itemContent: { marginTop: 10 }, buttonBar: { flexDirection: 'row', marginTop: 10, flexGrow: 1 }, button: { width: 200, height: 24, borderColor: '#4c9afa', borderWidth: 1, borderStyle: 'solid', marginTop: 5, marginBottom: 5, flexGrow: 1, flexShrink: 1 } });class Be extends a.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(); - } async onFocus() { - const e = await this.input.isFocused();this.setState({ event: 'onFocus', isFocused: e }); - } async onBlur() { - const e = await this.input.isFocused();this.setState({ event: 'onBlur', isFocused: e }); - }changeBreakStrategy(e) { - this.setState({ breakStrategy: e }); - }render() { - const { textContent: e, event: t, isFocused: n, breakStrategy: o } = this.state; const r = e => l.a.createElement(s.View, { style: ze.itemTitle }, l.a.createElement(s.Text, null, e));return l.a.createElement(s.ScrollView, { style: ze.container_style }, r('text'), l.a.createElement(s.TextInput, { ref: (e) => { - this.input = e; - }, style: ze.input_style, caretColor: 'yellow', underlineColorAndroid: 'grey', placeholderTextColor: '#4c9afa', placeholder: 'text', defaultValue: e, onBlur: () => this.onBlur(), onFocus: () => this.onFocus() }), l.a.createElement(s.Text, { style: ze.itemContent }, `事件: ${t} | isFocused: ${n}`), l.a.createElement(s.View, { style: ze.button, onClick: this.changeInputContent }, l.a.createElement(s.Text, null, '点击改变输入框内容')), l.a.createElement(s.View, { style: ze.button, onClick: this.focus }, l.a.createElement(s.Text, null, 'Focus')), l.a.createElement(s.View, { style: ze.button, onClick: this.blur }, l.a.createElement(s.Text, null, 'Blur')), r('numeric'), l.a.createElement(s.TextInput, { style: ze.input_style, keyboardType: 'numeric', placeholder: 'numeric' }), r('phone-pad'), l.a.createElement(s.TextInput, { style: ze.input_style, keyboardType: 'phone-pad', placeholder: 'phone-pad' }), r('password'), l.a.createElement(s.TextInput, { style: ze.input_style, keyboardType: 'password', placeholder: 'Password', multiline: !1 }), r('maxLength'), l.a.createElement(s.TextInput, { caretColor: 'yellow', style: ze.input_style, placeholder: 'maxLength=5', maxLength: 5 }), 'android' === s.Platform.OS && r('breakStrategy'), 'android' === s.Platform.OS && l.a.createElement(l.a.Fragment, null, l.a.createElement(s.TextInput, { style: ze.input_style_block, breakStrategy: o, defaultValue: 'The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales.' }), l.a.createElement(s.Text, { style: {} }, `breakStrategy: ${o}`), l.a.createElement(s.View, { style: ze.buttonBar }, l.a.createElement(s.View, { style: ze.button, onClick: () => this.changeBreakStrategy('simple') }, l.a.createElement(s.Text, { style: ze.buttonText }, 'simple')), l.a.createElement(s.View, { style: ze.button, onClick: () => this.changeBreakStrategy('high_quality') }, l.a.createElement(s.Text, { style: ze.buttonText }, 'high_quality')), l.a.createElement(s.View, { style: ze.button, onClick: () => this.changeBreakStrategy('balanced') }, l.a.createElement(s.Text, { style: ze.buttonText }, 'balanced'))))); - } - } const Me = `${n.p}assets/defaultSource.jpg`;const _e = s.StyleSheet.create({ itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', 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, borderStyle: 'solid', padding: 10, marginVertical: 10 }, smallRectangle: { width: 40, height: 40, borderRadius: 10 } });function He() { - const e = e => l.a.createElement(s.View, { style: _e.itemTitle }, l.a.createElement(s.Text, null, e));return l.a.createElement(s.ScrollView, { style: { paddingHorizontal: 10 } }, e('backgroundColor'), l.a.createElement(s.View, { style: [_e.rectangle, { backgroundColor: '#4c9afa' }] }), e('backgroundImage'), l.a.createElement(s.View, { style: [_e.rectangle, { alignItems: 'center', justifyContent: 'center', marginTop: 20, backgroundImage: Me }], accessible: !0, accessibilityLabel: '背景图', accessibilityRole: 'image', accessibilityState: { disabled: !1, selected: !0, checked: !1, expanded: !1, busy: !0 }, accessibilityValue: { min: 1, max: 10, now: 5, text: 'middle' } }, l.a.createElement(s.Text, { style: { color: 'white' } }, '背景图')), e('backgroundImage linear-gradient'), l.a.createElement(s.View, { style: [_e.rectangle, { alignItems: 'center', justifyContent: 'center', marginTop: 20, borderWidth: 2, borderStyle: 'solid', borderColor: 'black', borderRadius: 2, backgroundImage: 'linear-gradient(30deg, blue 10%, yellow 40%, red 50%);' }] }, l.a.createElement(s.Text, { style: { color: 'white' } }, '渐变色')), e('border props'), l.a.createElement(s.View, { style: [_e.rectangle, { borderColor: '#242424', borderRadius: 4, borderWidth: 1, borderStyle: 'solid' }] }), e('flex props'), l.a.createElement(s.View, { style: [_e.bigRectangle, { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }] }, l.a.createElement(s.View, { style: [_e.smallRectangle, { backgroundColor: 'yellow' }] }), l.a.createElement(s.View, { style: [_e.smallRectangle, { backgroundColor: 'blue' }] }), l.a.createElement(s.View, { style: [_e.smallRectangle, { backgroundColor: 'green' }] }))); - } const We = s.StyleSheet.create({ pageContainer: { alignItems: 'center', justifyContent: 'center', flex: 1, paddingTop: 20 }, mainRec: { backgroundColor: '#4c9afaAA', width: 256, height: 48, marginBottom: 10, marginTop: 156 }, title: { verticalAlign: 'middle', lineHeight: 48, height: 48, fontSize: 16, color: 'white', alignSelf: 'center' }, shapeBase: { width: 128, height: 128, backgroundColor: '#4c9afa' }, square: {}, circle: { borderRadius: 64 }, triangle: { borderStyle: 'solid', borderTopWidth: 0, borderRightWidth: 70, borderBottomWidth: 128, borderLeftWidth: 70, borderTopColor: 'transparent', borderRightColor: 'transparent', borderLeftColor: 'transparent', borderBottomColor: '#4c9afa', backgroundColor: 'transparent', width: 140 } }); const Ne = 'SquarePagerView'; const Ke = 'TrianglePagerView'; const Ue = 'CirclePagerView';function Ge(e, t) { - const n = t => l.a.createElement(s.View, { style: We.pageContainer, key: t }, l.a.createElement(s.View, { style: [We.shapeBase, e], key: 'shape' }), l.a.createElement(s.View, { style: We.mainRec, key: 'title' }, t ? l.a.createElement(s.Text, { style: We.title }, t) : null));return n.displayName = t, n; - } const qe = Ge(We.square, Ne); const Qe = Ge(We.triangle, Ke); const Ye = Ge(We.circle, Ue); const Xe = s.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 Je extends l.a.Component { - constructor(e) { - super(e), H()(this, 'state', { selectedIndex: 0 }), this.onPageSelected = this.onPageSelected.bind(this), this.onPageScrollStateChanged = this.onPageScrollStateChanged.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 l.a.createElement(s.View, { style: { flex: 1, backgroundColor: '#ffffff' } }, l.a.createElement(s.View, { style: Xe.buttonContainer }, l.a.createElement(s.View, { style: Xe.button, onClick: () => { - this.viewpager.setPage(2); - } }, l.a.createElement(s.Text, { style: Xe.buttonText }, '动效滑到第3页')), l.a.createElement(s.View, { style: Xe.button, onClick: () => this.viewpager.setPageWithoutAnimation(0) }, l.a.createElement(s.Text, { style: Xe.buttonText }, '直接滑到第1页'))), l.a.createElement(s.ViewPager, { ref: (e) => { - this.viewpager = e; - }, style: Xe.container, initialPage: 0, keyboardDismissMode: 'none', scrollEnabled: !0, onPageSelected: this.onPageSelected, onPageScrollStateChanged: this.onPageScrollStateChanged, onPageScroll: this.onPageScroll }, [qe('squarePager'), Qe('TrianglePager'), Ye('CirclePager')]), l.a.createElement(s.View, { style: Xe.dotContainer }, new Array(3).fill(0) - .map((t, n) => { - const o = n === e;return l.a.createElement(s.View, { style: [Xe.dot, o ? Xe.selectDot : null], key: `dot_${n}` }); - }))); - } - } const Ze = s.StyleSheet.create({ itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', borderColor: '#e0e0e0', borderRadius: 2, backgroundColor: '#fafafa', padding: 10, marginTop: 10 }, webViewStyle: { padding: 10, flex: 1, flexGrow: 1, borderRadius: 10 } });function $e() { - return l.a.createElement(s.View, { style: { paddingHorizontal: 10, flex: 1 } }, l.a.createElement(s.View, { style: Ze.itemTitle }, l.a.createElement(s.Text, null, 'WebView 示例')), l.a.createElement(s.WebView, { source: { uri: 'https://hippyjs.org' }, method: 'get', userAgent: 'Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36', style: Ze.webViewStyle, onLoad: ({ url: e }) => console.log('webview onload', e), onLoadStart: ({ url: e }) => console.log('webview onLoadStart', e), onLoadEnd: ({ url: e, success: t, error: n }) => console.log('webview onLoadEnd', e, t, n) })); - } const et = s.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' } }); const tt = s.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 nt() { - return l.a.createElement(s.View, { style: et.shadowDemo }, 'android' === s.Platform.OS ? l.a.createElement(s.View, { style: et.shadowDemoCubeAndroid }, l.a.createElement(s.View, { style: et.shadowDemoContentAndroid }, l.a.createElement(s.Text, { style: et.text }, '没有偏移阴影样式'))) : l.a.createElement(s.View, { style: et.shadowDemoCubeIos }, l.a.createElement(s.View, { style: et.shadowDemoContentIos }, l.a.createElement(s.Text, { style: et.text }, '没有偏移阴影样式'))), 'android' === s.Platform.OS ? l.a.createElement(s.View, { style: tt.shadowDemoCubeAndroid }, l.a.createElement(s.View, { style: tt.shadowDemoContentAndroid }, l.a.createElement(s.Text, { style: tt.text }, '偏移阴影样式'))) : l.a.createElement(s.View, { style: tt.shadowDemoCubeIos }, l.a.createElement(s.View, { style: tt.shadowDemoContentIos }, l.a.createElement(s.Text, { style: tt.text }, '偏移阴影样式')))); - } const ot = ce.filter(e => 2 !== e.style); const rt = s.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: 50, backgroundColor: '#4c9afa' }, pullContent: { lineHeight: 50, color: 'white', height: 50, textAlign: 'center' }, pullFooter: { flex: 1, height: 40, backgroundColor: '#4c9afa', justifyContent: 'center', alignItems: 'center' } });class it extends l.a.Component { - constructor(e) { - super(e), this.state = { dataSource: [], pullingText: '继续下拉触发刷新', loadingState: '正在加载...' }, this.numberOfColumns = 2, this.columnSpacing = 6, this.interItemSpacing = 6, this.mockFetchData = this.mockFetchData.bind(this), this.renderItem = this.renderItem.bind(this), this.getItemType = this.getItemType.bind(this), this.getItemKey = this.getItemKey.bind(this), this.onEndReached = this.onEndReached.bind(this), this.onRefresh = this.onRefresh.bind(this), this.getRefresh = this.getRefresh.bind(this), this.renderPullFooter = this.renderPullFooter.bind(this), this.renderBanner = this.renderBanner.bind(this), this.getItemStyle = this.getItemStyle.bind(this); - } async componentDidMount() { - const e = await this.mockFetchData();this.setState({ dataSource: e }); - } async onEndReached() { - const { dataSource: e } = this.state;if (this.loadMoreDataFlag) return;this.loadMoreDataFlag = !0, this.setState({ loadingState: '加载更多...' });let t = [];try { - t = await this.mockFetchData(); - } catch (e) {}0 === t.length && this.setState({ loadingState: '没有更多数据' });const n = [...e, ...t];this.setState({ dataSource: n }), this.loadMoreDataFlag = !1; - }renderPullFooter() { - return 0 === this.state.dataSource.length ? null : l.a.createElement(s.View, { style: rt.pullFooter }, l.a.createElement(s.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 l.a.createElement(s.View, { style: { flex: 1, height: 40, justifyContent: 'center', alignItems: 'center', backgroundColor: '#4c9afa' } }, l.a.createElement(s.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 0 === this.state.dataSource.length ? null : l.a.createElement(s.View, { style: { backgroundColor: 'grey', height: 100, justifyContent: 'center', alignItems: 'center' } }, l.a.createElement(s.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 = l.a.createElement(ye, { itemBean: o.itemBean });break;case 2:n = l.a.createElement(Se, { itemBean: o.itemBean });break;case 5:n = l.a.createElement(Ce, { itemBean: o.itemBean }); - } return l.a.createElement(s.View, { onClick: () => this.onItemClick(e), style: rt.container }, l.a.createElement(s.View, { style: rt.itemContainer }, n), l.a.createElement(s.View, { style: rt.splitter })); - }mockFetchData() { - return new Promise((e) => { - setTimeout(() => { - const t = [...ot, ...ot];return e(t); - }, 600); - }); - }getWaterfallContentInset() { - return { top: 0, left: 5, bottom: 0, right: 5 }; - }getItemStyle() { - const { numberOfColumns: e, columnSpacing: t } = this; const n = s.Dimensions.get('screen').width; const o = this.getWaterfallContentInset();return { width: (n - o.left - o.right - (e - 1) * t) / e }; - }render() { - const { dataSource: e } = this.state; const { numberOfColumns: t, columnSpacing: n, interItemSpacing: o } = this; const r = this.getWaterfallContentInset();return l.a.createElement(s.RefreshWrapper, { ref: (e) => { - this.refresh = e; - }, style: { flex: 1 }, onRefresh: this.onRefresh, bounceTime: 100, getRefresh: this.getRefresh }, l.a.createElement(s.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 at = `${n.p}assets/defaultSource.jpg`;function lt(e, t) { - const n = Object.keys(e);if (Object.getOwnPropertySymbols) { - let o = Object.getOwnPropertySymbols(e);t && (o = o.filter((t => Object.getOwnPropertyDescriptor(e, t).enumerable))), n.push.apply(n, o); - } return n; - } function st(e) { - for (let t = 1;t < arguments.length;t++) { - var n = null != arguments[t] ? arguments[t] : {};t % 2 ? lt(Object(n), !0).forEach(((t) => { - H()(e, t, n[t]); - })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : lt(Object(n)).forEach(((t) => { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); - })); - } return e; - } const ct = { borderless: !1 };function ht(e) { - const [t, n] = Object(a.useState)(0); const [o, r] = Object(a.useState)(0); const i = Object(a.useRef)(null); const c = () => { - i.current.setPressed(!1); - }; const { nativeBackgroundAndroid: h, style: u } = e;return l.a.createElement(s.View, { onLayout: () => { - s.UIManagerModule.measureInAppWindow(i.current, (e) => { - n(e.x), r(e.y); - }); - }, style: u, onTouchDown: (e) => { - i.current.setHotspot(e.page_x - t, e.page_y - o), i.current.setPressed(!0); - }, onTouchEnd: c, onTouchCancel: c, ref: i, nativeBackgroundAndroid: st(st({}, ct), h) }, e.children); - } const ut = s.StyleSheet.create({ imgRectangle: { width: 260, height: 56, alignItems: 'center', justifyContent: 'center' }, circleRipple: { marginTop: 30, width: 150, height: 56, alignItems: 'center', justifyContent: 'center', borderWidth: 3, borderStyle: 'solid', borderColor: '#4c9afa' }, squareRipple: { alignItems: 'center', justifyContent: 'center', width: 150, height: 150, backgroundColor: '#4c9afa', marginTop: 30, borderRadius: 12, overflow: 'hidden' }, squareRippleWrapper: { alignItems: 'flex-start', justifyContent: 'center', height: 150, marginTop: 30 }, squareRipple1: { alignItems: 'center', justifyContent: 'center', width: 150, height: 150, borderWidth: 5, borderStyle: 'solid', backgroundSize: 'cover', borderColor: '#4c9afa', backgroundImage: at, paddingHorizontal: 10 }, squareRipple2: { alignItems: 'center', justifyContent: 'center', width: 150, height: 150, paddingHorizontal: 10, backgroundSize: 'cover', backgroundImage: 'https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png' } });function dt() { - return 'ios' === s.Platform.OS ? l.a.createElement(s.Text, null, 'iOS暂未支持水波纹效果') : l.a.createElement(s.ScrollView, { style: { margin: 10, flex: 1 } }, l.a.createElement(s.View, { style: [ut.imgRectangle, { marginTop: 20, backgroundImage: at, backgroundSize: 'cover' }] }, l.a.createElement(ht, { style: [ut.imgRectangle], nativeBackgroundAndroid: { borderless: !0, color: '#666666' } }, l.a.createElement(s.Text, { style: { color: 'white', maxWidth: 200 } }, '外层背景图,内层无边框水波纹,受外层影响始终有边框'))), l.a.createElement(ht, { style: [ut.circleRipple], nativeBackgroundAndroid: { borderless: !0, color: '#666666', rippleRadius: 100 } }, l.a.createElement(s.Text, { style: { color: 'black', textAlign: 'center' } }, '无边框圆形水波纹')), l.a.createElement(ht, { style: [ut.squareRipple], nativeBackgroundAndroid: { borderless: !1, color: '#666666' } }, l.a.createElement(s.Text, { style: { color: '#fff' } }, '带背景色水波纹')), l.a.createElement(s.View, { style: [ut.squareRippleWrapper] }, l.a.createElement(ht, { style: [ut.squareRipple1], nativeBackgroundAndroid: { borderless: !1, color: '#666666' } }, l.a.createElement(s.Text, { style: { color: 'white' } }, '有边框水波纹,带本地底图效果'))), l.a.createElement(s.View, { style: [ut.squareRippleWrapper] }, l.a.createElement(ht, { style: [ut.squareRipple2], nativeBackgroundAndroid: { borderless: !1, color: '#666666' } }, l.a.createElement(s.Text, { style: { color: 'black' } }, '有边框水波纹,带网络底图效果')))); - } const mt = '#4c9afa'; const gt = '#f44837'; const ft = s.StyleSheet.create({ container: { paddingHorizontal: 10 }, square: { width: 80, height: 80, backgroundColor: gt }, showArea: { height: 150, marginVertical: 10 }, button: { borderColor: mt, borderWidth: 2, borderStyle: 'solid', justifyContent: 'center', alignItems: 'center', width: 70, borderRadius: 8, height: 50, marginTop: 20, marginRight: 8 }, buttonText: { fontSize: 20, color: mt, textAlign: 'center', textAlignVertical: 'center' }, colorText: { fontSize: 14, color: 'white', textAlign: 'center', textAlignVertical: 'center' }, buttonContainer: { flexDirection: 'row', alignItems: 'center' }, title: { fontSize: 24, marginTop: 8 } });class yt extends l.a.Component { - constructor(e) { - super(e), this.state = {}; - }componentWillMount() { - this.horizonAnimation = new s.Animation({ startValue: 150, toValue: 20, duration: 1e3, delay: 500, mode: 'timing', timingFunction: 'linear', repeatCount: 'loop' }), this.verticalAnimation = new s.Animation({ startValue: 80, toValue: 40, duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'linear', repeatCount: 'loop' }), this.scaleAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 1, toValue: 1.2, duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 1.2, toValue: .2, duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.rotateAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 0, toValue: 180, duration: 2e3, delay: 0, valueType: 'deg', mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 180, toValue: 360, duration: 2e3, delay: 0, valueType: 'deg', mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.skewXAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 0, toValue: 20, duration: 2e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 20, toValue: 0, duration: 2e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.skewYAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 0, toValue: 20, duration: 2e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 20, toValue: 0, duration: 2e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.bgColorAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 'red', toValue: 'yellow', valueType: 'color', duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 'yellow', toValue: 'blue', duration: 1e3, valueType: 'color', delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.txtColorAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 'white', toValue: 'yellow', valueType: 'color', duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !1 }, { animation: new s.Animation({ startValue: 'yellow', toValue: 'white', duration: 1e3, valueType: 'color', delay: 0, mode: 'timing', timingFunction: 'linear' }), follow: !0 }], repeatCount: 'loop' }), this.cubicBezierScaleAnimationSet = new s.AnimationSet({ children: [{ animation: new s.Animation({ startValue: 0, toValue: 1, duration: 1e3, delay: 0, mode: 'timing', timingFunction: 'cubic-bezier(.45,2.84,.38,.5)' }), follow: !1 }, { animation: new s.Animation({ startValue: 1, toValue: 0, duration: 1e3, mode: 'timing', timingFunction: 'cubic-bezier(.17,1.45,.78,.14)' }), follow: !0 }], repeatCount: 'loop' }); - }componentDidMount() { - 'web' === s.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.txtColorAnimationSet.setRef(this.textColorRef), this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef), this.rotateAnimationSet.setRef(this.rotateRef), this.skewXAnimationSet.setRef(this.skewRef), this.skewYAnimationSet.setRef(this.skewRef)), this.horizonAnimation.onAnimationStart(() => { - console.log('on animation start!!!'); - }), this.horizonAnimation.onAnimationEnd(() => { - console.log('on animation end!!!'); - }), this.horizonAnimation.onAnimationCancel(() => { - console.log('on animation cancel!!!'); - }), this.horizonAnimation.onAnimationRepeat(() => { - console.log('on animation repeat!!!'); - }); - }componentWillUnmount() { - this.horizonAnimation && this.horizonAnimation.destroy(), this.verticalAnimation && this.verticalAnimation.destroy(), this.scaleAnimationSet && this.scaleAnimationSet.destroy(), this.bgColorAnimationSet && this.bgColorAnimationSet.destroy(), this.txtColorAnimationSet && this.txtColorAnimationSet.destroy(), this.cubicBezierScaleAnimationSet && this.cubicBezierScaleAnimationSet.destroy(), this.rotateAnimationSet && this.rotateAnimationSet.destroy(), this.skewXAnimationSet && this.skewXAnimationSet.destroy(), this.skewYAnimationSet && this.skewYAnimationSet.destroy(); - }render() { - return l.a.createElement(s.ScrollView, { style: ft.container }, l.a.createElement(s.Text, { style: ft.title }, '水平位移动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.horizonAnimation.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.horizonAnimation.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.horizonAnimation.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.horizonAnimation.updateAnimation({ startValue: 50, toValue: 100 }); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '更新'))), l.a.createElement(s.View, { style: ft.showArea }, l.a.createElement(s.View, { ref: (e) => { - this.horizonRef = e; - }, style: [ft.square, { transform: [{ translateX: this.horizonAnimation }] }] })), l.a.createElement(s.Text, { style: ft.title }, '高度形变动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.verticalAnimation.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.verticalAnimation.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.verticalAnimation.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: ft.showArea }, l.a.createElement(s.View, { ref: (e) => { - this.verticalRef = e; - }, style: [ft.square, { height: this.verticalAnimation }] })), l.a.createElement(s.Text, { style: ft.title }, '旋转动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.rotateAnimationSet.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.rotateAnimationSet.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.rotateAnimationSet.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: ft.showArea }, l.a.createElement(s.View, { ref: (e) => { - this.rotateRef = e; - }, style: [ft.square, { transform: [{ rotate: this.rotateAnimationSet }] }] })), l.a.createElement(s.Text, { style: ft.title }, '倾斜动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.skewXAnimationSet.start(), this.skewYAnimationSet.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.skewXAnimationSet.pause(), this.skewYAnimationSet.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.skewXAnimationSet.resume(), this.skewYAnimationSet.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: ft.showArea }, l.a.createElement(s.View, { ref: (e) => { - this.skewRef = e; - }, style: [ft.square, { transform: [{ skewX: this.skewXAnimationSet }, { skewY: this.skewYAnimationSet }] }] })), l.a.createElement(s.Text, { style: ft.title }, '缩放动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.scaleAnimationSet.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.scaleAnimationSet.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.scaleAnimationSet.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: [ft.showArea, { marginVertical: 20 }] }, l.a.createElement(s.View, { ref: (e) => { - this.scaleRef = e; - }, style: [ft.square, { transform: [{ scale: this.scaleAnimationSet }] }] })), l.a.createElement(s.Text, { style: ft.title }, '颜色渐变动画(文字渐变仅Android支持)'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.bgColorAnimationSet.start(), this.txtColorAnimationSet.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.bgColorAnimationSet.pause(), this.txtColorAnimationSet.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.bgColorAnimationSet.resume(), this.txtColorAnimationSet.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: [ft.showArea, { marginVertical: 20 }] }, l.a.createElement(s.View, { ref: (e) => { - this.bgColorRef = e; - }, style: [ft.square, { justifyContent: 'center', alignItems: 'center' }, { backgroundColor: this.bgColorAnimationSet }] }, l.a.createElement(s.Text, { ref: (e) => { - this.textColorRef = e; - }, style: [ft.colorText, { color: 'android' === s.Platform.OS ? this.txtColorAnimationSet : 'white' }] }, '颜色渐变背景和文字'))), l.a.createElement(s.Text, { style: ft.title }, '贝塞尔曲线动画'), l.a.createElement(s.View, { style: ft.buttonContainer }, l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.cubicBezierScaleAnimationSet.start(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '开始')), l.a.createElement(s.View, { style: [ft.button], onClick: () => { - this.cubicBezierScaleAnimationSet.pause(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '暂停')), l.a.createElement(s.View, { style: ft.button, onClick: () => { - this.cubicBezierScaleAnimationSet.resume(); - } }, l.a.createElement(s.Text, { style: ft.buttonText }, '继续'))), l.a.createElement(s.View, { style: [ft.showArea, { marginVertical: 20 }] }, l.a.createElement(s.View, { ref: (e) => { - this.cubicBezierScaleRef = e; - }, style: [ft.square, { transform: [{ scale: this.cubicBezierScaleAnimationSet }] }] }))); - } - } const pt = s.StyleSheet.create({ containerStyle: { margin: 20, alignItems: 'center', flexDirection: 'column' }, itemGroupStyle: { flexDirection: 'row', marginTop: 10, borderColor: '#4c9afa', borderWidth: 1, borderStyle: 'solid', 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 bt extends l.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 && s.AsyncStorage.setItem(e, t); - }onClickGet() { - const { key: e } = this.state;e && s.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 l.a.createElement(s.ScrollView, { style: pt.containerStyle }, l.a.createElement(s.View, { style: pt.viewGroupStyle }, l.a.createElement(s.Text, { style: pt.infoStyle }, 'Key:'), l.a.createElement(s.TextInput, { style: pt.inputStyle, onChangeText: this.onTextChangeKey })), l.a.createElement(s.View, { style: pt.viewGroupStyle }, l.a.createElement(s.Text, { style: pt.infoStyle }, 'Value:'), l.a.createElement(s.TextInput, { style: pt.inputStyle, onChangeText: this.onTextChangeValue })), l.a.createElement(s.View, { style: pt.itemGroupStyle, onClick: this.onClickSet }, l.a.createElement(s.Text, { style: pt.buttonStyle }, 'Set')), l.a.createElement(s.View, { style: [pt.viewGroupStyle, { marginTop: 60 }] }, l.a.createElement(s.Text, { style: pt.infoStyle }, 'Key:'), l.a.createElement(s.TextInput, { style: pt.inputStyle, onChangeText: this.onTextChangeKey })), l.a.createElement(s.View, { style: [pt.viewGroupStyle, { display: 'none' }] }, l.a.createElement(s.Text, { style: pt.infoStyle }, 'Value:'), l.a.createElement(s.Text, { style: [pt.infoStyle, { width: 200 }] }, e)), l.a.createElement(s.View, { style: pt.itemGroupStyle, onClick: this.onClickGet }, l.a.createElement(s.Text, { style: pt.buttonStyle }, 'Get'))); - } - } const wt = s.StyleSheet.create({ itemTitle: { alignItems: 'flex-start', justifyContent: 'center', height: 40, borderWidth: 1, borderStyle: 'solid', borderColor: '#e0e0e0', borderRadius: 2, backgroundColor: '#fafafa', padding: 10, marginTop: 10 }, wrapper: { borderColor: '#eee', borderWidth: 1, borderStyle: 'solid', paddingHorizontal: 10, paddingVertical: 5, marginVertical: 10, flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start' }, infoContainer: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', marginTop: 5, marginBottom: 5, flexWrap: 'wrap' }, infoText: { collapsable: !1, marginVertical: 5 } });class xt extends l.a.Component { - constructor(e) { - super(e), this.state = { netInfoStatusTxt: '', netInfoChangeTxt: '', fetchInfoTxt: '', cookies: '' }, this.listener = null; - } async fetchNetInfoStatus() { - this.setState({ netInfoStatusTxt: await s.NetInfo.fetch() }); - }fetchUrl() { - fetch('https://hippyjs.org', { mode: 'no-cors' }).then(e => (this.setState({ fetchInfoTxt: `成功状态: ${e.status}` }), e)) - .catch((e) => { - this.setState({ fetchInfoTxt: `收到错误: ${e}` }); - }); - }setCookies() { - s.NetworkModule.setCookie('https://hippyjs.org', 'name=hippy;network=mobile'); - }getCookies() { - s.NetworkModule.getCookies('https://hippyjs.org').then((e) => { - this.setState({ cookies: e }); - }); - } async componentWillMount() { - const e = this;this.listener = s.NetInfo.addEventListener('change', (t) => { - e.setState({ netInfoChangeTxt: `${t.network_info}` }); - }); - }componentWillUnmount() { - this.listener && s.NetInfo.removeEventListener('change', this.listener); - }componentDidMount() { - this.fetchUrl(), this.fetchNetInfoStatus(); - }render() { - const { netInfoStatusTxt: e, fetchInfoTxt: t, netInfoChangeTxt: n, cookies: o } = this.state; const r = e => l.a.createElement(s.View, { style: wt.itemTitle }, l.a.createElement(s.Text, null, e));return l.a.createElement(s.ScrollView, { style: { paddingHorizontal: 10 } }, r('Fetch'), l.a.createElement(s.View, { style: [wt.wrapper] }, l.a.createElement(s.View, { style: [wt.infoContainer] }, l.a.createElement(s.View, { style: { backgroundColor: 'grey', padding: 10, borderRadius: 10, marginRight: 10 }, onClick: () => this.fetchUrl() }, l.a.createElement(s.Text, { style: { color: 'white' } }, '请求 hippy 网址:')), l.a.createElement(s.Text, { style: wt.infoText }, t))), r('NetInfo'), l.a.createElement(s.View, { style: [wt.wrapper] }, l.a.createElement(s.View, { style: [wt.infoContainer] }, l.a.createElement(s.View, { style: { backgroundColor: 'grey', padding: 10, borderRadius: 10, marginRight: 10 }, onClick: () => this.fetchNetInfoStatus() }, l.a.createElement(s.Text, { style: { color: 'white' } }, '获取网络状态:')), l.a.createElement(s.Text, { style: wt.infoText }, e)), l.a.createElement(s.View, { style: [wt.infoContainer] }, l.a.createElement(s.View, { style: { backgroundColor: 'grey', padding: 10, borderRadius: 10, marginRight: 10 } }, l.a.createElement(s.Text, { style: { color: 'white' } }, '监听网络变化:')), l.a.createElement(s.Text, { style: wt.infoText }, n))), r('NetworkModule'), l.a.createElement(s.View, { style: [wt.wrapper] }, l.a.createElement(s.View, { style: [wt.infoContainer] }, l.a.createElement(s.View, { style: { backgroundColor: 'grey', padding: 10, borderRadius: 10, marginRight: 10 }, onClick: () => this.setCookies() }, l.a.createElement(s.Text, { style: { color: 'white' } }, '设置Cookies:')), l.a.createElement(s.Text, { style: wt.infoText }, 'name=hippy;network=mobile')), l.a.createElement(s.View, { style: [wt.infoContainer] }, l.a.createElement(s.View, { style: { backgroundColor: 'grey', padding: 10, borderRadius: 10, marginRight: 10 }, onClick: () => this.getCookies() }, l.a.createElement(s.Text, { style: { color: 'white' } }, '获取Cookies:')), l.a.createElement(s.Text, { style: wt.infoText }, o)))); - } - } const St = s.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' } }); const Et = 'wss://echo.websocket.org'; const At = 'Rock it with Hippy WebSocket';let Tt;var Ct = function () { - const e = Object(a.useRef)(null); const t = Object(a.useRef)(null); const [n, o] = Object(a.useState)([]); const r = (e) => { - o(t => [e, ...t]); - };return l.a.createElement(s.View, { style: St.fullScreen }, l.a.createElement(s.View, null, l.a.createElement(s.Text, { style: St.title }, 'Url:'), l.a.createElement(s.TextInput, { ref: e, value: Et, style: St.input }), l.a.createElement(s.View, { style: St.row }, l.a.createElement(s.Text, { onClick: () => { - e.current.getValue().then((e) => { - Tt && 1 === Tt.readyState && Tt.close(), Tt = new WebSocket(e), Tt.onopen = () => r(`[Opened] ${Tt.url}`), Tt.onclose = () => r(`[Closed] ${Tt.url}`), Tt.onerror = e => r(`[Error] ${e.reason}`), Tt.onmessage = e => r(`[Received] ${e.data}`); - }); - }, style: St.button }, 'Connect'), l.a.createElement(s.Text, { onClick: () => Tt.close(), style: St.button }, 'Disconnect'))), l.a.createElement(s.View, null, l.a.createElement(s.Text, { style: St.title }, 'Message:'), l.a.createElement(s.TextInput, { ref: t, value: At, style: St.input }), l.a.createElement(s.Text, { onClick: () => t.current.getValue().then((e) => { - r(`[Sent] ${e}`), Tt.send(e); - }), style: St.button }, 'Send')), l.a.createElement(s.View, null, l.a.createElement(s.Text, { style: St.title }, 'Log:'), l.a.createElement(s.ScrollView, { style: St.fullScreen }, n.map((e, t) => l.a.createElement(s.Text, { key: t, style: St.output }, e))))); - };function vt(e, t) { - const n = Object.keys(e);if (Object.getOwnPropertySymbols) { - let o = Object.getOwnPropertySymbols(e);t && (o = o.filter((t => Object.getOwnPropertyDescriptor(e, t).enumerable))), n.push.apply(n, o); - } return n; - } function kt(e) { - for (let t = 1;t < arguments.length;t++) { - var n = null != arguments[t] ? arguments[t] : {};t % 2 ? vt(Object(n), !0).forEach(((t) => { - H()(e, t, n[t]); - })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vt(Object(n)).forEach(((t) => { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); - })); - } return e; - } const Vt = s.StyleSheet.create({ full: { flex: 1 }, demoContent: { flex: 1, height: 500 }, box: { position: 'absolute', width: 100, height: 100, backgroundColor: '#4c9afa', justifyContent: 'center', alignItem: 'center', borderRadius: 5 }, text: { color: 'white', textAlign: 'center', textAlignVertical: 'middle' }, buttonContainer: { alignItems: 'center', flexDirection: 'row', justifyContent: 'space-around', marginVertical: 5 }, button: { height: 55, borderColor: '#4c9afa', borderWidth: 2, borderStyle: 'solid', borderRadius: 8, justifyContent: 'center', alignItem: 'center', flexShrink: 1, marginHorizontal: 4, paddingHorizontal: 1 }, buttonText: { fontSize: 14, color: '#4c9afa', textAlign: 'center', textAlignVertical: 'center' }, row: { alignItems: 'center', flexDirection: 'row', justifyContent: 'space-around', marginVertical: 5 }, black: { color: 'black' } }); const Rt = function (e, t) { - const n = Math.ceil(e); const o = Math.floor(t);return Math.floor(Math.random() * (o - n + 1)) + n; - };var It = function () { - const e = Object(a.useRef)(null);let t; let n;Object(a.useEffect)(() => { - const e = s.Dimensions.get('screen');({ width: t, height: n } = e); - });const [o, r] = Object(a.useState)({ width: 100, height: 100, top: 10, left: 10 }); const [i, c] = Object(a.useState)({ width: 0, height: 0, x: 0, y: 0 }); const h = async (t = !1) => { - try { - const n = await s.UIManagerModule.getBoundingClientRect(e.current, { relToContainer: t });c(n); - } catch (e) { - console.error('getBoxPosition error', e); - } - }; const u = kt(kt({}, Vt.box), o);return l.a.createElement(s.View, { style: Vt.full }, l.a.createElement(s.View, { style: Vt.demoContent }, l.a.createElement(s.View, { ref: e, style: u }, l.a.createElement(s.Text, { style: Vt.text, numberOfLines: 2 }, 'I am the box'))), l.a.createElement(s.View, { style: Vt.buttonContainer }, l.a.createElement(s.View, { onClick: () => { - const e = Rt(0, t - 100); const o = Rt(0, n - 450); const i = Rt(80, 120);r({ left: e, top: o, width: i, height: i }); - }, style: Vt.button }, l.a.createElement(s.Text, { style: Vt.buttonText }, 'Move position')), l.a.createElement(s.View, { onClick: () => h(!1), style: Vt.button }, l.a.createElement(s.Text, { style: Vt.buttonText }, 'Measure in App Window')), l.a.createElement(s.View, { onClick: () => h(!0), style: Vt.button }, l.a.createElement(s.Text, { style: Vt.buttonText }, 'Measure in Container(RootView)'))), l.a.createElement(s.View, { style: Vt.row }, l.a.createElement(s.View, null, l.a.createElement(s.Text, null, 'Box style:'), l.a.createElement(s.Text, { style: Vt.black }, `Width: ${u.width}`), l.a.createElement(s.Text, { style: Vt.black }, `Height: ${u.height}`), l.a.createElement(s.Text, { style: Vt.black }, `Left: ${u.left}`), l.a.createElement(s.Text, { style: Vt.black }, `Top: ${u.top}`)), l.a.createElement(s.View, null, l.a.createElement(s.Text, null, 'getBoundingClientRect output:'), l.a.createElement(s.Text, { style: Vt.black }, `Width: ${i.width}`), l.a.createElement(s.Text, { style: Vt.black }, `Height: ${i.height}`), l.a.createElement(s.Text, { style: Vt.black }, `X: ${i.x}`), l.a.createElement(s.Text, { style: Vt.black }, `Y: ${i.y}`)))); - };const Dt = s.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 Ot extends l.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; const { current: t } = this.state; const n = [];for (let o = 0;o < e;o += 1)t === o ? n.push(l.a.createElement(s.View, { style: [Dt.style_indicator_item, { backgroundColor: '#2424244c' }], key: o })) : n.push(l.a.createElement(s.View, { style: [Dt.style_indicator_item, { backgroundColor: '#ffffffaa' }], key: o }));return l.a.createElement(s.View, { style: Dt.style_indicator }, n); - } - } class Pt extends l.a.Component { - constructor(e) { - super(e), this.imgWidth = e.style.width, this.imgHeight = e.style.height, this.itemCount = e.images.length, this.duration = e.duration, this.touchStartOffset = 0, this.touchEndOffset = 0, this.scrollOffset = 0, this.interval = null, this.currentIndex = 0, this.width = 0, this.onLayout = this.onLayout.bind(this), this.onScroll = this.onScroll.bind(this), this.onScrollBeginDrag = this.onScrollBeginDrag.bind(this), this.onScrollEndDrag = this.onScrollEndDrag.bind(this); - }componentDidMount() { - this.duration = this.props.duration, this.doCreateTimer(); - }componentDidUpdate() { - this.duration = this.props.duration, this.doCreateTimer(); - }componentWillUnmount() { - this.doClearTimer(); - }onScroll(e) { - const { images: t } = this.props;if (0 === this.width) return;const n = e.contentOffset.x;this.scrollOffset = n;const o = Math.round(n / this.width); const r = t ? l.a.Children.count(t) : 0;o < 0 || o >= r || (this.indicator && 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({ x: this.imgWidth * e, y: 0, animated: !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; const t = [];for (let n = 0;n < this.itemCount;n += 1)t.push(l.a.createElement(s.Image, { source: { uri: e[n] }, style: { width: this.imgWidth, height: this.imgHeight }, key: n }));return l.a.createElement(s.View, null, l.a.createElement(s.ScrollView, { horizontal: !0, pagingEnabled: !0, style: { width: this.imgWidth, height: this.imgHeight }, onLayout: this.onLayout, onScroll: this.onScroll, onScrollBeginDrag: this.onScrollBeginDrag, onScrollEndDrag: this.onScrollEndDrag, ref: (e) => { - this.scrollView = e; - } }, t), l.a.createElement(Ot, { ref: (e) => { - this.indicator = e; - }, count: this.itemCount })); - } - }H()(Pt, 'defaultProps', { duration: 0, currentPage: 0, images: [] });const Lt = ['https://user-images.githubusercontent.com/12878546/148736627-bca54707-6939-45b3-84f7-74e6c2c09c88.jpg', 'https://user-images.githubusercontent.com/12878546/148736679-0521fdff-09f5-40e3-a36a-55c8f714be16.jpg', 'https://user-images.githubusercontent.com/12878546/148736685-a4c226ad-f64a-4fe0-b3df-ce0d8fcd7a01.jpg']; const jt = s.StyleSheet.create({ sliderStyle: { width: 400, height: 180 }, infoStyle: { height: 40, fontSize: 16, color: '#4c9afa', marginTop: 15 } });function Ft() { - return l.a.createElement(s.ScrollView, null, l.a.createElement(s.Text, { style: jt.infoStyle }, 'Auto:'), l.a.createElement(Pt, { style: jt.sliderStyle, images: Lt, duration: 1e3 }), l.a.createElement(s.Text, { style: jt.infoStyle }, 'Manual:'), l.a.createElement(Pt, { style: jt.sliderStyle, images: Lt, duration: 0 })); - } const zt = s.StyleSheet.create({ container: { height: 45, paddingLeft: 4, flexDirection: 'row', backgroundColor: '#ffffff', borderBottomColor: '#E5E5E5', borderBottomWidth: 1, borderStyle: 'solid' }, 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 Bt extends l.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 qe(e);case 1:return Ye(e);case 2:return Qe(e);default:return null; - } - }componentDidUpdate() { - this.scrollSV(); - }onViewPagerChange({ position: e }) { - this.setState({ curIndex: e }); - }scrollSV() { - if (this.navScrollView) { - const { curIndex: e, navList: t } = this.state; const n = t.length; const o = de.getScreenWidth(); const r = o / 2 / 60; const i = 60 * n < o;let a;a = e <= r || i ? 0 : e > n - 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 l.a.createElement(s.View, { style: zt.container }, l.a.createElement(s.ScrollView, { style: zt.scroll, horizontal: !0, showsHorizontalScrollIndicator: !1, ref: (e) => { - this.navScrollView = e; - } }, e.map((e, n) => l.a.createElement(s.View, { style: zt.navItem, key: `nav_${e}`, activeOpacity: .5, onClick: () => this.pressNavItem(n) }, l.a.createElement(s.Text, { style: [zt.navItemText, t === n ? zt.navItemTextBlue : zt.navItemTextNormal], numberOfLines: 1 }, e))))); - }render() { - const { navList: e } = this.state;return l.a.createElement(s.View, { style: { flex: 1, backgroundColor: '#ffffff' } }, this.renderNav(), l.a.createElement(s.ViewPager, { ref: (e) => { - this.viewPager = e; - }, style: { flex: 1 }, initialPage: 0, onPageSelected: this.onViewPagerChange }, e.map((e, t) => Bt.getPage(e, t)))); - } - } const { width: Mt } = s.Dimensions.get('window'); const _t = s.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: '#4cccfa', backgroundColor: '#4cccfa', position: 'absolute', left: 0 }, nativeDemo2Drag: { height: 80, width: Mt, backgroundColor: '#4c9afa', position: 'relative', marginTop: 10 }, nativeDemo2Point: { height: 80, width: 80, color: '#4cccfa', backgroundColor: '#4cccfa', position: 'absolute', left: 0 }, splitter: { marginTop: 50 } });class Ht extends l.a.Component { - constructor(e) { - super(e), this.demon1Point = l.a.createRef(), this.demo1PointDom = null, this.state = { demo2Left: 0 }, this.isDemon1Layouted = !1, this.idDemon2Layouted = !1, this.onTouchDown1 = this.onTouchDown1.bind(this), this.onDemon1Layout = this.onDemon1Layout.bind(this), this.onTouchMove1 = this.onTouchMove1.bind(this), this.onTouchDown2 = this.onTouchDown2.bind(this), this.onTouchMove2 = this.onTouchMove2.bind(this); - }componentDidMount() {}onDemon1Layout() { - this.isDemon1Layouted || (this.isDemon1Layouted = !0, this.demo1PointDom = s.UIManagerModule.getElementFromFiberRef(this.demon1Point.current)); - }onTouchDown1(e) { - const { page_x: t } = e; const 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; const 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; const n = t - 40;console.log('touchdown x', t, n, Mt), this.setState({ demo2Left: n }); - }onTouchMove2(e) { - const { page_x: t } = e; const n = t - 40;console.log('touchmove x', t, n, Mt), this.setState({ demo2Left: n }); - }render() { - const { demo2Left: e } = this.state;return l.a.createElement(s.View, { style: _t.setNativePropsDemo }, l.a.createElement(s.Text, null, 'setNativeProps实现拖动效果'), l.a.createElement(s.View, { style: _t.nativeDemo1Drag, onTouchDown: this.onTouchDown1, onTouchMove: this.onTouchMove1 }, l.a.createElement(s.View, { onLayout: this.onDemon1Layout, style: _t.nativeDemo1Point, ref: this.demon1Point })), l.a.createElement(s.View, { style: _t.splitter }), l.a.createElement(s.Text, null, '普通渲染实现拖动效果'), l.a.createElement(s.View, { style: _t.nativeDemo2Drag, onTouchDown: this.onTouchDown2, onTouchMove: this.onTouchMove2 }, l.a.createElement(s.View, { style: [_t.nativeDemo2Point, { left: e }] }))); - } - } const Wt = s.StyleSheet.create({ dynamicImportDemo: { marginTop: 20, display: 'flex', flex: 1, alignItems: 'center', position: 'relative', flexDirection: 'column' } });class Nt extends l.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 l.a.createElement(s.View, { style: Wt.dynamicImportDemo }, l.a.createElement(s.View, { style: { width: 130, height: 40, textAlign: 'center', backgroundColor: '#4c9afa', borderRadius: 5 }, onTouchDown: this.onAsyncComponentLoad }, l.a.createElement(s.Text, { style: { height: 40, lineHeight: 40, textAlign: 'center' } }, '点我异步加载')), l.a.createElement(s.View, { style: { marginTop: 20 } }, e ? l.a.createElement(e, null) : null, t ? l.a.createElement(t, null) : null)); - } - } const Kt = s.StyleSheet.create({ LocalizationDemo: { marginTop: 20, display: 'flex', flex: 1, alignItems: 'center', position: 'relative', flexDirection: 'column' } });class Ut extends l.a.Component { - render() { - const { country: e, language: t, direction: n } = s.Platform.Localization || {};return l.a.createElement(s.View, { style: Kt.LocalizationDemo }, l.a.createElement(s.View, { style: { height: 40, textAlign: 'center', backgroundColor: '#4c9afa', borderRadius: 5 }, onTouchDown: this.onAsyncComponentLoad }, l.a.createElement(s.Text, { style: { color: 'white', marginHorizontal: 30, height: 40, lineHeight: 40, textAlign: 'center' } }, `国际化相关信息:国家 ${e} | 语言 ${t} | 方向 ${1 === n ? 'RTL' : 'LTR'}`))); - } - } const Gt = () => getTurboModule('demoTurbo').getTurboConfig(); const qt = s.StyleSheet.create({ container: { flex: 1 }, cellContentView: { flexDirection: 'row', justifyContent: 'space-between', backgroundColor: '#ccc', marginBottom: 1 }, funcInfo: { justifyContent: 'center', paddingLeft: 15, paddingRight: 15 }, actionButton: { backgroundColor: '#4c9afa', color: '#fff', height: 44, lineHeight: 44, textAlign: 'center', width: 80, borderRadius: 6 }, resultView: { backgroundColor: 'darkseagreen', minHeight: 150, padding: 15 } });class Qt extends l.a.Component { - constructor(e) { - super(e), this.state = { config: null, result: '', funList: ['getString', 'getNum', 'getBoolean', 'getMap', 'getObject', 'getArray', 'nativeWithPromise', 'getTurboConfig', 'printTurboConfig', 'getInfo', 'setInfo'] }, this.onTurboFunc = this.onTurboFunc.bind(this), this.getRenderRow = this.getRenderRow.bind(this), this.getRowKey = this.getRowKey.bind(this); - } async onTurboFunc(e) { - let t;if ('nativeWithPromise' === e)t = await(async e => turboPromise(getTurboModule('demoTurbo').nativeWithPromise)(e))('aaa');else if ('getTurboConfig' === e) this.config = Gt(), t = '获取到config对象';else if ('printTurboConfig' === e)n = this.config || Gt(), t = getTurboModule('demoTurbo').printTurboConfig(n);else if ('getInfo' === e)t = (this.config || Gt()).getInfo();else if ('setInfo' === e)(this.config || Gt()).setInfo('Hello World'), t = '设置config信息成功';else { - t = { getString: () => { - return e = '123', getTurboModule('demoTurbo').getString(e);let e; - }, getNum: () => { - return e = 1024, getTurboModule('demoTurbo').getNum(e);let e; - }, getBoolean: () => { - return e = !0, getTurboModule('demoTurbo').getBoolean(e);let e; - }, getMap: () => { - return e = new Map([['a', '1'], ['b', 2]]), getTurboModule('demoTurbo').getMap(e);let e; - }, getObject: () => { - return e = { c: '3', d: '4' }, getTurboModule('demoTurbo').getObject(e);let e; - }, getArray: () => { - return e = ['a', 'b', 'c'], getTurboModule('demoTurbo').getArray(e);let e; - } }[e](); - } let n;this.setState({ result: t }); - }renderResultView() { - return l.a.createElement(s.View, { style: qt.resultView }, l.a.createElement(s.Text, { style: { backgroundColor: 'darkseagreen' } }, `${this.state.result}`)); - }getRenderRow(e) { - const { funList: t } = this.state;return l.a.createElement(s.View, { style: qt.cellContentView }, l.a.createElement(s.View, { style: qt.funcInfo }, l.a.createElement(s.Text, { numberofLines: 0 }, '函数名:', t[e])), l.a.createElement(s.Text, { style: qt.actionButton, onClick: () => this.onTurboFunc(t[e]) }, '执行')); - }getRowKey(e) { - const { funList: t } = this.state;return t[e]; - }render() { - const { funList: e } = this.state;return l.a.createElement(s.View, { style: qt.container }, this.renderResultView(), l.a.createElement(s.ListView, { numberOfRows: e.length, renderRow: this.getRenderRow, getRowKey: this.getRowKey, style: { flex: 1 } })); - } - } const Yt = s.StyleSheet.create({ demoWrap: { horizontal: !1, flex: 1, flexDirection: 'column' }, banner: { backgroundImage: 'https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png', backgroundSize: 'cover', height: 150, justifyContent: 'flex-end' }, bannerText: { color: 'coral', textAlign: 'center' }, tabs: { flexDirection: 'row', height: 30 }, tabText: { flex: 1, textAlign: 'center', backgroundColor: '#eee', color: '#999' }, tabSelected: { flex: 1, textAlign: 'center', color: '#4c9afa' }, itemEven: { height: 40, backgroundColor: 'gray' }, itemEvenText: { lineHeight: 40, color: 'white', fontSize: 20, textAlign: 'center' }, itemOdd: { height: 40 }, itemOddText: { lineHeight: 40, fontSize: 20, textAlign: 'center' } });class Xt extends l.a.Component { - constructor(e) { - super(e), this.state = { layoutHeight: 0, currentSlide: 0 }; - }selectPage(e) { - let t;this.setState({ currentSlide: e }), null === (t = this.viewPager) || void 0 === t || t.setPage(e); - }render() { - const { layoutHeight: e, currentSlide: t } = this.state;return l.a.createElement(s.ScrollView, { style: Yt.demoWrap, scrollEventThrottle: 50, onLayout: e => this.setState({ layoutHeight: e.layout.height }) }, l.a.createElement(s.View, { style: Yt.banner }), l.a.createElement(s.View, { style: Yt.tabs }, l.a.createElement(s.Text, { key: 'tab1', style: 0 === t ? Yt.tabSelected : Yt.tabText, onClick: () => this.selectPage(0) }, 'tab 1 (parent first)'), l.a.createElement(s.Text, { key: 'tab2', style: 1 === t ? Yt.tabSelected : Yt.tabText, onClick: () => this.selectPage(1) }, 'tab 2 (self first)')), l.a.createElement(s.ViewPager, { ref: e => this.viewPager = e, initialPage: t, style: { height: e - 80 }, onPageSelected: e => this.setState({ currentSlide: e.position }) }, l.a.createElement(s.ListView, { nestedScrollTopPriority: 'parent', key: 'slide1', numberOfRows: 30, getRowKey: e => `item${e}`, initialListSize: 30, renderRow: e => l.a.createElement(s.Text, { style: e % 2 ? Yt.itemEvenText : Yt.itemOddText }, 'Item ', e), getRowStyle: e => (e % 2 ? Yt.itemEven : Yt.itemOdd) }), l.a.createElement(s.ListView, { nestedScrollTopPriority: 'self', key: 'slide2', numberOfRows: 30, getRowKey: e => `item${e}`, initialListSize: 30, renderRow: e => l.a.createElement(s.Text, { style: e % 2 ? Yt.itemEvenText : Yt.itemOddText }, 'Item ', e), getRowStyle: e => (e % 2 ? Yt.itemEven : Yt.itemOdd) }))); - } - } function Jt(e, t) { - const n = Object.keys(e);if (Object.getOwnPropertySymbols) { - let o = Object.getOwnPropertySymbols(e);t && (o = o.filter((t => Object.getOwnPropertyDescriptor(e, t).enumerable))), n.push.apply(n, o); - } return n; - } function Zt(e) { - for (let t = 1;t < arguments.length;t++) { - var n = null != arguments[t] ? arguments[t] : {};t % 2 ? Jt(Object(n), !0).forEach(((t) => { - H()(e, t, n[t]); - })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Jt(Object(n)).forEach(((t) => { - Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); - })); - } return e; - } const $t = Zt(Zt(Zt({}, o), r), i);const en = [{ path: '/View', name: 'View 组件', component: $t.View, meta: { style: 1 } }, { path: '/BoxShadow', name: 'BoxShadow 范例', component: $t.BoxShadow, meta: { style: 1 } }, { path: '/Text', name: 'Text 组件', component: $t.Text, meta: { style: 1 } }, { path: '/Image', name: 'Image 组件', component: $t.Image, meta: { style: 1 } }, { path: '/ListView', name: 'ListView 组件', component: $t.ListView, meta: { style: 1 } }, { path: '/WaterfallView', name: 'WaterfallView 组件', component: $t.WaterfallView, meta: { style: 1 } }, { path: '/PullHeader', name: 'PullHeader/Footer组件', component: $t.PullHeaderFooter, meta: { style: 1 } }, { path: '/RefreshWrapper', name: 'RefreshWrapper 组件', component: $t.RefreshWrapper, meta: { style: 1 } }, { path: '/ScrollView', name: 'ScrollView 组件', component: $t.ScrollView, meta: { style: 1 } }, { path: '/ViewPager', name: 'ViewPager 组件', component: $t.ViewPager, meta: { style: 1 } }, { path: '/TextInput', name: 'TextInput 组件', component: $t.TextInput, meta: { style: 1 } }, { path: '/Modal', name: 'Modal 组件', component: $t.Modal, meta: { style: 1 } }, { path: '/Slider', name: 'Slider 组件', component: $t.Slider, meta: { style: 1 } }, { path: '/TabHost', name: 'TabHost 组件', component: $t.TabHost, meta: { style: 1 } }, { path: '/NestedScroll', name: 'Nested Scroll 示例', component: $t.NestedScroll, meta: { style: 1 } }, { path: '/WebView', name: 'WebView 组件', component: $t.WebView, meta: { style: 1 } }, { path: '/RippleViewAndroid', name: 'RippleViewAndroid 组件', component: $t.RippleViewAndroid, meta: { style: 1 } }, { path: '/WebSocket', name: 'WebSocket 模块', component: $t.WebSocket, meta: { style: 2 } }, { path: '/Animation', name: 'Animation 组件', component: $t.Animation, meta: { style: 2 } }, { path: '/NetInfo', name: 'Network 能力', component: $t.NetInfo, meta: { style: 2 } }, { path: '/UIManagerModule', name: 'UIManagerModule 模块', component: $t.UIManagerModule, meta: { style: 2 } }, { path: '/SetNativeProps', name: 'setNativeProps能力', component: $t.SetNativeProps, meta: { style: 2 } }, { path: '/DynamicImport', name: 'DynamicImport 能力', component: $t.DynamicImport, meta: { style: 2 } }, { path: '/Localization', name: 'Localization 信息', component: $t.Localization, meta: { style: 2 } }, { path: '/Turbo', name: 'Turbo', component: $t.Turbo, meta: { style: 2 } }];const tn = '#4c9afa'; const nn = '#fff'; const on = s.StyleSheet.create({ container: { height: 56, backgroundColor: tn, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }, backIcon: { width: 24, height: 24 }, headerButton: { height: 64, paddingHorizontal: 24, alignItems: 'center', justifyContent: 'center' }, title: { fontSize: 20, color: nn, lineHeight: 24 } });const rn = M(({ history: e, route: t }) => (0 === e.index ? l.a.createElement(s.View, { style: [on.container] }, l.a.createElement(s.View, { style: { backgroundColor: on.title.backgroundColor, marginLeft: 12 } }, l.a.createElement(s.Text, { numberOfLines: 1, style: [on.title, { fontWeight: 'bold' }] }, t.name)), l.a.createElement(s.View, { style: on.headerButton }, l.a.createElement(s.Text, { numberOfLines: 1, style: on.title }, 'ver: ', 'unspecified' !== s.default.version ? `${s.default.version}` : 'master'))) : l.a.createElement(s.View, { style: [on.container] }, l.a.createElement(s.View, { onClick: () => e.goBack(), style: [on.headerButton, 'ios' === s.Platform.OS ? null : { marginLeft: 20 }] }, l.a.createElement(s.Image, { style: on.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' } })), l.a.createElement(s.View, { style: on.headerButton }, l.a.createElement(s.Text, { numberOfLines: 1, style: on.title }, t.name)))));const an = '#4c9afa'; const ln = '#f44837'; const sn = s.StyleSheet.create({ rowContainer: { alignItems: 'center' }, buttonView: { borderColor: an, borderWidth: 2, borderRadius: 8, justifyContent: 'center', alignItems: 'center', width: 250, height: 50, marginTop: 30, borderStyle: 'solid' }, buttonText: { fontSize: 20, color: an, textAlign: 'center', textAlignVertical: 'center' } });class cn extends a.Component { - constructor(e) { - super(e), this.state = { pressItem: '', dataSource: [...en] }, 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' === s.Platform.OS && s.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; const o = t[e]; const { style: r } = o.meta;return l.a.createElement(s.View, { style: sn.rowContainer }, l.a.createElement(s.View, { onPressIn: () => this.feedback(o.path), onPressOut: () => this.feedback(), onClick: () => this.clickTo(o.path), style: [sn.buttonView, { borderColor: 1 === r ? an : ln, opacity: n === o.path ? .5 : 1 }] }, l.a.createElement(s.Text, { style: [sn.buttonText, { color: 1 === r ? an : ln }] }, o.name))); - }render() { - const { dataSource: e } = this.state;return l.a.createElement(s.ListView, { style: { flex: 1, backgroundColor: '#ffffff' }, numberOfRows: e.length, renderRow: this.renderRow, getRowType: this.getRowType, getRowKey: this.getRowKey }); - } - } const hn = [{ path: '/Gallery', name: 'Hippy React', component: M(cn), meta: { style: 1 } }, ...en];const un = () => l.a.createElement(s.View, { style: { flex: 1, backgroundColor: '#fff' } }, l.a.createElement(R, { initialEntries: ['/Gallery'] }, hn.map((e) => { - const t = e.component;return l.a.createElement(P, { key: e.path, exact: !0, path: `${e.path}` }, l.a.createElement(s.View, { style: { flex: 1, backgroundColor: '#fff' } }, l.a.createElement(rn, { route: e }), l.a.createElement(t, { meta: e.meta || {} }))); - })));const dn = s.StyleSheet.create({ stepText: { color: '#242424', marginBottom: 12 }, container: { flex: 1, backgroundColor: '#fff', justifyContent: 'center', flexDirection: 'column', padding: 20 }, button: { width: 140, 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' }, inputStyle: { width: 350, marginTop: 30, marginBottom: 10, placeholderTextColor: '#aaaaaa', fontSize: 16, color: '#242424', height: 80, lineHeight: 30, borderColor: '#eee', borderWidth: 1, borderStyle: 'solid' } });function mn({ instanceId: e }) { - const t = Object(a.useRef)(null); const n = () => { - t.current.blur(); - };return l.a.createElement(s.ScrollView, { style: dn.container, onClick: n }, ['安装远程调试依赖: npm i -D @hippy/debug-server-next@latest', '修改 webpack 配置,添加远程调试地址', '运行 npm run hippy:dev 开始编译,编译结束后打印出 bundleUrl 及调试首页地址', '粘贴 bundleUrl 并点击开始按钮', '访问调试首页开始远程调试,远程调试支持热更新(HMR)'].map((e, t) => l.a.createElement(s.Text, { style: dn.stepText, key: `steps-${t}` }, t + 1, '. ', e)), l.a.createElement(s.TextInput, { ref: t, style: dn.inputStyle, placeholder: 'please input bundleUrl', multiline: !0, numberOfLines: 4, defaultValue: 'http://127.0.0.1:38989/index.bundle?debugUrl=ws%3A%2F%2F127.0.0.1%3A38989%2Fdebugger-proxy' }), l.a.createElement(s.View, { style: dn.buttonContainer }, l.a.createElement(s.View, { style: dn.button, onClick: () => { - n(), t.current.getValue().then((t) => { - t && Object(s.callNative)('TestModule', 'remoteDebug', e, t); - }); - } }, l.a.createElement(s.Text, { style: dn.buttonText, numberOfLines: 1 }, '开始')))); - } const gn = s.StyleSheet.create({ container: { flex: 1 } });class fn extends a.Component { - constructor(e) { - super(e);const { width: t, height: n } = s.Dimensions.get('screen');this.state = { isVertical: t < n }, this.onLayout = this.onLayout.bind(this); - }renderIPhoneStatusBar(e) { - const { isVertical: t } = this.state;return 'ios' === s.Platform.OS && t ? l.a.createElement(s.View, { style: [{ backgroundColor: e || '#fff' }, { height: s.Dimensions.get('screen').statusBarHeight }] }) : null; - }onLayout(e) { - const { width: t, height: n } = e.layout;this.setState({ isVertical: t < n }); - }render() { - const { children: e, statusBarColor: t } = this.props; const { isVertical: n } = this.state;let o = null;return n || (o = { paddingHorizontal: de.isiPhoneX() ? 32 : 0 }), l.a.createElement(s.View, { style: [gn.container, o], onLayout: this.onLayout }, this.renderIPhoneStatusBar(t), l.a.createElement(s.View, { style: { flex: 1 } }, e)); - } - } const yn = s.StyleSheet.create({ buttonContainer: { height: 48, backgroundColor: 'white', flexDirection: 'row' }, button: { height: 48, flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: '#fff', borderTopWidth: 1, borderStyle: 'solid', borderTopColor: '#eee' }, buttonText: { color: '#242424', fontSize: 16 }, blankPage: { flex: 1, backgroundColor: 'white' } });class pn extends a.Component { - constructor(e) { - super(e), this.state = { pageIndex: 0 }; - }componentDidMount() { - s.ConsoleModule.log('~~~~~~~~~~~~~~~~~ This is a log from ConsoleModule ~~~~~~~~~~~~~~~~~'); - }render() { - const { pageIndex: e } = this.state; const { __instanceId__: t } = this.props;return l.a.createElement(fn, { statusBarColor: '#4c9afa' }, (() => { - switch (e) { - case 0:return l.a.createElement(un, null);case 1:return l.a.createElement(mn, { instanceId: t });default:return l.a.createElement(s.View, { style: yn.blankPage }); - } - })(), l.a.createElement(s.View, { style: yn.buttonContainer }, (() => ['API', '调试'].map((t, n) => l.a.createElement(s.View, { key: `button_${n}`, style: yn.button, onClick: () => this.setState({ pageIndex: n }) }, l.a.createElement(s.Text, { style: [yn.buttonText, n === e ? { color: '#4c9afa' } : null], numberOfLines: 1 }, t))))())); - } - } -}, './src/main.js'(e, t, n) { - 'use strict';n.r(t), function (e) { - const t = n('../../packages/hippy-react/dist/index.js'); const o = n('./src/app.jsx');e.Hippy.on('uncaughtException', (e) => { - console.error('uncaughtException error', e.stack, e.message); - }), e.Hippy.on('unhandledRejection', (e) => { - console.error('unhandledRejection reason', e); - }), new t.Hippy({ appName: 'Demo', entryPage: o.a, bubbles: !1, silent: !1 }).start(); - }.call(this, n('./node_modules/webpack/buildin/global.js')); -}, 0(e, t, n) { - n('./node_modules/regenerator-runtime/runtime.js'), e.exports = n('./src/main.js'); -}, 'dll-reference hippyReactBase'(e, t) { - e.exports = hippyReactBase; -} })); + */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,d=o?Symbol.for("react.concurrent_mode"):60111,m=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.suspense_list"):60120,y=o?Symbol.for("react.memo"):60115,p=o?Symbol.for("react.lazy"):60116,b=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"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case l:case g:return e;default:switch(e=e&&e.$$typeof){case h:case m:case p:case y:case c:return e;default:return t}}case i:return t}}}function A(e){return E(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=h,t.ContextProvider=c,t.Element=r,t.ForwardRef=m,t.Fragment=a,t.Lazy=p,t.Memo=y,t.Portal=i,t.Profiler=s,t.StrictMode=l,t.Suspense=g,t.isAsyncMode=function(e){return A(e)||E(e)===u},t.isConcurrentMode=A,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)===m},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===p},t.isMemo=function(e){return E(e)===y},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)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===l||e===g||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===y||e.$$typeof===c||e.$$typeof===h||e.$$typeof===m||e.$$typeof===w||e.$$typeof===x||e.$$typeof===S||e.$$typeof===b)},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=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),l=new C(r||[]);return o(a,"_invoke",{value:S(e,n,l)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function d(){}function m(){}function g(){}var f={};s(f,i,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(v([])));p&&p!==t&&n.call(p,i)&&(f=p);var b=g.prototype=d.prototype=Object.create(f);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var r;o(this,"_invoke",{value:function(o,i){function a(){return new t((function(r,a){!function o(r,i,a,l){var s=h(e[r],e,i);if("throw"!==s.type){var c=s.arg,u=c.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){c.value=e,a(c)}),(function(e){return o("throw",e,a,l)}))}l(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}})}function S(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 k()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var l=E(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var s=h(e,t,n);if("normal"===s.type){if(o=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o="completed",n.method="throw",n.arg=s.arg)}}}function E(e,t){var n=t.method,o=e.iterator[n];if(void 0===o)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var r=h(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function v(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function t(){for(;++o=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:v(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./src/app.jsx":function(e,t,n){"use strict";n.d(t,"a",(function(){return pn}));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 $})),n.d(o,"Modal",(function(){return re})),n.d(o,"RefreshWrapper",(function(){return ke})),n.d(o,"PullHeaderFooter",(function(){return Re})),n.d(o,"ScrollView",(function(){return De})),n.d(o,"Text",(function(){return Fe})),n.d(o,"TextInput",(function(){return Be})),n.d(o,"View",(function(){return He})),n.d(o,"ViewPager",(function(){return Je})),n.d(o,"WebView",(function(){return $e})),n.d(o,"BoxShadow",(function(){return nt})),n.d(o,"WaterfallView",(function(){return it})),n.d(o,"RippleViewAndroid",(function(){return dt}));var r={};n.r(r),n.d(r,"Animation",(function(){return yt})),n.d(r,"AsyncStorage",(function(){return bt})),n.d(r,"NetInfo",(function(){return xt})),n.d(r,"WebSocket",(function(){return Ct})),n.d(r,"UIManagerModule",(function(){return It}));var i={};n.r(i),n.d(i,"Slider",(function(){return Ft})),n.d(i,"TabHost",(function(){return Bt})),n.d(i,"SetNativeProps",(function(){return Ht})),n.d(i,"DynamicImport",(function(){return Nt})),n.d(i,"Localization",(function(){return Ut})),n.d(i,"Turbo",(function(){return Qt})),n.d(i,"NestedScroll",(function(){return Xt}));var a=n("./node_modules/react/index.js"),l=n.n(a),s=n("../../packages/hippy-react/dist/index.js"),c=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;h--){var m=r[h];"."===m?d(r,h):".."===m?(d(r,h),c++):c&&(d(r,h),c--)}if(!l)for(;c--;c)r.unshift("..");!l||""===r[0]||r[0]&&u(r[0])||r.unshift("");var g=r.join("/");return n&&"/"!==g.substr(-1)&&(g+="/"),g};var g="Invariant failed";function f(e,t){if(!e)throw new Error(g)}function y(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 p(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=m(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r}function b(){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=p(e,t,d(),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 C=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),v=n.n(C),k=function(e){var t=Object(S.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 l.a.createElement(k.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}(l.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"}},l.a.createElement(s.Text,{style:{color:"white"}},t===e?"我被点击了"+e:"没有被点击"+e)))}render(){return l.a.createElement(s.ScrollView,null,this.getRenderRow(0),this.getRenderRow(1),this.getRenderRow(2),this.getRenderRow(3),this.getRenderRow(4),this.getRenderRow(5),this.getRenderRow(6),this.getRenderRow(7),this.getRenderRow(8),this.getRenderRow(9),this.getRenderRow(10),this.getRenderRow(11),this.getRenderRow(12),this.getRenderRow(13),this.getRenderRow(14),this.getRenderRow(15),this.getRenderRow(16),this.getRenderRow(17),this.getRenderRow(18))}}var N=n.p+"assets/defaultSource.jpg",K=n.p+"assets/hippyLogoWhite.png";const U="https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png",G=s.StyleSheet.create({container_style:{alignItems:"center"},image_style:{width:300,height:180,margin:16,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",borderRadius:4},info_style:{marginTop:15,marginLeft:16,fontSize:16,color:"#4c9afa"},img_result:{width:300,marginTop:-15,marginLeft:16,fontSize:16,color:"#4c9afa",borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",borderRadius:4}});class q extends l.a.Component{constructor(e){super(e),this.state={gifLoadResult:{}}}render(){const{width:e,height:t,url:n}=this.state.gifLoadResult;return l.a.createElement(s.ScrollView,{style:G.container_style},l.a.createElement(s.Text,{style:G.info_style},"Contain:"),l.a.createElement(s.Image,{style:[G.image_style],resizeMode:s.Image.resizeMode.contain,defaultSource:N,source:{uri:U},onProgress:e=>{console.log("onProgress",e)},onLoadStart:()=>{console.log("image onloadStart")},onLoad:()=>{console.log("image onLoad")},onError:e=>{console.log("image onError",e)},onLoadEnd:()=>{console.log("image onLoadEnd")}}),l.a.createElement(s.Text,{style:G.info_style},"Cover:"),l.a.createElement(s.Image,{style:[G.image_style],defaultSource:N,source:{uri:U},resizeMode:s.Image.resizeMode.cover}),l.a.createElement(s.Text,{style:G.info_style},"Center:"),l.a.createElement(s.Image,{style:[G.image_style],defaultSource:N,source:{uri:U},resizeMode:s.Image.resizeMode.center}),l.a.createElement(s.Text,{style:G.info_style},"CapInsets:"),l.a.createElement(s.Image,{style:[G.image_style],defaultSource:N,source:{uri:U},capInsets:{top:50,left:50,bottom:50,right:50},resizeMode:s.Image.resizeMode.cover}),l.a.createElement(s.Text,{style:G.info_style},"TintColor:"),l.a.createElement(s.Image,{style:[G.image_style,{tintColor:"#4c9afa99"}],defaultSource:N,source:{uri:K},resizeMode:s.Image.resizeMode.center}),l.a.createElement(s.Text,{style:G.info_style},"Cover GIF:"),l.a.createElement(s.Image,{style:[G.image_style],resizeMode:s.Image.resizeMode.cover,defaultSource:N,source:{uri:"https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif"},onLoad:e=>{console.log("gif onLoad result: "+e);const{width:t,height:n,url:o}=e;this.setState({gifLoadResult:{width:t,height:n,url:o}})}}),l.a.createElement(s.Text,{style:G.img_result},`gifLoadResult: { width: ${e}, height: ${t}, url: ${n} }`))}}const Q=[{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}],Y=s.StyleSheet.create({container:{backgroundColor:"#fff",collapsable:!1},itemContainer:{padding:12},separatorLine:{marginLeft:12,marginRight:12,height:1,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function X({index:e}){return l.a.createElement(s.View,{style:Y.container,onClickCapture:e=>{console.log("onClickCapture style1",e.target.nodeId,e.currentTarget.nodeId)},onTouchDown:e=>(e.stopPropagation(),console.log("onTouchDown style1",e.target.nodeId,e.currentTarget.nodeId),!1),onClick:e=>(console.log("click style1",e.target.nodeId,e.currentTarget.nodeId),!1)},l.a.createElement(s.Text,{numberOfLines:1},e+": Style 1 UI"))}function J({index:e}){return l.a.createElement(s.View,{style:Y.container},l.a.createElement(s.Text,{numberOfLines:1},e+": Style 2 UI"))}function Z({index:e}){return l.a.createElement(s.View,{style:Y.container},l.a.createElement(s.Text,{numberOfLines:1},e+": Style 5 UI"))}class $ extends l.a.Component{constructor(e){super(e),this.state={dataSource:Q,fetchingDataFlag:!1,horizontal:void 0},this.delText="Delete",this.mockFetchData=this.mockFetchData.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.onEndReached=this.onEndReached.bind(this),this.getRowType=this.getRowType.bind(this),this.getRowKey=this.getRowKey.bind(this),this.getRowStyle=this.getRowStyle.bind(this),this.onDelete=this.onDelete.bind(this),this.onAppear=this.onAppear.bind(this),this.onDisappear=this.onDisappear.bind(this),this.onWillAppear=this.onWillAppear.bind(this),this.onWillDisappear=this.onWillDisappear.bind(this),this.rowShouldSticky=this.rowShouldSticky.bind(this),this.onScroll=this.onScroll.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.concat(n);this.setState({dataSource:o,fetchingDataFlag:!1})}onAppear(e){console.log("onAppear",e)}onScroll(e){console.log("onScroll",e.contentOffset.y),e.contentOffset.y<=0?this.topReached||(this.topReached=!0,console.log("onTopReached")):this.topReached=!1}onDisappear(e){console.log("onDisappear",e)}onWillAppear(e){console.log("onWillAppear",e)}onWillDisappear(e){console.log("onWillDisappear",e)}rowShouldSticky(e){return 2===e}getRowType(e){return this.state.dataSource[e].style}getRowStyle(){const{horizontal:e}=this.state;return e?{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=l.a.createElement(X,{index:e});break;case 2:n=l.a.createElement(J,{index:e});break;case 5:n=l.a.createElement(Z,{index:e});break;case 100:n=l.a.createElement(s.Text,{style:Y.loading},"Loading now...")}return l.a.createElement(s.View,{style:Y.container,onClickCapture:e=>{console.log("onClickCapture style outer",e.target.nodeId,e.currentTarget.nodeId)},onTouchDown:e=>(console.log("onTouchDown style outer",e.target.nodeId,e.currentTarget.nodeId),!1),onClick:e=>(console.log("click style outer",e.target.nodeId,e.currentTarget.nodeId),!1)},l.a.createElement(s.View,{style:Y.itemContainer},n),r?null:l.a.createElement(s.View,{style:Y.separatorLine}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>e(Q),600)})}changeDirection(){this.setState({horizontal:void 0===this.state.horizontal||void 0})}render(){const{dataSource:e,horizontal:t}=this.state;return l.a.createElement(s.View,{style:{flex:1,collapsable:!1}},l.a.createElement(s.ListView,{onTouchDown:e=>{console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:e=>{console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:e=>(console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!0),bounces:!0,horizontal:t,style:[{backgroundColor:"#ffffff"},t?{height:50}:{flex:1}],numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,onMomentumScrollBegin:e=>console.log("onMomentumScrollBegin",e),onMomentumScrollEnd:e=>console.log("onMomentumScrollEnd",e),onScrollBeginDrag:e=>console.log("onScrollBeginDrag",e),onScrollEndDrag:e=>console.log("onScrollEndDrag",e),delText:this.delText,editable:!0,getRowStyle:this.getRowStyle,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:this.rowShouldSticky,onAppear:this.onAppear,onDisappear:this.onDisappear,onWillAppear:this.onWillAppear,onWillDisappear:this.onWillDisappear,onScroll:this.onScroll,scrollEventThrottle:1e3}),"android"===s.Platform.OS?l.a.createElement(s.View,{onClick:()=>this.changeDirection(),style:{position:"absolute",right:20,bottom:20,width:67,height:67,borderRadius:30,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:3,boxShadowOffsetY:3,boxShadowColor:"#4c9afa"}},l.a.createElement(s.View,{style:{width:60,height:60,borderRadius:30,backgroundColor:"#4c9afa",display:"flex",justifyContent:"center",alignItems:"center"}},l.a.createElement(s.Text,{style:{color:"white"}},"切换方向"))):null)}}const ee="#4c9afa",te="#4c9afa",ne="white",oe=s.StyleSheet.create({container:{flex:1,flexDirection:"column",justifyContent:"flex-start",alignItems:"center"},buttonView:{borderColor:ee,borderWidth:2,borderStyle:"solid",borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:ee,textAlign:"center",textAlignVertical:"center"},selectionText:{fontSize:20,color:ee,textAlign:"center",textAlignVertical:"center",marginLeft:10,marginRight:10}});class re extends l.a.Component{constructor(e){super(e),this.state={visible:!1,press:!1,animationType:"fade"},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 l.a.createElement(s.ScrollView,null,l.a.createElement(s.View,{style:oe.container},l.a.createElement(s.View,{onPressIn:()=>this.feedback("in"),onPressOut:()=>this.feedback("out"),onClick:this.show,style:[oe.buttonView,{borderColor:ee,opacity:e?.5:1}]},l.a.createElement(s.Text,{style:[oe.buttonText,{color:ee}]},"点击弹出浮层"))),l.a.createElement(s.View,{style:{flexDirection:"row",justifyContent:"center",marginTop:20}},l.a.createElement(s.Text,{onClick:()=>{this.setState({animationType:"fade"})},style:[oe.selectionText,{backgroundColor:"fade"===this.state.animationType?"rgba(255, 0, 0, 0.5)":"#FFFFFF"}]},"fade"),l.a.createElement(s.Text,{onClick:()=>{this.setState({animationType:"slide"})},style:[oe.selectionText,{backgroundColor:"slide"===this.state.animationType?"rgba(255, 0, 0, 0.5)":"#FFFFFF"}]},"slide"),l.a.createElement(s.Text,{onClick:()=>{this.setState({animationType:"slide_fade"})},style:[oe.selectionText,{backgroundColor:"slide_fade"===this.state.animationType?"rgba(255, 0, 0, 0.5)":"#FFFFFF"}]},"slide_fade")),l.a.createElement(s.Modal,{transparent:!0,animationType:this.state.animationType,visible:t,onRequestClose:()=>{},supportedOrientations:["portrait"],immersionStatusBar:!0},l.a.createElement(s.View,{style:{flex:1,flexDirection:"row",justifyContent:"center",backgroundColor:"#4c9afa88"}},l.a.createElement(s.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:te,marginTop:300,flexDirection:"row",justifyContent:"center"}},l.a.createElement(s.Text,{style:{color:ne,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}const ie="https://user-images.githubusercontent.com/12878546/148736841-59ce5d1c-8010-46dc-8632-01c380159237.jpg",ae={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[ie,ie,ie],subInfo:["三图评论","11评"]}},le={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"https://user-images.githubusercontent.com/12878546/148736850-4fc13304-25d4-4b6a-ada3-cbf0745666f5.jpg",subInfo:["左文右图"]}},se={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"https://user-images.githubusercontent.com/12878546/148736859-29e3a5b2-612a-4fdd-ad21-dc5d29fa538f.jpg",subInfo:["六眼神魔 5234播放"]}};var ce=[se,ae,le,ae,le,ae,le,se,ae],he=n("./node_modules/@babel/runtime/helpers/extends.js"),ue=n.n(he);var de={getScreenWidth(){const e=s.Dimensions.get("screen").width,t=s.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray(e){const t=[];for(let n=0;n=812&&s.PixelRatio.get()>=2&&(e=!0),e}};const me=(de.getScreenWidth()-24-12)/3,ge=Math.floor(me/1.35),fe=s.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:ge,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:me,height:ge},title:{fontSize:"android"===s.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function ye(e){const{itemBean:{title:t,picList:n}}=e;let{itemBean:{subInfo:o}}=e,r=null;if(o&&o.length){o=de.uniqueArray(o);const e=o.join(" ");r=l.a.createElement(s.Text,{style:fe.normalText,numberOfLines:1},e)}return l.a.createElement(s.View,ue()({},e,{style:{collapsable:!1}}),l.a.createElement(s.Text,{style:[fe.title],numberOfLines:2,enableScale:!0},t),l.a.createElement(s.View,{style:fe.imageContainer},l.a.createElement(s.Image,{style:fe.image,source:{uri:n[0]},resizeMode:s.Image.resizeMode.cover}),l.a.createElement(s.Image,{style:[fe.image,{marginLeft:6,marginRight:6}],source:{uri:n[1]},resizeMode:s.Image.resizeMode.cover}),l.a.createElement(s.Image,{style:fe.image,source:{uri:n[2]},resizeMode:s.Image.resizeMode.cover})),r?l.a.createElement(s.View,{style:fe.tagLine},r):null)}const pe=de.getScreenWidth()-24,be=Math.floor(pe-12)/3,we=Math.floor(be/1.35),xe=s.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:we},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:be,height:we},image:{width:be,height:we},title:{fontSize:"android"===s.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Se(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=de.uniqueArray(i);const e=i.join(" ");n=l.a.createElement(s.Text,{style:xe.normalText,numberOfLines:1},e)}return l.a.createElement(s.View,ue()({},e,{style:xe.container}),l.a.createElement(s.View,{style:xe.leftContainer},l.a.createElement(s.Text,{style:xe.title,numberOfLines:2,enableScale:!0},o),n?l.a.createElement(s.View,{style:xe.tagLine},n):null),l.a.createElement(s.View,{style:xe.imageContainer},l.a.createElement(s.Image,{resizeMode:s.Image.resizeMode.cover,style:xe.image,source:{uri:r}})))}const Ee=de.getScreenWidth()-24,Ae=Math.floor(188*Ee/336),Te=s.StyleSheet.create({text:{fontSize:"android"===s.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Ee,height:Ae,alignSelf:"center"},image:{width:Ee,height:Ae},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Ce(e){if("undefined"===e)return null;const{itemBean:t}=e;if(!t)return null;const{title:n,picUrl:o}=t;let{subInfo:r}=t,i=null;if(r&&r.length){r=de.uniqueArray(r);const e=r.join(" ");i=l.a.createElement(s.Text,{style:Te.normalText,numberOfLines:1},e)}return l.a.createElement(s.View,e,l.a.createElement(s.Text,{style:Te.text,numberOfLines:2,enableScale:!0},n),l.a.createElement(s.View,{style:Te.playerView},l.a.createElement(s.Image,{style:Te.image,source:{uri:o},resizeMode:s.Image.resizeMode.cover})),i?l.a.createElement(s.View,{style:Te.tagLine},i):null)}const ve=s.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 ke extends l.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=l.a.createElement(ye,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 2:o=l.a.createElement(Se,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 5:o=l.a.createElement(Ce,{itemBean:r.itemBean,onClick:()=>this.onClickItem(e)});break;case 100:o=l.a.createElement(s.Text,{style:ve.loading},n)}return l.a.createElement(s.View,{style:ve.container},l.a.createElement(s.View,{style:ve.itemContainer},o),i?null:l.a.createElement(s.View,{style:ve.spliter}))}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}getRefresh(){return l.a.createElement(s.View,{style:{flex:1,height:30}},l.a.createElement(s.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}mockFetchData(){return new Promise(e=>{setTimeout(()=>(this.setState({fetchingDataFlag:!1}),this.fetchTimes+=1,this.fetchTimes>=50?e([]):e(ce)),600)})}render(){const{dataSource:e}=this.state;return l.a.createElement(s.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},l.a.createElement(s.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}const Ve=s.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:{flex:1,height:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{height:40,flex:1,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}});class Re extends l.a.Component{constructor(e){super(e),this.state={dataSource:[],headerRefreshText:"继续下拉触发刷新",footerRefreshText:"正在加载...",horizontal:void 0},this.loadMoreDataFlag=!1,this.fetchingDataFlag=!1,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.getHeaderStyle=this.getHeaderStyle.bind(this),this.getFooterStyle=this.getFooterStyle.bind(this),this.getRowStyle=this.getRowStyle.bind(this),this.renderPullHeader=this.renderPullHeader.bind(this),this.renderPullFooter=this.renderPullFooter.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onHeaderReleased=this.onHeaderReleased.bind(this),this.onHeaderPulling=this.onHeaderPulling.bind(this),this.onFooterPulling=this.onFooterPulling.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e}),this.listView.collapsePullHeader()}mockFetchData(){return new Promise(e=>{setTimeout(()=>e(ce),800)})}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({footerRefreshText:"加载更多..."});let t=[];try{t=await this.mockFetchData()}catch(e){}0===t.length&&this.setState({footerRefreshText:"没有更多数据"});const n=[...e,...t];this.setState({dataSource:n}),this.loadMoreDataFlag=!1,this.listView.collapsePullFooter()}async onHeaderReleased(){if(this.fetchingDataFlag)return;this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({headerRefreshText:"刷新数据中,请稍等"});let e=[];try{e=await this.mockFetchData(),e=e.reverse()}catch(e){}this.fetchingDataFlag=!1,this.setState({dataSource:e,headerRefreshText:"2秒后收起"},()=>{this.listView.collapsePullHeader({time:2e3})})}onHeaderPulling(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Ve.pullContent.height?this.setState({headerRefreshText:"松手,即可触发刷新"}):this.setState({headerRefreshText:"继续下拉,触发刷新"}))}onFooterPulling(e){console.log("onFooterPulling",e)}onClickItem(e,t){console.log(`item: ${e} is clicked..`,t.target.nodeId,t.currentTarget.nodeId)}getRowType(e){return this.state.dataSource[e].style}getRowKey(e){return"row-"+e}getHeaderStyle(){const{horizontal:e}=this.state;return e?{width:50}:{}}renderPullHeader(){const{headerRefreshText:e,horizontal:t}=this.state;return t?l.a.createElement(s.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},l.a.createElement(s.Text,{style:{lineHeight:25,color:"white",width:40,paddingHorizontal:15}},e)):l.a.createElement(s.View,{style:Ve.pullContainer},l.a.createElement(s.Text,{style:Ve.pullContent},e))}getFooterStyle(){const{horizontal:e}=this.state;return e?{width:40}:{}}renderPullFooter(){const{horizontal:e}=this.state;return e?l.a.createElement(s.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},l.a.createElement(s.Text,{style:{color:"white",lineHeight:25,width:40,paddingHorizontal:15}},this.state.footerRefreshText)):l.a.createElement(s.View,{style:Ve.pullFooter},l.a.createElement(s.Text,{style:{color:"white"}},this.state.footerRefreshText))}renderRow(e){const{dataSource:t}=this.state;let n=null;const o=t[e],r=t.length===e+1;switch(o.style){case 1:n=l.a.createElement(ye,{itemBean:o.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 2:n=l.a.createElement(Se,{itemBean:o.itemBean,onClick:t=>this.onClickItem(e,t)});break;case 5:n=l.a.createElement(Ce,{itemBean:o.itemBean,onClick:t=>this.onClickItem(e,t)})}return l.a.createElement(s.View,{style:Ve.container},l.a.createElement(s.View,{style:Ve.itemContainer},n),r?null:l.a.createElement(s.View,{style:Ve.splitter}))}getRowStyle(){const{horizontal:e}=this.state;return e?{height:300,justifyContent:"center",alignItems:"center"}:{}}changeDirection(){this.setState({horizontal:void 0===this.state.horizontal||void 0})}render(){const{dataSource:e,horizontal:t}=this.state;return l.a.createElement(s.View,{style:{flex:1,collapsable:!1}},l.a.createElement(s.ListView,{horizontal:t,onClick:e=>console.log("ListView",e.target.nodeId,e.currentTarget.nodeId),ref:e=>{this.listView=e},style:[{backgroundColor:"#ffffff"},t?{height:300}:{flex:1}],numberOfRows:e.length,getRowType:this.getRowType,getRowKey:this.getRowKey,getHeaderStyle:this.getHeaderStyle,getFooterStyle:this.getFooterStyle,getRowStyle:this.getRowStyle,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,renderPullFooter:this.renderPullFooter,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling,onFooterReleased:this.onEndReached,onFooterPulling:this.onFooterPulling,rowShouldSticky:e=>0===e}),"android"===s.Platform.OS?l.a.createElement(s.View,{onClick:()=>this.changeDirection(),style:{position:"absolute",right:20,bottom:20,width:67,height:67,borderRadius:30,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:3,boxShadowOffsetY:3,boxShadowColor:"#4c9afa"}},l.a.createElement(s.View,{style:{width:60,height:60,borderRadius:30,backgroundColor:"#4c9afa",display:"flex",justifyContent:"center",alignItems:"center"}},l.a.createElement(s.Text,{style:{color:"white"}},"切换方向"))):null)}}const Ie=s.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderStyle:"solid",borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1,borderStyle:"solid"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function De(){return l.a.createElement(s.ScrollView,null,l.a.createElement(s.View,{style:Ie.itemTitle},l.a.createElement(s.Text,null,"Horizontal ScrollView")),l.a.createElement(s.View,null,l.a.createElement(s.ScrollView,{horizontal:!0,bounces:!0,showsHorizontalScrollIndicator:!1,showScrollIndicator:!1,onScroll:e=>console.log("onScroll",e),onMomentumScrollBegin:e=>console.log("onMomentumScrollBegin",e),onMomentumScrollEnd:e=>console.log("onMomentumScrollEnd",e),onScrollBeginDrag:e=>console.log("onScrollBeginDrag",e),onScrollEndDrag:e=>console.log("onScrollEndDrag",e)},l.a.createElement(s.Text,{style:Ie.itemStyle},"A"),l.a.createElement(s.Text,{style:Ie.itemStyle},"B"),l.a.createElement(s.Text,{style:Ie.itemStyle},"C"),l.a.createElement(s.Text,{style:Ie.itemStyle},"D"),l.a.createElement(s.Text,{style:Ie.itemStyle},"E"),l.a.createElement(s.Text,{style:Ie.itemStyle},"F"),l.a.createElement(s.Text,{style:Ie.itemStyle},"A"))),l.a.createElement(s.View,{style:Ie.itemTitle},l.a.createElement(s.Text,null,"Vertical ScrollView")),l.a.createElement(s.ScrollView,{bounces:!0,horizontal:!1,style:Ie.verticalScrollView,showScrollIndicator:!1,showsVerticalScrollIndicator:!1},l.a.createElement(s.Text,{style:Ie.itemStyle},"A"),l.a.createElement(s.Text,{style:Ie.itemStyle},"B"),l.a.createElement(s.Text,{style:Ie.itemStyle},"C"),l.a.createElement(s.Text,{style:Ie.itemStyle},"D"),l.a.createElement(s.Text,{style:Ie.itemStyle},"E"),l.a.createElement(s.Text,{style:Ie.itemStyle},"F"),l.a.createElement(s.Text,{style:Ie.itemStyle},"A")))}const Oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEXRSTlMA9QlZEMPc2Mmmj2VkLEJ4Rsx+pEgAAAChSURBVCjPjVLtEsMgCDOAdbbaNu//sttVPes+zvGD8wgQCLp/TORbUGMAQtQ3UBeSAMlF7/GV9Cmb5eTJ9R7H1t4bOqLE3rN2UCvvwpLfarhILfDjJL6WRKaXfzxc84nxAgLzCGSGiwKwsZUB8hPorZwUV1s1cnGKw+yAOrnI+7hatNIybl9Q3OkBfzopCw6SmDVJJiJ+yD451OS0/TNM7QnuAAbvCG0TSAAAAABJRU5ErkJggg==",Pe="https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif",je=s.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",borderWidth:1,borderStyle:"solid",borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",flexGrow:1,flexShrink:1},buttonText:{lineHeight:24,textAlign:"center",paddingHorizontal:20},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}});let Le=0;class Fe extends l.a.Component{constructor(e){super(e),this.state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1},numberOfLines:2,ellipsizeMode:void 0},this.incrementFontSize=this.incrementFontSize.bind(this),this.decrementFontSize=this.decrementFontSize.bind(this),this.incrementLine=this.incrementLine.bind(this),this.decrementLine=this.decrementLine.bind(this),this.changeMode=this.changeMode.bind(this)}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})}incrementLine(){const{numberOfLines:e}=this.state;e<6&&this.setState({numberOfLines:e+1})}decrementLine(){const{numberOfLines:e}=this.state;e>1&&this.setState({numberOfLines:e-1})}changeMode(e){this.setState({ellipsizeMode:e})}changeBreakStrategy(e){this.setState({breakStrategy:e})}render(){const{fontSize:e,textShadowColor:t,textShadowOffset:n,numberOfLines:o,ellipsizeMode:r,breakStrategy:i}=this.state,a=e=>l.a.createElement(s.View,{style:je.itemTitle},l.a.createElement(s.Text,{style:!0},e));return l.a.createElement(s.ScrollView,{style:{paddingHorizontal:10}},a("shadow"),l.a.createElement(s.View,{style:[je.itemContent,{height:60}],onClick:()=>{let e="red",t={x:10,y:1};Le%2==1&&(e="grey",t={x:1,y:1}),Le+=1,this.setState({textShadowColor:e,textShadowOffset:t})}},l.a.createElement(s.Text,{style:[je.normalText,{color:"#242424",textShadowOffset:n,textShadowRadius:3,textShadowColor:t}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),l.a.createElement(s.View,{style:[je.itemContent,{height:80}]},l.a.createElement(s.Text,{style:[je.normalText,{color:"#242424"}]},"Text color is black"),l.a.createElement(s.Text,{style:[je.normalText,{color:"blue"}]},"Text color is blue"),l.a.createElement(s.Text,{style:[je.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{style:[je.normalText,{fontSize:e}]},"Text fontSize is "+e),l.a.createElement(s.View,{style:je.button,onClick:this.incrementFontSize},l.a.createElement(s.Text,{style:je.buttonText},"放大字体")),l.a.createElement(s.View,{style:je.button,onClick:this.decrementFontSize},l.a.createElement(s.Text,{style:je.buttonText},"缩小字体"))),a("fontStyle"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{style:[je.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),l.a.createElement(s.Text,{style:[je.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines and ellipsizeMode"),l.a.createElement(s.View,{style:[je.itemContent]},l.a.createElement(s.Text,{style:[je.normalText,{marginBottom:10}]},`numberOfLines=${o} | ellipsizeMode=${r}`),l.a.createElement(s.Text,{numberOfLines:o,ellipsizeMode:r,style:[je.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Text,{style:{fontSize:19,color:"white"}},"先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。"),l.a.createElement(s.Text,null,"然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。")),l.a.createElement(s.Text,{numberOfLines:o,ellipsizeMode:r,style:[je.normalText,{backgroundColor:"#4c9afa",marginBottom:10,color:"white",paddingHorizontal:10,paddingVertical:5}]},"line 1\n\nline 3\n\nline 5"),l.a.createElement(s.Text,{numberOfLines:o,ellipsizeMode:r,style:[je.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5,verticalAlign:"middle"}]},l.a.createElement(s.Image,{style:{width:24,height:24},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEnRSTlMA/QpX7WQU2m27pi3Ej9KEQXaD5HhjAAAAqklEQVQoz41SWxLDIAh0RcFXTHL/yzZSO01LMpP9WJEVUNA9gfdXTioCSKE/kQQTQmf/ArRYva+xAcuPP37seFII2L7FN4BmXdHzlEPIpDHiZ0A7eIViPcw2QwqipkvMSdNEFBUE1bmMNOyE7FyFaIkAP4jHhhG80lvgkzBODTKpwhRMcexuR7fXzcp08UDq6GRbootp4oRtO3NNpd4NKtnR9hB6oaefweIFQU0EfnGDRoQAAAAASUVORK5CYII="}}),l.a.createElement(s.Text,null,"Text + Attachment")),l.a.createElement(s.View,{style:je.buttonBar},l.a.createElement(s.View,{style:je.button,onClick:this.incrementLine},l.a.createElement(s.Text,{style:je.buttonText},"加一行")),l.a.createElement(s.View,{style:je.button,onClick:this.decrementLine},l.a.createElement(s.Text,{style:je.buttonText},"减一行"))),l.a.createElement(s.View,{style:je.buttonBar},l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeMode("clip")},l.a.createElement(s.Text,{style:je.buttonText},"clip")),l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeMode("head")},l.a.createElement(s.Text,{style:je.buttonText},"head")),l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeMode("middle")},l.a.createElement(s.Text,{style:je.buttonText},"middle")),l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeMode("tail")},l.a.createElement(s.Text,{style:je.buttonText},"tail")))),a("textDecoration"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:[je.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),l.a.createElement(s.Text,{numberOfLines:1,style:[je.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),a("LetterSpacing"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:[je.normalText,{letterSpacing:-1}]},"Text width letter-spacing -1"),l.a.createElement(s.Text,{numberOfLines:1,style:[je.normalText,{letterSpacing:5}]},"Text width letter-spacing 5")),a("Nest Text"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:3},l.a.createElement(s.Text,{numberOfLines:3,style:[je.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),l.a.createElement(s.Text,{numberOfLines:3,style:je.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),a("Custom font"),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:je.customFont},"Hippy 跨端框架")),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:[je.customFont,{fontWeight:"bold"}]},"Hippy 跨端框架 粗体")),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:[je.customFont,{fontStyle:"italic"}]},"Hippy 跨端框架 斜体")),l.a.createElement(s.View,{style:[je.itemContent,{height:100}]},l.a.createElement(s.Text,{numberOfLines:1,style:[je.customFont,{fontWeight:"bold",fontStyle:"italic"}]},"Hippy 跨端框架 粗斜体")),a("Text Nested"),l.a.createElement(s.View,{style:[je.itemContent,{height:150}]},l.a.createElement(s.Text,{style:{height:100,lineHeight:50}},l.a.createElement(s.Text,{numberOfLines:1,style:je.normalText},"后面有张图片"),l.a.createElement(s.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"}}),l.a.createElement(s.Text,{numberOfLines:1,style:je.customFont},"前面有张图片")),l.a.createElement(s.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingHorizontal:10,paddingVertical:5,backgroundColor:"#4c9afa"}},l.a.createElement(s.Image,{style:{width:24,height:24,alignSelf:"center"},source:{uri:Oe}}),l.a.createElement(s.Text,{style:{fontSize:15,alignItems:"center",justifyContent:"center"}},"Image+Text"))),"android"===s.Platform.OS&&a("breakStrategy"),"android"===s.Platform.OS&&l.a.createElement(s.View,{style:je.itemContent},l.a.createElement(s.Text,{style:[je.normalText,{borderWidth:1,borderColor:"gray"}],breakStrategy:i},"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."),l.a.createElement(s.Text,{style:je.normalText},"breakStrategy: "+i),l.a.createElement(s.View,{style:je.buttonBar},l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeBreakStrategy("simple")},l.a.createElement(s.Text,{style:je.buttonText},"simple")),l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeBreakStrategy("high_quality")},l.a.createElement(s.Text,{style:je.buttonText},"high_quality")),l.a.createElement(s.View,{style:je.button,onClick:()=>this.changeBreakStrategy("balanced")},l.a.createElement(s.Text,{style:je.buttonText},"balanced")))),a("verticalAlign"),l.a.createElement(s.View,{style:[je.itemContent,{height:"android"===s.Platform.OS?160:70}]},l.a.createElement(s.Text,{style:[je.normalText,{lineHeight:50,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:Pe}}),l.a.createElement(s.Text,{style:{fontSize:16,verticalAlign:"top"}},"字"),l.a.createElement(s.Text,{style:{fontSize:16,verticalAlign:"middle"}},"字"),l.a.createElement(s.Text,{style:{fontSize:16,verticalAlign:"baseline"}},"字"),l.a.createElement(s.Text,{style:{fontSize:16,verticalAlign:"bottom"}},"字")),"android"===s.Platform.OS&&l.a.createElement(l.a.Fragment,null,l.a.createElement(s.Text,null,"legacy mode:"),l.a.createElement(s.Text,{style:[je.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlignment:0},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:18,height:12,verticalAlignment:1},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:12,verticalAlignment:2},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:36,height:24,verticalAlignment:3},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,top:-10},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:18,height:12,top:-5},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:24,height:12},source:{uri:Pe}}),l.a.createElement(s.Image,{style:{width:36,height:24,top:3},source:{uri:Pe}}),l.a.createElement(s.Text,{style:{fontSize:16}},"字"),l.a.createElement(s.Text,{style:{fontSize:16}},"字"),l.a.createElement(s.Text,{style:{fontSize:16}},"字"),l.a.createElement(s.Text,{style:{fontSize:16}},"字")))),a("tintColor & backgroundColor"),l.a.createElement(s.View,{style:[je.itemContent]},l.a.createElement(s.Text,{style:[je.normalText,{lineHeight:30,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange",backgroundColor:"#ccc"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc"},source:{uri:Oe}}),l.a.createElement(s.Text,{style:{verticalAlign:"middle",backgroundColor:"#090"}},"text")),"android"===s.Platform.OS&&l.a.createElement(l.a.Fragment,null,l.a.createElement(s.Text,null,"legacy mode:"),l.a.createElement(s.Text,{style:[je.normalText,{lineHeight:30,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,tintColor:"orange"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,tintColor:"orange",backgroundColor:"#ccc"},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,backgroundColor:"#ccc"},source:{uri:Oe}})))),a("margin"),l.a.createElement(s.View,{style:[je.itemContent]},l.a.createElement(s.Text,{style:[{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"top",backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"baseline",backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlign:"bottom",backgroundColor:"#ccc",margin:5},source:{uri:Oe}})),"android"===s.Platform.OS&&l.a.createElement(l.a.Fragment,null,l.a.createElement(s.Text,null,"legacy mode:"),l.a.createElement(s.Text,{style:[je.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlignment:0,backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlignment:1,backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlignment:2,backgroundColor:"#ccc",margin:5},source:{uri:Oe}}),l.a.createElement(s.Image,{style:{width:24,height:24,verticalAlignment:3,backgroundColor:"#ccc",margin:5},source:{uri:Oe}})))))}}const ze=s.StyleSheet.create({container_style:{paddingHorizontal:10},input_style:{width:300,marginVertical:10,fontSize:16,color:"#242424",height:30,lineHeight:30},input_style_block:{height:100,lineHeight:20,fontSize:15,borderWidth:1,borderColor:"gray",underlineColorAndroid:"transparent"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{marginTop:10},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{width:200,height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",marginTop:5,marginBottom:5,flexGrow:1,flexShrink:1}});class Be extends a.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()}async onFocus(){const e=await this.input.isFocused();this.setState({event:"onFocus",isFocused:e})}async onBlur(){const e=await this.input.isFocused();this.setState({event:"onBlur",isFocused:e})}changeBreakStrategy(e){this.setState({breakStrategy:e})}render(){const{textContent:e,event:t,isFocused:n,breakStrategy:o}=this.state,r=e=>l.a.createElement(s.View,{style:ze.itemTitle},l.a.createElement(s.Text,null,e));return l.a.createElement(s.ScrollView,{style:ze.container_style},r("text"),l.a.createElement(s.TextInput,{ref:e=>{this.input=e},style:ze.input_style,caretColor:"yellow",underlineColorAndroid:"grey",placeholderTextColor:"#4c9afa",placeholder:"text",defaultValue:e,onBlur:()=>this.onBlur(),onFocus:()=>this.onFocus()}),l.a.createElement(s.Text,{style:ze.itemContent},`事件: ${t} | isFocused: ${n}`),l.a.createElement(s.View,{style:ze.button,onClick:this.changeInputContent},l.a.createElement(s.Text,null,"点击改变输入框内容")),l.a.createElement(s.View,{style:ze.button,onClick:this.focus},l.a.createElement(s.Text,null,"Focus")),l.a.createElement(s.View,{style:ze.button,onClick:this.blur},l.a.createElement(s.Text,null,"Blur")),r("numeric"),l.a.createElement(s.TextInput,{style:ze.input_style,keyboardType:"numeric",placeholder:"numeric"}),r("phone-pad"),l.a.createElement(s.TextInput,{style:ze.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),r("password"),l.a.createElement(s.TextInput,{style:ze.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),r("maxLength"),l.a.createElement(s.TextInput,{caretColor:"yellow",style:ze.input_style,placeholder:"maxLength=5",maxLength:5}),"android"===s.Platform.OS&&r("breakStrategy"),"android"===s.Platform.OS&&l.a.createElement(l.a.Fragment,null,l.a.createElement(s.TextInput,{style:ze.input_style_block,breakStrategy:o,defaultValue:"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."}),l.a.createElement(s.Text,{style:{}},"breakStrategy: "+o),l.a.createElement(s.View,{style:ze.buttonBar},l.a.createElement(s.View,{style:ze.button,onClick:()=>this.changeBreakStrategy("simple")},l.a.createElement(s.Text,{style:ze.buttonText},"simple")),l.a.createElement(s.View,{style:ze.button,onClick:()=>this.changeBreakStrategy("high_quality")},l.a.createElement(s.Text,{style:ze.buttonText},"high_quality")),l.a.createElement(s.View,{style:ze.button,onClick:()=>this.changeBreakStrategy("balanced")},l.a.createElement(s.Text,{style:ze.buttonText},"balanced")))))}}var Me=n.p+"assets/defaultSource.jpg";const _e=s.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",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,borderStyle:"solid",padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function He(){const e=e=>l.a.createElement(s.View,{style:_e.itemTitle},l.a.createElement(s.Text,null,e));return l.a.createElement(s.ScrollView,{style:{paddingHorizontal:10}},e("backgroundColor"),l.a.createElement(s.View,{style:[_e.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),l.a.createElement(s.View,{style:[_e.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:Me}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},l.a.createElement(s.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),l.a.createElement(s.View,{style:[_e.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderStyle:"solid",borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},l.a.createElement(s.Text,{style:{color:"white"}},"渐变色")),e("border props"),l.a.createElement(s.View,{style:[_e.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1,borderStyle:"solid"}]}),e("flex props"),l.a.createElement(s.View,{style:[_e.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},l.a.createElement(s.View,{style:[_e.smallRectangle,{backgroundColor:"yellow"}]}),l.a.createElement(s.View,{style:[_e.smallRectangle,{backgroundColor:"blue"}]}),l.a.createElement(s.View,{style:[_e.smallRectangle,{backgroundColor:"green"}]})))}const We=s.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderStyle:"solid",borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),Ne="SquarePagerView",Ke="TrianglePagerView",Ue="CirclePagerView";function Ge(e,t){const n=t=>l.a.createElement(s.View,{style:We.pageContainer,key:t},l.a.createElement(s.View,{style:[We.shapeBase,e],key:"shape"}),l.a.createElement(s.View,{style:We.mainRec,key:"title"},t?l.a.createElement(s.Text,{style:We.title},t):null));return n.displayName=t,n}const qe=Ge(We.square,Ne),Qe=Ge(We.triangle,Ke),Ye=Ge(We.circle,Ue),Xe=s.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 Je extends l.a.Component{constructor(e){super(e),H()(this,"state",{selectedIndex:0}),this.onPageSelected=this.onPageSelected.bind(this),this.onPageScrollStateChanged=this.onPageScrollStateChanged.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 l.a.createElement(s.View,{style:{flex:1,backgroundColor:"#ffffff"}},l.a.createElement(s.View,{style:Xe.buttonContainer},l.a.createElement(s.View,{style:Xe.button,onClick:()=>{this.viewpager.setPage(2)}},l.a.createElement(s.Text,{style:Xe.buttonText},"动效滑到第3页")),l.a.createElement(s.View,{style:Xe.button,onClick:()=>this.viewpager.setPageWithoutAnimation(0)},l.a.createElement(s.Text,{style:Xe.buttonText},"直接滑到第1页"))),l.a.createElement(s.ViewPager,{ref:e=>{this.viewpager=e},style:Xe.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScrollStateChanged:this.onPageScrollStateChanged,onPageScroll:this.onPageScroll},[qe("squarePager"),Qe("TrianglePager"),Ye("CirclePager")]),l.a.createElement(s.View,{style:Xe.dotContainer},new Array(3).fill(0).map((t,n)=>{const o=n===e;return l.a.createElement(s.View,{style:[Xe.dot,o?Xe.selectDot:null],key:"dot_"+n})})))}}const Ze=s.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{padding:10,flex:1,flexGrow:1,borderRadius:10}});function $e(){return l.a.createElement(s.View,{style:{paddingHorizontal:10,flex:1}},l.a.createElement(s.View,{style:Ze.itemTitle},l.a.createElement(s.Text,null,"WebView 示例")),l.a.createElement(s.WebView,{source:{uri:"https://hippyjs.org"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:Ze.webViewStyle,onLoad:({url:e})=>console.log("webview onload",e),onLoadStart:({url:e})=>console.log("webview onLoadStart",e),onLoadEnd:({url:e,success:t,error:n})=>console.log("webview onLoadEnd",e,t,n)}))}const et=s.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"}}),tt=s.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 nt(){return l.a.createElement(s.View,{style:et.shadowDemo},"android"===s.Platform.OS?l.a.createElement(s.View,{style:et.shadowDemoCubeAndroid},l.a.createElement(s.View,{style:et.shadowDemoContentAndroid},l.a.createElement(s.Text,{style:et.text},"没有偏移阴影样式"))):l.a.createElement(s.View,{style:et.shadowDemoCubeIos},l.a.createElement(s.View,{style:et.shadowDemoContentIos},l.a.createElement(s.Text,{style:et.text},"没有偏移阴影样式"))),"android"===s.Platform.OS?l.a.createElement(s.View,{style:tt.shadowDemoCubeAndroid},l.a.createElement(s.View,{style:tt.shadowDemoContentAndroid},l.a.createElement(s.Text,{style:tt.text},"偏移阴影样式"))):l.a.createElement(s.View,{style:tt.shadowDemoCubeIos},l.a.createElement(s.View,{style:tt.shadowDemoContentIos},l.a.createElement(s.Text,{style:tt.text},"偏移阴影样式"))))}const ot=ce.filter(e=>2!==e.style),rt=s.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:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}});class it extends l.a.Component{constructor(e){super(e),this.state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},this.numberOfColumns=2,this.columnSpacing=6,this.interItemSpacing=6,this.mockFetchData=this.mockFetchData.bind(this),this.renderItem=this.renderItem.bind(this),this.getItemType=this.getItemType.bind(this),this.getItemKey=this.getItemKey.bind(this),this.onEndReached=this.onEndReached.bind(this),this.onRefresh=this.onRefresh.bind(this),this.getRefresh=this.getRefresh.bind(this),this.renderPullFooter=this.renderPullFooter.bind(this),this.renderBanner=this.renderBanner.bind(this),this.getItemStyle=this.getItemStyle.bind(this)}async componentDidMount(){const e=await this.mockFetchData();this.setState({dataSource:e})}async onEndReached(){const{dataSource:e}=this.state;if(this.loadMoreDataFlag)return;this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."});let t=[];try{t=await this.mockFetchData()}catch(e){}0===t.length&&this.setState({loadingState:"没有更多数据"});const n=[...e,...t];this.setState({dataSource:n}),this.loadMoreDataFlag=!1}renderPullFooter(){return 0===this.state.dataSource.length?null:l.a.createElement(s.View,{style:rt.pullFooter},l.a.createElement(s.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 l.a.createElement(s.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},l.a.createElement(s.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 0===this.state.dataSource.length?null:l.a.createElement(s.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},l.a.createElement(s.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=l.a.createElement(ye,{itemBean:o.itemBean});break;case 2:n=l.a.createElement(Se,{itemBean:o.itemBean});break;case 5:n=l.a.createElement(Ce,{itemBean:o.itemBean})}return l.a.createElement(s.View,{onClick:()=>this.onItemClick(e),style:rt.container},l.a.createElement(s.View,{style:rt.itemContainer},n),l.a.createElement(s.View,{style:rt.splitter}))}mockFetchData(){return new Promise(e=>{setTimeout(()=>{const t=[...ot,...ot];return e(t)},600)})}getWaterfallContentInset(){return{top:0,left:5,bottom:0,right:5}}getItemStyle(){const{numberOfColumns:e,columnSpacing:t}=this,n=s.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 l.a.createElement(s.RefreshWrapper,{ref:e=>{this.refresh=e},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},l.a.createElement(s.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}))}}var at=n.p+"assets/defaultSource.jpg";function lt(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 st(e){for(var t=1;t{i.current.setPressed(!1)},{nativeBackgroundAndroid:h,style:u}=e;return l.a.createElement(s.View,{onLayout:()=>{s.UIManagerModule.measureInAppWindow(i.current,e=>{n(e.x),r(e.y)})},style:u,onTouchDown:e=>{i.current.setHotspot(e.page_x-t,e.page_y-o),i.current.setPressed(!0)},onTouchEnd:c,onTouchCancel:c,ref:i,nativeBackgroundAndroid:st(st({},ct),h)},e.children)}const ut=s.StyleSheet.create({imgRectangle:{width:260,height:56,alignItems:"center",justifyContent:"center"},circleRipple:{marginTop:30,width:150,height:56,alignItems:"center",justifyContent:"center",borderWidth:3,borderStyle:"solid",borderColor:"#4c9afa"},squareRipple:{alignItems:"center",justifyContent:"center",width:150,height:150,backgroundColor:"#4c9afa",marginTop:30,borderRadius:12,overflow:"hidden"},squareRippleWrapper:{alignItems:"flex-start",justifyContent:"center",height:150,marginTop:30},squareRipple1:{alignItems:"center",justifyContent:"center",width:150,height:150,borderWidth:5,borderStyle:"solid",backgroundSize:"cover",borderColor:"#4c9afa",backgroundImage:at,paddingHorizontal:10},squareRipple2:{alignItems:"center",justifyContent:"center",width:150,height:150,paddingHorizontal:10,backgroundSize:"cover",backgroundImage:"https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png"}});function dt(){return"ios"===s.Platform.OS?l.a.createElement(s.Text,null,"iOS暂未支持水波纹效果"):l.a.createElement(s.ScrollView,{style:{margin:10,flex:1}},l.a.createElement(s.View,{style:[ut.imgRectangle,{marginTop:20,backgroundImage:at,backgroundSize:"cover"}]},l.a.createElement(ht,{style:[ut.imgRectangle],nativeBackgroundAndroid:{borderless:!0,color:"#666666"}},l.a.createElement(s.Text,{style:{color:"white",maxWidth:200}},"外层背景图,内层无边框水波纹,受外层影响始终有边框"))),l.a.createElement(ht,{style:[ut.circleRipple],nativeBackgroundAndroid:{borderless:!0,color:"#666666",rippleRadius:100}},l.a.createElement(s.Text,{style:{color:"black",textAlign:"center"}},"无边框圆形水波纹")),l.a.createElement(ht,{style:[ut.squareRipple],nativeBackgroundAndroid:{borderless:!1,color:"#666666"}},l.a.createElement(s.Text,{style:{color:"#fff"}},"带背景色水波纹")),l.a.createElement(s.View,{style:[ut.squareRippleWrapper]},l.a.createElement(ht,{style:[ut.squareRipple1],nativeBackgroundAndroid:{borderless:!1,color:"#666666"}},l.a.createElement(s.Text,{style:{color:"white"}},"有边框水波纹,带本地底图效果"))),l.a.createElement(s.View,{style:[ut.squareRippleWrapper]},l.a.createElement(ht,{style:[ut.squareRipple2],nativeBackgroundAndroid:{borderless:!1,color:"#666666"}},l.a.createElement(s.Text,{style:{color:"black"}},"有边框水波纹,带网络底图效果"))))}const mt="#4c9afa",gt="#f44837",ft=s.StyleSheet.create({container:{paddingHorizontal:10},square:{width:80,height:80,backgroundColor:gt},showArea:{height:150,marginVertical:10},button:{borderColor:mt,borderWidth:2,borderStyle:"solid",justifyContent:"center",alignItems:"center",width:70,borderRadius:8,height:50,marginTop:20,marginRight:8},buttonText:{fontSize:20,color:mt,textAlign:"center",textAlignVertical:"center"},colorText:{fontSize:14,color:"white",textAlign:"center",textAlignVertical:"center"},buttonContainer:{flexDirection:"row",alignItems:"center"},title:{fontSize:24,marginTop:8}});class yt extends l.a.Component{constructor(e){super(e),this.state={}}componentWillMount(){this.horizonAnimation=new s.Animation({startValue:150,toValue:20,duration:1e3,delay:500,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.verticalAnimation=new s.Animation({startValue:80,toValue:40,duration:1e3,delay:0,mode:"timing",timingFunction:"linear",repeatCount:"loop"}),this.scaleAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:1,toValue:1.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:1.2,toValue:.2,duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.rotateAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:0,toValue:180,duration:2e3,delay:0,valueType:"deg",mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:180,toValue:360,duration:2e3,delay:0,valueType:"deg",mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.skewXAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:0,toValue:20,duration:2e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:20,toValue:0,duration:2e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.skewYAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:0,toValue:20,duration:2e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:20,toValue:0,duration:2e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.bgColorAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:"red",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:"yellow",toValue:"blue",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.txtColorAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:"white",toValue:"yellow",valueType:"color",duration:1e3,delay:0,mode:"timing",timingFunction:"linear"}),follow:!1},{animation:new s.Animation({startValue:"yellow",toValue:"white",duration:1e3,valueType:"color",delay:0,mode:"timing",timingFunction:"linear"}),follow:!0}],repeatCount:"loop"}),this.cubicBezierScaleAnimationSet=new s.AnimationSet({children:[{animation:new s.Animation({startValue:0,toValue:1,duration:1e3,delay:0,mode:"timing",timingFunction:"cubic-bezier(.45,2.84,.38,.5)"}),follow:!1},{animation:new s.Animation({startValue:1,toValue:0,duration:1e3,mode:"timing",timingFunction:"cubic-bezier(.17,1.45,.78,.14)"}),follow:!0}],repeatCount:"loop"})}componentDidMount(){"web"===s.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.txtColorAnimationSet.setRef(this.textColorRef),this.cubicBezierScaleAnimationSet.setRef(this.cubicBezierScaleRef),this.rotateAnimationSet.setRef(this.rotateRef),this.skewXAnimationSet.setRef(this.skewRef),this.skewYAnimationSet.setRef(this.skewRef)),this.horizonAnimation.onAnimationStart(()=>{console.log("on animation start!!!")}),this.horizonAnimation.onAnimationEnd(()=>{console.log("on animation end!!!")}),this.horizonAnimation.onAnimationCancel(()=>{console.log("on animation cancel!!!")}),this.horizonAnimation.onAnimationRepeat(()=>{console.log("on animation repeat!!!")})}componentWillUnmount(){this.horizonAnimation&&this.horizonAnimation.destroy(),this.verticalAnimation&&this.verticalAnimation.destroy(),this.scaleAnimationSet&&this.scaleAnimationSet.destroy(),this.bgColorAnimationSet&&this.bgColorAnimationSet.destroy(),this.txtColorAnimationSet&&this.txtColorAnimationSet.destroy(),this.cubicBezierScaleAnimationSet&&this.cubicBezierScaleAnimationSet.destroy(),this.rotateAnimationSet&&this.rotateAnimationSet.destroy(),this.skewXAnimationSet&&this.skewXAnimationSet.destroy(),this.skewYAnimationSet&&this.skewYAnimationSet.destroy()}render(){return l.a.createElement(s.ScrollView,{style:ft.container},l.a.createElement(s.Text,{style:ft.title},"水平位移动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.horizonAnimation.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.horizonAnimation.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.horizonAnimation.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.horizonAnimation.updateAnimation({startValue:50,toValue:100})}},l.a.createElement(s.Text,{style:ft.buttonText},"更新"))),l.a.createElement(s.View,{style:ft.showArea},l.a.createElement(s.View,{ref:e=>{this.horizonRef=e},style:[ft.square,{transform:[{translateX:this.horizonAnimation}]}]})),l.a.createElement(s.Text,{style:ft.title},"高度形变动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.verticalAnimation.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.verticalAnimation.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.verticalAnimation.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:ft.showArea},l.a.createElement(s.View,{ref:e=>{this.verticalRef=e},style:[ft.square,{height:this.verticalAnimation}]})),l.a.createElement(s.Text,{style:ft.title},"旋转动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.rotateAnimationSet.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.rotateAnimationSet.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.rotateAnimationSet.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:ft.showArea},l.a.createElement(s.View,{ref:e=>{this.rotateRef=e},style:[ft.square,{transform:[{rotate:this.rotateAnimationSet}]}]})),l.a.createElement(s.Text,{style:ft.title},"倾斜动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.skewXAnimationSet.start(),this.skewYAnimationSet.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.skewXAnimationSet.pause(),this.skewYAnimationSet.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.skewXAnimationSet.resume(),this.skewYAnimationSet.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:ft.showArea},l.a.createElement(s.View,{ref:e=>{this.skewRef=e},style:[ft.square,{transform:[{skewX:this.skewXAnimationSet},{skewY:this.skewYAnimationSet}]}]})),l.a.createElement(s.Text,{style:ft.title},"缩放动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.scaleAnimationSet.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.scaleAnimationSet.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.scaleAnimationSet.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:[ft.showArea,{marginVertical:20}]},l.a.createElement(s.View,{ref:e=>{this.scaleRef=e},style:[ft.square,{transform:[{scale:this.scaleAnimationSet}]}]})),l.a.createElement(s.Text,{style:ft.title},"颜色渐变动画(文字渐变仅Android支持)"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.bgColorAnimationSet.start(),this.txtColorAnimationSet.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.bgColorAnimationSet.pause(),this.txtColorAnimationSet.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.bgColorAnimationSet.resume(),this.txtColorAnimationSet.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:[ft.showArea,{marginVertical:20}]},l.a.createElement(s.View,{ref:e=>{this.bgColorRef=e},style:[ft.square,{justifyContent:"center",alignItems:"center"},{backgroundColor:this.bgColorAnimationSet}]},l.a.createElement(s.Text,{ref:e=>{this.textColorRef=e},style:[ft.colorText,{color:"android"===s.Platform.OS?this.txtColorAnimationSet:"white"}]},"颜色渐变背景和文字"))),l.a.createElement(s.Text,{style:ft.title},"贝塞尔曲线动画"),l.a.createElement(s.View,{style:ft.buttonContainer},l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.cubicBezierScaleAnimationSet.start()}},l.a.createElement(s.Text,{style:ft.buttonText},"开始")),l.a.createElement(s.View,{style:[ft.button],onClick:()=>{this.cubicBezierScaleAnimationSet.pause()}},l.a.createElement(s.Text,{style:ft.buttonText},"暂停")),l.a.createElement(s.View,{style:ft.button,onClick:()=>{this.cubicBezierScaleAnimationSet.resume()}},l.a.createElement(s.Text,{style:ft.buttonText},"继续"))),l.a.createElement(s.View,{style:[ft.showArea,{marginVertical:20}]},l.a.createElement(s.View,{ref:e=>{this.cubicBezierScaleRef=e},style:[ft.square,{transform:[{scale:this.cubicBezierScaleAnimationSet}]}]})))}}const pt=s.StyleSheet.create({containerStyle:{margin:20,alignItems:"center",flexDirection:"column"},itemGroupStyle:{flexDirection:"row",marginTop:10,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",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 bt extends l.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&&s.AsyncStorage.setItem(e,t)}onClickGet(){const{key:e}=this.state;e&&s.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 l.a.createElement(s.ScrollView,{style:pt.containerStyle},l.a.createElement(s.View,{style:pt.viewGroupStyle},l.a.createElement(s.Text,{style:pt.infoStyle},"Key:"),l.a.createElement(s.TextInput,{style:pt.inputStyle,onChangeText:this.onTextChangeKey})),l.a.createElement(s.View,{style:pt.viewGroupStyle},l.a.createElement(s.Text,{style:pt.infoStyle},"Value:"),l.a.createElement(s.TextInput,{style:pt.inputStyle,onChangeText:this.onTextChangeValue})),l.a.createElement(s.View,{style:pt.itemGroupStyle,onClick:this.onClickSet},l.a.createElement(s.Text,{style:pt.buttonStyle},"Set")),l.a.createElement(s.View,{style:[pt.viewGroupStyle,{marginTop:60}]},l.a.createElement(s.Text,{style:pt.infoStyle},"Key:"),l.a.createElement(s.TextInput,{style:pt.inputStyle,onChangeText:this.onTextChangeKey})),l.a.createElement(s.View,{style:[pt.viewGroupStyle,{display:"none"}]},l.a.createElement(s.Text,{style:pt.infoStyle},"Value:"),l.a.createElement(s.Text,{style:[pt.infoStyle,{width:200}]},e)),l.a.createElement(s.View,{style:pt.itemGroupStyle,onClick:this.onClickGet},l.a.createElement(s.Text,{style:pt.buttonStyle},"Get")))}}const wt=s.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},wrapper:{borderColor:"#eee",borderWidth:1,borderStyle:"solid",paddingHorizontal:10,paddingVertical:5,marginVertical:10,flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start"},infoContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:5,marginBottom:5,flexWrap:"wrap"},infoText:{collapsable:!1,marginVertical:5}});class xt extends l.a.Component{constructor(e){super(e),this.state={netInfoStatusTxt:"",netInfoChangeTxt:"",fetchInfoTxt:"",cookies:""},this.listener=null}async fetchNetInfoStatus(){this.setState({netInfoStatusTxt:await s.NetInfo.fetch()})}fetchUrl(){fetch("https://hippyjs.org",{mode:"no-cors"}).then(e=>(this.setState({fetchInfoTxt:"成功状态: "+e.status}),e)).catch(e=>{this.setState({fetchInfoTxt:"收到错误: "+e})})}setCookies(){s.NetworkModule.setCookie("https://hippyjs.org","name=hippy;network=mobile")}getCookies(){s.NetworkModule.getCookies("https://hippyjs.org").then(e=>{this.setState({cookies:e})})}async componentWillMount(){const e=this;this.listener=s.NetInfo.addEventListener("change",t=>{e.setState({netInfoChangeTxt:""+t.network_info})})}componentWillUnmount(){this.listener&&s.NetInfo.removeEventListener("change",this.listener)}componentDidMount(){this.fetchUrl(),this.fetchNetInfoStatus()}render(){const{netInfoStatusTxt:e,fetchInfoTxt:t,netInfoChangeTxt:n,cookies:o}=this.state,r=e=>l.a.createElement(s.View,{style:wt.itemTitle},l.a.createElement(s.Text,null,e));return l.a.createElement(s.ScrollView,{style:{paddingHorizontal:10}},r("Fetch"),l.a.createElement(s.View,{style:[wt.wrapper]},l.a.createElement(s.View,{style:[wt.infoContainer]},l.a.createElement(s.View,{style:{backgroundColor:"grey",padding:10,borderRadius:10,marginRight:10},onClick:()=>this.fetchUrl()},l.a.createElement(s.Text,{style:{color:"white"}},"请求 hippy 网址:")),l.a.createElement(s.Text,{style:wt.infoText},t))),r("NetInfo"),l.a.createElement(s.View,{style:[wt.wrapper]},l.a.createElement(s.View,{style:[wt.infoContainer]},l.a.createElement(s.View,{style:{backgroundColor:"grey",padding:10,borderRadius:10,marginRight:10},onClick:()=>this.fetchNetInfoStatus()},l.a.createElement(s.Text,{style:{color:"white"}},"获取网络状态:")),l.a.createElement(s.Text,{style:wt.infoText},e)),l.a.createElement(s.View,{style:[wt.infoContainer]},l.a.createElement(s.View,{style:{backgroundColor:"grey",padding:10,borderRadius:10,marginRight:10}},l.a.createElement(s.Text,{style:{color:"white"}},"监听网络变化:")),l.a.createElement(s.Text,{style:wt.infoText},n))),r("NetworkModule"),l.a.createElement(s.View,{style:[wt.wrapper]},l.a.createElement(s.View,{style:[wt.infoContainer]},l.a.createElement(s.View,{style:{backgroundColor:"grey",padding:10,borderRadius:10,marginRight:10},onClick:()=>this.setCookies()},l.a.createElement(s.Text,{style:{color:"white"}},"设置Cookies:")),l.a.createElement(s.Text,{style:wt.infoText},"name=hippy;network=mobile")),l.a.createElement(s.View,{style:[wt.infoContainer]},l.a.createElement(s.View,{style:{backgroundColor:"grey",padding:10,borderRadius:10,marginRight:10},onClick:()=>this.getCookies()},l.a.createElement(s.Text,{style:{color:"white"}},"获取Cookies:")),l.a.createElement(s.Text,{style:wt.infoText},o))))}}const St=s.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"}}),Et="wss://echo.websocket.org",At="Rock it with Hippy WebSocket";let Tt;var Ct=function(){const e=Object(a.useRef)(null),t=Object(a.useRef)(null),[n,o]=Object(a.useState)([]),r=e=>{o(t=>[e,...t])};return l.a.createElement(s.View,{style:St.fullScreen},l.a.createElement(s.View,null,l.a.createElement(s.Text,{style:St.title},"Url:"),l.a.createElement(s.TextInput,{ref:e,value:Et,style:St.input}),l.a.createElement(s.View,{style:St.row},l.a.createElement(s.Text,{onClick:()=>{e.current.getValue().then(e=>{Tt&&1===Tt.readyState&&Tt.close(),Tt=new WebSocket(e),Tt.onopen=()=>r("[Opened] "+Tt.url),Tt.onclose=()=>r("[Closed] "+Tt.url),Tt.onerror=e=>r("[Error] "+e.reason),Tt.onmessage=e=>r("[Received] "+e.data)})},style:St.button},"Connect"),l.a.createElement(s.Text,{onClick:()=>Tt.close(),style:St.button},"Disconnect"))),l.a.createElement(s.View,null,l.a.createElement(s.Text,{style:St.title},"Message:"),l.a.createElement(s.TextInput,{ref:t,value:At,style:St.input}),l.a.createElement(s.Text,{onClick:()=>t.current.getValue().then(e=>{r("[Sent] "+e),Tt.send(e)}),style:St.button},"Send")),l.a.createElement(s.View,null,l.a.createElement(s.Text,{style:St.title},"Log:"),l.a.createElement(s.ScrollView,{style:St.fullScreen},n.map((e,t)=>l.a.createElement(s.Text,{key:t,style:St.output},e)))))};function vt(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;t{const e=s.Dimensions.get("screen");({width:t,height:n}=e)});const[o,r]=Object(a.useState)({width:100,height:100,top:10,left:10}),[i,c]=Object(a.useState)({width:0,height:0,x:0,y:0}),h=async(t=!1)=>{try{const n=await s.UIManagerModule.getBoundingClientRect(e.current,{relToContainer:t});c(n)}catch(e){console.error("getBoxPosition error",e)}},u=kt(kt({},Vt.box),o);return l.a.createElement(s.View,{style:Vt.full},l.a.createElement(s.View,{style:Vt.demoContent},l.a.createElement(s.View,{ref:e,style:u},l.a.createElement(s.Text,{style:Vt.text,numberOfLines:2},"I am the box"))),l.a.createElement(s.View,{style:Vt.buttonContainer},l.a.createElement(s.View,{onClick:()=>{const e=Rt(0,t-100),o=Rt(0,n-450),i=Rt(80,120);r({left:e,top:o,width:i,height:i})},style:Vt.button},l.a.createElement(s.Text,{style:Vt.buttonText},"Move position")),l.a.createElement(s.View,{onClick:()=>h(!1),style:Vt.button},l.a.createElement(s.Text,{style:Vt.buttonText},"Measure in App Window")),l.a.createElement(s.View,{onClick:()=>h(!0),style:Vt.button},l.a.createElement(s.Text,{style:Vt.buttonText},"Measure in Container(RootView)"))),l.a.createElement(s.View,{style:Vt.row},l.a.createElement(s.View,null,l.a.createElement(s.Text,null,"Box style:"),l.a.createElement(s.Text,{style:Vt.black},"Width: "+u.width),l.a.createElement(s.Text,{style:Vt.black},"Height: "+u.height),l.a.createElement(s.Text,{style:Vt.black},"Left: "+u.left),l.a.createElement(s.Text,{style:Vt.black},"Top: "+u.top)),l.a.createElement(s.View,null,l.a.createElement(s.Text,null,"getBoundingClientRect output:"),l.a.createElement(s.Text,{style:Vt.black},"Width: "+i.width),l.a.createElement(s.Text,{style:Vt.black},"Height: "+i.height),l.a.createElement(s.Text,{style:Vt.black},"X: "+i.x),l.a.createElement(s.Text,{style:Vt.black},"Y: "+i.y))))};const Dt=s.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 Ot extends l.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&&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({x:this.imgWidth*e,y:0,animated:!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),l.a.createElement(Ot,{ref:e=>{this.indicator=e},count:this.itemCount}))}}H()(Pt,"defaultProps",{duration:0,currentPage:0,images:[]});const jt=["https://user-images.githubusercontent.com/12878546/148736627-bca54707-6939-45b3-84f7-74e6c2c09c88.jpg","https://user-images.githubusercontent.com/12878546/148736679-0521fdff-09f5-40e3-a36a-55c8f714be16.jpg","https://user-images.githubusercontent.com/12878546/148736685-a4c226ad-f64a-4fe0-b3df-ce0d8fcd7a01.jpg"],Lt=s.StyleSheet.create({sliderStyle:{width:400,height:180},infoStyle:{height:40,fontSize:16,color:"#4c9afa",marginTop:15}});function Ft(){return l.a.createElement(s.ScrollView,null,l.a.createElement(s.Text,{style:Lt.infoStyle},"Auto:"),l.a.createElement(Pt,{style:Lt.sliderStyle,images:jt,duration:1e3}),l.a.createElement(s.Text,{style:Lt.infoStyle},"Manual:"),l.a.createElement(Pt,{style:Lt.sliderStyle,images:jt,duration:0}))}const zt=s.StyleSheet.create({container:{height:45,paddingLeft:4,flexDirection:"row",backgroundColor:"#ffffff",borderBottomColor:"#E5E5E5",borderBottomWidth:1,borderStyle:"solid"},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 Bt extends l.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 qe(e);case 1:return Ye(e);case 2:return Qe(e);default:return null}}componentDidUpdate(){this.scrollSV()}onViewPagerChange({position:e}){this.setState({curIndex:e})}scrollSV(){if(this.navScrollView){const{curIndex:e,navList:t}=this.state,n=t.length,o=de.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 l.a.createElement(s.View,{style:zt.container},l.a.createElement(s.ScrollView,{style:zt.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:e=>{this.navScrollView=e}},e.map((e,n)=>l.a.createElement(s.View,{style:zt.navItem,key:"nav_"+e,activeOpacity:.5,onClick:()=>this.pressNavItem(n)},l.a.createElement(s.Text,{style:[zt.navItemText,t===n?zt.navItemTextBlue:zt.navItemTextNormal],numberOfLines:1},e)))))}render(){const{navList:e}=this.state;return l.a.createElement(s.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),l.a.createElement(s.ViewPager,{ref:e=>{this.viewPager=e},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},e.map((e,t)=>Bt.getPage(e,t))))}}const{width:Mt}=s.Dimensions.get("window"),_t=s.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:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Mt,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},splitter:{marginTop:50}});class Ht extends l.a.Component{constructor(e){super(e),this.demon1Point=l.a.createRef(),this.demo1PointDom=null,this.state={demo2Left:0},this.isDemon1Layouted=!1,this.idDemon2Layouted=!1,this.onTouchDown1=this.onTouchDown1.bind(this),this.onDemon1Layout=this.onDemon1Layout.bind(this),this.onTouchMove1=this.onTouchMove1.bind(this),this.onTouchDown2=this.onTouchDown2.bind(this),this.onTouchMove2=this.onTouchMove2.bind(this)}componentDidMount(){}onDemon1Layout(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=s.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 l.a.createElement(s.View,{style:_t.setNativePropsDemo},l.a.createElement(s.Text,null,"setNativeProps实现拖动效果"),l.a.createElement(s.View,{style:_t.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},l.a.createElement(s.View,{onLayout:this.onDemon1Layout,style:_t.nativeDemo1Point,ref:this.demon1Point})),l.a.createElement(s.View,{style:_t.splitter}),l.a.createElement(s.Text,null,"普通渲染实现拖动效果"),l.a.createElement(s.View,{style:_t.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},l.a.createElement(s.View,{style:[_t.nativeDemo2Point,{left:e}]})))}}const Wt=s.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Nt extends l.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 l.a.createElement(s.View,{style:Wt.dynamicImportDemo},l.a.createElement(s.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},l.a.createElement(s.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),l.a.createElement(s.View,{style:{marginTop:20}},e?l.a.createElement(e,null):null,t?l.a.createElement(t,null):null))}}const Kt=s.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}});class Ut extends l.a.Component{render(){const{country:e,language:t,direction:n}=s.Platform.Localization||{};return l.a.createElement(s.View,{style:Kt.LocalizationDemo},l.a.createElement(s.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},l.a.createElement(s.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},`国际化相关信息:国家 ${e} | 语言 ${t} | 方向 ${1===n?"RTL":"LTR"}`)))}}const Gt=()=>getTurboModule("demoTurbo").getTurboConfig(),qt=s.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}});class Qt extends l.a.Component{constructor(e){super(e),this.state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},this.onTurboFunc=this.onTurboFunc.bind(this),this.getRenderRow=this.getRenderRow.bind(this),this.getRowKey=this.getRowKey.bind(this)}async onTurboFunc(e){let t;if("nativeWithPromise"===e)t=await(async e=>turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(e))("aaa");else if("getTurboConfig"===e)this.config=Gt(),t="获取到config对象";else if("printTurboConfig"===e)n=this.config||Gt(),t=getTurboModule("demoTurbo").printTurboConfig(n);else if("getInfo"===e)t=(this.config||Gt()).getInfo();else if("setInfo"===e)(this.config||Gt()).setInfo("Hello World"),t="设置config信息成功";else{t={getString:()=>{return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:()=>{return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:()=>{return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:()=>{return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:()=>{return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:()=>{return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[e]()}var n;this.setState({result:t})}renderResultView(){return l.a.createElement(s.View,{style:qt.resultView},l.a.createElement(s.Text,{style:{backgroundColor:"darkseagreen"}},""+this.state.result))}getRenderRow(e){const{funList:t}=this.state;return l.a.createElement(s.View,{style:qt.cellContentView},l.a.createElement(s.View,{style:qt.funcInfo},l.a.createElement(s.Text,{numberofLines:0},"函数名:",t[e])),l.a.createElement(s.Text,{style:qt.actionButton,onClick:()=>this.onTurboFunc(t[e])},"执行"))}getRowKey(e){const{funList:t}=this.state;return t[e]}render(){const{funList:e}=this.state;return l.a.createElement(s.View,{style:qt.container},this.renderResultView(),l.a.createElement(s.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}const Yt=s.StyleSheet.create({demoWrap:{horizontal:!1,flex:1,flexDirection:"column"},banner:{backgroundImage:"https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png",backgroundSize:"cover",height:150,justifyContent:"flex-end"},bannerText:{color:"coral",textAlign:"center"},tabs:{flexDirection:"row",height:30},tabText:{flex:1,textAlign:"center",backgroundColor:"#eee",color:"#999"},tabSelected:{flex:1,textAlign:"center",color:"#4c9afa"},itemEven:{height:40,backgroundColor:"gray"},itemEvenText:{lineHeight:40,color:"white",fontSize:20,textAlign:"center"},itemOdd:{height:40},itemOddText:{lineHeight:40,fontSize:20,textAlign:"center"}});class Xt extends l.a.Component{constructor(e){super(e),this.state={layoutHeight:0,currentSlide:0}}selectPage(e){var t;this.setState({currentSlide:e}),null===(t=this.viewPager)||void 0===t||t.setPage(e)}render(){const{layoutHeight:e,currentSlide:t}=this.state;return l.a.createElement(s.ScrollView,{style:Yt.demoWrap,scrollEventThrottle:50,onLayout:e=>this.setState({layoutHeight:e.layout.height})},l.a.createElement(s.View,{style:Yt.banner}),l.a.createElement(s.View,{style:Yt.tabs},l.a.createElement(s.Text,{key:"tab1",style:0===t?Yt.tabSelected:Yt.tabText,onClick:()=>this.selectPage(0)},"tab 1 (parent first)"),l.a.createElement(s.Text,{key:"tab2",style:1===t?Yt.tabSelected:Yt.tabText,onClick:()=>this.selectPage(1)},"tab 2 (self first)")),l.a.createElement(s.ViewPager,{ref:e=>this.viewPager=e,initialPage:t,style:{height:e-80},onPageSelected:e=>this.setState({currentSlide:e.position})},l.a.createElement(s.ListView,{nestedScrollTopPriority:"parent",key:"slide1",numberOfRows:30,getRowKey:e=>"item"+e,initialListSize:30,renderRow:e=>l.a.createElement(s.Text,{style:e%2?Yt.itemEvenText:Yt.itemOddText},"Item ",e),getRowStyle:e=>e%2?Yt.itemEven:Yt.itemOdd}),l.a.createElement(s.ListView,{nestedScrollTopPriority:"self",key:"slide2",numberOfRows:30,getRowKey:e=>"item"+e,initialListSize:30,renderRow:e=>l.a.createElement(s.Text,{style:e%2?Yt.itemEvenText:Yt.itemOddText},"Item ",e),getRowStyle:e=>e%2?Yt.itemEven:Yt.itemOdd})))}}function Jt(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 Zt(e){for(var t=1;t0===e.index?l.a.createElement(s.View,{style:[on.container]},l.a.createElement(s.View,{style:{backgroundColor:on.title.backgroundColor,marginLeft:12}},l.a.createElement(s.Text,{numberOfLines:1,style:[on.title,{fontWeight:"bold"}]},t.name)),l.a.createElement(s.View,{style:on.headerButton},l.a.createElement(s.Text,{numberOfLines:1,style:on.title},"ver: ","unspecified"!==s.default.version?""+s.default.version:"master"))):l.a.createElement(s.View,{style:[on.container]},l.a.createElement(s.View,{onClick:()=>e.goBack(),style:[on.headerButton,"ios"===s.Platform.OS?null:{marginLeft:20}]},l.a.createElement(s.Image,{style:on.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"}})),l.a.createElement(s.View,{style:on.headerButton},l.a.createElement(s.Text,{numberOfLines:1,style:on.title},t.name))));const an="#4c9afa",ln="#f44837",sn=s.StyleSheet.create({rowContainer:{alignItems:"center"},buttonView:{borderColor:an,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30,borderStyle:"solid"},buttonText:{fontSize:20,color:an,textAlign:"center",textAlignVertical:"center"}});class cn extends a.Component{constructor(e){super(e),this.state={pressItem:"",dataSource:[...en]},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"===s.Platform.OS&&s.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 l.a.createElement(s.View,{style:sn.rowContainer},l.a.createElement(s.View,{onPressIn:()=>this.feedback(o.path),onPressOut:()=>this.feedback(),onClick:()=>this.clickTo(o.path),style:[sn.buttonView,{borderColor:1===r?an:ln,opacity:n===o.path?.5:1}]},l.a.createElement(s.Text,{style:[sn.buttonText,{color:1===r?an:ln}]},o.name)))}render(){const{dataSource:e}=this.state;return l.a.createElement(s.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.renderRow,getRowType:this.getRowType,getRowKey:this.getRowKey})}}const hn=[{path:"/Gallery",name:"Hippy React",component:M(cn),meta:{style:1}},...en];var un=()=>l.a.createElement(s.View,{style:{flex:1,backgroundColor:"#fff"}},l.a.createElement(R,{initialEntries:["/Gallery"]},hn.map(e=>{const t=e.component;return l.a.createElement(P,{key:e.path,exact:!0,path:""+e.path},l.a.createElement(s.View,{style:{flex:1,backgroundColor:"#fff"}},l.a.createElement(rn,{route:e}),l.a.createElement(t,{meta:e.meta||{}})))})));const dn=s.StyleSheet.create({stepText:{color:"#242424",marginBottom:12},container:{flex:1,backgroundColor:"#fff",justifyContent:"center",flexDirection:"column",padding:20},button:{width:140,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"},inputStyle:{width:350,marginTop:30,marginBottom:10,placeholderTextColor:"#aaaaaa",fontSize:16,color:"#242424",height:80,lineHeight:30,borderColor:"#eee",borderWidth:1,borderStyle:"solid"}});function mn({instanceId:e}){const t=Object(a.useRef)(null),n=()=>{t.current.blur()};return l.a.createElement(s.ScrollView,{style:dn.container,onClick:n},["安装远程调试依赖: npm i -D @hippy/debug-server-next@latest","修改 webpack 配置,添加远程调试地址","运行 npm run hippy:dev 开始编译,编译结束后打印出 bundleUrl 及调试首页地址","粘贴 bundleUrl 并点击开始按钮","访问调试首页开始远程调试,远程调试支持热更新(HMR)"].map((e,t)=>l.a.createElement(s.Text,{style:dn.stepText,key:"steps-"+t},t+1,". ",e)),l.a.createElement(s.TextInput,{ref:t,style:dn.inputStyle,placeholder:"please input bundleUrl",multiline:!0,numberOfLines:4,defaultValue:"http://127.0.0.1:38989/index.bundle?debugUrl=ws%3A%2F%2F127.0.0.1%3A38989%2Fdebugger-proxy"}),l.a.createElement(s.View,{style:dn.buttonContainer},l.a.createElement(s.View,{style:dn.button,onClick:()=>{n(),t.current.getValue().then(t=>{t&&Object(s.callNative)("TestModule","remoteDebug",e,t)})}},l.a.createElement(s.Text,{style:dn.buttonText,numberOfLines:1},"开始"))))}const gn=s.StyleSheet.create({container:{flex:1}});class fn extends a.Component{constructor(e){super(e);const{width:t,height:n}=s.Dimensions.get("screen");this.state={isVertical:t{switch(e){case 0:return l.a.createElement(un,null);case 1:return l.a.createElement(mn,{instanceId:t});default:return l.a.createElement(s.View,{style:yn.blankPage})}})(),l.a.createElement(s.View,{style:yn.buttonContainer},(()=>["API","调试"].map((t,n)=>l.a.createElement(s.View,{key:"button_"+n,style:yn.button,onClick:()=>this.setState({pageIndex:n})},l.a.createElement(s.Text,{style:[yn.buttonText,n===e?{color:"#4c9afa"}:null],numberOfLines:1},t))))()))}}},"./src/main.js":function(e,t,n){"use strict";n.r(t),function(e){var t=n("../../packages/hippy-react/dist/index.js"),o=n("./src/app.jsx");e.Hippy.on("uncaughtException",e=>{console.error("uncaughtException error",e.stack,e.message)}),e.Hippy.on("unhandledRejection",e=>{console.error("unhandledRejection reason",e)}),new t.Hippy({appName:"Demo",entryPage:o.a,bubbles:!1,silent:!1}).start()}.call(this,n("./node_modules/webpack/buildin/global.js"))},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 15278703780..343690487af 100644 --- a/examples/android-demo/res/vendor.android.js +++ b/examples/android-demo/res/vendor.android.js @@ -1,12 +1,12 @@ 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,r){n.d(t,"Animated",(function(){return pn})),n.d(t,"Animation",(function(){return Oe})),n.d(t,"AnimationSet",(function(){return Fe})),n.d(t,"AppRegistry",(function(){return ln})),n.d(t,"AsyncStorage",(function(){return Wn})),n.d(t,"BackAndroid",(function(){return Vn})),n.d(t,"Clipboard",(function(){return qn})),n.d(t,"ConsoleModule",(function(){return or})),n.d(t,"Dimensions",(function(){return pr})),n.d(t,"Easing",(function(){return hn})),n.d(t,"EventBus",(function(){return Se})),n.d(t,"Focusable",(function(){return Fn})),n.d(t,"Hippy",(function(){return lr})),n.d(t,"HippyEventEmitter",(function(){return ge})),n.d(t,"HippyEventListener",(function(){return me})),n.d(t,"HippyRegister",(function(){return Gn})),n.d(t,"Image",(function(){return dn})),n.d(t,"ImageBackground",(function(){return ur})),n.d(t,"ImageLoaderModule",(function(){return Yn})),n.d(t,"ListView",(function(){return wn})),n.d(t,"ListViewItem",(function(){return mn})),n.d(t,"Modal",(function(){return jn})),n.d(t,"Navigator",(function(){return En})),n.d(t,"NetInfo",(function(){return Xn})),n.d(t,"NetworkModule",(function(){return Qn})),n.d(t,"PixelRatio",(function(){return hr})),n.d(t,"Platform",(function(){return ar})),n.d(t,"PullFooter",(function(){return gn})),n.d(t,"PullHeader",(function(){return yn})),n.d(t,"RNfqb",(function(){return sr})),n.d(t,"RNfqbEventEmitter",(function(){return fr})),n.d(t,"RNfqbEventListener",(function(){return dr})),n.d(t,"RNfqbRegister",(function(){return cr})),n.d(t,"RefreshWrapper",(function(){return Sn})),n.d(t,"ScrollView",(function(){return zn})),n.d(t,"StyleSheet",(function(){return Rn})),n.d(t,"Text",(function(){return cn})),n.d(t,"TextInput",(function(){return Pn})),n.d(t,"TimerModule",(function(){return ir})),n.d(t,"UIManagerModule",(function(){return Jn})),n.d(t,"View",(function(){return sn})),n.d(t,"ViewPager",(function(){return Cn})),n.d(t,"WaterfallView",(function(){return Bn})),n.d(t,"WebSocket",(function(){return Dn})),n.d(t,"WebView",(function(){return Hn})),n.d(t,"callNative",(function(){return er})),n.d(t,"callNativeWithCallbackId",(function(){return nr})),n.d(t,"callNativeWithPromise",(function(){return tr})),n.d(t,"colorParse",(function(){return Xt})),n.d(t,"default",(function(){return an})),n.d(t,"flushSync",(function(){return Zn})),n.d(t,"removeNativeCallback",(function(){return rr}));var i=n("./node_modules/@hippy/react-reconciler/index.js"),o=n.n(i),a=n("./node_modules/react/index.js"),l=n.n(a);const s=["children"],u=["collapsable","style"],c=["style"],f=["children","style","imageStyle","imageRef","source","sources","src","srcs","tintColor","tintColors"],d=["children"],p=["children"],h=["children","style","renderRow","renderPullHeader","renderPullFooter","getRowType","getRowStyle","getHeaderStyle","getFooterStyle","getRowKey","dataSource","initialListSize","rowShouldSticky","onRowLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","onAppear","onDisappear","onWillAppear","onWillDisappear"],m=["children"],y=["initialRoute"],g=["component"],b=["children","onPageScrollStateChanged"],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(){w=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,i){var o=new RegExp(e,r);return t.set(o,i||t.get(e)),k(o,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var i=r[n];if("number"==typeof i)t[n]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1]+)>/g,(function(e,t){var n=o[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,a)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},w.apply(this,arguments)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function k(e,t){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function E(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} /*! - * @hippy/react vunspecified - * Build at: Fri Dec 02 2022 10:17:54 GMT+0800 (中国标准时间) + * @hippy/react v2.16.4 + * Build at: Thu May 25 2023 21:24:46 GMT+0800 (中国标准时间) * * Tencent is pleased to support the open source community by making * Hippy available. * - * Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. + * Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,7 +20,7 @@ var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].export * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={}),e.__GLOBAL__.nodeId=0,e.__GLOBAL__.animationId=0;const{asyncStorage:I,bridge:P,device:_,document:L,register:A,on:R,off:T,emit:z}=e.Hippy;var O=Object.freeze({__proto__:null,addEventListener:R,removeEventListener:T,dispatchEvent:z,AsyncStorage:I,Bridge:P,Device:_,HippyRegister:A,UIManager:L});let j,F;const H=new Map;function M(e,t){F=e,j=t}function D(){if(!F)throw new Error("getRootViewId must execute after setRootContainer");return F}function U(e){if(!j)return null;const{current:t}=j,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 B(e,t){H.set(t,e)}function W(e){H.delete(e)}function V(e){return(null==e?void 0:e.stateNode)||null}function $(e){return H.get(e)||null}function q(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?W(t):t&&(W(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const Q={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},K=new RegExp(/^\d+$/);let G=!1,Y=!1;function X(...e){0}function J(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const Z=new RegExp("^on.+Capture$");const ee=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function te(e){return"[object Function]"===Object.prototype.toString.call(e)}function ne(e){G=e}function re(){return Y}function ie(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function oe(e){return 5===e}class ae{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}notifyEvent(...e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,...e):n.eventHandler(...e))})}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}}class le{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}preventDefault(){}}const se=new Map,ue=["%c[event]%c","color: green","color: auto"];function ce(e,t){let n=e;if(t.memoizedProps&&!t.memoizedProps[e]){const r=Object.keys(Q);for(let i=0;i0){let e,i=!1;const o=V(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new le(n,r,o);Object.assign(s,t),l?(a(s),s.bubbles||(i=!0)):(i=a(s),"boolean"!=typeof i&&(i=!re()),s.bubbles||(i=!0))}catch(e){console.reportUncaughtException(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=V(n);do{if(o=ce(o,i),fe(o,i))try{const e=V(i),n=new le(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!re()),n.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!oe(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(X(...ue,"receiveUIComponentEvent",e),!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=$(t);i&&fe(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=pe);class he{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 me{constructor(e){this.eventName=e,this.listenerIdList=[]}unregister(){const e=pe.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for "+this.eventName);const t=this.listenerIdList.length;for(let n=0;n{if("string"!=typeof e&&!Array.isArray(e)||"function"!=typeof t)throw new TypeError("Invalid arguments for EventBus.on()");return Array.isArray(e)?e.forEach(e=>{ve(e,t,n)}):ve(e,t,n),ke},off:(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("The event argument is not string or array for EventBus.off()");return Array.isArray(e)?e.forEach(e=>{we(e,t)}):we(e,t),ke},sizeOf(e){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.sizeOf()");const t=be[e];return(null==t?void 0:t.eventMap)?t.eventMap.size:0},emit(e,...t){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.emit()");const n=pe.getHippyEventHub(e);return n?(n.notifyEvent(...t),ke):ke}};var Se=Object.freeze({__proto__:null,getString:function(){return P.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){P.callNative("ClipboardModule","setString",e)}});var Ee=Object.freeze({__proto__:null,getCookies:function(e){return P.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){let r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),P.callNative("network","setCookie",e,t,r)}});function xe(e){return P.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ce(e){P.callNative("ImageLoaderModule","prefetch",e)}var Ne=Object.freeze({__proto__:null,getSize:xe,prefetch:Ce});const Ie=new Map,Pe=new ge;class _e{constructor(e,t){this.eventName=e,this.listener=t}remove(){this.eventName&&this.listener&&(Le(this.eventName,this.listener),this.listener=void 0)}}function Le(e,t){if(t instanceof _e)return void t.remove();let n=e;"change"===e&&(n="networkStatusDidChange");const r=Ie.get(t);if(!r)return;r.remove(),Ie.delete(t);Pe.listenerSize(n)<1&&P.callNative("NetInfo","removeListener",n)}var Ae=Object.freeze({__proto__:null,addEventListener:function(e,t){let n=e;n&&"change"===n&&(n="networkStatusDidChange"),Pe.listenerSize(n)<1&&P.callNative("NetInfo","addListener",n);const r=Pe.addListener(n,e=>{t(e)});return Ie.set(t,r),new _e(n,t)},removeEventListener:Le,fetch:function(){return P.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function Re(e){return"loop"===e?-1:e}const Te=new ge;function ze(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Xt(t):t}class Oe{constructor(e){var t;let n=0;if((null===(t=e.startValue)||void 0===t?void 0:t.constructor)&&"Animation"===e.startValue.constructor.name)n={animationId:e.startValue.animationId};else{const{startValue:t}=e;n=ze(e.valueType,t)}const r=ze(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=n||0,this.toValue=r||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=Re(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}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=Te.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Te.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Te.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Te.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),Ft.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){Ft.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 Oe)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=ze(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=Re(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),Ft.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:ze(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 je=new ge;class Fe{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Re(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=je.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=je.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=je.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=je.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),Ft.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&Ft.callNative("AnimationModule","destroyAnimation",e.animationId)),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){Ft.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 He=["%c[native]%c","color: red","color: auto"],Me={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let De=!0,Ue=[];function Be(e){(function(e){const t=[];for(let n=0;n{switch(t.type){case Me.createNode:X(...He,"createNode",t.nodes),st(e,t.nodes);break;case Me.updateNode:X(...He,"updateNode",t.nodes),"ios"===_.platform.OS?t.nodes.forEach(t=>ut(e,[t])):ut(e,t.nodes);break;case Me.deleteNode:X(...He,"deleteNode",t.nodes),"ios"===_.platform.OS?t.nodes.forEach(t=>ct(e,[t])):ct(e,t.nodes)}})}function We(e=!1){if(!De)return;if(De=!1,0===Ue.length)return void(De=!0);const t=D();dt(),e?(Be(t),pt(),Ue=[],De=!0):Promise.resolve().then(()=>{Be(t),pt(),Ue=[],De=!0})}function Ve(e){const t=e.attributes,{children:n}=t;return N(t,s)}function $e(e,t){var n;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);const r={id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:x(x({},Ve(t)),{},{style:t.style})};return r}function qe(e,t,n,r){const i=[];let o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const n=$e(e,t);n&&i.push(n),"function"==typeof r&&r(t)},o),i}function Qe(e){return!!j&&e instanceof j.containerInfo.constructor}function Ke(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=D(),i=Qe(e)&&!e.isMounted,o=e.isMounted&&!t.isMounted;if(i||o){const e=qe(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Ue.push({type:Me.createNode,nodes:e})}}function Ge(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=D(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Ue.push({type:Me.deleteNode,nodes:i})}function Ye(e){if(!e.isMounted)return;const t=$e(D(),e);t&&Ue.push({type:Me.updateNode,nodes:[t]})}let Xe=0;class Je{constructor(){this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=(Xe+=1,Xe%10==0&&(Xe+=1),Xe)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),Ke(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),Ge(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),Ke(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),Ke(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),Ge(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Ze={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},et={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},tt="turn",nt="rad",rt="deg";function it(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=w(/^([+-]?(?=(\d+))\2\.?\d*)+(deg|turn|rad)|(to\w+)$/g,{digit:2}).exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=rt){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case tt:r=""+(360*n).toFixed(2);break;case nt:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==et[i]&&(r=et[i]),r}function ot(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:Xt(n)}:void 0:{color:Xt(n)}}function at(e){var t;return t=e,Z.test(t)&&(e=e.replace("Capture","")),Q[e]?Q[e][1]:e}class lt extends Je{constructor(e){super(),this.id="",this.style={},this.attributes={},this.events={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}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,K.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(Ze,e)&&(e=Ze[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 Oe||r instanceof Fe?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 Oe||t instanceof Fe)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Jt(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Xt(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=it(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=ot(e);t&&r.push(t)}}else{const t=ot(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=ie(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttributes(e=[]){Array.isArray(e)&&e.length>0&&(e.forEach(e=>{if(Array.isArray(e)){const[t,n]=e;this.setAttribute(t,n,{notToNative:!0})}}),Ye(this))}parseAnimationStyleProp(e){let t=!1;Object.keys(e).some(n=>{const r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(let e=0;e["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=qe(D(),e);Ue.push({type:Me.updateNode,nodes:t})}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=J(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{if("function"==typeof t){const t=at(e);this.attributes[t]=!0,this.events[""+t]=!0}else{this.attributes[e]=t;const n=at(e);!0===this.events[""+n]&&"function"!=typeof t&&(this.attributes[n]=!1,delete this.events[""+n])}return!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n}setAttribute(e,t,n={}){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&Ye(this));if(this.parseAttributeProp(e,t))return;this.parseAnimationStyleProp(this.style),!n.notToNative&&Ye(this)}catch(e){}}removeAttribute(e){delete this.attributes[e]}setStyle(e,t,n=!1){if(null===t)return void delete this.style[e];let r=t,i=e;Object.prototype.hasOwnProperty.call(Ze,e)&&(i=Ze[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Jt(r):i.toLowerCase().indexOf("color")>-1?Xt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&ee.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Ye(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)}),Ye(this),We(!0)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=J(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:st,updateNode:ut,deleteNode:ct,flushBatch:ft,startBatch:dt,endBatch:pt,sendRenderError:ht}=L,mt=function(e){return U(t=>t.stateNode&&t.stateNode.nodeId===e)};function yt(e){if(e instanceof lt)return e;if(!e)return null;const t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){let e=t.child;for(;e&&!(e.stateNode instanceof lt);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function gt(e){let t=e;if("string"==typeof e){const n=U(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=yt(t);return e?e.nodeId:0}return t.nodeId}function bt(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=yt(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;te(o)&&(a=o,o=[]);null!==D()&&(X(),"ios"===_.platform.OS?(te(a)&&Array.isArray(o)&&o.push(a),P.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===_.platform.OS&&(te(a)?P.callNative("UIManagerModule","callUIFunction",[i,t,o],a):P.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function vt(e,t,n){const r=gt(t);return new Promise((t,i)=>r?(X(),P.callNative("UIManagerModule",e,r,r=>(n&&te(n)&&n(r),r&&"object"==typeof r?t(r):i(new Error(`${e} error with response: ${r}`))))):(n&&te(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var wt=Object.freeze({__proto__:null,createNode:st,updateNode:ut,deleteNode:ct,flushBatch:ft,startBatch:dt,endBatch:pt,sendRenderError:ht,getNodeById:mt,getNodeIdByRef:gt,getElementFromFiberRef:yt,callUIFunction:bt,getBoundingClientRect:function(e,t){const n=gt(e);return new Promise((r,i)=>n?(X(),P.callNative("UIManagerModule","getBoundingClientRect",n,t,e=>{if(!e||e.errMsg)return i(new Error((null==e?void 0:e.errMsg)||"getBoundingClientRect error with no response"));const{x:t,y:n,width:o,height:a}=e;let l=void 0,s=void 0;return"number"==typeof n&&"number"==typeof a&&(l=n+a),"number"==typeof t&&"number"==typeof o&&(s=t+o),r({x:t,y:n,width:o,height:a,bottom:l,right:s,left:t,top:n})})):i(new Error("getBoundingClientRect cannot get nodeId of "+e)))},measureInWindow:function(e,t){return vt("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===_.platform.OS?vt("measureInWindow",e,t):vt("measureInAppWindow",e,t)}});const kt=new ge,St=new Set,Et={exitApp(){P.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(P.callNative("DeviceEventModule","setListenBackPress",!0),St.add(e),{remove(){Et.removeListener(e)}}),removeListener(e){St.delete(e),0===St.size&&P.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){kt.addListener("hardwareBackPress",()=>{let e=!0;[...St].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&Et.exitApp()})}},xt=(Et.initEventListener(),Et);var Ct=Array.isArray,Nt=Object.keys,It=Object.prototype.hasOwnProperty;const Pt=setTimeout,_t=clearTimeout;var Lt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){We(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:Pt,cancelTimeout:_t,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){B(o,e.nodeId);const a=Object.keys(t||{});if(0===a.length)return;const l=a.map(e=>[e,t[e]]);e.setAttributes(l)},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),B(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",J(e)),i.meta={component:{name:"Text"}},B(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};return Object.keys(n).forEach(e=>{const t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)}),Object.keys(r).forEach(e=>{const t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=Ct(t),l=Ct(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=Nt(t);if((i=d.length)!==Nt(n).length)return!1;for(r=i;0!=r--;)if(!It.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)}}),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),q(t)},removeChildFromContainer:function(e,t){e.removeChild(t),q(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=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(){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 At=o()(x(x({},Lt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{flushSync:Rt}=At,{addEventListener:Tt,removeEventListener:zt,dispatchEvent:Ot,AsyncStorage:jt,Bridge:Ft,Device:Ht,HippyRegister:Mt}=O;var Dt=Object.freeze({__proto__:null,addEventListener:Tt,removeEventListener:zt,dispatchEvent:Ot,AsyncStorage:jt,BackAndroid:xt,Bridge:Ft,Clipboard:Se,Cookie:Ee,Device:Ht,HippyRegister:Mt,ImageLoader:Ne,NetworkInfo:Ae,UIManager:wt,flushSync:Rt});function Ut(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const Bt={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},Wt="[-+]?\\d*\\.?\\d+",Vt={rgb:new RegExp("rgb"+Ut(Wt,Wt,Wt)),rgba:new RegExp("rgba"+Ut(Wt,Wt,Wt,Wt)),hsl:new RegExp("hsl"+Ut(Wt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+Ut(Wt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Wt)),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 $t(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function qt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Qt(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 Kt(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Qt(i,r,e+1/3),a=Qt(i,r,e),l=Qt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Gt(e){return(parseFloat(e)%360+360)%360/360}function Yt(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Xt(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=Vt.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(Bt,e)?Bt[e]:(t=Vt.rgb.exec(e),Array.isArray(t)?($t(t[1])<<24|$t(t[2])<<16|$t(t[3])<<8|255)>>>0:(t=Vt.rgba.exec(e),t?($t(t[1])<<24|$t(t[2])<<16|$t(t[3])<<8|qt(t[4]))>>>0:(t=Vt.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Vt.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=Vt.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vt.hsl.exec(e),t?(255|Kt(Gt(t[1]),Yt(t[2]),Yt(t[3])))>>>0:(t=Vt.hsla.exec(e),t?(Kt(Gt(t[1]),Yt(t[2]),Yt(t[3]))|qt(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 Jt(e,t){return Array.isArray(e)?e.map(e=>Xt(e,t)):[0]}class Zt extends Je{constructor(){super(),this.documentElement=new lt("document")}createElement(e){return new lt(e)}createElementNS(e,t){return new lt(`${e}:${t}`)}}Zt.createElement=Zt.prototype.createElement,Zt.createElementNS=Zt.prototype.createElementNS;const{createContainer:en,updateContainer:tn,getPublicRootInstance:nn,injectIntoDevTools:rn}=At,on=['%c[Hippy-React "unspecified"]%c',"color: #61dafb","color: auto"];class an{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new Zt;this.rootContainer=en(t,0,!1,null)}static get Native(){return Dt}start(){Mt.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:i=!1,callback:o=(()=>{})}=this.config,{__instanceId__:a}=e;X(...on,"Start",t,"with rootViewId",a,e),this.rootContainer.containerInfo.nodeId=a,r&&ne(r),i&&function(e=!1){Y=e}(i),M(a,this.rootContainer);const s=l.a.createElement(n,e);return tn(s,this.rootContainer,null,o),nn(this.rootContainer)}}an.version="unspecified";const ln={registerComponent(e,t){new an({appName:e,entryPage:t}).start()}};class sn extends l.a.Component{constructor(){super(...arguments),this.instance=null}setPressed(e){bt(this.instance,"setPressed",[e])}setHotspot(e,t){bt(this.instance,"setHotspot",[e,t])}render(){const e=this.props,{collapsable:t,style:n={}}=e,r=N(e,u),i=n,{nativeBackgroundAndroid:o}=r;return"boolean"==typeof t&&(i.collapsable=t),void 0!==(null==o?void 0:o.color)&&(o.color=Xt(o.color)),l.a.createElement("div",x({ref:e=>{this.instance=e},nativeName:"View",style:i},r))}}function un(e,t){let{style:n}=e,r=N(e,c);const i=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(i[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(i.color="#000")),r.text="","string"==typeof r.children)r.text=J(r.children);else if("number"==typeof r.children)r.text=J(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=J(e),r.children=r.text)}return l.a.createElement("p",x({ref:t,nativeName:"Text",style:i},r))}un.displayName="Text";const cn=l.a.forwardRef(un);cn.displayName="Text";var fn=Object.freeze({__proto__:null,default:cn});class dn extends l.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=xe(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:i,source:o,sources:a,src:s,srcs:u,tintColor:c,tintColors:d}=e,p=N(e,f),h=this.getImageUrls({src:s,srcs:u,source:o,sources:a});"ios"===Ht.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===Ht.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=ie(p.defaultSource));const m=x({},n);return this.handleTintColor(m,c,d),p.style=m,t?l.a.createElement(sn,{style:n},l.a.createElement("img",x(x({},p),{},{nativeName:"Image",alt:"",ref:i,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):l.a.createElement("img",x(x({},p),{},{nativeName:"Image",alt:"",ref:i}))}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=>ie(e))),i}handleTintColor(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}dn.prefetch=Ce;class pn{constructor(){this.Value=pn.Value}static Value(e){return e}static timing(e,t){return new Oe({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}pn.View=sn,pn.Text=fn,pn.Image=dn;const hn={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 mn(e){return l.a.createElement("li",x({nativeName:"ListViewItem"},e))}class yn extends l.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){bt(this.instance,"expandPullHeader",[])}collapsePullHeader(e){void 0!==e?bt(this.instance,"collapsePullHeaderWithOptions",[e]):bt(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=N(e,d);return l.a.createElement("div",x({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class gn extends l.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){bt(this.instance,"expandPullFooter",[])}collapsePullFooter(){bt(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=N(e,p);return l.a.createElement("div",x({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}const bn={onDisappear:"onDisAppear"},vn={onDisappear:"onDisappear"};class wn extends l.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}}static convertName(e){return"android"===Ht.platform.OS&&bn[e]?bn[e]:"ios"===Ht.platform.OS&&vn[e]?vn[e]:e}componentDidMount(){const{getRowKey:e}=this.props}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&bt(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&bt(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:i,renderPullFooter:o,getRowType:a,getRowStyle:s,getHeaderStyle:u,getFooterStyle:c,getRowKey:f,dataSource:d,initialListSize:p,rowShouldSticky:m,onRowLayout:y,onHeaderPulling:g,onHeaderReleased:b,onFooterPulling:v,onFooterReleased:w,onAppear:k,onDisappear:S,onWillAppear:E,onWillDisappear:C}=e,I=N(e,h),P=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const h=this.getPullHeader(i,g,b,u),N=this.getPullFooter(o,v,w,c);!t&&d&&(t=d.length),e||(t=Math.min(t,p||10));for(let e=0;e{"function"==typeof n&&(t[wn.convertName(r)]=()=>{n(e)})}),n&&P.push(l.a.createElement(mn,x({},t),n))}h&&P.unshift(h),N&&P.push(N),"function"==typeof m&&Object.assign(I,{rowShouldSticky:!0});const _=[k,S,E,C];I.exposureEventEnabled=_.some(e=>"function"==typeof e),"ios"===Ht.platform.OS&&(I.numberOfRows=P.length),void 0!==p&&(I.initialListSize=p),I.style=x({overflow:"scroll"},n)}return l.a.createElement("ul",x({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},I),P.length?P:t)}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n,r){let i=null,o={};return"function"==typeof r&&(o=r()),"function"==typeof e&&(i=l.a.createElement(yn,{style:o,key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),i}getPullFooter(e,t,n,r){let i=null,o={};return"function"==typeof r&&(o=r()),"function"==typeof e&&(i=l.a.createElement(gn,{style:o,key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),i}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))}}wn.defaultProps={numberOfRows:0};class kn extends l.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}startRefresh(){bt(this.instance,"startRefresh",null)}refreshCompleted(){bt(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=N(e,m);return l.a.createElement("div",x({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),l.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}}class Sn{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName]){new an({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),bt(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),bt(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=N(e.initialRoute,g),r=N(e,y);return r.initialRoute=n,l.a.createElement("div",x({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function xn(e){return l.a.createElement("div",x(x({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class Cn extends l.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&&bt(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&bt(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=N(e,b);let i=[];return Array.isArray(t)?i=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),l.a.createElement(xn,x({},t),e)}):i.push(l.a.createElement(xn,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),l.a.createElement("div",x({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),i)}}function Nn(){const e=_.platform.Localization;return!!e&&1===e.direction}const In={caretColor:"caret-color"};class Pn extends l.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=>{bt(this.instance,"getValue",t=>e(t.text))})}setValue(e){return bt(this.instance,"setValue",[e]),e}focus(){bt(this.instance,"focusTextInput",[])}blur(){bt(this.instance,"blurTextInput",[])}isFocused(){return new Promise(e=>{bt(this.instance,"isFocused",t=>e(t.value))})}showInputMethod(){}hideInputMethod(){}clear(){bt(this.instance,"clear",[])}render(){const e=x({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach(t=>{let n=t;const r=this.props[t];"string"==typeof this.props[t]&&(In[t]&&(n=In[t]),Array.isArray(e.style)?e.style.push({[n]:r}):e.style&&"object"==typeof e.style?e.style[n]=r:e.style={[n]:r},delete e[t])}),Nn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),l.a.createElement("div",x(x({nativeName:"TextInput"},e),{},{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props,n=e;"android"===Ht.platform.OS&&(n.keyboardHeight/=Ht.screen.scale),"function"==typeof t&&t(n)}}const _n=Ht.window.scale;let Ln=Math.round(.4*_n)/_n;function An(e){return e}0===Ln&&(Ln=1/_n);var Rn=Object.freeze({__proto__:null,get hairlineWidth(){return Ln},create:An});const Tn={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 zn extends l.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,bt(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){bt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,i=[e?Tn.contentContainerHorizontal:Tn.contentContainerVertical,t],o=e?Object.assign({},Tn.baseHorizontal,r):Object.assign({},Tn.baseVertical,r);return e&&(o.flexDirection=Nn()?"row-reverse":"row"),l.a.createElement("div",x(x({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props),{},{style:o}),l.a.createElement(sn,{style:i},n))}}const On={modal:{position:"absolute",collapsable:!1},container:{position:"absolute",left:0,top:0}};class jn extends l.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===Ht.platform.OS&&(this.eventSubscription=new me("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===Ht.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:i}=this.props;if(!1===t)return null;const o={backgroundColor:n?"transparent":"white"};return i||(i="none",r&&(i="slide")),l.a.createElement("div",x({nativeName:"Modal",animationType:i,transparent:n,style:On.modal},this.props),l.a.createElement(sn,{style:[On.container,o]},e))}}jn.defaultProps={visible:!0};class Fn extends l.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}render(){var e,t,n;const{requestFocus:r,children:i,nextFocusDownId:o,nextFocusUpId:a,nextFocusLeftId:s,nextFocusRightId:u,style:c,noFocusStyle:f,focusStyle:d,onClick:p}=this.props,{isFocus:h}=this.state,m=l.a.Children.only(i);let y;(null===(t=null===(e=null==m?void 0:m.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?y=m.child.memoizedProps.nativeName:(null===(n=null==m?void 0:m.type)||void 0===n?void 0:n.displayName)&&(y=m.type.displayName);const g=o&>(o),b=a&>(a),v=s&>(s),w=u&>(u);let k=c;if("Text"!==y){const e=m.memoizedProps.style;k=x(x({},k),e)}if(Object.assign(k,h?d:f),"Text"===y)return l.a.createElement(sn,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:v,nextFocusRightId:w,requestFocus:r,style:k,onClick:p,onFocus:this.handleFocus},m);const{children:S}=m.memoizedProps;return l.a.cloneElement(m,{nextFocusDownId:o,nextFocusUpId:a,nextFocusLeftId:s,nextFocusRightId:u,requestFocus:r,onClick:p,focusable:!0,children:S,style:k,onFocus:this.handleFocus})}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}}function Hn(e){return l.a.createElement("iframe",x({title:"hippy",nativeName:"WebView"},e))}let Mn;class Dn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Mn||(Mn=new me("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=Mn.addCallback(this.onWebSocketEvent),P.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,P.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);P.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,Mn.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}function Un(e){return l.a.createElement("li",x({nativeName:"WaterfallItem"},e))}class Bn extends l.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}scrollToIndex({index:e=0,animated:t=!0}){bt(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){bt(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:i=0,interItemSpacing:o=0,numberOfItems:a=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:f,getItemType:d,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:y,onHeaderPulling:g,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:k,containPullHeader:S=!1,containPullFooter:E=!1,containBannerView:C=!1}=e,I=x(x({},N(e,v)),{},{style:t,numberOfColumns:r,columnSpacing:i,interItemSpacing:o,preloadItemNumber:s,contentInset:m,containPullHeader:S,containPullFooter:E,containBannerView:C}),P=[];if("function"==typeof n){const e=n();e&&(P.push(l.a.createElement(sn,{key:"bannerView"},l.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,g,b),n=this.getPullFooter(f,w,k);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}componentDidMount(){const{getItemKey:e}=this.props}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=l.a.createElement(yn,{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=l.a.createElement(gn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}}e.WebSocket=Dn;const{AsyncStorage:Wn,BackAndroid:Vn,Bridge:$n,Clipboard:qn,Cookie:Qn,Device:Kn,HippyRegister:Gn,ImageLoader:Yn,NetworkInfo:Xn,UIManager:Jn,flushSync:Zn}=Dt,{callNative:er,callNativeWithPromise:tr,callNativeWithCallbackId:nr,removeNativeCallback:rr}=$n,ir=null,or=e.ConsoleModule||e.console,ar=Kn.platform,lr=an,sr=an,ur=dn,cr=Gn,fr=ge,dr=me,pr={get:e=>Kn[e]},hr={get:()=>Kn.screen.scale}}.call(this,n("./node_modules/webpack/buildin/global.js"),n("./node_modules/process/browser.js"))},"./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js":function(e,t,n){(function(e){ + */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={}),e.__GLOBAL__.nodeId=0,e.__GLOBAL__.animationId=0;const{asyncStorage:I,bridge:P,device:_,document:L,register:A,on:R,off:T,emit:z}=e.Hippy;var O=Object.freeze({__proto__:null,addEventListener:R,removeEventListener:T,dispatchEvent:z,AsyncStorage:I,Bridge:P,Device:_,HippyRegister:A,UIManager:L});let j,F;const H=new Map;function M(e,t){F=e,j=t}function D(){if(!F)throw new Error("getRootViewId must execute after setRootContainer");return F}function U(e){if(!j)return null;const{current:t}=j,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 B(e,t){H.set(t,e)}function W(e){H.delete(e)}function V(e){return(null==e?void 0:e.stateNode)||null}function $(e){return H.get(e)||null}function q(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?W(t):t&&(W(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const Q={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},K=new RegExp(/^\d+$/);let G=!1,Y=!1;function X(...e){0}function J(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const Z=new RegExp("^on.+Capture$");const ee=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function te(e){return"[object Function]"===Object.prototype.toString.call(e)}function ne(e){G=e}function re(){return Y}function ie(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function oe(e){return 5===e}class ae{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}notifyEvent(...e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,...e):n.eventHandler(...e))})}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}}class le{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}preventDefault(){}}const se=new Map,ue=["%c[event]%c","color: green","color: auto"];function ce(e,t){let n=e;if(t.memoizedProps&&!t.memoizedProps[e]){const r=Object.keys(Q);for(let i=0;i0){let e,i=!1;const o=V(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new le(n,r,o);Object.assign(s,t),l?(a(s),s.bubbles||(i=!0)):(i=a(s),"boolean"!=typeof i&&(i=!re()),s.bubbles||(i=!0))}catch(e){console.error(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=V(n);do{if(o=ce(o,i),fe(o,i))try{const e=V(i),n=new le(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!re()),n.bubbles||(r=!0)}catch(e){console.error(e)}if(!1===r)for(i=i.return;i&&!oe(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(X(...ue,"receiveUIComponentEvent",e),!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=$(t);i&&fe(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=pe);class he{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 me{constructor(e){this.eventName=e,this.listenerIdList=[]}unregister(){const e=pe.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for "+this.eventName);const t=this.listenerIdList.length;for(let n=0;n{if("string"!=typeof e&&!Array.isArray(e)||"function"!=typeof t)throw new TypeError("Invalid arguments for EventBus.on()");return Array.isArray(e)?e.forEach(e=>{ve(e,t,n)}):ve(e,t,n),Se},off:(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("The event argument is not string or array for EventBus.off()");return Array.isArray(e)?e.forEach(e=>{we(e,t)}):we(e,t),Se},sizeOf(e){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.sizeOf()");const t=be[e];return(null==t?void 0:t.eventMap)?t.eventMap.size:0},emit(e,...t){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.emit()");const n=pe.getHippyEventHub(e);return n?(n.notifyEvent(...t),Se):Se}};var ke=Object.freeze({__proto__:null,getString:function(){return P.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){P.callNative("ClipboardModule","setString",e)}});var Ee=Object.freeze({__proto__:null,getCookies:function(e){return P.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){let r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),P.callNative("network","setCookie",e,t,r)}});function xe(e){return P.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ce(e){P.callNative("ImageLoaderModule","prefetch",e)}var Ne=Object.freeze({__proto__:null,getSize:xe,prefetch:Ce});const Ie=new Map,Pe=new ge;class _e{constructor(e,t){this.eventName=e,this.listener=t}remove(){this.eventName&&this.listener&&(Le(this.eventName,this.listener),this.listener=void 0)}}function Le(e,t){if(t instanceof _e)return void t.remove();let n=e;"change"===e&&(n="networkStatusDidChange");const r=Ie.get(t);if(!r)return;r.remove(),Ie.delete(t);Pe.listenerSize(n)<1&&P.callNative("NetInfo","removeListener",n)}var Ae=Object.freeze({__proto__:null,addEventListener:function(e,t){let n=e;n&&"change"===n&&(n="networkStatusDidChange"),Pe.listenerSize(n)<1&&P.callNative("NetInfo","addListener",n);const r=Pe.addListener(n,e=>{t(e)});return Ie.set(t,r),new _e(n,t)},removeEventListener:Le,fetch:function(){return P.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});function Re(e){return"loop"===e?-1:e}const Te=new ge;function ze(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Xt(t):t}class Oe{constructor(e){var t;let n=0;if((null===(t=e.startValue)||void 0===t?void 0:t.constructor)&&"Animation"===e.startValue.constructor.name)n={animationId:e.startValue.animationId};else{const{startValue:t}=e;n=ze(e.valueType,t)}const r=ze(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=n||0,this.toValue=r||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=Re(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}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=Te.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Te.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Te.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Te.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),Ft.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){Ft.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 Oe)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=ze(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=Re(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),Ft.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:ze(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 je=new ge;class Fe{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=Ft.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Re(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=je.addListener(e+"Start",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=je.addListener(e+"End",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=je.addListener(e+"Cancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=je.addListener(e+"Repeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),Ft.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&Ft.callNative("AnimationModule","destroyAnimation",e.animationId)),Ft.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){Ft.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){Ft.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 He=["%c[native]%c","color: red","color: auto"],Me={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let De=!0,Ue=[];function Be(e){(function(e){const t=[];for(let n=0;n{switch(t.type){case Me.createNode:X(...He,"createNode",t.nodes),st(e,t.nodes);break;case Me.updateNode:X(...He,"updateNode",t.nodes),"ios"===_.platform.OS?t.nodes.forEach(t=>ut(e,[t])):ut(e,t.nodes);break;case Me.deleteNode:X(...He,"deleteNode",t.nodes),"ios"===_.platform.OS?t.nodes.forEach(t=>ct(e,[t])):ct(e,t.nodes)}})}function We(e=!1){if(!De)return;if(De=!1,0===Ue.length)return void(De=!0);const t=D();dt(),e?(Be(t),pt(),Ue=[],De=!0):Promise.resolve().then(()=>{Be(t),pt(),Ue=[],De=!0})}function Ve(e){const t=e.attributes,{children:n}=t;return N(t,s)}function $e(e,t){var n;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);const r={id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:x(x({},Ve(t)),{},{style:t.style}),tagName:t.nativeName};return r}function qe(e,t,n,r){const i=[];let o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const n=$e(e,t);n&&i.push(n),"function"==typeof r&&r(t)},o),i}function Qe(e){return!!j&&e instanceof j.containerInfo.constructor}function Ke(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=D(),i=Qe(e)&&!e.isMounted,o=e.isMounted&&!t.isMounted;if(i||o){const e=qe(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});Ue.push({type:Me.createNode,nodes:e})}}function Ge(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=D(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Ue.push({type:Me.deleteNode,nodes:i})}function Ye(e){if(!e.isMounted)return;const t=$e(D(),e);t&&Ue.push({type:Me.updateNode,nodes:[t]})}let Xe=0;class Je{constructor(){this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=(Xe+=1,Xe%10==0&&(Xe+=1),Xe)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),Ke(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),Ge(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),Ke(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),Ke(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),Ge(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Ze={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},et={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},tt="turn",nt="rad",rt="deg";function it(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=w(/^([+-]?(?=(\d+))\2\.?\d*)+(deg|turn|rad)|(to\w+)$/g,{digit:2}).exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=rt){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case tt:r=""+(360*n).toFixed(2);break;case nt:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==et[i]&&(r=et[i]),r}function ot(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:Xt(n)}:void 0:{color:Xt(n)}}function at(e){var t;return t=e,Z.test(t)&&(e=e.replace("Capture","")),Q[e]?Q[e][1]:e}class lt extends Je{constructor(e){super(),this.id="",this.style={},this.attributes={},this.events={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}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,K.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(Ze,e)&&(e=Ze[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 Oe||r instanceof Fe?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 Oe||t instanceof Fe)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Jt(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Xt(t);else if("fontWeight"===e&&t)this.style[e]="string"!=typeof t?t.toString():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=it(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=ot(e);t&&r.push(t)}}else{const t=ot(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=ie(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttributes(e=[]){Array.isArray(e)&&e.length>0&&(e.forEach(e=>{if(Array.isArray(e)){const[t,n]=e;this.setAttribute(t,n,{notToNative:!0})}}),Ye(this))}parseAnimationStyleProp(e){let t=!1;Object.keys(e).some(n=>{const r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(let e=0;e["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=qe(D(),e);Ue.push({type:Me.updateNode,nodes:t})}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=J(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{if("function"==typeof t){const t=at(e);this.attributes[t]=!0,this.events[""+t]=!0}else{this.attributes[e]=t;const n=at(e);!0===this.events[""+n]&&"function"!=typeof t&&(this.attributes[n]=!1,delete this.events[""+n])}return!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n}setAttribute(e,t,n={}){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&Ye(this));if(this.parseAttributeProp(e,t))return;this.parseAnimationStyleProp(this.style),!n.notToNative&&Ye(this)}catch(e){}}removeAttribute(e){delete this.attributes[e]}setStyle(e,t,n=!1){if(null===t)return void delete this.style[e];let r=t,i=e;Object.prototype.hasOwnProperty.call(Ze,e)&&(i=Ze[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Jt(r):i.toLowerCase().indexOf("color")>-1?Xt(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&ee.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Ye(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)}),Ye(this),We(!0)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=J(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}const{createNode:st,updateNode:ut,deleteNode:ct,flushBatch:ft,startBatch:dt,endBatch:pt,sendRenderError:ht}=L,mt=function(e){return U(t=>t.stateNode&&t.stateNode.nodeId===e)};function yt(e){if(e instanceof lt)return e;if(!e)return null;const t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){let e=t.child;for(;e&&!(e.stateNode instanceof lt);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function gt(e){let t=e;if("string"==typeof e){const n=U(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=yt(t);return e?e.nodeId:0}return t.nodeId}function bt(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=yt(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;te(o)&&(a=o,o=[]);null!==D()&&(X(),"ios"===_.platform.OS?(te(a)&&Array.isArray(o)&&o.push(a),P.callNative("UIManagerModule","callUIFunction",[r,i,t,o])):"android"===_.platform.OS&&(te(a)?P.callNative("UIManagerModule","callUIFunction",[i,t,o],a):P.callNative("UIManagerModule","callUIFunction",[i,t,o])))}function vt(e,t,n){const r=gt(t);return new Promise((t,i)=>r?(X(),P.callNative("UIManagerModule",e,r,r=>(n&&te(n)&&n(r),r&&"object"==typeof r?t(r):i(new Error(`${e} error with response: ${r}`))))):(n&&te(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var wt=Object.freeze({__proto__:null,createNode:st,updateNode:ut,deleteNode:ct,flushBatch:ft,startBatch:dt,endBatch:pt,sendRenderError:ht,getNodeById:mt,getNodeIdByRef:gt,getElementFromFiberRef:yt,callUIFunction:bt,getBoundingClientRect:function(e,t){const n=gt(e);return new Promise((r,i)=>n?(X(),P.callNative("UIManagerModule","getBoundingClientRect",n,t,e=>{if(!e||e.errMsg)return i(new Error((null==e?void 0:e.errMsg)||"getBoundingClientRect error with no response"));const{x:t,y:n,width:o,height:a}=e;let l=void 0,s=void 0;return"number"==typeof n&&"number"==typeof a&&(l=n+a),"number"==typeof t&&"number"==typeof o&&(s=t+o),r({x:t,y:n,width:o,height:a,bottom:l,right:s,left:t,top:n})})):i(new Error("getBoundingClientRect cannot get nodeId of "+e)))},measureInWindow:function(e,t){return vt("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===_.platform.OS?vt("measureInWindow",e,t):vt("measureInAppWindow",e,t)}});const St=new ge,kt=new Set,Et={exitApp(){P.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(P.callNative("DeviceEventModule","setListenBackPress",!0),kt.add(e),{remove(){Et.removeListener(e)}}),removeListener(e){kt.delete(e),0===kt.size&&P.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){St.addListener("hardwareBackPress",()=>{let e=!0;[...kt].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&Et.exitApp()})}},xt=(Et.initEventListener(),Et);var Ct=Array.isArray,Nt=Object.keys,It=Object.prototype.hasOwnProperty;const Pt=setTimeout,_t=clearTimeout;var Lt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){We(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:Pt,cancelTimeout:_t,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){B(o,e.nodeId);const a=Object.keys(t||{});if(0===a.length)return;const l=a.map(e=>[e,t[e]]);e.setAttributes(l)},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),B(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",J(e)),i.meta={component:{name:"Text"}},B(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};return Object.keys(n).forEach(e=>{const t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)}),Object.keys(r).forEach(e=>{const t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=Ct(t),l=Ct(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=Nt(t);if((i=d.length)!==Nt(n).length)return!1;for(r=i;0!=r--;)if(!It.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)}}),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),q(t)},removeChildFromContainer:function(e,t){e.removeChild(t),q(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=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(){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 At=o()(x(x({},Lt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{flushSync:Rt}=At,{addEventListener:Tt,removeEventListener:zt,dispatchEvent:Ot,AsyncStorage:jt,Bridge:Ft,Device:Ht,HippyRegister:Mt}=O;var Dt=Object.freeze({__proto__:null,addEventListener:Tt,removeEventListener:zt,dispatchEvent:Ot,AsyncStorage:jt,BackAndroid:xt,Bridge:Ft,Clipboard:ke,Cookie:Ee,Device:Ht,HippyRegister:Mt,ImageLoader:Ne,NetworkInfo:Ae,UIManager:wt,flushSync:Rt});function Ut(...e){return`\\(\\s*(${e.join(")\\s*,\\s*(")})\\s*\\)`}const Bt={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},Wt="[-+]?\\d*\\.?\\d+",Vt={rgb:new RegExp("rgb"+Ut(Wt,Wt,Wt)),rgba:new RegExp("rgba"+Ut(Wt,Wt,Wt,Wt)),hsl:new RegExp("hsl"+Ut(Wt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+Ut(Wt,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Wt)),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 $t(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function qt(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Qt(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 Kt(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Qt(i,r,e+1/3),a=Qt(i,r,e),l=Qt(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Gt(e){return(parseFloat(e)%360+360)%360/360}function Yt(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Xt(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=Vt.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(Bt,e)?Bt[e]:(t=Vt.rgb.exec(e),Array.isArray(t)?($t(t[1])<<24|$t(t[2])<<16|$t(t[3])<<8|255)>>>0:(t=Vt.rgba.exec(e),t?($t(t[1])<<24|$t(t[2])<<16|$t(t[3])<<8|qt(t[4]))>>>0:(t=Vt.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Vt.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=Vt.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vt.hsl.exec(e),t?(255|Kt(Gt(t[1]),Yt(t[2]),Yt(t[3])))>>>0:(t=Vt.hsla.exec(e),t?(Kt(Gt(t[1]),Yt(t[2]),Yt(t[3]))|qt(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 Jt(e,t){return Array.isArray(e)?e.map(e=>Xt(e,t)):[0]}class Zt extends Je{constructor(){super(),this.documentElement=new lt("document")}createElement(e){return new lt(e)}createElementNS(e,t){return new lt(`${e}:${t}`)}}Zt.createElement=Zt.prototype.createElement,Zt.createElementNS=Zt.prototype.createElementNS;const{createContainer:en,updateContainer:tn,getPublicRootInstance:nn,injectIntoDevTools:rn}=At,on=['%c[Hippy-React "2.16.4"]%c',"color: #61dafb","color: auto"];class an{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new Zt;this.rootContainer=en(t,0,!1,null)}static get Native(){return Dt}start(){Mt.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:i=!1,callback:o=(()=>{})}=this.config,{__instanceId__:a}=e;X(...on,"Start",t,"with rootViewId",a,e),this.rootContainer.containerInfo.nodeId=a,r&&ne(r),i&&function(e=!1){Y=e}(i),M(a,this.rootContainer);const s=l.a.createElement(n,e);return tn(s,this.rootContainer,null,o),nn(this.rootContainer)}}an.version="2.16.4";const ln={registerComponent(e,t){new an({appName:e,entryPage:t}).start()}};class sn extends l.a.Component{constructor(){super(...arguments),this.instance=null}setPressed(e){bt(this.instance,"setPressed",[e])}setHotspot(e,t){bt(this.instance,"setHotspot",[e,t])}render(){const e=this.props,{collapsable:t,style:n={}}=e,r=N(e,u),i=n,{nativeBackgroundAndroid:o}=r;return"boolean"==typeof t&&(i.collapsable=t),void 0!==(null==o?void 0:o.color)&&(o.color=Xt(o.color)),l.a.createElement("div",x({ref:e=>{this.instance=e},nativeName:"View",style:i},r))}}function un(e,t){let{style:n}=e,r=N(e,c);const i=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(i[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(i.color="#000")),r.text="","string"==typeof r.children)r.text=J(r.children);else if("number"==typeof r.children)r.text=J(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=J(e),r.children=r.text)}return l.a.createElement("p",x({ref:t,nativeName:"Text",style:i},r))}un.displayName="Text";const cn=l.a.forwardRef(un);cn.displayName="Text";var fn=Object.freeze({__proto__:null,default:cn});class dn extends l.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=xe(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:i,source:o,sources:a,src:s,srcs:u,tintColor:c,tintColors:d}=e,p=N(e,f),h=this.getImageUrls({src:s,srcs:u,source:o,sources:a});"ios"===Ht.platform.OS?h.length&&(p.source=h.map(e=>({uri:e}))):"android"===Ht.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=ie(p.defaultSource));const m=x({},n);return this.handleTintColor(m,c,d),p.style=m,t?l.a.createElement(sn,{style:n},l.a.createElement("img",x(x({},p),{},{nativeName:"Image",alt:"",ref:i,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):l.a.createElement("img",x(x({},p),{},{nativeName:"Image",alt:"",ref:i}))}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=>ie(e))),i}handleTintColor(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}dn.prefetch=Ce;class pn{constructor(){this.Value=pn.Value}static Value(e){return e}static timing(e,t){return new Oe({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}pn.View=sn,pn.Text=fn,pn.Image=dn;const hn={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 mn(e){return l.a.createElement("li",x({nativeName:"ListViewItem"},e))}class yn extends l.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){bt(this.instance,"expandPullHeader",[])}collapsePullHeader(e){void 0!==e?bt(this.instance,"collapsePullHeaderWithOptions",[e]):bt(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=N(e,d);return l.a.createElement("div",x({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class gn extends l.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){bt(this.instance,"expandPullFooter",[])}collapsePullFooter(){bt(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=N(e,p);return l.a.createElement("div",x({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}const bn={onDisappear:"onDisAppear"},vn={onDisappear:"onDisappear"};class wn extends l.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}}static convertName(e){return"android"===Ht.platform.OS&&bn[e]?bn[e]:"ios"===Ht.platform.OS&&vn[e]?vn[e]:e}componentDidMount(){const{getRowKey:e}=this.props}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&bt(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&bt(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:i,renderPullFooter:o,getRowType:a,getRowStyle:s,getHeaderStyle:u,getFooterStyle:c,getRowKey:f,dataSource:d,initialListSize:p,rowShouldSticky:m,onRowLayout:y,onHeaderPulling:g,onHeaderReleased:b,onFooterPulling:v,onFooterReleased:w,onAppear:S,onDisappear:k,onWillAppear:E,onWillDisappear:C}=e,I=N(e,h),P=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const h=this.getPullHeader(i,g,b,u),N=this.getPullFooter(o,v,w,c);!t&&d&&(t=d.length),e||(t=Math.min(t,p||15));for(let e=0;e{"function"==typeof n&&(t[wn.convertName(r)]=()=>{n(e)})}),n&&P.push(l.a.createElement(mn,x({},t),n))}h&&P.unshift(h),N&&P.push(N),"function"==typeof m&&Object.assign(I,{rowShouldSticky:!0});const _=[S,k,E,C];I.exposureEventEnabled=_.some(e=>"function"==typeof e),"ios"===Ht.platform.OS&&(I.numberOfRows=P.length),void 0!==p&&(I.initialListSize=p),I.style=x({overflow:"scroll"},n)}return l.a.createElement("ul",x({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},I),P.length?P:t)}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n,r){let i=null,o={};return"function"==typeof r&&(o=r()),"function"==typeof e&&(i=l.a.createElement(yn,{style:o,key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),i}getPullFooter(e,t,n,r){let i=null,o={};return"function"==typeof r&&(o=r()),"function"==typeof e&&(i=l.a.createElement(gn,{style:o,key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),i}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))}}wn.defaultProps={numberOfRows:0};class Sn extends l.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}startRefresh(){bt(this.instance,"startRefresh",null)}refreshCompleted(){bt(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=N(e,m);return l.a.createElement("div",x({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),l.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}}class kn{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName]){new an({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),bt(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),bt(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=N(e.initialRoute,g),r=N(e,y);return r.initialRoute=n,l.a.createElement("div",x({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function xn(e){return l.a.createElement("div",x(x({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class Cn extends l.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&&bt(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&bt(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=N(e,b);let i=[];return Array.isArray(t)?i=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),l.a.createElement(xn,x({},t),e)}):i.push(l.a.createElement(xn,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),l.a.createElement("div",x({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),i)}}function Nn(){const e=_.platform.Localization;return!!e&&1===e.direction}const In={caretColor:"caret-color"};class Pn extends l.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=>{bt(this.instance,"getValue",t=>e(t.text))})}setValue(e){return bt(this.instance,"setValue",[e]),e}focus(){bt(this.instance,"focusTextInput",[])}blur(){bt(this.instance,"blurTextInput",[])}isFocused(){return new Promise(e=>{bt(this.instance,"isFocused",t=>e(t.value))})}showInputMethod(){}hideInputMethod(){}clear(){bt(this.instance,"clear",[])}render(){const e=x({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach(t=>{let n=t;const r=this.props[t];"string"==typeof this.props[t]&&(In[t]&&(n=In[t]),Array.isArray(e.style)?e.style.push({[n]:r}):e.style&&"object"==typeof e.style?e.style[n]=r:e.style={[n]:r},delete e[t])}),Nn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),l.a.createElement("div",x(x({nativeName:"TextInput"},e),{},{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props,n=e;"android"===Ht.platform.OS&&(n.keyboardHeight/=Ht.screen.scale),"function"==typeof t&&t(n)}}const _n=Ht.window.scale;let Ln=Math.round(.4*_n)/_n;function An(e){return e}0===Ln&&(Ln=1/_n);var Rn=Object.freeze({__proto__:null,get hairlineWidth(){return Ln},create:An});const Tn={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 zn extends l.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,bt(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){bt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,i=[e?Tn.contentContainerHorizontal:Tn.contentContainerVertical,t],o=e?Object.assign({},Tn.baseHorizontal,r):Object.assign({},Tn.baseVertical,r);return e&&(o.flexDirection=Nn()?"row-reverse":"row"),l.a.createElement("div",x(x({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props),{},{style:o}),l.a.createElement(sn,{style:i},n))}}const On={modal:{position:"absolute",collapsable:!1},container:{position:"absolute",left:0,top:0}};class jn extends l.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===Ht.platform.OS&&(this.eventSubscription=new me("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===Ht.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:i}=this.props;if(!1===t)return null;const o={backgroundColor:n?"transparent":"white"};return i||(i="none",r&&(i="slide")),l.a.createElement("div",x({nativeName:"Modal",animationType:i,transparent:n,style:On.modal},this.props),l.a.createElement(sn,{style:[On.container,o]},e))}}jn.defaultProps={visible:!0};class Fn extends l.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}render(){var e,t,n;const{requestFocus:r,children:i,nextFocusDownId:o,nextFocusUpId:a,nextFocusLeftId:s,nextFocusRightId:u,style:c,noFocusStyle:f,focusStyle:d,onClick:p}=this.props,{isFocus:h}=this.state,m=l.a.Children.only(i);let y;(null===(t=null===(e=null==m?void 0:m.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?y=m.child.memoizedProps.nativeName:(null===(n=null==m?void 0:m.type)||void 0===n?void 0:n.displayName)&&(y=m.type.displayName);const g=o&>(o),b=a&>(a),v=s&>(s),w=u&>(u);let S=c;if("Text"!==y){const e=m.memoizedProps.style;S=x(x({},S),e)}if(Object.assign(S,h?d:f),"Text"===y)return l.a.createElement(sn,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:v,nextFocusRightId:w,requestFocus:r,style:S,onClick:p,onFocus:this.handleFocus},m);const{children:k}=m.memoizedProps;return l.a.cloneElement(m,{nextFocusDownId:o,nextFocusUpId:a,nextFocusLeftId:s,nextFocusRightId:u,requestFocus:r,onClick:p,focusable:!0,children:k,style:S,onFocus:this.handleFocus})}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}}function Hn(e){return l.a.createElement("iframe",x({title:"hippy",nativeName:"WebView"},e))}let Mn;class Dn{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Mn||(Mn=new me("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=Mn.addCallback(this.onWebSocketEvent),P.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,P.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);P.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,Mn.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}function Un(e){return l.a.createElement("li",x({nativeName:"WaterfallItem"},e))}class Bn extends l.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}scrollToIndex({index:e=0,animated:t=!0}){bt(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){bt(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:i=0,interItemSpacing:o=0,numberOfItems:a=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:f,getItemType:d,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:y,onHeaderPulling:g,onHeaderReleased:b,onFooterPulling:w,onFooterReleased:S,containPullHeader:k=!1,containPullFooter:E=!1,containBannerView:C=!1}=e,I=x(x({},N(e,v)),{},{style:t,numberOfColumns:r,columnSpacing:i,interItemSpacing:o,preloadItemNumber:s,contentInset:m,containPullHeader:k,containPullFooter:E,containBannerView:C}),P=[];if("function"==typeof n){const e=n();e&&(P.push(l.a.createElement(sn,{key:"bannerView"},l.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,g,b),n=this.getPullFooter(f,w,S);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}componentDidMount(){const{getItemKey:e}=this.props}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=l.a.createElement(yn,{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=l.a.createElement(gn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}}e.WebSocket=Dn;const{AsyncStorage:Wn,BackAndroid:Vn,Bridge:$n,Clipboard:qn,Cookie:Qn,Device:Kn,HippyRegister:Gn,ImageLoader:Yn,NetworkInfo:Xn,UIManager:Jn,flushSync:Zn}=Dt,{callNative:er,callNativeWithPromise:tr,callNativeWithCallbackId:nr,removeNativeCallback:rr}=$n,ir=null,or=e.ConsoleModule||e.console,ar=Kn.platform,lr=an,sr=an,ur=dn,cr=Gn,fr=ge,dr=me,pr={get:e=>Kn[e]},hr={get:()=>Kn.screen.scale}}.call(this,n("./node_modules/webpack/buildin/global.js"),n("./node_modules/process/browser.js"))},"./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js":function(e,t,n){(function(e){ /** @license React v0.26.2 * react-reconciler.production.min.js * diff --git a/examples/ios-demo/res/index.ios.js b/examples/ios-demo/res/index.ios.js index 1a1ee58fc1b..7b9b50ffa0a 100644 --- a/examples/ios-demo/res/index.ios.js +++ b/examples/ios-demo/res/index.ios.js @@ -1,5 +1,5 @@ -!function(e){function t(t){for(var n,o,a=t[0],i=t[1],l=0,s=[];l0===l.indexOf(e))){var c=l.split("/"),s=c[c.length-1],u=s.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+s)}else{var f;u=l.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=r[e];0!==n&&n&&n[1](t),r[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var a=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toConsumableArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArray.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableSpread.js");e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/typeof.js"),o=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},"./node_modules/@hippy/rejection-tracking-polyfill/index.js":function(e,t,n){(function(e){!function(){if("ios"===Hippy.device.platform.OS){var t=[ReferenceError,TypeError,RangeError],n=!1;!function(o){if(e.Promise){o=o||{},n&&(n=!1,e.Promise._onHandle=null,e.Promise._onReject=null),n=!0;var a=0,i=0,l={};e.Promise._onHandle=function(e){2===e._state&&l[e._rejectionId]&&(l[e._rejectionId].logged?function(e){l[e].logged&&(o.onHandled?o.onHandled(l[e].displayId,l[e].error):l[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+l[e].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+l[e].displayId+".")))}(e._rejectionId):clearTimeout(l[e._rejectionId].timeout),delete l[e._rejectionId])},e.Promise._onReject=function(e,n){0===e._deferredState&&(e._rejectionId=a++,l[e._rejectionId]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._rejectionId),r(n,t)?100:2e3),logged:!1})}}function c(e){(o.allRejections||r(l[e].error,o.whitelist||t))&&(l[e].displayId=i++,o.onUnhandled?(l[e].logged=!0,o.onUnhandled(l[e].displayId,l[e].error)):(l[e].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn(" "+e)}))}(l[e].displayId,l[e].error)))}}({allRejections:!0,onUnhandled:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.prototype.toString.call(n);if("[object Error]"===r){var o=Error.prototype.toString.call(n),a=n.stack,i="Possible Unhandled Promise Rejection (id: "+t+"):\n"+(o||"")+"\n"+(null==a?"":a);console.warn(i)}else{console.warn("Possible Unhandled Promise Rejection (id: "+t+"):");var l=(n&&(n.stack||n))+"";l.split("\n").forEach((function(e){console.warn(" "+e)}))}e.Hippy.emit("unhandledRejection",n,t)},onHandled:function(){}})}function r(e,t){return t.some((function(t){return e instanceof t}))}}()}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":function(e,t,n){"use strict";var r=n("./node_modules/react-is/index.js"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=h(n);o&&o!==m&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var l=c(t),y=c(n),p=0;pu&&r[n].offset>t;)r[n].offset+=3;return"(.*)"}));for(;a=n.exec(t);){for(var h=0,m=a.index;"\\"===t.charAt(--m);)h++;h%2!=1&&((u+f===r.length||r[u+f].offset>a.index)&&r.splice(u+f,0,{name:d++,optional:!1,offset:a.index}),f++)}return t+=l?"$":"/"===t[t.length-1]?"":"(?=\\/|$)",new RegExp(t,c)};var n=/\((?!\?)/g},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var r=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-is/cjs/react-is.production.min.js":function(e,t,n){"use strict"; +!function(e){function t(t){for(var n,o,a=t[0],i=t[1],l=0,s=[];l0===l.indexOf(e))){var c=l.split("/"),s=c[c.length-1],u=s.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+s)}else{var f;u=l.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=r[e];0!==n&&n&&n[1](t),r[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var a=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),m}},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;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:V(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toConsumableArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArray.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableSpread.js");e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/typeof.js").default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/typeof.js").default,o=n("./node_modules/@babel/runtime/helpers/toPrimitive.js");e.exports=function(e){var t=o(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/typeof.js"),o=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},"./node_modules/@hippy/rejection-tracking-polyfill/index.js":function(e,t,n){(function(e){!function(){if("ios"===Hippy.device.platform.OS){var t=[ReferenceError,TypeError,RangeError],n=!1;!function(o){if(e.Promise){o=o||{},n&&(n=!1,e.Promise._onHandle=null,e.Promise._onReject=null),n=!0;var a=0,i=0,l={};e.Promise._onHandle=function(e){2===e._state&&l[e._rejectionId]&&(l[e._rejectionId].logged?function(e){l[e].logged&&(o.onHandled?o.onHandled(l[e].displayId,l[e].error):l[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+l[e].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+l[e].displayId+".")))}(e._rejectionId):clearTimeout(l[e._rejectionId].timeout),delete l[e._rejectionId])},e.Promise._onReject=function(e,n){0===e._deferredState&&(e._rejectionId=a++,l[e._rejectionId]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._rejectionId),r(n,t)?100:2e3),logged:!1})}}function c(e){(o.allRejections||r(l[e].error,o.whitelist||t))&&(l[e].displayId=i++,o.onUnhandled?(l[e].logged=!0,o.onUnhandled(l[e].displayId,l[e].error)):(l[e].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn(" "+e)}))}(l[e].displayId,l[e].error)))}}({allRejections:!0,onUnhandled:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.prototype.toString.call(n);if("[object Error]"===r){var o=Error.prototype.toString.call(n),a=n.stack,i="Possible Unhandled Promise Rejection (id: "+t+"):\n"+(o||"")+"\n"+(null==a?"":a);console.warn(i)}else{console.warn("Possible Unhandled Promise Rejection (id: "+t+"):");var l=(n&&(n.stack||n))+"";l.split("\n").forEach((function(e){console.warn(" "+e)}))}e.Hippy.emit("unhandledRejection",n,t)},onHandled:function(){}})}function r(e,t){return t.some((function(t){return e instanceof t}))}}()}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":function(e,t,n){"use strict";var r=n("./node_modules/react-is/index.js"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=h(n);o&&o!==m&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var l=c(t),p=c(n),y=0;y=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:A(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/app.jsx":function(e,t,n){"use strict";n.d(t,"a",(function(){return ir}));var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return le})),n.d(r,"ListView",(function(){return xe})),n.d(r,"Modal",(function(){return Ce})),n.d(r,"RefreshWrapper",(function(){return Xe})),n.d(r,"PullHeaderFooter",(function(){return $e})),n.d(r,"ScrollView",(function(){return tt})),n.d(r,"Text",(function(){return lt})),n.d(r,"TextInput",(function(){return ut})),n.d(r,"View",(function(){return ht})),n.d(r,"ViewPager",(function(){return Tt})),n.d(r,"WebView",(function(){return Ct})),n.d(r,"BoxShadow",(function(){return Vt})),n.d(r,"WaterfallView",(function(){return Pt})),n.d(r,"RippleViewAndroid",(function(){return Wt}));var o={};n.r(o),n.d(o,"Animation",(function(){return qt})),n.d(o,"AsyncStorage",(function(){return Xt})),n.d(o,"NetInfo",(function(){return en})),n.d(o,"WebSocket",(function(){return on})),n.d(o,"UIManagerModule",(function(){return un}));var a={};n.r(a),n.d(a,"Slider",(function(){return gn})),n.d(a,"TabHost",(function(){return xn})),n.d(a,"SetNativeProps",(function(){return Tn})),n.d(a,"DynamicImport",(function(){return kn})),n.d(a,"Localization",(function(){return In})),n.d(a,"Turbo",(function(){return _n})),n.d(a,"NestedScroll",(function(){return Mn}));var i=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),l=n.n(i),c=n("./node_modules/@babel/runtime/helpers/createClass.js"),s=n.n(c),u=n("./node_modules/@babel/runtime/helpers/inherits.js"),f=n.n(u),d=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),h=n.n(d),m=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),y=n.n(m),p=n("./node_modules/react/index.js"),g=n.n(p),b=n("../../packages/hippy-react/dist/index.js"),w=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),x=n.n(w),v=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?T(o,u):".."===f?(T(o,u),s++):s&&(T(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&E(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var C="Invariant failed";function k(e,t){if(!e)throw new Error(C)}function R(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=A(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),p.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(p.entries[p.index]=r,u({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=p.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),F=function(e){var t=Object(P.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(v.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 g.a.createElement(F.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}(g.a.Component);var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;ot?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&b.PixelRatio.get()>=2&&(e=!0),e}},_e=(De.getScreenWidth()-24-12)/3,Le=Math.floor(_e/1.35),Be=b.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:Le,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:_e,height:Le},title:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Me(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var i=(o=De.uniqueArray(o)).join(" ");a=g.a.createElement(b.Text,{style:Be.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,Pe()({},e,{style:{collapsable:!1}}),g.a.createElement(b.Text,{style:[Be.title],numberOfLines:2,enableScale:!0},n),g.a.createElement(b.View,{style:Be.imageContainer},g.a.createElement(b.Image,{style:Be.image,source:{uri:r[0]},resizeMode:b.Image.resizeMode.cover}),g.a.createElement(b.Image,{style:[Be.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:b.Image.resizeMode.cover}),g.a.createElement(b.Image,{style:Be.image,source:{uri:r[2]},resizeMode:b.Image.resizeMode.cover})),a?g.a.createElement(b.View,{style:Be.tagLine},a):null)}var Fe=De.getScreenWidth()-24,ze=Math.floor(Fe-12)/3,He=Math.floor(ze/1.35),We=b.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:He},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ze,height:He},image:{width:ze,height:He},title:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Ne(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 i=(a=De.uniqueArray(a)).join(" ");n=g.a.createElement(b.Text,{style:We.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,Pe()({},e,{style:We.container}),g.a.createElement(b.View,{style:We.leftContainer},g.a.createElement(b.Text,{style:We.title,numberOfLines:2,enableScale:!0},r),n?g.a.createElement(b.View,{style:We.tagLine},n):null),g.a.createElement(b.View,{style:We.imageContainer},g.a.createElement(b.Image,{resizeMode:b.Image.resizeMode.cover,style:We.image,source:{uri:o}})))}var Ue=De.getScreenWidth()-24,Ge=Math.floor(188*Ue/336),Ke=b.StyleSheet.create({text:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Ue,height:Ge,alignSelf:"center"},image:{width:Ue,height:Ge},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function qe(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var i=(o=De.uniqueArray(o)).join(" ");a=g.a.createElement(b.Text,{style:Ke.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,e,g.a.createElement(b.Text,{style:Ke.text,numberOfLines:2,enableScale:!0},n),g.a.createElement(b.View,{style:Ke.playerView},g.a.createElement(b.Image,{style:Ke.image,source:{uri:r},resizeMode:b.Image.resizeMode.cover})),a?g.a.createElement(b.View,{style:Ke.tagLine},a):null)}function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ye=b.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Xe=function(e){f()(o,e);var t,n,r=Qe(o);function o(e){var t;return l()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(fe()(t)),t.onRefresh=t.onRefresh.bind(fe()(t)),t.getRefresh=t.getRefresh.bind(fe()(t)),t.getRenderRow=t.getRenderRow.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.getRowType=t.getRowType.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t}return s()(o,[{key:"componentDidMount",value:(n=se()(he.a.mark((function e(){var t;return he.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=se()(he.a.mark((function e(){var t,n,r,o,a;return he.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(se()(he.a.mark((function t(){var n;return he.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,i=r[e],l=r.length===e+1;switch(i.style){case 1:a=g.a.createElement(Me,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=g.a.createElement(Ne,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=g.a.createElement(qe,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=g.a.createElement(b.Text,{style:Ye.loading},o)}return g.a.createElement(b.View,{style:Ye.container},g.a.createElement(b.View,{style:Ye.itemContainer},a),l?null:g.a.createElement(b.View,{style:Ye.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 g.a.createElement(b.View,{style:{flex:1,height:30}},g.a.createElement(b.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(je)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return g.a.createElement(b.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},g.a.createElement(b.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(g.a.Component);function Je(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 h()(this,n)}}var Ze=b.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:{flex:1,height:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{height:40,flex:1,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),$e=function(e){f()(a,e);var t,n,r,o=Je(a);function a(e){var t;return l()(this,a),(t=o.call(this,e)).state={dataSource:[],headerRefreshText:"继续下拉触发刷新",footerRefreshText:"正在加载...",horizontal:void 0},t.loadMoreDataFlag=!1,t.fetchingDataFlag=!1,t.mockFetchData=t.mockFetchData.bind(fe()(t)),t.renderRow=t.renderRow.bind(fe()(t)),t.getRowType=t.getRowType.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t.getHeaderStyle=t.getHeaderStyle.bind(fe()(t)),t.getFooterStyle=t.getFooterStyle.bind(fe()(t)),t.getRowStyle=t.getRowStyle.bind(fe()(t)),t.renderPullHeader=t.renderPullHeader.bind(fe()(t)),t.renderPullFooter=t.renderPullFooter.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(fe()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(fe()(t)),t.onFooterPulling=t.onFooterPulling.bind(fe()(t)),t}return s()(a,[{key:"componentDidMount",value:(r=se()(he.a.mark((function e(){var t;return he.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:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){return e(je)}),800)}))}},{key:"onEndReached",value:(n=se()(he.a.mark((function e(){var t,n,r;return he.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({footerRefreshText:"加载更多..."}),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({footerRefreshText:"没有更多数据"}),r=[].concat(x()(t),x()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1,this.listView.collapsePullFooter();case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=se()(he.a.mark((function e(){var t,n=this;return he.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({headerRefreshText:"刷新数据中,请稍等"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=(t=e.sent).reverse(),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(6);case 15:this.fetchingDataFlag=!1,this.setState({dataSource:t,headerRefreshText:"2秒后收起"},(function(){n.listView.collapsePullHeader({time:2e3})}));case 17:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Ze.pullContent.height?this.setState({headerRefreshText:"松手,即可触发刷新"}):this.setState({headerRefreshText:"继续下拉,触发刷新"}))}},{key:"onFooterPulling",value:function(e){console.log("onFooterPulling",e)}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getHeaderStyle",value:function(){return this.state.horizontal?{width:50}:{}}},{key:"renderPullHeader",value:function(){var e=this.state,t=e.headerRefreshText;return e.horizontal?g.a.createElement(b.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{lineHeight:25,color:"white",width:40,paddingHorizontal:15}},t)):g.a.createElement(b.View,{style:Ze.pullContainer},g.a.createElement(b.Text,{style:Ze.pullContent},t))}},{key:"getFooterStyle",value:function(){return this.state.horizontal?{width:40}:{}}},{key:"renderPullFooter",value:function(){return this.state.horizontal?g.a.createElement(b.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{color:"white",lineHeight:25,width:40,paddingHorizontal:15}},this.state.footerRefreshText)):g.a.createElement(b.View,{style:Ze.pullFooter},g.a.createElement(b.Text,{style:{color:"white"}},this.state.footerRefreshText))}},{key:"renderRow",value:function(e){var t=this,n=this.state.dataSource,r=null,o=n[e],a=n.length===e+1;switch(o.style){case 1:r=g.a.createElement(Me,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:r=g.a.createElement(Ne,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:r=g.a.createElement(qe,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}})}return g.a.createElement(b.View,{style:Ze.container},g.a.createElement(b.View,{style:Ze.itemContainer},r),a?null:g.a.createElement(b.View,{style:Ze.splitter}))}},{key:"getRowStyle",value:function(){return this.state.horizontal?{height:300,justifyContent:"center",alignItems:"center"}:{}}},{key:"changeDirection",value:function(){this.setState({horizontal:void 0===this.state.horizontal||void 0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.dataSource,r=t.horizontal;return g.a.createElement(b.View,{style:{flex:1,collapsable:!1}},g.a.createElement(b.ListView,{horizontal:r,onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:[{backgroundColor:"#ffffff"},r?{height:300}:{flex:1}],numberOfRows:n.length,getRowType:this.getRowType,getRowKey:this.getRowKey,getHeaderStyle:this.getHeaderStyle,getFooterStyle:this.getFooterStyle,getRowStyle:this.getRowStyle,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,renderPullFooter:this.renderPullFooter,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling,onFooterReleased:this.onEndReached,onFooterPulling:this.onFooterPulling,rowShouldSticky:function(e){return 0===e}}),"android"===b.Platform.OS?g.a.createElement(b.View,{onClick:function(){return e.changeDirection()},style:{position:"absolute",right:20,bottom:20,width:67,height:67,borderRadius:30,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:3,boxShadowOffsetY:3,boxShadowColor:"#4c9afa"}},g.a.createElement(b.View,{style:{width:60,height:60,borderRadius:30,backgroundColor:"#4c9afa",display:"flex",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{color:"white"}},"切换方向"))):null)}}]),a}(g.a.Component),et=b.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderStyle:"solid",borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1,borderStyle:"solid"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function tt(){return g.a.createElement(b.ScrollView,null,g.a.createElement(b.View,{style:et.itemTitle},g.a.createElement(b.Text,null,"Horizontal ScrollView")),g.a.createElement(b.View,null,g.a.createElement(b.ScrollView,{horizontal:!0,bounces:!0,showsHorizontalScrollIndicator:!1,showScrollIndicator:!1,onScroll:function(e){return console.log("onScroll",e)},onMomentumScrollBegin:function(e){return console.log("onMomentumScrollBegin",e)},onMomentumScrollEnd:function(e){return console.log("onMomentumScrollEnd",e)},onScrollBeginDrag:function(e){return console.log("onScrollBeginDrag",e)},onScrollEndDrag:function(e){return console.log("onScrollEndDrag",e)}},g.a.createElement(b.Text,{style:et.itemStyle},"A"),g.a.createElement(b.Text,{style:et.itemStyle},"B"),g.a.createElement(b.Text,{style:et.itemStyle},"C"),g.a.createElement(b.Text,{style:et.itemStyle},"D"),g.a.createElement(b.Text,{style:et.itemStyle},"E"),g.a.createElement(b.Text,{style:et.itemStyle},"F"),g.a.createElement(b.Text,{style:et.itemStyle},"A"))),g.a.createElement(b.View,{style:et.itemTitle},g.a.createElement(b.Text,null,"Vertical ScrollView")),g.a.createElement(b.ScrollView,{bounces:!0,horizontal:!1,style:et.verticalScrollView,showScrollIndicator:!1,showsVerticalScrollIndicator:!1},g.a.createElement(b.Text,{style:et.itemStyle},"A"),g.a.createElement(b.Text,{style:et.itemStyle},"B"),g.a.createElement(b.Text,{style:et.itemStyle},"C"),g.a.createElement(b.Text,{style:et.itemStyle},"D"),g.a.createElement(b.Text,{style:et.itemStyle},"E"),g.a.createElement(b.Text,{style:et.itemStyle},"F"),g.a.createElement(b.Text,{style:et.itemStyle},"A")))}function nt(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 h()(this,n)}}var rt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEXRSTlMA9QlZEMPc2Mmmj2VkLEJ4Rsx+pEgAAAChSURBVCjPjVLtEsMgCDOAdbbaNu//sttVPes+zvGD8wgQCLp/TORbUGMAQtQ3UBeSAMlF7/GV9Cmb5eTJ9R7H1t4bOqLE3rN2UCvvwpLfarhILfDjJL6WRKaXfzxc84nxAgLzCGSGiwKwsZUB8hPorZwUV1s1cnGKw+yAOrnI+7hatNIybl9Q3OkBfzopCw6SmDVJJiJ+yD451OS0/TNM7QnuAAbvCG0TSAAAAABJRU5ErkJggg==",ot="https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif",at=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",borderWidth:1,borderStyle:"solid",borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",flexGrow:1,flexShrink:1},buttonText:{lineHeight:24,textAlign:"center",paddingHorizontal:20},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),it=0,lt=function(e){f()(n,e);var t=nt(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1},numberOfLines:2,ellipsizeMode:void 0},r.incrementFontSize=r.incrementFontSize.bind(fe()(r)),r.decrementFontSize=r.decrementFontSize.bind(fe()(r)),r.incrementLine=r.incrementLine.bind(fe()(r)),r.decrementLine=r.decrementLine.bind(fe()(r)),r.changeMode=r.changeMode.bind(fe()(r)),r}return s()(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:"incrementLine",value:function(){var e=this.state.numberOfLines;e<6&&this.setState({numberOfLines:e+1})}},{key:"decrementLine",value:function(){var e=this.state.numberOfLines;e>1&&this.setState({numberOfLines:e-1})}},{key:"changeMode",value:function(e){this.setState({ellipsizeMode:e})}},{key:"changeBreakStrategy",value:function(e){this.setState({breakStrategy:e})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=t.numberOfLines,i=t.ellipsizeMode,l=t.breakStrategy,c=function(e){return g.a.createElement(b.View,{style:at.itemTitle},g.a.createElement(b.Text,{style:!0},e))};return g.a.createElement(b.ScrollView,{style:{paddingHorizontal:10}},c("shadow"),g.a.createElement(b.View,{style:[at.itemContent,{height:60}],onClick:function(){var t="red",n={x:10,y:1};it%2==1&&(t="grey",n={x:1,y:1}),it+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},g.a.createElement(b.Text,{style:[at.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),c("color"),g.a.createElement(b.View,{style:[at.itemContent,{height:80}]},g.a.createElement(b.Text,{style:[at.normalText,{color:"#242424"}]},"Text color is black"),g.a.createElement(b.Text,{style:[at.normalText,{color:"blue"}]},"Text color is blue"),g.a.createElement(b.Text,{style:[at.normalText,{color:"rgb(228,61,36)"}]},"This is red")),c("fontSize"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{style:[at.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),g.a.createElement(b.View,{style:at.button,onClick:this.incrementFontSize},g.a.createElement(b.Text,{style:at.buttonText},"放大字体")),g.a.createElement(b.View,{style:at.button,onClick:this.decrementFontSize},g.a.createElement(b.Text,{style:at.buttonText},"缩小字体"))),c("fontStyle"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{style:[at.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),g.a.createElement(b.Text,{style:[at.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),c("numberOfLines and ellipsizeMode"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[at.normalText,{marginBottom:10}]},"numberOfLines=".concat(a," | ellipsizeMode=").concat(i)),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Text,{style:{fontSize:19,color:"white"}},"先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。"),g.a.createElement(b.Text,null,"然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。")),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{backgroundColor:"#4c9afa",marginBottom:10,color:"white",paddingHorizontal:10,paddingVertical:5}]},"line 1\n\nline 3\n\nline 5"),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5,verticalAlign:"middle"}]},g.a.createElement(b.Image,{style:{width:24,height:24},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEnRSTlMA/QpX7WQU2m27pi3Ej9KEQXaD5HhjAAAAqklEQVQoz41SWxLDIAh0RcFXTHL/yzZSO01LMpP9WJEVUNA9gfdXTioCSKE/kQQTQmf/ArRYva+xAcuPP37seFII2L7FN4BmXdHzlEPIpDHiZ0A7eIViPcw2QwqipkvMSdNEFBUE1bmMNOyE7FyFaIkAP4jHhhG80lvgkzBODTKpwhRMcexuR7fXzcp08UDq6GRbootp4oRtO3NNpd4NKtnR9hB6oaefweIFQU0EfnGDRoQAAAAASUVORK5CYII="}}),g.a.createElement(b.Text,null,"Text + Attachment")),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:this.incrementLine},g.a.createElement(b.Text,{style:at.buttonText},"加一行")),g.a.createElement(b.View,{style:at.button,onClick:this.decrementLine},g.a.createElement(b.Text,{style:at.buttonText},"减一行"))),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("clip")}},g.a.createElement(b.Text,{style:at.buttonText},"clip")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("head")}},g.a.createElement(b.Text,{style:at.buttonText},"head")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("middle")}},g.a.createElement(b.Text,{style:at.buttonText},"middle")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("tail")}},g.a.createElement(b.Text,{style:at.buttonText},"tail")))),c("textDecoration"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),c("LetterSpacing"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{letterSpacing:-1}]},"Text width letter-spacing -1"),g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{letterSpacing:5}]},"Text width letter-spacing 5")),c("Nest Text"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:3},g.a.createElement(b.Text,{numberOfLines:3,style:[at.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),g.a.createElement(b.Text,{numberOfLines:3,style:at.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),c("Custom font"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:at.customFont},"Hippy 跨端框架")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontWeight:"bold"}]},"Hippy 跨端框架 粗体")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontStyle:"italic"}]},"Hippy 跨端框架 斜体")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontWeight:"bold",fontStyle:"italic"}]},"Hippy 跨端框架 粗斜体")),c("Text Nested"),g.a.createElement(b.View,{style:[at.itemContent,{height:150}]},g.a.createElement(b.Text,{style:{height:100,lineHeight:50}},g.a.createElement(b.Text,{numberOfLines:1,style:at.normalText},"后面有张图片"),g.a.createElement(b.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"}}),g.a.createElement(b.Text,{numberOfLines:1,style:at.customFont},"前面有张图片")),g.a.createElement(b.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingHorizontal:10,paddingVertical:5,backgroundColor:"#4c9afa"}},g.a.createElement(b.Image,{style:{width:24,height:24,alignSelf:"center"},source:{uri:rt}}),g.a.createElement(b.Text,{style:{fontSize:15,alignItems:"center",justifyContent:"center"}},"Image+Text"))),"android"===b.Platform.OS&&c("breakStrategy"),"android"===b.Platform.OS&&g.a.createElement(b.View,{style:at.itemContent},g.a.createElement(b.Text,{style:[at.normalText,{borderWidth:1,borderColor:"gray"}],breakStrategy:l},"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."),g.a.createElement(b.Text,{style:at.normalText},"breakStrategy: ".concat(l)),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("simple")}},g.a.createElement(b.Text,{style:at.buttonText},"simple")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("high_quality")}},g.a.createElement(b.Text,{style:at.buttonText},"high_quality")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("balanced")}},g.a.createElement(b.Text,{style:at.buttonText},"balanced")))),c("verticalAlign"),g.a.createElement(b.View,{style:[at.itemContent,{height:"android"===b.Platform.OS?160:70}]},g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:ot}}),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"top"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"middle"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"baseline"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"bottom"}},"字")),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:0},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlignment:1},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlignment:2},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlignment:3},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,top:-10},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:18,height:12,top:-5},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:24,height:12},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:36,height:24,top:3},source:{uri:ot}}),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字")))),c("tintColor & backgroundColor"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:30,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Text,{style:{verticalAlign:"middle",backgroundColor:"#090"}},"text")),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:30,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,tintColor:"orange"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,tintColor:"orange",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,backgroundColor:"#ccc"},source:{uri:rt}})))),c("margin"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"baseline",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"bottom",backgroundColor:"#ccc",margin:5},source:{uri:rt}})),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:0,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:1,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:2,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:3,backgroundColor:"#ccc",margin:5},source:{uri:rt}})))))}}]),n}(g.a.Component);function ct(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 h()(this,n)}}var st=b.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,fontSize:16,color:"#242424",height:30,lineHeight:30},input_style_block:{height:100,lineHeight:20,fontSize:15,borderWidth:1,borderColor:"gray",underlineColorAndroid:"transparent"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{marginTop:10},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{width:200,height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",marginTop:5,marginBottom:5,flexGrow:1,flexShrink:1}}),ut=function(e){f()(o,e);var t,n,r=ct(o);function o(e){var t;return l()(this,o),(t=r.call(this,e)).state={textContent:""},t.changeInputContent=t.changeInputContent.bind(fe()(t)),t.focus=t.focus.bind(fe()(t)),t.blur=t.blur.bind(fe()(t)),t}return s()(o,[{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:"onFocus",value:(n=se()(he.a.mark((function e(){var t;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.isFocused();case 2:t=e.sent,this.setState({event:"onFocus",isFocused:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onBlur",value:(t=se()(he.a.mark((function e(){var t;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.isFocused();case 2:t=e.sent,this.setState({event:"onBlur",isFocused:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"changeBreakStrategy",value:function(e){this.setState({breakStrategy:e})}},{key:"render",value:function(){var e=this,t=this.state,n=t.textContent,r=t.event,o=t.isFocused,a=t.breakStrategy,i=function(e){return g.a.createElement(b.View,{style:st.itemTitle},g.a.createElement(b.Text,null,e))};return g.a.createElement(b.ScrollView,{style:st.container_style},i("text"),g.a.createElement(b.TextInput,{ref:function(t){e.input=t},style:st.input_style,caretColor:"yellow",underlineColorAndroid:"grey",placeholderTextColor:"#4c9afa",placeholder:"text",defaultValue:n,onBlur:function(){return e.onBlur()},onFocus:function(){return e.onFocus()}}),g.a.createElement(b.Text,{style:st.itemContent},"事件: ".concat(r," | isFocused: ").concat(o)),g.a.createElement(b.View,{style:st.button,onClick:this.changeInputContent},g.a.createElement(b.Text,null,"点击改变输入框内容")),g.a.createElement(b.View,{style:st.button,onClick:this.focus},g.a.createElement(b.Text,null,"Focus")),g.a.createElement(b.View,{style:st.button,onClick:this.blur},g.a.createElement(b.Text,null,"Blur")),i("numeric"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"numeric",placeholder:"numeric"}),i("phone-pad"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),i("password"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),i("maxLength"),g.a.createElement(b.TextInput,{caretColor:"yellow",style:st.input_style,placeholder:"maxLength=5",maxLength:5}),"android"===b.Platform.OS&&i("breakStrategy"),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.TextInput,{style:st.input_style_block,breakStrategy:a,defaultValue:"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."}),g.a.createElement(b.Text,{style:{}},"breakStrategy: ".concat(a)),g.a.createElement(b.View,{style:st.buttonBar},g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("simple")}},g.a.createElement(b.Text,{style:st.buttonText},"simple")),g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("high_quality")}},g.a.createElement(b.Text,{style:st.buttonText},"high_quality")),g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("balanced")}},g.a.createElement(b.Text,{style:st.buttonText},"balanced")))))}}]),o}(p.Component),ft=n.p+"assets/defaultSource.jpg",dt=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",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,borderStyle:"solid",padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function ht(){var e=function(e){return g.a.createElement(b.View,{style:dt.itemTitle},g.a.createElement(b.Text,null,e))};return g.a.createElement(b.ScrollView,{style:{paddingHorizontal:10}},e("backgroundColor"),g.a.createElement(b.View,{style:[dt.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),g.a.createElement(b.View,{style:[dt.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:ft}],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"}},g.a.createElement(b.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),g.a.createElement(b.View,{style:[dt.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderStyle:"solid",borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},g.a.createElement(b.Text,{style:{color:"white"}},"渐变色")),e("border props"),g.a.createElement(b.View,{style:[dt.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1,borderStyle:"solid"}]}),e("flex props"),g.a.createElement(b.View,{style:[dt.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"yellow"}]}),g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"blue"}]}),g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"green"}]})))}var mt=b.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderStyle:"solid",borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),yt="SquarePagerView",pt="TrianglePagerView",gt="CirclePagerView";function bt(e,t){var n=function(t){return g.a.createElement(b.View,{style:mt.pageContainer,key:t},g.a.createElement(b.View,{style:[mt.shapeBase,e],key:"shape"}),g.a.createElement(b.View,{style:mt.mainRec,key:"title"},t?g.a.createElement(b.Text,{style:mt.title},t):null))};return n.displayName=t,n}var wt=bt(mt.square,yt),xt=bt(mt.triangle,pt),vt=bt(mt.circle,gt);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 h()(this,n)}}var Et=b.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"}}),Tt=function(e){f()(n,e);var t=St(n);function n(e){var r;return l()(this,n),r=t.call(this,e),$()(fe()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(fe()(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(fe()(r)),r}return s()(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 g.a.createElement(b.View,{style:{flex:1,backgroundColor:"#ffffff"}},g.a.createElement(b.View,{style:Et.buttonContainer},g.a.createElement(b.View,{style:Et.button,onClick:function(){e.viewpager.setPage(2)}},g.a.createElement(b.Text,{style:Et.buttonText},"动效滑到第3页")),g.a.createElement(b.View,{style:Et.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},g.a.createElement(b.Text,{style:Et.buttonText},"直接滑到第1页"))),g.a.createElement(b.ViewPager,{ref:function(t){e.viewpager=t},style:Et.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScrollStateChanged:this.onPageScrollStateChanged,onPageScroll:this.onPageScroll},[wt("squarePager"),xt("TrianglePager"),vt("CirclePager")]),g.a.createElement(b.View,{style:Et.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return g.a.createElement(b.View,{style:[Et.dot,r?Et.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(g.a.Component),At=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{padding:10,flex:1,flexGrow:1,borderRadius:10}});function Ct(){return g.a.createElement(b.View,{style:{paddingHorizontal:10,flex:1}},g.a.createElement(b.View,{style:At.itemTitle},g.a.createElement(b.Text,null,"WebView 示例")),g.a.createElement(b.WebView,{source:{uri:"https://hippyjs.org"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:At.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,n=e.success,r=e.error;return console.log("webview onLoadEnd",t,n,r)}}))}var kt=b.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"}}),Rt=b.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 Vt(){return g.a.createElement(b.View,{style:kt.shadowDemo},"android"===b.Platform.OS?g.a.createElement(b.View,{style:kt.shadowDemoCubeAndroid},g.a.createElement(b.View,{style:kt.shadowDemoContentAndroid},g.a.createElement(b.Text,{style:kt.text},"没有偏移阴影样式"))):g.a.createElement(b.View,{style:kt.shadowDemoCubeIos},g.a.createElement(b.View,{style:kt.shadowDemoContentIos},g.a.createElement(b.Text,{style:kt.text},"没有偏移阴影样式"))),"android"===b.Platform.OS?g.a.createElement(b.View,{style:Rt.shadowDemoCubeAndroid},g.a.createElement(b.View,{style:Rt.shadowDemoContentAndroid},g.a.createElement(b.Text,{style:Rt.text},"偏移阴影样式"))):g.a.createElement(b.View,{style:Rt.shadowDemoCubeIos},g.a.createElement(b.View,{style:Rt.shadowDemoContentIos},g.a.createElement(b.Text,{style:Rt.text},"偏移阴影样式"))))}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 h()(this,n)}}var jt=je.filter((function(e){return 2!==e.style})),Ot=b.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:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),Pt=function(e){f()(a,e);var t,n,r,o=It(a);function a(e){var t;return l()(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(fe()(t)),t.renderItem=t.renderItem.bind(fe()(t)),t.getItemType=t.getItemType.bind(fe()(t)),t.getItemKey=t.getItemKey.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.onRefresh=t.onRefresh.bind(fe()(t)),t.getRefresh=t.getRefresh.bind(fe()(t)),t.renderPullFooter=t.renderPullFooter.bind(fe()(t)),t.renderBanner=t.renderBanner.bind(fe()(t)),t.getItemStyle=t.getItemStyle.bind(fe()(t)),t}return s()(a,[{key:"componentDidMount",value:(r=se()(he.a.mark((function e(){var t;return he.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=se()(he.a.mark((function e(){var t,n,r;return he.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(x()(t),x()(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:g.a.createElement(b.View,{style:Ot.pullFooter},g.a.createElement(b.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=se()(he.a.mark((function e(){var t=this;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(se()(he.a.mark((function e(){var n;return he.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 g.a.createElement(b.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},g.a.createElement(b.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 0===this.state.dataSource.length?null:g.a.createElement(b.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},g.a.createElement(b.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=g.a.createElement(Me,{itemBean:r.itemBean});break;case 2:n=g.a.createElement(Ne,{itemBean:r.itemBean});break;case 5:n=g.a.createElement(qe,{itemBean:r.itemBean})}return g.a.createElement(b.View,{onClick:function(){return t.onItemClick(e)},style:Ot.container},g.a.createElement(b.View,{style:Ot.itemContainer},n),g.a.createElement(b.View,{style:Ot.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(x()(jt),x()(jt));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=b.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 g.a.createElement(b.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},g.a.createElement(b.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(g.a.Component),Dt=n.p+"assets/defaultSource.jpg",_t=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Lt=n.n(_t);function Bt(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 Mt(e){for(var t=1;t0&&void 0!==o[0]&&o[0],e.prev=1,e.next=4,b.UIManagerModule.getBoundingClientRect(n.current,{relToContainer:t});case 4:r=e.sent,u(r),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getBoxPosition error",e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),d=ln(ln({},cn.box),a);return g.a.createElement(b.View,{style:cn.full},g.a.createElement(b.View,{style:cn.demoContent},g.a.createElement(b.View,{ref:n,style:d},g.a.createElement(b.Text,{style:cn.text,numberOfLines:2},"I am the box"))),g.a.createElement(b.View,{style:cn.buttonContainer},g.a.createElement(b.View,{onClick:function(){var n=sn(0,e-100),r=sn(0,t-450),o=sn(80,120);i({left:n,top:r,width:o,height:o})},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Move position")),g.a.createElement(b.View,{onClick:function(){return f(!1)},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Measure in App Window")),g.a.createElement(b.View,{onClick:function(){return f(!0)},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Measure in Container(RootView)"))),g.a.createElement(b.View,{style:cn.row},g.a.createElement(b.View,null,g.a.createElement(b.Text,null,"Box style:"),g.a.createElement(b.Text,{style:cn.black},"Width: ".concat(d.width)),g.a.createElement(b.Text,{style:cn.black},"Height: ".concat(d.height)),g.a.createElement(b.Text,{style:cn.black},"Left: ".concat(d.left)),g.a.createElement(b.Text,{style:cn.black},"Top: ".concat(d.top))),g.a.createElement(b.View,null,g.a.createElement(b.Text,null,"getBoundingClientRect output:"),g.a.createElement(b.Text,{style:cn.black},"Width: ".concat(s.width)),g.a.createElement(b.Text,{style:cn.black},"Height: ".concat(s.height)),g.a.createElement(b.Text,{style:cn.black},"X: ".concat(s.x)),g.a.createElement(b.Text,{style:cn.black},"Y: ".concat(s.y)))))};function fn(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 h()(this,n)}}var dn=b.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"}}),hn=function(e){f()(n,e);var t=fn(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={current:e.current||0},r}return s()(n,[{key:"update",value:function(e){this.state.current!==e&&this.setState({current:e})}},{key:"render",value:function(){for(var e=this.props.count,t=this.state.current,n=[],r=0;r=o||(this.indicator&&this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollView.scrollTo({x:this.imgWidth*e,y:0,animated:!0})}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return g.a.createElement(b.View,{style:wn.container},g.a.createElement(b.ScrollView,{style:wn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return g.a.createElement(b.View,{style:wn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},g.a.createElement(b.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 g.a.createElement(b.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),g.a.createElement(b.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return wt(e);case 1:return vt(e);case 2:return xt(e);default:return null}}}]),n}(g.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 h()(this,n)}}var Sn=b.Dimensions.get("window").width,En=b.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:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Sn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},splitter:{marginTop:50}}),Tn=function(e){f()(n,e);var t=vn(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).demon1Point=g.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r.onTouchDown1=r.onTouchDown1.bind(fe()(r)),r.onDemon1Layout=r.onDemon1Layout.bind(fe()(r)),r.onTouchMove1=r.onTouchMove1.bind(fe()(r)),r.onTouchDown2=r.onTouchDown2.bind(fe()(r)),r.onTouchMove2=r.onTouchMove2.bind(fe()(r)),r}return s()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=b.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.state.demo2Left;return g.a.createElement(b.View,{style:En.setNativePropsDemo},g.a.createElement(b.Text,null,"setNativeProps实现拖动效果"),g.a.createElement(b.View,{style:En.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},g.a.createElement(b.View,{onLayout:this.onDemon1Layout,style:En.nativeDemo1Point,ref:this.demon1Point})),g.a.createElement(b.View,{style:En.splitter}),g.a.createElement(b.Text,null,"普通渲染实现拖动效果"),g.a.createElement(b.View,{style:En.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},g.a.createElement(b.View,{style:[En.nativeDemo2Point,{left:e}]})))}}]),n}(g.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 h()(this,n)}}var Cn=b.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),kn=function(e){f()(r,e);var t=An(r);function r(e){var n;return l()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(fe()(n)),n}return s()(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 g.a.createElement(b.View,{style:Cn.dynamicImportDemo},g.a.createElement(b.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},g.a.createElement(b.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),g.a.createElement(b.View,{style:{marginTop:20}},t?g.a.createElement(t,null):null,n?g.a.createElement(n,null):null))}}]),r}(g.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 h()(this,n)}}var Vn=b.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),In=function(e){f()(n,e);var t=Rn(n);function n(){return l()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=b.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return g.a.createElement(b.View,{style:Vn.LocalizationDemo},g.a.createElement(b.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},g.a.createElement(b.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(g.a.Component),jn=function(){var e=se()(he.a.mark((function e(t){return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),On=function(){return getTurboModule("demoTurbo").getTurboConfig()};function Pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Dn=b.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),_n=function(e){f()(r,e);var t,n=Pn(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(fe()(t)),t.getRenderRow=t.getRenderRow.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t}return s()(r,[{key:"onTurboFunc",value:(t=se()(he.a.mark((function e(t){var n;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,jn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=On(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config||On(),n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=(this.config||On()).getInfo():"setInfo"===t?((this.config||On()).setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return g.a.createElement(b.View,{style:Dn.resultView},g.a.createElement(b.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return g.a.createElement(b.View,{style:Dn.cellContentView},g.a.createElement(b.View,{style:Dn.funcInfo},g.a.createElement(b.Text,{numberofLines:0},"函数名:",n[e])),g.a.createElement(b.Text,{style:Dn.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return g.a.createElement(b.View,{style:Dn.container},this.renderResultView(),g.a.createElement(b.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(g.a.Component);function Ln(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 h()(this,n)}}var Bn=b.StyleSheet.create({demoWrap:{horizontal:!1,flex:1,flexDirection:"column"},banner:{backgroundImage:"https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png",backgroundSize:"cover",height:150,justifyContent:"flex-end"},bannerText:{color:"coral",textAlign:"center"},tabs:{flexDirection:"row",height:30},tabText:{flex:1,textAlign:"center",backgroundColor:"#eee",color:"#999"},tabSelected:{flex:1,textAlign:"center",color:"#4c9afa"},itemEven:{height:40,backgroundColor:"gray"},itemEvenText:{lineHeight:40,color:"white",fontSize:20,textAlign:"center"},itemOdd:{height:40},itemOddText:{lineHeight:40,fontSize:20,textAlign:"center"}}),Mn=function(e){f()(n,e);var t=Ln(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={layoutHeight:0,currentSlide:0},r}return s()(n,[{key:"selectPage",value:function(e){var t;this.setState({currentSlide:e}),null===(t=this.viewPager)||void 0===t||t.setPage(e)}},{key:"render",value:function(){var e=this,t=this.state,n=t.layoutHeight,r=t.currentSlide;return g.a.createElement(b.ScrollView,{style:Bn.demoWrap,scrollEventThrottle:50,onLayout:function(t){return e.setState({layoutHeight:t.layout.height})}},g.a.createElement(b.View,{style:Bn.banner}),g.a.createElement(b.View,{style:Bn.tabs},g.a.createElement(b.Text,{key:"tab1",style:0===r?Bn.tabSelected:Bn.tabText,onClick:function(){return e.selectPage(0)}},"tab 1 (parent first)"),g.a.createElement(b.Text,{key:"tab2",style:1===r?Bn.tabSelected:Bn.tabText,onClick:function(){return e.selectPage(1)}},"tab 2 (self first)")),g.a.createElement(b.ViewPager,{ref:function(t){return e.viewPager=t},initialPage:r,style:{height:n-80},onPageSelected:function(t){return e.setState({currentSlide:t.position})}},g.a.createElement(b.ListView,{nestedScrollTopPriority:"parent",key:"slide1",numberOfRows:30,getRowKey:function(e){return"item".concat(e)},initialListSize:30,renderRow:function(e){return g.a.createElement(b.Text,{style:e%2?Bn.itemEvenText:Bn.itemOddText},"Item ",e)},getRowStyle:function(e){return e%2?Bn.itemEven:Bn.itemOdd}}),g.a.createElement(b.ListView,{nestedScrollTopPriority:"self",key:"slide2",numberOfRows:30,getRowKey:function(e){return"item".concat(e)},initialListSize:30,renderRow:function(e){return g.a.createElement(b.Text,{style:e%2?Bn.itemEvenText:Bn.itemOddText},"Item ",e)},getRowStyle:function(e){return e%2?Bn.itemEven:Bn.itemOdd}})))}}]),n}(g.a.Component);function Fn(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 zn(e){for(var t=1;t=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),A(n),d}},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;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},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/app.jsx":function(e,t,n){"use strict";n.d(t,"a",(function(){return ir}));var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return le})),n.d(r,"ListView",(function(){return ve})),n.d(r,"Modal",(function(){return Ce})),n.d(r,"RefreshWrapper",(function(){return Xe})),n.d(r,"PullHeaderFooter",(function(){return $e})),n.d(r,"ScrollView",(function(){return tt})),n.d(r,"Text",(function(){return lt})),n.d(r,"TextInput",(function(){return ut})),n.d(r,"View",(function(){return ht})),n.d(r,"ViewPager",(function(){return Tt})),n.d(r,"WebView",(function(){return Ct})),n.d(r,"BoxShadow",(function(){return Vt})),n.d(r,"WaterfallView",(function(){return Pt})),n.d(r,"RippleViewAndroid",(function(){return Wt}));var o={};n.r(o),n.d(o,"Animation",(function(){return qt})),n.d(o,"AsyncStorage",(function(){return Xt})),n.d(o,"NetInfo",(function(){return en})),n.d(o,"WebSocket",(function(){return on})),n.d(o,"UIManagerModule",(function(){return un}));var a={};n.r(a),n.d(a,"Slider",(function(){return gn})),n.d(a,"TabHost",(function(){return vn})),n.d(a,"SetNativeProps",(function(){return Tn})),n.d(a,"DynamicImport",(function(){return kn})),n.d(a,"Localization",(function(){return In})),n.d(a,"Turbo",(function(){return Dn})),n.d(a,"NestedScroll",(function(){return Mn}));var i=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),l=n.n(i),c=n("./node_modules/@babel/runtime/helpers/createClass.js"),s=n.n(c),u=n("./node_modules/@babel/runtime/helpers/inherits.js"),f=n.n(u),d=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),h=n.n(d),m=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),p=n.n(m),y=n("./node_modules/react/index.js"),g=n.n(y),b=n("../../packages/hippy-react/dist/index.js"),w=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),v=n.n(w),x=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?T(o,u):".."===f?(T(o,u),s++):s&&(T(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&E(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var C="Invariant failed";function k(e,t){if(!e)throw new Error(C)}function R(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=A(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),y.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(y.entries[y.index]=r,u({action:"REPLACE",location:r}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(e){var t=y.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),F=function(e){var t=Object(P.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 g.a.createElement(F.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}(g.a.Component);var H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;ot?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&b.PixelRatio.get()>=2&&(e=!0),e}},De=(_e.getScreenWidth()-24-12)/3,Le=Math.floor(De/1.35),Be=b.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:Le,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:De,height:Le},title:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Me(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var i=(o=_e.uniqueArray(o)).join(" ");a=g.a.createElement(b.Text,{style:Be.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,Pe()({},e,{style:{collapsable:!1}}),g.a.createElement(b.Text,{style:[Be.title],numberOfLines:2,enableScale:!0},n),g.a.createElement(b.View,{style:Be.imageContainer},g.a.createElement(b.Image,{style:Be.image,source:{uri:r[0]},resizeMode:b.Image.resizeMode.cover}),g.a.createElement(b.Image,{style:[Be.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:b.Image.resizeMode.cover}),g.a.createElement(b.Image,{style:Be.image,source:{uri:r[2]},resizeMode:b.Image.resizeMode.cover})),a?g.a.createElement(b.View,{style:Be.tagLine},a):null)}var Fe=_e.getScreenWidth()-24,ze=Math.floor(Fe-12)/3,He=Math.floor(ze/1.35),We=b.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:He},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ze,height:He},image:{width:ze,height:He},title:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function Ne(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 i=(a=_e.uniqueArray(a)).join(" ");n=g.a.createElement(b.Text,{style:We.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,Pe()({},e,{style:We.container}),g.a.createElement(b.View,{style:We.leftContainer},g.a.createElement(b.Text,{style:We.title,numberOfLines:2,enableScale:!0},r),n?g.a.createElement(b.View,{style:We.tagLine},n):null),g.a.createElement(b.View,{style:We.imageContainer},g.a.createElement(b.Image,{resizeMode:b.Image.resizeMode.cover,style:We.image,source:{uri:o}})))}var Ue=_e.getScreenWidth()-24,Ke=Math.floor(188*Ue/336),Ge=b.StyleSheet.create({text:{fontSize:"android"===b.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Ue,height:Ke,alignSelf:"center"},image:{width:Ue,height:Ke},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function qe(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var i=(o=_e.uniqueArray(o)).join(" ");a=g.a.createElement(b.Text,{style:Ge.normalText,numberOfLines:1},i)}return g.a.createElement(b.View,e,g.a.createElement(b.Text,{style:Ge.text,numberOfLines:2,enableScale:!0},n),g.a.createElement(b.View,{style:Ge.playerView},g.a.createElement(b.Image,{style:Ge.image,source:{uri:r},resizeMode:b.Image.resizeMode.cover})),a?g.a.createElement(b.View,{style:Ge.tagLine},a):null)}function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ye=b.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Xe=function(e){f()(o,e);var t,n,r=Qe(o);function o(e){var t;return l()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(fe()(t)),t.onRefresh=t.onRefresh.bind(fe()(t)),t.getRefresh=t.getRefresh.bind(fe()(t)),t.getRenderRow=t.getRenderRow.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.getRowType=t.getRowType.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t}return s()(o,[{key:"componentDidMount",value:(n=se()(he.a.mark((function e(){var t;return he.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=se()(he.a.mark((function e(){var t,n,r,o,a;return he.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(se()(he.a.mark((function t(){var n;return he.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,i=r[e],l=r.length===e+1;switch(i.style){case 1:a=g.a.createElement(Me,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=g.a.createElement(Ne,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=g.a.createElement(qe,{itemBean:i.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=g.a.createElement(b.Text,{style:Ye.loading},o)}return g.a.createElement(b.View,{style:Ye.container},g.a.createElement(b.View,{style:Ye.itemContainer},a),l?null:g.a.createElement(b.View,{style:Ye.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 g.a.createElement(b.View,{style:{flex:1,height:30}},g.a.createElement(b.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(je)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return g.a.createElement(b.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},g.a.createElement(b.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(g.a.Component);function Je(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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ze=b.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:{flex:1,height:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{height:40,flex:1,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),$e=function(e){f()(a,e);var t,n,r,o=Je(a);function a(e){var t;return l()(this,a),(t=o.call(this,e)).state={dataSource:[],headerRefreshText:"继续下拉触发刷新",footerRefreshText:"正在加载...",horizontal:void 0},t.loadMoreDataFlag=!1,t.fetchingDataFlag=!1,t.mockFetchData=t.mockFetchData.bind(fe()(t)),t.renderRow=t.renderRow.bind(fe()(t)),t.getRowType=t.getRowType.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t.getHeaderStyle=t.getHeaderStyle.bind(fe()(t)),t.getFooterStyle=t.getFooterStyle.bind(fe()(t)),t.getRowStyle=t.getRowStyle.bind(fe()(t)),t.renderPullHeader=t.renderPullHeader.bind(fe()(t)),t.renderPullFooter=t.renderPullFooter.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(fe()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(fe()(t)),t.onFooterPulling=t.onFooterPulling.bind(fe()(t)),t}return s()(a,[{key:"componentDidMount",value:(r=se()(he.a.mark((function e(){var t;return he.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:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){return e(je)}),800)}))}},{key:"onEndReached",value:(n=se()(he.a.mark((function e(){var t,n,r;return he.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({footerRefreshText:"加载更多..."}),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({footerRefreshText:"没有更多数据"}),r=[].concat(v()(t),v()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1,this.listView.collapsePullFooter();case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=se()(he.a.mark((function e(){var t,n=this;return he.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({headerRefreshText:"刷新数据中,请稍等"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=(t=e.sent).reverse(),e.next=15;break;case 13:e.prev=13,e.t0=e.catch(6);case 15:this.fetchingDataFlag=!1,this.setState({dataSource:t,headerRefreshText:"2秒后收起"},(function(){n.listView.collapsePullHeader({time:2e3})}));case 17:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Ze.pullContent.height?this.setState({headerRefreshText:"松手,即可触发刷新"}):this.setState({headerRefreshText:"继续下拉,触发刷新"}))}},{key:"onFooterPulling",value:function(e){console.log("onFooterPulling",e)}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getHeaderStyle",value:function(){return this.state.horizontal?{width:50}:{}}},{key:"renderPullHeader",value:function(){var e=this.state,t=e.headerRefreshText;return e.horizontal?g.a.createElement(b.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{lineHeight:25,color:"white",width:40,paddingHorizontal:15}},t)):g.a.createElement(b.View,{style:Ze.pullContainer},g.a.createElement(b.Text,{style:Ze.pullContent},t))}},{key:"getFooterStyle",value:function(){return this.state.horizontal?{width:40}:{}}},{key:"renderPullFooter",value:function(){return this.state.horizontal?g.a.createElement(b.View,{style:{width:40,height:300,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{color:"white",lineHeight:25,width:40,paddingHorizontal:15}},this.state.footerRefreshText)):g.a.createElement(b.View,{style:Ze.pullFooter},g.a.createElement(b.Text,{style:{color:"white"}},this.state.footerRefreshText))}},{key:"renderRow",value:function(e){var t=this,n=this.state.dataSource,r=null,o=n[e],a=n.length===e+1;switch(o.style){case 1:r=g.a.createElement(Me,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:r=g.a.createElement(Ne,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:r=g.a.createElement(qe,{itemBean:o.itemBean,onClick:function(n){return t.onClickItem(e,n)}})}return g.a.createElement(b.View,{style:Ze.container},g.a.createElement(b.View,{style:Ze.itemContainer},r),a?null:g.a.createElement(b.View,{style:Ze.splitter}))}},{key:"getRowStyle",value:function(){return this.state.horizontal?{height:300,justifyContent:"center",alignItems:"center"}:{}}},{key:"changeDirection",value:function(){this.setState({horizontal:void 0===this.state.horizontal||void 0})}},{key:"render",value:function(){var e=this,t=this.state,n=t.dataSource,r=t.horizontal;return g.a.createElement(b.View,{style:{flex:1,collapsable:!1}},g.a.createElement(b.ListView,{horizontal:r,onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:[{backgroundColor:"#ffffff"},r?{height:300}:{flex:1}],numberOfRows:n.length,getRowType:this.getRowType,getRowKey:this.getRowKey,getHeaderStyle:this.getHeaderStyle,getFooterStyle:this.getFooterStyle,getRowStyle:this.getRowStyle,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,renderPullFooter:this.renderPullFooter,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling,onFooterReleased:this.onEndReached,onFooterPulling:this.onFooterPulling,rowShouldSticky:function(e){return 0===e}}),"android"===b.Platform.OS?g.a.createElement(b.View,{onClick:function(){return e.changeDirection()},style:{position:"absolute",right:20,bottom:20,width:67,height:67,borderRadius:30,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:3,boxShadowOffsetY:3,boxShadowColor:"#4c9afa"}},g.a.createElement(b.View,{style:{width:60,height:60,borderRadius:30,backgroundColor:"#4c9afa",display:"flex",justifyContent:"center",alignItems:"center"}},g.a.createElement(b.Text,{style:{color:"white"}},"切换方向"))):null)}}]),a}(g.a.Component),et=b.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderStyle:"solid",borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1,borderStyle:"solid"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function tt(){return g.a.createElement(b.ScrollView,null,g.a.createElement(b.View,{style:et.itemTitle},g.a.createElement(b.Text,null,"Horizontal ScrollView")),g.a.createElement(b.View,null,g.a.createElement(b.ScrollView,{horizontal:!0,bounces:!0,showsHorizontalScrollIndicator:!1,showScrollIndicator:!1,onScroll:function(e){return console.log("onScroll",e)},onMomentumScrollBegin:function(e){return console.log("onMomentumScrollBegin",e)},onMomentumScrollEnd:function(e){return console.log("onMomentumScrollEnd",e)},onScrollBeginDrag:function(e){return console.log("onScrollBeginDrag",e)},onScrollEndDrag:function(e){return console.log("onScrollEndDrag",e)}},g.a.createElement(b.Text,{style:et.itemStyle},"A"),g.a.createElement(b.Text,{style:et.itemStyle},"B"),g.a.createElement(b.Text,{style:et.itemStyle},"C"),g.a.createElement(b.Text,{style:et.itemStyle},"D"),g.a.createElement(b.Text,{style:et.itemStyle},"E"),g.a.createElement(b.Text,{style:et.itemStyle},"F"),g.a.createElement(b.Text,{style:et.itemStyle},"A"))),g.a.createElement(b.View,{style:et.itemTitle},g.a.createElement(b.Text,null,"Vertical ScrollView")),g.a.createElement(b.ScrollView,{bounces:!0,horizontal:!1,style:et.verticalScrollView,showScrollIndicator:!1,showsVerticalScrollIndicator:!1},g.a.createElement(b.Text,{style:et.itemStyle},"A"),g.a.createElement(b.Text,{style:et.itemStyle},"B"),g.a.createElement(b.Text,{style:et.itemStyle},"C"),g.a.createElement(b.Text,{style:et.itemStyle},"D"),g.a.createElement(b.Text,{style:et.itemStyle},"E"),g.a.createElement(b.Text,{style:et.itemStyle},"F"),g.a.createElement(b.Text,{style:et.itemStyle},"A")))}function nt(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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var rt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEXRSTlMA9QlZEMPc2Mmmj2VkLEJ4Rsx+pEgAAAChSURBVCjPjVLtEsMgCDOAdbbaNu//sttVPes+zvGD8wgQCLp/TORbUGMAQtQ3UBeSAMlF7/GV9Cmb5eTJ9R7H1t4bOqLE3rN2UCvvwpLfarhILfDjJL6WRKaXfzxc84nxAgLzCGSGiwKwsZUB8hPorZwUV1s1cnGKw+yAOrnI+7hatNIybl9Q3OkBfzopCw6SmDVJJiJ+yD451OS0/TNM7QnuAAbvCG0TSAAAAABJRU5ErkJggg==",ot="https://user-images.githubusercontent.com/12878546/148736255-7193f89e-9caf-49c0-86b0-548209506bd6.gif",at=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",borderWidth:1,borderStyle:"solid",borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",flexGrow:1,flexShrink:1},buttonText:{lineHeight:24,textAlign:"center",paddingHorizontal:20},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),it=0,lt=function(e){f()(n,e);var t=nt(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1},numberOfLines:2,ellipsizeMode:void 0},r.incrementFontSize=r.incrementFontSize.bind(fe()(r)),r.decrementFontSize=r.decrementFontSize.bind(fe()(r)),r.incrementLine=r.incrementLine.bind(fe()(r)),r.decrementLine=r.decrementLine.bind(fe()(r)),r.changeMode=r.changeMode.bind(fe()(r)),r}return s()(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:"incrementLine",value:function(){var e=this.state.numberOfLines;e<6&&this.setState({numberOfLines:e+1})}},{key:"decrementLine",value:function(){var e=this.state.numberOfLines;e>1&&this.setState({numberOfLines:e-1})}},{key:"changeMode",value:function(e){this.setState({ellipsizeMode:e})}},{key:"changeBreakStrategy",value:function(e){this.setState({breakStrategy:e})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=t.numberOfLines,i=t.ellipsizeMode,l=t.breakStrategy,c=function(e){return g.a.createElement(b.View,{style:at.itemTitle},g.a.createElement(b.Text,{style:!0},e))};return g.a.createElement(b.ScrollView,{style:{paddingHorizontal:10}},c("shadow"),g.a.createElement(b.View,{style:[at.itemContent,{height:60}],onClick:function(){var t="red",n={x:10,y:1};it%2==1&&(t="grey",n={x:1,y:1}),it+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},g.a.createElement(b.Text,{style:[at.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),c("color"),g.a.createElement(b.View,{style:[at.itemContent,{height:80}]},g.a.createElement(b.Text,{style:[at.normalText,{color:"#242424"}]},"Text color is black"),g.a.createElement(b.Text,{style:[at.normalText,{color:"blue"}]},"Text color is blue"),g.a.createElement(b.Text,{style:[at.normalText,{color:"rgb(228,61,36)"}]},"This is red")),c("fontSize"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{style:[at.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),g.a.createElement(b.View,{style:at.button,onClick:this.incrementFontSize},g.a.createElement(b.Text,{style:at.buttonText},"放大字体")),g.a.createElement(b.View,{style:at.button,onClick:this.decrementFontSize},g.a.createElement(b.Text,{style:at.buttonText},"缩小字体"))),c("fontStyle"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{style:[at.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),g.a.createElement(b.Text,{style:[at.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),c("numberOfLines and ellipsizeMode"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[at.normalText,{marginBottom:10}]},"numberOfLines=".concat(a," | ellipsizeMode=").concat(i)),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Text,{style:{fontSize:19,color:"white"}},"先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。"),g.a.createElement(b.Text,null,"然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。")),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{backgroundColor:"#4c9afa",marginBottom:10,color:"white",paddingHorizontal:10,paddingVertical:5}]},"line 1\n\nline 3\n\nline 5"),g.a.createElement(b.Text,{numberOfLines:a,ellipsizeMode:i,style:[at.normalText,{lineHeight:void 0,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5,verticalAlign:"middle"}]},g.a.createElement(b.Image,{style:{width:24,height:24},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAANlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3dmhyAAAAEnRSTlMA/QpX7WQU2m27pi3Ej9KEQXaD5HhjAAAAqklEQVQoz41SWxLDIAh0RcFXTHL/yzZSO01LMpP9WJEVUNA9gfdXTioCSKE/kQQTQmf/ArRYva+xAcuPP37seFII2L7FN4BmXdHzlEPIpDHiZ0A7eIViPcw2QwqipkvMSdNEFBUE1bmMNOyE7FyFaIkAP4jHhhG80lvgkzBODTKpwhRMcexuR7fXzcp08UDq6GRbootp4oRtO3NNpd4NKtnR9hB6oaefweIFQU0EfnGDRoQAAAAASUVORK5CYII="}}),g.a.createElement(b.Text,null,"Text + Attachment")),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:this.incrementLine},g.a.createElement(b.Text,{style:at.buttonText},"加一行")),g.a.createElement(b.View,{style:at.button,onClick:this.decrementLine},g.a.createElement(b.Text,{style:at.buttonText},"减一行"))),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("clip")}},g.a.createElement(b.Text,{style:at.buttonText},"clip")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("head")}},g.a.createElement(b.Text,{style:at.buttonText},"head")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("middle")}},g.a.createElement(b.Text,{style:at.buttonText},"middle")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeMode("tail")}},g.a.createElement(b.Text,{style:at.buttonText},"tail")))),c("textDecoration"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),c("LetterSpacing"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{letterSpacing:-1}]},"Text width letter-spacing -1"),g.a.createElement(b.Text,{numberOfLines:1,style:[at.normalText,{letterSpacing:5}]},"Text width letter-spacing 5")),c("Nest Text"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:3},g.a.createElement(b.Text,{numberOfLines:3,style:[at.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),g.a.createElement(b.Text,{numberOfLines:3,style:at.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),c("Custom font"),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:at.customFont},"Hippy 跨端框架")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontWeight:"bold"}]},"Hippy 跨端框架 粗体")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontStyle:"italic"}]},"Hippy 跨端框架 斜体")),g.a.createElement(b.View,{style:[at.itemContent,{height:100}]},g.a.createElement(b.Text,{numberOfLines:1,style:[at.customFont,{fontWeight:"bold",fontStyle:"italic"}]},"Hippy 跨端框架 粗斜体")),c("Text Nested"),g.a.createElement(b.View,{style:[at.itemContent,{height:150}]},g.a.createElement(b.Text,{style:{height:100,lineHeight:50}},g.a.createElement(b.Text,{numberOfLines:1,style:at.normalText},"后面有张图片"),g.a.createElement(b.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"}}),g.a.createElement(b.Text,{numberOfLines:1,style:at.customFont},"前面有张图片")),g.a.createElement(b.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingHorizontal:10,paddingVertical:5,backgroundColor:"#4c9afa"}},g.a.createElement(b.Image,{style:{width:24,height:24,alignSelf:"center"},source:{uri:rt}}),g.a.createElement(b.Text,{style:{fontSize:15,alignItems:"center",justifyContent:"center"}},"Image+Text"))),"android"===b.Platform.OS&&c("breakStrategy"),"android"===b.Platform.OS&&g.a.createElement(b.View,{style:at.itemContent},g.a.createElement(b.Text,{style:[at.normalText,{borderWidth:1,borderColor:"gray"}],breakStrategy:l},"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."),g.a.createElement(b.Text,{style:at.normalText},"breakStrategy: ".concat(l)),g.a.createElement(b.View,{style:at.buttonBar},g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("simple")}},g.a.createElement(b.Text,{style:at.buttonText},"simple")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("high_quality")}},g.a.createElement(b.Text,{style:at.buttonText},"high_quality")),g.a.createElement(b.View,{style:at.button,onClick:function(){return e.changeBreakStrategy("balanced")}},g.a.createElement(b.Text,{style:at.buttonText},"balanced")))),c("verticalAlign"),g.a.createElement(b.View,{style:[at.itemContent,{height:"android"===b.Platform.OS?160:70}]},g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlign:"middle"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlign:"baseline"},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlign:"bottom"},source:{uri:ot}}),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"top"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"middle"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"baseline"}},"字"),g.a.createElement(b.Text,{style:{fontSize:16,verticalAlign:"bottom"}},"字")),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:0},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:18,height:12,verticalAlignment:1},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:12,verticalAlignment:2},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:36,height:24,verticalAlignment:3},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,top:-10},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:18,height:12,top:-5},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:24,height:12},source:{uri:ot}}),g.a.createElement(b.Image,{style:{width:36,height:24,top:3},source:{uri:ot}}),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字"),g.a.createElement(b.Text,{style:{fontSize:16}},"字")))),c("tintColor & backgroundColor"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:30,backgroundColor:"#4c9afa",paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",tintColor:"orange",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Text,{style:{verticalAlign:"middle",backgroundColor:"#090"}},"text")),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:30,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,tintColor:"orange"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,tintColor:"orange",backgroundColor:"#ccc"},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,backgroundColor:"#ccc"},source:{uri:rt}})))),c("margin"),g.a.createElement(b.View,{style:[at.itemContent]},g.a.createElement(b.Text,{style:[{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"top",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"middle",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"baseline",backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlign:"bottom",backgroundColor:"#ccc",margin:5},source:{uri:rt}})),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.Text,null,"legacy mode:"),g.a.createElement(b.Text,{style:[at.normalText,{lineHeight:50,backgroundColor:"#4c9afa",marginBottom:10,paddingHorizontal:10,paddingVertical:5}]},g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:0,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:1,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:2,backgroundColor:"#ccc",margin:5},source:{uri:rt}}),g.a.createElement(b.Image,{style:{width:24,height:24,verticalAlignment:3,backgroundColor:"#ccc",margin:5},source:{uri:rt}})))))}}]),n}(g.a.Component);function ct(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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var st=b.StyleSheet.create({container_style:{paddingHorizontal:10},input_style:{width:300,marginVertical:10,fontSize:16,color:"#242424",height:30,lineHeight:30},input_style_block:{height:100,lineHeight:20,fontSize:15,borderWidth:1,borderColor:"gray",underlineColorAndroid:"transparent"},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{marginTop:10},buttonBar:{flexDirection:"row",marginTop:10,flexGrow:1},button:{width:200,height:24,borderColor:"#4c9afa",borderWidth:1,borderStyle:"solid",marginTop:5,marginBottom:5,flexGrow:1,flexShrink:1}}),ut=function(e){f()(o,e);var t,n,r=ct(o);function o(e){var t;return l()(this,o),(t=r.call(this,e)).state={textContent:""},t.changeInputContent=t.changeInputContent.bind(fe()(t)),t.focus=t.focus.bind(fe()(t)),t.blur=t.blur.bind(fe()(t)),t}return s()(o,[{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:"onFocus",value:(n=se()(he.a.mark((function e(){var t;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.isFocused();case 2:t=e.sent,this.setState({event:"onFocus",isFocused:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onBlur",value:(t=se()(he.a.mark((function e(){var t;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.isFocused();case 2:t=e.sent,this.setState({event:"onBlur",isFocused:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"changeBreakStrategy",value:function(e){this.setState({breakStrategy:e})}},{key:"render",value:function(){var e=this,t=this.state,n=t.textContent,r=t.event,o=t.isFocused,a=t.breakStrategy,i=function(e){return g.a.createElement(b.View,{style:st.itemTitle},g.a.createElement(b.Text,null,e))};return g.a.createElement(b.ScrollView,{style:st.container_style},i("text"),g.a.createElement(b.TextInput,{ref:function(t){e.input=t},style:st.input_style,caretColor:"yellow",underlineColorAndroid:"grey",placeholderTextColor:"#4c9afa",placeholder:"text",defaultValue:n,onBlur:function(){return e.onBlur()},onFocus:function(){return e.onFocus()}}),g.a.createElement(b.Text,{style:st.itemContent},"事件: ".concat(r," | isFocused: ").concat(o)),g.a.createElement(b.View,{style:st.button,onClick:this.changeInputContent},g.a.createElement(b.Text,null,"点击改变输入框内容")),g.a.createElement(b.View,{style:st.button,onClick:this.focus},g.a.createElement(b.Text,null,"Focus")),g.a.createElement(b.View,{style:st.button,onClick:this.blur},g.a.createElement(b.Text,null,"Blur")),i("numeric"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"numeric",placeholder:"numeric"}),i("phone-pad"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),i("password"),g.a.createElement(b.TextInput,{style:st.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),i("maxLength"),g.a.createElement(b.TextInput,{caretColor:"yellow",style:st.input_style,placeholder:"maxLength=5",maxLength:5}),"android"===b.Platform.OS&&i("breakStrategy"),"android"===b.Platform.OS&&g.a.createElement(g.a.Fragment,null,g.a.createElement(b.TextInput,{style:st.input_style_block,breakStrategy:a,defaultValue:"The 58-letter name Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch is the name of a town on Anglesey, an island of Wales."}),g.a.createElement(b.Text,{style:{}},"breakStrategy: ".concat(a)),g.a.createElement(b.View,{style:st.buttonBar},g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("simple")}},g.a.createElement(b.Text,{style:st.buttonText},"simple")),g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("high_quality")}},g.a.createElement(b.Text,{style:st.buttonText},"high_quality")),g.a.createElement(b.View,{style:st.button,onClick:function(){return e.changeBreakStrategy("balanced")}},g.a.createElement(b.Text,{style:st.buttonText},"balanced")))))}}]),o}(y.Component),ft=n.p+"assets/defaultSource.jpg",dt=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",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,borderStyle:"solid",padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function ht(){var e=function(e){return g.a.createElement(b.View,{style:dt.itemTitle},g.a.createElement(b.Text,null,e))};return g.a.createElement(b.ScrollView,{style:{paddingHorizontal:10}},e("backgroundColor"),g.a.createElement(b.View,{style:[dt.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),g.a.createElement(b.View,{style:[dt.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:ft}],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"}},g.a.createElement(b.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),g.a.createElement(b.View,{style:[dt.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderStyle:"solid",borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},g.a.createElement(b.Text,{style:{color:"white"}},"渐变色")),e("border props"),g.a.createElement(b.View,{style:[dt.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1,borderStyle:"solid"}]}),e("flex props"),g.a.createElement(b.View,{style:[dt.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"yellow"}]}),g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"blue"}]}),g.a.createElement(b.View,{style:[dt.smallRectangle,{backgroundColor:"green"}]})))}var mt=b.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderStyle:"solid",borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),pt="SquarePagerView",yt="TrianglePagerView",gt="CirclePagerView";function bt(e,t){var n=function(t){return g.a.createElement(b.View,{style:mt.pageContainer,key:t},g.a.createElement(b.View,{style:[mt.shapeBase,e],key:"shape"}),g.a.createElement(b.View,{style:mt.mainRec,key:"title"},t?g.a.createElement(b.Text,{style:mt.title},t):null))};return n.displayName=t,n}var wt=bt(mt.square,pt),vt=bt(mt.triangle,yt),xt=bt(mt.circle,gt);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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Et=b.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"}}),Tt=function(e){f()(n,e);var t=St(n);function n(e){var r;return l()(this,n),r=t.call(this,e),$()(fe()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(fe()(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(fe()(r)),r}return s()(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 g.a.createElement(b.View,{style:{flex:1,backgroundColor:"#ffffff"}},g.a.createElement(b.View,{style:Et.buttonContainer},g.a.createElement(b.View,{style:Et.button,onClick:function(){e.viewpager.setPage(2)}},g.a.createElement(b.Text,{style:Et.buttonText},"动效滑到第3页")),g.a.createElement(b.View,{style:Et.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},g.a.createElement(b.Text,{style:Et.buttonText},"直接滑到第1页"))),g.a.createElement(b.ViewPager,{ref:function(t){e.viewpager=t},style:Et.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScrollStateChanged:this.onPageScrollStateChanged,onPageScroll:this.onPageScroll},[wt("squarePager"),vt("TrianglePager"),xt("CirclePager")]),g.a.createElement(b.View,{style:Et.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return g.a.createElement(b.View,{style:[Et.dot,r?Et.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(g.a.Component),At=b.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderStyle:"solid",borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{padding:10,flex:1,flexGrow:1,borderRadius:10}});function Ct(){return g.a.createElement(b.View,{style:{paddingHorizontal:10,flex:1}},g.a.createElement(b.View,{style:At.itemTitle},g.a.createElement(b.Text,null,"WebView 示例")),g.a.createElement(b.WebView,{source:{uri:"https://hippyjs.org"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:At.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,n=e.success,r=e.error;return console.log("webview onLoadEnd",t,n,r)}}))}var kt=b.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"}}),Rt=b.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 Vt(){return g.a.createElement(b.View,{style:kt.shadowDemo},"android"===b.Platform.OS?g.a.createElement(b.View,{style:kt.shadowDemoCubeAndroid},g.a.createElement(b.View,{style:kt.shadowDemoContentAndroid},g.a.createElement(b.Text,{style:kt.text},"没有偏移阴影样式"))):g.a.createElement(b.View,{style:kt.shadowDemoCubeIos},g.a.createElement(b.View,{style:kt.shadowDemoContentIos},g.a.createElement(b.Text,{style:kt.text},"没有偏移阴影样式"))),"android"===b.Platform.OS?g.a.createElement(b.View,{style:Rt.shadowDemoCubeAndroid},g.a.createElement(b.View,{style:Rt.shadowDemoContentAndroid},g.a.createElement(b.Text,{style:Rt.text},"偏移阴影样式"))):g.a.createElement(b.View,{style:Rt.shadowDemoCubeIos},g.a.createElement(b.View,{style:Rt.shadowDemoContentIos},g.a.createElement(b.Text,{style:Rt.text},"偏移阴影样式"))))}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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var jt=je.filter((function(e){return 2!==e.style})),Ot=b.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:50,backgroundColor:"#4c9afa"},pullContent:{lineHeight:50,color:"white",height:50,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),Pt=function(e){f()(a,e);var t,n,r,o=It(a);function a(e){var t;return l()(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(fe()(t)),t.renderItem=t.renderItem.bind(fe()(t)),t.getItemType=t.getItemType.bind(fe()(t)),t.getItemKey=t.getItemKey.bind(fe()(t)),t.onEndReached=t.onEndReached.bind(fe()(t)),t.onRefresh=t.onRefresh.bind(fe()(t)),t.getRefresh=t.getRefresh.bind(fe()(t)),t.renderPullFooter=t.renderPullFooter.bind(fe()(t)),t.renderBanner=t.renderBanner.bind(fe()(t)),t.getItemStyle=t.getItemStyle.bind(fe()(t)),t}return s()(a,[{key:"componentDidMount",value:(r=se()(he.a.mark((function e(){var t;return he.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=se()(he.a.mark((function e(){var t,n,r;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:0===n.length&&this.setState({loadingState:"没有更多数据"}),r=[].concat(v()(t),v()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1;case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"renderPullFooter",value:function(){return 0===this.state.dataSource.length?null:g.a.createElement(b.View,{style:Ot.pullFooter},g.a.createElement(b.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=se()(he.a.mark((function e(){var t=this;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(se()(he.a.mark((function e(){var n;return he.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 g.a.createElement(b.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},g.a.createElement(b.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 0===this.state.dataSource.length?null:g.a.createElement(b.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},g.a.createElement(b.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=g.a.createElement(Me,{itemBean:r.itemBean});break;case 2:n=g.a.createElement(Ne,{itemBean:r.itemBean});break;case 5:n=g.a.createElement(qe,{itemBean:r.itemBean})}return g.a.createElement(b.View,{onClick:function(){return t.onItemClick(e)},style:Ot.container},g.a.createElement(b.View,{style:Ot.itemContainer},n),g.a.createElement(b.View,{style:Ot.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(v()(jt),v()(jt));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=b.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 g.a.createElement(b.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},g.a.createElement(b.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(g.a.Component),_t=n.p+"assets/defaultSource.jpg",Dt=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Lt=n.n(Dt);function Bt(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 Mt(e){for(var t=1;t0&&void 0!==o[0]&&o[0],e.prev=1,e.next=4,b.UIManagerModule.getBoundingClientRect(n.current,{relToContainer:t});case 4:r=e.sent,u(r),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("getBoxPosition error",e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),d=ln(ln({},cn.box),a);return g.a.createElement(b.View,{style:cn.full},g.a.createElement(b.View,{style:cn.demoContent},g.a.createElement(b.View,{ref:n,style:d},g.a.createElement(b.Text,{style:cn.text,numberOfLines:2},"I am the box"))),g.a.createElement(b.View,{style:cn.buttonContainer},g.a.createElement(b.View,{onClick:function(){var n=sn(0,e-100),r=sn(0,t-450),o=sn(80,120);i({left:n,top:r,width:o,height:o})},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Move position")),g.a.createElement(b.View,{onClick:function(){return f(!1)},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Measure in App Window")),g.a.createElement(b.View,{onClick:function(){return f(!0)},style:cn.button},g.a.createElement(b.Text,{style:cn.buttonText},"Measure in Container(RootView)"))),g.a.createElement(b.View,{style:cn.row},g.a.createElement(b.View,null,g.a.createElement(b.Text,null,"Box style:"),g.a.createElement(b.Text,{style:cn.black},"Width: ".concat(d.width)),g.a.createElement(b.Text,{style:cn.black},"Height: ".concat(d.height)),g.a.createElement(b.Text,{style:cn.black},"Left: ".concat(d.left)),g.a.createElement(b.Text,{style:cn.black},"Top: ".concat(d.top))),g.a.createElement(b.View,null,g.a.createElement(b.Text,null,"getBoundingClientRect output:"),g.a.createElement(b.Text,{style:cn.black},"Width: ".concat(s.width)),g.a.createElement(b.Text,{style:cn.black},"Height: ".concat(s.height)),g.a.createElement(b.Text,{style:cn.black},"X: ".concat(s.x)),g.a.createElement(b.Text,{style:cn.black},"Y: ".concat(s.y)))))};function fn(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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var dn=b.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"}}),hn=function(e){f()(n,e);var t=fn(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={current:e.current||0},r}return s()(n,[{key:"update",value:function(e){this.state.current!==e&&this.setState({current:e})}},{key:"render",value:function(){for(var e=this.props.count,t=this.state.current,n=[],r=0;r=o||(this.indicator&&this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollView.scrollTo({x:this.imgWidth*e,y:0,animated:!0})}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return g.a.createElement(b.View,{style:wn.container},g.a.createElement(b.ScrollView,{style:wn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return g.a.createElement(b.View,{style:wn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},g.a.createElement(b.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 g.a.createElement(b.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),g.a.createElement(b.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return wt(e);case 1:return xt(e);case 2:return vt(e);default:return null}}}]),n}(g.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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Sn=b.Dimensions.get("window").width,En=b.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:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:Sn,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},splitter:{marginTop:50}}),Tn=function(e){f()(n,e);var t=xn(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).demon1Point=g.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r.onTouchDown1=r.onTouchDown1.bind(fe()(r)),r.onDemon1Layout=r.onDemon1Layout.bind(fe()(r)),r.onTouchMove1=r.onTouchMove1.bind(fe()(r)),r.onTouchDown2=r.onTouchDown2.bind(fe()(r)),r.onTouchMove2=r.onTouchMove2.bind(fe()(r)),r}return s()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=b.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.state.demo2Left;return g.a.createElement(b.View,{style:En.setNativePropsDemo},g.a.createElement(b.Text,null,"setNativeProps实现拖动效果"),g.a.createElement(b.View,{style:En.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},g.a.createElement(b.View,{onLayout:this.onDemon1Layout,style:En.nativeDemo1Point,ref:this.demon1Point})),g.a.createElement(b.View,{style:En.splitter}),g.a.createElement(b.Text,null,"普通渲染实现拖动效果"),g.a.createElement(b.View,{style:En.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},g.a.createElement(b.View,{style:[En.nativeDemo2Point,{left:e}]})))}}]),n}(g.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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Cn=b.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),kn=function(e){f()(r,e);var t=An(r);function r(e){var n;return l()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(fe()(n)),n}return s()(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 g.a.createElement(b.View,{style:Cn.dynamicImportDemo},g.a.createElement(b.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},g.a.createElement(b.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),g.a.createElement(b.View,{style:{marginTop:20}},t?g.a.createElement(t,null):null,n?g.a.createElement(n,null):null))}}]),r}(g.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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Vn=b.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),In=function(e){f()(n,e);var t=Rn(n);function n(){return l()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=b.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return g.a.createElement(b.View,{style:Vn.LocalizationDemo},g.a.createElement(b.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},g.a.createElement(b.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(g.a.Component),jn=function(){var e=se()(he.a.mark((function e(t){return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),On=function(){return getTurboModule("demoTurbo").getTurboConfig()};function Pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var _n=b.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),Dn=function(e){f()(r,e);var t,n=Pn(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(fe()(t)),t.getRenderRow=t.getRenderRow.bind(fe()(t)),t.getRowKey=t.getRowKey.bind(fe()(t)),t}return s()(r,[{key:"onTurboFunc",value:(t=se()(he.a.mark((function e(t){var n;return he.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,jn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=On(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config||On(),n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=(this.config||On()).getInfo():"setInfo"===t?((this.config||On()).setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return g.a.createElement(b.View,{style:_n.resultView},g.a.createElement(b.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return g.a.createElement(b.View,{style:_n.cellContentView},g.a.createElement(b.View,{style:_n.funcInfo},g.a.createElement(b.Text,{numberofLines:0},"函数名:",n[e])),g.a.createElement(b.Text,{style:_n.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return g.a.createElement(b.View,{style:_n.container},this.renderResultView(),g.a.createElement(b.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(g.a.Component);function Ln(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=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Bn=b.StyleSheet.create({demoWrap:{horizontal:!1,flex:1,flexDirection:"column"},banner:{backgroundImage:"https://user-images.githubusercontent.com/12878546/148736102-7cd9525b-aceb-41c6-a905-d3156219ef16.png",backgroundSize:"cover",height:150,justifyContent:"flex-end"},bannerText:{color:"coral",textAlign:"center"},tabs:{flexDirection:"row",height:30},tabText:{flex:1,textAlign:"center",backgroundColor:"#eee",color:"#999"},tabSelected:{flex:1,textAlign:"center",color:"#4c9afa"},itemEven:{height:40,backgroundColor:"gray"},itemEvenText:{lineHeight:40,color:"white",fontSize:20,textAlign:"center"},itemOdd:{height:40},itemOddText:{lineHeight:40,fontSize:20,textAlign:"center"}}),Mn=function(e){f()(n,e);var t=Ln(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={layoutHeight:0,currentSlide:0},r}return s()(n,[{key:"selectPage",value:function(e){var t;this.setState({currentSlide:e}),null===(t=this.viewPager)||void 0===t||t.setPage(e)}},{key:"render",value:function(){var e=this,t=this.state,n=t.layoutHeight,r=t.currentSlide;return g.a.createElement(b.ScrollView,{style:Bn.demoWrap,scrollEventThrottle:50,onLayout:function(t){return e.setState({layoutHeight:t.layout.height})}},g.a.createElement(b.View,{style:Bn.banner}),g.a.createElement(b.View,{style:Bn.tabs},g.a.createElement(b.Text,{key:"tab1",style:0===r?Bn.tabSelected:Bn.tabText,onClick:function(){return e.selectPage(0)}},"tab 1 (parent first)"),g.a.createElement(b.Text,{key:"tab2",style:1===r?Bn.tabSelected:Bn.tabText,onClick:function(){return e.selectPage(1)}},"tab 2 (self first)")),g.a.createElement(b.ViewPager,{ref:function(t){return e.viewPager=t},initialPage:r,style:{height:n-80},onPageSelected:function(t){return e.setState({currentSlide:t.position})}},g.a.createElement(b.ListView,{nestedScrollTopPriority:"parent",key:"slide1",numberOfRows:30,getRowKey:function(e){return"item".concat(e)},initialListSize:30,renderRow:function(e){return g.a.createElement(b.Text,{style:e%2?Bn.itemEvenText:Bn.itemOddText},"Item ",e)},getRowStyle:function(e){return e%2?Bn.itemEven:Bn.itemOdd}}),g.a.createElement(b.ListView,{nestedScrollTopPriority:"self",key:"slide2",numberOfRows:30,getRowKey:function(e){return"item".concat(e)},initialListSize:30,renderRow:function(e){return g.a.createElement(b.Text,{style:e%2?Bn.itemEvenText:Bn.itemOddText},"Item ",e)},getRowStyle:function(e){return e%2?Bn.itemEven:Bn.itemOdd}})))}}]),n}(g.a.Component);function Fn(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 zn(e){for(var t=1;t]+)>/g,(function(e,t){return"$"+o[t]})))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=M(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,a)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},C.apply(this,arguments)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(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 P(e){for(var t=1;t=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 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)||j(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 R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){var n=o[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=H(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,a)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},C.apply(this,arguments)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(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 P(e){for(var t=1;t=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 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){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,t)||F(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 R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||e.didTimeout)&&function e(t){"number"==typeof t?ne(t):t&&(ne(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var ae={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},le=new RegExp(/^\d+$/),ue=!1;function se(){var e;ve()&&(e=console).log.apply(e,arguments)}function ce(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var fe=new RegExp("^on.+Capture$");var de=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function pe(e){if("number"==typeof e)return e;if("string"==typeof e&&de.test(e))try{return parseFloat(e)}catch(t){return e}return e}function he(e){return"[object Function]"===Object.prototype.toString.call(e)}function me(e){e}function ve(){return!1}function ye(){return ue}function ge(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function be(e){return 5===e}var ke=function(){function e(t){R(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return z(e,[{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}},{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"notifyEvent",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r0)for(var l,u=!1,s=re(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new we(f,d,s);Object.assign(m,t),h?(p(m),m.bubbles||(u=!0)):("boolean"!=typeof(u=p(m))&&(u=!ye()),m.bubbles||(u=!0))}catch(e){console.reportUncaughtException(e)}}(r,e,o):function(e,t,n){var r=!1,i=n,o=e,a=re(n);do{if(xe(o=Ce(o,i),i))try{var l=re(i),u=new we(o,l,a);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[o](u))&&(r=!ye()),u.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!be(i.tag);)i=i.return}while(!r&&i)}(r,e,o)}}},receiveUIComponentEvent:function(e){if(se.apply(void 0,Ee.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=ie(n);o&&xe(r,o)&&o.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=Ie);var Pe=function(){function e(t,n){R(this,e),this.callback=t,this.bindListener=n}return z(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),_e=function(){function e(t){R(this,e),this.eventName=t,this.listenerIdList=[]}return z(e,[{key:"unregister",value:function(){var e=Ie.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for ".concat(this.eventName));for(var t=this.listenerIdList.length,n=0;n1?n-1:0),i=1;i=0?mn(t):t}var Ge=function(){function e(t){var n;R(this,e);var r=0;if((null===(n=t.startValue)||void 0===n?void 0:n.constructor)&&"Animation"===t.startValue.constructor.name)r={animationId:t.startValue.animationId};else{var i=t.startValue;r=Ke(t.valueType,i)}var o=Ke(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=r||0,this.toValue=o||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=qe(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Jt.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 z(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"===Zt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Qe.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Qe.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Qe.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Qe.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Jt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Jt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Jt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Jt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==M(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=Ke(n.valueType,a)}n.startValue=o||0}else"repeatCount"===r?n.repeatCount=qe(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Jt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Ke(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}(),Ye=new Le,Xe=function(){function e(t){var n=this;R(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Jt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:qe(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 z(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"===Zt.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ye.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ye.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ye.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ye.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Jt.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)&&Jt.callNative("AnimationModule","destroyAnimation",e.animationId)})),Jt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Jt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Jt.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")},et=!0,tt=[];function nt(e){(function(e){for(var t=[],n=0;n0&&void 0!==arguments[0]&&arguments[0];if(et)if(et=!1,0!==tt.length){var t=Z();Nt(),e?(nt(t),It(),tt=[],et=!0):Promise.resolve().then((function(){nt(t),It(),tt=[],et=!0}))}else et=!0}function it(e){var t=e.attributes;t.children;return A(t,u)}function ot(e,t){var n;if(!t.nativeName)return null;if(t.meta.skipAddToDom)return null;if(!t.meta.component)throw new Error("Specific tag is not supported yet: ".concat(t.tagName));var r={id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:P(P({},it(t)),{},{style:t.style})};return r}function at(e,t,n,r){var i=[],o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren((function(t){var n=ot(e,t);n&&i.push(n),"function"==typeof r&&r(t)}),o),i}function lt(e){return!!H&&e instanceof H.containerInfo.constructor}function ut(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=Z(),i=lt(e)&&!e.isMounted,o=e.isMounted&&!t.isMounted;if(i||o){var a=at(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));tt.push({type:Ze.createNode,nodes:a})}}}function st(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=Z(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];tt.push({type:Ze.deleteNode,nodes:i})}}function ct(e){if(e.isMounted){var t=ot(Z(),e);t&&tt.push({type:Ze.updateNode,nodes:[t]})}}var ft=0;var dt=function(){function e(){R(this,e),this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=((ft+=1)%10==0&&(ft+=1),ft)}return z(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),ut(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),st(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),ut(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),ut(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),st(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),pt={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},ht={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},mt="turn",vt="rad",yt="deg";function gt(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=C(/^([+-]?(?=(\d+))\2\.?\d*)+(deg|turn|rad)|(to\w+)$/g,{digit:2}).exec(t);if(Array.isArray(n)){var r="180",i=L(n,3),o=i[0],a=i[1],l=i[2];return a&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yt,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 mt:r="".concat((360*n).toFixed(2));break;case vt:r="".concat((180/Math.PI*n).toFixed(2))}return r}(a,l):o&&void 0!==ht[o]&&(r=ht[o]),r}}function bt(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:mn(n)}:void 0:{color:mn(n)}}function kt(e){var t;return t=e,fe.test(t)&&(e=e.replace("Capture","")),ae[e]?ae[e][1]:e}var wt=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.events={},r.tagName=e,r}return z(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,le.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"===M(e)&&e&&(o=P(P({},o),e))})),Object.keys(o).forEach((function(e){var n=o[e];if(Object.prototype.hasOwnProperty.call(pt,e)&&(e=pt[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 Ge||n instanceof Xe?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 Ge||n instanceof Xe)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=vn(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=mn(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=gt(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var o=bt(e);o&&i.push(o)}}else{var a=bt(e);a&&i.push(a)}})),n.linearGradient.colorStopList=i}else n[e]=ge(t);return n}(e,n,t.style);else if("textShadowOffset"===e){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:"setAttributes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(t)&&t.length>0&&(t.forEach((function(t){if(Array.isArray(t)){var n=L(t,2),r=n[0],i=n[1];e.setAttribute(r,i,{notToNative:!0})}})),ct(this))}},{key:"parseAnimationStyleProp",value:function(e){var t=!1;Object.keys(e).some((function(n){var r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(var i=0;i=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=at(Z(),e);tt.push({type:Ze.updateNode,nodes:t})}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=ce(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==M(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){if("function"==typeof t){var r=kt(e);n.attributes[r]=!0,n.events["".concat(r)]=!0}else{n.attributes[e]=t;var i=kt(e);!0===n.events["".concat(i)]&&"function"!=typeof t&&(n.attributes[i]=!1,delete n.events["".concat(i)])}return!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r}},{key:"setAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&ct(this));var r=this.parseAttributeProp(e,t);if(r)return;this.parseAnimationStyleProp(this.style),!n.notToNative&&ct(this)}catch(e){}}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(pt,e)&&(i=pt[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?vn(r):i.toLowerCase().indexOf("color")>-1?mn(r):pe(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||ct(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)})),ct(this),rt(!0)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=ce(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(dt),St=$.createNode,Et=$.updateNode,Ct=$.deleteNode,xt=$.flushBatch,Nt=$.startBatch,It=$.endBatch,Pt=$.sendRenderError,_t=function(e){return ee((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function At(e){if(e instanceof wt)return e;if(!e)return null;var t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){for(var n=t.child;n&&!(n.stateNode instanceof wt);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function Lt(e){var t=e;if("string"==typeof e){"getNodeIdByRef('".concat(e,"') use string ref will affect to performance, recommend use reference to the ref instead");var n=ee((function(t){return!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e}));if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){var r=At(t);return r?r.nodeId:0}return t.nodeId}function Rt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=At(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;l=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){te(o,e.nodeId);var a=Object.keys(t||{});if(0!==a.length){var l=a.map((function(e){return[e,t[e]]}));e.setAttributes(l)}},clearContainer:function(){},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),te(i,o.nodeId),o},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",ce(e)),i.meta={component:{name:"Text"}},te(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={};return Object.keys(n).forEach((function(e){var t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)})),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:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==M(t)&&"object"==M(n)){var r,i,o,a=Ut(t),l=Ut(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=Dt(t);if((i=d.length)!==Dt(n).length)return!1;for(r=i;0!=r--;)if(!Bt.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)}})),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),oe(t)},removeChildFromContainer:function(e,t){e.removeChild(t),oe(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=P(P({},t),{},{style:P(P({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),qt=o()(P(P({},$t),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Qt=qt.flushSync,Kt=Y.addEventListener,Gt=Y.removeEventListener,Yt=Y.dispatchEvent,Xt=Y.AsyncStorage,Jt=Y.Bridge,Zt=Y.Device,en=Y.HippyRegister,tn=Object.freeze({__proto__:null,addEventListener:Kt,removeEventListener:Gt,dispatchEvent:Yt,AsyncStorage:Xt,BackAndroid:Ht,Bridge:Jt,Clipboard:je,Cookie:Fe,Device:Zt,HippyRegister:en,ImageLoader:Ue,NetworkInfo:$e,UIManager:zt,flushSync:Qt});function nn(){for(var e=arguments.length,t=new Array(e),n=0;n255?255:t}function sn(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function cn(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 fn(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=cn(i,r,e+1/3),a=cn(i,r,e),l=cn(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function dn(e){return(parseFloat(e)%360+360)%360/360}function pn(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function hn(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ln.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(rn,e)?rn[e]:(t=ln.rgb.exec(e),Array.isArray(t)?(un(t[1])<<24|un(t[2])<<16|un(t[3])<<8|255)>>>0:(t=ln.rgba.exec(e))?(un(t[1])<<24|un(t[2])<<16|un(t[3])<<8|sn(t[4]))>>>0:(t=ln.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=ln.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=ln.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ln.hsl.exec(e))?(255|fn(dn(t[1]),pn(t[2]),pn(t[3])))>>>0:(t=ln.hsla.exec(e))?(fn(dn(t[1]),pn(t[2]),pn(t[3]))|sn(t[4]))>>>0:null))}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=hn(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function vn(e,t){return Array.isArray(e)?e.map((function(e){return mn(e,t)})):[0]}var yn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.call(this)).documentElement=new wt("document"),e}return z(n,[{key:"createElement",value:function(e){return new wt(e)}},{key:"createElementNS",value:function(e,t){return new wt("".concat(e,":").concat(t))}}]),n}(dt);yn.createElement=yn.prototype.createElement,yn.createElementNS=yn.prototype.createElementNS;var gn=qt.createContainer,bn=qt.updateContainer,kn=qt.getPublicRootInstance,wn=(qt.injectIntoDevTools,['%c[Hippy-React "unspecified"]%c',"color: #61dafb","color: auto"]),Sn=function(){function e(t){if(R(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 yn;this.rootContainer=gn(n,0,!1,null)}return z(e,[{key:"start",value:function(){en.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,i=t.silent,o=void 0!==i&&i,a=t.bubbles,u=void 0!==a&&a,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;se.apply(void 0,wn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&me(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ue=e}(u),J(f,this.rootContainer);var d=l.a.createElement(r,e);return bn(d,this.rootContainer,null,c),kn(this.rootContainer)}}],[{key:"Native",get:function(){return tn}}]),e}();Sn.version="unspecified";var En={registerComponent:function(e,t){new Sn({appName:e,entryPage:t}).start()}},Cn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"setPressed",value:function(e){Rt(this.instance,"setPressed",[e])}},{key:"setHotspot",value:function(e,t){Rt(this.instance,"setHotspot",[e,t])}},{key:"render",value:function(){var e=this,t=this.props,n=t.collapsable,r=t.style,i=void 0===r?{}:r,o=A(t,s),a=i,u=o.nativeBackgroundAndroid;return"boolean"==typeof n&&(a.collapsable=n),void 0!==(null==u?void 0:u.color)&&(u.color=mn(u.color)),l.a.createElement("div",P({ref:function(t){e.instance=t},nativeName:"View",style:a},o))}}]),n}(l.a.Component);function xn(e,t){var n=e.style,r=A(e,c),i=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===M(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(i[0].color="#000"):"object"===M(n)&&void 0===n.color&&void 0===n.colors&&(i.color="#000")),r.text="","string"==typeof r.children)r.text=ce(r.children);else if("number"==typeof r.children)r.text=ce(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=ce(o),r.children=r.text)}return l.a.createElement("p",P({ref:t,nativeName:"Text",style:i},r))}xn.displayName="Text";var Nn=l.a.forwardRef(xn);Nn.displayName="Text";var In=Object.freeze({__proto__:null,default:Nn}),Pn=function(e){x(n,e);var t=k(n);function n(){return R(this,n),t.apply(this,arguments)}return z(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,i=e.imageRef,o=e.source,a=e.sources,u=e.src,s=e.srcs,c=e.tintColor,d=e.tintColors,p=A(e,f),h=this.getImageUrls({src:u,srcs:s,source:o,sources:a});if("ios"===Zt.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===Zt.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=ge(p.defaultSource));var v=P({},n);return this.handleTintColor(v,c,d),p.style=v,t?l.a.createElement(Cn,{style:n},l.a.createElement("img",P(P({},p),{},{nativeName:"Image",alt:"",ref:i,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):l.a.createElement("img",P(P({},p),{},{nativeName:"Image",alt:"",ref:i}))}},{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(O(o),O(n))),r)if("string"==typeof r)o.push(r);else if("object"===M(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"===M(e)&&null!==e&&e.uri&&o.push(e.uri)})),o.length&&(o=o.map((function(e){return ge(e)}))),o}},{key:"handleTintColor",value:function(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=Me(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}(l.a.Component);Pn.prefetch=He;var _n=function(){function e(){R(this,e),this.Value=e.Value}return z(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new Ge({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();_n.View=Cn,_n.Text=In,_n.Image=Pn;var An={step0:function(e){return e>0?1:0},step1:function(e){return e>=1?1:0},linear:function(){return"linear"},ease:function(){return"ease"},quad:function(e){return Math.pow(e,2)},cubic:function(e){return Math.pow(e,3)},poly:function(e){return function(t){return Math.pow(t,e)}},sin:function(e){return 1-Math.cos(e*Math.PI/2)},circle:function(e){return 1-Math.sqrt(1-e*e)},exp:function(e){return Math.pow(2,10*(e-1))},elastic:function(){return"elastic"},back:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(t){return t*t*((e+1)*t-e)}},bounce:function(e){var t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bezier:function(){return"bezier"},in:function(){return"ease-in"},out:function(){return"ease-out"},inOut:function(){return"ease-in-out"}};function Ln(e){return l.a.createElement("li",P({nativeName:"ListViewItem"},e))}var Rn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"expandPullHeader",value:function(){Rt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){void 0!==e?Rt(this.instance,"collapsePullHeaderWithOptions",[e]):Rt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,d);return l.a.createElement("div",P({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(l.a.Component),Tn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"expandPullFooter",value:function(){Rt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){Rt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,p);return l.a.createElement("div",P({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(l.a.Component),zn={onDisappear:"onDisAppear"},On={onDisappear:"onDisappear"},jn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(S(r)),r.state={initialListReady:!1},r}return z(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Rt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Rt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,r=t.children,i=t.style,o=t.renderRow,a=t.renderPullHeader,u=t.renderPullFooter,s=t.getRowType,c=t.getRowStyle,f=t.getHeaderStyle,d=t.getFooterStyle,p=t.getRowKey,m=t.dataSource,v=t.initialListSize,y=t.rowShouldSticky,g=t.onRowLayout,b=t.onHeaderPulling,k=t.onHeaderReleased,w=t.onFooterPulling,S=t.onFooterReleased,E=t.onAppear,C=t.onDisappear,x=t.onWillAppear,N=t.onWillDisappear,I=A(t,h),_=[];if("function"==typeof o){var L=this.state.initialListReady,R=this.props.numberOfRows,T=this.getPullHeader(a,b,k,f),z=this.getPullFooter(u,w,S,d);!R&&m&&(R=m.length),L||(R=Math.min(R,v||10));for(var O=function(t){var r={},i=void 0;i=m?o(m[t],null,t):o(t),e.handleRowProps(r,t,{getRowKey:p,getRowStyle:c,getRowType:s,onRowLayout:g,rowShouldSticky:y}),[{func:E,name:"onAppear"},{func:C,name:"onDisappear"},{func:x,name:"onWillAppear"},{func:N,name:"onWillDisappear"}].forEach((function(e){var i=e.func,o=e.name;"function"==typeof i&&(r[n.convertName(o)]=function(){i(t)})})),i&&_.push(l.a.createElement(Ln,P({},r),i))},j=0;j0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName])new Sn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),Rt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),Rt(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,v)),i=A(t,y);return i.initialRoute=r,l.a.createElement("div",P({nativeName:"Navigator",ref:function(t){e.instance=t}},i))}}]),n}(l.a.Component);function Un(e){return l.a.createElement("div",P(P({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var Dn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(S(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(S(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(S(r)),r}return z(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&Rt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&Rt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,i=A(t,g),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),l.a.createElement(Un,P({},t),e)})):o.push(l.a.createElement(Un,null,n)),"function"==typeof r&&(i.onPageScrollStateChanged=this.onPageScrollStateChanged),l.a.createElement("div",P({nativeName:"ViewPager",ref:function(t){e.instance=t}},i),o)}}]),n}(l.a.Component);function Bn(){var e=V.platform.Localization;return!!e&&1===e.direction}var Wn={caretColor:"caret-color"},Vn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(S(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(S(r)),r}return z(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){Rt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return Rt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){Rt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){Rt(this.instance,"blurTextInput",[])}},{key:"isFocused",value:function(){var e=this;return new Promise((function(t){Rt(e.instance,"isFocused",(function(e){return t(e.value)}))}))}},{key:"showInputMethod",value:function(){}},{key:"hideInputMethod",value:function(){}},{key:"clear",value:function(){Rt(this.instance,"clear",[])}},{key:"render",value:function(){var e=this,t=P({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach((function(n){var r=n,i=e.props[n];"string"==typeof e.props[n]&&(Wn[n]&&(r=Wn[n]),Array.isArray(t.style)?t.style.push({[r]:i}):t.style&&"object"===M(t.style)?t.style[r]=i:t.style={[r]:i},delete t[n])})),Bn()&&(t.style?"object"!==M(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),l.a.createElement("div",P(P({nativeName:"TextInput"},t),{},{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow,n=e;"android"===Zt.platform.OS&&(n.keyboardHeight/=Zt.screen.scale),"function"==typeof t&&t(n)}}]),n}(l.a.Component),$n=Zt.window.scale,qn=Math.round(.4*$n)/$n;function Qn(e){return e}0===qn&&(qn=1/$n);var Kn=Object.freeze({__proto__:null,get hairlineWidth(){return qn},create:Qn}),Gn={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"}},Yn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,o=n;"object"===M(e)&&e&&(r=e.x,i=e.y,o=e.animated),r=r||0,i=i||0,o=!!o,Rt(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;Rt(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,i=t.children,o=t.style,a=[n?Gn.contentContainerHorizontal:Gn.contentContainerVertical,r],u=n?Object.assign({},Gn.baseHorizontal,o):Object.assign({},Gn.baseVertical,o);return n&&(u.flexDirection=Bn()?"row-reverse":"row"),l.a.createElement("div",P(P({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props),{},{style:u}),l.a.createElement(Cn,{style:a},i))}}]),n}(l.a.Component),Xn={modal:{position:"absolute",collapsable:!1},container:{position:"absolute",left:0,top:0}},Jn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).eventSubscription=null,r}return z(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Zt.platform.OS&&(this.eventSubscription=new _e("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"===Zt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,i=e.animated,o=this.props.animationType;if(!1===n)return null;var a={backgroundColor:r?"transparent":"white"};return o||(o="none",i&&(o="slide")),l.a.createElement("div",P({nativeName:"Modal",animationType:o,transparent:r,style:Xn.modal},this.props),l.a.createElement(Cn,{style:[Xn.container,a]},t))}}]),n}(l.a.Component);Jn.defaultProps={visible:!0};var Zn=function(e){x(n,e);var t=k(n);function n(e){var r;R(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(S(r)),r}return z(n,[{key:"render",value:function(){var e,t,n,r,i=this.props,o=i.requestFocus,a=i.children,u=i.nextFocusDownId,s=i.nextFocusUpId,c=i.nextFocusLeftId,f=i.nextFocusRightId,d=i.style,p=i.noFocusStyle,h=i.focusStyle,m=i.onClick,v=this.state.isFocus,y=l.a.Children.only(a);(null===(t=null===(e=null==y?void 0:y.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?r=y.child.memoizedProps.nativeName:(null===(n=null==y?void 0:y.type)||void 0===n?void 0:n.displayName)&&(r=y.type.displayName);var g=u&&Lt(u),b=s&&Lt(s),k=c&&Lt(c),w=f&&Lt(f),S=d;if("Text"!==r){var E=y.memoizedProps.style;S=P(P({},S),E)}if(Object.assign(S,v?h:p),"Text"===r)return l.a.createElement(Cn,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:k,nextFocusRightId:w,requestFocus:o,style:S,onClick:m,onFocus:this.handleFocus},y);var C=y.memoizedProps.children;return l.a.cloneElement(y,{nextFocusDownId:u,nextFocusUpId:s,nextFocusLeftId:c,nextFocusRightId:f,requestFocus:o,onClick:m,focusable:!0,children:C,style:S,onFocus:this.handleFocus})}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}}]),n}(l.a.Component);function er(e){return l.a.createElement("iframe",P({title:"hippy",nativeName:"WebView"},e))}var tr,nr=function(){function e(t,n,r){var i=this;if(R(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),tr||(tr=new _e("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=tr.addCallback(this.onWebSocketEvent),W.callNativeWithPromise("websocket","connect",a).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return z(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,W.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(M(e)));W.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"===M(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,tr.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}();function rr(e){return l.a.createElement("li",P({nativeName:"WaterfallItem"},e))}var ir=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(S(r)),r}return z(n,[{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;Rt(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;Rt(this.instance,"scrollToContentOffset",[n,i,a])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,i=t.renderBanner,o=t.numberOfColumns,a=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,g=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,N=t.onHeaderPulling,I=t.onHeaderReleased,_=t.onFooterPulling,L=t.onFooterReleased,R=t.containPullHeader,T=void 0!==R&&R,z=t.containPullFooter,O=void 0!==z&&z,j=t.containBannerView,F=void 0!==j&&j,M=P(P({},A(t,b)),{},{style:r,numberOfColumns:a,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:T,containPullFooter:O,containBannerView:F}),H=[];if("function"==typeof i){var U=i();U&&(H.push(l.a.createElement(Cn,{key:"bannerView"},l.a.cloneElement(U))),M.containBannerView=!0)}if("function"==typeof v){for(var D=this.getPullHeader(y,N,I),B=this.getPullFooter(g,_,L),W=0;W0||e.didTimeout)&&function e(t){"number"==typeof t?re(t):t&&(re(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var le={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},ue=new RegExp(/^\d+$/),se=!1;function ce(){var e;ye()&&(e=console).log.apply(e,arguments)}function fe(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var de=new RegExp("^on.+Capture$");var pe=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function he(e){if("number"==typeof e)return e;if("string"==typeof e&&pe.test(e))try{return parseFloat(e)}catch(t){return e}return e}function me(e){return"[object Function]"===Object.prototype.toString.call(e)}function ve(e){e}function ye(){return!1}function ge(){return se}function be(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function ke(e){return 5===e}var we=function(){function e(t){R(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return z(e,[{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}},{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"notifyEvent",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r0)for(var l,u=!1,s=ie(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new Se(f,d,s);Object.assign(m,t),h?(p(m),m.bubbles||(u=!0)):("boolean"!=typeof(u=p(m))&&(u=!ge()),m.bubbles||(u=!0))}catch(e){console.error(e)}}(r,e,o):function(e,t,n){var r=!1,i=n,o=e,a=ie(n);do{if(Ne(o=xe(o,i),i))try{var l=ie(i),u=new Se(o,l,a);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[o](u))&&(r=!ge()),u.bubbles||(r=!0)}catch(e){console.error(e)}if(!1===r)for(i=i.return;i&&!ke(i.tag);)i=i.return}while(!r&&i)}(r,e,o)}}},receiveUIComponentEvent:function(e){if(ce.apply(void 0,Ce.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=oe(n);o&&Ne(r,o)&&o.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=Pe);var _e=function(){function e(t,n){R(this,e),this.callback=t,this.bindListener=n}return z(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),Ae=function(){function e(t){R(this,e),this.eventName=t,this.listenerIdList=[]}return z(e,[{key:"unregister",value:function(){var e=Pe.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for ".concat(this.eventName));for(var t=this.listenerIdList.length,n=0;n1?n-1:0),i=1;i=0?vn(t):t}var Ye=function(){function e(t){var n;R(this,e);var r=0;if((null===(n=t.startValue)||void 0===n?void 0:n.constructor)&&"Animation"===t.startValue.constructor.name)r={animationId:t.startValue.animationId};else{var i=t.startValue;r=Ge(t.valueType,i)}var o=Ge(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=r||0,this.toValue=o||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Qe(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Zt.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 z(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"===en.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Ke.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Ke.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Ke.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Ke.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Zt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Zt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Zt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Zt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==H(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=Ge(n.valueType,a)}n.startValue=o||0}else"repeatCount"===r?n.repeatCount=Qe(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Zt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Ge(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}(),Xe=new Re,Je=function(){function e(t){var n=this;R(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Zt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Qe(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 z(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"===en.platform.OS&&(t="onHippyAnimation"),"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Xe.addListener("".concat(t,"Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Xe.addListener("".concat(t,"End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Xe.addListener("".concat(t,"Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Xe.addListener("".concat(t,"Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Zt.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)&&Zt.callNative("AnimationModule","destroyAnimation",e.animationId)})),Zt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Zt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Zt.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"],et={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")},tt=!0,nt=[];function rt(e){(function(e){for(var t=[],n=0;n0&&void 0!==arguments[0]&&arguments[0];if(tt)if(tt=!1,0!==nt.length){var t=ee();It(),e?(rt(t),Pt(),nt=[],tt=!0):Promise.resolve().then((function(){rt(t),Pt(),nt=[],tt=!0}))}else tt=!0}function ot(e){var t=e.attributes;t.children;return A(t,u)}function at(e,t){var n;if(!t.nativeName)return null;if(t.meta.skipAddToDom)return null;if(!t.meta.component)throw new Error("Specific tag is not supported yet: ".concat(t.tagName));var r={id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:P(P({},ot(t)),{},{style:t.style}),tagName:t.nativeName};return r}function lt(e,t,n,r){var i=[],o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren((function(t){var n=at(e,t);n&&i.push(n),"function"==typeof r&&r(t)}),o),i}function ut(e){return!!D&&e instanceof D.containerInfo.constructor}function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=ee(),i=ut(e)&&!e.isMounted,o=e.isMounted&&!t.isMounted;if(i||o){var a=lt(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)}));nt.push({type:et.createNode,nodes:a})}}}function ct(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=ee(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];nt.push({type:et.deleteNode,nodes:i})}}function ft(e){if(e.isMounted){var t=at(ee(),e);t&&nt.push({type:et.updateNode,nodes:[t]})}}var dt=0;var pt=function(){function e(){R(this,e),this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=((dt+=1)%10==0&&(dt+=1),dt)}return z(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),st(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),ct(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),st(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),st(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),ct(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),ht={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},mt={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},vt="turn",yt="rad",gt="deg";function bt(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=C(/^([+-]?(?=(\d+))\2\.?\d*)+(deg|turn|rad)|(to\w+)$/g,{digit:2}).exec(t);if(Array.isArray(n)){var r="180",i=L(n,3),o=i[0],a=i[1],l=i[2];return a&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,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 vt:r="".concat((360*n).toFixed(2));break;case yt:r="".concat((180/Math.PI*n).toFixed(2))}return r}(a,l):o&&void 0!==mt[o]&&(r=mt[o]),r}}function kt(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:vn(n)}:void 0:{color:vn(n)}}function wt(e){var t;return t=e,de.test(t)&&(e=e.replace("Capture","")),le[e]?le[e][1]:e}var St=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.events={},r.tagName=e,r}return z(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,ue.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"===H(e)&&e&&(o=P(P({},o),e))})),Object.keys(o).forEach((function(e){var n=o[e];if(Object.prototype.hasOwnProperty.call(ht,e)&&(e=ht[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 Ye||n instanceof Je?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 Ye||n instanceof Je)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=yn(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=vn(n);else if("fontWeight"===e&&n)t.style[e]="string"!=typeof n?n.toString():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=bt(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var o=kt(e);o&&i.push(o)}}else{var a=kt(e);a&&i.push(a)}})),n.linearGradient.colorStopList=i}else n[e]=be(t);return n}(e,n,t.style);else if("textShadowOffset"===e){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:"setAttributes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(t)&&t.length>0&&(t.forEach((function(t){if(Array.isArray(t)){var n=L(t,2),r=n[0],i=n[1];e.setAttribute(r,i,{notToNative:!0})}})),ft(this))}},{key:"parseAnimationStyleProp",value:function(e){var t=!1;Object.keys(e).some((function(n){var r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(var i=0;i=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=lt(ee(),e);nt.push({type:et.updateNode,nodes:t})}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=fe(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==H(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){if("function"==typeof t){var r=wt(e);n.attributes[r]=!0,n.events["".concat(r)]=!0}else{n.attributes[e]=t;var i=wt(e);!0===n.events["".concat(i)]&&"function"!=typeof t&&(n.attributes[i]=!1,delete n.events["".concat(i)])}return!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r}},{key:"setAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&ft(this));var r=this.parseAttributeProp(e,t);if(r)return;this.parseAnimationStyleProp(this.style),!n.notToNative&&ft(this)}catch(e){}}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(ht,e)&&(i=ht[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?yn(r):i.toLowerCase().indexOf("color")>-1?vn(r):he(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||ft(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),ft(this),it(!0)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=fe(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(pt),Et=q.createNode,Ct=q.updateNode,xt=q.deleteNode,Nt=q.flushBatch,It=q.startBatch,Pt=q.endBatch,_t=q.sendRenderError,At=function(e){return te((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function Lt(e){if(e instanceof St)return e;if(!e)return null;var t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){for(var n=t.child;n&&!(n.stateNode instanceof St);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function Rt(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=te((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=Lt(t);return r?r.nodeId:0}return t.nodeId}function Tt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=Lt(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;l=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){ne(o,e.nodeId);var a=Object.keys(t||{});if(0!==a.length){var l=a.map((function(e){return[e,t[e]]}));e.setAttributes(l)}},clearContainer:function(){},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),ne(i,o.nodeId),o},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",fe(e)),i.meta={component:{name:"Text"}},ne(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={};return Object.keys(n).forEach((function(e){var t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)})),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:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==H(t)&&"object"==H(n)){var r,i,o,a=Ut(t),l=Ut(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=Bt(t);if((i=d.length)!==Bt(n).length)return!1;for(r=i;0!=r--;)if(!Wt.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)}})),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),ae(t)},removeChildFromContainer:function(e,t){e.removeChild(t),ae(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=P(P({},t),{},{style:P(P({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),Qt=o()(P(P({},qt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Kt=Qt.flushSync,Gt=X.addEventListener,Yt=X.removeEventListener,Xt=X.dispatchEvent,Jt=X.AsyncStorage,Zt=X.Bridge,en=X.Device,tn=X.HippyRegister,nn=Object.freeze({__proto__:null,addEventListener:Gt,removeEventListener:Yt,dispatchEvent:Xt,AsyncStorage:Jt,BackAndroid:Dt,Bridge:Zt,Clipboard:Fe,Cookie:Me,Device:en,HippyRegister:tn,ImageLoader:Ue,NetworkInfo:qe,UIManager:Ot,flushSync:Kt});function rn(){for(var e=arguments.length,t=new Array(e),n=0;n255?255:t}function cn(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fn(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 dn(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=fn(i,r,e+1/3),a=fn(i,r,e),l=fn(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function pn(e){return(parseFloat(e)%360+360)%360/360}function hn(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function mn(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=un.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(on,e)?on[e]:(t=un.rgb.exec(e),Array.isArray(t)?(sn(t[1])<<24|sn(t[2])<<16|sn(t[3])<<8|255)>>>0:(t=un.rgba.exec(e))?(sn(t[1])<<24|sn(t[2])<<16|sn(t[3])<<8|cn(t[4]))>>>0:(t=un.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=un.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=un.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=un.hsl.exec(e))?(255|dn(pn(t[1]),hn(t[2]),hn(t[3])))>>>0:(t=un.hsla.exec(e))?(dn(pn(t[1]),hn(t[2]),hn(t[3]))|cn(t[4]))>>>0:null))}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isInteger(e))return e;var n=mn(e);return t.platform||(t.platform="ios"),null===n?0:(n=(n<<24|n>>>8)>>>0,"android"===t.platform&&(n|=0),n)}function yn(e,t){return Array.isArray(e)?e.map((function(e){return vn(e,t)})):[0]}var gn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.call(this)).documentElement=new St("document"),e}return z(n,[{key:"createElement",value:function(e){return new St(e)}},{key:"createElementNS",value:function(e,t){return new St("".concat(e,":").concat(t))}}]),n}(pt);gn.createElement=gn.prototype.createElement,gn.createElementNS=gn.prototype.createElementNS;var bn=Qt.createContainer,kn=Qt.updateContainer,wn=Qt.getPublicRootInstance,Sn=(Qt.injectIntoDevTools,['%c[Hippy-React "2.16.4"]%c',"color: #61dafb","color: auto"]),En=function(){function e(t){if(R(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 gn;this.rootContainer=bn(n,0,!1,null)}return z(e,[{key:"start",value:function(){tn.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,i=t.silent,o=void 0!==i&&i,a=t.bubbles,u=void 0!==a&&a,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;ce.apply(void 0,Sn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&ve(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];se=e}(u),Z(f,this.rootContainer);var d=l.a.createElement(r,e);return kn(d,this.rootContainer,null,c),wn(this.rootContainer)}}],[{key:"Native",get:function(){return nn}}]),e}();En.version="2.16.4";var Cn={registerComponent:function(e,t){new En({appName:e,entryPage:t}).start()}},xn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"setPressed",value:function(e){Tt(this.instance,"setPressed",[e])}},{key:"setHotspot",value:function(e,t){Tt(this.instance,"setHotspot",[e,t])}},{key:"render",value:function(){var e=this,t=this.props,n=t.collapsable,r=t.style,i=void 0===r?{}:r,o=A(t,s),a=i,u=o.nativeBackgroundAndroid;return"boolean"==typeof n&&(a.collapsable=n),void 0!==(null==u?void 0:u.color)&&(u.color=vn(u.color)),l.a.createElement("div",P({ref:function(t){e.instance=t},nativeName:"View",style:a},o))}}]),n}(l.a.Component);function Nn(e,t){var n=e.style,r=A(e,c),i=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===H(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(i[0].color="#000"):"object"===H(n)&&void 0===n.color&&void 0===n.colors&&(i.color="#000")),r.text="","string"==typeof r.children)r.text=fe(r.children);else if("number"==typeof r.children)r.text=fe(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=fe(o),r.children=r.text)}return l.a.createElement("p",P({ref:t,nativeName:"Text",style:i},r))}Nn.displayName="Text";var In=l.a.forwardRef(Nn);In.displayName="Text";var Pn=Object.freeze({__proto__:null,default:In}),_n=function(e){x(n,e);var t=k(n);function n(){return R(this,n),t.apply(this,arguments)}return z(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,i=e.imageRef,o=e.source,a=e.sources,u=e.src,s=e.srcs,c=e.tintColor,d=e.tintColors,p=A(e,f),h=this.getImageUrls({src:u,srcs:s,source:o,sources:a});if("ios"===en.platform.OS)h.length&&(p.source=h.map((function(e){return{uri:e}})));else if("android"===en.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=be(p.defaultSource));var v=P({},n);return this.handleTintColor(v,c,d),p.style=v,t?l.a.createElement(xn,{style:n},l.a.createElement("img",P(P({},p),{},{nativeName:"Image",alt:"",ref:i,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):l.a.createElement("img",P(P({},p),{},{nativeName:"Image",alt:"",ref:i}))}},{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(j(o),j(n))),r)if("string"==typeof r)o.push(r);else if("object"===H(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"===H(e)&&null!==e&&e.uri&&o.push(e.uri)})),o.length&&(o=o.map((function(e){return be(e)}))),o}},{key:"handleTintColor",value:function(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=He(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}(l.a.Component);_n.prefetch=De;var An=function(){function e(){R(this,e),this.Value=e.Value}return z(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new Ye({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();An.View=xn,An.Text=Pn,An.Image=_n;var Ln={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 Rn(e){return l.a.createElement("li",P({nativeName:"ListViewItem"},e))}var Tn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"expandPullHeader",value:function(){Tt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){void 0!==e?Tt(this.instance,"collapsePullHeaderWithOptions",[e]):Tt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,d);return l.a.createElement("div",P({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(l.a.Component),zn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"expandPullFooter",value:function(){Tt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){Tt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=A(t,p);return l.a.createElement("div",P({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(l.a.Component),On={onDisappear:"onDisAppear"},jn={onDisappear:"onDisappear"},Fn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(S(r)),r.state={initialListReady:!1},r}return z(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Tt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Tt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,r=t.children,i=t.style,o=t.renderRow,a=t.renderPullHeader,u=t.renderPullFooter,s=t.getRowType,c=t.getRowStyle,f=t.getHeaderStyle,d=t.getFooterStyle,p=t.getRowKey,m=t.dataSource,v=t.initialListSize,y=t.rowShouldSticky,g=t.onRowLayout,b=t.onHeaderPulling,k=t.onHeaderReleased,w=t.onFooterPulling,S=t.onFooterReleased,E=t.onAppear,C=t.onDisappear,x=t.onWillAppear,N=t.onWillDisappear,I=A(t,h),_=[];if("function"==typeof o){var L=this.state.initialListReady,R=this.props.numberOfRows,T=this.getPullHeader(a,b,k,f),z=this.getPullFooter(u,w,S,d);!R&&m&&(R=m.length),L||(R=Math.min(R,v||15));for(var O=function(t){var r,i={};r=m?o(m[t],null,t):o(t),e.handleRowProps(i,t,{getRowKey:p,getRowStyle:c,getRowType:s,onRowLayout:g,rowShouldSticky:y}),[{func:E,name:"onAppear"},{func:C,name:"onDisappear"},{func:x,name:"onWillAppear"},{func:N,name:"onWillDisappear"}].forEach((function(e){var r=e.func,o=e.name;"function"==typeof r&&(i[n.convertName(o)]=function(){r(t)})})),r&&_.push(l.a.createElement(Rn,P({},i),r))},j=0;j0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName])new En({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),Tt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),Tt(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,v)),i=A(t,y);return i.initialRoute=r,l.a.createElement("div",P({nativeName:"Navigator",ref:function(t){e.instance=t}},i))}}]),n}(l.a.Component);function Un(e){return l.a.createElement("div",P(P({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var Bn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(S(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(S(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(S(r)),r}return z(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&Tt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&Tt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,i=A(t,g),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),l.a.createElement(Un,P({},t),e)})):o.push(l.a.createElement(Un,null,n)),"function"==typeof r&&(i.onPageScrollStateChanged=this.onPageScrollStateChanged),l.a.createElement("div",P({nativeName:"ViewPager",ref:function(t){e.instance=t}},i),o)}}]),n}(l.a.Component);function Wn(){var e=$.platform.Localization;return!!e&&1===e.direction}var Vn={caretColor:"caret-color"},$n=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(S(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(S(r)),r}return z(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){Tt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return Tt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){Tt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){Tt(this.instance,"blurTextInput",[])}},{key:"isFocused",value:function(){var e=this;return new Promise((function(t){Tt(e.instance,"isFocused",(function(e){return t(e.value)}))}))}},{key:"showInputMethod",value:function(){}},{key:"hideInputMethod",value:function(){}},{key:"clear",value:function(){Tt(this.instance,"clear",[])}},{key:"render",value:function(){var e=this,t=P({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach((function(n){var r=n,i=e.props[n];"string"==typeof e.props[n]&&(Vn[n]&&(r=Vn[n]),Array.isArray(t.style)?t.style.push({[r]:i}):t.style&&"object"===H(t.style)?t.style[r]=i:t.style={[r]:i},delete t[n])})),Wn()&&(t.style?"object"!==H(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),l.a.createElement("div",P(P({nativeName:"TextInput"},t),{},{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow,n=e;"android"===en.platform.OS&&(n.keyboardHeight/=en.screen.scale),"function"==typeof t&&t(n)}}]),n}(l.a.Component),qn=en.window.scale,Qn=Math.round(.4*qn)/qn;function Kn(e){return e}0===Qn&&(Qn=1/qn);var Gn=Object.freeze({__proto__:null,get hairlineWidth(){return Qn},create:Kn}),Yn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}},Xn=function(e){x(n,e);var t=k(n);function n(){var e;return R(this,n),(e=t.apply(this,arguments)).instance=null,e}return z(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,o=n;"object"===H(e)&&e&&(r=e.x,i=e.y,o=e.animated),r=r||0,i=i||0,o=!!o,Tt(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;Tt(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,i=t.children,o=t.style,a=[n?Yn.contentContainerHorizontal:Yn.contentContainerVertical,r],u=n?Object.assign({},Yn.baseHorizontal,o):Object.assign({},Yn.baseVertical,o);return n&&(u.flexDirection=Wn()?"row-reverse":"row"),l.a.createElement("div",P(P({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props),{},{style:u}),l.a.createElement(xn,{style:a},i))}}]),n}(l.a.Component),Jn={modal:{position:"absolute",collapsable:!1},container:{position:"absolute",left:0,top:0}},Zn=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).eventSubscription=null,r}return z(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===en.platform.OS&&(this.eventSubscription=new Ae("modalDismissed"),this.eventSubscription.addCallback((function(t){var n=e.props,r=n.primaryKey,i=n.onDismiss;t.primaryKey===r&&"function"==typeof i&&i()})))}},{key:"componentWillUnmount",value:function(){"ios"===en.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,i=e.animated,o=this.props.animationType;if(!1===n)return null;var a={backgroundColor:r?"transparent":"white"};return o||(o="none",i&&(o="slide")),l.a.createElement("div",P({nativeName:"Modal",animationType:o,transparent:r,style:Jn.modal},this.props),l.a.createElement(xn,{style:[Jn.container,a]},t))}}]),n}(l.a.Component);Zn.defaultProps={visible:!0};var er=function(e){x(n,e);var t=k(n);function n(e){var r;R(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(S(r)),r}return z(n,[{key:"render",value:function(){var e,t,n,r,i=this.props,o=i.requestFocus,a=i.children,u=i.nextFocusDownId,s=i.nextFocusUpId,c=i.nextFocusLeftId,f=i.nextFocusRightId,d=i.style,p=i.noFocusStyle,h=i.focusStyle,m=i.onClick,v=this.state.isFocus,y=l.a.Children.only(a);(null===(t=null===(e=null==y?void 0:y.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?r=y.child.memoizedProps.nativeName:(null===(n=null==y?void 0:y.type)||void 0===n?void 0:n.displayName)&&(r=y.type.displayName);var g=u&&Rt(u),b=s&&Rt(s),k=c&&Rt(c),w=f&&Rt(f),S=d;if("Text"!==r){var E=y.memoizedProps.style;S=P(P({},S),E)}if(Object.assign(S,v?h:p),"Text"===r)return l.a.createElement(xn,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:k,nextFocusRightId:w,requestFocus:o,style:S,onClick:m,onFocus:this.handleFocus},y);var C=y.memoizedProps.children;return l.a.cloneElement(y,{nextFocusDownId:u,nextFocusUpId:s,nextFocusLeftId:c,nextFocusRightId:f,requestFocus:o,onClick:m,focusable:!0,children:C,style:S,onFocus:this.handleFocus})}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}}]),n}(l.a.Component);function tr(e){return l.a.createElement("iframe",P({title:"hippy",nativeName:"WebView"},e))}var nr,rr=function(){function e(t,n,r){var i=this;if(R(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),nr||(nr=new Ae("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=nr.addCallback(this.onWebSocketEvent),V.callNativeWithPromise("websocket","connect",a).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return z(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(H(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"===H(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,nr.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}();function ir(e){return l.a.createElement("li",P({nativeName:"WaterfallItem"},e))}var or=function(e){x(n,e);var t=k(n);function n(e){var r;return R(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(S(r)),r}return z(n,[{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;Tt(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;Tt(this.instance,"scrollToContentOffset",[n,i,a])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,i=t.renderBanner,o=t.numberOfColumns,a=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,g=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,N=t.onHeaderPulling,I=t.onHeaderReleased,_=t.onFooterPulling,L=t.onFooterReleased,R=t.containPullHeader,T=void 0!==R&&R,z=t.containPullFooter,O=void 0!==z&&z,j=t.containBannerView,F=void 0!==j&&j,M=P(P({},A(t,b)),{},{style:r,numberOfColumns:a,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:T,containPullFooter:O,containBannerView:F}),H=[];if("function"==typeof i){var D=i();D&&(H.push(l.a.createElement(xn,{key:"bannerView"},l.a.cloneElement(D))),M.containBannerView=!0)}if("function"==typeof v){for(var U=this.getPullHeader(y,N,I),B=this.getPullFooter(g,_,L),W=0;W--u||o[l]!==a[u])return"\n"+o[l].replace(" at new "," at ")}while(1<=l&&0<=u);break}}}finally{tt=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=[],it=-1;function ot(e){return{current:e}}function at(e){0>it||(e.current=rt[it],rt[it]=null,it--)}function lt(e,t){it++,rt[it]=e.current,e.current=t}var ut={},st=ot(ut),ct=ot(!1),ft=ut;function dt(e,t){var n=e.type.contextTypes;if(!n)return ut;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 pt(e){return null!=(e=e.childContextTypes)}function ht(){at(ct),at(st)}function mt(e,t,n){if(st.current!==ut)throw Error(u(168));lt(st,t),lt(ct,n)}function vt(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 yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ut,ft=st.current,lt(st,e),lt(ct,ct.current),!0}function gt(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=vt(e,t,ft),r.__reactInternalMemoizedMergedChildContext=e,at(ct),at(st),lt(st,e)):at(ct),lt(ct,n)}var bt=null,kt=null;(0,l.unstable_now)();var wt=0,St=8;function Et(e){if(0!=(1&e))return St=15,1;if(0!=(2&e))return St=14,2;if(0!=(4&e))return St=13,4;var t=24&e;return 0!==t?(St=12,t):0!=(32&e)?(St=11,32):0!==(t=192&e)?(St=10,t):0!=(256&e)?(St=9,256):0!==(t=3584&e)?(St=8,t):0!=(4096&e)?(St=7,4096):0!==(t=4186112&e)?(St=6,t):0!==(t=62914560&e)?(St=5,t):67108864&e?(St=4,67108864):0!=(134217728&e)?(St=3,134217728):0!==(t=805306368&e)?(St=2,t):0!=(1073741824&e)?(St=1,1073741824):(St=8,e)}function Ct(e,t){var n=e.pendingLanes;if(0===n)return St=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,i=St=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Et(u),i=St):0!==(l&=o)&&(r=Et(l),i=St)}else 0!==(o=n&~a)?(r=Et(o),i=St):0!==l&&(r=Et(l),i=St);if(0===r)return 0;if(r=n&((0>(r=31-At(r))?0:1<n;n++)t.push(e);return t}function _t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-At(t)]=n}var At=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Lt(e)/Rt|0)|0},Lt=Math.log,Rt=Math.LN2;var Tt=l.unstable_runWithPriority,zt=l.unstable_scheduleCallback,Ot=l.unstable_cancelCallback,jt=l.unstable_shouldYield,Ft=l.unstable_requestPaint,Mt=l.unstable_now,Ht=l.unstable_getCurrentPriorityLevel,Ut=l.unstable_ImmediatePriority,Dt=l.unstable_UserBlockingPriority,Bt=l.unstable_NormalPriority,Wt=l.unstable_LowPriority,Vt=l.unstable_IdlePriority,$t={},qt=void 0!==Ft?Ft:function(){},Qt=null,Kt=null,Gt=!1,Yt=Mt(),Xt=1e4>Yt?Mt:function(){return Mt()-Yt};function Jt(){switch(Ht()){case Ut:return 99;case Dt:return 98;case Bt:return 97;case Wt:return 96;case Vt:return 95;default:throw Error(u(332))}}function Zt(e){switch(e){case 99:return Ut;case 98:return Dt;case 97:return Bt;case 96:return Wt;case 95:return Vt;default:throw Error(u(332))}}function en(e,t){return e=Zt(e),Tt(e,t)}function tn(e,t,n){return e=Zt(e),zt(e,t,n)}function nn(){if(null!==Kt){var e=Kt;Kt=null,Ot(e)}rn()}function rn(){if(!Gt&&null!==Qt){Gt=!0;var e=0;try{var t=Qt;en(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,p){var h="object"===t(s)&&null!==s&&s.type===d&&null===s.key;h&&(s=s.props.children);var m="object"===t(s)&&null!==s;if(m)switch(s.$$typeof){case c:e:{for(m=s.key,h=a;null!==h;){if(h.key===m){switch(h.tag){case 7:if(s.type===d){r(i,h.sibling),(a=o(h,s.props.children)).return=i,i=a;break e}break;case 22:if((m=s.type).$$typeof===w&&(m=Hn(m)),m.$$typeof===S&&m._render===h.type._render){r(i,h.sibling),(a=o(h,s.props)).type=m,a.return=i,i=a;break e}default:if(h.elementType===s.type){r(i,h.sibling),(a=o(h,s.props)).ref=Fn(i,h,s),a.return=i,i=a;break e}}r(i,h);break}n(i,h),h=h.sibling}s.type===d?((a=Ha(s.props.children,i.mode,p,s.key)).return=i,i=a):((p=Ma(s.type,s.key,s.props,null,i.mode,p)).ref=Fn(i,a,s),p.return=i,i=p)}return l(i);case f:e:{for(h=s.key;null!==a;){if(a.key===h){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){r(i,a.sibling),(a=o(a,s.children||[])).return=i,i=a;break e}r(i,a);break}n(i,a),a=a.sibling}(a=Ba(s,i.mode,p)).return=i,i=a}return l(i);case w:return e(i,a,(h=s._init)(s._payload),p)}if("string"==typeof s||"number"==typeof s)return s=""+s,null!==a&&6===a.tag?(r(i,a.sibling),(a=o(a,s)).return=i,i=a):(r(i,a),(a=Da(s,i.mode,p)).return=i,i=a),l(i);if(jn(s))return b(i,a,s,p);if(P(s))return k(i,a,s,p);if(m&&Mn(i,s),void 0===s&&!h)switch(i.tag){case 1:case 22:case 0:case 11:case 15:throw Error(u(152,_(i.type)||"Component"))}return r(i,a)}}var Dn=Un(!0),Bn=Un(!1),Wn={},Vn=ot(Wn),$n=ot(Wn),qn=ot(Wn);function Qn(e){if(e===Wn)throw Error(u(174));return e}function Kn(e,t){lt(qn,t),lt($n,e),lt(Vn,Wn),e=F(t),at(Vn),lt(Vn,e)}function Gn(){at(Vn),at($n),at(qn)}function Yn(e){var t=Qn(qn.current),n=Qn(Vn.current);n!==(t=M(n,e.type,t))&&(lt($n,e),lt(Vn,t))}function Xn(e){$n.current===e&&(at(Vn),at($n))}var Jn=ot(0);function Zn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||De(n)||Be(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 er=null,tr=null,nr=!1;function rr(e,t){var n=Oa(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 ir(e,t){switch(e.tag){case 5:return null!==(t=Me(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=He(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:if(null!==(t=Ue(t))){e.memoizedState={dehydrated:t,retryLane:1073741824};var n=Oa(18,null,null,0);return n.stateNode=t,n.return=e,e.child=n,!0}return!1;default:return!1}}function or(e){if(nr){var t=tr;if(t){var n=t;if(!ir(e,t)){if(!(t=Ve(n))||!ir(e,t))return e.flags=-1025&e.flags|2,nr=!1,void(er=e);rr(er,n)}er=e,tr=$e(t)}else e.flags=-1025&e.flags|2,nr=!1,er=e}}function ar(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;er=e}function lr(e){if(!Z||e!==er)return!1;if(!nr)return ar(e),nr=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$(t,e.memoizedProps))for(t=tr;t;)rr(e,t),t=Ve(t);if(ar(e),13===e.tag){if(!Z)throw Error(u(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(u(317));tr=Ge(e)}else tr=er?Ve(e.stateNode):null;return!0}function ur(){Z&&(tr=er=null,nr=!1)}var sr=[];function cr(){for(var e=0;eo))throw Error(u(301));o+=1,vr=mr=null,t.updateQueue=null,fr.current=Yr,e=n(r,i)}while(gr)}if(fr.current=Qr,t=null!==mr&&null!==mr.next,pr=0,vr=mr=hr=null,yr=!1,t)throw Error(u(300));return e}function Sr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~n}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vr?hr.memoizedState=vr=e:vr=vr.next=e,vr}function Cr(){if(null===mr){var e=hr.alternate;e=null!==e?e.memoizedState:null}else e=mr.next;var t=null===vr?hr.memoizedState:vr.next;if(null!==t)vr=t,mr=e;else{if(null===e)throw Error(u(310));e={memoizedState:(mr=e).memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null},null===vr?hr.memoizedState=vr=e:vr=vr.next=e}return vr}function xr(e,t){return"function"==typeof t?t(e):t}function Nr(e){var t=Cr(),n=t.queue;if(null===n)throw Error(u(311));n.lastRenderedReducer=e;var r=mr,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((pr&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,hr.lanes|=c,So|=c}s=s.next}while(null!==s&&s!==i);null===l?o=r:l.next=a,an(r,t.memoizedState)||(Jr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ir(e){var t=Cr(),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);an(o,t.memoizedState)||(Jr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Pr(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=(pr&e)===e)&&(Y?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,sr.push(t))),e)return n(t._source);throw sr.push(t),Error(u(350))}function _r(e,t,n,r){var i=ho;if(null===i)throw Error(u(349));var o=t._getVersion,a=o(t._source),l=fr.current,s=l.useState((function(){return Pr(i,t,n)})),c=s[1],f=s[0];s=vr;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,m=d.source;d=d.subscribe;var v=hr;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!an(a,e)){e=n(t._source),an(f,e)||(c(e),e=Ko(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)})),en(97Io&&(t.flags|=64,i=!0,Ni(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Zn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Ni(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!nr)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Xt()-r.renderingStartTime>Io&&1073741824!==n&&(t.flags|=64,i=!0,Ni(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=Xt(),e.sibling=null,t=Jn.current,lt(Jn,i?1&t|2:1&t),e):null;case 22:return null;case 23:case 24:return ia(),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 Pi(e){switch(e.tag){case 1:pt(e.type)&&ht();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Gn(),at(ct),at(st),cr(),0!=(64&(t=e.flags)))throw Error(u(285));return e.flags=-4097&t|64,e;case 5:return Xn(e),null;case 13:if(at(Jn),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(u(340));ur()}return 4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return at(Jn),null;case 4:return Gn(),null;case 10:return yn(e),null;case 23:case 24:return ia(),null;default:return null}}function _i(e,t){try{var n="",r=t;do{n+=sn(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 Ai(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Li="function"==typeof WeakMap?WeakMap:Map;function Ri(e,t,n){(n=Cn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lo||(Lo=!0,Ro=r),Ai(0,t)},n}function Ti(e,t,n){(n=Cn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return Ai(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===To?To=new Set([this]):To.add(this),Ai(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var zi="function"==typeof WeakSet?WeakSet:Set;function Oi(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 ji(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:cn(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 Fi(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 Mi(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)&&(ba(n,e),ga(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:cn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&Pn(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}Pn(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&&Xe(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(u(163))}function Hi(e,t){if(X)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?Ce(r):Ne(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?xe(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 Ui(e,t){if(kt&&"function"==typeof kt.onCommitFiberUnmount)try{kt.onCommitFiberUnmount(bt,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))ba(t,n);else{r=t;try{i()}catch(e){Sa(r,e)}}n=n.next}while(n!==e)}break;case 1:if(Oi(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:Oi(t);break;case 4:X?$i(e,t):J&&J&&(t=t.stateNode.containerInfo,e=Re(t),Oe(t,e))}}function Di(e,t){for(var n=t;;)if(Ui(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 Bi(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 Wi(e){return 5===e.tag||3===e.tag||4===e.tag}function Vi(e){if(X){e:{for(var t=e.return;null!==t;){if(Wi(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||Wi(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 $i(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)Di(e,i),r?Se(n,i.stateNode):we(n,i.stateNode);else if(18===i.tag)r?Ze(n,i.stateNode):Je(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(Ui(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 qi(e,t){if(X){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Fi(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,Ye(t.containerInfo))));case 12:return;case 13:return Qi(t),void Ki(t);case 19:return void Ki(t);case 17:return;case 23:case 24:return void Hi(t,null!==t.memoizedState)}throw Error(u(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Fi(3,t);case 12:return;case 13:return Qi(t),void Ki(t);case 19:return void Ki(t);case 3:Z&&((n=t.stateNode).hydrate&&(n.hydrate=!1,Ye(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 Qi(e){null!==e.memoizedState&&(No=Xt(),X&&Hi(e.child,!0))}function Ki(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new zi),t.forEach((function(t){var r=Na.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Gi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Yi=0,Xi=1,Ji=2,Zi=3,eo=4;if("function"==typeof Symbol&&Symbol.for){var to=Symbol.for;Yi=to("selector.component"),Xi=to("selector.has_pseudo_class"),Ji=to("selector.role"),Zi=to("selector.test_id"),eo=to("selector.text")}function no(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 ro(e,t){switch(t.$$typeof){case Yi:if(e.type===t.value)return!0;break;case Xi:e:{t=t.value,e=[e,0];for(var n=0;n";case Xi:return":has("+(io(e)||"")+")";case Ji:return'[role="'+e.value+'"]';case eo:return'"'+e.value+'"';case Zi:return'[data-testname="'+e.value+'"]';default:throw Error(u(365,e))}}function oo(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Xt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*uo(n/1960))-n)){e.timeoutHandle=Q(ha.bind(null,e),n);break}ha(e);break;case 5:ha(e);break;default:throw Error(u(329))}}return Xo(e,Xt()),e.callbackNode===t?Jo.bind(null,e):null}function Zo(e,t){for(t&=~Co,t&=~Eo,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!==bo&&(bo=2),s=_i(s,u),p=l;do{switch(p.tag){case 3:a=s,p.flags|=4096,n&=-n,p.lanes|=n,Nn(p,Ri(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===To||!To.has(E)))){p.flags|=4096,n&=-n,p.lanes|=n,Nn(p,Ti(p,a,n));break e}}p=p.return}while(null!==p)}pa(r)}catch(e){n=e,mo===r&&null!==r&&(mo=r=r.return);continue}break}}function la(){var e=so.current;return so.current=Qr,null===e?Qr:e}function ua(){0!==bo&&3!==bo||(bo=4),null===ho||0==(134217727&So)&&0==(134217727&Eo)||Zo(ho,vo)}function sa(e,t){var n=po;po|=16;var r=la();for(ho===e&&vo===t||oa(e,t);;)try{ca();break}catch(t){aa(e,t)}if(mn(),po=n,so.current=r,null!==mo)throw Error(u(261));return ho=null,vo=0,bo}function ca(){for(;null!==mo;)da(mo)}function fa(){for(;null!==mo&&!jt();)da(mo)}function da(e){var t=_o(e.alternate,e,yo);e.memoizedProps=e.pendingProps,null===t?pa(e):mo=t,co.current=null}function pa(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=Ii(n,t,yo)))return void(mo=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&yo)||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),1Xt()-No?oa(e,0):Co|=n),Xo(e,t)}function Ca(e,t){0===t&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Jt()?1:2:(0===Wo&&(Wo=wo),0===(t=It(62914560&~Wo))&&(t=4194304)));var n=Qo();null!==(e=Yo(e,t))&&(_t(e,t,n),Xo(e,n))}function xa(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ca(e,n)}function Na(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}null!==r&&r.delete(t),Ca(e,n)}_o=function(e,n,r){var i=n.lanes;if(null!==e)if(e.memoizedProps!==n.pendingProps||ct.current)Jr=!0;else{if(0==(r&i)){switch(Jr=!1,n.tag){case 3:si(n),ur();break;case 5:Yn(n);break;case 1:pt(n.type)&&yt(n);break;case 4:Kn(n,n.stateNode.containerInfo);break;case 10:vn(n,n.memoizedProps.value);break;case 13:if(null!==(i=n.memoizedState))return null!==i.dehydrated?(lt(Jn,1&Jn.current),n.flags|=64,null):0!=(r&n.child.childLanes)?mi(e,n,r):(lt(Jn,1&Jn.current),null!==(n=Ci(e,n,r))?n.sibling:null);lt(Jn,1&Jn.current);break;case 19:if(i=0!=(r&n.childLanes),0!=(64&e.flags)){if(i)return Ei(e,n,r);n.flags|=64}var o=n.memoizedState;if(null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null),lt(Jn,Jn.current),i)break;return null;case 23:case 24:return n.lanes=0,ri(e,n,r)}return Ci(e,n,r)}Jr=0!=(16384&e.flags)}else Jr=!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=dt(n,st.current),bn(n,r),o=wr(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,pt(i)){var a=!0;yt(n)}else a=!1;n.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Sn(n);var l=i.getDerivedStateFromProps;"function"==typeof l&&An(n,i,l,e),o.updater=Ln,n.stateNode=o,o._reactInternals=n,On(n,i,e,r),n=ui(null,n,i,!0,a,r)}else n.tag=0,Zr(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 ja(e)?1:0;if(null!=e){if((e=e.$$typeof)===y)return 11;if(e===k)return 14;if(e===S)return 22}return 2}(o),l=cn(o,e),a){case 0:n=oi(null,n,o,l,r);break e;case 1:n=li(null,n,o,l,r);break e;case 11:n=ei(null,n,o,l,r);break e;case 14:n=ti(null,n,o,cn(o.type,l),i,r);break e;case 22:n=ai(null,n,o,e,r);break e}throw Error(u(306,o,""))}return n;case 0:return i=n.type,o=n.pendingProps,oi(e,n,i,o=n.elementType===i?o:cn(i,o),r);case 1:return i=n.type,o=n.pendingProps,li(e,n,i,o=n.elementType===i?o:cn(i,o),r);case 3:if(si(n),i=n.updateQueue,null===e||null===i)throw Error(u(282));if(i=n.pendingProps,o=null!==(o=n.memoizedState)?o.element:null,En(e,n),In(n,i,null,r),(i=n.memoizedState.element)===o)ur(),n=Ci(e,n,r);else{if((a=(o=n.stateNode).hydrate)&&(Z?(tr=$e(n.stateNode.containerInfo),er=n,a=nr=!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:Qa,findFiberByHostInstance:e.findFiberByHostInstance||Ka,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{bt=t.inject(e),kt=t}catch(e){}e=!0}return e},i.observeVisibleRects=function(e,t,n,r){if(!ae)throw Error(u(363));e=ao(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=wt;try{return wt=e,t()}finally{wt=n}},i.shouldSuspend=function(){return!1},i.unbatchedUpdates=function(e,t){var n=po;po&=-2,po|=8;try{return e(t)}finally{0===(po=n)&&(Po(),nn())}},i.updateContainer=function(e,t,n,r){var i=t.current,o=Qo(),a=Ko(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(pt(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(pt(s)){n=vt(n,s,l);break e}}n=l}else n=ut;return null===t.context?t.context=n:t.pendingContext=n,(t=Cn(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),xn(i,t),Go(i,a,o),a},i}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/@hippy/react-reconciler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js")},"./node_modules/object-assign/index.js":function(e,t,n){"use strict"; + */e.exports=function(r){var i={},o=n("./node_modules/object-assign/index.js"),a=n("./node_modules/react/index.js"),l=n("./node_modules/scheduler/index.js");function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n--u||o[l]!==a[u])return"\n"+o[l].replace(" at new "," at ")}while(1<=l&&0<=u);break}}}finally{tt=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=[],it=-1;function ot(e){return{current:e}}function at(e){0>it||(e.current=rt[it],rt[it]=null,it--)}function lt(e,t){it++,rt[it]=e.current,e.current=t}var ut={},st=ot(ut),ct=ot(!1),ft=ut;function dt(e,t){var n=e.type.contextTypes;if(!n)return ut;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 pt(e){return null!=(e=e.childContextTypes)}function ht(){at(ct),at(st)}function mt(e,t,n){if(st.current!==ut)throw Error(u(168));lt(st,t),lt(ct,n)}function vt(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 yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ut,ft=st.current,lt(st,e),lt(ct,ct.current),!0}function gt(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=vt(e,t,ft),r.__reactInternalMemoizedMergedChildContext=e,at(ct),at(st),lt(st,e)):at(ct),lt(ct,n)}var bt=null,kt=null;(0,l.unstable_now)();var wt=0,St=8;function Et(e){if(0!=(1&e))return St=15,1;if(0!=(2&e))return St=14,2;if(0!=(4&e))return St=13,4;var t=24&e;return 0!==t?(St=12,t):0!=(32&e)?(St=11,32):0!==(t=192&e)?(St=10,t):0!=(256&e)?(St=9,256):0!==(t=3584&e)?(St=8,t):0!=(4096&e)?(St=7,4096):0!==(t=4186112&e)?(St=6,t):0!==(t=62914560&e)?(St=5,t):67108864&e?(St=4,67108864):0!=(134217728&e)?(St=3,134217728):0!==(t=805306368&e)?(St=2,t):0!=(1073741824&e)?(St=1,1073741824):(St=8,e)}function Ct(e,t){var n=e.pendingLanes;if(0===n)return St=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,i=St=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Et(u),i=St):0!==(l&=o)&&(r=Et(l),i=St)}else 0!==(o=n&~a)?(r=Et(o),i=St):0!==l&&(r=Et(l),i=St);if(0===r)return 0;if(r=n&((0>(r=31-At(r))?0:1<n;n++)t.push(e);return t}function _t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-At(t)]=n}var At=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Lt(e)/Rt|0)|0},Lt=Math.log,Rt=Math.LN2;var Tt=l.unstable_runWithPriority,zt=l.unstable_scheduleCallback,Ot=l.unstable_cancelCallback,jt=l.unstable_shouldYield,Ft=l.unstable_requestPaint,Mt=l.unstable_now,Ht=l.unstable_getCurrentPriorityLevel,Dt=l.unstable_ImmediatePriority,Ut=l.unstable_UserBlockingPriority,Bt=l.unstable_NormalPriority,Wt=l.unstable_LowPriority,Vt=l.unstable_IdlePriority,$t={},qt=void 0!==Ft?Ft:function(){},Qt=null,Kt=null,Gt=!1,Yt=Mt(),Xt=1e4>Yt?Mt:function(){return Mt()-Yt};function Jt(){switch(Ht()){case Dt:return 99;case Ut:return 98;case Bt:return 97;case Wt:return 96;case Vt:return 95;default:throw Error(u(332))}}function Zt(e){switch(e){case 99:return Dt;case 98:return Ut;case 97:return Bt;case 96:return Wt;case 95:return Vt;default:throw Error(u(332))}}function en(e,t){return e=Zt(e),Tt(e,t)}function tn(e,t,n){return e=Zt(e),zt(e,t,n)}function nn(){if(null!==Kt){var e=Kt;Kt=null,Ot(e)}rn()}function rn(){if(!Gt&&null!==Qt){Gt=!0;var e=0;try{var t=Qt;en(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,p){var h="object"===t(s)&&null!==s&&s.type===d&&null===s.key;h&&(s=s.props.children);var m="object"===t(s)&&null!==s;if(m)switch(s.$$typeof){case c:e:{for(m=s.key,h=a;null!==h;){if(h.key===m){switch(h.tag){case 7:if(s.type===d){r(i,h.sibling),(a=o(h,s.props.children)).return=i,i=a;break e}break;case 22:if((m=s.type).$$typeof===w&&(m=Hn(m)),m.$$typeof===S&&m._render===h.type._render){r(i,h.sibling),(a=o(h,s.props)).type=m,a.return=i,i=a;break e}default:if(h.elementType===s.type){r(i,h.sibling),(a=o(h,s.props)).ref=Fn(i,h,s),a.return=i,i=a;break e}}r(i,h);break}n(i,h),h=h.sibling}s.type===d?((a=Ha(s.props.children,i.mode,p,s.key)).return=i,i=a):((p=Ma(s.type,s.key,s.props,null,i.mode,p)).ref=Fn(i,a,s),p.return=i,i=p)}return l(i);case f:e:{for(h=s.key;null!==a;){if(a.key===h){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){r(i,a.sibling),(a=o(a,s.children||[])).return=i,i=a;break e}r(i,a);break}n(i,a),a=a.sibling}(a=Ba(s,i.mode,p)).return=i,i=a}return l(i);case w:return e(i,a,(h=s._init)(s._payload),p)}if("string"==typeof s||"number"==typeof s)return s=""+s,null!==a&&6===a.tag?(r(i,a.sibling),(a=o(a,s)).return=i,i=a):(r(i,a),(a=Ua(s,i.mode,p)).return=i,i=a),l(i);if(jn(s))return b(i,a,s,p);if(P(s))return k(i,a,s,p);if(m&&Mn(i,s),void 0===s&&!h)switch(i.tag){case 1:case 22:case 0:case 11:case 15:throw Error(u(152,_(i.type)||"Component"))}return r(i,a)}}var Un=Dn(!0),Bn=Dn(!1),Wn={},Vn=ot(Wn),$n=ot(Wn),qn=ot(Wn);function Qn(e){if(e===Wn)throw Error(u(174));return e}function Kn(e,t){lt(qn,t),lt($n,e),lt(Vn,Wn),e=F(t),at(Vn),lt(Vn,e)}function Gn(){at(Vn),at($n),at(qn)}function Yn(e){var t=Qn(qn.current),n=Qn(Vn.current);n!==(t=M(n,e.type,t))&&(lt($n,e),lt(Vn,t))}function Xn(e){$n.current===e&&(at(Vn),at($n))}var Jn=ot(0);function Zn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ue(n)||Be(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 er=null,tr=null,nr=!1;function rr(e,t){var n=Oa(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 ir(e,t){switch(e.tag){case 5:return null!==(t=Me(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=He(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:if(null!==(t=De(t))){e.memoizedState={dehydrated:t,retryLane:1073741824};var n=Oa(18,null,null,0);return n.stateNode=t,n.return=e,e.child=n,!0}return!1;default:return!1}}function or(e){if(nr){var t=tr;if(t){var n=t;if(!ir(e,t)){if(!(t=Ve(n))||!ir(e,t))return e.flags=-1025&e.flags|2,nr=!1,void(er=e);rr(er,n)}er=e,tr=$e(t)}else e.flags=-1025&e.flags|2,nr=!1,er=e}}function ar(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;er=e}function lr(e){if(!Z||e!==er)return!1;if(!nr)return ar(e),nr=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$(t,e.memoizedProps))for(t=tr;t;)rr(e,t),t=Ve(t);if(ar(e),13===e.tag){if(!Z)throw Error(u(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(u(317));tr=Ge(e)}else tr=er?Ve(e.stateNode):null;return!0}function ur(){Z&&(tr=er=null,nr=!1)}var sr=[];function cr(){for(var e=0;eo))throw Error(u(301));o+=1,vr=mr=null,t.updateQueue=null,fr.current=Yr,e=n(r,i)}while(gr)}if(fr.current=Qr,t=null!==mr&&null!==mr.next,pr=0,vr=mr=hr=null,yr=!1,t)throw Error(u(300));return e}function Sr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~n}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vr?hr.memoizedState=vr=e:vr=vr.next=e,vr}function Cr(){if(null===mr){var e=hr.alternate;e=null!==e?e.memoizedState:null}else e=mr.next;var t=null===vr?hr.memoizedState:vr.next;if(null!==t)vr=t,mr=e;else{if(null===e)throw Error(u(310));e={memoizedState:(mr=e).memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null},null===vr?hr.memoizedState=vr=e:vr=vr.next=e}return vr}function xr(e,t){return"function"==typeof t?t(e):t}function Nr(e){var t=Cr(),n=t.queue;if(null===n)throw Error(u(311));n.lastRenderedReducer=e;var r=mr,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((pr&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,hr.lanes|=c,So|=c}s=s.next}while(null!==s&&s!==i);null===l?o=r:l.next=a,an(r,t.memoizedState)||(Jr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ir(e){var t=Cr(),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);an(o,t.memoizedState)||(Jr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Pr(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=(pr&e)===e)&&(Y?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,sr.push(t))),e)return n(t._source);throw sr.push(t),Error(u(350))}function _r(e,t,n,r){var i=ho;if(null===i)throw Error(u(349));var o=t._getVersion,a=o(t._source),l=fr.current,s=l.useState((function(){return Pr(i,t,n)})),c=s[1],f=s[0];s=vr;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,m=d.source;d=d.subscribe;var v=hr;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!an(a,e)){e=n(t._source),an(f,e)||(c(e),e=Ko(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)})),en(97Io&&(t.flags|=64,i=!0,Ni(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Zn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Ni(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!nr)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Xt()-r.renderingStartTime>Io&&1073741824!==n&&(t.flags|=64,i=!0,Ni(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=Xt(),e.sibling=null,t=Jn.current,lt(Jn,i?1&t|2:1&t),e):null;case 22:return null;case 23:case 24:return ia(),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 Pi(e){switch(e.tag){case 1:pt(e.type)&&ht();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Gn(),at(ct),at(st),cr(),0!=(64&(t=e.flags)))throw Error(u(285));return e.flags=-4097&t|64,e;case 5:return Xn(e),null;case 13:if(at(Jn),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(u(340));ur()}return 4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return at(Jn),null;case 4:return Gn(),null;case 10:return yn(e),null;case 23:case 24:return ia(),null;default:return null}}function _i(e,t){try{var n="",r=t;do{n+=sn(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 Ai(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Li="function"==typeof WeakMap?WeakMap:Map;function Ri(e,t,n){(n=Cn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lo||(Lo=!0,Ro=r),Ai(0,t)},n}function Ti(e,t,n){(n=Cn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return Ai(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===To?To=new Set([this]):To.add(this),Ai(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var zi="function"==typeof WeakSet?WeakSet:Set;function Oi(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 ji(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:cn(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 Fi(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 Mi(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)&&(ba(n,e),ga(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:cn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&Pn(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}Pn(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&&Xe(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(u(163))}function Hi(e,t){if(X)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?Ce(r):Ne(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?xe(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 Di(e,t){if(kt&&"function"==typeof kt.onCommitFiberUnmount)try{kt.onCommitFiberUnmount(bt,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))ba(t,n);else{r=t;try{i()}catch(e){Sa(r,e)}}n=n.next}while(n!==e)}break;case 1:if(Oi(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:Oi(t);break;case 4:X?$i(e,t):J&&J&&(t=t.stateNode.containerInfo,e=Re(t),Oe(t,e))}}function Ui(e,t){for(var n=t;;)if(Di(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 Bi(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 Wi(e){return 5===e.tag||3===e.tag||4===e.tag}function Vi(e){if(X){e:{for(var t=e.return;null!==t;){if(Wi(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||Wi(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 $i(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)Ui(e,i),r?Se(n,i.stateNode):we(n,i.stateNode);else if(18===i.tag)r?Ze(n,i.stateNode):Je(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(Di(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 qi(e,t){if(X){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Fi(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,Ye(t.containerInfo))));case 12:return;case 13:return Qi(t),void Ki(t);case 19:return void Ki(t);case 17:return;case 23:case 24:return void Hi(t,null!==t.memoizedState)}throw Error(u(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Fi(3,t);case 12:return;case 13:return Qi(t),void Ki(t);case 19:return void Ki(t);case 3:Z&&((n=t.stateNode).hydrate&&(n.hydrate=!1,Ye(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 Qi(e){null!==e.memoizedState&&(No=Xt(),X&&Hi(e.child,!0))}function Ki(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new zi),t.forEach((function(t){var r=Na.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Gi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Yi=0,Xi=1,Ji=2,Zi=3,eo=4;if("function"==typeof Symbol&&Symbol.for){var to=Symbol.for;Yi=to("selector.component"),Xi=to("selector.has_pseudo_class"),Ji=to("selector.role"),Zi=to("selector.test_id"),eo=to("selector.text")}function no(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 ro(e,t){switch(t.$$typeof){case Yi:if(e.type===t.value)return!0;break;case Xi:e:{t=t.value,e=[e,0];for(var n=0;n";case Xi:return":has("+(io(e)||"")+")";case Ji:return'[role="'+e.value+'"]';case eo:return'"'+e.value+'"';case Zi:return'[data-testname="'+e.value+'"]';default:throw Error(u(365,e))}}function oo(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Xt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*uo(n/1960))-n)){e.timeoutHandle=Q(ha.bind(null,e),n);break}ha(e);break;case 5:ha(e);break;default:throw Error(u(329))}}return Xo(e,Xt()),e.callbackNode===t?Jo.bind(null,e):null}function Zo(e,t){for(t&=~Co,t&=~Eo,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!==bo&&(bo=2),s=_i(s,u),p=l;do{switch(p.tag){case 3:a=s,p.flags|=4096,n&=-n,p.lanes|=n,Nn(p,Ri(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===To||!To.has(E)))){p.flags|=4096,n&=-n,p.lanes|=n,Nn(p,Ti(p,a,n));break e}}p=p.return}while(null!==p)}pa(r)}catch(e){n=e,mo===r&&null!==r&&(mo=r=r.return);continue}break}}function la(){var e=so.current;return so.current=Qr,null===e?Qr:e}function ua(){0!==bo&&3!==bo||(bo=4),null===ho||0==(134217727&So)&&0==(134217727&Eo)||Zo(ho,vo)}function sa(e,t){var n=po;po|=16;var r=la();for(ho===e&&vo===t||oa(e,t);;)try{ca();break}catch(t){aa(e,t)}if(mn(),po=n,so.current=r,null!==mo)throw Error(u(261));return ho=null,vo=0,bo}function ca(){for(;null!==mo;)da(mo)}function fa(){for(;null!==mo&&!jt();)da(mo)}function da(e){var t=_o(e.alternate,e,yo);e.memoizedProps=e.pendingProps,null===t?pa(e):mo=t,co.current=null}function pa(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=Ii(n,t,yo)))return void(mo=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&yo)||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),1Xt()-No?oa(e,0):Co|=n),Xo(e,t)}function Ca(e,t){0===t&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Jt()?1:2:(0===Wo&&(Wo=wo),0===(t=It(62914560&~Wo))&&(t=4194304)));var n=Qo();null!==(e=Yo(e,t))&&(_t(e,t,n),Xo(e,n))}function xa(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ca(e,n)}function Na(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}null!==r&&r.delete(t),Ca(e,n)}_o=function(e,n,r){var i=n.lanes;if(null!==e)if(e.memoizedProps!==n.pendingProps||ct.current)Jr=!0;else{if(0==(r&i)){switch(Jr=!1,n.tag){case 3:si(n),ur();break;case 5:Yn(n);break;case 1:pt(n.type)&&yt(n);break;case 4:Kn(n,n.stateNode.containerInfo);break;case 10:vn(n,n.memoizedProps.value);break;case 13:if(null!==(i=n.memoizedState))return null!==i.dehydrated?(lt(Jn,1&Jn.current),n.flags|=64,null):0!=(r&n.child.childLanes)?mi(e,n,r):(lt(Jn,1&Jn.current),null!==(n=Ci(e,n,r))?n.sibling:null);lt(Jn,1&Jn.current);break;case 19:if(i=0!=(r&n.childLanes),0!=(64&e.flags)){if(i)return Ei(e,n,r);n.flags|=64}var o=n.memoizedState;if(null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null),lt(Jn,Jn.current),i)break;return null;case 23:case 24:return n.lanes=0,ri(e,n,r)}return Ci(e,n,r)}Jr=0!=(16384&e.flags)}else Jr=!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=dt(n,st.current),bn(n,r),o=wr(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,pt(i)){var a=!0;yt(n)}else a=!1;n.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Sn(n);var l=i.getDerivedStateFromProps;"function"==typeof l&&An(n,i,l,e),o.updater=Ln,n.stateNode=o,o._reactInternals=n,On(n,i,e,r),n=ui(null,n,i,!0,a,r)}else n.tag=0,Zr(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 ja(e)?1:0;if(null!=e){if((e=e.$$typeof)===y)return 11;if(e===k)return 14;if(e===S)return 22}return 2}(o),l=cn(o,e),a){case 0:n=oi(null,n,o,l,r);break e;case 1:n=li(null,n,o,l,r);break e;case 11:n=ei(null,n,o,l,r);break e;case 14:n=ti(null,n,o,cn(o.type,l),i,r);break e;case 22:n=ai(null,n,o,e,r);break e}throw Error(u(306,o,""))}return n;case 0:return i=n.type,o=n.pendingProps,oi(e,n,i,o=n.elementType===i?o:cn(i,o),r);case 1:return i=n.type,o=n.pendingProps,li(e,n,i,o=n.elementType===i?o:cn(i,o),r);case 3:if(si(n),i=n.updateQueue,null===e||null===i)throw Error(u(282));if(i=n.pendingProps,o=null!==(o=n.memoizedState)?o.element:null,En(e,n),In(n,i,null,r),(i=n.memoizedState.element)===o)ur(),n=Ci(e,n,r);else{if((a=(o=n.stateNode).hydrate)&&(Z?(tr=$e(n.stateNode.containerInfo),er=n,a=nr=!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:Qa,findFiberByHostInstance:e.findFiberByHostInstance||Ka,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{bt=t.inject(e),kt=t}catch(e){}e=!0}return e},i.observeVisibleRects=function(e,t,n,r){if(!ae)throw Error(u(363));e=ao(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=wt;try{return wt=e,t()}finally{wt=n}},i.shouldSuspend=function(){return!1},i.unbatchedUpdates=function(e,t){var n=po;po&=-2,po|=8;try{return e(t)}finally{0===(po=n)&&(Po(),nn())}},i.updateContainer=function(e,t,n,r){var i=t.current,o=Qo(),a=Ko(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(pt(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(pt(s)){n=vt(n,s,l);break e}}n=l}else n=ut;return null===t.context?t.context=n:t.pendingContext=n,(t=Cn(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),xn(i,t),Go(i,a,o),a},i}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/@hippy/react-reconciler/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js")},"./node_modules/object-assign/index.js":function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus diff --git a/hippy.podspec b/hippy.podspec index 010b7870e7e..bb25a3757a4 100644 --- a/hippy.podspec +++ b/hippy.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'hippy' - s.version = '2.16.3' + s.version = '2.16.4' s.summary = 'Hippy Cross Platform Framework' s.description = <<-DESC Hippy is designed for developers to easily build cross-platform and high-performance awesome apps. diff --git a/ios/sdk/base/HippyBridge.mm b/ios/sdk/base/HippyBridge.mm index 5e3d56bcf4b..b85ac7aaf81 100644 --- a/ios/sdk/base/HippyBridge.mm +++ b/ios/sdk/base/HippyBridge.mm @@ -43,7 +43,7 @@ NSString *const HippyJavaScriptDidFailToLoadNotification = @"HippyJavaScriptDidFailToLoadNotification"; NSString *const HippyDidInitializeModuleNotification = @"HippyDidInitializeModuleNotification"; NSString *const HippyBusinessDidLoadNotification = @"HippyBusinessDidLoadNotification"; -NSString *const _HippySDKVersion = @"2.16.3"; +NSString *const _HippySDKVersion = @"2.16.4"; static NSMutableArray *HippyModuleClasses; NSArray *HippyGetModuleClasses(void) { diff --git a/lerna.json b/lerna.json index 9bd4d83781c..720de2cd84e 100644 --- a/lerna.json +++ b/lerna.json @@ -3,6 +3,6 @@ "packages": [ "packages/*" ], - "version": "2.16.3", + "version": "2.16.4", "tagVersionPrefix": "" } diff --git a/packages/hippy-react-web/CHANGELOG.md b/packages/hippy-react-web/CHANGELOG.md index 98eb1830cb1..2c4bb307cc5 100644 --- a/packages/hippy-react-web/CHANGELOG.md +++ b/packages/hippy-react-web/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/react-web + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/react-web diff --git a/packages/hippy-react-web/package-lock.json b/packages/hippy-react-web/package-lock.json index 2734895f84c..6e64a115ec9 100644 --- a/packages/hippy-react-web/package-lock.json +++ b/packages/hippy-react-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/react-web", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/react-web", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "@hippy/rmc-list-view": "^1.0.0", diff --git a/packages/hippy-react-web/package.json b/packages/hippy-react-web/package.json index efc0362f6ab..729b461a4cc 100644 --- a/packages/hippy-react-web/package.json +++ b/packages/hippy-react-web/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/react-web", - "version": "2.16.3", + "version": "2.16.4", "description": "Web Adapter for Hippy React", "main": "dist/cjs/index.js", "module": "dist/index.js", diff --git a/packages/hippy-react/CHANGELOG.md b/packages/hippy-react/CHANGELOG.md index 435db93a6db..dcd4fd9b044 100644 --- a/packages/hippy-react/CHANGELOG.md +++ b/packages/hippy-react/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + + +### Features + +* **react,vue:** show nodeId in debug mode ([68f9c02](https://github.com/Tencent/Hippy/commit/68f9c02829b26df7fbef545bfe2a3dad3a817e3b)) + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/react diff --git a/packages/hippy-react/package-lock.json b/packages/hippy-react/package-lock.json index b4dd6ac44bc..4863be7d7eb 100644 --- a/packages/hippy-react/package-lock.json +++ b/packages/hippy-react/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/react", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/react", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "@hippy/react-reconciler": "react17", diff --git a/packages/hippy-react/package.json b/packages/hippy-react/package.json index 2e9de8b7a18..a34cde29ecf 100644 --- a/packages/hippy-react/package.json +++ b/packages/hippy-react/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/react", - "version": "2.16.3", + "version": "2.16.4", "description": "Hippy react framework", "main": "dist/index.js", "homepage": "https://hippyjs.org", diff --git a/packages/hippy-vue-css-loader/CHANGELOG.md b/packages/hippy-vue-css-loader/CHANGELOG.md index 94b768e067a..e4d73b1979a 100644 --- a/packages/hippy-vue-css-loader/CHANGELOG.md +++ b/packages/hippy-vue-css-loader/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/vue-css-loader + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/vue-css-loader diff --git a/packages/hippy-vue-css-loader/package-lock.json b/packages/hippy-vue-css-loader/package-lock.json index 8c536459e16..5c3dee3a0a3 100644 --- a/packages/hippy-vue-css-loader/package-lock.json +++ b/packages/hippy-vue-css-loader/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/vue-css-loader", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/vue-css-loader", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "loader-utils": "^2.0.4" diff --git a/packages/hippy-vue-css-loader/package.json b/packages/hippy-vue-css-loader/package.json index c6985fcaeed..7c853c0f724 100644 --- a/packages/hippy-vue-css-loader/package.json +++ b/packages/hippy-vue-css-loader/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-css-loader", - "version": "2.16.3", + "version": "2.16.4", "description": "hippy-vue style loader module for webpack", "main": "dist/css-loader.js", "homepage": "https://hippyjs.org", diff --git a/packages/hippy-vue-loader/CHANGELOG.md b/packages/hippy-vue-loader/CHANGELOG.md index dd44bfb3b27..e9c4fede02c 100644 --- a/packages/hippy-vue-loader/CHANGELOG.md +++ b/packages/hippy-vue-loader/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/vue-loader + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/vue-loader diff --git a/packages/hippy-vue-loader/package.json b/packages/hippy-vue-loader/package.json index 7bb57758aed..ea7be77536a 100644 --- a/packages/hippy-vue-loader/package.json +++ b/packages/hippy-vue-loader/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-loader", - "version": "2.16.3", + "version": "2.16.4", "description": "Vue single-file component loader for Webpack", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/hippy-vue-native-components/CHANGELOG.md b/packages/hippy-vue-native-components/CHANGELOG.md index f98649b78cd..228d41abc3b 100644 --- a/packages/hippy-vue-native-components/CHANGELOG.md +++ b/packages/hippy-vue-native-components/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/vue-native-components + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/vue-native-components diff --git a/packages/hippy-vue-native-components/package.json b/packages/hippy-vue-native-components/package.json index caa71e07952..3a88413f228 100644 --- a/packages/hippy-vue-native-components/package.json +++ b/packages/hippy-vue-native-components/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-native-components", - "version": "2.16.3", + "version": "2.16.4", "description": "Native components middleware for Hippy-Vue, the components only for native, can't compatible with web.", "main": "dist/index.js", "homepage": "https://hippyjs.org", diff --git a/packages/hippy-vue-next-style-parser/CHANGELOG.md b/packages/hippy-vue-next-style-parser/CHANGELOG.md index 1d927b16023..b9f44007877 100644 --- a/packages/hippy-vue-next-style-parser/CHANGELOG.md +++ b/packages/hippy-vue-next-style-parser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/hippy-vue-next-style-parser + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/hippy-vue-next-style-parser diff --git a/packages/hippy-vue-next-style-parser/package-lock.json b/packages/hippy-vue-next-style-parser/package-lock.json index 4b3ecdaa21c..3c431c2382b 100644 --- a/packages/hippy-vue-next-style-parser/package-lock.json +++ b/packages/hippy-vue-next-style-parser/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/hippy-vue-next-style-parser", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/hippy-vue-next-style-parser", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "@vue/shared": "^3.2.21" diff --git a/packages/hippy-vue-next-style-parser/package.json b/packages/hippy-vue-next-style-parser/package.json index 515409abcaf..2ed257fa8b8 100644 --- a/packages/hippy-vue-next-style-parser/package.json +++ b/packages/hippy-vue-next-style-parser/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/hippy-vue-next-style-parser", - "version": "2.16.3", + "version": "2.16.4", "description": "A css subset parser for hippy-vue-next", "author": "OpenHippy Team", "homepage": "https://hippyjs.org", diff --git a/packages/hippy-vue-next/CHANGELOG.md b/packages/hippy-vue-next/CHANGELOG.md index f41a70f9a6d..0548172b937 100644 --- a/packages/hippy-vue-next/CHANGELOG.md +++ b/packages/hippy-vue-next/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + + +### Bug Fixes + +* **vue:** remove redundant props & perf cache logic ([d635977](https://github.com/Tencent/Hippy/commit/d635977224f9e4e0f68f07fc2b70a0f429dfe660)) + + +### Features + +* **react,vue:** show nodeId in debug mode ([68f9c02](https://github.com/Tencent/Hippy/commit/68f9c02829b26df7fbef545bfe2a3dad3a817e3b)) + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/vue-next diff --git a/packages/hippy-vue-next/package-lock.json b/packages/hippy-vue-next/package-lock.json index 3b659779932..dcc8a92d145 100644 --- a/packages/hippy-vue-next/package-lock.json +++ b/packages/hippy-vue-next/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/vue-next", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/vue-next", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "@vue/runtime-core": "^3.2.21", diff --git a/packages/hippy-vue-next/package.json b/packages/hippy-vue-next/package.json index c70f423a6de..5da6cb30e77 100644 --- a/packages/hippy-vue-next/package.json +++ b/packages/hippy-vue-next/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-next", - "version": "2.16.3", + "version": "2.16.4", "description": "Vue-Next binding for Hippy native framework", "author": "OpenHippy Team", "homepage": "https://hippyjs.org", diff --git a/packages/hippy-vue-router/CHANGELOG.md b/packages/hippy-vue-router/CHANGELOG.md index 63686554403..1679fef8271 100644 --- a/packages/hippy-vue-router/CHANGELOG.md +++ b/packages/hippy-vue-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/vue-router + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/vue-router diff --git a/packages/hippy-vue-router/package-lock.json b/packages/hippy-vue-router/package-lock.json index d77e260a24e..87c2656e6f9 100644 --- a/packages/hippy-vue-router/package-lock.json +++ b/packages/hippy-vue-router/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/vue-router", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/vue-router", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "devDependencies": { "path-to-regexp": "^1.7.0" diff --git a/packages/hippy-vue-router/package.json b/packages/hippy-vue-router/package.json index 7a8b27b4d89..34875f58847 100644 --- a/packages/hippy-vue-router/package.json +++ b/packages/hippy-vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue-router", - "version": "2.16.3", + "version": "2.16.4", "description": "Official router for hippy-vue", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/hippy-vue/CHANGELOG.md b/packages/hippy-vue/CHANGELOG.md index 11d302beddf..9253d3a109f 100644 --- a/packages/hippy-vue/CHANGELOG.md +++ b/packages/hippy-vue/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + + +### Bug Fixes + +* **vue:** support static style diff in updateNode ([1f4abfd](https://github.com/Tencent/Hippy/commit/1f4abfd6ad2f6c71e16bc2a8237c10b0a85f0ab2)) + + +### Features + +* **react,vue:** show nodeId in debug mode ([68f9c02](https://github.com/Tencent/Hippy/commit/68f9c02829b26df7fbef545bfe2a3dad3a817e3b)) + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) diff --git a/packages/hippy-vue/package-lock.json b/packages/hippy-vue/package-lock.json index a72edafd64a..d3246df3710 100644 --- a/packages/hippy-vue/package-lock.json +++ b/packages/hippy-vue/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/vue", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/vue", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "devDependencies": { "ansi-regex": "^5.0.1", diff --git a/packages/hippy-vue/package.json b/packages/hippy-vue/package.json index 7f63c7c3aab..672ffb06652 100644 --- a/packages/hippy-vue/package.json +++ b/packages/hippy-vue/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/vue", - "version": "2.16.3", + "version": "2.16.4", "description": "Vue binding for Hippy native framework", "author": "OpenHippy Team", "license": "Apache-2.0", diff --git a/packages/hippy-web-renderer/CHANGELOG.md b/packages/hippy-web-renderer/CHANGELOG.md index 04622cb72c3..f7dd9e5905f 100644 --- a/packages/hippy-web-renderer/CHANGELOG.md +++ b/packages/hippy-web-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.4](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.4) (2023-05-25) + +**Note:** Version bump only for package @hippy/web-renderer + + + + + ## [2.16.3](https://github.com/Tencent/Hippy/compare/2.16.2...2.16.3) (2023-04-24) **Note:** Version bump only for package @hippy/web-renderer diff --git a/packages/hippy-web-renderer/package-lock.json b/packages/hippy-web-renderer/package-lock.json index 9f47973230a..bb9537794f7 100644 --- a/packages/hippy-web-renderer/package-lock.json +++ b/packages/hippy-web-renderer/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hippy/web-renderer", - "version": "2.16.3", + "version": "2.16.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hippy/web-renderer", - "version": "2.16.3", + "version": "2.16.4", "license": "Apache-2.0", "dependencies": { "@types/hammerjs": "^2.0.41", diff --git a/packages/hippy-web-renderer/package.json b/packages/hippy-web-renderer/package.json index 52261ecb588..bc20c0466b7 100644 --- a/packages/hippy-web-renderer/package.json +++ b/packages/hippy-web-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@hippy/web-renderer", - "version": "2.16.3", + "version": "2.16.4", "description": "hippy web renderer", "main": "./dist/index.js", "homepage": "https://hippyjs.org",