(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"035b":function(t,e,r){"use strict";r.r(e);var n=r("2321"),i=r("92cc");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);e["default"]=c.exports},"0394":function(t,e,r){"use strict";r.r(e);var n=r("6071"),i=r("caa3");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"696ddae3",null,!1,n["a"],o);e["default"]=c.exports},"05c3":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"loading3",data:function(){return{}}};e.default=n},"07d5":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"loading6",data:function(){return{}}};e.default=n},"0de9":function(t,e,r){"use strict";function n(t){var e=Object.prototype.toString.call(t);return e.substring(8,e.length-1)}function i(){return"string"===typeof __channelId__&&__channelId__}function a(t,e){switch(n(e)){case"Function":return"function() { [native code] }";default:return e}}function o(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1){var l=s.pop();c=s.join("---COMMA---"),0===l.indexOf(" at ")?c+=l:c+="---COMMA---"+l}else c=s[0];console[o](c)}r.r(e),r.d(e,"log",(function(){return o})),r.d(e,"default",(function(){return s}))},"0e20":function(t,e,r){"use strict";r.r(e);var n=r("9e24"),i=r("55c2");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);e["default"]=c.exports},"0f50":function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","container loading2"),attrs:{_i:0}},[r("view",{staticClass:t._$s(1,"sc","shape shape1"),attrs:{_i:1}}),r("view",{staticClass:t._$s(2,"sc","shape shape2"),attrs:{_i:2}}),r("view",{staticClass:t._$s(3,"sc","shape shape3"),attrs:{_i:3}}),r("view",{staticClass:t._$s(4,"sc","shape shape4"),attrs:{_i:4}})])},a=[]},2321:function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",[t._$s(1,"i",1==t.loadingType)?r("Loading1",{attrs:{_i:1}}):t._e(),t._$s(2,"i",2==t.loadingType)?r("Loading2",{attrs:{_i:2}}):t._e(),t._$s(3,"i",3==t.loadingType)?r("Loading3",{attrs:{_i:3}}):t._e(),t._$s(4,"i",4==t.loadingType)?r("Loading4",{attrs:{_i:4}}):t._e(),t._$s(5,"i",5==t.loadingType)?r("Loading5",{attrs:{_i:5}}):t._e()],1)},a=[]},2521:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={appid:"__UNI__915967A"};e.default=n},"26cb":function(t,e,r){"use strict";(function(e){ /*! * vuex v3.6.2 * (c) 2021 Evan You * @license MIT */ function r(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:n});else{var r=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,r.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}var n="undefined"!==typeof window?window:"undefined"!==typeof e?e:{},i=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;function a(t){i&&(t._devtoolHook=i,i.emit("vuex:init",t),i.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){i.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){i.emit("vuex:action",t,e)}),{prepend:!0}))}function o(t,e){return t.filter(e)[0]}function s(t,e){if(void 0===e&&(e=[]),null===t||"object"!==typeof t)return t;var r=o(e,(function(e){return e.original===t}));if(r)return r.copy;var n=Array.isArray(t)?[]:{};return e.push({original:t,copy:n}),Object.keys(t).forEach((function(r){n[r]=s(t[r],e)})),n}function c(t,e){Object.keys(t).forEach((function(r){return e(t[r],r)}))}function l(t){return null!==t&&"object"===typeof t}function u(t){return t&&"function"===typeof t.then}function h(t,e){return function(){return t(e)}}var f=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=("function"===typeof r?r():r)||{}},d={namespaced:{configurable:!0}};d.namespaced.get=function(){return!!this._rawModule.namespaced},f.prototype.addChild=function(t,e){this._children[t]=e},f.prototype.removeChild=function(t){delete this._children[t]},f.prototype.getChild=function(t){return this._children[t]},f.prototype.hasChild=function(t){return t in this._children},f.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},f.prototype.forEachChild=function(t){c(this._children,t)},f.prototype.forEachGetter=function(t){this._rawModule.getters&&c(this._rawModule.getters,t)},f.prototype.forEachAction=function(t){this._rawModule.actions&&c(this._rawModule.actions,t)},f.prototype.forEachMutation=function(t){this._rawModule.mutations&&c(this._rawModule.mutations,t)},Object.defineProperties(f.prototype,d);var p=function(t){this.register([],t,!1)};function g(t,e,r){if(e.update(r),r.modules)for(var n in r.modules){if(!e.getChild(n))return void 0;g(t.concat(n),e.getChild(n),r.modules[n])}}p.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},p.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,r){return e=e.getChild(r),t+(e.namespaced?r+"/":"")}),"")},p.prototype.update=function(t){g([],this.root,t)},p.prototype.register=function(t,e,r){var n=this;void 0===r&&(r=!0);var i=new f(e,r);if(0===t.length)this.root=i;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],i)}e.modules&&c(e.modules,(function(e,i){n.register(t.concat(i),e,r)}))},p.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1],n=e.getChild(r);n&&n.runtime&&e.removeChild(r)},p.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1];return!!e&&e.hasChild(r)};var v;var y=function(t){var e=this;void 0===t&&(t={}),!v&&"undefined"!==typeof window&&window.Vue&&D(window.Vue);var r=t.plugins;void 0===r&&(r=[]);var n=t.strict;void 0===n&&(n=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new p(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new v,this._makeLocalGettersCache=Object.create(null);var i=this,o=this,s=o.dispatch,c=o.commit;this.dispatch=function(t,e){return s.call(i,t,e)},this.commit=function(t,e,r){return c.call(i,t,e,r)},this.strict=n;var l=this._modules.root.state;_(this,l,[],this._modules.root),w(this,l),r.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:v.config.devtools;u&&a(this)},x={state:{configurable:!0}};function m(t,e,r){return e.indexOf(t)<0&&(r&&r.prepend?e.unshift(t):e.push(t)),function(){var r=e.indexOf(t);r>-1&&e.splice(r,1)}}function b(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var r=t.state;_(t,r,[],t._modules.root,!0),w(t,r,e)}function w(t,e,r){var n=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};c(i,(function(e,r){a[r]=h(e,t),Object.defineProperty(t.getters,r,{get:function(){return t._vm[r]},enumerable:!0})}));var o=v.config.silent;v.config.silent=!0,t._vm=new v({data:{$$state:e},computed:a}),v.config.silent=o,t.strict&&P(t),n&&(r&&t._withCommit((function(){n._data.$$state=null})),v.nextTick((function(){return n.$destroy()})))}function _(t,e,r,n,i){var a=!r.length,o=t._modules.getNamespace(r);if(n.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=n),!a&&!i){var s=O(e,r.slice(0,-1)),c=r[r.length-1];t._withCommit((function(){v.set(s,c,n.state)}))}var l=n.context=S(t,o,r);n.forEachMutation((function(e,r){var n=o+r;k(t,n,e,l)})),n.forEachAction((function(e,r){var n=e.root?r:o+r,i=e.handler||e;T(t,n,i,l)})),n.forEachGetter((function(e,r){var n=o+r;C(t,n,e,l)})),n.forEachChild((function(n,a){_(t,e,r.concat(a),n,i)}))}function S(t,e,r){var n=""===e,i={dispatch:n?t.dispatch:function(r,n,i){var a=L(r,n,i),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=e+c),t.dispatch(c,o)},commit:n?t.commit:function(r,n,i){var a=L(r,n,i),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=e+c),t.commit(c,o,s)}};return Object.defineProperties(i,{getters:{get:n?function(){return t.getters}:function(){return A(t,e)}},state:{get:function(){return O(t.state,r)}}}),i}function A(t,e){if(!t._makeLocalGettersCache[e]){var r={},n=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,n)===e){var a=i.slice(n);Object.defineProperty(r,a,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=r}return t._makeLocalGettersCache[e]}function k(t,e,r,n){var i=t._mutations[e]||(t._mutations[e]=[]);i.push((function(e){r.call(t,n.state,e)}))}function T(t,e,r,n){var i=t._actions[e]||(t._actions[e]=[]);i.push((function(e){var i=r.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},e);return u(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}function C(t,e,r,n){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return r(n.state,n.getters,t.state,t.getters)})}function P(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function O(t,e){return e.reduce((function(t,e){return t[e]}),t)}function L(t,e,r){return l(t)&&t.type&&(r=e,e=t,t=t.type),{type:t,payload:e,options:r}}function D(t){v&&t===v||(v=t,r(v))}x.state.get=function(){return this._vm._data.$$state},x.state.set=function(t){0},y.prototype.commit=function(t,e,r){var n=this,i=L(t,e,r),a=i.type,o=i.payload,s=(i.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(s,n.state)})))},y.prototype.dispatch=function(t,e){var r=this,n=L(t,e),i=n.type,a=n.payload,o={type:i,payload:a},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,r.state)}))}catch(l){0}var c=s.length>1?Promise.all(s.map((function(t){return t(a)}))):s[0](a);return new Promise((function(t,e){c.then((function(e){try{r._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,r.state)}))}catch(l){0}t(e)}),(function(t){try{r._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,r.state,t)}))}catch(l){0}e(t)}))}))}},y.prototype.subscribe=function(t,e){return m(t,this._subscribers,e)},y.prototype.subscribeAction=function(t,e){var r="function"===typeof t?{before:t}:t;return m(r,this._actionSubscribers,e)},y.prototype.watch=function(t,e,r){var n=this;return this._watcherVM.$watch((function(){return t(n.state,n.getters)}),e,r)},y.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},y.prototype.registerModule=function(t,e,r){void 0===r&&(r={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),_(this,this.state,t,this._modules.get(t),r.preserveState),w(this,this.state)},y.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var r=O(e.state,t.slice(0,-1));v.delete(r,t[t.length-1])})),b(this)},y.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},y.prototype[[104,111,116,85,112,100,97,116,101].map((function(t){return String.fromCharCode(t)})).join("")]=function(t){this._modules.update(t),b(this,!0)},y.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(y.prototype,x);var M=z((function(t,e){var r={};return R(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=this.$store.state,r=this.$store.getters;if(t){var n=N(this.$store,"mapState",t);if(!n)return;e=n.context.state,r=n.context.getters}return"function"===typeof i?i.call(this,e,r):e[i]},r[n].vuex=!0})),r})),F=z((function(t,e){var r={};return R(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=this.$store.commit;if(t){var a=N(this.$store,"mapMutations",t);if(!a)return;n=a.context.commit}return"function"===typeof i?i.apply(this,[n].concat(e)):n.apply(this.$store,[i].concat(e))}})),r})),I=z((function(t,e){var r={};return R(e).forEach((function(e){var n=e.key,i=e.val;i=t+i,r[n]=function(){if(!t||N(this.$store,"mapGetters",t))return this.$store.getters[i]},r[n].vuex=!0})),r})),E=z((function(t,e){var r={};return R(e).forEach((function(e){var n=e.key,i=e.val;r[n]=function(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=this.$store.dispatch;if(t){var a=N(this.$store,"mapActions",t);if(!a)return;n=a.context.dispatch}return"function"===typeof i?i.apply(this,[n].concat(e)):n.apply(this.$store,[i].concat(e))}})),r})),j=function(t){return{mapState:M.bind(null,t),mapGetters:I.bind(null,t),mapMutations:F.bind(null,t),mapActions:E.bind(null,t)}};function R(t){return $(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function $(t){return Array.isArray(t)||l(t)}function z(t){return function(e,r){return"string"!==typeof e?(r=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,r)}}function N(t,e,r){var n=t._modulesNamespaceMap[r];return n}function U(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var r=t.filter;void 0===r&&(r=function(t,e,r){return!0});var n=t.transformer;void 0===n&&(n=function(t){return t});var i=t.mutationTransformer;void 0===i&&(i=function(t){return t});var a=t.actionFilter;void 0===a&&(a=function(t,e){return!0});var o=t.actionTransformer;void 0===o&&(o=function(t){return t});var c=t.logMutations;void 0===c&&(c=!0);var l=t.logActions;void 0===l&&(l=!0);var u=t.logger;return void 0===u&&(u=console),function(t){var h=s(t.state);"undefined"!==typeof u&&(c&&t.subscribe((function(t,a){var o=s(a);if(r(t,h,o)){var c=q(),l=i(t),f="mutation "+t.type+c;B(u,f,e),u.log("%c prev state","color: #9E9E9E; font-weight: bold",n(h)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",n(o)),W(u)}h=o})),l&&t.subscribeAction((function(t,r){if(a(t,r)){var n=q(),i=o(t),s="action "+t.type+n;B(u,s,e),u.log("%c action","color: #03A9F4; font-weight: bold",i),W(u)}})))}}function B(t,e,r){var n=r?t.groupCollapsed:t.group;try{n.call(t,e)}catch(i){t.log(e)}}function W(t){try{t.groupEnd()}catch(e){t.log("\u2014\u2014 log end \u2014\u2014")}}function q(){var t=new Date;return" @ "+G(t.getHours(),2)+":"+G(t.getMinutes(),2)+":"+G(t.getSeconds(),2)+"."+G(t.getMilliseconds(),3)}function H(t,e){return new Array(e+1).join(t)}function G(t,e){return H("0",e-t.toString().length)+t}var K={Store:y,install:D,version:"3.6.2",mapState:M,mapMutations:F,mapGetters:I,mapActions:E,createNamespacedHelpers:j,createLogger:U};t.exports=K}).call(this,r("c8ba"))},"29ba":function(t,e,r){"use strict";r.r(e);var n=r("ec73"),i=r("a3aa");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"6b39400e",null,!1,n["a"],o);e["default"]=c.exports},"37dc":function(t,e,r){"use strict";(function(t){function r(t,e){return s(t)||o(t,e)||i(t,e)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:d;if(!e)return[t];var n=this._caches[t];return n||(n=y(t,r),this._caches[t]=n),x(n,e)}}]),t}();e.Formatter=p;var g=/^(?:\d)+/,v=/^(?:\w)+/;function y(t,e){var n=r(e,2),i=n[0],a=n[1],o=[],s=0,c="";while(s-1?m:t.indexOf("-hant")>-1||C(t,["-tw","-hk","-mo","-cht"])?b:m;var r=P(t,[w,_,S]);return r||void 0}}var L=function(){function t(e){var r=e.locale,n=e.fallbackLocale,i=e.messages,a=e.watcher,o=e.formater;c(this,t),this.locale=w,this.fallbackLocale=w,this.message={},this.messages={},this.watchers=[],n&&(this.fallbackLocale=n),this.formater=o||T,this.messages=i||{},this.setLocale(r||w),a&&this.watchLocale(a)}return u(t,[{key:"setLocale",value:function(t){var e=this,r=this.locale;this.locale=O(t,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],r!==this.locale&&this.watchers.forEach((function(t){t(e.locale,r)}))}},{key:"getLocale",value:function(){return this.locale}},{key:"watchLocale",value:function(t){var e=this,r=this.watchers.push(t)-1;return function(){e.watchers.splice(r,1)}}},{key:"add",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.messages[t];n?r?Object.assign(n,e):Object.keys(e).forEach((function(t){k(n,t)||(n[t]=e[t])})):this.messages[t]=e}},{key:"f",value:function(t,e,r){return this.formater.interpolate(t,e,r).join("")}},{key:"t",value:function(t,e,r){var n=this.message;return"string"===typeof e?(e=O(e,this.messages),e&&(n=this.messages[e])):r=e,k(n,t)?this.formater.interpolate(n[t],r).join(""):(console.warn("Cannot translate the value of keypath ".concat(t,". Use the value of keypath as default.")),t)}}]),t}();function D(t,e){t.$watchLocale?t.$watchLocale((function(t){e.setLocale(t)})):t.$watch((function(){return t.$locale}),(function(t){e.setLocale(t)}))}function M(){return"undefined"!==typeof uni&&uni.getLocale?uni.getLocale():"undefined"!==typeof t&&t.getLocale?t.getLocale():w}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;if("string"!==typeof t){var i=[e,t];t=i[0],e=i[1]}"string"!==typeof t&&(t=M()),"string"!==typeof r&&(r="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||w);var a=new L({locale:t,fallbackLocale:r,messages:e,watcher:n}),o=function(t,e){if("function"!==typeof getApp)o=function(t,e){return a.t(t,e)};else{var r=!1;o=function(t,e){var n=getApp().$vm;return n&&(n.$locale,r||(r=!0,D(n,a))),a.t(t,e)}}return o(t,e)};return{i18n:a,f:function(t,e,r){return a.f(t,e,r)},t:function(t,e){return o(t,e)},add:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return a.add(t,e,r)},watch:function(t){return a.watchLocale(t)},getLocale:function(){return a.getLocale()},setLocale:function(t){return a.setLocale(t)}}}e.I18n=L;var I,E=function(t){return"string"===typeof t};function j(t,e){return I||(I=new p),W(t,(function(t,r){var n=t[r];return E(n)?!!z(n,e)||void 0:j(n,e)}))}function R(t,e,r){return I||(I=new p),W(t,(function(t,n){var i=t[n];E(i)?z(i,r)&&(t[n]=N(i,e,r)):R(i,e,r)})),t}function $(t,e){var r=e.locale,n=e.locales,i=e.delimiters;if(!z(t,i))return t;I||(I=new p);var a=[];Object.keys(n).forEach((function(t){t!==r&&a.push({locale:t,values:n[t]})})),a.unshift({locale:r,values:n[r]});try{return JSON.stringify(B(JSON.parse(t),a,i),null,2)}catch(o){}return t}function z(t,e){return t.indexOf(e[0])>-1}function N(t,e,r){return I.interpolate(t,e,r).join("")}function U(t,e,r,n){var i=t[e];if(E(i)){if(z(i,n)&&(t[e]=N(i,r[0].values,n),r.length>1)){var a=t[e+"Locales"]={};r.forEach((function(t){a[t.locale]=N(i,t.values,n)}))}}else B(i,r,n)}function B(t,e,r){return W(t,(function(t,n){U(t,n,e,r)})),t}function W(t,e){if(h(t)){for(var r=0;r-1}))):e}}function H(t){var e=[],r=t.split("-");while(r.length)e.push(r.join("-")),r.pop();return e}e.isString=E}).call(this,r("c8ba"))},"3df5":function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={showLoading:function(t){uni.showToast({title:t,icon:"loading",duration:1e5})},hideLoading:function(t){uni.hideToast()},showSuccess:function(t){uni.showToast({title:t,icon:"success",duration:2e3})},showWarning:function(t){uni.showToast({title:t,icon:"none",duration:2e3})},showError:function(t){uni.showToast({title:t,icon:"none",duration:2e3})},askLogin:function(){uni.showModal({title:"\u5c1a\u672a\u767b\u5f55",content:"\u524d\u5f80\u6388\u6743\u767b\u5f55\u9875\u9762\u5417\uff1f",success:function(e){t("log",e," at libs/alert.js:43"),e.confirm&&uni.redirectTo({url:"/pages/login/login"})}})}},n=r;e.default=n}).call(this,r("0de9")["default"])},"3ee0":function(t,e,r){"use strict";r.r(e);var n=r("e617"),i=r("8108");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"0f5ca878",null,!1,n["a"],o);e["default"]=c.exports},"42a5":function(t,e,r){"use strict";r.r(e);var n=r("abde"),i=r("7d14");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"21f077a2",null,!1,n["a"],o);e["default"]=c.exports},"43c9":function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={onLaunch:function(t){this.$auth.getLocalUserInfo(),this.$store.commit("savePath",t.path)},onShow:function(){t("log","-------------- \u5c0f\u7a0b\u5e8f\u663e\u793a --------------"," at App.vue:9")},onHide:function(){t("log","-------------- bye bye --------------"," at App.vue:12")}};e.default=r}).call(this,r("0de9")["default"])},5125:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],i=function(t,e){var r=new Date;r.setTime(1e3*t);var n=r.getFullYear(),i=r.getMonth()+1;i=i<10?"0"+i:i;var a=r.getDate();a=a<10?"0"+a:a;var o=r.getHours();o=o<10?"0"+o:o;var s=r.getMinutes(),c=r.getSeconds();return s=s<10?"0"+s:s,c=c<10?"0"+c:c,"full"==e?n+"-"+i+"-"+a+" "+o+":"+s+":"+c:"y-m-d"==e?n+"-"+i+"-"+a:"h:m"==e?o+":"+s:"h:m:s"==e?o+":"+s+":"+c:[n,i,a,o,s,c]},a={type:["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],range:["\u997c\u72b6\u56fe","\u5706\u73af\u56fe","\u73ab\u7470\u56fe","\u8bcd\u4e91\u56fe","\u6f0f\u6597\u56fe","\u5730\u56fe","\u5706\u5f27\u8fdb\u5ea6\u6761","\u6298\u7ebf\u56fe","\u67f1\u72b6\u56fe","\u5c71\u5cf0\u56fe","\u6761\u72b6\u56fe","\u533a\u57df\u56fe","\u96f7\u8fbe\u56fe","\u4eea\u8868\u76d8","K\u7ebf\u56fe","\u6df7\u5408\u56fe","\u65f6\u95f4\u8f74\u6298\u7ebf","\u65f6\u95f4\u8f74\u533a\u57df","\u6563\u70b9\u56fe","\u6c14\u6ce1\u56fe","\u81ea\u5b9a\u4e49\u7c7b\u578b"],categories:["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],instance:{},option:{},formatter:{yAxisDemo1:function(t,e,r){return t+"\u5143"},yAxisDemo2:function(t,e,r){return t.toFixed(2)},xAxisDemo1:function(t,e,r){return t+"\u5e74"},xAxisDemo2:function(t,e,r){return i(t,"h:m")},seriesDemo1:function(t,e,r,n){return t+"\u5143"},tooltipDemo1:function(t,e,r,n){return 0==r?"\u968f\u4fbf\u7528"+t.data+"\u5e74":"\u5176\u4ed6\u6211\u6ca1\u6539"+t.data+"\u5929"},pieDemo:function(t,e,r,n){if(void 0!==e)return r[e].name+"\uff1a"+r[e].data+"\u5143"}},demotype:{type:"line",color:n,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"curve",width:2}}},pie:{type:"pie",color:n,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:n,padding:[5,5,5,5],rotate:!1,dataLabel:!0,legend:{show:!0,position:"right",lineHeight:25},title:{name:"\u6536\u76ca\u7387",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:n,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:n,extra:{word:{type:"normal",autoColors:!1}}},funnel:{type:"funnel",color:n,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:n,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:n,title:{name:"\u767e\u5206\u6bd4",fontSize:25,color:"#00FF00"},subtitle:{name:"\u9ed8\u8ba4\u6807\u9898",fontSize:15,color:"#666666"},extra:{arcbar:{type:"default",width:12,backgroundColor:"#E9E9E9",startAngle:.75,endAngle:.25,gap:2}}},line:{type:"line",color:n,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"straight",width:2}}},tline:{type:"line",color:n,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}}},tarea:{type:"area",color:n,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}}},column:{type:"column",color:n,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:n,padding:[15,15,0,5],xAxis:{disableGrid:!0},yAxis:{data:[{min:0}]},legend:{},extra:{mount:{type:"mount",widthRatio:1.5}}},bar:{type:"bar",color:n,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:n,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}}},radar:{type:"radar",color:n,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}}},gauge:{type:"gauge",color:n,title:{name:"66Km/H",fontSize:25,color:"#2fc25b",offsetY:50},subtitle:{name:"\u5b9e\u65f6\u901f\u5ea6",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:n,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:n,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:n,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:n,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}}}},o=a;e.default=o},"55c2":function(t,e,r){"use strict";r.r(e);var n=r("cf46"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"56a7":function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","chartsview"),attrs:{_i:0}},[r("view",{staticClass:t._$s(1,"sc","charts-error"),attrs:{_i:1}}),r("view",{staticClass:t._$s(2,"sc","charts-font"),attrs:{_i:2}},[t._v(t._$s(2,"t0-0",t._s(null==t.errorMessage?"\u8bf7\u70b9\u51fb\u91cd\u8bd5":t.errorMessage)))])])},a=[]},5903:function(t,e,r){"use strict";r.r(e);var n=r("f42e"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"5d11":function(t,e,r){"use strict";r.r(e);var n=r("b777"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},6071:function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var n={qiunLoading:r("035b").default,qiunError:r("67c9").default},i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","chartsview"),attrs:{id:t._$s(0,"a-id","ChartBoxId"+t.cid),_i:0}},[t._$s(1,"i",t.mixinDatacomLoading)?r("view",[r("qiun-loading",{attrs:{loadingType:t.loadingType,_i:2}})],1):t._e(),t._$s(3,"i",t.mixinDatacomErrorMessage&&t.errorShow)?r("view",{attrs:{_i:3},on:{click:t.reloading}},[r("qiun-error",{attrs:{errorMessage:t.errorMessage,_i:4}})],1):t._e(),t._$s(5,"i",t.echarts)?[r("view",{directives:[{name:"show",rawName:"v-show",value:t._$s(6,"v-show",t.showchart),expression:"_$s(6,'v-show',showchart)"}],wxsProps:{"change:resize":"echartsResize","change:prop":"echartsOpts"},style:t._$s(6,"s",{background:t.background}),attrs:{"data-directory":t._$s(6,"a-data-directory",t.directory),id:t._$s(6,"a-id","EC"+t.cid),prop:t._$s(6,"change:echartsOpts",t.echartsOpts),resize:t._$s(6,"change:echartsResize",t.echartsResize),_i:6}})]:[r("view",{wxsProps:{"change:prop":"uchartsOpts"},attrs:{id:t._$s(8,"a-id","UC"+t.cid),prop:t._$s(8,"change:uchartsOpts",t.uchartsOpts),_i:8},on:{}},[r("canvas",{directives:[{name:"show",rawName:"v-show",value:t._$s(9,"v-show",t.showchart),expression:"_$s(9,'v-show',showchart)"}],style:t._$s(9,"s",{width:t.cWidth+"px",height:t.cHeight+"px",background:t.background}),attrs:{id:t._$s(9,"a-id",t.cid),canvasId:t._$s(9,"a-canvasId",t.cid),"disable-scroll":t._$s(9,"a-disable-scroll",t.disableScroll),_i:9},on:{error:t._error}})])]],2)},a=[]},6146:function(t,e,r){"use strict";r.r(e);var n=r("a0f2"),i=r("ce04");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"33929875",null,!1,n["a"],o);e["default"]=c.exports},"67c9":function(t,e,r){"use strict";r.r(e);var n=r("56a7"),i=r("cd6d");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);e["default"]=c.exports},"68bd":function(t,e,r){"use strict";r.r(e);var n=r("e449");for(var i in n)"default"!==i&&function(t){r.d(e,t,(function(){return n[t]}))}(i);var a,o,s,c,l=r("f0c5"),u=Object(l["a"])(n["default"],a,o,!1,null,null,null,!1,s,c);e["default"]=u.exports},"69dd":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"loading5",data:function(){return{}}};e.default=n},"6b94":function(t,e,r){"use strict";r.r(e);var n=r("bddf"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"6c87":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r("8bbf")),i=a(r("26cb"));function a(t){return t&&t.__esModule?t:{default:t}}n.default.use(i.default);var o=new i.default.Store({state:{user:null,path:"/pages/index/index",people:{id:null,name:null,tag:null},taskType:""},mutations:{savePath:function(t,e){t.path=e},saveUser:function(t,e){t.user=e},savePeople:function(t,e){t.people=e},saveTaskType:function(t,e){t.taskType=e}},actions:{}}),s=o;e.default=s},"7ab2":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"loading1",data:function(){return{}}};e.default=n},"7d14":function(t,e,r){"use strict";r.r(e);var n=r("07d5"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},8108:function(t,e,r){"use strict";r.r(e);var n=r("7ab2"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"88e0":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=c(r("3ee0")),i=c(r("cab7")),a=c(r("29ba")),o=c(r("6146")),s=c(r("42a5"));function c(t){return t&&t.__esModule?t:{default:t}}var l={components:{Loading1:n.default,Loading2:i.default,Loading3:a.default,Loading4:o.default,Loading5:s.default},name:"qiun-loading",props:{loadingType:{type:Number,default:2}},data:function(){return{}}};e.default=l},"899b":function(t,e,r){if("undefined"===typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(t){var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))}),"undefined"!==typeof uni&&uni&&uni.requireGlobal){var n=uni.requireGlobal();ArrayBuffer=n.ArrayBuffer,Int8Array=n.Int8Array,Uint8Array=n.Uint8Array,Uint8ClampedArray=n.Uint8ClampedArray,Int16Array=n.Int16Array,Uint16Array=n.Uint16Array,Int32Array=n.Int32Array,Uint32Array=n.Uint32Array,Float32Array=n.Float32Array,Float64Array=n.Float64Array,BigInt64Array=n.BigInt64Array,BigUint64Array=n.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),__definePage("pages/index/index",(function(){return Vue.extend(r("aaf3").default)})),__definePage("pages/user/user",(function(){return Vue.extend(r("0e20").default)})),__definePage("pages/login/login",(function(){return Vue.extend(r("a270").default)}))},"8bbf":function(t,e){t.exports=Vue},"8bf4":function(t,e,r){"use strict";(function(t){function r(t,e){return s(t)||o(t,e)||i(t,e)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?e-1:0),n=1;nt.end.x||e.end.xt.start.y||e.start.y1&&(i.extra.mount.widthRatio>2&&(i.extra.mount.widthRatio=2),o+=(i.extra.mount.widthRatio-1)*r.eachSpacing);var s=e;return e>=0?(s=0,t.uevent.trigger("scrollLeft"),t.scrollOption.position="left",i.xAxis.scrollPosition="left"):Math.abs(e)>=o-a?(s=a-o,t.uevent.trigger("scrollRight"),t.scrollOption.position="right",i.xAxis.scrollPosition="right"):(t.scrollOption.position=e,i.xAxis.scrollPosition=e),s}function g(t,e,r){function n(t){while(t<0)t+=2*Math.PI;while(t>2*Math.PI)t-=2*Math.PI;return t}return t=n(t),e=n(e),r=n(r),e>r&&(r+=2*Math.PI,t=e&&t<=r}function v(t,e){function r(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y))}function n(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].x>=Math.max(t[e-1].x,t[e+1].x)||t[e].x<=Math.min(t[e-1].x,t[e+1].x))}var i=.2,a=.2,o=null,s=null,c=null,l=null;if(e<1?(o=t[0].x+(t[1].x-t[0].x)*i,s=t[0].y+(t[1].y-t[0].y)*i):(o=t[e].x+(t[e+1].x-t[e-1].x)*i,s=t[e].y+(t[e+1].y-t[e-1].y)*i),e>t.length-3){var u=t.length-1;c=t[u].x-(t[u].x-t[u-1].x)*a,l=t[u].y-(t[u].y-t[u-1].y)*a}else c=t[e+1].x-(t[e+2].x-t[e].x)*a,l=t[e+1].y-(t[e+2].y-t[e].y)*a;return r(t,e+1)&&(l=t[e+1].y),r(t,e)&&(s=t[e].y),n(t,e+1)&&(c=t[e+1].x),n(t,e)&&(o=t[e].x),(s>=Math.max(t[e].y,t[e+1].y)||s<=Math.min(t[e].y,t[e+1].y))&&(s=t[e].y),(l>=Math.max(t[e].y,t[e+1].y)||l<=Math.min(t[e].y,t[e+1].y))&&(l=t[e+1].y),(o>=Math.max(t[e].x,t[e+1].x)||o<=Math.min(t[e].x,t[e+1].x))&&(o=t[e].x),(c>=Math.max(t[e].x,t[e+1].x)||c<=Math.min(t[e].x,t[e+1].x))&&(c=t[e+1].x),{ctrA:{x:o,y:s},ctrB:{x:c,y:l}}}function y(t,e,r){return{x:r.x+t,y:r.y-e}}function x(t,e){if(e)while(u.isCollision(t,e))t.start.x>0?t.start.y--:t.start.x<0||t.start.y>0?t.start.y++:t.start.y--;return t}function m(t,e,r){var n=[];if(t.length>0&&t[0].data.constructor.toString().indexOf("Array")>-1){e._pieSeries_=t;for(var i=t[0].data,a=0;a=1e4?1e3:n>=1e3?100:n>=100?10:n>=10?5:n>=1?1:n>=.1?.1:n>=.01?.01:n>=.001?.001:n>=1e-4?1e-4:n>=1e-5?1e-5:1e-6,{minRange:f(t,"lower",r),maxRange:f(e,"upper",r)}}function S(t,e,r){var n=0;if(t=String(t),!1!==r&&void 0!==r&&r.setFontSize&&r.measureText)return r.setFontSize(e),r.measureText(t).width;t=t.split("");for(var i=0;i-1;if(a)for(var o=F(t),s=0;s5&&void 0!==arguments[5]?arguments[5]:{},o=e.chartData.calPoints?e.chartData.calPoints:[],s={};if(n.length>0){for(var c=[],l=0;l0&&(n=i[r]),{text:a.formatter?a.formatter(t,n,r,e):t.name+": "+t.data,color:t.color}})),f={x:Math.round(s.x),y:Math.round(s.y)};return{textList:h,offset:f}}function D(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.chartData.xAxisPoints[r]+e.chartData.eachSpacing/2,o=t.map((function(t){return{text:i.formatter?i.formatter(t,n[r],r,e):t.name+": "+t.data,color:t.color,disableLegend:!!t.disableLegend}}));o=o.filter((function(t){if(!0!==t.disableLegend)return t}));var s={x:Math.round(a),y:0};return{textList:o,offset:s}}function M(t,e,r,n,i,a){var o=r.chartData.calPoints,s=a.color.upFill,c=a.color.downFill,l=[s,s,c,s],u=[];e.map((function(e){0==n?e.data[1]-e.data[0]<0?l[1]=c:l[1]=s:(e.data[0]t[n-1][1]&&(l[2]=s),e.data[3]4&&void 0!==arguments[4]?arguments[4]:0,a={index:-1,group:[]},o=r.chartData.eachSpacing/2,s=[];if(e&&e.length>0){if(r.categories){for(var c=1;ce&&(a.index=r)}));else{for(var l=Array(e.length),u=0;u4&&void 0!==arguments[4]?arguments[4]:0,a={index:-1,group:[]},o=r.chartData.eachSpacing/2,s=r.chartData.yAxisPoints;return e&&e.length>0&&$(t,r,n)&&s.forEach((function(e,r){t.y+i+o>e&&(a.index=r)})),a}function j(t,e,r){var n=-1,i=0;if(R(t,e.area)){for(var a=e.points,o=-1,s=0,c=a.length;sh[0]-i&&t.xh[1]-i&&t.ye.start.x&&t.xe.start.y&&t.y=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function z(t,e,r){var n=2*Math.PI/r,i=-1;if(H(t,e.center,e.radius)){var a=function(t){return t<0&&(t+=2*Math.PI),t>2*Math.PI&&(t-=2*Math.PI),t},o=Math.atan2(e.center.y-t.y,t.x-e.center.x);o*=-1,o<0&&(o+=2*Math.PI);var s=e.angleList.map((function(t){return t=a(-1*t),t}));s.forEach((function(t,e){var r=a(t-n/2),s=a(t+n/2);s=r&&o<=s||o+2*Math.PI>=r&&o+2*Math.PI<=s)&&(i=e)}))}return i}function N(t,e){for(var r=-1,n=0,i=e.series.length;na.funnelArea[0]&&t.xa.funnelArea[1]&&t.ya.area[0]&&t.xa.area[1]&&t.ye.width-e.area[1]-e.area[3]?(f.push(g),p.push(d-e.legend.itemGap*e.pix),d=m,g=[y]):(d+=m,g.push(y))}if(g.length){f.push(g),p.push(d-e.legend.itemGap*e.pix),a.widthArr=p;var b=Math.max.apply(null,p);switch(e.legend.float){case"left":a.area.start.x=e.area[3],a.area.end.x=e.area[3]+b+2*o;break;case"right":a.area.start.x=e.width-e.area[1]-b-2*o,a.area.end.x=e.width-e.area[1];break;default:a.area.start.x=(e.width-b)/2-o,a.area.end.x=(e.width+b)/2+o}a.area.width=b+2*o,a.area.wholeWidth=b+2*o,a.area.height=f.length*h+2*o,a.area.wholeHeight=f.length*h+2*o+2*s,a.points=f}}else{var w=t.length,_=e.height-e.area[0]-e.area[2]-2*s-2*o,A=Math.min(Math.floor(_/h),w);switch(a.area.height=A*h+2*o,a.area.wholeHeight=A*h+2*o,e.legend.float){case"top":a.area.start.y=e.area[0]+s,a.area.end.y=e.area[0]+s+a.area.height;break;case"bottom":a.area.start.y=e.height-e.area[2]-s-a.area.height,a.area.end.y=e.height-e.area[2]-s;break;default:a.area.start.y=(e.height-a.area.height)/2,a.area.end.y=(e.height+a.area.height)/2}for(var k=w%A===0?w/A:Math.floor(w/A+1),T=[],C=0;CD&&(D=F)}a.widthArr.push(D),a.heightArr.push(L.length*h+2*o)}for(var I=0,E=0;E4&&void 0!==arguments[4]?arguments[4]:-1;i="stack"==n?k(t,e.categories.length):A(t);var o=[];i=i.filter((function(t){return"object"===typeof t&&null!==t?t.constructor.toString().indexOf("Array")>-1?null!==t:null!==t.value:null!==t})),i.map((function(t){"object"===typeof t?t.constructor.toString().indexOf("Array")>-1?"candle"==e.type?t.map((function(t){o.push(t)})):o.push(t[0]):o.push(t.value):o.push(t)}));var s=0,c=0;if(o.length>0&&(s=Math.min.apply(this,o),c=Math.max.apply(this,o)),a>-1?("number"===typeof e.xAxis.data[a].min&&(s=Math.min(e.xAxis.data[a].min,s)),"number"===typeof e.xAxis.data[a].max&&(c=Math.max(e.xAxis.data[a].max,c))):("number"===typeof e.xAxis.min&&(s=Math.min(e.xAxis.min,s)),"number"===typeof e.xAxis.max&&(c=Math.max(e.xAxis.max,c))),s===c){var l=c||10;c+=l}for(var u=s,h=c,f=[],d=(h-u)/e.xAxis.splitNumber,p=0;p<=e.xAxis.splitNumber;p++)f.push(u+d*p);return f}function V(t,e,r,n){var i=l({},{type:""},e.extra.bar),a={angle:0,xAxisHeight:r.xAxisHeight};a.ranges=X(t,e,r,i.type),a.rangesFormat=a.ranges.map((function(t){return t=u.toFixed(t,2),t}));var o=a.ranges.map((function(t){return t=u.toFixed(t,2),t}));a=Object.assign(a,ht(o,e,r));var s=a.eachSpacing,c=o.map((function(t){return S(t,e.xAxis.fontSize*e.pix||r.fontSize,n)})),h=Math.max.apply(this,c);return h+2*r.xAxisTextPadding>s&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*r.xAxisTextPadding+h*Math.sin(a.angle)),!0===e.xAxis.disabled&&(a.xAxisHeight=0),a}function Y(t,e,r,n,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,A(n))),c=[],l=function(i){var o=n[i],l={};l.color=o.color,l.legendShape=o.legendShape,l.pointShape=o.pointShape,l.data=[],o.data.forEach((function(n,i){var o={};o.angle=t[i],o.proportion=n/s,o.value=n,o.position=y(r*o.proportion*a*Math.cos(o.angle),r*o.proportion*a*Math.sin(o.angle),e),l.data.push(o)})),c.push(l)},u=0;u2&&void 0!==arguments[2]?arguments[2]:1,n=0,i=0,a=0;a4&&void 0!==arguments[4]?arguments[4]:1;t=t.sort((function(t,e){return parseInt(e.data)-parseInt(t.data)}));for(var 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==r&&(r=.999999);for(var n=0;n=2&&(i._proportion_=i._proportion_%2)}return t}function rt(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;1==r&&(r=.999999);for(var n=0;n=2&&(i._proportion_=i._proportion_%2)}return t}function nt(t,e,r){for(var n=e-r+1,i=e,a=0;a=2&&(t[a]._endAngle_=t[a]._endAngle_%2),i=t[a]._endAngle_;return t}function it(t,e,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=0;i=r.oldData?a._proportion_=(a._endAngle_-a._oldAngle_)*n+r.oldAngle:a._proportion_=a._oldAngle_-(a._oldAngle_-a._endAngle_)*n,a._proportion_>=2&&(a._proportion_=a._proportion_%2)}return t}function at(t,e,r,n){t=Q(t);for(var i=0,a=0;a0&&(t.width=Math.min(t.width,+a.extra.mix.column.width*a.pix)),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(t.width=Math.min(t.width,+a.extra.column.width*a.pix)),t.width<=0&&(t.width=1),t.x+=(n+.5-r/2)*(t.width+i),t}))}function st(t,e,r,n,i,a){return t.map((function(t){if(null===t)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,e/r),o=Math.min(o,e/r),t.width=Math.ceil((e-2*o-i*(r-1))/r),a.extra.bar&&a.extra.bar.width&&+a.extra.bar.width>0&&(t.width=Math.min(t.width,+a.extra.bar.width*a.pix)),t.width<=0&&(t.width=1),t.y+=(n+.5-r/2)*(t.width+i),t}))}function ct(t,e,r,n,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return t.map((function(t){return null===t?null:(t.width=e-2*s,a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(t.width=Math.min(t.width,+a.extra.column.width*a.pix)),n>0&&(t.width-=o),t)}))}function lt(t,e,r,n,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return t.map((function(t,r){return null===t?null:(t.width=Math.ceil(e-2*s),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(t.width=Math.min(t.width,+a.extra.column.width*a.pix)),t.width<=0&&(t.width=1),t)}))}function ut(t,e,r,n,i,a,o){var s=a.extra.bar.categoryGap*a.pix||0;return t.map((function(t,r){return null===t?null:(t.width=Math.ceil(e-2*s),a.extra.bar&&a.extra.bar.width&&+a.extra.bar.width>0&&(t.width=Math.min(t.width,+a.extra.bar.width*a.pix)),t.width<=0&&(t.width=1),t)}))}function ht(t,e,r){var n=e.width-e.area[1]-e.area[3],i=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;("line"==e.type||"area"==e.type||"scatter"==e.type||"bubble"==e.type||"bar"==e.type)&&i>1&&"justify"==e.xAxis.boundaryGap&&(i-=1);var a=0;"mount"==e.type&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),a=e.extra.mount.widthRatio-1,i+=a);var o=n/i,s=[],c=e.area[3],l=e.width-e.area[1];return t.forEach((function(t,e){s.push(c+a/2*o+e*o)})),"justify"!==e.xAxis.boundaryGap&&(!0===e.enableScroll?s.push(c+a*o+t.length*o):s.push(l)),{xAxisPoints:s,startX:c,endX:l,eachSpacing:o}}function ft(t,e,r,n,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 t.forEach((function(t,o){if(null===t)c.push(null);else{var u=[];t.forEach((function(t,c){var h={};h.x=n[o]+Math.round(i/2);var f=t.value||t,d=l*(f-e)/(r-e);d*=s,h.y=a.height-Math.round(d)-a.area[2],u.push(h)})),c.push(u)}})),c}function dt(t,e,r,n,i,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,c="center";"line"!=a.type&&"area"!=a.type&&"scatter"!=a.type&&"bubble"!=a.type||(c=a.xAxis.boundaryGap);var l=[],u=a.height-a.area[0]-a.area[2],h=a.width-a.area[1]-a.area[3];return t.forEach((function(t,o){if(null===t)l.push(null);else{var f={};f.color=t.color,f.x=n[o];var d,p,g,v=t;if("object"===typeof t&&null!==t)if(t.constructor.toString().indexOf("Array")>-1)d=[].concat(a.chartData.xAxisData.ranges),p=d.shift(),g=d.pop(),v=t[1],f.x=a.area[3]+h*(t[0]-p)/(g-p),"bubble"==a.type&&(f.r=t[2],f.t=t[3]);else v=t.value;"center"==c&&(f.x+=i/2);var y=u*(v-e)/(r-e);y*=s,f.y=a.height-y-a.area[2],l.push(f)}})),l}function pt(t,e,r,n,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],u=(a.width,a.area[1],a.area[3],i*o.widthRatio);return t.forEach((function(t,o){if(null===t)c.push(null);else{var h={};h.color=t.color,h.x=n[o],h.x+=i/2;var f=t.data,d=l*(f-e)/(r-e);d*=s,h.y=a.height-d-a.area[2],h.value=f,h.width=u,c.push(h)}})),c}function gt(t,e,r,n,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],a.width-a.area[1]-a.area[3]);return t.forEach((function(t,i){if(null===t)c.push(null);else{var o={};o.color=t.color,o.y=n[i];var u=t;"object"===typeof t&&null!==t&&(u=t.value);var h=l*(u-e)/(r-e);h*=s,o.height=h,o.value=u,o.x=h+a.area[3],c.push(o)}})),c}function vt(t,e,r,n,i,a,o,s,c){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,u=[],h=a.height-a.area[0]-a.area[2];return t.forEach((function(t,o){if(null===t)u.push(null);else{var f={};if(f.color=t.color,f.x=n[o]+Math.round(i/2),s>0){for(var d=0,p=0;p<=s;p++)d+=c[p].data[o];var g=d-t,v=h*(d-e)/(r-e),y=h*(g-e)/(r-e)}else d=t,v=h*(d-e)/(r-e),y=0;var x=y;v*=l,x*=l,f.y=a.height-Math.round(v)-a.area[2],f.y0=a.height-Math.round(x)-a.area[2],u.push(f)}})),u}function yt(t,e,r,n,i,a,o,s,c){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,u=[],h=a.width-a.area[1]-a.area[3];return t.forEach((function(t,i){if(null===t)u.push(null);else{var o={};if(o.color=t.color,o.y=n[i],s>0){for(var f=0,d=0;d<=s;d++)f+=c[d].data[i];var p=f-t,g=h*(f-e)/(r-e),v=h*(p-e)/(r-e)}else f=t,g=h*(f-e)/(r-e),v=0;var y=v;g*=l,y*=l,o.height=g-y,o.x=a.area[3]+g,o.x0=a.area[3]+y,u.push(o)}})),u}function xt(t,e,r,n,i){var a;a="stack"==n?k(t,e.categories.length):A(t);var o=[];a=a.filter((function(t){return"object"===typeof t&&null!==t?t.constructor.toString().indexOf("Array")>-1?null!==t:null!==t.value:null!==t})),a.map((function(t){"object"===typeof t?t.constructor.toString().indexOf("Array")>-1?"candle"==e.type?t.map((function(t){o.push(t)})):o.push(t[1]):o.push(t.value):o.push(t)}));var s=i.min||0,c=i.max||0;o.length>0&&(s=Math.min.apply(this,o),c=Math.max.apply(this,o)),s===c&&(0==c?c=10:s=0);for(var l=_(s,c),u=void 0===i.min||null===i.min?l.minRange:i.min,h=void 0===i.max||null===i.max?l.maxRange:i.max,f=[],d=(h-u)/e.yAxis.splitNumber,p=0;p<=e.yAxis.splitNumber;p++)f.push(u+d*p);return f.reverse()}function mt(t,e,r,n){var i=l({},{type:""},e.extra.column),a=e.yAxis.data.length,o=new Array(a);if(a>0){for(var s=0;s-1?a[s][1]:a[s].value);var u=e.formatter?e.formatter(l,s,e,i):l;n.setTextAlign("center"),n.fillText(String(u),t.x,t.y-4+o*i.pix),n.closePath(),n.stroke(),n.setTextAlign("left")}}))}function Tt(t,e,r,n,i){e.data;var a=e.textOffset?e.textOffset:0;t.forEach((function(t,o){if(null!==t){n.beginPath();var s=e[o].textSize?e[o].textSize*i.pix:r.fontSize;n.setFontSize(s),n.setFillStyle(e[o].textColor||i.fontColor);var c=t.value,l=e[o].formatter?e[o].formatter(c,o,e,i):c;n.setTextAlign("center"),n.fillText(String(l),t.x,t.y-4+a*i.pix),n.closePath(),n.stroke(),n.setTextAlign("left")}}))}function Ct(t,e,r,n,i){var a=e.data;e.textOffset&&e.textOffset;t.forEach((function(t,o){if(null!==t){n.beginPath();var s=e.textSize?e.textSize*i.pix:r.fontSize;n.setFontSize(s),n.setFillStyle(e.textColor||i.fontColor);var c=a[o];"object"===typeof a[o]&&null!==a[o]&&(c=a[o].value);var l=e.formatter?e.formatter(c,o,e,i):c;n.setTextAlign("left"),n.fillText(String(l),t.x+4*i.pix,t.y+s/2-3),n.closePath(),n.stroke()}}))}function Pt(t,e,r,n,i,a){e-=t.width/2+t.labelOffset*n.pix,e=e<10?10:e;for(var o=t.startAngle-t.endAngle+1,s=o/t.splitLine.splitNumber,c=t.endNumber-t.startNumber,l=c/t.splitLine.splitNumber,u=t.startAngle,h=t.startNumber,f=0;f=2&&(u%=2),h+=l}}function Ot(t,e,r,n,i,a){var o=n.extra.radar||{};t.forEach((function(t,s){if(!0===o.labelPointShow&&""!==n.categories[s]){var c={x:e*Math.cos(t),y:e*Math.sin(t)},l=y(c.x,c.y,r);a.setFillStyle(o.labelPointColor),a.beginPath(),a.arc(l.x,l.y,o.labelPointRadius*n.pix,0,2*Math.PI,!1),a.closePath(),a.fill()}var h={x:(e+i.radarLabelTextMargin*n.pix)*Math.cos(t),y:(e+i.radarLabelTextMargin*n.pix)*Math.sin(t)},f=y(h.x,h.y,r),d=f.x,p=f.y;u.approximatelyEqual(h.x,0)?d-=S(n.categories[s]||"",i.fontSize,a)/2:h.x<0&&(d-=S(n.categories[s]||"",i.fontSize,a)),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelColor||n.fontColor),a.fillText(n.categories[s]||"",d,p+i.fontSize/2),a.closePath(),a.stroke()}))}function Lt(t,e,r,n,i,a){for(var o=r.pieChartLinePadding,s=[],c=null,l=t.map((function(r,n){var i=r.formatter?r.formatter(r,n,t,e):u.toFixed(100*r._proportion_.toFixed(4))+"%";i=r.labelText?r.labelText:i;var a=2*Math.PI-(r._start_+2*Math.PI*r._proportion_/2);r._rose_proportion_&&(a=2*Math.PI-(r._start_+2*Math.PI*r._rose_proportion_/2));var o=r.color,s=r._radius_;return{arc:a,text:i,color:o,radius:s,textColor:r.textColor,textSize:r.textSize,labelShow:r.labelShow}})),h=0;h=0?d+r.pieChartTextPadding:d-r.pieChartTextPadding,b=p,w=S(f.text,f.textSize*e.pix||r.fontSize,n),_=b;c&&u.isSameXCoordinateArea(c.start,{x:m})&&(_=m>0?Math.min(b,c.start.y):d<0||b>0?Math.max(b,c.start.y):Math.min(b,c.start.y)),m<0&&(m-=w);var A={lineStart:{x:g,y:v},lineEnd:{x:d,y:p},start:{x:m,y:_},width:w,height:r.fontSize,text:f.text,color:f.color,textColor:f.textColor,textSize:f.textSize};c=x(A,c),s.push(c)}for(var k=0;ki?i:a.activeWidth;var o=e.area[0],s=e.height-e.area[2];n.beginPath(),n.setFillStyle(h(a.activeBgColor,a.activeBgOpacity)),n.rect(t-a.activeWidth/2,o,a.activeWidth,s-o),n.closePath(),n.fill(),n.setFillStyle("#FFFFFF")}function Et(t,e,r,n,i){var a=l({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.bar),o=e.area[3],s=e.width-e.area[1];n.beginPath(),n.setFillStyle(h(a.activeBgColor,a.activeBgOpacity)),n.rect(o,t-i/2,s-o,i),n.closePath(),n.fill(),n.setFillStyle("#FFFFFF")}function jt(t,e,r,n,i,a,o){var s=l({},{showBox:!0,showArrow:!0,showCategory:!1,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,fontColor:"#FFFFFF",splitLine:!0},r.extra.tooltip);1==s.showCategory&&r.categories&&t.unshift({text:r.categories[r.tooltip.index],color:null});var c=4*r.pix,u=5*r.pix,f=s.showArrow?8*r.pix:0,d=!1;"line"!=r.type&&"mount"!=r.type&&"area"!=r.type&&"candle"!=r.type&&"mix"!=r.type||1==s.splitLine&&Dt(r.tooltip.offset.x,r,n,i),e=l({x:0,y:0},e),e.y-=8*r.pix;var p=t.map((function(t){return S(t.text,n.fontSize,i)})),g=c+u+4*n.toolTipPadding+Math.max.apply(null,p),v=2*n.toolTipPadding+t.length*n.toolTipLineHeight;if(0!=s.showBox){e.x-Math.abs(r._scrollDistance_||0)+f+g>r.width&&(d=!0),v+e.y>r.height&&(e.y=r.height-v),i.beginPath(),i.setFillStyle(h(s.bgColor||n.toolTipBackground,s.bgOpacity||n.toolTipOpacity)),i.setLineWidth(s.borderWidth*r.pix),i.setStrokeStyle(h(s.borderColor,s.borderOpacity));var y=s.borderRadius;d?(s.showArrow&&(i.moveTo(e.x,e.y+10*r.pix),i.lineTo(e.x-f,e.y+10*r.pix+5*r.pix)),i.arc(e.x-f-y,e.y+v-y,y,0,Math.PI/2,!1),i.arc(e.x-f-Math.round(g)+y,e.y+v-y,y,Math.PI/2,Math.PI,!1),i.arc(e.x-f-Math.round(g)+y,e.y+y,y,-Math.PI,-Math.PI/2,!1),i.arc(e.x-f-y,e.y+y,y,-Math.PI/2,0,!1),s.showArrow&&(i.lineTo(e.x-f,e.y+10*r.pix-5*r.pix),i.lineTo(e.x,e.y+10*r.pix))):(s.showArrow&&(i.moveTo(e.x,e.y+10*r.pix),i.lineTo(e.x+f,e.y+10*r.pix-5*r.pix)),i.arc(e.x+f+y,e.y+y,y,-Math.PI,-Math.PI/2,!1),i.arc(e.x+f+Math.round(g)-y,e.y+y,y,-Math.PI/2,0,!1),i.arc(e.x+f+Math.round(g)-y,e.y+v-y,y,0,Math.PI/2,!1),i.arc(e.x+f+y,e.y+v-y,y,Math.PI/2,Math.PI,!1),s.showArrow&&(i.lineTo(e.x+f,e.y+10*r.pix+5*r.pix),i.lineTo(e.x,e.y+10*r.pix))),i.closePath(),i.fill(),s.borderWidth>0&&i.stroke(),t.forEach((function(t,r){if(null!==t.color){i.beginPath(),i.setFillStyle(t.color);var a=e.x+f+2*n.toolTipPadding,o=e.y+(n.toolTipLineHeight-n.fontSize)/2+n.toolTipLineHeight*r+n.toolTipPadding+1;d&&(a=e.x-g-f+2*n.toolTipPadding),i.fillRect(a,o,c,n.fontSize),i.closePath()}})),t.forEach((function(t,r){var a=e.x+f+2*n.toolTipPadding+c+u;d&&(a=e.x-g-f+2*n.toolTipPadding+ +c+u);var o=e.y+(n.toolTipLineHeight-n.fontSize)/2+n.toolTipLineHeight*r+n.toolTipPadding;i.beginPath(),i.setFontSize(n.fontSize),i.setFillStyle(s.fontColor),i.fillText(t.text,a,o+n.fontSize),i.closePath(),i.stroke()}))}}function Rt(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=l({},{type:"group",width:c/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},e.extra.column),f=[];i.save();var d=-2,p=s.length+2;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),d=Math.floor(-e._scrollDistance_/c)-2,p=d+e.xAxis.itemCount+4),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===a&&It(e.tooltip.offset.x,e,n,i,c),u.customColor=w(u.linearType,u.customColor,t,n),t.forEach((function(o,l){var g,v,y;g=[].concat(e.chartData.yAxisData.ranges[o.index]),v=g.pop(),y=g.shift();var x=o.data;switch(u.type){case"group":var m=dt(x,v,y,s,c,e,n,a),b=vt(x,v,y,s,c,e,n,l,t,a);f.push(b),m=ot(m,c,t.length,l,n,e);for(var w=0;wd&&wR?R:F,I=I>R?R:I,E=E>R?R:E,j=j>R?R:j,F=F<0?0:F,I=I<0?0:I,E=E<0?0:E,j=j<0?0:j,i.arc(P+F,O+F,F,-Math.PI,-Math.PI/2),i.arc(P+L-I,O+I,I,-Math.PI/2,0),i.arc(P+L-E,O+D-E,E,0,Math.PI/2),i.arc(P+j,O+D-j,j,Math.PI/2,Math.PI)}else i.moveTo(S,_.y),i.lineTo(S+_.width,_.y),i.lineTo(S+_.width,e.height-e.area[2]),i.lineTo(S,e.height-e.area[2]),i.lineTo(S,_.y),i.setLineWidth(1),i.setStrokeStyle(T);i.setFillStyle(k),i.closePath(),i.fill()}}break;case"stack":m=vt(x,v,y,s,c,e,n,l,t,a);f.push(m),m=lt(m,c,t.length,l,n,e,t);for(var $=0;$d&&$0&&(A-=N),i.setFillStyle(k),i.moveTo(S,z.y),i.fillRect(S,z.y,z.width,A),i.closePath(),i.fill()}}break;case"meter":m=dt(x,v,y,s,c,e,n,a);f.push(m),m=ct(m,c,t.length,l,n,e,u.meterBorder);for(var U=0;Ud&&U0&&(i.setStrokeStyle(o.color),i.setLineWidth(u.meterBorder*e.pix)),0==l?i.setFillStyle(u.meterFillColor):i.setFillStyle(B.color||o.color);S=B.x-B.width/2,A=e.height-B.y-e.area[2];if(u.barBorderRadius&&4===u.barBorderRadius.length||!0===u.barBorderCircle){var W=S,q=B.y,H=B.width,G=e.height-e.area[2]-B.y;u.barBorderCircle&&(u.barBorderRadius=[H/2,H/2,0,0]);var K=r(u.barBorderRadius,4),J=K[0],X=K[1],V=K[2],Y=K[3],Q=Math.min(H/2,G/2);J=J>Q?Q:J,X=X>Q?Q:X,V=V>Q?Q:V,Y=Y>Q?Q:Y,J=J<0?0:J,X=X<0?0:X,V=V<0?0:V,Y=Y<0?0:Y,i.arc(W+J,q+J,J,-Math.PI,-Math.PI/2),i.arc(W+H-X,q+X,X,-Math.PI/2,0),i.arc(W+H-V,q+G-V,V,0,Math.PI/2),i.arc(W+Y,q+G-Y,Y,Math.PI/2,Math.PI),i.fill()}else i.moveTo(S,B.y),i.lineTo(S+B.width,B.y),i.lineTo(S+B.width,e.height-e.area[2]),i.lineTo(S,e.height-e.area[2]),i.lineTo(S,B.y),i.fill();0==l&&u.meterBorder>0&&(i.closePath(),i.stroke())}}break}})),!1!==e.dataLabel&&1===a&&t.forEach((function(r,o){var l,h,f;l=[].concat(e.chartData.yAxisData.ranges[r.index]),h=l.pop(),f=l.shift();var d=r.data;switch(u.type){case"group":var p=dt(d,h,f,s,c,e,n,a);p=ot(p,c,t.length,o,n,e),kt(p,r,n,i,e);break;case"stack":p=vt(d,h,f,s,c,e,n,o,t,a);kt(p,r,n,i,e);break;case"meter":p=dt(d,h,f,s,c,e,n,a);kt(p,r,n,i,e);break}})),i.restore(),{xAxisPoints:s,calPoints:f,eachSpacing:c}}function $t(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=l({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:!1,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},e.extra.mount);u.widthRatio=u.widthRatio<=0?0:u.widthRatio,u.widthRatio=u.widthRatio>=2?2:u.widthRatio;i.save();var f,d,p,g=-2,v=s.length+2;e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),g=Math.floor(-e._scrollDistance_/c)-2,v=g+e.xAxis.itemCount+4),u.customColor=w(u.linearType,u.customColor,t,n),f=[].concat(e.chartData.yAxisData.ranges[0]),d=f.pop(),p=f.shift();var y=pt(t,d,p,s,c,e,u,a);switch(u.type){case"bar":for(var x=0;xg&&xE?E:D,M=M>E?E:M,F=F>E?E:F,I=I>E?E:I,D=D<0?0:D,M=M<0?0:M,F=F<0?0:F,I=I<0?0:I,i.arc(T+D,C+D,D,-Math.PI,-Math.PI/2),i.arc(T+P-M,C+M,M,-Math.PI/2,0),i.arc(T+P-F,C+O-F,F,0,Math.PI/2),i.arc(T+I,C+O-I,I,Math.PI/2,Math.PI)}else i.moveTo(b,m.y),i.lineTo(b+m.width,m.y),i.lineTo(b+m.width,e.height-e.area[2]),i.lineTo(b,e.height-e.area[2]),i.lineTo(b,m.y);i.setStrokeStyle(A),i.setFillStyle(S),u.borderWidth>0&&(i.setLineWidth(u.borderWidth*e.pix),i.closePath(),i.stroke()),i.fill()}}break;case"triangle":for(var j=0;jg&&j0&&(i.setLineWidth(u.borderWidth*e.pix),i.stroke()),i.fill()}}break;case"mount":for(var $=0;$g&&$0&&(i.setLineWidth(u.borderWidth*e.pix),i.stroke()),i.fill()}}break;case"sharp":for(var N=0;Ng&&N0&&(i.setLineWidth(u.borderWidth*e.pix),i.stroke()),i.fill()}}break}if(!1!==e.dataLabel&&1===a){var B,W,q;B=[].concat(e.chartData.yAxisData.ranges[0]),W=B.pop(),q=B.shift();y=pt(t,W,q,s,c,e,u,a);Tt(y,t,n,i,e)}return i.restore(),{xAxisPoints:s,calPoints:y,eachSpacing:c}}function zt(t,e,n,i){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=[],s=(e.height-e.area[0]-e.area[2])/e.categories.length,c=0;cd&&wR?R:F,I=I>R?R:I,E=E>R?R:E,j=j>R?R:j,F=F<0?0:F,I=I<0?0:I,E=E<0?0:E,j=j<0?0:j,i.arc(P+j,L+j,j,-Math.PI,-Math.PI/2),i.arc(_.x-F,L+F,F,-Math.PI/2,0),i.arc(_.x-I,L+O-I,I,0,Math.PI/2),i.arc(P+E,L+O-E,E,Math.PI/2,Math.PI)}else i.moveTo(S,A),i.lineTo(_.x,A),i.lineTo(_.x,A+_.width),i.lineTo(S,A+_.width),i.lineTo(S,A),i.setLineWidth(1),i.setStrokeStyle(T);i.setFillStyle(k),i.closePath(),i.fill()}}break;case"stack":m=yt(x,v,y,o,s,e,n,l,t,a);f.push(m),m=ut(m,s,t.length,l,n,e,t);for(var $=0;$d&&$5&&void 0!==arguments[5]?arguments[5]:1,o=l({},{color:{},average:{}},r.extra.candle);o.color=l({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},o.color),o.average=l({},{show:!1,name:[],day:[],color:n.color},o.average),r.extra.candle=o;var s=r.chartData.xAxisData,c=s.xAxisPoints,u=s.eachSpacing,h=[];i.save();var f=-2,d=c.length+2,p=0,g=r.width+u;return r._scrollDistance_&&0!==r._scrollDistance_&&!0===r.enableScroll&&(i.translate(r._scrollDistance_,0),f=Math.floor(-r._scrollDistance_/u)-2,d=f+r.xAxis.itemCount+4,p=-r._scrollDistance_-2*u+r.area[3],g=p+(r.xAxis.itemCount+4)*u),(o.average.show||e)&&e.forEach((function(t,e){var o,s,l;o=[].concat(r.chartData.yAxisData.ranges[t.index]),s=o.pop(),l=o.shift();for(var h=t.data,f=dt(h,s,l,c,u,r,n,a),d=G(f,t),y=0;yp&&(i.moveTo(w.x,w.y),m=1),b>0&&w.x>p&&w.xf&&x0?(i.setStrokeStyle(o.color.upLine),i.setFillStyle(o.color.upFill),i.setLineWidth(1*r.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*r.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:c,calPoints:h,eachSpacing:u}}function Ut(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},e.extra.area),o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=e.height-e.area[2],f=[];n.save();var d=0,p=e.width+c;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(n.translate(e._scrollDistance_,0),d=-e._scrollDistance_-2*c+e.area[3],p=d+(e.xAxis.itemCount+4)*c),t.forEach((function(t,o){var l,g,y;l=[].concat(e.chartData.yAxisData.ranges[t.index]),g=l.pop(),y=l.shift();var x=t.data,m=dt(x,g,y,s,c,e,r,i);f.push(m);for(var b=G(m,t),w=0;w1){var A=_[0],k=_[_.length-1];n.moveTo(A.x,A.y);var T=0;if("curve"===a.type)for(var C=0;C<_.length;C++){var P=_[C];if(0==T&&P.x>d&&(n.moveTo(P.x,P.y),T=1),C>0&&P.x>d&&P.xd&&(n.moveTo(D.x,D.y),T=1),L>0&&D.x>d&&D.xd&&(n.moveTo(F.x,F.y),T=1),M>0&&F.x>d&&F.xd&&(n.moveTo($.x,$.y),j=1),R>0&&$.x>d&&$.xd&&(n.moveTo(U.x,U.y),j=1),N>0&&U.x>d&&U.xd&&(n.moveTo(W.x,W.y),j=1),B>0&&W.x>d&&W.x4&&void 0!==arguments[4]?arguments[4]:1,a=(l({},{type:"circle"},e.extra.scatter),e.chartData.xAxisData),o=a.xAxisPoints,s=a.eachSpacing,c=[];n.save();var u=0;e.width;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(n.translate(e._scrollDistance_,0),u=-e._scrollDistance_-2*s+e.area[3],u+(e.xAxis.itemCount+4)*s),t.forEach((function(t,a){var c,l,u;c=[].concat(e.chartData.yAxisData.ranges[t.index]),l=c.pop(),u=c.shift();var h=t.data,f=dt(h,l,u,o,s,e,r,i);n.beginPath(),n.setStrokeStyle(t.color),n.setFillStyle(t.color),n.setLineWidth(1*e.pix);var d=t.pointShape;if("diamond"===d)f.forEach((function(t,e){null!==t&&(n.moveTo(t.x,t.y-4.5),n.lineTo(t.x-4.5,t.y),n.lineTo(t.x,t.y+4.5),n.lineTo(t.x+4.5,t.y),n.lineTo(t.x,t.y-4.5))}));else if("circle"===d)f.forEach((function(t,r){null!==t&&(n.moveTo(t.x+2.5*e.pix,t.y),n.arc(t.x,t.y,3*e.pix,0,2*Math.PI,!1))}));else if("square"===d)f.forEach((function(t,e){null!==t&&(n.moveTo(t.x-3.5,t.y-3.5),n.rect(t.x-3.5,t.y-3.5,7,7))}));else if("triangle"===d)f.forEach((function(t,e){null!==t&&(n.moveTo(t.x,t.y-4.5),n.lineTo(t.x-4.5,t.y+4.5),n.lineTo(t.x+4.5,t.y+4.5),n.lineTo(t.x,t.y-4.5))}));else if("triangle"===d)return;n.closePath(),n.fill(),n.stroke()})),!1!==e.dataLabel&&1===i&&t.forEach((function(t,a){var c,l,u;c=[].concat(e.chartData.yAxisData.ranges[t.index]),l=c.pop(),u=c.shift();var h=t.data,f=dt(h,l,u,o,s,e,r,i);kt(f,t,r,n,e)})),n.restore(),{xAxisPoints:o,calPoints:c,eachSpacing:s}}function Wt(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{opacity:1,border:2},e.extra.bubble),o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=[];n.save();var f=0;e.width;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(n.translate(e._scrollDistance_,0),f=-e._scrollDistance_-2*c+e.area[3],f+(e.xAxis.itemCount+4)*c),t.forEach((function(o,l){var u,f,d;u=[].concat(e.chartData.yAxisData.ranges[o.index]),f=u.pop(),d=u.shift();var p=o.data,g=dt(p,f,d,s,c,e,r,i);n.beginPath(),n.setStrokeStyle(o.color),n.setLineWidth(a.border*e.pix),n.setFillStyle(h(o.color,a.opacity)),g.forEach((function(t,r){n.moveTo(t.x+t.r,t.y),n.arc(t.x,t.y,t.r*e.pix,0,2*Math.PI,!1)})),n.closePath(),n.fill(),n.stroke(),!1!==e.dataLabel&&1===i&&g.forEach((function(i,a){n.beginPath();var o=t.textSize*e.pix||r.fontSize;n.setFontSize(o),n.setFillStyle(t.textColor||"#FFFFFF"),n.setTextAlign("center"),n.fillText(String(i.t),i.x,i.y+o/2),n.closePath(),n.stroke(),n.setTextAlign("left")}))})),n.restore(),{xAxisPoints:s,calPoints:u,eachSpacing:c}}function qt(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{type:"straight",width:2},e.extra.line);a.width*=e.pix;var o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=[];n.save();var h=0,f=e.width+c;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(n.translate(e._scrollDistance_,0),h=-e._scrollDistance_-2*c+e.area[3],f=h+(e.xAxis.itemCount+4)*c),t.forEach((function(t,o){var l,d,p;l=[].concat(e.chartData.yAxisData.ranges[t.index]),d=l.pop(),p=l.shift();var g=t.data,y=dt(g,d,p,s,c,e,r,i);u.push(y);var x=G(y,t);if("dash"==t.lineType){var m=t.dashLength?t.dashLength:8;m*=e.pix,n.setLineDash([m,m])}n.beginPath(),n.setStrokeStyle(t.color),n.setLineWidth(a.width),x.forEach((function(t,e){if(1===t.length)n.moveTo(t[0].x,t[0].y),n.arc(t[0].x,t[0].y,1,0,2*Math.PI);else{n.moveTo(t[0].x,t[0].y);var r=0;if("curve"===a.type)for(var i=0;ih&&(n.moveTo(o.x,o.y),r=1),i>0&&o.x>h&&o.xh&&(n.moveTo(l.x,l.y),r=1),c>0&&l.x>h&&l.xh&&(n.moveTo(d.x,d.y),r=1),u>0&&d.x>h&&d.x4&&void 0!==arguments[4]?arguments[4]:1,o=e.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,u=l({},{width:c/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},e.extra.mix.column),f=l({},{opacity:.2,gradient:!1},e.extra.mix.area),d=e.height-e.area[2],p=[],g=0,y=0;t.forEach((function(t,e){"column"==t.type&&(y+=1)})),i.save();var x=-2,m=s.length+2,b=0,_=e.width+c;if(e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),x=Math.floor(-e._scrollDistance_/c)-2,m=x+e.xAxis.itemCount+4,b=-e._scrollDistance_-2*c+e.area[3],_=b+(e.xAxis.itemCount+4)*c),u.customColor=w(u.linearType,u.customColor,t,n),t.forEach((function(t,o){var l,w,S;l=[].concat(e.chartData.yAxisData.ranges[t.index]),w=l.pop(),S=l.shift();var A=t.data,k=dt(A,w,S,s,c,e,n,a);if(p.push(k),"column"==t.type){k=ot(k,c,y,g,n,e);for(var T=0;Tx&&TU?U:R,$=$>U?U:$,z=z>U?U:z,N=N>U?U:N,R=R<0?0:R,$=$<0?0:$,z=z<0?0:z,N=N<0?0:N,i.arc(M+R,F+R,R,-Math.PI,-Math.PI/2),i.arc(M+I-$,F+$,$,-Math.PI/2,0),i.arc(M+I-z,F+E-z,z,0,Math.PI/2),i.arc(M+N,F+E-N,N,Math.PI/2,Math.PI)}else i.moveTo(P,C.y),i.lineTo(P+C.width,C.y),i.lineTo(P+C.width,e.height-e.area[2]),i.lineTo(P,e.height-e.area[2]),i.lineTo(P,C.y),i.setLineWidth(1),i.setStrokeStyle(L);i.setFillStyle(O),i.closePath(),i.fill()}}g+=1}if("area"==t.type)for(var B=G(k,t),W=0;W1){var K=q[0],J=q[q.length-1];i.moveTo(K.x,K.y);var X=0;if("curve"===t.style)for(var V=0;Vb&&(i.moveTo(Y.x,Y.y),X=1),V>0&&Y.x>b&&Y.x<_){var Q=v(q,V-1);i.bezierCurveTo(Q.ctrA.x,Q.ctrA.y,Q.ctrB.x,Q.ctrB.y,Y.x,Y.y)}}else for(var Z=0;Zb&&(i.moveTo(tt.x,tt.y),X=1),Z>0&&tt.x>b&&tt.x<_&&i.lineTo(tt.x,tt.y)}i.lineTo(J.x,d),i.lineTo(K.x,d),i.lineTo(K.x,K.y)}else{var et=q[0];i.moveTo(et.x-c/2,et.y),i.lineTo(et.x+c/2,et.y),i.lineTo(et.x+c/2,d),i.lineTo(et.x-c/2,d),i.moveTo(et.x-c/2,et.y)}i.closePath(),i.fill()}if("line"==t.type){var rt=G(k,t);rt.forEach((function(r,n){if("dash"==t.lineType){var a=t.dashLength?t.dashLength:8;a*=e.pix,i.setLineDash([a,a])}if(i.beginPath(),i.setStrokeStyle(t.color),i.setLineWidth(2*e.pix),1===r.length)i.moveTo(r[0].x,r[0].y),i.arc(r[0].x,r[0].y,1,0,2*Math.PI);else{i.moveTo(r[0].x,r[0].y);var o=0;if("curve"==t.style)for(var s=0;sb&&(i.moveTo(c.x,c.y),o=1),s>0&&c.x>b&&c.x<_){var l=v(r,s-1);i.bezierCurveTo(l.ctrA.x,l.ctrA.y,l.ctrB.x,l.ctrB.y,c.x,c.y)}}else for(var u=0;ub&&(i.moveTo(h.x,h.y),o=1),u>0&&h.x>b&&h.x<_&&i.lineTo(h.x,h.y)}i.moveTo(r[0].x,r[0].y)}i.stroke(),i.setLineDash([])}))}"point"==t.type&&(t.addPoint=!0),1==t.addPoint&&"column"!==t.type&&St(k,t.color,t.pointShape,i,e)})),!1!==e.dataLabel&&1===a){g=0;t.forEach((function(t,r){var o,l,u;o=[].concat(e.chartData.yAxisData.ranges[t.index]),l=o.pop(),u=o.shift();var h=t.data,f=dt(h,l,u,s,c,e,n,a);"column"!==t.type?kt(f,t,n,i,e):(f=ot(f,c,y,g,n,e),kt(f,t,n,i,e),g+=1)}))}return i.restore(),{xAxisPoints:s,calPoints:p,eachSpacing:c}}function Gt(t,e,r,n,i,a){var o=t.extra.tooltip||{};o.horizentalLine&&t.tooltip&&1===n&&("line"==t.type||"area"==t.type||"column"==t.type||"mount"==t.type||"candle"==t.type||"mix"==t.type)&&Ft(t,e,r,i,a),r.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&r.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===n&&jt(t.tooltip.textList,t.tooltip.offset,t,e,r,i,a),r.restore()}function Kt(t,e,r,n){var i=e.chartData.xAxisData,a=i.xAxisPoints,o=i.startX,s=i.endX,c=i.eachSpacing,l="center";"bar"!=e.type&&"line"!=e.type&&"area"!=e.type&&"scatter"!=e.type&&"bubble"!=e.type||(l=e.xAxis.boundaryGap);var u=e.height-e.area[2],h=e.area[0];if(e.enableScroll&&e.xAxis.scrollShow){var f=e.height-e.area[2]+r.xAxisHeight,d=s-o,p=c*(a.length-1);"mount"==e.type&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),p+=(e.extra.mount.widthRatio-1)*c);var g=d*d/p,v=0;e._scrollDistance_&&(v=-e._scrollDistance_*d/p),n.beginPath(),n.setLineCap("round"),n.setLineWidth(6*e.pix),n.setStrokeStyle(e.xAxis.scrollBackgroundColor||"#EFEBEF"),n.moveTo(o,f),n.lineTo(s,f),n.stroke(),n.closePath(),n.beginPath(),n.setLineCap("round"),n.setLineWidth(6*e.pix),n.setStrokeStyle(e.xAxis.scrollColor||"#A6A6A6"),n.moveTo(o+v,f),n.lineTo(o+v+g,f),n.stroke(),n.closePath(),n.setLineCap("butt")}if(n.save(),e._scrollDistance_&&0!==e._scrollDistance_&&n.translate(e._scrollDistance_,0),!0===e.xAxis.calibration&&(n.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),n.setLineCap("butt"),n.setLineWidth(1*e.pix),a.forEach((function(t,r){r>0&&(n.beginPath(),n.moveTo(t-c/2,u),n.lineTo(t-c/2,u+3*e.pix),n.closePath(),n.stroke())}))),!0!==e.xAxis.disableGrid&&(n.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),n.setLineCap("butt"),n.setLineWidth(1*e.pix),"dash"==e.xAxis.gridType&&n.setLineDash([e.xAxis.dashLength*e.pix,e.xAxis.dashLength*e.pix]),e.xAxis.gridEval=e.xAxis.gridEval||1,a.forEach((function(t,r){r%e.xAxis.gridEval==0&&(n.beginPath(),n.moveTo(t,u),n.lineTo(t,h),n.stroke())})),n.setLineDash([])),!0!==e.xAxis.disabled){var y=t.length;e.xAxis.labelCount&&(y=e.xAxis.itemCount?Math.ceil(t.length/e.xAxis.itemCount*e.xAxis.labelCount):e.xAxis.labelCount,y-=1);for(var x=Math.ceil(t.length/y),m=[],b=t.length,w=0;w1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),l+=(e.extra.mount.widthRatio-1)*c);var u=o+l,h=[],f=1;!1===e.xAxis.axisLine&&(f=0);for(var d=f;d4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==e.type?e.extra.pie:e.extra.ring),o={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2};0==r.pieChartLinePadding&&(r.pieChartLinePadding=a.activeRadius*e.pix);var s=Math.min((e.width-e.area[1]-e.area[3])/2-r.pieChartLinePadding-r.pieChartTextPadding-r._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-r.pieChartLinePadding-r.pieChartTextPadding);s=s<10?10:s,a.customRadius>0&&(s=a.customRadius*e.pix),t=Q(t,s,i);var c=a.activeRadius*e.pix;if(a.customColor=w(a.linearType,a.customColor,t,r),t=t.map((function(t){return t._start_+=a.offsetAngle*Math.PI/180,t})),t.forEach((function(t,r){e.tooltip&&e.tooltip.index==r&&(n.beginPath(),n.setFillStyle(h(t.color,a.activeOpacity||.5)),n.moveTo(o.x,o.y),n.arc(o.x,o.y,t._radius_+c,t._start_,t._start_+2*t._proportion_*Math.PI),n.closePath(),n.fill()),n.beginPath(),n.setLineWidth(a.borderWidth*e.pix),n.lineJoin="round",n.setStrokeStyle(a.borderColor);var i,s=t.color;"custom"==a.linearType&&(i=n.createCircularGradient?n.createCircularGradient(o.x,o.y,t._radius_):n.createRadialGradient(o.x,o.y,0,o.x,o.y,t._radius_),i.addColorStop(0,h(a.customColor[t.linearIndex],1)),i.addColorStop(1,h(t.color,1)),s=i);n.setFillStyle(s),n.moveTo(o.x,o.y),n.arc(o.x,o.y,t._radius_,t._start_,t._start_+2*t._proportion_*Math.PI),n.closePath(),n.fill(),1==a.border&&n.stroke()})),"ring"===e.type){var u=.6*s;"number"===typeof a.ringWidth&&a.ringWidth>0&&(u=Math.max(0,s-a.ringWidth*e.pix)),n.beginPath(),n.setFillStyle(a.centerColor),n.moveTo(o.x,o.y),n.arc(o.x,o.y,u,0,2*Math.PI),n.closePath(),n.fill()}return!1!==e.dataLabel&&1===i&&Lt(t,e,r,n,s,o),1===i&&"ring"===e.type&&At(e,r,n,o),{center:o,radius:s,series:t}}function Qt(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},e.extra.rose);0==r.pieChartLinePadding&&(r.pieChartLinePadding=a.activeRadius*e.pix);var o={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},s=Math.min((e.width-e.area[1]-e.area[3])/2-r.pieChartLinePadding-r.pieChartTextPadding-r._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-r.pieChartLinePadding-r.pieChartTextPadding);s=s<10?10:s;var c=a.minRadius||.5*s;t=tt(t,a.type,c,s,i);var u=a.activeRadius*e.pix;return a.customColor=w(a.linearType,a.customColor,t,r),t=t.map((function(t){return t._start_+=(a.offsetAngle||0)*Math.PI/180,t})),t.forEach((function(t,r){e.tooltip&&e.tooltip.index==r&&(n.beginPath(),n.setFillStyle(h(t.color,a.activeOpacity||.5)),n.moveTo(o.x,o.y),n.arc(o.x,o.y,u+t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI),n.closePath(),n.fill()),n.beginPath(),n.setLineWidth(a.borderWidth*e.pix),n.lineJoin="round",n.setStrokeStyle(a.borderColor);var i,s=t.color;"custom"==a.linearType&&(i=n.createCircularGradient?n.createCircularGradient(o.x,o.y,t._radius_):n.createRadialGradient(o.x,o.y,0,o.x,o.y,t._radius_),i.addColorStop(0,h(a.customColor[t.linearIndex],1)),i.addColorStop(1,h(t.color,1)),s=i);n.setFillStyle(s),n.moveTo(o.x,o.y),n.arc(o.x,o.y,t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI),n.closePath(),n.fill(),1==a.border&&n.stroke()})),!1!==e.dataLabel&&1===i&&Lt(t,e,r,n,s,o),{center:o,radius:s,series:t}}function Zt(t,e,r,n){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=l({},{startAngle:.75,endAngle:.25,type:"default",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},e.extra.arcbar);t=et(t,s,o),i=s.centerX||s.centerY?{x:s.centerX?s.centerX:e.width/2,y:s.centerY?s.centerY:e.height/2}:{x:e.width/2,y:e.height/2},s.radius?a=s.radius:(a=Math.min(i.x,i.y),a-=5*e.pix,a-=s.width/2),a=a<10?10:a,s.customColor=w(s.linearType,s.customColor,t,r);for(var c=0;c5&&void 0!==arguments[5]?arguments[5]:1,o=l({},{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"}},r.extra.gauge);void 0==o.oldAngle&&(o.oldAngle=o.startAngle),void 0==o.oldData&&(o.oldData=0),t=nt(t,o.startAngle,o.endAngle);var s={x:r.width/2,y:r.height/2},c=Math.min(s.x,s.y);c-=5*r.pix,c-=o.width/2,c=c<10?10:c;var u=c-o.width,f=0;if("progress"==o.type){var d=c-3*o.width;i.beginPath();var p=i.createLinearGradient(s.x,s.y-d,s.x,s.y+d);p.addColorStop("0",h(e[0].color,.3)),p.addColorStop("1.0",h("#FFFFFF",.1)),i.setFillStyle(p),i.arc(s.x,s.y,d,0,2*Math.PI,!1),i.fill(),i.setLineWidth(o.width),i.setStrokeStyle(h(e[0].color,.3)),i.setLineCap("round"),i.beginPath(),i.arc(s.x,s.y,u,o.startAngle*Math.PI,o.endAngle*Math.PI,!1),i.stroke(),f=o.startAngle-o.endAngle+1;o.splitLine.splitNumber;var g=f/o.splitLine.splitNumber/o.splitLine.childNumber,v=-c-.5*o.width-o.splitLine.fixRadius,y=-c-o.width-o.splitLine.fixRadius+o.splitLine.width;i.save(),i.translate(s.x,s.y),i.rotate((o.startAngle-1)*Math.PI);for(var x=o.splitLine.splitNumber*o.splitLine.childNumber+1,m=e[0].data*a,b=0;bb/x?i.setStrokeStyle(h(e[0].color,1)):i.setStrokeStyle(h(e[0].color,.3)),i.setLineWidth(3*r.pix),i.moveTo(v,0),i.lineTo(y,0),i.stroke(),i.rotate(g*Math.PI);i.restore(),e=rt(e,o,a),i.setLineWidth(o.width),i.setStrokeStyle(e[0].color),i.setLineCap("round"),i.beginPath(),i.arc(s.x,s.y,u,o.startAngle*Math.PI,e[0]._proportion_*Math.PI,!1),i.stroke();var w=c-2.5*o.width;i.save(),i.translate(s.x,s.y),i.rotate((e[0]._proportion_-1)*Math.PI),i.beginPath(),i.setLineWidth(o.width/3);var _=i.createLinearGradient(0,.6*-w,0,.6*w);_.addColorStop("0",h("#FFFFFF",0)),_.addColorStop("0.5",h(e[0].color,1)),_.addColorStop("1.0",h("#FFFFFF",0)),i.setStrokeStyle(_),i.arc(0,0,w,.85*Math.PI,1.15*Math.PI,!1),i.stroke(),i.beginPath(),i.setLineWidth(1),i.setStrokeStyle(e[0].color),i.setFillStyle(e[0].color),i.moveTo(-w-o.width/3/2,-4),i.lineTo(-w-o.width/3/2-4,0),i.lineTo(-w-o.width/3/2,4),i.lineTo(-w-o.width/3/2,-4),i.stroke(),i.fill(),i.restore()}else{i.setLineWidth(o.width),i.setLineCap("butt");for(var S=0;S4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:!1,axisLabelTofix:0,labelColor:"#666666",labelPointShow:!1,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:!1,borderWidth:2,linearType:"none",customColor:[]},e.extra.radar),o=O(e.categories.length),s={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},c=(e.width-e.area[1]-e.area[3])/2,u=(e.height-e.area[0]-e.area[2])/2,f=Math.min(c-(P(e.categories,r.fontSize,n)+r.radarLabelTextMargin),u-r.radarLabelTextMargin);f-=r.radarLabelTextMargin*e.pix,f=f<10?10:f,n.beginPath(),n.setLineWidth(1*e.pix),n.setStrokeStyle(a.gridColor),o.forEach((function(t,e){var r=y(f*Math.cos(t),f*Math.sin(t),s);n.moveTo(s.x,s.y),e%a.gridEval==0&&n.lineTo(r.x,r.y)})),n.stroke(),n.closePath();for(var d=function(t){var r={};if(n.beginPath(),n.setLineWidth(1*e.pix),n.setStrokeStyle(a.gridColor),"radar"==a.gridType)o.forEach((function(e,i){var o=y(f/a.gridCount*t*Math.cos(e),f/a.gridCount*t*Math.sin(e),s);0===i?(r=o,n.moveTo(o.x,o.y)):n.lineTo(o.x,o.y)})),n.lineTo(r.x,r.y);else{var i=y(f/a.gridCount*t*Math.cos(1.5),f/a.gridCount*t*Math.sin(1.5),s);n.arc(s.x,s.y,s.y-i.y,0,2*Math.PI,!1)}n.stroke(),n.closePath()},p=1;p<=a.gridCount;p++)d(p);a.customColor=w(a.linearType,a.customColor,t,r);var g=Y(o,s,f,t,e,i);if(g.forEach((function(r,i){n.beginPath(),n.setLineWidth(a.borderWidth*e.pix),n.setStrokeStyle(r.color);var o,c=h(r.color,a.opacity);"custom"==a.linearType&&(o=n.createCircularGradient?n.createCircularGradient(s.x,s.y,f):n.createRadialGradient(s.x,s.y,0,s.x,s.y,f),o.addColorStop(0,h(a.customColor[t[i].linearIndex],a.opacity)),o.addColorStop(1,h(r.color,a.opacity)),c=o);if(n.setFillStyle(c),r.data.forEach((function(t,e){0===e?n.moveTo(t.position.x,t.position.y):n.lineTo(t.position.x,t.position.y)})),n.closePath(),n.fill(),!0===a.border&&n.stroke(),n.closePath(),!1!==e.dataPointShape){var l=r.data.map((function(t){return t.position}));St(l,r.color,r.pointShape,n,e)}})),!0===a.axisLabel){var v=Math.max(a.max,Math.max.apply(null,A(t))),x=f/a.gridCount,m=e.fontSize*e.pix;n.setFontSize(m),n.setFillStyle(e.fontColor),n.setTextAlign("left");for(p=0;pl.x?r.xMax:l.x,r.yMin=r.yMinl.y?r.yMax:l.y}}return r}function ie(t,e,r,n,i,a){return{x:(e-r.xMin)*n+i,y:(r.yMax-t)*n+a}}function ae(t,e,r,n,i,a){return{x:(e-i)/n+r.xMin,y:r.yMax-(t-a)/n}}function oe(t,e,r){if(e[1]==r[1])return!1;if(e[1]>t[1]&&r[1]>t[1])return!1;if(e[1]t[1])return!1;if(r[1]==t[1]&&e[1]>t[1])return!1;if(e[0]e[a].area[2]||t[1]>e[a].area[3]||t[2]r||t[3]>n){i=!0;break}i=!1}return i}function he(t,e,r){var n=t.series;switch(e){case"normal":for(var i=0;i.7},p=0;p4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{type:"normal",autoColors:!0},e.extra.word);e.chartData.wordCloudData||(e.chartData.wordCloudData=he(e,a.type,n)),n.beginPath(),n.setFillStyle(e.background),n.rect(0,0,e.width,e.height),n.fill(),n.save();var o=e.chartData.wordCloudData;n.translate(e.width/2,e.height/2);for(var s=0;s0&&(e.tooltip&&e.tooltip.index==s?n.strokeText(c,(o[s].areav[0]+5-e.width/2)*i-h*(1-i)/2,(o[s].areav[1]+5+u-e.height/2)*i):n.fillText(c,(o[s].areav[0]+5-e.width/2)*i-h*(1-i)/2,(o[s].areav[1]+5+u-e.height/2)*i)):o[s].area[0]>0&&(e.tooltip&&e.tooltip.index==s?n.strokeText(c,(o[s].area[0]+5-e.width/2)*i-h*(1-i)/2,(o[s].area[1]+5+u-e.height/2)*i):n.fillText(c,(o[s].area[0]+5-e.width/2)*i-h*(1-i)/2,(o[s].area[1]+5+u-e.height/2)*i)),n.stroke(),n.restore()}n.restore()}function de(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=l({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right",linearType:"none",customColor:[]},e.extra.funnel),o=(e.height-e.area[0]-e.area[2])/t.length,s={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]},c=a.activeWidth*e.pix,u=Math.min((e.width-e.area[1]-e.area[3])/2-c,(e.height-e.area[0]-e.area[2])/2-c);if(t=Z(t,u,a.type,o,i),n.save(),n.translate(s.x,s.y),a.customColor=w(a.linearType,a.customColor,t,r),"pyramid"==a.type)for(var f=0;f0?x[k].width+e.yAxis.padding*e.pix:x[k].width,A+=1):"right"==x[k].position&&(e.area[1]+=S>0?x[k].width+e.yAxis.padding*e.pix:x[k].width,S+=1)}else r.yAxisWidth=x;if(e.chartData.yAxisData=y,e.categories&&e.categories.length&&"radar"!==e.type&&"gauge"!==e.type&&"bar"!==e.type){e.chartData.xAxisData=ht(e.categories,e,r);var T=J(e.categories,e,r,e.chartData.xAxisData.eachSpacing,n),C=T.xAxisHeight,P=T.angle;r.xAxisHeight=C,r._xAxisTextAngle_=P,e.area[2]+=C,e.chartData.categoriesData=T}else if("line"===e.type||"area"===e.type||"scatter"===e.type||"bubble"===e.type||"bar"===e.type){e.chartData.xAxisData=V(a,e,r,n),o=e.chartData.xAxisData.rangesFormat;var O=J(o,e,r,e.chartData.xAxisData.eachSpacing,n),L=O.xAxisHeight,D=O.angle;r.xAxisHeight=L,r._xAxisTextAngle_=D,e.area[2]+=L,e.chartData.categoriesData=O}else e.chartData.xAxisData={xAxisPoints:[]};if(e.enableScroll&&"right"==e.xAxis.scrollAlign&&void 0===e._scrollDistance_){var M=0,I=e.chartData.xAxisData.xAxisPoints,E=e.chartData.xAxisData.startX,j=e.chartData.xAxisData.endX,R=e.chartData.xAxisData.eachSpacing,$=R*(I.length-1),z=j-E;M=z-$,i.scrollOption.currentOffset=M,i.scrollOption.startTouchX=M,i.scrollOption.distance=0,i.scrollOption.lastMoveTime=0,e._scrollDistance_=M}switch("pie"!==t&&"ring"!==t&&"rose"!==t||(r._pieTextMaxLength_=!1===e.dataLabel?0:at(u,r,n,e)),t){case"word":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),fe(a,e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"map":n.clearRect(0,0,e.width,e.height),ce(a,e,r,n);break;case"funnel":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.funnelData=de(a,e,r,n,t),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=qt(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Bt(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Wt(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Ht(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Rt(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=$t(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Kt(o,e,r,n);var i=zt(a,e,r,n,t),s=i.yAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.yAxisPoints=s,e.chartData.xAxisPoints=e.chartData.xAxisData.xAxisPoints,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Ut(a,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"ring":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.pieData=Yt(a,e,r,n,t),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"pie":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.pieData=Yt(a,e,r,n,t),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.pieData=Qt(a,e,r,n,t),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.radarData=ee(a,e,r,n,t),Vt(e.series,e,r,n,e.chartData),Gt(e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.arcbarData=Zt(a,e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),e.chartData.gaugeData=te(o,a,e,r,n,t),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new ye({timing:e.timing,duration:c,onProcess:function(t){n.clearRect(0,0,e.width,e.height),e.rotate&&_t(n,e),Jt(o,e,r,n),Kt(o,e,r,n);var i=Nt(a,u,e,r,n,t),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;e.chartData.xAxisPoints=s,e.chartData.calPoints=c,e.chartData.eachSpacing=l,Xt(a,e,r,n),!1!==e.enableMarkLine&&1===t&&Mt(e,r,n),Vt(u||e.series,e,r,n,e.chartData),Gt(e,r,n,t,l,s),ge(e,n)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break}}function me(){this.events={}}ye.prototype.stop=function(){this.isStop=!0},me.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},me.prototype.delEventListener=function(t){this.events[t]=[]},me.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.opts=l({},this.opts,t),this.opts.updateData=!0;var e=t.scrollPosition||"current";switch(e){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 r=mt(this.opts.series,this.opts,this.config,this.context),n=r.yAxisWidth;this.config.yAxisWidth=n;var i=0,a=ht(this.opts.categories,this.opts,this.config),o=a.xAxisPoints,s=a.startX,c=a.endX,u=a.eachSpacing,h=u*(o.length-1),f=c-s;i=f-h,this.scrollOption={currentOffset:i,startTouchX:i,distance:0,lastMoveTime:0},this.opts._scrollDistance_=i;break}xe.call(this,this.opts.type,this.opts,this.config,this.context)},be.prototype.zoom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var r=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=mt(this.opts.series,this.opts,this.config,this.context),i=n.yAxisWidth;this.config.yAxisWidth=i;var a=0,o=ht(this.opts.categories,this.opts,this.config),s=o.xAxisPoints,c=o.startX,l=o.endX,u=o.eachSpacing,h=u*r,f=l-c,d=f-u*(s.length-1);a=f/2-h,a>0&&(a=0),a=this.opts.categories.length?this.opts.categories.length:f,this.opts.animation=!1,this.opts.xAxis.itemCount=f;var d=0,g=ht(this.opts.categories,this.opts,this.config),v=g.xAxisPoints,y=g.startX,x=g.endX,m=g.eachSpacing,b=m*this.scrollOption.moveCurrent1,w=x-y,_=w-m*(v.length-1);d=-b+Math.min(i[0].x,i[1].x)-this.opts.area[3]-m,d>0&&(d=0),d<_&&(d=_),this.scrollOption.currentOffset=d,this.scrollOption.startTouchX=0,this.scrollOption.distance=0,p(this,d,this.opts.chartData,this.config,this.opts),this.opts._scrollDistance_=d,xe.call(this,this.opts.type,this.opts,this.config,this.context)}}else t("log","[uCharts] \u8bf7\u542f\u7528\u6eda\u52a8\u6761\u540e\u4f7f\u7528"," at uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js:6830")},be.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},be.prototype.addEventListener=function(t,e){this.uevent.addEventListener(t,e)},be.prototype.delEventListener=function(t){this.uevent.delEventListener(t)},be.prototype.getCurrentDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var r=T(e,this.opts,t);return"pie"===this.opts.type||"ring"===this.opts.type?q({x:r.x,y:r.y},this.opts.chartData.pieData,this.opts):"rose"===this.opts.type?W({x:r.x,y:r.y},this.opts.chartData.pieData,this.opts):"radar"===this.opts.type?z({x:r.x,y:r.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?N({x:r.x,y:r.y},this.opts.chartData.funnelData):"map"===this.opts.type?B({x:r.x,y:r.y},this.opts):"word"===this.opts.type?U({x:r.x,y:r.y},this.opts.chartData.wordCloudData):"bar"===this.opts.type?E({x:r.x,y:r.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset)):I({x:r.x,y:r.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},be.prototype.getLegendDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var r=T(e,this.opts,t);return j({x:r.x,y:r.y},this.opts.chartData.legendData)}return-1},be.prototype.touchLegend=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;if(r=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],r){T(r,this.opts,t);var n=this.getLegendDataIndex(t);n>=0&&("candle"==this.opts.type?this.opts.seriesMA[n].show=!this.opts.seriesMA[n].show:this.opts.series[n].show=!this.opts.series[n].show,this.opts.animation=!!e.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,xe.call(this,this.opts.type,this.opts,this.config,this.context))}},be.prototype.showToolTip=function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;i=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],i||t("log","[uCharts] \u672a\u83b7\u53d6\u5230event\u5750\u6807\u4fe1\u606f"," at uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js:7008");var a=T(i,this.opts,e),o=this.scrollOption.currentOffset,s=l({},this.opts,{_scrollDistance_:o,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),u=void 0==n.index?c.index:n.index;if(u>-1||u.length>0){var h=C(this.opts.series,u,c.group);if(0!==h.length){var f=L(h,this.opts,u,c.group,this.opts.categories,n),d=f.textList,p=f.offset;p.y=a.y,s.tooltip={textList:void 0!==n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}}xe.call(this,s.type,s,this.config,this.context)}if("mount"===this.opts.type){u=void 0==n.index?this.getCurrentDataIndex(e).index:n.index;if(u>-1){s=l({},this.opts,{animation:!1}),h=l({},s._series_[u]),d=[{text:n.formatter?n.formatter(h,void 0,u,s):h.name+": "+h.data,color:h.color}],p={x:s.chartData.calPoints[u].x,y:a.y};s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}xe.call(this,s.type,s,this.config,this.context)}if("bar"===this.opts.type){c=this.getCurrentDataIndex(e),u=void 0==n.index?c.index:n.index;if(u>-1||u.length>0){h=C(this.opts.series,u,c.group);if(0!==h.length){f=L(h,this.opts,u,c.group,this.opts.categories,n),d=f.textList,p=f.offset;p.x=a.x,s.tooltip={textList:void 0!==n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}}xe.call(this,s.type,s,this.config,this.context)}if("mix"===this.opts.type){c=this.getCurrentDataIndex(e),u=void 0==n.index?c.index:n.index;if(u>-1){o=this.scrollOption.currentOffset,s=l({},this.opts,{_scrollDistance_:o,animation:!1}),h=C(this.opts.series,u);if(0!==h.length){var g=D(h,this.opts,u,this.opts.categories,n);d=g.textList,p=g.offset;p.y=a.y,s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}}xe.call(this,s.type,s,this.config,this.context)}if("candle"===this.opts.type){c=this.getCurrentDataIndex(e),u=void 0==n.index?c.index:n.index;if(u>-1){o=this.scrollOption.currentOffset,s=l({},this.opts,{_scrollDistance_:o,animation:!1}),h=C(this.opts.series,u);if(0!==h.length){f=M(this.opts.series[0].data,h,this.opts,u,this.opts.categories,this.opts.extra.candle,n),d=f.textList,p=f.offset;p.y=a.y,s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}}xe.call(this,s.type,s,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){u=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(u>-1){s=l({},this.opts,{animation:!1}),h=l({},s._series_[u]),d=[{text:n.formatter?n.formatter(h,void 0,u,s):h.name+": "+h.data,color:h.color}],p={x:a.x,y:a.y};s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}xe.call(this,s.type,s,this.config,this.context)}if("map"===this.opts.type){u=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(u>-1){s=l({},this.opts,{animation:!1}),h=l({},this.opts.series[u]);h.name=h.properties.name;d=[{text:n.formatter?n.formatter(h,void 0,u,this.opts):h.name,color:h.color}],p={x:a.x,y:a.y};s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}s.updateData=!1,xe.call(this,s.type,s,this.config,this.context)}if("word"===this.opts.type){u=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(u>-1){s=l({},this.opts,{animation:!1}),h=l({},this.opts.series[u]),d=[{text:n.formatter?n.formatter(h,void 0,u,this.opts):h.name,color:h.color}],p={x:a.x,y:a.y};s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}s.updateData=!1,xe.call(this,s.type,s,this.config,this.context)}if("radar"===this.opts.type){u=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(u>-1){s=l({},this.opts,{animation:!1}),h=C(this.opts.series,u);if(0!==h.length){d=h.map((function(t){return{text:n.formatter?n.formatter(t,r.opts.categories[u],u,r.opts):t.name+": "+t.data,color:t.color}})),p={x:a.x,y:a.y};s.tooltip={textList:n.textList?n.textList:d,offset:void 0!==n.offset?n.offset:p,option:n,index:u}}}xe.call(this,s.type,s,this.config,this.context)}},be.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};var e=l({},this.opts,{_scrollDistance_:t,animation:!1});xe.call(this,this.opts.type,e,this.config,this.context)},be.prototype.scrollStart=function(t){var e=null;e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var r=T(e,this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=r.x)},be.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var e=this.opts.touchMoveLimit||60,r=Date.now(),n=r-this.scrollOption.lastMoveTime;if(!(n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}}}function b(t,e,r,n){var i=e&&e.prototype instanceof _?e:_,a=Object.create(i.prototype),o=new D(n||[]);return a._invoke=C(t,r,o),a}function w(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}function _(){}function S(){}function A(){}function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function T(t){function e(r,n,a,o){var s=w(t[r],t,n);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return e("throw",t,a,o)}))}o(s.arg)}var r;function n(t,n){function i(){return new Promise((function(r,i){e(t,n,r,i)}))}return r=r?r.then(i,i):i()}this._invoke=n}function C(t,e,r){var n=h;return function(i,a){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw a;return F()}r.method=i,r.arg=a;while(1){var o=r.delegate;if(o){var s=P(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=w(t,e,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}function P(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=w(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(t){if(t){var e=t[o];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){while(++n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function p(t,e){if(t){if("string"===typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){e=e;var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},l=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},u=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},h=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=u.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,l=t.min(4*c,i);if(c){for(var u=0;u>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=t[e+0],c=t[e+1],d=t[e+2],p=t[e+3],g=t[e+4],v=t[e+5],y=t[e+6],x=t[e+7],m=t[e+8],b=t[e+9],w=t[e+10],_=t[e+11],S=t[e+12],A=t[e+13],k=t[e+14],T=t[e+15],C=a[0],P=a[1],O=a[2],L=a[3];C=l(C,P,O,L,o,7,s[0]),L=l(L,C,P,O,c,12,s[1]),O=l(O,L,C,P,d,17,s[2]),P=l(P,O,L,C,p,22,s[3]),C=l(C,P,O,L,g,7,s[4]),L=l(L,C,P,O,v,12,s[5]),O=l(O,L,C,P,y,17,s[6]),P=l(P,O,L,C,x,22,s[7]),C=l(C,P,O,L,m,7,s[8]),L=l(L,C,P,O,b,12,s[9]),O=l(O,L,C,P,w,17,s[10]),P=l(P,O,L,C,_,22,s[11]),C=l(C,P,O,L,S,7,s[12]),L=l(L,C,P,O,A,12,s[13]),O=l(O,L,C,P,k,17,s[14]),C=u(C,P=l(P,O,L,C,T,22,s[15]),O,L,c,5,s[16]),L=u(L,C,P,O,y,9,s[17]),O=u(O,L,C,P,_,14,s[18]),P=u(P,O,L,C,o,20,s[19]),C=u(C,P,O,L,v,5,s[20]),L=u(L,C,P,O,w,9,s[21]),O=u(O,L,C,P,T,14,s[22]),P=u(P,O,L,C,g,20,s[23]),C=u(C,P,O,L,b,5,s[24]),L=u(L,C,P,O,k,9,s[25]),O=u(O,L,C,P,p,14,s[26]),P=u(P,O,L,C,m,20,s[27]),C=u(C,P,O,L,A,5,s[28]),L=u(L,C,P,O,d,9,s[29]),O=u(O,L,C,P,x,14,s[30]),C=h(C,P=u(P,O,L,C,S,20,s[31]),O,L,v,4,s[32]),L=h(L,C,P,O,m,11,s[33]),O=h(O,L,C,P,_,16,s[34]),P=h(P,O,L,C,k,23,s[35]),C=h(C,P,O,L,c,4,s[36]),L=h(L,C,P,O,g,11,s[37]),O=h(O,L,C,P,x,16,s[38]),P=h(P,O,L,C,w,23,s[39]),C=h(C,P,O,L,A,4,s[40]),L=h(L,C,P,O,o,11,s[41]),O=h(O,L,C,P,p,16,s[42]),P=h(P,O,L,C,y,23,s[43]),C=h(C,P,O,L,b,4,s[44]),L=h(L,C,P,O,S,11,s[45]),O=h(O,L,C,P,T,16,s[46]),C=f(C,P=h(P,O,L,C,d,23,s[47]),O,L,o,6,s[48]),L=f(L,C,P,O,x,10,s[49]),O=f(O,L,C,P,k,15,s[50]),P=f(P,O,L,C,v,21,s[51]),C=f(C,P,O,L,S,6,s[52]),L=f(L,C,P,O,p,10,s[53]),O=f(O,L,C,P,w,15,s[54]),P=f(P,O,L,C,c,21,s[55]),C=f(C,P,O,L,m,6,s[56]),L=f(L,C,P,O,T,10,s[57]),O=f(O,L,C,P,y,15,s[58]),P=f(P,O,L,C,A,21,s[59]),C=f(C,P,O,L,g,6,s[60]),L=f(L,C,P,O,_,10,s[61]),O=f(O,L,C,P,d,15,s[62]),P=f(P,O,L,C,b,21,s[63]),a[0]=a[0]+C|0,a[1]=a[1]+P|0,a[2]=a[2]+O|0,a[3]=a[3]+L|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var a=t.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(r.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 t=a.clone.call(this);return t._hash=this._hash.clone(),t}});function l(t,e,r,n,i,a,o){var s=t+(e&r|~e&n)+i+o;return(s<>>32-a)+e}function u(t,e,r,n,i,a,o){var s=t+(e&n|r&~n)+i+o;return(s<>>32-a)+e}function h(t,e,r,n,i,a,o){var s=t+(e^r^n)+i+o;return(s<>>32-a)+e}function f(t,e,r,n,i,a,o){var s=t+(r^(e|~n))+i+o;return(s<>>32-a)+e}e.MD5=a._createHelper(c),e.HmacMD5=a._createHmacHelper(c)}(Math),r.MD5)})),F((function(t,e){var r,n,i;t.exports=(n=(r=I).lib.Base,i=r.enc.Utf8,void(r.algo.HMAC=n.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var a=this._oKey=e.clone(),o=this._iKey=e.clone(),s=a.words,c=o.words,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return e=X,r=t,Object.prototype.hasOwnProperty.call(e,r)||(X[t]=n),X[t]}"app-plus"===W&&(X=uni._globalUniCloudObj?uni._globalUniCloudObj:uni._globalUniCloudObj={});var Y=["invoke","success","fail","complete"],Q=V("_globalUniCloudInterceptor");function Z(t,e){Q[t]||(Q[t]={}),N(e)&&Object.keys(e).forEach((function(r){Y.indexOf(r)>-1&&function(t,e,r){var n=Q[t][e];n||(n=Q[t][e]=[]),-1===n.indexOf(r)&&"function"==typeof r&&n.push(r)}(t,r,e[r])}))}function tt(t,e){Q[t]||(Q[t]={}),N(e)?Object.keys(e).forEach((function(r){Y.indexOf(r)>-1&&function(t,e,r){var n=Q[t][e];if(n){var i=n.indexOf(r);i>-1&&n.splice(i,1)}}(t,r,e[r])})):delete Q[t]}function et(t,e){return t&&0!==t.length?t.reduce((function(t,r){return t.then((function(){return r(e)}))}),Promise.resolve()):Promise.resolve()}function rt(t,e){return Q[t]&&Q[t][e]||[]}function nt(t,e){return e?function(r){var n,i=this,a=!1;if("callFunction"===e){var o=r&&r.type||j;a=o!==j}n=this.isReady?Promise.resolve():this.initUniCloud,r=r||{};var s=n.then((function(){return a?Promise.resolve():et(rt(e,"invoke"),r)})).then((function(){return t.call(i,r)})).then((function(t){return a?Promise.resolve(t):et(rt(e,"success"),t).then((function(){return et(rt(e,"complete"),t)})).then((function(){return Promise.resolve(t)}))}),(function(t){return a?Promise.reject(t):et(rt(e,"fail"),t).then((function(){return et(rt(e,"complete"),t)})).then((function(){return Promise.reject(t)}))}));if(!(r.success||r.fail||r.complete))return s;s.then((function(t){r.success&&r.success(t),r.complete&&r.complete(t)}),(function(t){r.fail&&r.fail(t),r.complete&&r.complete(t)}))}:function(e){if(!((e=e||{}).success||e.fail||e.complete))return t.call(this,e);t.call(this,e).then((function(t){e.success&&e.success(t),e.complete&&e.complete(t)}),(function(t){e.fail&&e.fail(t),e.complete&&e.complete(t)}))}}var it,at=function(t){_(r,t);var e=S(r);function r(t){var n;return w(this,r),n=e.call(this,t.message),n.errMsg=t.message||"",n.errCode=n.code=t.code,n.requestId=t.requestId,Object.defineProperties(k(n),{message:{get:function(){return this.errMsg},set:function(t){this.errMsg=t}}}),n}return r}(T(Error));function ot(){var t=uni.getLocale&&uni.getLocale()||"en";if(it)return m(m({},it),{},{LOCALE:t});var e=uni.getSystemInfoSync(),r=e.deviceId,n=e.platform;return it={PLATFORM:W,OS:n,APPID:K,DEVICEID:r,CLIENT_SDK_VERSION:"1.0.25"},m(m({},it),{},{LOCALE:t})}var st,ct={sign:function(t,e){var r="";return Object.keys(t).sort().forEach((function(e){t[e]&&(r=r+"&"+e+"="+t[e])})),r=r.slice(1),E(r,e).toString()},wrappedRequest:function(t,e){return new Promise((function(r,n){e(Object.assign(t,{complete:function(t){t||(t={}),B&&"h5"===W&&t.errMsg&&0===t.errMsg.indexOf("request:fail")&&console.warn("\u53d1\u5e03H5\uff0c\u9700\u8981\u5728uniCloud\u540e\u53f0\u64cd\u4f5c\uff0c\u7ed1\u5b9a\u5b89\u5168\u57df\u540d\uff0c\u5426\u5219\u4f1a\u56e0\u4e3a\u8de8\u57df\u95ee\u9898\u800c\u65e0\u6cd5\u8bbf\u95ee\u3002\u6559\u7a0b\u53c2\u8003\uff1ahttps://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var e=t.data&&t.data.header&&t.data.header["x-serverless-request-id"]||t.header&&t.header["request-id"];if(!t.statusCode||t.statusCode>=400)return n(new at({code:"SYS_ERR",message:t.errMsg||"request:fail",requestId:e}));var i=t.data;if(i.error)return n(new at({code:i.error.code,message:i.error.message,requestId:e}));i.result=i.data,i.requestId=e,delete i.data,r(i)}}))}))}},lt={request:function(t){return uni.request(t)},uploadFile:function(t){return uni.uploadFile(t)},setStorageSync:function(t,e){return uni.setStorageSync(t,e)},getStorageSync:function(t){return uni.getStorageSync(t)},removeStorageSync:function(t){return uni.removeStorageSync(t)},clearStorageSync:function(){return uni.clearStorageSync()}},ut={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ht=(0,a.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"\u7f3a\u5c11\u53c2\u6570\uff1a{param}","uniCloud.uploadFile.fileError":"filePath\u5e94\u4e3aFile\u5bf9\u8c61"},"zh-Hant":{"uniCloud.init.paramRequired":"\u7f3a\u5c11\u53c2\u6570\uff1a{param}","uniCloud.uploadFile.fileError":"filePath\u5e94\u4e3aFile\u5bf9\u8c61"},en:ut,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:ut},"zh-Hans"),ft=ht.t,dt=function(){function t(e){w(this,t),["spaceId","clientSecret"].forEach((function(t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(ft("uniCloud.init.paramRequired",{param:t}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},e),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=lt,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return y(t,[{key:"setAccessToken",value:function(t){this.accessToken=t}},{key:"requestWrapped",value:function(t){return ct.wrappedRequest(t,this.adapter.request)}},{key:"requestAuth",value:function(t){return this.requestWrapped(t)}},{key:"request",value:function(t,e){var r=this;return Promise.resolve().then((function(){return r.hasAccessToken?e?r.requestWrapped(t):r.requestWrapped(t).catch((function(e){return new Promise((function(t,r){!e||"GATEWAY_INVALID_TOKEN"!==e.code&&"InvalidParameter.InvalidToken"!==e.code?r(e):t()})).then((function(){return r.getAccessToken()})).then((function(){var e=r.rebuildRequest(t);return r.request(e,!0)}))})):r.getAccessToken().then((function(){var e=r.rebuildRequest(t);return r.request(e,!0)}))}))}},{key:"rebuildRequest",value:function(t){var e=Object.assign({},t);return e.data.token=this.accessToken,e.header["x-basement-token"]=this.accessToken,e.header["x-serverless-sign"]=ct.sign(e.data,this.config.clientSecret),e}},{key:"setupRequest",value:function(t,e){var r=Object.assign({},t,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};return"auth"!==e&&(r.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=ct.sign(r,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:r,dataType:"json",header:n}}},{key:"getAccessToken",value:function(){var t=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(e){return new Promise((function(r,n){e.result&&e.result.accessToken?(t.setAccessToken(e.result.accessToken),t._getAccessTokenPromiseStatus="fulfilled",r(t.accessToken)):(t._getAccessTokenPromiseStatus="rejected",n(new at({code:"AUTH_FAILED",message:"\u83b7\u53d6accessToken\u5931\u8d25"})))}))}),(function(e){return t._getAccessTokenPromiseStatus="rejected",Promise.reject(e)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(t){var e={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:t.name,functionArgs:t.data||{}})};return this.request(this.setupRequest(e))}},{key:"getOSSUploadOptionsFromPath",value:function(t){var e={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(t)};return this.request(this.setupRequest(e))}},{key:"uploadFileToOSS",value:function(t){var e=this,r=t.url,n=t.formData,i=t.name,a=t.filePath,o=t.fileType,s=t.onUploadProgress;return new Promise((function(t,c){var l=e.adapter.uploadFile({url:r,formData:n,name:i,filePath:a,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(e){e&&e.statusCode<400?t(e):c(new at({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))},fail:function(t){c(new at({code:t.code||"UPLOAD_FAILED",message:t.message||t.errMsg||"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(t){s({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(t){var e={method:"serverless.file.resource.report",params:JSON.stringify(t)};return this.request(this.setupRequest(e))}},{key:"uploadFile",value:function(t){var e=this,r=t.filePath,n=t.cloudPath,i=t.fileType,a=void 0===i?"image":i,o=t.onUploadProgress,s=t.config;if("string"!==z(n))throw new at({code:"INVALID_PARAM",message:"cloudPath\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\u7c7b\u578b"});if(!(n=n.trim()))throw new at({code:"CLOUDPATH_REQUIRED",message:"cloudPath\u4e0d\u53ef\u4e3a\u7a7a"});if(/:\/\//.test(n))throw new at({code:"INVALID_PARAM",message:"cloudPath\u4e0d\u5408\u6cd5"});var c,l,u=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:u,filename:n}).then((function(t){var n=t.result;c=n.id,l="https://"+n.cdnDomain+"/"+n.ossPath;var i={url:"https://"+n.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:n.accessKeyId,Signature:n.signature,host:n.host,id:c,key:n.ossPath,policy:n.policy,success_action_status:200},fileName:"file",name:"file",filePath:r,fileType:a};return e.uploadFileToOSS(Object.assign({},i,{onUploadProgress:o}))})).then((function(){return e.reportOSSUpload({id:c})})).then((function(t){return new Promise((function(e,n){t.success?e({success:!0,filePath:r,fileID:l}):n(new at({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))}))}))}},{key:"deleteFile",value:function(t){var e=t.fileList,r={method:"serverless.file.resource.delete",params:JSON.stringify({id:e[0]})};return this.request(this.setupRequest(r))}},{key:"getTempFileURL",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fileList;return new Promise((function(t,r){Array.isArray(e)&&0!==e.length||r(new at({code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u5b57\u7b26\u4e32"})),t({fileList:e.map((function(t){return{fileID:t,tempFileURL:t}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),t}(),pt={init:function(t){var e=new dt(t),r={signInAnonymously:function(){return e.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return e.auth=function(){return r},e.customAuth=e.auth,e}},gt="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(t){t.local="local",t.none="none",t.session="session"}(st||(st={}));var vt,yt=function(){},xt=function(){var t;if(!Promise){t=function(){},t.promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var r=new Promise((function(e,r){t=function(t,n){return t?r(t):e(n)}}));return t.promise=r,t};function mt(t){return void 0===t}function bt(t){return"[object Null]"===Object.prototype.toString.call(t)}function wt(t){var e,r,n=(e=t,"[object Array]"===Object.prototype.toString.call(e)?t:[t]),i=d(n);try{for(i.s();!(r=i.n()).done;){var a=r.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()}}!function(t){t.WEB="web",t.WX_MP="wx_mp"}(vt||(vt={}));var _t={adapter:null,runtime:void 0},St=["anonymousUuidKey"],At=function(t){_(r,t);var e=S(r);function r(){var t;return w(this,r),t=e.call(this),_t.adapter.root.tcbObject||(_t.adapter.root.tcbObject={}),t}return y(r,[{key:"setItem",value:function(t,e){_t.adapter.root.tcbObject[t]=e}},{key:"getItem",value:function(t){return _t.adapter.root.tcbObject[t]}},{key:"removeItem",value:function(t){delete _t.adapter.root.tcbObject[t]}},{key:"clear",value:function(){delete _t.adapter.root.tcbObject}}]),r}(yt);function kt(t,e){switch(t){case"local":return e.localStorage||new At;case"none":return new At;default:return e.sessionStorage||new At}}var Tt=function(){function t(e){if(w(this,t),!this._storage){this._persistence=_t.adapter.primaryStorage||e.persistence,this._storage=kt(this._persistence,_t.adapter);var r="access_token_".concat(e.env),n="access_token_expire_".concat(e.env),i="refresh_token_".concat(e.env),a="anonymous_uuid_".concat(e.env),o="login_type_".concat(e.env),s="user_info_".concat(e.env);this.keys={accessTokenKey:r,accessTokenExpireKey:n,refreshTokenKey:i,anonymousUuidKey:a,loginTypeKey:o,userInfoKey:s}}}return y(t,[{key:"updatePersistence",value:function(t){if(t!==this._persistence){var e="local"===this._persistence;this._persistence=t;var r=kt(t,_t.adapter);for(var n in this.keys){var i=this.keys[n];if(!e||!St.includes(n)){var a=this._storage.getItem(i);mt(a)||bt(a)||(r.setItem(i,a),this._storage.removeItem(i))}}this._storage=r}}},{key:"setStore",value:function(t,e,r){if(this._storage){var n={version:r||"localCachev1",content:e},i=JSON.stringify(n);try{this._storage.setItem(t,i)}catch(t){throw t}}}},{key:"getStore",value:function(t,e){try{if(!this._storage)return}catch(t){return""}e=e||"localCachev1";var r=this._storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}},{key:"removeStore",value:function(t){this._storage.removeItem(t)}}]),t}(),Ct={},Pt={};function Ot(t){return Ct[t]}var Lt=function t(e,r){w(this,t),this.data=r||null,this.name=e},Dt=function(t){_(r,t);var e=S(r);function r(t,n){var i;return w(this,r),i=e.call(this,"error",{error:t,data:n}),i.error=t,i}return r}(Lt),Mt=new(function(){function t(){w(this,t),this._listeners={}}return y(t,[{key:"on",value:function(t,e){return function(t,e,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this._listeners),this}},{key:"off",value:function(t,e){return function(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}(t,e,this._listeners),this}},{key:"fire",value:function(t,e){if(t instanceof Dt)return console.error(t.error),this;var r="string"==typeof t?new Lt(t,e||{}):t,n=r.name;if(this._listens(n)){r.target=this;var i,a=this._listeners[n]?l(this._listeners[n]):[],o=d(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.call(this,r)}}catch(c){o.e(c)}finally{o.f()}}return this}},{key:"_listens",value:function(t){return this._listeners[t]&&this._listeners[t].length>0}}]),t}());function Ft(t,e){Mt.on(t,e)}function It(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mt.fire(t,e)}function Et(t,e){Mt.off(t,e)}var jt,Rt="loginStateChanged",$t="loginStateExpire",zt="loginTypeChanged",Nt="anonymousConverted",Ut="refreshAccessToken";!function(t){t.ANONYMOUS="ANONYMOUS",t.WECHAT="WECHAT",t.WECHAT_PUBLIC="WECHAT-PUBLIC",t.WECHAT_OPEN="WECHAT-OPEN",t.CUSTOM="CUSTOM",t.EMAIL="EMAIL",t.USERNAME="USERNAME",t.NULL="NULL"}(jt||(jt={}));var Bt=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Wt={"X-SDK-Version":"1.3.5"};function qt(t,e,r){var n=t[e];t[e]=function(e){var i={},a={};r.forEach((function(r){var n=r.call(t,e),o=n.data,s=n.headers;Object.assign(i,o),Object.assign(a,s)}));var o=e.data;return o&&function(){var t;if(t=o,"[object FormData]"!==Object.prototype.toString.call(t))e.data=m(m({},o),i);else for(var r in i)o.append(r,i[r])}(),e.headers=m(m({},e.headers||{}),a),n.call(t,e)}}function Ht(){var t=Math.random().toString(16).slice(2);return{data:{seqId:t},headers:m(m({},Wt),{},{"x-seqid":t})}}var Gt=function(){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,t),this.config=r,this._reqClass=new _t.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"\u8bf7\u6c42\u5728".concat(this.config.timeout/1e3,"s\u5185\u672a\u5b8c\u6210\uff0c\u5df2\u4e2d\u65ad"),restrictedMethods:["post"]}),this._cache=Ot(this.config.env),this._localCache=(e=this.config.env,Pt[e]),qt(this._reqClass,"post",[Ht]),qt(this._reqClass,"upload",[Ht]),qt(this._reqClass,"download",[Ht])}return y(t,[{key:"post",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._reqClass.post(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"upload",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._reqClass.upload(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"download",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._reqClass.download(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"refreshAccessToken",value:function(){var t=c(i.default.mark((function t(){var e,r;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),t.prev=1,t.next=4,this._refreshAccessTokenPromise;case 4:e=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](1),r=t.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!r){t.next=12;break}throw r;case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t,this,[[1,7]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"_refreshAccessToken",value:function(){var t=c(i.default.mark((function t(){var e,r,n,a,o,s,c,l,u,h,f,d,p;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this._cache.keys,r=e.accessTokenKey,n=e.accessTokenExpireKey,a=e.refreshTokenKey,o=e.loginTypeKey,s=e.anonymousUuidKey,this._cache.removeStore(r),this._cache.removeStore(n),c=this._cache.getStore(a),c){t.next=5;break}throw new Error("\u672a\u767b\u5f55CloudBase");case 5:return l={refresh_token:c},t.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",l);case 8:if(u=t.sent,!u.data.code){t.next=21;break}if(h=u.data.code,"SIGN_PARAM_INVALID"!==h&&"REFRESH_TOKEN_EXPIRED"!==h&&"INVALID_REFRESH_TOKEN"!==h){t.next=20;break}if(this._cache.getStore(o)!==jt.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==h){t.next=19;break}return f=this._cache.getStore(s),d=this._cache.getStore(a),t.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:f,refresh_token:d});case 17:return p=t.sent,t.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:It($t),this._cache.removeStore(a);case 20:throw new Error("\u5237\u65b0access token\u5931\u8d25\uff1a".concat(u.data.code));case 21:if(!u.data.access_token){t.next=23;break}return t.abrupt("return",(It(Ut),this._cache.setStore(r,u.data.access_token),this._cache.setStore(n,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(a),this._cache.setStore(a,u.data.refresh_token),this._refreshAccessToken());case 24:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getAccessToken",value:function(){var t=c(i.default.mark((function t(){var e,r,n,a,o,s,c;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this._cache.keys,r=e.accessTokenKey,n=e.accessTokenExpireKey,a=e.refreshTokenKey,this._cache.getStore(a)){t.next=3;break}throw new Error("refresh token\u4e0d\u5b58\u5728\uff0c\u767b\u5f55\u72b6\u6001\u5f02\u5e38");case 3:if(o=this._cache.getStore(r),s=this._cache.getStore(n),c=!0,t.t0=this._shouldRefreshAccessTokenHook,!t.t0){t.next=9;break}return t.next=8,this._shouldRefreshAccessTokenHook(o,s);case 8:t.t0=!t.sent;case 9:if(t.t1=t.t0,!t.t1){t.next=12;break}c=!1;case 12:return t.abrupt("return",(!o||!s||s2&&void 0!==arguments[2]?arguments[2]:{},n=/\?/.test(e),i="";for(var a in r)""===i?!n&&(e+="?"):i+="&",i+="".concat(a,"=").concat(encodeURIComponent(r[a]));return/^http(s)?\:\/\//.test(e+=i)?e:"".concat(t).concat(e)}(gt,"//tcb-api.tencentcloudapi.com/web",y),v&&(x+=v),t.next=22,this.post(m({url:x,data:l},f));case 22:if(b=t.sent,w=b.header&&b.header["x-tcb-trace"],w&&this._localCache.setStore(a,w),(200===Number(b.status)||200===Number(b.statusCode))&&b.data){t.next=26;break}throw new Error("network request error");case 26:return t.abrupt("return",b);case 27:case"end":return t.stop()}}),t,this)})));function e(e,r,n){return t.apply(this,arguments)}return e}()},{key:"send",value:function(){var t=c(i.default.mark((function t(e){var r,n,a,o=arguments;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},t.next=3,this.request(e,r,{onUploadProgress:r.onUploadProgress});case 3:if(n=t.sent,"ACCESS_TOKEN_EXPIRED"!==n.data.code||-1!==Bt.indexOf(e)){t.next=13;break}return t.next=7,this.refreshAccessToken();case 7:return t.next=9,this.request(e,r,{onUploadProgress:r.onUploadProgress});case 9:if(a=t.sent,!a.data.code){t.next=12;break}throw new Error("[".concat(a.data.code,"] ").concat(a.data.message));case 12:return t.abrupt("return",a.data);case 13:if(!n.data.code){t.next=15;break}throw new Error("[".concat(n.data.code,"] ").concat(n.data.message));case 15:return t.abrupt("return",n.data);case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"setRefreshToken",value:function(t){var e=this._cache.keys,r=e.accessTokenKey,n=e.accessTokenExpireKey,i=e.refreshTokenKey;this._cache.removeStore(r),this._cache.removeStore(n),this._cache.setStore(i,t)}}]),t}(),Kt={};function Jt(t){return Kt[t]}var Xt=function(){function t(e){w(this,t),this.config=e,this._cache=Ot(e.env),this._request=Jt(e.env)}return y(t,[{key:"setRefreshToken",value:function(t){var e=this._cache.keys,r=e.accessTokenKey,n=e.accessTokenExpireKey,i=e.refreshTokenKey;this._cache.removeStore(r),this._cache.removeStore(n),this._cache.setStore(i,t)}},{key:"setAccessToken",value:function(t,e){var r=this._cache.keys,n=r.accessTokenKey,i=r.accessTokenExpireKey;this._cache.setStore(n,t),this._cache.setStore(i,e)}},{key:"refreshUserInfo",value:function(){var t=c(i.default.mark((function t(){var e,r;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._request.send("auth.getUserInfo",{});case 2:return e=t.sent,r=e.data,t.abrupt("return",(this.setLocalUserInfo(r),r));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"setLocalUserInfo",value:function(t){var e=this._cache.keys.userInfoKey;this._cache.setStore(e,t)}}]),t}(),Vt=function(){function t(e){if(w(this,t),!e)throw new Error("envId is not defined");this._envId=e,this._cache=Ot(this._envId),this._request=Jt(this._envId),this.setUserInfo()}return y(t,[{key:"linkWithTicket",value:function(t){if("string"!=typeof t)throw new Error("ticket must be string");return this._request.send("auth.linkWithTicket",{ticket:t})}},{key:"linkWithRedirect",value:function(t){t.signInWithRedirect()}},{key:"updatePassword",value:function(t,e){return this._request.send("auth.updatePassword",{oldPassword:e,newPassword:t})}},{key:"updateEmail",value:function(t){return this._request.send("auth.updateEmail",{newEmail:t})}},{key:"updateUsername",value:function(t){if("string"!=typeof t)throw new Error("username must be a string");return this._request.send("auth.updateUsername",{username:t})}},{key:"getLinkedUidList",value:function(){var t=c(i.default.mark((function t(){var e,r,n,a;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return e=t.sent,r=e.data,n=!1,a=r.users,t.abrupt("return",(a.forEach((function(t){t.wxOpenId&&t.wxPublicId&&(n=!0)})),{users:a,hasPrimaryUid:n}));case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"setPrimaryUid",value:function(t){return this._request.send("auth.setPrimaryUid",{uid:t})}},{key:"unlink",value:function(t){return this._request.send("auth.unlink",{platform:t})}},{key:"update",value:function(){var t=c(i.default.mark((function t(e){var r,n,a,o,s,c,l,u;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e.nickName,n=e.gender,a=e.avatarUrl,o=e.province,s=e.country,c=e.city,t.next=8,this._request.send("auth.updateUserInfo",{nickName:r,gender:n,avatarUrl:a,province:o,country:s,city:c});case 8:l=t.sent,u=l.data,this.setLocalUserInfo(u);case 11:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"refresh",value:function(){var t=c(i.default.mark((function t(){var e,r;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._request.send("auth.getUserInfo",{});case 2:return e=t.sent,r=e.data,t.abrupt("return",(this.setLocalUserInfo(r),r));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"setUserInfo",value:function(){var t=this,e=this._cache.keys.userInfoKey,r=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(e){t[e]=r[e]})),this.location={country:r.country,province:r.province,city:r.city}}},{key:"setLocalUserInfo",value:function(t){var e=this._cache.keys.userInfoKey;this._cache.setStore(e,t),this.setUserInfo()}}]),t}(),Yt=function(){function t(e){if(w(this,t),!e)throw new Error("envId is not defined");this._cache=Ot(e);var r=this._cache.keys,n=r.refreshTokenKey,i=r.accessTokenKey,a=r.accessTokenExpireKey,o=this._cache.getStore(n),s=this._cache.getStore(i),c=this._cache.getStore(a);this.credential={refreshToken:o,accessToken:s,accessTokenExpire:c},this.user=new Vt(e)}return y(t,[{key:"isAnonymousAuth",get:function(){return this.loginType===jt.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===jt.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===jt.WECHAT||this.loginType===jt.WECHAT_OPEN||this.loginType===jt.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),t}(),Qt=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"signIn",value:function(){var t=c(i.default.mark((function t(){var e,r,n,a,o,s,c;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this._cache.updatePersistence("local"),e=this._cache.keys,r=e.anonymousUuidKey,n=e.refreshTokenKey,a=this._cache.getStore(r)||void 0,o=this._cache.getStore(n)||void 0,t.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:a,refresh_token:o});case 8:if(s=t.sent,!s.uuid||!s.refresh_token){t.next=20;break}return this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),t.next=14,this._request.refreshAccessToken();case 14:return It(Rt),It(zt,{env:this.config.env,loginType:jt.ANONYMOUS,persistence:"local"}),c=new Yt(this.config.env),t.next=19,c.user.refresh();case 19:return t.abrupt("return",c);case 20:throw new Error("\u533f\u540d\u767b\u5f55\u5931\u8d25");case 21:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var t=c(i.default.mark((function t(e){var r,n,a,o,s,c;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=this._cache.keys,n=r.anonymousUuidKey,a=r.refreshTokenKey,o=this._cache.getStore(n),s=this._cache.getStore(a),t.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:s,ticket:e});case 7:if(c=t.sent,!c.refresh_token){t.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(c.refresh_token),t.next=13,this._request.refreshAccessToken();case 13:return It(Nt,{env:this.config.env}),It(zt,{loginType:jt.CUSTOM,persistence:"local"}),t.abrupt("return",{credential:{refreshToken:c.refresh_token}});case 16:throw new Error("\u533f\u540d\u8f6c\u5316\u5931\u8d25");case 17:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"_setAnonymousUUID",value:function(t){var e=this._cache.keys,r=e.anonymousUuidKey,n=e.loginTypeKey;this._cache.removeStore(r),this._cache.setStore(r,t),this._cache.setStore(n,jt.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),r}(Xt),Zt=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"signIn",value:function(){var t=c(i.default.mark((function t(e){var r,n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}throw new Error("ticket must be a string");case 2:return r=this._cache.keys.refreshTokenKey,t.next=5,this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(r)||""});case 5:if(n=t.sent,!n.refresh_token){t.next=15;break}return this.setRefreshToken(n.refresh_token),t.next=10,this._request.refreshAccessToken();case 10:return It(Rt),It(zt,{env:this.config.env,loginType:jt.CUSTOM,persistence:this.config.persistence}),t.next=14,this.refreshUserInfo();case 14:return t.abrupt("return",new Yt(this.config.env));case 15:throw new Error("\u81ea\u5b9a\u4e49\u767b\u5f55\u5931\u8d25");case 16:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),r}(Xt),te=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"signIn",value:function(){var t=c(i.default.mark((function t(e,r){var n,a,o,s,c;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}throw new Error("email must be a string");case 2:return n=this._cache.keys.refreshTokenKey,t.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:r,refresh_token:this._cache.getStore(n)||""});case 5:if(a=t.sent,o=a.refresh_token,s=a.access_token,c=a.access_token_expire,!o){t.next=22;break}if(this.setRefreshToken(o),!s||!c){t.next=15;break}this.setAccessToken(s,c),t.next=17;break;case 15:return t.next=17,this._request.refreshAccessToken();case 17:return t.next=19,this.refreshUserInfo();case 19:return It(Rt),It(zt,{env:this.config.env,loginType:jt.EMAIL,persistence:this.config.persistence}),t.abrupt("return",new Yt(this.config.env));case 22:throw a.code?new Error("\u90ae\u7bb1\u767b\u5f55\u5931\u8d25: [".concat(a.code,"] ").concat(a.message)):new Error("\u90ae\u7bb1\u767b\u5f55\u5931\u8d25");case 23:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()},{key:"activate",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.send("auth.activateEndUserMail",{token:e}));case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"resetPasswordWithToken",value:function(){var t=c(i.default.mark((function t(e,r){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:r}));case 1:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()}]),r}(Xt),ee=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"signIn",value:function(){var t=c(i.default.mark((function t(e,r){var n,a,o,s,c;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}throw new Error("username must be a string");case 2:return"string"!=typeof r&&(r="",console.warn("password is empty")),n=this._cache.keys.refreshTokenKey,t.next=6,this._request.send("auth.signIn",{loginType:jt.USERNAME,username:e,password:r,refresh_token:this._cache.getStore(n)||""});case 6:if(a=t.sent,o=a.refresh_token,s=a.access_token_expire,c=a.access_token,!o){t.next=23;break}if(this.setRefreshToken(o),!c||!s){t.next=16;break}this.setAccessToken(c,s),t.next=18;break;case 16:return t.next=18,this._request.refreshAccessToken();case 18:return t.next=20,this.refreshUserInfo();case 20:return It(Rt),It(zt,{env:this.config.env,loginType:jt.USERNAME,persistence:this.config.persistence}),t.abrupt("return",new Yt(this.config.env));case 23:throw a.code?new Error("\u7528\u6237\u540d\u5bc6\u7801\u767b\u5f55\u5931\u8d25: [".concat(a.code,"] ").concat(a.message)):new Error("\u7528\u6237\u540d\u5bc6\u7801\u767b\u5f55\u5931\u8d25");case 24:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()}]),r}(Xt),re=function(){function t(e){w(this,t),this.config=e,this._cache=Ot(e.env),this._request=Jt(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Ft(zt,this._onLoginTypeChanged)}return y(t,[{key:"anonymousAuthProvider",value:function(){return new Qt(this.config)}},{key:"customAuthProvider",value:function(){return new Zt(this.config)}},{key:"emailAuthProvider",value:function(){return new te(this.config)}},{key:"usernameAuthProvider",value:function(){return new ee(this.config)}},{key:"signInAnonymously",value:function(){var t=c(i.default.mark((function t(){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Qt(this.config).signIn());case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"signInWithEmailAndPassword",value:function(){var t=c(i.default.mark((function t(e,r){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new te(this.config).signIn(e,r));case 1:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()},{key:"signInWithUsernameAndPassword",value:function(t,e){return new ee(this.config).signIn(t,e)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Qt(this.config)),Ft(Nt,this._onAnonymousConverted),t.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"signOut",value:function(){var t=c(i.default.mark((function t(){var e,r,n,a,o,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.loginType!==jt.ANONYMOUS){t.next=2;break}throw new Error("\u533f\u540d\u7528\u6237\u4e0d\u652f\u6301\u767b\u51fa\u64cd\u4f5c");case 2:if(e=this._cache.keys,r=e.refreshTokenKey,n=e.accessTokenKey,a=e.accessTokenExpireKey,o=this._cache.getStore(r),o){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,this._request.send("auth.logout",{refresh_token:o});case 7:return s=t.sent,t.abrupt("return",(this._cache.removeStore(r),this._cache.removeStore(n),this._cache.removeStore(a),It(Rt),It(zt,{env:this.config.env,loginType:jt.NULL,persistence:this.config.persistence}),s));case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"signUpWithEmailAndPassword",value:function(){var t=c(i.default.mark((function t(e,r){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:r}));case 1:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()},{key:"sendPasswordResetEmail",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:e}));case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"onLoginStateChanged",value:function(t){var e=this;Ft(Rt,(function(){var r=e.hasLoginState();t.call(e,r)}));var r=this.hasLoginState();t.call(this,r)}},{key:"onLoginStateExpired",value:function(t){Ft($t,t.bind(this))}},{key:"onAccessTokenRefreshed",value:function(t){Ft(Ut,t.bind(this))}},{key:"onAnonymousConverted",value:function(t){Ft(Nt,t.bind(this))}},{key:"onLoginTypeChanged",value:function(t){var e=this;Ft(zt,(function(){var r=e.hasLoginState();t.call(e,r)}))}},{key:"getAccessToken",value:function(){var t=c(i.default.mark((function t(){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this._request.getAccessToken();case 2:return t.t0=t.sent.accessToken,t.t1=this.config.env,t.abrupt("return",{accessToken:t.t0,env:t.t1});case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"hasLoginState",value:function(){var t=this._cache.keys.refreshTokenKey;return this._cache.getStore(t)?new Yt(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var t=c(i.default.mark((function t(e){var r,n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("string"==typeof e){t.next=2;break}throw new Error("username must be a string");case 2:return t.next=4,this._request.send("auth.isUsernameRegistered",{username:e});case 4:return r=t.sent,n=r.data,t.abrupt("return",n&&n.isRegistered);case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var t=c(i.default.mark((function t(e){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Zt(this.config).signIn(e));case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"shouldRefreshAccessToken",value:function(t){this._request._shouldRefreshAccessTokenHook=t.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(t){return t.code?t:m(m({},t.data),{},{requestId:t.seqId})}))}},{key:"getAuthHeader",value:function(){var t=this._cache.keys,e=t.refreshTokenKey,r=t.accessTokenKey,n=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(r)+"/@@/"+n}}},{key:"_onAnonymousConverted",value:function(t){var e=t.data.env;e===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(t){var e=t.data,r=e.loginType,n=e.persistence,i=e.env;i===this.config.env&&(this._cache.updatePersistence(n),this._cache.setStore(this._cache.keys.loginTypeKey,r))}},{key:"currentUser",get:function(){var t=this.hasLoginState();return t&&t.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),t}(),ne=function(t,e){e=e||xt();var r=Jt(this.config.env),n=t.cloudPath,i=t.filePath,a=t.onUploadProgress,o=t.fileType,s=void 0===o?"image":o;return r.send("storage.getUploadMetadata",{path:n}).then((function(t){var o=t.data,c=o.url,l=o.authorization,u=o.token,h=o.fileId,f=o.cosFileId,d=t.requestId,p={key:n,signature:l,"x-cos-meta-fileid":f,success_action_status:"201","x-cos-security-token":u};r.upload({url:c,data:p,file:i,name:n,fileType:s,onUploadProgress:a}).then((function(t){201===t.statusCode?e(null,{fileID:h,requestId:d}):e(new Error("STORAGE_REQUEST_FAIL: ".concat(t.data)))})).catch((function(t){e(t)}))})).catch((function(t){e(t)})),e.promise},ie=function(t,e){e=e||xt();var r=Jt(this.config.env),n=t.cloudPath;return r.send("storage.getUploadMetadata",{path:n}).then((function(t){e(null,t)})).catch((function(t){e(t)})),e.promise},ae=function(t,e){var r=t.fileList;if(e=e||xt(),!r||!Array.isArray(r))return{code:"INVALID_PARAM",message:"fileList\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u6570\u7ec4"};var n,i=d(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(!a||"string"!=typeof a)return{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u5b57\u7b26\u4e32"}}}catch(s){i.e(s)}finally{i.f()}var o={fileid_list:r};return Jt(this.config.env).send("storage.batchDeleteFile",o).then((function(t){t.code?e(null,t):e(null,{fileList:t.data.delete_list,requestId:t.requestId})})).catch((function(t){e(t)})),e.promise},oe=function(t,e){var r=t.fileList;e=e||xt(),r&&Array.isArray(r)||e(null,{code:"INVALID_PARAM",message:"fileList\u5fc5\u987b\u662f\u975e\u7a7a\u7684\u6570\u7ec4"});var n,i=[],a=d(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;"object"==typeof o?(o.hasOwnProperty("fileID")&&o.hasOwnProperty("maxAge")||e(null,{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u5305\u542bfileID\u548cmaxAge\u7684\u5bf9\u8c61"}),i.push({fileid:o.fileID,max_age:o.maxAge})):"string"==typeof o?i.push({fileid:o}):e(null,{code:"INVALID_PARAM",message:"fileList\u7684\u5143\u7d20\u5fc5\u987b\u662f\u5b57\u7b26\u4e32"})}}catch(c){a.e(c)}finally{a.f()}var s={file_list:i};return Jt(this.config.env).send("storage.batchGetDownloadUrl",s).then((function(t){t.code?e(null,t):e(null,{fileList:t.data.download_list,requestId:t.requestId})})).catch((function(t){e(t)})),e.promise},se=function(){var t=c(i.default.mark((function t(e,r){var n,a,o,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.fileID,t.next=3,oe.call(this,{fileList:[{fileID:n,maxAge:600}]});case 3:if(a=t.sent.fileList[0],"SUCCESS"===a.code){t.next=6;break}return t.abrupt("return",r?r(a):new Promise((function(t){t(a)})));case 6:if(o=Jt(this.config.env),s=a.download_url,s=encodeURI(s),r){t.next=10;break}return t.abrupt("return",o.download({url:s}));case 10:return t.t0=r,t.next=13,o.download({url:s});case 13:t.t1=t.sent,(0,t.t0)(t.t1);case 15:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),ce=function(t,e){var r,n=t.name,i=t.data,a=t.query,o=t.parse,s=t.search,c=e||xt();try{r=i?JSON.stringify(i):""}catch(n){return Promise.reject(n)}if(!n)return Promise.reject(new Error("\u51fd\u6570\u540d\u4e0d\u80fd\u4e3a\u7a7a"));var l={inQuery:a,parse:o,search:s,function_name:n,request_data:r};return Jt(this.config.env).send("functions.invokeFunction",l).then((function(t){if(t.code)c(null,t);else{var e=t.data.response_data;if(o)c(null,{result:e,requestId:t.requestId});else try{e=JSON.parse(t.data.response_data),c(null,{result:e,requestId:t.requestId})}catch(t){c(new Error("response data must be json"))}}return c.promise})).catch((function(t){c(t)})),c.promise},le={timeout:15e3,persistence:"session"},ue={},he=function(){function t(e){w(this,t),this.config=e||this.config,this.authObj=void 0}return y(t,[{key:"init",value:function(e){switch(_t.adapter||(this.requestClient=new _t.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:"\u8bf7\u6c42\u5728".concat((e.timeout||5e3)/1e3,"s\u5185\u672a\u5b8c\u6210\uff0c\u5df2\u4e2d\u65ad")})),this.config=m(m({},le),e),!0){case this.config.timeout>6e5:console.warn("timeout\u5927\u4e8e\u53ef\u914d\u7f6e\u4e0a\u9650[10\u5206\u949f]\uff0c\u5df2\u91cd\u7f6e\u4e3a\u4e0a\u9650\u6570\u503c"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout\u5c0f\u4e8e\u53ef\u914d\u7f6e\u4e0b\u9650[100ms]\uff0c\u5df2\u91cd\u7f6e\u4e3a\u4e0b\u9650\u6570\u503c"),this.config.timeout=100}return new t(this.config)}},{key:"auth",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.persistence;if(this.authObj)return this.authObj;var r,n=e||_t.adapter.primaryStorage||le.persistence;return n!==this.config.persistence&&(this.config.persistence=n),function(t){var e=t.env;Ct[e]=new Tt(t),Pt[e]=new Tt(m(m({},t),{},{persistence:"local"}))}(this.config),r=this.config,Kt[r.env]=new Gt(r),this.authObj=new re(this.config),this.authObj}},{key:"on",value:function(t,e){return Ft.apply(this,[t,e])}},{key:"off",value:function(t,e){return Et.apply(this,[t,e])}},{key:"callFunction",value:function(t,e){return ce.apply(this,[t,e])}},{key:"deleteFile",value:function(t,e){return ae.apply(this,[t,e])}},{key:"getTempFileURL",value:function(t,e){return oe.apply(this,[t,e])}},{key:"downloadFile",value:function(t,e){return se.apply(this,[t,e])}},{key:"uploadFile",value:function(t,e){return ne.apply(this,[t,e])}},{key:"getUploadMetadata",value:function(t,e){return ie.apply(this,[t,e])}},{key:"registerExtension",value:function(t){ue[t.name]=t}},{key:"invokeExtension",value:function(){var t=c(i.default.mark((function t(e,r){var n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=ue[e],n){t.next=3;break}throw Error("\u6269\u5c55".concat(e," \u5fc5\u987b\u5148\u6ce8\u518c"));case 3:return t.next=5,n.invoke(r,this);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));function e(e,r){return t.apply(this,arguments)}return e}()},{key:"useAdapters",value:function(t){var e=wt(t)||{},r=e.adapter,n=e.runtime;r&&(_t.adapter=r),n&&(_t.runtime=n)}}]),t}(),fe=new he;function de(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),i="";for(var a in r)""===i?!n&&(e+="?"):i+="&",i+=a+"="+encodeURIComponent(r[a]);return/^http(s)?:\/\//.test(e+=i)?e:""+t+e}var pe=function(){function t(){w(this,t)}return y(t,[{key:"post",value:function(t){var e=t.url,r=t.data,n=t.headers;return new Promise((function(t,i){lt.request({url:de("https:",e),data:r,method:"POST",header:n,success:function(e){t(e)},fail:function(t){i(t)}})}))}},{key:"upload",value:function(t){return new Promise((function(e,r){var n=t.url,i=t.file,a=t.data,o=t.headers,s=t.fileType,c=lt.uploadFile({url:de("https:",n),name:"file",formData:Object.assign({},a),filePath:i,fileType:s,header:o,success:function(t){var r={statusCode:t.statusCode,data:t.data||{}};200===t.statusCode&&a.success_action_status&&(r.statusCode=parseInt(a.success_action_status,10)),e(r)},fail:function(t){B&&"mp-alipay"===W&&console.warn("\u652f\u4ed8\u5b9d\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5de5\u5177\u4e0a\u4f20\u817e\u8baf\u4e91\u65f6\u65e0\u6cd5\u51c6\u786e\u5224\u65ad\u662f\u5426\u4e0a\u4f20\u6210\u529f\uff0c\u8bf7\u4f7f\u7528\u771f\u673a\u6d4b\u8bd5"),r(new Error(t.errMsg||"uploadFile:fail"))}});"function"==typeof t.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(e){t.onUploadProgress({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}}]),t}(),ge={setItem:function(t,e){lt.setStorageSync(t,e)},getItem:function(t){return lt.getStorageSync(t)},removeItem:function(t){lt.removeStorageSync(t)},clear:function(){lt.clearStorageSync()}},ve={genAdapter:function(){return{root:{},reqClass:pe,localStorage:ge,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};fe.useAdapters(ve);var ye=fe,xe=ye.init;ye.init=function(t){t.env=t.spaceId;var e=xe.call(this,t);e.config.provider="tencent",e.config.spaceId=t.spaceId;var r=e.auth;return e.auth=function(t){var e=r.call(this,t);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(t){e[t]=nt(e[t]).bind(e)})),e},e.customAuth=e.auth,e};var me=ye;function be(){return{token:lt.getStorageSync("uni_id_token")||lt.getStorageSync("uniIdToken"),tokenExpired:lt.getStorageSync("uni_id_token_expired")}}function we(){B&&"h5"===W&&uni.getStorageSync("__LAST_DCLOUD_APPID")!==K&&(uni.setStorageSync("__LAST_DCLOUD_APPID",K),console.warn("\u68c0\u6d4b\u5230\u5f53\u524d\u9879\u76ee\u4e0e\u4e0a\u6b21\u8fd0\u884c\u5230\u6b64\u7aef\u53e3\u7684\u9879\u76ee\u4e0d\u4e00\u81f4\uff0c\u81ea\u52a8\u6e05\u7406uni-id\u4fdd\u5b58\u7684token\u4fe1\u606f\uff08\u4ec5\u5f00\u53d1\u8c03\u8bd5\u65f6\u751f\u6548\uff09"),lt.removeStorageSync("uni_id_token"),lt.removeStorageSync("uniIdToken"),lt.removeStorageSync("uni_id_token_expired"))}var _e=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"getAccessToken",value:function(){var t=this;return new Promise((function(e,r){var n="Anonymous_Access_token";t.setAccessToken(n),e(n)}))}},{key:"setupRequest",value:function(t,e){var r=Object.assign({},t,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};"auth"!==e&&(r.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=ct.sign(r,this.config.clientSecret);var i=ot();n["x-client-info"]=JSON.stringify(i);var a=be(),o=a.token;return n["x-client-token"]=o,{url:this.config.requestUrl,method:"POST",data:r,dataType:"json",header:JSON.parse(JSON.stringify(n))}}},{key:"uploadFileToOSS",value:function(t){var e=this,r=t.url,n=t.formData,i=t.name,a=t.filePath,o=t.fileType,s=t.onUploadProgress;return new Promise((function(t,c){var l=e.adapter.uploadFile({url:r,formData:n,name:i,filePath:a,fileType:o,success:function(e){e&&e.statusCode<400?t(e):c(new at({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))},fail:function(t){c(new at({code:t.code||"UPLOAD_FAILED",message:t.message||t.errMsg||"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(t){s({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(t){var e,r=this,n=t.filePath,i=t.cloudPath,a=t.fileType,o=void 0===a?"image":a,s=t.onUploadProgress;if(!i)throw new at({code:"CLOUDPATH_REQUIRED",message:"cloudPath\u4e0d\u53ef\u4e3a\u7a7a"});return this.getOSSUploadOptionsFromPath({cloudPath:i}).then((function(t){var i=t.result,a=i.url,c=i.formData,l=i.name;e=t.result.fileUrl;var u={url:a,formData:c,name:l,filePath:n,fileType:o};return r.uploadFileToOSS(Object.assign({},u,{onUploadProgress:s}))})).then((function(){return r.reportOSSUpload({cloudPath:i})})).then((function(t){return new Promise((function(r,i){t.success?r({success:!0,filePath:n,fileID:e}):i(new at({code:"UPLOAD_FAILED",message:"\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25"}))}))}))}},{key:"deleteFile",value:function(t){var e=t.fileList,r={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(r))}},{key:"getTempFileURL",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fileList,r={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(r))}}]),r}(dt),Se={init:function(t){var e=new _e(t),r={signInAnonymously:function(){return e.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return e.auth=function(){return r},e.customAuth=e.auth,e}};function Ae(t){var e,r=t.data;e=ot();var n=JSON.parse(JSON.stringify(r||{}));if(Object.assign(n,{clientInfo:e}),!n.uniIdToken){var i=be(),a=i.token;a&&(n.uniIdToken=a)}return n}function ke(t){var e=this,r=t.name,n=t.data,i=this.localAddress,a=this.localPort,o={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],s=this.config.spaceId,c="http://".concat(i,":").concat(a,"/system/check-function"),l="http://".concat(i,":").concat(a,"/cloudfunctions/").concat(r);return new Promise((function(t,e){lt.request({method:"POST",url:c,data:{name:r,platform:W,provider:o,spaceId:s},timeout:3e3,success:function(e){t(e)},fail:function(){t({data:{code:"NETWORK_ERROR",message:"\u8fde\u63a5\u672c\u5730\u8c03\u8bd5\u670d\u52a1\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u5ba2\u6237\u7aef\u662f\u5426\u548c\u4e3b\u673a\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\uff0c\u81ea\u52a8\u5207\u6362\u4e3a\u5df2\u90e8\u7f72\u7684\u4e91\u51fd\u6570\u3002"}})}})})).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.data,r=e||{},n=r.code,i=r.message;return{code:0===n?0:n||"SYS_ERR",message:i||"SYS_ERR"}})).then((function(t){var i=t.code,a=t.message;if(0!==i){switch(i){case"MODULE_ENCRYPTED":console.error("\u6b64\u4e91\u51fd\u6570\uff08".concat(r,"\uff09\u4f9d\u8d56\u52a0\u5bc6\u516c\u5171\u6a21\u5757\u4e0d\u53ef\u672c\u5730\u8c03\u8bd5\uff0c\u81ea\u52a8\u5207\u6362\u4e3a\u4e91\u7aef\u5df2\u90e8\u7f72\u7684\u4e91\u51fd\u6570"));break;case"FUNCTION_ENCRYPTED":console.error("\u6b64\u4e91\u51fd\u6570\uff08".concat(r,"\uff09\u5df2\u52a0\u5bc6\u4e0d\u53ef\u672c\u5730\u8c03\u8bd5\uff0c\u81ea\u52a8\u5207\u6362\u4e3a\u4e91\u7aef\u5df2\u90e8\u7f72\u7684\u4e91\u51fd\u6570"));break;case"ACTION_ENCRYPTED":console.error(a||"\u9700\u8981\u8bbf\u95ee\u52a0\u5bc6\u7684uni-clientDB-action\uff0c\u81ea\u52a8\u5207\u6362\u4e3a\u4e91\u7aef\u73af\u5883");break;case"NETWORK_ERROR":var s="\u8fde\u63a5\u672c\u5730\u8c03\u8bd5\u670d\u52a1\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u5ba2\u6237\u7aef\u662f\u5426\u548c\u4e3b\u673a\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e0b";throw console.error(s),new Error(s);case"SWITCH_TO_CLOUD":break;default:var c="\u68c0\u6d4b\u672c\u5730\u8c03\u8bd5\u670d\u52a1\u51fa\u73b0\u9519\u8bef\uff1a".concat(a,"\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc\u73af\u5883\u6216\u91cd\u542f\u5ba2\u6237\u7aef\u518d\u8bd5");throw console.error(c),new Error(c)}return e._originCallFunction({name:r,data:n})}return new Promise((function(t,r){var i=Ae.call(e,{data:n});lt.request({method:"POST",url:l,data:{provider:o,platform:W,param:i},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.statusCode,i=e.data;return!n||n>=400?r(new at({code:i.code||"SYS_ERR",message:i.message||"request:fail"})):t({result:i})},fail:function(t){r(new at({code:t.code||t.errCode||"SYS_ERR",message:t.message||t.errMsg||"request:fail"}))}})}))}))}var Te=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:"\uff0c\u4e91\u51fd\u6570[{functionName}]\u5728\u4e91\u7aef\u4e0d\u5b58\u5728\uff0c\u8bf7\u68c0\u67e5\u6b64\u4e91\u51fd\u6570\u540d\u79f0\u662f\u5426\u6b63\u786e\u4ee5\u53ca\u8be5\u4e91\u51fd\u6570\u662f\u5426\u5df2\u4e0a\u4f20\u5230\u670d\u52a1\u7a7a\u95f4",mode:"append"}],Ce=/[\\^$.*+?()[\]{}|]/g,Pe=RegExp(Ce.source);function Oe(t,e,r){return t.replace(new RegExp((n=e)&&Pe.test(n)?n.replace(Ce,"\\$&"):n,"g"),r);var n}function Le(t){var e=t.functionName,r=t.result,n=t.logPvd;if(this.config.useDebugFunction&&r&&r.requestId){var i=JSON.stringify({spaceId:this.config.spaceId,functionName:e,requestId:r.requestId});console.log("[".concat(n,"-request]").concat(i,"[/").concat(n,"-request]"))}}function De(t){var e=t.callFunction,r=function(r){var n=this,i=r.name;r.data=Ae.call(t,{data:r.data});var a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider];return e.call(this,r).then((function(t){return Le.call(n,{functionName:i,result:t,logPvd:a}),Promise.resolve(t)}),(function(t){return Le.call(n,{functionName:i,result:t,logPvd:a}),t&&t.message&&(t.message=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.message,r=void 0===e?"":e,n=t.extraInfo,i=void 0===n?{}:n,a=t.formatter,o=void 0===a?[]:a,s=0;s-1||t[e].push(r)},off:function(e,r){t[e]=t[e]||[];var n=t[e].indexOf(r);-1!==n&&t[e].splice(n,1)}}}var Ee=["db.Geo","db.command","command.aggregate"];function je(t,e){return Ee.indexOf("".concat(t,".").concat(e))>-1}function Re(t){switch(z(t)){case"array":return t.map((function(t){return Re(t)}));case"object":return t._internalType===Me||Object.keys(t).forEach((function(e){t[e]=Re(t[e])})),t;case"regexp":return{$regexp:{source:t.source,flags:t.flags}};case"date":return{$date:t.toISOString()};default:return t}}var $e=function(){function t(e,r,n){w(this,t),this.content=e,this.prevStage=r||null,this.udb=null,this._database=n}return y(t,[{key:"toJSON",value:function(){for(var t=this,e=[t.content];t.prevStage;)t=t.prevStage,e.push(t.content);return{$db:e.reverse().map((function(t){return{$method:t.$method,$param:Re(t.$param)}}))}}},{key:"getAction",value:function(){var t=this.toJSON().$db.find((function(t){return"action"===t.$method}));return t&&t.$param&&t.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(t){return"action"!==t.$method}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"remove",value:function(){return this._send("remove",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",value:function(){throw new Error("clientDB\u7981\u6b62\u4f7f\u7528set\u65b9\u6cd5")}},{key:"_send",value:function(t,e){var r=this.getAction(),n=this.getCommand();if(n.$db.push({$method:t,$param:Re(e)}),B){var i=n.$db.find((function(t){return"collection"===t.$method})),a=i&&i.$param;a&&1===a.length&&"string"==typeof i.$param[0]&&i.$param[0].indexOf(",")>-1&&console.warn("\u68c0\u6d4b\u5230\u4f7f\u7528JQL\u8bed\u6cd5\u8054\u8868\u67e5\u8be2\u65f6\uff0c\u672a\u4f7f\u7528getTemp\u5148\u8fc7\u6ee4\u4e3b\u8868\u6570\u636e\uff0c\u5728\u4e3b\u8868\u6570\u636e\u91cf\u5927\u7684\u60c5\u51b5\u4e0b\u53ef\u80fd\u4f1a\u67e5\u8be2\u7f13\u6162\u3002\n- \u5982\u4f55\u4f18\u5316\u8bf7\u53c2\u8003\u6b64\u6587\u6863\uff1ahttps://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- \u5982\u679c\u4e3b\u8868\u6570\u636e\u91cf\u5f88\u5c0f\u8bf7\u5ffd\u7565\u6b64\u4fe1\u606f\uff0c\u9879\u76ee\u53d1\u884c\u65f6\u4e0d\u4f1a\u51fa\u73b0\u6b64\u63d0\u793a\u3002")}return this._database._callCloudFunction({action:r,command:n})}},{key:"useAggregate",get:function(){for(var t=this,e=!1;t.prevStage;){t=t.prevStage;var r=t.content.$method;if("aggregate"===r||"pipeline"===r){e=!0;break}}return e}},{key:"count",get:function(){if(!this.useAggregate)return function(){return this._send("count",Array.from(arguments))};var t=this;return function(){return ze({$method:"count",$param:Re(Array.from(arguments))},t,this._database)}}}]),t}();function ze(t,e,r){return Fe(new $e(t,e,r),{get:function(t,e){var n="db";return t&&t.content&&(n=t.content.$method),je(n,e)?ze({$method:e},t,r):function(){return ze({$method:e,$param:Re(Array.from(arguments))},t,r)}}})}function Ne(t){var e=t.path,r=t.method;return function(){function t(){w(this,t),this.param=Array.from(arguments)}return y(t,[{key:"toJSON",value:function(){return{$newDb:[].concat(l(e.map((function(t){return{$method:t}}))),[{$method:r,$param:this.param}])}}}]),t}()}var Ue,Be=function(t){_(r,t);var e=S(r);function r(){return w(this,r),e.apply(this,arguments)}return y(r,[{key:"_callCloudFunction",value:function(t){var e=this,r=t.action,n=t.command,i=t.multiCommand,a=t.queryList;function o(t,e){if(i&&a)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=t.token,r=t.tokenExpired;e&<.setStorageSync("uni_id_token",e),r&<.setStorageSync("uni_id_token_expired",r)}({token:a,tokenExpired:s}),e._callbackAuth("refreshToken",[{token:a,tokenExpired:s}]),e._callback("refreshToken",[{token:a,tokenExpired:s}]));var x=t.result.affectedDocs;return"number"==typeof x&&Object.defineProperty(t.result,"affectedDocs",{get:function(){return console.warn("affectedDocs\u4e0d\u518d\u63a8\u8350\u4f7f\u7528\uff0c\u8bf7\u4f7f\u7528inserted/deleted/updated/data.length\u66ff\u4ee3"),x}}),et(rt("database","success"),t).then((function(){return et(rt("database","complete"),t)})).then((function(){return o(t,null),Promise.resolve(t)}))}),(function(t){var r=new at({code:t.code||"SYSTEM_ERROR",message:t.message,requestId:t.requestId});return e._callback("error",[r]),/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(t.message)&&console.warn("clientDB\u672a\u521d\u59cb\u5316\uff0c\u8bf7\u5728web\u63a7\u5236\u53f0\u4fdd\u5b58\u4e00\u6b21schema\u4ee5\u5f00\u542fclientDB"),et(rt("database","fail"),t).then((function(){return et(rt("database","complete"),t)})).then((function(){return o(null,t),Promise.reject(t)}))}))}}]),r}(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.uniClient,n=void 0===r?{}:r;w(this,t),this._uniClient=n,this._authCallBacks={},this._dbCallBacks={},n.isDefault&&(this._dbCallBacks=V("_globalUniCloudDatabaseCallback")),this.auth=Ie(this._authCallBacks),Object.assign(this,Ie(this._dbCallBacks)),this.env=Fe({},{get:function(t,e){return{$env:e}}}),this.Geo=Fe({},{get:function(t,e){return Ne({path:["Geo"],method:e})}}),this.serverDate=Ne({path:[],method:"serverDate"}),this.RegExp=Ne({path:[],method:"RegExp"})}return y(t,[{key:"getCloudEnv",value:function(t){if("string"!=typeof t||!t.trim())throw new Error("getCloudEnv\u53c2\u6570\u9519\u8bef");return{$env:t.replace("$cloudEnv_","")}}},{key:"_callback",value:function(t,e){var r=this._dbCallBacks;r[t]&&r[t].forEach((function(t){t.apply(void 0,l(e))}))}},{key:"_callbackAuth",value:function(t,e){var r=this._authCallBacks;r[t]&&r[t].forEach((function(t){t.apply(void 0,l(e))}))}},{key:"multiSend",value:function(){var t=Array.from(arguments),e=t.map((function(t){var e=t.getAction(),r=t.getCommand();if("getTemp"!==r.$db[r.$db.length-1].$method)throw new Error("multiSend\u53ea\u652f\u6301\u5b50\u547d\u4ee4\u5185\u4f7f\u7528getTemp");return{action:e,command:r}}));return this._callCloudFunction({multiCommand:e,queryList:t})}}]),t}());function We(t){t.database=function(e){if(e&&Object.keys(e).length>0)return t.init(e).database();if(this._database)return this._database;var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Fe(new t(e),{get:function(t,e){return je("db",e)?ze({$method:e},null,t):function(){return ze({$method:e,$param:Re(Array.from(arguments))},null,t)}}})}(Be,{uniClient:t});return this._database=r,r}}var qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",He=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Ge(){var t,e,r=be().token||"",n=r.split(".");if(!r||3!==n.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{t=JSON.parse((e=n[1],decodeURIComponent(Ue(e).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(r){throw new Error("\u83b7\u53d6\u5f53\u524d\u7528\u6237\u4fe1\u606f\u51fa\u9519\uff0c\u8be6\u7ec6\u9519\u8bef\u4fe1\u606f\u4e3a\uff1a"+r.message)}return t.tokenExpired=1e3*t.exp,delete t.exp,delete t.iat,t}Ue="function"!=typeof atob?function(t){if(t=String(t).replace(/[\t\n\f\r ]+/g,""),!He.test(t))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var e;t+="==".slice(2-(3&t.length));for(var r,n,i="",a=0;a>16&255):64===n?String.fromCharCode(e>>16&255,e>>8&255):String.fromCharCode(e>>16&255,e>>8&255,255&e);return i}:atob;var Ke=M(F((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r="chooseAndUploadFile:ok",i="chooseAndUploadFile:fail";function a(t,e){return t.tempFiles.forEach((function(t,r){t.name||(t.name=t.path.substring(t.path.lastIndexOf("/")+1)),e&&(t.fileType=e),t.cloudPath=Date.now()+"_"+r+t.name.substring(t.name.lastIndexOf("."))})),t.tempFilePaths||(t.tempFilePaths=t.tempFiles.map((function(t){return t.path}))),t}function o(t,e,n){var i=n.onChooseFile,a=n.onUploadProgress;return e.then((function(t){if(i){var e=i(t);if(void 0!==e)return Promise.resolve(e).then((function(e){return void 0===e?t:e}))}return t})).then((function(e){return!1===e?{errMsg:r,tempFilePaths:[],tempFiles:[]}:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=arguments.length>3?arguments[3]:void 0;(e=Object.assign({},e)).errMsg=r;var a=e.tempFiles,o=a.length,s=0;return new Promise((function(r){for(;s=o)!a.find((function(t){return!t.url&&!t.errMsg}))&&r(e);else{var l=a[n];t.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:function(t){t.index=n,t.tempFile=l,t.tempFilePath=l.path,i&&i(t)}}).then((function(t){l.url=t.fileID,n0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===e.type?o(t,function(t){var e=t.count,r=t.sizeType,n=t.sourceType,o=void 0===n?["album","camera"]:n,s=t.extension;return new Promise((function(t,n){uni.chooseImage({count:e,sizeType:r,sourceType:o,extension:s,success:function(e){t(a(e,"image"))},fail:function(t){n({errMsg:t.errMsg.replace("chooseImage:fail",i)})}})}))}(e),e):"video"===e.type?o(t,function(t){var e=t.camera,r=t.compressed,n=t.maxDuration,o=t.sourceType,s=void 0===o?["album","camera"]:o,c=t.extension;return new Promise((function(t,o){uni.chooseVideo({camera:e,compressed:r,maxDuration:n,sourceType:s,extension:c,success:function(e){var r=e.tempFilePath,n=e.duration,i=e.size,o=e.height,s=e.width;t(a({errMsg:"chooseVideo:ok",tempFilePaths:[r],tempFiles:[{name:e.tempFile&&e.tempFile.name||"",path:r,size:i,type:e.tempFile&&e.tempFile.type||"",width:s,height:o,duration:n,fileType:"video",cloudPath:""}]},"video"))},fail:function(t){o({errMsg:t.errMsg.replace("chooseVideo:fail",i)})}})}))}(e),e):o(t,function(t){var e=t.count,r=t.extension;return new Promise((function(t,o){var s=uni.chooseFile;if("undefined"!=typeof n&&"function"==typeof n.chooseMessageFile&&(s=n.chooseMessageFile),"function"!=typeof s)return o({errMsg:i+" \u8bf7\u6307\u5b9a type \u7c7b\u578b\uff0c\u8be5\u5e73\u53f0\u4ec5\u652f\u6301\u9009\u62e9 image \u6216 video\u3002"});s({type:"all",count:e,extension:r,success:function(e){t(a(e))},fail:function(t){o({errMsg:t.errMsg.replace("chooseFile:fail",i)})}})}))}(e),e)}}}))),Je="manual";function Xe(t){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 t=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(r){e.push(t[r])})),e}),(function(e,r){if(t.loadtime!==Je){for(var n=!1,i=[],a=2;a0&&void 0!==arguments[0]?arguments[0]:{},r=e.getone,n=void 0!==r&&r,i=e.success,a=e.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(e){t.mixinDatacomLoading=!1;var r=e.result,a=r.data,o=r.count;t.getcount&&(t.mixinDatacomPage.count=o),t.mixinDatacomHasMore=a.length0&&void 0!==arguments[0]?arguments[0]:{},n=t.database(this.spaceInfo),i=r.action||this.action;i&&(n=n.action(i));var a=r.collection||this.collection;n=Array.isArray(a)?(e=n).collection.apply(e,l(a)):n.collection(a);var o=r.where||this.where;o&&Object.keys(o).length&&(n=n.where(o));var s=r.field||this.field;s&&(n=n.field(s));var c=r.foreignKey||this.foreignKey;c&&(n=n.foreignKey(c));var u=r.groupby||this.groupby;u&&(n=n.groupBy(u));var h=r.groupField||this.groupField;h&&(n=n.groupField(h)),!0===(void 0!==r.distinct?r.distinct:this.distinct)&&(n=n.distinct());var f=r.orderby||this.orderby;f&&(n=n.orderBy(f));var d=void 0!==r.pageCurrent?r.pageCurrent:this.mixinDatacomPage.current,p=void 0!==r.pageSize?r.pageSize:this.mixinDatacomPage.size,g=void 0!==r.getcount?r.getcount:this.getcount,v=void 0!==r.gettree?r.gettree:this.gettree,y=void 0!==r.gettreepath?r.gettreepath:this.gettreepath,x={getCount:g},m={limitLevel:void 0!==r.limitlevel?r.limitlevel:this.limitlevel,startWith:void 0!==r.startwith?r.startwith:this.startwith};return v&&(x.getTree=m),y&&(x.getTreePath=m),n=n.skip(p*(d-1)).limit(p).get(x),n}}}}function Ve(t){return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.customUI=e.customUI||t.customUI,Object.assign(t.loadingOptions,e.loadingOptions),Object.assign(t.errorOptions,e.errorOptions),t}({customUI:!1,loadingOptions:{text:"\u52a0\u8f7d\u4e2d...",mask:!0},errorOptions:{type:"modal",retry:!1}},r);var n=r,a=n.customUI,o=n.loadingOptions,s=n.errorOptions,l=!a;return new Proxy({},{get:function(r,n){return function(){var r=c(i.default.mark((function r(){var u,h,f,d,p,g,v,y,x,m,b=arguments;return i.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:for(l&&uni.showLoading({title:o.title,mask:o.mask}),h=b.length,f=new Array(h),d=0;d0&&void 0!==c[0]?c[0]:{},r=e.title,n=e.content,a=e.showCancel,o=e.cancelText,s=e.confirmText,t.abrupt("return",new Promise((function(t,e){uni.showModal({title:r,content:n,showCancel:a,cancelText:o,confirmText:s,success:function(e){t(e)},fail:function(){t({confirm:!1,cancel:!0})}})})));case 2:case"end":return t.stop()}}),t)})))({title:"\u63d0\u793a",content:v,showCancel:s.retry,cancelText:"\u53d6\u6d88",confirmText:s.retry?"\u91cd\u8bd5":"\u786e\u5b9a"});case 22:if(y=r.sent,x=y.confirm,!s.retry||!x){r.next=26;break}return r.abrupt("return",a.apply(void 0,f));case 26:throw m=new at({code:g,message:v,requestId:u.requestId}),m.detail=u.result,m;case 28:return r.abrupt("return",u.result);case 29:case"end":return r.stop()}}),r,null,[[2,8]])})));function a(){return r.apply(this,arguments)}return a}()}})}}function Ye(t,e){return Qe.apply(this,arguments)}function Qe(){return Qe=c(i.default.mark((function t(e,r){var n,a,o;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n="http://".concat(e,":").concat(r,"/system/ping"),t.prev=1,t.next=4,o={url:n,timeout:500},new Promise((function(t,e){lt.request(m(m({},o),{},{success:function(e){t(e)},fail:function(t){e(t)}}))}));case 4:return a=t.sent,t.abrupt("return",!(!a.data||0!==a.data.code));case 8:return t.prev=8,t.t0=t["catch"](1),t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,8]])}))),Qe.apply(this,arguments)}function Ze(t){if(!t.initUniCloudStatus||"rejected"===t.initUniCloudStatus){var e,r=Promise.resolve();e=1,r=new Promise((function(t,r){setTimeout((function(){t()}),e)})),t.isReady=!1,t.isDefault=!1;var n=t.auth();t.initUniCloudStatus="pending",t.initUniCloud=r.then((function(){return n.getLoginState()})).then((function(t){return t?Promise.resolve():n.signInAnonymously()})).then((function(){if(!B)return Promise.resolve();if(B&&t.debugInfo){var e=t.debugInfo,r=e.address,n=e.servePort;return function(){var t=c(i.default.mark((function t(e,r){var n,a,o;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=0;case 1:if(!(a0&&void 0!==arguments[0]?arguments[0]:{},r=e.address,n=e.port;if(!B)return Promise.resolve();if(r)t.localAddress=r,t.localPort=n;else if(t.debugInfo){var i=console["app-plus"===W?"error":"warn"],a="";"remote"===t.debugInfo.initialLaunchType?(t.debugInfo.forceRemote=!0,a="\u5f53\u524d\u5ba2\u6237\u7aef\u548cHBuilderX\u4e0d\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\uff08\u6216\u5176\u4ed6\u7f51\u7edc\u539f\u56e0\u65e0\u6cd5\u8fde\u63a5HBuilderX\uff09\uff0cuniCloud\u672c\u5730\u8c03\u8bd5\u670d\u52a1\u4e0d\u5bf9\u5f53\u524d\u5ba2\u6237\u7aef\u751f\u6548\u3002\n- \u5982\u679c\u4e0d\u4f7f\u7528uniCloud\u672c\u5730\u8c03\u8bd5\u670d\u52a1\uff0c\u8bf7\u76f4\u63a5\u5ffd\u7565\u6b64\u4fe1\u606f\u3002\n- \u5982\u9700\u4f7f\u7528uniCloud\u672c\u5730\u8c03\u8bd5\u670d\u52a1\uff0c\u8bf7\u5c06\u5ba2\u6237\u7aef\u4e0e\u4e3b\u673a\u8fde\u63a5\u5230\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\u5e76\u91cd\u65b0\u8fd0\u884c\u5230\u5ba2\u6237\u7aef\u3002\n- \u5982\u679c\u5728HBuilderX\u5f00\u542f\u7684\u72b6\u6001\u4e0b\u5207\u6362\u8fc7\u7f51\u7edc\u73af\u5883\uff0c\u8bf7\u91cd\u542fHBuilderX\u540e\u518d\u8bd5\n- \u68c0\u67e5\u7cfb\u7edf\u9632\u706b\u5899\u662f\u5426\u62e6\u622a\u4e86HBuilderX\u81ea\u5e26\u7684nodejs"):a="\u65e0\u6cd5\u8fde\u63a5uniCloud\u672c\u5730\u8c03\u8bd5\u670d\u52a1\uff0c\u8bf7\u68c0\u67e5\u5f53\u524d\u5ba2\u6237\u7aef\u662f\u5426\u4e0e\u4e3b\u673a\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\u3002\n- \u5982\u9700\u4f7f\u7528uniCloud\u672c\u5730\u8c03\u8bd5\u670d\u52a1\uff0c\u8bf7\u5c06\u5ba2\u6237\u7aef\u4e0e\u4e3b\u673a\u8fde\u63a5\u5230\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\u5e76\u91cd\u65b0\u8fd0\u884c\u5230\u5ba2\u6237\u7aef\u3002\n- \u5982\u679c\u5728HBuilderX\u5f00\u542f\u7684\u72b6\u6001\u4e0b\u5207\u6362\u8fc7\u7f51\u7edc\u73af\u5883\uff0c\u8bf7\u91cd\u542fHBuilderX\u540e\u518d\u8bd5\n- \u68c0\u67e5\u7cfb\u7edf\u9632\u706b\u5899\u662f\u5426\u62e6\u622a\u4e86HBuilderX\u81ea\u5e26\u7684nodejs","h5"===W&&(a+="\n- \u90e8\u5206\u6d4f\u89c8\u5668\u5f00\u542f\u8282\u6d41\u6a21\u5f0f\u4e4b\u540e\u8bbf\u95ee\u672c\u5730\u5730\u5740\u53d7\u9650\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u542f\u7528\u4e86\u8282\u6d41\u6a21\u5f0f"),i(a)}})).then((function(){we(),t.isReady=!0,t.initUniCloudStatus="fulfilled"})).catch((function(e){console.error(e),t.initUniCloudStatus="rejected"}))}}var tr=new(function(){function t(){w(this,t)}return y(t,[{key:"init",value:function(t){var e={},r=!1!==t.debugFunction&&B&&("h5"===W&&navigator.userAgent.indexOf("HBuilderX")>0||"app-plus"===W);switch(t.provider){case"tencent":e=me.init(Object.assign(t,{useDebugFunction:r}));break;case"aliyun":e=pt.init(Object.assign(t,{useDebugFunction:r}));break;case"private":e=Se.init(Object.assign(t,{useDebugFunction:r}));break;default:throw new Error("\u672a\u63d0\u4f9b\u6b63\u786e\u7684provider\u53c2\u6570")}var n=q;return B&&n&&!n.code&&(e.debugInfo=n),Ze(e),e.reInit=function(){Ze(this)},De(e),function(t){var e=t.uploadFile;t.uploadFile=function(t){return e.call(this,t)}}(e),We(e),function(t){t.getCurrentUserInfo=Ge,t.chooseAndUploadFile=Ke.initChooseAndUploadFile(t),Object.assign(t,{get mixinDatacom(){return Xe(t)}}),t.importObject=Ve(t)}(e),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(t){if(e[t]){var r=e[t];e[t]=function(){return e.reInit(),r.apply(e,Array.from(arguments))},e[t]=nt(e[t],t).bind(e)}})),e.init=this.init,e}}]),t}());(function(){var t=H,e={};if(1===t.length)e=t[0],tr=tr.init(e),tr.isDefault=!0;else{var r,n=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];r=t&&t.length>0?"\u5e94\u7528\u6709\u591a\u4e2a\u670d\u52a1\u7a7a\u95f4\uff0c\u8bf7\u901a\u8fc7uniCloud.init\u65b9\u6cd5\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u670d\u52a1\u7a7a\u95f4":G?"\u5e94\u7528\u672a\u5173\u8054\u670d\u52a1\u7a7a\u95f4\uff0c\u8bf7\u5728uniCloud\u76ee\u5f55\u53f3\u952e\u5173\u8054\u670d\u52a1\u7a7a\u95f4":"uni-app cli\u9879\u76ee\u5185\u4f7f\u7528uniCloud\u9700\u8981\u4f7f\u7528HBuilderX\u7684\u8fd0\u884c\u83dc\u5355\u8fd0\u884c\u9879\u76ee\uff0c\u4e14\u9700\u8981\u5728uniCloud\u76ee\u5f55\u5173\u8054\u670d\u52a1\u7a7a\u95f4",n.forEach((function(t){tr[t]=function(){return console.error(r),Promise.reject(new at({code:"SYS_ERR",message:r}))}}))}Object.assign(tr,{get mixinDatacom(){return Xe(tr)}}),tr.addInterceptor=Z,tr.removeInterceptor=tt,B&&"h5"===W&&(window.uniCloud=tr)})();var er=tr;e.default=er}).call(this,r("c8ba"),r("fe07")["default"])},aa0f:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n="https://app-api.ailvsifa.com",i="https://oa-api.lvshizaixian.com.cn",a="http://localhost:6001",o="http://localhost:3001",s=!0,c={domain:s?i:o,api:s?n:a};e.default=c},aaf3:function(t,e,r){"use strict";r.r(e);var n=r("ca66"),i=r("6b94");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);e["default"]=c.exports},abde:function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","container loading6"),attrs:{_i:0}},[r("view",{staticClass:t._$s(1,"sc","shape shape1"),attrs:{_i:1}}),r("view",{staticClass:t._$s(2,"sc","shape shape2"),attrs:{_i:2}}),r("view",{staticClass:t._$s(3,"sc","shape shape3"),attrs:{_i:3}}),r("view",{staticClass:t._$s(4,"sc","shape shape4"),attrs:{_i:4}})])},a=[]},b6d5:function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","page"),attrs:{_i:0}},[r("view",{staticClass:t._$s(1,"sc","items"),attrs:{_i:1}},[r("view",{staticClass:t._$s(2,"sc","title"),attrs:{_i:2}}),r("view",{staticClass:t._$s(3,"sc","item"),attrs:{_i:3}},[r("view",{staticClass:t._$s(4,"sc","label"),attrs:{_i:4}}),r("view",{staticClass:t._$s(5,"sc","input"),attrs:{_i:5}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],attrs:{_i:6},domProps:{value:t._$s(6,"v-model",t.form.name)},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}})])]),r("view",{staticClass:t._$s(7,"sc","item"),attrs:{_i:7}},[r("view",{staticClass:t._$s(8,"sc","label"),attrs:{_i:8}}),r("view",{staticClass:t._$s(9,"sc","input"),attrs:{_i:9}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password,expression:"form.password"}],attrs:{_i:10},domProps:{value:t._$s(10,"v-model",t.form.password)},on:{input:function(e){e.target.composing||t.$set(t.form,"password",e.target.value)}}})])]),r("view",{staticClass:t._$s(11,"sc","item"),attrs:{_i:11}},[r("label",[r("checkbox",{attrs:{value:t._$s(13,"a-value",t.form.auto),_i:13}}),r("text")])]),r("view",{staticClass:t._$s(15,"sc","button"),attrs:{_i:15}},[r("button",{attrs:{_i:16},on:{click:function(e){return t.getUserInfo()}}})])])])},a=[]},b777:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{title:"Hello",form:{name:"",password:"",auto:!1}}},onLoad:function(){},methods:{getUserInfo:function(){this.$auth.getUserProfile(this.form)}}};e.default=n},bbdd:function(t,e,r){var n=function(){return this||"object"===typeof self&&self}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("96cf"),i)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(o){n.regeneratorRuntime=void 0}},bc24:function(t,e,r){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(r("6c87")),a=s(r("bf21")),o=s(r("3df5"));function s(t){return t&&t.__esModule?t:{default:t}}var c={checkAuth:function(e){t("log",1," at libs/auth.js:7"),this.getLocalUserInfo()?(t("log",2," at libs/auth.js:9"),e(!0)):(t("log",3," at libs/auth.js:12"),e(!1),t("log","\u672a\u83b7\u53d6\u5230\u7528\u6237\u672c\u5730\u6570\u636e\uff0c\u53bb\u83b7\u53d6\u6388\u6743\u8bbe\u7f6e",22222222," at libs/auth.js:14"),this.askLogin())},getLocalUserInfo:function(){var e=uni.getStorageSync("user");return t("log","\u4ece\u672c\u5730\u5b58\u50a8\u4e2d\u83b7\u53d6\u7528\u6237\u6570\u636e",e,11111111," at libs/auth.js:21"),!!e&&(!!e.token&&(i.default.commit("saveUser",e),!0))},noCase:function(){o.default.showError("\u6848\u4ef6\u4e0d\u5b58\u5728"),setTimeout((function(){uni.switchTab({url:"/pages/case/caseList/caseList"})}),1500)},askLogin:function(){uni.showModal({title:"\u5c1a\u672a\u767b\u5f55",content:"\u524d\u5f80\u6388\u6743\u767b\u5f55\u9875\u9762\u5417\uff1f",success:function(e){t("log",e," at libs/auth.js:42"),e.confirm&&uni.navigateTo({url:"/pages/login/login"})}})},getUserProfile:function(e){var r=this;n.getUserProfile({lang:"zh_CN",desc:"\u7528\u4e8e\u5b8c\u5584\u4f1a\u5458\u8d44\u6599",success:function(t){r.login(e,t)},fail:function(e){t("error","\u83b7\u53d6\u7528\u6237\u8eab\u4efd\u4fe1\u606f\u5931\u8d25\u4e86",e," at libs/auth.js:62"),o.default.showError("\u83b7\u53d6\u5931\u8d25")}})},login:function(e,r){uni.showLoading({title:"\u767b\u5f55\u4e2d"}),t("log",r,1111," at libs/auth.js:74"),n.login({success:function(e){t("log",e,"----------- login\u83b7\u53d6\u7684 -----------"," at libs/auth.js:78");var n=e.code;a.default.post("/login",{code:n,encryptedData:r.encryptedData,iv:r.iv},(function(e,r){if(1==r.status){t("log",e,r,"----------\u540e\u7aef\u4f20\u56de\u6765\u7684----------"," at libs/auth.js:86");var n={token:e.token,who:e.lawyerInfo.who,expires_at:e.expires_at,lawyerInfo:e.lawyerInfo,clientInfo:e.clientInfo,info:r.userInfo,login_type:0};if(i.default.commit("saveUser",n),uni.setStorageSync("user",n),uni.hideLoading(),i.default.state.path){var a=i.default.state.path;t("log",a.startsWith("/")," at libs/auth.js:105"),a.startsWith("/")||(a="/"+a),uni.reLaunch({url:a,success:function(e){t("log",e," at libs/auth.js:114")},fail:function(e){t("log",e," at libs/auth.js:117")}})}}}))},fail:function(e){t("error",e,8877897," at libs/auth.js:124")}})},logout:function(){i.default.state.user={user:null,path:"/pages/index/index"},i.default.commit("saveUser",null),uni.clearStorage(),uni.reLaunch({url:"/pages/index/index"}),t("log","\u9000\u51fa\u767b\u5f55\u3002\u3002\u3002",this.user," at libs/auth.js:141")}},l=c;e.default=l}).call(this,r("0de9")["default"],r("fe07")["default"])},bddf:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{title:"Hello",identity:0,chartData:{},opts:{rotate:!1,rotateLock:!1,color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],width:100,padding:[5,5,5,5],dataLabel:!1,legend:{show:!1,fontColor:"#fff",position:"right",lineHeight:20},title:{name:"\u4efb\u52a1\u603b\u6570",fontSize:15,color:"#fff"},subtitle:{name:"20",fontSize:25,color:"#fff"},extra:{ring:{ringWidth:20,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,customRadius:60,borderWidth:3,borderColor:"#FFFFFF",centerColor:"#5687fd",linearType:"custom"}}},list:[{name:"\u4e0a\u6d77\u96c5\u7279\u6709\u9650\u516c\u53f8",tag:{class:"",text:"\u91cd\u70b9\u5355\u4f4d"},type:"\u53cc\u968f\u673a",result:"\u8d23\u4ee4\u9650\u671f\u6574\u6539"}]}},onLoad:function(){var t=uni.getStorageSync("user");t&&(this.identity=1)},onReady:function(){this.getServerData()},methods:{getServerData:function(){var t=this;setTimeout((function(){var e={series:[{data:[{name:"\u4e00\u73ed",value:50},{name:"\u4e8c\u73ed",value:30},{name:"\u4e09\u73ed",value:20},{name:"\u56db\u73ed",value:18},{name:"\u4e94\u73ed",value:8}]}]};t.chartData=JSON.parse(JSON.stringify(e))}),500)}}};e.default=n},bf21:function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r("aa0f")),i=o(r("3df5")),a=o(r("6c87"));function o(t){return t&&t.__esModule?t:{default:t}}var s={uploadFile:function(e,r){var o=a.default.state.user||{};if(!o.lawyerInfo)return i.default.askLogin();t("log",e,r,2222222," at libs/request.js:9"),uni.uploadFile({url:n.default.domain+"/file/upload2",filePath:e,name:"file",header:{token:o.lawyerInfo.token||"",login_type:o.login_type||0,who:o.who},success:function(e){t("log",e,333333," at libs/request.js:20");var n=JSON.parse(e.data);-100==n.status?i.default.askLogin():-1==n.status?i.default.showError(n.msg):r(n.data,n)}})},uploadFile2:function(e,r,o){var s=a.default.state.user||{};if(!s.lawyerInfo)return i.default.askLogin();t("log","1111111111111"+e," at libs/request.js:36"),t("log","2222222222222"+r," at libs/request.js:37"),t("log","3333333333333"+o," at libs/request.js:38"),uni.uploadFile({url:n.default.domain+"/file/uploadFile2",filePath:e,name:"file",formData:r,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){t("log",e," at libs/request.js:50");var r=JSON.parse(e.data);-100==r.status?i.default.askLogin():-1==r.status?i.default.showError(r.msg):o(r.data,r)}})},get:function(e,r,o){var s=a.default.state.user||{};uni.request({url:n.default.api+e,method:"GET",data:r,header:{token:s.token||"",login_type:s.login_type||0},success:function(e){var r=e.data;-100==r.status?(t("log","\u6ca1\u6709\u767b\u5f55"," at libs/request.js:77"),i.default.askLogin()):-1==r.status?i.default.showError(r.msg):o(r.data,r)}})},post:function(e,r,o){var s=a.default.state.user||{};try{uni.request({url:n.default.api+e,method:"POST",data:r,header:{token:s.token||"",login_type:s.login_type||0},success:function(e){var r=e.data;t("log",r,"------------- \u8bf7\u6c42\u8fd4\u56de\u7684\u6570\u636e -------------"," at libs/request.js:100"),-100==r.status?(t("log","\u6ca1\u6709\u767b\u5f55"," at libs/request.js:102"),i.default.askLogin()):-1==r.status?(i.default.showError(r.msg),o(r.data,r)):o(r.data,r)},fail:function(e){t("error",e,8877897," at libs/request.js:114")}})}catch(c){t("log",c," at libs/request.js:118")}},get2:function(e,r,o){var s=a.default.state.user||{};uni.request({url:n.default.domain+e,method:"GET",data:r,header:{token:s.token||"",login_type:s.login_type||0},success:function(e){var r=e.data;-100==r.status?(t("log","\u6ca1\u6709\u767b\u5f55"," at libs/request.js:137"),i.default.askLogin()):-1==r.status?i.default.showError(r.msg):o(r.data,r)}})},post2:function(e,r,o){var s=a.default.state.user||{};try{uni.request({url:n.default.domain+e,method:"POST",data:r,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){var r=e.data;t("log",r,"------------- \u8bf7\u6c42\u8fd4\u56de\u7684\u6570\u636e -------------"," at libs/request.js:162"),-100==r.status?(t("log","\u6ca1\u6709\u767b\u5f55"," at libs/request.js:164"),i.default.askLogin()):-1==r.status?(i.default.showError(r.msg),o(r.data,r)):o(r.data,r)},fail:function(e){t("error",e,8877897," at libs/request.js:176")}})}catch(c){t("log",c," at libs/request.js:180")}}},c=s;e.default=c}).call(this,r("0de9")["default"])},c8ba:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},ca66:function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var n={qiunDataCharts:r("0394").default},i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","page"),attrs:{_i:0}},[r("view",[r("view",{staticClass:t._$s(2,"sc","pure_top"),attrs:{_i:2}}),r("view",{staticClass:t._$s(3,"sc","calendar"),attrs:{_i:3}})]),r("view",{staticClass:t._$s(4,"sc","charts-box"),attrs:{_i:4}},[r("view",[r("qiun-data-charts",{attrs:{type:"ring",opts:t.opts,chartData:t.chartData,_i:6}})],1),r("view",[r("view")])]),r("view",{staticClass:t._$s(9,"sc","listbox"),attrs:{_i:9}},t._l(t._$s(10,"f",{forItems:t.list}),(function(e,n,i,a){return r("view",{key:t._$s(10,"f",{forIndex:i,key:n}),staticClass:t._$s("10-"+a,"sc","item"),attrs:{_i:"10-"+a}},[r("view",{staticClass:t._$s("11-"+a,"sc","namebox"),attrs:{_i:"11-"+a}},[r("view",{staticClass:t._$s("12-"+a,"sc","name"),attrs:{_i:"12-"+a}},[t._v(t._$s("12-"+a,"t0-0",t._s(e.name)))]),r("view",[r("view",{staticClass:t._$s("14-"+a,"sc","tag"),attrs:{_i:"14-"+a}},[t._v(t._$s("14-"+a,"t0-0",t._s(e.tag.text)))])])]),r("view",{staticClass:t._$s("15-"+a,"sc","typebox"),attrs:{_i:"15-"+a}},[r("view",{staticClass:t._$s("16-"+a,"sc","type"),attrs:{_i:"16-"+a}},[t._v(t._$s("16-"+a,"t0-0",t._s(e.type)))]),r("view",{staticClass:t._$s("17-"+a,"sc","result"),attrs:{_i:"17-"+a}},[r("text",[t._v(t._$s("18-"+a,"t0-0",t._s(e.result)))])])]),r("view",{staticClass:t._$s("19-"+a,"sc","staffbox"),attrs:{_i:"19-"+a}},[r("view",{staticClass:t._$s("20-"+a,"sc","staff"),attrs:{_i:"20-"+a}},[r("view"),r("view",[r("img",{})]),r("view",[r("img",{})])]),r("view",{staticClass:t._$s("26-"+a,"sc","implement"),attrs:{_i:"26-"+a}},[r("button")])])])})),0)])},a=[]},caa3:function(t,e,r){"use strict";r.r(e);var n=r("fec8"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},cab7:function(t,e,r){"use strict";r.r(e);var n=r("0f50"),i=r("5903");for(var a in i)"default"!==a&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var o,s=r("f0c5"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"04ed0f7c",null,!1,n["a"],o);e["default"]=c.exports},cd6d:function(t,e,r){"use strict";r.r(e);var n=r("ed22"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},ce04:function(t,e,r){"use strict";r.r(e);var n=r("69dd"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},cf46:function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={data:function(){return{title:"Hello"}},onLoad:function(){},methods:{changePassword:function(){t("log",123," at pages/user/user.vue:40")}}};e.default=r}).call(this,r("0de9")["default"])},e449:function(t,e,r){"use strict";r.r(e);var n=r("43c9"),i=r.n(n);for(var a in n)"default"!==a&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},e617:function(t,e,r){"use strict";var n;r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","container loading1"),attrs:{_i:0}},[r("view",{staticClass:t._$s(1,"sc","shape shape1"),attrs:{_i:1}}),r("view",{staticClass:t._$s(2,"sc","shape shape2"),attrs:{_i:2}}),r("view",{staticClass:t._$s(3,"sc","shape shape3"),attrs:{_i:3}}),r("view",{staticClass:t._$s(4,"sc","shape shape4"),attrs:{_i:4}})])},a=[]},e9a4:function(t,e,r){"use strict";r("899b");var n=u(r("68bd")),i=u(r("bc24")),a=u(r("3df5")),o=u(r("bf21")),s=u(r("aa0f")),c=u(r("6c87")),l=u(r("8bbf"));function u(t){return t&&t.__esModule?t:{default:t}}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=ut.call(r);if("[object Array]"===n)return e=r.slice(0),e;if("[object Object]"===n){for(var i in r)e[i]=t(e[i],r[i]);return e}if("[object Date]"===n)return new Date(r.getTime());if("[object RegExp]"===n){var a=String(r),o=a.lastIndexOf("/");return new RegExp(a.slice(1,o),a.slice(o+1))}return r},ft=function(t){return ht("[object Array]"===ut.call(t)?[]:{},t)},dt=(n={},o(n,String,""),o(n,Number,0),o(n,Boolean,!1),o(n,Object,null),o(n,Array,[]),o(n,null,null),n);function pt(t){return dt[t]}function gt(t){return x(t)?m(t,"value")?t.value:pt(t.type):pt(t)}function vt(t){return x(t)?t.type:t}function yt(t,e,r,n){var i=r[t];if(void 0!==i){var a=e[t],o=vt(a);i=xt(i,o);var s=a&&a.observer;return s&&setTimeout((function(){mt(s,n,i)}),4),i}return gt(e[t])}function xt(t,e){return e===Boolean?!!t:e===String?String(t):t}function mt(t,e,r,n){try{"function"===typeof t?t.call(e,r,n):"string"===typeof t&&"function"===typeof e[t]&&e[t](r,n)}catch(i){console.error("execute observer ".concat(t," callback fail! err: ").concat(i))}}function bt(t,e){var r=t.$options.mpOptions.properties;if(r){var n=ft(t.$options.propsData)||{},i=function(i){var a=!!x(r[i])&&r[i].observer,o=yt(i,r,n,t);Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){var r=o;e===o||e!==e&&o!==o||(o=Array.isArray(e)?e.slice(0):e,a&&mt(a,t,e,r),t.$forceUpdate())}})};for(var a in r)i(a)}}function wt(t){var e=t.$options.mpOptions&&t.$options.mpOptions.properties,r=t.$options.propsData;r&&e&&Object.keys(e).forEach((function(n){m(r,n)&&(t[n]=xt(r[n],vt(e[n])))}))}function _t(t){var e=JSON.parse(JSON.stringify(t.$options.mpOptions.data||{}));t[A]=e;var r={get:function(){return t[A]},set:function(e){t[A]=e}};Object.defineProperties(t,{data:r,properties:r}),t.setData=lt,bt(t,e),Object.keys(e).forEach((function(e){st(t,A,e)}))}function St(t){var e=t.$emit;t.triggerEvent=function(r,n,i){var a={dataset:t.$el.dataset},o={target:a,currentTarget:a,detail:n,preventDefault:b,stopPropagation:b};e.call(t,r,o)},t.$emit=function(){t.triggerEvent.apply(t,arguments)},t.getRelationNodes=function(e){return(t._$relationNodes&&t._$relationNodes[e]||[]).filter((function(t){return!t._isDestroyed}))},t._$updateProperties=wt}function At(t){var e=t.$options.watch;e&&Object.keys(e).forEach((function(r){var n=e[r];if(n.mounted){var i=t[r],a=n.handler;"string"===typeof a&&(a=t[a]),a&&a.call(t,i,i)}}))}var kt={beforeCreate:function(){this._renderProxy=this,this._$self=this,this._$noop=b},created:function(){_t(this),St(this),it(this)},mounted:function(){At(this)},destroyed:function(){at(this,"unlinked")}};function Tt(e){var r=M(e);r.mixins.unshift(kt),r.mpOptions.path=t.__wxRoute,t.__wxComponents[t.__wxRoute]=r}function Ct(t){t.onServiceAttached||(t.onServiceAttached=[]),t.onServiceAttached.push((function(){at(this,"linked")}))}function Pt(e){var r=Y(e);r.mixins.unshift(kt),r.mpOptions.path=t.__wxRoute,Ct(r),t.__wxComponents[t.__wxRoute]=r}function Ot(t){return t}t.__wxRoute="",t.__wxComponents=Object.create(null),t.__wxVueOptions=Object.create(null);var Lt=i.default.nextTick;e.nextTick=Lt;var Dt=uni.__$wx__,Mt=Dt;e.default=Mt}).call(this,r("c8ba"))},fe0d:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],i={type:["pie","ring","rose","funnel","line","column","area","radar","gauge","candle","demotype"],categories:["line","column","area","radar","gauge","candle","demotype"],instance:{},option:{},formatter:{tooltipDemo1:function(t){var e="";for(var r in t){0==r&&(e+=t[r].axisValueLabel+"\u5e74\u9500\u552e\u989d");var n="--";null!==t[r].data&&(n=t[r].data),e+="
"+t[r].marker+t[r].seriesName+"\uff1a"+n+" \u4e07\u5143"}return e},legendFormat:function(t){return"\u81ea\u5b9a\u4e49\u56fe\u4f8b+"+t},yAxisFormatDemo:function(t,e){return t+"\u5143"},seriesFormatDemo:function(t){return t.name+"\u5e74"+t.value+"\u5143"}},demotype:{color:n},column:{color:n,title:{text:""},tooltip:{trigger:"axis"},grid:{top:30,bottom:50,right:15,left:40},legend:{bottom:"left"},toolbox:{show:!1},xAxis:{type:"category",axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}},boundaryGap:!0,data:[]},yAxis:{type:"value",axisTick:{show:!1},axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}}},seriesTemplate:{name:"",type:"bar",data:[],barwidth:20,label:{show:!0,color:"#666666",position:"top"}}},line:{color:n,title:{text:""},tooltip:{trigger:"axis"},grid:{top:30,bottom:50,right:15,left:40},legend:{bottom:"left"},toolbox:{show:!1},xAxis:{type:"category",axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}},boundaryGap:!0,data:[]},yAxis:{type:"value",axisTick:{show:!1},axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}}},seriesTemplate:{name:"",type:"line",data:[],barwidth:20,label:{show:!0,color:"#666666",position:"top"}}},area:{color:n,title:{text:""},tooltip:{trigger:"axis"},grid:{top:30,bottom:50,right:15,left:40},legend:{bottom:"left"},toolbox:{show:!1},xAxis:{type:"category",axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}},boundaryGap:!0,data:[]},yAxis:{type:"value",axisTick:{show:!1},axisLabel:{color:"#666666"},axisLine:{lineStyle:{color:"#CCCCCC"}}},seriesTemplate:{name:"",type:"line",data:[],areaStyle:{},label:{show:!0,color:"#666666",position:"top"}}},pie:{color:n,title:{text:""},tooltip:{trigger:"item"},grid:{top:40,bottom:30,right:15,left:15},legend:{bottom:"left"},seriesTemplate:{name:"",type:"pie",data:[],radius:"50%",label:{show:!0,color:"#666666",position:"top"}}},ring:{color:n,title:{text:""},tooltip:{trigger:"item"},grid:{top:40,bottom:30,right:15,left:15},legend:{bottom:"left"},seriesTemplate:{name:"",type:"pie",data:[],radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!0,color:"#666666",position:"top"},labelLine:{show:!0}}},rose:{color:n,title:{text:""},tooltip:{trigger:"item"},legend:{top:"bottom"},seriesTemplate:{name:"",type:"pie",data:[],radius:"55%",center:["50%","50%"],roseType:"area"}},funnel:{color:n,title:{text:""},tooltip:{trigger:"item",formatter:"{b} : {c}%"},legend:{top:"bottom"},seriesTemplate:{name:"",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:2,label:{show:!0,position:"inside"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{fontSize:20}},data:[]}},gauge:{color:n,tooltip:{formatter:"{a}
{b} : {c}%"},seriesTemplate:{name:"\u4e1a\u52a1\u6307\u6807",type:"gauge",detail:{formatter:"{value}%"},data:[{value:50,name:"\u5b8c\u6210\u7387"}]}},candle:{xAxis:{data:[]},yAxis:{},color:n,title:{text:""},dataZoom:[{type:"inside",xAxisIndex:[0,1],start:10,end:100},{show:!0,xAxisIndex:[0,1],type:"slider",bottom:10,start:10,end:100}],seriesTemplate:{name:"",type:"k",data:[]}}},a=i;e.default=a},fec8:function(t,e,r){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;o(r("8bf4"));var i=o(r("5125")),a=o(r("fe0d"));function o(t){return t&&t.__esModule?t:{default:t}}function s(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length,r=new Array(e>1?e-1:0),n=1;n=1&&n<=9&&(n="0"+n),i>=0&&i<=9&&(i="0"+i);var a=r+e+n+e+i;return a}var u={name:"qiun-data-charts",mixins:[t.mixinDatacom],props:{type:{type:String,default:null},canvasId:{type:String,default:"uchartsid"},canvas2d:{type:Boolean,default:!1},background:{type:String,default:"rgba(0,0,0,0)"},animation:{type:Boolean,default:!0},chartData:{type:Object,default:function(){return{categories:[],series:[]}}},opts:{type:Object,default:function(){return{}}},eopts:{type:Object,default:function(){return{}}},loadingType:{type:Number,default:2},errorShow:{type:Boolean,default:!0},errorReload:{type:Boolean,default:!0},errorMessage:{type:String,default:null},inScrollView:{type:Boolean,default:!1},reshow:{type:Boolean,default:!1},reload:{type:Boolean,default:!1},disableScroll:{type:Boolean,default:!1},optsWatch:{type:Boolean,default:!0},onzoom:{type:Boolean,default:!1},ontap:{type:Boolean,default:!0},ontouch:{type:Boolean,default:!1},onmouse:{type:Boolean,default:!0},onmovetip:{type:Boolean,default:!1},echartsH5:{type:Boolean,default:!1},echartsApp:{type:Boolean,default:!1},tooltipShow:{type:Boolean,default:!0},tooltipFormat:{type:String,default:void 0},tooltipCustom:{type:Object,default:void 0},startDate:{type:String,default:void 0},endDate:{type:String,default:void 0},textEnum:{type:Array,default:function(){return[]}},groupEnum:{type:Array,default:function(){return[]}},pageScrollTop:{type:Number,default:0},directory:{type:String,default:"/"},tapLegend:{type:Boolean,default:!0},menus:{type:Array,default:function(){return[]}}},data:function(){return{cid:"uchartsid",inWx:!1,inAli:!1,inTt:!1,inBd:!1,inH5:!1,inApp:!1,inWin:!1,type2d:!0,disScroll:!1,openmouse:!1,pixel:1,cWidth:375,cHeight:250,showchart:!1,echarts:!1,echartsResize:!1,uchartsOpts:{},echartsOpts:{},drawData:{},lastDrawTime:null}},created:function(){if(this.cid=this.canvasId,"uchartsid"==this.canvasId||""==this.canvasId){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",e=t.length,r="",n=0;n<32;n++)r+=t.charAt(Math.floor(Math.random()*e));this.cid=r}var i=uni.getSystemInfoSync();"windows"!==i.platform&&"mac"!==i.platform||(this.inWin=!0),this.type2d=!1,this.disScroll=this.disableScroll},mounted:function(){var t=this;this.inApp=!0,!0===this.echartsApp&&(this.echarts=!0,this.openmouse=!1),this.$nextTick((function(){t.beforeInit()}))},destroyed:function(){!0===this.echarts?(delete a.default.option[this.cid],delete a.default.instance[this.cid]):(delete i.default.option[this.cid],delete i.default.instance[this.cid]),uni.offWindowResize((function(){}))},watch:{chartDataProps:{handler:function(t,e){"object"===typeof t?JSON.stringify(t)!==JSON.stringify(e)&&(this._clearChart(),t.series&&t.series.length>0?this.beforeInit():(this.mixinDatacomLoading=!0,this.showchart=!1,this.mixinDatacomErrorMessage=null)):(this.mixinDatacomLoading=!1,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage="\u53c2\u6570\u9519\u8bef\uff1achartData\u6570\u636e\u7c7b\u578b\u9519\u8bef")},immediate:!1,deep:!0},localdata:{handler:function(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(t.length>0?this.beforeInit():(this.mixinDatacomLoading=!0,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage=null))},immediate:!1,deep:!0},optsProps:{handler:function(t,e){"object"===typeof t?JSON.stringify(t)!==JSON.stringify(e)&&!1===this.echarts&&1==this.optsWatch&&this.checkData(this.drawData):(this.mixinDatacomLoading=!1,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage="\u53c2\u6570\u9519\u8bef\uff1aopts\u6570\u636e\u7c7b\u578b\u9519\u8bef")},immediate:!1,deep:!0},eoptsProps:{handler:function(t,e){"object"===typeof t?JSON.stringify(t)!==JSON.stringify(e)&&!0===this.echarts&&this.checkData(this.drawData):(this.mixinDatacomLoading=!1,this.showchart=!1,this.mixinDatacomErrorMessage="\u53c2\u6570\u9519\u8bef\uff1aeopts\u6570\u636e\u7c7b\u578b\u9519\u8bef")},immediate:!1,deep:!0},reshow:function(t,e){var r=this;!0===t&&!1===this.mixinDatacomLoading&&setTimeout((function(){r.mixinDatacomErrorMessage=null,r.echartsResize=!r.echartsResize,r.checkData(r.drawData)}),200)},reload:function(t,e){!0===t&&(this.showchart=!1,this.mixinDatacomErrorMessage=null,this.reloading())},mixinDatacomErrorMessage:function(t,e){t&&(this.emitMsg({name:"error",params:{type:"error",errorShow:this.errorShow,msg:t,id:this.cid}}),this.errorShow&&n("log","[\u79cb\u4e91\u56fe\u8868\u7ec4\u4ef6]"+t," at uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue:609"))},errorMessage:function(t,e){t&&this.errorShow&&null!==t&&"null"!==t&&""!==t?(this.showchart=!1,this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=t):(this.showchart=!1,this.mixinDatacomErrorMessage=null,this.reloading())}},computed:{optsProps:function(){return JSON.parse(JSON.stringify(this.opts))},eoptsProps:function(){return JSON.parse(JSON.stringify(this.eopts))},chartDataProps:function(){return JSON.parse(JSON.stringify(this.chartData))}},methods:{beforeInit:function(){this.mixinDatacomErrorMessage=null,"object"===typeof this.chartData&&null!=this.chartData&&void 0!==this.chartData.series&&this.chartData.series.length>0?(this.drawData=s({},this.chartData),this.mixinDatacomLoading=!1,this.showchart=!0,this.checkData(this.chartData)):this.localdata.length>0?(this.mixinDatacomLoading=!1,this.showchart=!0,this.localdataInit(this.localdata)):""!==this.collection?(this.mixinDatacomLoading=!1,this.getCloudData()):this.mixinDatacomLoading=!0},localdataInit:function(t){if(this.groupEnum.length>0)for(var e=0;e0)for(var n=0;n0)h=this.chartData.categories;else if(this.startDate&&this.endDate){var d=new Date(this.startDate),p=new Date(this.endDate);while(d<=p)h.push(l(d)),d=d.setDate(d.getDate()+1),d=new Date(d)}else{var g={};t.map((function(t,e){void 0==t.text||g[t.text]||(h.push(t.text),g[t.text]=!0)}))}u.categories=h}var v={};if(t.map((function(t,e){void 0==t.group||v[t.group]||(f.push({name:t.group,data:[]}),v[t.group]=!0)})),0==f.length)if(f=[{name:"\u9ed8\u8ba4\u5206\u7ec4",data:[]}],!0===c)for(var y=0;y0)for(var _=0;_0&&(this.mixinDatacomErrorMessage=null,!0===this.echarts?(a.default.option[r].chartData=n,this.$nextTick((function(){e.init()}))):(i.default.option[r].categories=n.categories,i.default.option[r].series=n.series,this.$nextTick((function(){e.init()}))))},resizeHandler:function(){var t=this,e=Date.now(),r=this.lastDrawTime?this.lastDrawTime:e-3e3,n=e-r;if(!(n<1e3))uni.createSelectorQuery().in(this).select("#ChartBoxId"+this.cid).boundingClientRect((function(e){t.showchart=!0,e.width>0&&e.height>0&&(e.width===t.cWidth&&e.height===t.cHeight||t.checkData(t.drawData))})).exec()},getCloudData:function(){var t=this;1!=this.mixinDatacomLoading&&(this.mixinDatacomLoading=!0,this.mixinDatacomGet().then((function(e){t.mixinDatacomResData=e.result.data,t.localdataInit(t.mixinDatacomResData)})).catch((function(e){t.mixinDatacomLoading=!1,t.showchart=!1,t.mixinDatacomErrorMessage="\u8bf7\u6c42\u9519\u8bef\uff1a"+e})))},onMixinDatacomPropsChange:function(t,e){1==t&&""!==this.collection&&(this.showchart=!1,this.mixinDatacomErrorMessage=null,this._clearChart(),this.getCloudData())},_clearChart:function(){var t=this.cid;if(!0!==this.echrts&&i.default.option[t]&&i.default.option[t].context){var e=i.default.option[t].context;"object"!==typeof e||i.default.option[t].update||(e.clearRect(0,0,this.cWidth,this.cHeight),e.draw())}},init:function(){var t=this,e=this.cid;uni.createSelectorQuery().in(this).select("#ChartBoxId"+e).boundingClientRect((function(r){r.width>0&&r.height>0?(t.mixinDatacomLoading=!1,t.showchart=!0,t.lastDrawTime=Date.now(),t.cWidth=r.width,t.cHeight=r.height,!0!==t.echarts&&(i.default.option[e].background="rgba(0,0,0,0)"==t.background?"#FFFFFF":t.background,i.default.option[e].canvas2d=t.type2d,i.default.option[e].pixelRatio=t.pixel,i.default.option[e].animation=t.animation,i.default.option[e].width=r.width*t.pixel,i.default.option[e].height=r.height*t.pixel,i.default.option[e].onzoom=t.onzoom,i.default.option[e].ontap=t.ontap,i.default.option[e].ontouch=t.ontouch,i.default.option[e].onmouse=t.openmouse,i.default.option[e].onmovetip=t.onmovetip,i.default.option[e].tooltipShow=t.tooltipShow,i.default.option[e].tooltipFormat=t.tooltipFormat,i.default.option[e].tooltipCustom=t.tooltipCustom,i.default.option[e].inScrollView=t.inScrollView,i.default.option[e].lastDrawTime=t.lastDrawTime,i.default.option[e].tapLegend=t.tapLegend),t.inH5||t.inApp?1==t.echarts?(a.default.option[e].ontap=t.ontap,a.default.option[e].onmouse=t.openmouse,a.default.option[e].tooltipShow=t.tooltipShow,a.default.option[e].tooltipFormat=t.tooltipFormat,a.default.option[e].tooltipCustom=t.tooltipCustom,a.default.option[e].lastDrawTime=t.lastDrawTime,t.echartsOpts=s({},a.default.option[e])):(i.default.option[e].rotateLock=i.default.option[e].rotate,t.uchartsOpts=s({},i.default.option[e])):(i.default.option[e]=c(i.default.option[e],i.default.formatter),t.mixinDatacomErrorMessage=null,t.mixinDatacomLoading=!1,t.showchart=!0,t.$nextTick((function(){if(!0===t.type2d){var n=uni.createSelectorQuery().in(t);n.select("#"+e).fields({node:!0,size:!0}).exec((function(n){if(n[0]){var a=n[0].node,o=a.getContext("2d");i.default.option[e].context=o,i.default.option[e].rotateLock=i.default.option[e].rotate,i.default.instance[e]&&i.default.option[e]&&!0===i.default.option[e].update?t._updataUChart(e):(a.width=r.width*t.pixel,a.height=r.height*t.pixel,a._width=r.width*t.pixel,a._height=r.height*t.pixel,setTimeout((function(){i.default.option[e].context.restore(),i.default.option[e].context.save(),t._newChart(e)}),100))}else t.showchart=!1,t.mixinDatacomErrorMessage="\u53c2\u6570\u9519\u8bef\uff1a\u5f00\u542f2d\u6a21\u5f0f\u540e\uff0c\u672a\u83b7\u53d6\u5230dom\u8282\u70b9\uff0ccanvas-id:"+e}))}else t.inAli&&(i.default.option[e].rotateLock=i.default.option[e].rotate),i.default.option[e].context=uni.createCanvasContext(e,t),i.default.instance[e]&&i.default.option[e]&&!0===i.default.option[e].update?t._updataUChart(e):setTimeout((function(){i.default.option[e].context.restore(),i.default.option[e].context.save(),t._newChart(e)}),100)})))):(t.mixinDatacomLoading=!1,t.showchart=!1,1==t.reshow&&(t.mixinDatacomErrorMessage="\u5e03\u5c40\u9519\u8bef\uff1a\u672a\u83b7\u53d6\u5230\u7236\u5143\u7d20\u5bbd\u9ad8\u5c3a\u5bf8\uff01canvas-id:"+e))})).exec()},saveImage:function(){uni.canvasToTempFilePath({canvasId:this.cid,success:function(t){uni.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:function(){uni.showToast({title:"\u4fdd\u5b58\u6210\u529f",duration:2e3})}})}},this)},getImage:function(){var t=this;if(0==this.type2d)uni.canvasToTempFilePath({canvasId:this.cid,success:function(e){t.emitMsg({name:"getImage",params:{type:"getImage",base64:e.tempFilePath}})}},this);else{var e=uni.createSelectorQuery().in(this);e.select("#"+this.cid).fields({node:!0,size:!0}).exec((function(e){if(e[0]){var r=e[0].node;t.emitMsg({name:"getImage",params:{type:"getImage",base64:r.toDataURL("image/png")}})}}))}},_error:function(t){this.mixinDatacomErrorMessage=t.detail.errMsg},emitMsg:function(t){this.$emit(t.name,t.params)},getRenderType:function(){!0===this.echarts&&!1===this.mixinDatacomLoading&&this.beforeInit()},toJSON:function(){return this}}};e.default=u}).call(this,r("a9ff")["default"],r("0de9")["default"])}},[["e9a4","app-config"]]]);