!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("vant",["vue"],e):"object"==typeof exports?exports.vant=e(require("vue")):t.vant=e(t.Vue)}(this,function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([function(t,e,i){"use strict";var n=i(2),s=i.n(n),o="--";function r(t,e,i){return e?t+i+e:t}function a(t,e){if("string"==typeof e)return r(t,e,o);if(Array.isArray(e))return e.map(function(e){return a(t,e)});var i={};return e&&Object.keys(e).forEach(function(n){i[t+o+n]=e[n]}),i}var u=function(t){return function(e,i){return e&&"string"!=typeof e&&(i=e,e=""),e=r(t,e,"__"),i?[e,a(e,i)]:e}},l=i(4),c={methods:{slots:function(t,e){void 0===t&&(t="default");var i=this.$slots,n=this.$scopedSlots;return n[t]?n[t](e):i[t]}}},h={type:Array,default:function(){return[]}},d={type:Number,default:0};function f(t){var e=this.name;t.component(e,this),t.component(C("-"+e),this)}function p(t){return{functional:!0,props:t.props,model:t.model,render:function(e,i){return t(e,i.props,function(t){var e=t.scopedSlots||t.data.scopedSlots||{},i=t.slots();return Object.keys(i).forEach(function(t){e[t]||(e[t]=function(){return i[t]})}),e}(i),i)}}}var v=function(t){return function(e){var i;return"function"==typeof e&&(e=p(e)),e.functional||(e.mixins=e.mixins||[],e.mixins.push(c)),e.props&&(i=e.props,Object.keys(i).forEach(function(t){i[t]===Array?i[t]=h:i[t]===Number&&(i[t]=d)})),e.name=t,e.install=f,e}},m=function(t){var e=C(t)+".";return function(t){for(var i=x(l.a.messages(),e+t)||x(l.a.messages(),t),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o * Released under the MIT License. */ t.exports=function(){"use strict";function t(t){t=t||{};var n=arguments.length,s=0;if(1===n)return t;for(;++s-1?t.splice(i,1):void 0}}function o(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var i=t.getAttribute("data-srcset"),n=[],s=t.parentNode,o=s.offsetWidth*e,r=void 0,a=void 0,u=void 0;(i=i.trim().split(",")).map(function(t){t=t.trim(),-1===(r=t.lastIndexOf(" "))?(a=t,u=999998):(a=t.substr(0,r),u=parseInt(t.substr(r+1,t.length-r-2),10)),n.push([u,a])}),n.sort(function(t,e){if(t[0]e[0])return 1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0});for(var l="",c=void 0,h=n.length,d=0;d=o){l=c[1];break}return l}}function r(t,e){for(var i=void 0,n=0,s=t.length;n0&&void 0!==arguments[0]?arguments[0]:1;return g&&window.devicePixelRatio||t},x=function(){if(g){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),w={on:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];x?t.addEventListener(e,i,{capture:n,passive:!0}):t.addEventListener(e,i,n)},off:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,i,n)}},C=function(t,e,i){var n=new Image;n.src=t.src,n.onload=function(){e({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src})},n.onerror=function(t){i(t)}},T=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},O=function(t){return T(t,"overflow")+T(t,"overflow-y")+T(t,"overflow-x")},$={},B=function(){function t(e){var i=e.el,n=e.src,s=e.error,o=e.loading,r=e.bindType,a=e.$parent,u=e.options,l=e.elRenderer;c(this,t),this.el=i,this.src=n,this.error=s,this.loading=o,this.bindType=r,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=a,this.elRenderer=l,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return h(t,[{key:"initState",value:function(){this.el.dataset.src=this.src,this.state={error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,i=t.loading,n=t.error,s=this.src;this.src=e,this.loading=i,this.error=n,this.filter(),s!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.topthis.options.preLoadTop&&this.rect.left0}},{key:"filter",value:function(){var t=this;(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e})(this.options.filter).map(function(e){t.options.filter[e](t,t.options)})}},{key:"renderLoading",value:function(t){var e=this;C({src:this.loading},function(i){e.render("loading",!1),t()},function(){t(),e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")})}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.loaded||$[this.src]?(this.state.loaded=!0,e(),this.render("loaded",!0)):void this.renderLoading(function(){t.attempt++,t.record("loadStart"),C({src:t.src},function(i){t.naturalHeight=i.naturalHeight,t.naturalWidth=i.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),$[t.src]=1,e()},function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)})})}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}},{key:"destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),I="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",j=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],A={rootMargin:"0px",threshold:0},E=function(t){return function(){function e(t){var i=t.preLoad,n=t.error,s=t.throttleWait,o=t.preLoadTop,r=t.dispatchEvent,u=t.loading,l=t.attempt,h=t.silent,d=void 0===h||h,f=t.scale,p=t.listenEvents,v=(t.hasbind,t.filter),m=t.adapter,g=t.observer,b=t.observerOptions;c(this,e),this.version="1.2.3",this.mode=y.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:d,dispatchEvent:!!r,throttleWait:s||200,preLoad:i||1.3,preLoadTop:o||0,error:n||I,loading:u||I,attempt:l||3,scale:f||S(f),ListenEvents:p||j,hasbind:!1,supportWebp:a(),filter:v||{},adapter:m||{},observer:!!g,observerOptions:b||A},this._initEvent(),this.lazyLoadHandler=function(t,e){var i=null,n=0;return function(){if(!i){var s=Date.now()-n,o=this,r=arguments,a=function(){n=Date.now(),i=!1,t.apply(o,r)};s>=e?a():i=setTimeout(a,e)}}}(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?y.observer:y.event)}return h(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map(function(e){t.push(e.performance())}),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),g&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,i,n){var s=this;if(function(t,e){for(var i=!1,n=0,s=t.length;n1&&void 0!==arguments[1]?arguments[1]:{},i=E(t),n=new i(e),s=new N({lazy:n}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=n,e.lazyComponent&&t.component("lazy-component",function(t){return{props:{tag:{type:String,default:"div"}},render:function(t){return!1===this.show?t(this.tag):t(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),g&&this.rect.top0&&this.rect.left0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)}}}}(n)),o?(t.directive("lazy",{bind:n.add.bind(n),update:n.update.bind(n),componentUpdated:n.lazyLoadHandler.bind(n),unbind:n.remove.bind(n)}),t.directive("lazy-container",{bind:s.bind.bind(s),update:s.update.bind(s),unbind:s.unbind.bind(s)})):(t.directive("lazy",{bind:n.lazyLoadHandler.bind(n),update:function(t,e){m(this.vm.$refs,this.vm.$els),n.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){n.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){s.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){s.unbind(this.el)}}))}}}()},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e2?i-2:0),s=2;si&&e>v?"horizontal":i>e&&i>v?"vertical":"")},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0}}},g=!1;if(!r.h)try{var b={};Object.defineProperty(b,"passive",{get:function(){g=!0}}),window.addEventListener("test-passive",null,b)}catch(t){}function y(t,e,i,n){void 0===n&&(n=!1),r.h||t.addEventListener(e,i,!!g&&{capture:!1,passive:n})}function k(t,e,i){r.h||t.removeEventListener(e,i)}function S(t){t.stopPropagation()}function x(t,e){("boolean"!=typeof t.cancelable||t.cancelable)&&t.preventDefault(),e&&S(t)}var w=Object(r.k)("overlay"),C=w[0],T=w[1];function O(t,e,i,s){var r=n({zIndex:e.zIndex},e.customStyle);return t("transition",{attrs:{name:"van-fade"}},[t("div",o()([{directives:[{name:"show",value:e.visible}],style:r,class:[T(),e.className],on:{touchmove:function(t){x(t,!0)}}},h(s,!0)]))])}O.props={zIndex:Number,className:null,visible:Boolean,customStyle:Object};var $,B=C(O),I={className:"",customStyle:{}};function j(){if(p.top){var t=p.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&(t.onClickOverlay?t.onClickOverlay():t.close())}}function A(){if($||($=f(B,{on:{click:j}})),p.top){var t=p.top,e=t.vm,i=t.config,s=e.$el,o=s&&s.parentNode?s.parentNode:document.body;o&&o.appendChild($.$el),n($,I,i,{visible:!0})}else $.visible=!1}function E(t){var e=p.stack;e.length&&(p.top.vm===t?(e.pop(),A()):p.stack=e.filter(function(e){return e.vm!==t}))}function N(t,e){void 0===e&&(e=window);for(var i=t;i&&"HTML"!==i.tagName&&"BODY"!==i.tagName&&1===i.nodeType&&i!==e;){var n=window.getComputedStyle(i).overflowY;if("scroll"===n||"auto"===n)return i;i=i.parentNode}return e}function L(t){return"scrollTop"in t?t.scrollTop:t.pageYOffset}function z(t){return(t===window?0:t.getBoundingClientRect().top)+L(window)}function D(t){return t===window?t.innerHeight:t.getBoundingClientRect().height}var F={mixins:[m],props:{value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[String,Number],getContainer:[String,Function],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}},data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(t){var e=t?"open":"close";this.inited=this.inited||this.value,this[e](),this.$emit(e)},getContainer:function(){this.move()},overlay:function(){this.renderOverlay()}},mounted:function(){this.getContainer&&this.move(),this.value&&this.open()},activated:function(){this.value&&this.open()},beforeDestroy:function(){this.close(),this.getContainer&&this.$parent&&this.$parent.$el&&this.$parent.$el.appendChild(this.$el)},deactivated:function(){this.close()},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(p.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(y(document,"touchstart",this.touchStart),y(document,"touchmove",this.onTouchMove),p.lockCount||document.body.classList.add("van-overflow-hidden"),p.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(p.lockCount--,k(document,"touchstart",this.touchStart),k(document,"touchmove",this.onTouchMove),p.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,E(this),this.$emit("input",!1))},move:function(){var t,e=this.getContainer;e?t="string"==typeof e?document.querySelector(e):e():this.$parent&&(t=this.$parent.$el),t&&t!==this.$el.parentNode&&t.appendChild(this.$el),this.overlay&&A()},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",i=N(t.target,this.$el),n=i.scrollHeight,s=i.offsetHeight,o=i.scrollTop,r="11";0===o?r=s>=n?"00":"01":o+s>=n&&(r="10"),"11"===r||"vertical"!==this.direction||parseInt(r,2)&parseInt(e,2)||x(t,!0)},renderOverlay:function(){var t,e;!this.$isServer&&this.value&&(this.overlay?(t=this,e={zIndex:p.zIndex++,className:this.overlayClass,customStyle:this.overlayStyle},p.stack.some(function(e){return e.vm===t})||(p.stack.push({vm:t,config:e}),A())):E(this),this.updateZIndex())},updateZIndex:function(){var t=this;this.$nextTick(function(){t.$el.style.zIndex=p.zIndex++})}}},M=Object(r.k)("info"),V=M[0],_=M[1];function P(t,e,i,n){if(Object(r.d)(e.info)&&""!==e.info)return t("div",o()([{class:_()},h(n,!0)]),[e.info])}P.props={info:[String,Number]};var R=V(P);var H=Object(r.k)("icon")[0];function W(t,e,i,n){var s,r=(s=e.name,/^(((blob:)?https?:)?\/\/|data:image)/.test(s));return t(e.tag,o()([{class:[e.classPrefix,r?"van-icon--image":e.classPrefix+"-"+e.name],style:{color:e.color,fontSize:e.size}},h(n,!0)]),[i.default&&i.default(),r&&t("img",{attrs:{src:e.name}}),t(R,{attrs:{info:e.info}})])}W.props={name:String,size:String,color:String,info:[String,Number],tag:{type:String,default:"i"},classPrefix:{type:String,default:"van-icon"}};var Y=H(W),q=Object(r.k)("loading"),X=q[0],Q=q[1],K="#c9c9c9";function U(t,e,i,n){var s=e.color,r=e.size,a=e.type,u="white"===s||"black"===s?s:"",l={color:"black"===s?K:s,width:r,height:r},c=[];if("spinner"===a)for(var d=0;d<12;d++)c.push(t("i"));var f="circular"===a&&t("svg",{class:Q("circular"),attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]);return t("div",o()([{class:Q([a,u]),style:l},h(n,!0)]),[t("span",{class:Q("spinner",a)},[c,f])])}U.props={size:String,type:{type:String,default:"circular"},color:{type:String,default:K}};var G=X(U),Z=Object(r.k)("popup"),J=Z[0],tt=Z[1],et=J({mixins:[F],props:{position:String,transition:String,overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},render:function(t){var e,i=this;if(this.shouldRender){var n=this.position,s=function(t){return function(){return i.$emit(t)}};return t("transition",{attrs:{name:this.transition||(n?"van-popup-slide-"+n:"van-fade")},on:{afterEnter:s("opened"),afterLeave:s("closed")}},[t("div",{directives:[{name:"show",value:this.value}],class:tt((e={},e[n]=n,e))},[this.slots()])])}}}),it=Object(r.k)("actionsheet"),nt=it[0],st=it[1];function ot(t,e,i,n){var s=e.title,r=e.cancelText,a=function(){d(n,"input",!1),d(n,"cancel")};return t(et,o()([{class:st({"safe-area-inset-bottom":e.safeAreaInsetBottom}),attrs:{value:e.value,position:"bottom",overlay:e.overlay,lazyRender:e.lazyRender,getContainer:e.getContainer,closeOnClickOverlay:e.closeOnClickOverlay},on:{input:function(t){d(n,"input",t)}}},h(n)]),[s?t("div",{class:[st("header"),"van-hairline--top-bottom"]},[s,t(Y,{attrs:{name:"close"},class:st("close"),on:{click:a}})]):e.actions.map(function(e,i){return t("div",{class:[st("item",{disabled:e.disabled||e.loading}),e.className,"van-hairline--top"],on:{click:function(t){t.stopPropagation(),e.disabled||e.loading||(e.callback&&e.callback(e),d(n,"select",e,i))}}},[e.loading?t(G,{class:st("loading"),attrs:{size:"20px"}}):[t("span",{class:st("name")},[e.name]),e.subname&&t("span",{class:st("subname")},[e.subname])]])}),i.default&&t("div",{class:st("content")},[i.default()]),r&&t("div",{class:st("cancel"),on:{click:a}},[r])])}ot.props=n({},F.props,{title:String,actions:Array,cancelText:String,safeAreaInsetBottom:Boolean,overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});var rt=nt(ot);function at(t){return t=t.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(t)||/^0[0-9-]{10,13}$/.test(t)}var ut=i(5);function lt(t){return Array.isArray(t)?t.map(function(t){return lt(t)}):"object"==typeof t?Object(ut.a)({},t):t}var ct={title:String,loading:Boolean,showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,visibleItemCount:{type:Number,default:5},itemHeight:{type:Number,default:44}},ht=Object(r.k)("picker-column"),dt=ht[0],ft=ht[1],pt=dt({props:{valueKey:String,className:String,itemHeight:Number,defaultIndex:Number,initialOptions:Array,visibleItemCount:Number},data:function(){return{startY:0,offset:0,duration:0,startOffset:0,options:lt(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1)},watch:{defaultIndex:function(){this.setIndex(this.defaultIndex)}},computed:{count:function(){return this.options.length}},methods:{onTouchStart:function(t){this.startY=t.touches[0].clientY,this.startOffset=this.offset,this.duration=0},onTouchMove:function(t){x(t);var e=t.touches[0].clientY-this.startY;this.offset=Object(r.j)(this.startOffset+e,-this.count*this.itemHeight,this.itemHeight)},onTouchEnd:function(){if(this.offset!==this.startOffset){this.duration=200;var t=Object(r.j)(Math.round(-this.offset/this.itemHeight),0,this.count-1);this.setIndex(t,!0)}},adjustIndex:function(t){for(var e=t=Object(r.j)(t,0,this.count);e=0;i--)if(!this.isDisabled(this.options[i]))return i},isDisabled:function(t){return Object(r.g)(t)&&t.disabled},getOptionText:function(t){return Object(r.g)(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,e){t=this.adjustIndex(t)||0,this.offset=-t*this.itemHeight,t!==this.currentIndex&&(this.currentIndex=t,e&&this.$emit("change",t))},setValue:function(t){for(var e=this.options,i=0;ii&&(e=e.slice(0,i),t.value=e),e},onInput:function(t){this.$emit("input",this.format(t.target))},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.readonly&&this.blur()},onBlur:function(t){this.focused=!1,this.$emit("blur",t),Object(r.e)()&&window.scrollTo(0,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0)},onClickLeftIcon:function(){this.$emit("click-left-icon")},onClickRightIcon:function(){this.$emit("click-icon"),this.$emit("click-right-icon"),this.onIconClick&&this.onIconClick()},onClear:function(t){x(t),this.$emit("input",""),this.$emit("clear")},onKeypress:function(t){if("number"===this.type){var e=t.keyCode,i=-1===String(this.value).indexOf(".");e>=48&&e<=57||46===e&&i||45===e||x(t)}"search"===this.type&&13===t.keyCode&&this.blur(),this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if("textarea"===this.type&&this.autosize&&t){t.style.height="auto";var e=t.scrollHeight;if(Object(r.g)(this.autosize)){var i=this.autosize,n=i.maxHeight,s=i.minHeight;n&&(e=Math.min(e,n)),s&&(e=Math.max(e,s))}e&&(t.style.height=e+"px")}},renderInput:function(){var t=this.$createElement,e={ref:"input",class:Dt("control",this.inputAlign),domProps:{value:this.value},attrs:n({},this.$attrs,{readonly:this.readonly}),on:this.listeners};return"textarea"===this.type?t("textarea",o()([{},e])):t("input",o()([{attrs:{type:this.type}},e]))},renderLeftIcon:function(){var t=this.$createElement;if(this.slots("left-icon")||this.leftIcon)return t("div",{class:Dt("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(Y,{attrs:{name:this.leftIcon}})])},renderRightIcon:function(){var t=this.$createElement,e=this.slots;if(e("right-icon")||e("icon")||this.rightIcon||this.icon)return t("div",{class:Dt("right-icon"),on:{click:this.onClickRightIcon}},[e("right-icon")||e("icon")||t(Y,{attrs:{name:this.rightIcon||this.icon}})])}},render:function(t){var e,i=this.slots,n=this.labelAlign,s={icon:this.renderLeftIcon};return i("label")&&(s.title=function(){return i("label")}),t(Et,{attrs:{icon:this.leftIcon,size:this.size,title:this.label,center:this.center,border:this.border,isLink:this.isLink,required:this.required,titleStyle:this.labelStyle,titleClass:Dt("label",n)},class:Dt((e={error:this.error,disabled:this.$attrs.disabled},e["label-"+n]=n,e["min-height"]="textarea"===this.type&&!this.autosize,e)),scopedSlots:s},[t("div",{class:Dt("body")},[this.renderInput(),this.showClear&&t(Y,{attrs:{name:"clear"},class:Dt("clear"),on:{touchstart:this.onClear}}),this.renderRightIcon(),i("button")&&t("div",{class:Dt("button")},[i("button")])]),this.errorMessage&&t("div",{class:Dt("error-message",this.errorMessageAlign)},[this.errorMessage])])}}),Mt=Object(r.k)("toast"),Vt=Mt[0],_t=Mt[1],Pt=["success","fail","loading"],Rt=Vt({mixins:[F],props:{className:null,forbidClick:Boolean,message:[String,Number],type:{type:String,default:"text"},loadingType:{type:String,default:"circular"},position:{type:String,default:"middle"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},mounted:function(){this.toggleClickale()},destroyed:function(){this.toggleClickale()},watch:{value:function(){this.toggleClickale()},forbidClick:function(){this.toggleClickale()}},methods:{toggleClickale:function(){var t=this.value&&this.forbidClick;if(this.clickable!==t){this.clickable=t;var e=t?"add":"remove";document.body.classList[e]("van-toast--unclickable")}}},render:function(t){var e=this,i=this.type,n=this.message,s=-1!==Pt.indexOf(i)?"default":i;return t("transition",{attrs:{name:"van-fade"}},[t("div",{directives:[{name:"show",value:this.value}],class:[_t([s,this.position]),this.className]},[function(){switch(s){case"text":return t("div",[n]);case"html":return t("div",{domProps:{innerHTML:n}});default:return["loading"===i?t(G,{attrs:{color:"white",type:e.loadingType}}):t(Y,{class:_t("icon"),attrs:{name:i}}),Object(r.d)(n)&&t("div",{class:_t("text")},[n])]}}()])])}}),Ht={type:"text",mask:!1,value:!0,message:"",className:"",onClose:null,duration:3e3,position:"middle",forbidClick:!1,loadingType:"circular",getContainer:"body",overlayStyle:null},Wt=function(t){return Object(r.g)(t)?t:{message:t}},Yt=[],qt=!1,Xt=n({},Ht);function Qt(t){void 0===t&&(t={});var e=function(){if(r.h)return{};if(!Yt.length||qt||!Object(r.f)(Yt[0].$el)){var t=new(u.a.extend(Rt))({el:document.createElement("div")});Yt.push(t)}return Yt[Yt.length-1]}();return e.value&&e.updateZIndex(),t=n({},Xt,Wt(t),{clear:function(){if(e.value=!1,t.onClose&&t.onClose(),qt&&!r.h){clearTimeout(e.timer),Yt=Yt.filter(function(t){return t!==e});var i=e.$el.parentNode;i&&i.removeChild(e.$el),e.$destroy()}}}),n(e,function(t){return t.overlay=t.mask,t}(t)),clearTimeout(e.timer),t.duration>0&&(e.timer=setTimeout(function(){e.clear()},t.duration)),e}["loading","success","fail"].forEach(function(t){var e;Qt[t]=(e=t,function(t){return Qt(n({type:e},Wt(t)))})}),Qt.clear=function(t){Yt.length&&(t?(Yt.forEach(function(t){t.clear()}),Yt=[]):qt?Yt.shift().clear():Yt[0].clear())},Qt.setDefaultOptions=function(t){n(Xt,t)},Qt.resetDefaultOptions=function(){Xt=n({},Ht)},Qt.allowMultiple=function(t){void 0===t&&(t=!0),qt=t},Qt.install=function(){u.a.use(Rt)},u.a.prototype.$toast=Qt;var Kt=Qt,Ut=Object(r.k)("button"),Gt=Ut[0],Zt=Ut[1];function Jt(t,e,i,n){var s=e.tag,r=e.type,a=e.disabled,u=e.loading,l=e.hairline,c=e.loadingText,f=[Zt([r,e.size,{loading:u,disabled:a,hairline:l,block:e.block,plain:e.plain,round:e.round,square:e.square,"bottom-action":e.bottomAction}]),{"van-hairline--surround":l}];return t(s,o()([{class:f,attrs:{type:e.nativeType,disabled:a},on:{click:function(t){u||a||(d(n,"click",t),Ot(n))},touchstart:function(t){d(n,"touchstart",t)}}},h(n)]),[u?[t(G,{attrs:{size:e.loadingSize,color:"default"===r?void 0:""}}),c&&t("span",{class:Zt("loading-text")},[c])]:t("span",{class:Zt("text")},[i.default?i.default():e.text])])}Jt.props=n({},$t,{text:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,nativeType:String,loadingText:String,bottomAction:Boolean,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"},loadingSize:{type:String,default:"20px"}});var te,ee=Gt(Jt),ie=Object(r.k)("dialog"),ne=ie[0],se=ie[1],oe=ie[2],re=ne({mixins:[F],props:{title:String,message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,showConfirmButton:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{onClickOverlay:function(){this.handleAction("overlay")},handleAction:function(t){var e=this;this.$emit(t),this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(i){!1!==i&&e.onClose(t),e.loading[t]=!1})):this.onClose(t)},onClose:function(t){this.close(),this.callback&&this.callback(t)}},render:function(t){var e,i=this;if(this.shouldRender){var n=this.title,s=this.message,o=this.messageAlign,r=this.slots(),a=n&&t("div",{class:se("header",{isolated:!s&&!r})},[n]),u=(r||s)&&t("div",{class:se("content")},[r||t("div",{domProps:{innerHTML:s},class:se("message",(e={"has-title":n},e[o]=o,e))})]),l=this.showCancelButton&&this.showConfirmButton,c=t("div",{class:["van-hairline--top",se("footer",{buttons:l})]},[this.showCancelButton&&t(ee,{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||oe("cancel")},class:se("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){i.handleAction("cancel")}}}),this.showConfirmButton&&t(ee,{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||oe("confirm")},class:[se("confirm"),{"van-hairline--left":l}],style:{color:this.confirmButtonColor},on:{click:function(){i.handleAction("confirm")}}})]);return t("transition",{attrs:{name:"van-dialog-bounce"}},[t("div",{directives:[{name:"show",value:this.value}],class:[se(),this.className]},[a,u,c])])}}});function ae(t){return r.h?Promise.resolve():new Promise(function(e,i){te&&Object(r.f)(te.$el)||(te&&te.$destroy(),(te=new(u.a.extend(re))({el:document.createElement("div"),propsData:{lazyRender:!1}})).$on("input",function(t){te.value=t})),n(te,ae.currentOptions,t,{resolve:e,reject:i})})}ae.defaultOptions={value:!0,title:"",message:"",overlay:!0,className:"",lockScroll:!0,beforeClose:null,messageAlign:"",getContainer:"body",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1,callback:function(t){te["confirm"===t?"resolve":"reject"](t)}},ae.alert=ae,ae.confirm=function(t){return ae(n({showCancelButton:!0},t))},ae.close=function(){te&&(te.value=!1)},ae.setDefaultOptions=function(t){n(ae.currentOptions,t)},ae.resetDefaultOptions=function(){ae.currentOptions=n({},ae.defaultOptions)},ae.resetDefaultOptions(),ae.install=function(){u.a.use(re)},u.a.prototype.$dialog=ae;var ue=ae,le=Object(r.k)("address-edit-detail"),ce=le[0],he=le[1],de=le[2],fe=Object(r.c)(),pe=ce({props:{value:String,error:Boolean,focused:Boolean,detailRows:Number,searchResult:Array,showSearchResult:Boolean},methods:{onSelect:function(t){this.$emit("select-search",t),this.$emit("input",((t.address||"")+" "+(t.name||"")).trim())},onFinish:function(){this.$refs.field.blur()},renderFinish:function(){var t=this.$createElement;if(this.value&&this.focused&&fe)return t("div",{class:he("finish"),on:{click:this.onFinish}},[de("complete")])},renderSearchResult:function(){var t=this,e=this.$createElement,i=this.searchResult;if(this.focused&&i&&this.showSearchResult)return i.map(function(i){return e(Et,{key:i.name+i.address,attrs:{title:i.name,label:i.address,icon:"location-o",clickable:!0},on:{click:function(){t.onSelect(i)}}})})}},render:function(t){return t(Et,{class:he()},[t(Ft,{attrs:{autosize:!0,rows:this.detailRows,clearable:!fe,type:"textarea",maxlength:"200",value:this.value,error:this.error,label:de("label"),placeholder:de("placeholder")},ref:"field",scopedSlots:{icon:this.renderFinish},on:n({},this.$listeners)}),this.renderSearchResult()])}}),ve={value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1},size:{type:String,default:"30px"}},me=Object(r.k)("switch"),ge=me[0],be=me[1];function ye(t,e,i,n){var s=e.value,r=e.loading,a=e.disabled,u=e.activeValue,l=e.inactiveValue,c={fontSize:e.size,backgroundColor:s?e.activeColor:e.inactiveColor};return t("div",o()([{class:be({on:s===u,disabled:a}),style:c,on:{click:function(){if(!a&&!r){var t=s===u?l:u;d(n,"input",t),d(n,"change",t)}}}},h(n)]),[t("div",{class:be("node")},[r&&t(G,{class:be("loading")})])])}ye.props=ve;var ke=ge(ye),Se=Object(r.k)("switch-cell"),xe=Se[0],we=Se[1];function Ce(t,e,i,s){return t(Et,o()([{attrs:{center:!0,title:e.title,border:e.border},class:we()},h(s)]),[t(ke,{props:n({},e),on:n({},s.listeners)})])}Ce.props=n({},ve,{title:String,border:Boolean,size:{type:String,default:"24px"}});var Te=xe(Ce),Oe=Object(r.k)("address-edit"),$e=Oe[0],Be=Oe[1],Ie=Oe[2],je={name:"",tel:"",country:"",province:"",city:"",county:"",areaCode:"",postalCode:"",addressDetail:"",isDefault:!1},Ae=$e({props:{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showDelete:Boolean,showPostal:Boolean,searchResult:Array,showSetDefault:Boolean,showSearchResult:Boolean,saveButtonText:String,deleteButtonText:String,showArea:{type:Boolean,default:!0},showDetail:{type:Boolean,default:!0},detailRows:{type:Number,default:1},addressInfo:{type:Object,default:function(){return n({},je)}},telValidator:{type:Function,default:at}},data:function(){return{data:{},showAreaPopup:!1,detailFocused:!1,errorInfo:{tel:!1,name:!1,postalCode:!1,addressDetail:!1}}},computed:{areaListLoaded:function(){return Object(r.g)(this.areaList)&&Object.keys(this.areaList).length},areaText:function(){var t=this.data,e=t.country,i=t.province,n=t.city,s=t.county;if(t.areaCode){var o=[e,i,n,s];return i&&i===n&&o.splice(1,1),o.filter(function(t){return t}).join("/")}return""}},watch:{addressInfo:{handler:function(t){this.data=n({},je,t),this.setAreaCode(t.areaCode)},deep:!0,immediate:!0},areaList:function(){this.setAreaCode(this.data.areaCode)}},methods:{onFocus:function(t){this.errorInfo[t]=!1,this.detailFocused="addressDetail"===t,this.$emit("focus",t)},onChangeDetail:function(t){this.data.addressDetail=t,this.$emit("change-detail",t)},onAreaConfirm:function(t){this.showAreaPopup=!1,this.assignAreaValues(),this.$emit("change-area",t)},assignAreaValues:function(){var t=this.$refs.area;if(t){var e=t.getArea();e.areaCode=e.code,delete e.code,n(this.data,e)}},onSave:function(){var t=this,e=["name","tel","areaCode","addressDetail"];this.showPostal&&e.push("postalCode"),e.every(function(e){var i=t.getErrorMessage(e);return i&&(t.errorInfo[e]=!0,Kt(i)),!i})&&!this.isSaving&&this.$emit("save",this.data)},getErrorMessage:function(t){var e=String(this.data[t]||"").trim();if(this.validator){var i=this.validator(t,e);if(i)return i}switch(t){case"name":return e?"":Ie("nameEmpty");case"tel":return this.telValidator(e)?"":Ie("telInvalid");case"areaCode":return e?"":Ie("areaEmpty");case"addressDetail":return e?"":Ie("addressEmpty");case"postalCode":return e&&!/^\d{6}$/.test(e)?Ie("postalEmpty"):""}},onDelete:function(){var t=this;ue.confirm({title:Ie("confirmDelete")}).then(function(){t.$emit("delete",t.data)}).catch(function(){t.$emit("cancel-delete",t.data)})},getArea:function(){return this.$refs.area?this.$refs.area.getValues():[]},setAreaCode:function(t){this.data.areaCode=t||"",t&&this.$nextTick(this.assignAreaValues)},setAddressDetail:function(t){this.data.addressDetail=t},onDetailBlur:function(){var t=this;setTimeout(function(){t.detailFocused=!1})}},render:function(t){var e=this,i=this.data,n=this.errorInfo,s=function(t){return function(){return e.onFocus(t)}},o=this.searchResult.length&&this.detailFocused;return t("div",{class:Be()},[t(Ft,{attrs:{clearable:!0,label:Ie("name"),placeholder:Ie("namePlaceholder"),error:n.name},on:{focus:s("name")},model:{value:i.name,callback:function(t){i.name=t}}}),t(Ft,{attrs:{clearable:!0,type:"tel",label:Ie("tel"),placeholder:Ie("telPlaceholder"),error:n.tel},on:{focus:s("tel")},model:{value:i.tel,callback:function(t){i.tel=t}}}),t(Ft,{directives:[{name:"show",value:this.showArea}],attrs:{readonly:!0,label:Ie("area"),placeholder:Ie("areaPlaceholder"),value:this.areaText},on:{click:function(){e.showAreaPopup=!0}}}),t(pe,{directives:[{name:"show",value:this.showDetail}],attrs:{focused:this.detailFocused,value:i.addressDetail,error:n.addressDetail,detailRows:this.detailRows,searchResult:this.searchResult,showSearchResult:this.showSearchResult},on:{focus:s("addressDetail"),blur:this.onDetailBlur,input:this.onChangeDetail,"select-search":function(t){e.$emit("select-search",t)}}}),this.showPostal&&t(Ft,{directives:[{name:"show",value:!o}],attrs:{type:"tel",maxlength:"6",label:Ie("postal"),placeholder:Ie("postal"),error:n.postalCode},on:{focus:s("postalCode")},model:{value:i.postalCode,callback:function(t){i.postalCode=t}}}),this.slots(),this.showSetDefault&&t(Te,{directives:[{name:"show",value:!o}],attrs:{title:Ie("defaultAddress")},on:{change:function(t){e.$emit("change-default",t)}},model:{value:i.isDefault,callback:function(t){i.isDefault=t}}}),t("div",{directives:[{name:"show",value:!o}],class:Be("buttons")},[t(ee,{attrs:{block:!0,loading:this.isSaving,type:"danger",text:this.saveButtonText||Ie("save")},on:{click:this.onSave}}),this.showDelete&&t(ee,{attrs:{block:!0,loading:this.isDeleting,text:this.deleteButtonText||Ie("delete")},on:{click:this.onDelete}})]),t(et,{attrs:{position:"bottom",lazyRender:!1,getContainer:"body"},model:{value:e.showAreaPopup,callback:function(t){e.showAreaPopup=t}}},[t(wt,{ref:"area",attrs:{loading:!this.areaListLoaded,value:i.areaCode,areaList:this.areaList},on:{confirm:this.onAreaConfirm,cancel:function(){e.showAreaPopup=!1}}})])])}}),Ee=Object(r.k)("radio-group"),Ne=Ee[0],Le=Ee[1],ze=Ne({props:{value:null,disabled:Boolean},watch:{value:function(t){this.$emit("change",t)}},render:function(t){return t("div",{class:Le()},[this.slots()])}}),De={data:function(){return{parent:null}},methods:{findParent:function(t){for(var e=this.$parent;e;){if(e.$options.name===t){this.parent=e;break}e=e.$parent}}}},Fe=function(t,e){return{mixins:[De],props:{name:null,value:null,disabled:Boolean,checkedColor:String,labelPosition:String,labelDisabled:Boolean,shape:{type:String,default:"round"}},created:function(){this.findParent(t)},computed:{isDisabled:function(){return this.parent&&this.parent.disabled||this.disabled},iconStyle:function(){var t=this.checkedColor;if(t&&this.checked&&!this.isDisabled)return{borderColor:t,backgroundColor:t}}},render:function(t){var i=this,n=this.slots,s=this.checked,o=n("icon",{checked:s})||t(Y,{attrs:{name:"success"},style:this.iconStyle}),r=n()&&t("span",{class:e("label",[this.labelPosition,{disabled:this.isDisabled}]),on:{click:this.onClickLabel}},[n()]);return t("div",{class:e(),on:{click:function(t){i.$emit("click",t)}}},[t("div",{class:e("icon",[this.shape,{disabled:this.isDisabled,checked:s}]),on:{click:this.onClickIcon}},[o]),r])}}},Me=Object(r.k)("radio"),Ve=(0,Me[0])({mixins:[Fe("van-radio-group",Me[1])],computed:{currentValue:{get:function(){return this.parent?this.parent.value:this.value},set:function(t){(this.parent||this).$emit("input",t)}},checked:function(){return this.currentValue===this.name}},methods:{onClickIcon:function(){this.isDisabled||(this.currentValue=this.name)},onClickLabel:function(){this.isDisabled||this.labelDisabled||(this.currentValue=this.name)}}}),_e=Object(r.k)("address-item"),Pe=_e[0],Re=_e[1];function He(t,e,i,n){var s=e.disabled,r=e.switchable,a=function(){e.switchable&&d(n,"select")};return t(Et,o()([{class:Re({disabled:s,unswitchable:!r}),attrs:{valueClass:Re("value"),isLink:!s&&r},scopedSlots:{default:function(){var i=e.data,n=[t("div",{class:Re("name")},[i.name+","+i.tel]),t("div",{class:Re("address")},[i.address])];return e.switchable?t(Ve,{attrs:{name:i.id},on:{click:a}},[n]):n},"right-icon":function(){return t(Y,{attrs:{name:"edit"},class:Re("edit"),on:{click:function(t){t.stopPropagation(),d(n,"edit")}}})}},on:{click:a}},h(n)]))}He.props={data:Object,disabled:Boolean,switchable:Boolean};var We=Pe(He),Ye=Object(r.k)("address-list"),qe=Ye[0],Xe=Ye[1],Qe=Ye[2];function Ke(t,e,i,n){var s=function(i,s){return i.map(function(i,o){return t(We,{attrs:{data:i,disabled:s,switchable:e.switchable&&!s},key:i.id,on:{select:function(){d(n,s?"select-disabled":"select",i,o)},edit:function(){d(n,s?"edit-disabled":"edit",i,o)}}})})},r=s(e.list),a=s(e.disabledList,!0);return t("div",o()([{class:Xe()},h(n)]),[i.top&&i.top(),t(ze,{attrs:{value:e.value},on:{input:function(t){d(n,"input",t)}}},[r]),e.disabledText&&t("div",{class:Xe("disabled-text")},[e.disabledText]),a,i.default&&i.default(),t(ee,{attrs:{square:!0,size:"large",type:"danger",text:e.addButtonText||Qe("add")},class:Xe("add"),on:{click:function(){d(n,"add")}}})])}Ke.props={list:Array,disabledList:Array,disabledText:String,addButtonText:String,value:[String,Number],switchable:{type:Boolean,default:!0}};var Ue=qe(Ke),Ge=Object(r.k)("badge"),Ze=Ge[0],Je=Ge[1],ti=Ze({props:{url:String,info:[String,Number],title:String},inject:["vanBadgeGroup"],created:function(){this.parent.badges.push(this)},beforeDestroy:function(){var t=this;this.parent.badges=this.parent.badges.filter(function(e){return e!==t})},computed:{parent:function(){return this.vanBadgeGroup},select:function(){return this.parent.badges.indexOf(this)===+this.parent.activeKey}},methods:{onClick:function(){var t=this.parent.badges.indexOf(this);this.$emit("click",t),this.parent.$emit("change",t)}},render:function(t){return t("a",{attrs:{href:this.url},class:[Je({select:this.select}),"van-hairline"],on:{click:this.onClick}},[t("div",{class:Je("text")},[this.title,t(R,{attrs:{info:this.info},class:Je("info")})])])}}),ei=Object(r.k)("badge-group"),ii=ei[0],ni=ei[1],si=ii({props:{activeKey:{type:[Number,String],default:0}},provide:function(){return{vanBadgeGroup:this}},data:function(){return{badges:[]}},render:function(t){return t("div",{class:[ni(),"van-hairline--top-bottom"]},[this.slots()])}}),oi="#f44",ri="#fff",ai="#969799",ui=Object(r.k)("tag"),li=ui[0],ci=ui[1],hi={danger:oi,primary:"#1989fa",success:"#07c160"};function di(t,e,i,n){var s,r=e.type,a=e.mark,u=e.plain,l=e.round,c=e.size,d=e.color||r&&hi[r]||ai,f=((s={})[u?"color":"backgroundColor"]=d,s);e.textColor&&(f.color=e.textColor);var p={mark:a,plain:u,round:l};return c&&(p[c]=c),t("span",o()([{style:f,class:[ci(p),{"van-hairline--surround":u}]},h(n,!0)]),[i.default&&i.default()])}di.props={size:String,type:String,mark:Boolean,color:String,plain:Boolean,round:Boolean,textColor:String};var fi=li(di),pi=Object(r.k)("card"),vi=pi[0],mi=pi[1];function gi(t,e,i,n){var s=e.thumb,a=i.thumb||s,u=i.tag||e.tag,l=i.num||Object(r.d)(e.num),c=i.price||Object(r.d)(e.price),d=i["origin-price"]||Object(r.d)(e.originPrice),f=l||c||d,p=a&&t("a",{attrs:{href:e.thumbLink},class:mi("thumb")},[i.thumb?i.thumb():e.lazyLoad?t("img",{class:mi("img"),directives:[{name:"lazy",value:s}]}):t("img",{class:mi("img"),attrs:{src:s}}),u&&t("div",{class:mi("tag")},[i.tag?i.tag():t(fi,{attrs:{mark:!0,type:"danger"}},[e.tag])])]),v=i.title?i.title():e.title&&t("div",{class:mi("title")},[e.title]),m=i.desc?i.desc():e.desc&&t("div",{class:[mi("desc"),"van-ellipsis"]},[e.desc]),g=c&&t("div",{class:mi("price")},[i.price?i.price():e.currency+" "+e.price]),b=d&&t("div",{class:mi("origin-price")},[i["origin-price"]?i["origin-price"]():e.currency+" "+e.originPrice]),y=l&&t("div",{class:mi("num")},[i.num?i.num():"x "+e.num]),k=i.footer&&t("div",{class:mi("footer")},[i.footer()]);return t("div",o()([{class:mi()},h(n,!0)]),[t("div",{class:mi("header")},[p,t("div",{class:mi("content",{centered:e.centered})},[v,m,i.tags&&i.tags(),f&&t("div",{class:"van-card__bottom"},[g,b,y])])]),k])}gi.props={tag:String,desc:String,thumb:String,title:String,centered:Boolean,lazyLoad:Boolean,thumbLink:String,num:[Number,String],price:[Number,String],originPrice:[Number,String],currency:{type:String,default:"¥"}};var bi=vi(gi),yi=Object(r.k)("cell-group"),ki=yi[0],Si=yi[1];function xi(t,e,i,n){var s=t("div",o()([{class:[Si(),{"van-hairline--top-bottom":e.border}]},h(n,!0)]),[i.default&&i.default()]);return e.title?t("div",[t("div",{class:Si("title")},[e.title]),s]):s}xi.props={title:String,border:{type:Boolean,default:!0}};var wi=ki(xi),Ci=Object(r.k)("checkbox"),Ti=(0,Ci[0])({mixins:[Fe("van-checkbox-group",Ci[1])],computed:{checked:{get:function(){return this.parent?-1!==this.parent.value.indexOf(this.name):this.value},set:function(t){this.parent?this.setParentValue(t):this.$emit("input",t)}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggle:function(){var t=this,e=!this.checked;clearTimeout(this.toggleTask),this.toggleTask=setTimeout(function(){t.checked=e})},onClickIcon:function(){this.isDisabled||this.toggle()},onClickLabel:function(){this.isDisabled||this.labelDisabled||this.toggle()},setParentValue:function(t){var e=this.parent,i=e.value.slice();if(t){if(e.max&&i.length>=e.max)return;-1===i.indexOf(this.name)&&(i.push(this.name),e.$emit("input",i))}else{var n=i.indexOf(this.name);-1!==n&&(i.splice(n,1),e.$emit("input",i))}}}}),Oi=Object(r.k)("checkbox-group"),$i=Oi[0],Bi=Oi[1],Ii=$i({props:{max:Number,value:Array,disabled:Boolean},watch:{value:function(t){this.$emit("change",t)}},render:function(t){return t("div",{class:Bi()},[this.slots()])}}),ji=i(3),Ai=Object(r.k)("circle"),Ei=Ai[0],Ni=Ai[1],Li="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0";function zi(t){return Math.min(Math.max(t,0),100)}var Di=Ei({props:{text:String,value:Number,speed:Number,size:{type:String,default:"100px"},fill:{type:String,default:"none"},rate:{type:Number,default:100},layerColor:{type:String,default:ri},color:{type:String,default:"#1989fa"},strokeWidth:{type:Number,default:40},clockwise:{type:Boolean,default:!0}},computed:{style:function(){return{width:this.size,height:this.size}},layerStyle:function(){var t=3140*(100-this.value)/100;return t=this.clockwise?t:6280-t,{stroke:""+this.color,strokeDashoffset:t+"px",strokeWidth:this.strokeWidth+1+"px"}},hoverStyle:function(){return{fill:""+this.fill,stroke:""+this.layerColor,strokeWidth:this.strokeWidth+"px"}}},watch:{rate:{handler:function(){this.startTime=Date.now(),this.startRate=this.value,this.endRate=zi(this.rate),this.increase=this.endRate>this.startRate,this.duration=Math.abs(1e3*(this.startRate-this.endRate)/this.speed),this.speed?(Object(ji.a)(this.rafId),this.rafId=Object(ji.b)(this.animate)):this.$emit("input",this.endRate)},immediate:!0}},methods:{animate:function(){var t=Date.now(),e=Math.min((t-this.startTime)/this.duration,1)*(this.endRate-this.startRate)+this.startRate;this.$emit("input",zi(parseFloat(e.toFixed(1)))),(this.increase?ethis.endRate)&&(this.rafId=Object(ji.b)(this.animate))}},render:function(t){return t("div",{class:Ni(),style:this.style},[t("svg",{attrs:{viewBox:"0 0 1060 1060"}},[t("path",{class:Ni("hover"),style:this.hoverStyle,attrs:{d:Li}}),t("path",{class:Ni("layer"),style:this.layerStyle,attrs:{d:Li}})]),this.slots()||this.text&&t("div",{class:Ni("text")},[this.text])])}}),Fi=Object(r.k)("col"),Mi=Fi[0],Vi=Fi[1],_i=Mi({props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{gutter:function(){return this.$parent&&Number(this.$parent.gutter)||0},style:function(){var t=this.gutter/2+"px";return this.gutter?{paddingLeft:t,paddingRight:t}:{}}},render:function(t){var e,i=this.span,n=this.offset;return t(this.tag,{class:Vi((e={},e[i]=i,e["offset-"+n]=n,e)),style:this.style},[this.slots()])}}),Pi=Object(r.k)("collapse"),Ri=Pi[0],Hi=Pi[1],Wi=Ri({props:{accordion:Boolean,value:[String,Number,Array],border:{type:Boolean,default:!0}},data:function(){return{items:[]}},methods:{switch:function(t,e){this.accordion||(t=e?this.value.concat(t):this.value.filter(function(e){return e!==t})),this.$emit("change",t),this.$emit("input",t)}},render:function(t){return t("div",{class:[Hi(),{"van-hairline--top-bottom":this.border}]},[this.slots()])}}),Yi=Object(r.k)("collapse-item"),qi=Yi[0],Xi=Yi[1],Qi=["title","icon","right-icon"],Ki=qi({mixins:[De],props:n({},Ct,{name:[String,Number],disabled:Boolean,isLink:{type:Boolean,default:!0}}),data:function(){return{show:null,inited:null}},computed:{items:function(){return this.parent.items},index:function(){return this.items.indexOf(this)},currentName:function(){return Object(r.d)(this.name)?this.name:this.index},expanded:function(){var t=this;if(!this.parent)return null;var e=this.parent.value;return this.parent.accordion?e===this.currentName:e.some(function(e){return e===t.currentName})}},created:function(){this.findParent("van-collapse"),this.items.push(this),this.show=this.expanded,this.inited=this.expanded},destroyed:function(){this.items.splice(this.index,1)},watch:{expanded:function(t,e){var i=this;null!==e&&(t&&(this.show=!0,this.inited=!0),Object(ji.b)(function(){var e=i.$refs,n=e.content,s=e.wrapper;if(n&&s){var o=n.clientHeight;if(o){var r=o+"px";s.style.height=t?0:r,Object(ji.b)(function(){s.style.height=t?r:0})}else i.onTransitionEnd()}}))}},methods:{onClick:function(){if(!this.disabled){var t=this.parent,e=t.accordion&&this.currentName===t.value?"":this.currentName,i=!this.expanded;this.parent.switch(e,i)}},onTransitionEnd:function(){this.expanded?this.$refs.wrapper.style.height=null:this.show=!1}},render:function(t){var e=this,i=Qi.reduce(function(t,i){return e.slots(i)&&(t[i]=function(){return e.slots(i)}),t},{});this.slots("value")&&(i.default=function(){return e.slots("value")});var s=t(Et,{class:Xi("title",{disabled:this.disabled,expanded:this.expanded}),on:{click:this.onClick},scopedSlots:i,props:n({},this.$props)}),o=this.inited&&t("div",{directives:[{name:"show",value:this.show}],ref:"wrapper",class:Xi("wrapper"),on:{transitionend:this.onTransitionEnd}},[t("div",{ref:"content",class:Xi("content")},[this.slots()])]);return t("div",{class:[Xi(),{"van-hairline--top":this.index}]},[s,o])}}),Ui=Object(r.k)("contact-card"),Gi=Ui[0],Zi=Ui[1],Ji=Ui[2];function tn(t,e,i,n){var s=e.type,r=e.editable;return t(Et,o()([{attrs:{center:!0,border:!1,isLink:r,valueClass:Zi("value"),icon:"edit"===s?"contact":"add-square"},class:Zi([s]),on:{click:function(t){r&&d(n,"click",t)}}},h(n)]),["add"===s?e.addText||Ji("addText"):[t("div",[Ji("name")+":"+e.name]),t("div",[Ji("tel")+":"+e.tel])]])}tn.props={tel:String,name:String,addText:String,editable:{type:Boolean,default:!0},type:{type:String,default:"add"}};var en=Gi(tn),nn=Object(r.k)("contact-edit"),sn=nn[0],on=nn[1],rn=nn[2],an={tel:"",name:""},un=sn({props:{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,contactInfo:{type:Object,default:function(){return n({},an)}},telValidator:{type:Function,default:at}},data:function(){return{data:n({},an,this.contactInfo),errorInfo:{name:!1,tel:!1}}},watch:{contactInfo:function(t){this.data=n({},an,t)}},methods:{onFocus:function(t){this.errorInfo[t]=!1},getErrorMessageByKey:function(t){var e=this.data[t].trim();switch(t){case"name":return e?"":rn("nameEmpty");case"tel":return this.telValidator(e)?"":rn("telInvalid")}},onSave:function(){var t=this;["name","tel"].every(function(e){var i=t.getErrorMessageByKey(e);return i&&(t.errorInfo[e]=!0,Kt(i)),!i})&&!this.isSaving&&this.$emit("save",this.data)},onDelete:function(){var t=this;ue.confirm({message:rn("confirmDelete")}).then(function(){t.$emit("delete",t.data)})}},render:function(t){var e=this,i=this.data,n=this.errorInfo,s=function(t){return function(){return e.onFocus(t)}};return t("div",{class:on()},[t(Ft,{attrs:{clearable:!0,maxlength:"30",label:rn("name"),placeholder:rn("nameEmpty"),error:n.name},on:{focus:s("name")},model:{value:i.name,callback:function(t){i.name=t}}}),t(Ft,{attrs:{clearable:!0,type:"tel",label:rn("tel"),placeholder:rn("telEmpty"),error:n.tel},on:{focus:s("tel")},model:{value:i.tel,callback:function(t){i.tel=t}}}),t("div",{class:on("buttons")},[t(ee,{attrs:{block:!0,type:"danger",text:rn("save"),loading:this.isSaving},on:{click:this.onSave}}),this.isEdit&&t(ee,{attrs:{block:!0,text:rn("delete"),loading:this.isDeleting},on:{click:this.onDelete}})])])}}),ln=Object(r.k)("contact-list"),cn=ln[0],hn=ln[1],dn=ln[2];function fn(t,e,i,n){var s=e.list.map(function(e,i){var s=function(){d(n,"input",e.id),d(n,"select",e,i)};return t(Et,{key:e.id,attrs:{isLink:!0,valueClass:hn("item-value")},class:hn("item"),scopedSlots:{default:function(){return t(Ve,{attrs:{name:e.id},on:{click:s}},[t("div",{class:hn("name")},[e.name+","+e.tel])])},"right-icon":function(){return t(Y,{attrs:{name:"edit"},class:hn("edit"),on:{click:function(t){t.stopPropagation(),d(n,"edit",e,i)}}})}},on:{click:s}})});return t("div",o()([{class:hn()},h(n)]),[t(ze,{attrs:{value:e.value},class:hn("group")},[s]),t(ee,{attrs:{square:!0,size:"large",type:"danger",text:e.addText||dn("addText")},class:hn("add"),on:{click:function(){d(n,"add")}}})])}fn.props={value:null,list:Array,addText:String};var pn=cn(fn),vn=Object(r.k)("coupon"),mn=vn[0],gn=vn[1],bn=vn[2];function yn(t){return(t<10?"0":"")+t}function kn(t){var e=new Date(1e3*t);return e.getFullYear()+"."+yn(e.getMonth()+1)+"."+yn(e.getDate())}var Sn=mn({props:{coupon:Object,chosen:Boolean,disabled:Boolean,currency:{type:String,default:"¥"}},computed:{validPeriod:function(){return bn("valid")+":"+kn(this.coupon.startAt)+" - "+kn(this.coupon.endAt)},faceAmount:function(){var t,e,i=this.coupon;return i.valueDesc?i.valueDesc+""+(i.unitDesc||"")+"":i.denominations?""+this.currency+" "+((e=this.coupon.denominations)/100).toFixed(e%100==0?0:e%10==0?1:2):i.discount?bn("discount",((t=this.coupon.discount)/10).toFixed(t%10==0?0:1)):""},conditionMessage:function(){var t=this.coupon.originCondition;return 0===(t=t%100==0?Math.round(t/100):(t/100).toFixed(2))?bn("unlimited"):bn("condition",t)}},render:function(t){var e=this.coupon,i=this.disabled,n=i&&e.reason||e.description;return t("div",{class:gn({disabled:i})},[t("div",{class:gn("content")},[t("div",{class:gn("head")},[t("h2",{domProps:{innerHTML:this.faceAmount}}),t("p",[this.coupon.condition||this.conditionMessage])]),t("div",{class:gn("body")},[t("h2",[e.name]),t("p",[this.validPeriod]),this.chosen&&t(Ti,{attrs:{value:!0},class:gn("corner")})])]),n&&t("p",{class:gn("description")},[n])])}}),xn=Object(r.k)("coupon-cell"),wn=xn[0],Cn=xn[1],Tn=xn[2];function On(t,e,i,n){var s=e.coupons[e.chosenCoupon]?"van-coupon-cell--selected":"",r=function(t){var e=t.coupons,i=t.chosenCoupon,n=t.currency,s=e[i];return s?"-"+n+((s.denominations||s.value)/100).toFixed(2):0===e.length?Tn("tips"):Tn("count",e.length)}(e);return t(Et,o()([{class:Cn(),attrs:{value:r,title:e.title||Tn("title"),border:e.border,isLink:e.editable,valueClass:s}},h(n,!0)]))}On.model={prop:"chosenCoupon"},On.props={title:String,coupons:Array,currency:{type:String,default:"¥"},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},chosenCoupon:{type:Number,default:-1}};var $n=wn(On),Bn=Object(r.k)("tab"),In=Bn[0],jn=Bn[1],An=In({mixins:[De],props:{title:String,disabled:Boolean},data:function(){return{inited:!1}},computed:{index:function(){return this.parent.tabs.indexOf(this)},selected:function(){return this.index===this.parent.curActive}},watch:{"parent.curActive":function(){this.inited=this.inited||this.selected},title:function(){this.parent.setLine()}},created:function(){this.findParent("van-tabs")},mounted:function(){var t=this.parent.tabs,e=this.parent.slots().indexOf(this.$vnode);t.splice(-1===e?t.length:e,0,this),this.slots("title")&&this.parent.renderTitle(this.$refs.title,this.index)},beforeDestroy:function(){this.parent.tabs.splice(this.index,1)},render:function(t){var e=this.slots,i=this.inited||!this.parent.lazyRender;return t("div",{directives:[{name:"show",value:this.selected||this.parent.animated}],class:jn("pane")},[i?e():t(),e("title")&&t("div",{ref:"title"},[e("title")])])}}),En=Object(r.k)("tabs"),Nn=En[0],Ln=En[1],zn=Object(r.k)("tab")[1],Dn=Nn({mixins:[m],model:{prop:"active"},props:{color:String,sticky:Boolean,animated:Boolean,offsetTop:Number,swipeable:Boolean,background:String,titleActiveColor:String,titleInactiveColor:String,ellipsis:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0},lineWidth:{type:Number,default:null},lineHeight:{type:Number,default:null},active:{type:[Number,String],default:0},type:{type:String,default:"line"},duration:{type:Number,default:.3},swipeThreshold:{type:Number,default:4}},data:function(){return{tabs:[],position:"",curActive:null,lineStyle:{backgroundColor:this.color},events:{resize:!1,sticky:!1,swipeable:!1}}},computed:{scrollable:function(){return this.tabs.length>this.swipeThreshold||!this.ellipsis},wrapStyle:function(){switch(this.position){case"top":return{top:this.offsetTop+"px",position:"fixed"};case"bottom":return{top:"auto",bottom:0};default:return null}},navStyle:function(){return{borderColor:this.color,background:this.background}},trackStyle:function(){if(this.animated)return{left:-1*this.curActive*100+"%",transitionDuration:this.duration+"s"}}},watch:{active:function(t){t!==this.curActive&&this.correctActive(t)},color:function(){this.setLine()},tabs:function(){this.correctActive(this.curActive||this.active),this.scrollIntoView(),this.setLine()},curActive:function(){var t,e;this.scrollIntoView(),this.setLine(),"top"!==this.position&&"bottom"!==this.position||(t=window,e=z(this.$el)-this.offsetTop,"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e))},sticky:function(){this.handlers(!0)},swipeable:function(){this.handlers(!0)}},mounted:function(){this.onShow()},activated:function(){this.onShow(),this.setLine()},deactivated:function(){this.handlers(!1)},beforeDestroy:function(){this.handlers(!1)},methods:{onShow:function(){var t=this;this.$nextTick(function(){t.inited=!0,t.handlers(!0),t.scrollIntoView(!0)})},handlers:function(t){var e=this.events,i=this.sticky&&t,n=this.swipeable&&t;if(e.resize!==t&&(e.resize=t,(t?y:k)(window,"resize",this.setLine,!0)),e.sticky!==i&&(e.sticky=i,this.scrollEl=this.scrollEl||N(this.$el),(i?y:k)(this.scrollEl,"scroll",this.onScroll,!0),this.onScroll()),e.swipeable!==n){e.swipeable=n;var s=this.$refs.content,o=n?y:k;o(s,"touchstart",this.touchStart),o(s,"touchmove",this.touchMove),o(s,"touchend",this.onTouchEnd),o(s,"touchcancel",this.onTouchEnd)}},onTouchEnd:function(){var t=this.direction,e=this.deltaX,i=this.curActive;"horizontal"===t&&this.offsetX>=50&&(e>0&&0!==i?this.setCurActive(i-1):e<0&&i!==this.tabs.length-1&&this.setCurActive(i+1))},onScroll:function(){var t=L(window)+this.offsetTop,e=z(this.$el),i=e+this.$el.offsetHeight-this.$refs.wrap.offsetHeight;this.position=t>i?"bottom":t>e?"top":"";var n={scrollTop:t,isFixed:"top"===this.position};this.$emit("scroll",n)},setLine:function(){var t=this,e=this.inited;this.$nextTick(function(){var i=t.$refs.tabs;if(i&&i[t.curActive]&&"line"===t.type){var n=i[t.curActive],s=t.lineWidth,o=t.lineHeight,a=Object(r.d)(s)?s:n.offsetWidth/2,u=n.offsetLeft+(n.offsetWidth-a)/2,l={width:a+"px",backgroundColor:t.color,transform:"translateX("+u+"px)"};if(e&&(l.transitionDuration=t.duration+"s"),Object(r.d)(o)){var c=o+"px";l.height=c,l.borderRadius=c}t.lineStyle=l}})},correctActive:function(t){t=+t;var e=this.tabs.some(function(e){return e.index===t}),i=(this.tabs[0]||{}).index||0;this.setCurActive(e?t:i)},setCurActive:function(t){t=this.findAvailableTab(t,t=0&&n10?i:"0"+i)+":00"}if(!e){var n=t.split(":"),s=n[0],o=n[1];return(s=Hn(Object(r.j)(s,this.minHour,this.maxHour)))+":"+(o=Hn(Object(r.j)(o,this.minMinute,this.maxMinute)))}return t=Math.max(t,this.minDate.getTime()),t=Math.min(t,this.maxDate.getTime()),new Date(t)},getBoundary:function(t,e){var i,n=this[t+"Date"],s=n.getFullYear(),o=1,r=1,a=0,u=0;return"max"===t&&(o=12,r=Yn(e.getFullYear(),e.getMonth()+1),a=23,u=59),e.getFullYear()===s&&(o=n.getMonth()+1,e.getMonth()+1===o&&(r=n.getDate(),e.getDate()===r&&(a=n.getHours(),e.getHours()===a&&(u=n.getMinutes())))),(i={})[t+"Year"]=s,i[t+"Month"]=o,i[t+"Date"]=r,i[t+"Hour"]=a,i[t+"Minute"]=u,i},onConfirm:function(){this.$emit("confirm",this.innerValue)},onChange:function(t){var e,i=this;if("time"===this.type){var n=t.getIndexes();e=n[0]+this.minHour+":"+(n[1]+this.minMinute)}else{var s=t.getValues(),o=Wn(s[0]),r=Wn(s[1]),a=Yn(o,r),u=Wn(s[2]);"year-month"===this.type&&(u=1),u=u>a?a:u;var l=0,c=0;"datetime"===this.type&&(l=Wn(s[3]),c=Wn(s[4])),e=new Date(o,r-1,u,l,c)}this.innerValue=this.correctValue(e),this.$nextTick(function(){i.$nextTick(function(){i.$emit("change",t)})})},updateColumnValue:function(t){var e=this,i=[],n=this.formatter;if("time"===this.type){var s=t.split(":");i=[n("hour",s[0]),n("minute",s[1])]}else i=[n("year",""+t.getFullYear()),n("month",Hn(t.getMonth()+1)),n("day",Hn(t.getDate()))],"datetime"===this.type&&i.push(n("hour",Hn(t.getHours())),n("minute",Hn(t.getMinutes()))),"year-month"===this.type&&(i=i.slice(0,2));this.$nextTick(function(){e.$refs.picker.setValues(i)})}},render:function(t){var e=this,i={};return Object.keys(ct).forEach(function(t){i[t]=e[t]}),t(yt,{class:Qn(),ref:"picker",attrs:{columns:this.columns},on:{change:this.onChange,confirm:this.onConfirm,cancel:function(){e.$emit("cancel")}},props:n({},i)})}}),Gn=Object(r.k)("goods-action"),Zn=Gn[0],Jn=Gn[1];function ts(t,e,i,n){return t("div",o()([{class:Jn({"safe-area-inset-bottom":e.safeAreaInsetBottom})},h(n,!0)]),[i.default&&i.default()])}ts.props={safeAreaInsetBottom:Boolean};var es=Zn(ts),is=Object(r.k)("goods-action-big-btn"),ns=is[0],ss=is[1];function os(t,e,i,n){return t(ee,o()([{attrs:{square:!0,size:"large",loading:e.loading,disabled:e.disabled,type:e.primary?"danger":"warning"},class:ss(),on:{click:function(t){d(n,"click",t),Ot(n)}}},h(n)]),[i.default?i.default():e.text])}os.props=n({},$t,{text:String,primary:Boolean,loading:Boolean,disabled:Boolean});var rs=ns(os),as=Object(r.k)("goods-action-mini-btn"),us=as[0],ls=as[1];function cs(t,e,i,n){return t("div",o()([{class:[ls(),"van-hairline"],on:{click:function(t){d(n,"click",t),Ot(n)}}},h(n)]),[t(Y,{class:[ls("icon"),e.iconClass],attrs:{tag:"div",info:e.info,name:e.icon}}),i.default?i.default():e.text])}cs.props=n({},$t,{text:String,icon:String,info:[String,Number],iconClass:null});var hs=us(cs),ds=Object(r.k)("swipe"),fs=ds[0],ps=ds[1],vs=fs({mixins:[m],props:{width:Number,height:Number,autoplay:Number,vertical:Boolean,initialSwipe:Number,indicatorColor:String,loop:{type:Boolean,default:!0},touchable:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},duration:{type:Number,default:500}},data:function(){return{computedWidth:0,computedHeight:0,offset:0,active:0,deltaX:0,deltaY:0,swipes:[],swiping:!1}},mounted:function(){this.initialize(),this.$isServer||y(window,"resize",this.onResize,!0)},activated:function(){this.rendered&&this.initialize(),this.rendered=!0},destroyed:function(){this.clear(),this.$isServer||k(window,"resize",this.onResize)},watch:{swipes:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t?this.autoPlay():this.clear()}},computed:{count:function(){return this.swipes.length},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t,e=this.vertical?"height":"width",i=this.vertical?"width":"height";return(t={})[e]=this.trackSize+"px",t[i]=this[i]?this[i]+"px":"",t.transitionDuration=(this.swiping?0:this.duration)+"ms",t.transform="translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)",t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}}},methods:{initialize:function(t){if(void 0===t&&(t=this.initialSwipe),clearTimeout(this.timer),this.$el){var e=this.$el.getBoundingClientRect();this.computedWidth=this.width||e.width,this.computedHeight=this.height||e.height}this.swiping=!0,this.active=t,this.offset=this.count>1?-this.size*this.active:0,this.swipes.forEach(function(t){t.offset=0}),this.autoPlay()},onResize:function(){this.initialize(this.activeIndicator)},onTouchStart:function(t){this.touchable&&(this.clear(),this.swiping=!0,this.touchStart(t),this.correctPosition())},onTouchMove:function(t){this.touchable&&this.swiping&&(this.touchMove(t),this.isCorrectDirection&&(x(t,!0),this.move({offset:Math.min(Math.max(this.delta,-this.size),this.size)})))},onTouchEnd:function(){if(this.touchable&&this.swiping){if(this.delta&&this.isCorrectDirection){var t=this.vertical?this.offsetY:this.offsetX;this.move({pace:t>0?this.delta>0?-1:1:0,emitChange:!0})}this.swiping=!1,this.autoPlay()}},move:function(t){var e=t.pace,i=void 0===e?0:e,n=t.offset,s=void 0===n?0:n,o=t.emitChange,r=this.delta,a=this.active,u=this.count,l=this.swipes,c=this.trackSize,h=0===a,d=a===u-1;!this.loop&&(h&&(s>0||i<0)||d&&(s<0||i>0))||u<=1||(l[0]&&(l[0].offset=d&&(r<0||i>0)?c:0),l[u-1]&&(l[u-1].offset=h&&(r>0||i<0)?-c:0),i&&a+i>=-1&&a+i<=u&&(this.active+=i,o&&this.$emit("change",this.activeIndicator)),this.offset=Math.round(s-this.active*this.size))},swipeTo:function(t){var e=this;this.swiping=!0,this.resetTouchStatus(),this.correctPosition(),setTimeout(function(){e.swiping=!1,e.move({pace:t%e.count-e.active,emitChange:!0})},30)},correctPosition:function(){this.active<=-1&&this.move({pace:this.count}),this.active>=this.count&&this.move({pace:-this.count})},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,e=this.autoplay;e&&this.count>1&&(this.clear(),this.timer=setTimeout(function(){t.swiping=!0,t.resetTouchStatus(),t.correctPosition(),setTimeout(function(){t.swiping=!1,t.move({pace:1,emitChange:!0}),t.autoPlay()},30)},e))}},render:function(t){var e=this,i=this.count,n=this.activeIndicator,s=this.slots("indicator")||this.showIndicators&&i>1&&t("div",{class:ps("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(i)).map(function(i,s){return t("i",{class:ps("indicator",{active:s===n}),style:s===n?e.indicatorStyle:null})})]);return t("div",{class:ps()},[t("div",{ref:"track",style:this.trackStyle,class:ps("track"),on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.slots()]),s])}}),ms=Object(r.k)("swipe-item"),gs=ms[0],bs=ms[1],ys=gs({data:function(){return{offset:0}},beforeCreate:function(){this.$parent.swipes.push(this)},destroyed:function(){this.$parent.swipes.splice(this.$parent.swipes.indexOf(this),1)},render:function(t){var e=this.$parent,i=e.vertical,s=e.computedWidth,o=e.computedHeight,r={width:s+"px",height:i?o+"px":"100%",transform:"translate"+(i?"Y":"X")+"("+this.offset+"px)"};return t("div",{class:bs(),style:r,on:n({},this.$listeners)},[this.slots()])}}),ks=Object(r.k)("image-preview"),Ss=ks[0],xs=ks[1];function ws(t){return Math.sqrt(Math.abs((t[0].clientX-t[1].clientX)*(t[0].clientY-t[1].clientY)))}var Cs,Ts=Ss({mixins:[F,m],props:{images:Array,className:null,lazyLoad:Boolean,asyncClose:Boolean,startPosition:Number,showIndicators:Boolean,loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0},minZoom:{type:Number,default:1/3},maxZoom:{type:Number,default:3},overlayClass:{type:String,default:"van-image-preview__overlay"},closeOnClickOverlay:{type:Boolean,default:!0}},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,active:0}},computed:{imageStyle:function(){var t=this.scale,e={transition:this.zooming||this.moving?"":".3s all"};return 1!==t&&(e.transform="scale3d("+t+", "+t+", 1) translate("+this.moveX/t+"px, "+this.moveY/t+"px)"),e}},watch:{value:function(){this.active=this.startPosition},startPosition:function(t){this.active=t}},methods:{onWrapperTouchStart:function(){this.touchStartTime=new Date},onWrapperTouchEnd:function(t){x(t);var e=new Date-this.touchStartTime,i=this.$refs.swipe||{},n=i.offsetX,s=void 0===n?0:n,o=i.offsetY;if(e<300&&s<10&&(void 0===o?0:o)<10){var r=this.active;this.resetScale(),this.$emit("close",{index:r,url:this.images[r]}),this.asyncClose||this.$emit("input",!1)}},startMove:function(t){var e=t.currentTarget.getBoundingClientRect(),i=window.innerWidth,n=window.innerHeight;this.touchStart(t),this.moving=!0,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.maxMoveX=Math.max(0,(e.width-i)/2),this.maxMoveY=Math.max(0,(e.height-n)/2)},startZoom:function(t){this.moving=!1,this.zooming=!0,this.startScale=this.scale,this.startDistance=ws(t.touches)},onTouchStart:function(t){var e=t.touches,i=(this.$refs.swipe||{}).offsetX,n=void 0===i?0:i;1===e.length&&1!==this.scale?this.startMove(t):2!==e.length||n||this.startZoom(t)},onTouchMove:function(t){var e=t.touches;if((this.moving||this.zooming)&&x(t,!0),this.moving){this.touchMove(t);var i=this.deltaX+this.startMoveX,n=this.deltaY+this.startMoveY;this.moveX=Object(r.j)(i,-this.maxMoveX,this.maxMoveX),this.moveY=Object(r.j)(n,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&2===e.length){var s=ws(e),o=this.startScale*s/this.startDistance;this.scale=Object(r.j)(o,this.minZoom,this.maxZoom)}},onTouchEnd:function(t){if(this.moving||this.zooming){var e=!0;this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(e=!1),t.touches.length||(this.moving=!1,this.zooming=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale()),e&&x(t,!0)}},onChange:function(t){this.resetScale(),this.active=t,this.$emit("change",t)},resetScale:function(){this.scale=1,this.moveX=0,this.moveY=0}},render:function(t){var e=this;if(this.value){var i=this.active,n=this.images,s=this.showIndex&&t("div",{class:xs("index")},[this.slots("index")||i+1+"/"+n.length]),r=t(vs,{ref:"swipe",attrs:{loop:this.loop,indicatorColor:"white",initialSwipe:this.startPosition,showIndicators:this.showIndicators},on:{change:this.onChange}},[n.map(function(n,s){var r={class:xs("image"),style:s===i?e.imageStyle:null,on:{touchstart:e.onTouchStart,touchmove:e.onTouchMove,touchend:e.onTouchEnd,touchcancel:e.onTouchEnd}};return t(ys,[e.lazyLoad?t("img",o()([{directives:[{name:"lazy",value:n}]},r])):t("img",o()([{attrs:{src:n}},r]))])})]);return t("transition",{attrs:{name:"van-fade"}},[t("div",{class:[xs(),this.className],on:{touchstart:this.onWrapperTouchStart,touchend:this.onWrapperTouchEnd,touchcancel:this.onWrapperTouchEnd}},[s,r])])}}}),Os={images:[],loop:!0,value:!0,minZoom:1/3,maxZoom:3,className:"",lazyLoad:!1,showIndex:!0,asyncClose:!1,startPosition:0,showIndicators:!1},$s=function(t,e){if(void 0===e&&(e=0),!r.h){Cs||(Cs=new(u.a.extend(Ts))({el:document.createElement("div")}),document.body.appendChild(Cs.$el));var i=Array.isArray(t)?{images:t,startPosition:e}:t;return n(Cs,Os,i),Cs.$once("input",function(t){Cs.value=t}),i.onClose&&Cs.$once("close",i.onClose),Cs}};$s.install=function(){u.a.use(Ts)};var Bs=$s,Is=i(6),js=i.n(Is).a,As=Object(r.k)("list"),Es=As[0],Ns=As[1],Ls=As[2],zs=Es({model:{prop:"loading"},props:{error:Boolean,loading:Boolean,finished:Boolean,errorText:String,loadingText:String,finishedText:String,immediateCheck:{type:Boolean,default:!0},offset:{type:Number,default:300},direction:{type:String,default:"down"}},mounted:function(){this.scroller=N(this.$el),this.handler(!0),this.immediateCheck&&this.$nextTick(this.check)},destroyed:function(){this.handler(!1)},activated:function(){this.handler(!0)},deactivated:function(){this.handler(!1)},watch:{loading:function(){this.$nextTick(this.check)},finished:function(){this.$nextTick(this.check)}},methods:{check:function(){if(!(this.loading||this.finished||this.error)){var t=this.$el,e=this.scroller,i=D(e);if(i&&"none"!==window.getComputedStyle(t).display&&null!==t.offsetParent){var n=this.offset,s=this.direction;(function(){if(t===e){var o=L(t);if("up"===s)return o<=n;var r=o+i;return e.scrollHeight-r<=n}return"up"===s?L(e)-z(t)<=n:z(t)+D(t)-z(e)-i<=n})()&&(this.$emit("input",!0),this.$emit("load"))}}},clickErrorText:function(){this.$emit("update:error",!1),this.$nextTick(this.check)},handler:function(t){this.binded!==t&&(this.binded=t,(t?y:k)(this.scroller,"scroll",this.check))}},render:function(t){return t("div",{class:Ns()},["down"===this.direction&&this.slots(),this.loading&&t("div",{class:Ns("loading"),key:"loading"},[this.slots("loading")||[t(G,{class:Ns("loading-icon")}),t("span",{class:Ns("loading-text")},[this.loadingText||Ls("loading")])]]),this.finished&&this.finishedText&&t("div",{class:Ns("finished-text")},[this.finishedText]),this.error&&this.errorText&&t("div",{on:{click:this.clickErrorText},class:Ns("error-text")},[this.errorText]),"up"===this.direction&&this.slots()])}}),Ds=i(4),Fs=Object(r.k)("nav-bar"),Ms=Fs[0],Vs=Fs[1];function _s(t,e,i,n){return t("div",o()([{class:[Vs({fixed:e.fixed}),{"van-hairline--bottom":e.border}],style:{zIndex:e.zIndex}},h(n)]),[t("div",{class:Vs("left"),on:{click:n.listeners["click-left"]||r.i}},[i.left?i.left():[e.leftArrow&&t(Y,{class:Vs("arrow"),attrs:{name:"arrow-left"}}),e.leftText&&t("span",{class:Vs("text")},[e.leftText])]]),t("div",{class:[Vs("title"),"van-ellipsis"]},[i.title?i.title():e.title]),t("div",{class:Vs("right"),on:{click:n.listeners["click-right"]||r.i}},[i.right?i.right():e.rightText&&t("span",{class:Vs("text")},[e.rightText])])])}_s.props={title:String,fixed:Boolean,leftText:String,rightText:String,leftArrow:Boolean,border:{type:Boolean,default:!0},zIndex:{type:Number,default:1}};var Ps=Ms(_s),Rs=Object(r.k)("notice-bar"),Hs=Rs[0],Ws=Rs[1],Ys=Hs({props:{text:String,mode:String,color:String,leftIcon:String,wrapable:Boolean,background:String,delay:{type:[String,Number],default:1},scrollable:{type:Boolean,default:!0},speed:{type:Number,default:50}},data:function(){return{wrapWidth:0,firstRound:!0,duration:0,offsetWidth:0,showNoticeBar:!0,animationClass:""}},watch:{text:{handler:function(){var t=this;this.$nextTick(function(){var e=t.$refs,i=e.wrap,n=e.content;if(i&&n){var s=i.getBoundingClientRect().width,o=n.getBoundingClientRect().width;t.scrollable&&o>s&&(t.wrapWidth=s,t.offsetWidth=o,t.duration=o/t.speed,t.animationClass=Ws("play"))}})},immediate:!0}},methods:{onClickIcon:function(){"closeable"===this.mode&&(this.showNoticeBar=!1,this.$emit("close"))},onAnimationEnd:function(){var t=this;this.firstRound=!1,this.$nextTick(function(){t.duration=(t.offsetWidth+t.wrapWidth)/t.speed,t.animationClass=Ws("play--infinite")})}},render:function(t){var e=this,i=this.mode,n="closeable"===i?"cross":"link"===i?"arrow":"",s={color:this.color,background:this.background},o={paddingLeft:this.firstRound?0:this.wrapWidth+"px",animationDelay:(this.firstRound?this.delay:0)+"s",animationDuration:this.duration+"s"};return t("div",{directives:[{name:"show",value:this.showNoticeBar}],class:Ws({withicon:i,wrapable:this.wrapable}),style:s,on:{click:function(){e.$emit("click")}}},[this.leftIcon&&t(Y,{class:Ws("left-icon"),attrs:{name:this.leftIcon}}),t("div",{ref:"wrap",class:Ws("wrap")},[t("div",{ref:"content",class:[Ws("content"),this.animationClass,{"van-ellipsis":!this.scrollable&&!this.wrapable}],style:o,on:{animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[this.slots()||this.text])]),n&&t(Y,{class:Ws("right-icon"),attrs:{name:n},on:{click:this.onClickIcon}})])}}),qs=Object(r.k)("notify"),Xs=qs[0],Qs=qs[1];function Ks(t,e,i,n){var s={color:e.color,background:e.background};return t(et,o()([{attrs:{value:e.value,position:"top",overlay:!1,lockScroll:!1},style:s,class:[Qs(),e.className],on:{input:function(t){d(n,"input",t)}}},h(n)]),[e.message])}Ks.props=n({},F.props,{className:null,message:[String,Number],color:{type:String,default:ri},background:{type:String,default:oi},duration:{type:Number,default:3e3}});var Us,Gs,Zs=Xs(Ks);function Js(t){var e;if(!r.h)return Gs||(Gs=f(Zs)),t=n({},Js.currentOptions,(e=t,Object(r.g)(e)?e:{message:e})),n(Gs,t),clearTimeout(Us),t.duration&&t.duration>0&&(Us=setTimeout(Js.clear,t.duration)),Gs}function to(){return{value:!0,message:"",color:ri,background:oi,duration:3e3,className:""}}Js.clear=function(){Gs&&(Gs.value=!1)},Js.currentOptions=to(),Js.setDefaultOptions=function(t){n(Js.currentOptions,t)},Js.resetDefaultOptions=function(){Js.currentOptions=to()},Js.install=function(){u.a.use(Zs)},u.a.prototype.$notify=Js;var eo=Js,io=Object(r.k)("key"),no=io[0],so=io[1],oo=no({props:{type:Array,text:[String,Number]},data:function(){return{active:!1}},computed:{className:function(){var t=this.type.slice(0);return this.active&&t.push("active"),so(t)}},methods:{onFocus:function(){this.active=!0,this.$emit("press",this.text)},onBlur:function(t){x(t,!0),this.active=!1}},render:function(t){var e=this.onBlur;return t("i",{class:["van-hairline",this.className],on:{touchstart:this.onFocus,touchmove:e,touchend:e,touchcancel:e}},[this.text])}}),ro=Object(r.k)("number-keyboard"),ao=ro[0],uo=ro[1],lo=ro[2],co=["blue","big"],ho=["delete","big","gray"],fo=ao({props:{show:Boolean,title:String,closeButtonText:String,deleteButtonText:String,safeAreaInsetBottom:Boolean,theme:{type:String,default:"default"},extraKey:{type:String,default:""},zIndex:{type:Number,default:100},transition:{type:Boolean,default:!0},showDeleteKey:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0}},mounted:function(){this.handler(!0)},destroyed:function(){this.handler(!1)},activated:function(){this.handler(!0)},deactivated:function(){this.handler(!1)},watch:{show:function(){this.transition||this.$emit(this.show?"show":"hide")}},computed:{keys:function(){for(var t=[],e=1;e<=9;e++)t.push({text:e});switch(this.theme){case"default":t.push({text:this.extraKey,type:["gray"]},{text:0},{text:this.deleteText,type:["gray","delete"]});break;case"custom":t.push({text:0,type:["middle"]},{text:this.extraKey})}return t},deleteText:function(){return this.deleteButtonText||lo("delete")}},methods:{handler:function(t){this.$isServer||t!==this.handlerStatus&&this.hideOnClickOutside&&(this.handlerStatus=t,document.body[(t?"add":"remove")+"EventListener"]("touchstart",this.onBlur))},onBlur:function(){this.$emit("blur")},onClose:function(){this.$emit("close"),this.onBlur()},onAnimationEnd:function(){this.$emit(this.show?"show":"hide")},onPress:function(t){""!==t&&(t===this.deleteText?this.$emit("delete"):t===this.closeButtonText?this.onClose():this.$emit("input",t))}},render:function(t){var e=this.title,i=this.theme,n=this.onPress,s=this.closeButtonText,o=this.slots("title-left"),r=s&&"default"===i,a=e||r||o;return t("transition",{attrs:{name:this.transition?"van-slide-up":""}},[t("div",{directives:[{name:"show",value:this.show}],style:{zIndex:this.zIndex},class:uo([i,{"safe-area-inset-bottom":this.safeAreaInsetBottom}]),on:{touchstart:S,animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[a&&t("div",{class:[uo("title"),"van-hairline--top"]},[o&&t("span",{class:uo("title-left")},[o]),e&&t("span",[e]),r&&t("span",{class:uo("close"),on:{click:this.onClose}},[s])]),t("div",{class:uo("body")},[this.keys.map(function(e){return t(oo,{key:e.text,attrs:{text:e.text,type:e.type},on:{press:n}})})]),"custom"===i&&t("div",{class:uo("sidebar")},[t(oo,{attrs:{text:this.deleteText,type:ho},on:{press:n}}),t(oo,{attrs:{text:s,type:co},on:{press:n}})])])])}}),po=Object(r.k)("pagination"),vo=po[0],mo=po[1],go=po[2];function bo(t,e,i){return{number:t,text:e,active:i}}var yo=vo({props:{value:Number,prevText:String,nextText:String,pageCount:Number,totalItems:Number,forceEllipses:Boolean,mode:{type:String,default:"multi"},itemsPerPage:{type:Number,default:10},showPageSize:{type:Number,default:5}},computed:{count:function(){var t=this.pageCount||Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(1,t)},pages:function(){var t=[],e=this.count;if("multi"!==this.mode)return t;var i=1,n=e,s=void 0!==this.showPageSize&&this.showPageSizee&&(i=(n=e)-this.showPageSize+1);for(var o=i;o<=n;o++){var r=bo(o,o,o===this.value);t.push(r)}if(s&&this.showPageSize>0&&this.forceEllipses){if(i>1){var a=bo(i-1,"...",!1);t.unshift(a)}if(n=0&&t<=100}},showPivot:{type:Boolean,default:!0},color:{type:String,default:"#1989fa"},textColor:{type:String,default:ri}},data:function(){return{pivotWidth:0,progressWidth:0}},mounted:function(){this.getWidth()},watch:{showPivot:function(){this.getWidth()},pivotText:function(){this.getWidth()}},methods:{getWidth:function(){var t=this;this.$nextTick(function(){t.progressWidth=t.$el.offsetWidth,t.pivotWidth=t.$refs.pivot?t.$refs.pivot.offsetWidth:0})}},render:function(t){var e=this.pivotText,i=this.percentage,n=Object(r.d)(e)?e:i+"%",s=this.showPivot&&n,o=this.inactive?"#cacaca":this.color,a={color:this.textColor,background:this.pivotColor||o},u={background:o,width:(this.progressWidth-this.pivotWidth)*i/100+"px"};return t("div",{class:Eo()},[t("span",{class:Eo("portion",{"with-pivot":s}),style:u},[s&&t("span",{ref:"pivot",style:a,class:Eo("pivot")},[n])])])}}),Lo=Object(r.k)("pull-refresh"),zo=Lo[0],Do=Lo[1],Fo=Lo[2],Mo=["pulling","loosing","success"],Vo=zo({mixins:[m],props:{disabled:Boolean,successText:String,pullingText:String,loosingText:String,loadingText:String,value:{type:Boolean,required:!0},successDuration:{type:Number,default:500},animationDuration:{type:Number,default:300},headHeight:{type:Number,default:50}},data:function(){return{status:"normal",height:0,duration:0}},computed:{untouchable:function(){return"loading"===this.status||"success"===this.status||this.disabled}},watch:{value:function(t){var e=this;this.duration=this.animationDuration,!t&&this.successText?(this.status="success",setTimeout(function(){e.setStatus(0)},this.successDuration)):this.setStatus(t?this.headHeight:0,t)}},mounted:function(){this.scrollEl=N(this.$el)},methods:{onTouchStart:function(t){!this.untouchable&&this.getCeiling()&&(this.duration=0,this.touchStart(t))},onTouchMove:function(t){this.untouchable||(this.touchMove(t),!this.ceiling&&this.getCeiling()&&(this.duration=0,this.startY=t.touches[0].clientY,this.deltaY=0),this.ceiling&&this.deltaY>=0&&"vertical"===this.direction&&(this.setStatus(this.ease(this.deltaY)),x(t)))},onTouchEnd:function(){!this.untouchable&&this.ceiling&&this.deltaY&&(this.duration=this.animationDuration,"loosing"===this.status?(this.setStatus(this.headHeight,!0),this.$emit("input",!0),this.$emit("refresh")):this.setStatus(0))},getCeiling:function(){return this.ceiling=0===L(this.scrollEl),this.ceiling},ease:function(t){var e=this.headHeight;return t=r?"full":s+.5>=r&&a?"half":"void"));function k(t){v||p||(d(n,"input",t),d(n,"change",t))}return t("div",o()([{class:Ro()},h(n),{on:{touchmove:function(t){if(!p&&!v&&document.elementFromPoint){x(t);var e=t.touches[0],i=e.clientX,n=e.clientY,s=document.elementFromPoint(i,n);if(s&&s.dataset){var o=s.dataset.score;o&&k(+o)}}}}}]),[b.map(function(i,n){return function(i,n){var s="full"===i,o="void"===i;return t("div",{key:n,class:Ro("item")},[t(Y,{attrs:{name:s?u:f,size:l+"px","data-score":n+1,color:v?g:s?c:m},class:Ro("icon"),on:{click:function(){k(n+1)}}}),e.allowHalf&&t(Y,{attrs:{name:o?f:u,size:l+"px","data-score":n+.5,color:v?g:o?m:c},class:Ro("icon","half"),on:{click:function(){k(n+.5)}}})])}(i,n)})])}Ho.props={value:Number,readonly:Boolean,disabled:Boolean,allowHalf:Boolean,size:{type:Number,default:20},icon:{type:String,default:"star"},voidIcon:{type:String,default:"star-o"},color:{type:String,default:"#ffd21e"},voidColor:{type:String,default:"#c7c7c7"},disabledColor:{type:String,default:"#bdbdbd"},count:{type:Number,default:5}};var Wo=Po(Ho),Yo=Object(r.k)("row"),qo=Yo[0],Xo=Yo[1],Qo=qo({props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},render:function(t){var e,i=this.align,n=this.justify,s="flex"===this.type,o="-"+Number(this.gutter)/2+"px",r=this.gutter?{marginLeft:o,marginRight:o}:{};return t(this.tag,{style:r,class:Xo((e={flex:s},e["align-"+i]=s&&i,e["justify-"+n]=s&&n,e))},[this.slots()])}}),Ko=Object(r.k)("search"),Uo=Ko[0],Go=Ko[1],Zo=Ko[2];function Jo(t,e,i,s){var r={attrs:s.data.attrs,on:n({},s.listeners,{input:function(t){d(s,"input",t)},keypress:function(t){13===t.keyCode&&(x(t),d(s,"search",e.value)),d(s,"keypress",t)}})},a=h(s);return delete a.attrs,t("div",o()([{class:Go({"show-action":e.showAction}),style:{background:e.background}},a]),[t("div",{class:Go("content",e.shape)},[i.label||e.label?t("div",{class:Go("label")},[i.label?i.label():e.label]):null,t(Ft,o()([{attrs:{clearable:!0,type:"search",value:e.value,border:!1,leftIcon:"search"},scopedSlots:{"left-icon":i["left-icon"]}},r]))]),function(){if(!e.showAction)return null;return t("div",{class:Go("action")},[i.action?i.action():t("div",{on:{click:function(){d(s,"input",""),d(s,"cancel")}}},[Zo("cancel")])])}()])}Jo.props={value:String,label:String,showAction:Boolean,shape:{type:String,default:"square"},background:{type:String,default:"#fff"}};var tr=Uo(Jo),er=Object(r.k)("sku-header"),ir=er[0],nr=er[1];function sr(t,e,i,n){var s=e.sku,r=e.goods,a=e.skuEventBus,u=function(t,e){var i=e.s1;if(i){var n=t.tree.filter(function(t){return"s1"===t.k_s})[0]||{};if(n.v){var s=n.v.filter(function(t){return t.id===i})[0];if(s)return s.imgUrl||s.img_url}}}(s,e.selectedSku)||r.picture;return t("div",o()([{class:[nr(),"van-hairline--bottom"]},h(n)]),[t("div",{class:nr("img-wrap"),on:{click:function(){a.$emit("sku:previewImage",u)}}},[t("img",{attrs:{src:u}})]),t("div",{class:nr("goods-info")},[t("div",{class:"van-sku__goods-name van-ellipsis"},[r.title]),i.default&&i.default(),t(Y,{attrs:{name:"close"},class:"van-sku__close-icon",on:{click:function(){a.$emit("sku:close")}}})])])}sr.props={sku:Object,goods:Object,skuEventBus:Object,selectedSku:Object};var or=ir(sr),rr=Object(r.k)("sku-row"),ar=rr[0],ur=rr[1];function lr(t,e,i,n){return t("div",o()([{class:ur()},h(n)]),[t("div",{class:ur("title")},[e.skuRow.k,":"]),i.default&&i.default()])}lr.props={skuRow:Object};var cr=ar(lr),hr={QUOTA_LIMIT:0,STOCK_LIMIT:1},dr={LIMIT_TYPE:hr,UNSELECTED_SKU_VALUE_ID:""},fr=function(t){var e={};return t.forEach(function(t){e[t.k_s]=t.v}),e},pr=function(t,e){var i=Object.keys(e).filter(function(t){return""!==e[t]});return t.length===i.length},vr=function(t,e){return t.filter(function(t){return Object.keys(e).every(function(i){return String(t[i])===String(e[i])})})[0]},mr=function(t,e){var i=fr(t);return Object.keys(e).reduce(function(t,n){var s=i[n],o=e[n];if(""!==o){var r=s.filter(function(t){return t.id===o})[0];r&&t.push(r)}return t},[])},gr=function(t,e,i){var s,o=i.key,r=i.valueId,a=n({},e,((s={})[o]=r,s)),u=Object.keys(a).filter(function(t){return""!==a[t]});return t.filter(function(t){return u.every(function(e){return String(a[e])===String(t[e])})}).reduce(function(t,e){return t+=e.stock_num},0)>0},br={normalizeSkuTree:fr,getSkuComb:vr,getSelectedSkuValues:mr,isAllSelected:pr,isSkuChoosable:gr},yr=(0,Object(r.k)("sku-row-item")[0])({props:{skuList:Array,skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedSku:Object},computed:{choosable:function(){return gr(this.skuList,this.selectedSku,{key:this.skuKeyStr,valueId:this.skuValue.id})}},methods:{onSelect:function(){this.choosable&&this.skuEventBus.$emit("sku:select",n({},this.skuValue,{skuKeyStr:this.skuKeyStr}))}},render:function(t){return t("span",{class:["van-sku-row__item",{"van-sku-row__item--active":this.skuValue.id===this.selectedSku[this.skuKeyStr],"van-sku-row__item--disabled":!this.choosable}],on:{click:this.onSelect}},[this.skuValue.name])}}),kr=Object(r.k)("stepper"),Sr=kr[0],xr=kr[1],wr=Sr({props:{value:null,integer:Boolean,disabled:Boolean,inputWidth:String,asyncChange:Boolean,disableInput:Boolean,min:{type:[String,Number],default:1},max:{type:[String,Number],default:1/0},step:{type:[String,Number],default:1},defaultValue:{type:[String,Number],default:1}},data:function(){var t=this.range(Object(r.d)(this.value)?this.value:this.defaultValue);return t!==+this.value&&this.$emit("input",t),{currentValue:t}},computed:{minusDisabled:function(){return this.disabled||this.currentValue<=this.min},plusDisabled:function(){return this.disabled||this.currentValue>=this.max}},watch:{value:function(t){t!==this.currentValue&&(this.currentValue=this.format(t))},currentValue:function(t){this.$emit("input",t),this.$emit("change",t)}},methods:{format:function(t){return""===(t=String(t).replace(/[^0-9.-]/g,""))?0:this.integer?Math.floor(t):+t},range:function(t){return Math.max(Math.min(this.max,this.format(t)),this.min)},onInput:function(t){var e=t.target.value,i=this.format(e);this.asyncChange?(t.target.value=this.currentValue,this.$emit("input",i),this.$emit("change",i)):(+e!==i&&(t.target.value=i),this.currentValue=i)},onChange:function(t){if(this[t+"Disabled"])this.$emit("overlimit",t);else{var e="minus"===t?-this.step:+this.step,i=Math.round(100*(this.currentValue+e))/100;this.asyncChange?(this.$emit("input",i),this.$emit("change",i)):this.currentValue=this.range(i),this.$emit(t)}},onFocus:function(t){this.$emit("focus",t)},onBlur:function(t){this.currentValue=this.range(this.currentValue),this.$emit("blur",t),0===this.currentValue&&(t.target.value=this.currentValue)}},render:function(t){var e=this,i=function(t){return function(){e.onChange(t)}};return t("div",{class:xr()},[t("button",{class:xr("minus",{disabled:this.minusDisabled}),on:{click:i("minus")}}),t("input",{attrs:{type:"number",disabled:this.disabled||this.disableInput},class:xr("input"),domProps:{value:this.currentValue},style:{width:this.inputWidth},on:{input:this.onInput,focus:this.onFocus,blur:this.onBlur}}),t("button",{class:xr("plus",{disabled:this.plusDisabled}),on:{click:i("plus")}})])}}),Cr=Object(r.k)("sku-stepper")[0],Tr=hr.QUOTA_LIMIT,Or=hr.STOCK_LIMIT,$r=Cr({props:{quota:Number,quotaUsed:Number,hideStock:Boolean,skuEventBus:Object,skuStockNum:Number,selectedSku:Object,selectedNum:Number,stepperTitle:String,hideQuotaText:Boolean,selectedSkuComb:Object,disableStepperInput:Boolean,customStepperConfig:Object},data:function(){return{currentNum:this.selectedNum,limitType:Or}},watch:{currentNum:function(t){this.skuEventBus.$emit("sku:numChange",t)},stepperLimit:function(t){t0&&(i="每人限购"+this.quota+"件"),i},stepperLimit:function(){var t,e=this.quota-this.quotaUsed;return this.quota>0&&e<=this.stock?(t=e<0?0:e,this.limitType=Tr):(t=this.stock,this.limitType=Or),t}},methods:{setCurrentNum:function(t){this.currentNum=t},onOverLimit:function(t){this.skuEventBus.$emit("sku:overLimit",{action:t,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed})},onChange:function(t){var e=this.customStepperConfig.handleStepperChange;e&&e(t),this.$emit("change",t)}},render:function(t){var e=this;return t("div",{class:"van-sku-stepper-stock"},[t("div",{class:"van-sku-stepper-container"},[t("div",{class:"van-sku__stepper-title"},[this.stepperTitle||"购买数量",":"]),t(wr,{class:"van-sku__stepper",attrs:{max:this.stepperLimit,disableInput:this.disableStepperInput},on:{overlimit:this.onOverLimit,change:this.onChange},model:{value:e.currentNum,callback:function(t){e.currentNum=t}}})]),!this.hideStock&&t("div",{class:"van-sku__stock"},[this.stockText]),!this.hideQuotaText&&this.quotaText&&t("div",{class:"van-sku__quota"},[this.quotaText])])}});function Br(t){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)}var Ir=Object(r.k)("uploader"),jr=Ir[0],Ar=Ir[1],Er=jr({inheritAttrs:!1,props:{disabled:Boolean,beforeRead:Function,afterRead:Function,accept:{type:String,default:"image/*"},resultType:{type:String,default:"dataUrl"},maxSize:{type:Number,default:Number.MAX_VALUE}},computed:{detail:function(){return{name:this.$attrs.name||""}}},methods:{onChange:function(t){var e=this,i=t.target.files;!this.disabled&&i.length&&(!(i=1===i.length?i[0]:[].slice.call(i,0))||this.beforeRead&&!this.beforeRead(i,this.detail)?this.resetInput():Array.isArray(i)?Promise.all(i.map(this.readFile)).then(function(t){var n=!1,s=i.map(function(s,o){return s.size>e.maxSize&&(n=!0),{file:i[o],content:t[o]}});e.onAfterRead(s,n)}):this.readFile(i).then(function(t){e.onAfterRead({file:i,content:t},i.size>e.maxSize)}))},readFile:function(t){var e=this;return new Promise(function(i){var n=new FileReader;n.onload=function(t){i(t.target.result)},"dataUrl"===e.resultType?n.readAsDataURL(t):"text"===e.resultType&&n.readAsText(t)})},onAfterRead:function(t,e){e?this.$emit("oversize",t):this.afterRead&&this.afterRead(t,this.detail),this.resetInput()},resetInput:function(){this.$refs.input&&(this.$refs.input.value="")}},render:function(t){var e=this.accept,i=this.disabled;return t("div",{class:Ar()},[this.slots(),t("input",{attrs:n({},this.$attrs,{type:"file",accept:e,disabled:i}),ref:"input",class:Ar("input"),on:{change:this.onChange}})])}}),Nr=Object(r.k)("sku-img-uploader"),Lr=Nr[0],zr=Nr[1],Dr=Lr({props:{value:String,uploadImg:Function,maxSize:{type:Number,default:6}},data:function(){return{paddingImg:""}},computed:{imgList:function(){return this.value&&!this.paddingImg?[this.value]:[]}},methods:{afterReadFile:function(t){var e=this;this.paddingImg=t.content,this.uploadImg(t.file,t.content).then(function(t){e.$emit("input",t),e.$nextTick(function(){e.paddingImg=""})}).catch(function(){e.paddingImg=""})},onOversize:function(){this.$toast("最大可上传图片为"+this.maxSize+"MB,请尝试压缩图片尺寸")}},render:function(t){var e=this,i=this.imgList,n=this.paddingImg,s=(n||i.length>0)&&t("div",{class:"van-clearfix"},[i.map(function(i){return t("div",{class:zr("img")},[t("img",{attrs:{src:i}}),t(Y,{attrs:{name:"clear"},class:zr("delete"),on:{click:function(){e.$emit("input","")}}})])}),n&&t("div",{class:zr("img")},[t("img",{attrs:{src:n}}),t(G,{attrs:{type:"spinner"},class:zr("uploading")})])]);return t("div",{class:zr()},[t(Er,{attrs:{disabled:!!n,afterRead:this.afterReadFile,maxSize:1024*this.maxSize*1024},on:{oversize:this.onOversize}},[t("div",{class:zr("header")},[n?t("div",["正在上传..."]):[t(Y,{attrs:{name:"photograph"}}),t("span",{class:"label"},[this.value?"重拍":"拍照"," 或 "]),t(Y,{attrs:{name:"photo"}}),t("span",{class:"label"},[this.value?"重新选择照片":"选择照片"])]])]),s])}}),Fr=Object(r.k)("sku-messages"),Mr=Fr[0],Vr=Fr[1],_r={id_no:"输入身份证号码",text:"输入文本",tel:"输入数字",email:"输入邮箱",date:"点击选择日期",time:"点击选择时间",textarea:"点击填写段落文本",mobile:"输入手机号码"},Pr=Mr({props:{messages:Array,messageConfig:Object,goodsId:[Number,String]},data:function(){return{messageValues:this.resetMessageValues(this.messages)}},watch:{messages:function(t){this.messageValues=this.resetMessageValues(t)}},methods:{resetMessageValues:function(t){return(t||[]).map(function(){return{value:""}})},getType:function(t){return 1==+t.multiple?"textarea":"id_no"===t.type?"text":t.datetime>0?"datetime-local":t.type},getMessages:function(){var t=this,e={};return this.messageValues.forEach(function(i,n){var s=i.value;t.messages[n].datetime>0&&(s=s.replace(/T/g," ")),e["message_"+n]=s}),e},getCartMessages:function(){var t=this,e={};return this.messageValues.forEach(function(i,n){var s=i.value,o=t.messages[n];o.datetime>0&&(s=s.replace(/T/g," ")),e[o.name]=s}),e},getPlaceholder:function(t){var e=1==+t.multiple?"textarea":t.type;return(this.messageConfig.placeholderMap||{})[e]||_r[e]},validateMessages:function(){for(var t=this.messageValues,e=0;e18))return"请填写正确的身份证号码"}}}},render:function(t){var e=this;return t(wi,{class:Vr()},[this.messages.map(function(i,n){return"image"===i.type?t(Et,{class:Vr("image-cell"),attrs:{label:"仅限一张",title:i.name,required:"1"===String(i.required)},key:e.goodsId+"-"+n},[t(Dr,{attrs:{uploadImg:e.messageConfig.uploadImg,maxSize:e.messageConfig.uploadMaxSize},model:{value:e.messageValues[n].value,callback:function(t){e.messageValues[n].value=t}}})]):t(Ft,{attrs:{maxlength:"200",label:i.name,required:"1"===String(i.required),placeholder:e.getPlaceholder(i),type:e.getType(i)},key:e.goodsId+"-"+n,model:{value:e.messageValues[n].value,callback:function(t){e.messageValues[n].value=t}}})})])}}),Rr=Object(r.k)("sku-actions"),Hr=Rr[0],Wr=Rr[1];function Yr(t,e,i,n){var s=function(t){return function(){e.skuEventBus.$emit(t)}};return t("div",o()([{class:Wr()},h(n)]),[e.showAddCartBtn&&t(ee,{attrs:{bottomAction:!0,text:"加入购物车"},on:{click:s("sku:addCart")}}),t(ee,{attrs:{type:"primary",bottomAction:!0,text:e.buyText||"立即购买"},on:{click:s("sku:buy")}})])}Yr.props={buyText:String,skuEventBus:Object,showAddCartBtn:Boolean};var qr=Hr(Yr),Xr=Object(r.k)("sku")[0],Qr=hr.QUOTA_LIMIT,Kr=Xr({props:{sku:Object,goods:Object,quota:Number,value:Boolean,buyText:String,quotaUsed:Number,goodsId:[Number,String],hideStock:Boolean,hideQuotaText:Boolean,stepperTitle:String,getContainer:Function,customSkuValidator:Function,closeOnClickOverlay:Boolean,disableStepperInput:Boolean,resetStepperOnHide:Boolean,resetSelectedSkuOnHide:Boolean,initialSku:{type:Object,default:function(){return{}}},showSoldoutSku:{type:Boolean,default:!0},showAddCartBtn:{type:Boolean,default:!0},bodyOffsetTop:{type:Number,default:200},messageConfig:{type:Object,default:function(){return{placeholderMap:{},uploadImg:function(){return Promise.resolve()},uploadMaxSize:5}}},customStepperConfig:{type:Object,default:function(){return{}}}},data:function(){return{selectedSku:{},selectedNum:1,show:this.value}},watch:{show:function(t){if(this.$emit("input",t),!t){var e=mr(this.sku.tree,this.selectedSku);this.$emit("sku-close",{selectedSkuValues:e,selectedNum:this.selectedNum,selectedSkuComb:this.selectedSkuComb}),this.resetStepperOnHide&&this.resetStepper(),this.resetSelectedSkuOnHide&&this.resetSelectedSku(this.skuTree)}},value:function(t){this.show=t},skuTree:function(t){this.resetSelectedSku(t)}},computed:{skuGroupClass:function(){return["van-sku-group-container","van-hairline--bottom",{"van-sku-group-container--hide-soldout":!this.showSoldoutSku}]},bodyStyle:function(){if(!this.$isServer)return{maxHeight:window.innerHeight-this.bodyOffsetTop+"px"}},isSkuCombSelected:function(){return pr(this.sku.tree,this.selectedSku)},isSkuEmpty:function(){return 0===Object.keys(this.sku).length},hasSku:function(){return!this.sku.none_sku},selectedSkuComb:function(){return this.hasSku?this.isSkuCombSelected?vr(this.sku.list,this.selectedSku):null:{id:this.sku.collection_id,price:Math.round(100*this.sku.price),stock_num:this.sku.stock_num}},price:function(){return this.selectedSkuComb?(this.selectedSkuComb.price/100).toFixed(2):this.sku.price},skuTree:function(){return this.sku.tree||[]},imageList:function(){var t=[this.goods.picture];if(this.skuTree.length>0){var e=this.skuTree.filter(function(t){return"s1"===t.k_s})[0]||{};if(!e.v)return;e.v.forEach(function(e){var i=e.imgUrl||e.img_url;i&&t.push(i)})}return t}},created:function(){var t=new u.a;this.skuEventBus=t,t.$on("sku:close",this.onClose),t.$on("sku:select",this.onSelect),t.$on("sku:numChange",this.onNumChange),t.$on("sku:previewImage",this.onPreviewImage),t.$on("sku:overLimit",this.onOverLimit),t.$on("sku:addCart",this.onAddCart),t.$on("sku:buy",this.onBuy),this.resetStepper(),this.resetSelectedSku(this.skuTree),this.$emit("after-sku-create",t)},methods:{resetStepper:function(){var t=this.$refs.skuStepper,e=this.initialSku.selectedNum,i=Object(r.d)(e)?e:1;t?t.setCurrentNum(i):this.selectedNum=i},resetSelectedSku:function(t){var e=this;this.selectedSku={},t.forEach(function(t){e.selectedSku[t.k_s]=e.initialSku[t.k_s]||""}),t.forEach(function(t){var i=t.k_s,n=t.v[0].id;1===t.v.length&&gr(e.sku.list,e.selectedSku,{key:i,valueId:n})&&(e.selectedSku[i]=n)})},getSkuMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.getMessages():{}},getSkuCartMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.getCartMessages():{}},validateSkuMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.validateMessages():""},validateSku:function(){if(0===this.selectedNum)return"商品已经无法购买啦";if(this.isSkuCombSelected)return this.validateSkuMessages();if(this.customSkuValidator){var t=this.customSkuValidator(this);if(t)return t}return"请先选择商品规格"},onClose:function(){this.show=!1},onSelect:function(t){var e,i;this.selectedSku=this.selectedSku[t.skuKeyStr]===t.id?n({},this.selectedSku,((e={})[t.skuKeyStr]="",e)):n({},this.selectedSku,((i={})[t.skuKeyStr]=t.id,i)),this.$emit("sku-selected",{skuValue:t,selectedSku:this.selectedSku,selectedSkuComb:this.selectedSkuComb})},onNumChange:function(t){this.selectedNum=t},onPreviewImage:function(t){var e=this,i=this.imageList.findIndex(function(e){return e===t}),n={index:i,imageList:this.imageList,indexImage:t};this.$emit("preview-on",n),Bs({images:this.imageList,startPosition:i,onClose:function(){e.$emit("preview-close",n)}})},onOverLimit:function(t){var e=t.action,i=t.limitType,n=t.quota,s=t.quotaUsed,o=this.customStepperConfig.handleOverLimit;if(o)o(t);else if("minus"===e)Kt("至少选择一件");else if("plus"===e)if(i===Qr){var r="限购"+n+"件";s>0&&(r+=",你已购买"+s+"件"),Kt(r)}else Kt("库存不足")},onAddCart:function(){this.onBuyOrAddCart("add-cart")},onBuy:function(){this.onBuyOrAddCart("buy-clicked")},onBuyOrAddCart:function(t){var e=this.validateSku();e?Kt(e):this.$emit(t,this.getSkuData())},getSkuData:function(){return{goodsId:this.goodsId,selectedNum:this.selectedNum,selectedSkuComb:this.selectedSkuComb,messages:this.getSkuMessages(),cartMessages:this.getSkuCartMessages()}}},render:function(t){var e=this;if(!this.isSkuEmpty){var i=this.sku,n=this.goods,s=this.price,o=this.skuEventBus,r=this.selectedSku,a=this.selectedNum,u=this.stepperTitle,l=this.hideQuotaText,c=this.selectedSkuComb,h={price:s,selectedNum:a,skuEventBus:o,selectedSku:r,selectedSkuComb:c},d=function(t){return e.slots(t,h)},f=d("sku-header")||t(or,{attrs:{sku:i,goods:n,skuEventBus:o,selectedSku:r}},[d("sku-header-price")||t("div",{class:"van-sku__goods-price"},[t("span",{class:"van-sku__price-symbol"},["¥"]),t("span",{class:"van-sku__price-num"},[s])])]),p=d("sku-group")||this.hasSku&&t("div",{class:this.skuGroupClass},[this.skuTree.map(function(e){return t(cr,{attrs:{skuRow:e}},[e.v.map(function(n){return t(yr,{attrs:{skuList:i.list,skuValue:n,selectedSku:r,skuEventBus:o,skuKeyStr:e.k_s}})})])})]),v=d("sku-stepper")||t($r,{ref:"skuStepper",attrs:{quota:this.quota,hideStock:this.hideStock,quotaUsed:this.quotaUsed,skuEventBus:o,selectedNum:a,selectedSku:r,stepperTitle:u,skuStockNum:i.stock_num,hideQuotaText:l,selectedSkuComb:c,disableStepperInput:this.disableStepperInput,customStepperConfig:this.customStepperConfig},on:{change:function(t){e.$emit("stepper-change",t)}}}),m=d("sku-messages")||t(Pr,{ref:"skuMessages",attrs:{goodsId:this.goodsId,messageConfig:this.messageConfig,messages:i.messages}}),g=d("sku-actions")||t(qr,{attrs:{buyText:this.buyText,skuEventBus:o,showAddCartBtn:this.showAddCartBtn}});return t(et,{attrs:{position:"bottom",getContainer:this.getContainer,closeOnClickOverlay:this.closeOnClickOverlay},class:"van-sku-container",model:{value:e.show,callback:function(t){e.show=t}}},[f,t("div",{class:"van-sku-body",style:this.bodyStyle},[d("sku-body-top"),p,d("extra-sku-group"),v,m]),g])}}});Kr.SkuActions=qr,Kr.SkuHeader=or,Kr.SkuMessages=Pr,Kr.SkuStepper=$r,Kr.SkuRow=cr,Kr.SkuRowItem=yr,Kr.skuHelper=br,Kr.skuConstants=dr;var Ur=Kr,Gr=Object(r.k)("slider"),Zr=Gr[0],Jr=Gr[1],ta=Zr({mixins:[m],props:{min:Number,value:Number,disabled:Boolean,vertical:Boolean,activeColor:String,inactiveColor:String,max:{type:Number,default:100},step:{type:Number,default:1},barHeight:{type:String,default:"2px"}},methods:{onTouchStart:function(t){this.disabled||(this.touchStart(t),this.startValue=this.format(this.value))},onTouchMove:function(t){if(x(t,!0),!this.disabled){this.touchMove(t);var e=this.$el.getBoundingClientRect(),i=(this.vertical?this.deltaY:this.deltaX)/(this.vertical?e.height:e.width)*100;this.newValue=this.startValue+i,this.updateValue(this.newValue)}},onTouchEnd:function(){this.disabled||this.updateValue(this.newValue,!0)},onClick:function(t){if(t.stopPropagation(),!this.disabled){var e=this.$el.getBoundingClientRect(),i=(this.vertical?t.clientY-e.top:t.clientX-e.left)/(this.vertical?e.height:e.width)*100;this.updateValue(i,!0)}},updateValue:function(t,e){t=this.format(t),this.$emit("input",t),e&&this.$emit("change",t)},format:function(t){return Math.round(Math.max(this.min,Math.min(t,this.max))/this.step)*this.step}},render:function(t){var e,i=this.vertical,n={background:this.inactiveColor},s=i?"width":"height",o=((e={})[i?"height":"width"]=this.format(this.value)+"%",e[s]=this.barHeight,e.background=this.activeColor,e);return t("div",{style:n,class:Jr({disabled:this.disabled,vertical:i}),on:{click:this.onClick}},[t("div",{class:Jr("bar"),style:o},[t("div",{class:Jr("button-wrapper"),on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.slots("button")||t("div",{class:Jr("button")})])])])}}),ea=Object(r.k)("step"),ia=ea[0],na=ea[1],sa=ia({beforeCreate:function(){var t=this.$parent.steps,e=this.$parent.slots().indexOf(this.$vnode);t.splice(-1===e?t.length:e,0,this)},beforeDestroy:function(){var t=this.$parent.steps.indexOf(this);t>-1&&this.$parent.steps.splice(t,1)},computed:{status:function(){var t=this.$parent.steps.indexOf(this),e=this.$parent.active;return tn*s&&n>0?this.open("right"):"left"===t&&e>i*s&&i>0?this.open("left"):this.swipeMove(0)},startDrag:function(t){this.disabled||(this.dragging=!0,this.startOffset=this.offset,this.touchStart(t))},onDrag:function(t){this.disabled||(this.touchMove(t),"horizontal"===this.direction&&(x(t),this.swipeMove(this.deltaX+this.startOffset)))},endDrag:function(){this.disabled||(this.dragging=!1,this.swiping&&this.swipeLeaveTransition(this.offset>0?"left":"right"))},onClick:function(t){void 0===t&&(t="outside"),this.$emit("click",t),this.offset&&(this.onClose?this.onClose(t,this):this.swipeMove(0))}},render:function(t){var e=this,i=function(t,i){return function(n){i&&n.stopPropagation(),e.onClick(t)}},n={transform:"translate3d("+this.offset+"px, 0, 0)",transition:this.dragging?"none":".6s cubic-bezier(0.18, 0.89, 0.32, 1)"};return t("div",{class:ba(),on:{click:i("cell"),touchstart:this.startDrag,touchmove:this.onDrag,touchend:this.endDrag,touchcancel:this.endDrag}},[t("div",{class:ba("wrapper"),style:n,on:{transitionend:function(){e.swiping=!1}}},[this.leftWidth?t("div",{class:ba("left"),on:{click:i("left",!0)}},[this.slots("left")]):null,this.slots(),this.rightWidth?t("div",{class:ba("right"),on:{click:i("right",!0)}},[this.slots("right")]):null])])}}),ka=Object(r.k)("tabbar"),Sa=ka[0],xa=ka[1],wa=Sa({data:function(){return{items:[]}},props:{value:Number,activeColor:String,safeAreaInsetBottom:Boolean,fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1}},watch:{items:function(){this.setActiveItem()},value:function(){this.setActiveItem()}},methods:{setActiveItem:function(){var t=this;this.items.forEach(function(e,i){e.active=i===t.value})},onChange:function(t){t!==this.value&&(this.$emit("input",t),this.$emit("change",t))}},render:function(t){return t("div",{style:{zIndex:this.zIndex},class:["van-hairline--top-bottom",xa({fixed:this.fixed,"safe-area-inset-bottom":this.safeAreaInsetBottom})]},[this.slots()])}}),Ca=Object(r.k)("tabbar-item"),Ta=Ca[0],Oa=Ca[1],$a=Ta({props:n({},$t,{icon:String,dot:Boolean,info:[String,Number]}),data:function(){return{active:!1}},beforeCreate:function(){this.$parent.items.push(this)},destroyed:function(){this.$parent.items.splice(this.$parent.items.indexOf(this),1)},methods:{onClick:function(t){this.$parent.onChange(this.$parent.items.indexOf(this)),this.$emit("click",t),Tt(this.$router,this)}},render:function(t){var e=this.icon,i=this.slots,n=this.active,s=n?{color:this.$parent.activeColor}:null;return t("div",{class:Oa({active:n}),style:s,on:{click:this.onClick}},[t("div",{class:Oa("icon",{dot:this.dot})},[i("icon",{active:n})||e&&t(Y,{attrs:{name:e}}),t(R,{attrs:{info:this.info}})]),t("div",{class:Oa("text")},[i("default",{active:n})])])}}),Ba=Object(r.k)("tree-select"),Ia=Ba[0],ja=Ba[1];function Aa(t,e,i,n){var s=e.height,r=e.items,a=e.mainActiveIndex,u=e.activeId,l=(r[a]||{}).children||[];return t("div",o()([{class:ja(),style:{height:s+"px"}},h(n)]),[t("div",{class:ja("nav")},[r.map(function(e,i){return t("div",{key:i,class:["van-ellipsis",ja("nitem",{active:a===i,disabled:e.disabled})],on:{click:function(){e.disabled||d(n,"navclick",i)}}},[e.text])})]),t("div",{class:ja("content")},[l.map(function(e){return t("div",{key:e.id,class:["van-ellipsis",ja("item",{active:u===e.id,disabled:e.disabled})],on:{click:function(){e.disabled||d(n,"itemclick",e)}}},[e.text,u===e.id&&t(Y,{attrs:{name:"checked",size:"16px"},class:ja("selected")})])})])])}Aa.props={items:Array,mainActiveIndex:Number,activeId:{type:[Number,String],default:0},height:{type:Number,default:300}};var Ea=Ia(Aa),Na="@@Waterfall",La=300;function za(){var t=this;if(!this.el[Na].binded){this.el[Na].binded=!0,this.scrollEventListener=function(){var t=this.el,e=this.scrollEventTarget;if(!this.disabled){var i=L(e),n=D(e),s=i+n;if(n){(t===e?e.scrollHeight-s0)&&this.cb.upper&&this.cb.upper({target:e,top:i})}}}.bind(this),this.scrollEventTarget=N(this.el);var e=this.el.getAttribute("waterfall-disabled"),i=!1;e&&(this.vm.$watch(e,function(e){t.disabled=e,t.scrollEventListener()}),i=Boolean(this.vm[e])),this.disabled=i;var n=this.el.getAttribute("waterfall-offset");this.offset=Number(n)||La,y(this.scrollEventTarget,"scroll",this.scrollEventListener,!0),this.scrollEventListener()}}function Da(t){t[Na].vm.$nextTick(function(){za.call(t[Na])})}var Fa=function(t){return{bind:function(e,i,n){e[Na]||(e[Na]={el:e,vm:n.context,cb:{}}),e[Na].cb[t]=i.value,function(t){var e=t[Na];e.vm._isMounted?Da(t):e.vm.$on("hook:mounted",function(){Da(t)})}(e)},update:function(t){var e=t[Na];e.scrollEventListener&&e.scrollEventListener()},unbind:function(t){var e=t[Na];e.scrollEventTarget&&k(e.scrollEventTarget,"scroll",e.scrollEventListener)}}};Fa.install=function(t){t.directive("WaterfallLower",Fa("lower")),t.directive("WaterfallUpper",Fa("upper"))};var Ma=Fa;i.d(e,"install",function(){return Pa}),i.d(e,"version",function(){return Va}),i.d(e,"Actionsheet",function(){return rt}),i.d(e,"AddressEdit",function(){return Ae}),i.d(e,"AddressList",function(){return Ue}),i.d(e,"Area",function(){return wt}),i.d(e,"Badge",function(){return ti}),i.d(e,"BadgeGroup",function(){return si}),i.d(e,"Button",function(){return ee}),i.d(e,"Card",function(){return bi}),i.d(e,"Cell",function(){return Et}),i.d(e,"CellGroup",function(){return wi}),i.d(e,"Checkbox",function(){return Ti}),i.d(e,"CheckboxGroup",function(){return Ii}),i.d(e,"Circle",function(){return Di}),i.d(e,"Col",function(){return _i}),i.d(e,"Collapse",function(){return Wi}),i.d(e,"CollapseItem",function(){return Ki}),i.d(e,"ContactCard",function(){return en}),i.d(e,"ContactEdit",function(){return un}),i.d(e,"ContactList",function(){return pn}),i.d(e,"Coupon",function(){return Sn}),i.d(e,"CouponCell",function(){return $n}),i.d(e,"CouponList",function(){return Pn}),i.d(e,"DatetimePicker",function(){return Un}),i.d(e,"Dialog",function(){return ue}),i.d(e,"Field",function(){return Ft}),i.d(e,"GoodsAction",function(){return es}),i.d(e,"GoodsActionBigBtn",function(){return rs}),i.d(e,"GoodsActionMiniBtn",function(){return hs}),i.d(e,"Icon",function(){return Y}),i.d(e,"ImagePreview",function(){return Bs}),i.d(e,"Info",function(){return R}),i.d(e,"Lazyload",function(){return js}),i.d(e,"List",function(){return zs}),i.d(e,"Loading",function(){return G}),i.d(e,"Locale",function(){return Ds.a}),i.d(e,"NavBar",function(){return Ps}),i.d(e,"NoticeBar",function(){return Ys}),i.d(e,"Notify",function(){return eo}),i.d(e,"NumberKeyboard",function(){return fo}),i.d(e,"Overlay",function(){return B}),i.d(e,"Pagination",function(){return yo}),i.d(e,"Panel",function(){return Co}),i.d(e,"PasswordInput",function(){return Io}),i.d(e,"Picker",function(){return yt}),i.d(e,"Popup",function(){return et}),i.d(e,"Progress",function(){return No}),i.d(e,"PullRefresh",function(){return Vo}),i.d(e,"Radio",function(){return Ve}),i.d(e,"RadioGroup",function(){return ze}),i.d(e,"Rate",function(){return Wo}),i.d(e,"Row",function(){return Qo}),i.d(e,"Search",function(){return tr}),i.d(e,"Sku",function(){return Ur}),i.d(e,"Slider",function(){return ta}),i.d(e,"Step",function(){return sa}),i.d(e,"Stepper",function(){return wr}),i.d(e,"Steps",function(){return ua}),i.d(e,"SubmitBar",function(){return va}),i.d(e,"Swipe",function(){return vs}),i.d(e,"SwipeCell",function(){return ya}),i.d(e,"SwipeItem",function(){return ys}),i.d(e,"Switch",function(){return ke}),i.d(e,"SwitchCell",function(){return Te}),i.d(e,"Tab",function(){return An}),i.d(e,"Tabbar",function(){return wa}),i.d(e,"TabbarItem",function(){return $a}),i.d(e,"Tabs",function(){return Dn}),i.d(e,"Tag",function(){return fi}),i.d(e,"Toast",function(){return Kt}),i.d(e,"TreeSelect",function(){return Ea}),i.d(e,"Uploader",function(){return Er}),i.d(e,"Waterfall",function(){return Ma});var Va="1.6.19",_a=[rt,Ae,Ue,wt,ti,si,ee,bi,Et,wi,Ti,Ii,Di,_i,Wi,Ki,en,un,pn,Sn,$n,Pn,Un,ue,Ft,es,rs,hs,Y,Bs,R,zs,G,Ps,Ys,eo,fo,B,yo,Co,Io,yt,et,No,Vo,Ve,ze,Wo,Qo,tr,Ur,ta,sa,wr,ua,va,vs,ya,ys,ke,Te,An,wa,$a,Dn,fi,Kt,Ea,Er],Pa=function(t){_a.forEach(function(e){t.use(e)})};"undefined"!=typeof window&&window.Vue&&Pa(window.Vue);e.default={install:Pa,version:Va}}])});