(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/vendor"],{"02d4":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("66fd")),i=o(n("26cb")),a=o(n("1d1c"));function o(e){return e&&e.__esModule?e:{default:e}}r.default.use(i.default);var s=new i.default.Store({state:{user:{headimg:null,name:"",nickname:"",targetweight:0,firstweight:0,weight:0,birthday:"",height:0,age:"0",sex:0,familyid:0,mage:"",firstresulttime:""},MeasureResult:{},isedit:!1,isDrawe:!1,isConnected:!1,isBluetoothTyle:!1,familayList:[],historyList:[],Banner:[],Trend:{},TrendPk:{},isTarget:!1,isFirst:!1,isRecord:!1,isLogin:!1,isLogout:!0},mutations:{changeUser:function(t,n){n.familyid&&e.setStorageSync("familyid",n.familyid),Object.assign(t.user,n)},changeUserLogin:function(e,t){e.isLogin=t},changehistoryList:function(e,t){e.historyList=t},changeMeasureResult:function(e,t){e.MeasureResult=t},changeEdit:function(e,t){e.isedit=t},changeTarget:function(e,t){e.isTarget=t},changeFirst:function(e,t){e.isFirst=t},changeRecord:function(e,t){e.isRecord=t},changeDrawe:function(e,t){e.isDrawe=t},changeFamilay:function(e,t){e.familayList=t},changeBluetooth:function(e,t){e.isBluetoothTyle=t},changeConnected:function(e,t){e.isConnected=t},changeTrend:function(e,t){e.Trend=t},changeTrendPk:function(e,t){e.TrendPk=t},changeBanner:function(e,t){e.Banner=t},changeLogout:function(e,t){0==t&&(e.user={headimg:null,nickname:"",name:"",targetweight:0,firstweight:0,weight:0,birthday:"",height:0,age:0,sex:0,familyid:0,firstresulttime:""},e.Trend=null,e.historyList=null,e.devTypeList=null),e.isLogout=t}},modules:{},actions:a.default});t.default=s}).call(this,n("543d")["default"])},"0d2f":function(e,t){},"1d1c":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("8196"));i(n("d4ce"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=a({getUserInfo:function(t,n){var i=t.commit;return r.default.getUserInfo(n).then((function(t){i("changeUser",t.data),t.data.height&&t.data.mage&&t.data.birthday||e.redirectTo({url:"/pageTwo/login/userinfo"})}))},getResult:function(e,t){var n=e.commit;return r.default.getResult(t).then((function(e){return console.log("报告",e),0==e.code?n("changeMeasureResult",e.data):n("changeMeasureResult",null),e.data}))},gethistoryList:function(e,t){var n=e.commit;return r.default.getHistoryList(t).then((function(e){return e.data&&e.data.items?n("changehistoryList",e.data.items):n("changehistoryList",null),e}))},GetBodyTrendList:function(e,t){var n=e.commit;return r.default.GetBodyTrendList(t).then((function(e){return e&&n("changeTrend",e.cidata),e}))},getFamilyList:function(e){var t=e.commit;return r.default.getFamilyList({pagenum:20,pagesize:1}).then((function(e){return t("changeFamilay",e),e}))}},"gethistoryList",(function(e,t){var n=e.commit;return r.default.getHistoryList(t).then((function(e){return e.data&&e.data.rows?n("changehistoryList",e.data.rows):n("changehistoryList",null),e}))}));t.default=o}).call(this,n("543d")["default"])},"26a3":function(e,t,n){},"26cb":function(e,t,n){"use strict";(function(t){ /*! * vuex v3.6.2 * (c) 2021 Evan You * @license MIT */ function n(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:r});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[r].concat(e.init):r,n.call(this,e)}}function r(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var r="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},i=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function a(e){i&&(e._devtoolHook=i,i.emit("vuex:init",e),i.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){i.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){i.emit("vuex:action",e,t)}),{prepend:!0}))}function o(e,t){return e.filter(t)[0]}function s(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=o(t,(function(t){return t.original===e}));if(n)return n.copy;var r=Array.isArray(e)?[]:{};return t.push({original:e,copy:r}),Object.keys(e).forEach((function(n){r[n]=s(e[n],t)})),r}function c(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function l(e){return null!==e&&"object"===typeof e}function u(e){return e&&"function"===typeof e.then}function f(e,t){return function(){return e(t)}}var h=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},d={namespaced:{configurable:!0}};d.namespaced.get=function(){return!!this._rawModule.namespaced},h.prototype.addChild=function(e,t){this._children[e]=t},h.prototype.removeChild=function(e){delete this._children[e]},h.prototype.getChild=function(e){return this._children[e]},h.prototype.hasChild=function(e){return e in this._children},h.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},h.prototype.forEachChild=function(e){c(this._children,e)},h.prototype.forEachGetter=function(e){this._rawModule.getters&&c(this._rawModule.getters,e)},h.prototype.forEachAction=function(e){this._rawModule.actions&&c(this._rawModule.actions,e)},h.prototype.forEachMutation=function(e){this._rawModule.mutations&&c(this._rawModule.mutations,e)},Object.defineProperties(h.prototype,d);var p=function(e){this.register([],e,!1)};function g(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void 0;g(e.concat(r),t.getChild(r),n.modules[r])}}p.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},p.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},p.prototype.update=function(e){g([],this.root,e)},p.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=new h(t,n);if(0===e.length)this.root=i;else{var a=this.get(e.slice(0,-1));a.addChild(e[e.length-1],i)}t.modules&&c(t.modules,(function(t,i){r.register(e.concat(i),t,n)}))},p.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},p.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var v;var y=function(e){var t=this;void 0===e&&(e={}),!v&&"undefined"!==typeof window&&window.Vue&&D(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var r=e.strict;void 0===r&&(r=!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(e),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(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=r;var l=this._modules.root.state;w(this,l,[],this._modules.root),b(this,l),n.forEach((function(e){return e(t)}));var u=void 0!==e.devtools?e.devtools:v.config.devtools;u&&a(this)},m={state:{configurable:!0}};function x(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function _(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;w(e,n,[],e._modules.root,!0),b(e,n,t)}function b(e,t,n){var r=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,a={};c(i,(function(t,n){a[n]=f(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var o=v.config.silent;v.config.silent=!0,e._vm=new v({data:{$$state:t},computed:a}),v.config.silent=o,e.strict&&C(e),r&&(n&&e._withCommit((function(){r._data.$$state=null})),v.nextTick((function(){return r.$destroy()})))}function w(e,t,n,r,i){var a=!n.length,o=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[o],e._modulesNamespaceMap[o]=r),!a&&!i){var s=O(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){v.set(s,c,r.state)}))}var l=r.context=A(e,o,n);r.forEachMutation((function(t,n){var r=o+n;k(e,r,t,l)})),r.forEachAction((function(t,n){var r=t.root?n:o+n,i=t.handler||t;T(e,r,i,l)})),r.forEachGetter((function(t,n){var r=o+n;P(e,r,t,l)})),r.forEachChild((function(r,a){w(e,t,n.concat(a),r,i)}))}function A(e,t,n){var r=""===t,i={dispatch:r?e.dispatch:function(n,r,i){var a=L(n,r,i),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=t+c),e.dispatch(c,o)},commit:r?e.commit:function(n,r,i){var a=L(n,r,i),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=t+c),e.commit(c,o,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return S(e,t)}},state:{get:function(){return O(e.state,n)}}}),i}function S(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,r)===t){var a=i.slice(r);Object.defineProperty(n,a,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function k(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,r.state,t)}))}function T(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return u(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function P(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)})}function C(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function O(e,t){return t.reduce((function(e,t){return e[t]}),e)}function L(e,t,n){return l(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function D(e){v&&e===v||(v=e,n(v))}m.state.get=function(){return this._vm._data.$$state},m.state.set=function(e){0},y.prototype.commit=function(e,t,n){var r=this,i=L(e,t,n),a=i.type,o=i.payload,s=(i.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(e){e(o)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},y.prototype.dispatch=function(e,t){var n=this,r=L(e,t),i=r.type,a=r.payload,o={type:i,payload:a},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(o,n.state)}))}catch(l){0}var c=s.length>1?Promise.all(s.map((function(e){return e(a)}))):s[0](a);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(o,n.state)}))}catch(l){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(o,n.state,e)}))}catch(l){0}t(e)}))}))}},y.prototype.subscribe=function(e,t){return x(e,this._subscribers,t)},y.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return x(n,this._actionSubscribers,t)},y.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},y.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},y.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),w(this,this.state,e,this._modules.get(e),n.preserveState),b(this,this.state)},y.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=O(t.state,e.slice(0,-1));v.delete(n,e[e.length-1])})),_(this)},y.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},y.prototype[[104,111,116,85,112,100,97,116,101].map((function(e){return String.fromCharCode(e)})).join("")]=function(e){this._modules.update(e),_(this,!0)},y.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(y.prototype,m);var E=U((function(e,t){var n={};return j(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=N(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[r].vuex=!0})),n})),I=U((function(e,t){var n={};return j(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var a=N(this.$store,"mapMutations",e);if(!a)return;r=a.context.commit}return"function"===typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n})),M=U((function(e,t){var n={};return j(t).forEach((function(t){var r=t.key,i=t.val;i=e+i,n[r]=function(){if(!e||N(this.$store,"mapGetters",e))return this.$store.getters[i]},n[r].vuex=!0})),n})),F=U((function(e,t){var n={};return j(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var a=N(this.$store,"mapActions",e);if(!a)return;r=a.context.dispatch}return"function"===typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n})),$=function(e){return{mapState:E.bind(null,e),mapGetters:M.bind(null,e),mapMutations:I.bind(null,e),mapActions:F.bind(null,e)}};function j(e){return R(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function R(e){return Array.isArray(e)||l(e)}function U(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function N(e,t,n){var r=e._modulesNamespaceMap[n];return r}function z(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var r=e.transformer;void 0===r&&(r=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var a=e.actionFilter;void 0===a&&(a=function(e,t){return!0});var o=e.actionTransformer;void 0===o&&(o=function(e){return e});var c=e.logMutations;void 0===c&&(c=!0);var l=e.logActions;void 0===l&&(l=!0);var u=e.logger;return void 0===u&&(u=console),function(e){var f=s(e.state);"undefined"!==typeof u&&(c&&e.subscribe((function(e,a){var o=s(a);if(n(e,f,o)){var c=q(),l=i(e),h="mutation "+e.type+c;B(u,h,t),u.log("%c prev state","color: #9E9E9E; font-weight: bold",r(f)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",r(o)),W(u)}f=o})),l&&e.subscribeAction((function(e,n){if(a(e,n)){var r=q(),i=o(e),s="action "+e.type+r;B(u,s,t),u.log("%c action","color: #03A9F4; font-weight: bold",i),W(u)}})))}}function B(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(i){e.log(t)}}function W(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function q(){var e=new Date;return" @ "+G(e.getHours(),2)+":"+G(e.getMinutes(),2)+":"+G(e.getSeconds(),2)+"."+G(e.getMilliseconds(),3)}function H(e,t){return new Array(t+1).join(e)}function G(e,t){return H("0",t-e.toString().length)+e}var V={Store:y,install:D,version:"3.6.2",mapState:E,mapMutations:I,mapGetters:M,mapActions:F,createNamespacedHelpers:$,createLogger:z};e.exports=V}).call(this,n("c8ba"))},"2a8e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=[{title:"体重",showCon:!1,key:"weight",dw:"kg",fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,color:"#ff4239",desc:"反映和衡量一个人健康状况的重要标志之一"},{title:"BMI",color:"#ff4239",showCon:!1,key:"bmi",level:"bmilevel",dw:"",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准。"},{title:"脂肪率",showCon:!1,color:"#ff4239",key:"fat_r",level:"fat_rlevel",dw:"%",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"体脂率是指身体成分中,脂肪组织所占的比率。测量体脂率比单纯的只测量体重更能反映我们身体的脂肪水平(肥胖程度)。"},{title:"脂肪量",key:"fat_w",color:"#ff4239",scope:"",showCon:!1,level:"fat_wlevel",dw:"kg",leftval:0,desc:"人体脂肪的重量",fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"肌肉率",key:"muscle",showCon:!1,color:"#ff4239",level:"musclelevel",dw:"%",slist:[],leftval:0,fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"根据人体肌肉总量和人体体重、身高等相结合得到的人体的一个比例值,这个值的范围决定一个人的身体健康状况以及力量的多少。"},{title:"肌肉量",color:"#ff4239",key:"muscleval",level:"musclelevel",showCon:!1,dw:"kg",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"肌肉量=实际体重*肌肉率"},{title:"水分",key:"water",color:"#ff4239",level:"waterlevel",showCon:!1,dw:"%",desc:"指人体内水分比例。",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"蛋白量",color:"#ff4239",level:"proteinlevel",key:"proteinval",showCon:!1,dw:"kg",desc:"蛋白量=实际体重*蛋白率",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"骨重",color:"#ff4239",key:"bone",showCon:!1,level:"bonelevel",dw:"",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"单位体积内,骨组织、骨矿物质(钙、磷等)和骨基质(骨胶原、蛋白率、无机盐等等)]含量,骨量代表它们骨骼健康的情况。"},{title:"蛋白率",color:"#ff4239",key:"protein",level:"proteinlevel",showCon:!1,dw:"%",desc:"人体内蛋白率含量。",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"基础代谢",key:"kcal",color:"#ff4239",level:"kcallevel",showCon:!1,dw:"kcal",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"指人体在清醒而又极端安静的状态下,不受肌肉活动、环境温度、食物及精神紧张等影响时的能量代谢率"},{title:"内脏指数",color:"#ff4239",key:"visceral",showCon:!1,level:"viscerallevel",dw:"",desc:"内脏脂肪指数",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"皮下脂肪",key:"sfr",color:"#ff4239",showCon:!1,level:"sfrlevel",dw:"%",desc:"皮下脂脂肪就是贮存于皮下的脂肪组织,人体的脂肪大约有2/3贮存在皮下组织",slist:[],fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"肥胖等级",key:"fatlevel",level:"fatlevel",showCon:!1,leftval:0,fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0,desc:"肥胖的程度,表现实际体重与理想体重的差距。肥胖等级是判定肥胖症的一个指标。"},{title:"去脂体重",key:"lbm",showCon:!1,dw:"kg",fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"体龄",key:"bodyage",showCon:!1,dw:"岁",fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0},{title:"体型",key:"body",level:"bodylevel",showCon:!1,fvalue:null,svalue:null,fevaluation:null,sevaluation:null,vs:0,num:0}];function i(e){var t=[].concat(r);if(e){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:p;if(!t)return[e];var r=this._caches[e];return r||(r=m(e,n),this._caches[e]=r),x(r,t)}}]),e}();t.Formatter=g;var v=/^(?:\d)+/,y=/^(?:\w)+/;function m(e,t){var n=r(t,2),i=n[0],a=n[1],o=[],s=0,c="";while(s-1?_:e.indexOf("-hant")>-1||C(e,["-tw","-hk","-mo","-cht"])?b:_;var n=O(e,[w,A,S]);return n||void 0}}var D=function(){function e(t){var n=t.locale,r=t.fallbackLocale,i=t.messages,a=t.watcher,o=t.formater;l(this,e),this.locale=w,this.fallbackLocale=w,this.message={},this.messages={},this.watchers=[],r&&(this.fallbackLocale=r),this.formater=o||P,this.messages=i||{},this.setLocale(n||w),a&&this.watchLocale(a)}return f(e,[{key:"setLocale",value:function(e){var t=this,n=this.locale;this.locale=L(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],n!==this.locale&&this.watchers.forEach((function(e){e(t.locale,n)}))}},{key:"getLocale",value:function(){return this.locale}},{key:"watchLocale",value:function(e){var t=this,n=this.watchers.push(e)-1;return function(){t.watchers.splice(n,1)}}},{key:"add",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.messages[e];r?n?Object.assign(r,t):Object.keys(t).forEach((function(e){T(r,e)||(r[e]=t[e])})):this.messages[e]=t}},{key:"f",value:function(e,t,n){return this.formater.interpolate(e,t,n).join("")}},{key:"t",value:function(e,t,n){var r=this.message;return"string"===typeof t?(t=L(t,this.messages),t&&(r=this.messages[t])):n=t,T(r,e)?this.formater.interpolate(r[e],n).join(""):(console.warn("Cannot translate the value of keypath ".concat(e,". Use the value of keypath as default.")),e)}}]),e}();function E(e,t){e.$watchLocale?e.$watchLocale((function(e){t.setLocale(e)})):e.$watch((function(){return e.$locale}),(function(e){t.setLocale(e)}))}function I(){return"undefined"!==typeof e&&e.getLocale?e.getLocale():"undefined"!==typeof n&&n.getLocale?n.getLocale():w}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"!==typeof e){var i=[t,e];e=i[0],t=i[1]}"string"!==typeof e&&(e=I()),"string"!==typeof n&&(n="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||w);var a=new D({locale:e,fallbackLocale:n,messages:t,watcher:r}),o=function(e,t){if("function"!==typeof getApp)o=function(e,t){return a.t(e,t)};else{var n=!1;o=function(e,t){var r=getApp().$vm;return r&&(r.$locale,n||(n=!0,E(r,a))),a.t(e,t)}}return o(e,t)};return{i18n:a,f:function(e,t,n){return a.f(e,t,n)},t:function(e,t){return o(e,t)},add:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return a.add(e,t,n)},watch:function(e){return a.watchLocale(e)},getLocale:function(){return a.getLocale()},setLocale:function(e){return a.setLocale(e)}}}t.I18n=D;var F,$=function(e){return"string"===typeof e};function j(e,t){return F||(F=new g),q(e,(function(e,n){var r=e[n];return $(r)?!!N(r,t)||void 0:j(r,t)}))}function R(e,t,n){return F||(F=new g),q(e,(function(e,r){var i=e[r];$(i)?N(i,n)&&(e[r]=z(i,t,n)):R(i,t,n)})),e}function U(e,t){var n=t.locale,r=t.locales,i=t.delimiters;if(!N(e,i))return e;F||(F=new g);var a=[];Object.keys(r).forEach((function(e){e!==n&&a.push({locale:e,values:r[e]})})),a.unshift({locale:n,values:r[n]});try{return JSON.stringify(W(JSON.parse(e),a,i),null,2)}catch(o){}return e}function N(e,t){return e.indexOf(t[0])>-1}function z(e,t,n){return F.interpolate(e,t,n).join("")}function B(e,t,n,r){var i=e[t];if($(i)){if(N(i,r)&&(e[t]=z(i,n[0].values,r),n.length>1)){var a=e[t+"Locales"]={};n.forEach((function(e){a[e.locale]=z(i,e.values,r)}))}}else W(i,n,r)}function W(e,t,n){return q(e,(function(e,r){B(e,r,t,n)})),e}function q(e,t){if(h(e)){for(var n=0;n-1}))):t}}function G(e){var t=[],n=e.split("-");while(n.length)t.push(n.join("-")),n.pop();return t}t.isString=$}).call(this,n("543d")["default"],n("c8ba"))},"38df":function(e,t,n){(function(t){var n=wx.getAccountInfoSync(),r=n.miniProgram.appId;t.setStorageSync("appid",r);var i="";console.log("生产环境"),i="https://ybapi.pcxbc.com",console.log("appid",r),e.exports={appid:r,host:i}}).call(this,n("543d")["default"])},"543d":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createApp=Zt,t.createComponent=fn,t.createPage=un,t.createPlugin=dn,t.createSubpackageApp=hn,t.default=void 0;var r,i=o(n("66fd")),a=n("37dc");function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1},e.prototype.uniIDHasPermission=function(e){var t=A(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=A(),t=e.tokenExpired;return t>Date.now()}}r="function"!==typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!b.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",a=0;a>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var k=Object.prototype.toString,T=Object.prototype.hasOwnProperty;function P(e){return"function"===typeof e}function C(e){return"string"===typeof e}function O(e){return"[object Object]"===k.call(e)}function L(e,t){return T.call(e,t)}function D(){}function E(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var I=/-(\w)/g,M=E((function(e){return e.replace(I,(function(e,t){return t?t.toUpperCase():""}))})),F=["invoke","success","fail","complete","returnValue"],$={},j={};function R(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?U(n):n}function U(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var r=t[n];t[n]=function(t){V(e[n],t).then((function(e){return P(r)&&r(e)||e}))}}})),t}function X(e,t){var n=[];Array.isArray($.returnValue)&&n.push.apply(n,p($.returnValue));var r=j[e];return r&&Array.isArray(r.returnValue)&&n.push.apply(n,p(r.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function J(e){var t=Object.create(null);Object.keys($).forEach((function(e){"returnValue"!==e&&(t[e]=$[e].slice())}));var n=j[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Y(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),a=3;a0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,i=new Array(r>1?r-1:0),a=1;a0&&(e.delta=n)}}}},Te={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var r=n.length;if(r)return t<0?t=0:t>=r&&(t=r-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,r){return!(r2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(O(t)){var a=!0===i?t:{};for(var o in P(n)&&(n=n(t,a)||{}),t)if(L(n,o)){var s=n[o];P(s)&&(s=s(t[o],t,a)),s?C(s)?a[s]=t[o]:O(s)&&(a[s.name?s.name:o]=s.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(o,"'"))}else-1!==Fe.indexOf(o)?P(t[o])&&(a[o]=$e(e,t[o],r)):i||(a[o]=t[o]);return a}return P(t)&&(t=$e(e,t,r)),t}function Re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return P(Ee.returnValue)&&(t=Ee.returnValue(e,t)),je(e,t,n,{},r)}function Ue(e,t){if(L(Ee,e)){var n=Ee[e];return n?function(t,r){var i=n;P(n)&&(i=n(t)),t=je(e,t,i.args,i.returnValue);var a=[t];"undefined"!==typeof r&&a.push(r),P(i.name)?e=i.name(t):C(i.name)&&(e=i.name);var o=wx[e].apply(wx,a);return ae(e)?Re(e,o,i.returnValue,ie(e)):o}:function(){console.error("Platform '微信小程序' does not support '".concat(e,"'."))}}return t}var Ne=Object.create(null),ze=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function Be(e){return function(t){var n=t.fail,r=t.complete,i={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};P(n)&&n(i),P(r)&&r(i)}}ze.forEach((function(e){Ne[e]=Be(e)}));var We={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function qe(e){var t=e.service,n=e.success,r=e.fail,i=e.complete,a=!1;We[t]?(a={errMsg:"getProvider:ok",service:t,provider:We[t]},P(n)&&n(a)):(a={errMsg:"getProvider:fail service not found"},P(r)&&r(a)),P(i)&&i(a)}var He=Object.freeze({__proto__:null,getProvider:qe}),Ge=function(){var e;return function(){return e||(e=new i.default),e}}();function Ve(e,t,n){return e[t].apply(e,n)}function Ke(){return Ve(Ge(),"$on",Array.prototype.slice.call(arguments))}function Xe(){return Ve(Ge(),"$off",Array.prototype.slice.call(arguments))}function Je(){return Ve(Ge(),"$once",Array.prototype.slice.call(arguments))}function Ye(){return Ve(Ge(),"$emit",Array.prototype.slice.call(arguments))}var Ze=Object.freeze({__proto__:null,$on:Ke,$off:Xe,$once:Je,$emit:Ye}),Qe=Object.freeze({__proto__:null}),et=Page,tt=Component,nt=/:/g,rt=E((function(e){return M(e.replace(nt,"-"))}));function it(e){var t=e.triggerEvent,n=function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{};return at("onLoad",e),et(e)},Page.after=et.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return at("created",e),tt(e)});var ot=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function st(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){L(n,t)&&(e[t]=n[t])}))}function ct(e,t){if(!t)return!0;if(i.default.options&&Array.isArray(i.default.options[e]))return!0;if(t=t.default||t,P(t))return!!P(t.extendOptions[e])||!!(t.super&&t.super.options&&Array.isArray(t.super.options[e]));if(P(t[e]))return!0;var n=t.mixins;return Array.isArray(n)?!!n.find((function(t){return ct(e,t)})):void 0}function lt(e,t,n){t.forEach((function(t){ct(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function ut(e,t){var n;return t=t.default||t,n=P(t)?t:e.extend(t),t=n.options,[n,t]}function ft(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function ht(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function dt(e,t){var n=e.data||{},r=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(i){Object({NODE_ENV:"production",VUE_APP_NAME:"每日一称成人",VUE_APP_PLATFORM:"mp-weixin",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(i){}return O(n)||(n={}),Object.keys(r).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||L(n,e)||(n[e]=r[e])})),n}var pt=[String,Number,Boolean,Object,Array,null];function gt(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function vt(e,t){var n=e.behaviors,r=e.extends,i=e.mixins,a=e.props;a||(e.props=a=[]);var o=[];return Array.isArray(n)&&n.forEach((function(e){o.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(a)?(a.push("name"),a.push("value")):(a.name={type:String,default:""},a.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),O(r)&&r.props&&o.push(t({properties:mt(r.props,!0)})),Array.isArray(i)&&i.forEach((function(e){O(e)&&e.props&&o.push(t({properties:mt(e.props,!0)}))})),o}function yt(e,t,n,r){return Array.isArray(t)&&1===t.length?t[0]:t}function mt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return t||(n.vueId={type:String,value:""},n.generic={type:Object,value:null},n.scopedSlotsCompiler={type:String,value:""},n.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){n[e]={type:null,observer:gt(e)}})):O(e)&&Object.keys(e).forEach((function(t){var r=e[t];if(O(r)){var i=r.default;P(i)&&(i=i()),r.type=yt(t,r.type),n[t]={type:-1!==pt.indexOf(r.type)?r.type:null,value:i,observer:gt(t)}}else{var a=yt(t,r);n[t]={type:-1!==pt.indexOf(a)?a:null,observer:gt(t)}}})),n}function xt(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=D,e.preventDefault=D,e.target=e.target||{},L(e,"detail")||(e.detail={}),L(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),O(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function _t(e,t){var n=e;return t.forEach((function(t){var r=t[0],i=t[2];if(r||"undefined"!==typeof i){var a,o=t[1],s=t[3];Number.isInteger(r)?a=r:r?"string"===typeof r&&r&&(a=0===r.indexOf("#s#")?r.substr(3):e.__get_value(r,n)):a=n,Number.isInteger(a)?n=i:o?Array.isArray(a)?n=a.find((function(t){return e.__get_value(o,t)===i})):O(a)?n=Object.keys(a).find((function(t){return e.__get_value(o,a[t])===i})):console.error("v-for 暂不支持循环数据:",a):n=a[i],s&&(n=e.__get_value(s,n))}})),n}function bt(e,t,n){var r={};return Array.isArray(t)&&t.length&&t.forEach((function(t,i){"string"===typeof t?t?"$event"===t?r["$"+i]=n:"arguments"===t?n.detail&&n.detail.__args__?r["$"+i]=n.detail.__args__:r["$"+i]=[n]:0===t.indexOf("$event.")?r["$"+i]=e.__get_value(t.replace("$event.",""),n):r["$"+i]=e.__get_value(t):r["$"+i]=e:r["$"+i]=_t(e,t)})),r}function wt(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o=!1;if(i&&(o=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return o?[t]:t.detail.__args__||t.detail;var s=bt(e,r,t),c=[];return n.forEach((function(e){"$event"===e?"__set_model"!==a||i?i&&!o?c.push(t.detail.__args__[0]):c.push(t):c.push(t.target.value):Array.isArray(e)&&"o"===e[0]?c.push(wt(e)):"string"===typeof e&&L(s,e)?c.push(s[e]):c.push(e)})),c}var St="~",kt="^";function Tt(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function Pt(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}function Ct(e){var t=this;e=xt(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var r=n.eventOpts||n["event-opts"];if(!r)return console.warn("事件信息不存在");var i=e.type,a=[];return r.forEach((function(n){var r=n[0],o=n[1],s=r.charAt(0)===kt;r=s?r.slice(1):r;var c=r.charAt(0)===St;r=c?r.slice(1):r,o&&Tt(i,r)&&o.forEach((function(n){var r=n[0];if(r){var i=t.$vm;if(i.$options.generic&&(i=Pt(i)||i),"$emit"===r)return void i.$emit.apply(i,At(t.$vm,e,n[1],n[2],s,r));var o=i[r];if(!P(o))throw new Error(" _vm.".concat(r," is not a function"));if(c){if(o.once)return;o.once=!0}var l=At(t.$vm,e,n[1],n[2],s,r);l=Array.isArray(l)?l:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(o.toString())&&(l=l.concat([,,,,,,,,,,e])),a.push(o.apply(i,l))}}))})),"input"===i&&1===a.length&&"undefined"!==typeof a[0]?a[0]:void 0}var Ot,Lt={};function Dt(){if(Ft()){var e=Object.keys(__uniConfig.locales);e.length&&e.forEach((function(e){var t=Lt[e],n=__uniConfig.locales[e];t?Object.assign(t,n):Lt[e]=n}))}}Ot=wx.getSystemInfoSync().language,Dt();var Et=(0,a.initVueI18n)(Ot,{}),It=Et.t;Et.mixin={beforeCreate:function(){var e=this,t=Et.i18n.watchLocale((function(){e.$forceUpdate()}));this.$once("hook:beforeDestroy",(function(){t()}))},methods:{$$t:function(e,t){return It(e,t)}}},Et.setLocale,Et.getLocale;function Mt(e,t,n){var r=e.observable({locale:n||Et.getLocale()}),i=[];t.$watchLocale=function(e){i.push(e)},Object.defineProperty(t,"$locale",{get:function(){return r.locale},set:function(e){r.locale=e,i.forEach((function(t){return t(e)}))}})}function Ft(){return"undefined"!==typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length}var $t={},jt=[];function Rt(e){if(e){var t=$t[e];return delete $t[e],t}return jt.shift()}var Ut=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function Nt(){i.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=i.default.prototype.__call_hook;i.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=Rt(n.__id__),delete n.__id__),e.call(this,t,n)}}function zt(){var e={},t={};i.default.prototype.$hasScopedSlotsParams=function(n){var r=e[n];return r||(t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))),r},i.default.prototype.$getScopedSlotsParams=function(n,r,i){var a=e[n];if(a){var o=a[r]||{};return i?o[i]:o}t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))},i.default.prototype.$setScopedSlotsParams=function(n,r){var i=this.$options.propsData.vueId;if(i){var a=i.split(",")[0],o=e[a]=e[a]||{};o[n]=r,t[a]&&t[a].$forceUpdate()}},i.default.mixin({destroyed:function(){var n=this.$options.propsData,r=n&&n.vueId;r&&(delete e[r],delete t[r])}})}function Bt(e,t){var n=t.mocks,r=t.initRefs;Nt(),zt(),e.$options.store&&(i.default.prototype.$store=e.$options.store),S(i.default),i.default.prototype.mpHost="mp-weixin",i.default.mixin({beforeCreate:function(){if(this.$options.mpType){if(this.mpType=this.$options.mpType,this.$mp=d({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"page"===this.mpType&&"function"===typeof getApp){var e=getApp();e.$vm&&e.$vm.$i18n&&(this._i18n=e.$vm.$i18n)}"app"!==this.mpType&&(r(this),st(this,n))}}});var a={onLaunch:function(t){this.$vm||(wx.canIUse&&!wx.canIUse("nextTick")&&console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=e,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",t),this.$vm.__call_hook("onLaunch",t))}};a.globalData=e.$options.globalData||{};var o=e.$options.methods;return o&&Object.keys(o).forEach((function(e){a[e]=o[e]})),Mt(i.default,e,wx.getSystemInfoSync().language||"zh-Hans"),lt(a,Ut),a}var Wt=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function qt(e,t){for(var n,r=e.$children,i=r.length-1;i>=0;i--){var a=r[i];if(a.$scope._$vueId===t)return a}for(var o=r.length-1;o>=0;o--)if(n=qt(r[o],t),n)return n}function Ht(e){return Behavior(e)}function Gt(){return!!this.route}function Vt(e){this.triggerEvent("__l",e)}function Kt(e,t,n){var r=e.selectAllComponents(t);r.forEach((function(e){var r=e.dataset.ref;n[r]=e.$vm||e,"scoped"===e.dataset.vueGeneric&&e.selectAllComponents(".scoped-ref").forEach((function(e){Kt(e,t,n)}))}))}function Xt(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};Kt(t,".vue-ref",e);var n=t.selectAllComponents(".vue-ref-in-for");return n.forEach((function(t){var n=t.dataset.ref;e[n]||(e[n]=[]),e[n].push(t.$vm||t)})),e}})}function Jt(e){var t,n=e.detail||e.value,r=n.vuePid,i=n.vueOptions;r&&(t=qt(this.$vm,r)),t||(t=this.$vm),i.parent=t}function Yt(e){return Bt(e,{mocks:Wt,initRefs:Xt})}function Zt(e){return App(Yt(e)),e}var Qt=/[!'()*]/g,en=function(e){return"%"+e.charCodeAt(0).toString(16)},tn=/%2C/g,nn=function(e){return encodeURIComponent(e).replace(Qt,en).replace(tn,",")};function rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nn,n=e?Object.keys(e).map((function(n){var r=e[n];if(void 0===r)return"";if(null===r)return t(n);if(Array.isArray(r)){var i=[];return r.forEach((function(e){void 0!==e&&(null===e?i.push(t(n)):i.push(t(n)+"="+t(e)))})),i.join("&")}return t(n)+"="+t(r)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function an(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,r=t.initRelation,a=ut(i.default,e),o=l(a,2),s=o[0],u=o[1],f=c({multipleSlots:!0,addGlobalClass:!0},u.options||{});u["mp-weixin"]&&u["mp-weixin"].options&&Object.assign(f,u["mp-weixin"].options);var h={options:f,data:dt(u,i.default.prototype),behaviors:vt(u,Ht),properties:mt(u.props,!1,u.__file),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};ht(e.vueId,this),r.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new s(t),ft(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:Jt,__e:Ct}};return u.externalClasses&&(h.externalClasses=u.externalClasses),Array.isArray(u.wxsCallMethods)&&u.wxsCallMethods.forEach((function(e){h.methods[e]=function(t){return this.$vm[e](t)}})),n?h:[h,s]}function on(e){return an(e,{isPage:Gt,initRelation:Vt})}var sn=["onShow","onHide","onUnload"];function cn(e,t){t.isPage,t.initRelation;var n=on(e);return lt(n.methods,sn,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+rn(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},n}function ln(e){return cn(e,{isPage:Gt,initRelation:Vt})}function un(e){return Component(ln(e))}function fn(e){return Component(on(e))}function hn(e){var t=Yt(e),n=getApp({allowDefault:!0});e.$scope=n;var r=n.globalData;if(r&&Object.keys(t.globalData).forEach((function(e){L(r,e)||(r[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){L(n,e)||(n[e]=t[e])})),P(t.onShow)&&wx.onAppShow&&wx.onAppShow((function(){for(var t=arguments.length,n=new Array(t),r=0;r=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function g(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var x=Object.prototype.hasOwnProperty;function _(e,t){return x.call(e,t)}function b(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var w=/-(\w)/g,A=b((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),S=b((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),k=/\B([A-Z])/g,T=b((function(e){return e.replace(k,"-$1").toLowerCase()}));function P(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function C(e,t){return e.bind(t)}var O=Function.prototype.bind?C:P;function L(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function D(e,t){for(var n in t)e[n]=t[n];return e}function E(e){for(var t={},n=0;n0),te=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===Y),ne=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/),{}.watch);if(X)try{var re={};Object.defineProperty(re,"passive",{get:function(){}}),window.addEventListener("test-passive",null,re)}catch(ni){}var ie=function(){return void 0===V&&(V=!X&&!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),V},ae=X&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"===typeof e&&/native code/.test(e.toString())}var se,ce="undefined"!==typeof Symbol&&oe(Symbol)&&"undefined"!==typeof Reflect&&oe(Reflect.ownKeys);se="undefined"!==typeof Set&&oe(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var le=I,ue=0,fe=function(){this.id=ue++,this.subs=[]};function he(e){fe.SharedObject.targetStack.push(e),fe.SharedObject.target=e,fe.target=e}function de(){fe.SharedObject.targetStack.pop(),fe.SharedObject.target=fe.SharedObject.targetStack[fe.SharedObject.targetStack.length-1],fe.target=fe.SharedObject.target}fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){m(this.subs,e)},fe.prototype.depend=function(){fe.SharedObject.target&&fe.SharedObject.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(a&&!_(i,"default"))o=!1;else if(""===o||o===T(e)){var c=Xe(String,i.type);(c<0||s0&&(o=bt(o,(t||"")+"_"+n),_t(o[0])&&_t(l)&&(u[c]=ye(l.text+o[0].text),o.shift()),u.push.apply(u,o)):s(o)?_t(l)?u[c]=ye(l.text+o):""!==o&&u.push(ye(o)):_t(o)&&_t(l)?u[c]=ye(l.text+o.text):(a(e._isVList)&&i(o.tag)&&r(o.key)&&i(t)&&(o.key="__vlist"+t+"_"+n+"__"),u.push(o)));return u}function wt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function At(e){var t=St(e.$options.inject,e);t&&(Se(!1),Object.keys(t).forEach((function(n){Oe(e,n,t[n])})),Se(!0))}function St(e,t){if(e){for(var n=Object.create(null),r=ce?Reflect.ownKeys(e):Object.keys(e),i=0;i0,o=e?!!e.$stable:!a,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(o&&r&&r!==n&&s===r.$key&&!a&&!r.$hasNormal)return r;for(var c in i={},e)e[c]&&"$"!==c[0]&&(i[c]=Ct(t,c,e[c]))}else i={};for(var l in t)l in i||(i[l]=Ot(t,l));return e&&Object.isExtensible(e)&&(e._normalized=i),q(i,"$stable",o),q(i,"$key",s),q(i,"$hasNormal",a),i}function Ct(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:xt(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Ot(e,t){return function(){return e[t]}}function Lt(e,t){var n,r,a,o,s;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,a=e.length;r1?L(n):n;for(var r=L(arguments,1),i='event handler for "'+e+'"',a=0,o=n.length;adocument.createEvent("Event").timeStamp&&(Nn=function(){return zn.now()})}function Bn(){var e,t;for(Nn(),jn=!0,In.sort((function(e,t){return e.id-t.id})),Rn=0;RnRn&&In[n].id>e.id)n--;In.splice(n+1,0,e)}else In.push(e);$n||($n=!0,ct(Bn))}}var Vn=0,Kn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Vn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new se,this.newDepIds=new se,this.expression="","function"===typeof t?this.getter=t:(this.getter=G(t),this.getter||(this.getter=I)),this.value=this.lazy?void 0:this.get()};Kn.prototype.get=function(){var e;he(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(ni){if(!this.user)throw ni;Je(ni,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ut(e),de(),this.cleanupDeps()}return e},Kn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Kn.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Kn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Gn(this)},Kn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(ni){Je(ni,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Kn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Kn.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},Kn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var Xn={enumerable:!0,configurable:!0,get:I,set:I};function Jn(e,t,n){Xn.get=function(){return this[t][n]},Xn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Xn)}function Yn(e){e._watchers=[];var t=e.$options;t.props&&Zn(e,t.props),t.methods&&or(e,t.methods),t.data?Qn(e):Ce(e._data={},!0),t.computed&&nr(e,t.computed),t.watch&&t.watch!==ne&&sr(e,t.watch)}function Zn(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],a=!e.$parent;a||Se(!1);var o=function(a){i.push(a);var o=He(a,t,n,e);Oe(r,a,o),a in e||Jn(e,"_props",a)};for(var s in t)o(s);Se(!0)}function Qn(e){var t=e.$options.data;t=e._data="function"===typeof t?er(t,e):t||{},u(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var a=n[i];0,r&&_(r,a)||W(a)||Jn(e,"_data",a)}Ce(t,!0)}function er(e,t){he();try{return e.call(t,t)}catch(ni){return Je(ni,t,"data()"),{}}finally{de()}}var tr={lazy:!0};function nr(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var a=t[i],o="function"===typeof a?a:a.get;0,r||(n[i]=new Kn(e,o||I,I,tr)),i in e||rr(e,i,a)}}function rr(e,t,n){var r=!ie();"function"===typeof n?(Xn.get=r?ir(t):ar(n),Xn.set=I):(Xn.get=n.get?r&&!1!==n.cache?ir(t):ar(n.get):I,Xn.set=n.set||I),Object.defineProperty(e,t,Xn)}function ir(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.SharedObject.target&&t.depend(),t.value}}function ar(e){return function(){return e.call(this,this)}}function or(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?I:O(t[n],e)}function sr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1)return this;var n=L(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function yr(e){e.mixin=function(e){return this.options=We(this.options,e),this}}function mr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var a=e.name||n.options.name;var o=function(e){this._init(e)};return o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.cid=t++,o.options=We(n.options,e),o["super"]=n,o.options.props&&xr(o),o.options.computed&&_r(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,U.forEach((function(e){o[e]=n[e]})),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=e,o.sealedOptions=D({},o.options),i[r]=o,o}}function xr(e){var t=e.options.props;for(var n in t)Jn(e.prototype,"_props",n)}function _r(e){var t=e.options.computed;for(var n in t)rr(e.prototype,n,t[n])}function br(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function wr(e){return e&&(e.Ctor.options.name||e.tag)}function Ar(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Sr(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var a in n){var o=n[a];if(o){var s=wr(o.componentOptions);s&&!t(s)&&kr(n,a,r,i)}}}function kr(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,m(n,t)}fr(gr),lr(gr),An(gr),Pn(gr),hn(gr);var Tr=[String,RegExp,Array],Pr={name:"keep-alive",abstract:!0,props:{include:Tr,exclude:Tr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)kr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Sr(e,(function(e){return Ar(t,e)}))})),this.$watch("exclude",(function(t){Sr(e,(function(e){return!Ar(t,e)}))}))},render:function(){var e=this.$slots.default,t=yn(e),n=t&&t.componentOptions;if(n){var r=wr(n),i=this,a=i.include,o=i.exclude;if(a&&(!r||!Ar(a,r))||o&&r&&Ar(o,r))return t;var s=this,c=s.cache,l=s.keys,u=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;c[u]?(t.componentInstance=c[u].componentInstance,m(l,u),l.push(u)):(c[u]=t,l.push(u),this.max&&l.length>parseInt(this.max)&&kr(c,l[0],l,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Cr={KeepAlive:Pr};function Or(e){var t={get:function(){return z}};Object.defineProperty(e,"config",t),e.util={warn:le,extend:D,mergeOptions:We,defineReactive:Oe},e.set=Le,e.delete=De,e.nextTick=ct,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,Cr),vr(e),yr(e),mr(e),br(e)}Or(gr),Object.defineProperty(gr.prototype,"$isServer",{get:ie}),Object.defineProperty(gr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(gr,"FunctionalRenderContext",{value:Ht}),gr.version="2.6.11";var Lr="[object Array]",Dr="[object Object]";function Er(e,t){var n={};return Ir(e,t),Mr(e,t,"",n),n}function Ir(e,t){if(e!==t){var n=$r(e),r=$r(t);if(n==Dr&&r==Dr){if(Object.keys(e).length>=Object.keys(t).length)for(var i in t){var a=e[i];void 0===a?e[i]=null:Ir(a,t[i])}}else n==Lr&&r==Lr&&e.length>=t.length&&t.forEach((function(t,n){Ir(e[n],t)}))}}function Mr(e,t,n,r){if(e!==t){var i=$r(e),a=$r(t);if(i==Dr)if(a!=Dr||Object.keys(e).length1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Jr(e){return Array.isArray(e)?E(e):"string"===typeof e?Xr(e):e}var Yr=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Zr(e,t){var n=t.split("."),r=n[0];return 0===r.indexOf("__$n")&&(r=parseInt(r.replace("__$n",""))),1===n.length?e[r]:Zr(e[r],n.slice(1).join("."))}function Qr(e){e.config.errorHandler=function(t,n,r){e.util.warn("Error in "+r+': "'+t.toString()+'"',n),console.error(t);var i="function"===typeof getApp&&getApp();i&&i.onError&&i.onError(t)};var t=e.prototype.$emit;e.prototype.$emit=function(e){return this.$scope&&e&&(this.$scope["_triggerEvent"]||this.$scope["triggerEvent"]).call(this.$scope,e,{__args__:L(arguments,1)}),t.apply(this,arguments)},e.prototype.$nextTick=function(e){return Ur(this,e)},Yr.forEach((function(t){e.prototype[t]=function(e){return this.$scope&&this.$scope[t]?this.$scope[t](e):"undefined"!==typeof my?"createSelectorQuery"===t?my.createSelectorQuery(e):"createIntersectionObserver"===t?my.createIntersectionObserver(e):void 0:void 0}})),e.prototype.__init_provide=wt,e.prototype.__init_injections=At,e.prototype.__call_hook=function(e,t){var n=this;he();var r,i=n.$options[e],a=e+" hook";if(i)for(var o=0,s=i.length;o([^]*)<\/body>/.test(e);return t?RegExp.$1:e}function f(e){return e.replace(//gi,"").replace(/\/\*.*?\*\//gi,"").replace(/[ ]+/gi,"").replace(//gi,"")}function h(){var e={};return wx.getSystemInfo({success:function(t){e.width=t.windowWidth,e.height=t.windowHeight}}),e}function d(e,t,n,a){e=u(e),e=f(e),e=r.default.strDiscode(e);var o=[],d={nodes:[],imageUrls:[]},p=h();function g(e){this.node="element",this.tag=e,this.$screen=p}return(0,i.default)(e,{start:function(e,i,a){var u=new g(e);if(0!==o.length){var f=o[0];void 0===f.nodes&&(f.nodes=[])}if(s[e]?u.tagType="block":c[e]?u.tagType="inline":l[e]&&(u.tagType="closeSelf"),u.attr=i.reduce((function(e,t){var n=t.name,r=t.value;return"class"===n&&(u.classStr=r),"style"===n&&(u.styleStr=r),r.match(/ /)&&(r=r.split(" ")),e[n]?Array.isArray(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e}),{}),u.classStr?u.classStr+=" ".concat(u.tag):u.classStr=u.tag,"inline"===u.tagType&&(u.classStr+=" inline"),"img"===u.tag){var h=u.attr.src;h=r.default.urlToHttpUrl(h,n.domain),Object.assign(u.attr,n,{src:h||""}),h&&d.imageUrls.push(h)}if("a"===u.tag&&(u.attr.href=u.attr.href||""),"font"===u.tag){var p=["x-small","small","medium","large","x-large","xx-large","-webkit-xxx-large"],v={color:"color",face:"font-family",size:"font-size"};u.styleStr||(u.styleStr=""),Object.keys(v).forEach((function(e){if(u.attr[e]){var t="size"===e?p[u.attr[e]-1]:u.attr[e];u.styleStr+="".concat(v[e],": ").concat(t,";")}}))}if("source"===u.tag&&(d.source=u.attr.src),t.start&&t.start(u,d),a){var y=o[0]||d;void 0===y.nodes&&(y.nodes=[]),y.nodes.push(u)}else o.unshift(u)},end:function(e){var n=o.shift();if(n.tag!==e&&console.error("invalid state: mismatch end tag"),"video"===n.tag&&d.source&&(n.attr.src=d.source,delete d.source),t.end&&t.end(n,d),0===o.length)d.nodes.push(n);else{var r=o[0];r.nodes||(r.nodes=[]),r.nodes.push(n)}},chars:function(e){if(e.trim()){var n={node:"text",text:e};if(t.chars&&t.chars(n,d),0===o.length)d.nodes.push(n);else{var r=o[0];void 0===r.nodes&&(r.nodes=[]),r.nodes.push(n)}}}}),d}var p=d;t.default=p},"93f1":function(e,t,n){"use strict";function r(e){return e=e.replace(/∀/g,"∀"),e=e.replace(/∂/g,"∂"),e=e.replace(/∃/g,"∃"),e=e.replace(/∅/g,"∅"),e=e.replace(/∇/g,"∇"),e=e.replace(/∈/g,"∈"),e=e.replace(/∉/g,"∉"),e=e.replace(/∋/g,"∋"),e=e.replace(/∏/g,"∏"),e=e.replace(/∑/g,"∑"),e=e.replace(/−/g,"−"),e=e.replace(/∗/g,"∗"),e=e.replace(/√/g,"√"),e=e.replace(/∝/g,"∝"),e=e.replace(/∞/g,"∞"),e=e.replace(/∠/g,"∠"),e=e.replace(/∧/g,"∧"),e=e.replace(/∨/g,"∨"),e=e.replace(/∩/g,"∩"),e=e.replace(/∪/g,"∪"),e=e.replace(/∫/g,"∫"),e=e.replace(/∴/g,"∴"),e=e.replace(/∼/g,"∼"),e=e.replace(/≅/g,"≅"),e=e.replace(/≈/g,"≈"),e=e.replace(/≠/g,"≠"),e=e.replace(/≤/g,"≤"),e=e.replace(/≥/g,"≥"),e=e.replace(/⊂/g,"⊂"),e=e.replace(/⊃/g,"⊃"),e=e.replace(/⊄/g,"⊄"),e=e.replace(/⊆/g,"⊆"),e=e.replace(/⊇/g,"⊇"),e=e.replace(/⊕/g,"⊕"),e=e.replace(/⊗/g,"⊗"),e=e.replace(/⊥/g,"⊥"),e=e.replace(/⋅/g,"⋅"),e}function i(e){return e=e.replace(/Α/g,"Α"),e=e.replace(/Β/g,"Β"),e=e.replace(/Γ/g,"Γ"),e=e.replace(/Δ/g,"Δ"),e=e.replace(/Ε/g,"Ε"),e=e.replace(/Ζ/g,"Ζ"),e=e.replace(/Η/g,"Η"),e=e.replace(/Θ/g,"Θ"),e=e.replace(/Ι/g,"Ι"),e=e.replace(/Κ/g,"Κ"),e=e.replace(/Λ/g,"Λ"),e=e.replace(/Μ/g,"Μ"),e=e.replace(/Ν/g,"Ν"),e=e.replace(/Ξ/g,"Ν"),e=e.replace(/Ο/g,"Ο"),e=e.replace(/Π/g,"Π"),e=e.replace(/Ρ/g,"Ρ"),e=e.replace(/Σ/g,"Σ"),e=e.replace(/Τ/g,"Τ"),e=e.replace(/Υ/g,"Υ"),e=e.replace(/Φ/g,"Φ"),e=e.replace(/Χ/g,"Χ"),e=e.replace(/Ψ/g,"Ψ"),e=e.replace(/Ω/g,"Ω"),e=e.replace(/α/g,"α"),e=e.replace(/β/g,"β"),e=e.replace(/γ/g,"γ"),e=e.replace(/δ/g,"δ"),e=e.replace(/ε/g,"ε"),e=e.replace(/ζ/g,"ζ"),e=e.replace(/η/g,"η"),e=e.replace(/θ/g,"θ"),e=e.replace(/ι/g,"ι"),e=e.replace(/κ/g,"κ"),e=e.replace(/λ/g,"λ"),e=e.replace(/μ/g,"μ"),e=e.replace(/ν/g,"ν"),e=e.replace(/ξ/g,"ξ"),e=e.replace(/ο/g,"ο"),e=e.replace(/π/g,"π"),e=e.replace(/ρ/g,"ρ"),e=e.replace(/ς/g,"ς"),e=e.replace(/σ/g,"σ"),e=e.replace(/τ/g,"τ"),e=e.replace(/υ/g,"υ"),e=e.replace(/φ/g,"φ"),e=e.replace(/χ/g,"χ"),e=e.replace(/ψ/g,"ψ"),e=e.replace(/ω/g,"ω"),e=e.replace(/ϑ/g,"ϑ"),e=e.replace(/ϒ/g,"ϒ"),e=e.replace(/ϖ/g,"ϖ"),e=e.replace(/·/g,"·"),e}function a(e){return e=e.replace(/ /g," "),e=e.replace(/ /g," "),e=e.replace(/ /g," "),e=e.replace(/"/g,"'"),e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/•/g,"•"),e}function o(e){return e=e.replace(/Œ/g,"Œ"),e=e.replace(/œ/g,"œ"),e=e.replace(/Š/g,"Š"),e=e.replace(/š/g,"š"),e=e.replace(/Ÿ/g,"Ÿ"),e=e.replace(/ƒ/g,"ƒ"),e=e.replace(/ˆ/g,"ˆ"),e=e.replace(/˜/g,"˜"),e=e.replace(/ /g,""),e=e.replace(/ /g,""),e=e.replace(/ /g,""),e=e.replace(/‌/g,""),e=e.replace(/‍/g,""),e=e.replace(/‎/g,""),e=e.replace(/‏/g,""),e=e.replace(/–/g,"–"),e=e.replace(/—/g,"—"),e=e.replace(/‘/g,"‘"),e=e.replace(/’/g,"’"),e=e.replace(/‚/g,"‚"),e=e.replace(/“/g,"“"),e=e.replace(/”/g,"”"),e=e.replace(/„/g,"„"),e=e.replace(/†/g,"†"),e=e.replace(/‡/g,"‡"),e=e.replace(/•/g,"•"),e=e.replace(/…/g,"…"),e=e.replace(/‰/g,"‰"),e=e.replace(/′/g,"′"),e=e.replace(/″/g,"″"),e=e.replace(/‹/g,"‹"),e=e.replace(/›/g,"›"),e=e.replace(/‾/g,"‾"),e=e.replace(/€/g,"€"),e=e.replace(/™/g,"™"),e=e.replace(/←/g,"←"),e=e.replace(/↑/g,"↑"),e=e.replace(/→/g,"→"),e=e.replace(/↓/g,"↓"),e=e.replace(/↔/g,"↔"),e=e.replace(/↵/g,"↵"),e=e.replace(/⌈/g,"⌈"),e=e.replace(/⌉/g,"⌉"),e=e.replace(/⌊/g,"⌊"),e=e.replace(/⌋/g,"⌋"),e=e.replace(/◊/g,"◊"),e=e.replace(/♠/g,"♠"),e=e.replace(/♣/g,"♣"),e=e.replace(/♥/g,"♥"),e=e.replace(/♦/g,"♦"),e=e.replace(/'/g,"'"),e}function s(e){return e=r(e),e=i(e),e=a(e),e=o(e),e}function c(e,t){return/^\/\//.test(e)?"https:".concat(e):/^\//.test(e)?"https://".concat(t).concat(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l={strDiscode:s,urlToHttpUrl:c};t.default=l},"96cf":function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",l="object"===typeof e,u=t.regeneratorRuntime;if(u)l&&(e.exports=u);else{u=t.regeneratorRuntime=l?e.exports:{},u.wrap=_;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",g={},v={};v[o]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==r&&i.call(m,o)&&(v=m);var x=S.prototype=w.prototype=Object.create(v);A.prototype=x.constructor=S,S.constructor=A,S[c]=A.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===A||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(x),e},u.awrap=function(e){return{__await:e}},k(T.prototype),T.prototype[s]=function(){return this},u.AsyncIterator=T,u.async=function(e,t,n,r){var i=new T(_(e,t,n,r));return u.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),x[c]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){while(t.length){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=E,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function _(e,t,n,r){var i=t&&t.prototype instanceof w?t:w,a=Object.create(i.prototype),o=new D(r||[]);return a._invoke=P(e,n,o),a}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function w(){}function A(){}function S(){}function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function T(e){function t(n,r,a,o){var s=b(e[n],e,r);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(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,o)}))}o(s.arg)}var n;function r(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}this._invoke=r}function P(e,t,n){var r=f;return function(i,a){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return I()}n.method=i,n.arg=a;while(1){var o=n.delegate;if(o){var s=C(o,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var c=b(e,t,n);if("normal"===c.type){if(r=n.done?p:h,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}function C(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,C(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=b(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,g;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){while(++r1&&void 0!==arguments[1]?arguments[1]:"get",a=arguments.length>2?arguments[2]:void 0,o={url:s+t,data:a,method:n,header:{Authorization:"Bearer "+e.getStorageSync("token"),"X-Authorization":"Bearer "+e.getStorageSync("refreshtoken"),"X-Requested-With":"XMLHttpRequest","content-type":"application/json;charset=UTF-8"}},c=new Promise((function(t,n){-1==o.url.indexOf("/api/device/detail")&&e.showLoading({title:"加载中..."}),e.request(o).then((function(n){if(e.hideLoading(),401==n[1].data.code)return e.clearStorageSync(),e.setStorageSync("token",""),void i.default.commit("changeLogout",!1);200==n[1].statusCode?t(n[1].data):r.default.msg(n[1].data.message)})).catch((function(t){e.hideLoading(),n(t)}))}));return c},l=function(e,t){return t.appid=a.default.appid,c(e,"get",t)},u=function(e,t){return t.appid=a.default.appid,c(e,"post",t)},f={baseUrl:s,get:l,post:u};t.default=f}).call(this,n("543d")["default"])},a34a:function(e,t,n){e.exports=n("bbdd")},a9ff:function(e,t,n){"use strict";(function(e,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("a34a")),a=n("37dc");function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,c,"next",e)}function c(e){s(a,r,i,o,c,"throw",e)}o(void 0)}))}}function l(e){return h(e)||f(e)||p(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function h(e){if(Array.isArray(e))return g(e)}function d(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function p(e,t){if(e){if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(a=0;a>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*c,i);if(c){for(var u=0;u>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],x=e[t+8],_=e[t+9],b=e[t+10],w=e[t+11],A=e[t+12],S=e[t+13],k=e[t+14],T=e[t+15],P=a[0],C=a[1],O=a[2],L=a[3];P=l(P,C,O,L,o,7,s[0]),L=l(L,P,C,O,c,12,s[1]),O=l(O,L,P,C,d,17,s[2]),C=l(C,O,L,P,p,22,s[3]),P=l(P,C,O,L,g,7,s[4]),L=l(L,P,C,O,v,12,s[5]),O=l(O,L,P,C,y,17,s[6]),C=l(C,O,L,P,m,22,s[7]),P=l(P,C,O,L,x,7,s[8]),L=l(L,P,C,O,_,12,s[9]),O=l(O,L,P,C,b,17,s[10]),C=l(C,O,L,P,w,22,s[11]),P=l(P,C,O,L,A,7,s[12]),L=l(L,P,C,O,S,12,s[13]),O=l(O,L,P,C,k,17,s[14]),P=u(P,C=l(C,O,L,P,T,22,s[15]),O,L,c,5,s[16]),L=u(L,P,C,O,y,9,s[17]),O=u(O,L,P,C,w,14,s[18]),C=u(C,O,L,P,o,20,s[19]),P=u(P,C,O,L,v,5,s[20]),L=u(L,P,C,O,b,9,s[21]),O=u(O,L,P,C,T,14,s[22]),C=u(C,O,L,P,g,20,s[23]),P=u(P,C,O,L,_,5,s[24]),L=u(L,P,C,O,k,9,s[25]),O=u(O,L,P,C,p,14,s[26]),C=u(C,O,L,P,x,20,s[27]),P=u(P,C,O,L,S,5,s[28]),L=u(L,P,C,O,d,9,s[29]),O=u(O,L,P,C,m,14,s[30]),P=f(P,C=u(C,O,L,P,A,20,s[31]),O,L,v,4,s[32]),L=f(L,P,C,O,x,11,s[33]),O=f(O,L,P,C,w,16,s[34]),C=f(C,O,L,P,k,23,s[35]),P=f(P,C,O,L,c,4,s[36]),L=f(L,P,C,O,g,11,s[37]),O=f(O,L,P,C,m,16,s[38]),C=f(C,O,L,P,b,23,s[39]),P=f(P,C,O,L,S,4,s[40]),L=f(L,P,C,O,o,11,s[41]),O=f(O,L,P,C,p,16,s[42]),C=f(C,O,L,P,y,23,s[43]),P=f(P,C,O,L,_,4,s[44]),L=f(L,P,C,O,A,11,s[45]),O=f(O,L,P,C,T,16,s[46]),P=h(P,C=f(C,O,L,P,d,23,s[47]),O,L,o,6,s[48]),L=h(L,P,C,O,m,10,s[49]),O=h(O,L,P,C,k,15,s[50]),C=h(C,O,L,P,v,21,s[51]),P=h(P,C,O,L,A,6,s[52]),L=h(L,P,C,O,p,10,s[53]),O=h(O,L,P,C,b,15,s[54]),C=h(C,O,L,P,c,21,s[55]),P=h(P,C,O,L,x,6,s[56]),L=h(L,P,C,O,T,10,s[57]),O=h(O,L,P,C,y,15,s[58]),C=h(C,O,L,P,S,21,s[59]),P=h(P,C,O,L,g,6,s[60]),L=h(L,P,C,O,w,10,s[61]),O=h(O,L,P,C,d,15,s[62]),C=h(C,O,L,P,_,21,s[63]),a[0]=a[0]+P|0,a[1]=a[1]+C|0,a[2]=a[2]+O|0,a[3]=a[3]+L|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var a=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<>>32-a)+t}function h(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(c),t.HmacMD5=a._createHmacHelper(c)}(Math),n.MD5)})),I((function(e,t){var n,r,i;e.exports=(r=(n=M).lib.Base,i=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t=X,n=e,Object.prototype.hasOwnProperty.call(t,n)||(X[e]=r),X[e]}"app-plus"===W&&(X=r._globalUniCloudObj?r._globalUniCloudObj:r._globalUniCloudObj={});var Y=["invoke","success","fail","complete"],Z=J("_globalUniCloudInterceptor");function Q(e,t){Z[e]||(Z[e]={}),N(t)&&Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=Z[e][t];r||(r=Z[e][t]=[]),-1===r.indexOf(n)&&"function"==typeof n&&r.push(n)}(e,n,t[n])}))}function ee(e,t){Z[e]||(Z[e]={}),N(t)?Object.keys(t).forEach((function(n){Y.indexOf(n)>-1&&function(e,t,n){var r=Z[e][t];if(r){var i=r.indexOf(n);i>-1&&r.splice(i,1)}}(e,n,t[n])})):delete Z[e]}function te(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function ne(e,t){return Z[e]&&Z[e][t]||[]}function re(e,t){return t?function(n){var r,i=this,a=!1;if("callFunction"===t){var o=n&&n.type||$;a=o!==$}r=this.isReady?Promise.resolve():this.initUniCloud,n=n||{};var s=r.then((function(){return a?Promise.resolve():te(ne(t,"invoke"),n)})).then((function(){return e.call(i,n)})).then((function(e){return a?Promise.resolve(e):te(ne(t,"success"),e).then((function(){return te(ne(t,"complete"),e)})).then((function(){return Promise.resolve(e)}))}),(function(e){return a?Promise.reject(e):te(ne(t,"fail"),e).then((function(){return te(ne(t,"complete"),e)})).then((function(){return Promise.reject(e)}))}));if(!(n.success||n.fail||n.complete))return s;s.then((function(e){n.success&&n.success(e),n.complete&&n.complete(e)}),(function(e){n.fail&&n.fail(e),n.complete&&n.complete(e)}))}:function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then((function(e){t.success&&t.success(e),t.complete&&t.complete(e)}),(function(e){t.fail&&t.fail(e),t.complete&&t.complete(e)}))}}var ie,ae=function(e){w(n,e);var t=A(n);function n(e){var r;return b(this,n),r=t.call(this,e.message),r.errMsg=e.message||"",r.errCode=r.code=e.code,r.requestId=e.requestId,Object.defineProperties(k(r),{message:{get:function(){return this.errMsg},set:function(e){this.errMsg=e}}}),r}return n}(T(Error));function oe(){var e=r.getLocale&&r.getLocale()||"en";if(ie)return x(x({},ie),{},{LOCALE:e});var t=r.getSystemInfoSync(),n=t.deviceId,i=t.platform;return ie={PLATFORM:W,OS:i,APPID:V,DEVICEID:n,CLIENT_SDK_VERSION:"1.0.25"},x(x({},ie),{},{LOCALE:e})}var se,ce={sign:function(e,t){var n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),F(n,t).toString()},wrappedRequest:function(e,t){return new Promise((function(n,r){t(Object.assign(e,{complete:function(e){e||(e={}),B&&"h5"===W&&e.errMsg&&0===e.errMsg.indexOf("request:fail")&&console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return r(new ae({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var i=e.data;if(i.error)return r(new ae({code:i.error.code,message:i.error.message,requestId:t}));i.result=i.data,i.requestId=t,delete i.data,n(i)}}))}))}},le={request:function(e){return r.request(e)},uploadFile:function(e){return r.uploadFile(e)},setStorageSync:function(e,t){return r.setStorageSync(e,t)},getStorageSync:function(e){return r.getStorageSync(e)},removeStorageSync:function(e){return r.removeStorageSync(e)},clearStorageSync:function(){return r.clearStorageSync()}},ue={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},fe=(0,a.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:ue,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:ue},"zh-Hans"),he=fe.t,de=function(){function e(t){b(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(he("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=le,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return y(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return ce.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=ce.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=ce.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){var e=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,r){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),e._getAccessTokenPromiseStatus="fulfilled",n(e.accessToken)):(e._getAccessTokenPromiseStatus="rejected",r(new ae({code:"AUTH_FAILED",message:"获取accessToken失败"})))}))}),(function(t){return e._getAccessTokenPromiseStatus="rejected",Promise.reject(t)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):c(new ae({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new ae({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,r=e.cloudPath,i=e.fileType,a=void 0===i?"image":i,o=e.onUploadProgress,s=e.config;if("string"!==U(r))throw new ae({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(r=r.trim()))throw new ae({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(r))throw new ae({code:"INVALID_PARAM",message:"cloudPath不合法"});var c,l,u=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:u,filename:r}).then((function(e){var r=e.result;c=r.id,l="https://"+r.cdnDomain+"/"+r.ossPath;var i={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:c,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:a};return t.uploadFileToOSS(Object.assign({},i,{onUploadProgress:o}))})).then((function(){return t.reportOSSUpload({id:c})})).then((function(e){return new Promise((function(t,r){e.success?t({success:!0,filePath:n,fileID:l}):r(new ae({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new ae({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),pe={init:function(e){var t=new de(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},ge="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(se||(se={}));var ve,ye=function(){},me=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};function xe(e){return void 0===e}function _e(e){return"[object Null]"===Object.prototype.toString.call(e)}function be(e){var t,n,r=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),i=d(r);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.isMatch,s=a.genAdapter,c=a.runtime;if(o())return{adapter:s(),runtime:c}}}catch(l){i.e(l)}finally{i.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(ve||(ve={}));var we={adapter:null,runtime:void 0},Ae=["anonymousUuidKey"],Se=function(e){w(n,e);var t=A(n);function n(){var e;return b(this,n),e=t.call(this),we.adapter.root.tcbObject||(we.adapter.root.tcbObject={}),e}return y(n,[{key:"setItem",value:function(e,t){we.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return we.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete we.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete we.adapter.root.tcbObject}}]),n}(ye);function ke(e,t){switch(e){case"local":return t.localStorage||new Se;case"none":return new Se;default:return t.sessionStorage||new Se}}var Te=function(){function e(t){if(b(this,e),!this._storage){this._persistence=we.adapter.primaryStorage||t.persistence,this._storage=ke(this._persistence,we.adapter);var n="access_token_".concat(t.env),r="access_token_expire_".concat(t.env),i="refresh_token_".concat(t.env),a="anonymous_uuid_".concat(t.env),o="login_type_".concat(t.env),s="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:r,refreshTokenKey:i,anonymousUuidKey:a,loginTypeKey:o,userInfoKey:s}}}return y(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=ke(e,we.adapter);for(var r in this.keys){var i=this.keys[r];if(!t||!Ae.includes(r)){var a=this._storage.getItem(i);xe(a)||_e(a)||(n.setItem(i,a),this._storage.removeItem(i))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var r={version:n||"localCachev1",content:t},i=JSON.stringify(r);try{this._storage.setItem(e,i)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),Pe={},Ce={};function Oe(e){return Pe[e]}var Le=function e(t,n){b(this,e),this.data=n||null,this.name=t},De=function(e){w(n,e);var t=A(n);function n(e,r){var i;return b(this,n),i=t.call(this,"error",{error:e,data:r}),i.error=e,i}return n}(Le),Ee=new(function(){function e(){b(this,e),this._listeners={}}return y(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof De)return console.error(e.error),this;var n="string"==typeof e?new Le(e,t||{}):e,r=n.name;if(this._listens(r)){n.target=this;var i,a=this._listeners[r]?l(this._listeners[r]):[],o=d(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.call(this,n)}}catch(c){o.e(c)}finally{o.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function Ie(e,t){Ee.on(e,t)}function Me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ee.fire(e,t)}function Fe(e,t){Ee.off(e,t)}var $e,je="loginStateChanged",Re="loginStateExpire",Ue="loginTypeChanged",Ne="anonymousConverted",ze="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}($e||($e={}));var Be=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],We={"X-SDK-Version":"1.3.5"};function qe(e,t,n){var r=e[t];e[t]=function(t){var i={},a={};n.forEach((function(n){var r=n.call(e,t),o=r.data,s=r.headers;Object.assign(i,o),Object.assign(a,s)}));var o=t.data;return o&&function(){var e;if(e=o,"[object FormData]"!==Object.prototype.toString.call(e))t.data=x(x({},o),i);else for(var n in i)o.append(n,i[n])}(),t.headers=x(x({},t.headers||{}),a),r.call(e,t)}}function He(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:x(x({},We),{},{"x-seqid":e})}}var Ge=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this.config=n,this._reqClass=new we.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=Oe(this.config.env),this._localCache=(t=this.config.env,Ce[t]),qe(this._reqClass,"post",[He]),qe(this._reqClass,"upload",[He]),qe(this._reqClass,"download",[He])}return y(e,[{key:"post",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"download",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refreshAccessToken",value:function(){var e=c(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_refreshAccessToken",value:function(){var e=c(i.default.mark((function e(){var t,n,r,a,o,s,c,l,u,f,h,d,p;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,a=t.refreshTokenKey,o=t.loginTypeKey,s=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(r),c=this._cache.getStore(a),c){e.next=5;break}throw new Error("未登录CloudBase");case 5:return l={refresh_token:c},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",l);case 8:if(u=e.sent,!u.data.code){e.next=21;break}if(f=u.data.code,"SIGN_PARAM_INVALID"!==f&&"REFRESH_TOKEN_EXPIRED"!==f&&"INVALID_REFRESH_TOKEN"!==f){e.next=20;break}if(this._cache.getStore(o)!==$e.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==f){e.next=19;break}return h=this._cache.getStore(s),d=this._cache.getStore(a),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:h,refresh_token:d});case 17:return p=e.sent,e.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:Me(Re),this._cache.removeStore(a);case 20:throw new Error("刷新access token失败:".concat(u.data.code));case 21:if(!u.data.access_token){e.next=23;break}return e.abrupt("return",(Me(ze),this._cache.setStore(n,u.data.access_token),this._cache.setStore(r,u.data.access_token_expire+Date.now()),{accessToken:u.data.access_token,accessTokenExpire:u.data.access_token_expire}));case 23:u.data.refresh_token&&(this._cache.removeStore(a),this._cache.setStore(a,u.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAccessToken",value:function(){var e=c(i.default.mark((function e(){var t,n,r,a,o,s,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,a=t.refreshTokenKey,this._cache.getStore(a)){e.next=3;break}throw new Error("refresh token不存在,登录状态异常");case 3:if(o=this._cache.getStore(n),s=this._cache.getStore(r),c=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(o,s);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}c=!1;case 12:return e.abrupt("return",(!o||!s||s2&&void 0!==arguments[2]?arguments[2]:{},r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+="".concat(a,"=").concat(encodeURIComponent(n[a]));return/^http(s)?\:\/\//.test(t+=i)?t:"".concat(e).concat(t)}(ge,"//tcb-api.tencentcloudapi.com/web",y),v&&(m+=v),e.next=22,this.post(x({url:m,data:l},h));case 22:if(_=e.sent,b=_.header&&_.header["x-tcb-trace"],b&&this._localCache.setStore(a,b),(200===Number(_.status)||200===Number(_.statusCode))&&_.data){e.next=26;break}throw new Error("network request error");case 26:return e.abrupt("return",_);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"send",value:function(){var e=c(i.default.mark((function e(t){var n,r,a,o=arguments;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(r=e.sent,"ACCESS_TOKEN_EXPIRED"!==r.data.code||-1!==Be.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(a=e.sent,!a.data.code){e.next=12;break}throw new Error("[".concat(a.data.code,"] ").concat(a.data.message));case 12:return e.abrupt("return",a.data);case 13:if(!r.data.code){e.next=15;break}throw new Error("[".concat(r.data.code,"] ").concat(r.data.message));case 15:return e.abrupt("return",r.data);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}}]),e}(),Ve={};function Ke(e){return Ve[e]}var Xe=function(){function e(t){b(this,e),this.config=t,this._cache=Oe(t.env),this._request=Ke(t.env)}return y(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,r=n.accessTokenKey,i=n.accessTokenExpireKey;this._cache.setStore(r,e),this._cache.setStore(i,t)}},{key:"refreshUserInfo",value:function(){var e=c(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),Je=function(){function e(t){if(b(this,e),!t)throw new Error("envId is not defined");this._envId=t,this._cache=Oe(this._envId),this._request=Ke(this._envId),this.setUserInfo()}return y(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new Error("ticket must be string");return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new Error("username must be a string");return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=c(i.default.mark((function e(){var t,n,r,a;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,r=!1,a=n.users,e.abrupt("return",(a.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(r=!0)})),{users:a,hasPrimaryUid:r}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=c(i.default.mark((function e(t){var n,r,a,o,s,c,l,u;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,r=t.gender,a=t.avatarUrl,o=t.province,s=t.country,c=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:r,avatarUrl:a,province:o,country:s,city:c});case 8:l=e.sent,u=l.data,this.setLocalUserInfo(u);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refresh",value:function(){var e=c(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),Ye=function(){function e(t){if(b(this,e),!t)throw new Error("envId is not defined");this._cache=Oe(t);var n=this._cache.keys,r=n.refreshTokenKey,i=n.accessTokenKey,a=n.accessTokenExpireKey,o=this._cache.getStore(r),s=this._cache.getStore(i),c=this._cache.getStore(a);this.credential={refreshToken:o,accessToken:s,accessTokenExpire:c},this.user=new Je(t)}return y(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===$e.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===$e.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===$e.WECHAT||this.loginType===$e.WECHAT_OPEN||this.loginType===$e.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),Ze=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=c(i.default.mark((function e(){var t,n,r,a,o,s,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,r=t.refreshTokenKey,a=this._cache.getStore(n)||void 0,o=this._cache.getStore(r)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:a,refresh_token:o});case 8:if(s=e.sent,!s.uuid||!s.refresh_token){e.next=20;break}return this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Me(je),Me(Ue,{env:this.config.env,loginType:$e.ANONYMOUS,persistence:"local"}),c=new Ye(this.config.env),e.next=19,c.user.refresh();case 19:return e.abrupt("return",c);case 20:throw new Error("匿名登录失败");case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=c(i.default.mark((function e(t){var n,r,a,o,s,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,r=n.anonymousUuidKey,a=n.refreshTokenKey,o=this._cache.getStore(r),s=this._cache.getStore(a),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:s,ticket:t});case 7:if(c=e.sent,!c.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(c.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Me(Ne,{env:this.config.env}),Me(Ue,{loginType:$e.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:c.refresh_token}});case 16:throw new Error("匿名转化失败");case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,r=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(r,$e.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(Xe),Qe=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=c(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("ticket must be a string");case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(r=e.sent,!r.refresh_token){e.next=15;break}return this.setRefreshToken(r.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Me(je),Me(Ue,{env:this.config.env,loginType:$e.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new Ye(this.config.env));case 15:throw new Error("自定义登录失败");case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(Xe),et=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=c(i.default.mark((function e(t,n){var r,a,o,s,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("email must be a string");case 2:return r=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(r)||""});case 5:if(a=e.sent,o=a.refresh_token,s=a.access_token,c=a.access_token_expire,!o){e.next=22;break}if(this.setRefreshToken(o),!s||!c){e.next=15;break}this.setAccessToken(s,c),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Me(je),Me(Ue,{env:this.config.env,loginType:$e.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new Ye(this.config.env));case 22:throw a.code?new Error("邮箱登录失败: [".concat(a.code,"] ").concat(a.message)):new Error("邮箱登录失败");case 23:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"activate",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetPasswordWithToken",value:function(){var e=c(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(Xe),tt=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=c(i.default.mark((function e(t,n){var r,a,o,s,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),r=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:$e.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(r)||""});case 6:if(a=e.sent,o=a.refresh_token,s=a.access_token_expire,c=a.access_token,!o){e.next=23;break}if(this.setRefreshToken(o),!c||!s){e.next=16;break}this.setAccessToken(c,s),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Me(je),Me(Ue,{env:this.config.env,loginType:$e.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new Ye(this.config.env));case 23:throw a.code?new Error("用户名密码登录失败: [".concat(a.code,"] ").concat(a.message)):new Error("用户名密码登录失败");case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(Xe),nt=function(){function e(t){b(this,e),this.config=t,this._cache=Oe(t.env),this._request=Ke(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Ie(Ue,this._onLoginTypeChanged)}return y(e,[{key:"anonymousAuthProvider",value:function(){return new Ze(this.config)}},{key:"customAuthProvider",value:function(){return new Qe(this.config)}},{key:"emailAuthProvider",value:function(){return new et(this.config)}},{key:"usernameAuthProvider",value:function(){return new tt(this.config)}},{key:"signInAnonymously",value:function(){var e=c(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ze(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signInWithEmailAndPassword",value:function(){var e=c(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new et(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new tt(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Ze(this.config)),Ie(Ne,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signOut",value:function(){var e=c(i.default.mark((function e(){var t,n,r,a,o,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==$e.ANONYMOUS){e.next=2;break}throw new Error("匿名用户不支持登出操作");case 2:if(t=this._cache.keys,n=t.refreshTokenKey,r=t.accessTokenKey,a=t.accessTokenExpireKey,o=this._cache.getStore(n),o){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:o});case 7:return s=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(r),this._cache.removeStore(a),Me(je),Me(Ue,{env:this.config.env,loginType:$e.NULL,persistence:this.config.persistence}),s));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=c(i.default.mark((function e(t,n){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"sendPasswordResetEmail",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onLoginStateChanged",value:function(e){var t=this;Ie(je,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){Ie(Re,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){Ie(ze,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){Ie(Ne,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;Ie(Ue,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=c(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new Ye(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=c(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,r=n.data,e.abrupt("return",r&&r.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=c(i.default.mark((function e(t){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Qe(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:x(x({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,r=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+r}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,r=t.persistence,i=t.env;i===this.config.env&&(this._cache.updatePersistence(r),this._cache.setStore(this._cache.keys.loginTypeKey,n))}},{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),rt=function(e,t){t=t||me();var n=Ke(this.config.env),r=e.cloudPath,i=e.filePath,a=e.onUploadProgress,o=e.fileType,s=void 0===o?"image":o;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){var o=e.data,c=o.url,l=o.authorization,u=o.token,f=o.fileId,h=o.cosFileId,d=e.requestId,p={key:r,signature:l,"x-cos-meta-fileid":h,success_action_status:"201","x-cos-security-token":u};n.upload({url:c,data:p,file:i,name:r,fileType:s,onUploadProgress:a}).then((function(e){201===e.statusCode?t(null,{fileID:f,requestId:d}):t(new Error("STORAGE_REQUEST_FAIL: ".concat(e.data)))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},it=function(e,t){t=t||me();var n=Ke(this.config.env),r=e.cloudPath;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},at=function(e,t){var n=e.fileList;if(t=t||me(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var r,i=d(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!a||"string"!=typeof a)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(s){i.e(s)}finally{i.f()}var o={fileid_list:n};return Ke(this.config.env).send("storage.batchDeleteFile",o).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},ot=function(e,t){var n=e.fileList;t=t||me(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var r,i=[],a=d(n);try{for(a.s();!(r=a.n()).done;){var o=r.value;"object"==typeof o?(o.hasOwnProperty("fileID")&&o.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),i.push({fileid:o.fileID,max_age:o.maxAge})):"string"==typeof o?i.push({fileid:o}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(c){a.e(c)}finally{a.f()}var s={file_list:i};return Ke(this.config.env).send("storage.batchGetDownloadUrl",s).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},st=function(){var e=c(i.default.mark((function e(t,n){var r,a,o,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.fileID,e.next=3,ot.call(this,{fileList:[{fileID:r,maxAge:600}]});case 3:if(a=e.sent.fileList[0],"SUCCESS"===a.code){e.next=6;break}return e.abrupt("return",n?n(a):new Promise((function(e){e(a)})));case 6:if(o=Ke(this.config.env),s=a.download_url,s=encodeURI(s),n){e.next=10;break}return e.abrupt("return",o.download({url:s}));case 10:return e.t0=n,e.next=13,o.download({url:s});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),ct=function(e,t){var n,r=e.name,i=e.data,a=e.query,o=e.parse,s=e.search,c=t||me();try{n=i?JSON.stringify(i):""}catch(r){return Promise.reject(r)}if(!r)return Promise.reject(new Error("函数名不能为空"));var l={inQuery:a,parse:o,search:s,function_name:r,request_data:n};return Ke(this.config.env).send("functions.invokeFunction",l).then((function(e){if(e.code)c(null,e);else{var t=e.data.response_data;if(o)c(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),c(null,{result:t,requestId:e.requestId})}catch(e){c(new Error("response data must be json"))}}return c.promise})).catch((function(e){c(e)})),c.promise},lt={timeout:15e3,persistence:"session"},ut={},ft=function(){function e(t){b(this,e),this.config=t||this.config,this.authObj=void 0}return y(e,[{key:"init",value:function(t){switch(we.adapter||(this.requestClient=new we.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=x(x({},lt),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,r=t||we.adapter.primaryStorage||lt.persistence;return r!==this.config.persistence&&(this.config.persistence=r),function(e){var t=e.env;Pe[t]=new Te(e),Ce[t]=new Te(x(x({},e),{},{persistence:"local"}))}(this.config),n=this.config,Ve[n.env]=new Ge(n),this.authObj=new nt(this.config),this.authObj}},{key:"on",value:function(e,t){return Ie.apply(this,[e,t])}},{key:"off",value:function(e,t){return Fe.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return ct.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return at.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return ot.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return st.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return rt.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return it.apply(this,[e,t])}},{key:"registerExtension",value:function(e){ut[e.name]=e}},{key:"invokeExtension",value:function(){var e=c(i.default.mark((function e(t,n){var r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=ut[t],r){e.next=3;break}throw Error("扩展".concat(t," 必须先注册"));case 3:return e.next=5,r.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=be(e)||{},n=t.adapter,r=t.runtime;n&&(we.adapter=n),r&&(we.runtime=r)}}]),e}(),ht=new ft;function dt(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+=a+"="+encodeURIComponent(n[a]);return/^http(s)?:\/\//.test(t+=i)?t:""+e+t}var pt=function(){function e(){b(this,e)}return y(e,[{key:"post",value:function(e){var t=e.url,n=e.data,r=e.headers;return new Promise((function(e,i){le.request({url:dt("https:",t),data:n,method:"POST",header:r,success:function(t){e(t)},fail:function(e){i(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var r=e.url,i=e.file,a=e.data,o=e.headers,s=e.fileType,c=le.uploadFile({url:dt("https:",r),name:"file",formData:Object.assign({},a),filePath:i,fileType:s,header:o,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&a.success_action_status&&(n.statusCode=parseInt(a.success_action_status,10)),t(n)},fail:function(e){B&&"mp-alipay"===W&&console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"),n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),gt={setItem:function(e,t){le.setStorageSync(e,t)},getItem:function(e){return le.getStorageSync(e)},removeItem:function(e){le.removeStorageSync(e)},clear:function(){le.clearStorageSync()}},vt={genAdapter:function(){return{root:{},reqClass:pt,localStorage:gt,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};ht.useAdapters(vt);var yt=ht,mt=yt.init;yt.init=function(e){e.env=e.spaceId;var t=mt.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){t[e]=re(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var xt=yt;function _t(){return{token:le.getStorageSync("uni_id_token")||le.getStorageSync("uniIdToken"),tokenExpired:le.getStorageSync("uni_id_token_expired")}}function bt(){B&&"h5"===W&&r.getStorageSync("__LAST_DCLOUD_APPID")!==V&&(r.setStorageSync("__LAST_DCLOUD_APPID",V),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),le.removeStorageSync("uni_id_token"),le.removeStorageSync("uniIdToken"),le.removeStorageSync("uni_id_token_expired"))}var wt=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var r="Anonymous_Access_token";e.setAccessToken(r),t(r)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=ce.sign(n,this.config.clientSecret);var i=oe();r["x-client-info"]=JSON.stringify(i);var a=_t(),o=a.token;return r["x-client-token"]=o,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(r))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,success:function(t){t&&t.statusCode<400?e(t):c(new ae({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new ae({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,r=e.filePath,i=e.cloudPath,a=e.fileType,o=void 0===a?"image":a,s=e.onUploadProgress;if(!i)throw new ae({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:i}).then((function(e){var i=e.result,a=i.url,c=i.formData,l=i.name;t=e.result.fileUrl;var u={url:a,formData:c,name:l,filePath:r,fileType:o};return n.uploadFileToOSS(Object.assign({},u,{onUploadProgress:s}))})).then((function(){return n.reportOSSUpload({cloudPath:i})})).then((function(e){return new Promise((function(n,i){e.success?n({success:!0,filePath:r,fileID:t}):i(new ae({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList,n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}}]),n}(de),At={init:function(e){var t=new wt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function St(e){var t,n=e.data;t=oe();var r=JSON.parse(JSON.stringify(n||{}));if(Object.assign(r,{clientInfo:t}),!r.uniIdToken){var i=_t(),a=i.token;a&&(r.uniIdToken=a)}return r}function kt(e){var t=this,n=e.name,r=e.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(n);return new Promise((function(e,t){le.request({method:"POST",url:c,data:{name:n,platform:W,provider:o,spaceId:s},timeout:3e3,success:function(t){e(t)},fail:function(){e({data:{code:"NETWORK_ERROR",message:"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"}})}})})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=t||{},r=n.code,i=n.message;return{code:0===r?0:r||"SYS_ERR",message:i||"SYS_ERR"}})).then((function(e){var i=e.code,a=e.message;if(0!==i){switch(i){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(a||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var s="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(s),new Error(s);case"SWITCH_TO_CLOUD":break;default:var c="检测本地调试服务出现错误:".concat(a,",请检查网络环境或重启客户端再试");throw console.error(c),new Error(c)}return t._originCallFunction({name:n,data:r})}return new Promise((function(e,n){var i=St.call(t,{data:r});le.request({method:"POST",url:l,data:{provider:o,platform:W,param:i},success:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.statusCode,i=t.data;return!r||r>=400?n(new ae({code:i.code||"SYS_ERR",message:i.message||"request:fail"})):e({result:i})},fail:function(e){n(new ae({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var Tt=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Pt=/[\\^$.*+?()[\]{}|]/g,Ct=RegExp(Pt.source);function Ot(e,t,n){return e.replace(new RegExp((r=t)&&Ct.test(r)?r.replace(Pt,"\\$&"):r,"g"),n);var r}function Lt(e){var t=e.functionName,n=e.result,r=e.logPvd;if(this.config.useDebugFunction&&n&&n.requestId){var i=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(r,"-request]").concat(i,"[/").concat(r,"-request]"))}}function Dt(e){var t=e.callFunction,n=function(n){var r=this,i=n.name;n.data=St.call(e,{data:n.data});var a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return Lt.call(r,{functionName:i,result:e,logPvd:a}),Promise.resolve(e)}),(function(e){return Lt.call(r,{functionName:i,result:e,logPvd:a}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,r=e.extraInfo,i=void 0===r?{}:r,a=e.formatter,o=void 0===a?[]:a,s=0;s-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var r=e[t].indexOf(n);-1!==r&&e[t].splice(r,1)}}}var Ft=["db.Geo","db.command","command.aggregate"];function $t(e,t){return Ft.indexOf("".concat(e,".").concat(t))>-1}function jt(e){switch(U(e)){case"array":return e.map((function(e){return jt(e)}));case"object":return e._internalType===Et||Object.keys(e).forEach((function(t){e[t]=jt(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}var Rt=function(){function e(t,n,r){b(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=r}return y(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:jt(e.$param)}}))}}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"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禁止使用set方法")}},{key:"_send",value:function(e,t){var n=this.getAction(),r=this.getCommand();if(r.$db.push({$method:e,$param:jt(t)}),B){var i=r.$db.find((function(e){return"collection"===e.$method})),a=i&&i.$param;a&&1===a.length&&"string"==typeof i.$param[0]&&i.$param[0].indexOf(",")>-1&&console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。")}return this._database._callCloudFunction({action:n,command:r})}},{key:"useAggregate",get:function(){for(var e=this,t=!1;e.prevStage;){e=e.prevStage;var n=e.content.$method;if("aggregate"===n||"pipeline"===n){t=!0;break}}return t}},{key:"count",get:function(){if(!this.useAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return Ut({$method:"count",$param:jt(Array.from(arguments))},e,this._database)}}}]),e}();function Ut(e,t,n){return It(new Rt(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),$t(r,t)?Ut({$method:t},e,n):function(){return Ut({$method:t,$param:jt(Array.from(arguments))},e,n)}}})}function Nt(e){var t=e.path,n=e.method;return function(){function e(){b(this,e),this.param=Array.from(arguments)}return y(e,[{key:"toJSON",value:function(){return{$newDb:[].concat(l(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var zt,Bt=function(e){w(n,e);var t=A(n);function n(){return b(this,n),t.apply(this,arguments)}return y(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,r=e.command,i=e.multiCommand,a=e.queryList;function o(e,t){if(i&&a)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&le.setStorageSync("uni_id_token",t),n&&le.setStorageSync("uni_id_token_expired",n)}({token:a,tokenExpired:s}),t._callbackAuth("refreshToken",[{token:a,tokenExpired:s}]),t._callback("refreshToken",[{token:a,tokenExpired:s}]));var m=e.result.affectedDocs;return"number"==typeof m&&Object.defineProperty(e.result,"affectedDocs",{get:function(){return console.warn("affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"),m}}),te(ne("database","success"),e).then((function(){return te(ne("database","complete"),e)})).then((function(){return o(e,null),Promise.resolve(e)}))}),(function(e){var n=new ae({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId});return t._callback("error",[n]),/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),te(ne("database","fail"),e).then((function(){return te(ne("database","complete"),e)})).then((function(){return o(null,e),Promise.reject(e)}))}))}}]),n}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,r=void 0===n?{}:n;b(this,e),this._uniClient=r,this._authCallBacks={},this._dbCallBacks={},r.isDefault&&(this._dbCallBacks=J("_globalUniCloudDatabaseCallback")),this.auth=Mt(this._authCallBacks),Object.assign(this,Mt(this._dbCallBacks)),this.env=It({},{get:function(e,t){return{$env:t}}}),this.Geo=It({},{get:function(e,t){return Nt({path:["Geo"],method:t})}}),this.serverDate=Nt({path:[],method:"serverDate"}),this.RegExp=Nt({path:[],method:"RegExp"})}return y(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,l(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,l(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}());function Wt(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return It(new e(t),{get:function(e,t){return $t("db",t)?Ut({$method:t},null,e):function(){return Ut({$method:t,$param:jt(Array.from(arguments))},null,e)}}})}(Bt,{uniClient:e});return this._database=n,n}}var qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ht=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Gt(){var e,t,n=_t().token||"",r=n.split(".");if(!n||3!==r.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=r[1],decodeURIComponent(zt(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}zt="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Ht.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",a=0;a>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var Vt=E(I((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",i="chooseAndUploadFile:fail";function a(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function o(e,t,r){var i=r.onChooseFile,a=r.onUploadProgress;return t.then((function(e){if(i){var t=i(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var a=t.tempFiles,o=a.length,s=0;return new Promise((function(n){for(;s=o)!a.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var l=a[r];e.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:function(e){e.index=r,e.tempFile=l,e.tempFilePath=l.path,i&&i(e)}}).then((function(e){l.url=e.fileID,r0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?o(e,function(e){var t=e.count,n=e.sizeType,o=e.sourceType,s=void 0===o?["album","camera"]:o,c=e.extension;return new Promise((function(e,o){r.chooseImage({count:t,sizeType:n,sourceType:s,extension:c,success:function(t){e(a(t,"image"))},fail:function(e){o({errMsg:e.errMsg.replace("chooseImage:fail",i)})}})}))}(t),t):"video"===t.type?o(e,function(e){var t=e.camera,n=e.compressed,o=e.maxDuration,s=e.sourceType,c=void 0===s?["album","camera"]:s,l=e.extension;return new Promise((function(e,s){r.chooseVideo({camera:t,compressed:n,maxDuration:o,sourceType:c,extension:l,success:function(t){var n=t.tempFilePath,r=t.duration,i=t.size,o=t.height,s=t.width;e(a({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:i,type:t.tempFile&&t.tempFile.type||"",width:s,height:o,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){s({errMsg:e.errMsg.replace("chooseVideo:fail",i)})}})}))}(t),t):o(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,o){var s=r.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(s=wx.chooseMessageFile),"function"!=typeof s)return o({errMsg:i+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});s({type:"all",count:t,extension:n,success:function(t){e(a(t))},fail:function(e){o({errMsg:e.errMsg.replace("chooseFile:fail",i)})}})}))}(t),t)}}}))),Kt="manual";function Xt(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if(e.loadtime!==Kt){for(var r=!1,i=[],a=2;a0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,i=t.success,a=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,a=n.data,o=n.count;e.getcount&&(e.mixinDatacomPage.count=o),e.mixinDatacomHasMore=a.length0&&void 0!==arguments[0]?arguments[0]:{},r=e.database(this.spaceInfo),i=n.action||this.action;i&&(r=r.action(i));var a=n.collection||this.collection;r=Array.isArray(a)?(t=r).collection.apply(t,l(a)):r.collection(a);var o=n.where||this.where;o&&Object.keys(o).length&&(r=r.where(o));var s=n.field||this.field;s&&(r=r.field(s));var c=n.foreignKey||this.foreignKey;c&&(r=r.foreignKey(c));var u=n.groupby||this.groupby;u&&(r=r.groupBy(u));var f=n.groupField||this.groupField;f&&(r=r.groupField(f)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(r=r.distinct());var h=n.orderby||this.orderby;h&&(r=r.orderBy(h));var d=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,g=void 0!==n.getcount?n.getcount:this.getcount,v=void 0!==n.gettree?n.gettree:this.gettree,y=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,m={getCount:g},x={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return v&&(m.getTree=x),y&&(m.getTreePath=x),r=r.skip(p*(d-1)).limit(p).get(m),r}}}}function Jt(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.customUI=t.customUI||e.customUI,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),e}({customUI:!1,loadingOptions:{text:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);var a=n,o=a.customUI,s=a.loadingOptions,l=a.errorOptions,u=!o;return new Proxy({},{get:function(n,a){return function(){var n=c(i.default.mark((function n(){var f,h,d,p,g,v,y,m,x,_,b=arguments;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(u&&r.showLoading({title:s.title,mask:s.mask}),h=b.length,d=new Array(h),p=0;p0&&void 0!==l[0]?l[0]:{},n=t.title,a=t.content,o=t.showCancel,s=t.cancelText,c=t.confirmText,e.abrupt("return",new Promise((function(e,t){r.showModal({title:n,content:a,showCancel:o,cancelText:s,confirmText:c,success:function(t){e(t)},fail:function(){e({confirm:!1,cancel:!0})}})})));case 2:case"end":return e.stop()}}),e)})))({title:"提示",content:y,showCancel:l.retry,cancelText:"取消",confirmText:l.retry?"重试":"确定"});case 22:if(m=n.sent,x=m.confirm,!l.retry||!x){n.next=26;break}return n.abrupt("return",o.apply(void 0,d));case 26:throw _=new ae({code:v,message:y,requestId:f.requestId}),_.detail=f.result,_;case 28:return n.abrupt("return",f.result);case 29:case"end":return n.stop()}}),n,null,[[2,8]])})));function o(){return n.apply(this,arguments)}return o}()}})}}function Yt(e,t){return Zt.apply(this,arguments)}function Zt(){return Zt=c(i.default.mark((function e(t,n){var r,a,o;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r="http://".concat(t,":").concat(n,"/system/ping"),e.prev=1,e.next=4,o={url:r,timeout:500},new Promise((function(e,t){le.request(x(x({},o),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return a=e.sent,e.abrupt("return",!(!a.data||0!==a.data.code));case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),Zt.apply(this,arguments)}function Qt(e){if(!e.initUniCloudStatus||"rejected"===e.initUniCloudStatus){var t,n=Promise.resolve();t=1,n=new Promise((function(e,n){setTimeout((function(){e()}),t)})),e.isReady=!1,e.isDefault=!1;var r=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return r.getLoginState()})).then((function(e){return e?Promise.resolve():r.signInAnonymously()})).then((function(){if(!B)return Promise.resolve();if(B&&e.debugInfo){var t=e.debugInfo,n=t.address,r=t.servePort;return function(){var e=c(i.default.mark((function e(t,n){var r,a,o;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,r=t.port;if(!B)return Promise.resolve();if(n)e.localAddress=n,e.localPort=r;else if(e.debugInfo){var i=console["app-plus"===W?"error":"warn"],a="";"remote"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,a="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):a="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","h5"===W&&(a+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),i(a)}})).then((function(){bt(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var en=new(function(){function e(){b(this,e)}return y(e,[{key:"init",value:function(e){var t={},n=!1!==e.debugFunction&&B&&("h5"===W&&navigator.userAgent.indexOf("HBuilderX")>0||"app-plus"===W);switch(e.provider){case"tencent":t=xt.init(Object.assign(e,{useDebugFunction:n}));break;case"aliyun":t=pe.init(Object.assign(e,{useDebugFunction:n}));break;case"private":t=At.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error("未提供正确的provider参数")}var r=q;return B&&r&&!r.code&&(t.debugInfo=r),Qt(t),t.reInit=function(){Qt(this)},Dt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),Wt(t),function(e){e.getCurrentUserInfo=Gt,e.chooseAndUploadFile=Vt.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Xt(e)}}),e.importObject=Jt(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=re(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=H,t={};if(1===e.length)t=e[0],en=en.init(t),en.isDefault=!0;else{var n,r=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":G?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",r.forEach((function(e){en[e]=function(){return console.error(n),Promise.reject(new ae({code:"SYS_ERR",message:n}))}}))}Object.assign(en,{get mixinDatacom(){return Xt(en)}}),en.addInterceptor=Q,en.removeInterceptor=ee,B&&"h5"===W&&(window.uniCloud=en)})();var tn=en;t.default=tn}).call(this,n("c8ba"),n("543d")["default"])},b86e:function(e,t,n){"use strict";function r(e,t){return c(e)||s(e,t)||a(e,t)||i()}function i(){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 a(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),r=1;re.end.x||t.end.xe.start.y||t.start.y=0?(s=0,e.uevent.trigger("scrollLeft"),e.scrollOption.position="left",i.xAxis.scrollPosition="left"):Math.abs(t)>=o-a?(s=a-o,e.uevent.trigger("scrollRight"),e.scrollOption.position="right",i.xAxis.scrollPosition="right"):(e.scrollOption.position=t,i.xAxis.scrollPosition=t),s}function y(e,t,n){function r(e){while(e<0)e+=2*Math.PI;while(e>2*Math.PI)e-=2*Math.PI;return e}return e=r(e),t=r(t),n=r(n),t>n&&(n+=2*Math.PI,e=t&&e<=n}function m(e,t,n){var r=e,i=n-t,a=r+(n-i-r)/Math.sqrt(2);a*=-1;var o=(n-i)*(Math.sqrt(2)-1)-(n-i-r)/Math.sqrt(2);return{transX:a,transY:o}}function x(e,t){function n(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].y>=Math.max(e[t-1].y,e[t+1].y)||e[t].y<=Math.min(e[t-1].y,e[t+1].y))}function r(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].x>=Math.max(e[t-1].x,e[t+1].x)||e[t].x<=Math.min(e[t-1].x,e[t+1].x))}var i=.2,a=.2,o=null,s=null,c=null,l=null;if(t<1?(o=e[0].x+(e[1].x-e[0].x)*i,s=e[0].y+(e[1].y-e[0].y)*i):(o=e[t].x+(e[t+1].x-e[t-1].x)*i,s=e[t].y+(e[t+1].y-e[t-1].y)*i),t>e.length-3){var u=e.length-1;c=e[u].x-(e[u].x-e[u-1].x)*a,l=e[u].y-(e[u].y-e[u-1].y)*a}else c=e[t+1].x-(e[t+2].x-e[t].x)*a,l=e[t+1].y-(e[t+2].y-e[t].y)*a;return n(e,t+1)&&(l=e[t+1].y),n(e,t)&&(s=e[t].y),r(e,t+1)&&(c=e[t+1].x),r(e,t)&&(o=e[t].x),(s>=Math.max(e[t].y,e[t+1].y)||s<=Math.min(e[t].y,e[t+1].y))&&(s=e[t].y),(l>=Math.max(e[t].y,e[t+1].y)||l<=Math.min(e[t].y,e[t+1].y))&&(l=e[t+1].y),(o>=Math.max(e[t].x,e[t+1].x)||o<=Math.min(e[t].x,e[t+1].x))&&(o=e[t].x),(c>=Math.max(e[t].x,e[t+1].x)||c<=Math.min(e[t].x,e[t+1].x))&&(c=e[t+1].x),{ctrA:{x:o,y:s},ctrB:{x:c,y:l}}}function _(e,t,n){return{x:n.x+e,y:n.y-t}}function b(e,t){if(t)while(f.isCollision(e,t))e.start.x>0?e.start.y--:e.start.x<0||e.start.y>0?e.start.y++:e.start.y--;return e}function w(e,t,n){var r=[];if(e.length>0&&e[0].data.constructor.toString().indexOf("Array")>-1){t._pieSeries_=e;for(var i=e[0].data,a=0;a=1e4?1e3:r>=1e3?100:r>=100?10:r>=10?5:r>=1?1:r>=.1?.1:r>=.01?.01:r>=.001?.001:r>=1e-4?1e-4:r>=1e-5?1e-5:1e-6,{minRange:p(e,"lower",n),maxRange:p(t,"upper",n)}}function T(e,t,n){var r=0;if(e=String(e),!1!==n&&void 0!==n&&n.setFontSize&&n.measureText)return n.setFontSize(t),n.measureText(e).width;e=e.split("");for(var i=0;i-1;if(a)for(var o=$(e),s=0;s5&&void 0!==arguments[5]?arguments[5]:{},o=t.chartData.calPoints?t.chartData.calPoints:[],s={};if(r.length>0){for(var c=[],l=0;l0&&(r=i[n]),{text:a.formatter?a.formatter(e,r,n,t):e.name+": "+e.data,color:e.color}})),f={x:Math.round(s.x),y:Math.round(s.y)};return{textList:u,offset:f}}function M(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=t.chartData.xAxisPoints[n]+t.chartData.eachSpacing/2,o=e.map((function(e){return{text:i.formatter?i.formatter(e,r[n],n,t):e.name+": "+e.data,color:e.color,disableLegend:!!e.disableLegend}}));o=o.filter((function(e){if(!0!==e.disableLegend)return e}));var s={x:Math.round(a),y:0};return{textList:o,offset:s}}function F(e,t,n,r,i,a){var o=n.chartData.calPoints,s=a.color.upFill,c=a.color.downFill,l=[s,s,c,s],u=[];t.map((function(t){0==r?t.data[1]-t.data[0]<0?l[1]=c:l[1]=s:(t.data[0]e[r-1][1]&&(l[2]=s),t.data[3]4&&void 0!==arguments[4]?arguments[4]:0,a={index:-1,group:[]},o=n.chartData.eachSpacing/2,s=[];if(t&&t.length>0){if(n.categories){for(var c=1;ct&&(a.index=n)}));else{for(var l=Array(t.length),u=0;uf[0]-i&&e.xf[1]-i&&e.yt.start.x&&e.xt.start.y&&e.y=t.area[3]-10&&e.y>=t.area[0]&&e.y<=t.height-t.area[2]}function z(e,t,n){var r=2*Math.PI/n,i=-1;if(V(e,t.center,t.radius)){var a=function(e){return e<0&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI),e},o=Math.atan2(t.center.y-e.y,e.x-t.center.x);o*=-1,o<0&&(o+=2*Math.PI);var s=t.angleList.map((function(e){return e=a(-1*e),e}));s.forEach((function(e,t){var n=a(e-r/2),s=a(e+r/2);s=n&&o<=s||o+2*Math.PI>=n&&o+2*Math.PI<=s)&&(i=t)}))}return i}function B(e,t){for(var n=-1,r=0,i=t.series.length;ra.funnelArea[0]&&e.xa.funnelArea[1]&&e.ya.area[0]&&e.xa.area[1]&&e.yt.width-t.area[1]-t.area[3]?(h.push(g),p.push(d-t.legend.itemGap*t.pix),d=m,g=[y]):(d+=m,g.push(y))}if(g.length){h.push(g),p.push(d-t.legend.itemGap*t.pix),a.widthArr=p;var x=Math.max.apply(null,p);switch(t.legend.float){case"left":a.area.start.x=t.area[3],a.area.end.x=t.area[3]+x+2*o;break;case"right":a.area.start.x=t.width-t.area[1]-x-2*o,a.area.end.x=t.width-t.area[1];break;default:a.area.start.x=(t.width-x)/2-o,a.area.end.x=(t.width+x)/2+o}a.area.width=x+2*o,a.area.wholeWidth=x+2*o,a.area.height=h.length*f+2*o,a.area.wholeHeight=h.length*f+2*o+2*s,a.points=h}}else{var _=e.length,b=t.height-t.area[0]-t.area[2]-2*s-2*o,w=Math.min(Math.floor(b/f),_);switch(a.area.height=w*f+2*o,a.area.wholeHeight=w*f+2*o,t.legend.float){case"top":a.area.start.y=t.area[0]+s,a.area.end.y=t.area[0]+s+a.area.height;break;case"bottom":a.area.start.y=t.height-t.area[2]-s-a.area.height,a.area.end.y=t.height-t.area[2]-s;break;default:a.area.start.y=(t.height-a.area.height)/2,a.area.end.y=(t.height+a.area.height)/2}for(var A=_%w===0?_/w:Math.floor(_/w+1),S=[],k=0;kL&&(L=E)}a.widthArr.push(L),a.heightArr.push(O.length*f+2*o)}for(var I=0,M=0;Mr&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*n.xAxisTextPadding+s*Math.sin(a.angle)),a}function Y(e,t,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=P(e),a=[];i=i.filter((function(e){return"object"===typeof e&&null!==e?e.constructor.toString().indexOf("Array")>-1?null!==e:null!==e.value:null!==e})),i.map((function(e){"object"===typeof e?e.constructor.toString().indexOf("Array")>-1?"candle"==t.type?e.map((function(e){a.push(e)})):a.push(e[0]):a.push(e.value):a.push(e)}));var o=0,s=0;if(a.length>0&&(o=Math.min.apply(this,a),s=Math.max.apply(this,a)),r>-1?("number"===typeof t.xAxis.data[r].min&&(o=Math.min(t.xAxis.data[r].min,o)),"number"===typeof t.xAxis.data[r].max&&(s=Math.max(t.xAxis.data[r].max,s))):("number"===typeof t.xAxis.min&&(o=Math.min(t.xAxis.min,o)),"number"===typeof t.xAxis.max&&(s=Math.max(t.xAxis.max,s))),o===s){var c=s||10;s+=c}for(var l=o,u=s,f=[],h=(u-l)/t.xAxis.splitNumber,d=0;d<=t.xAxis.splitNumber;d++)f.push(l+h*d);return f}function Z(e,t,n,r){var i={angle:0,xAxisHeight:n.xAxisHeight};i.ranges=Y(e,t,n),i.rangesFormat=i.ranges.map((function(e){return e=f.toFixed(e,2),e}));var a=i.ranges.map((function(e){return e=f.toFixed(e,2),e}));i=Object.assign(i,ue(a,t,n));var o=i.eachSpacing,s=a.map((function(e){return T(e,t.xAxis.fontSize*t.pix||n.fontSize,r)})),c=Math.max.apply(this,s);return c+2*n.xAxisTextPadding>o&&(i.angle=45*Math.PI/180,i.xAxisHeight=2*n.xAxisTextPadding+c*Math.sin(i.angle)),!0===t.xAxis.disabled&&(i.xAxisHeight=0),i}function Q(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=i.extra.radar||{};o.max=o.max||0;for(var s=Math.max(o.max,Math.max.apply(null,P(r))),c=[],l=function(i){var o=r[i],l={};l.color=o.color,l.legendShape=o.legendShape,l.pointShape=o.pointShape,l.data=[],o.data.forEach((function(r,i){var o={};o.angle=e[i],o.proportion=r/s,o.position=_(n*o.proportion*a*Math.cos(o.angle),n*o.proportion*a*Math.sin(o.angle),t),l.data.push(o)})),c.push(l)},u=0;u2&&void 0!==arguments[2]?arguments[2]:1,r=0,i=0,a=0;a4&&void 0!==arguments[4]?arguments[4]:1;e=e.sort((function(e,t){return parseInt(t.data)-parseInt(e.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==n&&(n=.999999);for(var r=0;r=2&&(i._proportion_=i._proportion_%2)}return e}function ie(e,t,n){for(var r=t-n+1,i=t,a=0;a=2&&(e[a]._endAngle_=e[a]._endAngle_%2),i=e[a]._endAngle_;return e}function ae(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=0;i=n.oldData?a._proportion_=(a._endAngle_-a._oldAngle_)*r+n.oldAngle:a._proportion_=a._oldAngle_-(a._oldAngle_-a._endAngle_)*r,a._proportion_>=2&&(a._proportion_=a._proportion_%2)}return e}function oe(e,t,n,r){e=ee(e);for(var i=0,a=0;a0&&(e.width=Math.min(e.width,+a.extra.mix.column.width*a.pix)),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),e.width<=0&&(e.width=1),e.x+=(r+.5-n/2)*(e.width+i),e}))}function ce(e,t,n,r,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return e.map((function(e){return null===e?null:(e.width=Math.ceil(t-2*s),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),r>0&&(e.width-=2*o),e)}))}function le(e,t,n,r,i,a,o){var s=a.extra.column.categoryGap*a.pix||0;return e.map((function(e,n){return null===e?null:(e.width=Math.ceil(t-2*s),a.extra.column&&a.extra.column.width&&+a.extra.column.width>0&&(e.width=Math.min(e.width,+a.extra.column.width*a.pix)),e.width<=0&&(e.width=1),e)}))}function ue(e,t,n){var r=t.width-t.area[1]-t.area[3],i=t.enableScroll?Math.min(t.xAxis.itemCount,e.length):e.length;("line"==t.type||"area"==t.type||"scatter"==t.type||"bubble"==t.type)&&i>1&&"justify"==t.xAxis.boundaryGap&&(i-=1);var a=r/i,o=[],s=t.area[3],c=t.width-t.area[1];return e.forEach((function(e,t){o.push(s+t*a)})),"justify"!==t.xAxis.boundaryGap&&(!0===t.enableScroll?o.push(s+e.length*a):o.push(c)),{xAxisPoints:o,startX:s,endX:c,eachSpacing:a}}function fe(e,t,n,r,i,a,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,c=[],l=a.height-a.area[0]-a.area[2];return e.forEach((function(e,o){if(null===e)c.push(null);else{var u=[];e.forEach((function(e,c){var f={};f.x=r[o]+Math.round(i/2);var h=e.value||e,d=l*(h-t)/(n-t);d*=s,f.y=a.height-Math.round(d)-a.area[2],u.push(f)})),c.push(u)}})),c}function he(e,t,n,r,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],f=a.width-a.area[1]-a.area[3];return e.forEach((function(e,o){if(null===e)l.push(null);else{var h={};h.color=e.color,h.x=r[o];var d,p,g,v=e;if("object"===typeof e&&null!==e)if(e.constructor.toString().indexOf("Array")>-1)d=[].concat(a.chartData.xAxisData.ranges),p=d.shift(),g=d.pop(),v=e[1],h.x=a.area[3]+f*(e[0]-p)/(g-p),"bubble"==a.type&&(h.r=e[2],h.t=e[3]);else v=e.value;"center"==c&&(h.x+=Math.round(i/2));var y=u*(v-t)/(n-t);y*=s,h.y=a.height-Math.round(y)-a.area[2],l.push(h)}})),l}function de(e,t,n,r,i,a,o,s,c){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,u=[],f=a.height-a.area[0]-a.area[2];return e.forEach((function(e,o){if(null===e)u.push(null);else{var h={};if(h.color=e.color,h.x=r[o]+Math.round(i/2),s>0){for(var d=0,p=0;p<=s;p++)d+=c[p].data[o];var g=d-e,v=f*(d-t)/(n-t),y=f*(g-t)/(n-t)}else d=e,v=f*(d-t)/(n-t),y=0;var m=y;v*=l,m*=l,h.y=a.height-Math.round(v)-a.area[2],h.y0=a.height-Math.round(m)-a.area[2],u.push(h)}})),u}function pe(e,t,n,r,i){var a;a="stack"==r?C(e,t.categories.length):P(e);var o=[];a=a.filter((function(e){return"object"===typeof e&&null!==e?e.constructor.toString().indexOf("Array")>-1?null!==e:null!==e.value:null!==e})),a.map((function(e){"object"===typeof e?e.constructor.toString().indexOf("Array")>-1?"candle"==t.type?e.map((function(e){o.push(e)})):o.push(e[1]):o.push(e.value):o.push(e)}));var s=i.min||0,c=i.max||0;if(o.length>0&&(s=Math.min.apply(this,o),c=Math.max.apply(this,o)),s===c){var l=c||10;c+=l}for(var u=k(s,c),f=void 0===i.min?u.minRange:i.min,h=void 0===i.max?u.maxRange:i.max,d=[],p=(h-f)/t.yAxis.splitNumber,g=0;g<=t.yAxis.splitNumber;g++)d.push(f+p*g);return d.reverse()}function ge(e,t,n,r){var i=u({},{type:""},t.extra.column),a=t.yAxis.data.length,o=new Array(a);if(a>0){for(var s=0;s-1?a[s][1]:a[s].value);var u=t.formatter?t.formatter(l,s):l;r.setTextAlign("center"),r.fillText(String(u),e.x,e.y-4+o*i.pix),r.closePath(),r.stroke(),r.setTextAlign("left")}}))}function we(e,t,n,r,i,a){t-=e.width/2+e.labelOffset*r.pix;for(var o=e.startAngle-e.endAngle+1,s=o/e.splitLine.splitNumber,c=e.endNumber-e.startNumber,l=c/e.splitLine.splitNumber,u=e.startAngle,f=e.startNumber,h=0;h=2&&(u%=2),f+=l}}function Ae(e,t,n,r,i,a){var o=r.extra.radar||{};t+=i.radarLabelTextMargin*r.pix,e.forEach((function(e,s){var c={x:t*Math.cos(e),y:t*Math.sin(e)},l=_(c.x,c.y,n),u=l.x,h=l.y;f.approximatelyEqual(c.x,0)?u-=T(r.categories[s]||"",i.fontSize,a)/2:c.x<0&&(u-=T(r.categories[s]||"",i.fontSize,a)),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelColor||r.fontColor),a.fillText(r.categories[s]||"",u,h+i.fontSize/2),a.closePath(),a.stroke()}))}function Se(e,t,n,r,i,a){for(var o=n.pieChartLinePadding,s=[],c=null,l=e.map((function(e,t,n){var r=e.formatter?e.formatter(e,t,n):f.toFixed(100*e._proportion_.toFixed(4))+"%",i=2*Math.PI-(e._start_+2*Math.PI*e._proportion_/2);e._rose_proportion_&&(i=2*Math.PI-(e._start_+2*Math.PI*e._rose_proportion_/2));var a=e.color,o=e._radius_;return{arc:i,text:r,color:a,radius:o,textColor:e.textColor,textSize:e.textSize}})),u=0;u=0?d+n.pieChartTextPadding:d-n.pieChartTextPadding,m=p,x=T(h.text,h.textSize*t.pix||n.fontSize,r),w=m;c&&f.isSameXCoordinateArea(c.start,{x:y})&&(w=y>0?Math.min(m,c.start.y):d<0||m>0?Math.max(m,c.start.y):Math.min(m,c.start.y)),y<0&&(y-=x);var A={lineStart:{x:g,y:v},lineEnd:{x:d,y:p},start:{x:y,y:w},width:x,height:n.fontSize,text:h.text,color:h.color,textColor:h.textColor,textSize:h.textSize};c=b(A,c),s.push(c)}for(var S=0;Sn.width&&(h=!0),v+t.y>n.height&&(t.y=n.height-v),i.beginPath(),i.setFillStyle(d(s.bgColor||r.toolTipBackground,s.bgOpacity||r.toolTipOpacity)),i.setLineWidth(s.borderWidth*n.pix),i.setStrokeStyle(d(s.borderColor,s.borderOpacity));var y=s.borderRadius;h?(s.showArrow&&(i.moveTo(t.x,t.y+10*n.pix),i.lineTo(t.x-f,t.y+10*n.pix+5*n.pix)),i.arc(t.x-f-y,t.y+v-y,y,0,Math.PI/2,!1),i.arc(t.x-f-Math.round(g)+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),i.arc(t.x-f-Math.round(g)+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),i.arc(t.x-f-y,t.y+y,y,-Math.PI/2,0,!1),s.showArrow&&(i.lineTo(t.x-f,t.y+10*n.pix-5*n.pix),i.lineTo(t.x,t.y+10*n.pix))):(s.showArrow&&(i.moveTo(t.x,t.y+10*n.pix),i.lineTo(t.x+f,t.y+10*n.pix-5*n.pix)),i.arc(t.x+f+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),i.arc(t.x+f+Math.round(g)-y,t.y+y,y,-Math.PI/2,0,!1),i.arc(t.x+f+Math.round(g)-y,t.y+v-y,y,0,Math.PI/2,!1),i.arc(t.x+f+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),s.showArrow&&(i.lineTo(t.x+f,t.y+10*n.pix+5*n.pix),i.lineTo(t.x,t.y+10*n.pix))),i.closePath(),i.fill(),s.borderWidth>0&&i.stroke(),e.forEach((function(e,n){if(null!==e.color){i.beginPath(),i.setFillStyle(e.color);var a=t.x+f+2*r.toolTipPadding,o=t.y+(r.toolTipLineHeight-r.fontSize)/2+r.toolTipLineHeight*n+r.toolTipPadding+1;h&&(a=t.x-g-f+2*r.toolTipPadding),i.fillRect(a,o,c,r.fontSize),i.closePath()}})),e.forEach((function(e,n){var a=t.x+f+2*r.toolTipPadding+c+l;h&&(a=t.x-g-f+2*r.toolTipPadding+ +c+l);var o=t.y+(r.toolTipLineHeight-r.fontSize)/2+r.toolTipLineHeight*n+r.toolTipPadding;i.beginPath(),i.setFontSize(r.fontSize),i.setFillStyle(s.fontColor),i.fillText(e.text,a,o+r.fontSize),i.closePath(),i.stroke()}))}}function Le(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=t.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,l=u({},{type:"group",width:c/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.column),f=[];i.save();var h=-2,p=s.length+2;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),h=Math.floor(-t._scrollDistance_/c)-2,p=h+t.xAxis.itemCount+4),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&Ce(t.tooltip.offset.x,t,n,i,c),l.customColor=S(l.linearType,l.customColor,e,n),e.forEach((function(o,u){var g,v,y;g=[].concat(t.chartData.yAxisData.ranges[o.index]),v=g.pop(),y=g.shift();var m=o.data;switch(l.type){case"group":var x=he(m,v,y,s,c,t,n,a),_=de(m,v,y,s,c,t,n,u,e,a);f.push(_),x=se(x,c,e.length,u,n,t);for(var b=0;bh&&bD&&(I=D,F=0,M=D,$=0),I+F>L/2&&(I=L/2,F=0,M=L/2,$=0),I=I<0?0:I,M=M<0?0:M,F=F<0?0:F,$=$<0?0:$,i.arc(C+I,O+I,I,-Math.PI,-Math.PI/2),i.arc(C+L-M,O+M,M,-Math.PI/2,0),i.arc(C+L-F,O+D-F,F,0,Math.PI/2),i.arc(C+$,O+D-$,$,Math.PI/2,Math.PI)}else i.moveTo(A,w.y),i.lineTo(A+w.width-2,w.y),i.lineTo(A+w.width-2,t.height-t.area[2]),i.lineTo(A,t.height-t.area[2]),i.lineTo(A,w.y),i.setLineWidth(1),i.setStrokeStyle(T);i.setFillStyle(k),i.closePath(),i.fill()}}break;case"stack":x=de(m,v,y,s,c,t,n,u,e,a);f.push(x),x=le(x,c,e.length,u,n,t,e);for(var j=0;jh&&j0&&(S-=U),i.setFillStyle(k),i.moveTo(A,R.y),i.fillRect(A,R.y,R.width-2,S),i.closePath(),i.fill()}}break;case"meter":x=he(m,v,y,s,c,t,n,a);if(f.push(x),x=ce(x,c,e.length,u,n,t,l.meterBorder),0==u)for(var N=0;Nh&&N0&&(i.beginPath(),i.setStrokeStyle(o.color),i.setLineWidth(l.meterBorder*t.pix),i.moveTo(A+.5*l.meterBorder,z.y+S),i.lineTo(A+.5*l.meterBorder,z.y+.5*l.meterBorder),i.lineTo(A+z.width-.5*l.meterBorder,z.y+.5*l.meterBorder),i.lineTo(A+z.width-.5*l.meterBorder,z.y+S),i.stroke())}}else for(var B=0;Bh&&B5&&void 0!==arguments[5]?arguments[5]:1,o=u({},{color:{},average:{}},n.extra.candle);o.color=u({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},o.color),o.average=u({},{show:!1,name:[],day:[],color:r.color},o.average),n.extra.candle=o;var s=n.chartData.xAxisData,c=s.xAxisPoints,l=s.eachSpacing,f=[];i.save();var h=-2,d=c.length+2,p=0,g=n.width+l;return n._scrollDistance_&&0!==n._scrollDistance_&&!0===n.enableScroll&&(i.translate(n._scrollDistance_,0),h=Math.floor(-n._scrollDistance_/l)-2,d=h+n.xAxis.itemCount+4,p=-n._scrollDistance_-2*l+n.area[3],g=p+(n.xAxis.itemCount+4)*l),(o.average.show||t)&&t.forEach((function(e,t){var o,s,u;o=[].concat(n.chartData.yAxisData.ranges[e.index]),s=o.pop(),u=o.shift();for(var f=e.data,h=he(f,s,u,c,l,n,r,a),d=K(h,e),v=0;vp&&(i.moveTo(b.x,b.y),m=1),_>0&&b.x>p&&b.xh&&m0?(i.setStrokeStyle(o.color.upLine),i.setFillStyle(o.color.upFill),i.setLineWidth(1*n.pix),i.moveTo(x[3].x,x[3].y),i.lineTo(x[1].x,x[1].y),i.lineTo(x[1].x-l/4,x[1].y),i.lineTo(x[0].x-l/4,x[0].y),i.lineTo(x[0].x,x[0].y),i.lineTo(x[2].x,x[2].y),i.lineTo(x[0].x,x[0].y),i.lineTo(x[0].x+l/4,x[0].y),i.lineTo(x[1].x+l/4,x[1].y),i.lineTo(x[1].x,x[1].y),i.moveTo(x[3].x,x[3].y)):(i.setStrokeStyle(o.color.downLine),i.setFillStyle(o.color.downFill),i.setLineWidth(1*n.pix),i.moveTo(x[3].x,x[3].y),i.lineTo(x[0].x,x[0].y),i.lineTo(x[0].x-l/4,x[0].y),i.lineTo(x[1].x-l/4,x[1].y),i.lineTo(x[1].x,x[1].y),i.lineTo(x[2].x,x[2].y),i.lineTo(x[1].x,x[1].y),i.lineTo(x[1].x+l/4,x[1].y),i.lineTo(x[0].x+l/4,x[0].y),i.lineTo(x[0].x,x[0].y),i.moveTo(x[3].x,x[3].y)),i.closePath(),i.fill(),i.stroke()}})),i.restore(),{xAxisPoints:c,calPoints:f,eachSpacing:l}}function Ee(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},t.extra.area),o=t.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,l=t.height-t.area[2],f=[];r.save();var h=0,p=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),h=-t._scrollDistance_-2*c+t.area[3],p=h+(t.xAxis.itemCount+4)*c),e.forEach((function(e,o){var u,g,v;u=[].concat(t.chartData.yAxisData.ranges[e.index]),g=u.pop(),v=u.shift();var y=e.data,m=he(y,g,v,s,c,t,n,i);f.push(m);for(var _=K(m,e),b=0;b<_.length;b++){var w=_[b];if(r.beginPath(),r.setStrokeStyle(d(e.color,a.opacity)),a.gradient){var A=r.createLinearGradient(0,t.area[0],0,t.height-t.area[2]);A.addColorStop("0",d(e.color,a.opacity)),A.addColorStop("1.0",d("#FFFFFF",.1)),r.setFillStyle(A)}else r.setFillStyle(d(e.color,a.opacity));if(r.setLineWidth(a.width*t.pix),w.length>1){var S=w[0],k=w[w.length-1];r.moveTo(S.x,S.y);var T=0;if("curve"===a.type)for(var P=0;Ph&&(r.moveTo(C.x,C.y),T=1),P>0&&C.x>h&&C.xh&&(r.moveTo(D.x,D.y),T=1),L>0&&D.x>h&&D.xh&&(r.moveTo(I.x,I.y),T=1),E>0&&I.x>h&&I.xh&&(r.moveTo(R.x,R.y),$=1),j>0&&R.x>h&&R.xh&&(r.moveTo(z.x,z.y),$=1),N>0&&z.x>h&&z.xh&&(r.moveTo(W.x,W.y),$=1),B>0&&W.x>h&&W.x4&&void 0!==arguments[4]?arguments[4]:1,a=(u({},{type:"circle"},t.extra.scatter),t.chartData.xAxisData),o=a.xAxisPoints,s=a.eachSpacing,c=[];r.save();var l=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),l=-t._scrollDistance_-2*s+t.area[3],l+(t.xAxis.itemCount+4)*s),e.forEach((function(e,a){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var f=e.data,h=he(f,l,u,o,s,t,n,i);r.beginPath(),r.setStrokeStyle(e.color),r.setFillStyle(e.color),r.setLineWidth(1*t.pix);var d=e.pointShape;if("diamond"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y),r.lineTo(e.x,e.y+4.5),r.lineTo(e.x+4.5,e.y),r.lineTo(e.x,e.y-4.5))}));else if("circle"===d)h.forEach((function(e,n){null!==e&&(r.moveTo(e.x+2.5*t.pix,e.y),r.arc(e.x,e.y,3*t.pix,0,2*Math.PI,!1))}));else if("square"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x-3.5,e.y-3.5),r.rect(e.x-3.5,e.y-3.5,7,7))}));else if("triangle"===d)h.forEach((function(e,t){null!==e&&(r.moveTo(e.x,e.y-4.5),r.lineTo(e.x-4.5,e.y+4.5),r.lineTo(e.x+4.5,e.y+4.5),r.lineTo(e.x,e.y-4.5))}));else if("triangle"===d)return;r.closePath(),r.fill(),r.stroke()})),!1!==t.dataLabel&&1===i&&e.forEach((function(e,a){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var f=e.data,h=he(f,l,u,o,s,t,n,i);be(h,e,n,r,t)})),r.restore(),{xAxisPoints:o,calPoints:c,eachSpacing:s}}function Me(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{opacity:1,border:2},t.extra.bubble),o=t.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,l=[];r.save();var f=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),f=-t._scrollDistance_-2*c+t.area[3],f+(t.xAxis.itemCount+4)*c),e.forEach((function(o,l){var u,f,h;u=[].concat(t.chartData.yAxisData.ranges[o.index]),f=u.pop(),h=u.shift();var p=o.data,g=he(p,f,h,s,c,t,n,i);r.beginPath(),r.setStrokeStyle(o.color),r.setLineWidth(a.border*t.pix),r.setFillStyle(d(o.color,a.opacity)),g.forEach((function(e,n){r.moveTo(e.x+e.r,e.y),r.arc(e.x,e.y,e.r*t.pix,0,2*Math.PI,!1)})),r.closePath(),r.fill(),r.stroke(),!1!==t.dataLabel&&1===i&&g.forEach((function(i,a){r.beginPath();var o=e.textSize*t.pix||n.fontSize;r.setFontSize(o),r.setFillStyle(e.textColor||"#FFFFFF"),r.setTextAlign("center"),r.fillText(String(i.t),i.x,i.y+o/2),r.closePath(),r.stroke(),r.setTextAlign("left")}))})),r.restore(),{xAxisPoints:s,calPoints:l,eachSpacing:c}}function Fe(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{type:"straight",width:2},t.extra.line);a.width*=t.pix;var o=t.chartData.xAxisData,s=o.xAxisPoints,c=o.eachSpacing,l=[];r.save();var f=0,h=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),f=-t._scrollDistance_-2*c+t.area[3],h=f+(t.xAxis.itemCount+4)*c),e.forEach((function(e,o){var u,d,p;u=[].concat(t.chartData.yAxisData.ranges[e.index]),d=u.pop(),p=u.shift();var g=e.data,v=he(g,d,p,s,c,t,n,i);l.push(v);var y=K(v,e);if("dash"==e.lineType){var m=e.dashLength?e.dashLength:8;m*=t.pix,r.setLineDash([m,m])}r.beginPath(),r.setStrokeStyle(e.color),r.setLineWidth(a.width),y.forEach((function(e,t){if(1===e.length)r.moveTo(e[0].x,e[0].y),r.arc(e[0].x,e[0].y,1,0,2*Math.PI);else{r.moveTo(e[0].x,e[0].y);var n=0;if("curve"===a.type)for(var i=0;if&&(r.moveTo(o.x,o.y),n=1),i>0&&o.x>f&&o.xf&&(r.moveTo(l.x,l.y),n=1),c>0&&l.x>f&&l.xf&&(r.moveTo(d.x,d.y),n=1),u>0&&d.x>f&&d.x4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{width:l/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mix.column),s=t.chartData.xAxisData,c=s.xAxisPoints,l=s.eachSpacing,f=t.height-t.area[2],h=[],p=0,g=0;e.forEach((function(e,t){"column"==e.type&&(g+=1)})),i.save();var v=-2,y=c.length+2,m=0,_=t.width+l;if(t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),v=Math.floor(-t._scrollDistance_/l)-2,y=v+t.xAxis.itemCount+4,m=-t._scrollDistance_-2*l+t.area[3],_=m+(t.xAxis.itemCount+4)*l),o.customColor=S(o.linearType,o.customColor,e,n),e.forEach((function(e,s){var u,b,w;u=[].concat(t.chartData.yAxisData.ranges[e.index]),b=u.pop(),w=u.shift();var A=e.data,S=he(A,b,w,c,l,t,n,a);if(h.push(S),"column"==e.type){S=se(S,l,g,p,n,t);for(var k=0;kv&&kM&&($=M,R=0,j=M,U=0),$+R>I/2&&($=I/2,R=0,j=I/2,U=0),$=$<0?0:$,j=j<0?0:j,R=R<0?0:R,U=U<0?0:U,i.arc(D+$,E+$,$,-Math.PI,-Math.PI/2),i.arc(D+I-j,E+j,j,-Math.PI/2,0),i.arc(D+I-R,E+M-R,R,0,Math.PI/2),i.arc(D+U,E+M-U,U,Math.PI/2,Math.PI)}else i.moveTo(P,T.y),i.lineTo(P+T.width-2,T.y),i.lineTo(P+T.width-2,t.height-t.area[2]),i.lineTo(P,t.height-t.area[2]),i.lineTo(P,T.y),i.setLineWidth(1),i.setStrokeStyle(O);i.setFillStyle(C),i.closePath(),i.fill()}}p+=1}if("area"==e.type)for(var N=K(S,e),z=0;z1){var W=B[0],q=B[B.length-1];i.moveTo(W.x,W.y);var H=0;if("curve"===e.style)for(var G=0;Gm&&(i.moveTo(V.x,V.y),H=1),G>0&&V.x>m&&V.x<_){var X=x(B,G-1);i.bezierCurveTo(X.ctrA.x,X.ctrA.y,X.ctrB.x,X.ctrB.y,V.x,V.y)}}else for(var J=0;Jm&&(i.moveTo(Y.x,Y.y),H=1),J>0&&Y.x>m&&Y.x<_&&i.lineTo(Y.x,Y.y)}i.lineTo(q.x,f),i.lineTo(W.x,f),i.lineTo(W.x,W.y)}else{var Z=B[0];i.moveTo(Z.x-l/2,Z.y),i.lineTo(Z.x+l/2,Z.y),i.lineTo(Z.x+l/2,f),i.lineTo(Z.x-l/2,f),i.moveTo(Z.x-l/2,Z.y)}i.closePath(),i.fill()}if("line"==e.type){var Q=K(S,e);Q.forEach((function(n,r){if("dash"==e.lineType){var a=e.dashLength?e.dashLength:8;a*=t.pix,i.setLineDash([a,a])}if(i.beginPath(),i.setStrokeStyle(e.color),i.setLineWidth(2*t.pix),1===n.length)i.moveTo(n[0].x,n[0].y),i.arc(n[0].x,n[0].y,1,0,2*Math.PI);else{i.moveTo(n[0].x,n[0].y);var o=0;if("curve"==e.style)for(var s=0;sm&&(i.moveTo(c.x,c.y),o=1),s>0&&c.x>m&&c.x<_){var l=x(n,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;um&&(i.moveTo(f.x,f.y),o=1),u>0&&f.x>m&&f.x<_&&i.lineTo(f.x,f.y)}i.moveTo(n[0].x,n[0].y)}i.stroke(),i.setLineDash([])}))}"point"==e.type&&(e.addPoint=!0),1==e.addPoint&&"column"!==e.type&&xe(S,e.color,e.pointShape,i,t)})),!1!==t.dataLabel&&1===a){p=0;e.forEach((function(e,r){var o,s,u;o=[].concat(t.chartData.yAxisData.ranges[e.index]),s=o.pop(),u=o.shift();var f=e.data,h=he(f,s,u,c,l,t,n,a);"column"!==e.type?be(h,e,n,i,t):(h=se(h,l,g,p,n,t),be(h,e,n,i,t),p+=1)}))}return i.restore(),{xAxisPoints:c,calPoints:h,eachSpacing:l}}function je(e,t,n,r,i,a){var o=e.extra.tooltip||{};o.horizentalLine&&e.tooltip&&1===r&&("line"==e.type||"area"==e.type||"column"==e.type||"candle"==e.type||"mix"==e.type)&&Pe(e,t,n,i,a),n.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&n.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===r&&Oe(e.tooltip.textList,e.tooltip.offset,e,t,n,i,a),n.restore()}function Re(e,t,n,r){var i=t.chartData.xAxisData,a=i.xAxisPoints,o=i.startX,s=i.endX,c=i.eachSpacing,l="center";"line"!=t.type&&"area"!=t.type&&"scatter"!=t.type&&"bubble"!=t.type||(l=t.xAxis.boundaryGap);var u=t.height-t.area[2],f=t.area[0];if(t.enableScroll&&t.xAxis.scrollShow){var h=t.height-t.area[2]+n.xAxisHeight,d=s-o,p=c*(a.length-1),g=d*d/p,v=0;t._scrollDistance_&&(v=-t._scrollDistance_*d/p),r.beginPath(),r.setLineCap("round"),r.setLineWidth(6*t.pix),r.setStrokeStyle(t.xAxis.scrollBackgroundColor||"#EFEBEF"),r.moveTo(o,h),r.lineTo(s,h),r.stroke(),r.closePath(),r.beginPath(),r.setLineCap("round"),r.setLineWidth(6*t.pix),r.setStrokeStyle(t.xAxis.scrollColor||"#A6A6A6"),r.moveTo(o+v,h),r.lineTo(o+v+g,h),r.stroke(),r.closePath(),r.setLineCap("butt")}if(r.save(),t._scrollDistance_&&0!==t._scrollDistance_&&r.translate(t._scrollDistance_,0),!0===t.xAxis.calibration&&(r.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),r.setLineCap("butt"),r.setLineWidth(1*t.pix),a.forEach((function(e,n){n>0&&(r.beginPath(),r.moveTo(e-c/2,u),r.lineTo(e-c/2,u+3*t.pix),r.closePath(),r.stroke())}))),!0!==t.xAxis.disableGrid&&(r.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),r.setLineCap("butt"),r.setLineWidth(1*t.pix),"dash"==t.xAxis.gridType&&r.setLineDash([t.xAxis.dashLength*t.pix,t.xAxis.dashLength*t.pix]),t.xAxis.gridEval=t.xAxis.gridEval||1,a.forEach((function(e,n){n%t.xAxis.gridEval==0&&(r.beginPath(),r.moveTo(e,u),r.lineTo(e,f),r.stroke())})),r.setLineDash([])),!0!==t.xAxis.disabled){var y=e.length;t.xAxis.labelCount&&(y=t.xAxis.itemCount?Math.ceil(e.length/t.xAxis.itemCount*t.xAxis.labelCount):t.xAxis.labelCount,y-=1);for(var x=Math.ceil(e.length/y),_=[],b=e.length,w=0;w4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==t.type?t.extra.pie:t.extra.ring),o={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2};0==n.pieChartLinePadding&&(n.pieChartLinePadding=a.activeRadius*t.pix);var s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);a.customRadius>0&&(s=a.customRadius*t.pix),e=ee(e,s,i);var c=a.activeRadius*t.pix;if(a.customColor=S(a.linearType,a.customColor,e,n),e=e.map((function(e){return e._start_+=a.offsetAngle*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(r.beginPath(),r.setFillStyle(d(e.color,a.activeOpacity||.5)),r.moveTo(o.x,o.y),r.arc(o.x,o.y,e._radius_+c,e._start_,e._start_+2*e._proportion_*Math.PI),r.closePath(),r.fill()),r.beginPath(),r.setLineWidth(a.borderWidth*t.pix),r.lineJoin="round",r.setStrokeStyle(a.borderColor);var i,s=e.color;"custom"==a.linearType&&(i=r.createCircularGradient?r.createCircularGradient(o.x,o.y,e._radius_):r.createRadialGradient(o.x,o.y,0,o.x,o.y,e._radius_),i.addColorStop(0,d(a.customColor[e.linearIndex],1)),i.addColorStop(1,d(e.color,1)),s=i);r.setFillStyle(s),r.moveTo(o.x,o.y),r.arc(o.x,o.y,e._radius_,e._start_,e._start_+2*e._proportion_*Math.PI),r.closePath(),r.fill(),1==a.border&&r.stroke()})),"ring"===t.type){var l=.6*s;"number"===typeof a.ringWidth&&a.ringWidth>0&&(l=Math.max(0,s-a.ringWidth*t.pix)),r.beginPath(),r.setFillStyle(a.centerColor),r.moveTo(o.x,o.y),r.arc(o.x,o.y,l,0,2*Math.PI),r.closePath(),r.fill()}if(!1!==t.dataLabel&&1===i){for(var f=!1,h=0,p=e.length;h0){f=!0;break}f&&Se(e,t,n,r,s,o)}return 1===i&&"ring"===t.type&&_e(t,n,r,o),{center:o,radius:s,series:e}}function We(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},t.extra.rose);0==n.pieChartLinePadding&&(n.pieChartLinePadding=a.activeRadius*t.pix);var o={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding),c=a.minRadius||.5*s;e=ne(e,a.type,c,s,i);var l=a.activeRadius*t.pix;if(a.customColor=S(a.linearType,a.customColor,e,n),e=e.map((function(e){return e._start_+=(a.offsetAngle||0)*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(r.beginPath(),r.setFillStyle(d(e.color,a.activeOpacity||.5)),r.moveTo(o.x,o.y),r.arc(o.x,o.y,l+e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),r.closePath(),r.fill()),r.beginPath(),r.setLineWidth(a.borderWidth*t.pix),r.lineJoin="round",r.setStrokeStyle(a.borderColor);var i,s=e.color;"custom"==a.linearType&&(i=r.createCircularGradient?r.createCircularGradient(o.x,o.y,e._radius_):r.createRadialGradient(o.x,o.y,0,o.x,o.y,e._radius_),i.addColorStop(0,d(a.customColor[e.linearIndex],1)),i.addColorStop(1,d(e.color,1)),s=i);r.setFillStyle(s),r.moveTo(o.x,o.y),r.arc(o.x,o.y,e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),r.closePath(),r.fill(),1==a.border&&r.stroke()})),!1!==t.dataLabel&&1===i){for(var f=!1,h=0,p=e.length;h0){f=!0;break}f&&Se(e,t,n,r,s,o)}return{center:o,radius:s,series:e}}function qe(e,t,n,r){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=u({},{startAngle:.75,endAngle:.25,type:"default",width:12,gap:2,linearType:"none",customColor:[]},t.extra.arcbar);e=re(e,s,o),i=s.centerX||s.centerY?{x:s.centerX?s.centerX:t.width/2,y:s.centerY?s.centerY:t.height/2}:{x:t.width/2,y:t.height/2},s.radius?a=s.radius:(a=Math.min(i.x,i.y),a-=5*t.pix,a-=s.width/2),s.customColor=S(s.linearType,s.customColor,e,n);for(var c=0;c5&&void 0!==arguments[5]?arguments[5]:1,o=u({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},n.extra.gauge);void 0==o.oldAngle&&(o.oldAngle=o.startAngle),void 0==o.oldData&&(o.oldData=0),e=ie(e,o.startAngle,o.endAngle);var s={x:n.width/2,y:n.height/2},c=Math.min(s.x,s.y);c-=5*n.pix,c-=o.width/2;var l=c-o.width,f=0;if("progress"==o.type){var h=c-3*o.width;i.beginPath();var p=i.createLinearGradient(s.x,s.y-h,s.x,s.y+h);p.addColorStop("0",d(t[0].color,.3)),p.addColorStop("1.0",d("#FFFFFF",.1)),i.setFillStyle(p),i.arc(s.x,s.y,h,0,2*Math.PI,!1),i.fill(),i.setLineWidth(o.width),i.setStrokeStyle(d(t[0].color,.3)),i.setLineCap("round"),i.beginPath(),i.arc(s.x,s.y,l,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 m=o.splitLine.splitNumber*o.splitLine.childNumber+1,x=t[0].data*a,_=0;__/m?i.setStrokeStyle(d(t[0].color,1)):i.setStrokeStyle(d(t[0].color,.3)),i.setLineWidth(3*n.pix),i.moveTo(v,0),i.lineTo(y,0),i.stroke(),i.rotate(g*Math.PI);i.restore(),t=re(t,o,a),i.setLineWidth(o.width),i.setStrokeStyle(t[0].color),i.setLineCap("round"),i.beginPath(),i.arc(s.x,s.y,l,o.startAngle*Math.PI,t[0]._proportion_*Math.PI,!1),i.stroke();var b=c-2.5*o.width;i.save(),i.translate(s.x,s.y),i.rotate((t[0]._proportion_-1)*Math.PI),i.beginPath(),i.setLineWidth(o.width/3);var w=i.createLinearGradient(0,.6*-b,0,.6*b);w.addColorStop("0",d("#FFFFFF",0)),w.addColorStop("0.5",d(t[0].color,1)),w.addColorStop("1.0",d("#FFFFFF",0)),i.setStrokeStyle(w),i.arc(0,0,b,.85*Math.PI,1.15*Math.PI,!1),i.stroke(),i.beginPath(),i.setLineWidth(1),i.setStrokeStyle(t[0].color),i.setFillStyle(t[0].color),i.moveTo(-b-o.width/3/2,-4),i.lineTo(-b-o.width/3/2-4,0),i.lineTo(-b-o.width/3/2,4),i.lineTo(-b-o.width/3/2,-4),i.stroke(),i.fill(),i.restore()}else{i.setLineWidth(o.width),i.setLineCap("butt");for(var A=0;A4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{gridColor:"#cccccc",gridType:"radar",opacity:.2,gridCount:3,border:!1,borderWidth:2},t.extra.radar),o=E(t.categories.length),s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},c=(t.width-t.area[1]-t.area[3])/2,l=(t.height-t.area[0]-t.area[2])/2,f=Math.min(c-(D(t.categories,n.fontSize,r)+n.radarLabelTextMargin),l-n.radarLabelTextMargin);f-=n.radarLabelTextMargin*t.pix,r.beginPath(),r.setLineWidth(1*t.pix),r.setStrokeStyle(a.gridColor),o.forEach((function(e){var t=_(f*Math.cos(e),f*Math.sin(e),s);r.moveTo(s.x,s.y),r.lineTo(t.x,t.y)})),r.stroke(),r.closePath();for(var h=function(e){var n={};if(r.beginPath(),r.setLineWidth(1*t.pix),r.setStrokeStyle(a.gridColor),"radar"==a.gridType)o.forEach((function(t,i){var o=_(f/a.gridCount*e*Math.cos(t),f/a.gridCount*e*Math.sin(t),s);0===i?(n=o,r.moveTo(o.x,o.y)):r.lineTo(o.x,o.y)})),r.lineTo(n.x,n.y);else{var i=_(f/a.gridCount*e*Math.cos(1.5),f/a.gridCount*e*Math.sin(1.5),s);r.arc(s.x,s.y,s.y-i.y,0,2*Math.PI,!1)}r.stroke(),r.closePath()},p=1;p<=a.gridCount;p++)h(p);var g=Q(o,s,f,e,t,i);return g.forEach((function(e,n){if(r.beginPath(),r.setLineWidth(a.borderWidth*t.pix),r.setStrokeStyle(e.color),r.setFillStyle(d(e.color,a.opacity)),e.data.forEach((function(e,t){0===t?r.moveTo(e.position.x,e.position.y):r.lineTo(e.position.x,e.position.y)})),r.closePath(),r.fill(),!0===a.border&&r.stroke(),r.closePath(),!1!==t.dataPointShape){var i=e.data.map((function(e){return e.position}));xe(i,e.color,e.pointShape,r,t)}})),Ae(o,f,s,t,n,r),{center:s,radius:f,angleList:o}}function Ve(e,t,n){n=0==n?1:n;for(var r=[],i=0;it[a].area[2]||e[1]>t[a].area[3]||e[2]n||e[3]>r){i=!0;break}i=!1}return i}function Xe(e){var t,n={};n.xMin=180,n.xMax=0,n.yMin=90,n.yMax=0;for(var r=0;rl.x?n.xMax:l.x,n.yMin=n.yMinl.y?n.yMax:l.y}}return n}function Je(e,t,n,r,i,a){return{x:(t-n.xMin)*r+i,y:(n.yMax-e)*r+a}}function Ye(e,t,n,r,i,a){return{x:(t-i)/r+n.xMin,y:n.yMax-(e-a)/r}}function Ze(e,t,n){if(t[1]==n[1])return!1;if(t[1]>e[1]&&n[1]>e[1])return!1;if(t[1]e[1])return!1;if(n[1]==e[1]&&t[1]>e[1])return!1;if(t[0].7},p=0;p4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{type:"normal",autoColors:!0},t.extra.word);t.chartData.wordCloudData||(t.chartData.wordCloudData=tt(t,a.type,r)),r.beginPath(),r.setFillStyle(t.background),r.rect(0,0,t.width,t.height),r.fill(),r.save();var o=t.chartData.wordCloudData;r.translate(t.width/2,t.height/2);for(var s=0;s0&&(t.tooltip&&t.tooltip.index==s?r.strokeText(c,(o[s].areav[0]+5-t.width/2)*i-f*(1-i)/2,(o[s].areav[1]+5+l-t.height/2)*i):r.fillText(c,(o[s].areav[0]+5-t.width/2)*i-f*(1-i)/2,(o[s].areav[1]+5+l-t.height/2)*i)):o[s].area[0]>0&&(t.tooltip&&t.tooltip.index==s?r.strokeText(c,(o[s].area[0]+5-t.width/2)*i-f*(1-i)/2,(o[s].area[1]+5+l-t.height/2)*i):r.fillText(c,(o[s].area[0]+5-t.width/2)*i-f*(1-i)/2,(o[s].area[1]+5+l-t.height/2)*i)),r.stroke(),r.restore()}r.restore()}function rt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=u({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right",linearType:"none",customColor:[]},t.extra.funnel),o=(t.height-t.area[0]-t.area[2])/e.length,s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.height-t.area[2]},c=a.activeWidth*t.pix,l=Math.min((t.width-t.area[1]-t.area[3])/2-c,(t.height-t.area[0]-t.area[2])/2-c);if(e=te(e,l,a.type,o,i),r.save(),r.translate(s.x,s.y),a.customColor=S(a.linearType,a.customColor,e,n),"pyramid"==a.type)for(var f=0;f0?y[S].width+t.yAxis.padding*t.pix:y[S].width,b+=1):(t.area[1]+=_>0?y[S].width+t.yAxis.padding*t.pix:y[S].width,_+=1)}else n.yAxisWidth=y;if(t.chartData.yAxisData=v,t.categories&&t.categories.length&&"radar"!==t.type&&"gauge"!==t.type){t.chartData.xAxisData=ue(t.categories,t,n);var k=J(t.categories,t,n,t.chartData.xAxisData.eachSpacing,r),T=k.xAxisHeight,P=k.angle;n.xAxisHeight=T,n._xAxisTextAngle_=P,t.area[2]+=T,t.chartData.categoriesData=k}else if("line"===t.type||"area"===t.type||"scatter"===t.type||"bubble"===t.type){t.chartData.xAxisData=Z(a,t,n,r),o=t.chartData.xAxisData.rangesFormat;var C=J(o,t,n,t.chartData.xAxisData.eachSpacing,r),O=C.xAxisHeight,L=C.angle;n.xAxisHeight=O,n._xAxisTextAngle_=L,t.area[2]+=O,t.chartData.categoriesData=C}else t.chartData.xAxisData={xAxisPoints:[]};if(t.enableScroll&&"right"==t.xAxis.scrollAlign&&void 0===t._scrollDistance_){var D=0,E=t.chartData.xAxisData.xAxisPoints,I=t.chartData.xAxisData.startX,M=t.chartData.xAxisData.endX,F=t.chartData.xAxisData.eachSpacing,j=F*(E.length-1),R=M-I;D=R-j,i.scrollOption={currentOffset:D,startTouchX:D,distance:0,lastMoveTime:0},t._scrollDistance_=D}switch("pie"!==e&&"ring"!==e&&"rose"!==e||(n._pieTextMaxLength_=!1===t.dataLabel?0:oe(c,n,r,t)),e){case"word":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),nt(a,t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"map":r.clearRect(0,0,t.width,t.height),et(a,t,n,r);break;case"funnel":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.funnelData=rt(a,t,n,r,e),ze(t.series,t,n,r,t.chartData),je(t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=Fe(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=Ie(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=Me(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=$e(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=Le(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=Ee(a,t,n,r,e),s=i.xAxisPoints,c=i.calPoints,l=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(t.series,t,n,r,t.chartData),je(t,n,r,e,l,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"ring":case"pie":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.pieData=Be(a,t,n,r,e),ze(t.series,t,n,r,t.chartData),je(t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.pieData=We(a,t,n,r,e),ze(t.series,t,n,r,t.chartData),je(t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.radarData=Ge(a,t,n,r,e),ze(t.series,t,n,r,t.chartData),je(t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.arcbarData=qe(a,t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),t.chartData.gaugeData=He(o,a,t,n,r,e),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new st({timing:t.timing,duration:s,onProcess:function(e){r.clearRect(0,0,t.width,t.height),t.rotate&&me(r,t),Ue(o,t,n,r),Re(o,t,n,r);var i=De(a,c,t,n,r,e),s=i.xAxisPoints,l=i.calPoints,u=i.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=l,t.chartData.eachSpacing=u,Ne(a,t,n,r),!1!==t.enableMarkLine&&1===e&&Te(t,n,r),ze(c||t.series,t,n,r,t.chartData),je(t,n,r,e,u,s),at(t,r)},onAnimationFinish:function(){i.uevent.trigger("renderComplete")}});break}}function lt(){this.events={}}st.prototype.stop=function(){this.isStop=!0},lt.prototype.addEventListener=function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},lt.prototype.delEventListener=function(e){this.events[e]=[]},lt.prototype.trigger=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.opts=u({},this.opts,e),this.opts.updateData=!0;var t=e.scrollPosition||"current";switch(t){case"current":break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var n=ge(this.opts.series,this.opts,this.config,this.context),r=n.yAxisWidth;this.config.yAxisWidth=r;var i=0,a=ue(this.opts.categories,this.opts,this.config),o=a.xAxisPoints,s=a.startX,c=a.endX,l=a.eachSpacing,f=l*(o.length-1),h=c-s;i=h-f,this.scrollOption={currentOffset:i,startTouchX:i,distance:0,lastMoveTime:0},this.opts._scrollDistance_=i;break}ct.call(this,this.opts.type,this.opts,this.config,this.context)},ut.prototype.zoom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var t=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var n=ge(this.opts.series,this.opts,this.config,this.context),r=n.yAxisWidth;this.config.yAxisWidth=r;var i=0,a=ue(this.opts.categories,this.opts,this.config),o=a.xAxisPoints,s=a.startX,c=a.endX,l=a.eachSpacing,u=l*t,f=c-s,h=f-l*(o.length-1);i=f/2-u,i>0&&(i=0),i1&&void 0!==arguments[1]?arguments[1]:{},n=null;if(n=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],n){O(n,this.opts,e);var r=this.getLegendDataIndex(e);r>=0&&("candle"==this.opts.type?this.opts.seriesMA[r].show=!this.opts.seriesMA[r].show:this.opts.series[r].show=!this.opts.series[r].show,this.opts.animation=!!t.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,ct.call(this,this.opts.type,this.opts,this.config,this.context))}},ut.prototype.showToolTip=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;r=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],r||console.log("[uCharts] 未获取到event坐标信息");var i=O(r,this.opts,e),a=this.scrollOption.currentOffset,o=u({},this.opts,{_scrollDistance_:a,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type||"scatter"===this.opts.type||"bubble"===this.opts.type){var s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1||c.length>0){var l=L(this.opts.series,c,s.group);if(0!==l.length){var f=I(l,this.opts,c,s.group,this.opts.categories,n),h=f.textList,d=f.offset;d.y=i.y,o.tooltip={textList:void 0!==n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}}ct.call(this,o.type,o,this.config,this.context)}if("mix"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){a=this.scrollOption.currentOffset,o=u({},this.opts,{_scrollDistance_:a,animation:!1}),l=L(this.opts.series,c);if(0!==l.length){var p=M(l,this.opts,c,this.opts.categories,n);h=p.textList,d=p.offset;d.y=i.y,o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}}ct.call(this,o.type,o,this.config,this.context)}if("candle"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){a=this.scrollOption.currentOffset,o=u({},this.opts,{_scrollDistance_:a,animation:!1}),l=L(this.opts.series,c);if(0!==l.length){f=F(this.opts.series[0].data,l,this.opts,c,this.opts.categories,this.opts.extra.candle,n),h=f.textList,d=f.offset;d.y=i.y,o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}}ct.call(this,o.type,o,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){o=u({},this.opts,{animation:!1}),l=u({},o._series_[c]),h=[{text:n.formatter?n.formatter(l,void 0,c,o):l.name+": "+l.data,color:l.color}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}ct.call(this,o.type,o,this.config,this.context)}if("map"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){o=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]);l.name=l.properties.name;h=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}o.updateData=!1,ct.call(this,o.type,o,this.config,this.context)}if("word"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){o=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]),h=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}o.updateData=!1,ct.call(this,o.type,o,this.config,this.context)}if("radar"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){o=u({},this.opts,{animation:!1}),l=L(this.opts.series,c);if(0!==l.length){h=l.map((function(e){return{text:n.formatter?n.formatter(e,t.opts.categories[c],c,t.opts):e.name+": "+e.data,color:e.color}})),d={x:i.x,y:i.y};o.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:d,option:n,index:c}}}ct.call(this,o.type,o,this.config,this.context)}},ut.prototype.translate=function(e){this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0};var t=u({},this.opts,{_scrollDistance_:e,animation:!1});ct.call(this,this.opts.type,t,this.config,this.context)},ut.prototype.scrollStart=function(e){var t=null;t=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0];var n=O(t,this.opts,e);t&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=n.x)},ut.prototype.scroll=function(e){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var t=this.opts.touchMoveLimit||60,n=Date.now(),r=n-this.scrollOption.lastMoveTime;if(!(r=0,a=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n("96cf"),i)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(o){r.regeneratorRuntime=void 0}},c447:function(e,t,n){},c465:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,i=/^<\/([-A-Za-z0-9_]+)[^>]*>/,a=/([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function o(e){for(var t={},n=e.split(","),r=0;r=0;r-=1)if(p[r]===n)break}else r=0;if(r>=0){for(var i=p.length-1;i>=r;i-=1)t.end&&t.end(p[i]);p.length=r}}function v(e,n,r,i){if(n=n.toLowerCase(),c[n])while(p.last()&&l[p.last()])g("",p.last());if(u[n]&&p.last()===n&&g("",n),i=s[n]||!!i,i||p.push(n),t.start){var o=[];r.replace(a,(function(e,t){var n=arguments[2]||arguments[3]||arguments[4]||(f[t]?t:"");o.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})})),t.start&&t.start(n,o,i)}}p.last=function(){return p[p.length-1]};while(e){if(o=!0,0===e.indexOf("9?r:"0"+r,i=i>9?i:"0"+i,"tow"===e?(n-=2,"".concat(n,"-").concat(r,"-").concat(i)):"start"===e?(n=n,"".concat(n,"-").concat(r,"-").concat(i)):"end"===e?(n+=60,"".concat(n,"-").concat(r,"-").concat(i)):"m"==e?"01"==r||"03"==r||"05"==r||"07"==r||"08"==r||"10"==r||"12"==r?n+"/"+r+"/01~"+n+"/"+r+"/31":"02"==r?n%4==0&&n%100!=0||n%100==0&&n%400==0?n+"/"+r+"/01~"+n+"/"+r+"/29":n+"/"+r+"/01~"+n+"/"+r+"/28":n+"/"+r+"/01~"+n+"/"+r+"/30":void 0}function d(e){var t=new Date;t.setDate(t.getDate()+e);var n=t.getFullYear(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,i=t.getDate()<10?"0"+t.getDate():t.getDate();return n+"-"+r+"-"+i}function p(){var e=new Date,t=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"月"+(e.getDate()<10?"0"+e.getDate():e.getDate()+"日");return t}function g(e){var t=e.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})/);if(null==t)return!1;var n=new Date(t[1],t[3]-1,t[4]),r="输入的日期格式错误!";if(n.getFullYear()==t[1]&&n.getMonth()+1==t[3]&&n.getDate()==t[4]){var i=new Date,a=i.getFullYear(),o=i.getMonth()+1,s=i.getDate(),c=[1,3,5,7,8,10,12],l=o-1>0?o-1:12,u=!1,f=0;(a%4===0&&a%100!==0||a%400===0)&&(u=!0),f=c.indexOf(l)>-1?31:2===l?u?29:28:30;var h=a-parseInt(t[1]),d=o-parseInt(t[3]),p=s-parseInt(t[4]);p<0&&(p+=f,d--),d<0&&(h--,d+=12),r=h<0?"出生日期有误!":0===h?0===d?p+"天":d+"个月":0===d?h+"岁":h+"岁"+d+"个月"}return r}function v(e,t){var n=new Date(e.substring(0,10)),r=n.getFullYear(),i=n.getMonth()+1;Math.abs(t)>12&&(t%=12),0!=t&&(i+t>12?(r++,i=(i+t)%12):i+t<1?(r--,i=12+i+t):i+=t),i=i<10?"0"+i:i;n.getDate();return"01"==i||"03"==i||"05"==i||"07"==i||"08"==i||"10"==i||"12"==i?r+"/"+i+"/01~"+r+"/"+i+"/31":"02"==i?r%4==0&&r%100!=0||r%100==0&&r%400==0?r+"/"+i+"/01~"+r+"/"+r+"/"+i+"/29":r+"/"+i+"/01~"+r+"/"+i+"/28":r+"/"+i+"/01~"+r+"/"+i+"/30"}function y(t,n){1!=t?4!=t&&16!=t?8!=t?14!=t?21!=t||e.redirectTo({url:"/BLEPages/adult/H09B?deviceId="+n}):e.redirectTo({url:"/BLEPages/adult/F01B?deviceId="+n}):e.redirectTo({url:"/BLEPages/adult/H01pro?deviceId="+n}):e.redirectTo({url:"/BLEPages/adult/PCL01?deviceId="+n}):e.redirectTo({url:"/BLEPages/adult/PCD01pro?deviceId="+n})}t.default=a}).call(this,n("543d")["default"])},f0c5:function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s,c,l){var u,f="function"===typeof e?e.options:e;if(c){f.components||(f.components={});var h=Object.prototype.hasOwnProperty;for(var d in c)h.call(c,d)&&!h.call(f.components,d)&&(f.components[d]=c[d])}if(l&&((l.beforeCreate||(l.beforeCreate=[])).unshift((function(){this[l.__module]=this})),(f.mixins||(f.mixins=[])).push(l)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),a&&(f._scopeId="data-v-"+a),o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},f._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(f.functional){f._injectStyles=u;var p=f.render;f.render=function(e,t){return u.call(t),p(e,t)}}else{var g=f.beforeCreate;f.beforeCreate=g?[].concat(g,u):[u]}return{exports:e,options:f}}n.d(t,"a",(function(){return r}))},faa6:function(e,t,n){}}]);