(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c7d7502"],{"229e":function(t,e,o){"use strict";o.r(e),o.d(e,"Behavior",(function(){return vt})),o.d(e,"CustomOptions",(function(){return et})),o.d(e,"createBScroll",(function(){return Dt})),o.d(e,"default",(function(){return xt})); /*! * better-scroll / core * (c) 2016-2023 ustbhuangyi * Released under the MIT License. */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)};function n(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var r=function(){return r=Object.assign||function(t){for(var e,o=1,i=arguments.length;o0,f=function(){if("string"===typeof l){var t=/os (\d\d?_\d(_\d)?)/,e=t.exec(l);if(!e)return!1;var o=e[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===o[0]&&o[1]>=4)}return!1}(),d=!1;if(c){var v="test-passive";try{var y={};Object.defineProperty(y,"passive",{get:function(){d=!0}}),window.addEventListener(v,(function(){}),y)}catch(Mt){}}function m(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var g=function(t,e){for(var o in e)t[o]=e[o];return t};function k(t){return void 0===t||null===t}function T(t,e,o){return to?o:t}var b=c&&document.createElement("div").style,S=function(){if(!c)return!1;for(var t=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],e=0,o=t;edocument.documentElement.clientWidth-a||h>document.documentElement.clientHeight-a||s0?-1:o<0?1:0;return i},r=n(e.x,t.x),s=n(e.y,t.y),h=o.x-i.x,a=o.y-i.y;return r*h<=0&&s*a<=0},at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.startProbe=function(t,e){var o=this,i=t,n=function(){var r=o.translater.getComputedPosition();ht(t,e,r,i)&&o.hooks.trigger(o.hooks.eventTypes.move,r),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,r)),i=r,o.pending&&(o.timer=q(n))};this.callStopWhenPending&&this.setCallStop(!1),U(this.timer),n()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[L.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[L.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[L.transitionProperty]=L.transform},e.prototype.move=function(t,e,o,i){this.setPending(o>0),this.transitionTimingFunction(i),this.transitionProperty(),this.transitionTime(o),this.translate(e);var n=3===this.options.probeType;o&&n&&this.startProbe(t,e),o||(this._reflow=this.content.offsetHeight,n&&this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),U(this.timer);var e=this.translater.getComputedPosition(),o=e.x,i=e.y;this.transitionTime(),this.translate({x:o,y:i}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:i})}return t},e.prototype.stop=function(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(st),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.move=function(t,e,o,i){if(!o)return this.translate(e),3===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,o,i)},e.prototype.animate=function(t,e,o,i){var n=this,r=m(),s=r+o,h=3===this.options.probeType,a=function(){var c=m();if(c>=s)return n.translate(e),h&&n.hooks.trigger(n.hooks.eventTypes.move,e),void n.hooks.trigger(n.hooks.eventTypes.end,e);c=(c-r)/o;var l=i(c),p={};Object.keys(e).forEach((function(o){var i=t[o],n=e[o];p[o]=(n-i)*l+i})),n.translate(p),h&&n.hooks.trigger(n.hooks.eventTypes.move,p),n.pending&&(n.timer=q(a)),n.pending||(n.callStopWhenPending?n.callStopWhenPending=!1:n.hooks.trigger(n.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),U(this.timer),a()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),U(this.timer);var e=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,e)}return t},e.prototype.stop=function(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(st);function lt(t,e,o){var i=o.useTransition,n={};return Object.defineProperty(n,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),i?new at(t,e,n):new ct(t,e,n)}var pt,ut,ft,dt,vt=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new Q(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},t.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},t.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},t.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},t.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||othis.minScrollPos&&this.options.bounces[0]||othis.minScrollPos?this.minScrollPos:this.maxScrollPos),o},t.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&tthis.options.momentumLimitDistance){var i=-1===this.direction&&this.options.bounces[0]||1===this.direction&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,o,i,n,r,s){void 0===s&&(s=this.options);var h=t-e,a=Math.abs(h)/o,c=s.deceleration,l=s.swipeBounceTime,p=s.swipeTime,u=Math.min(p,2*a/c),f={destination:t+a*a/c*(h<0?-1:1),duration:u,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,f,h),f.destinationn&&(f.destination=r?Math.min(n+r/4,n+r/f.rate*a):n,f.duration=l),f.destination=Math.round(f.destination),f},t.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},t.prototype.refresh=function(t){var e=this.options.rect,o=e.size,i=e.position,n="static"===window.getComputedStyle(this.wrapper,null).position,r=z(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var s=z(this.content);this.contentSize=s[o],this.relativeOffset=s[i],n&&(this.relativeOffset-=r[i]),this.computeBoundary(),this.setDirection(0)},t.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},t.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},t.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,0===this.options.specifiedIndexAsContent&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPosthis.minScrollPos?t=this.minScrollPos:te+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},t.prototype.handleEventPassthrough=function(t){var e=mt[this.directionLocked];if(e){if(this.eventPassthrough===e["yes"])return yt["yes"](t);if(this.eventPassthrough===e["no"])return yt["no"](t)}return!1},t}(),kt=function(t,e,o){return 2===o?[e,-t]:3===o?[-t,-e]:4===o?[-e,t]:[t,e]},Tt=function(){function t(t,e,o,i,n){this.hooks=new Q(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=i,this.options=n,this.directionLockAction=new gt(n.directionLockThreshold,n.freeScroll,n.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,(function(e){return!t.enabled||t.handleStart(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,(function(e){var o=e.deltaX,i=e.deltaY,n=e.e;if(!t.enabled)return!0;var r=kt(o,i,t.options.quadrant),s=r[0],h=r[1],a={deltaX:s,deltaY:h};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,a),t.handleMove(a.deltaX,a.deltaY,n)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,(function(e){return!t.enabled||t.handleEnd(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,(function(e){t.enabled&&!e._constructed&&t.handleClick(e)}))},t.prototype.handleStart=function(t){var e=m();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var i=this.scrollBehaviorX.getAbsDist(t),n=this.scrollBehaviorY.getAbsDist(e),r=m();if(this.checkMomentum(i,n,r))return!0;if(this.directionLockAction.checkMovingDirection(i,n,o))return this.actionsHandler.setInitiated(),!0;var s=this.directionLockAction.adjustDelta(t,e),h=this.scrollBehaviorX.getCurrentPos(),a=this.scrollBehaviorX.move(s.deltaX),c=this.scrollBehaviorY.getCurrentPos(),l=this.scrollBehaviorY.move(s.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var p=a!==h||l!==c;this.contentMoved||p||this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&p&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&p&&(this.animater.translate({x:a,y:l}),this.dispatchScroll(r))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),1===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),e=T(e,r,n),o=T(o,a,h),{x:e,y:o}},t.prototype.handleClick=function(t){F(t.target,this.options.preventDefaultException)||(C(t),t.stopPropagation())},t.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},t.prototype.refresh=function(){this.endTime=0},t.prototype.destroy=function(){this.hooks.destroy()},t}();function bt(t){var e=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(e,o){return e[o]=t[o],e}),{});return e}function St(t,e,o,i){var n=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,o){return e[o]=t[o],e}),{});return n.scrollable=!!t[e],n.bounces=o,n.rect=i,n}function Pt(t,e,o){o.forEach((function(o){var i,n;"string"===typeof o?i=n=o:(i=o.source,n=o.target),t.on(i,(function(){for(var t=[],o=0;o1&&ti||e>i))return!0},t.prototype.momentum=function(t,e){var o={time:0,easing:j.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),n=this.scrollBehaviorY.end(e);if(o.newX=k(i.destination)?o.newX:i.destination,o.newY=k(n.destination)?o.newY:n.destination,o.time=Math.max(i.duration,n.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newXthis.scrollBehaviorY.minScrollPos||o.newY=4096)e+=12,o/=4096;while(o>=2)e+=1,o/=2;return e},m=function(t,e,o){var i=-1,n=o;while(++i<6)n+=e*t[i],t[i]=n%1e7,n=p(n/1e7)},g=function(t,e){var o=6,i=0;while(--o>=0)i+=t[o],t[o]=p(i/e),i=i%e*1e7},k=function(t){var e=6,o="";while(--e>=0)if(""!==o||0===e||0!==t[e]){var i=l(t[e]);o=""===o?i:o+u("0",7-i.length)+i}return o},T=a((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!a((function(){d({})}));i({target:"Number",proto:!0,forced:T},{toFixed:function(t){var e,o,i,n,h=s(this),a=r(t),p=[0,0,0,0,0,0],d="",T="0";if(a<0||a>20)throw new c("Incorrect fraction digits");if(h!==h)return"NaN";if(h<=-1e21||h>=1e21)return l(h);if(h<0&&(d="-",h=-h),h>1e-21)if(e=y(h*v(2,69,1))-69,o=e<0?h*v(2,-e,1):h/v(2,e,1),o*=4503599627370496,e=52-e,e>0){m(p,0,o),i=a;while(i>=7)m(p,1e7,0),i-=7;m(p,v(10,i,1),0),i=e-1;while(i>=23)g(p,1<<23),i-=23;g(p,1<0?(n=T.length,T=d+(n<=a?"0."+u("0",a-n)+T:f(T,0,n-a)+"."+f(T,n-a))):T=d+T,T}})}}]);