(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/vendor"],{"0356":function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.myRequest=void 0;var i=r(n("17ac"));r(n("08ed"));t.myRequest=function(t){return new Promise((function(n,r){e.request({url:i.default.baseUrl+t.url,method:t.method||"POST",header:{token:e.getStorageSync("token")},data:t.data||{},success:function(t){n(t.data),401==t.data.code&&(e.reLaunch({url:"/pages/login/login"}),e.removeStorage({key:"token",success:function(){e.removeStorage({key:"user_info",success:function(){}})}})),t.data.code},fail:function(t){e.showToast({title:"请求接口失败",icon:"none"}),r(t)}})}))}}).call(this,n("543d")["default"])},"0676":function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},"08ed":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={name:"",whatType:"wxMini",baseUrl:"https://api.lihe-control.com",mapKey:"",webKey:"",wxMapKey:"",socket:""},i=r;t.default=i},"0a55":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("278c")),a=r(n("7037")),o={version:"v2.5.0-20230101",yAxisWidth:15,xAxisHeight:22,padding:[10,10,10,10],rotate:!1,fontSize:13,fontColor:"#666666",dataPointShape:["circle","circle","circle","circle"],color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],linearColor:["#0EE2F8","#2BDCA8","#FA7D8D","#EB88E2","#2AE3A0","#0EE2F8","#EB88E2","#6773E3","#F78A85"],pieChartLinePadding:15,pieChartTextPadding:5,titleFontSize:20,subtitleFontSize:15,radarLabelTextMargin:13},s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.end.x||t.end.xe.start.y||t.start.y1&&(i.extra.mount.widthRatio>2&&(i.extra.mount.widthRatio=2),o+=(i.extra.mount.widthRatio-1)*n.eachSpacing);var s=t;return t>=0?(s=0,e.uevent.trigger("scrollLeft"),e.scrollOption.position="left",i.xAxis.scrollPosition="left"):Math.abs(t)>=o-a?(s=a-o,e.uevent.trigger("scrollRight"),e.scrollOption.position="right",i.xAxis.scrollPosition="right"):(e.scrollOption.position=t,i.xAxis.scrollPosition=t),s}function h(e,t,n){function r(e){while(e<0)e+=2*Math.PI;while(e>2*Math.PI)e-=2*Math.PI;return e}return e=r(e),t=r(t),n=r(n),t>n&&(n+=2*Math.PI,e=t&&e<=n}function d(e,t){function n(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].y>=Math.max(e[t-1].y,e[t+1].y)||e[t].y<=Math.min(e[t-1].y,e[t+1].y))}function r(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].x>=Math.max(e[t-1].x,e[t+1].x)||e[t].x<=Math.min(e[t-1].x,e[t+1].x))}var i=.2,a=.2,o=null,s=null,c=null,l=null;if(t<1?(o=e[0].x+(e[1].x-e[0].x)*i,s=e[0].y+(e[1].y-e[0].y)*i):(o=e[t].x+(e[t+1].x-e[t-1].x)*i,s=e[t].y+(e[t+1].y-e[t-1].y)*i),t>e.length-3){var u=e.length-1;c=e[u].x-(e[u].x-e[u-1].x)*a,l=e[u].y-(e[u].y-e[u-1].y)*a}else c=e[t+1].x-(e[t+2].x-e[t].x)*a,l=e[t+1].y-(e[t+2].y-e[t].y)*a;return n(e,t+1)&&(l=e[t+1].y),n(e,t)&&(s=e[t].y),r(e,t+1)&&(c=e[t+1].x),r(e,t)&&(o=e[t].x),(s>=Math.max(e[t].y,e[t+1].y)||s<=Math.min(e[t].y,e[t+1].y))&&(s=e[t].y),(l>=Math.max(e[t].y,e[t+1].y)||l<=Math.min(e[t].y,e[t+1].y))&&(l=e[t+1].y),(o>=Math.max(e[t].x,e[t+1].x)||o<=Math.min(e[t].x,e[t+1].x))&&(o=e[t].x),(c>=Math.max(e[t].x,e[t+1].x)||c<=Math.min(e[t].x,e[t+1].x))&&(c=e[t+1].x),{ctrA:{x:o,y:s},ctrB:{x:c,y:l}}}function p(e,t,n){return{x:n.x+e,y:n.y-t}}function g(e,t){if(t)while(c.isCollision(e,t))e.start.x>0?e.start.y--:e.start.x<0||e.start.y>0?e.start.y++:e.start.y--;return e}function v(e,t,n){for(var r=0,i=0;i=1e4?1e3:r>=1e3?100:r>=100?10:r>=10?5:r>=1?1:r>=.1?.1:r>=.01?.01:r>=.001?.001:r>=1e-4?1e-4:r>=1e-5?1e-5:1e-6,{minRange:u(e,"lower",n),maxRange:u(t,"upper",n)}}function m(e,t,n){var r=0;if(e=String(e),!1!==n&&void 0!==n&&n.setFontSize&&n.measureText)return n.setFontSize(t),n.measureText(e).width;e=e.split("");for(var i=0;i-1;if(a)for(var o=C(e),s=0;s5&&void 0!==arguments[5]?arguments[5]:{},o=t.chartData.calPoints?t.chartData.calPoints:[],s={};if(r.length>0){for(var c=[],l=0;l0&&(r=i[n]),{text:a.formatter?a.formatter(e,r,n,t):e.name+": "+e.data,color:e.color,legendShape:"auto"==t.extra.tooltip.legendShape?e.legendShape:t.extra.tooltip.legendShape}})),h={x:Math.round(s.x),y:Math.round(s.y)};return{textList:f,offset:h}}function T(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=t.chartData.xAxisPoints[n]+t.chartData.eachSpacing/2,o=e.map((function(e){return{text:i.formatter?i.formatter(e,r[n],n,t):e.name+": "+e.data,color:e.color,disableLegend:!!e.disableLegend,legendShape:"auto"==t.extra.tooltip.legendShape?e.legendShape:t.extra.tooltip.legendShape}}));o=o.filter((function(e){if(!0!==e.disableLegend)return e}));var s={x:Math.round(a),y:0};return{textList:o,offset:s}}function O(e,t,n,r,i,a){var o=n.chartData.calPoints,s=a.color.upFill,c=a.color.downFill,l=[s,s,c,s],u=[];t.map((function(t){0==r?t.data[1]-t.data[0]<0?l[1]=c:l[1]=s:(t.data[0]e[r-1][1]&&(l[2]=s),t.data[3]=t.area[3]-10&&e.y>=t.area[0]&&e.y<=t.height-t.area[2]}function M(e,t,n){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n,2)}function I(e,t){var n=[],r=[];return e.forEach((function(e,i){t.connectNulls?null!==e&&r.push(e):null!==e?r.push(e):(r.length&&n.push(r),r=[])})),r.length&&n.push(r),n}function D(e,t,n,r,i){var a={angle:0,xAxisHeight:t.xAxis.lineHeight*t.pix+t.xAxis.marginTop*t.pix},o=t.xAxis.fontSize*t.pix,s=e.map((function(e,n){var r=t.xAxis.formatter?t.xAxis.formatter(e,n,t):e;return m(String(r),o,i)})),c=Math.max.apply(this,s);if(1==t.xAxis.rotateLabel){a.angle=t.xAxis.rotateAngle*Math.PI/180;var l=t.xAxis.marginTop*t.pix*2+Math.abs(c*Math.sin(a.angle));l=l4&&void 0!==arguments[4]?arguments[4]:-1;i="stack"==r?_(e,t.categories.length):b(e);var s=[];i=i.filter((function(e){return"object"===(0,a.default)(e)&&null!==e?e.constructor.toString().indexOf("Array")>-1?null!==e:null!==e.value:null!==e})),i.map((function(e){"object"===(0,a.default)(e)?e.constructor.toString().indexOf("Array")>-1?"candle"==t.type?e.map((function(e){s.push(e)})):s.push(e[0]):s.push(e.value):s.push(e)}));var c=0,l=0;if(s.length>0&&(c=Math.min.apply(this,s),l=Math.max.apply(this,s)),o>-1?("number"===typeof t.xAxis.data[o].min&&(c=Math.min(t.xAxis.data[o].min,c)),"number"===typeof t.xAxis.data[o].max&&(l=Math.max(t.xAxis.data[o].max,l))):("number"===typeof t.xAxis.min&&(c=Math.min(t.xAxis.min,c)),"number"===typeof t.xAxis.max&&(l=Math.max(t.xAxis.max,l))),c===l){var u=l||10;l+=u}for(var f=c,h=l,d=[],p=(h-f)/t.xAxis.splitNumber,g=0;g<=t.xAxis.splitNumber;g++)d.push(f+p*g);return d}(e,t,n,i.type),o.rangesFormat=o.ranges.map((function(e){return e=c.toFixed(e,2),e}));var l=o.ranges.map((function(e){return e=c.toFixed(e,2),e}));o=Object.assign(o,K(l,t,n));o.eachSpacing,l.map((function(e){return m(e,t.xAxis.fontSize*t.pix,r)}));return!0===t.xAxis.disabled&&(o.xAxisHeight=0),o}function E(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=i.extra.radar||{};o.max=o.max||0;for(var s=Math.max(o.max,Math.max.apply(null,b(r))),c=[],l=function(i){var o=r[i],l={};l.color=o.color,l.legendShape=o.legendShape,l.pointShape=o.pointShape,l.data=[],o.data.forEach((function(r,i){var o={};o.angle=e[i],o.proportion=r/s,o.value=r,o.position=p(n*o.proportion*a*Math.cos(o.angle),n*o.proportion*a*Math.sin(o.angle),t),l.data.push(o)})),c.push(l)},u=0;u2&&void 0!==arguments[2]?arguments[2]:1,r=0,i=0,a=0;a4&&void 0!==arguments[4]?arguments[4]:1,a=0;a4&&void 0!==arguments[4]?arguments[4]:1,a=0,o=0,s=[],c=0;c2&&void 0!==arguments[2]?arguments[2]:1;1==n&&(n=.999999);for(var r=0;r=2&&(i._proportion_=i._proportion_%2)}return e}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;1==n&&(n=.999999);for(var r=0;r=2&&(i._proportion_=i._proportion_%2)}return e}function U(e,t,n){var r;r=n=2&&(e[a]._endAngle_=e[a]._endAngle_%2),i=e[a]._endAngle_;return e}function B(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=0;i=n.oldData?a._proportion_=(a._endAngle_-a._oldAngle_)*r+n.oldAngle:a._proportion_=a._oldAngle_-(a._oldAngle_-a._endAngle_)*r,a._proportion_>=2&&(a._proportion_=a._proportion_%2)}return e}function q(e,t,n,r,i,a){return e.map((function(e){if(null===e)return null;var i=0,o=0;return"mix"==a.type?(i=a.extra.mix.column.seriesGap*a.pix||0,o=a.extra.mix.column.categoryGap*a.pix||0):(i=a.extra.column.seriesGap*a.pix||0,o=a.extra.column.categoryGap*a.pix||0),i=Math.min(i,t/n),o=Math.min(o,t/n),e.width=Math.ceil((t-2*o-i*(n-1))/n),a.extra.mix&&a.extra.mix.column.width&&+a.extra.mix.column.width>0&&(e.width=Math.min(e.width,+a.extra.mix.column.width*a.pix)),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),e.width<=0&&(e.width=1),e.x+=(r+.5-n/2)*(e.width+i),e}))}function W(e,t,n,r,i,a){return e.map((function(e){if(null===e)return null;var i=0,o=0;return i=a.extra.bar.seriesGap*a.pix||0,o=a.extra.bar.categoryGap*a.pix||0,i=Math.min(i,t/n),o=Math.min(o,t/n),e.width=Math.ceil((t-2*o-i*(n-1))/n),a.extra.bar&&a.extra.bar.width&&+a.extra.bar.width>0&&(e.width=Math.min(e.width,+a.extra.bar.width*a.pix)),e.width<=0&&(e.width=1),e.y+=(r+.5-n/2)*(e.width+i),e}))}function H(e,t,n,r,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return e.map((function(e){return null===e?null:(e.width=t-2*s,a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),r>0&&(e.width-=o),e)}))}function V(e,t,n,r,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return e.map((function(e,n){return null===e?null:(e.width=Math.ceil(t-2*s),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),e.width<=0&&(e.width=1),e)}))}function G(e,t,n,r,i,a,o){var s=a.extra.bar.categoryGap*a.pix||0;return e.map((function(e,n){return null===e?null:(e.width=Math.ceil(t-2*s),a.extra.bar&&a.extra.bar.width&&+a.extra.bar.width>0&&(e.width=Math.min(e.width,+a.extra.bar.width*a.pix)),e.width<=0&&(e.width=1),e)}))}function K(e,t,n){var r=t.width-t.area[1]-t.area[3],i=t.enableScroll?Math.min(t.xAxis.itemCount,e.length):e.length;("line"==t.type||"area"==t.type||"scatter"==t.type||"bubble"==t.type||"bar"==t.type)&&i>1&&"justify"==t.xAxis.boundaryGap&&(i-=1);var a=0;"mount"==t.type&&t.extra&&t.extra.mount&&t.extra.mount.widthRatio&&t.extra.mount.widthRatio>1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),a=t.extra.mount.widthRatio-1,i+=a);var o=r/i,s=[],c=t.area[3],l=t.width-t.area[1];return e.forEach((function(e,t){s.push(c+a/2*o+t*o)})),"justify"!==t.xAxis.boundaryGap&&(!0===t.enableScroll?s.push(c+a*o+e.length*o):s.push(l)),{xAxisPoints:s,startX:c,endX:l,eachSpacing:o}}function J(e,t,n,r,i,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,c=[],l=a.height-a.area[0]-a.area[2];return e.forEach((function(e,o){if(null===e)c.push(null);else{var u=[];e.forEach((function(e,c){var f={};f.x=r[o]+Math.round(i/2);var h=e.value||e,d=l*(h-t)/(n-t);d*=s,f.y=a.height-Math.round(d)-a.area[2],u.push(f)})),c.push(u)}})),c}function X(e,t,n,r,i,o,s){var c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,l="center";"line"!=o.type&&"area"!=o.type&&"scatter"!=o.type&&"bubble"!=o.type||(l=o.xAxis.boundaryGap);var u=[],f=o.height-o.area[0]-o.area[2],h=o.width-o.area[1]-o.area[3];return e.forEach((function(e,s){if(null===e)u.push(null);else{var d={};d.color=e.color,d.x=r[s];var p,g,v,y=e;if("object"===(0,a.default)(e)&&null!==e)if(e.constructor.toString().indexOf("Array")>-1)p=[].concat(o.chartData.xAxisData.ranges),g=p.shift(),v=p.pop(),y=e[1],d.x=o.area[3]+h*(e[0]-g)/(v-g),"bubble"==o.type&&(d.r=e[2],d.t=e[3]);else y=e.value;"center"==l&&(d.x+=i/2);var x=f*(y-t)/(n-t);x*=c,d.y=o.height-x-o.area[2],u.push(d)}})),u}function Y(e,t,n,r,i,o,s,c,l){l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1;var u=o.xAxis.boundaryGap,f=[],h=o.height-o.area[0]-o.area[2],d=o.width-o.area[1]-o.area[3];return e.forEach((function(e,s){if(null===e)f.push(null);else{var p={};if(p.color=e.color,"vertical"==c.animation){p.x=r[s];var g,v,y,x=e;if("object"===(0,a.default)(e)&&null!==e)if(e.constructor.toString().indexOf("Array")>-1)g=[].concat(o.chartData.xAxisData.ranges),v=g.shift(),y=g.pop(),x=e[1],p.x=o.area[3]+d*(e[0]-v)/(y-v);else x=e.value;"center"==u&&(p.x+=i/2);var m=h*(x-t)/(n-t);m*=l,p.y=o.height-m-o.area[2],f.push(p)}else{p.x=r[0]+i*s*l;x=e;"center"==u&&(p.x+=i/2);m=h*(x-t)/(n-t);p.y=o.height-m-o.area[2],f.push(p)}}})),f}function Z(e,t,n,r,i,o,s,c,l){l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1;var u=[],f=o.height-o.area[0]-o.area[2],h=o.width-o.area[1]-o.area[3];return e.forEach((function(e,s){if(null===e)u.push(null);else{var c={};c.color=e.color,c.x=r[s];var d,p,g,v=e;if("object"===(0,a.default)(e)&&null!==e)if(e.constructor.toString().indexOf("Array")>-1)d=[].concat(o.chartData.xAxisData.ranges),p=d.shift(),g=d.pop(),v=e[1],c.x=o.area[3]+h*(e[0]-p)/(g-p);else v=e.value;c.x+=i/2;var y=f*(v*l-t)/(n-t);c.y=o.height-y-o.area[2],u.push(c)}})),u}function Q(e,t,n,r,i,a,o,s){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,l=[],u=a.height-a.area[0]-a.area[2],f=(a.width,a.area[1],a.area[3],i*o.widthRatio);return e.forEach((function(e,o){if(null===e)l.push(null);else{var s={};s.color=e.color,s.x=r[o],s.x+=i/2;var h=e.data,d=u*(h*c-t)/(n-t);s.y=a.height-d-a.area[2],s.value=h,s.width=f,l.push(s)}})),l}function ee(e,t,n,r,i,o,s){var c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,l=[],u=(o.height,o.area[0],o.area[2],o.width-o.area[1]-o.area[3]);return e.forEach((function(e,i){if(null===e)l.push(null);else{var s={};s.color=e.color,s.y=r[i];var f=e;"object"===(0,a.default)(e)&&null!==e&&(f=e.value);var h=u*(f-t)/(n-t);h*=c,s.height=h,s.value=f,s.x=h+o.area[3],l.push(s)}})),l}function te(e,t,n,r,i,o,s,c,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,f=[],h=o.height-o.area[0]-o.area[2];return e.forEach((function(e,s){if(null===e)f.push(null);else{var d={};if(d.color=e.color,d.x=r[s]+Math.round(i/2),c>0){for(var p=0,g=0;g<=c;g++)p+=l[g].data[s];var v=p-e,y=h*(p-t)/(n-t),x=h*(v-t)/(n-t)}else{p=e;"object"===(0,a.default)(e)&&null!==e&&(p=e.value);y=h*(p-t)/(n-t),x=0}var m=x;y*=u,m*=u,d.y=o.height-Math.round(y)-o.area[2],d.y0=o.height-Math.round(m)-o.area[2],f.push(d)}})),f}function ne(e,t,n,r,i,o,s,c,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,f=[],h=o.width-o.area[1]-o.area[3];return e.forEach((function(e,i){if(null===e)f.push(null);else{var s={};if(s.color=e.color,s.y=r[i],c>0){for(var d=0,p=0;p<=c;p++)d+=l[p].data[i];var g=d-e,v=h*(d-t)/(n-t),y=h*(g-t)/(n-t)}else{d=e;"object"===(0,a.default)(e)&&null!==e&&(d=e.value);v=h*(d-t)/(n-t),y=0}var x=y;v*=u,x*=u,s.height=v-x,s.x=o.area[3]+v,s.x0=o.area[3]+x,f.push(s)}})),f}function re(e,t,n,r,i){var o;o="stack"==r?_(e,t.categories.length):b(e);var s=[];o=o.filter((function(e){return"object"===(0,a.default)(e)&&null!==e?e.constructor.toString().indexOf("Array")>-1?null!==e:null!==e.value:null!==e})),o.map((function(e){"object"===(0,a.default)(e)?e.constructor.toString().indexOf("Array")>-1?"candle"==t.type?e.map((function(e){s.push(e)})):s.push(e[1]):s.push(e.value):s.push(e)}));var c=i.min||0,l=i.max||0;s.length>0&&(c=Math.min.apply(this,s),l=Math.max.apply(this,s)),c===l&&(0==l?l=10:c=0);for(var u=x(c,l),f=void 0===i.min||null===i.min?u.minRange:i.min,h=void 0===i.max||null===i.max?u.maxRange:i.max,d=(h-f)/t.yAxis.splitNumber,p=[],g=0;g<=t.yAxis.splitNumber;g++)p.push(f+d*g);return p.reverse()}function ie(e,t,n,r){var i=s({},{type:""},t.extra.column),a=t.yAxis.data.length,o=new Array(a);if(a>0){for(var l=0;l0&&0==i.tooltip.group.includes(o))){var s="number"===typeof i.tooltip.index?i.tooltip.index:i.tooltip.index[i.tooltip.group.indexOf(o)];if(r.beginPath(),"hollow"==a.activeType?(r.setStrokeStyle(t),r.setFillStyle(i.background),r.setLineWidth(2*i.pix)):(r.setStrokeStyle("#ffffff"),r.setFillStyle(t),r.setLineWidth(1*i.pix)),"diamond"===n)e.forEach((function(e,t){null!==e&&s==t&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y),r.lineTo(e.x,e.y+4.5),r.lineTo(e.x+4.5,e.y),r.lineTo(e.x,e.y-4.5))}));else if("circle"===n)e.forEach((function(e,t){null!==e&&s==t&&(r.moveTo(e.x+2.5*i.pix,e.y),r.arc(e.x,e.y,3*i.pix,0,2*Math.PI,!1))}));else if("square"===n)e.forEach((function(e,t){null!==e&&s==t&&(r.moveTo(e.x-3.5,e.y-3.5),r.rect(e.x-3.5,e.y-3.5,7,7))}));else if("triangle"===n)e.forEach((function(e,t){null!==e&&s==t&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y+4.5),r.lineTo(e.x+4.5,e.y+4.5),r.lineTo(e.x,e.y-4.5))}));else if("none"===n)return;r.closePath(),r.fill(),r.stroke()}}function ce(e,t,n,r){var i=e.title.fontSize||t.titleFontSize,a=e.subtitle.fontSize||t.subtitleFontSize,o=e.title.name||"",s=e.subtitle.name||"",c=e.title.color||e.fontColor,l=e.subtitle.color||e.fontColor,u=o?i:0,f=s?a:0;if(s){var h=m(s,a*e.pix,n),d=r.x-h/2+(e.subtitle.offsetX||0)*e.pix,p=r.y+a*e.pix/2+(e.subtitle.offsetY||0)*e.pix;o&&(p+=(u*e.pix+5)/2),n.beginPath(),n.setFontSize(a*e.pix),n.setFillStyle(l),n.fillText(s,d,p),n.closePath(),n.stroke()}if(o){var g=m(o,i*e.pix,n),v=r.x-g/2+(e.title.offsetX||0),y=r.y+i*e.pix/2+(e.title.offsetY||0)*e.pix;s&&(y-=(f*e.pix+5)/2),n.beginPath(),n.setFontSize(i*e.pix),n.setFillStyle(c),n.fillText(o,v,y),n.closePath(),n.stroke()}}function le(e,t,n,r,i){var o=t.data,s=t.textOffset?t.textOffset:0;e.forEach((function(e,c){if(null!==e){r.beginPath();var l=t.textSize?t.textSize*i.pix:n.fontSize;r.setFontSize(l),r.setFillStyle(t.textColor||i.fontColor);var u=o[c];"object"===(0,a.default)(o[c])&&null!==o[c]&&(u=o[c].constructor.toString().indexOf("Array")>-1?o[c][1]:o[c].value);var f=t.formatter?t.formatter(u,c,t,i):u;r.setTextAlign("center"),r.fillText(String(f),e.x,e.y-4+s*i.pix),r.closePath(),r.stroke(),r.setTextAlign("left")}}))}function ue(e,t,n,r,i){var o=t.data,s=t.textOffset?t.textOffset:0,c=i.extra.column.labelPosition;e.forEach((function(e,l){if(null!==e){r.beginPath();var u=t.textSize?t.textSize*i.pix:n.fontSize;r.setFontSize(u),r.setFillStyle(t.textColor||i.fontColor);var f=o[l];"object"===(0,a.default)(o[l])&&null!==o[l]&&(f=o[l].constructor.toString().indexOf("Array")>-1?o[l][1]:o[l].value);var h=t.formatter?t.formatter(f,l,t,i):f;r.setTextAlign("center");var d=e.y-4*i.pix+s*i.pix;e.y>t.zeroPoints&&(d=e.y+s*i.pix+u),"insideTop"==c&&(d=e.y+u+s*i.pix,e.y>t.zeroPoints&&(d=e.y-s*i.pix-4*i.pix)),"center"==c&&(d=e.y+s*i.pix+(i.height-i.area[2]-e.y+u)/2,t.zeroPointst.zeroPoints&&(d=e.y-s*i.pix-(e.y-t.zeroPoints-u)/2),"stack"==i.extra.column.type&&(d=e.y+s*i.pix+(e.y0-e.y+u)/2)),"bottom"==c&&(d=i.height-i.area[2]+s*i.pix-4*i.pix,t.zeroPointst.zeroPoints&&(d=t.zeroPoints-s*i.pix+u+2*i.pix),"stack"==i.extra.column.type&&(d=e.y0+s*i.pix-4*i.pix)),r.fillText(String(h),e.x,d),r.closePath(),r.stroke(),r.setTextAlign("left")}}))}function fe(e,t,n,r,i,a){t.data;var o=t.textOffset?t.textOffset:0;i.extra.mount.labelPosition;e.forEach((function(e,s){if(null!==e){r.beginPath();var c=t[s].textSize?t[s].textSize*i.pix:n.fontSize;r.setFontSize(c),r.setFillStyle(t[s].textColor||i.fontColor);var l=e.value,u=t[s].formatter?t[s].formatter(l,s,t,i):l;r.setTextAlign("center");var f=e.y-4*i.pix+o*i.pix;e.y>a&&(f=e.y+o*i.pix+c),r.fillText(String(u),e.x,f),r.closePath(),r.stroke(),r.setTextAlign("left")}}))}function he(e,t,n,r,i){var o=t.data;t.textOffset&&t.textOffset;e.forEach((function(e,s){if(null!==e){r.beginPath();var c=t.textSize?t.textSize*i.pix:n.fontSize;r.setFontSize(c),r.setFillStyle(t.textColor||i.fontColor);var l=o[s];"object"===(0,a.default)(o[s])&&null!==o[s]&&(l=o[s].value);var u=t.formatter?t.formatter(l,s,t,i):l;r.setTextAlign("left"),r.fillText(String(u),e.x+4*i.pix,e.y+c/2-3),r.closePath(),r.stroke()}}))}function de(e,t,n,r,i,a){var o;t-=e.width/2+e.labelOffset*r.pix,t=t<10?10:t,o=e.endAngle=2&&(u%=2),f+=l}}function pe(e,t,n,r,i,a){var o=r.extra.radar||{};e.forEach((function(e,s){if(!0===o.labelPointShow&&""!==r.categories[s]){var l={x:t*Math.cos(e),y:t*Math.sin(e)},u=p(l.x,l.y,n);a.setFillStyle(o.labelPointColor),a.beginPath(),a.arc(u.x,u.y,o.labelPointRadius*r.pix,0,2*Math.PI,!1),a.closePath(),a.fill()}if(!0===o.labelShow){var f={x:(t+i.radarLabelTextMargin*r.pix)*Math.cos(e),y:(t+i.radarLabelTextMargin*r.pix)*Math.sin(e)},h=p(f.x,f.y,n),d=h.x,g=h.y;c.approximatelyEqual(f.x,0)?d-=m(r.categories[s]||"",i.fontSize,a)/2:f.x<0&&(d-=m(r.categories[s]||"",i.fontSize,a)),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelColor||r.fontColor),a.fillText(r.categories[s]||"",d,g+i.fontSize/2),a.closePath(),a.stroke()}}))}function ge(e,t,n,r,i,a){for(var o=n.pieChartLinePadding,s=[],l=null,u=e.map((function(n,r){var i=n.formatter?n.formatter(n,r,e,t):c.toFixed(100*n._proportion_.toFixed(4))+"%";i=n.labelText?n.labelText:i;var a=2*Math.PI-(n._start_+2*Math.PI*n._proportion_/2);n._rose_proportion_&&(a=2*Math.PI-(n._start_+2*Math.PI*n._rose_proportion_/2));var o=n.color,s=n._radius_;return{arc:a,text:i,color:o,radius:s,textColor:n.textColor,textSize:n.textSize,labelShow:n.labelShow}})),f=0;f=0?d+n.pieChartTextPadding:d-n.pieChartTextPadding,_=v,w=m(h.text,h.textSize*t.pix||n.fontSize,r),S=_;l&&c.isSameXCoordinateArea(l.start,{x:b})&&(S=b>0?Math.min(_,l.start.y):d<0||_>0?Math.max(_,l.start.y):Math.min(_,l.start.y)),b<0&&(b-=w);var A={lineStart:{x:y,y:x},lineEnd:{x:d,y:v},start:{x:b,y:S},width:w,height:n.fontSize,text:h.text,color:h.color,textColor:h.textColor,textSize:h.textSize};l=g(A,l),s.push(l)}for(var k=0;ki?i:a.activeWidth;var o=t.area[0],c=t.height-t.area[2];r.beginPath(),r.setFillStyle(l(a.activeBgColor,a.activeBgOpacity)),r.rect(e-a.activeWidth/2,o,a.activeWidth,c-o),r.closePath(),r.fill(),r.setFillStyle("#FFFFFF")}function me(e,t,n,r,i){var a=s({},{activeBgColor:"#000000",activeBgOpacity:.08},t.extra.bar),o=t.area[3],c=t.width-t.area[1];r.beginPath(),r.setFillStyle(l(a.activeBgColor,a.activeBgOpacity)),r.rect(o,e-i/2,c-o,i),r.closePath(),r.fill(),r.setFillStyle("#FFFFFF")}function be(e,t,n,r,i,a,o){var c=s({},{showBox:!0,showArrow:!0,showCategory:!1,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,boxPadding:3,fontColor:"#FFFFFF",fontSize:13,lineHeight:20,legendShow:!0,legendShape:"auto",splitLine:!0},n.extra.tooltip);1==c.showCategory&&n.categories&&e.unshift({text:n.categories[n.tooltip.index],color:null});var u=c.fontSize*n.pix,f=c.lineHeight*n.pix,h=c.boxPadding*n.pix,d=u,p=5*n.pix;0==c.legendShow&&(d=0,p=0);var g=c.showArrow?8*n.pix:0,v=!1;"line"!=n.type&&"mount"!=n.type&&"area"!=n.type&&"candle"!=n.type&&"mix"!=n.type||1==c.splitLine&&function(e,t,n,r){var i=t.extra.tooltip||{};i.gridType=void 0==i.gridType?"solid":i.gridType,i.dashLength=void 0==i.dashLength?4:i.dashLength;var a=t.area[0],o=t.height-t.area[2];if("dash"==i.gridType&&r.setLineDash([i.dashLength,i.dashLength]),r.setStrokeStyle(i.gridColor||"#cccccc"),r.setLineWidth(1*t.pix),r.beginPath(),r.moveTo(e,a),r.lineTo(e,o),r.stroke(),r.setLineDash([]),i.xAxisLabel){var s=t.categories[t.tooltip.index];r.setFontSize(n.fontSize);var c=m(s,n.fontSize,r),u=e-.5*c,f=o+2*t.pix;r.beginPath(),r.setFillStyle(l(i.labelBgColor||n.toolTipBackground,i.labelBgOpacity||n.toolTipOpacity)),r.setStrokeStyle(i.labelBgColor||n.toolTipBackground),r.setLineWidth(1*t.pix),r.rect(u-i.boxPadding*t.pix,f,c+2*i.boxPadding*t.pix,n.fontSize+2*i.boxPadding*t.pix),r.closePath(),r.stroke(),r.fill(),r.beginPath(),r.setFontSize(n.fontSize),r.setFillStyle(i.labelFontColor||t.fontColor),r.fillText(String(s),u,f+i.boxPadding*t.pix+n.fontSize),r.closePath(),r.stroke()}}(n.tooltip.offset.x,n,r,i),t=s({x:0,y:0},t),t.y-=8*n.pix;var y=e.map((function(e){return m(e.text,u,i)})),x=d+p+4*h+Math.max.apply(null,y),b=2*h+e.length*f;if(0!=c.showBox){t.x-Math.abs(n._scrollDistance_||0)+g+x>n.width&&(v=!0),b+t.y>n.height&&(t.y=n.height-b),i.beginPath(),i.setFillStyle(l(c.bgColor,c.bgOpacity)),i.setLineWidth(c.borderWidth*n.pix),i.setStrokeStyle(l(c.borderColor,c.borderOpacity));var _=c.borderRadius;v?(x+g>n.width&&(t.x=n.width+Math.abs(n._scrollDistance_||0)+g+(x-n.width)),x>t.x&&(t.x=n.width+Math.abs(n._scrollDistance_||0)+g+(x-n.width)),c.showArrow&&(i.moveTo(t.x,t.y+10*n.pix),i.lineTo(t.x-g,t.y+10*n.pix+5*n.pix)),i.arc(t.x-g-_,t.y+b-_,_,0,Math.PI/2,!1),i.arc(t.x-g-Math.round(x)+_,t.y+b-_,_,Math.PI/2,Math.PI,!1),i.arc(t.x-g-Math.round(x)+_,t.y+_,_,-Math.PI,-Math.PI/2,!1),i.arc(t.x-g-_,t.y+_,_,-Math.PI/2,0,!1),c.showArrow&&(i.lineTo(t.x-g,t.y+10*n.pix-5*n.pix),i.lineTo(t.x,t.y+10*n.pix))):(c.showArrow&&(i.moveTo(t.x,t.y+10*n.pix),i.lineTo(t.x+g,t.y+10*n.pix-5*n.pix)),i.arc(t.x+g+_,t.y+_,_,-Math.PI,-Math.PI/2,!1),i.arc(t.x+g+Math.round(x)-_,t.y+_,_,-Math.PI/2,0,!1),i.arc(t.x+g+Math.round(x)-_,t.y+b-_,_,0,Math.PI/2,!1),i.arc(t.x+g+_,t.y+b-_,_,Math.PI/2,Math.PI,!1),c.showArrow&&(i.lineTo(t.x+g,t.y+10*n.pix+5*n.pix),i.lineTo(t.x,t.y+10*n.pix))),i.closePath(),i.fill(),c.borderWidth>0&&i.stroke(),c.legendShow&&e.forEach((function(e,r){if(null!==e.color){i.beginPath(),i.setFillStyle(e.color);var a=t.x+g+2*h,o=t.y+(f-u)/2+f*r+h+1;switch(v&&(a=t.x-x-g+2*h),e.legendShape){case"line":i.moveTo(a,o+.5*d-2*n.pix),i.fillRect(a,o+.5*d-2*n.pix,d,4*n.pix);break;case"triangle":i.moveTo(a+7.5*n.pix,o+.5*d-5*n.pix),i.lineTo(a+2.5*n.pix,o+.5*d+5*n.pix),i.lineTo(a+12.5*n.pix,o+.5*d+5*n.pix),i.lineTo(a+7.5*n.pix,o+.5*d-5*n.pix);break;case"diamond":i.moveTo(a+7.5*n.pix,o+.5*d-5*n.pix),i.lineTo(a+2.5*n.pix,o+.5*d),i.lineTo(a+7.5*n.pix,o+.5*d+5*n.pix),i.lineTo(a+12.5*n.pix,o+.5*d),i.lineTo(a+7.5*n.pix,o+.5*d-5*n.pix);break;case"circle":i.moveTo(a+7.5*n.pix,o+.5*d),i.arc(a+7.5*n.pix,o+.5*d,5*n.pix,0,2*Math.PI);break;case"rect":i.moveTo(a,o+.5*d-5*n.pix),i.fillRect(a,o+.5*d-5*n.pix,15*n.pix,10*n.pix);break;case"square":i.moveTo(a+2*n.pix,o+.5*d-5*n.pix),i.fillRect(a+2*n.pix,o+.5*d-5*n.pix,10*n.pix,10*n.pix);break;default:i.moveTo(a,o+.5*d-5*n.pix),i.fillRect(a,o+.5*d-5*n.pix,15*n.pix,10*n.pix)}i.closePath(),i.fill()}})),e.forEach((function(e,n){var r=t.x+g+2*h+d+p;v&&(r=t.x-x-g+2*h+d+p);var a=t.y+f*n+(f-u)/2-1+h+u;i.beginPath(),i.setFontSize(u),i.setTextBaseline("normal"),i.setFillStyle(c.fontColor),i.fillText(e.text,r,a),i.closePath(),i.stroke()}))}}function _e(e,t,n,r,i,a){var o=e.extra.tooltip||{};o.horizentalLine&&e.tooltip&&1===r&&("line"==e.type||"area"==e.type||"column"==e.type||"mount"==e.type||"candle"==e.type||"mix"==e.type)&&ye(e,t,n),n.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&n.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===r&&be(e.tooltip.textList,e.tooltip.offset,e,t,n),n.restore()}function we(e,t,n,r){var i=t.chartData.xAxisData,a=i.xAxisPoints,o=i.startX,s=i.endX,c=i.eachSpacing,l="center";"bar"!=t.type&&"line"!=t.type&&"area"!=t.type&&"scatter"!=t.type&&"bubble"!=t.type||(l=t.xAxis.boundaryGap);var u=t.height-t.area[2],f=t.area[0];if(t.enableScroll&&t.xAxis.scrollShow){var h=t.height-t.area[2]+n.xAxisHeight,d=s-o,p=c*(a.length-1);"mount"==t.type&&t.extra&&t.extra.mount&&t.extra.mount.widthRatio&&t.extra.mount.widthRatio>1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),p+=(t.extra.mount.widthRatio-1)*c);var g=d*d/p,v=0;t._scrollDistance_&&(v=-t._scrollDistance_*d/p),r.beginPath(),r.setLineCap("round"),r.setLineWidth(6*t.pix),r.setStrokeStyle(t.xAxis.scrollBackgroundColor||"#EFEBEF"),r.moveTo(o,h),r.lineTo(s,h),r.stroke(),r.closePath(),r.beginPath(),r.setLineCap("round"),r.setLineWidth(6*t.pix),r.setStrokeStyle(t.xAxis.scrollColor||"#A6A6A6"),r.moveTo(o+v,h),r.lineTo(o+v+g,h),r.stroke(),r.closePath(),r.setLineCap("butt")}if(r.save(),t._scrollDistance_&&0!==t._scrollDistance_&&r.translate(t._scrollDistance_,0),!0===t.xAxis.calibration&&(r.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),r.setLineCap("butt"),r.setLineWidth(1*t.pix),a.forEach((function(e,n){n>0&&(r.beginPath(),r.moveTo(e-c/2,u),r.lineTo(e-c/2,u+3*t.pix),r.closePath(),r.stroke())}))),!0!==t.xAxis.disableGrid&&(r.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),r.setLineCap("butt"),r.setLineWidth(1*t.pix),"dash"==t.xAxis.gridType&&r.setLineDash([t.xAxis.dashLength*t.pix,t.xAxis.dashLength*t.pix]),t.xAxis.gridEval=t.xAxis.gridEval||1,a.forEach((function(e,n){n%t.xAxis.gridEval==0&&(r.beginPath(),r.moveTo(e,u),r.lineTo(e,f),r.stroke())})),r.setLineDash([])),!0!==t.xAxis.disabled){var y=e.length;t.xAxis.labelCount&&(y=t.xAxis.itemCount?Math.ceil(e.length/t.xAxis.itemCount*t.xAxis.labelCount):t.xAxis.labelCount,y-=1);for(var x=Math.ceil(e.length/y),b=[],_=e.length,w=0;w<_;w++)w%x!==0?b.push(""):b.push(e[w]);b[_-1]=e[_-1];var S=t.xAxis.fontSize*t.pix||n.fontSize;0===n._xAxisTextAngle_?b.forEach((function(e,n){var i=t.xAxis.formatter?t.xAxis.formatter(e,n,t):e,o=-m(String(i),S,r)/2;"center"==l&&(o+=c/2);t.xAxis.scrollShow&&t.pix;var s=t._scrollDistance_||0,f="center"==l?a[n]+c/2:a[n];f-Math.abs(s)>=t.area[3]-1&&f-Math.abs(s)<=t.width-t.area[1]+1&&(r.beginPath(),r.setFontSize(S),r.setFillStyle(t.xAxis.fontColor||t.fontColor),r.fillText(String(i),a[n]+o,u+t.xAxis.marginTop*t.pix+(t.xAxis.lineHeight-t.xAxis.fontSize)*t.pix/2+t.xAxis.fontSize*t.pix),r.closePath(),r.stroke())})):b.forEach((function(e,i){var o=t.xAxis.formatter?t.xAxis.formatter(e):e,s=t._scrollDistance_||0,f="center"==l?a[i]+c/2:a[i];if(f-Math.abs(s)>=t.area[3]-1&&f-Math.abs(s)<=t.width-t.area[1]+1){r.save(),r.beginPath(),r.setFontSize(S),r.setFillStyle(t.xAxis.fontColor||t.fontColor);var h=m(String(o),S,r),d=a[i];"center"==l&&(d=a[i]+c/2);t.xAxis.scrollShow&&6*t.pix;var p=u+t.xAxis.marginTop*t.pix+S-S*Math.abs(Math.sin(n._xAxisTextAngle_));t.xAxis.rotateAngle<0?(d-=S/2,h=0):(d+=S/2,h=-h),r.translate(d,p),r.rotate(-1*n._xAxisTextAngle_),r.fillText(String(o),h,0),r.closePath(),r.stroke(),r.restore()}}))}r.restore(),t.xAxis.title&&(r.beginPath(),r.setFontSize(t.xAxis.titleFontSize*t.pix),r.setFillStyle(t.xAxis.titleFontColor),r.fillText(String(t.xAxis.title),t.width-t.area[1]+t.xAxis.titleOffsetX*t.pix,t.height-t.area[2]+t.xAxis.marginTop*t.pix+(t.xAxis.lineHeight-t.xAxis.titleFontSize)*t.pix/2+(t.xAxis.titleFontSize+t.xAxis.titleOffsetY)*t.pix),r.closePath(),r.stroke()),t.xAxis.axisLine&&(r.beginPath(),r.setStrokeStyle(t.xAxis.axisLineColor),r.setLineWidth(1*t.pix),r.moveTo(o,t.height-t.area[2]),r.lineTo(s,t.height-t.area[2]),r.stroke())}function Se(e,t,n,r){if(!0!==t.yAxis.disableGrid){var i=t.height-t.area[0]-t.area[2],a=i/t.yAxis.splitNumber,o=t.area[3],s=t.chartData.xAxisData.xAxisPoints,c=t.chartData.xAxisData.eachSpacing,l=c*(s.length-1);"mount"==t.type&&t.extra&&t.extra.mount&&t.extra.mount.widthRatio&&t.extra.mount.widthRatio>1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),l+=(t.extra.mount.widthRatio-1)*c);var u=o+l,f=[],h=1;!1===t.xAxis.axisLine&&(h=0);for(var d=h;d4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==t.type?t.extra.pie:t.extra.ring),o={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2};0==n.pieChartLinePadding&&(n.pieChartLinePadding=a.activeRadius*t.pix);var c=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);c=c<10?10:c,a.customRadius>0&&(c=a.customRadius*t.pix),e=j(e,c,i);var u=a.activeRadius*t.pix;if(a.customColor=y(a.linearType,a.customColor,e,n),e=e.map((function(e){return e._start_+=a.offsetAngle*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(r.beginPath(),r.setFillStyle(l(e.color,a.activeOpacity||.5)),r.moveTo(o.x,o.y),r.arc(o.x,o.y,e._radius_+u,e._start_,e._start_+2*e._proportion_*Math.PI),r.closePath(),r.fill()),r.beginPath(),r.setLineWidth(a.borderWidth*t.pix),r.lineJoin="round",r.setStrokeStyle(a.borderColor);var i,s=e.color;"custom"==a.linearType&&(i=r.createCircularGradient?r.createCircularGradient(o.x,o.y,e._radius_):r.createRadialGradient(o.x,o.y,0,o.x,o.y,e._radius_),i.addColorStop(0,l(a.customColor[e.linearIndex],1)),i.addColorStop(1,l(e.color,1)),s=i);r.setFillStyle(s),r.moveTo(o.x,o.y),r.arc(o.x,o.y,e._radius_,e._start_,e._start_+2*e._proportion_*Math.PI),r.closePath(),r.fill(),1==a.border&&r.stroke()})),"ring"===t.type){var f=.6*c;"number"===typeof a.ringWidth&&a.ringWidth>0&&(f=Math.max(0,c-a.ringWidth*t.pix)),r.beginPath(),r.setFillStyle(a.centerColor),r.moveTo(o.x,o.y),r.arc(o.x,o.y,f,0,2*Math.PI),r.closePath(),r.fill()}return!1!==t.dataLabel&&1===i&&ge(e,t,n,r,0,o),1===i&&"ring"===t.type&&ce(t,n,r,o),{center:o,radius:c,series:e}}function Te(e,t){var n=Array(2),r=20037508.34*e/180,i=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return i=20037508.34*i/180,n[0]=r,n[1]=i,n}function Oe(e,t,n,r,i,a){return{x:(t-n.xMin)*r+i,y:(n.yMax-e)*r+a}}function Ce(e,t,n){if(t[1]==n[1])return!1;if(t[1]>e[1]&&n[1]>e[1])return!1;if(t[1]e[1])return!1;if(n[1]==e[1]&&t[1]>e[1])return!1;if(t[0]t[a].area[2]||e[1]>t[a].area[3]||e[2]n||e[3]>r){i=!0;break}i=!1}return i}function De(e,t,n){var r=e.series;switch(t){case"normal":for(var i=0;i.7},p=0;p0&&e[0].data.constructor.toString().indexOf("Array")>-1){t._pieSeries_=e;for(var i=e[0].data,a=0;at.width-t.area[1]-t.area[3]?(h.push(g),p.push(d-t.legend.itemGap*t.pix),d=b,g=[y]):(d+=b,g.push(y))}if(g.length){h.push(g),p.push(d-t.legend.itemGap*t.pix),a.widthArr=p;var _=Math.max.apply(null,p);switch(t.legend.float){case"left":a.area.start.x=t.area[3],a.area.end.x=t.area[3]+_+2*o;break;case"right":a.area.start.x=t.width-t.area[1]-_-2*o,a.area.end.x=t.width-t.area[1];break;default:a.area.start.x=(t.width-_)/2-o,a.area.end.x=(t.width+_)/2+o}a.area.width=_+2*o,a.area.wholeWidth=_+2*o,a.area.height=h.length*f+2*o,a.area.wholeHeight=h.length*f+2*o+2*s,a.points=h}}else{var w=e.length,S=t.height-t.area[0]-t.area[2]-2*s-2*o,A=Math.min(Math.floor(S/f),w);switch(a.area.height=A*f+2*o,a.area.wholeHeight=A*f+2*o,t.legend.float){case"top":a.area.start.y=t.area[0]+s,a.area.end.y=t.area[0]+s+a.area.height;break;case"bottom":a.area.start.y=t.height-t.area[2]-s-a.area.height,a.area.end.y=t.height-t.area[2]-s;break;default:a.area.start.y=(t.height-a.area.height)/2,a.area.end.y=(t.height+a.area.height)/2}for(var k=w%A===0?w/A:Math.floor(w/A+1),P=[],T=0;TM&&(M=D)}a.widthArr.push(M),a.heightArr.push(L.length*f+2*o)}for(var F=0,E=0;E0?L[Ce].width+t.yAxis.padding*t.pix:L[Ce].width,be+=1):"right"==L[Ce].position&&(t.area[1]+=ye>0?L[Ce].width+t.yAxis.padding*t.pix:L[Ce].width,ye+=1)}else n.yAxisWidth=L;if(t.chartData.yAxisData=O,t.categories&&t.categories.length&&"radar"!==t.type&&"gauge"!==t.type&&"bar"!==t.type){t.chartData.xAxisData=K(t.categories,t);var Le=D(t.categories,t,0,t.chartData.xAxisData.eachSpacing,r),Me=Le.xAxisHeight,Ie=Le.angle;n.xAxisHeight=Me,n._xAxisTextAngle_=Ie,t.area[2]+=Me,t.chartData.categoriesData=Le}else if("line"===t.type||"area"===t.type||"scatter"===t.type||"bubble"===t.type||"bar"===t.type){t.chartData.xAxisData=F(u,t,n,r),f=t.chartData.xAxisData.rangesFormat;var $e=D(f,t,0,t.chartData.xAxisData.eachSpacing,r),Ne=$e.xAxisHeight,ze=$e.angle;n.xAxisHeight=Ne,n._xAxisTextAngle_=ze,t.area[2]+=Ne,t.chartData.categoriesData=$e}else t.chartData.xAxisData={xAxisPoints:[]};if(t.enableScroll&&"right"==t.xAxis.scrollAlign&&void 0===t._scrollDistance_){var Ue,Be=t.chartData.xAxisData.xAxisPoints,qe=t.chartData.xAxisData.startX,We=t.chartData.xAxisData.endX,He=t.chartData.xAxisData.eachSpacing,Ve=He*(Be.length-1),Ge=We-qe;Ue=Ge-Ve,o.scrollOption.currentOffset=Ue,o.scrollOption.startTouchX=Ue,o.scrollOption.distance=0,o.scrollOption.lastMoveTime=0,t._scrollDistance_=Ue}switch("pie"!==e&&"ring"!==e&&"rose"!==e||(n._pieTextMaxLength_=!1===t.dataLabel?0:function(e,t,n,r){e=j(e);for(var i=0,a=0;a4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{type:"normal",autoColors:!0},t.extra.word);t.chartData.wordCloudData||(t.chartData.wordCloudData=De(t,a.type,r)),r.beginPath(),r.setFillStyle(t.background),r.rect(0,0,t.width,t.height),r.fill(),r.save();var o=t.chartData.wordCloudData;r.translate(t.width/2,t.height/2);for(var c=0;c0&&(t.tooltip&&t.tooltip.index==c?r.strokeText(l,(o[c].areav[0]+5-t.width/2)*i-f*(1-i)/2,(o[c].areav[1]+5+u-t.height/2)*i):r.fillText(l,(o[c].areav[0]+5-t.width/2)*i-f*(1-i)/2,(o[c].areav[1]+5+u-t.height/2)*i)):o[c].area[0]>0&&(t.tooltip&&t.tooltip.index==c?r.strokeText(l,(o[c].area[0]+5-t.width/2)*i-f*(1-i)/2,(o[c].area[1]+5+u-t.height/2)*i):r.fillText(l,(o[c].area[0]+5-t.width/2)*i-f*(1-i)/2,(o[c].area[1]+5+u-t.height/2)*i)),r.stroke(),r.restore()}r.restore()}(u,t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"map":r.clearRect(0,0,t.width,t.height),function(e,t,n,r){var i,a,o=s({},{border:!0,mercator:!1,borderWidth:1,active:!0,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#f04864",activeFillColor:"#facc14",activeFillOpacity:1},t.extra.map),c=e,u=function(e){for(var t,n={xMin:180,xMax:0,yMin:90,yMax:0},r=0;rl.x?n.xMax:l.x,n.yMin=n.yMinl.y?n.yMax:l.y}}return n}(c);if(o.mercator){var f=Te(u.xMax,u.yMax),h=Te(u.xMin,u.yMin);u.xMax=f[0],u.yMax=f[1],u.xMin=h[0],u.yMin=h[1]}for(var d=t.width/Math.abs(u.xMax-u.xMin),p=t.height/Math.abs(u.yMax-u.yMin),g=d4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,minSize:0,labelAlign:"right",linearType:"none",customColor:[]},t.extra.funnel),o=(t.height-t.area[0]-t.area[2])/e.length,c={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.height-t.area[2]},u=a.activeWidth*t.pix,f=Math.min((t.width-t.area[1]-t.area[3])/2-u,(t.height-t.area[0]-t.area[2])/2-u),h=$(e,f,a,o,i);if(r.save(),r.translate(c.x,c.y),a.customColor=y(a.linearType,a.customColor,e,n),"pyramid"==a.type)for(var d=0;d4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{type:"straight",width:2,activeType:"none",linearType:"none",onShadow:!1,animation:"vertical"},t.extra.line);a.width*=t.pix;var o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=[];r.save();var h=0,p=t.width+u;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),h=-t._scrollDistance_-2*u+t.area[3],p=h+(t.xAxis.itemCount+4)*u),e.forEach((function(e,o){var s,g,v;r.beginPath(),r.setStrokeStyle(e.color),r.moveTo(-1e4,-1e4),r.lineTo(-10001,-10001),r.stroke(),s=[].concat(t.chartData.yAxisData.ranges[e.index]),g=s.pop(),v=s.shift();var y=e.data,x=Y(y,g,v,c,u,t,n,a,i);f.push(x);var m=I(x,e);if("dash"==e.lineType){var b=e.dashLength?e.dashLength:8;b*=t.pix,r.setLineDash([b,b])}r.beginPath();var _=e.color;if("none"!==a.linearType&&e.linearColor&&e.linearColor.length>0){for(var w=r.createLinearGradient(t.chartData.xAxisData.startX,t.height/2,t.chartData.xAxisData.endX,t.height/2),S=0;S0?r.setShadow(e.setShadow[0],e.setShadow[1],e.setShadow[2],e.setShadow[3]):r.setShadow(0,0,0,"rgba(0,0,0,0)"),r.setLineWidth(a.width),m.forEach((function(e,t){if(1===e.length)r.moveTo(e[0].x,e[0].y);else{r.moveTo(e[0].x,e[0].y);var n=0;if("curve"===a.type)for(var i=0;ih&&(r.moveTo(o.x,o.y),n=1),i>0&&o.x>h&&o.xh&&(r.moveTo(l.x,l.y),n=1),c>0&&l.x>h&&l.xh&&(r.moveTo(f.x,f.y),n=1),u>0&&f.x>h&&f.x4&&void 0!==arguments[4]?arguments[4]:1,a=(s({},{type:"circle"},t.extra.scatter),t.chartData.xAxisData),o=a.xAxisPoints,c=a.eachSpacing,l=[];r.save();return t.width,t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),-t._scrollDistance_-2*c+t.area[3],t.xAxis.itemCount),e.forEach((function(e,a){var s,l,u;s=[].concat(t.chartData.yAxisData.ranges[e.index]),l=s.pop(),u=s.shift();var f=e.data,h=X(f,l,u,o,c,t,n,i);r.beginPath(),r.setStrokeStyle(e.color),r.setFillStyle(e.color),r.setLineWidth(1*t.pix);var d=e.pointShape;if("diamond"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y),r.lineTo(e.x,e.y+4.5),r.lineTo(e.x+4.5,e.y),r.lineTo(e.x,e.y-4.5))}));else if("circle"===d)h.forEach((function(e,n){null!==e&&(r.moveTo(e.x+2.5*t.pix,e.y),r.arc(e.x,e.y,3*t.pix,0,2*Math.PI,!1))}));else if("square"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x-3.5,e.y-3.5),r.rect(e.x-3.5,e.y-3.5,7,7))}));else if("triangle"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y+4.5),r.lineTo(e.x+4.5,e.y+4.5),r.lineTo(e.x,e.y-4.5))}));else if("triangle"===d)return;r.closePath(),r.fill(),r.stroke()})),!1!==t.dataLabel&&1===i&&e.forEach((function(e,a){var s,l,u;s=[].concat(t.chartData.yAxisData.ranges[e.index]),l=s.pop(),u=s.shift();var f=e.data,h=X(f,l,u,o,c,t,n,i);le(h,e,n,r,t)})),r.restore(),{xAxisPoints:o,calPoints:l,eachSpacing:c}}(u,t,n,r,e),a=i.xAxisPoints,o=i.calPoints,c=i.eachSpacing;t.chartData.xAxisPoints=a,t.chartData.calPoints=o,t.chartData.eachSpacing=c,Ae(0,t,n,r),!1!==t.enableMarkLine&&1===e&&ve(t,0,r),ke(t.series,t,n,r,t.chartData),_e(t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new Re({timing:t.timing,duration:g,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&ae(r,t),Se(0,t,0,r),we(f,t,n,r);var i=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{opacity:1,border:2},t.extra.bubble),o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=[];r.save();return t.width,t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),-t._scrollDistance_-2*u+t.area[3],t.xAxis.itemCount),e.forEach((function(e,o){var s,f,h;s=[].concat(t.chartData.yAxisData.ranges[e.index]),f=s.pop(),h=s.shift();var d=e.data,p=X(d,f,h,c,u,t,n,i);r.beginPath(),r.setStrokeStyle(e.color),r.setLineWidth(a.border*t.pix),r.setFillStyle(l(e.color,a.opacity)),p.forEach((function(e,n){r.moveTo(e.x+e.r,e.y),r.arc(e.x,e.y,e.r*t.pix,0,2*Math.PI,!1)})),r.closePath(),r.fill(),r.stroke(),!1!==t.dataLabel&&1===i&&p.forEach((function(i,a){r.beginPath();var o=e.textSize*t.pix||n.fontSize;r.setFontSize(o),r.setFillStyle(e.textColor||"#FFFFFF"),r.setTextAlign("center"),r.fillText(String(i.t),i.x,i.y+o/2),r.closePath(),r.stroke(),r.setTextAlign("left")}))})),r.restore(),{xAxisPoints:c,calPoints:f,eachSpacing:u}}(u,t,n,r,e),a=i.xAxisPoints,o=i.calPoints,c=i.eachSpacing;t.chartData.xAxisPoints=a,t.chartData.calPoints=o,t.chartData.eachSpacing=c,Ae(0,t,n,r),!1!==t.enableMarkLine&&1===e&&ve(t,0,r),ke(t.series,t,n,r,t.chartData),_e(t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new Re({timing:t.timing,duration:g,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&ae(r,t),Se(0,t,0,r),we(f,t,n,r);var a=function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=s({},{width:u/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mix.column),h=s({},{opacity:.2,gradient:!1},t.extra.mix.area),p=s({},{width:2},t.extra.mix.line),g=t.height-t.area[2],v=[],x=0,m=0;e.forEach((function(e,t){"column"==e.type&&(m+=1)})),r.save();var b=-2,_=c.length+2,w=0,S=t.width+u;if(t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),b=Math.floor(-t._scrollDistance_/u)-2,_=b+t.xAxis.itemCount+4,w=-t._scrollDistance_-2*u+t.area[3],S=w+(t.xAxis.itemCount+4)*u),f.customColor=y(f.linearType,f.customColor,e,n),e.forEach((function(e,o){var s,y,A;s=[].concat(t.chartData.yAxisData.ranges[e.index]),y=s.pop(),A=s.shift();var k=e.data,P=X(k,y,A,c,u,t,n,a);if(v.push(P),"column"==e.type){P=q(P,u,m,x,0,t);for(var T=0;Tb&&T<_){var C=O.x-O.width/2;t.height,O.y,t.area[2];r.beginPath();var L=O.color||e.color,M=O.color||e.color;if("none"!==f.linearType){var D=r.createLinearGradient(C,O.y,C,t.height-t.area[2]);"opacity"==f.linearType?(D.addColorStop(0,l(L,f.linearOpacity)),D.addColorStop(1,l(L,1))):(D.addColorStop(0,l(f.customColor[e.linearIndex],f.linearOpacity)),D.addColorStop(f.colorStop,l(f.customColor[e.linearIndex],f.linearOpacity)),D.addColorStop(1,l(L,1))),L=D}if(f.barBorderRadius&&4===f.barBorderRadius.length||f.barBorderCircle){var F=C,E=O.y,j=O.width,$=t.height-t.area[2]-O.y;f.barBorderCircle&&(f.barBorderRadius=[j/2,j/2,0,0]);var R=(0,i.default)(f.barBorderRadius,4),N=R[0],z=R[1],U=R[2],B=R[3],W=Math.min(j/2,$/2);N=N>W?W:N,z=z>W?W:z,U=U>W?W:U,B=B>W?W:B,N=N<0?0:N,z=z<0?0:z,U=U<0?0:U,B=B<0?0:B,r.arc(F+N,E+N,N,-Math.PI,-Math.PI/2),r.arc(F+j-z,E+z,z,-Math.PI/2,0),r.arc(F+j-U,E+$-U,U,0,Math.PI/2),r.arc(F+B,E+$-B,B,Math.PI/2,Math.PI)}else r.moveTo(C,O.y),r.lineTo(C+O.width,O.y),r.lineTo(C+O.width,t.height-t.area[2]),r.lineTo(C,t.height-t.area[2]),r.lineTo(C,O.y),r.setLineWidth(1),r.setStrokeStyle(M);r.setFillStyle(L),r.closePath(),r.fill()}}x+=1}if("area"==e.type)for(var H=I(P,e),V=0;V1){var J=G[0],Y=G[G.length-1];r.moveTo(J.x,J.y);var Z=0;if("curve"===e.style)for(var Q=0;Qw&&(r.moveTo(ee.x,ee.y),Z=1),Q>0&&ee.x>w&&ee.xw&&(r.moveTo(re.x,re.y),Z=1),ne>0&&re.x>w&&re.xw&&(r.moveTo(c.x,c.y),o=1),s>0&&c.x>w&&c.xw&&(r.moveTo(f.x,f.y),o=1),u>0&&f.x>w&&f.x4&&void 0!==arguments[4]?arguments[4]:1,o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=s({},{type:"group",width:u/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0,labelPosition:"outside"},t.extra.column),h=[];r.save();var d=-2,p=c.length+2;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),d=Math.floor(-t._scrollDistance_/u)-2,p=d+t.xAxis.itemCount+4),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&xe(t.tooltip.offset.x,t,0,r,u),f.customColor=y(f.linearType,f.customColor,e,n),e.forEach((function(o,s){var g,v,y;g=[].concat(t.chartData.yAxisData.ranges[o.index]),v=g.pop(),y=g.shift();var x=t.height-t.area[0]-t.area[2],m=x*(0-v)/(y-v),b=t.height-Math.round(m)-t.area[2];o.zeroPoints=b;var _=o.data;switch(f.type){case"group":var w=Z(_,v,y,c,u,t,n,b,a),S=te(_,v,y,c,u,t,n,s,e,a);h.push(S),w=q(w,u,e.length,s,0,t);for(var A=0;Ad&&Ab?b:k.y,D=k.width,F=Math.abs(b-k.y);f.barBorderCircle&&(f.barBorderRadius=[D/2,D/2,0,0]),k.y>b&&(f.barBorderRadius=[0,0,D/2,D/2]);var E=(0,i.default)(f.barBorderRadius,4),j=E[0],$=E[1],R=E[2],N=E[3],z=Math.min(D/2,F/2);j=j>z?z:j,$=$>z?z:$,R=R>z?z:R,N=N>z?z:N,j=j<0?0:j,$=$<0?0:$,R=R<0?0:R,N=N<0?0:N,r.arc(M+j,I+j,j,-Math.PI,-Math.PI/2),r.arc(M+D-$,I+$,$,-Math.PI/2,0),r.arc(M+D-R,I+F-R,R,0,Math.PI/2),r.arc(M+N,I+F-N,N,Math.PI/2,Math.PI)}else r.moveTo(P,k.y),r.lineTo(P+k.width,k.y),r.lineTo(P+k.width,b),r.lineTo(P,b),r.lineTo(P,k.y),r.setLineWidth(1),r.setStrokeStyle(C);r.setFillStyle(O),r.closePath(),r.fill()}}break;case"stack":w=te(_,v,y,c,u,t,n,s,e,a);h.push(w),w=V(w,u,e.length,0,0,t);for(var U=0;Ud&&U0&&(T-=W),r.setFillStyle(O),r.moveTo(P,B.y),r.fillRect(P,B.y,B.width,T),r.closePath(),r.fill()}}break;case"meter":w=X(_,v,y,c,u,t,n,a);h.push(w),w=H(w,u,e.length,s,0,t,f.meterBorder);for(var G=0;Gd&&G0&&(r.setStrokeStyle(o.color),r.setLineWidth(f.meterBorder*t.pix)),0==s?r.setFillStyle(f.meterFillColor):r.setFillStyle(K.color||o.color);P=K.x-K.width/2,T=t.height-K.y-t.area[2];if(f.barBorderRadius&&4===f.barBorderRadius.length||!0===f.barBorderCircle){var J=P,Y=K.y,Q=K.width,ee=b-K.y;f.barBorderCircle&&(f.barBorderRadius=[Q/2,Q/2,0,0]);var ne=(0,i.default)(f.barBorderRadius,4),re=ne[0],ie=ne[1],ae=ne[2],oe=ne[3],se=Math.min(Q/2,ee/2);re=re>se?se:re,ie=ie>se?se:ie,ae=ae>se?se:ae,oe=oe>se?se:oe,re=re<0?0:re,ie=ie<0?0:ie,ae=ae<0?0:ae,oe=oe<0?0:oe,r.arc(J+re,Y+re,re,-Math.PI,-Math.PI/2),r.arc(J+Q-ie,Y+ie,ie,-Math.PI/2,0),r.arc(J+Q-ae,Y+ee-ae,ae,0,Math.PI/2),r.arc(J+oe,Y+ee-oe,oe,Math.PI/2,Math.PI),r.fill()}else r.moveTo(P,K.y),r.lineTo(P+K.width,K.y),r.lineTo(P+K.width,b),r.lineTo(P,b),r.lineTo(P,K.y),r.fill();0==s&&f.meterBorder>0&&(r.closePath(),r.stroke())}}break}})),!1!==t.dataLabel&&1===a&&e.forEach((function(i,o){var s,l,h;s=[].concat(t.chartData.yAxisData.ranges[i.index]),l=s.pop(),h=s.shift();var d=i.data;switch(f.type){case"group":var p=Z(d,l,h,c,u,t,n,a);p=q(p,u,e.length,o,0,t),ue(p,i,n,r,t);break;case"stack":p=te(d,l,h,c,u,t,n,o,e,a);ue(p,i,n,r,t);break;case"meter":p=X(d,l,h,c,u,t,n,a);ue(p,i,n,r,t);break}})),r.restore(),{xAxisPoints:c,calPoints:h,eachSpacing:u}}(u,t,n,r,e),o=a.xAxisPoints,c=a.calPoints,h=a.eachSpacing;t.chartData.xAxisPoints=o,t.chartData.calPoints=c,t.chartData.eachSpacing=h,Ae(0,t,n,r),!1!==t.enableMarkLine&&1===e&&ve(t,0,r),ke(t.series,t,n,r,t.chartData),_e(t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new Re({timing:t.timing,duration:g,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&ae(r,t),Se(0,t,0,r),we(f,t,n,r);var a=function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=s({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:!1,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mount);f.widthRatio=f.widthRatio<=0?0:f.widthRatio,f.widthRatio=f.widthRatio>=2?2:f.widthRatio,r.save();var h,d,p,g=-2,v=c.length+2;t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),g=Math.floor(-t._scrollDistance_/u)-2,v=g+t.xAxis.itemCount+4),f.customColor=y(f.linearType,f.customColor,e,n),h=[].concat(t.chartData.yAxisData.ranges[0]),d=h.pop(),p=h.shift();var x=t.height-t.area[0]-t.area[2],m=x*(0-d)/(p-d),b=t.height-Math.round(m)-t.area[2],_=Q(e,d,p,c,u,t,f,b,a);switch(f.type){case"bar":for(var w=0;w<_.length;w++){var S=_[w];if(null!==S&&w>g&&wb?b:S.y,M=S.width,I=Math.abs(b-S.y);f.barBorderCircle&&(f.barBorderRadius=[M/2,M/2,0,0]),S.y>b&&(f.barBorderRadius=[0,0,M/2,M/2]);var D=(0,i.default)(f.barBorderRadius,4),F=D[0],E=D[1],j=D[2],$=D[3],R=Math.min(M/2,I/2);F=F>R?R:F,E=E>R?R:E,j=j>R?R:j,$=$>R?R:$,F=F<0?0:F,E=E<0?0:E,j=j<0?0:j,$=$<0?0:$,r.arc(C+F,L+F,F,-Math.PI,-Math.PI/2),r.arc(C+M-E,L+E,E,-Math.PI/2,0),r.arc(C+M-j,L+I-j,j,0,Math.PI/2),r.arc(C+$,L+I-$,$,Math.PI/2,Math.PI)}else r.moveTo(A,S.y),r.lineTo(A+S.width,S.y),r.lineTo(A+S.width,b),r.lineTo(A,b),r.lineTo(A,S.y);r.setStrokeStyle(T),r.setFillStyle(P),f.borderWidth>0&&(r.setLineWidth(f.borderWidth*t.pix),r.closePath(),r.stroke()),r.fill()}}break;case"triangle":for(var N=0;N<_.length;N++){var z=_[N];if(null!==z&&N>g&&N0&&(r.setLineWidth(f.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"mount":for(var U=0;U<_.length;U++){var B=_[U];if(null!==B&&U>g&&U0&&(r.setLineWidth(f.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"sharp":for(var q=0;q<_.length;q++){var W=_[q];if(null!==W&&q>g&&q0&&(r.setLineWidth(f.borderWidth*t.pix),r.stroke()),r.fill()}}break}if(!1!==t.dataLabel&&1===a){var H,V,G;H=[].concat(t.chartData.yAxisData.ranges[0]),V=H.pop(),G=H.shift();_=Q(e,V,G,c,u,t,f,b,a);fe(_,e,n,r,t,b)}return r.restore(),{xAxisPoints:c,calPoints:_,eachSpacing:u}}(u,t,n,r,e),o=a.xAxisPoints,c=a.calPoints,h=a.eachSpacing;t.chartData.xAxisPoints=o,t.chartData.calPoints=c,t.chartData.eachSpacing=h,Ae(0,t,n,r),!1!==t.enableMarkLine&&1===e&&ve(t,0,r),ke(t.series,t,n,r,t.chartData),_e(t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new Re({timing:t.timing,duration:g,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&ae(r,t),we(f,t,n,r);var a=function(e,t,n,r){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=[],c=(t.height-t.area[0]-t.area[2])/t.categories.length,u=0;ud&&_$?$:D,F=F>$?$:F,E=E>$?$:E,j=j>$?$:j,D=D<0?0:D,F=F<0?0:F,E=E<0?0:E,j=j<0?0:j,r.arc(O+j,L+j,j,-Math.PI,-Math.PI/2),r.arc(w.x-D,L+D,D,-Math.PI/2,0),r.arc(w.x-F,L+C-F,F,0,Math.PI/2),r.arc(O+E,L+C-E,E,Math.PI/2,Math.PI)}else r.moveTo(S,A),r.lineTo(w.x,A),r.lineTo(w.x,A+w.width),r.lineTo(S,A+w.width),r.lineTo(S,A),r.setLineWidth(1),r.setStrokeStyle(P);r.setFillStyle(k),r.closePath(),r.fill()}}break;case"stack":m=ne(x,v,y,o,c,t,n,u,e,a);h.push(m),m=G(m,c,e.length,0,0,t);for(var R=0;Rd&&R4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1,activeType:"none"},t.extra.area),o=t.chartData.xAxisData,c=o.xAxisPoints,u=o.eachSpacing,f=t.height-t.area[2],h=[];r.save();var p=0,g=t.width+u;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),p=-t._scrollDistance_-2*u+t.area[3],g=p+(t.xAxis.itemCount+4)*u),e.forEach((function(e,o){var s,v,y;s=[].concat(t.chartData.yAxisData.ranges[e.index]),v=s.pop(),y=s.shift();var x=e.data,m=X(x,v,y,c,u,t,n,i);h.push(m);for(var b=I(m,e),_=0;_1){var A=w[0],k=w[w.length-1];r.moveTo(A.x,A.y);var P=0;if("curve"===a.type)for(var T=0;Tp&&(r.moveTo(O.x,O.y),P=1),T>0&&O.x>p&&O.xp&&(r.moveTo(M.x,M.y),P=1),L>0&&M.x>p&&M.xp&&(r.moveTo(F.x,F.y),P=1),D>0&&F.x>p&&F.xp&&(r.moveTo(N.x,N.y),$=1),R>0&&N.x>p&&N.xp&&(r.moveTo(B.x,B.y),$=1),U>0&&B.x>p&&B.xp&&(r.moveTo(W.x,W.y),$=1),q>0&&W.x>p&&W.x4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},t.extra.rose);0==n.pieChartLinePadding&&(n.pieChartLinePadding=a.activeRadius*t.pix);var o={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},c=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);c=c<10?10:c;var u=a.minRadius||.5*c;c4&&void 0!==arguments[4]?arguments[4]:1,a=s({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:!1,axisLabelTofix:0,labelShow:!0,labelColor:"#666666",labelPointShow:!1,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:!1,borderWidth:2,linearType:"none",customColor:[]},t.extra.radar),o=k(t.categories.length),c={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},u=(t.width-t.area[1]-t.area[3])/2,f=(t.height-t.area[0]-t.area[2])/2,h=Math.min(u-(A(t.categories,n.fontSize,r)+n.radarLabelTextMargin),f-n.radarLabelTextMargin);h-=n.radarLabelTextMargin*t.pix,h=h<10?10:h,h=a.radius?a.radius:h,r.beginPath(),r.setLineWidth(1*t.pix),r.setStrokeStyle(a.gridColor),o.forEach((function(e,t){var n=p(h*Math.cos(e),h*Math.sin(e),c);r.moveTo(c.x,c.y),t%a.gridEval==0&&r.lineTo(n.x,n.y)})),r.stroke(),r.closePath();for(var d=function(e){var n={};if(r.beginPath(),r.setLineWidth(1*t.pix),r.setStrokeStyle(a.gridColor),"radar"==a.gridType)o.forEach((function(t,i){var o=p(h/a.gridCount*e*Math.cos(t),h/a.gridCount*e*Math.sin(t),c);0===i?(n=o,r.moveTo(o.x,o.y)):r.lineTo(o.x,o.y)})),r.lineTo(n.x,n.y);else{var i=p(h/a.gridCount*e*Math.cos(1.5),h/a.gridCount*e*Math.sin(1.5),c);r.arc(c.x,c.y,c.y-i.y,0,2*Math.PI,!1)}r.stroke(),r.closePath()},g=1;g<=a.gridCount;g++)d(g);a.customColor=y(a.linearType,a.customColor,e,n);var v=E(o,c,h,e,t,i);if(v.forEach((function(n,i){r.beginPath(),r.setLineWidth(a.borderWidth*t.pix),r.setStrokeStyle(n.color);var o,s=l(n.color,a.opacity);"custom"==a.linearType&&(o=r.createCircularGradient?r.createCircularGradient(c.x,c.y,h):r.createRadialGradient(c.x,c.y,0,c.x,c.y,h),o.addColorStop(0,l(a.customColor[e[i].linearIndex],a.opacity)),o.addColorStop(1,l(n.color,a.opacity)),s=o);if(r.setFillStyle(s),n.data.forEach((function(e,t){0===t?r.moveTo(e.position.x,e.position.y):r.lineTo(e.position.x,e.position.y)})),r.closePath(),r.fill(),!0===a.border&&r.stroke(),r.closePath(),!1!==t.dataPointShape){var u=n.data.map((function(e){return e.position}));oe(u,n.color,n.pointShape,r,t)}})),!0===a.axisLabel){var x=Math.max(a.max,Math.max.apply(null,b(e))),m=h/a.gridCount,_=t.fontSize*t.pix;r.setFontSize(_),r.setFillStyle(t.fontColor),r.setTextAlign("left");for(g=0;g4&&void 0!==arguments[4]?arguments[4]:1,c=s({},{startAngle:.75,endAngle:.25,type:"default",direction:"cw",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},t.extra.arcbar);e=N(e,c,o),i=c.centerX||c.centerY?{x:c.centerX?c.centerX:t.width/2,y:c.centerY?c.centerY:t.height/2}:{x:t.width/2,y:t.height/2},c.radius?a=c.radius:(a=Math.min(i.x,i.y),a-=5*t.pix,a-=c.width/2),a=a<10?10:a,c.customColor=y(c.linearType,c.customColor,e,n);for(var u=0;u5&&void 0!==arguments[5]?arguments[5]:1,o=s({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},n.extra.gauge);void 0==o.oldAngle&&(o.oldAngle=o.startAngle),void 0==o.oldData&&(o.oldData=0),e=U(e,o.startAngle,o.endAngle);var c={x:n.width/2,y:n.height/2},u=Math.min(c.x,c.y);u-=5*n.pix,u-=o.width/2,u=u<10?10:u;var f=u-o.width,h=0;if("progress"==o.type){var d=u-3*o.width;i.beginPath();var p=i.createLinearGradient(c.x,c.y-d,c.x,c.y+d);p.addColorStop("0",l(t[0].color,.3)),p.addColorStop("1.0",l("#FFFFFF",.1)),i.setFillStyle(p),i.arc(c.x,c.y,d,0,2*Math.PI,!1),i.fill(),i.setLineWidth(o.width),i.setStrokeStyle(l(t[0].color,.3)),i.setLineCap("round"),i.beginPath(),i.arc(c.x,c.y,f,o.startAngle*Math.PI,o.endAngle*Math.PI,!1),i.stroke(),h=o.endAngleb/x?i.setStrokeStyle(l(t[0].color,1)):i.setStrokeStyle(l(t[0].color,.3)),i.setLineWidth(3*n.pix),i.moveTo(v,0),i.lineTo(y,0),i.stroke(),i.rotate(g*Math.PI);i.restore(),t=z(t,o,a),i.setLineWidth(o.width),i.setStrokeStyle(t[0].color),i.setLineCap("round"),i.beginPath(),i.arc(c.x,c.y,f,o.startAngle*Math.PI,t[0]._proportion_*Math.PI,!1),i.stroke();var _=u-2.5*o.width;i.save(),i.translate(c.x,c.y),i.rotate((t[0]._proportion_-1)*Math.PI),i.beginPath(),i.setLineWidth(o.width/3);var w=i.createLinearGradient(0,.6*-_,0,.6*_);w.addColorStop("0",l("#FFFFFF",0)),w.addColorStop("0.5",l(t[0].color,1)),w.addColorStop("1.0",l("#FFFFFF",0)),i.setStrokeStyle(w),i.arc(0,0,_,.85*Math.PI,1.15*Math.PI,!1),i.stroke(),i.beginPath(),i.setLineWidth(1),i.setStrokeStyle(t[0].color),i.setFillStyle(t[0].color),i.moveTo(-_-o.width/3/2,-4),i.lineTo(-_-o.width/3/2-4,0),i.lineTo(-_-o.width/3/2,4),i.lineTo(-_-o.width/3/2,-4),i.stroke(),i.fill(),i.restore()}else{i.setLineWidth(o.width),i.setLineCap("butt");for(var S=0;S5&&void 0!==arguments[5]?arguments[5]:1,o=s({},{color:{},average:{}},n.extra.candle);o.color=s({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},o.color),o.average=s({},{show:!1,name:[],day:[],color:r.color},o.average),n.extra.candle=o;var c=n.chartData.xAxisData,l=c.xAxisPoints,u=c.eachSpacing,f=[];i.save();var h=-2,p=l.length+2,g=0,v=n.width+u;return n._scrollDistance_&&0!==n._scrollDistance_&&!0===n.enableScroll&&(i.translate(n._scrollDistance_,0),h=Math.floor(-n._scrollDistance_/u)-2,p=h+n.xAxis.itemCount+4,g=-n._scrollDistance_-2*u+n.area[3],v=g+(n.xAxis.itemCount+4)*u),(o.average.show||t)&&t.forEach((function(e,t){var o,s,c;o=[].concat(n.chartData.yAxisData.ranges[e.index]),s=o.pop(),c=o.shift();for(var f=e.data,h=X(f,s,c,l,u,n,r,a),p=I(h,e),y=0;yg&&(i.moveTo(_.x,_.y),m=1),b>0&&_.x>g&&_.xh&&x0?(i.setStrokeStyle(o.color.upLine),i.setFillStyle(o.color.upFill),i.setLineWidth(1*n.pix),i.moveTo(m[3].x,m[3].y),i.lineTo(m[1].x,m[1].y),i.lineTo(m[1].x-u/4,m[1].y),i.lineTo(m[0].x-u/4,m[0].y),i.lineTo(m[0].x,m[0].y),i.lineTo(m[2].x,m[2].y),i.lineTo(m[0].x,m[0].y),i.lineTo(m[0].x+u/4,m[0].y),i.lineTo(m[1].x+u/4,m[1].y),i.lineTo(m[1].x,m[1].y),i.moveTo(m[3].x,m[3].y)):(i.setStrokeStyle(o.color.downLine),i.setFillStyle(o.color.downFill),i.setLineWidth(1*n.pix),i.moveTo(m[3].x,m[3].y),i.lineTo(m[0].x,m[0].y),i.lineTo(m[0].x-u/4,m[0].y),i.lineTo(m[1].x-u/4,m[1].y),i.lineTo(m[1].x,m[1].y),i.lineTo(m[2].x,m[2].y),i.lineTo(m[1].x,m[1].y),i.lineTo(m[1].x+u/4,m[1].y),i.lineTo(m[0].x+u/4,m[0].y),i.lineTo(m[0].x,m[0].y),i.moveTo(m[3].x,m[3].y)),i.closePath(),i.fill(),i.stroke()}})),i.restore(),{xAxisPoints:l,calPoints:f,eachSpacing:u}}(u,x,t,n,r,e),a=i.xAxisPoints,o=i.calPoints,c=i.eachSpacing;t.chartData.xAxisPoints=a,t.chartData.calPoints=o,t.chartData.eachSpacing=c,Ae(0,t,n,r),!1!==t.enableMarkLine&&1===e&&ve(t,0,r),ke(x?0:t.series,t,n,r,t.chartData),_e(t,n,r,e),je(0,r)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break}}function ze(){this.events={}}Re.prototype.stop=function(){this.isStop=!0},ze.prototype.addEventListener=function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},ze.prototype.delEventListener=function(e){this.events[e]=[]},ze.prototype.trigger=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.opts=s({},this.opts,e),this.opts.updateData=!0;var t=e.scrollPosition||"current";switch(t){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var n=ie(this.opts.series,this.opts,this.config,this.context),r=n.yAxisWidth;this.config.yAxisWidth=r;var i=0,a=K(this.opts.categories,this.opts,this.config),o=a.xAxisPoints,c=a.startX,l=a.endX,u=a.eachSpacing,f=u*(o.length-1),h=l-c;i=h-f,this.scrollOption={currentOffset:i,startTouchX:i,distance:0,lastMoveTime:0},this.opts._scrollDistance_=i;break}Ne.call(this,this.opts.type,this.opts,this.config,this.context)},Ue.prototype.zoom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var t=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var n=ie(this.opts.series,this.opts,this.config,this.context),r=n.yAxisWidth;this.config.yAxisWidth=r;var i=0,a=K(this.opts.categories,this.opts,this.config),o=a.xAxisPoints,s=a.startX,c=a.endX,l=a.eachSpacing,u=l*t,h=c-s,d=h-l*(o.length-1);i=h/2-u,i>0&&(i=0),i=this.opts.categories.length?this.opts.categories.length:h,this.opts.animation=!1,this.opts.xAxis.itemCount=h;var d=0,p=K(this.opts.categories,this.opts,this.config),g=p.xAxisPoints,v=p.startX,y=p.endX,x=p.eachSpacing,m=x*this.scrollOption.moveCurrent1,b=y-v,_=b-x*(g.length-1);d=-m+Math.min(r[0].x,r[1].x)-this.opts.area[3]-x,d>0&&(d=0),d<_&&(d=_),this.scrollOption.currentOffset=d,this.scrollOption.startTouchX=0,this.scrollOption.distance=0,f(this,d,this.opts.chartData,this.config,this.opts),this.opts._scrollDistance_=d,Ne.call(this,this.opts.type,this.opts,this.config,this.context)}}else console.log("[uCharts] 请启用滚动条后使用")},Ue.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},Ue.prototype.addEventListener=function(e,t){this.uevent.addEventListener(e,t)},Ue.prototype.delEventListener=function(e){this.uevent.delEventListener(e)},Ue.prototype.getCurrentDataIndex=function(e){var t=null;if(t=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],t){var n=w(t,this.opts,e);return"pie"===this.opts.type||"ring"===this.opts.type?function(e,t,n){var r=-1,i=j(t.series);if(t&&t.center&&M(e,t.center,t.radius)){var a=Math.atan2(t.center.y-e.y,e.x-t.center.x);a=-a,n.extra.pie&&n.extra.pie.offsetAngle&&(a-=n.extra.pie.offsetAngle*Math.PI/180),n.extra.ring&&n.extra.ring.offsetAngle&&(a-=n.extra.ring.offsetAngle*Math.PI/180);for(var o=0,s=i.length;o2*Math.PI&&(e-=2*Math.PI),e},o=Math.atan2(t.center.y-e.y,e.x-t.center.x);o*=-1,o<0&&(o+=2*Math.PI);var s=t.angleList.map((function(e){return e=a(-1*e),e}));s.forEach((function(e,t){var n=a(e-r/2),s=a(e+r/2);s=n&&o<=s||o+2*Math.PI>=n&&o+2*Math.PI<=s)&&(i=t)}))}return i}({x:n.x,y:n.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?function(e,t){for(var n=-1,r=0,i=t.series.length;ra.funnelArea[0]&&e.xa.funnelArea[1]&&e.ya.area[0]&&e.xa.area[1]&&e.y4&&void 0!==arguments[4]?arguments[4]:0,a={index:-1,group:[]},o=n.chartData.eachSpacing/2,s=n.chartData.yAxisPoints;return t&&t.length>0&&L(e,n,r)&&s.forEach((function(t,n){e.y+i+o>t&&(a.index=n)})),a}({x:n.x,y:n.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset)):function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a={index:-1,group:[]},o=n.chartData.eachSpacing/2,s=[];if(t&&t.length>0){if(n.categories){for(var c=1;ct&&(a.index=n)}));else{for(var l=Array(t.length),u=0;ut.start.x&&e.xt.start.y&&e.yu[0]-0&&e.xu[1]-0&&e.y1&&void 0!==arguments[1]?arguments[1]:{},n=null;if(n=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],n){w(n,this.opts,e);var r=this.getLegendDataIndex(e);r>=0&&("candle"==this.opts.type?this.opts.seriesMA[r].show=!this.opts.seriesMA[r].show:this.opts.series[r].show=!this.opts.series[r].show,this.opts.animation=!!t.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,Ne.call(this,this.opts.type,this.opts,this.config,this.context))}},Ue.prototype.showToolTip=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;r=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],r||console.log("[uCharts] 未获取到event坐标信息");var i=w(r,this.opts,e),a=this.scrollOption.currentOffset,o=s({},this.opts,{_scrollDistance_:a,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type||"scatter"===this.opts.type||"bubble"===this.opts.type){var c=this.getCurrentDataIndex(e),l=void 0==n.index?c.index:n.index;if(l>-1||l.length>0){var u=S(this.opts.series,l,c.group);if(0!==u.length){var f=P(u,this.opts,l,c.group,this.opts.categories,n),h=f.textList,d=f.offset;d.y=i.y,o.tooltip={textList:void 0!==n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l,group:c.group}}}Ne.call(this,o.type,o,this.config,this.context)}if("mount"===this.opts.type){l=void 0==n.index?this.getCurrentDataIndex(e).index:n.index;if(l>-1){o=s({},this.opts,{animation:!1}),u=s({},o._series_[l]),h=[{text:n.formatter?n.formatter(u,void 0,l,o):u.name+": "+u.data,color:u.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?u.legendShape:this.opts.extra.tooltip.legendShape}],d={x:o.chartData.calPoints[l].x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}Ne.call(this,o.type,o,this.config,this.context)}if("bar"===this.opts.type){c=this.getCurrentDataIndex(e),l=void 0==n.index?c.index:n.index;if(l>-1||l.length>0){u=S(this.opts.series,l,c.group);if(0!==u.length){f=P(u,this.opts,l,c.group,this.opts.categories,n),h=f.textList,d=f.offset;d.x=i.x,o.tooltip={textList:void 0!==n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}}Ne.call(this,o.type,o,this.config,this.context)}if("mix"===this.opts.type){c=this.getCurrentDataIndex(e),l=void 0==n.index?c.index:n.index;if(l>-1){a=this.scrollOption.currentOffset,o=s({},this.opts,{_scrollDistance_:a,animation:!1}),u=S(this.opts.series,l);if(0!==u.length){var p=T(u,this.opts,l,this.opts.categories,n);h=p.textList,d=p.offset;d.y=i.y,o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}}Ne.call(this,o.type,o,this.config,this.context)}if("candle"===this.opts.type){c=this.getCurrentDataIndex(e),l=void 0==n.index?c.index:n.index;if(l>-1){a=this.scrollOption.currentOffset,o=s({},this.opts,{_scrollDistance_:a,animation:!1}),u=S(this.opts.series,l);if(0!==u.length){f=O(this.opts.series[0].data,u,this.opts,l,this.opts.categories,this.opts.extra.candle,n),h=f.textList,d=f.offset;d.y=i.y,o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}}Ne.call(this,o.type,o,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){l=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(l>-1){o=s({},this.opts,{animation:!1}),u=s({},o._series_[l]),h=[{text:n.formatter?n.formatter(u,void 0,l,o):u.name+": "+u.data,color:u.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?u.legendShape:this.opts.extra.tooltip.legendShape}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}Ne.call(this,o.type,o,this.config,this.context)}if("map"===this.opts.type){l=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(l>-1){o=s({},this.opts,{animation:!1}),u=s({},this.opts.series[l]);u.name=u.properties.name;h=[{text:n.formatter?n.formatter(u,void 0,l,this.opts):u.name,color:u.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?u.legendShape:this.opts.extra.tooltip.legendShape}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}o.updateData=!1,Ne.call(this,o.type,o,this.config,this.context)}if("word"===this.opts.type){l=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(l>-1){o=s({},this.opts,{animation:!1}),u=s({},this.opts.series[l]),h=[{text:n.formatter?n.formatter(u,void 0,l,this.opts):u.name,color:u.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?u.legendShape:this.opts.extra.tooltip.legendShape}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}o.updateData=!1,Ne.call(this,o.type,o,this.config,this.context)}if("radar"===this.opts.type){l=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(l>-1){o=s({},this.opts,{animation:!1}),u=S(this.opts.series,l);if(0!==u.length){h=u.map((function(e){return{text:n.formatter?n.formatter(e,t.opts.categories[l],l,t.opts):e.name+": "+e.data,color:e.color,legendShape:"auto"==t.opts.extra.tooltip.legendShape?e.legendShape:t.opts.extra.tooltip.legendShape}})),d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:l}}}Ne.call(this,o.type,o,this.config,this.context)}},Ue.prototype.translate=function(e){this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0};var t=s({},this.opts,{_scrollDistance_:e,animation:!1});Ne.call(this,this.opts.type,t,this.config,this.context)},Ue.prototype.scrollStart=function(e){var t=null;t=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0];var n=w(t,this.opts,e);t&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=n.x)},Ue.prototype.scroll=function(e){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var t=this.opts.touchMoveLimit||60,n=Date.now(),r=n-this.scrollOption.lastMoveTime;if(!(r0&&void 0!==arguments[0]?arguments[0]:[];return e.sort((function(){return Math.random()-.5}))};t.default=r},"21c6":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=this.$parent;while(n)if(n.$options.name!==e)n=n.$parent;else{var r=function(){var e={};if(Array.isArray(t))t.map((function(t){e[t]=n[t]?n[t]:""}));else for(var r in t)Array.isArray(t[r])?t[r].length?e[r]=t[r]:e[r]=n[r]:t[r].constructor===Object?Object.keys(t[r]).length?e[r]=t[r]:e[r]=n[r]:e[r]=t[r]||!1===t[r]?t[r]:n[r];return{v:e}}();if("object"===(0,i.default)(r))return r.v}return{}};var i=r(n("7037"))},2236:function(e,t,n){var r=n("5a43");e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},2523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this.$parent;while(t){if(!t.$options||t.$options.name===e)return t;t=t.$parent}return!1}},2723:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"success",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];-1==["primary","info","error","warning","success"].indexOf(e)&&(e="success");var n="";switch(e){case"primary":n="info-circle";break;case"info":n="info-circle";break;case"error":n="close-circle";break;case"warning":n="error-circle";break;case"success":n="checkmark-circle";break;default:n="checkmark-circle"}return t&&(n+="-fill"),n};t.default=r},"278c":function(e,t,n){var r=n("c135"),i=n("9b42"),a=n("6613"),o=n("c240");e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports["default"]=e.exports},"2eee":function(e,t,n){var r=n("7ec2")();e.exports=r},"33cf":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];if(n=n||r.length,e)for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"!==typeof e){var i=[t,e];e=i[0],t=i[1]}"string"!==typeof e&&(e=w());"string"!==typeof n&&(n="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||"en");var a=new b({locale:e,fallbackLocale:n,messages:t,watcher:r}),o=function(e,t){if("function"!==typeof getApp)o=function(e,t){return a.t(e,t)};else{var n=!1;o=function(e,t){var r=getApp().$vm;return r&&(r.$locale,n||(n=!0,_(r,a))),a.t(e,t)}}return o(e,t)};return{i18n:a,f:function(e,t,n){return a.f(e,t,n)},t:function(e,t){return o(e,t)},add:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return a.add(e,t,n)},watch:function(e){return a.watchLocale(e)},getLocale:function(){return a.getLocale()},setLocale:function(e){return a.setLocale(e)}}},t.isI18nStr=k,t.isString=void 0,t.normalizeLocale=m,t.parseI18nJson=function e(t,n,r){S||(S=new f);return O(t,(function(t,i){var a=t[i];A(a)?k(a,r)&&(t[i]=P(a,n,r)):e(a,n,r)})),t},t.resolveLocale=function(e){return function(t){return t?(t=m(t)||t,function(e){var t=[],n=e.split("-");while(n.length)t.push(n.join("-")),n.pop();return t}(t).find((function(t){return e.indexOf(t)>-1}))):t}};var a=i(n("278c")),o=i(n("970b")),s=i(n("5bc3")),c=i(n("7037")),l=function(e){return null!==e&&"object"===(0,c.default)(e)},u=["{","}"],f=function(){function e(){(0,o.default)(this,e),this._caches=Object.create(null)}return(0,s.default)(e,[{key:"interpolate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;if(!t)return[e];var r=this._caches[e];return r||(r=p(e,n),this._caches[e]=r),g(r,t)}}]),e}();t.Formatter=f;var h=/^(?:\d)+/,d=/^(?:\w)+/;function p(e,t){var n=(0,a.default)(t,2),r=n[0],i=n[1],o=[],s=0,c="";while(s-1?"zh-Hans":e.indexOf("-hant")>-1||function(e,t){return!!t.find((function(t){return-1!==e.indexOf(t)}))}(e,["-tw","-hk","-mo","-cht"])?"zh-Hant":"zh-Hans";var n=["en","fr","es"];t&&Object.keys(t).length>0&&(n=Object.keys(t));var r=function(e,t){return t.find((function(t){return 0===e.indexOf(t)}))}(e,n);return r||void 0}}var b=function(){function e(t){var n=t.locale,r=t.fallbackLocale,i=t.messages,a=t.watcher,s=t.formater;(0,o.default)(this,e),this.locale="en",this.fallbackLocale="en",this.message={},this.messages={},this.watchers=[],r&&(this.fallbackLocale=r),this.formater=s||x,this.messages=i||{},this.setLocale(n||"en"),a&&this.watchLocale(a)}return(0,s.default)(e,[{key:"setLocale",value:function(e){var t=this,n=this.locale;this.locale=m(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],n!==this.locale&&this.watchers.forEach((function(e){e(t.locale,n)}))}},{key:"getLocale",value:function(){return this.locale}},{key:"watchLocale",value:function(e){var t=this,n=this.watchers.push(e)-1;return function(){t.watchers.splice(n,1)}}},{key:"add",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.messages[e];r?n?Object.assign(r,t):Object.keys(t).forEach((function(e){y(r,e)||(r[e]=t[e])})):this.messages[e]=t}},{key:"f",value:function(e,t,n){return this.formater.interpolate(e,t,n).join("")}},{key:"t",value:function(e,t,n){var r=this.message;return"string"===typeof t?(t=m(t,this.messages),t&&(r=this.messages[t])):n=t,y(r,e)?this.formater.interpolate(r[e],n).join(""):(console.warn("Cannot translate the value of keypath ".concat(e,". Use the value of keypath as default.")),e)}}]),e}();function _(e,t){e.$watchLocale?e.$watchLocale((function(e){t.setLocale(e)})):e.$watch((function(){return e.$locale}),(function(e){t.setLocale(e)}))}function w(){return"undefined"!==typeof e&&e.getLocale?e.getLocale():"undefined"!==typeof r&&r.getLocale?r.getLocale():"en"}t.I18n=b;var S,A=function(e){return"string"===typeof e};function k(e,t){return e.indexOf(t[0])>-1}function P(e,t,n){return S.interpolate(e,t,n).join("")}function T(e,t,n){return O(e,(function(e,r){(function(e,t,n,r){var i=e[t];if(A(i)){if(k(i,r)&&(e[t]=P(i,n[0].values,r),n.length>1)){var a=e[t+"Locales"]={};n.forEach((function(e){a[e.locale]=P(i,e.values,r)}))}}else T(i,n,r)})(e,r,t,n)})),e}function O(e,t){if(Array.isArray(e)){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;if(e=e.toLowerCase(),e&&n.test(e)){if(4===e.length){for(var r="#",i=1;i<4;i+=1)r+=e.slice(i,i+1).concat(e.slice(i,i+1));e=r}for(var a=[],o=1;o<7;o+=2)a.push(parseInt("0x"+e.slice(o,o+2)));return t?"rgb(".concat(a[0],",").concat(a[1],",").concat(a[2],")"):a}if(/^(rgb|RGB)/.test(e)){var s=e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");return s.map((function(e){return Number(e)}))}return e}function i(e){var t=e;if(/^(rgb|RGB)/.test(t)){for(var n=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),r="#",i=0;i0&&void 0!==arguments[0]?arguments[0]:"rgb(0, 0, 0)",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgb(255, 255, 255)",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=r(e,!1),o=a[0],s=a[1],c=a[2],l=r(t,!1),u=l[0],f=l[1],h=l[2],d=(u-o)/n,p=(f-s)/n,g=(h-c)/n,v=[],y=0;y1&&void 0!==arguments[1]?arguments[1]:.3;e=i(e);var n=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,r=e.toLowerCase();if(r&&n.test(r)){if(4===r.length){for(var a="#",o=1;o<4;o+=1)a+=r.slice(o,o+1).concat(r.slice(o,o+1));r=a}for(var s=[],c=1;c<7;c+=2)s.push(parseInt("0x"+r.slice(c,c+2)));return"rgba("+s.join(",")+","+t+")"}return r}};t.default=a},"4ea4":function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"4fff":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("7037")),a=r(n("9e4d"));var o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=(0,a.default)(t),"object"!==(0,i.default)(t)||"object"!==(0,i.default)(n))return!1;for(var r in n)n.hasOwnProperty(r)&&(r in t?"object"!==(0,i.default)(t[r])||"object"!==(0,i.default)(n[r])?t[r]=n[r]:t[r].concat&&n[r].concat?t[r]=t[r].concat(n[r]):t[r]=e(t[r],n[r]):t[r]=n[r]);return t};t.default=o},"52a7":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rpx";return e=String(e),i.default.number(e)?"".concat(e).concat(t):e};var i=r(n("65e7"))},"543d":function(e,t,n){"use strict";(function(e,r){var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.createApp=Mt,t.createComponent=Ut,t.createPage=zt,t.createPlugin=qt,t.createSubpackageApp=Bt,t.default=void 0;var a,o=i(n("278c")),s=i(n("9523")),c=i(n("b17c")),l=i(n("448a")),u=i(n("7037")),f=n("37dc"),h=i(n("66fd"));function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var x=Object.prototype.toString,m=Object.prototype.hasOwnProperty;function b(e){return"function"===typeof e}function _(e){return"string"===typeof e}function w(e){return"[object Object]"===x.call(e)}function S(e,t){return m.call(e,t)}function A(){}function k(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var P=/-(\w)/g,T=k((function(e){return e.replace(P,(function(e,t){return t?t.toUpperCase():""}))}));function O(e){var t={};return w(e)&&Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),Object.keys(t)?t:e}var C=["invoke","success","fail","complete","returnValue"],L={},M={};function I(e,t){Object.keys(t).forEach((function(n){-1!==C.indexOf(n)&&b(t[n])&&(e[n]=function(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var r=t[n];t[n]=function(i){j(e[n],i,t).then((function(e){return b(r)&&r(e)||e}))}}})),t}function R(e,t){var n=[];Array.isArray(L.returnValue)&&n.push.apply(n,(0,l.default)(L.returnValue));var r=M[e];return r&&Array.isArray(r.returnValue)&&n.push.apply(n,(0,l.default)(r.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function N(e){var t=Object.create(null);Object.keys(L).forEach((function(e){"returnValue"!==e&&(t[e]=L[e].slice())}));var n=M[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function z(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,i=new Array(r>1?r-1:0),a=1;a-1?"zh-Hans":e.indexOf("-hant")>-1||function(e,t){return!!t.find((function(t){return-1!==e.indexOf(t)}))}(e,["-tw","-hk","-mo","-cht"])?"zh-Hant":"zh-Hans";var n=function(e,t){return t.find((function(t){return 0===e.indexOf(t)}))}(e,["en","fr","es"]);return n||void 0}}function oe(){if(b(getApp)){var t=getApp({allowDefault:!0});if(t&&t.$vm)return t.$vm.$locale}return ae(e.getSystemInfoSync().language)||"en"}var se=[];"undefined"!==typeof r&&(r.getLocale=oe);var ce={promiseInterceptor:U},le=Object.freeze({__proto__:null,upx2px:function(t,n){if(0===Q&&function(){var t=e.getSystemInfoSync(),n=t.platform,r=t.pixelRatio,i=t.windowWidth;Q=i,ee=r,Z="ios"===n}(),t=Number(t),0===t)return 0;var r=t/750*(n||Q);return r<0&&(r=-r),r=Math.floor(r+1e-4),0===r&&(r=1!==ee&&Z?.5:1),t<0?-r:r},getLocale:oe,setLocale:function(e){var t=!!b(getApp)&&getApp();if(!t)return!1;var n=t.$vm.$locale;return n!==e&&(t.$vm.$locale=e,se.forEach((function(t){return t({locale:e})})),!0)},onLocaleChange:function(e){-1===se.indexOf(e)&&se.push(e)},addInterceptor:function(e,t){"string"===typeof e&&w(t)?I(M[e]||(M[e]={}),t):w(e)&&I(L,e)},removeInterceptor:function(e,t){"string"===typeof e?w(t)?D(M[e],t):delete M[e]:w(e)&&D(L,e)},interceptors:ce});var ue,fe={name:function(e){return"back"===e.exists&&e.delta?"navigateBack":"redirectTo"},args:function(e){if("back"===e.exists&&e.url){var t=function(e){var t=getCurrentPages(),n=t.length;while(n--){var r=t[n];if(r.$page&&r.$page.fullPath===e)return n}return-1}(e.url);if(-1!==t){var n=getCurrentPages().length-1-t;n>0&&(e.delta=n)}}}},he={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var r=n.length;if(r)return t<0?t=0:t>=r&&(t=r-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,r){return!(r2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(w(t)){var a=!0===i?t:{};for(var o in b(n)&&(n=n(t,a)||{}),t)if(S(n,o)){var s=n[o];b(s)&&(s=s(t[o],t,a)),s?_(s)?a[s]=t[o]:w(s)&&(a[s.name?s.name:o]=s.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(o,"'"))}else-1!==ke.indexOf(o)?b(t[o])&&(a[o]=Pe(e,t[o],r)):i||(a[o]=t[o]);return a}return b(t)&&(t=Pe(e,t,r)),t}function Oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return b(Ae.returnValue)&&(t=Ae.returnValue(e,t)),Te(e,t,n,{},r)}function Ce(t,n){if(S(Ae,t)){var r=Ae[t];return r?function(n,i){var a=r;b(r)&&(a=r(n)),n=Te(t,n,a.args,a.returnValue);var o=[n];"undefined"!==typeof i&&o.push(i),b(a.name)?t=a.name(n):_(a.name)&&(t=a.name);var s=e[t].apply(e,o);return K(t)?Oe(t,s,a.returnValue,G(t)):s}:function(){console.error("Platform '微信小程序' does not support '".concat(t,"'."))}}return n}var Le=Object.create(null);["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"].forEach((function(e){Le[e]=function(e){return function(t){var n=t.fail,r=t.complete,i={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};b(n)&&n(i),b(r)&&r(i)}}(e)}));var Me={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};var Ie=Object.freeze({__proto__:null,getProvider:function(e){var t=e.service,n=e.success,r=e.fail,i=e.complete,a=!1;Me[t]?(a={errMsg:"getProvider:ok",service:t,provider:Me[t]},b(n)&&n(a)):(a={errMsg:"getProvider:fail service not found"},b(r)&&r(a)),b(i)&&i(a)}}),De=function(){var e;return function(){return e||(e=new h.default),e}}();function Fe(e,t,n){return e[t].apply(e,n)}var Ee,je,$e,Re=Object.freeze({__proto__:null,$on:function(){return Fe(De(),"$on",Array.prototype.slice.call(arguments))},$off:function(){return Fe(De(),"$off",Array.prototype.slice.call(arguments))},$once:function(){return Fe(De(),"$once",Array.prototype.slice.call(arguments))},$emit:function(){return Fe(De(),"$emit",Array.prototype.slice.call(arguments))}});function Ne(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}function ze(e){try{return JSON.parse(e)}catch(t){}return e}var Ue=[];function Be(e,t){Ue.forEach((function(n){n(e,t)})),Ue.length=0}var qe=[],We=e.getAppBaseInfo&&e.getAppBaseInfo();We||(We=e.getSystemInfoSync());var He=We?We.host:null,Ve=He&&"SAAASDK"===He.env?e.miniapp.shareVideoMessage:e.shareVideoMessage,Ge=Object.freeze({__proto__:null,shareVideoMessage:Ve,getPushClientId:function(e){w(e)||(e={});var t=function(e){var t={};for(var n in e){var r=e[n];b(r)&&(t[n]=Ne(r),delete e[n])}return t}(e),n=t.success,r=t.fail,i=t.complete,a=b(n),o=b(r),s=b(i);Promise.resolve().then((function(){"undefined"===typeof $e&&($e=!1,Ee="",je="uniPush is not enabled"),Ue.push((function(e,t){var c;e?(c={errMsg:"getPushClientId:ok",cid:e},a&&n(c)):(c={errMsg:"getPushClientId:fail"+(t?" "+t:"")},o&&r(c)),s&&i(c)})),"undefined"!==typeof Ee&&Be(Ee,je)}))},onPushMessage:function(e){-1===qe.indexOf(e)&&qe.push(e)},offPushMessage:function(e){if(e){var t=qe.indexOf(e);t>-1&&qe.splice(t,1)}else qe.length=0},invokePushCallback:function(e){if("enabled"===e.type)$e=!0;else if("clientId"===e.type)Ee=e.cid,je=e.errMsg,Be(Ee,e.errMsg);else if("pushMsg"===e.type)for(var t={type:"receive",data:ze(e.message)},n=0;n=0;a--){var o=i[a];if(o.$scope._$vueId===n)return o}for(var s=i.length-1;s>=0;s--)if(r=e(i[s],n),r)return r}(this.$vm,r)),t||(t=this.$vm),i.parent=t}function et(e){return Object.defineProperty(e,"__v_isMPComponent",{configurable:!0,enumerable:!1,value:!0}),e}function tt(e){return function(e){return null!==e&&"object"===(0,u.default)(e)}(e)&&Object.isExtensible(e)&&Object.defineProperty(e,"__ob__",{configurable:!0,enumerable:!1,value:(0,s.default)({},"__v_skip",!0)}),e}var nt=/_(.*)_worklet_factory_/;var rt=Page,it=Component,at=/:/g,ot=k((function(e){return T(e.replace(at,"-"))}));function st(e){var t=e.triggerEvent,n=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return ct("onLoad",e),rt(e)},Page.after=rt.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct("created",e),it(e)});function lt(e,t,n){t.forEach((function(t){(function e(t,n){if(!n)return!0;if(h.default.options&&Array.isArray(h.default.options[t]))return!0;if(n=n.default||n,b(n))return!!b(n.extendOptions[t])||!!(n.super&&n.super.options&&Array.isArray(n.super.options[t]));if(b(n[t])||Array.isArray(n[t]))return!0;var r=n.mixins;return Array.isArray(r)?!!r.find((function(n){return e(t,n)})):void 0})(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function ut(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];ft(t).forEach((function(t){return ht(e,t,n)}))}function ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&Object.keys(e).forEach((function(n){0===n.indexOf("on")&&b(e[n])&&t.push(n)})),t}function ht(e,t,n){-1!==n.indexOf(t)||S(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}function dt(e,t){var n;return t=t.default||t,n=b(t)?t:e.extend(t),t=n.options,[n,t]}function pt(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function gt(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function vt(e,t){var n=e.data||{},r=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(i){Object({NODE_ENV:"production",VUE_APP_DARK_MODE:"false",VUE_APP_NAME:"greenhouse-wisdom-applet",VUE_APP_PLATFORM:"mp-weixin",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(i){}return w(n)||(n={}),Object.keys(r).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||S(n,e)||(n[e]=r[e])})),n}var yt=[String,Number,Boolean,Object,Array,null];function xt(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function mt(e,t){var n=e.behaviors,r=e.extends,i=e.mixins,a=e.props;a||(e.props=a=[]);var o=[];return Array.isArray(n)&&n.forEach((function(e){o.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(a)?(a.push("name"),a.push("value")):(a.name={type:String,default:""},a.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),w(r)&&r.props&&o.push(t({properties:_t(r.props,!0)})),Array.isArray(i)&&i.forEach((function(e){w(e)&&e.props&&o.push(t({properties:_t(e.props,!0)}))})),o}function bt(e,t,n,r){return Array.isArray(t)&&1===t.length?t[0]:t}function _t(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>3?arguments[3]:void 0,r={};return t||(r.vueId={type:String,value:""},n.virtualHost&&(r.virtualHostStyle={type:null,value:""},r.virtualHostClass={type:null,value:""}),r.scopedSlotsCompiler={type:String,value:""},r.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){r[e]={type:null,observer:xt(e)}})):w(e)&&Object.keys(e).forEach((function(t){var n=e[t];if(w(n)){var i=n.default;b(i)&&(i=i()),n.type=bt(0,n.type),r[t]={type:-1!==yt.indexOf(n.type)?n.type:null,value:i,observer:xt(t)}}else{var a=bt(0,n);r[t]={type:-1!==yt.indexOf(a)?a:null,observer:xt(t)}}})),r}function wt(e,t,n,r){var i={};return Array.isArray(t)&&t.length&&t.forEach((function(t,a){"string"===typeof t?t?"$event"===t?i["$"+a]=n:"arguments"===t?i["$"+a]=n.detail&&n.detail.__args__||r:0===t.indexOf("$event.")?i["$"+a]=e.__get_value(t.replace("$event.",""),n):i["$"+a]=e.__get_value(t):i["$"+a]=e:i["$"+a]=function(e,t){var n=e;return t.forEach((function(t){var r=t[0],i=t[2];if(r||"undefined"!==typeof i){var a,o=t[1],s=t[3];Number.isInteger(r)?a=r:r?"string"===typeof r&&r&&(a=0===r.indexOf("#s#")?r.substr(3):e.__get_value(r,n)):a=n,Number.isInteger(a)?n=i:o?Array.isArray(a)?n=a.find((function(t){return e.__get_value(o,t)===i})):w(a)?n=Object.keys(a).find((function(t){return e.__get_value(o,a[t])===i})):console.error("v-for 暂不支持循环数据:",a):n=a[i],s&&(n=e.__get_value(s,n))}})),n}(e,t)})),i}function St(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o=!1,s=w(t.detail)&&t.detail.__args__||[t.detail];if(i&&(o=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return o?[t]:s;var c=wt(e,r,t,s),l=[];return n.forEach((function(e){"$event"===e?"__set_model"!==a||i?i&&!o?l.push(s[0]):l.push(t):l.push(t.target.value):Array.isArray(e)&&"o"===e[0]?l.push(St(e)):"string"===typeof e&&S(c,e)?l.push(c[e]):l.push(e)})),l}function kt(e){var t=this;e=function(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=A,e.preventDefault=A,e.target=e.target||{},S(e,"detail")||(e.detail={}),S(e,"markerId")&&(e.detail="object"===(0,u.default)(e.detail)?e.detail:{},e.detail.markerId=e.markerId),w(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var r=n.eventOpts||n["event-opts"];if(!r)return console.warn("事件信息不存在");var i=e.type,a=[];return r.forEach((function(n){var r=n[0],o=n[1],s="^"===r.charAt(0);r=s?r.slice(1):r;var c="~"===r.charAt(0);r=c?r.slice(1):r,o&&function(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}(i,r)&&o.forEach((function(n){var r=n[0];if(r){var i=t.$vm;if(i.$options.generic&&(i=function(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}(i)||i),"$emit"===r)return void i.$emit.apply(i,At(t.$vm,e,n[1],n[2],s,r));var o=i[r];if(!b(o)){var l="page"===t.$vm.mpType?"Page":"Component",u=t.route||t.is;throw new Error("".concat(l,' "').concat(u,'" does not have a method "').concat(r,'"'))}if(c){if(o.once)return;o.once=!0}var f=At(t.$vm,e,n[1],n[2],s,r);f=Array.isArray(f)?f:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(o.toString())&&(f=f.concat([,,,,,,,,,,e])),a.push(o.apply(i,f))}}))})),"input"===i&&1===a.length&&"undefined"!==typeof a[0]?a[0]:void 0}var Pt={};var Tt=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function Ot(){h.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=h.default.prototype.__call_hook;h.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=function(e){var t=Pt[e];return delete Pt[e],t}(n.__id__),delete n.__id__),e.call(this,t,n)}}function Ct(t,n){var r=n.mocks,i=n.initRefs;Ot(),function(){var e={},t={};function n(e){var t=this.$options.propsData.vueId;if(t){var n=t.split(",")[0];e(n)}}h.default.prototype.$hasSSP=function(n){var r=e[n];return r||(t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))),r},h.default.prototype.$getSSP=function(t,n,r){var i=e[t];if(i){var a=i[n]||[];return r?a:a[0]}},h.default.prototype.$setSSP=function(t,r){var i=0;return n.call(this,(function(n){var a=e[n],o=a[t]=a[t]||[];o.push(r),i=o.length-1})),i},h.default.prototype.$initSSP=function(){n.call(this,(function(t){e[t]={}}))},h.default.prototype.$callSSP=function(){n.call(this,(function(e){t[e]&&t[e].$forceUpdate()}))},h.default.mixin({destroyed:function(){var n=this.$options.propsData,r=n&&n.vueId;r&&(delete e[r],delete t[r])}})}(),t.$options.store&&(h.default.prototype.$store=t.$options.store),function(e){e.prototype.uniIDHasRole=function(e){var t=y(),n=t.role;return n.indexOf(e)>-1},e.prototype.uniIDHasPermission=function(e){var t=y(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=y(),t=e.tokenExpired;return t>Date.now()}}(h.default),h.default.prototype.mpHost="mp-weixin",h.default.mixin({beforeCreate:function(){if(this.$options.mpType){if(this.mpType=this.$options.mpType,this.$mp=(0,s.default)({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"page"===this.mpType&&"function"===typeof getApp){var e=getApp();e.$vm&&e.$vm.$i18n&&(this._i18n=e.$vm.$i18n)}"app"!==this.mpType&&(i(this),function(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){S(n,t)&&(e[t]=n[t])}))}(this,r))}}});var a={onLaunch:function(n){this.$vm||(e.canIUse&&!e.canIUse("nextTick")&&console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=t,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",n),this.$vm.__call_hook("onLaunch",n))}};a.globalData=t.$options.globalData||{};var o=t.$options.methods;return o&&Object.keys(o).forEach((function(e){a[e]=o[e]})),function(e,t,n){var r=e.observable({locale:n||re.getLocale()}),i=[];t.$watchLocale=function(e){i.push(e)},Object.defineProperty(t,"$locale",{get:function(){return r.locale},set:function(e){r.locale=e,i.forEach((function(t){return t(e)}))}})}(h.default,t,ae(e.getSystemInfoSync().language)||"en"),lt(a,Tt),ut(a,t.$options),a}function Lt(e){return Ct(e,{mocks:Ke,initRefs:Ze})}function Mt(e){return App(Lt(e)),e}var It=/[!'()*]/g,Dt=function(e){return"%"+e.charCodeAt(0).toString(16)},Ft=/%2C/g,Et=function(e){return encodeURIComponent(e).replace(It,Dt).replace(Ft,",")};function jt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Et,n=e?Object.keys(e).map((function(n){var r=e[n];if(void 0===r)return"";if(null===r)return t(n);if(Array.isArray(r)){var i=[];return r.forEach((function(e){void 0!==e&&(null===e?i.push(t(n)):i.push(t(n)+"="+t(e)))})),i.join("&")}return t(n)+"="+t(r)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function $t(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,r=t.initRelation,i=arguments.length>2?arguments[2]:void 0,a=dt(h.default,e),s=(0,o.default)(a,2),c=s[0],l=s[1],u=p({multipleSlots:!0,addGlobalClass:!0},l.options||{});l["mp-weixin"]&&l["mp-weixin"].options&&Object.assign(u,l["mp-weixin"].options);var f={options:u,data:vt(l,h.default.prototype),behaviors:mt(l,Je),properties:_t(l.props,!1,l.__file,u),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};gt(e.vueId,this),r.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new c(t),pt(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:Qe,__e:kt}};return l.externalClasses&&(f.externalClasses=l.externalClasses),Array.isArray(l.wxsCallMethods)&&l.wxsCallMethods.forEach((function(e){f.methods[e]=function(t){return this.$vm[e](t)}})),i?[f,l,c]:n?f:[f,c]}(e,{isPage:Xe,initRelation:Ye},t)}var Rt=["onShow","onHide","onUnload"];function Nt(e){var t=$t(e,!0),n=(0,o.default)(t,2),r=n[0],i=n[1];return lt(r.methods,Rt,i),r.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+jt(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},ut(r.methods,e,["onReady"]),function(e,t){t&&Object.keys(t).forEach((function(n){var r=n.match(nt);if(r){var i=r[1];e[n]=t[n],e[i]=t[i]}}))}(r.methods,i.methods),r}function zt(e){return Component(function(e){return Nt(e)}(e))}function Ut(e){return Component($t(e))}function Bt(t){var n=Lt(t),r=getApp({allowDefault:!0});t.$scope=r;var i=r.globalData;if(i&&Object.keys(n.globalData).forEach((function(e){S(i,e)||(i[e]=n.globalData[e])})),Object.keys(n).forEach((function(e){S(r,e)||(r[e]=n[e])})),b(n.onShow)&&e.onAppShow&&e.onAppShow((function(){for(var e=arguments.length,n=new Array(e),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},empty:a,isEmpty:a,jsonString:function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=(0,i.default)(t)||!t)}catch(n){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},object:function(e){return"[object Object]"===Object.prototype.toString.call(e)},array:function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},code:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6;return new RegExp("^\\d{".concat(t,"}$")).test(e)}};t.default=o},6613:function(e,t,n){var r=n("5a43");e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"66fd":function(e,t,n){"use strict";n.r(t),function(e){ /*! * Vue.js v2.6.11 * (c) 2014-2023 Evan You * Released under the MIT License. */ var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function a(e){return!0===e}function o(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function s(e){return null!==e&&"object"===typeof e}var c=Object.prototype.toString;function l(e){return"[object Object]"===c.call(e)}function u(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function x(e,t){return y.call(e,t)}function m(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var b=/-(\w)/g,_=m((function(e){return e.replace(b,(function(e,t){return t?t.toUpperCase():""}))})),w=m((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),S=/\B([A-Z])/g,A=m((function(e){return e.replace(S,"-$1").toLowerCase()}));var k=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function P(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function T(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0),X=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===V),Y=(G&&/chrome\/\d+/.test(G),G&&/phantomjs/.test(G),G&&G.match(/firefox\/(\d+)/),{}.watch);if(W)try{var Z={};Object.defineProperty(Z,"passive",{get:function(){}}),window.addEventListener("test-passive",null,Z)}catch($n){}var Q=function(){return void 0===B&&(B=!W&&!H&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),B},ee=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function te(e){return"function"===typeof e&&/native code/.test(e.toString())}var ne,re="undefined"!==typeof Symbol&&te(Symbol)&&"undefined"!==typeof Reflect&&te(Reflect.ownKeys);ne="undefined"!==typeof Set&&te(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ie=C,ae=0,oe=function(){this.id=ae++,this.subs=[]};function se(e){oe.SharedObject.targetStack.push(e),oe.SharedObject.target=e,oe.target=e}function ce(){oe.SharedObject.targetStack.pop(),oe.SharedObject.target=oe.SharedObject.targetStack[oe.SharedObject.targetStack.length-1],oe.target=oe.SharedObject.target}oe.prototype.addSub=function(e){this.subs.push(e)},oe.prototype.removeSub=function(e){v(this.subs,e)},oe.prototype.depend=function(){oe.SharedObject.target&&oe.SharedObject.target.addDep(this)},oe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(a&&!x(i,"default"))o=!1;else if(""===o||o===A(e)){var c=je(String,i.type);(c<0||s0&&(c=e(c,(n||"")+"_"+s),rt(c[0])&&rt(u)&&(f[l]=he(u.text+c[0].text),c.shift()),f.push.apply(f,c)):o(c)?rt(u)?f[l]=he(u.text+c):""!==c&&f.push(he(c)):rt(c)&&rt(u)?f[l]=he(u.text+c.text):(a(t._isVList)&&i(c.tag)&&r(c.key)&&i(n)&&(c.key="__vlist"+n+"_"+s+"__"),f.push(c)));return f}(e):void 0}function rt(e){return i(e)&&i(e.text)&&function(e){return!1===e}(e.isComment)}function it(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function at(e){var t=ot(e.$options.inject,e);t&&(ye(!1),Object.keys(t).forEach((function(n){_e(e,n,t[n])})),ye(!0))}function ot(e,t){if(e){for(var n=Object.create(null),r=re?Reflect.ownKeys(e):Object.keys(e),i=0;i0,o=e?!!e.$stable:!a,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(o&&r&&r!==n&&s===r.$key&&!a&&!r.$hasNormal)return r;for(var c in i={},e)e[c]&&"$"!==c[0]&&(i[c]=ut(t,c,e[c]))}else i={};for(var l in t)l in i||(i[l]=ft(t,l));return e&&Object.isExtensible(e)&&(e._normalized=i),z(i,"$stable",o),z(i,"$key",s),z(i,"$hasNormal",a),i}function ut(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:nt(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function ft(e,t){return function(){return e[t]}}function ht(e,t){var n,r,a,o,c;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,a=e.length;rdocument.createEvent("Event").timeStamp&&(Qt=function(){return en.now()})}function tn(){var e,t;for(Qt(),Yt=!0,Gt.sort((function(e,t){return e.id-t.id})),Zt=0;ZtZt&&Gt[n].id>e.id)n--;Gt.splice(n+1,0,e)}else Gt.push(e);Xt||(Xt=!0,Je(tn))}}(this)},rn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch($n){$e($n,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},rn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},rn.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},rn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var an={enumerable:!0,configurable:!0,get:C,set:C};function on(e,t,n){an.get=function(){return this[t][n]},an.set=function(e){this[t][n]=e},Object.defineProperty(e,n,an)}function sn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],a=!e.$parent;a||ye(!1);var o=function(a){i.push(a);var o=De(a,t,n,e);_e(r,a,o),a in e||on(e,"_props",a)};for(var s in t)o(s);ye(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?C:k(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;t=e._data="function"===typeof t?function(e,t){se();try{return e.call(t,t)}catch($n){return $e($n,t,"data()"),{}}finally{ce()}}(t,e):t||{},l(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var a=n[i];0,r&&x(r,a)||N(a)||on(e,"_data",a)}be(t,!0)}(e):be(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Q();for(var i in t){var a=t[i],o="function"===typeof a?a:a.get;0,r||(n[i]=new rn(e,o||C,C,cn)),i in e||ln(e,i,a)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!function(e){return"[object RegExp]"===c.call(e)}(e)&&e.test(t)}function mn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var a in n){var o=n[a];if(o){var s=yn(o.componentOptions);s&&!t(s)&&bn(n,a,r,i)}}}function bn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,v(n,t)}(function(e){e.prototype._init=function(e){var t=this;t._uid=dn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Me(pn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){while(n.$options.abstract&&n.$parent)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Bt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,r=e.$vnode=t._parentVnode,i=r&&r.context;e.$slots=st(t._renderChildren,i),e.$scopedSlots=n,e._c=function(t,n,r,i){return Ft(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Ft(e,t,n,r,i,!0)};var a=r&&r.data;_e(e,"$attrs",a&&a.attrs||n,null,!0),_e(e,"$listeners",t._parentListeners||n,null,!0)}(t),Vt(t,"beforeCreate"),!t._$fallback&&at(t),sn(t),!t._$fallback&&it(t),!t._$fallback&&Vt(t,"created"),t.$options.el&&t.$mount(t.$options.el)}})(gn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=we,e.prototype.$delete=Se,e.prototype.$watch=function(e,t,n){if(l(t))return hn(this,e,t,n);n=n||{},n.user=!0;var r=new rn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(i){$e(i,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(gn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,a=e.length;i1?P(n):n;for(var r=P(arguments,1),i='event handler for "'+e+'"',a=0,o=n.length;aparseInt(this.max)&&bn(s,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Sn={KeepAlive:wn};(function(e){var t={get:function(){return $}};Object.defineProperty(e,"config",t),e.util={warn:ie,extend:T,mergeOptions:Me,defineReactive:_e},e.set=we,e.delete=Se,e.nextTick=Je,e.observable=function(e){return be(e),e},e.options=Object.create(null),E.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,T(e.options.components,Sn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=P(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Me(this.options,e),this}}(e),vn(e),function(e){E.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)})(gn),Object.defineProperty(gn.prototype,"$isServer",{get:Q}),Object.defineProperty(gn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(gn,"FunctionalRenderContext",{value:Tt}),gn.version="2.6.11";var An="[object Array]",kn="[object Object]";function Pn(e,t){var n={};return function e(t,n){if(t===n)return;var r=On(t),i=On(n);if(r==kn&&i==kn){if(Object.keys(t).length>=Object.keys(n).length)for(var a in n){var o=t[a];void 0===o?t[a]=null:e(o,n[a])}}else r==An&&i==An&&t.length>=n.length&&n.forEach((function(n,r){e(t[r],n)}))}(e,t),function e(t,n,r,i){if(t===n)return;var a=On(t),o=On(n);if(a==kn)if(o!=kn||Object.keys(t).length1&&(t[r[0].trim()]=r[1].trim())}})),t}));var En=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];var jn=["onLaunch","onShow","onHide","onUniNViewMessage","onPageNotFound","onThemeChange","onError","onUnhandledRejection","onInit","onLoad","onReady","onUnload","onPullDownRefresh","onReachBottom","onTabItemTap","onAddToFavorites","onShareTimeline","onShareAppMessage","onResize","onPageScroll","onNavigationBarButtonTap","onBackPress","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputClicked","onUploadDouyinVideo","onNFCReadMessage","onPageShow","onPageHide","onPageResize"];gn.prototype.__patch__=function(e,t){var n=this;if(null!==t&&("page"===this.mpType||"component"===this.mpType)){var r=this.$scope,i=Object.create(null);try{i=function(e){var t=Object.create(null),n=[].concat(Object.keys(e._data||{}),Object.keys(e._computedWatchers||{}));n.reduce((function(t,n){return t[n]=e[n],t}),t);var r=e.__composition_api_state__||e.__secret_vfa_state__,i=r&&r.rawBindings;return i&&Object.keys(i).forEach((function(n){t[n]=e[n]})),Object.assign(t,e.$mp.data||{}),Array.isArray(e.$options.behaviors)&&-1!==e.$options.behaviors.indexOf("uni://form-field")&&(t["name"]=e.name,t["value"]=e.value),JSON.parse(JSON.stringify(t,Mn))}(this)}catch(s){console.error(s)}i.__webviewId__=r.data.__webviewId__;var a=Object.create(null);Object.keys(i).forEach((function(e){a[e]=r.data[e]}));var o=!1===this.$shouldDiffData?i:Pn(i,a);Object.keys(o).length?(Object({NODE_ENV:"production",VUE_APP_DARK_MODE:"false",VUE_APP_NAME:"greenhouse-wisdom-applet",VUE_APP_PLATFORM:"mp-weixin",BASE_URL:"/"}).VUE_APP_DEBUG&&console.log("["+ +new Date+"]["+(r.is||r.route)+"]["+this._uid+"]差量更新",JSON.stringify(o)),this.__next_tick_pending=!0,r.setData(o,(function(){n.__next_tick_pending=!1,Cn(n)}))):Cn(this)}},gn.prototype.$mount=function(e,t){return function(e,t,n){return e.mpType?("app"===e.mpType&&(e.$options.render=In),e.$options.render||(e.$options.render=In),!e._$fallback&&Vt(e,"beforeMount"),new rn(e,(function(){e._update(e._render(),n)}),C,{before:function(){e._isMounted&&!e._isDestroyed&&Vt(e,"beforeUpdate")}},!0),n=!1,e):e}(this,0,t)},function(e){var t=e.extend;e.extend=function(e){e=e||{};var n=e.methods;return n&&Object.keys(n).forEach((function(t){-1!==jn.indexOf(t)&&(e[t]=n[t],delete n[t])})),t.call(this,e)};var n=e.config.optionMergeStrategies,r=n.created;jn.forEach((function(e){n[e]=r})),e.prototype.__lifecycle_hooks__=jn}(gn),function(e){e.config.errorHandler=function(t,n,r){e.util.warn("Error in "+r+': "'+t.toString()+'"',n),console.error(t);var i="function"===typeof getApp&&getApp();i&&i.onError&&i.onError(t)};var t=e.prototype.$emit;e.prototype.$emit=function(e){if(this.$scope&&e){var n=this.$scope["_triggerEvent"]||this.$scope["triggerEvent"];if(n)try{n.call(this.$scope,e,{__args__:P(arguments,1)})}catch(r){}}return t.apply(this,arguments)},e.prototype.$nextTick=function(e){return Ln(this,e)},En.forEach((function(t){e.prototype[t]=function(e){return this.$scope&&this.$scope[t]?this.$scope[t](e):"undefined"!==typeof my?"createSelectorQuery"===t?my.createSelectorQuery(e):"createIntersectionObserver"===t?my.createIntersectionObserver(e):void 0:void 0}})),e.prototype.__init_provide=it,e.prototype.__init_injections=at,e.prototype.__call_hook=function(e,t){var n=this;se();var r,i=n.$options[e],a=e+" hook";if(i)for(var o=0,s=i.length;o0&&void 0!==arguments[0]?arguments[0]:{},t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"brackets",r=t?"?":"",i=[];-1==["indices","brackets","repeat","comma"].indexOf(n)&&(n="brackets");var a=function(t){var r=e[t];if(["",void 0,null].indexOf(r)>=0)return"continue";if(r.constructor===Array)switch(n){case"indices":for(var a=0;a=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},9523:function(e,t,n){var r=n("a395");e.exports=function(e,t,n){return t=r(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports["default"]=e.exports},"970b":function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports["default"]=e.exports},"97ff":function(e,t,n){"use strict";function r(e,t,n){this.$children.map((function(i){e===i.$options.name?i.$emit.apply(i,[t].concat(n)):r.apply(i,[e,t].concat(n))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={methods:{dispatch:function(e,t,n){var r=this.$parent||this.$root,i=r.$options.name;while(r&&(!i||i!==e))r=r.$parent,r&&(i=r.$options.name);r&&r.$emit.apply(r,[t].concat(n))},broadcast:function(e,t,n){r.call(this,e,t,n)}}};t.default=i},"9b42":function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(u){l=!0,i=u}finally{try{if(!c&&null!=n["return"]&&(o=n["return"](),Object(o)!==o))return}finally{if(l)throw i}}return s}},e.exports.__esModule=!0,e.exports["default"]=e.exports},"9e4d":function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("7037"));var a=function e(t){if([null,void 0,NaN,!1].includes(t))return t;if("object"!==(0,i.default)(t)&&"function"!==typeof t)return t;var n=function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?[]:{};for(var r in t)t.hasOwnProperty(r)&&(n[r]="object"===(0,i.default)(t[r])?e(t[r]):t[r]);return n};t.default=a},a128:function(e,t,n){var r=n("36c6"),i=n("4a4b"),a=n("c5f7"),o=n("b17c");function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports["default"]=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports["default"]=e.exports},a395:function(e,t,n){var r=n("7037")["default"],i=n("e50d");e.exports=function(e){var t=i(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports["default"]=e.exports},a746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";return"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e};t.default=r},a9ff:function(e,t,n){"use strict";(function(e,r,i){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n("2eee")),s=a(n("3c96")),c=a(n("278c")),l=a(n("7037")),u=a(n("448a")),f=a(n("c973")),h=a(n("9523")),d=a(n("ed6d")),p=a(n("6b58")),g=a(n("36c6")),v=a(n("a128")),y=a(n("970b")),x=a(n("5bc3")),m=n("37dc"),b=a(n("733d"));function _(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(a=0;a>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*c,i);if(c){for(var u=0;u>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],x=e[t+7],m=e[t+8],b=e[t+9],_=e[t+10],w=e[t+11],S=e[t+12],A=e[t+13],k=e[t+14],P=e[t+15],T=a[0],O=a[1],C=a[2],L=a[3];T=l(T,O,C,L,o,7,s[0]),L=l(L,T,O,C,c,12,s[1]),C=l(C,L,T,O,d,17,s[2]),O=l(O,C,L,T,p,22,s[3]),T=l(T,O,C,L,g,7,s[4]),L=l(L,T,O,C,v,12,s[5]),C=l(C,L,T,O,y,17,s[6]),O=l(O,C,L,T,x,22,s[7]),T=l(T,O,C,L,m,7,s[8]),L=l(L,T,O,C,b,12,s[9]),C=l(C,L,T,O,_,17,s[10]),O=l(O,C,L,T,w,22,s[11]),T=l(T,O,C,L,S,7,s[12]),L=l(L,T,O,C,A,12,s[13]),C=l(C,L,T,O,k,17,s[14]),T=u(T,O=l(O,C,L,T,P,22,s[15]),C,L,c,5,s[16]),L=u(L,T,O,C,y,9,s[17]),C=u(C,L,T,O,w,14,s[18]),O=u(O,C,L,T,o,20,s[19]),T=u(T,O,C,L,v,5,s[20]),L=u(L,T,O,C,_,9,s[21]),C=u(C,L,T,O,P,14,s[22]),O=u(O,C,L,T,g,20,s[23]),T=u(T,O,C,L,b,5,s[24]),L=u(L,T,O,C,k,9,s[25]),C=u(C,L,T,O,p,14,s[26]),O=u(O,C,L,T,m,20,s[27]),T=u(T,O,C,L,A,5,s[28]),L=u(L,T,O,C,d,9,s[29]),C=u(C,L,T,O,x,14,s[30]),T=f(T,O=u(O,C,L,T,S,20,s[31]),C,L,v,4,s[32]),L=f(L,T,O,C,m,11,s[33]),C=f(C,L,T,O,w,16,s[34]),O=f(O,C,L,T,k,23,s[35]),T=f(T,O,C,L,c,4,s[36]),L=f(L,T,O,C,g,11,s[37]),C=f(C,L,T,O,x,16,s[38]),O=f(O,C,L,T,_,23,s[39]),T=f(T,O,C,L,A,4,s[40]),L=f(L,T,O,C,o,11,s[41]),C=f(C,L,T,O,p,16,s[42]),O=f(O,C,L,T,y,23,s[43]),T=f(T,O,C,L,b,4,s[44]),L=f(L,T,O,C,S,11,s[45]),C=f(C,L,T,O,P,16,s[46]),T=h(T,O=f(O,C,L,T,d,23,s[47]),C,L,o,6,s[48]),L=h(L,T,O,C,x,10,s[49]),C=h(C,L,T,O,k,15,s[50]),O=h(O,C,L,T,v,21,s[51]),T=h(T,O,C,L,S,6,s[52]),L=h(L,T,O,C,p,10,s[53]),C=h(C,L,T,O,_,15,s[54]),O=h(O,C,L,T,c,21,s[55]),T=h(T,O,C,L,m,6,s[56]),L=h(L,T,O,C,P,10,s[57]),C=h(C,L,T,O,y,15,s[58]),O=h(O,C,L,T,A,21,s[59]),T=h(T,O,C,L,g,6,s[60]),L=h(L,T,O,C,w,10,s[61]),C=h(C,L,T,O,d,15,s[62]),O=h(O,C,L,T,b,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+O|0,a[2]=a[2]+C|0,a[3]=a[3]+L|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var a=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<>>32-a)+t}function h(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(c),t.HmacMD5=a._createHmacHelper(c)}(Math),n.MD5)})),P((function(e,t){var n;e.exports=(n=O,void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,l=0;l>>6-o%4*2;i[a>>>2]|=(s|c)<<24-a%4*8,a++}return t.create(i,a)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},n=t.createPromise,r=t.retryRule,i=void 0===r?U:r;(0,y.default)(this,e),this.createPromise=n,this.status=null,this.promise=null,this.retryRule=i}return(0,x.default)(e,[{key:"needRetry",get:function(){if(!this.status)return!0;switch(this.retryRule){case U:return this.status===j;case B:return this.status!==F}}},{key:"exec",value:function(){var e=this;return this.needRetry?(this.status=F,this.promise=this.createPromise().then((function(t){return e.status=E,Promise.resolve(t)}),(function(t){return e.status=j,Promise.reject(t)})),this.promise):this.promise}}]),e}();function W(e){return e&&"string"==typeof e?JSON.parse(e):e}var H="mp-weixin",V=W([]),G=H,K=(W(void 0),W([])||[]);try{(n("0d14").default||n("0d14")).appid}catch(ir){}var J={};function X(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=J,n=e,Object.prototype.hasOwnProperty.call(t,n)||(J[e]=r),J[e]}"app"===G&&(J=r._globalUniCloudObj?r._globalUniCloudObj:r._globalUniCloudObj={});var Y=["invoke","success","fail","complete"],Z=X("_globalUniCloudInterceptor");function Q(e,t){Z[e]||(Z[e]={}),R(t)&&Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=Z[e][t];r||(r=Z[e][t]=[]),-1===r.indexOf(n)&&N(n)&&r.push(n)}(e,n,t[n])}))}function ee(e,t){Z[e]||(Z[e]={}),R(t)?Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=Z[e][t];if(r){var i=r.indexOf(n);i>-1&&r.splice(i,1)}}(e,n,t[n])})):delete Z[e]}function te(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function ne(e,t){return Z[e]&&Z[e][t]||[]}function re(e){Q("callObject",e)}var ie=X("_globalUniCloudListener"),ae="response",oe="needLogin",se="refreshToken",ce="clientdb",le="cloudfunction",ue="cloudobject";function fe(e){return ie[e]||(ie[e]=[]),ie[e]}function he(e,t){var n=fe(e);n.includes(t)||n.push(t)}function de(e,t){var n=fe(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}function pe(e,t){for(var n=fe(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:0;if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}]),n}((0,v.default)(Error)),we={request:function(e){return r.request(e)},uploadFile:function(e){return r.uploadFile(e)},setStorageSync:function(e,t){return r.setStorageSync(e,t)},getStorageSync:function(e){return r.getStorageSync(e)},removeStorageSync:function(e){return r.removeStorageSync(e)},clearStorageSync:function(){return r.clearStorageSync()}};function Se(){return{token:we.getStorageSync("uni_id_token")||we.getStorageSync("uniIdToken"),tokenExpired:we.getStorageSync("uni_id_token_expired")}}function Ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&we.setStorageSync("uni_id_token",t),n&&we.setStorageSync("uni_id_token_expired",n)}function ke(){return me||(me=r.getSystemInfoSync()),me}function Pe(){var e=r.getLocale&&r.getLocale()||"en";if(be)return A(A({},be),{},{locale:e,LOCALE:e});for(var t=ke(),n=t.deviceId,i=t.osName,a=t.uniPlatform,o=t.appId,s=["pixelRatio","brand","model","system","language","version","platform","host","SDKVersion","swanNativeVersion","app","AppPlatform","fontSizeSetting"],c=0;c-1)return;var n=r.getLaunchOptionsSync(),i=n.scene,a=n.channel;e=a,t=i}}catch(e){}return{channel:e,scene:t}}()),t),A(A({},be),{},{locale:e,LOCALE:e})}var Te,Oe={sign:function(e,t){var n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),C(n,t).toString()},wrappedRequest:function(e,t){return new Promise((function(n,r){t(Object.assign(e,{complete:function(e){e||(e={});var t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return r(new _e({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var i=e.data;if(i.error)return r(new _e({code:i.error.code,message:i.error.message,requestId:t}));i.result=i.data,i.requestId=t,delete i.data,n(i)}}))}))},toBase64:function(e){return M.stringify(L.parse(e))}},Ce={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},Le=(0,m.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:Ce,fr:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},es:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ja:Ce},"zh-Hans"),Me=Le.t,Ie=function(){function e(t){var n=this;(0,y.default)(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(Me("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:0===t.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=we,this._getAccessTokenPromiseHub=new q({createPromise:function(){return n.requestAuth(n.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(e){if(!e.result||!e.result.accessToken)throw new _e({code:"AUTH_FAILED",message:"获取accessToken失败"});n.setAccessToken(e.result.accessToken)}))},retryRule:B})}return(0,x.default)(e,[{key:"hasAccessToken",get:function(){return!!this.accessToken}},{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return Oe.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=Oe.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=Oe.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){return this._getAccessTokenPromiseHub.exec()}},{key:"authorize",value:function(){var e=(0,f.default)(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getAccessToken();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):c(new _e({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new _e({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r,i,a,s,c,l,u,f,h,d,p,g,v,y,x,m,b,_,w,S,A;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.filePath,r=t.cloudPath,i=t.fileType,a=void 0===i?"image":i,s=t.cloudPathAsRealPath,c=void 0!==s&&s,l=t.onUploadProgress,u=t.config,"string"===$(r)){e.next=3;break}throw new _e({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});case 3:if(r=r.trim()){e.next=5;break}throw new _e({code:"INVALID_PARAM",message:"cloudPath不可为空"});case 5:if(!/:\/\//.test(r)){e.next=7;break}throw new _e({code:"INVALID_PARAM",message:"cloudPath不合法"});case 7:if(f=u&&u.envType||this.config.envType,!(c&&("/"!==r[0]&&(r="/"+r),r.indexOf("\\")>-1))){e.next=10;break}throw new _e({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});case 10:return e.next=12,this.getOSSUploadOptionsFromPath({env:f,filename:c?r.split("/").pop():r,fileId:c?r:void 0});case 12:return h=e.sent.result,d="https://"+h.cdnDomain+"/"+h.ossPath,p=h.securityToken,g=h.accessKeyId,v=h.signature,y=h.host,x=h.ossPath,m=h.id,b=h.policy,_=h.ossCallbackUrl,w={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:g,Signature:v,host:y,id:m,key:x,policy:b,success_action_status:200},p&&(w["x-oss-security-token"]=p),_&&(S=JSON.stringify({callbackUrl:_,callbackBody:JSON.stringify({fileId:m,spaceId:this.config.spaceId}),callbackBodyType:"application/json"}),w.callback=Oe.toBase64(S)),A={url:"https://"+h.host,formData:w,fileName:"file",name:"file",filePath:n,fileType:a},e.next=27,this.uploadFileToOSS(Object.assign({},A,{onUploadProgress:l}));case 27:if(!_){e.next=29;break}return e.abrupt("return",{success:!0,filePath:n,fileID:d});case 29:return e.next=31,this.reportOSSUpload({id:m});case 31:if(!e.sent.success){e.next=33;break}return e.abrupt("return",{success:!0,filePath:n,fileID:d});case 33:throw new _e({code:"UPLOAD_FAILED",message:"文件上传失败"});case 34:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new _e({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"getFileInfo",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i=arguments;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:{},n=t.fileList,Array.isArray(n)&&0!==n.length){e.next=3;break}throw new _e({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});case 3:return r={method:"serverless.file.resource.info",params:JSON.stringify({id:n.map((function(e){return e.split("?")[0]})).join(",")})},e.next=6,this.request(this.setupRequest(r));case 6:return e.t0=e.sent.result,e.abrupt("return",{fileList:e.t0});case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),De={init:function(e){var t=new Ie(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},Fe="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(Te||(Te={}));var Ee,je=function(){},$e=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new _e({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};function Re(e){return void 0===e}function Ne(e){return"[object Null]"===Object.prototype.toString.call(e)}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(Ee||(Ee={}));var ze={adapter:null,runtime:void 0},Ue=["anonymousUuidKey"],Be=function(e){(0,d.default)(n,e);var t=k(n);function n(){var e;return(0,y.default)(this,n),e=t.call(this),ze.adapter.root.tcbObject||(ze.adapter.root.tcbObject={}),e}return(0,x.default)(n,[{key:"setItem",value:function(e,t){ze.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return ze.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete ze.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete ze.adapter.root.tcbObject}}]),n}(je);function qe(e,t){switch(e){case"local":return t.localStorage||new Be;case"none":return new Be;default:return t.sessionStorage||new Be}}var We=function(){function e(t){if((0,y.default)(this,e),!this._storage){this._persistence=ze.adapter.primaryStorage||t.persistence,this._storage=qe(this._persistence,ze.adapter);var n="access_token_".concat(t.env),r="access_token_expire_".concat(t.env),i="refresh_token_".concat(t.env),a="anonymous_uuid_".concat(t.env),o="login_type_".concat(t.env),s="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:r,refreshTokenKey:i,anonymousUuidKey:a,loginTypeKey:o,userInfoKey:s}}}return(0,x.default)(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=qe(e,ze.adapter);for(var r in this.keys){var i=this.keys[r];if(!t||!Ue.includes(r)){var a=this._storage.getItem(i);Re(a)||Ne(a)||(n.setItem(i,a),this._storage.removeItem(i))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var r={version:n||"localCachev1",content:t},i=JSON.stringify(r);try{this._storage.setItem(e,i)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),He={},Ve={};function Ge(e){return He[e]}var Ke=(0,x.default)((function e(t,n){(0,y.default)(this,e),this.data=n||null,this.name=t})),Je=function(e){(0,d.default)(n,e);var t=k(n);function n(e,r){var i;return(0,y.default)(this,n),i=t.call(this,"error",{error:e,data:r}),i.error=e,i}return(0,x.default)(n)}(Ke),Xe=new(function(){function e(){(0,y.default)(this,e),this._listeners={}}return(0,x.default)(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof Je)return console.error(e.error),this;var n="string"==typeof e?new Ke(e,t||{}):e,r=n.name;if(this._listens(r)){n.target=this;var i,a=this._listeners[r]?(0,u.default)(this._listeners[r]):[],o=_(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.call(this,n)}}catch(c){o.e(c)}finally{o.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function Ye(e,t){Xe.on(e,t)}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.fire(e,t)}function Qe(e,t){Xe.off(e,t)}var et,tt="loginStateChanged",nt="loginStateExpire",rt="loginTypeChanged",it="anonymousConverted",at="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(et||(et={}));var ot=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],st={"X-SDK-Version":"1.3.5"};function ct(e,t,n){var r=e[t];e[t]=function(t){var i={},a={};n.forEach((function(n){var r=n.call(e,t),o=r.data,s=r.headers;Object.assign(i,o),Object.assign(a,s)}));var o=t.data;return o&&function(){var e;if(e=o,"[object FormData]"!==Object.prototype.toString.call(e))t.data=A(A({},o),i);else for(var n in i)o.append(n,i[n])}(),t.headers=A(A({},t.headers||{}),a),r.call(e,t)}}function lt(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:A(A({},st),{},{"x-seqid":e})}}var ut=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,y.default)(this,e),this.config=n,this._reqClass=new ze.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=Ge(this.config.env),this._localCache=(t=this.config.env,Ve[t]),ct(this._reqClass,"post",[lt]),ct(this._reqClass,"upload",[lt]),ct(this._reqClass,"download",[lt])}return(0,x.default)(e,[{key:"post",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"upload",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"download",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refreshAccessToken",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(){return e.apply(this,arguments)}}()},{key:"_refreshAccessToken",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i,a,s,c,l,u,f,h,d,p;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,a=t.loginTypeKey,s=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(r),c=this._cache.getStore(i),c){e.next=5;break}throw new _e({message:"未登录CloudBase"});case 5:return l={refresh_token:c},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",l);case 8:if(u=e.sent,!u.data.code){e.next=21;break}if(f=u.data.code,"SIGN_PARAM_INVALID"!==f&&"REFRESH_TOKEN_EXPIRED"!==f&&"INVALID_REFRESH_TOKEN"!==f){e.next=20;break}if(this._cache.getStore(a)!==et.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==f){e.next=19;break}return h=this._cache.getStore(s),d=this._cache.getStore(i),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:h,refresh_token:d});case 17:return p=e.sent,e.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:Ze(nt),this._cache.removeStore(i);case 20:throw new _e({code:u.data.code,message:"刷新access token失败:".concat(u.data.code)});case 21:if(!u.data.access_token){e.next=23;break}return e.abrupt("return",(Ze(at),this._cache.setStore(n,u.data.access_token),this._cache.setStore(r,u.data.access_token_expire+Date.now()),{accessToken:u.data.access_token,accessTokenExpire:u.data.access_token_expire}));case 23:u.data.refresh_token&&(this._cache.removeStore(i),this._cache.setStore(i,u.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAccessToken",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i,a,s,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,this._cache.getStore(i)){e.next=3;break}throw new _e({message:"refresh token不存在,登录状态异常"});case 3:if(a=this._cache.getStore(n),s=this._cache.getStore(r),c=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(a,s);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}c=!1;case 12:return e.abrupt("return",(!a||!s||s2&&void 0!==arguments[2]?arguments[2]:{},r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+="".concat(a,"=").concat(encodeURIComponent(n[a]));return/^http(s)?\:\/\//.test(t+=i)?t:"".concat(e).concat(t)}(Fe,"//tcb-api.tencentcloudapi.com/web",y),v&&(x+=v),e.next=22,this.post(A({url:x,data:l},h));case 22:if(m=e.sent,b=m.header&&m.header["x-tcb-trace"],b&&this._localCache.setStore(i,b),(200===Number(m.status)||200===Number(m.statusCode))&&m.data){e.next=26;break}throw new _e({code:"NETWORK_ERROR",message:"network request error"});case 26:return e.abrupt("return",m);case 27:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r,i,a=arguments;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(r=e.sent,"ACCESS_TOKEN_EXPIRED"!==r.data.code||-1!==ot.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(i=e.sent,!i.data.code){e.next=12;break}throw new _e({code:i.data.code,message:i.data.message});case 12:return e.abrupt("return",i.data);case 13:if(!r.data.code){e.next=15;break}throw new _e({code:r.data.code,message:r.data.message});case 15:return e.abrupt("return",r.data);case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}}]),e}(),ft={};function ht(e){return ft[e]}var dt=function(){function e(t){(0,y.default)(this,e),this.config=t,this._cache=Ge(t.env),this._request=ht(t.env)}return(0,x.default)(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,r=n.accessTokenKey,i=n.accessTokenExpireKey;this._cache.setStore(r,e),this._cache.setStore(i,t)}},{key:"refreshUserInfo",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),pt=function(){function e(t){if((0,y.default)(this,e),!t)throw new _e({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=t,this._cache=Ge(this._envId),this._request=ht(this._envId),this.setUserInfo()}return(0,x.default)(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new _e({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new _e({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,r=!1,i=n.users,e.abrupt("return",(i.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(r=!0)})),{users:i,hasPrimaryUid:r}));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r,i,a,s,c,l,u;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,r=t.gender,i=t.avatarUrl,a=t.province,s=t.country,c=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:r,avatarUrl:i,province:a,country:s,city:c});case 8:l=e.sent,u=l.data,this.setLocalUserInfo(u);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refresh",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),gt=function(){function e(t){if((0,y.default)(this,e),!t)throw new _e({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=Ge(t);var n=this._cache.keys,r=n.refreshTokenKey,i=n.accessTokenKey,a=n.accessTokenExpireKey,o=this._cache.getStore(r),s=this._cache.getStore(i),c=this._cache.getStore(a);this.credential={refreshToken:o,accessToken:s,accessTokenExpire:c},this.user=new pt(t)}return(0,x.default)(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===et.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===et.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===et.WECHAT||this.loginType===et.WECHAT_OPEN||this.loginType===et.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),vt=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"signIn",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i,a,s,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,r=t.refreshTokenKey,i=this._cache.getStore(n)||void 0,a=this._cache.getStore(r)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:i,refresh_token:a});case 8:if(s=e.sent,!s.uuid||!s.refresh_token){e.next=20;break}return this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.ANONYMOUS,persistence:"local"}),c=new gt(this.config.env),e.next=19,c.user.refresh();case 19:return e.abrupt("return",c);case 20:throw new _e({message:"匿名登录失败"});case 21:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r,i,a,s,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,r=n.anonymousUuidKey,i=n.refreshTokenKey,a=this._cache.getStore(r),s=this._cache.getStore(i),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:a,refresh_token:s,ticket:t});case 7:if(c=e.sent,!c.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(c.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Ze(it,{env:this.config.env}),Ze(rt,{loginType:et.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:c.refresh_token}});case 16:throw new _e({message:"匿名转化失败"});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,r=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(r,et.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(dt),yt=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"signIn",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new _e({code:"PARAM_ERROR",message:"ticket must be a string"});case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(r=e.sent,!r.refresh_token){e.next=15;break}return this.setRefreshToken(r.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new gt(this.config.env));case 15:throw new _e({message:"自定义登录失败"});case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(dt),xt=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"signIn",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){var r,i,a,s,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new _e({code:"PARAM_ERROR",message:"email must be a string"});case 2:return r=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(r)||""});case 5:if(i=e.sent,a=i.refresh_token,s=i.access_token,c=i.access_token_expire,!a){e.next=22;break}if(this.setRefreshToken(a),!s||!c){e.next=15;break}this.setAccessToken(s,c),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new gt(this.config.env));case 22:throw i.code?new _e({code:i.code,message:"邮箱登录失败: ".concat(i.message)}):new _e({message:"邮箱登录失败"});case 23:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"activate",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"resetPasswordWithToken",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),n}(dt),mt=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"signIn",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){var r,i,a,s,c;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new _e({code:"PARAM_ERROR",message:"username must be a string"});case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),r=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:et.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(r)||""});case 6:if(i=e.sent,a=i.refresh_token,s=i.access_token_expire,c=i.access_token,!a){e.next=23;break}if(this.setRefreshToken(a),!c||!s){e.next=16;break}this.setAccessToken(c,s),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new gt(this.config.env));case 23:throw i.code?new _e({code:i.code,message:"用户名密码登录失败: ".concat(i.message)}):new _e({message:"用户名密码登录失败"});case 24:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),n}(dt),bt=function(){function e(t){(0,y.default)(this,e),this.config=t,this._cache=Ge(t.env),this._request=ht(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Ye(rt,this._onLoginTypeChanged)}return(0,x.default)(e,[{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}},{key:"anonymousAuthProvider",value:function(){return new vt(this.config)}},{key:"customAuthProvider",value:function(){return new yt(this.config)}},{key:"emailAuthProvider",value:function(){return new xt(this.config)}},{key:"usernameAuthProvider",value:function(){return new mt(this.config)}},{key:"signInAnonymously",value:function(){var e=(0,f.default)(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new vt(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signInWithEmailAndPassword",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new xt(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new mt(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new vt(this.config)),Ye(it,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signOut",value:function(){var e=(0,f.default)(o.default.mark((function e(){var t,n,r,i,a,s;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==et.ANONYMOUS){e.next=2;break}throw new _e({message:"匿名用户不支持登出操作"});case 2:if(t=this._cache.keys,n=t.refreshTokenKey,r=t.accessTokenKey,i=t.accessTokenExpireKey,a=this._cache.getStore(n),a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:a});case 7:return s=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(r),this._cache.removeStore(i),Ze(tt),Ze(rt,{env:this.config.env,loginType:et.NULL,persistence:this.config.persistence}),s));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"signUpWithEmailAndPassword",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"sendPasswordResetEmail",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onLoginStateChanged",value:function(e){var t=this;Ye(tt,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){Ye(nt,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){Ye(at,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){Ye(it,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;Ye(rt,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=(0,f.default)(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new gt(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=(0,f.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new _e({code:"PARAM_ERROR",message:"username must be a string"});case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,r=n.data,e.abrupt("return",r&&r.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new yt(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:A(A({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,r=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+r}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,r=t.persistence,i=t.env;i===this.config.env&&(this._cache.updatePersistence(r),this._cache.setStore(this._cache.keys.loginTypeKey,n))}}]),e}(),_t=function(e,t){t=t||$e();var n=ht(this.config.env),r=e.cloudPath,i=e.filePath,a=e.onUploadProgress,o=e.fileType,s=void 0===o?"image":o;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){var o=e.data,c=o.url,l=o.authorization,u=o.token,f=o.fileId,h=o.cosFileId,d=e.requestId,p={key:r,signature:l,"x-cos-meta-fileid":h,success_action_status:"201","x-cos-security-token":u};n.upload({url:c,data:p,file:i,name:r,fileType:s,onUploadProgress:a}).then((function(e){201===e.statusCode?t(null,{fileID:f,requestId:d}):t(new _e({code:"STORAGE_REQUEST_FAIL",message:"STORAGE_REQUEST_FAIL: ".concat(e.data)}))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},wt=function(e,t){t=t||$e();var n=ht(this.config.env),r=e.cloudPath;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},St=function(e,t){var n=e.fileList;if(t=t||$e(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var r,i=_(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!a||"string"!=typeof a)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(s){i.e(s)}finally{i.f()}var o={fileid_list:n};return ht(this.config.env).send("storage.batchDeleteFile",o).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},At=function(e,t){var n=e.fileList;t=t||$e(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var r,i=[],a=_(n);try{for(a.s();!(r=a.n()).done;){var o=r.value;"object"==(0,l.default)(o)?(o.hasOwnProperty("fileID")&&o.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),i.push({fileid:o.fileID,max_age:o.maxAge})):"string"==typeof o?i.push({fileid:o}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(c){a.e(c)}finally{a.f()}var s={file_list:i};return ht(this.config.env).send("storage.batchGetDownloadUrl",s).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},kt=function(){var e=(0,f.default)(o.default.mark((function e(t,n){var r,i,a,s;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.fileID,e.next=3,At.call(this,{fileList:[{fileID:r,maxAge:600}]});case 3:if(i=e.sent.fileList[0],"SUCCESS"===i.code){e.next=6;break}return e.abrupt("return",n?n(i):new Promise((function(e){e(i)})));case 6:if(a=ht(this.config.env),s=i.download_url,s=encodeURI(s),n){e.next=10;break}return e.abrupt("return",a.download({url:s}));case 10:return e.t0=n,e.next=13,a.download({url:s});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),Pt=function(e,t){var n,r=e.name,i=e.data,a=e.query,o=e.parse,s=e.search,c=t||$e();try{n=i?JSON.stringify(i):""}catch(r){return Promise.reject(r)}if(!r)return Promise.reject(new _e({code:"PARAM_ERROR",message:"函数名不能为空"}));var l={inQuery:a,parse:o,search:s,function_name:r,request_data:n};return ht(this.config.env).send("functions.invokeFunction",l).then((function(e){if(e.code)c(null,e);else{var t=e.data.response_data;if(o)c(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),c(null,{result:t,requestId:e.requestId})}catch(e){c(new _e({message:"response data must be json"}))}}return c.promise})).catch((function(e){c(e)})),c.promise},Tt={timeout:15e3,persistence:"session"},Ot={},Ct=function(){function e(t){(0,y.default)(this,e),this.config=t||this.config,this.authObj=void 0}return(0,x.default)(e,[{key:"init",value:function(t){switch(ze.adapter||(this.requestClient=new ze.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=A(A({},Tt),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,r=t||ze.adapter.primaryStorage||Tt.persistence;return r!==this.config.persistence&&(this.config.persistence=r),function(e){var t=e.env;He[t]=new We(e),Ve[t]=new We(A(A({},e),{},{persistence:"local"}))}(this.config),n=this.config,ft[n.env]=new ut(n),this.authObj=new bt(this.config),this.authObj}},{key:"on",value:function(e,t){return Ye.apply(this,[e,t])}},{key:"off",value:function(e,t){return Qe.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return Pt.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return St.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return At.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return kt.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return _t.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return wt.apply(this,[e,t])}},{key:"registerExtension",value:function(e){Ot[e.name]=e}},{key:"invokeExtension",value:function(){var e=(0,f.default)(o.default.mark((function e(t,n){var r;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=Ot[t],r){e.next=3;break}throw new _e({message:"扩展".concat(t," 必须先注册")});case 3:return e.next=5,r.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"useAdapters",value:function(e){var t=function(e){var t,n,r=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),i=_(r);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.isMatch,s=a.genAdapter,c=a.runtime;if(o())return{adapter:s(),runtime:c}}}catch(l){i.e(l)}finally{i.f()}}(e)||{},n=t.adapter,r=t.runtime;n&&(ze.adapter=n),r&&(ze.runtime=r)}}]),e}(),Lt=new Ct;function Mt(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+=a+"="+encodeURIComponent(n[a]);return/^http(s)?:\/\//.test(t+=i)?t:""+e+t}var It=function(){function e(){(0,y.default)(this,e)}return(0,x.default)(e,[{key:"post",value:function(e){var t=e.url,n=e.data,r=e.headers;return new Promise((function(e,i){we.request({url:Mt("https:",t),data:n,method:"POST",header:r,success:function(t){e(t)},fail:function(e){i(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var r=e.url,i=e.file,a=e.data,o=e.headers,s=e.fileType,c=we.uploadFile({url:Mt("https:",r),name:"file",formData:Object.assign({},a),filePath:i,fileType:s,header:o,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&a.success_action_status&&(n.statusCode=parseInt(a.success_action_status,10)),t(n)},fail:function(e){n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),Dt={setItem:function(e,t){we.setStorageSync(e,t)},getItem:function(e){return we.getStorageSync(e)},removeItem:function(e){we.removeStorageSync(e)},clear:function(){we.clearStorageSync()}},Ft={genAdapter:function(){return{root:{},reqClass:It,localStorage:Dt,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Lt.useAdapters(Ft);var Et=Lt,jt=Et.init;Et.init=function(e){e.env=e.spaceId;var t=jt.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){var n;t[e]=(n=t[e],function(e){e=e||{};var t=xe(e),r=t.success,i=t.fail,a=t.complete;if(!(r||i||a))return n.call(this,e);n.call(this,e).then((function(e){r&&r(e),a&&a(e)}),(function(e){i&&i(e),a&&a(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var $t=Et,Rt=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var r="Anonymous_Access_token";e.setAccessToken(r),t(r)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=Oe.sign(n,this.config.clientSecret);var i=Pe();r["x-client-info"]=encodeURIComponent(JSON.stringify(i));var a=Se(),o=a.token;return r["x-client-token"]=o,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(r))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,success:function(t){t&&t.statusCode<400?e(t):c(new _e({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new _e({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,r=e.filePath,i=e.cloudPath,a=e.fileType,o=void 0===a?"image":a,s=e.onUploadProgress;if(!i)throw new _e({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:i}).then((function(e){var i=e.result,a=i.url,c=i.formData,l=i.name;t=e.result.fileUrl;var u={url:a,formData:c,name:l,filePath:r,fileType:o};return n.uploadFileToOSS(Object.assign({},u,{onUploadProgress:s}))})).then((function(){return n.reportOSSUpload({cloudPath:i})})).then((function(e){return new Promise((function(n,i){e.success?n({success:!0,filePath:r,fileID:t}):i(new _e({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n)).then((function(e){if(e.success)return e.result;throw new _e({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;if(!Array.isArray(t)||0===t.length)throw new _e({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});var n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n)).then((function(e){if(e.success)return{fileList:e.result.fileList.map((function(e){return{fileID:e.fileID,tempFileURL:e.tempFileURL}}))};throw new _e({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}}]),n}(Ie),Nt={init:function(e){var t=new Rt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function zt(e){var t,n=e.data;t=Pe();var r=JSON.parse(JSON.stringify(n||{}));if(Object.assign(r,{clientInfo:t}),!r.uniIdToken){var i=Se(),a=i.token;a&&(r.uniIdToken=a)}return r}var Ut=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Bt=/[\\^$.*+?()[\]{}|]/g,qt=RegExp(Bt.source);function Wt(e,t,n){return e.replace(new RegExp((r=t)&&qt.test(r)?r.replace(Bt,"\\$&"):r,"g"),n);var r}var Ht="request",Vt="response";var Gt;Gt="0123456789abcdef";var Kt={code:2e4,message:"System error"},Jt={code:20101,message:"Invalid client"};function Xt(e){var t=e||{},n=t.errSubject,r=t.subject,i=t.errCode,a=t.errMsg,o=t.code,s=t.message,c=t.cause;return new _e({subject:n||r||"uni-secure-network",code:i||o||Kt.code,message:a||s,cause:c})}var Yt;function Zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.secretType;return t===Ht||t===Vt||"both"===t}function Qt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.data,r=void 0===n?{}:n;return"app"===G&&"DCloud-clientDB"===t&&"encryption"===r.redirectTo&&"getAppClientKey"===r.action}function en(e){e.functionName,e.result,e.logPvd}function tn(e){var t=e.callFunction,n=function(n){var r=this,i=n.name;n.data=zt.call(e,{data:n.data});var a={aliyun:"aliyun",tencent:"tcb",tcb:"tcb"}[this.config.provider],o=Zt(n),s=Qt(n),c=o||s;return t.call(this,n).then((function(e){return e.errCode=0,!c&&en.call(r,{functionName:i,result:e,logPvd:a}),Promise.resolve(e)}),(function(e){return!c&&en.call(r,{functionName:i,result:e,logPvd:a}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,r=e.extraInfo,i=void 0===r?{}:r,a=e.formatter,o=void 0===a?[]:a,s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.provider,n=e.spaceId,r=e.functionName,i=ke(),a=i.appId,o=i.uniPlatform,s=i.osName,c=o;"app"===o&&(c=s);var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.provider,n=e.spaceId,r=V;if(!r)return{};t=function(e){return"tencent"===e?"tcb":e}(t);var i=r.find((function(e){return e.provider===t&&e.spaceId===n}));return i&&i.config}({provider:t,spaceId:n});if(!l||!l.accessControl||!l.accessControl.enable)return!1;var u=l.accessControl.function||{},f=Object.keys(u);if(0===f.length)return!0;var h=function(e,t){for(var n,r,i,a=0;a-1&&(r=o):i=o:n=o}return n||r||i}(f,r);if(!h)return!1;if((u[h]||[]).find((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.appId===a&&(e.platform||"").toLowerCase()===c.toLowerCase()})))return!0;throw console.error("此应用[appId: ".concat(a,", platform: ").concat(c,"]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client")),Xt(Jt)}({provider:o,spaceId:s,functionName:c})?new Yt({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(n.bind(e))(t):r(t),Object.defineProperty(i,"result",{get:function(){return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{}}}),i}}Yt="mp-weixin"!==G&&"app"!==G?function(){return(0,x.default)((function e(){throw(0,y.default)(this,e),Xt({message:"Platform ".concat(G," is not supported by secure network")})}))}():function(){return(0,x.default)((function e(){throw(0,y.default)(this,e),Xt({message:"Platform ".concat(G," is not enabled, please check whether secure network module is enabled in your manifest.json")})}))}();var nn=Symbol("CLIENT_DB_INTERNAL");function rn(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=nn,e.inspect=null,e.__ob__=void 0,new Proxy(e,{get:function(e,n,r){if("_uniClient"===n)return null;if("symbol"==(0,l.default)(n))return e[n];if(n in e||"string"!=typeof n){var i=e[n];return"function"==typeof i?i.bind(e):i}return t.get(e,n,r)}})}function an(e){return{on:function(t,n){e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var r=e[t].indexOf(n);-1!==r&&e[t].splice(r,1)}}}var on=["db.Geo","db.command","command.aggregate"];function sn(e,t){return on.indexOf("".concat(e,".").concat(t))>-1}function cn(e){switch($(e)){case"array":return e.map((function(e){return cn(e)}));case"object":return e._internalType===nn||Object.keys(e).forEach((function(t){e[t]=cn(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function ln(e){return e&&e.content&&e.content.$method}var un=function(){function e(t,n,r){(0,y.default)(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=r}return(0,x.default)(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:cn(e.$param)}}))}}},{key:"toString",value:function(){return JSON.stringify(this.toJSON())}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"isAggregate",get:function(){for(var e=this;e;){var t=ln(e),n=ln(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}},{key:"isCommand",get:function(){for(var e=this;e;){if("command"===ln(e))return!0;e=e.prevStage}return!1}},{key:"isAggregateCommand",get:function(){for(var e=this;e;){var t=ln(e),n=ln(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}},{key:"getNextStageFn",value:function(e){var t=this;return function(){return fn({$method:e,$param:cn(Array.from(arguments))},t,t._database)}}},{key:"count",get:function(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}},{key:"remove",get:function(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",get:function(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"set",get:function(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}},{key:"_send",value:function(e,t){var n=this.getAction(),r=this.getCommand();return r.$db.push({$method:e,$param:cn(t)}),this._database._callCloudFunction({action:n,command:r})}}]),e}();function fn(e,t,n){return rn(new un(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),sn(r,t)?fn({$method:t},e,n):function(){return fn({$method:t,$param:cn(Array.from(arguments))},e,n)}}})}function hn(e){var t=e.path,n=e.method;return function(){function e(){(0,y.default)(this,e),this.param=Array.from(arguments)}return(0,x.default)(e,[{key:"toJSON",value:function(){return{$newDb:[].concat((0,u.default)(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}},{key:"toString",value:function(){return JSON.stringify(this.toJSON())}}]),e}()}function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return rn(new e(t),{get:function(e,t){return sn("db",t)?fn({$method:t},null,e):function(){return fn({$method:t,$param:cn(Array.from(arguments))},null,e)}}})}var pn=function(e){(0,d.default)(n,e);var t=k(n);function n(){return(0,y.default)(this,n),t.apply(this,arguments)}return(0,x.default)(n,[{key:"_parseResult",value:function(e){return this._isJQL?e.result:e}},{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,r=e.command,i=e.multiCommand,a=e.queryList;function o(e,t){if(i&&a)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,r=void 0===n?{}:n,i=t.isJQL,a=void 0!==i&&i;(0,y.default)(this,e),this._uniClient=r,this._authCallBacks={},this._dbCallBacks={},r._isDefault&&(this._dbCallBacks=X("_globalUniCloudDatabaseCallback")),a||(this.auth=an(this._authCallBacks)),this._isJQL=a,Object.assign(this,an(this._dbCallBacks)),this.env=rn({},{get:function(e,t){return{$env:t}}}),this.Geo=rn({},{get:function(e,t){return hn({path:["Geo"],method:t})}}),this.serverDate=hn({path:[],method:"serverDate"}),this.RegExp=hn({path:[],method:"RegExp"})}return(0,x.default)(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,(0,u.default)(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,(0,u.default)(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}()),gn="token无效,跳转登录页面",vn="token过期,跳转登录页面",yn={TOKEN_INVALID_TOKEN_EXPIRED:vn,TOKEN_INVALID_INVALID_CLIENTID:gn,TOKEN_INVALID:gn,TOKEN_INVALID_WRONG_TOKEN:gn,TOKEN_INVALID_ANONYMOUS_USER:gn},xn={"uni-id-token-expired":vn,"uni-id-check-token-failed":gn,"uni-id-token-not-exist":gn,"uni-id-check-device-feature-failed":gn};function mn(e,t){var n="";return n=e?"".concat(e,"/").concat(t):t,n.replace(/^\//,"")}function bn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=[];return e.forEach((function(e){!0===e.needLogin?n.push(mn(t,e.path)):!1===e.needLogin&&r.push(mn(t,e.path))})),{needLoginPage:n,notNeedLoginPage:r}}function _n(e){return e.split("?")[0].replace(/^\//,"")}function wn(){return function(e){var t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){var e=getCurrentPages();return e[e.length-1]}())}function Sn(){return _n(wn())}function An(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;var n=t.list,r=_n(e);return n.some((function(e){return e.pagePath===r}))}var kn,Pn=!!b.default.uniIdRouter,Tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b.default,t=e.pages,n=void 0===t?[]:t,r=e.subPackages,i=void 0===r?[]:r,a=e.uniIdRouter,o=void 0===a?{}:a,s=e.tabBar,c=void 0===s?{}:s,l=o.loginPage,f=o.needLogin,h=void 0===f?[]:f,d=o.resToLogin,p=void 0===d||d,g=bn(n),v=g.needLoginPage,y=g.notNeedLoginPage,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];return e.forEach((function(e){var r=e.root,i=e.pages,a=void 0===i?[]:i,o=bn(a,r),s=o.needLoginPage,c=o.notNeedLoginPage;t.push.apply(t,(0,u.default)(s)),n.push.apply(n,(0,u.default)(c))})),{needLoginPage:t,notNeedLoginPage:n}}(i),m=x.needLoginPage,_=x.notNeedLoginPage;return{loginPage:l,routerNeedLogin:h,resToLogin:p,needLoginPage:[].concat((0,u.default)(v),(0,u.default)(m)),notNeedLoginPage:[].concat((0,u.default)(y),(0,u.default)(_)),loginPageInTabBar:An(l,c)}}(),On=Tn.loginPage,Cn=Tn.routerNeedLogin,Ln=Tn.resToLogin,Mn=Tn.needLoginPage,In=Tn.notNeedLoginPage,Dn=Tn.loginPageInTabBar;if(Mn.indexOf(On)>-1)throw new Error("Login page [".concat(On,'] should not be "needLogin", please check your pages.json'));function Fn(e){var t=Sn();if("/"===e.charAt(0))return e;var n=e.split("?"),r=(0,c.default)(n,2),i=r[0],a=r[1],o=i.replace(/^\//,"").split("/"),s=t.split("/");s.pop();for(var l=0;l-1)&&(Mn.indexOf(t)>-1||Cn.some((function(t){return function(e,t){return new RegExp(t).test(e)}(e,t)})))}function jn(e){var t=e.redirect,n=_n(t),r=_n(On);return Sn()!==r&&n!==r}function $n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.api,n=e.redirect;if(n&&jn({redirect:n})){var i=function(e,t){return"/"!==e.charAt(0)&&(e="/"+e),t?e.indexOf("?")>-1?e+"&uniIdRedirectUrl=".concat(encodeURIComponent(t)):e+"?uniIdRedirectUrl=".concat(encodeURIComponent(t)):e}(On,n);Dn?"navigateTo"!==t&&"redirectTo"!==t||(t="switchTab"):"switchTab"===t&&(t="navigateTo");var a={navigateTo:r.navigateTo,redirectTo:r.redirectTo,switchTab:r.switchTab,reLaunch:r.reLaunch};setTimeout((function(){a[t]({url:i})}))}}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n={abortLoginPageJump:!1,autoToLoginPage:!1},r=function(){var e,t=Se(),n=t.token,r=t.tokenExpired;if(n){if(r0)return setTimeout((function(){pe(oe,r)}),0),n.abortLoginPageJump=!0,n;n.autoToLoginPage=!0}return n}function Nn(){!function(){var e=wn(),t=Rn({url:e}),n=t.abortLoginPageJump,r=t.autoToLoginPage;n||r&&$n({api:"redirectTo",redirect:e})}();for(var e=["navigateTo","redirectTo","reLaunch","switchTab"],t=function(t){var n=e[t];r.addInterceptor(n,{invoke:function(e){var t=Rn({url:e.url}),r=t.abortLoginPageJump,i=t.autoToLoginPage;return r?e:i?($n({api:n,redirect:Fn(e.url)}),!1):e}})},n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=fe(oe);ye().then((function(){var n=wn();if(n&&jn({redirect:n}))return t.length>0?pe(oe,Object.assign({uniIdRedirectUrl:n},e)):void(On&&$n({api:"navigateTo",redirect:n}))}))}(n)}))}function Un(e){!function(e){e.onResponse=function(e){he(ae,e)},e.offResponse=function(e){de(ae,e)}}(e),function(e){e.onNeedLogin=function(e){he(oe,e)},e.offNeedLogin=function(e){de(oe,e)},Pn&&(X("_globalUniCloudStatus").needLoginInit||(X("_globalUniCloudStatus").needLoginInit=!0,ye().then((function(){Nn.call(e)})),Ln&&zn.call(e)))}(e),function(e){e.onRefreshToken=function(e){he(se,e)},e.offRefreshToken=function(e){de(se,e)}}(e)}var Bn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",qn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Wn(){var e,t,n=Se().token||"",r=n.split(".");if(!n||3!==r.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=r[1],decodeURIComponent(kn(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}kn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!qn.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",a=0;a>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var Hn=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",a="chooseAndUploadFile:fail";function o(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function s(e,t,r){var i=r.onChooseFile,a=r.onUploadProgress;return t.then((function(e){if(i){var t=i(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var a=t.tempFiles,o=a.length,s=0;return new Promise((function(n){for(;s=o)!a.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var l=a[r];e.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:function(e){e.index=r,e.tempFile=l,e.tempFilePath=l.path,i&&i(e)}}).then((function(e){l.url=e.fileID,r0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?s(e,function(e){var t=e.count,n=e.sizeType,i=e.sourceType,s=void 0===i?["album","camera"]:i,c=e.extension;return new Promise((function(e,i){r.chooseImage({count:t,sizeType:n,sourceType:s,extension:c,success:function(t){e(o(t,"image"))},fail:function(e){i({errMsg:e.errMsg.replace("chooseImage:fail",a)})}})}))}(t),t):"video"===t.type?s(e,function(e){var t=e.camera,n=e.compressed,i=e.maxDuration,s=e.sourceType,c=void 0===s?["album","camera"]:s,l=e.extension;return new Promise((function(e,s){r.chooseVideo({camera:t,compressed:n,maxDuration:i,sourceType:c,extension:l,success:function(t){var n=t.tempFilePath,r=t.duration,i=t.size,a=t.height,s=t.width;e(o({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:i,type:t.tempFile&&t.tempFile.type||"",width:s,height:a,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){s({errMsg:e.errMsg.replace("chooseVideo:fail",a)})}})}))}(t),t):s(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,s){var c=r.chooseFile;if("undefined"!=typeof i&&"function"==typeof i.chooseMessageFile&&(c=i.chooseMessageFile),"function"!=typeof c)return s({errMsg:a+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});c({type:"all",count:t,extension:n,success:function(t){e(o(t))},fail:function(e){s({errMsg:e.errMsg.replace("chooseFile:fail",a)})}})}))}(t),t)}}})),Vn=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Hn);function Gn(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if("manual"!==e.loadtime){for(var r=!1,i=[],a=2;a0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,i=t.success,a=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,a=n.data,o=n.count;e.getcount&&(e.mixinDatacomPage.count=o),e.mixinDatacomHasMore=a.length0&&void 0!==arguments[0]?arguments[0]:{},r=e.database(this.spaceInfo),i=n.action||this.action;i&&(r=r.action(i));var a=n.collection||this.collection;r=Array.isArray(a)?(t=r).collection.apply(t,(0,u.default)(a)):r.collection(a);var o=n.where||this.where;o&&Object.keys(o).length&&(r=r.where(o));var s=n.field||this.field;s&&(r=r.field(s));var c=n.foreignKey||this.foreignKey;c&&(r=r.foreignKey(c));var l=n.groupby||this.groupby;l&&(r=r.groupBy(l));var f=n.groupField||this.groupField;f&&(r=r.groupField(f)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(r=r.distinct());var h=n.orderby||this.orderby;h&&(r=r.orderBy(h));var d=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,g=void 0!==n.getcount?n.getcount:this.getcount,v=void 0!==n.gettree?n.gettree:this.gettree,y=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,x={getCount:g},m={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return v&&(x.getTree=m),y&&(x.getTreePath=m),r=r.skip(p*(d-1)).limit(p).get(x),r}}}}function Kn(e){return X("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}function Jn(){return Xn.apply(this,arguments)}function Xn(){return Xn=(0,f.default)(o.default.mark((function e(){var t,n,i,a,s,c,l,u=arguments;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=u.length>0&&void 0!==u[0]?u[0]:{},n=t.openid,i=t.callLoginByWeixin,a=void 0!==i&&i,s=Kn(this),"mp-weixin"===G){e.next=4;break}throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(G,"`"));case 4:if(!n||!a){e.next=6;break}throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");case 6:if(!n){e.next=8;break}return e.abrupt("return",(s.mpWeixinOpenid=n,{}));case 8:return e.next=10,new Promise((function(e,t){r.login({success:function(t){e(t.code)},fail:function(e){t(new Error(e.errMsg))}})}));case 10:return c=e.sent,l=this.importObject("uni-id-co",{customUI:!0}),e.next=14,l.secureNetworkHandshakeByWeixin({code:c,callLoginByWeixin:a});case 14:return s.mpWeixinCode=c,e.abrupt("return",{code:c});case 16:case"end":return e.stop()}}),e,this)}))),Xn.apply(this,arguments)}function Yn(e){return Zn.apply(this,arguments)}function Zn(){return Zn=(0,f.default)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=Kn(this),e.abrupt("return",(n.initPromise||(n.initPromise=Jn.call(this,t)),n.initPromise));case 2:case"end":return e.stop()}}),e,this)}))),Zn.apply(this,arguments)}function Qn(e){var t={getSystemInfo:r.getSystemInfo,getPushClientId:r.getPushClientId};return function(n){return new Promise((function(r,i){t[e](A(A({},n),{},{success:function(e){r(e)},fail:function(e){i(e)}}))}))}}var er=function(e){(0,d.default)(n,e);var t=k(n);function n(){var e;return(0,y.default)(this,n),e=t.call(this),e._uniPushMessageCallback=e._receivePushMessage.bind((0,s.default)(e)),e._currentMessageId=-1,e._payloadQueue=[],e}return(0,x.default)(n,[{key:"init",value:function(){var e=this;return Promise.all([Qn("getSystemInfo")(),Qn("getPushClientId")()]).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,c.default)(t,2),r=n[0];r=void 0===r?{}:r;var i=r.appId,a=n[1];a=void 0===a?{}:a;var o=a.cid;if(!i)throw new Error("Invalid appId, please check the manifest.json file");if(!o)throw new Error("Invalid push client id");e._appId=i,e._pushClientId=o,e._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),e.emit("open"),e._initMessageListener()}),(function(t){throw e.emit("error",t),e.close(),t}))}},{key:"open",value:function(){var e=(0,f.default)(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this.init());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_isUniCloudSSE",value:function(e){if("receive"!==e.type)return!1;var t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}},{key:"_receivePushMessage",value:function(e){if(this._isUniCloudSSE(e)){var t=e&&e.data&&e.data.payload,n=t.action,r=t.messageId,i=t.message;this._payloadQueue.push({action:n,messageId:r,message:i}),this._consumMessage()}}},{key:"_consumMessage",value:function(){for(var e=this;;){var t=this._payloadQueue.find((function(t){return t.messageId===e._currentMessageId+1}));if(!t)break;this._currentMessageId++,this._parseMessagePayload(t)}}},{key:"_parseMessagePayload",value:function(e){var t=e.action,n=e.messageId,r=e.message;"end"===t?this._end({messageId:n,message:r}):"message"===t&&this._appendMessage({messageId:n,message:r})}},{key:"_appendMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e.messageId,e.message);this.emit("message",t)}},{key:"_end",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e.messageId,e.message);this.emit("end",t),this.close()}},{key:"_initMessageListener",value:function(){r.onPushMessage(this._uniPushMessageCallback)}},{key:"_destroy",value:function(){r.offPushMessage(this._uniPushMessageCallback)}},{key:"toJSON",value:function(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}},{key:"close",value:function(){this._destroy(),this.emit("close")}}]),n}(function(){function e(){(0,y.default)(this,e),this._callback={}}return(0,x.default)(e,[{key:"addListener",value:function(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}},{key:"on",value:function(e,t){return this.addListener(e,t)}},{key:"removeListener",value:function(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');var n=this._callback[e];if(n){var r=function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return n;return-1}(n,t);n.splice(r,1)}}},{key:"off",value:function(e,t){return this.removeListener(e,t)}},{key:"removeAllListener",value:function(e){delete this._callback[e]}},{key:"emit",value:function(e){for(var t=this._callback[e],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0)return e.init(t).database();if(this._database)return this._database;var n=dn(pn,{uniClient:e});return this._database=n,n},e.databaseForJQL=function(t){if(t&&Object.keys(t).length>0)return e.init(t).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;var n=dn(pn,{uniClient:e,isJQL:!0});return this._databaseForJQL=n,n}}(t),function(e){e.getCurrentUserInfo=Wn,e.chooseAndUploadFile=Vn.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Gn(e)}}),e.SSEChannel=er,e.initSecureNetworkByWeixin=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.openid,r=t.callLoginByWeixin,i=void 0!==r&&r;return Yn.call(e,{openid:n,callLoginByWeixin:i})}}(e),e.importObject=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==(0,l.default)(t.secretMethods)&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);var i=n,a=i.customUI,s=i.loadingOptions,c=i.errorOptions,u=i.parseSystemError,h=!a;return new Proxy({},{get:function(i,a){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fn,n=e.interceptorName,r=e.getCallbackArgs;return(0,f.default)(o.default.mark((function e(){var i,a,s,c,l,u,f=arguments;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(i=f.length,a=new Array(i),s=0;s0&&void 0!==l[0]?l[0]:{},n=t.title,i=t.content,a=t.showCancel,s=t.cancelText,c=t.confirmText,e.abrupt("return",new Promise((function(e,t){r.showModal({title:n,content:i,showCancel:a,cancelText:s,confirmText:c,success:function(t){e(t)},fail:function(){e({confirm:!1,cancel:!0})}})})));case 2:case"end":return e.stop()}}),e)})))({title:"提示",content:P,showCancel:c.retry,cancelText:"取消",confirmText:c.retry?"重试":"确定"});case 33:if(T=i.sent,O=T.confirm,!c.retry||!O){i.next=37;break}return i.abrupt("return",d.apply(void 0,v));case 37:throw C=new _e({subject:_,code:w,message:S,requestId:p.requestId}),C.detail=p.result,pe(ae,{type:ue,content:C}),C;case 39:return i.abrupt("return",(pe(ae,{type:ue,content:p.result}),p.result));case 40:case"end":return i.stop()}}),i,null,[[5,11]])})));function d(){return i.apply(this,arguments)}return d}(),interceptorName:"callObject",getCallbackArgs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.params;return{objectName:t,methodName:a,params:n}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return n.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(n){var r=this,i=!1;if("callFunction"===t){var a=n&&n.type||I;i=a!==I}var o="callFunction"===t&&!i,s=this._initPromiseHub.exec();n=n||{};var c=xe(n),l=c.success,u=c.fail,f=c.complete,h=s.then((function(){return i?Promise.resolve():te(ne(t,"invoke"),n)})).then((function(){return e.call(r,n)})).then((function(e){return i?Promise.resolve(e):te(ne(t,"success"),e).then((function(){return te(ne(t,"complete"),e)})).then((function(){return o&&pe(ae,{type:le,content:e}),Promise.resolve(e)}))}),(function(e){return i?Promise.reject(e):te(ne(t,"fail"),e).then((function(){return te(ne(t,"complete"),e)})).then((function(){return pe(ae,{type:le,content:e}),Promise.reject(e)}))}));if(!(l||u||f))return h;h.then((function(e){l&&l(e),f&&f(e),o&&pe(ae,{type:le,content:e})}),(function(e){u&&u(e),f&&f(e),o&&pe(ae,{type:le,content:e})}))}}(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=K,t={};if(e&&1===e.length)t=e[0],nr=nr.init(t),nr._isDefault=!0;else{var n;n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"].forEach((function(e){nr[e]=function(){return console.error(n),Promise.reject(new _e({code:"SYS_ERR",message:n}))}}))}Object.assign(nr,{get mixinDatacom(){return Gn(nr)}}),Un(nr),nr.addInterceptor=Q,nr.removeInterceptor=ee,nr.interceptObject=re})();var rr=nr;t.default=rr}).call(this,n("c8ba"),n("543d")["default"],n("bc2e")["default"])},abf9:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1500;e.showToast({title:t,icon:"none",duration:n})};t.default=n}).call(this,n("543d")["default"])},b17c:function(e,t,n){var r=n("4a4b"),i=n("6f8f");function a(t,n,o){return i()?(e.exports=a=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports["default"]=e.exports):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=Function.bind.apply(e,i),o=new a;return n&&r(o,n.prototype),o},e.exports.__esModule=!0,e.exports["default"]=e.exports),a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},bc2e:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["qy","env","error","version","lanDebug","cloud","serviceMarket","router","worklet","__webpack_require_UNI_MP_PLUGIN__"],i=["lanDebug","router","worklet"],a="undefined"!==typeof globalThis?globalThis:function(){return this}(),o=["w","x"].join(""),s=a[o],c=s.getLaunchOptionsSync?s.getLaunchOptionsSync():null;function l(e){return(!c||1154!==c.scene||!i.includes(e))&&(r.indexOf(e)>-1||"function"===typeof s[e])}a[o]=function(){var e={};for(var t in s)l(t)&&(e[t]=s[t]);return e}();var u=a[o];t.default=u},c135:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},c240:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},c5f7:function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports["default"]=e.exports},c754:function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("970b")),a=r(n("5bc3")),o=r(n("4fff")),s=r(n("65e7")),c=function(){function t(){var e=this;(0,i.default)(this,t),this.config={baseUrl:"",header:{},method:"POST",dataType:"json",responseType:"text",showLoading:!0,loadingText:"请求中...",loadingTime:800,timer:null,originalData:!1,loadingMask:!0},this.interceptor={request:null,response:null},this.get=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.request({method:"GET",url:t,header:r,data:n})},this.post=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.request({url:t,method:"POST",header:r,data:n})},this.put=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.request({url:t,method:"PUT",header:r,data:n})},this.delete=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.request({url:t,method:"DELETE",header:r,data:n})}}return(0,a.default)(t,[{key:"setConfig",value:function(e){this.config=(0,o.default)(this.config,e)}},{key:"request",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.interceptor.request&&"function"===typeof this.interceptor.request){var r=this.interceptor.request(n);if(!1===r)return new Promise((function(){}));this.options=r}return n.dataType=n.dataType||this.config.dataType,n.responseType=n.responseType||this.config.responseType,n.url=n.url||"",n.params=n.params||{},n.header=Object.assign({},this.config.header,n.header),n.method=n.method||this.config.method,new Promise((function(r,i){n.complete=function(n){if(e.hideLoading(),clearTimeout(t.config.timer),t.config.timer=null,t.config.originalData)if(t.interceptor.response&&"function"===typeof t.interceptor.response){var a=t.interceptor.response(n);!1!==a?r(a):i(n)}else r(n);else if(200==n.statusCode)if(t.interceptor.response&&"function"===typeof t.interceptor.response){var o=t.interceptor.response(n.data);!1!==o?r(o):i(n.data)}else r(n.data);else i(n)},n.url=s.default.url(n.url)?n.url:t.config.baseUrl+(0==n.url.indexOf("/")?n.url:"/"+n.url),t.config.showLoading&&!t.config.timer&&(t.config.timer=setTimeout((function(){e.showLoading({title:t.config.loadingText,mask:t.config.loadingMask}),t.config.timer=null}),t.config.loadingTime)),e.request(n)}))}}]),t}(),l=new c;t.default=l}).call(this,n("543d")["default"])},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},c8bf:function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("2eee")),a=r(n("c973")),o=r(n("970b")),s=r(n("5bc3")),c=function(){function t(){(0,o.default)(this,t),this.config={type:"navigateTo",url:"",delta:1,params:{},animationType:"pop-in",animationDuration:300,intercept:!1},this.route=this.route.bind(this)}return(0,s.default)(t,[{key:"addRootPath",value:function(e){return"/"===e[0]?e:"/".concat(e)}},{key:"mixinParam",value:function(t,n){t=t&&this.addRootPath(t);var r="";return/.*\/.*\?.*=.*/.test(t)?(r=e.$u.queryParams(n,!1),t+"&"+r):(r=e.$u.queryParams(n),t+r)}},{key:"route",value:function(){var t=(0,a.default)(i.default.mark((function t(){var n,r,a,o,s=arguments;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},a={},"string"===typeof n?(a.url=this.mixinParam(n,r),a.type="navigateTo"):(a=e.$u.deepClone(n,this.config),a.url=this.mixinParam(n.url,n.params)),r.intercept&&(this.config.intercept=r.intercept),a.params=r,a=e.$u.deepMerge(this.config,a),"function"!==typeof e.$u.routeIntercept){t.next=14;break}return t.next=10,new Promise((function(t,n){e.$u.routeIntercept(a,t)}));case 10:o=t.sent,o&&this.openPage(a),t.next=15;break;case 14:this.openPage(a);case 15:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"openPage",value:function(t){var n=t.url,r=(t.type,t.delta),i=t.animationType,a=t.animationDuration;"navigateTo"!=t.type&&"to"!=t.type||e.navigateTo({url:n,animationType:i,animationDuration:a}),"redirectTo"!=t.type&&"redirect"!=t.type||e.redirectTo({url:n}),"switchTab"!=t.type&&"tab"!=t.type||e.switchTab({url:n}),"reLaunch"!=t.type&&"launch"!=t.type||e.reLaunch({url:n}),"navigateBack"!=t.type&&"back"!=t.type||e.navigateBack({delta:r})}}]),t}(),l=(new c).route;t.default=l}).call(this,n("543d")["default"])},c973:function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,c,"next",e)}function c(e){n(o,i,a,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports["default"]=e.exports},d702:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],i={type:["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],range:["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","山峰图","条状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],categories:["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],instance:{},option:{},formatter:{yAxisDemo1:function(e,t,n){return e+"元"},yAxisDemo2:function(e,t,n){return e.toFixed(2)},xAxisDemo1:function(e,t,n){return e+"年"},xAxisDemo2:function(e,t,n){return function(e,t){var n=new Date;n.setTime(1e3*e);var r=n.getFullYear(),i=n.getMonth()+1;i=i<10?"0"+i:i;var a=n.getDate();a=a<10?"0"+a:a;var o=n.getHours();o=o<10?"0"+o:o;var s=n.getMinutes(),c=n.getSeconds();return s=s<10?"0"+s:s,c=c<10?"0"+c:c,"full"==t?r+"-"+i+"-"+a+" "+o+":"+s+":"+c:"y-m-d"==t?r+"-"+i+"-"+a:"h:m"==t?o+":"+s:"h:m:s"==t?o+":"+s+":"+c:[r,i,a,o,s,c]}(e,"h:m")},seriesDemo1:function(e,t,n,r){return e+"元"},tooltipDemo1:function(e,t,n,r){return 0==n?"随便用"+e.data+"年":"其他我没改"+e.data+"天"},pieDemo:function(e,t,n,r){if(void 0!==t)return n[t].name+":"+n[t].data+"元"}},demotype:{type:"line",color:r,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"curve",width:2}}},pie:{type:"pie",color:r,padding:[5,5,5,5],extra:{pie:{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!0,borderWidth:3,borderColor:"#FFFFFF"}}},ring:{type:"ring",color:r,padding:[5,5,5,5],rotate:!1,dataLabel:!0,legend:{show:!0,position:"right",lineHeight:25},title:{name:"收益率",fontSize:15,color:"#666666"},subtitle:{name:"70%",fontSize:25,color:"#7cb5ec"},extra:{ring:{ringWidth:30,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!0,borderWidth:3,borderColor:"#FFFFFF"}}},rose:{type:"rose",color:r,padding:[5,5,5,5],legend:{show:!0,position:"left",lineHeight:25},extra:{rose:{type:"area",minRadius:50,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF"}}},word:{type:"word",color:r,extra:{word:{type:"normal",autoColors:!1}}},funnel:{type:"funnel",color:r,padding:[15,15,0,15],extra:{funnel:{activeOpacity:.3,activeWidth:10,border:!0,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right"}}},map:{type:"map",color:r,padding:[0,0,0,0],dataLabel:!0,extra:{map:{border:!0,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#F04864",activeFillColor:"#FACC14",activeFillOpacity:1}}},arcbar:{type:"arcbar",color:r,title:{name:"百分比",fontSize:25,color:"#00FF00"},subtitle:{name:"默认标题",fontSize:15,color:"#666666"},extra:{arcbar:{type:"default",width:12,backgroundColor:"#E9E9E9",startAngle:.75,endAngle:.25,gap:2}}},line:{type:"line",color:r,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"straight",width:2,activeType:"hollow"}}},tline:{type:"line",color:r,padding:[15,10,0,15],xAxis:{disableGrid:!1,boundaryGap:"justify"},yAxis:{gridType:"dash",dashLength:2,data:[{min:0,max:80}]},legend:{},extra:{line:{type:"curve",width:2,activeType:"hollow"}}},tarea:{type:"area",color:r,padding:[15,10,0,15],xAxis:{disableGrid:!0,boundaryGap:"justify"},yAxis:{gridType:"dash",dashLength:2,data:[{min:0,max:80}]},legend:{},extra:{area:{type:"curve",opacity:.2,addLine:!0,width:2,gradient:!0,activeType:"hollow"}}},column:{type:"column",color:r,padding:[15,15,0,5],xAxis:{disableGrid:!0},yAxis:{data:[{min:0}]},legend:{},extra:{column:{type:"group",width:30,activeBgColor:"#000000",activeBgOpacity:.08}}},mount:{type:"mount",color:r,padding:[15,15,0,5],xAxis:{disableGrid:!0},yAxis:{data:[{min:0}]},legend:{},extra:{mount:{type:"mount",widthRatio:1.5}}},bar:{type:"bar",color:r,padding:[15,30,0,5],xAxis:{boundaryGap:"justify",disableGrid:!1,min:0,axisLine:!1},yAxis:{},legend:{},extra:{bar:{type:"group",width:30,meterBorde:1,meterFillColor:"#FFFFFF",activeBgColor:"#000000",activeBgOpacity:.08}}},area:{type:"area",color:r,padding:[15,15,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{area:{type:"straight",opacity:.2,addLine:!0,width:2,gradient:!1,activeType:"hollow"}}},radar:{type:"radar",color:r,padding:[5,5,5,5],dataLabel:!1,legend:{show:!0,position:"right",lineHeight:25},extra:{radar:{gridType:"radar",gridColor:"#CCCCCC",gridCount:3,opacity:.2,max:200,labelShow:!0}}},gauge:{type:"gauge",color:r,title:{name:"66Km/H",fontSize:25,color:"#2fc25b",offsetY:50},subtitle:{name:"实时速度",fontSize:15,color:"#1890ff",offsetY:-50},extra:{gauge:{type:"default",width:30,labelColor:"#666666",startAngle:.75,endAngle:.25,startNumber:0,endNumber:100,labelFormat:"",splitLine:{fixRadius:0,splitNumber:10,width:30,color:"#FFFFFF",childNumber:5,childWidth:12},pointer:{width:24,color:"auto"}}}},candle:{type:"candle",color:r,padding:[15,15,0,15],enableScroll:!0,enableMarkLine:!0,dataLabel:!1,xAxis:{labelCount:4,itemCount:40,disableGrid:!0,gridColor:"#CCCCCC",gridType:"solid",dashLength:4,scrollShow:!0,scrollAlign:"left",scrollColor:"#A6A6A6",scrollBackgroundColor:"#EFEBEF"},yAxis:{},legend:{},extra:{candle:{color:{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},average:{show:!0,name:["MA5","MA10","MA30"],day:[5,10,20],color:["#1890ff","#2fc25b","#facc14"]}},markLine:{type:"dash",dashLength:5,data:[{value:2150,lineColor:"#f04864",showLabel:!0},{value:2350,lineColor:"#f04864",showLabel:!0}]}}},mix:{type:"mix",color:r,padding:[15,15,0,15],xAxis:{disableGrid:!0},yAxis:{disabled:!1,disableGrid:!1,splitNumber:5,gridType:"dash",dashLength:4,gridColor:"#CCCCCC",padding:10,showTitle:!0,data:[]},legend:{},extra:{mix:{column:{width:20}}}},scatter:{type:"scatter",color:r,padding:[15,15,0,15],dataLabel:!1,xAxis:{disableGrid:!1,gridType:"dash",splitNumber:5,boundaryGap:"justify",min:0},yAxis:{disableGrid:!1,gridType:"dash"},legend:{},extra:{scatter:{}}},bubble:{type:"bubble",color:r,padding:[15,15,0,15],xAxis:{disableGrid:!1,gridType:"dash",splitNumber:5,boundaryGap:"justify",min:0,max:250},yAxis:{disableGrid:!1,gridType:"dash",data:[{min:0,max:150}]},legend:{},extra:{bubble:{border:2,opacity:.5}}}},a=i;t.default=a},d913:function(e,t){},db22:function(e,t,n){"use strict";var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("fe9b"));var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-mm-dd";e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);var n=+new Date(Number(e)),r=(Number(new Date)-n)/1e3,a="";switch(!0){case r<300:a="刚刚";break;case r>=300&&r<3600:a=parseInt(r/60)+"分钟前";break;case r>=3600&&r<86400:a=parseInt(r/3600)+"小时前";break;case r>=86400&&r<2592e3:a=parseInt(r/86400)+"天前";break;default:a=!1===t?r>=2592e3&&r<31536e3?parseInt(r/2592e3)+"个月前":parseInt(r/31536e3)+"年前":(0,i.default)(n,t)}return a};t.default=a},df7c:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!==typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===i(e,-1);return e=n(r(e.split("/"),(function(e){return!!e})),!a).join("/"),e||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0;n--)if(""!==e[n])break;return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c=1;--a)if(t=e.charCodeAt(a),47===t){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!==typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n("4362"))},e3a6:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n?r||(r=!0,"function"===typeof e&&e(),setTimeout((function(){r=!1}),t)):r||(r=!0,setTimeout((function(){r=!1,"function"===typeof e&&e()}),t))};t.default=i},e50d:function(e,t,n){var r=n("7037")["default"];e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},e8c3:function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("7037"));function a(){return a=Object.assign||function(e){for(var t=1;t=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}break;default:return e}})),c=t[r];r()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},y={integer:function(e){return y.number(e)&&parseInt(e,10)===e},float:function(e){return y.number(e)&&!y.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear},number:function(e){return!isNaN(e)&&"number"===typeof+e},object:function(e){return"object"===(0,i.default)(e)&&!y.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&!!e.match(v.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(v.url)},hex:function(e){return"string"===typeof e&&!!e.match(v.hex)}};var x={required:g,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||""===t)&&r.push(l(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,a){if(e.required&&void 0===t)g(e,t,n,r,a);else{var o=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?y[o](t)||r.push(l(a.messages.types[o],e.fullField,e.type)):o&&(0,i.default)(t)!==e.type&&r.push(l(a.messages.types[o],e.fullField,e.type))}},range:function(e,t,n,r,i){var a="number"===typeof e.len,o="number"===typeof e.min,s="number"===typeof e.max,c=t,u=null,f="number"===typeof t,h="string"===typeof t,d=Array.isArray(t);if(f?u="number":h?u="string":d&&(u="array"),!u)return!1;d&&(c=t.length),h&&(c=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?c!==e.len&&r.push(l(i.messages[u].len,e.fullField,e.len)):o&&!s&&ce.max?r.push(l(i.messages[u].max,e.fullField,e.max)):o&&s&&(ce.max)&&r.push(l(i.messages[u].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e["enum"]=Array.isArray(e["enum"])?e["enum"]:[],-1===e["enum"].indexOf(t)&&r.push(l(i.messages["enum"],e.fullField,e["enum"].join(", ")))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(l(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){var a=new RegExp(e.pattern);a.test(t)||r.push(l(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function m(e,t,n,r,i){var a=e.type,o=[],s=e.required||!e.required&&r.hasOwnProperty(e.field);if(s){if(u(t,a)&&!e.required)return n();x.required(e,t,r,o,i,a),u(t,a)||x.type(e,t,r,o,i)}n(o)}var b={string:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t,"string")&&!e.required)return n();x.required(e,t,r,a,i,"string"),u(t,"string")||(x.type(e,t,r,a,i),x.range(e,t,r,a,i),x.pattern(e,t,r,a,i),!0===e.whitespace&&x.whitespace(e,t,r,a,i))}n(a)},method:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&x.type(e,t,r,a,i)}n(a)},number:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(""===t&&(t=void 0),u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&(x.type(e,t,r,a,i),x.range(e,t,r,a,i))}n(a)},boolean:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&x.type(e,t,r,a,i)}n(a)},regexp:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),u(t)||x.type(e,t,r,a,i)}n(a)},integer:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&(x.type(e,t,r,a,i),x.range(e,t,r,a,i))}n(a)},float:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&(x.type(e,t,r,a,i),x.range(e,t,r,a,i))}n(a)},array:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t,"array")&&!e.required)return n();x.required(e,t,r,a,i,"array"),u(t,"array")||(x.type(e,t,r,a,i),x.range(e,t,r,a,i))}n(a)},object:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&x.type(e,t,r,a,i)}n(a)},enum:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i),void 0!==t&&x["enum"](e,t,r,a,i)}n(a)},pattern:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t,"string")&&!e.required)return n();x.required(e,t,r,a,i),u(t,"string")||x.pattern(e,t,r,a,i)}n(a)},date:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();var s;if(x.required(e,t,r,a,i),!u(t))s="number"===typeof t?new Date(t):t,x.type(e,s,r,a,i),s&&x.range(e,s.getTime(),r,a,i)}n(a)},url:m,hex:m,email:m,required:function(e,t,n,r,a){var o=[],s=Array.isArray(t)?"array":(0,i.default)(t);x.required(e,t,r,o,a,s),n(o)},any:function(e,t,n,r,i){var a=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(u(t)&&!e.required)return n();x.required(e,t,r,a,i)}n(a)}};function _(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var w=_();function S(e){this.rules=null,this._messages=w,this.define(e)}S.prototype={messages:function(e){return e&&(this._messages=p(_(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,i.default)(e)||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,n){var r=this;void 0===t&&(t={}),void 0===n&&(n=function(){});var o,s,u=e,f=t,g=n;if("function"===typeof f&&(g=f,f={}),!this.rules||0===Object.keys(this.rules).length)return g&&g(),Promise.resolve();if(f.messages){var v=this.messages();v===w&&(v=_()),p(v,f.messages),f.messages=v}else f.messages=this.messages();var y={},x=f.keys||Object.keys(this.rules);x.forEach((function(t){o=r.rules[t],s=u[t],o.forEach((function(n){var i=n;"function"===typeof i.transform&&(u===e&&(u=a({},u)),s=u[t]=i.transform(s)),i="function"===typeof i?{validator:i}:a({},i),i.validator=r.getValidationMethod(i),i.field=t,i.fullField=i.fullField||t,i.type=r.getType(i),i.validator&&(y[t]=y[t]||[],y[t].push({rule:i,value:s,source:u,field:t}))}))}));var m={};return h(y,f,(function(e,t){var n,r=e.rule,o=("object"===r.type||"array"===r.type)&&("object"===(0,i.default)(r.fields)||"object"===(0,i.default)(r.defaultField));function s(e,t){return a({},t,{fullField:r.fullField+"."+e})}function c(n){void 0===n&&(n=[]);var i=n;if(Array.isArray(i)||(i=[i]),!f.suppressWarning&&i.length&&S.warning("async-validator:",i),i.length&&r.message&&(i=[].concat(r.message)),i=i.map(d(r)),f.first&&i.length)return m[r.field]=1,t(i);if(o){if(r.required&&!e.value)return i=r.message?[].concat(r.message).map(d(r)):f.error?[f.error(r,l(f.messages.required,r.field))]:[],t(i);var c={};if(r.defaultField)for(var u in e.value)e.value.hasOwnProperty(u)&&(c[u]=r.defaultField);for(var h in c=a({},c,{},e.rule.fields),c)if(c.hasOwnProperty(h)){var p=Array.isArray(c[h])?c[h]:[c[h]];c[h]=p.map(s.bind(null,h))}var g=new S(c);g.messages(f.messages),e.rule.options&&(e.rule.options.messages=f.messages,e.rule.options.error=f.error),g.validate(e.value,e.rule.options||f,(function(e){var n=[];i&&i.length&&n.push.apply(n,i),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(i)}o=o&&(r.required||!r.required&&e.value),r.field=e.field,r.asyncValidator?n=r.asyncValidator(r,e.value,c,e.source,f):r.validator&&(n=r.validator(r,e.value,c,e.source,f),!0===n?c():!1===n?c(r.message||r.field+" fails"):n instanceof Array?c(n):n instanceof Error&&c(n.message)),n&&n.then&&n.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){(function(e){var t,n=[],r={};function i(e){var t;Array.isArray(e)?n=(t=n).concat.apply(t,e):n.push(e)}for(t=0;t1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==r&&clearTimeout(r),n){var i=!r;r=setTimeout((function(){r=null}),t),i&&"function"===typeof e&&e()}else r=setTimeout((function(){"function"===typeof e&&e()}),t)};t.default=i},f0c5:function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s,c,l){var u,f="function"===typeof e?e.options:e;if(c){f.components||(f.components={});var h=Object.prototype.hasOwnProperty;for(var d in c)h.call(c,d)&&!h.call(f.components,d)&&(f.components[d]=c[d])}if(l&&("function"===typeof l.beforeCreate&&(l.beforeCreate=[l.beforeCreate]),(l.beforeCreate||(l.beforeCreate=[])).unshift((function(){this[l.__module]=this})),(f.mixins||(f.mixins=[])).push(l)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),a&&(f._scopeId="data-v-"+a),o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},f._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(f.functional){f._injectStyles=u;var p=f.render;f.render=function(e,t){return u.call(t),p(e,t)}}else{var g=f.beforeCreate;f.beforeCreate=g?[].concat(g,u):[u]}return{exports:e,options:f}}n.d(t,"a",(function(){return r}))},f24a:function(e,t,n){(function(t){e.exports={data:function(){return{}},onLoad:function(){this.$u.getRect=this.$uGetRect},methods:{$uGetRect:function(e,n){var r=this;return new Promise((function(i){t.createSelectorQuery().in(r)[n?"selectAll":"select"](e).boundingClientRect((function(e){n&&Array.isArray(e)&&e.length&&i(e),!n&&e&&i(e)})).exec()}))},getParentData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.parent||(this.parent=!1),this.parent=this.$u.$parent.call(this,t),this.parent&&Object.keys(this.parentData).map((function(t){e.parentData[t]=e.parent[t]}))},preventEvent:function(e){e&&e.stopPropagation&&e.stopPropagation()}},onReachBottom:function(){t.$emit("uOnReachBottom")},beforeDestroy:function(){var e=this;if(this.parent&&t.$u.test.array(this.parent.children)){var n=this.parent.children;n.map((function(t,r){t===e&&n.splice(r,1)}))}}}}).call(this,n("543d")["default"])},f383:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={toast:10090,noNetwork:10080,popup:10075,mask:10070,navbar:980,topTips:975,sticky:970,indexListSticky:965}},f5da:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(e>=0&&t>0&&t>=e){var n=t-e+1;return Math.floor(Math.random()*n+e)}return 0};t.default=r},fe9b:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,String.prototype.padStart||(String.prototype.padStart=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";if("[object String]"!==Object.prototype.toString.call(t))throw new TypeError("fillString must be String");var n=this;if(n.length>=e)return String(n);var r=e-n.length,i=Math.ceil(r/t.length);while(i>>=1)t+=t,1===i&&(t+=t);return t.slice(0,r)+n});var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-mm-dd";e||(e=Number(new Date)),10==e.toString().length&&(e*=1e3);var n,r=new Date(e),i={"y+":r.getFullYear().toString(),"m+":(r.getMonth()+1).toString(),"d+":r.getDate().toString(),"h+":r.getHours().toString(),"M+":r.getMinutes().toString(),"s+":r.getSeconds().toString()};for(var a in i)n=new RegExp("("+a+")").exec(t),n&&(t=t.replace(n[1],1==n[1].length?i[a]:i[a].padStart(n[1].length,"0")));return t};t.default=r}}]);