@tarojs/components-react 3.5.0-canary.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,11 @@
1
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
2
  import _createClass from '@babel/runtime/helpers/createClass';
3
- import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
4
3
  import _inherits from '@babel/runtime/helpers/inherits';
5
4
  import _createSuper from '@babel/runtime/helpers/createSuper';
6
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
7
5
  import '../weui.js';
8
- import React from 'react';
9
6
  import { s as styleInject, c as classNames } from '../index.js';
7
+ import React from 'react';
8
+ import { t as throttle } from '../index2.js';
10
9
  import '@babel/runtime/helpers/typeof';
11
10
 
12
11
  var css_248z = ".taro-scroll {\n -webkit-overflow-scrolling: auto;\n}\n\n.taro-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.taro-scroll-view {\n overflow: hidden;\n}\n\n.taro-scroll-view__scroll-x {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.taro-scroll-view__scroll-y {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n";
@@ -46,24 +45,10 @@ function easeOutScroll() {
46
45
  step();
47
46
  }
48
47
 
49
- function throttle(fn, delay) {
50
- var timer = null;
51
- return function () {
52
- for (var _len = arguments.length, arrs = new Array(_len), _key = 0; _key < _len; _key++) {
53
- arrs[_key] = arguments[_key];
54
- }
55
-
56
- clearTimeout(timer);
57
- timer = setTimeout(function () {
58
- fn.apply(void 0, arrs);
59
- }, delay);
60
- };
61
- }
62
-
63
48
  function scrollIntoView(id) {
64
- var _document$querySelect;
49
+ var _a;
65
50
 
66
- (_document$querySelect = document.querySelector("#".concat(id))) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.scrollIntoView({
51
+ (_a = document.querySelector("#".concat(id))) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
67
52
  behavior: 'smooth',
68
53
  block: 'center',
69
54
  inline: 'start'
@@ -108,21 +93,14 @@ var ScrollView = /*#__PURE__*/function (_React$Component) {
108
93
 
109
94
  _classCallCheck(this, ScrollView);
110
95
 
111
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
112
- args[_key2] = arguments[_key2];
113
- }
114
-
115
- _this3 = _super.call.apply(_super, [this].concat(args));
116
-
117
- _defineProperty(_assertThisInitialized(_this3), "_scrollTop", null);
96
+ _this3 = _super.apply(this, arguments);
97
+ _this3._scrollTop = null;
98
+ _this3._scrollLeft = null;
99
+ _this3.container = null;
118
100
 
119
- _defineProperty(_assertThisInitialized(_this3), "_scrollLeft", null);
120
-
121
- _defineProperty(_assertThisInitialized(_this3), "container", null);
122
-
123
- _defineProperty(_assertThisInitialized(_this3), "onTouchMove", function (e) {
101
+ _this3.onTouchMove = function (e) {
124
102
  e.stopPropagation();
125
- });
103
+ };
126
104
 
127
105
  return _this3;
128
106
  }
@@ -205,7 +183,7 @@ var ScrollView = /*#__PURE__*/function (_React$Component) {
205
183
  upperThreshold = Number(upperThreshold);
206
184
  lowerThreshold = Number(lowerThreshold);
207
185
 
208
- var uperAndLower = function uperAndLower(e) {
186
+ var upperAndLower = function upperAndLower(e) {
209
187
  if (!_this5.container) return;
210
188
  var _this5$container = _this5.container,
211
189
  offsetWidth = _this5$container.offsetWidth,
@@ -224,7 +202,7 @@ var ScrollView = /*#__PURE__*/function (_React$Component) {
224
202
  }
225
203
  };
226
204
 
227
- var uperAndLowerThrottle = throttle(uperAndLower, 200);
205
+ var upperAndLowerThrottle = throttle(upperAndLower, 200);
228
206
 
229
207
  var _onScroll = function _onScroll(e) {
230
208
  var _this5$container2 = _this5.container,
@@ -244,7 +222,7 @@ var ScrollView = /*#__PURE__*/function (_React$Component) {
244
222
  scrollWidth: scrollWidth
245
223
  }
246
224
  });
247
- uperAndLowerThrottle(e);
225
+ upperAndLowerThrottle(e);
248
226
  onScroll && onScroll(e);
249
227
  };
250
228
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/scroll-view/index.tsx"],"sourcesContent":["import 'weui'\nimport React from 'react'\n// import omit from 'omit.js'\nimport classNames from 'classnames'\nimport './style/index.css'\n\nfunction easeOutScroll (from = 0, to = 0, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n const change = to - from\n const dur = 500\n const sTime = +new Date()\n function linear (t, b, c, d) {\n return c * t / d + b\n }\n const isLarger = to >= from\n\n function step () {\n from = linear(+new Date() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n step()\n}\nfunction throttle (fn, delay) {\n let timer: any = null\n return function (...arrs) {\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn(...arrs)\n }, delay)\n }\n}\nfunction scrollIntoView (id) {\n document.querySelector(`#${id}`)?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'start'\n })\n}\nfunction scrollVertical (top, isAnimation) {\n if (isAnimation) {\n easeOutScroll(this._scrollTop, top, pos => {\n if (this.container) this.container.scrollTop = pos\n })\n } else {\n if (this.container) this.container.scrollTop = top\n }\n this._scrollTop = top\n}\nfunction scrollHorizontal (left, isAnimation) {\n if (isAnimation) {\n easeOutScroll(this._scrollLeft, left, pos => {\n if (this.container) this.container.scrollLeft = pos\n })\n } else {\n if (this.container) this.container.scrollLeft = left\n }\n this._scrollLeft = left\n}\n\ninterface IProps {\n className?: string\n style?: Record<string, string>\n scrollX: boolean\n scrollY: boolean\n upperThreshold: number\n lowerThreshold: number\n scrollTop: number\n scrollLeft: number\n scrollIntoView?: string\n scrollWithAnimation: boolean\n enableBackToTop ?: boolean\n onScrollToUpper: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScrollToLower: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScroll: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onTouchMove: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n\n}\n\nclass ScrollView extends React.Component<IProps> {\n _scrollTop: any = null\n _scrollLeft: any = null\n container: any = null\n\n onTouchMove = e => {\n e.stopPropagation()\n }\n\n componentDidMount () {\n this.handleScroll(this.props, true)\n }\n\n UNSAFE_componentWillReceiveProps (nextProps) {\n this.handleScroll(nextProps)\n }\n\n handleScroll (props, isInit = false) {\n // scrollIntoView\n if (\n props.scrollIntoView &&\n typeof props.scrollIntoView === 'string' &&\n document &&\n document.querySelector &&\n document.querySelector(`#${props.scrollIntoView}`)\n ) {\n if (isInit) {\n setTimeout(() => scrollIntoView(props.scrollIntoView), 500)\n } else {\n scrollIntoView(props.scrollIntoView)\n }\n } else {\n const isAnimation = 'scrollWithAnimation' in props\n // Y 轴滚动\n if (\n props.scrollY &&\n typeof props.scrollTop === 'number' &&\n props.scrollTop !== this._scrollTop\n ) {\n if (isInit) {\n setTimeout(() => scrollVertical.bind(this)(props.scrollTop, isAnimation), 10)\n } else {\n scrollVertical.bind(this)(props.scrollTop, isAnimation)\n }\n }\n // X 轴滚动\n if (\n props.scrollX &&\n typeof props.scrollLeft === 'number' &&\n props.scrollLeft !== this._scrollLeft\n ) {\n if (isInit) {\n setTimeout(() => scrollHorizontal.bind(this)(props.scrollLeft, isAnimation), 10)\n } else {\n scrollHorizontal.bind(this)(props.scrollLeft, isAnimation)\n }\n }\n }\n }\n\n render () {\n const {\n className,\n style = {},\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n onTouchMove,\n scrollX,\n scrollY\n } = this.props\n let { upperThreshold = 50, lowerThreshold = 50 } = this.props\n const cls = classNames(\n 'taro-scroll',\n {\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n },\n className\n )\n upperThreshold = Number(upperThreshold)\n lowerThreshold = Number(lowerThreshold)\n const uperAndLower = (e) => {\n if (!this.container) return\n const {\n offsetWidth,\n offsetHeight,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.container\n if (\n onScrollToLower &&\n ((this.props.scrollY &&\n offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (this.props.scrollX &&\n offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n onScrollToLower(e)\n }\n if (\n onScrollToUpper &&\n ((this.props.scrollY && scrollTop <= upperThreshold) ||\n (this.props.scrollX && scrollLeft <= upperThreshold))\n ) {\n onScrollToUpper(e)\n }\n }\n const uperAndLowerThrottle = throttle(uperAndLower, 200)\n const _onScroll = e => {\n const {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.container\n this._scrollLeft = scrollLeft\n this._scrollTop = scrollTop\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n }\n })\n uperAndLowerThrottle(e)\n onScroll && onScroll(e)\n }\n const _onTouchMove = e => {\n onTouchMove ? onTouchMove(e) : this.onTouchMove(e)\n }\n return (\n <div\n ref={container => {\n this.container = container\n }}\n style={style}\n className={cls}\n onScroll={_onScroll}\n onTouchMove={\n _onTouchMove\n }\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default ScrollView\n"],"names":["easeOutScroll","from","to","callback","change","dur","sTime","Date","linear","t","b","c","d","isLarger","step","requestAnimationFrame","throttle","fn","delay","timer","arrs","clearTimeout","setTimeout","scrollIntoView","id","document","querySelector","behavior","block","inline","scrollVertical","top","isAnimation","_scrollTop","pos","container","scrollTop","scrollHorizontal","left","_scrollLeft","scrollLeft","ScrollView","e","stopPropagation","handleScroll","props","nextProps","isInit","scrollY","bind","scrollX","className","style","onScroll","onScrollToUpper","onScrollToLower","onTouchMove","upperThreshold","lowerThreshold","cls","classNames","Number","uperAndLower","offsetWidth","offsetHeight","scrollHeight","scrollWidth","uperAndLowerThrottle","_onScroll","Object","defineProperty","enumerable","writable","value","_onTouchMove","React","ref","children","Component"],"mappings":";;;;;;;;;;;;;;AAMA,S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GAAGA,WAAW,CAACd,CAAD,CAAd,GAAoB,MAAI,CAACc,WAAL,CAAiBd,CAAjB,CAA/B;AACD,OAFD;;AAGA,aACEiC,mBAAA,MAAA;AACEC,QAAAA,GAAG,EAAE,aAAAzC,SAAS;AACZ,UAAA,MAAI,CAACA,SAAL,GAAiBA,SAAjB;AACD;AACDiB,QAAAA,KAAK,EAAEA;AACPD,QAAAA,SAAS,EAAEQ;AACXN,QAAAA,QAAQ,EAAEe;AACVZ,QAAAA,WAAW,EACTkB;OARJ,EAWG,KAAK7B,KAAL,CAAWgC,QAXd,CADF;AAeD;;;;EAtJsBF,KAAK,CAACG;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/scroll-view/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\n// import omit from 'omit.js'\nimport { throttle } from '../../utils'\n\nfunction easeOutScroll (from = 0, to = 0, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n const change = to - from\n const dur = 500\n const sTime = +new Date()\n function linear (t, b, c, d) {\n return (c * t) / d + b\n }\n const isLarger = to >= from\n\n function step () {\n from = linear(+new Date() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n step()\n}\n\nfunction scrollIntoView (id) {\n document.querySelector(`#${id}`)?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'start'\n })\n}\n\nfunction scrollVertical (top, isAnimation) {\n if (isAnimation) {\n easeOutScroll(this._scrollTop, top, pos => {\n if (this.container) this.container.scrollTop = pos\n })\n } else {\n if (this.container) this.container.scrollTop = top\n }\n this._scrollTop = top\n}\n\nfunction scrollHorizontal (left, isAnimation) {\n if (isAnimation) {\n easeOutScroll(this._scrollLeft, left, pos => {\n if (this.container) this.container.scrollLeft = pos\n })\n } else {\n if (this.container) this.container.scrollLeft = left\n }\n this._scrollLeft = left\n}\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n scrollX: boolean\n scrollY: boolean\n upperThreshold: number\n lowerThreshold: number\n scrollTop: number\n scrollLeft: number\n scrollIntoView?: string\n scrollWithAnimation: boolean\n enableBackToTop?: boolean\n onScrollToUpper: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScrollToLower: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScroll: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onTouchMove: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n}\n\nclass ScrollView extends React.Component<IProps> {\n _scrollTop: any = null\n _scrollLeft: any = null\n container: any = null\n\n onTouchMove = e => {\n e.stopPropagation()\n }\n\n componentDidMount () {\n this.handleScroll(this.props, true)\n }\n\n UNSAFE_componentWillReceiveProps (nextProps) {\n this.handleScroll(nextProps)\n }\n\n handleScroll (props, isInit = false) {\n // scrollIntoView\n if (\n props.scrollIntoView &&\n typeof props.scrollIntoView === 'string' &&\n document &&\n document.querySelector &&\n document.querySelector(`#${props.scrollIntoView}`)\n ) {\n if (isInit) {\n setTimeout(() => scrollIntoView(props.scrollIntoView), 500)\n } else {\n scrollIntoView(props.scrollIntoView)\n }\n } else {\n const isAnimation = 'scrollWithAnimation' in props\n // Y 轴滚动\n if (props.scrollY && typeof props.scrollTop === 'number' && props.scrollTop !== this._scrollTop) {\n if (isInit) {\n setTimeout(() => scrollVertical.bind(this)(props.scrollTop, isAnimation), 10)\n } else {\n scrollVertical.bind(this)(props.scrollTop, isAnimation)\n }\n }\n // X 轴滚动\n if (props.scrollX && typeof props.scrollLeft === 'number' && props.scrollLeft !== this._scrollLeft) {\n if (isInit) {\n setTimeout(() => scrollHorizontal.bind(this)(props.scrollLeft, isAnimation), 10)\n } else {\n scrollHorizontal.bind(this)(props.scrollLeft, isAnimation)\n }\n }\n }\n }\n\n render () {\n const {\n className,\n style = {},\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n onTouchMove,\n scrollX,\n scrollY\n } = this.props\n let { upperThreshold = 50, lowerThreshold = 50 } = this.props\n const cls = classNames(\n 'taro-scroll',\n {\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n },\n className\n )\n upperThreshold = Number(upperThreshold)\n lowerThreshold = Number(lowerThreshold)\n const upperAndLower = e => {\n if (!this.container) return\n const { offsetWidth, offsetHeight, scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.container\n if (\n onScrollToLower &&\n ((this.props.scrollY && offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (this.props.scrollX && offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n onScrollToLower(e)\n }\n if (\n onScrollToUpper &&\n ((this.props.scrollY && scrollTop <= upperThreshold) || (this.props.scrollX && scrollLeft <= upperThreshold))\n ) {\n onScrollToUpper(e)\n }\n }\n const upperAndLowerThrottle = throttle(upperAndLower, 200)\n const _onScroll = e => {\n const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.container\n this._scrollLeft = scrollLeft\n this._scrollTop = scrollTop\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n }\n })\n upperAndLowerThrottle(e)\n onScroll && onScroll(e)\n }\n const _onTouchMove = e => {\n onTouchMove ? onTouchMove(e) : this.onTouchMove(e)\n }\n return (\n <div\n ref={container => {\n this.container = container\n }}\n style={style}\n className={cls}\n onScroll={_onScroll}\n onTouchMove={_onTouchMove}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default ScrollView\n"],"names":["easeOutScroll","from","to","callback","change","dur","sTime","Date","linear","t","b","c","d","isLarger","step","requestAnimationFrame","scrollIntoView","id","_a","document","querySelector","behavior","block","inline","scrollVertical","top","isAnimation","_scrollTop","pos","container","scrollTop","scrollHorizontal","left","_scrollLeft","scrollLeft","ScrollView","onTouchMove","e","stopPropagation","handleScroll","props","nextProps","isInit","setTimeout","scrollY","bind","scrollX","className","style","onScroll","onScrollToUpper","onScrollToLower","upperThreshold","lowerThreshold","cls","classNames","Number","upperAndLower","offsetWidth","offsetHeight","scrollHeight","scrollWidth","upperAndLowerThrottle","throttle","_onScroll","Object","defineProperty","enumerable","writable","value","_onTouchMove","React","createElement","ref","children","Component"],"mappings":";;;;;;;;;;;;;AASA,SAASA,aAAT,GAAkD;EAAA,IAA1BC,IAA0B,uEAAnB,CAAmB,CAAA;EAAA,IAAhBC,EAAgB,uEAAX,CAAW,CAAA;AAAA,EAAA,IAARC,QAAQ,GAAA,SAAA,CAAA,MAAA,GAAA,CAAA,GAAA,SAAA,CAAA,CAAA,CAAA,GAAA,SAAA,CAAA;;EAChD,IAAIF,IAAI,KAAKC,EAAT,IAAe,OAAOD,IAAP,KAAgB,QAAnC,EAA6C;AAC3C,IAAA,OAAA;AACD,GAAA;;AACD,EAAA,IAAMG,MAAM,GAAGF,EAAE,GAAGD,IAApB,CAAA;EACA,IAAMI,GAAG,GAAG,GAAZ,CAAA;AACA,EAAA,IAAMC,KAAK,GAAG,CAAC,IAAIC,IAAJ,EAAf,CAAA;;EACA,SAASC,MAAT,CAAiBC,CAAjB,EAAoBC,CAApB,EAAuBC,CAAvB,EAA0BC,CAA1B,EAA2B;AACzB,IAAA,OAAQD,CAAC,GAAGF,CAAL,GAAUG,CAAV,GAAcF,CAArB,CAAA;AACD,GAAA;;AACD,EAAA,IAAMG,QAAQ,GAAGX,EAAE,IAAID,IAAvB,CAAA;;AAEA,EAAA,SAASa,IAAT,GAAa;AACXb,IAAAA,IAAI,GAAGO,MAAM,CAAC,CAAC,IAAID,IAAJ,EAAD,GAAcD,KAAf,EAAsBL,IAAtB,EAA4BG,MAA5B,EAAoCC,GAApC,CAAb,CAAA;;AACA,IAAA,IAAKQ,QAAQ,IAAIZ,IAAI,IAAIC,EAArB,IAA6B,CAACW,QAAD,IAAaX,EAAE,IAAID,IAApD,EAA2D;MACzDE,QAAQ,CAACD,EAAD,CAAR,CAAA;A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AAAA,UAAU,EAAE,IADqB;AAEjCC,UAAAA,QAAQ,EAAE,IAFuB;AAGjCC,UAAAA,KAAK,EAAE;AACLnC,YAAAA,UAAU,EAAVA,UADK;AAELJ,YAAAA,SAAS,EAATA,SAFK;AAGL8B,YAAAA,YAAY,EAAZA,YAHK;AAILC,YAAAA,WAAW,EAAXA,WAAAA;AAJK,WAAA;SAHT,CAAA,CAAA;QAUAC,qBAAqB,CAACzB,CAAD,CAArB,CAAA;AACAY,QAAAA,QAAQ,IAAIA,QAAQ,CAACZ,CAAD,CAApB,CAAA;OAfF,CAAA;;AAiBA,MAAA,IAAMiC,YAAY,GAAG,SAAfA,YAAe,CAAAjC,CAAC,EAAG;QACvBD,WAAW,GAAGA,WAAW,CAACC,CAAD,CAAd,GAAoB,MAAI,CAACD,WAAL,CAAiBC,CAAjB,CAA/B,CAAA;OADF,CAAA;;AAGA,MAAA,OACEkC,KACE,CAAAC,aADF,CACE,KADF,EACE;QAAAC,GAAG,EAAE,SAAA5C,GAAAA,CAAAA,SAAS,EAAG;UACf,MAAI,CAACA,SAAL,GAAiBA,SAAjB,CAAA;SADF;AAGAmB,QAAAA,KAAK,EAAEA,KAHP;AAIAD,QAAAA,SAAS,EAAEO,GAJX;AAKAL,QAAAA,QAAQ,EAAEe,SALV;AAMA5B,QAAAA,WAAW,EAAEkC,YAAAA;AANb,OADF,EASG,IAAA,CAAK9B,KAAL,CAAWkC,QATd,CADF,CAAA;AAaD,KAAA;;;;AA7HsBH,CAAAA,CAAAA,KAAK,CAACI;;;;"}
@@ -1,15 +1,19 @@
1
1
  import _typeof from '@babel/runtime/helpers/typeof';
2
- import _assertThisInitialized$1 from '@babel/runtime/helpers/assertThisInitialized';
3
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import _objectSpread from '@babel/runtime/helpers/objectSpread2';
5
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
6
2
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
7
3
  import _createClass$1 from '@babel/runtime/helpers/createClass';
8
4
  import _inherits from '@babel/runtime/helpers/inherits';
9
5
  import _createSuper from '@babel/runtime/helpers/createSuper';
6
+ import { _ as __rest } from '../tslib.es6.js';
7
+ import { s as styleInject, c as classNames } from '../index.js';
10
8
  import '../weui.js';
11
9
  import React from 'react';
12
- import { s as styleInject, c as classNames } from '../index.js';
10
+ import { d as debounce } from '../index2.js';
11
+
12
+ var css_248z$1 = "/**\n * Swiper 6.8.0\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: July 22, 2021\n */\n\n@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiY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qupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-container-multirow>.swiper-wrapper{flex-wrap:wrap}.swiper-container-multirow-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-container-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-container-pointer-events{touch-action:pan-y}.swiper-container-pointer-events.swiper-container-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-container-3d{perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-container-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-container-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-container-horizontal.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-container-vertical.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-container-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-container-rtl .swiper-button-prev:after{content:'next'}.swiper-button-next.swiper-button-white,.swiper-button-prev.swiper-button-white{--swiper-navigation-color:#ffffff}.swiper-button-next.swiper-button-black,.swiper-button-prev.swiper-button-black{--swiper-navigation-color:#000000}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:50%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white{--swiper-pagination-color:#ffffff}.swiper-pagination-black{--swiper-pagination-color:#000000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;animation:swiper-preloader-spin 1s infinite linear;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{100%{transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-container-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}";
13
+ styleInject(css_248z$1,{"insertAt":"top"});
14
+
15
+ var css_248z = ".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
16
+ styleInject(css_248z,{"insertAt":"top"});
13
17
 
14
18
  /**
15
19
  * SSR Window 3.0.0
@@ -10183,13 +10187,6 @@ var Thumbs$1 = {
10183
10187
  var components = [Virtual$1, Keyboard$1, Mousewheel$1, Navigation$1, Pagination$1, Scrollbar$1, Parallax$1, Zoom$1, Lazy$1, Controller$1, A11y$1, History$1, HashNavigation$1, Autoplay$1, EffectFade, EffectCube, EffectFlip, EffectCoverflow, Thumbs$1];
10184
10188
  Swiper$1.use(components);
10185
10189
 
10186
- var css_248z$1 = "/**\n * Swiper 6.8.0\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2021 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: July 22, 2021\n */\n\n@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC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YzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA') format('woff');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-container-multirow>.swiper-wrapper{flex-wrap:wrap}.swiper-container-multirow-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-container-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-container-pointer-events{touch-action:pan-y}.swiper-container-pointer-events.swiper-container-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-container-3d{perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-container-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-container-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-container-horizontal.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-container-vertical.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-container-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-container-rtl .swiper-button-prev:after{content:'next'}.swiper-button-next.swiper-button-white,.swiper-button-prev.swiper-button-white{--swiper-navigation-color:#ffffff}.swiper-button-next.swiper-button-black,.swiper-button-prev.swiper-button-black{--swiper-navigation-color:#000000}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:50%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white{--swiper-pagination-color:#ffffff}.swiper-pagination-black{--swiper-pagination-color:#000000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;animation:swiper-preloader-spin 1s infinite linear;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{100%{transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-container-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}";
10187
- styleInject(css_248z$1,{"insertAt":"top"});
10188
-
10189
- var css_248z = ".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
10190
- styleInject(css_248z,{"insertAt":"top"});
10191
-
10192
- var _excluded = ["className", "style", "itemId", "children"];
10193
10190
  var INSTANCE_ID = 0;
10194
10191
 
10195
10192
  var createEvent = function createEvent(type) {
@@ -10219,15 +10216,15 @@ var SwiperItem = /*#__PURE__*/function (_React$Component) {
10219
10216
  _createClass$1(SwiperItem, [{
10220
10217
  key: "render",
10221
10218
  value: function render() {
10222
- var _this$props = this.props,
10223
- className = _this$props.className,
10224
- style = _this$props.style,
10225
- itemId = _this$props.itemId,
10226
- children = _this$props.children,
10227
- restProps = _objectWithoutProperties(_this$props, _excluded);
10219
+ var _a = this.props,
10220
+ className = _a.className,
10221
+ style = _a.style,
10222
+ itemId = _a.itemId,
10223
+ children = _a.children,
10224
+ restProps = __rest(_a, ["className", "style", "itemId", "children"]);
10228
10225
 
10229
10226
  var cls = classNames('swiper-slide', className);
10230
- return React.createElement("div", _objectSpread({
10227
+ return React.createElement("div", Object.assign({
10231
10228
  className: cls,
10232
10229
  style: style,
10233
10230
  "item-id": itemId
@@ -10248,35 +10245,17 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10248
10245
 
10249
10246
  _classCallCheck(this, Swiper);
10250
10247
 
10251
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10252
- args[_key] = arguments[_key];
10253
- }
10254
-
10255
- _this = _super2.call.apply(_super2, [this].concat(args));
10256
-
10257
- _defineProperty(_assertThisInitialized$1(_this), "_id", 1 + INSTANCE_ID++);
10258
-
10259
- _defineProperty(_assertThisInitialized$1(_this), "_$current", 0);
10260
-
10261
- _defineProperty(_assertThisInitialized$1(_this), "_$width", 0);
10248
+ _this = _super2.apply(this, arguments);
10249
+ _this._id = 1 + INSTANCE_ID++;
10250
+ _this._$current = 0;
10251
+ _this._$width = 0;
10252
+ _this._$height = 0;
10262
10253
 
10263
- _defineProperty(_assertThisInitialized$1(_this), "_$height", 0);
10254
+ _this.handleSwiperLoopListen = function () {
10255
+ var _a, _b, _c, _d;
10264
10256
 
10265
- _defineProperty(_assertThisInitialized$1(_this), "$el", void 0);
10266
-
10267
- _defineProperty(_assertThisInitialized$1(_this), "mySwiper", void 0);
10268
-
10269
- _defineProperty(_assertThisInitialized$1(_this), "observer", void 0);
10270
-
10271
- _defineProperty(_assertThisInitialized$1(_this), "observerFirst", void 0);
10272
-
10273
- _defineProperty(_assertThisInitialized$1(_this), "observerLast", void 0);
10274
-
10275
- _defineProperty(_assertThisInitialized$1(_this), "handleSwiperLoopListen", function () {
10276
- var _this$observerFirst, _this$observerFirst$d, _this$observerLast, _this$observerLast$di;
10277
-
10278
- (_this$observerFirst = _this.observerFirst) === null || _this$observerFirst === void 0 ? void 0 : (_this$observerFirst$d = _this$observerFirst.disconnect) === null || _this$observerFirst$d === void 0 ? void 0 : _this$observerFirst$d.call(_this$observerFirst);
10279
- (_this$observerLast = _this.observerLast) === null || _this$observerLast === void 0 ? void 0 : (_this$observerLast$di = _this$observerLast.disconnect) === null || _this$observerLast$di === void 0 ? void 0 : _this$observerLast$di.call(_this$observerLast);
10257
+ (_b = (_a = _this.observerFirst) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
10258
+ (_d = (_c = _this.observerLast) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
10280
10259
  _this.observerFirst = new MutationObserver(_this.handleSwiperLoop);
10281
10260
  _this.observerLast = new MutationObserver(_this.handleSwiperLoop);
10282
10261
  var wrapper = _this.mySwiper.$wrapperEl[0];
@@ -10291,9 +10270,9 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10291
10270
  characterData: true
10292
10271
  });
10293
10272
  }
10294
- });
10273
+ };
10295
10274
 
10296
- _defineProperty(_assertThisInitialized$1(_this), "handleSwiperLoop", debounce(function () {
10275
+ _this.handleSwiperLoop = debounce(function () {
10297
10276
  if (_this.mySwiper && _this.mySwiper.$wrapperEl && _this.props.circular) {
10298
10277
  // @ts-ignore
10299
10278
  _this.mySwiper.loopDestroy(); // @ts-ignore
@@ -10301,8 +10280,7 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10301
10280
 
10302
10281
  _this.mySwiper.loopCreate();
10303
10282
  }
10304
- }, 500));
10305
-
10283
+ }, 500);
10306
10284
  return _this;
10307
10285
  }
10308
10286
 
@@ -10311,19 +10289,21 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10311
10289
  value: function componentDidMount() {
10312
10290
  var _this2 = this;
10313
10291
 
10314
- var _this$props2 = this.props,
10315
- _this$props2$autoplay = _this$props2.autoplay,
10316
- autoplay = _this$props2$autoplay === void 0 ? false : _this$props2$autoplay,
10317
- _this$props2$interval = _this$props2.interval,
10318
- interval = _this$props2$interval === void 0 ? 5000 : _this$props2$interval,
10319
- _this$props2$duration = _this$props2.duration,
10320
- duration = _this$props2$duration === void 0 ? 500 : _this$props2$duration,
10321
- _this$props2$current = _this$props2.current,
10322
- current = _this$props2$current === void 0 ? 0 : _this$props2$current,
10323
- _this$props2$displayM = _this$props2.displayMultipleItems,
10324
- displayMultipleItems = _this$props2$displayM === void 0 ? 1 : _this$props2$displayM,
10325
- vertical = _this$props2.vertical,
10326
- spaceBetween = _this$props2.spaceBetween; // eslint-disable-next-line @typescript-eslint/no-this-alias
10292
+ var _this$props = this.props,
10293
+ _this$props$autoplay = _this$props.autoplay,
10294
+ autoplay = _this$props$autoplay === void 0 ? false : _this$props$autoplay,
10295
+ _this$props$circular = _this$props.circular,
10296
+ circular = _this$props$circular === void 0 ? true : _this$props$circular,
10297
+ _this$props$current = _this$props.current,
10298
+ current = _this$props$current === void 0 ? 0 : _this$props$current,
10299
+ _this$props$displayMu = _this$props.displayMultipleItems,
10300
+ displayMultipleItems = _this$props$displayMu === void 0 ? 1 : _this$props$displayMu,
10301
+ _this$props$duration = _this$props.duration,
10302
+ duration = _this$props$duration === void 0 ? 500 : _this$props$duration,
10303
+ _this$props$interval = _this$props.interval,
10304
+ interval = _this$props$interval === void 0 ? 5000 : _this$props$interval,
10305
+ spaceBetween = _this$props.spaceBetween,
10306
+ vertical = _this$props.vertical; // eslint-disable-next-line @typescript-eslint/no-this-alias
10327
10307
 
10328
10308
  var that = this;
10329
10309
  var opt = {
@@ -10332,7 +10312,7 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10332
10312
  el: ".taro-swiper-".concat(this._id, " > .swiper-container > .swiper-pagination")
10333
10313
  },
10334
10314
  direction: vertical ? 'vertical' : 'horizontal',
10335
- loop: true,
10315
+ loop: circular,
10336
10316
  slidesPerView: parseFloat(String(displayMultipleItems)),
10337
10317
  initialSlide: parseInt(String(current), 10),
10338
10318
  speed: parseInt(String(duration), 10),
@@ -10380,7 +10360,12 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10380
10360
 
10381
10361
  if (className.includes('taro_page') && target.style.display !== 'none') {
10382
10362
  if (that.props.autoplay && target.contains(_swiper.$el[0])) {
10383
- _swiper.slideTo(that._$current);
10363
+ if (that.props.circular) {
10364
+ _swiper.slideToLoop(this.realIndex, 0); // 更新下标
10365
+
10366
+ } else {
10367
+ _swiper.slideTo(this.realIndex);
10368
+ }
10384
10369
  }
10385
10370
  }
10386
10371
  }
@@ -10465,13 +10450,13 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10465
10450
  }, {
10466
10451
  key: "componentWillUnmount",
10467
10452
  value: function componentWillUnmount() {
10468
- var _this$observer, _this$observer$discon, _this$observerFirst2, _this$observerFirst2$, _this$observerLast2, _this$observerLast2$d;
10453
+ var _a, _b, _c, _d, _e, _f;
10469
10454
 
10470
10455
  this.$el = null;
10471
10456
  if (this.mySwiper) this.mySwiper.destroy();
10472
- (_this$observer = this.observer) === null || _this$observer === void 0 ? void 0 : (_this$observer$discon = _this$observer.disconnect) === null || _this$observer$discon === void 0 ? void 0 : _this$observer$discon.call(_this$observer);
10473
- (_this$observerFirst2 = this.observerFirst) === null || _this$observerFirst2 === void 0 ? void 0 : (_this$observerFirst2$ = _this$observerFirst2.disconnect) === null || _this$observerFirst2$ === void 0 ? void 0 : _this$observerFirst2$.call(_this$observerFirst2);
10474
- (_this$observerLast2 = this.observerLast) === null || _this$observerLast2 === void 0 ? void 0 : (_this$observerLast2$d = _this$observerLast2.disconnect) === null || _this$observerLast2$d === void 0 ? void 0 : _this$observerLast2$d.call(_this$observerLast2);
10457
+ (_b = (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
10458
+ (_d = (_c = this.observerFirst) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
10459
+ (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
10475
10460
  }
10476
10461
  }, {
10477
10462
  key: "handleOnChange",
@@ -10496,14 +10481,14 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10496
10481
  value: function render() {
10497
10482
  var _this3 = this;
10498
10483
 
10499
- var _this$props3 = this.props,
10500
- className = _this$props3.className,
10501
- style = _this$props3.style,
10502
- vertical = _this$props3.vertical,
10503
- previousMargin = _this$props3.previousMargin,
10504
- nextMargin = _this$props3.nextMargin,
10505
- indicatorColor = _this$props3.indicatorColor,
10506
- indicatorActiveColor = _this$props3.indicatorActiveColor;
10484
+ var _this$props2 = this.props,
10485
+ className = _this$props2.className,
10486
+ style = _this$props2.style,
10487
+ vertical = _this$props2.vertical,
10488
+ previousMargin = _this$props2.previousMargin,
10489
+ nextMargin = _this$props2.nextMargin,
10490
+ indicatorColor = _this$props2.indicatorColor,
10491
+ indicatorActiveColor = _this$props2.indicatorActiveColor;
10507
10492
  var defaultIndicatorColor = indicatorColor || 'rgba(0, 0, 0, .3)';
10508
10493
  var defaultIndicatorActiveColor = indicatorActiveColor || '#000';
10509
10494
  var cls = classNames("taro-swiper-".concat(this._id), className);
@@ -10544,19 +10529,5 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
10544
10529
  return Swiper;
10545
10530
  }(React.Component);
10546
10531
 
10547
- function debounce(fn, delay) {
10548
- var timer;
10549
- return function () {
10550
- for (var _len2 = arguments.length, arrs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
10551
- arrs[_key2] = arguments[_key2];
10552
- }
10553
-
10554
- clearTimeout(timer);
10555
- timer = setTimeout(function () {
10556
- fn.apply(void 0, arrs);
10557
- }, delay);
10558
- };
10559
- }
10560
-
10561
10532
  export { Swiper, SwiperItem };
10562
10533
  //# sourceMappingURL=index.js.map