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B,OAAyB,IAAjB,EAA6B,CAAC,EAAI,EAG1C,EAAY,OAAO,OAAO,CAAC,EAAG,EAAO,UAAW,EAAM,MAAM,MAAQ,CAAE,MAAO,EAAM,MAAM,OAAU,CAAC,EAAG,EAAM,MAAM,OAAS,CAAE,OAAQ,EAAM,MAAM,QAAW,CAAC,GAClK,OAAO,EAAI,KAAK,eACd,UAAU,KACV,CACE,MAAO,CAAC,EAAO,KAAM,GACrB,cAAc,EACd,gBAAgB,EAChB,QAAS,EACT,OAAQ,KAAK,OACb,OAAQ,KAAK,OACb,YAAa,KAAK,UAClB,IAAK,SAEP,EAAI,KAAK,eACP,UAAU,KACV,CAAE,MAAO,IACT,EAAI,KAAK,eAAe,UAAU,MAAO,CACvC,OAAQ,CAAE,IAAK,EAAM,KACrB,MAAO,CAAC,EAAO,MAAO,EAAM,OAC5B,WAAY,QACZ,QAAS,cAIjB,KAGK,CACT,CApHoB,GAsHpB,cAAc,UAAY,CACxB,WAAY,KAAK,UAAU,IAC3B,MAAO,KAAK,UAAU,IACtB,MAAO,KAAK,UAAU,IACtB,OAAQ,KAAK,UAAU,KACvB,OAAQ,KAAK,UAAU,MAGzB,cAAc,aAAe,CAC3B,WAAY,CAAC,EACb,MAAO,CAAC,EACR,MAAO,CAAC,EACR,SAAS,EACT,OAAQ,WAAmB,EAC3B,OAAQ,WAAmB,GAE7B,cAAc,YAAc,gBAC5B,IAAI,oBAAsB,aAAa,SAAS,QAAtB,CAA+B,eAEzD,QAAQ,QAAU,oBAClB,OAAO,QAAU,QAAiB","file":"/npm/nuke-biz-custom-loading@1.0.3/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/nuke-biz-custom-loading@1.0.3/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _rax = require('rax');\n\nvar _weexNuke = require('weex-nuke');\n\nvar _styles = require('./styles');\n\nvar _styles2 = _interopRequireDefault(_styles);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** @jsx createElement */\n\n\nvar connectStyle = _weexNuke.ThemeProvider.connectStyle;\nvar isWeb = _weexNuke.Env.isWeb;\n\nvar CustomLoading = function (_Component) {\n  _inherits(CustomLoading, _Component);\n\n  function CustomLoading(props) {\n    _classCallCheck(this, CustomLoading);\n\n    var _this = _possibleConstructorReturn(this, (CustomLoading.__proto__ || Object.getPrototypeOf(CustomLoading)).call(this, props));\n\n    var defaultVisible = props.defaultVisible;\n    _this.state = {\n      shown: defaultVisible\n    };\n    _this.show = _this.show.bind(_this);\n    _this.hide = _this.hide.bind(_this);\n    _this.onShow = _this.onShow.bind(_this);\n    _this.onHide = _this.onHide.bind(_this);\n    return _this;\n  }\n\n  _createClass(CustomLoading, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.loading = this.refs.mask;\n      if (this.state.shown) {\n        this.show();\n      }\n    }\n  }, {\n    key: 'shouldComponentUpdate',\n    value: function shouldComponentUpdate(nextProps, nextState) {\n      return nextState.shown !== this.state.shown;\n    }\n  }, {\n    key: 'onShow',\n    value: function onShow() {\n      this.props.onShow && this.props.onShow();\n    }\n  }, {\n    key: 'onHide',\n    value: function onHide() {\n      this.setState({\n        shown: false\n      });\n      this.props.onHide && this.props.onHide();\n    }\n  }, {\n    key: 'show',\n    value: function show() {\n      if (this.loading) {\n        this.setState({\n          shown: true\n        });\n        this.loading.show && this.loading.show();\n      }\n    }\n  }, {\n    key: 'hide',\n    value: function hide() {\n      if (this.loading) {\n        this.loading.hide && this.loading.hide();\n      }\n    }\n  }, {\n    key: 'wrapPress',\n    value: function wrapPress(e) {\n      if (isWeb) {\n        e.stopPropagation();\n      }\n    }\n  }, {\n    key: 'touchMove',\n    value: function touchMove(e) {\n      if (isWeb) {\n        e.preventDefault();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var styles = this.props.themeStyle;\n      var _props = this.props,\n          _props$image = _props.image,\n          image = _props$image === undefined ? { style: {} } : _props$image,\n          animate = _props.animate,\n          _props$style = _props.style,\n          style = _props$style === undefined ? {} : _props$style;\n\n\n      var imageWrap = Object.assign({}, styles.imageWrap, image.style.width ? { width: image.style.width } : {}, image.style.height ? { height: image.style.height } : {});\n      return (0, _rax.createElement)(\n        _weexNuke.Mask,\n        {\n          style: [styles.mask, style],\n          maskClosable: false,\n          defaultVisible: false,\n          animate: animate,\n          onShow: this.onShow,\n          onHide: this.onHide,\n          onTouchmove: this.touchMove,\n          ref: 'mask'\n        },\n        (0, _rax.createElement)(\n          _weexNuke.View,\n          { style: imageWrap },\n          (0, _rax.createElement)(_weexNuke.Image, {\n            source: { uri: image.uri },\n            style: [styles.image, image.style],\n            resizeMode: 'cover',\n            quality: 'original'\n          })\n        )\n      );\n    }\n  }]);\n\n  return CustomLoading;\n}(_rax.Component);\n\nCustomLoading.propTypes = {\n  themeStyle: _rax.PropTypes.any,\n  style: _rax.PropTypes.any,\n  image: _rax.PropTypes.any,\n  onHide: _rax.PropTypes.func,\n  onShow: _rax.PropTypes.func\n};\n\nCustomLoading.defaultProps = {\n  themeStyle: {},\n  image: {},\n  style: {},\n  animate: true,\n  onHide: function onHide() {},\n  onShow: function onShow() {}\n};\nCustomLoading.displayName = 'CustomLoading';\nvar StyledCustomLoading = connectStyle(_styles2.default)(CustomLoading);\n\nexports.default = StyledCustomLoading;\nmodule.exports = exports['default'];"]}