(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/vendor"],{"0f5e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={appid:"__UNI__5B783AC"};t.default=r},"1da3":function(e){e.exports=JSON.parse('{"uni-goods-nav.options.shop":"店铺","uni-goods-nav.options.cart":"购物车","uni-goods-nav.buttonGroup.addToCart":"加入购物车","uni-goods-nav.buttonGroup.buyNow":"立即购买"}')},"1f23":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={pages:[{path:"pages/index/index",style:{navigationBarTitleText:"首页"}},{path:"pages/my/index",style:{navigationBarTitleText:"个人中心"}},{path:"pages/service/index",style:{navigationBarTitleText:"政务服务"}},{path:"pages/policy/index",style:{navigationBarTitleText:"风采展示",enablePullDownRefresh:!0}},{path:"pages/illness/index",style:{navigationBarTitleText:"核酸检测登记"}},{path:"pages/illness/vaccines",style:{navigationBarTitleText:"疫苗接种点"}},{path:"pages/illness/receive",style:{navigationBarTitleText:"家庭成员"}},{path:"pages/illness/testingRoom",style:{navigationBarTitleText:"检测点查询"}},{path:"pages/illness/testingRoomList",style:{navigationBarTitleText:"检测点列表"}},{path:"pages/details/index",style:{navigationBarTitleText:"文章详情"}},{path:"pages/details/cmsinfo",style:{navigationBarTitleText:"详情",navigationStyle:"custom"}},{path:"pages/notice/index",style:{navigationBarTitleText:"通知公告"}},{path:"pages/user/index",style:{navigationBarTitleText:"个人资料"}},{path:"pages/user/familyInfo",style:{navigationBarTitleText:"成员资料"}},{path:"pages/register/index",style:{navigationBarTitleText:"注册用户"}},{path:"pages/questionnaire/index",style:{navigationBarTitleText:"问卷调查"}},{path:"pages/questionnaire/details",style:{navigationBarTitleText:"问卷调查详情"}},{path:"pages/questionnaire/web",style:{navigationBarTitleText:"问卷调查"}},{path:"pages/integral/index",style:{navigationBarTitleText:"我的积分"}},{path:"pages/activity/index",style:{navigationBarTitleText:"活动列表"}},{path:"pages/activity/details",style:{navigationBarTitleText:"活动详情"}},{path:"pages/activity/uploadFiel",style:{navigationBarTitleText:"获取积分"}},{path:"pages/property/index",style:{navigationBarTitleText:"红色物业"}},{path:"pages/property/butlerType",style:{navigationBarTitleText:"红管家风采展示"}},{path:"pages/property/butler",style:{navigationBarTitleText:"红管家风采展示"}},{path:"pages/report/index",style:{navigationBarTitleText:"下沉干部报到"}},{path:"pages/report/double",style:{navigationBarTitleText:"党员“双报到”"}},{path:"pages/recruit/index",style:{navigationBarTitleText:"应急招募"}},{path:"pages/recruit/details",style:{navigationBarTitleText:"招募详情"}}],globalStyle:{navigationBarTextStyle:"#fff",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#c60814",backgroundColor:"#fff","app-plus":{background:"#efeff4"}},tabBar:{color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",backgroundColor:"#ffffff",list:[{pagePath:"pages/index/index",iconPath:"static/home1.png",selectedIconPath:"static/home2.png",text:"首页"},{pagePath:"pages/service/index",iconPath:"static/service1.png",selectedIconPath:"static/service2.png",text:"政务服务"},{pagePath:"pages/policy/index",iconPath:"static/policy1.png",selectedIconPath:"static/policy2.png",text:"风采展示"},{pagePath:"pages/my/index",iconPath:"static/user1.png",selectedIconPath:"static/user2.png",text:"我的"}]}};t.default=r},3308:function(e){e.exports=JSON.parse('{"uni-load-more.contentdown":"Pull up to show more","uni-load-more.contentrefresh":"loading...","uni-load-more.contentnomore":"No more data"}')},"37dc":function(e,t,n){"use strict";(function(e,n){function r(e,t){return s(e)||c(e,t)||i(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(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);n2&&void 0!==arguments[2]?arguments[2]:h;if(!t)return[e];var r=this._caches[e];return r||(r=y(e,n),this._caches[e]=r),_(r,t)}}]),e}();t.Formatter=v;var g=/^(?:\d)+/,m=/^(?:\w)+/;function y(e,t){var n=r(t,2),a=n[0],i=n[1],o=[],c=0,s="";while(c-1?b:e.indexOf("-hant")>-1||T(e,["-tw","-hk","-mo","-cht"])?w:b;var n=E(e,[x,k,O]);return n||void 0}}var j=function(){function e(t){var n=t.locale,r=t.fallbackLocale,a=t.messages,i=t.watcher,o=t.formater;u(this,e),this.locale=x,this.fallbackLocale=x,this.message={},this.messages={},this.watchers=[],r&&(this.fallbackLocale=r),this.formater=o||P,this.messages=a||{},this.setLocale(n||x),i&&this.watchLocale(i)}return f(e,[{key:"setLocale",value:function(e){var t=this,n=this.locale;this.locale=I(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){A(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=I(t,this.messages),t&&(r=this.messages[t])):n=t,A(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 C(e,t){e.$watchLocale?e.$watchLocale((function(e){t.setLocale(e)})):e.$watch((function(){return e.$locale}),(function(e){t.setLocale(e)}))}function D(){return"undefined"!==typeof e&&e.getLocale?e.getLocale():"undefined"!==typeof n&&n.getLocale?n.getLocale():x}function $(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 a=[t,e];e=a[0],t=a[1]}"string"!==typeof e&&(e=D()),"string"!==typeof n&&(n="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||x);var i=new j({locale:e,fallbackLocale:n,messages:t,watcher:r}),o=function(e,t){if("function"!==typeof getApp)o=function(e,t){return i.t(e,t)};else{var n=!1;o=function(e,t){var r=getApp().$vm;return r&&(r.$locale,n||(n=!0,C(r,i))),i.t(e,t)}}return o(e,t)};return{i18n:i,f:function(e,t,n){return i.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 i.add(e,t,n)},watch:function(e){return i.watchLocale(e)},getLocale:function(){return i.getLocale()},setLocale:function(e){return i.setLocale(e)}}}t.I18n=j;var L,R=function(e){return"string"===typeof e};function N(e,t){return L||(L=new v),H(e,(function(e,n){var r=e[n];return R(r)?!!F(r,t)||void 0:N(r,t)}))}function M(e,t,n){return L||(L=new v),H(e,(function(e,r){var a=e[r];R(a)?F(a,n)&&(e[r]=q(a,t,n)):M(a,t,n)})),e}function U(e,t){var n=t.locale,r=t.locales,a=t.delimiters;if(!F(e,a))return e;L||(L=new v);var i=[];Object.keys(r).forEach((function(e){e!==n&&i.push({locale:e,values:r[e]})})),i.unshift({locale:n,values:r[n]});try{return JSON.stringify(V(JSON.parse(e),i,a),null,2)}catch(o){}return e}function F(e,t){return e.indexOf(t[0])>-1}function q(e,t,n){return L.interpolate(e,t,n).join("")}function B(e,t,n,r){var a=e[t];if(R(a)){if(F(a,r)&&(e[t]=q(a,n[0].values,r),n.length>1)){var i=e[t+"Locales"]={};n.forEach((function(e){i[e.locale]=q(a,e.values,r)}))}}else V(a,n,r)}function V(e,t,n){return H(e,(function(e,r){B(e,r,t,n)})),e}function H(e,t){if(d(e)){for(var n=0;n-1}))):t}}function K(e){var t=[],n=e.split("-");while(n.length)t.push(n.join("-")),n.pop();return t}t.isString=R}).call(this,n("543d")["default"],n("c8ba"))},4055:function(e){e.exports=JSON.parse('{"uni-goods-nav.options.shop":"shop","uni-goods-nav.options.cart":"cart","uni-goods-nav.buttonGroup.addToCart":"add to cart","uni-goods-nav.buttonGroup.buyNow":"buy now"}')},4372:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("4055")),a=o(n("1da3")),i=o(n("b8b2"));function o(e){return e&&e.__esModule?e:{default:e}}var c={en:r.default,"zh-Hans":a.default,"zh-Hant":i.default};t.default=c},"4a58":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("a34a")),a=i(n("a70e"));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r,a,i,o){try{var c=e[i](o),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function c(e){o(i,r,a,c,s,"next",e)}function s(e){o(i,r,a,c,s,"throw",e)}c(void 0)}))}}var s=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.alias,e.next=3,a.default.get({url:"/cms/type/sublist/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=c(r.default.mark((function e(t){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a.default.get({url:"/cms/blog/wx/articleList",data:t});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,a.default.get({url:"/cms/blog/cms/detail/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,a.default.get({url:"/cms/blog/cms/addBlogViews/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),d=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.alias,e.next=3,a.default.get({url:"/cms/type/sublist/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),p={getTypeList:s,getArticleList:u,getArticleDetail:l,addBlogViews:f,getsublist:d};t.default=p},"4e66":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=t.type=t.isRequiredField=t.isBoolean=t.isNumber=t.objGet=t.objSet=t.name2arr=t.rawData=t.isRealName=t.realName=t.getDataValueType=t.getDataValue=t.setDataValue=t.getValue=t.typeFilter=t.deepCopy=void 0;var r=function(e){return JSON.parse(JSON.stringify(e))};t.deepCopy=r;var a=function(e){return"int"===e||"double"===e||"number"===e||"timestamp"===e};t.typeFilter=a;var i=function(e,t,n){var r=n.find((function(e){return e.format&&a(e.format)})),i=n.find((function(e){return e.format&&"boolean"===e.format||"bool"===e.format}));return r&&(t=t||0===t?g(Number(t))?Number(t):t:null),i&&(t=!!m(t)&&t),t};t.getValue=i;var o=function(e,t,n){return t[e]=n,n||""};t.setDataValue=o;var c=function(e,t){return v(t,e)};t.getDataValue=c;var s=function(e,t){var n=c(e,t);return{type:_(n),value:n}};t.getDataValueType=s;var u=function(e){var t=h(e);if("object"===typeof t&&Array.isArray(t)&&t.length>1){var n=t.reduce((function(e,t){return e+"#".concat(t)}),"_formdata_");return n}return t[0]||e};t.realName=u;var l=function(e){var t=/^_formdata_#*/;return t.test(e)};t.isRealName=l;var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e)),n={};for(var r in t){var a=d(r);p(n,a,t[r])}return n};t.rawData=f;var d=function(e){var t=e.replace("_formdata_#","");return t=t.split("#").map((function(e){return g(e)?Number(e):e})),t};t.name2arr=d;var p=function(e,t,n){return"object"!==typeof e||h(t).reduce((function(e,t,r,a){return r===a.length-1?(e[t]=n,null):(t in e||(e[t]=/^[0-9]{1,}$/.test(a[r+1])?[]:{}),e[t])}),e),e};function h(e){return Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,"").split(".")}t.objSet=p;var v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"undefined",r=h(t),a=r.reduce((function(e,t){return(e||{})[t]}),e);return a&&void 0===a?n:a};t.objGet=v;var g=function(e){return!isNaN(Number(e))};t.isNumber=g;var m=function(e){return"boolean"===typeof e};t.isBoolean=m;var y=function(e){for(var t=!1,n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1},e.prototype.uniIDHasPermission=function(e){var t=k(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=k(),t=e.tokenExpired;return t>Date.now()}}r="function"!==typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!w.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,a="",i=0;i>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return a}:atob;var S=Object.prototype.toString,A=Object.prototype.hasOwnProperty;function P(e){return"function"===typeof e}function T(e){return"string"===typeof e}function E(e){return"[object Object]"===S.call(e)}function I(e,t){return A.call(e,t)}function j(){}function C(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var D=/-(\w)/g,$=C((function(e){return e.replace(D,(function(e,t){return t?t.toUpperCase():""}))}));function L(e){var t={};return E(e)&&Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),Object.keys(t)?t:e}var R=["invoke","success","fail","complete","returnValue"],N={},M={};function U(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?F(n):n}function F(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){J(e[n],t).then((function(e){return P(r)&&r(e)||e}))}}})),t}function Y(e,t){var n=[];Array.isArray(N.returnValue)&&n.push.apply(n,h(N.returnValue));var r=M[e];return r&&Array.isArray(r.returnValue)&&n.push.apply(n,h(r.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function X(e){var t=Object.create(null);Object.keys(N).forEach((function(e){"returnValue"!==e&&(t[e]=N[e].slice())}));var n=M[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Z(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),i=3;i0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,a=new Array(r>1?r-1:0),i=1;i-1?_e:e.indexOf("-hant")>-1||Ie(e,["-tw","-hk","-mo","-cht"])?be:_e;var n=je(e,[we,xe,ke]);return n||void 0}}function De(){var e=getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:Ce(wx.getSystemInfoSync().language)||we}function $e(e){var t=getApp();if(!t)return!1;var n=t.$vm.$locale;return n!==e&&(t.$vm.$locale=e,Le.forEach((function(t){return t({locale:e})})),!0)}var Le=[];function Re(e){-1===Le.indexOf(e)&&Le.push(e)}"undefined"!==typeof e&&(e.getLocale=De);var Ne={promiseInterceptor:Q},Me=Object.freeze({__proto__:null,upx2px:me,getLocale:De,setLocale:$e,onLocaleChange:Re,addInterceptor:H,removeInterceptor:z,interceptors:Ne});function Ue(e){var t=getCurrentPages(),n=t.length;while(n--){var r=t[n];if(r.$page&&r.$page.fullPath===e)return n}return-1}var Fe,qe={name:function(e){return"back"===e.exists&&e.delta?"navigateBack":"redirectTo"},args:function(e){if("back"===e.exists&&e.url){var t=Ue(e.url);if(-1!==t){var n=getCurrentPages().length-1-t;n>0&&(e.delta=n)}}}},Be={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]:{},a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(E(t)){var i=!0===a?t:{};for(var o in P(n)&&(n=n(t,i)||{}),t)if(I(n,o)){var c=n[o];P(c)&&(c=c(t[o],t,i)),c?T(c)?i[c]=t[o]:E(c)&&(i[c.name?c.name:o]=c.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(o,"'"))}else-1!==ot.indexOf(o)?P(t[o])&&(i[o]=ct(e,t[o],r)):a||(i[o]=t[o]);return i}return P(t)&&(t=ct(e,t,r)),t}function ut(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return P(rt.returnValue)&&(t=rt.returnValue(e,t)),st(e,t,n,{},r)}function lt(e,t){if(I(rt,e)){var n=rt[e];return n?function(t,r){var a=n;P(n)&&(a=n(t)),t=st(e,t,a.args,a.returnValue);var i=[t];"undefined"!==typeof r&&i.push(r),P(a.name)?e=a.name(t):T(a.name)&&(e=a.name);var o=wx[e].apply(wx,i);return oe(e)?ut(e,o,a.returnValue,ie(e)):o}:function(){console.error("Platform '微信小程序' does not support '".concat(e,"'."))}}return t}var ft=Object.create(null),dt=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function pt(e){return function(t){var n=t.fail,r=t.complete,a={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};P(n)&&n(a),P(r)&&r(a)}}dt.forEach((function(e){ft[e]=pt(e)}));var ht={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function vt(e){var t=e.service,n=e.success,r=e.fail,a=e.complete,i=!1;ht[t]?(i={errMsg:"getProvider:ok",service:t,provider:ht[t]},P(n)&&n(i)):(i={errMsg:"getProvider:fail service not found"},P(r)&&r(i)),P(a)&&a(i)}var gt=Object.freeze({__proto__:null,getProvider:vt}),mt=function(){var e;return function(){return e||(e=new i.default),e}}();function yt(e,t,n){return e[t].apply(e,n)}function _t(){return yt(mt(),"$on",Array.prototype.slice.call(arguments))}function bt(){return yt(mt(),"$off",Array.prototype.slice.call(arguments))}function wt(){return yt(mt(),"$once",Array.prototype.slice.call(arguments))}function xt(){return yt(mt(),"$emit",Array.prototype.slice.call(arguments))}var kt,Ot,St,At=Object.freeze({__proto__:null,$on:_t,$off:bt,$once:wt,$emit:xt});function Pt(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}function Tt(e){var t={};for(var n in e){var r=e[n];P(r)&&(t[n]=Pt(r),delete e[n])}return t}function Et(e){try{return JSON.parse(e)}catch(t){}return e}function It(e){if("enabled"===e.type)St=!0;else if("clientId"===e.type)kt=e.cid,Ot=e.errMsg,Ct(kt,e.errMsg);else if("pushMsg"===e.type)for(var t={type:"receive",data:Et(e.message)},n=0;n<$t.length;n++){var r=$t[n];if(r(t),t.stopped)break}else"click"===e.type&&$t.forEach((function(t){t({type:"click",data:Et(e.message)})}))}var jt=[];function Ct(e,t){jt.forEach((function(n){n(e,t)})),jt.length=0}function Dt(e){E(e)||(e={});var t=Tt(e),n=t.success,r=t.fail,a=t.complete,i=P(n),o=P(r),c=P(a);Promise.resolve().then((function(){"undefined"===typeof St&&(St=!1,kt="",Ot="uniPush is not enabled"),jt.push((function(e,t){var s;e?(s={errMsg:"getPushClientId:ok",cid:e},i&&n(s)):(s={errMsg:"getPushClientId:fail"+(t?" "+t:"")},o&&r(s)),c&&a(s)})),"undefined"!==typeof kt&&Ct(kt,Ot)}))}var $t=[],Lt=function(e){-1===$t.indexOf(e)&&$t.push(e)},Rt=function(e){if(e){var t=$t.indexOf(e);t>-1&&$t.splice(t,1)}else $t.length=0},Nt=Object.freeze({__proto__:null,getPushClientId:Dt,onPushMessage:Lt,offPushMessage:Rt,invokePushCallback:It}),Mt=Page,Ut=Component,Ft=/:/g,qt=C((function(e){return $(e.replace(Ft,"-"))}));function Bt(e){var t=e.triggerEvent,n=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{};return Vt("onLoad",e),Mt(e)},Page.after=Mt.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Vt("created",e),Ut(e)});var Ht=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function zt(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){I(n,t)&&(e[t]=n[t])}))}function Kt(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 Kt(e,t)})):void 0}function Wt(e,t,n){t.forEach((function(t){Kt(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function Jt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Gt(t).forEach((function(t){return Yt(e,t,n)}))}function Gt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&Object.keys(e).forEach((function(n){0===n.indexOf("on")&&P(e[n])&&t.push(n)})),t}function Yt(e,t,n){-1!==n.indexOf(t)||I(e,t)||(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}function Xt(e,t){var n;return t=t.default||t,n=P(t)?t:e.extend(t),t=n.options,[n,t]}function Zt(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 Qt(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 en(e,t){var n=e.data||{},r=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(a){Object({VUE_APP_NAME:"Applet",VUE_APP_PLATFORM:"mp-weixin",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(a){}return E(n)||(n={}),Object.keys(r).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||I(n,e)||(n[e]=r[e])})),n}var tn=[String,Number,Boolean,Object,Array,null];function nn(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function rn(e,t){var n=e.behaviors,r=e.extends,a=e.mixins,i=e.props;i||(e.props=i=[]);var o=[];return Array.isArray(n)&&n.forEach((function(e){o.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(i)?(i.push("name"),i.push("value")):(i.name={type:String,default:""},i.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),E(r)&&r.props&&o.push(t({properties:on(r.props,!0)})),Array.isArray(a)&&a.forEach((function(e){E(e)&&e.props&&o.push(t({properties:on(e.props,!0)}))})),o}function an(e,t,n,r){return Array.isArray(t)&&1===t.length?t[0]:t}function on(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>3?arguments[3]:void 0,r={};return t||(r.vueId={type:String,value:""},n.virtualHost&&(r.virtualHostStyle={type:null,value:""},r.virtualHostClass={type:null,value:""}),r.scopedSlotsCompiler={type:String,value:""},r.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){r[e]={type:null,observer:nn(e)}})):E(e)&&Object.keys(e).forEach((function(t){var n=e[t];if(E(n)){var a=n.default;P(a)&&(a=a()),n.type=an(t,n.type),r[t]={type:-1!==tn.indexOf(n.type)?n.type:null,value:a,observer:nn(t)}}else{var i=an(t,n);r[t]={type:-1!==tn.indexOf(i)?i:null,observer:nn(t)}}})),r}function cn(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=j,e.preventDefault=j,e.target=e.target||{},I(e,"detail")||(e.detail={}),I(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),E(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function sn(e,t){var n=e;return t.forEach((function(t){var r=t[0],a=t[2];if(r||"undefined"!==typeof a){var i,o=t[1],c=t[3];Number.isInteger(r)?i=r:r?"string"===typeof r&&r&&(i=0===r.indexOf("#s#")?r.substr(3):e.__get_value(r,n)):i=n,Number.isInteger(i)?n=a:o?Array.isArray(i)?n=i.find((function(t){return e.__get_value(o,t)===a})):E(i)?n=Object.keys(i).find((function(t){return e.__get_value(o,i[t])===a})):console.error("v-for 暂不支持循环数据:",i):n=i[a],c&&(n=e.__get_value(c,n))}})),n}function un(e,t,n,r){var a={};return Array.isArray(t)&&t.length&&t.forEach((function(t,i){"string"===typeof t?t?"$event"===t?a["$"+i]=n:"arguments"===t?a["$"+i]=n.detail&&n.detail.__args__||r:0===t.indexOf("$event.")?a["$"+i]=e.__get_value(t.replace("$event.",""),n):a["$"+i]=e.__get_value(t):a["$"+i]=e:a["$"+i]=sn(e,t)})),a}function ln(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,o=!1,c=E(t.detail)&&t.detail.__args__||[t.detail];if(a&&(o=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return o?[t]:c;var s=un(e,r,t,c),u=[];return n.forEach((function(e){"$event"===e?"__set_model"!==i||a?a&&!o?u.push(c[0]):u.push(t):u.push(t.target.value):Array.isArray(e)&&"o"===e[0]?u.push(ln(e)):"string"===typeof e&&I(s,e)?u.push(s[e]):u.push(e)})),u}var dn="~",pn="^";function hn(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function vn(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 gn(e){var t=this;e=cn(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 a=e.type,i=[];return r.forEach((function(n){var r=n[0],o=n[1],c=r.charAt(0)===pn;r=c?r.slice(1):r;var s=r.charAt(0)===dn;r=s?r.slice(1):r,o&&hn(a,r)&&o.forEach((function(n){var r=n[0];if(r){var a=t.$vm;if(a.$options.generic&&(a=vn(a)||a),"$emit"===r)return void a.$emit.apply(a,fn(t.$vm,e,n[1],n[2],c,r));var o=a[r];if(!P(o)){var u="page"===t.$vm.mpType?"Page":"Component",l=t.route||t.is;throw new Error("".concat(u,' "').concat(l,'" does not have a method "').concat(r,'"'))}if(s){if(o.once)return;o.once=!0}var f=fn(t.$vm,e,n[1],n[2],c,r);f=Array.isArray(f)?f:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(o.toString())&&(f=f.concat([,,,,,,,,,,e])),i.push(o.apply(a,f))}}))})),"input"===a&&1===i.length&&"undefined"!==typeof i[0]?i[0]:void 0}var mn={},yn=[];function _n(e){if(e){var t=mn[e];return delete mn[e],t}return yn.shift()}var bn=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function wn(){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__=_n(n.__id__),delete n.__id__),e.call(this,t,n)}}function xn(){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,a){var i=e[n];if(i){var o=i[r]||{};return a?o[a]:o}t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))},i.default.prototype.$setScopedSlotsParams=function(n,r){var a=this.$options.propsData.vueId;if(a){var i=a.split(",")[0],o=e[i]=e[i]||{};o[n]=r,t[i]&&t[i].$forceUpdate()}},i.default.mixin({destroyed:function(){var n=this.$options.propsData,r=n&&n.vueId;r&&(delete e[r],delete t[r])}})}function kn(e,t){var n=t.mocks,r=t.initRefs;wn(),xn(),e.$options.store&&(i.default.prototype.$store=e.$options.store),O(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=p({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),zt(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]})),Te(i.default,e,Ce(wx.getSystemInfoSync().language)||we),Wt(a,bn),Jt(a,e.$options),a}var On=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function Sn(e,t){for(var n,r=e.$children,a=r.length-1;a>=0;a--){var i=r[a];if(i.$scope._$vueId===t)return i}for(var o=r.length-1;o>=0;o--)if(n=Sn(r[o],t),n)return n}function An(e){return Behavior(e)}function Pn(){return!!this.route}function Tn(e){this.triggerEvent("__l",e)}function En(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){En(e,t,n)}))}))}function In(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};En(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 jn(e){var t,n=e.detail||e.value,r=n.vuePid,a=n.vueOptions;r&&(t=Sn(this.$vm,r)),t||(t=this.$vm),a.parent=t}function Cn(e){return kn(e,{mocks:On,initRefs:In})}function Dn(e){return App(Cn(e)),e}var $n=/[!'()*]/g,Ln=function(e){return"%"+e.charCodeAt(0).toString(16)},Rn=/%2C/g,Nn=function(e){return encodeURIComponent(e).replace($n,Ln).replace(Rn,",")};function Mn(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 a=[];return r.forEach((function(e){void 0!==e&&(null===e?a.push(t(n)):a.push(t(n)+"="+t(e)))})),a.join("&")}return t(n)+"="+t(r)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function Un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,r=t.initRelation,a=Xt(i.default,e),o=u(a,2),c=o[0],l=o[1],f=s({multipleSlots:!0,addGlobalClass:!0},l.options||{});l["mp-weixin"]&&l["mp-weixin"].options&&Object.assign(f,l["mp-weixin"].options);var d={options:f,data:en(l,i.default.prototype),behaviors:rn(l,An),properties:on(l.props,!1,l.__file,f),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};Qt(e.vueId,this),r.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new c(t),Zt(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:jn,__e:gn}};return l.externalClasses&&(d.externalClasses=l.externalClasses),Array.isArray(l.wxsCallMethods)&&l.wxsCallMethods.forEach((function(e){d.methods[e]=function(t){return this.$vm[e](t)}})),n?d:[d,c]}function Fn(e){return Un(e,{isPage:Pn,initRelation:Tn})}var qn=["onShow","onHide","onUnload"];function Bn(e,t){t.isPage,t.initRelation;var n=Fn(e);return Wt(n.methods,qn,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+Mn(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},Jt(n.methods,e,["onReady"]),n}function Vn(e){return Bn(e,{isPage:Pn,initRelation:Tn})}function Hn(e){return Component(Vn(e))}function zn(e){return Component(Fn(e))}function Kn(e){var t=Cn(e),n=getApp({allowDefault:!0});e.$scope=n;var r=n.globalData;if(r&&Object.keys(t.globalData).forEach((function(e){I(r,e)||(r[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){I(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([^]*)<\/body>/.test(e);return t?RegExp.$1:e}function f(e){return e.replace(//gi,"").replace(/\/\*.*?\*\//gi,"").replace(/[ ]+/gi,"").replace(//gi,"")}function d(){var e={};return wx.getSystemInfo({success:function(t){e.width=t.windowWidth,e.height=t.windowHeight}}),e}function p(e,t,n,i){e=l(e),e=f(e),e=r.default.strDiscode(e);var o=[],p={nodes:[],imageUrls:[]},h=d();function v(e){this.node="element",this.tag=e,this.$screen=h}return(0,a.default)(e,{start:function(e,a,i){var l=new v(e);if(0!==o.length){var f=o[0];void 0===f.nodes&&(f.nodes=[])}if(c[e]?l.tagType="block":s[e]?l.tagType="inline":u[e]&&(l.tagType="closeSelf"),l.attr=a.reduce((function(e,t){var n=t.name,r=t.value;return"class"===n&&(l.classStr=r),"style"===n&&(l.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}),{}),l.classStr?l.classStr+=" ".concat(l.tag):l.classStr=l.tag,"inline"===l.tagType&&(l.classStr+=" inline"),"img"===l.tag){var d=l.attr.src;d=r.default.urlToHttpUrl(d,n.domain),Object.assign(l.attr,n,{src:d||""}),d&&p.imageUrls.push(d)}if("a"===l.tag&&(l.attr.href=l.attr.href||""),"font"===l.tag){var h=["x-small","small","medium","large","x-large","xx-large","-webkit-xxx-large"],g={color:"color",face:"font-family",size:"font-size"};l.styleStr||(l.styleStr=""),Object.keys(g).forEach((function(e){if(l.attr[e]){var t="size"===e?h[l.attr[e]-1]:l.attr[e];l.styleStr+="".concat(g[e],": ").concat(t,";")}}))}if("source"===l.tag&&(p.source=l.attr.src),t.start&&t.start(l,p),i){var m=o[0]||p;void 0===m.nodes&&(m.nodes=[]),m.nodes.push(l)}else o.unshift(l)},end:function(e){var n=o.shift();if(n.tag!==e&&console.error("invalid state: mismatch end tag"),"video"===n.tag&&p.source&&(n.attr.src=p.source,delete p.source),t.end&&t.end(n,p),0===o.length)p.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,p),0===o.length)p.nodes.push(n);else{var r=o[0];void 0===r.nodes&&(r.nodes=[]),r.nodes.push(n)}}}}),p}var h=p;t.default=h},"66fd":function(e,t,n){"use strict";n.r(t),function(e){ /*! * Vue.js v2.6.11 * (c) 2014-2022 Evan You * Released under the MIT License. */ var n=Object.freeze({});function r(e){return void 0===e||null===e}function a(e){return void 0!==e&&null!==e}function i(e){return!0===e}function o(e){return!1===e}function c(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function s(e){return null!==e&&"object"===typeof e}var u=Object.prototype.toString;function l(e){return"[object Object]"===u.call(e)}function f(e){return"[object RegExp]"===u.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return a(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),r=e.split(","),a=0;a-1)return e.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(e,t){return _.call(e,t)}function w(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var x=/-(\w)/g,k=w((function(e){return e.replace(x,(function(e,t){return t?t.toUpperCase():""}))})),O=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),S=/\B([A-Z])/g,A=w((function(e){return e.replace(S,"-$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 T(e,t){return e.bind(t)}var E=Function.prototype.bind?T:P;function I(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function j(e,t){for(var n in t)e[n]=t[n];return e}function C(e){for(var t={},n=0;n0),te=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===X),ne=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/),{}.watch);if(G)try{var re={};Object.defineProperty(re,"passive",{get:function(){}}),window.addEventListener("test-passive",null,re)}catch(na){}var ae=function(){return void 0===W&&(W=!G&&!Y&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),W},ie=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"===typeof e&&/native code/.test(e.toString())}var ce,se="undefined"!==typeof Symbol&&oe(Symbol)&&"undefined"!==typeof Reflect&&oe(Reflect.ownKeys);ce="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 ue=D,le=0,fe=function(){this.id=le++,this.subs=[]};function de(e){fe.SharedObject.targetStack.push(e),fe.SharedObject.target=e,fe.target=e}function pe(){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){y(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(i&&!b(a,"default"))o=!1;else if(""===o||o===A(e)){var s=Ge(String,a.type);(s<0||c0&&(o=wt(o,(t||"")+"_"+n),bt(o[0])&&bt(u)&&(l[s]=me(u.text+o[0].text),o.shift()),l.push.apply(l,o)):c(o)?bt(u)?l[s]=me(u.text+o):""!==o&&l.push(me(o)):bt(o)&&bt(u)?l[s]=me(u.text+o.text):(i(e._isVList)&&a(o.tag)&&r(o.key)&&a(t)&&(o.key="__vlist"+t+"_"+n+"__"),l.push(o)));return l}function xt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function kt(e){var t=Ot(e.$options.inject,e);t&&(Oe(!1),Object.keys(t).forEach((function(n){Ee(e,n,t[n])})),Oe(!0))}function Ot(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e):Object.keys(e),a=0;a0,o=e?!!e.$stable:!i,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(o&&r&&r!==n&&c===r.$key&&!i&&!r.$hasNormal)return r;for(var s in a={},e)e[s]&&"$"!==s[0]&&(a[s]=Tt(t,s,e[s]))}else a={};for(var u in t)u in a||(a[u]=Et(t,u));return e&&Object.isExtensible(e)&&(e._normalized=a),H(a,"$stable",o),H(a,"$key",c),H(a,"$hasNormal",i),a}function Tt(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]:_t(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 Et(e,t){return function(){return e[t]}}function It(e,t){var n,r,i,o,c;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,i=e.length;r1?I(n):n;for(var r=I(arguments,1),a='event handler for "'+e+'"',i=0,o=n.length;idocument.createEvent("Event").timeStamp&&(Fn=function(){return qn.now()})}function Bn(){var e,t;for(Fn(),Nn=!0,Dn.sort((function(e,t){return e.id-t.id})),Mn=0;MnMn&&Dn[n].id>e.id)n--;Dn.splice(n+1,0,e)}else Dn.push(e);Rn||(Rn=!0,st(Bn))}}var Wn=0,Jn=function(e,t,n,r,a){this.vm=e,a&&(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=++Wn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ce,this.newDepIds=new ce,this.expression="","function"===typeof t?this.getter=t:(this.getter=K(t),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};Jn.prototype.get=function(){var e;de(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(na){if(!this.user)throw na;Ye(na,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&<(e),pe(),this.cleanupDeps()}return e},Jn.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))},Jn.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},Jn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Kn(this)},Jn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(na){Ye(na,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Jn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Jn.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},Jn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var Gn={enumerable:!0,configurable:!0,get:D,set:D};function Yn(e,t,n){Gn.get=function(){return this[t][n]},Gn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Gn)}function Xn(e){e._watchers=[];var t=e.$options;t.props&&Zn(e,t.props),t.methods&&or(e,t.methods),t.data?Qn(e):Te(e._data={},!0),t.computed&&nr(e,t.computed),t.watch&&t.watch!==ne&&cr(e,t.watch)}function Zn(e,t){var n=e.$options.propsData||{},r=e._props={},a=e.$options._propKeys=[],i=!e.$parent;i||Oe(!1);var o=function(i){a.push(i);var o=ze(i,t,n,e);Ee(r,i,o),i in e||Yn(e,"_props",i)};for(var c in t)o(c);Oe(!0)}function Qn(e){var t=e.$options.data;t=e._data="function"===typeof t?er(t,e):t||{},l(t)||(t={});var n=Object.keys(t),r=e.$options.props,a=(e.$options.methods,n.length);while(a--){var i=n[a];0,r&&b(r,i)||V(i)||Yn(e,"_data",i)}Te(t,!0)}function er(e,t){de();try{return e.call(t,t)}catch(na){return Ye(na,t,"data()"),{}}finally{pe()}}var tr={lazy:!0};function nr(e,t){var n=e._computedWatchers=Object.create(null),r=ae();for(var a in t){var i=t[a],o="function"===typeof i?i:i.get;0,r||(n[a]=new Jn(e,o||D,D,tr)),a in e||rr(e,a,i)}}function rr(e,t,n){var r=!ae();"function"===typeof n?(Gn.get=r?ar(t):ir(n),Gn.set=D):(Gn.get=n.get?r&&!1!==n.cache?ar(t):ir(n.get):D,Gn.set=n.set||D),Object.defineProperty(e,t,Gn)}function ar(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 ir(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]?D:E(t[n],e)}function cr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var a=0;a-1)return this;var n=I(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 mr(e){e.mixin=function(e){return this.options=Ve(this.options,e),this}}function yr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,a=e._Ctor||(e._Ctor={});if(a[r])return a[r];var i=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=Ve(n.options,e),o["super"]=n,o.options.props&&_r(o),o.options.computed&&br(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,U.forEach((function(e){o[e]=n[e]})),i&&(o.options.components[i]=o),o.superOptions=n.options,o.extendOptions=e,o.sealedOptions=j({},o.options),a[r]=o,o}}function _r(e){var t=e.options.props;for(var n in t)Yn(e.prototype,"_props",n)}function br(e){var t=e.options.computed;for(var n in t)rr(e.prototype,n,t[n])}function wr(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function xr(e){return e&&(e.Ctor.options.name||e.tag)}function kr(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Or(e,t){var n=e.cache,r=e.keys,a=e._vnode;for(var i in n){var o=n[i];if(o){var c=xr(o.componentOptions);c&&!t(c)&&Sr(n,i,r,a)}}}function Sr(e,t,n,r){var a=e[t];!a||r&&a.tag===r.tag||a.componentInstance.$destroy(),e[t]=null,y(n,t)}fr(vr),ur(vr),kn(vr),Pn(vr),dn(vr);var Ar=[String,RegExp,Array],Pr={name:"keep-alive",abstract:!0,props:{include:Ar,exclude:Ar,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Sr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Or(e,(function(e){return kr(t,e)}))})),this.$watch("exclude",(function(t){Or(e,(function(e){return!kr(t,e)}))}))},render:function(){var e=this.$slots.default,t=mn(e),n=t&&t.componentOptions;if(n){var r=xr(n),a=this,i=a.include,o=a.exclude;if(i&&(!r||!kr(i,r))||o&&r&&kr(o,r))return t;var c=this,s=c.cache,u=c.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,y(u,l),u.push(l)):(s[l]=t,u.push(l),this.max&&u.length>parseInt(this.max)&&Sr(s,u[0],u,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Tr={KeepAlive:Pr};function Er(e){var t={get:function(){return q}};Object.defineProperty(e,"config",t),e.util={warn:ue,extend:j,mergeOptions:Ve,defineReactive:Ee},e.set=Ie,e.delete=je,e.nextTick=st,e.observable=function(e){return Te(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,j(e.options.components,Tr),gr(e),mr(e),yr(e),wr(e)}Er(vr),Object.defineProperty(vr.prototype,"$isServer",{get:ae}),Object.defineProperty(vr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(vr,"FunctionalRenderContext",{value:zt}),vr.version="2.6.11";var Ir="[object Array]",jr="[object Object]";function Cr(e,t){var n={};return Dr(e,t),$r(e,t,"",n),n}function Dr(e,t){if(e!==t){var n=Rr(e),r=Rr(t);if(n==jr&&r==jr){if(Object.keys(e).length>=Object.keys(t).length)for(var a in t){var i=e[a];void 0===i?e[a]=null:Dr(i,t[a])}}else n==Ir&&r==Ir&&e.length>=t.length&&t.forEach((function(t,n){Dr(e[n],t)}))}}function $r(e,t,n,r){if(e!==t){var a=Rr(e),i=Rr(t);if(a==jr)if(i!=jr||Object.keys(e).length1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Yr(e){return Array.isArray(e)?C(e):"string"===typeof e?Gr(e):e}var Xr=["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 a="function"===typeof getApp&&getApp();a&&a.onError&&a.onError(t)};var t=e.prototype.$emit;e.prototype.$emit=function(e){if(this.$scope&&e){var n=this.$scope["_triggerEvent"]||this.$scope["triggerEvent"];n&&n.call(this.$scope,e,{__args__:I(arguments,1)})}return t.apply(this,arguments)},e.prototype.$nextTick=function(e){return Ur(this,e)},Xr.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=xt,e.prototype.__init_injections=kt,e.prototype.__call_hook=function(e,t){var n=this;de();var r,a=n.$options[e],i=e+" hook";if(a)for(var o=0,c=a.length;o0:null!==this.modelValue||void 0!==this.modelValue;return e?this.modelValue:this.value},hasValue:function(){return"number"===typeof this.dataValue||null!=this.dataValue&&this.dataValue.length>0}},created:function(){var e=this;this.$watch((function(){var t=[];return["pageCurrent","pageSize","spaceInfo","value","modelValue","localdata","collection","action","field","orderby","where","getont","getcount","gettree"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){for(var r=2;r0&&void 0!==arguments[0]?arguments[0]:{},n=e.database(this.spaceInfo),r=t.action||this.action;r&&(n=n.action(r));var a=t.collection||this.collection;n=n.collection(a);var i=t.where||this.where;i&&Object.keys(i).length&&(n=n.where(i));var o=t.field||this.field;o&&(n=n.field(o));var c=t.orderby||this.orderby;c&&(n=n.orderBy(c));var s=void 0!==t.pageCurrent?t.pageCurrent:this.page.current,u=void 0!==t.pageSize?t.pageSize:this.page.size,l=void 0!==t.getcount?t.getcount:this.getcount,f=void 0!==t.gettree?t.gettree:this.gettree,d={getCount:l,getTree:f};return t.getTreePath&&(d.getTreePath=t.getTreePath),n=n.skip(u*(s-1)).limit(u).get(d),n},getNodeData:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,where:this._pathWhere()}).then((function(n){t.loading=!1,t.selected=n.result.data,e&&e()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},getTreePath:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,getTreePath:{startWith:"".concat(this.selfField,"=='").concat(this.dataValue,"'")}}).then((function(n){t.loading=!1;var r=[];t._extractTreePath(n.result.data,r),t.selected=r,e&&e()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},loadData:function(){var e=this;this.isLocaldata?this._processLocalData():null==this.dataValue?this.stepSearh?this._loadNodeData((function(t){e._treeData=t,e._updateBindData()})):this._loadAllData((function(t){e._treeData=[],e._extractTree(t,e._treeData,null),e._updateBindData()})):this._loadNodeData((function(t){e._treeData=t,e._updateBindData(),e._updateSelected()}))},_loadAllData:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,gettree:!0,startwith:"".concat(this.selfField,"=='").concat(this.dataValue,"'")}).then((function(n){t.loading=!1,e(n.result.data),t.onDataChange()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},_loadNodeData:function(e,t){var n=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,where:t||this._postWhere(),pageSize:500}).then((function(t){n.loading=!1,e(t.result.data),n.onDataChange()})).catch((function(e){n.loading=!1,n.errorMessage=e})))},_pathWhere:function(){var e=[],t=this._getParentNameByField();return t&&e.push("".concat(t," == '").concat(this.dataValue,"'")),this.where?"(".concat(this.where,") && (").concat(e.join(" || "),")"):e.join(" || ")},_postWhere:function(){var e=[],t=this.selected,n=this.parentField;if(n&&e.push("".concat(n," == null || ").concat(n,' == ""')),t.length)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:[],r=this.map.text,a=this.map.value,i=0;i1&&void 0!==arguments[1]?arguments[1]:"",n=["label"];n.forEach((function(t){void 0===e[t]&&(e[t]="")}));var r=t;for(var a in e){var i=new RegExp("{"+a+"}");r=r.replace(i,e[a])}return r}function b(e,t){return void 0===e||null===e||("string"===typeof e&&!e||(!(!Array.isArray(e)||e.length)||"object"===t&&!Object.keys(e).length))}var w={integer:function(e){return w.number(e)&&parseInt(e,10)===e},string:function(e){return"string"===typeof e},number:function(e){return!isNaN(e)&&"number"===typeof e},boolean:function(e){return"boolean"===typeof e},float:function(e){return w.number(e)&&!w.integer(e)},array:function(e){return Array.isArray(e)},object:function(e){return"object"===typeof e&&!w.array(e)},date:function(e){return e instanceof Date},timestamp:function(e){return!(!this.integer(e)||Math.abs(e).toString().length>16)},file:function(e){return"string"===typeof e.url},email:function(e){return"string"===typeof e&&!!e.match(m.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(m.url)},pattern:function(e,t){try{return new RegExp(e).test(t)}catch(n){return!1}},method:function(e){return"function"===typeof e},idcard:function(e){return"string"===typeof e&&!!e.match(m.idcard)},"url-https":function(e){return this.url(e)&&e.startsWith("https://")},"url-scheme":function(e){return e.startsWith("://")},"url-web":function(e){return!1}},x=function(){function e(t){h(this,e),this._message=t}return g(e,[{key:"validateRule",value:function(){var e=p(r.default.mark((function e(t,n,a,i,o){var c,s,u,l,f,d,p,h,v;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(c=null,s=n.rules,u=s.findIndex((function(e){return e.required})),!(u<0)){e.next=8;break}if(null!==a&&void 0!==a){e.next=6;break}return e.abrupt("return",c);case 6:if("string"!==typeof a||a.length){e.next=8;break}return e.abrupt("return",c);case 8:if(l=this._message,void 0!==s){e.next=11;break}return e.abrupt("return",l["default"]);case 11:f=0;case 12:if(!(f-1&&(s=!0),s?null:_(e,a||n["enum"])},rangeNumber:function(e,t,n){if(!w.number(t))return _(e,e.errorMessage||n.pattern.mismatch);var r=e.minimum,a=e.maximum,i=e.exclusiveMinimum,o=e.exclusiveMaximum,c=i?t<=r:t=a:t>a;return void 0!==r&&c?_(e,e.errorMessage||n["number"][i?"exclusiveMinimum":"minimum"]):void 0!==a&&s?_(e,e.errorMessage||n["number"][o?"exclusiveMaximum":"maximum"]):void 0!==r&&void 0!==a&&(c||s)?_(e,e.errorMessage||n["number"].range):null},rangeLength:function(e,t,n){if(!w.string(t)&&!w.array(t))return _(e,e.errorMessage||n.pattern.mismatch);var r=e.minLength,a=e.maxLength,i=t.length;return void 0!==r&&ia?_(e,e.errorMessage||n["length"].maxLength):void 0!==r&&void 0!==a&&(ia)?_(e,e.errorMessage||n["length"].range):null},pattern:function(e,t,n){return w["pattern"](e.pattern,t)?null:_(e,e.errorMessage||n.pattern.mismatch)},format:function(e,t,n){var r=Object.keys(w),a=y[e.format]?y[e.format]:e.format||e.arrayType;return r.indexOf(a)>-1&&!w[a](t)?_(e,e.errorMessage||n.typeError):null},arrayTypeFormat:function(e,t,n){if(!Array.isArray(t))return _(e,e.errorMessage||n.typeError);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.$.$refs["ani"].ref;if(n)return new Promise((function(a,i){nvueAnimation.transition(n,r({styles:e},t),(function(e){a()}))}))}},{key:"_nvueNextAnimate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,a=e[n];if(a){var i=a.styles,o=a.config;this._animateRun(i,o).then((function(){n+=1,t._nvueNextAnimate(e,n,r)}))}else this.currentStepAnimates={},"function"===typeof r&&r(),this.isEnd=!0}},{key:"step",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.animation.step(e),this}},{key:"run",value:function(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((function(){"function"===typeof e&&e()}),this.$.durationTime)}}]),t}(),u=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"],l=["opacity","backgroundColor"],f=["width","height","left","right","top","bottom"];function d(e,t){if(t)return clearTimeout(t.timer),new s(e,t)}u.concat(l,f).forEach((function(e){s.prototype[e]=function(){var t;return(t=this.animation)[e].apply(t,arguments),this}}))}).call(this,n("543d")["default"])},9560:function(e){e.exports=JSON.parse('{"uni-datetime-picker.selectDate":"选择日期","uni-datetime-picker.selectTime":"选择时间","uni-datetime-picker.selectDateTime":"选择日期时间","uni-datetime-picker.startDate":"开始日期","uni-datetime-picker.endDate":"结束日期","uni-datetime-picker.startTime":"开始时间","uni-datetime-picker.endTime":"结束时间","uni-datetime-picker.ok":"确定","uni-datetime-picker.clear":"清除","uni-datetime-picker.cancel":"取消","uni-datetime-picker.year":"年","uni-datetime-picker.month":"月","uni-calender.SUN":"日","uni-calender.MON":"一","uni-calender.TUE":"二","uni-calender.WED":"三","uni-calender.THU":"四","uni-calender.FRI":"五","uni-calender.SAT":"六","uni-calender.confirm":"确认"}')},"96cf":function(e,t){!function(t){"use strict";var n,r=Object.prototype,a=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",u="object"===typeof e,l=t.regeneratorRuntime;if(l)u&&(e.exports=l);else{l=t.regeneratorRuntime=u?e.exports:{},l.wrap=b;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={},g={};g[o]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(C([])));y&&y!==r&&a.call(y,o)&&(g=y);var _=O.prototype=x.prototype=Object.create(g);k.prototype=_.constructor=O,O.constructor=k,O[s]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(_),e},l.awrap=function(e){return{__await:e}},S(A.prototype),A.prototype[c]=function(){return this},l.AsyncIterator=A,l.async=function(e,t,n,r){var a=new A(b(e,t,n,r));return l.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(_),_[s]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},l.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}},l.values=C,j.prototype={constructor:j,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(I),!e)for(var t in this)"t"===t.charAt(0)&&a.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,a){return c.type="throw",c.arg=e,t.next=r,a&&(t.method="next",t.arg=n),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},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 a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(e,t,n,r){var a=t&&t.prototype instanceof x?t:x,i=Object.create(a.prototype),o=new j(r||[]);return i._invoke=P(e,n,o),i}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function x(){}function k(){}function O(){}function S(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e){function t(n,r,i,o){var c=w(e[n],e,r);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===typeof u&&a.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,i,o)}),(function(e){t("throw",e,i,o)})):Promise.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return t("throw",e,i,o)}))}o(c.arg)}var n;function r(e,r){function a(){return new Promise((function(n,a){t(e,r,n,a)}))}return n=n?n.then(a,a):a()}this._invoke=r}function P(e,t,n){var r=f;return function(a,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===a)throw i;return D()}n.method=a,n.arg=i;while(1){var o=n.delegate;if(o){var c=T(o,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=w(e,t,n);if("normal"===s.type){if(r=n.done?h:d,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}function T(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,T(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=w(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,v;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function E(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(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,i=function t(){while(++r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,o=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw i}}}}function v(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-i%4*8&255;t[r+i>>>2]|=o<<24-(r+i)%4*8}else for(i=0;i>>2]=n[i>>>2];return this.sigBytes+=a,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=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],a=function(t){t=t;var n=987654321,r=4294967295;return function(){var a=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return a/=4294967296,(a+=.5)*(e.random()>.5?1:-1)}},i=0;i>>2]>>>24-a%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).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)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(i))}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)}},l=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,a=n.sigBytes,i=this.blockSize,c=a/(4*i),s=(c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0))*i,u=e.min(4*s,a);if(s){for(var l=0;l>>24)|4278255360&(a<<24|a>>>8)}var i=this._hash.words,o=e[t+0],s=e[t+1],p=e[t+2],h=e[t+3],v=e[t+4],g=e[t+5],m=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],x=e[t+11],k=e[t+12],O=e[t+13],S=e[t+14],A=e[t+15],P=i[0],T=i[1],E=i[2],I=i[3];P=u(P,T,E,I,o,7,c[0]),I=u(I,P,T,E,s,12,c[1]),E=u(E,I,P,T,p,17,c[2]),T=u(T,E,I,P,h,22,c[3]),P=u(P,T,E,I,v,7,c[4]),I=u(I,P,T,E,g,12,c[5]),E=u(E,I,P,T,m,17,c[6]),T=u(T,E,I,P,y,22,c[7]),P=u(P,T,E,I,_,7,c[8]),I=u(I,P,T,E,b,12,c[9]),E=u(E,I,P,T,w,17,c[10]),T=u(T,E,I,P,x,22,c[11]),P=u(P,T,E,I,k,7,c[12]),I=u(I,P,T,E,O,12,c[13]),E=u(E,I,P,T,S,17,c[14]),P=l(P,T=u(T,E,I,P,A,22,c[15]),E,I,s,5,c[16]),I=l(I,P,T,E,m,9,c[17]),E=l(E,I,P,T,x,14,c[18]),T=l(T,E,I,P,o,20,c[19]),P=l(P,T,E,I,g,5,c[20]),I=l(I,P,T,E,w,9,c[21]),E=l(E,I,P,T,A,14,c[22]),T=l(T,E,I,P,v,20,c[23]),P=l(P,T,E,I,b,5,c[24]),I=l(I,P,T,E,S,9,c[25]),E=l(E,I,P,T,h,14,c[26]),T=l(T,E,I,P,_,20,c[27]),P=l(P,T,E,I,O,5,c[28]),I=l(I,P,T,E,p,9,c[29]),E=l(E,I,P,T,y,14,c[30]),P=f(P,T=l(T,E,I,P,k,20,c[31]),E,I,g,4,c[32]),I=f(I,P,T,E,_,11,c[33]),E=f(E,I,P,T,x,16,c[34]),T=f(T,E,I,P,S,23,c[35]),P=f(P,T,E,I,s,4,c[36]),I=f(I,P,T,E,v,11,c[37]),E=f(E,I,P,T,y,16,c[38]),T=f(T,E,I,P,w,23,c[39]),P=f(P,T,E,I,O,4,c[40]),I=f(I,P,T,E,o,11,c[41]),E=f(E,I,P,T,h,16,c[42]),T=f(T,E,I,P,m,23,c[43]),P=f(P,T,E,I,b,4,c[44]),I=f(I,P,T,E,k,11,c[45]),E=f(E,I,P,T,A,16,c[46]),P=d(P,T=f(T,E,I,P,p,23,c[47]),E,I,o,6,c[48]),I=d(I,P,T,E,y,10,c[49]),E=d(E,I,P,T,S,15,c[50]),T=d(T,E,I,P,g,21,c[51]),P=d(P,T,E,I,k,6,c[52]),I=d(I,P,T,E,h,10,c[53]),E=d(E,I,P,T,w,15,c[54]),T=d(T,E,I,P,s,21,c[55]),P=d(P,T,E,I,_,6,c[56]),I=d(I,P,T,E,A,10,c[57]),E=d(E,I,P,T,m,15,c[58]),T=d(T,E,I,P,O,21,c[59]),P=d(P,T,E,I,v,6,c[60]),I=d(I,P,T,E,x,10,c[61]),E=d(E,I,P,T,p,15,c[62]),T=d(T,E,I,P,b,21,c[63]),i[0]=i[0]+P|0,i[1]=i[1]+T|0,i[2]=i[2]+E|0,i[3]=i[3]+I|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;n[a>>>5]|=128<<24-a%32;var i=e.floor(r/4294967296),o=r;n[15+(a+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var c=this._hash,s=c.words,u=0;u<4;u++){var l=s[u];s[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,r,a,i,o){var c=e+(t&n|~t&r)+a+o;return(c<>>32-i)+t}function l(e,t,n,r,a,i,o){var c=e+(t&r|n&~r)+a+o;return(c<>>32-i)+t}function f(e,t,n,r,a,i,o){var c=e+(t^n^r)+a+o;return(c<>>32-i)+t}function d(e,t,n,r,a,i,o){var c=e+(n^(t|~r))+a+o;return(c<>>32-i)+t}t.MD5=i._createHelper(s),t.HmacMD5=i._createHmacHelper(s)}(Math),n.MD5)})),$((function(e,t){var n,r,a;e.exports=(r=(n=L).lib.Base,a=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),c=i.words,s=o.words,u=0;u1&&void 0!==arguments[1]?arguments[1]:{};return t=X,n=e,Object.prototype.hasOwnProperty.call(t,n)||(X[e]=r),X[e]}"app"===V&&(X=r._globalUniCloudObj?r._globalUniCloudObj:r._globalUniCloudObj={});var Q=["invoke","success","fail","complete"],ee=Z("_globalUniCloudInterceptor");function te(e,t){ee[e]||(ee[e]={}),q(t)&&Object.keys(t).forEach((function(n){Q.indexOf(n)>-1&&function(e,t,n){var r=ee[e][t];r||(r=ee[e][t]=[]),-1===r.indexOf(n)&&"function"==typeof n&&r.push(n)}(e,n,t[n])}))}function ne(e,t){ee[e]||(ee[e]={}),q(t)?Object.keys(t).forEach((function(n){Q.indexOf(n)>-1&&function(e,t,n){var r=ee[e][t];if(r){var a=r.indexOf(n);a>-1&&r.splice(a,1)}}(e,n,t[n])})):delete ee[e]}function re(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function ae(e,t){return ee[e]&&ee[e][t]||[]}function ie(e){te("callObject",e)}var oe=Z("_globalUniCloudListener"),ce="response",se="needLogin",ue="refreshToken",le="clientdb",fe="cloudfunction",de="cloudobject";function pe(e){return oe[e]||(oe[e]=[]),oe[e]}function he(e,t){var n=pe(e);n.includes(t)||n.push(t)}function ve(e,t){var n=pe(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}function ge(e,t){for(var n=pe(e),r=0;r-1)return;var n=r.getLaunchOptionsSync(),a=n.scene,i=n.channel;e=i,t=a}}catch(e){}return{channel:e,scene:t}}function Oe(){var e=r.getLocale&&r.getLocale()||"en";if(we)return b(b({},we),{},{locale:e,LOCALE:e});for(var t=r.getSystemInfoSync(),n=t.deviceId,a=t.osName,i=t.uniPlatform,o=t.appId,c=["pixelRatio","brand","model","system","language","version","platform","host","SDKVersion","swanNativeVersion","app","AppPlatform","fontSizeSetting"],s=0;s=400)return r(new xe({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var a=e.data;if(a.error)return r(new xe({code:a.error.code,message:a.error.message,requestId:t}));a.result=a.data,a.requestId=t,delete a.data,n(a)}}))}))}},Pe={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()}},Te={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},Ee=(0,i.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:Te,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:Te},"zh-Hans"),Ie=Ee.t,je=function(){function e(t){x(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(Ie("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=Pe,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return y(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return Ae.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"]=Ae.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"]=Ae.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 xe({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,a=e.name,i=e.filePath,o=e.fileType,c=e.onUploadProgress;return new Promise((function(e,s){var u=t.adapter.uploadFile({url:n,formData:r,name:a,filePath:i,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):s(new xe({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){s(new xe({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof c&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(e){c({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,a=e.fileType,i=void 0===a?"image":a,o=e.onUploadProgress,c=e.config;if("string"!==F(r))throw new xe({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(r=r.trim()))throw new xe({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(r))throw new xe({code:"INVALID_PARAM",message:"cloudPath不合法"});var s,u,l=c&&c.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:l,filename:r}).then((function(e){var r=e.result;s=r.id,u="https://"+r.cdnDomain+"/"+r.ossPath;var a={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:s,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:i};return t.uploadFileToOSS(Object.assign({},a,{onUploadProgress:o}))})).then((function(){return t.reportOSSUpload({id:s})})).then((function(e){return new Promise((function(t,r){e.success?t({success:!0,filePath:n,fileID:u}):r(new xe({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 xe({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),Ce={init:function(e){var t=new je(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},De="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(Se||(Se={}));var $e,Le=function(){},Re=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new xe({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};function Ne(e){return void 0===e}function Me(e){return"[object Null]"===Object.prototype.toString.call(e)}function Ue(e){var t,n,r=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),a=h(r);try{for(a.s();!(n=a.n()).done;){var i=n.value,o=i.isMatch,c=i.genAdapter,s=i.runtime;if(o())return{adapter:c(),runtime:s}}}catch(u){a.e(u)}finally{a.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}($e||($e={}));var Fe={adapter:null,runtime:void 0},qe=["anonymousUuidKey"],Be=function(e){k(n,e);var t=O(n);function n(){var e;return x(this,n),e=t.call(this),Fe.adapter.root.tcbObject||(Fe.adapter.root.tcbObject={}),e}return y(n,[{key:"setItem",value:function(e,t){Fe.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return Fe.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete Fe.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete Fe.adapter.root.tcbObject}}]),n}(Le);function Ve(e,t){switch(e){case"local":return t.localStorage||new Be;case"none":return new Be;default:return t.sessionStorage||new Be}}var He=function(){function e(t){if(x(this,e),!this._storage){this._persistence=Fe.adapter.primaryStorage||t.persistence,this._storage=Ve(this._persistence,Fe.adapter);var n="access_token_".concat(t.env),r="access_token_expire_".concat(t.env),a="refresh_token_".concat(t.env),i="anonymous_uuid_".concat(t.env),o="login_type_".concat(t.env),c="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:r,refreshTokenKey:a,anonymousUuidKey:i,loginTypeKey:o,userInfoKey:c}}}return y(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=Ve(e,Fe.adapter);for(var r in this.keys){var a=this.keys[r];if(!t||!qe.includes(r)){var i=this._storage.getItem(a);Ne(i)||Me(i)||(n.setItem(a,i),this._storage.removeItem(a))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var r={version:n||"localCachev1",content:t},a=JSON.stringify(r);try{this._storage.setItem(e,a)}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}(),ze={},Ke={};function We(e){return ze[e]}var Je=function e(t,n){x(this,e),this.data=n||null,this.name=t},Ge=function(e){k(n,e);var t=O(n);function n(e,r){var a;return x(this,n),a=t.call(this,"error",{error:e,data:r}),a.error=e,a}return n}(Je),Ye=new(function(){function e(){x(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 Ge)return console.error(e.error),this;var n="string"==typeof e?new Je(e,t||{}):e,r=n.name;if(this._listens(r)){n.target=this;var a,i=this._listeners[r]?l(this._listeners[r]):[],o=h(i);try{for(o.s();!(a=o.n()).done;){var c=a.value;c.call(this,n)}}catch(s){o.e(s)}finally{o.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function Xe(e,t){Ye.on(e,t)}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ye.fire(e,t)}function Qe(e,t){Ye.off(e,t)}var et,tt="loginStateChanged",nt="loginStateExpire",rt="loginTypeChanged",at="anonymousConverted",it="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(et||(et={}));var ot=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],ct={"X-SDK-Version":"1.3.5"};function st(e,t,n){var r=e[t];e[t]=function(t){var a={},i={};n.forEach((function(n){var r=n.call(e,t),o=r.data,c=r.headers;Object.assign(a,o),Object.assign(i,c)}));var o=t.data;return o&&function(){var e;if(e=o,"[object FormData]"!==Object.prototype.toString.call(e))t.data=b(b({},o),a);else for(var n in a)o.append(n,a[n])}(),t.headers=b(b({},t.headers||{}),i),r.call(e,t)}}function ut(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:b(b({},ct),{},{"x-seqid":e})}}var lt=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x(this,e),this.config=n,this._reqClass=new Fe.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=We(this.config.env),this._localCache=(t=this.config.env,Ke[t]),st(this._reqClass,"post",[ut]),st(this._reqClass,"upload",[ut]),st(this._reqClass,"download",[ut])}return y(e,[{key:"post",value:function(){var e=u(a.default.mark((function e(t){return a.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=u(a.default.mark((function e(t){return a.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=u(a.default.mark((function e(t){return a.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=u(a.default.mark((function e(){var t,n;return a.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=u(a.default.mark((function e(){var t,n,r,i,o,c,s,u,l,f,d,p,h;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,o=t.loginTypeKey,c=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(r),s=this._cache.getStore(i),s){e.next=5;break}throw new xe({message:"未登录CloudBase"});case 5:return u={refresh_token:s},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",u);case 8:if(l=e.sent,!l.data.code){e.next=21;break}if(f=l.data.code,"SIGN_PARAM_INVALID"!==f&&"REFRESH_TOKEN_EXPIRED"!==f&&"INVALID_REFRESH_TOKEN"!==f){e.next=20;break}if(this._cache.getStore(o)!==et.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==f){e.next=19;break}return d=this._cache.getStore(c),p=this._cache.getStore(i),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:d,refresh_token:p});case 17:return h=e.sent,e.abrupt("return",(this.setRefreshToken(h.refresh_token),this._refreshAccessToken()));case 19:Ze(nt),this._cache.removeStore(i);case 20:throw new xe({code:l.data.code,message:"刷新access token失败:".concat(l.data.code)});case 21:if(!l.data.access_token){e.next=23;break}return e.abrupt("return",(Ze(it),this._cache.setStore(n,l.data.access_token),this._cache.setStore(r,l.data.access_token_expire+Date.now()),{accessToken:l.data.access_token,accessTokenExpire:l.data.access_token_expire}));case 23:l.data.refresh_token&&(this._cache.removeStore(i),this._cache.setStore(i,l.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=u(a.default.mark((function e(){var t,n,r,i,o,c,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,this._cache.getStore(i)){e.next=3;break}throw new xe({message:"refresh token不存在,登录状态异常"});case 3:if(o=this._cache.getStore(n),c=this._cache.getStore(r),s=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(o,c);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}s=!1;case 12:return e.abrupt("return",(!o||!c||c2&&void 0!==arguments[2]?arguments[2]:{},r=/\?/.test(t),a="";for(var i in n)""===a?!r&&(t+="?"):a+="&",a+="".concat(i,"=").concat(encodeURIComponent(n[i]));return/^http(s)?\:\/\//.test(t+=a)?t:"".concat(e).concat(t)}(De,"//tcb-api.tencentcloudapi.com/web",m),g&&(y+=g),e.next=22,this.post(b({url:y,data:u},d));case 22:if(_=e.sent,w=_.header&&_.header["x-tcb-trace"],w&&this._localCache.setStore(i,w),(200===Number(_.status)||200===Number(_.statusCode))&&_.data){e.next=26;break}throw new xe({code:"NETWORK_ERROR",message:"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=u(a.default.mark((function e(t){var n,r,i,o=arguments;return a.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!==ot.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(i=e.sent,!i.data.code){e.next=12;break}throw new xe({code:i.data.code,message:i.data.message});case 12:return e.abrupt("return",i.data);case 13:if(!r.data.code){e.next=15;break}throw new xe({code:r.data.code,message:r.data.message});case 15:return e.abrupt("return",r.data);case 16:case"end":return e.stop()}}),e,this)})));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,a=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(a,e)}}]),e}(),ft={};function dt(e){return ft[e]}var pt=function(){function e(t){x(this,e),this.config=t,this._cache=We(t.env),this._request=dt(t.env)}return y(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,a=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(a,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,r=n.accessTokenKey,a=n.accessTokenExpireKey;this._cache.setStore(r,e),this._cache.setStore(a,t)}},{key:"refreshUserInfo",value:function(){var e=u(a.default.mark((function e(){var t,n;return a.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}(),ht=function(){function e(t){if(x(this,e),!t)throw new xe({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=t,this._cache=We(this._envId),this._request=dt(this._envId),this.setUserInfo()}return y(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new xe({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new xe({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=u(a.default.mark((function e(){var t,n,r,i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,r=!1,i=n.users,e.abrupt("return",(i.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(r=!0)})),{users:i,hasPrimaryUid:r}));case 7:case"end":return e.stop()}}),e,this)})));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=u(a.default.mark((function e(t){var n,r,i,o,c,s,u,l;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,r=t.gender,i=t.avatarUrl,o=t.province,c=t.country,s=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:r,avatarUrl:i,province:o,country:c,city:s});case 8:u=e.sent,l=u.data,this.setLocalUserInfo(l);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=u(a.default.mark((function e(){var t,n;return a.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}(),vt=function(){function e(t){if(x(this,e),!t)throw new xe({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=We(t);var n=this._cache.keys,r=n.refreshTokenKey,a=n.accessTokenKey,i=n.accessTokenExpireKey,o=this._cache.getStore(r),c=this._cache.getStore(a),s=this._cache.getStore(i);this.credential={refreshToken:o,accessToken:c,accessTokenExpire:s},this.user=new ht(t)}return y(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===et.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===et.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===et.WECHAT||this.loginType===et.WECHAT_OPEN||this.loginType===et.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),gt=function(e){k(n,e);var t=O(n);function n(){return x(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=u(a.default.mark((function e(){var t,n,r,i,o,c,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,r=t.refreshTokenKey,i=this._cache.getStore(n)||void 0,o=this._cache.getStore(r)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:i,refresh_token:o});case 8:if(c=e.sent,!c.uuid||!c.refresh_token){e.next=20;break}return this._setAnonymousUUID(c.uuid),this.setRefreshToken(c.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.ANONYMOUS,persistence:"local"}),s=new vt(this.config.env),e.next=19,s.user.refresh();case 19:return e.abrupt("return",s);case 20:throw new xe({message:"匿名登录失败"});case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=u(a.default.mark((function e(t){var n,r,i,o,c,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,r=n.anonymousUuidKey,i=n.refreshTokenKey,o=this._cache.getStore(r),c=this._cache.getStore(i),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:o,refresh_token:c,ticket:t});case 7:if(s=e.sent,!s.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(s.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Ze(at,{env:this.config.env}),Ze(rt,{loginType:et.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:s.refresh_token}});case 16:throw new xe({message:"匿名转化失败"});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,et.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(pt),mt=function(e){k(n,e);var t=O(n);function n(){return x(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=u(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new xe({param:"PARAM_ERROR",message:"ticket must be a string"});case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(r=e.sent,!r.refresh_token){e.next=15;break}return this.setRefreshToken(r.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new vt(this.config.env));case 15:throw new xe({message:"自定义登录失败"});case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(pt),yt=function(e){k(n,e);var t=O(n);function n(){return x(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=u(a.default.mark((function e(t,n){var r,i,o,c,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new xe({code:"PARAM_ERROR",message:"email must be a string"});case 2:return r=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(r)||""});case 5:if(i=e.sent,o=i.refresh_token,c=i.access_token,s=i.access_token_expire,!o){e.next=22;break}if(this.setRefreshToken(o),!c||!s){e.next=15;break}this.setAccessToken(c,s),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new vt(this.config.env));case 22:throw i.code?new xe({code:i.code,message:"邮箱登录失败: ".concat(i.message)}):new xe({message:"邮箱登录失败"});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=u(a.default.mark((function e(t){return a.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=u(a.default.mark((function e(t,n){return a.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}(pt),_t=function(e){k(n,e);var t=O(n);function n(){return x(this,n),t.apply(this,arguments)}return y(n,[{key:"signIn",value:function(){var e=u(a.default.mark((function e(t,n){var r,i,o,c,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new xe({code:"PARAM_ERROR",message:"username must be a string"});case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),r=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:et.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(r)||""});case 6:if(i=e.sent,o=i.refresh_token,c=i.access_token_expire,s=i.access_token,!o){e.next=23;break}if(this.setRefreshToken(o),!s||!c){e.next=16;break}this.setAccessToken(s,c),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Ze(tt),Ze(rt,{env:this.config.env,loginType:et.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new vt(this.config.env));case 23:throw i.code?new xe({code:i.code,message:"用户名密码登录失败: ".concat(i.message)}):new xe({message:"用户名密码登录失败"});case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(pt),bt=function(){function e(t){x(this,e),this.config=t,this._cache=We(t.env),this._request=dt(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Xe(rt,this._onLoginTypeChanged)}return y(e,[{key:"anonymousAuthProvider",value:function(){return new gt(this.config)}},{key:"customAuthProvider",value:function(){return new mt(this.config)}},{key:"emailAuthProvider",value:function(){return new yt(this.config)}},{key:"usernameAuthProvider",value:function(){return new _t(this.config)}},{key:"signInAnonymously",value:function(){var e=u(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new gt(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=u(a.default.mark((function e(t,n){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new yt(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 _t(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=u(a.default.mark((function e(t){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new gt(this.config)),Xe(at,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=u(a.default.mark((function e(){var t,n,r,i,o,c;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==et.ANONYMOUS){e.next=2;break}throw new xe({message:"匿名用户不支持登出操作"});case 2:if(t=this._cache.keys,n=t.refreshTokenKey,r=t.accessTokenKey,i=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 c=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(r),this._cache.removeStore(i),Ze(tt),Ze(rt,{env:this.config.env,loginType:et.NULL,persistence:this.config.persistence}),c));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=u(a.default.mark((function e(t,n){return a.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=u(a.default.mark((function e(t){return a.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;Xe(tt,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){Xe(nt,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){Xe(it,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){Xe(at,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;Xe(rt,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=u(a.default.mark((function e(){return a.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 vt(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=u(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new xe({code:"PARAM_ERROR",message:"username must be a string"});case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,r=n.data,e.abrupt("return",r&&r.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));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=u(a.default.mark((function e(t){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new mt(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:b(b({},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,a=t.env;a===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}(),wt=function(e,t){t=t||Re();var n=dt(this.config.env),r=e.cloudPath,a=e.filePath,i=e.onUploadProgress,o=e.fileType,c=void 0===o?"image":o;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){var o=e.data,s=o.url,u=o.authorization,l=o.token,f=o.fileId,d=o.cosFileId,p=e.requestId,h={key:r,signature:u,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":l};n.upload({url:s,data:h,file:a,name:r,fileType:c,onUploadProgress:i}).then((function(e){201===e.statusCode?t(null,{fileID:f,requestId:p}):t(new xe({code:"STORAGE_REQUEST_FAIL",message:"STORAGE_REQUEST_FAIL: ".concat(e.data)}))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},xt=function(e,t){t=t||Re();var n=dt(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},kt=function(e,t){var n=e.fileList;if(t=t||Re(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var r,a=h(n);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(!i||"string"!=typeof i)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(c){a.e(c)}finally{a.f()}var o={fileid_list:n};return dt(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||Re(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var r,a=[],i=h(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;"object"==typeof o?(o.hasOwnProperty("fileID")&&o.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),a.push({fileid:o.fileID,max_age:o.maxAge})):"string"==typeof o?a.push({fileid:o}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(s){i.e(s)}finally{i.f()}var c={file_list:a};return dt(this.config.env).send("storage.batchGetDownloadUrl",c).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=u(a.default.mark((function e(t,n){var r,i,o,c;return a.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(i=e.sent.fileList[0],"SUCCESS"===i.code){e.next=6;break}return e.abrupt("return",n?n(i):new Promise((function(e){e(i)})));case 6:if(o=dt(this.config.env),c=i.download_url,c=encodeURI(c),n){e.next=10;break}return e.abrupt("return",o.download({url:c}));case 10:return e.t0=n,e.next=13,o.download({url:c});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)}}(),At=function(e,t){var n,r=e.name,a=e.data,i=e.query,o=e.parse,c=e.search,s=t||Re();try{n=a?JSON.stringify(a):""}catch(r){return Promise.reject(r)}if(!r)return Promise.reject(new xe({code:"PARAM_ERROR",message:"函数名不能为空"}));var u={inQuery:i,parse:o,search:c,function_name:r,request_data:n};return dt(this.config.env).send("functions.invokeFunction",u).then((function(e){if(e.code)s(null,e);else{var t=e.data.response_data;if(o)s(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),s(null,{result:t,requestId:e.requestId})}catch(e){s(new xe({message:"response data must be json"}))}}return s.promise})).catch((function(e){s(e)})),s.promise},Pt={timeout:15e3,persistence:"session"},Tt={},Et=function(){function e(t){x(this,e),this.config=t||this.config,this.authObj=void 0}return y(e,[{key:"init",value:function(t){switch(Fe.adapter||(this.requestClient=new Fe.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=b(b({},Pt),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||Fe.adapter.primaryStorage||Pt.persistence;return r!==this.config.persistence&&(this.config.persistence=r),function(e){var t=e.env;ze[t]=new He(e),Ke[t]=new He(b(b({},e),{},{persistence:"local"}))}(this.config),n=this.config,ft[n.env]=new lt(n),this.authObj=new bt(this.config),this.authObj}},{key:"on",value:function(e,t){return Xe.apply(this,[e,t])}},{key:"off",value:function(e,t){return Qe.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return At.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return kt.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 wt.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return xt.apply(this,[e,t])}},{key:"registerExtension",value:function(e){Tt[e.name]=e}},{key:"invokeExtension",value:function(){var e=u(a.default.mark((function e(t,n){var r;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=Tt[t],r){e.next=3;break}throw new xe({message:"扩展".concat(t," 必须先注册")});case 3:return e.next=5,r.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=Ue(e)||{},n=t.adapter,r=t.runtime;n&&(Fe.adapter=n),r&&(Fe.runtime=r)}}]),e}(),It=new Et;function jt(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),a="";for(var i in n)""===a?!r&&(t+="?"):a+="&",a+=i+"="+encodeURIComponent(n[i]);return/^http(s)?:\/\//.test(t+=a)?t:""+e+t}var Ct=function(){function e(){x(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,a){Pe.request({url:jt("https:",t),data:n,method:"POST",header:r,success:function(t){e(t)},fail:function(e){a(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var r=e.url,a=e.file,i=e.data,o=e.headers,c=e.fileType,s=Pe.uploadFile({url:jt("https:",r),name:"file",formData:Object.assign({},i),filePath:a,fileType:c,header:o,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&i.success_action_status&&(n.statusCode=parseInt(i.success_action_status,10)),t(n)},fail:function(e){n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&s&&"function"==typeof s.onProgressUpdate&&s.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),Dt={setItem:function(e,t){Pe.setStorageSync(e,t)},getItem:function(e){return Pe.getStorageSync(e)},removeItem:function(e){Pe.removeStorageSync(e)},clear:function(){Pe.clearStorageSync()}},$t={genAdapter:function(){return{root:{},reqClass:Ct,localStorage:Dt,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};It.useAdapters($t);var Lt=It,Rt=Lt.init;Lt.init=function(e){e.env=e.spaceId;var t=Rt.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]=be(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var Nt=Lt;function Mt(){return{token:Pe.getStorageSync("uni_id_token")||Pe.getStorageSync("uniIdToken"),tokenExpired:Pe.getStorageSync("uni_id_token_expired")}}function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&Pe.setStorageSync("uni_id_token",t),n&&Pe.setStorageSync("uni_id_token_expired",n)}function Ft(){H&&"web"===V&&r.getStorageSync("__LAST_DCLOUD_APPID")!==G&&(r.setStorageSync("__LAST_DCLOUD_APPID",G),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),Pe.removeStorageSync("uni_id_token"),Pe.removeStorageSync("uniIdToken"),Pe.removeStorageSync("uni_id_token_expired"))}var qt=function(e){k(n,e);var t=O(n);function n(){return x(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"]=Ae.sign(n,this.config.clientSecret);var a=Oe();r["x-client-info"]=encodeURIComponent(JSON.stringify(a));var i=Mt(),o=i.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,a=e.name,i=e.filePath,o=e.fileType,c=e.onUploadProgress;return new Promise((function(e,s){var u=t.adapter.uploadFile({url:n,formData:r,name:a,filePath:i,fileType:o,success:function(t){t&&t.statusCode<400?e(t):s(new xe({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){s(new xe({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof c&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(e){c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,r=e.filePath,a=e.cloudPath,i=e.fileType,o=void 0===i?"image":i,c=e.onUploadProgress;if(!a)throw new xe({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:a}).then((function(e){var a=e.result,i=a.url,s=a.formData,u=a.name;t=e.result.fileUrl;var l={url:i,formData:s,name:u,filePath:r,fileType:o};return n.uploadFileToOSS(Object.assign({},l,{onUploadProgress:c}))})).then((function(){return n.reportOSSUpload({cloudPath:a})})).then((function(e){return new Promise((function(n,a){e.success?n({success:!0,filePath:r,fileID:t}):a(new xe({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}(je),Bt={init:function(e){var t=new qt(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 Vt(e){var t,n=e.data;t=Oe();var r=JSON.parse(JSON.stringify(n||{}));if(Object.assign(r,{clientInfo:t}),!r.uniIdToken){var a=Mt(),i=a.token;i&&(r.uniIdToken=i)}return r}function Ht(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,r=t.data,a=this.__dev__,i=a.localAddress,o=a.localPort,c={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],s=this.config.spaceId,u="http://".concat(i,":").concat(o,"/system/check-function"),l="http://".concat(i,":").concat(o,"/cloudfunctions/").concat(n);return new Promise((function(e,t){Pe.request({method:"POST",url:u,data:{name:n,platform:V,provider:c,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,a=n.message;return{code:0===r?0:r||"SYS_ERR",message:a||"SYS_ERR"}})).then((function(t){var a=t.code,i=t.message;if(0!==a){switch(a){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(i||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var o="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(o),new Error(o);case"SWITCH_TO_CLOUD":break;default:var s="检测本地调试服务出现错误:".concat(i,",请检查网络环境或重启客户端再试");throw console.error(s),new Error(s)}return e._callCloudFunction({name:n,data:r})}return new Promise((function(t,n){var a=Vt.call(e,{data:r});Pe.request({method:"POST",url:l,data:{provider:c,platform:V,param:a},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.statusCode,a=e.data;return!r||r>=400?n(new xe({code:a.code||"SYS_ERR",message:a.message||"request:fail"})):t({result:a})},fail:function(e){n(new xe({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var zt=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Kt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(Kt.source);function Jt(e,t,n){return e.replace(new RegExp((r=t)&&Wt.test(r)?r.replace(Kt,"\\$&"):r,"g"),n);var r}function Gt(e){var t=e.functionName,n=e.result,r=e.logPvd;if(this.__dev__.debugLog&&n&&n.requestId){var a=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(r,"-request]").concat(a,"[/").concat(r,"-request]"))}}function Yt(e){var t=e.callFunction,n=function(n){var r=this,a=n.name;n.data=Vt.call(e,{data:n.data});var i={aliyun:"aliyun",tencent:"tcb",tcb:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return e.errCode=0,Gt.call(r,{functionName:a,result:e,logPvd:i}),Promise.resolve(e)}),(function(e){return Gt.call(r,{functionName:a,result:e,logPvd:i}),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,a=void 0===r?{}:r,i=e.formatter,o=void 0===i?[]:i,c=0;c-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 en=["db.Geo","db.command","command.aggregate"];function tn(e,t){return en.indexOf("".concat(e,".").concat(t))>-1}function nn(e){switch(F(e)){case"array":return e.map((function(e){return nn(e)}));case"object":return e._internalType===Xt||Object.keys(e).forEach((function(t){e[t]=nn(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function rn(e){return e&&e.content&&e.content.$method}var an=function(){function e(t,n,r){x(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:nn(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:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"_send",value:function(e,t){var n=this.getAction(),r=this.getCommand();if(r.$db.push({$method:e,$param:nn(t)}),H){var a=r.$db.find((function(e){return"collection"===e.$method})),i=a&&a.$param;i&&1===i.length&&"string"==typeof a.$param[0]&&a.$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:"isAggregate",get:function(){for(var e=this;e;){var t=rn(e),n=rn(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}},{key:"isCommand",get:function(){for(var e=this;e;){if("command"===rn(e))return!0;e=e.prevStage}return!1}},{key:"isAggregateCommand",get:function(){for(var e=this;e;){var t=rn(e),n=rn(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}},{key:"count",get:function(){if(!this.isAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return on({$method:"count",$param:nn(Array.from(arguments))},e,this._database)}}},{key:"remove",get:function(){if(!this.isCommand)return function(){return this._send("remove",Array.from(arguments))};var e=this;return function(){return on({$method:"remove",$param:nn(Array.from(arguments))},e,this._database)}}},{key:"set",get:function(){if(!this.isCommand)return function(){throw new Error("JQL禁止使用set方法")};var e=this;return function(){return on({$method:"set",$param:nn(Array.from(arguments))},e,this._database)}}}]),e}();function on(e,t,n){return Zt(new an(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),tn(r,t)?on({$method:t},e,n):function(){return on({$method:t,$param:nn(Array.from(arguments))},e,n)}}})}function cn(e){var t=e.path,n=e.method;return function(){function e(){x(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 sn=function(e){k(n,e);var t=O(n);function n(){return x(this,n),t.apply(this,arguments)}return y(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,r=e.command,a=e.multiCommand,i=e.queryList;function o(e,t){if(a&&i)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,r=void 0===n?{}:n;x(this,e),this._uniClient=r,this._authCallBacks={},this._dbCallBacks={},r.isDefault&&(this._dbCallBacks=Z("_globalUniCloudDatabaseCallback")),this.auth=Qt(this._authCallBacks),Object.assign(this,Qt(this._dbCallBacks)),this.env=Zt({},{get:function(e,t){return{$env:t}}}),this.Geo=Zt({},{get:function(e,t){return cn({path:["Geo"],method:t})}}),this.serverDate=cn({path:[],method:"serverDate"}),this.RegExp=cn({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 un(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 Zt(new e(t),{get:function(e,t){return tn("db",t)?on({$method:t},null,e):function(){return on({$method:t,$param:nn(Array.from(arguments))},null,e)}}})}(sn,{uniClient:e});return this._database=n,n}}var ln="token无效,跳转登录页面",fn="token过期,跳转登录页面",dn={TOKEN_INVALID_TOKEN_EXPIRED:fn,TOKEN_INVALID_INVALID_CLIENTID:ln,TOKEN_INVALID:ln,TOKEN_INVALID_WRONG_TOKEN:ln,TOKEN_INVALID_ANONYMOUS_USER:ln},pn={"uni-id-token-expired":fn,"uni-id-check-token-failed":ln,"uni-id-token-not-exist":ln,"uni-id-check-device-feature-failed":ln};function hn(e,t){var n="";return n=e?"".concat(e,"/").concat(t):t,n.replace(/^\//,"")}function vn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=[];return e.forEach((function(e){!0===e.needLogin?n.push(hn(t,e.path)):!1===e.needLogin&&r.push(hn(t,e.path))})),{needLoginPage:n,notNeedLoginPage:r}}function gn(e){return e.split("?")[0].replace(/^\//,"")}function mn(){return function(e){var t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){var e=getCurrentPages();return e[e.length-1]}())}function yn(){return gn(mn())}function _n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;var n=t.list,r=gn(e);return n.some((function(e){return e.pagePath===r}))}var bn,wn=!!o.default.uniIdRouter,xn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.default,t=e.pages,n=void 0===t?[]:t,r=e.subPackages,a=void 0===r?[]:r,i=e.uniIdRouter,c=void 0===i?{}:i,s=e.tabBar,u=void 0===s?{}:s,f=c.loginPage,d=c.needLogin,p=void 0===d?[]:d,h=c.resToLogin,v=void 0===h||h,g=vn(n),m=g.needLoginPage,y=g.notNeedLoginPage,_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];return e.forEach((function(e){var r=e.root,a=e.pages,i=void 0===a?[]:a,o=vn(i,r),c=o.needLoginPage,s=o.notNeedLoginPage;t.push.apply(t,l(c)),n.push.apply(n,l(s))})),{needLoginPage:t,notNeedLoginPage:n}}(a),b=_.needLoginPage,w=_.notNeedLoginPage;return{loginPage:f,routerNeedLogin:p,resToLogin:v,needLoginPage:[].concat(l(m),l(b)),notNeedLoginPage:[].concat(l(y),l(w)),loginPageInTabBar:_n(f,u)}}(),kn=xn.loginPage,On=xn.routerNeedLogin,Sn=xn.resToLogin,An=xn.needLoginPage,Pn=xn.notNeedLoginPage,Tn=xn.loginPageInTabBar;if(An.indexOf(kn)>-1)throw new Error("Login page [".concat(kn,'] should not be "needLogin", please check your pages.json'));function En(e){var t=gn(function(e){var t=yn(),n=e.charAt(0),r=e.split("?")[0];if("/"===n)return r;var a=r.replace(/^\//,"").split("/"),i=t.split("/");i.pop();for(var o=0;o-1)&&(An.indexOf(t)>-1||On.some((function(t){return function(e,t){return new RegExp(t).test(e)}(e,t)})))}function In(e){var t=e.redirect,n=gn(t),r=gn(kn);return yn()!==r&&n!==r}function jn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.api,n=e.redirect;if(n&&In({redirect:n})){var a=function(e,t){return"/"!==e.charAt(0)&&(e="/"+e),t?e.indexOf("?")>-1?e+"&uniIdRedirectUrl=".concat(encodeURIComponent(t)):e+"?uniIdRedirectUrl=".concat(encodeURIComponent(t)):e}(kn,n);Tn?"navigateTo"!==t&&"redirectTo"!==t||(t="switchTab"):"switchTab"===t&&(t="navigateTo"),setTimeout((function(){r[t]({url:a})}))}}function Cn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n={abortLoginPageJump:!1,autoToLoginPage:!1},r=function(){var e,t=Mt(),n=t.token,r=t.tokenExpired;if(n){if(r0)return setTimeout((function(){ge(se,r)}),0),n.abortLoginPageJump=!0,n;n.autoToLoginPage=!0}return n}function Dn(){!function(){var e=mn(),t=Cn({url:e}),n=t.abortLoginPageJump,r=t.autoToLoginPage;n||r&&jn({api:"redirectTo",redirect:e})}();for(var e=["navigateTo","redirectTo","reLaunch","switchTab"],t=function(t){var n=e[t];r.addInterceptor(n,{invoke:function(e){var t=Cn({url:e.url}),r=t.abortLoginPageJump,a=t.autoToLoginPage;return r?e:a?(jn({api:n,redirect:e.url}),!1):e}})},n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=pe(se);_e().then((function(){var n=mn();if(n&&In({redirect:n}))return t.length>0?ge(se,Object.assign({uniIdRedirectUrl:n},e)):void(kn&&jn({api:"navigateTo",redirect:n}))}))}(n)}))}function Ln(e){!function(e){e.onResponse=function(e){he(ce,e)},e.offResponse=function(e){ve(ce,e)}}(e),function(e){e.onNeedLogin=function(e){he(se,e)},e.offNeedLogin=function(e){ve(se,e)},wn&&(Z("uni-cloud-status").needLoginInit||(Z("uni-cloud-status").needLoginInit=!0,_e().then((function(){Dn.call(e)})),Sn&&$n.call(e)))}(e),function(e){e.onRefreshToken=function(e){he(ue,e)},e.offRefreshToken=function(e){ve(ue,e)}}(e)}var Rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Nn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Mn(){var e,t,n=Mt().token||"",r=n.split(".");if(!n||3!==r.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=r[1],decodeURIComponent(bn(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}bn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Nn.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,a="",i=0;i>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return a}:atob;var Un=$((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",a="chooseAndUploadFile:fail";function i(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 a=r.onChooseFile,i=r.onUploadProgress;return t.then((function(e){if(a){var t=a(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,a=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var i=t.tempFiles,o=i.length,c=0;return new Promise((function(n){for(;c=o)!i.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var u=i[r];e.uploadFile({filePath:u.path,cloudPath:u.cloudPath,fileType:u.fileType,onUploadProgress:function(e){e.index=r,e.tempFile=u,e.tempFilePath=u.path,a&&a(e)}}).then((function(e){u.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,c=void 0===o?["album","camera"]:o,s=e.extension;return new Promise((function(e,o){r.chooseImage({count:t,sizeType:n,sourceType:c,extension:s,success:function(t){e(i(t,"image"))},fail:function(e){o({errMsg:e.errMsg.replace("chooseImage:fail",a)})}})}))}(t),t):"video"===t.type?o(e,function(e){var t=e.camera,n=e.compressed,o=e.maxDuration,c=e.sourceType,s=void 0===c?["album","camera"]:c,u=e.extension;return new Promise((function(e,c){r.chooseVideo({camera:t,compressed:n,maxDuration:o,sourceType:s,extension:u,success:function(t){var n=t.tempFilePath,r=t.duration,a=t.size,o=t.height,c=t.width;e(i({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:a,type:t.tempFile&&t.tempFile.type||"",width:c,height:o,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){c({errMsg:e.errMsg.replace("chooseVideo:fail",a)})}})}))}(t),t):o(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,o){var c=r.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(c=wx.chooseMessageFile),"function"!=typeof c)return o({errMsg:a+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});c({type:"all",count:t,extension:n,success:function(t){e(i(t))},fail:function(e){o({errMsg:e.errMsg.replace("chooseFile:fail",a)})}})}))}(t),t)}}})),Fn=D(Un),qn="manual";function Bn(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!==qn){for(var r=!1,a=[],i=2;i0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,a=t.success,i=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,i=n.data,o=n.count;e.getcount&&(e.mixinDatacomPage.count=o),e.mixinDatacomHasMore=i.length0&&void 0!==arguments[0]?arguments[0]:{},r=e.database(this.spaceInfo),a=n.action||this.action;a&&(r=r.action(a));var i=n.collection||this.collection;r=Array.isArray(i)?(t=r).collection.apply(t,l(i)):r.collection(i);var o=n.where||this.where;o&&Object.keys(o).length&&(r=r.where(o));var c=n.field||this.field;c&&(r=r.field(c));var s=n.foreignKey||this.foreignKey;s&&(r=r.foreignKey(s));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 d=n.orderby||this.orderby;d&&(r=r.orderBy(d));var p=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,h=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,v=void 0!==n.getcount?n.getcount:this.getcount,g=void 0!==n.gettree?n.gettree:this.gettree,m=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,y={getCount:v},_={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return g&&(y.getTree=_),m&&(y.getTreePath=_),r=r.skip(h*(p-1)).limit(h).get(y),r}}}}function Vn(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),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);var i=n,o=i.customUI,c=i.loadingOptions,s=i.errorOptions,l=!o;return new Proxy({},{get:function(i,o){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fn,n=e.interceptorName,r=e.getCallbackArgs;return u(a.default.mark((function e(){var i,o,c,s,u,l,f=arguments;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(i=f.length,o=new Array(i),c=0;c0&&void 0!==u[0]?u[0]:{},n=t.title,i=t.content,o=t.showCancel,c=t.cancelText,s=t.confirmText,e.abrupt("return",new Promise((function(e,t){r.showModal({title:n,content:i,showCancel:o,cancelText:c,confirmText:s,success:function(t){e(t)},fail:function(){e({confirm:!1,cancel:!0})}})})));case 2:case"end":return e.stop()}}),e)})))({title:"提示",content:_,showCancel:s.retry,cancelText:"取消",confirmText:s.retry?"重试":"确定"});case 24:if(x=i.sent,k=x.confirm,!s.retry||!k){i.next=28;break}return i.abrupt("return",f.apply(void 0,h));case 28:throw O=new xe({code:y,message:_,requestId:d.requestId}),O.detail=d.result,ge(ce,{type:de,content:O}),O;case 30:return i.abrupt("return",(ge(ce,{type:de,content:d.result}),d.result));case 31:case"end":return i.stop()}}),i,null,[[4,10]])})));function f(){return i.apply(this,arguments)}return f}(),interceptorName:"callObject",getCallbackArgs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.params;return{objectName:t,methodName:o,params:n}}})}})}}function Hn(e,t){return zn.apply(this,arguments)}function zn(){return zn=u(a.default.mark((function e(t,n){var r,i,o;return a.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){Pe.request(b(b({},o),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return i=e.sent,e.abrupt("return",!(!i.data||0!==i.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]])}))),zn.apply(this,arguments)}function Kn(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 i=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return i.getLoginState()})).then((function(e){return e?Promise.resolve():i.signInAnonymously()})).then((function(){if(!H)return Promise.resolve();if("app"===V){var t=r.getSystemInfoSync(),n=t.osName,i=t.osVersion;"ios"===n&&function(e){if(!e||"string"!=typeof e)return 0;var t=e.match(/^(\d+)./);return t&&t[1]?parseInt(t[1]):0}(i)>=14&&console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)")}if(H&&e.__dev__.debugInfo){var o=e.__dev__.debugInfo,c=o.address,s=o.servePort;return function(){var e=u(a.default.mark((function e(t,n){var r,i,o;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,r=t.port;if(!H)return Promise.resolve();var a=console["app"===V?"error":"warn"];if(n)e.__dev__.localAddress=n,e.__dev__.localPort=r;else if(e.__dev__.debugInfo){var i="";"remote"===e.__dev__.debugInfo.initialLaunchType?(e.__dev__.debugInfo.forceRemote=!0,i="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):i="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","web"===V&&(i+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),0===V.indexOf("mp-")&&(i+="\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"),a(i)}})).then((function(){Ft(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var Wn={tcb:Nt,tencent:Nt,aliyun:Ce,private:Bt},Jn=new(function(){function e(){x(this,e)}return y(e,[{key:"init",value:function(e){var t={},n=Wn[e.provider];if(!n)throw new Error("未提供正确的provider参数");t=n.init(e),t.__dev__={},t.__dev__.debugLog=H&&("web"===V&&navigator.userAgent.indexOf("HBuilderX")>0||"app"===V);var r=K;return H&&r&&!r.code&&(t.__dev__.debugInfo=r),Kn(t),t.reInit=function(){Kn(this)},Yt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),un(t),function(e){e.getCurrentUserInfo=Mn,e.chooseAndUploadFile=Fn.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Bn(e)}}),e.importObject=Vn(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]=be(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=W,t={};if(e&&1===e.length)t=e[0],Jn=Jn.init(t),Jn.isDefault=!0;else{var n,r=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":J?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",r.forEach((function(e){Jn[e]=function(){return console.error(n),Promise.reject(new xe({code:"SYS_ERR",message:n}))}}))}Object.assign(Jn,{get mixinDatacom(){return Bn(Jn)}}),Ln(Jn),Jn.addInterceptor=te,Jn.removeInterceptor=ne,Jn.interceptObject=ie,H&&"web"===V&&(window.uniCloud=Jn)})();var Gn=Jn;t.default=Gn}).call(this,n("c8ba"),n("543d")["default"])},ac9d:function(e){e.exports=JSON.parse('{"uni-load-more.contentdown":"上拉显示更多","uni-load-more.contentrefresh":"正在加载...","uni-load-more.contentnomore":"没有更多数据了"}')},b583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("a34a")),a=o(n("a70e")),i=n("68aa");function o(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,a,i,o){try{var c=e[i](o),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){c(i,r,a,o,s,"next",e)}function s(e){c(i,r,a,o,s,"throw",e)}o(void 0)}))}}var u=function(){var e=s(r.default.mark((function e(t){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a.default.post({url:"/user/login",data:t});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=s(r.default.mark((function e(t){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a.default.post({url:"/wxa/business/getuserphonenumber?appid=".concat(t.appid),data:{code:t.code}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=s(r.default.mark((function e(){var t;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a.default.get({url:"".concat(i.BASE_URL.imgUrl,"/config.json")});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),d={login:u,getPhone:l,getJson:f};t.default=d},b635:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("a34a")),a=i(n("a70e"));function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r,a,i,o){try{var c=e[i](o),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function c(e){o(i,r,a,c,s,"next",e)}function s(e){o(i,r,a,c,s,"throw",e)}c(void 0)}))}}var s=function(){var e=c(r.default.mark((function e(t){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,a.default.get({url:"/recruit/list",data:t});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,a.default.get({url:"/recruit/details/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,a.default.get({url:"/recruit/status/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=c(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,a.default.post({url:"/recruit/report/".concat(n)});case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),d={getList:s,getDetails:u,getStatus:l,report:f};t.default=d},b8b2:function(e){e.exports=JSON.parse('{"uni-goods-nav.options.shop":"店鋪","uni-goods-nav.options.cart":"購物車","uni-goods-nav.buttonGroup.addToCart":"加入購物車","uni-goods-nav.buttonGroup.buyNow":"立即購買"}')},bbdd:function(e,t,n){var r=function(){return this||"object"===typeof self&&self}()||Function("return this")(),a=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=a&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n("96cf"),a)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(o){r.regeneratorRuntime=void 0}},bc6f:function(e){e.exports=JSON.parse('{"uni-load-more.contentdown":"上拉顯示更多","uni-load-more.contentrefresh":"正在加載...","uni-load-more.contentnomore":"沒有更多數據了"}')},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},d28e:function(e){e.exports=JSON.parse('{"uni-datetime-picker.selectDate":"select date","uni-datetime-picker.selectTime":"select time","uni-datetime-picker.selectDateTime":"select datetime","uni-datetime-picker.startDate":"start date","uni-datetime-picker.endDate":"end date","uni-datetime-picker.startTime":"start time","uni-datetime-picker.endTime":"end time","uni-datetime-picker.ok":"ok","uni-datetime-picker.clear":"clear","uni-datetime-picker.cancel":"cancel","uni-datetime-picker.year":"-","uni-datetime-picker.month":"","uni-calender.MON":"MON","uni-calender.TUE":"TUE","uni-calender.WED":"WED","uni-calender.THU":"THU","uni-calender.FRI":"FRI","uni-calender.SAT":"SAT","uni-calender.SUN":"SUN","uni-calender.confirm":"confirm"}')},d69c:function(e,t){},e250: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*(\/?)>/,a=/^<\/([-A-Za-z0-9_]+)[^>]*>/,i=/([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(h[r]===n)break}else r=0;if(r>=0){for(var a=h.length-1;a>=r;a-=1)t.end&&t.end(h[a]);h.length=r}}function g(e,n,r,a){if(n=n.toLowerCase(),s[n])while(h.last()&&u[h.last()])v("",h.last());if(l[n]&&h.last()===n&&v("",n),a=c[n]||!!a,a||h.push(n),t.start){var o=[];r.replace(i,(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,a)}}h.last=function(){return h[h.length-1]};while(e){if(o=!0,0===e.indexOf("0&&void 0!==arguments[0]?arguments[0]:{},n=(t.date,t.selected),a=t.startDate,i=t.endDate,o=t.range;r(this,e),this.date=this.getDate(new Date),this.selected=n||[],this.startDate=a,this.endDate=i,this.range=o,this.cleanMultipleStatus(),this.weeks={},this.lastHover=!1}return i(e,[{key:"setDate",value:function(e){this.selectDate=this.getDate(e),this._getWeek(this.selectDate.fullDate)}},{key:"cleanMultipleStatus",value:function(){this.multipleStatus={before:"",after:"",data:[]}}},{key:"resetSatrtDate",value:function(e){this.startDate=e}},{key:"resetEndDate",value:function(e){this.endDate=e}},{key:"getDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day";e||(e=new Date),"object"!==typeof e&&(e=e.replace(/-/g,"/"));var r=new Date(e);switch(n){case"day":r.setDate(r.getDate()+t);break;case"month":31===r.getDate()?r.setDate(r.getDate()+t):r.setMonth(r.getMonth()+t);break;case"year":r.setFullYear(r.getFullYear()+t);break}var a=r.getFullYear(),i=r.getMonth()+1<10?"0"+(r.getMonth()+1):r.getMonth()+1,o=r.getDate()<10?"0"+r.getDate():r.getDate();return{fullDate:a+"-"+i+"-"+o,year:a,month:i,date:o,day:r.getDay()}}},{key:"_getLastMonthDays",value:function(e,t){for(var n=[],r=e;r>0;r--){var a=new Date(t.year,t.month-1,1-r).getDate();n.push({date:a,month:t.month-1,disable:!0})}return n}},{key:"_currentMonthDys",value:function(e,t){for(var n=this,r=[],a=this.date.fullDate,i=function(e){var i=t.year+"-"+(t.month,t.month+"-")+(e<10?"0"+e:e),o=a===i,c=n.selected&&n.selected.find((function(e){if(n.dateEqual(i,e.date))return e})),s=!0,u=!0;n.startDate&&(s=n.dateCompare(n.startDate,i)),n.endDate&&(u=n.dateCompare(i,n.endDate));var l=n.multipleStatus.data,f=!1,d=-1;n.range&&(l&&(d=l.findIndex((function(e){return n.dateEqual(e,i)}))),-1!==d&&(f=!0));var p={fullDate:i,year:t.year,date:e,multiple:!!n.range&&f,beforeMultiple:n.isLogicBefore(i,n.multipleStatus.before,n.multipleStatus.after),afterMultiple:n.isLogicAfter(i,n.multipleStatus.before,n.multipleStatus.after),month:t.month,disable:!(s&&u),isDay:o,userChecked:!1};c&&(p.extraInfo=c),r.push(p)},o=1;o<=e;o++)i(o);return r}},{key:"_getNextMonthDays",value:function(e,t){for(var n=[],r=1;r "),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 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(/ |$#8201;| /g,""),e=e.replace(/‌|‌|‌/g,""),e=e.replace(/‍|$#8205;|‍/g,""),e=e.replace(/‎|$#8206;|‎/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 c(e){return e=r(e),e=a(e),e=i(e),e=o(e),e}function s(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 u={strDiscode:c,urlToHttpUrl:s};t.default=u}}]);