(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-13721558"],{"02de":function(t,e,n){"use strict";function i(t){var e=window.getComputedStyle(t),n="none"===e.display,i=null===t.offsetParent&&"fixed"!==e.position;return n||i}n.d(e,"a",(function(){return i}))},"277e":function(t,e,n){},2994:function(t,e,n){"use strict";n("68ef"),n("e3b3"),n("c0c2")},"2bdd":function(t,e,n){"use strict";var i=n("d282"),a=n("02de"),o=n("a8c1"),r=n("5fbe"),s=n("543e"),l=Object(i["a"])("list"),c=l[0],u=l[1],h=l[2];e["a"]=c({mixins:[Object(r["a"])((function(t){this.scroller||(this.scroller=Object(o["c"])(this.$el)),t(this.scroller,"scroll",this.check)}))],model:{prop:"loading"},props:{error:Boolean,loading:Boolean,finished:Boolean,errorText:String,loadingText:String,finishedText:String,immediateCheck:{type:Boolean,default:!0},offset:{type:[Number,String],default:300},direction:{type:String,default:"down"}},data:function(){return{innerLoading:this.loading}},updated:function(){this.innerLoading=this.loading},mounted:function(){this.immediateCheck&&this.check()},watch:{loading:"check",finished:"check"},methods:{check:function(){var t=this;this.$nextTick((function(){if(!(t.innerLoading||t.finished||t.error)){var e,n=t.$el,i=t.scroller,o=t.offset,r=t.direction;e=i.getBoundingClientRect?i.getBoundingClientRect():{top:0,bottom:i.innerHeight};var s=e.bottom-e.top;if(!s||Object(a["a"])(n))return!1;var l=!1,c=t.$refs.placeholder.getBoundingClientRect();l="up"===r?e.top-c.top<=o:c.bottom-e.bottom<=o,l&&(t.innerLoading=!0,t.$emit("input",!0),t.$emit("load"))}}))},clickErrorText:function(){this.$emit("update:error",!1),this.check()},genLoading:function(){var t=this.$createElement;if(this.innerLoading&&!this.finished)return t("div",{key:"loading",class:u("loading")},[this.slots("loading")||t(s["a"],{attrs:{size:"16"}},[this.loadingText||h("loading")])])},genFinishedText:function(){var t=this.$createElement;if(this.finished){var e=this.slots("finished")||this.finishedText;if(e)return t("div",{class:u("finished-text")},[e])}},genErrorText:function(){var t=this.$createElement;if(this.error){var e=this.slots("error")||this.errorText;if(e)return t("div",{on:{click:this.clickErrorText},class:u("error-text")},[e])}}},render:function(){var t=arguments[0],e=t("div",{ref:"placeholder",key:"placeholder",class:u("placeholder")});return t("div",{class:u(),attrs:{role:"feed","aria-busy":this.innerLoading}},["down"===this.direction?this.slots():e,this.genLoading(),this.genFinishedText(),this.genErrorText(),"up"===this.direction?this.slots():e])}})},"3dde":function(t,e,n){"use strict";n("277e")},4598:function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c}));var i=n("a142"),a=Date.now();function o(t){var e=Date.now(),n=Math.max(0,16-(e-a)),i=setTimeout(t,n);return a=e+n,i}var r=i["g"]?t:window,s=r.requestAnimationFrame||o;r.cancelAnimationFrame||r.clearTimeout;function l(t){return s.call(r,t)}function c(t){l((function(){l(t)}))}}).call(this,n("c8ba"))},"7a0b":function(t,e,n){"use strict";n.r(e);n("99af");var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"referral"},[e("div",{staticClass:"search"},[e("div",{staticClass:"time",on:{click:function(e){t.calendarShow=!0}}},[e("span",{staticClass:"dateTime"},[t._v(t._s(t.date?t.date:""))]),e("div",[e("span",{staticClass:"iconfont icon-date"}),e("span",{staticClass:"iconfont icon-close",on:{click:function(e){return e.stopPropagation(),t.clearDate.apply(null,arguments)}}})])])]),e("ul",{staticClass:"header"},[e("li",[e("div",[t._v("#")]),e("div",[t._v(t._s(t.$getLang("agent.user")))]),e("div",[t._v(t._s("".concat(t.$getLang("agent.wager"),"(").concat(t.countryData.sign,")")))]),e("div",[t._v(t._s("".concat(t.$getLang("agent.teamWager"),"(").concat(t.countryData.sign,")")))]),e("div",[t._v(t._s(t.$getLang("agent.commission")))])])]),e("van-list",{staticClass:"list",attrs:{finished:t.finished,"finished-text":t.noDataText},on:{load:t.onLoad},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},t._l(t.list,(function(n,i){return e("li",{key:"list_"+i},[e("div",[t._v(" "+t._s(i+1)+" ")]),e("div",{staticClass:"omitWrap"},[t._v(" "+t._s(n.nickname)+" ")]),e("div",[t._v(" "+t._s(n.wager)+" ")]),e("div",[t._v(" "+t._s(n.teamWager)+" ["+t._s(n.teamNum)+"] ")]),e("div",[t._v(" "+t._s(n.commission)+" ")])])})),0),e("div",{staticClass:"total"},[e("div",[e("span",{staticClass:"num"},[t._v(t._s(t.countryData.sign)+" "+t._s(t.totalInfo.totalTeamWager))]),e("span",[t._v(t._s(t.$getLang("agent.teamEWager"))+"["+t._s(t.totalInfo.totalTeamNum)+"]")])]),e("div",[e("span",{staticClass:"num"},[t._v(t._s(t.countryData.sign)+" "+t._s(t.totalInfo.totalCommission))]),e("span",[t._v(t._s(t.$getLang("agent.commission")))])])]),e("van-calendar",{attrs:{"close-on-click-overlay":!1,"min-date":t.minDate,"max-date":t.maxDate},on:{confirm:t.onConfirm,close:function(e){t.calendarShow=!1}},model:{value:t.calendarShow,callback:function(e){t.calendarShow=e},expression:"calendarShow"}})],1)},a=[],o=(n("0d03"),n("d81d"),n("ac1f"),n("5319"),n("5530")),r=(n("68ef"),n("a71a"),n("9d70"),n("3743"),n("4d75"),n("e3b3"),n("bc1b"),n("b258"),n("819b"),n("4598")),s=n("bad1"),l=n("a8c1"),c=n("d282"),u=Object(c["a"])("calendar"),h=u[0],d=u[1],f=u[2];function g(t){return f("monthTitle",t.getFullYear(),t.getMonth()+1)}function m(t,e){var n=t.getFullYear(),i=e.getFullYear(),a=t.getMonth(),o=e.getMonth();return n===i?a===o?0:a>o?1:-1:n>i?1:-1}function p(t,e){var n=m(t,e);if(0===n){var i=t.getDate(),a=e.getDate();return i===a?0:i>a?1:-1}return n}function v(t,e){return t=new Date(t),t.setDate(t.getDate()+e),t}function y(t){return v(t,-1)}function D(t){return v(t,1)}function b(t){var e=t[0].getTime(),n=t[1].getTime();return(n-e)/864e5+1}function w(t){return new Date(t)}function k(t){return Array.isArray(t)?t.map((function(t){return null===t?t:w(t)})):w(t)}var S=n("e41f"),T=n("b650"),x=n("d399"),$=n("ea8e"),C=n("96b0"),O=Object(c["a"])("calendar-month"),B=O[0],I=B({props:{date:Date,type:String,color:String,minDate:Date,maxDate:Date,showMark:Boolean,rowHeight:[Number,String],formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number},data:function(){return{visible:!1}},computed:{title:function(){return g(this.date)},rowHeightWithUnit:function(){return Object($["a"])(this.rowHeight)},offset:function(){var t=this.firstDayOfWeek,e=this.date.getDay();return t?(e+7-this.firstDayOfWeek)%7:e},totalDay:function(){return Object(C["a"])(this.date.getFullYear(),this.date.getMonth()+1)},shouldRender:function(){return this.visible||!this.lazyRender},placeholders:function(){for(var t=[],e=Math.ceil((this.totalDay+this.offset)/7),n=1;n<=e;n++)t.push({type:"placeholder"});return t},days:function(){for(var t=[],e=this.date.getFullYear(),n=this.date.getMonth(),i=1;i<=this.totalDay;i++){var a=new Date(e,n,i),o=this.getDayType(a),r={date:a,type:o,text:i,bottomInfo:this.getBottomInfo(o)};this.formatter&&(r=this.formatter(r)),t.push(r)}return t}},methods:{getHeight:function(){var t;return(null==(t=this.$el)?void 0:t.getBoundingClientRect().height)||0},scrollIntoView:function(t){var e=this.$refs,n=e.days,i=e.month,a=this.showSubtitle?n:i,o=a.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;Object(l["g"])(t,o)},getMultipleDayType:function(t){var e=this,n=function(t){return e.currentDate.some((function(e){return 0===p(e,t)}))};if(n(t)){var i=y(t),a=D(t),o=n(i),r=n(a);return o&&r?"multiple-middle":o?"end":r?"start":"multiple-selected"}return""},getRangeDayType:function(t){var e=this.currentDate,n=e[0],i=e[1];if(!n)return"";var a=p(t,n);if(!i)return 0===a?"start":"";var o=p(t,i);return 0===a&&0===o&&this.allowSameDay?"start-end":0===a?"start":0===o?"end":a>0&&o<0?"middle":void 0},getDayType:function(t){var e=this.type,n=this.minDate,i=this.maxDate,a=this.currentDate;return p(t,n)<0||p(t,i)>0?"disabled":null!==a?"single"===e?0===p(t,a)?"selected":"":"multiple"===e?this.getMultipleDayType(t):"range"===e?this.getRangeDayType(t):void 0:void 0},getBottomInfo:function(t){if("range"===this.type){if("start"===t||"end"===t)return f(t);if("start-end"===t)return f("startEnd")}},getDayStyle:function(t,e){var n={height:this.rowHeightWithUnit};return"placeholder"===t?(n.width="100%",n):(0===e&&(n.marginLeft=100*this.offset/7+"%"),this.color&&("start"===t||"end"===t||"start-end"===t||"multiple-selected"===t||"multiple-middle"===t?n.background=this.color:"middle"===t&&(n.color=this.color)),n)},genTitle:function(){var t=this.$createElement;if(this.showMonthTitle)return t("div",{class:d("month-title")},[this.title])},genMark:function(){var t=this.$createElement;if(this.showMark&&this.shouldRender)return t("div",{class:d("month-mark")},[this.date.getMonth()+1])},genDays:function(){var t=this.$createElement,e=this.shouldRender?this.days:this.placeholders;return t("div",{ref:"days",attrs:{role:"grid"},class:d("days")},[this.genMark(),e.map(this.genDay)])},genTopInfo:function(t){var e=this.$createElement,n=this.$scopedSlots["top-info"];if(t.topInfo||n)return e("div",{class:d("top-info")},[n?n(t):t.topInfo])},genBottomInfo:function(t){var e=this.$createElement,n=this.$scopedSlots["bottom-info"];if(t.bottomInfo||n)return e("div",{class:d("bottom-info")},[n?n(t):t.bottomInfo])},genDay:function(t,e){var n=this,i=this.$createElement,a=t.type,o=this.getDayStyle(a,e),r="disabled"===a,s=function(){r||n.$emit("click",t)};return"selected"===a?i("div",{attrs:{role:"gridcell",tabindex:-1},style:o,class:[d("day"),t.className],on:{click:s}},[i("div",{class:d("selected-day"),style:{width:this.rowHeightWithUnit,height:this.rowHeightWithUnit,background:this.color}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])]):i("div",{attrs:{role:"gridcell",tabindex:r?null:-1},style:o,class:[d("day",a),t.className],on:{click:s}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])}},render:function(){var t=arguments[0];return t("div",{class:d("month"),ref:"month"},[this.genTitle(),this.genDays()])}}),_=Object(c["a"])("calendar-header"),M=_[0],R=M({props:{title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number},methods:{genTitle:function(){var t=this.$createElement;if(this.showTitle){var e=this.slots("title")||this.title||f("title");return t("div",{class:d("header-title")},[e])}},genSubtitle:function(){var t=this.$createElement;if(this.showSubtitle)return t("div",{class:d("header-subtitle")},[this.subtitle])},genWeekDays:function(){var t=this.$createElement,e=f("weekdays"),n=this.firstDayOfWeek,i=[].concat(e.slice(n,7),e.slice(0,n));return t("div",{class:d("weekdays")},[i.map((function(e){return t("span",{class:d("weekday")},[e])}))])}},render:function(){var t=arguments[0];return t("div",{class:d("header")},[this.genTitle(),this.genSubtitle(),this.genWeekDays()])}}),E=h({props:{title:String,color:String,value:Boolean,readonly:Boolean,formatter:Function,rowHeight:[Number,String],confirmText:String,rangePrompt:String,defaultDate:[Date,Array],getContainer:[String,Function],allowSameDay:Boolean,confirmDisabledText:String,type:{type:String,default:"single"},round:{type:Boolean,default:!0},position:{type:String,default:"bottom"},poppable:{type:Boolean,default:!0},maxRange:{type:[Number,String],default:null},lazyRender:{type:Boolean,default:!0},showMark:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showSubtitle:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},minDate:{type:Date,validator:s["a"],default:function(){return new Date}},maxDate:{type:Date,validator:s["a"],default:function(){var t=new Date;return new Date(t.getFullYear(),t.getMonth()+6,t.getDate())}},firstDayOfWeek:{type:[Number,String],default:0,validator:function(t){return t>=0&&t<=6}}},inject:{vanPopup:{default:null}},data:function(){return{subtitle:"",currentDate:this.getInitialDate()}},computed:{months:function(){var t=[],e=new Date(this.minDate);e.setDate(1);do{t.push(new Date(e)),e.setMonth(e.getMonth()+1)}while(1!==m(e,this.maxDate));return t},buttonDisabled:function(){var t=this.type,e=this.currentDate;if(e){if("range"===t)return!e[0]||!e[1];if("multiple"===t)return!e.length}return!e},dayOffset:function(){return this.firstDayOfWeek?this.firstDayOfWeek%7:0}},watch:{value:"init",type:function(){this.reset()},defaultDate:function(t){this.currentDate=t,this.scrollIntoView()}},mounted:function(){var t;(this.init(),this.poppable)||(null==(t=this.vanPopup)||t.$on("opened",this.onScroll))},activated:function(){this.init()},methods:{reset:function(t){void 0===t&&(t=this.getInitialDate()),this.currentDate=t,this.scrollIntoView()},init:function(){var t=this;this.poppable&&!this.value||this.$nextTick((function(){t.bodyHeight=Math.floor(t.$refs.body.getBoundingClientRect().height),t.onScroll(),t.scrollIntoView()}))},scrollToDate:function(t){var e=this;Object(r["b"])((function(){var n=e.value||!e.poppable;t&&n&&(e.months.some((function(n,i){if(0===m(n,t)){var a=e.$refs,o=a.body,r=a.months;return r[i].scrollIntoView(o),!0}return!1})),e.onScroll())}))},scrollIntoView:function(){var t=this.currentDate;if(t){var e="single"===this.type?t:t[0];this.scrollToDate(e)}},getInitialDate:function(){var t=this.type,e=this.minDate,n=this.maxDate,i=this.defaultDate;if(null===i)return i;var a=new Date;if(-1===p(a,e)?a=e:1===p(a,n)&&(a=n),"range"===t){var o=i||[],r=o[0],s=o[1];return[r||a,s||D(a)]}return"multiple"===t?i||[a]:i||a},onScroll:function(){var t=this.$refs,e=t.body,n=t.months,i=Object(l["b"])(e),a=i+this.bodyHeight,o=n.map((function(t){return t.getHeight()})),r=o.reduce((function(t,e){return t+e}),0);if(!(a>r&&i>0)){for(var s,c=0,u=[-1,-1],h=0;h<n.length;h++){var d=c<=a&&c+o[h]>=i;d&&(u[1]=h,s||(s=n[h],u[0]=h),n[h].showed||(n[h].showed=!0,this.$emit("month-show",{date:n[h].date,title:n[h].title}))),c+=o[h]}n.forEach((function(t,e){t.visible=e>=u[0]-1&&e<=u[1]+1})),s&&(this.subtitle=s.title)}},onClickDay:function(t){if(!this.readonly){var e=t.date,n=this.type,i=this.currentDate;if("range"===n){if(!i)return void this.select([e,null]);var a=i[0],o=i[1];if(a&&!o){var r=p(e,a);1===r?this.select([a,e],!0):-1===r?this.select([e,null]):this.allowSameDay&&this.select([e,e],!0)}else this.select([e,null])}else if("multiple"===n){if(!i)return void this.select([e]);var s,l=this.currentDate.some((function(t,n){var i=0===p(t,e);return i&&(s=n),i}));if(l){var c=i.splice(s,1),u=c[0];this.$emit("unselect",w(u))}else this.maxRange&&i.length>=this.maxRange?Object(x["a"])(this.rangePrompt||f("rangePrompt",this.maxRange)):this.select([].concat(i,[e]))}else this.select(e,!0)}},togglePopup:function(t){this.$emit("input",t)},select:function(t,e){var n=this,i=function(t){n.currentDate=t,n.$emit("select",k(n.currentDate))};if(e&&"range"===this.type){var a=this.checkRange(t);if(!a)return void(this.showConfirm?i([t[0],v(t[0],this.maxRange-1)]):i(t))}i(t),e&&!this.showConfirm&&this.onConfirm()},checkRange:function(t){var e=this.maxRange,n=this.rangePrompt;return!(e&&b(t)>e)||(Object(x["a"])(n||f("rangePrompt",e)),!1)},onConfirm:function(){this.$emit("confirm",k(this.currentDate))},genMonth:function(t,e){var n=this.$createElement,i=0!==e||!this.showSubtitle;return n(I,{ref:"months",refInFor:!0,attrs:{date:t,type:this.type,color:this.color,minDate:this.minDate,maxDate:this.maxDate,showMark:this.showMark,formatter:this.formatter,rowHeight:this.rowHeight,lazyRender:this.lazyRender,currentDate:this.currentDate,showSubtitle:this.showSubtitle,allowSameDay:this.allowSameDay,showMonthTitle:i,firstDayOfWeek:this.dayOffset},scopedSlots:{"top-info":this.$scopedSlots["top-info"],"bottom-info":this.$scopedSlots["bottom-info"]},on:{click:this.onClickDay}})},genFooterContent:function(){var t=this.$createElement,e=this.slots("footer");if(e)return e;if(this.showConfirm){var n=this.buttonDisabled?this.confirmDisabledText:this.confirmText;return t(T["a"],{attrs:{round:!0,block:!0,type:"danger",color:this.color,disabled:this.buttonDisabled,nativeType:"button"},class:d("confirm"),on:{click:this.onConfirm}},[n||f("confirm")])}},genFooter:function(){var t=this.$createElement;return t("div",{class:d("footer",{unfit:!this.safeAreaInsetBottom})},[this.genFooterContent()])},genCalendar:function(){var t=this,e=this.$createElement;return e("div",{class:d()},[e(R,{attrs:{title:this.title,showTitle:this.showTitle,subtitle:this.subtitle,showSubtitle:this.showSubtitle,firstDayOfWeek:this.dayOffset},scopedSlots:{title:function(){return t.slots("title")}}}),e("div",{ref:"body",class:d("body"),on:{scroll:this.onScroll}},[this.months.map(this.genMonth)]),this.genFooter()])}},render:function(){var t=this,e=arguments[0];if(this.poppable){var n,i=function(e){return function(){return t.$emit(e)}};return e(S["a"],{attrs:(n={round:!0,value:this.value},n["round"]=this.round,n["position"]=this.position,n["closeable"]=this.showTitle||this.showSubtitle,n["getContainer"]=this.getContainer,n["closeOnPopstate"]=this.closeOnPopstate,n["closeOnClickOverlay"]=this.closeOnClickOverlay,n),class:d("popup"),on:{input:this.togglePopup,open:i("open"),opened:i("opened"),close:i("close"),closed:i("closed")}},[this.genCalendar()])}return this.genCalendar()}}),L=(n("2994"),n("2bdd")),j=n("cf45"),W={name:"ReferralDetail",components:{"van-list":L["a"],"van-calendar":E},data:function(){return{loading:!1,finished:!1,list:[],page:1,size:40,calendarShow:!1,minDate:new Date("2020/01/01"),maxDate:new Date,date:null,noDataText:this.$getLang("noData"),totalInfo:{totalCommission:0,totalTeamNum:0,totalTeamWager:0}}},computed:Object(o["a"])({},Vuex.mapGetters(["countryData"])),created:function(){this.$route.query.date&&(this.date=this.$route.query.date),this.getList()},methods:{formatDate:j["i"],onConfirm:function(t){this.date=Object(j["i"])(+new Date(t),"YYYY-MM-DD"),this.calendarShow=!1,this.list=[],this.getList()},onLoad:function(){this.getList()},search:function(){},clearDate:function(){this.date=null,this.list=[],this.getList()},getList:function(){var t=this;this.loading=!0;var e={page:this.page,size:this.size};this.date&&(e.date=this.date),this.$get({url:"kaya/affiliate/m/referrals",noPrompt:!0,params:e}).then((function(e){t.loading=!1,e.data&&(e.data.pageInfo.list.length>=t.size?t.page+=1:t.finished=!0,e.data.pageInfo.list=e.data.pageInfo.list.map((function(t){return t.nickname=t.nickname.replace("******","**"),t})),e.data.pageInfo.list.length&&(t.noDataText=""),t.list=t.list.concat(e.data.pageInfo.list),t.totalInfo=e.data.totalInfo)}))["catch"]((function(){t.loading=!1,t.list.length&&(t.noDataText=""),t.finished=!0}))}}},F=W,P=(n("3dde"),n("2877")),H=Object(P["a"])(F,i,a,!1,null,"24ba9912",null);e["default"]=H.exports},"819b":function(t,e,n){},"96b0":function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return r}));var i=n("90c6");function a(t,e){if(t<0)return[];var n=-1,i=Array(t);while(++n<t)i[n]=e(n);return i}function o(t){if(!t)return 0;while(Object(i["a"])(parseInt(t,10))){if(!(t.length>1))return 0;t=t.slice(1)}return parseInt(t,10)}function r(t,e){return 32-new Date(t,e-1,32).getDate()}},bad1:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("90c6");function a(t){return"[object Date]"===Object.prototype.toString.call(t)&&!Object(i["a"])(t.getTime())}},c0c2:function(t,e,n){}}]);