diff --git a/lib/h5/main.js b/lib/h5/main.js index 6c844a43a58c7af42fcb523732a2237056b017b0..508f7554dd83dfeeb7f07ff639b3d2fa06098735 100644 --- a/lib/h5/main.js +++ b/lib/h5/main.js @@ -7,11 +7,15 @@ import Vue from 'vue' // import 'uni-platform/view/index.css' import initVue from 'uni-core/vue' -global.UniViewJSBridge = { +global.UniViewJSBridge = { + subscribe: UniViewJSBridge.subscribe, + publishHandler: UniViewJSBridge.publishHandler, subscribeHandler: UniViewJSBridge.subscribeHandler } -global.UniServiceJSBridge = { +global.UniServiceJSBridge = { + subscribe: UniServiceJSBridge.subscribe, + publishHandler: UniServiceJSBridge.publishHandler, subscribeHandler: UniServiceJSBridge.subscribeHandler } diff --git a/packages/uni-automator/dist/index.js b/packages/uni-automator/dist/index.js index 161c6f84edd7c1c2a26641cd093241e74a110b0e..f3dab860211d89935535be1d038cfef3cf81e548 100644 --- a/packages/uni-automator/dist/index.js +++ b/packages/uni-automator/dist/index.js @@ -1,4 +1,4 @@ -"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("fs")),n=t(require("path")),s=t(require("debug")),o=require("child_process"),i=t(o),r=t(require("licia/getPort")),a=t(require("licia/toStr")),c=t(require("licia/waitUntil")),l=t(require("licia/concat")),p=t(require("licia/sleep")),u=t(require("licia/isRelative")),h=t(require("licia/dateFormat")),d=t(require("ws")),m=require("events"),y=t(require("licia/uuid")),g=t(require("licia/stringify")),v=t(require("licia/fs")),w=t(require("licia/isFn")),f=t(require("licia/trim")),P=t(require("licia/isStr")),M=t(require("licia/startWith")),E=t(require("licia/isNum")),k=t(require("licia/isUndef"));require("jimp");class C extends m.EventEmitter{constructor(t){super(),this.ws=t,this.ws.addEventListener("message",t=>{this.emit("message",t.data)}),this.ws.addEventListener("close",()=>{this.emit("close")})}send(t){this.ws.send(t)}close(){this.ws.close()}}class b extends m.EventEmitter{constructor(t,e,n){super(),this.puppet=e,this.namespace=n,this.callbacks=new Map,this.transport=t,this.debug=s("automator:protocol:"+this.namespace),this.onMessage=t=>{this.debug(`${h("yyyy-mm-dd HH:MM:ss:l")} ◀ RECV ${t}`);const{id:e,method:n,error:s,result:o,params:i}=JSON.parse(t);if(!e)return this.puppet.emit(n,i);const{callbacks:r}=this;if(e&&r.has(e)){const t=r.get(e);r.delete(e),s?t.reject(Error(s.message)):t.resolve(o)}},this.onClose=()=>{this.callbacks.forEach(t=>{t.reject(Error("Connection closed"))})},this.transport.on("message",this.onMessage),this.transport.on("close",this.onClose)}send(t,e={},n=!0){if(n&&"devtool"===this.namespace&&this.puppet.adapter.has(t))return this.puppet.adapter.send(this,t,e);const s=y(),o=g({id:s,method:t,params:e});return this.debug(`${h("yyyy-mm-dd HH:MM:ss:l")} SEND ► ${o}`),new Promise((t,e)=>{try{this.transport.send(o)}catch(t){e(Error("Connection closed"))}this.callbacks.set(s,{resolve:t,reject:e})})}dispose(){this.transport.close()}static createDevtoolConnection(t,e){return new Promise((n,s)=>{const o=new d(t);o.addEventListener("open",()=>{n(new b(new C(o),e,"devtool"))}),o.addEventListener("error",s)})}static createRuntimeConnection(t,e,n){return new Promise((o,i)=>{s("automator:runtime")(`${h("yyyy-mm-dd HH:MM:ss:l")} port=${t}`);const r=new d.Server({port:t});c(async()=>{if(e.runtimeConnection)return!0},n,1e3).catch(t=>{throw Error("Failed to connect to runtime, please make sure the project is running")}),r.on("connection",(function(t){s("automator:runtime")(h("yyyy-mm-dd HH:MM:ss:l")+" connected");const n=new b(new C(t),e,"runtime");e.setRuntimeConnection(n),o(n)})),e.setRuntimeServer(r)})}}const D=require("qrcode-terminal");require("qrcode-reader");async function T(t,e){const[n,s]=function(t){return P(t)?[!0,[t]]:[!1,t]}(e),o=await t(s);return n?o[0]:o} +"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("fs")),n=t(require("path")),s=t(require("debug")),i=t(require("licia/isRelative")),o=t(require("ws")),r=require("events"),a=t(require("licia/uuid")),c=t(require("licia/stringify")),p=t(require("licia/dateFormat")),l=t(require("licia/waitUntil")),u=t(require("licia/fs")),h=t(require("licia/isFn")),d=t(require("licia/trim")),m=t(require("licia/isStr")),g=t(require("licia/startWith")),y=t(require("licia/isNum")),v=t(require("licia/sleep")),w=t(require("licia/isUndef"));require("jimp");var f=t(require("licia/getPort")),M=require("child_process"),P=t(require("licia/toStr"));class k extends r.EventEmitter{constructor(t){super(),this.ws=t,this.ws.addEventListener("message",t=>{this.emit("message",t.data)}),this.ws.addEventListener("close",()=>{this.emit("close")})}send(t){this.ws.send(t)}close(){this.ws.close()}}class E extends r.EventEmitter{constructor(t,e,n){super(),this.puppet=e,this.namespace=n,this.callbacks=new Map,this.transport=t,this.debug=s("automator:protocol:"+this.namespace),this.onMessage=t=>{this.debug(`${p("yyyy-mm-dd HH:MM:ss:l")} ◀ RECV ${t}`);const{id:e,method:n,error:s,result:i,params:o}=JSON.parse(t);if(!e)return this.puppet.emit(n,o);const{callbacks:r}=this;if(e&&r.has(e)){const t=r.get(e);r.delete(e),s?t.reject(Error(s.message)):t.resolve(i)}},this.onClose=()=>{this.callbacks.forEach(t=>{t.reject(Error("Connection closed"))})},this.transport.on("message",this.onMessage),this.transport.on("close",this.onClose)}send(t,e={},n=!0){if(n&&this.puppet.adapter.has(t))return this.puppet.adapter.send(this,t,e);const s=a(),i=c({id:s,method:t,params:e});return this.debug(`${p("yyyy-mm-dd HH:MM:ss:l")} SEND ► ${i}`),new Promise((t,e)=>{try{this.transport.send(i)}catch(t){e(Error("Connection closed"))}this.callbacks.set(s,{resolve:t,reject:e})})}dispose(){this.transport.close()}static createDevtoolConnection(t,e){return new Promise((n,s)=>{const i=new o(t);i.addEventListener("open",()=>{n(new E(new k(i),e,"devtool"))}),i.addEventListener("error",s)})}static createRuntimeConnection(t,e,n){return new Promise((i,r)=>{s("automator:runtime")(`${p("yyyy-mm-dd HH:MM:ss:l")} port=${t}`);const a=new o.Server({port:t});l(async()=>{if(e.runtimeConnection)return!0},n,1e3).catch(t=>{throw Error("Failed to connect to runtime, please make sure the project is running")}),a.on("connection",(function(t){s("automator:runtime")(p("yyyy-mm-dd HH:MM:ss:l")+" connected");const n=new E(new k(t),e,"runtime");e.setRuntimeConnection(n),i(n)})),e.setRuntimeServer(a)})}}const b=require("qrcode-terminal");require("qrcode-reader");async function C(t,e){const[n,s]=function(t){return m(t)?[!0,[t]]:[!1,t]}(e),i=await t(s);return n?i[0]:i} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use @@ -12,4 +12,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */function I(t,e,n,s){var o,i=arguments.length,r=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r}var A,x;function R(t,e){const n=e.value;return e.value=async function(e){return(await(null==n?void 0:n.call(this,e)))(t)},e}function S(t,e,n){return R(A.RUNTIME,n)}function j(t,e,n){return R(A.DEVTOOL,n)}!function(t){t.RUNTIME="runtime",t.DEVTOOL="devtool"}(A||(A={}));class q{constructor(t){this.puppet=t}invoke(t,e){return async n=>this.puppet.devtoolConnection?(n===A.DEVTOOL?this.puppet.devtoolConnection:this.puppet.runtimeConnection).send(t,e):this.puppet.runtimeConnection.send(t,e)}on(t,e){this.puppet.on(t,e)}}class $ extends q{constructor(t,e){super(t),this.id=e.elementId,this.pageId=e.pageId,this.nodeId=e.nodeId,this.videoId=e.videoId}async getData(t){return this.invokeMethod("Element.getData",t)}async setData(t){return this.invokeMethod("Element.setData",t)}async callMethod(t){return this.invokeMethod("Element.callMethod",t)}async getElement(t){return this.invokeMethod("Element.getElement",t)}async getElements(t){return this.invokeMethod("Element.getElements",t)}async getOffset(){return this.invokeMethod("Element.getOffset")}async getHTML(t){return this.invokeMethod("Element.getHTML",t)}async getAttributes(t){return this.invokeMethod("Element.getAttributes",t)}async getStyles(t){return this.invokeMethod("Element.getStyles",t)}async getDOMProperties(t){return this.invokeMethod("Element.getDOMProperties",t)}async getProperties(t){return this.invokeMethod("Element.getProperties",t)}async tap(){return this.invokeMethod("Element.tap")}async touchstart(t){return this.invokeMethod("Element.touchstart",t)}async touchmove(t){return this.invokeMethod("Element.touchmove",t)}async touchend(t){return this.invokeMethod("Element.touchend",t)}async triggerEvent(t){return this.invokeMethod("Element.triggerEvent",t)}async callFunction(t){return this.invokeMethod("Element.callFunction",t)}async callContextMethod(t){return this.invokeMethod("Element.callContextMethod",t)}invokeMethod(t,e={}){return e.elementId=this.id,e.pageId=this.pageId,this.nodeId&&(e.nodeId=this.nodeId),this.videoId&&(e.videoId=this.videoId),this.invoke(t,e)}}I([S],$.prototype,"getData",null),I([S],$.prototype,"setData",null),I([S],$.prototype,"callMethod",null),I([j],$.prototype,"getElement",null),I([j],$.prototype,"getElements",null),I([j],$.prototype,"getOffset",null),I([j],$.prototype,"getHTML",null),I([j],$.prototype,"getAttributes",null),I([j],$.prototype,"getStyles",null),I([j],$.prototype,"getDOMProperties",null),I([j],$.prototype,"getProperties",null),I([j],$.prototype,"tap",null),I([j],$.prototype,"touchstart",null),I([j],$.prototype,"touchmove",null),I([j],$.prototype,"touchend",null),I([j],$.prototype,"triggerEvent",null),I([j],$.prototype,"callFunction",null),I([j],$.prototype,"callContextMethod",null);class O{constructor(t,e,n){this.puppet=t,this.id=e.elementId,this.pageId=e.pageId,this.nodeId=e.nodeId||null,this.videoId=e.videoId||null,this.tagName=e.tagName,this.elementMap=n,"body"===this.tagName&&(this.tagName="page"),this.api=new $(t,e)}async $(t){try{const e=await this.api.getElement({selector:t});return O.create(this.puppet,Object.assign({},e,{pageId:this.pageId}),this.elementMap)}catch(t){return null}}async $$(t){const{elements:e}=await this.api.getElements({selector:t});return e.map(t=>O.create(this.puppet,Object.assign({},t,{pageId:this.pageId}),this.elementMap))}async size(){const[t,e]=await this.domProperty(["offsetWidth","offsetHeight"]);return{width:t,height:e}}async offset(){return this.api.getOffset()}async text(){return this.domProperty("innerText")}async attribute(t){if(!P(t))throw Error("name must be a string");return(await this.api.getAttributes({names:[t]})).attributes[0]}async value(){return this.property("value")}async property(t){if(!P(t))throw Error("name must be a string");if(this.puppet.checkProperty){let e=this.publicProps;if(e||(this.publicProps=e=await this._property("__propPublic")),!e[t])throw Error(`${this.tagName}.${t} not exists`)}return this._property(t)}async html(){return(await this.api.getHTML({type:"inner"})).html}async outerHtml(){return(await this.api.getHTML({type:"outer"})).html}async style(t){if(!P(t))throw Error("name must be a string");return(await this.api.getStyles({names:[t]})).styles[0]}async tap(){return this.api.tap()}async longpress(){return await this.touchstart(),await p(350),this.touchend()}async trigger(t,e){const n={type:t};return k(e)||(n.detail=e),this.api.triggerEvent(n)}async touchstart(t){return this.api.touchstart(t)}async touchmove(t){return this.api.touchmove(t)}async touchend(t){return this.api.touchend(t)}async domProperty(t){return T(async t=>(await this.api.getDOMProperties({names:t})).properties,t)}_property(t){return T(async t=>(await this.api.getProperties({names:t})).properties,t)}send(t,e){return e.elementId=this.id,e.pageId=this.pageId,this.nodeId&&(e.nodeId=this.nodeId),this.videoId&&(e.videoId=this.videoId),this.puppet.send(t,e)}async callFunction(t,...e){return(await this.api.callFunction({functionName:t,args:e})).result}static create(t,e,n){let s,o=n.get(e.elementId);if(o)return o;if(e.nodeId)s=F;else switch(e.tagName){case"input":s=N;break;case"textarea":s=L;break;case"scroll-view":s=U;break;case"swiper":s=H;break;case"movable-view":s=B;break;case"switch":s=_;break;case"slider":s=W;break;case"video":s=V;break;default:s=O}return o=new s(t,e,n),n.set(e.elementId,o),o}}class F extends O{async setData(t){return this.api.setData({data:t})}async data(t){const e={};return t&&(e.path=t),(await this.api.getData(e)).data}async callMethod(t,...e){return(await this.api.callMethod({method:t,args:e})).result}}class N extends O{async input(t){return this.callFunction("input.input",t)}}class L extends O{async input(t){return this.callFunction("textarea.input",t)}}class U extends O{async scrollTo(t,e){return this.callFunction("scroll-view.scrollTo",t,e)}async property(t){return"scrollTop"===t?this.callFunction("scroll-view.scrollTop"):"scrollLeft"===t?this.callFunction("scroll-view.scrollLeft"):super.property(t)}async scrollWidth(){return this.callFunction("scroll-view.scrollWidth")}async scrollHeight(){return this.callFunction("scroll-view.scrollHeight")}}class H extends O{async swipeTo(t){return this.callFunction("swiper.swipeTo",t)}}class B extends O{async moveTo(t,e){return this.callFunction("movable-view.moveTo",t,e)}async property(t){return"x"===t?this._property("_translateX"):"y"===t?this._property("_translateY"):super.property(t)}}class _ extends O{async tap(){return this.callFunction("switch.tap")}}class W extends O{async slideTo(t){return this.callFunction("slider.slideTo",t)}}class V extends O{async callContextMethod(t,...e){return this.api.callContextMethod({method:t,args:e})}}class z extends q{constructor(t,e){super(t),this.id=e.id}async getData(t){return this.invokeMethod("Page.getData",t)}async setData(t){return this.invokeMethod("Page.setData",t)}async callMethod(t){return this.invokeMethod("Page.callMethod",t)}async getElement(t){return this.invokeMethod("Page.getElement",t)}async getElements(t){return this.invokeMethod("Page.getElements",t)}async getWindowProperties(t){return this.invokeMethod("Page.getWindowProperties",t)}invokeMethod(t,e={}){return e.pageId=this.id,this.invoke(t,e)}}I([S],z.prototype,"getData",null),I([S],z.prototype,"setData",null),I([S],z.prototype,"callMethod",null),I([j],z.prototype,"getElement",null),I([j],z.prototype,"getElements",null),I([j],z.prototype,"getWindowProperties",null);class G{constructor(t,e){this.puppet=t,this.id=e.id,this.path=e.path,this.query=e.query,this.elementMap=new Map,this.api=new z(t,e)}async waitFor(t){return E(t)?await p(t):w(t)?c(t):P(t)?c(async()=>(await this.$$(t)).length>0):void 0}async $(t){try{const e=await this.api.getElement({selector:t});return O.create(this.puppet,Object.assign({selector:t},e,{pageId:this.id}),this.elementMap)}catch(t){return null}}async $$(t){const{elements:e}=await this.api.getElements({selector:t});return e.map(e=>O.create(this.puppet,Object.assign({selector:t},e,{pageId:this.id}),this.elementMap))}async data(t){const e={};return t&&(e.path=t),(await this.api.getData(e)).data}async setData(t){return this.api.setData({data:t})}async size(){const[t,e]=await this.windowProperty(["document.documentElement.scrollWidth","document.documentElement.scrollHeight"]);return{width:t,height:e}}async callMethod(t,...e){return(await this.api.callMethod({method:t,args:e})).result}async scrollTop(){return this.windowProperty("document.documentElement.scrollTop")}async windowProperty(t){const e=P(t);e&&(t=[t]);const{properties:n}=await this.api.getWindowProperties({names:t});return e?n[0]:n}static create(t,e,n){let s=n.get(e.id);return s||(s=new G(t,e),n.set(e.id,s),s)}}class J extends q{async getPageStack(){return this.invoke("App.getPageStack")}async callUniMethod(t){return this.invoke("App.callUniMethod",t)}async getCurrentPage(){return this.invoke("App.getCurrentPage")}async mockUniMethod(t){return this.invoke("App.mockUniMethod",t)}async callFunction(t){return this.invoke("App.callFunction",t)}async captureScreenshot(){return this.invoke("App.captureScreenshot")}async exit(){return this.invoke("App.exit")}async addBinding(t){return this.invoke("App.addBinding",t)}async enableLog(){return this.invoke("App.enableLog")}onLogAdded(t){return this.on("App.logAdded",t)}onBindingCalled(t){return this.on("App.bindingCalled",t)}onExceptionThrown(t){return this.on("App.exceptionThrown",t)}}I([S],J.prototype,"getPageStack",null),I([S],J.prototype,"callUniMethod",null),I([S],J.prototype,"getCurrentPage",null),I([j],J.prototype,"mockUniMethod",null),I([j],J.prototype,"callFunction",null),I([j],J.prototype,"captureScreenshot",null),I([j],J.prototype,"exit",null),I([j],J.prototype,"addBinding",null),I([j],J.prototype,"enableLog",null);class X extends q{async getInfo(){return this.invoke("Tool.getInfo")}async enableRemoteDebug(t){return this.invoke("Tool.enableRemoteDebug")}async close(){return this.invoke("Tool.close")}async getTestAccounts(){return this.invoke("Tool.getTestAccounts")}onRemoteDebugConnected(t){this.puppet.once("Tool.onRemoteDebugConnected",t),this.puppet.once("Tool.onPreviewConnected",t)}}function Y(t){return new Promise(e=>setTimeout(e,t))}I([j],X.prototype,"getInfo",null),I([j],X.prototype,"enableRemoteDebug",null),I([j],X.prototype,"close",null),I([j],X.prototype,"getTestAccounts",null),function(t){t.CLOSE="close",t.DISCONNECT="disconnect"}(x||(x={}));class K extends m.EventEmitter{constructor(t,e){super(),this.puppet=t,this.options=e,this.pageMap=new Map,this.appBindings=new Map,this.appApi=new J(t),this.toolApi=new X(t),this.appApi.onLogAdded(t=>{this.emit("console",t)}),this.appApi.onBindingCalled(({name:t,args:e})=>{try{const n=this.appBindings.get(t);n&&n(...e)}catch(t){}}),this.appApi.onExceptionThrown(t=>{this.emit("exception",t)})}async pageStack(){return(await this.appApi.getPageStack()).pageStack.map(t=>G.create(this.puppet,t,this.pageMap))}async navigateTo(t){return this.changeRoute("navigateTo",t)}async redirectTo(t){return this.changeRoute("redirectTo",t)}async navigateBack(){return this.changeRoute("navigateBack")}async reLaunch(t){return this.changeRoute("reLaunch",t)}async switchTab(t){return this.changeRoute("switchTab",t)}async currentPage(){const{id:t,path:e,query:n}=await this.appApi.getCurrentPage();return G.create(this.puppet,{id:t,path:e,query:n},this.pageMap)}async systemInfo(){return this.callUniMethod("getSystemInfoSync")}async callUniMethod(t,...e){return(await this.appApi.callUniMethod({method:t,args:e})).result}async mockUniMethod(t,e,...n){return w(e)||P(s=e)&&(s=f(s),M(s,"function")||M(s,"() =>"))?this.appApi.mockUniMethod({method:t,functionDeclaration:e.toString(),args:n}):this.appApi.mockUniMethod({method:t,result:e});var s}async restoreUniMethod(t){return this.appApi.mockUniMethod({method:t})}async evaluate(t,...e){return(await this.appApi.callFunction({functionDeclaration:t.toString(),args:e})).result}async pageScrollTo(t){await this.callUniMethod("pageScrollTo",{scrollTop:t,duration:0})}async close(){try{await this.appApi.exit()}catch(t){}await Y(1e3),this.puppet.disposeRuntimeServer(),await this.toolApi.close(),this.disconnect()}async teardown(){return this[this.options.teardown===x.DISCONNECT?x.DISCONNECT:x.CLOSE]()}async remote(t){if(!this.puppet.devtools.remote)return console.warn(`Failed to enable remote, ${this.puppet.devtools.name} is unimplemented`);const{qrCode:e}=await this.toolApi.enableRemoteDebug({auto:t});var n;e&&await(n=e,new Promise(t=>{D.generate(n,{small:!0},e=>{process.stdout.write(e),t()})}));const s=new Promise(t=>{this.toolApi.onRemoteDebugConnected(async()=>{await Y(1e3),t()})}),o=new Promise(t=>{this.puppet.setRemoteRuntimeConnectionCallback(()=>{t()})});return Promise.all([s,o])}disconnect(){this.puppet.dispose()}on(t,e){return"console"===t&&this.appApi.enableLog(),super.on(t,e),this}async exposeFunction(t,e){if(this.appBindings.has(t))throw Error(`Failed to expose function with name ${t}: already exists!`);this.appBindings.set(t,e),await this.appApi.addBinding({name:t})}async checkVersion(){}async screenshot(t){const{data:e}=await this.appApi.captureScreenshot();if(!(null==t?void 0:t.path))return e;await v.writeFile(t.path,e,"base64")}async testAccounts(){return(await this.toolApi.getTestAccounts()).accounts}async changeRoute(t,e){return await this.callUniMethod(t,{url:e}),await Y(3e3),this.currentPage()}}class Q{constructor(t){this.options=t}has(t){return!!this.options[t]}send(t,e,n){const s=this.options[e];if(!s)return Promise.reject(Error(`adapter for ${e} not found`));const o=s.reflect;return o?(s.params&&(n=s.params(n)),"function"==typeof o?o(t.send.bind(t),n):(e=o,t.send(e,n))):Promise.reject(Error(e+"'s reflect is required"))}}class Z extends m.EventEmitter{constructor(t,e){if(super(),this.target=e||require(`@dcloudio/uni-${t}/lib/uni.automator.js`),!this.target)throw Error("puppet is not provided");this.platform=t,this.adapter=new Q(this.target.adapter||{})}setRuntimeServer(t){this.wss=t}setRemoteRuntimeConnectionCallback(t){this.remoteRuntimeConnectionCallback=t}setRuntimeConnection(t){this.runtimeConnection=t,this.remoteRuntimeConnectionCallback&&(this.remoteRuntimeConnectionCallback(),this.remoteRuntimeConnectionCallback=null)}setDevtoolConnection(t){this.devtoolConnection=t}disposeRuntimeServer(){this.wss&&this.wss.close()}disposeRuntime(){this.runtimeConnection.dispose()}disposeDevtool(){this.devtoolConnection&&this.devtoolConnection.dispose()}dispose(){this.disposeRuntime(),this.disposeDevtool(),this.disposeRuntimeServer()}send(t,e){return this.runtimeConnection.send(t,e)}validateProject(t){const s=this.target.devtools.required;return!s||!s.find(s=>!e.existsSync(n.join(t,s)))}validateDevtools(t){const e=this.target.devtools.validate;e&&e()}createDevtools(){const t=this.target.devtools.create;return t?t():Promise.resolve()}get checkProperty(){return"mp-weixin"===this.platform}get defaultPort(){return this.target.devtools.defaultPort}get devtools(){return this.target.devtools}get mode(){const t=this.target.mode;return t||("production"===process.env.NODE_ENV?"build":"dev")}}const tt=s("automator:compiler"),et=/The\s+(.*)\s+directory is ready/;class nt{constructor(t){this.puppet=t}compile(t){const e=this.puppet.mode,s=this.puppet.platform;let i=t.silent;const r=t.port,c=t.host,l=process.env.UNI_NPM_PATH||"npm",p=`${e}:${s}`,u=t.projectPath,h=["run",p,"--","--auto-port",a(r)];c&&(h.push("--auto-host"),h.push(c));const d={cwd:t.cliPath||t.projectPath,env:process.env};return new Promise((t,r)=>{const a=function(o){const r=o.toString().trim();if(!i&&console.log(r),r.includes("App running at:"))t({path:""});else if(r.includes("DONE Build complete")){let o=`unpackage/dist/${e}/${s}`;const a=r.match(et);a&&a.length>1&&(o=a[1]),i=!0,c.kill("SIGTERM"),t({path:n.join(u,o)})}};tt(`${l} ${h.join(" ")}`);const c=o.spawn(l,h,d);c.on("error",(function(t){r(t)})),c.stdout.on("data",a),c.stderr.on("data",a)})}}const st=s("automator:devtool"),ot=1e5;function it(t){throw Error(t)}class rt{async launch(t){const e=t[t.platform]||{};this.puppet=new Z(t.platform,e.puppet);const{port:n,cliPath:o,projectPath:i}=await this.validate(t);let r;this.puppet.devtools.automator&&(r=await this.validateDevtools(e));let a=i;if(!1!==t.compile){this.compiler=new nt(this.puppet);const e=await this.compiler.compile({host:t.host,port:n,cliPath:o,projectPath:i,silent:!!t.silent});e.path&&(a=e.path)}const c=[];return c.push(this.createRuntimeConnection(n,t.timeout||ot)),r&&c.push(this.createDevtoolConnection(a,r)),new Promise((t,n)=>{Promise.all(c).then(([n,o])=>{this.puppet.setRuntimeConnection(n),this.puppet.setDevtoolConnection(o),s("automator:program")("ready");const i=e.teardown||x.DISCONNECT;t(new K(this.puppet,{teardown:i}))}).catch(t=>n(t))})}async connectTool(t){let e;try{e=await b.createDevtoolConnection(t.wsEndpoint,this.puppet)}catch(e){throw Error(`Failed connecting to ${t.wsEndpoint}, check if target project window is opened with automation enabled`)}return e}validateCliPath(t){try{const e=require(n.join(t,"package.json"));if(e.devDependencies&&e.devDependencies["@dcloudio/vue-cli-plugin-uni"])return!0}catch(t){}}resolveCliPath(t){return t?this.validateCliPath(t)?t:void it(`Cli ${t} doesn't exist`):t}resolveProjectPath(t,s){if(t||(t=process.cwd()),u(t)&&(t=n.resolve(t)),e.existsSync(t)||it(`Project path ${t} doesn't exist`),!1===s.compile&&!this.puppet.validateProject(t)){const e=n.join(t,"dist/"+this.puppet.mode+"/"+this.puppet.platform);if(this.puppet.validateProject(e))return e;s.compile=!0}return t}async resolvePort(t,e){const n=await r(t||e);return t&&n!==t&&it(`Port ${t} is in use, please specify another port`),n}async validate(t){const e=this.resolveProjectPath(t.projectPath,t);let n=t.cliPath;return!1!==t.compile&&(n=this.resolveCliPath(t.cliPath||""),!n&&(n=this.resolveCliPath(e))),{port:await this.resolvePort(t.port||9520),cliPath:n,projectPath:e}}resolveDevtoolsPath(t){const n=this.puppet.devtools.paths.slice(0);t&&n.unshift(t);for(const t of n)if(e.existsSync(t))return t;it(this.puppet.devtools.name+" not found, please specify devtools.cliPath option")}async validateDevtools(t){const e=this.resolveDevtoolsPath(t.cliPath);let n=t.port||this.puppet.defaultPort;if(!1!==t.launch)try{n=await this.resolvePort(n)}catch(e){t.launch=!1}else{n===await r(n)&&(t.launch=!0)}return Object.assign(Object.assign({},t),{port:n,cliPath:e})}async createRuntimeConnection(t,e){return b.createRuntimeConnection(t,this.puppet,e)}async createDevtoolConnection(t,e){const{port:n,cliPath:s,timeout:o=ot,cwd:r="",account:u="",args:d=[],launch:m=!0}=e;let y=!1,g=!1;if(!1!==m){const e={detached:!0,stdio:"ignore"};r&&(e.cwd=r);let o=l(d,["--auto",t,"--auto-port",a(n)]);u&&(o=l(o,["--auto-account",u]));try{st("%s %o %o",s,o,e);const t=i.spawn(s,o,e);t.on("error",t=>{y=!0}),t.on("exit",()=>{setTimeout(()=>{g=!0},15e3)}),t.unref()}catch(t){y=!1}}else setTimeout(()=>{g=!0},15e3);const v=await c(async()=>{try{if(y||g)return!0;return await this.connectTool({wsEndpoint:"ws://127.0.0.1:"+n})}catch(t){}},o,1e3);return y&&it(`Failed to launch ${this.puppet.devtools.name}, please make sure cliPath is correctly specified`),g&&it(`Failed to launch ${this.puppet.devtools.name} , please make sure http port is open`),await p(5e3),st(h("yyyy-mm-dd HH:MM:ss:l")+" connected"),!1===m&&this.initRuntimeAutomator(v),v}async initRuntimeAutomator(t){return st("initRuntimeAutomator"),t.send("App.callUniMethod",{method:"$$initRuntimeAutomator",args:[]})}}module.exports=class{constructor(){this.launcher=new rt}async launch(t){return this.launcher.launch(t)}}; +***************************************************************************** */ +function I(t,e,n,s){var i,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}var D;function T(t,e){const n=e.value;return e.value=async function(e){return(await(null==n?void 0:n.call(this,e)))(t)},e}function A(t,e,n){return T(D.RUNTIME,n)}function x(t,e,n){return T(D.DEVTOOL,n)}!function(t){t.RUNTIME="runtime",t.DEVTOOL="devtool"}(D||(D={}));class R{constructor(t){this.puppet=t}invoke(t,e){return async n=>this.puppet.devtoolConnection?(n===D.DEVTOOL?this.puppet.devtoolConnection:this.puppet.runtimeConnection).send(t,e):this.puppet.runtimeConnection.send(t,e)}on(t,e){this.puppet.on(t,e)}}class q extends R{constructor(t,e){super(t),this.id=e.elementId,this.pageId=e.pageId,this.nodeId=e.nodeId,this.videoId=e.videoId}async getData(t){return this.invokeMethod("Element.getData",t)}async setData(t){return this.invokeMethod("Element.setData",t)}async callMethod(t){return this.invokeMethod("Element.callMethod",t)}async getElement(t){return this.invokeMethod("Element.getElement",t)}async getElements(t){return this.invokeMethod("Element.getElements",t)}async getOffset(){return this.invokeMethod("Element.getOffset")}async getHTML(t){return this.invokeMethod("Element.getHTML",t)}async getAttributes(t){return this.invokeMethod("Element.getAttributes",t)}async getStyles(t){return this.invokeMethod("Element.getStyles",t)}async getDOMProperties(t){return this.invokeMethod("Element.getDOMProperties",t)}async getProperties(t){return this.invokeMethod("Element.getProperties",t)}async tap(){return this.invokeMethod("Element.tap")}async touchstart(t){return this.invokeMethod("Element.touchstart",t)}async touchmove(t){return this.invokeMethod("Element.touchmove",t)}async touchend(t){return this.invokeMethod("Element.touchend",t)}async triggerEvent(t){return this.invokeMethod("Element.triggerEvent",t)}async callFunction(t){return this.invokeMethod("Element.callFunction",t)}async callContextMethod(t){return this.invokeMethod("Element.callContextMethod",t)}invokeMethod(t,e={}){return e.elementId=this.id,e.pageId=this.pageId,this.nodeId&&(e.nodeId=this.nodeId),this.videoId&&(e.videoId=this.videoId),this.invoke(t,e)}}I([A],q.prototype,"getData",null),I([A],q.prototype,"setData",null),I([A],q.prototype,"callMethod",null),I([x],q.prototype,"getElement",null),I([x],q.prototype,"getElements",null),I([x],q.prototype,"getOffset",null),I([x],q.prototype,"getHTML",null),I([x],q.prototype,"getAttributes",null),I([x],q.prototype,"getStyles",null),I([x],q.prototype,"getDOMProperties",null),I([x],q.prototype,"getProperties",null),I([x],q.prototype,"tap",null),I([x],q.prototype,"touchstart",null),I([x],q.prototype,"touchmove",null),I([x],q.prototype,"touchend",null),I([x],q.prototype,"triggerEvent",null),I([x],q.prototype,"callFunction",null),I([x],q.prototype,"callContextMethod",null);class j{constructor(t,e,n){this.puppet=t,this.id=e.elementId,this.pageId=e.pageId,this.nodeId=e.nodeId||null,this.videoId=e.videoId||null,this.tagName=e.tagName,this.elementMap=n,"body"!==this.tagName&&"page-body"!==this.tagName||(this.tagName="page"),this.api=new q(t,e)}async $(t){try{const e=await this.api.getElement({selector:t});return j.create(this.puppet,Object.assign({},e,{pageId:this.pageId}),this.elementMap)}catch(t){return null}}async $$(t){const{elements:e}=await this.api.getElements({selector:t});return e.map(t=>j.create(this.puppet,Object.assign({},t,{pageId:this.pageId}),this.elementMap))}async size(){const[t,e]=await this.domProperty(["offsetWidth","offsetHeight"]);return{width:t,height:e}}async offset(){return this.api.getOffset()}async text(){return this.domProperty("innerText")}async attribute(t){if(!m(t))throw Error("name must be a string");return(await this.api.getAttributes({names:[t]})).attributes[0]}async value(){return this.property("value")}async property(t){if(!m(t))throw Error("name must be a string");if(this.puppet.checkProperty){let e=this.publicProps;if(e||(this.publicProps=e=await this._property("__propPublic")),!e[t])throw Error(`${this.tagName}.${t} not exists`)}return this._property(t)}async html(){return(await this.api.getHTML({type:"inner"})).html}async outerHtml(){return(await this.api.getHTML({type:"outer"})).html}async style(t){if(!m(t))throw Error("name must be a string");return(await this.api.getStyles({names:[t]})).styles[0]}async tap(){return this.api.tap()}async longpress(){return await this.touchstart(),await v(350),this.touchend()}async trigger(t,e){const n={type:t};return w(e)||(n.detail=e),this.api.triggerEvent(n)}async touchstart(t){return this.api.touchstart(t)}async touchmove(t){return this.api.touchmove(t)}async touchend(t){return this.api.touchend(t)}async domProperty(t){return C(async t=>(await this.api.getDOMProperties({names:t})).properties,t)}_property(t){return C(async t=>(await this.api.getProperties({names:t})).properties,t)}send(t,e){return e.elementId=this.id,e.pageId=this.pageId,this.nodeId&&(e.nodeId=this.nodeId),this.videoId&&(e.videoId=this.videoId),this.puppet.send(t,e)}async callFunction(t,...e){return(await this.api.callFunction({functionName:t,args:e})).result}static create(t,e,n){let s,i=n.get(e.elementId);if(i)return i;if(e.nodeId)s=S;else switch(e.tagName){case"input":s=$;break;case"textarea":s=F;break;case"scroll-view":s=O;break;case"swiper":s=L;break;case"movable-view":s=U;break;case"switch":s=H;break;case"slider":s=N;break;case"video":s=B;break;default:s=j}return i=new s(t,e,n),n.set(e.elementId,i),i}}class S extends j{async setData(t){return this.api.setData({data:t})}async data(t){const e={};return t&&(e.path=t),(await this.api.getData(e)).data}async callMethod(t,...e){return(await this.api.callMethod({method:t,args:e})).result}}class $ extends j{async input(t){return this.callFunction("input.input",t)}}class F extends j{async input(t){return this.callFunction("textarea.input",t)}}class O extends j{async scrollTo(t,e){return this.callFunction("scroll-view.scrollTo",t,e)}async property(t){return"scrollTop"===t?this.callFunction("scroll-view.scrollTop"):"scrollLeft"===t?this.callFunction("scroll-view.scrollLeft"):super.property(t)}async scrollWidth(){return this.callFunction("scroll-view.scrollWidth")}async scrollHeight(){return this.callFunction("scroll-view.scrollHeight")}}class L extends j{async swipeTo(t){return this.callFunction("swiper.swipeTo",t)}}class U extends j{async moveTo(t,e){return this.callFunction("movable-view.moveTo",t,e)}async property(t){return"x"===t?this._property("_translateX"):"y"===t?this._property("_translateY"):super.property(t)}}class H extends j{async tap(){return this.callFunction("switch.tap")}}class N extends j{async slideTo(t){return this.callFunction("slider.slideTo",t)}}class B extends j{async callContextMethod(t,...e){return this.api.callContextMethod({method:t,args:e})}}class _ extends R{constructor(t,e){super(t),this.id=e.id}async getData(t){return this.invokeMethod("Page.getData",t)}async setData(t){return this.invokeMethod("Page.setData",t)}async callMethod(t){return this.invokeMethod("Page.callMethod",t)}async getElement(t){return this.invokeMethod("Page.getElement",t)}async getElements(t){return this.invokeMethod("Page.getElements",t)}async getWindowProperties(t){return this.invokeMethod("Page.getWindowProperties",t)}invokeMethod(t,e={}){return e.pageId=this.id,this.invoke(t,e)}}I([A],_.prototype,"getData",null),I([A],_.prototype,"setData",null),I([A],_.prototype,"callMethod",null),I([x],_.prototype,"getElement",null),I([x],_.prototype,"getElements",null),I([x],_.prototype,"getWindowProperties",null);class W{constructor(t,e){this.puppet=t,this.id=e.id,this.path=e.path,this.query=e.query,this.elementMap=new Map,this.api=new _(t,e)}async waitFor(t){return y(t)?await v(t):h(t)?l(t):m(t)?l(async()=>(await this.$$(t)).length>0):void 0}async $(t){try{const e=await this.api.getElement({selector:t});return j.create(this.puppet,Object.assign({selector:t},e,{pageId:this.id}),this.elementMap)}catch(t){return null}}async $$(t){const{elements:e}=await this.api.getElements({selector:t});return e.map(e=>j.create(this.puppet,Object.assign({selector:t},e,{pageId:this.id}),this.elementMap))}async data(t){const e={};return t&&(e.path=t),(await this.api.getData(e)).data}async setData(t){return this.api.setData({data:t})}async size(){const[t,e]=await this.windowProperty(["document.documentElement.scrollWidth","document.documentElement.scrollHeight"]);return{width:t,height:e}}async callMethod(t,...e){return(await this.api.callMethod({method:t,args:e})).result}async scrollTop(){return this.windowProperty("document.documentElement.scrollTop")}async windowProperty(t){const e=m(t);e&&(t=[t]);const{properties:n}=await this.api.getWindowProperties({names:t});return e?n[0]:n}static create(t,e,n){let s=n.get(e.id);return s||(s=new W(t,e),n.set(e.id,s),s)}}class V extends R{async getPageStack(){return this.invoke("App.getPageStack")}async callUniMethod(t){return this.invoke("App.callUniMethod",t)}async getCurrentPage(){return this.invoke("App.getCurrentPage")}async mockUniMethod(t){return this.invoke("App.mockUniMethod",t)}async callFunction(t){return this.invoke("App.callFunction",t)}async captureScreenshot(t){return this.invoke("App.captureScreenshot",t)}async exit(){return this.invoke("App.exit")}async addBinding(t){return this.invoke("App.addBinding",t)}async enableLog(){return this.invoke("App.enableLog")}onLogAdded(t){return this.on("App.logAdded",t)}onBindingCalled(t){return this.on("App.bindingCalled",t)}onExceptionThrown(t){return this.on("App.exceptionThrown",t)}}I([A],V.prototype,"getPageStack",null),I([A],V.prototype,"callUniMethod",null),I([A],V.prototype,"getCurrentPage",null),I([x],V.prototype,"mockUniMethod",null),I([x],V.prototype,"callFunction",null),I([x],V.prototype,"captureScreenshot",null),I([x],V.prototype,"exit",null),I([x],V.prototype,"addBinding",null),I([x],V.prototype,"enableLog",null);class z extends R{async getInfo(){return this.invoke("Tool.getInfo")}async enableRemoteDebug(t){return this.invoke("Tool.enableRemoteDebug")}async close(){return this.invoke("Tool.close")}async getTestAccounts(){return this.invoke("Tool.getTestAccounts")}onRemoteDebugConnected(t){this.puppet.once("Tool.onRemoteDebugConnected",t),this.puppet.once("Tool.onPreviewConnected",t)}}function G(t){return new Promise(e=>setTimeout(e,t))}I([x],z.prototype,"getInfo",null),I([x],z.prototype,"enableRemoteDebug",null),I([x],z.prototype,"close",null),I([x],z.prototype,"getTestAccounts",null);class J extends r.EventEmitter{constructor(t,e){super(),this.puppet=t,this.options=e,this.pageMap=new Map,this.appBindings=new Map,this.appApi=new V(t),this.toolApi=new z(t),this.appApi.onLogAdded(t=>{this.emit("console",t)}),this.appApi.onBindingCalled(({name:t,args:e})=>{try{const n=this.appBindings.get(t);n&&n(...e)}catch(t){}}),this.appApi.onExceptionThrown(t=>{this.emit("exception",t)})}async pageStack(){return(await this.appApi.getPageStack()).pageStack.map(t=>W.create(this.puppet,t,this.pageMap))}async navigateTo(t){return this.changeRoute("navigateTo",t)}async redirectTo(t){return this.changeRoute("redirectTo",t)}async navigateBack(){return this.changeRoute("navigateBack")}async reLaunch(t){return this.changeRoute("reLaunch",t)}async switchTab(t){return this.changeRoute("switchTab",t)}async currentPage(){const{id:t,path:e,query:n}=await this.appApi.getCurrentPage();return W.create(this.puppet,{id:t,path:e,query:n},this.pageMap)}async systemInfo(){return this.callUniMethod("getSystemInfoSync")}async callUniMethod(t,...e){return(await this.appApi.callUniMethod({method:t,args:e})).result}async mockUniMethod(t,e,...n){return h(e)||m(s=e)&&(s=d(s),g(s,"function")||g(s,"() =>"))?this.appApi.mockUniMethod({method:t,functionDeclaration:e.toString(),args:n}):this.appApi.mockUniMethod({method:t,result:e});var s}async restoreUniMethod(t){return this.appApi.mockUniMethod({method:t})}async evaluate(t,...e){return(await this.appApi.callFunction({functionDeclaration:t.toString(),args:e})).result}async pageScrollTo(t){await this.callUniMethod("pageScrollTo",{scrollTop:t,duration:0})}async close(){try{await this.appApi.exit()}catch(t){}await G(1e3),this.puppet.disposeRuntimeServer(),await this.toolApi.close(),this.disconnect()}async teardown(){return this["disconnect"===this.options.teardown?"disconnect":"close"]()}async remote(t){if(!this.puppet.devtools.remote)return console.warn(`Failed to enable remote, ${this.puppet.devtools.name} is unimplemented`);const{qrCode:e}=await this.toolApi.enableRemoteDebug({auto:t});var n;e&&await(n=e,new Promise(t=>{b.generate(n,{small:!0},e=>{process.stdout.write(e),t()})}));const s=new Promise(t=>{this.toolApi.onRemoteDebugConnected(async()=>{await G(1e3),t()})}),i=new Promise(t=>{this.puppet.setRemoteRuntimeConnectionCallback(()=>{t()})});return Promise.all([s,i])}disconnect(){this.puppet.dispose()}on(t,e){return"console"===t&&this.appApi.enableLog(),super.on(t,e),this}async exposeFunction(t,e){if(this.appBindings.has(t))throw Error(`Failed to expose function with name ${t}: already exists!`);this.appBindings.set(t,e),await this.appApi.addBinding({name:t})}async checkVersion(){}async screenshot(t){const{data:e}=await this.appApi.captureScreenshot({fullPage:null==t?void 0:t.fullPage});if(!(null==t?void 0:t.path))return e;await u.writeFile(t.path,e,"base64")}async testAccounts(){return(await this.toolApi.getTestAccounts()).accounts}async changeRoute(t,e){return await this.callUniMethod(t,{url:e}),await G(3e3),this.currentPage()}}class X{constructor(t){this.options=t}has(t){return!!this.options[t]}send(t,e,n){const s=this.options[e];if(!s)return Promise.reject(Error(`adapter for ${e} not found`));const i=s.reflect;return i?(s.params&&(n=s.params(n)),"function"==typeof i?i(t.send.bind(t),n):(e=i,t.send(e,n))):Promise.reject(Error(e+"'s reflect is required"))}}class Y extends r.EventEmitter{constructor(t,e){if(super(),this.target=e||require(`@dcloudio/uni-${t}/lib/uni.automator.js`),!this.target)throw Error("puppet is not provided");this.platform=t,this.adapter=new X(this.target.adapter||{})}setRuntimeServer(t){this.wss=t}setRemoteRuntimeConnectionCallback(t){this.remoteRuntimeConnectionCallback=t}setRuntimeConnection(t){this.runtimeConnection=t,this.remoteRuntimeConnectionCallback&&(this.remoteRuntimeConnectionCallback(),this.remoteRuntimeConnectionCallback=null)}setDevtoolConnection(t){this.devtoolConnection=t}disposeRuntimeServer(){this.wss&&this.wss.close()}disposeRuntime(){this.runtimeConnection.dispose()}disposeDevtool(){this.devtoolConnection&&this.devtoolConnection.dispose()}dispose(){this.disposeRuntime(),this.disposeDevtool(),this.disposeRuntimeServer()}send(t,e){return this.runtimeConnection.send(t,e)}validateProject(t){const s=this.target.devtools.required;return!s||!s.find(s=>!e.existsSync(n.join(t,s)))}validateDevtools(t){const e=this.target.devtools.validate;return e?e(t,this):Promise.resolve(t)}createDevtools(t,e,n){const s=this.target.devtools.create;return s?(e.timeout=n,s(t,e,this)):Promise.resolve()}shouldCompile(t,e){const n=this.target.shouldCompile;return n?n(t,e):!1!==t.compile}get checkProperty(){return"mp-weixin"===this.platform}get devtools(){return this.target.devtools}get mode(){const t=this.target.mode;return t||("production"===process.env.NODE_ENV?"build":"dev")}}const K=s("automator:compiler"),Q=/The\s+(.*)\s+directory is ready/;class Z{constructor(t){this.puppet=t}compile(t){const e=this.puppet.mode,s=this.puppet.platform;let i=t.silent;const o=t.port,r=t.host,a=process.env.UNI_NPM_PATH||"npm",c=`${e}:${s}`,p=t.projectPath,l=["run",c,"--","--auto-port",P(o)];r&&(l.push("--auto-host"),l.push(r));const u={cwd:t.cliPath||t.projectPath,env:process.env};return new Promise((t,o)=>{const r=function(o){const r=o.toString().trim();if(!i&&console.log(r),r.includes("App running at:"))t({path:""});else if(r.includes("DONE Build complete")){let o=`unpackage/dist/${e}/${s}`;const a=r.match(Q);a&&a.length>1&&(o=a[1]),i=!0,c.kill("SIGTERM"),t({path:n.join(p,o)})}};K(`${a} ${l.join(" ")}`);const c=M.spawn(a,l,u);c.on("error",(function(t){o(t)})),c.stdout.on("data",r),c.stderr.on("data",r)})}}class tt{async launch(t){let e=t[t.platform]||{};this.puppet=new Y(t.platform,e.puppet);const{port:n,cliPath:i,timeout:o,projectPath:r}=await this.validate(t);e=await this.puppet.validateDevtools(e);let a=r;if(this.puppet.shouldCompile(t,e)){this.compiler=new Z(this.puppet);const e=await this.compiler.compile({host:t.host,port:n,cliPath:i,projectPath:r,silent:!!t.silent});e.path&&(a=e.path)}const c=[];return c.push(this.createRuntimeConnection(n,o)),c.push(this.puppet.createDevtools(a,e,o)),new Promise((t,n)=>{Promise.all(c).then(([n,i])=>{n&&this.puppet.setRuntimeConnection(n),i&&this.puppet.setDevtoolConnection(i),s("automator:program")("ready");const o=e.teardown||"disconnect";t(new J(this.puppet,{teardown:o}))}).catch(t=>n(t))})}resolveCliPath(t){if(!t)return t;try{const e=require(n.join(t,"package.json"));if(e.devDependencies&&e.devDependencies["@dcloudio/vue-cli-plugin-uni"])return t}catch(t){}throw Error(`Cli ${t} doesn't exist`)}resolveProjectPath(t,s){if(t||(t=process.cwd()),i(t)&&(t=n.resolve(t)),e.existsSync(t)||function(t){throw Error(t)}(`Project path ${t} doesn't exist`),!1===s.compile&&!this.puppet.validateProject(t)){const e=n.join(t,"dist/"+this.puppet.mode+"/"+this.puppet.platform);if(this.puppet.validateProject(e))return e;s.compile=!0}return t}async validate(t){const e=this.resolveProjectPath(t.projectPath,t);let n=t.cliPath;return!1!==t.compile&&(n=this.resolveCliPath(t.cliPath||""),!n&&(n=this.resolveCliPath(e))),{port:await async function(t,e){const n=await f(t||e);if(t&&n!==t)throw Error(`Port ${t} is in use, please specify another port`);return n}(t.port||9520),cliPath:n,timeout:t.timeout||1e5,projectPath:e}}async createRuntimeConnection(t,e){return E.createRuntimeConnection(t,this.puppet,e)}}module.exports=class{constructor(){this.launcher=new tt}async launch(t){return this.launcher.launch(t)}}; diff --git a/packages/uni-automator/package.json b/packages/uni-automator/package.json index 06bdc58140525d2ffdf55832235fbc366a2e44ef..09b8b83b51aa66ba667cfdb1caf0ffc7cf14cefa 100644 --- a/packages/uni-automator/package.json +++ b/packages/uni-automator/package.json @@ -16,9 +16,13 @@ "dependencies": { "debug": "^4.1.1", "jimp": "^0.10.1", - "licia": "^1.21.0", + "licia": "^1.21.0", + "postcss-selector-parser": "^6.0.2", "qrcode-reader": "^1.0.4", "qrcode-terminal": "^0.12.0", "ws": "^7.2.3" + }, + "peerDependencies": { + "puppeteer": "^3.0.1" } -} +} diff --git a/packages/uni-h5/dist/automator.js b/packages/uni-h5/dist/automator.js index 2764b218c4ca0d87ac239d0344fcb687b8dde92b..d3458287a552e3cf3d7a27f6e434a0fcecb96016 100644 --- a/packages/uni-h5/dist/automator.js +++ b/packages/uni-h5/dist/automator.js @@ -1 +1,15 @@ -var n,t=Object.prototype.hasOwnProperty,e=Array.isArray;function r(n){return n.__wxWebviewId__?n.__wxWebviewId__:n.privateProperties?n.privateProperties.slaveId:void 0}function o(n){return n.route||n.uri}function u(n){return{id:r(n),path:o(n),query:n.options}}function i(n){var t=function(n){return getCurrentPages().find((function(t){return r(t)===n}))}(n);return t&&t.$vm}function a(n,t){var e=i(n);return e&&function n(t,e){var r,o;return t&&(t.$scope&&((o=t.$scope).__wxExparserNodeId__||o.nodeId||o.id)===e?r=t:t.$children.find((function(t){return r=n(t,e)}))),r}(e,t)}function c(n,r){var o;return n&&(o=r?function(n,r){var o,u=function(n,r){if(e(n))return n;if(r&&(o=r,u=n,t.call(o,u)))return[n];var o,u;var i=[];return n.replace(l,(function(n,t,e,r){return i.push(e?r.replace(/\\(\\)?/g,"$1"):t||n),r})),i}(r,n);for(o=u.shift();i=o,null!=i;){if(null==(n=n[o]))return;o=u.shift()}var i;return n}(n.$data,r):Object.assign({},n.$data)),Promise.resolve({data:o})}function s(n,t){return n&&Object.keys(t).forEach((function(e){n[e]=t[e]})),Promise.resolve()}function f(t,e,r){return new Promise((function(o,u){if(!t)return u(n.VM_NOT_EXISTS);if(!t[e])return u(n.VM_NOT_EXISTS);var i,a=t[e].apply(t,r);!(i=a)||"object"!=typeof i&&"function"!=typeof i||"function"!=typeof i.then?o({result:a}):a.then((function(n){o({result:n})}))}))}!function(n){n.VM_NOT_EXISTS="VM_NOT_EXISTS",n.METHOD_NOT_EXISTS="METHOD_NOT_EXISTS"}(n||(n={}));var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var p=/Sync$/;var d={getPageStack:function(){return Promise.resolve({pageStack:getCurrentPages().map((function(n){return u(n)}))})},getCurrentPage:function(){var n=getCurrentPages(),t=n.length;return new Promise((function(e,r){t?e(u(n[t-1])):r(Error("getCurrentPages().length=0"))}))},callUniMethod:function(n){var t=n.method,e=n.args;return new Promise((function(n,r){if(!uni[t])return r(Error("uni."+t+" not exists"));if(function(n){return p.test(n)}(t))return n({result:uni[t].apply(uni,e)});var o=[Object.assign({},e[0]||{},{success:function(e){setTimeout((function(){n({result:e})}),"pageScrollTo"===t?350:0)},fail:function(n){r(Error(n.errMsg.replace(t+":fail ","")))}})];uni[t].apply(uni,o)}))}},g={getData:function(n){return c(i(n.pageId),n.path)},setData:function(n){return s(i(n.pageId),n.data)},callMethod:function(t){var e,r=((e={})[n.VM_NOT_EXISTS]="Page["+t.pageId+"] not exists",e[n.METHOD_NOT_EXISTS]="page."+t.method+" not exists",e);return new Promise((function(n,e){f(i(t.pageId),t.method,t.args).then((function(t){return n(t)})).catch((function(n){e(Error(r[n]))}))}))}};function _(n){return n.nodeId||n.elementId}var v={getData:function(n){return c(a(n.pageId,_(n)),n.path)},setData:function(n){return s(a(n.pageId,_(n)),n.data)},callMethod:function(t){var e,r=_(t),o=((e={})[n.VM_NOT_EXISTS]="Component["+t.pageId+":"+r+"] not exists",e[n.METHOD_NOT_EXISTS]="component."+t.method+" not exists",e);return new Promise((function(n,e){f(a(t.pageId,r),t.method,t.args).then((function(t){return n(t)})).catch((function(n){e(Error(o[n]))}))}))}},m={};Object.keys(d).forEach((function(n){m["App."+n]=d[n]})),Object.keys(g).forEach((function(n){m["Page."+n]=g[n]})),Object.keys(v).forEach((function(n){m["Element."+n]=v[n]}));var h=process.env.UNI_AUTOMATOR_WS_ENDPOINT;setTimeout((function(){!function(n){void 0===n&&(n={});var t=uni.connectSocket({url:h,complete:function(){}}),e=function(n){return t.send({data:JSON.stringify(n)})};t.onOpen((function(t){n.success&&n.success(),console.log("已开启自动化测试...")})),t.onMessage((function(n){var t=JSON.parse(n.data),r=t.id,o=t.method,u=t.params,i={id:r},a=m[o];if(!a)return i.error={message:o+" unimplemented"},e(i);a(u).then((function(n){n&&(i.result=n)})).catch((function(n){i.error={message:n.message}})).finally((function(){e(i)}))})),t.onError((function(n){console.log("automator.onError",n)})),t.onClose((function(){n.fail&&n.fail({errMsg:"$$initRuntimeAutomator:fail"}),console.log("automator.onClose")}))}()}),500); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +function e(){for(var e=0,n=0,t=arguments.length;n]*>)(]*>[^<]*<\/span>)(.*?<\/uni-text>)/g,"$1$3").replace(/<\/?[^>]*>/g,(function(e){return-1":""===e?"":0!==e.indexOf("1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?-1!==e.split(r).indexOf(t):n&&"string"===typeof n?-1!==n.split(r).indexOf(t):void 0}function a(t,e){if(e(t.$vnode||t._vnode))return t;for(var n=t.$children,i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e={};return Object.keys(t).forEach((function(n){try{e[n]=decodeURIComponent(t[n])}catch(i){e[n]=t[n]}})),e}function s(){return{created:function(){var t=a(this.$route.query);o(this,t),Object(i["b"])(this,"onLoad",t),Object(i["b"])(this,"onShow")}}}},"091a":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"createIntersectionObserver",(function(){return h}));var i=n("62b5"),r=n("db70");function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.options.rootMargin=["top","right","bottom","left"].map((function(e){return"".concat(Number(t[e])||0,"px")})).join(" ")}},{key:"relativeTo",value:function(t,e){return this.options.relativeToSelector=t,this._makeRootMargin(e),this}},{key:"relativeToViewport",value:function(t){return this.options.relativeToSelector=null,this._makeRootMargin(t),this}},{key:"observe",value:function(e,n){"function"===typeof n&&(this.options.selector=e,this.reqId=c.push(n),t.publishHandler("requestComponentObserver",{reqId:this.reqId,component:this.component,options:this.options},this.pageId))}},{key:"disconnect",value:function(){t.publishHandler("destroyComponentObserver",{reqId:this.reqId},this.pageId)}}]),e}();function h(t,e){return t._isVue||(e=t,t=null),new l(t||Object(r["b"])("createIntersectionObserver"),e)}}.call(this,n("0dd1"))},"0998":function(t,e,n){"use strict";var i=n("927d"),r=n.n(i);r.a},"09e5":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"requestComponentInfo",(function(){return o}));var i=n("62b5"),r=Object(i["a"])("requestComponentInfo");function o(e,n,i){t.publishHandler("requestComponentInfo",{reqId:r.push(i),reqs:n},e.$page.id)}}.call(this,n("0dd1"))},"0a32":function(t,e,n){"use strict";var i=n("e4f1"),r=n.n(i);r.a},"0dd1":function(t,e,n){"use strict";n.r(e),n.d(e,"on",(function(){return c})),n.d(e,"off",(function(){return u})),n.d(e,"once",(function(){return l})),n.d(e,"emit",(function(){return h})),n.d(e,"subscribe",(function(){return f})),n.d(e,"unsubscribe",(function(){return d})),n.d(e,"subscribeHandler",(function(){return p}));var i=n("8bbf"),r=n.n(i),o=n("27a7");n.d(e,"invokeCallbackHandler",(function(){return o["a"]}));var a=n("b865");n.d(e,"publishHandler",(function(){return a["b"]}));var s=new r.a,c=s.$on.bind(s),u=s.$off.bind(s),l=s.$once.bind(s),h=s.$emit.bind(s);function f(t,e){return c("view."+t,e)}function d(t,e){return u("view."+t,e)}function p(t,e,n){return h("view."+t,e,n)}},"0f55":function(t,e,n){"use strict";var i=n("2190"),r=n.n(i);r.a},"0f74":function(t,e,n){"use strict";function i(t,e){if(e){if(0===e.indexOf("/"))return e}else{if(e=t,0===e.indexOf("/"))return e;var n=getCurrentPages();t=n.length?n[n.length-1].$page.route:""}if(0===e.indexOf("./"))return i(t,e.substr(2));for(var r=e.split("/"),o=r.length,a=0;a0?t.split("/"):[];return s.splice(s.length-a-1,a+1),"/"+s.concat(r).join("/")}n.d(e,"a",(function(){return i}))},1082:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-image",t._g({},t.$listeners),[n("div",{ref:"content",style:t.modeStyle}),n("img",{attrs:{src:t.realImagePath}}),"widthFix"===t.mode?n("v-uni-resize-sensor",{ref:"sensor",on:{resize:t._resize}}):t._e()],1)},r=[];function o(t){return o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var a={name:"Image",props:{src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1}},data:function(){return{originalWidth:0,originalHeight:0,availHeight:""}},computed:{ratio:function(){return this.originalWidth&&this.originalHeight?this.originalWidth/this.originalHeight:0},realImagePath:function(){return this.$getRealPath(this.src)},modeStyle:function(){var t="auto",e="",n="no-repeat";switch(this.mode){case"aspectFit":t="contain",e="center center";break;case"aspectFill":t="cover",e="center center";break;case"widthFix":t="100% 100%";break;case"top":e="center top";break;case"bottom":e="center bottom";break;case"center":e="center center";break;case"left":e="left center";break;case"right":e="right center";break;case"top left":e="left top";break;case"top right":e="right top";break;case"bottom left":e="left bottom";break;case"bottom right":e="right bottom";break;default:t="100% 100%",e="0% 0%";break}return"background-position:".concat(e,";background-size:").concat(t,";background-repeat:").concat(n,";")}},watch:{src:function(t,e){this._setContentImage(),this._loadImage()},mode:function(t,e){"widthFix"===e&&(this.$el.style.height=this.availHeight),"widthFix"===t&&this.ratio&&this._fixSize()}},mounted:function(){this.availHeight=this.$el.style.height||"",this._setContentImage(),this.realImagePath&&this._loadImage()},methods:{_resize:function(){"widthFix"===this.mode&&this._fixSize()},_fixSize:function(){var t=this._getWidth();if(t){var e=t/this.ratio;("undefined"===typeof navigator||o(navigator))&&"Google Inc."===navigator.vendor&&e>10&&(e=2*Math.round(e/2)),this.$el.style.height=e+"px"}},_setContentImage:function(){this.$refs.content.style.backgroundImage=this.src?'url("'.concat(this.realImagePath,'")'):"none"},_loadImage:function(){var t=this,e=new Image;e.onload=function(e){t.originalWidth=this.width,t.originalHeight=this.height,"widthFix"===t.mode&&t._fixSize(),t.$trigger("load",e,{width:this.width,height:this.height})},e.onerror=function(e){t.$trigger("error",e,{errMsg:"GET ".concat(t.src," 404 (Not Found)")})},e.src=this.realImagePath},_getWidth:function(){var t=window.getComputedStyle(this.$el),e=(parseFloat(t.borderLeftWidth,10)||0)+(parseFloat(t.borderRightWidth,10)||0),n=(parseFloat(t.paddingLeft,10)||0)+(parseFloat(t.paddingRight,10)||0);return this.$el.offsetWidth-e-n}}},s=a,c=(n("db18"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},1164:function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s}));var i=n("23e5"),r=!1;function o(){return r}function a(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[],r=o();if(!r)return n&&t.error("app is not ready"),[];var a=r.$children[0];if(a&&a.$children.length){var s=a.$children.find((function(t){return"TabBar"===t.$options.name}));a.$children.forEach((function(t){if(s!==t&&t.$children.length&&"Page"===t.$children[0].$options.name&&t.$children[0].$slots.page){var n=t.$children[0].$children.find((function(t){return"PageBody"===t.$options.name})).$children.find((function(t){return!!t.$page}));if(n){var o=!0;!e&&s&&n.$page&&n.$page.meta.isTabBar&&(r.$route.meta&&r.$route.meta.isTabBar?r.$route.path!==n.$page.path&&(o=!1):s.__path__!==n.$page.path&&(o=!1)),o&&i.push(n)}}}))}var c=i.length;if(c>1){var u=i[c-1];u.$page.path!==r.$route.path&&i.splice(c-1,1)}return i}function s(t,e){r=t,r.globalData=r.$options.globalData||{},Object(i["a"])(r,e)}}).call(this,n("3ad9")["default"])},"11fb":function(t,e,n){"use strict";n.r(e),n.d(e,"previewImage",(function(){return r}));var i=n("cb0f"),r={urls:{type:Array,required:!0,validator:function(t,e){var n;if(e.urls=t.map((function(t){if("string"===typeof t)return Object(i["a"])(t);n=!0})),n)return"url is not string"}},current:{type:[String,Number],validator:function(t,e){"number"===typeof t?e.current=t>0&&t should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab")}}}}).call(this,n("3ad9")["default"])},"15bb":function(t,e,n){"use strict";(function(t){var i=n("f2b3");e["a"]={mounted:function(){var e=this;if("transparent"===this.type){for(var n=this.$el.querySelector(".uni-page-head-transparent").style,i=this.$el.querySelector(".uni-page-head__title"),r=this.$el.querySelectorAll(".uni-btn-icon"),o=[],a=this.textColor,s=0;s.5&&e._A<=.5?o.forEach((function(t){t.color=a})):s<=.5&&e._A>.5&&o.forEach((function(t){t.color="#fff"})),e._A=s,i&&(i.style.opacity=s),n.backgroundColor="rgba(".concat(e._R,",").concat(e._G,",").concat(e._B,",").concat(s,")"),l.forEach((function(t,e){var n=u[e],i=n.match(/[\d+\.]+/g);i[3]=(1-s)*(4===i.length?i[3]:1),t.backgroundColor="rgba(".concat(i,")")})))}))}else if("float"===this.type){for(var d=this.$el.querySelectorAll(".uni-btn-icon"),p=[],g=0;g\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,o=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,a=d("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),s=d("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),c=d("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),u=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),l=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),h=d("script,style");function f(t,e){var n,f,d,p=[],g=t;p.last=function(){return this[this.length-1]};while(t){if(f=!0,p.last()&&h[p.last()])t=t.replace(new RegExp("([\\s\\S]*?)]*>"),(function(t,n){return n=n.replace(/|/g,"$1$2"),e.chars&&e.chars(n),""})),b("",p.last());else if(0==t.indexOf("\x3c!--")?(n=t.indexOf("--\x3e"),n>=0&&(e.comment&&e.comment(t.substring(4,n)),t=t.substring(n+3),f=!1)):0==t.indexOf("=0;i--)if(p[i]==n)break}else var i=0;if(i>=0){for(var r=p.length-1;r>=i;r--)e.end&&e.end(p[r]);p.length=i}}b()}function d(t){for(var e={},n=t.split(","),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;e.animation={duration:t.duration||0,timingFunc:t.timingFunc||"linear"}}}},o={title:{type:String,required:!0}}},1955:function(t,e,n){"use strict";n.r(e);var i=n("ba15"),r=n("8aec"),o=n("5363"),a=n("72b3"),s=n("f2b3");function c(t){var e=20,n=0,i=0;t.addEventListener("touchstart",(function(t){var e=t.changedTouches[0];n=e.clientX,i=e.clientY})),t.addEventListener("touchend",(function(t){var r=t.changedTouches[0];if(Math.abs(r.clientX-n)*{height: ").concat(t,"px;overflow: hidden;}"),document.head.appendChild(e)},_handleTrack:function(t){if(this._scroller)switch(t.detail.state){case"start":this._handleTouchStart(t),Object(s["c"])({disable:!0});break;case"move":this._handleTouchMove(t);break;case"end":case"cancel":this._handleTouchEnd(t),Object(s["c"])({disable:!1})}},_handleTap:function(t){var e=t.clientY;if(!this._scroller.isScrolling()){var n=this.$el.getBoundingClientRect(),i=e-n.top-this.height/2,r=this.indicatorHeight/2;if(!(Math.abs(i)<=r)){var o=Math.ceil((Math.abs(i)-r)/this.indicatorHeight),a=i<0?-o:o,s=Math.min(this.current+a,this.length-1);this.current=s=Math.max(s,0),this._scroller.scrollTo(s*this.indicatorHeight)}}},_handleWheel:function(t){var e=this.deltaY+t.deltaY;if(Math.abs(e)>10){this.deltaY=0;var n=Math.min(this.current+(e<0?-1:1),this.length-1);this.current=n=Math.max(n,0),this._scroller.scrollTo(n*this.indicatorHeight)}else this.deltaY=e;t.preventDefault()},setCurrent:function(t){t!==this.current&&(this.current=t,this.inited&&this.update())},init:function(){var t=this;this.initScroller(this.$refs.content,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:this.indicatorHeight,friction:new o["a"](1e-4),spring:new a["a"](2,90,20),onSnap:function(e){isNaN(e)||e===t.current||(t.current=e)}}),this.inited=!0},update:function(){var t=this;this.$nextTick((function(){var e=Math.min(t.current,t.length-1);e=Math.max(e,0),t._scroller.update(e*t.indicatorHeight,void 0,t.indicatorHeight)}))},_resize:function(t){var e=t.height;this.indicatorHeight=e}},render:function(t){return this.length=this.$slots.default&&this.$slots.default.length||0,t("uni-picker-view-column",{on:{on:this.$listeners}},[t("div",{ref:"main",staticClass:"uni-picker-view-group",on:{wheel:this._handleWheel,click:this._handleTap}},[t("div",{ref:"mask",staticClass:"uni-picker-view-mask",class:this.maskClass,style:"background-size: 100% ".concat(this.maskSize,"px;").concat(this.maskStyle)}),t("div",{ref:"indicator",staticClass:"uni-picker-view-indicator",class:this.indicatorClass,style:this.indicatorStyle},[t("v-uni-resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}})]),t("div",{ref:"content",staticClass:"uni-picker-view-content",class:this.scope,style:"padding: ".concat(this.maskSize,"px 0;")},[this.$slots.default])])])}},f=h,d=(n("edfa"),n("2877")),p=Object(d["a"])(f,u,l,!1,null,null,null);e["default"]=p.exports},"19c4":function(t,e,n){var i={"./base/base64.js":"6481","./base/can-i-use.js":"957a","./base/event-bus.js":"b0ef","./base/interceptor.js":"a954","./base/upx2px.js":"2289","./context/canvas.js":"82b9","./context/context.js":"3bfb","./device/make-phone-call.js":"f102","./device/set-clipboard-data.js":"b501","./file/open-document.js":"2604","./location/choose-location.js":"e5bb","./location/get-location.js":"19d9","./location/open-location.js":"70bb","./media/choose-image.js":"f1b2","./media/choose-video.js":"ed9f","./media/get-image-info.js":"b866","./media/preview-image.js":"11fb","./network/download-file.js":"439a","./network/request.js":"a201","./network/socket.js":"abb2","./network/upload-file.js":"9a3e","./plugin/get-provider.js":"4e7c","./route/route.js":"332a","./storage/storage.js":"ec33","./ui/load-font-face.js":"5ff9","./ui/navigation-bar.js":"1934","./ui/page-scroll-to.js":"232e","./ui/popup.js":"2246","./ui/tab-bar.js":"5621"};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id="19c4"},"19d9":function(t,e,n){"use strict";n.r(e),n.d(e,"getLocation",(function(){return r}));var i={WGS84:"WGS84",GCJ02:"GCJ02"},r={type:{type:String,validator:function(t,e){t=(t||"").toUpperCase(),e.type=Object.values(i).indexOf(t)<0?i.WGS84:t},default:i.WGS84},altitude:{altitude:Boolean,default:!1}}},"1a12":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"request",(function(){return l}));var i=n("f2b3");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.url,r=e.delta,o=e.animationType,a=e.animationDuration,s=e.from,c=void 0===s?"navigateBack":s,u=e.detail,l=getApp().$router;switch(t){case"redirectTo":l.replace({type:t,path:n});break;case"navigateTo":l.push({type:t,path:n,animationType:o,animationDuration:a});break;case"navigateBack":var h=!0,f=getCurrentPages();if(f.length){var d=f[f.length-1];Object(i["a"])(d.$options,"onBackPress")&&!0===d.__call_hook("onBackPress",{from:c})&&(h=!1)}h&&(r>1&&(l._$delta=r),l.go(-r,{animationType:o,animationDuration:a}));break;case"reLaunch":l.replace({type:t,path:n});break;case"switchTab":l.replace({type:t,path:n,params:{detail:u}});break}return{errMsg:t+":ok"}}function o(t){return r("redirectTo",t)}function a(t){return r("navigateTo",t)}function s(t){return r("navigateBack",t)}function c(t){return r("reLaunch",t)}function u(t){return r("switchTab",t)}},"1b6f":function(t,e,n){"use strict";(function(t){var i=n("f2b3");e["a"]={mounted:function(){var t=this;this._toggleListeners("subscribe",this.id),this.$watch("id",(function(e,n){t._toggleListeners("unsubscribe",n,!0),t._toggleListeners("subscribe",e,!0)}))},beforeDestroy:function(){this._toggleListeners("unsubscribe",this.id),this._contextId&&this._toggleListeners("unsubscribe",this._contextId)},methods:{_toggleListeners:function(e,n,r){r&&!n||Object(i["h"])(this._handleSubscribe)&&t[e](this.$page.id+"-"+this.$options.name.replace(/VUni([A-Z])/,"$1").toLowerCase()+"-"+n,this._handleSubscribe)},_getContextInfo:function(){var t="context-".concat(this._uid);return this._contextId||(this._toggleListeners("subscribe",t),this._contextId=t),{name:this.$options.name.replace(/VUni([A-Z])/,"$1").toLowerCase(),id:t,page:this.$page.id}}}}}).call(this,n("501c"))},"1c64":function(t,e,n){"use strict";var i=n("60ee"),r=n.n(i);r.a},"1ca3":function(t,e,n){"use strict";n.r(e),n.d(e,"base64ToArrayBuffer",(function(){return r})),n.d(e,"arrayBufferToBase64",(function(){return o}));var i=n("8390");function r(t){return Object(i["decode"])(t)}function o(t){return Object(i["encode"])(t)}},"1e4d":function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0&&(a.length=1),l.push("".concat(o,"(").concat(a.join(","),")"));else if(i.concat(r).includes(a[0])){o=a[0];var s=a[1];u[o]=r.includes(o)?p(s):s}})),u.transform=u.webkitTransform=l.join(" "),u.transition=u.webkitTransition=Object.keys(u).map((function(t){return"".concat(g(t)," ").concat(s.duration,"ms ").concat(s.timingFunction," ").concat(s.delay,"ms")})).join(","),u.transformOrigin=u.webkitTransformOrigin=a.transformOrigin,u}function v(t){var e=t.animation;if(e&&e.actions&&e.actions.length){var n=0,i=e.actions,r=e.actions.length;o()}function o(){var e=i[n],a=e.option.transition,s=m(e);Object.keys(s).forEach((function(e){t.$el.style[e]=s[e]})),n+=1,n=0&&this._callbacks.splice(e,1)}},{key:"offHeadersReceived",value:function(){}}]),t}(),u=Object.create(null);function l(t,e){var n=Object(r["c"])("createUploadTask",t),i=n.uploadTaskId,o=new c(i,e);return u[i]=o,o}Object(r["d"])("onUploadTaskStateChange",(function(t){var e=t.uploadTaskId,n=t.state,r=t.data,o=t.statusCode,a=t.progress,s=t.totalBytesSent,c=t.totalBytesExpectedToSend,l=t.errMsg,h=u[e],f=h._callbackId;switch(n){case"progressUpdate":h._callbacks.forEach((function(t){t({progress:a,totalBytesSent:s,totalBytesExpectedToSend:c})}));break;case"success":Object(i["a"])(f,{data:r,statusCode:o,errMsg:"request:ok"});case"fail":Object(i["a"])(f,{errMsg:"request:fail "+l});default:setTimeout((function(){delete u[e]}),100);break}}))},2190:function(t,e,n){},2246:function(t,e,n){"use strict";n.r(e),n.d(e,"showModal",(function(){return r})),n.d(e,"showToast",(function(){return o})),n.d(e,"showLoading",(function(){return a})),n.d(e,"showActionSheet",(function(){return s}));var i=n("cb0f"),r={title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"取消"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"确定"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean,default:!0}},o={title:{type:String,default:""},icon:{default:"success",validator:function(t,e){-1===["success","loading","none"].indexOf(t)&&(e.icon="success")}},image:{type:String,default:"",validator:function(t,e){t&&(e.image=Object(i["a"])(t))}},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},a={title:{type:String,default:""},icon:{type:String,default:"loading"},duration:{type:Number,default:1e8},mask:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},s={itemList:{type:Array,required:!0,validator:function(t,e){if(!t.length)return"parameter.itemList should have at least 1 item"}},itemColor:{type:String,default:"#000000"},visible:{type:Boolean,default:!0},popover:{type:Object}}},2289:function(t,e,n){"use strict";n.r(e),n.d(e,"upx2px",(function(){return i}));var i=[{name:"upx",type:[Number,String],required:!0}]},"232e":function(t,e,n){"use strict";n.r(e),n.d(e,"pageScrollTo",(function(){return i}));var i={scrollTop:{type:Number,required:!0},duration:{type:Number,default:300,validator:function(t,e){e.duration=Math.max(0,t)}}}},2399:function(t,e,n){},"23e5":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return g}));var i=n("a741");function r(t){-1===this.keepAliveInclude.indexOf(t)&&this.keepAliveInclude.push(t)}var o=[];function a(t){if("number"===typeof t)o=this.keepAliveInclude.splice(-(t-1)).map((function(t){return parseInt(t.split("-").pop())}));else{var e=this.keepAliveInclude.indexOf(t);-1!==e&&this.keepAliveInclude.splice(e,1)}}var s=Object.create(null);function c(t){return s[t]}function u(t){s[t]={x:window.pageXOffset,y:window.pageYOffset}}function l(t,e,n){e&&n&&e.meta.isTabBar&&n.meta.isTabBar&&u(n.params.__id__);for(var r=getCurrentPages(),o=r.length-1;o>=0;o--){var s=r[o],c=s.$page.meta;c.isTabBar||(a.call(this,c.name+"-"+s.$page.id),Object(i["b"])(s,"onUnload"))}}function h(t){__uniConfig.reLaunch=(__uniConfig.reLaunch||1)+1;for(var e=getCurrentPages(!0),n=e.length-1;n>=0;n--)Object(i["b"])(e[n],"onUnload"),e[n].$destroy();this.keepAliveInclude=[],s=Object.create(null)}var f=[];function d(t,e,n,i){f=getCurrentPages(!0);var o=e.params.__id__,s=t.params.__id__,c=t.meta.name+"-"+s;if(s===o&&"reLaunch"!==t.type)t.fullPath!==e.fullPath?(a.call(this,c),n()):n(!1);else if(t.meta.id&&t.meta.id!==s)n({path:t.path,replace:!0});else{var u=e.meta.name+"-"+o;switch(t.type){case"navigateTo":break;case"redirectTo":if(a.call(this,u),e.meta&&(e.meta.isQuit&&(t.meta.isQuit=!0,t.meta.isEntry=!!e.meta.isEntry),e.meta.isTabBar)){t.meta.isTabBar=!0,t.meta.tabBarIndex=e.meta.tabBarIndex;var d=getApp().$children[0];d.$set(d.tabBar.list[t.meta.tabBarIndex],"pagePath",t.meta.pagePath)}break;case"switchTab":l.call(this,i,t,e);break;case"reLaunch":h.call(this,c),t.meta.isQuit=!0;break;default:o&&o>s&&(a.call(this,u),this.$router._$delta>1&&a.call(this,this.$router._$delta));break}if("reLaunch"!==t.type&&e.meta.id&&r.call(this,u),r.call(this,c),t.meta&&t.meta.name){document.body.className="uni-body "+t.meta.name;var p="nvue-dir-"+__uniConfig.nvue["flex-direction"];t.meta.isNVue?(document.body.setAttribute("nvue",""),document.body.setAttribute(p,"")):(document.body.removeAttribute("nvue"),document.body.removeAttribute(p))}n()}}function p(e,n){var r=n.params.__id__,a=e.params.__id__,s=f.find((function(t){return t.$page.id===r}));switch(e.type){case"navigateTo":s&&Object(i["b"])(s,"onHide");break;case"redirectTo":s&&Object(i["b"])(s,"onUnload");break;case"switchTab":n.meta.isTabBar&&s&&Object(i["b"])(s,"onHide");break;case"reLaunch":break;default:r&&r>a&&(s&&Object(i["b"])(s,"onUnload"),this.$router._$delta>1&&o.reverse().forEach((function(t){var e=f.find((function(e){return e.$page.id===t}));e&&Object(i["b"])(e,"onUnload")})));break}if(delete this.$router._$delta,o.length=0,"reLaunch"!==e.type){var c=getCurrentPages(!0).find((function(t){return t.$page.id===a}));c&&(setTimeout((function(){t.emit("onNavigationBarChange",c.$parent.$parent.navigationBar),Object(i["b"])(c,"onShow")}),0),document.title=c.$parent.$parent.navigationBar.titleText)}}function g(t,e){t.$router.beforeEach((function(n,i,r){d.call(t,n,i,r,e)})),t.$router.afterEach((function(e,n){p.call(t,e,n)}))}}).call(this,n("0dd1"))},"24d9":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var i=n("f2b3");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){return t.mp=Object.assign({"@warning":"mp is deprecated"},t),t._processed=!0,t}function a(t,e){return Object(i["i"])(e)&&(Object(i["f"])(e,"backgroundColor")&&(t.backgroundColor=e.backgroundColor),Object(i["f"])(e,"buttons")&&(t.buttons=e.buttons),Object(i["f"])(e,"titleColor")&&(t.textColor=e.titleColor),Object(i["f"])(e,"titleText")&&(t.titleText=e.titleText),Object(i["f"])(e,"titleSize")&&(t.titleSize=e.titleSize),Object(i["f"])(e,"type")&&(t.type=e.type),Object(i["f"])(e,"searchInput")&&"object"===r(e.searchInput)&&(t.searchInput=Object.assign({autoFocus:!1,align:"center",color:"#000000",backgroundColor:"rgba(255,255,255,0.5)",borderRadius:"0px",placeholder:"",placeholderColor:"#CCCCCC",disabled:!1},e.searchInput))),t}},"250d":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-input",t._g({on:{change:function(t){t.stopPropagation()}}},t.$listeners),[n("div",{ref:"wrapper",staticClass:"uni-input-wrapper"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!(t.composing||t.inputValue.length),expression:"!(composing || inputValue.length)"}],ref:"placeholder",staticClass:"uni-input-placeholder",class:t.placeholderClass,style:t.placeholderStyle},[t._v(" "+t._s(t.placeholder)+" ")]),"checkbox"===t.inputType?n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{disabled:t.disabled,maxlength:t.maxlength,step:t.step,autocomplete:"off",type:"checkbox"},domProps:{checked:Array.isArray(t.inputValue)?t._i(t.inputValue,null)>-1:t.inputValue},on:{focus:t._onFocus,blur:t._onBlur,input:function(e){return e.stopPropagation(),t._onInput(e)},compositionstart:t._onComposition,compositionend:t._onComposition,keyup:function(e){return e.stopPropagation(),t._onKeyup(e)},change:function(e){var n=t.inputValue,i=e.target,r=!!i.checked;if(Array.isArray(n)){var o=null,a=t._i(n,o);i.checked?a<0&&(t.inputValue=n.concat([o])):a>-1&&(t.inputValue=n.slice(0,a).concat(n.slice(a+1)))}else t.inputValue=r}}}):"radio"===t.inputType?n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{disabled:t.disabled,maxlength:t.maxlength,step:t.step,autocomplete:"off",type:"radio"},domProps:{checked:t._q(t.inputValue,null)},on:{focus:t._onFocus,blur:t._onBlur,input:function(e){return e.stopPropagation(),t._onInput(e)},compositionstart:t._onComposition,compositionend:t._onComposition,keyup:function(e){return e.stopPropagation(),t._onKeyup(e)},change:function(e){t.inputValue=null}}}):n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],ref:"input",staticClass:"uni-input-input",attrs:{disabled:t.disabled,maxlength:t.maxlength,step:t.step,autocomplete:"off",type:t.inputType},domProps:{value:t.inputValue},on:{focus:t._onFocus,blur:t._onBlur,input:[function(e){e.target.composing||(t.inputValue=e.target.value)},function(e){return e.stopPropagation(),t._onInput(e)}],compositionstart:t._onComposition,compositionend:t._onComposition,keyup:function(e){return e.stopPropagation(),t._onKeyup(e)}}})])])},r=[],o=n("8af1"),a=["text","number","idcard","digit","password"],s=["number","digit"],c={name:"Input",mixins:[o["a"],o["d"]],model:{prop:"value",event:"update:value"},props:{name:{type:String,default:""},value:{type:[String,Number],default:""},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:"input-placeholder"},disabled:{type:[Boolean,String],default:!1},maxlength:{type:[Number,String],default:140},focus:{type:[Boolean,String],default:!1},confirmType:{type:String,default:"done"}},data:function(){return{inputValue:this._getValueString(this.value),composing:!1,wrapperHeight:0,cachedValue:""}},computed:{inputType:function(){var t="";switch(this.type){case"text":"search"===this.confirmType&&(t="search");break;case"idcard":t="text";break;case"digit":t="number";break;default:t=~a.indexOf(this.type)?this.type:"text";break}return this.password?"password":t},step:function(){return~s.indexOf(this.type)?"0.000000000000000001":""}},watch:{focus:function(t){t&&this._focusInput()},value:function(t){this.inputValue=this._getValueString(t)},inputValue:function(t){this.$emit("update:value",t)},maxlength:function(t){var e=this.inputValue.slice(0,parseInt(t,10));e!==this.inputValue&&(this.inputValue=e)}},created:function(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},mounted:function(){if("search"===this.confirmType){var t=document.createElement("form");t.action="",t.onsubmit=function(){return!1},t.className="uni-input-form",t.appendChild(this.$refs.input),this.$refs.wrapper.appendChild(t)}var e=this;while(e){var n=e.$options._scopeId;n&&this.$refs.placeholder.setAttribute(n,""),e=e.$parent}this.initKeyboard(this.$refs.input),this.focus&&this._focusInput()},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_onKeyup:function(t){13===t.keyCode&&this.$trigger("confirm",t,{value:t.target.value})},_onInput:function(t){if(!this.composing){if(~s.indexOf(this.type)){if(this.$refs.input.validity&&!this.$refs.input.validity.valid)return t.target.value=this.cachedValue,void(this.inputValue=t.target.value);this.cachedValue=this.inputValue}if("number"===this.inputType){var e=parseInt(this.maxlength,10);if(e>0&&t.target.value.length>e)return t.target.value=t.target.value.slice(0,e),void(this.inputValue=t.target.value)}this.$trigger("input",t,{value:this.inputValue})}},_onFocus:function(t){this.$trigger("focus",t,{value:t.target.value})},_onBlur:function(t){this.$trigger("blur",t,{value:t.target.value})},_focusInput:function(){var t=this;setTimeout((function(){t.$refs.input.focus()}),350)},_blurInput:function(){var t=this;setTimeout((function(){t.$refs.input.blur()}),350)},_onComposition:function(t){"compositionstart"===t.type?this.composing=!0:this.composing=!1},_resetFormData:function(){this.inputValue=""},_getFormData:function(){return this.name?{value:this.inputValue,key:this.name}:{}},_getValueString:function(t){return null===t?"":String(t)}}},u=c,l=(n("0f55"),n("2877")),h=Object(l["a"])(u,i,r,!1,null,null,null);e["default"]=h.exports},"25ce":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-checkbox-group",t._g({},t.$listeners),[t._t("default")],2)},r=[],o=n("8af1"),a={name:"CheckboxGroup",mixins:[o["a"],o["e"]],props:{name:{type:String,default:""}},data:function(){return{checkboxList:[]}},listeners:{"@checkbox-change":"_changeHandler","@checkbox-group-update":"_checkboxGroupUpdateHandler"},created:function(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_changeHandler:function(t){var e=[];this.checkboxList.forEach((function(t){t.checkboxChecked&&e.push(t.value)})),this.$trigger("change",t,{value:e})},_checkboxGroupUpdateHandler:function(t){if("add"===t.type)this.checkboxList.push(t.vm);else{var e=this.checkboxList.indexOf(t.vm);this.checkboxList.splice(e,1)}},_getFormData:function(){var t={};if(""!==this.name){var e=[];this.checkboxList.forEach((function(t){t.checkboxChecked&&e.push(t.value)})),t.value=e,t.key=this.name}return t}}},s=a,c=(n("0998"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},2604:function(t,e,n){"use strict";n.r(e),n.d(e,"openDocument",(function(){return i}));var i={filePath:{type:String,required:!0},fileType:{type:String}}},2608:function(t,e,n){"use strict";(function(t){function i(e){return function(){try{return e.apply(e,arguments)}catch(n){t.error(n)}}}function r(e){return function(){try{return e.apply(e,arguments)}catch(n){t.error(n)}}}n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}))}).call(this,n("3ad9")["default"])},2765:function(t,e,n){"use strict";var i=n("3590"),r=n.n(i);r.a},"27a7":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return m})),n.d(e,"c",(function(){return v})),n.d(e,"b",(function(){return y}));var i=n("f2b3"),r=n("2608"),o=n("ed1a"),a=n("cc76"),s=n("de29");function c(e,n,i){var r="".concat(n,":fail ").concat(e);if(t.error(r),-1===i)throw new Error(r);return"number"===typeof i&&m(i,{errMsg:r}),!1}var u=[{name:"callback",type:Function,required:!0}];function l(t,e,n){var r=a["a"][t];if(!r&&Object(o["a"])(t)&&(r=u),r){if(Array.isArray(r)&&Array.isArray(e)){var l=Object.create(null),h=Object.create(null),f=e.length;r.forEach((function(t,n){l[t.name]=t,f>n&&(h[t.name]=e[n])})),r=l,e=h}if(Object(i["h"])(r.beforeValidate)){var d=r.beforeValidate(e);if(d)return c(d,t,n)}for(var p=Object.keys(r),g=0;g1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Object(i["i"])(e))return{params:e};e=Object.assign({},e);var o={};for(var a in e){var s=e[a];Object(i["h"])(s)&&(o[a]=Object(r["a"])(s),delete e[a])}var c=o.success,u=o.fail,l=o.cancel,d=o.complete,p=Object(i["h"])(c),g=Object(i["h"])(u),m=Object(i["h"])(l),v=Object(i["h"])(d);if(!p&&!g&&!m&&!v)return{params:e};var b={};for(var y in n){var _=n[y];Object(i["h"])(_)&&(b[y]=Object(r["b"])(_))}var w=b.beforeSuccess,S=b.afterSuccess,k=b.beforeFail,T=b.afterFail,x=b.beforeCancel,C=b.afterCancel,O=b.afterAll,E=h++,M="api."+t+"."+E,j=function(e){if(e.errMsg=e.errMsg||t+":ok",-1!==e.errMsg.indexOf(":ok"))e.errMsg=t+":ok";else if(-1!==e.errMsg.indexOf(":cancel"))e.errMsg=t+":cancel";else if(-1!==e.errMsg.indexOf(":fail")){var n="",r=e.errMsg.indexOf(" ");r>-1&&(n=e.errMsg.substr(r)),e.errMsg=t+":fail"+n}var o=e.errMsg;0===o.indexOf(t+":ok")?(Object(i["h"])(w)&&w(e),p&&c(e),Object(i["h"])(S)&&S(e)):0===o.indexOf(t+":cancel")?(e.errMsg=e.errMsg.replace(t+":cancel",t+":fail cancel"),g&&u(e),Object(i["h"])(x)&&x(e),m&&l(e),Object(i["h"])(C)&&C(e)):0===o.indexOf(t+":fail")&&(Object(i["h"])(k)&&k(e),g&&u(e),Object(i["h"])(T)&&T(e)),v&&d(e),Object(i["h"])(O)&&O(e)};return f[E]={name:M,callback:j},{params:e,callbackId:E}}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=p(t,e,n),o=r.params,a=r.callbackId;return Object(i["i"])(o)&&!l(t,o,a)?{params:o,callbackId:!1}:{params:o,callbackId:a}}function m(t,e,n){if("number"===typeof t){var i=f[t];if(i)return i.keepAlive||delete f[t],i.callback(e,n)}return e}function v(e){return function(n){t.error("API `"+e+"` is not yet implemented")}}function b(t,e){var n=a["a"][t];n&&Object(i["h"])(n.beforeSuccess)&&(e.beforeSuccess=n.beforeSuccess)}function y(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(i["h"])(e)?(b(t,n),function(){for(var r=arguments.length,a=new Array(r),s=0;st.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0)&&(this.valueSync.length=t.length,t.forEach((function(t,e){t!==n.valueSync[e]&&n.$set(n.valueSync,e,t)})))},valueSync:{deep:!0,handler:function(t,e){if(""===this.changeSource)this._valueChanged(t);else{this.changeSource="";var n=t.map((function(t){return t}));this.$emit("update:value",n),this.$trigger("change",{},{value:n})}}}},methods:{getItemIndex:function(t){return this.items.indexOf(t)},getItemValue:function(t){return this.valueSync[this.getItemIndex(t.$vnode)]||0},setItemValue:function(t,e){var n=this.getItemIndex(t.$vnode),i=this.valueSync[n];i!==e&&(this.changeSource="touch",this.$set(this.valueSync,n,e))},_valueChanged:function(t){this.items.forEach((function(e,n){e.componentInstance.setCurrent(t[n]||0)}))},_resize:function(t){var e=t.height;this.height=e}},render:function(t){var e=[];return this.$slots.default&&Object(i["b"])(this.$slots.default,t).forEach((function(t){t.componentOptions&&"v-uni-picker-view-column"===t.componentOptions.tag&&e.push(t)})),this.items=e,t("uni-picker-view",{on:this.$listeners},[t("v-uni-resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}}),t("div",{ref:"wrapper",class:"uni-picker-view-wrapper"},e)])}},d=f,p=(n("6062"),n("2877")),g=Object(p["a"])(d,l,h,!1,null,null,null);e["default"]=g.exports},"27c2":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-editor",t._g({staticClass:"ql-container",attrs:{id:t.id}},t.$listeners))},r=[],o=n("8188"),a=o["a"],s=(n("e298"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"27d0":function(t,e,n){"use strict";(function(t){var i=n("85b6"),r=n("65a8"),o=n("f2b3"),a=n("24d9"),s=n("2d02"),c=n("a402"),u=n("90f7"),l=n("be12"),h=n("d8c8"),f=n.n(h);function d(t){return d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}e["a"]={name:"Page",mpType:"page",components:{PageHead:s["a"],PageBody:c["a"],PageRefresh:u["a"]},mixins:[l["a"]],props:{isQuit:{type:Boolean,default:!1},isEntry:{type:Boolean,default:!1},isTabBar:{type:Boolean,default:!1},tabBarIndex:{type:Number,default:-1},navigationBarBackgroundColor:{type:String,default:"#000"},navigationBarTextStyle:{default:"white",validator:function(t){return-1!==["white","black"].indexOf(t)}},navigationBarTitleText:{type:String,default:""},navigationStyle:{default:"default",validator:function(t){return-1!==["default","custom"].indexOf(t)}},backgroundColor:{type:String,default:"#ffffff"},backgroundTextStyle:{default:"dark",validator:function(t){return-1!==["dark","light"].indexOf(t)}},backgroundColorTop:{type:String,default:"#fff"},backgroundColorBottom:{type:String,default:"#fff"},enablePullDownRefresh:{type:Boolean,default:!1},onReachBottomDistance:{type:Number,default:50},disableScroll:{type:Boolean,default:!1},titleNView:{type:[Boolean,Object,String],default:""},pullToRefresh:{type:Object,default:function(){return{}}},titleImage:{type:String,default:""},transparentTitle:{type:String,default:""},titlePenetrate:{type:String,default:"NO"},navigationBarShadow:{type:Object,default:function(){return{}}}},data:function(){var t={none:"default",auto:"transparent",always:"float"},e=this.titleNView;e=!1===e||"false"===e||"custom"===this.navigationStyle&&!Object(o["i"])(e)||"always"===this.transparentTitle&&!Object(o["i"])(e)?{type:"none"}:Object.assign({},{type:"custom"===this.navigationStyle?"none":"default"},this.transparentTitle in t?{type:t[this.transparentTitle]}:null,"object"===d(e)?e:"boolean"===typeof e?{type:e?"default":"none"}:null);var n={YES:!0,NO:!1},s=Object(a["a"])({loading:!1,backButton:!this.isQuit&&!this.$route.meta.isQuit,backgroundColor:this.navigationBarBackgroundColor,textColor:"black"===this.navigationBarTextStyle?"#000":"#fff",titleText:this.navigationBarTitleText,titleImage:this.titleImage,duration:"0",timingFunc:"",titlePenetrate:n[this.titlePenetrate]},e);s.shadow=this.navigationBarShadow;var c=Object.assign({support:!0,color:"#2BD009",style:"circle",height:70,range:150,offset:0},this.pullToRefresh),u=Object(i["d"])(c.offset);return"none"!==e.type&&"transparent"!==e.type&&(u+=r["a"]+f.a.top),c.offset=u,c.height=Object(i["d"])(c.height),c.range=Object(i["d"])(c.range),{navigationBar:s,refreshOptions:c}},created:function(){var e=this.navigationBar;document.title=e.titleText,t.emit("onNavigationBarChange",e)}}}).call(this,n("0dd1"))},2877:function(t,e,n){"use strict";function i(t,e,n,i,r,o,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):r&&(c=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},2883:function(t,e,n){},"28da":function(t,e,n){},"29a2":function(t,e,n){},"2bbe":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.hoverClass&&"none"!==t.hoverClass?n("uni-view",t._g({class:[t.hovering?t.hoverClass:""],on:{touchstart:t._hoverTouchStart,touchend:t._hoverTouchEnd,touchcancel:t._hoverTouchCancel}},t.$listeners),[t._t("default")],2):n("uni-view",t._g({},t.$listeners),[t._t("default")],2)},r=[],o=n("83a6"),a={name:"View",mixins:[o["a"]],listeners:{"label-click":"clickHandler"}},s=a,c=(n("e865"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"2bdd":function(t,e,n){"use strict";n.r(e),n.d(e,"enableAccelerometer",(function(){return o}));var i,r=n("b865");function o(t){var e=t.enable;return e?a():s()}function a(){if(window.DeviceMotionEvent)return i=function(t){var e=t.acceleration||t.accelerationIncludingGravity;Object(r["a"])("onAccelerometerChange",{x:e.x||0,y:e.y||0,z:e.z||0,errMsg:"onAccelerometerChange:ok"})},window.addEventListener("devicemotion",i,!1),{};throw new Error("device nonsupport devicemotion")}function s(){return i&&(window.removeEventListener("devicemotion",i,!1),i=null),{}}},"2c45":function(t,e,n){},"2c67":function(t,e,n){"use strict";n.r(e),n.d(e,"createInnerAudioContext",(function(){return f}));var i=n("db70");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n=0&&n.splice(i,1)}})),Object(i["d"])("onAudioStateChange",(function(t){var e=t.state,n=t.audioId,i=t.errMsg,r=t.errCode,o=h[n];if(o)if(l(o,e,i,r),"play"===e){var a=o.currentTime;o.__timing=setInterval((function(){var t=o.currentTime;t!==a&&l(o,"timeupdate")}),200)}else"pause"!==e&&"stop"!==e&&"error"!==e||clearInterval(o.__timing)}));var h=Object.create(null);function f(){var t=Object(i["c"])("createAudioInstance"),e=t.audioId,n=new u(e);return h[e]=n,n}},"2d02":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-page-head",{attrs:{"uni-page-head-type":t.type}},[n("div",{staticClass:"uni-page-head",class:t.headClass,style:{transitionDuration:t.duration,transitionTimingFunction:t.timingFunc,backgroundColor:t.bgColor,color:t.textColor}},[n("div",{staticClass:"uni-page-head-hd"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.backButton,expression:"backButton"}],staticClass:"uni-page-head-btn",on:{click:t._back}},[n("i",{staticClass:"uni-btn-icon",style:{color:t.color,fontSize:"27px"}},[t._v("")])]),t._l(t.btns,(function(e,i){return["left"===e.float?n("div",{key:i,staticClass:"uni-page-head-btn",class:{"uni-page-head-btn-red-dot":e.redDot||e.badgeText,"uni-page-head-btn-select":e.select},style:{backgroundColor:"transparent"===t.type?e.background:"transparent",width:e.width},attrs:{"badge-text":e.badgeText}},[n("i",{staticClass:"uni-btn-icon",style:t._formatBtnStyle(e),domProps:{innerHTML:t._s(t._formatBtnFontText(e))},on:{click:function(e){return t._onBtnClick(i)}}})]):t._e()]}))],2),t.searchInput?t._e():n("div",{staticClass:"uni-page-head-bd"},[n("div",{staticClass:"uni-page-head__title",style:{fontSize:t.titleSize,opacity:"transparent"===t.type?0:1}},[t.loading?n("i",{staticClass:"uni-loading"}):t._e(),""!==t.titleImage?n("img",{staticClass:"uni-page-head__title_image",attrs:{src:t.titleImage}}):[t._v(" "+t._s(t.titleText)+" ")]],2)]),t.searchInput?n("div",{staticClass:"uni-page-head-search",style:{"border-radius":t.searchInput.borderRadius,"background-color":t.searchInput.backgroundColor}},[n("div",{staticClass:"uni-page-head-search-placeholder",class:["uni-page-head-search-placeholder-"+(t.focus||t.text?"left":t.searchInput.align)],style:{color:t.searchInput.placeholderColor}},[t._v(" "+t._s(t.text||t.composing?"":t.searchInput.placeholder)+" ")]),n("v-uni-input",{ref:"input",staticClass:"uni-page-head-search-input",style:{color:t.searchInput.color},attrs:{focus:t.searchInput.autoFocus,disabled:t.searchInput.disabled,"placeholder-style":"color:"+t.searchInput.placeholderColor,"confirm-type":"search"},on:{focus:t._focus,blur:t._blur,"update:value":t._input},model:{value:t.text,callback:function(e){t.text=e},expression:"text"}})],1):t._e(),n("div",{staticClass:"uni-page-head-ft"},[t._l(t.btns,(function(e,i){return["left"!==e.float?n("div",{key:i,staticClass:"uni-page-head-btn",class:{"uni-page-head-btn-red-dot":e.redDot||e.badgeText,"uni-page-head-btn-select":e.select},style:{backgroundColor:"transparent"===t.type?e.background:"transparent",width:e.width},attrs:{"badge-text":e.badgeText}},[n("i",{staticClass:"uni-btn-icon",style:t._formatBtnStyle(e),domProps:{innerHTML:t._s(t._formatBtnFontText(e))},on:{click:function(e){return t._onBtnClick(i)}}})]):t._e()]}))],2)]),"transparent"!==t.type&&"float"!==t.type?n("div",{staticClass:"uni-placeholder",class:{"uni-placeholder-titlePenetrate":t.titlePenetrate}}):t._e()])},r=[],o=n("dd35"),a=o["a"],s=(n("8e16"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["a"]=c.exports},"2d89":function(t,e,n){"use strict";var i=n("d29c"),r=n.n(i);r.a},"2eae":function(t,e,n){"use strict";n.r(e),n.d(e,"interceptors",(function(){return r}));var i=n("8542");n.d(e,"addInterceptor",(function(){return i["a"]})),n.d(e,"removeInterceptor",(function(){return i["d"]}));var r={promiseInterceptor:i["c"]}},"2ec6":function(t,e,n){"use strict";n.r(e),function(t){function i(e){var n=getCurrentPages();return n.length&&t.publishHandler("setPageMeta",e,n[n.length-1].$page.id),{}}n.d(e,"setPageMeta",(function(){return i}))}.call(this,n("0dd1"))},"2ef3":function(t,e,n){"use strict";(function(t,e,i){var r=n("8bbf"),o=n.n(r),a=n("442e");e.UniViewJSBridge={subscribeHandler:t.subscribeHandler},e.UniServiceJSBridge={subscribeHandler:i.subscribeHandler};var s=n("0138"),c=s.default,u=s.getApp,l=s.getCurrentPages,h=["chooseImage"];h.forEach((function(t){Object.defineProperty(c,t,{writable:!1,configurable:!1})})),e.uni=c,e.wx=e.uni,e.getApp=u,e.getCurrentPages=l,o.a.use(n("4ca9").default,{routes:__uniRoutes}),o.a.use(n("8c15").default,{routes:__uniRoutes}),Object(a["a"])(o.a),n("8f7e"),n("1efd")}).call(this,n("501c"),n("c8ba"),n("0dd1"))},"303f":function(t,e,n){"use strict";n.r(e),function(t,i){n.d(e,"CanvasContext",(function(){return j})),n.d(e,"createCanvasContext",(function(){return A})),n.d(e,"canvasGetImageData",(function(){return I})),n.d(e,"canvasPutImageData",(function(){return $})),n.d(e,"canvasToTempFilePath",(function(){return P}));var r=n("f2b3"),o=n("62b5"),a=n("db70"),s=n("a118");function c(t){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t){return d(t)||f(t)||h(t)||l()}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t,e){if(t){if("string"===typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function f(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function d(t){if(Array.isArray(t))return p(t)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0?p:255,[h,f,d,p]}return i.group("非法颜色: "+t),i.error("不支持颜色:"+t),i.groupEnd(),[0,0,0,255]}function S(t,e){this.image=t,this.repetition=e}var k,T=function(){function t(e,n){g(this,t),this.type=e,this.data=n,this.colorStop=[]}return v(t,[{key:"addColorStop",value:function(t,e){this.colorStop.push([t,w(e)])}}]),t}(),x=["scale","rotate","translate","setTransform","transform"],C=["drawImage","fillText","fill","stroke","fillRect","strokeRect","clearRect","strokeText"],O=["setFillStyle","setTextAlign","setStrokeStyle","setGlobalAlpha","setShadow","setFontSize","setLineCap","setLineJoin","setLineWidth","setMiterLimit","setTextBaseline","setLineDash"];function E(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k||(k=document.createElement("canvas")),k.width=t,k.height=e,k}function M(t){this.width=t}var j=function(){function t(e,n){g(this,t),this.id=e,this.pageId=n,this.actions=[],this.path=[],this.subpath=[],this.currentTransform=[],this.currentStepAnimates=[],this.drawingState=[],this.state={lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}return v(t,[{key:"draw",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=u(this.actions);this.actions=[],this.path=[],"function"===typeof n&&(t=b.push(n)),y(this.id,this.pageId,"actionsChanged",{actions:i,reserve:e,callbackId:t})}},{key:"createLinearGradient",value:function(t,e,n,i){return new T("linear",[t,e,n,i])}},{key:"createCircularGradient",value:function(t,e,n){return new T("radial",[t,e,n])}},{key:"createPattern",value:function(t,e){if(void 0===e)i.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present.");else{if(!(["repeat","repeat-x","repeat-y","no-repeat"].indexOf(e)<0))return new S(t,e);i.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('"+e+"') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.")}}},{key:"measureText",value:function(t){if("object"===("undefined"===typeof document?"undefined":c(document))){var e=E().getContext("2d");return e.font=this.state.font,new M(e.measureText(t).width||0)}return new M(0)}},{key:"save",value:function(){this.actions.push({method:"save",data:[]}),this.drawingState.push(this.state)}},{key:"restore",value:function(){this.actions.push({method:"restore",data:[]}),this.state=this.drawingState.pop()||{lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}},{key:"beginPath",value:function(){this.path=[],this.subpath=[]}},{key:"moveTo",value:function(t,e){this.path.push({method:"moveTo",data:[t,e]}),this.subpath=[[t,e]]}},{key:"lineTo",value:function(t,e){0===this.path.length&&0===this.subpath.length?this.path.push({method:"moveTo",data:[t,e]}):this.path.push({method:"lineTo",data:[t,e]}),this.subpath.push([t,e])}},{key:"quadraticCurveTo",value:function(t,e,n,i){this.path.push({method:"quadraticCurveTo",data:[t,e,n,i]}),this.subpath.push([n,i])}},{key:"bezierCurveTo",value:function(t,e,n,i,r,o){this.path.push({method:"bezierCurveTo",data:[t,e,n,i,r,o]}),this.subpath.push([r,o])}},{key:"arc",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.path.push({method:"arc",data:[t,e,n,i,r,o]}),this.subpath.push([t,e])}},{key:"rect",value:function(t,e,n,i){this.path.push({method:"rect",data:[t,e,n,i]}),this.subpath=[[t,e]]}},{key:"arcTo",value:function(t,e,n,i,r){this.path.push({method:"arcTo",data:[t,e,n,i,r]}),this.subpath.push([n,i])}},{key:"clip",value:function(){this.actions.push({method:"clip",data:u(this.path)})}},{key:"closePath",value:function(){this.path.push({method:"closePath",data:[]}),this.subpath.length&&(this.subpath=[this.subpath.shift()])}},{key:"clearActions",value:function(){this.actions=[],this.path=[],this.subpath=[]}},{key:"getActions",value:function(){var t=u(this.actions);return this.clearActions(),t}},{key:"lineDashOffset",set:function(t){this.actions.push({method:"setLineDashOffset",data:[t]})}},{key:"globalCompositeOperation",set:function(t){this.actions.push({method:"setGlobalCompositeOperation",data:[t]})}},{key:"shadowBlur",set:function(t){this.actions.push({method:"setShadowBlur",data:[t]})}},{key:"shadowColor",set:function(t){this.actions.push({method:"setShadowColor",data:[t]})}},{key:"shadowOffsetX",set:function(t){this.actions.push({method:"setShadowOffsetX",data:[t]})}},{key:"shadowOffsetY",set:function(t){this.actions.push({method:"setShadowOffsetY",data:[t]})}},{key:"font",set:function(t){var e=this;this.state.font=t;var n=t.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);if(n){var r=n[1].trim().split(/\s/),o=parseFloat(n[3]),a=n[7],s=[];r.forEach((function(t,n){["italic","oblique","normal"].indexOf(t)>-1?(s.push({method:"setFontStyle",data:[t]}),e.state.fontStyle=t):["bold","normal"].indexOf(t)>-1?(s.push({method:"setFontWeight",data:[t]}),e.state.fontWeight=t):0===n?(s.push({method:"setFontStyle",data:["normal"]}),e.state.fontStyle="normal"):1===n&&c()})),1===r.length&&c(),r=s.map((function(t){return t.data[0]})).join(" "),this.state.fontSize=o,this.state.fontFamily=a,this.actions.push({method:"setFont",data:["".concat(r," ").concat(o,"px ").concat(a)]})}else i.warn("Failed to set 'font' on 'CanvasContext': invalid format.");function c(){s.push({method:"setFontWeight",data:["normal"]}),e.state.fontWeight="normal"}},get:function(){return this.state.font}},{key:"fillStyle",set:function(t){this.setFillStyle(t)}},{key:"strokeStyle",set:function(t){this.setStrokeStyle(t)}},{key:"globalAlpha",set:function(t){t=Math.floor(255*parseFloat(t)),this.actions.push({method:"setGlobalAlpha",data:[t]})}},{key:"textAlign",set:function(t){this.actions.push({method:"setTextAlign",data:[t]})}},{key:"lineCap",set:function(t){this.actions.push({method:"setLineCap",data:[t]})}},{key:"lineJoin",set:function(t){this.actions.push({method:"setLineJoin",data:[t]})}},{key:"lineWidth",set:function(t){this.actions.push({method:"setLineWidth",data:[t]})}},{key:"miterLimit",set:function(t){this.actions.push({method:"setMiterLimit",data:[t]})}},{key:"textBaseline",set:function(t){this.actions.push({method:"setTextBaseline",data:[t]})}}]),t}();function A(e,n){if(n)return new j(e,n.$page.id);var i=Object(a["a"])();if(i)return new j(e,i);t.emit("onError","createCanvasContext:fail")}function I(t,e){var n=t.canvasId,i=t.x,r=t.y,o=t.width,c=t.height,u=Object(a["a"])();if(u){var l=b.push((function(t){var n=t.data;n&&n.length&&(t.data=new Uint8ClampedArray(n)),Object(s["a"])(e,t)}));y(n,u,"getImageData",{x:i,y:r,width:o,height:c,callbackId:l})}else Object(s["a"])(e,{errMsg:"canvasGetImageData:fail"})}function $(t,e){var n=t.canvasId,i=t.data,r=t.x,o=t.y,c=t.width,u=t.height,l=Object(a["a"])();if(l){var h=b.push((function(t){Object(s["a"])(e,t)}));y(n,l,"putImageData",{data:Array.prototype.slice.call(i),x:r,y:o,width:c,height:u,callbackId:h})}else Object(s["a"])(e,{errMsg:"canvasPutImageData:fail"})}function P(t,e){var n=t.x,i=void 0===n?0:n,r=t.y,o=void 0===r?0:r,c=t.width,u=t.height,l=t.destWidth,h=t.destHeight,f=t.canvasId,d=t.fileType,p=t.qualit,g=Object(a["a"])();if(g){var m=b.push((function(t){var n=t.base64;n&&n.length||Object(s["a"])(e,{errMsg:"canvasToTempFilePath:fail"}),Object(a["c"])("base64ToTempFilePath",{base64Data:n,x:i,y:o,width:c,height:u,destWidth:l,destHeight:h,canvasId:f,fileType:d,qualit:p},e)}));y(f,g,"getDataUrl",{x:i,y:o,width:c,height:u,destWidth:l,destHeight:h,hidpi:!1,fileType:d,qualit:p,callbackId:m})}else Object(s["a"])(e,{errMsg:"canvasToTempFilePath:fail"})}[].concat(x,C).forEach((function(t){function e(t){switch(t){case"fill":case"stroke":return function(){this.actions.push({method:t+"Path",data:u(this.path)})};case"fillRect":return function(t,e,n,i){this.actions.push({method:"fillPath",data:[{method:"rect",data:[t,e,n,i]}]})};case"strokeRect":return function(t,e,n,i){this.actions.push({method:"strokePath",data:[{method:"rect",data:[t,e,n,i]}]})};case"fillText":case"strokeText":return function(e,n,i,r){var o=[e.toString(),n,i];"number"===typeof r&&o.push(r),this.actions.push({method:t,data:o})};case"drawImage":return function(e,n,i,r,o,a,s,c,u){var l;function h(t){return"number"===typeof t}void 0===u&&(a=n,s=i,c=r,u=o,n=void 0,i=void 0,r=void 0,o=void 0),l=h(n)&&h(i)&&h(r)&&h(o)?[e,a,s,c,u,n,i,r,o]:h(c)&&h(u)?[e,a,s,c,u]:[e,a,s],this.actions.push({method:t,data:l})};default:return function(){for(var e=arguments.length,n=new Array(e),i=0;i0&&t<1/0?t:0;var e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=Math.floor(t%3600%60);e=(e<10?"0":"")+e,n=(n<10?"0":"")+n,i=(i<10?"0":"")+i;var r=n+":"+i;return"00"!==e&&(r=e+":"+r),r}},mixins:[o["f"],o["c"]],props:{id:{type:String,default:""},src:{type:String,default:""},duration:{type:[Number,String],default:""},controls:{type:[Boolean,String],default:!0},danmuList:{type:Array,default:function(){return[]}},danmuBtn:{type:[Boolean,String],default:!1},enableDanmu:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},loop:{type:[Boolean,String],default:!1},muted:{type:[Boolean,String],default:!1},objectFit:{type:String,default:"contain"},poster:{type:String,default:""},direction:{type:[String,Number],default:""},showProgress:{type:Boolean,default:!0},initialTime:{type:[String,Number],default:0},showFullscreenBtn:{type:[Boolean,String],default:!0},pageGesture:{type:[Boolean,String],default:!1},enableProgressGesture:{type:[Boolean,String],default:!0},showPlayBtn:{type:[Boolean,String],default:!0}},data:function(){return{start:!1,playing:!1,currentTime:0,durationTime:0,progress:0,touching:!1,enableDanmuSync:Boolean(this.enableDanmu),controlsVisible:!0,fullscreen:!1,controlsTouching:!1,touchStartOrigin:{x:0,y:0},gestureType:c.NONE,currentTimeOld:0,currentTimeNew:0,volumeOld:null,volumeNew:null,buffered:0,isSafari:/^Apple/.test(navigator.vendor)}},computed:{controlsShow:function(){return this.start&&this.controls&&this.controlsVisible},autoHideContorls:function(){return this.controlsShow&&this.playing&&!this.controlsTouching},srcSync:function(){return this.$getRealPath(this.src)}},watch:{enableDanmuSync:function(t){this.$emit("update:enableDanmu",t)},autoHideContorls:function(t){t?this.autoHideStart():this.autoHideEnd()},srcSync:function(t){this.playing=!1,this.currentTime=0},currentTime:function(){this.updateProgress()},duration:function(){this.updateProgress()},buffered:function(t){0!==t&&this.$trigger("progress",{},{buffered:t})}},created:function(){this.otherData={danmuList:[],danmuIndex:{time:0,index:-1},hideTiming:null};var t=this.otherData.danmuList=JSON.parse(JSON.stringify(this.danmuList||[]));t.sort((function(t,e){return(t.time||0)-(t.time||0)}))},mounted:function(){var t,e,n,i=this,r=this,o=!0,a=this.$refs.ball;function c(i){var a=i.targetTouches[0],s=a.pageX,c=a.pageY;if(o&&Math.abs(s-t)100&&(h=100),r.progress=h,i.preventDefault(),i.stopPropagation()}}function u(t){r.controlsTouching=!1,r.touching&&(a.removeEventListener("touchmove",c,s),o||(t.preventDefault(),t.stopPropagation(),r.seek(r.$refs.video.duration*r.progress/100)),r.touching=!1)}a.addEventListener("touchstart",(function(r){i.controlsTouching=!0;var u=r.targetTouches[0];t=u.pageX,e=u.pageY,n=i.progress,o=!0,i.touching=!0,a.addEventListener("touchmove",c,s)})),a.addEventListener("touchend",u),a.addEventListener("touchcancel",u)},beforeDestroy:function(){this.triggerFullscreen(!1),clearTimeout(this.otherData.hideTiming)},methods:{_handleSubscribe:function(t){var e,n=t.type,i=t.data,r=void 0===i?{}:i,o=["play","pause","seek","sendDanmu","playbackRate","requestFullScreen","exitFullScreen"];switch(n){case"seek":e=r.position;break;case"sendDanmu":e=r;break;case"playbackRate":e=r.rate;break}o.indexOf(n)>=0&&this[n](e)},trigger:function(){this.playing?this.$refs.video.pause():this.$refs.video.play()},play:function(){this.start=!0,this.$refs.video.play()},pause:function(){this.$refs.video.pause()},seek:function(t){t=Number(t),"number"!==typeof t||isNaN(t)||(this.$refs.video.currentTime=t)},clickProgress:function(t){var e=this.$refs.progress,n=t.target,i=t.offsetX;while(n!==e)i+=n.offsetLeft,n=n.parentNode;var r=e.offsetWidth,o=0;i>=0&&i<=r&&(o=i/r,this.seek(this.$refs.video.duration*o))},triggerDanmu:function(){this.enableDanmuSync=!this.enableDanmuSync},playDanmu:function(t){var e=document.createElement("p");e.className="uni-video-danmu-item",e.innerText=t.text;var n="bottom: ".concat(100*Math.random(),"%;color: ").concat(t.color,";");e.setAttribute("style",n),this.$refs.danmu.appendChild(e),setTimeout((function(){n+="left: 0;-webkit-transform: translateX(-100%);transform: translateX(-100%);",e.setAttribute("style",n),setTimeout((function(){e.remove()}),4e3)}),17)},sendDanmu:function(t){var e=this.otherData;e.danmuList.splice(e.danmuIndex.index+1,0,{text:String(t.text),color:t.color,time:this.$refs.video.currentTime||0})},playbackRate:function(t){this.$refs.video.playbackRate=t},triggerFullscreen:function(t){var e,n=this.$refs.container,i=this.$refs.video;t?!document.fullscreenEnabled&&!document.webkitFullscreenEnabled||this.isSafari&&!this.userInteract?i.webkitEnterFullScreen?i.webkitEnterFullScreen():(e=!0,n.remove(),n.classList.add("uni-video-type-fullscreen"),document.body.appendChild(n)):n[document.fullscreenEnabled?"requestFullscreen":"webkitRequestFullscreen"]():document.fullscreenEnabled||document.webkitFullscreenEnabled?document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen():i.webkitExitFullScreen?i.webkitExitFullScreen():(e=!0,n.remove(),n.classList.remove("uni-video-type-fullscreen"),this.$el.appendChild(n)),e&&this.emitFullscreenChange(t)},onFullscreenChange:function(t,e){e&&document.fullscreenEnabled||this.emitFullscreenChange(!(!document.fullscreenElement&&!document.webkitFullscreenElement))},emitFullscreenChange:function(t){this.fullscreen=t,this.$trigger("fullscreenchange",{},{fullScreen:t,direction:"vertical"})},requestFullScreen:function(){this.triggerFullscreen(!0)},exitFullScreen:function(){this.triggerFullscreen(!1)},onDurationChange:function(t){var e=t.target;this.durationTime=e.duration},onLoadedMetadata:function(t){var e=Number(this.initialTime)||0,n=t.target;e>0&&(n.currentTime=e),this.$trigger("loadedmetadata",t,{width:n.videoWidth,height:n.videoHeight,duration:n.duration}),this.onProgress(t)},onProgress:function(t){var e=t.target,n=e.buffered;n.length&&(this.buffered=n.end(n.length-1)/e.duration*100)},onWaiting:function(t){this.$trigger("waiting",t,{})},onVideoError:function(t){this.playing=!1,this.$trigger("error",t,{})},onPlay:function(t){this.start=!0,this.playing=!0,this.$trigger("play",t,{})},onPause:function(t){this.playing=!1,this.$trigger("pause",t,{})},onEnded:function(t){this.playing=!1,this.$trigger("ended",t,{})},onTimeUpdate:function(t){var e=t.target,n=this.otherData,i=this.currentTime=e.currentTime,r=n.danmuIndex,o={time:i,index:r.index},a=n.danmuList;if(i>r.time)for(var s=r.index+1;s=(c.time||0)))break;o.index=s,this.playing&&this.enableDanmuSync&&this.playDanmu(c)}else if(i-1;u--){var l=a[u];if(!(i<=(l.time||0)))break;o.index=u-1}n.danmuIndex=o,this.$trigger("timeupdate",t,{currentTime:i,duration:e.duration})},triggerControls:function(){this.controlsVisible=!this.controlsVisible},touchstart:function(t){var e=t.targetTouches[0];this.touchStartOrigin={x:e.pageX,y:e.pageY},this.gestureType=c.NONE,this.volumeOld=null,this.currentTimeOld=this.currentTimeNew=0},touchmove:function(t){function e(){t.stopPropagation(),t.preventDefault()}this.fullscreen&&e();var n=this.gestureType;if(n!==c.STOP){var i=t.targetTouches[0],r=i.pageX,o=i.pageY,a=this.touchStartOrigin;if(n===c.PROGRESS?this.changeProgress(r-a.x):n===c.VOLUME&&this.changeVolume(o-a.y),n===c.NONE)if(Math.abs(r-a.x)>Math.abs(o-a.y)){if(!this.enableProgressGesture)return void(this.gestureType=c.STOP);this.gestureType=c.PROGRESS,this.currentTimeOld=this.currentTimeNew=this.$refs.video.currentTime,this.fullscreen||e()}else{if(!this.pageGesture)return void(this.gestureType=c.STOP);this.gestureType=c.VOLUME,this.volumeOld=this.$refs.video.volume,this.fullscreen||e()}}},touchend:function(t){this.gestureType!==c.NONE&&this.gestureType!==c.STOP&&(t.stopPropagation(),t.preventDefault()),this.gestureType===c.PROGRESS&&this.currentTimeOld!==this.currentTimeNew&&(this.$refs.video.currentTime=this.currentTimeNew),this.gestureType=c.NONE},changeProgress:function(t){var e=this.$refs.video.duration,n=t/600*e+this.currentTimeOld;n<0?n=0:n>e&&(n=e),this.currentTimeNew=n},changeVolume:function(t){var e,n=this.volumeOld;"number"===typeof n&&(e=n-t/200,e<0?e=0:e>1&&(e=1),this.$refs.video.volume=e,this.volumeNew=e)},autoHideStart:function(){var t=this;this.otherData.hideTiming=setTimeout((function(){t.controlsVisible=!1}),3e3)},autoHideEnd:function(){var t=this.otherData;t.hideTiming&&(clearTimeout(t.hideTiming),t.hideTiming=null)},updateProgress:function(){this.touching||(this.progress=this.currentTime/this.durationTime*100)}}},l=u,h=(n("856e"),n("2877")),f=Object(h["a"])(l,i,r,!1,null,null,null);e["default"]=f.exports},"324c":function(t,e,n){},"332a":function(t,e,n){"use strict";n.r(e),n.d(e,"redirectTo",(function(){return c})),n.d(e,"reLaunch",(function(){return u})),n.d(e,"navigateTo",(function(){return l})),n.d(e,"switchTab",(function(){return h})),n.d(e,"navigateBack",(function(){return f}));var i=n("0f74");function r(t){if("string"!==typeof t)return t;var e=t.indexOf("?");if(-1===e)return t;var n=t.substr(e+1).trim().replace(/^(\?|#|&)/,"");if(!n)return t;t=t.substr(0,e);var i=[];return n.split("&").forEach((function(t){var e=t.replace(/\+/g," ").split("="),n=e.shift(),r=e.length>0?e.join("="):"";i.push(n+"="+encodeURIComponent(r))})),i.length?t+"?"+i.join("&"):t}function o(t){return function(e,n){e=Object(i["a"])(e);var o=e.split("?")[0],a=__uniRoutes.find((function(t){var e=t.path,n=t.alias;return e===o||n===o}));if(!a)return"page `"+e+"` is not found";if("navigateTo"===t||"redirectTo"===t){if(a.meta.isTabBar)return"can not ".concat(t," a tabbar page")}else if("switchTab"===t&&!a.meta.isTabBar)return"can not switch to no-tabBar page";"switchTab"===t&&a.meta.isTabBar&&(e=o),a.meta.isEntry&&(e=e.replace(a.alias,"/")),n.url=r(e)}}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({url:{type:String,required:!0,validator:o(t)}},e)}function s(t){return{animationType:{type:String,validator:function(e){if(e&&-1===t.indexOf(e))return"`"+e+"` is not supported for `animationType` (supported values are: `"+t.join("`|`")+"`)"}},animationDuration:{type:Number}}}var c=a("redirectTo"),u=a("reLaunch"),l=a("navigateTo",s(["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"])),h=a("switchTab"),f=Object.assign({delta:{type:Number,validator:function(t,e){t=parseInt(t)||1,e.delta=Math.min(getCurrentPages().length-1,t)}}},s(["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"]))},"33b4":function(t,e,n){},"33ed":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return c}));var i,r=n("4a59");function o(t){t.preventDefault()}function a(t){var e=t.scrollTop,n=t.duration,i=document.documentElement,r=i.clientHeight,o=i.scrollHeight;function a(t){if(t<=0)window.scrollTo(0,e);else{var n=e-window.scrollY;requestAnimationFrame((function(){window.scrollTo(0,window.scrollY+n/t*10),a(t-10)}))}}e=Math.min(e,o-r),0!==n?window.scrollY!==e&&a(n):i.scrollTop=document.body.scrollTop=e}var s=0;function c(e,n){var o=n.enablePageScroll,a=n.enablePageReachBottom,c=n.onReachBottomDistance,u=n.enableTransparentTitleNView,l=!1,h=!1,f=!0;function d(){var t=document.documentElement.scrollHeight,e=window.innerHeight,n=window.scrollY,i=n>0&&t>e&&n+e+c>=t,r=Math.abs(t-s)>c;return!i||h&&!r?(!i&&h&&(h=!1),!1):(s=t,h=!0,!0)}function p(){var n=getCurrentPages();if(n.length&&n[n.length-1].$page.id===e){var s=window.pageYOffset;o&&Object(r["a"])("onPageScroll",{scrollTop:s},e),u&&t.emit("onPageScroll",{scrollTop:s}),a&&f&&(c()||(i=setTimeout(c,300))),l=!1}function c(){if(d())return Object(r["a"])("onReachBottom",{},e),f=!1,setTimeout((function(){f=!0}),350),!0}}return function(){clearTimeout(i),l||requestAnimationFrame(p),l=!0}}}).call(this,n("501c"))},"34b2":function(t,e,n){"use strict";n.r(e),function(t){function i(){return window.location.protocol+"//"+window.location.host}function r(e,n){var r=e.src,o=t,a=o.invokeCallbackHandler,s=new Image,c=r;s.onload=function(){a(n,{errMsg:"getImageInfo:ok",width:s.naturalWidth,height:s.naturalHeight,path:0===c.indexOf("/")?i()+c:c})},s.onerror=function(t){a(n,{errMsg:"getImageInfo:fail"})},s.src=r}n.d(e,"getImageInfo",(function(){return r}))}.call(this,n("0dd1"))},3590:function(t,e,n){},3648:function(t,e,n){"use strict";n.r(e),n.d(e,"canIUse",(function(){return a}));var i=n("f2b3");function r(t){return window.CSS&&window.CSS.supports&&window.CSS.supports(t)}var o={"css.var":r("--a:0"),"css.env":r("top:env(a)"),"css.constant":r("top:constant(a)")};function a(t){return!Object(i["f"])(o,t)||o[t]}},3676:function(t,e,n){"use strict";n.r(e),n.d(e,"getRecorderManager",(function(){return l}));var i=n("db70");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.filePath,n=arguments.length>1?arguments[1]:void 0;Object(i["c"])(e).then((function(t){o(n,{errMsg:"getFileInfo:ok",size:t.size})})).catch((function(t){o(n,{errMsg:"getFileInfo:fail 文件["+e+"] getFileInfo 失败:"+t.message})}))}}.call(this,n("0dd1"))},"3b67":function(t,e,n){"use strict";var i=Object.create(null),r=n("e3a7");r.keys().forEach((function(t){Object.assign(i,r(t))})),e["a"]=i},"3bfb":function(t,e,n){"use strict";n.r(e),n.d(e,"createAudioContext",(function(){return r})),n.d(e,"createVideoContext",(function(){return o})),n.d(e,"createMapContext",(function(){return a})),n.d(e,"createCanvasContext",(function(){return s}));var i=[{name:"id",type:String,required:!0}],r=i,o=i,a=i,s=[{name:"canvasId",type:String,required:!0},{name:"componentInstance",type:Object}]},"3c79":function(t,e,n){},"3d1f":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("62b5"),r=n("a741");function o(t,e){e.getApp;var n=e.getCurrentPages;function o(t){return function(e,i){i=parseInt(i);var o=n(),a=o.find((function(t){return t.$page.id===i}));a&&Object(r["b"])(a,t,e)}}var a=Object(i["a"])("requestComponentInfo");function s(t){var e=t.reqId,n=t.res,i=a.pop(e);i&&i(n)}var c=Object(i["a"])("requestComponentObserver");function u(t){var e=t.reqId,n=t.reqEnd,i=t.res,r=c.get(e);if(r){if(n)return void c.pop(e);r(i)}}t("onPageReady",o("onReady")),t("onPageScroll",o("onPageScroll")),t("onReachBottom",o("onReachBottom")),t("onRequestComponentInfo",s),t("onRequestComponentObserver",u)}},"3d64":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"onNetworkStatusChange",(function(){return s})),n.d(e,"getNetworkType",(function(){return c}));var i=t,r=i.invokeCallbackHandler,o=[];function a(){var t=c(),e=t.networkType;o.forEach((function(t){r(t,{errMsg:"onNetworkStatusChange:ok",isConnected:"none"!==e,networkType:e})}))}function s(t){var e=navigator.connection||navigator.webkitConnection;o.push(t),e?e.addEventListener("change",a):(window.addEventListener("offline",a),window.addEventListener("online",a))}function c(){var t=navigator.connection||navigator.webkitConnection,e="unknown";return t?(e=t.type,"cellular"===e&&t.effectiveType?e=t.effectiveType.replace("slow-",""):["none","wifi"].includes(e)||(e="unknown")):!1===navigator.onLine&&(e="none"),{errMsg:"getNetworkType:ok",networkType:e}}}.call(this,n("0dd1"))},"3da9":function(t,e,n){"use strict";var i=n("bfbd"),r=n.n(i);r.a},"3e8c":function(t,e,n){"use strict";n.r(e);var i,r,o={name:"ResizeSensor",props:{initial:{type:[Boolean,String],default:!1}},data:function(){return{size:{width:-1,height:-1}}},watch:{size:{deep:!0,handler:function(t){this.$emit("resize",Object.assign({},t))}}},mounted:function(){!0===this.initial&&this.$nextTick(this.update),this.$el.offsetParent!==this.$el.parentNode&&(this.$el.parentNode.style.position="relative"),"AnimationEvent"in window||this.reset()},methods:{reset:function(){var t=this.$el.firstChild,e=this.$el.lastChild;t.scrollLeft=1e5,t.scrollTop=1e5,e.scrollLeft=1e5,e.scrollTop=1e5},update:function(){this.size.width=this.$el.offsetWidth,this.size.height=this.$el.offsetHeight,this.reset()}},render:function(t){return t("uni-resize-sensor",{on:{"~animationstart":this.update}},[t("div",{on:{scroll:this.update}},[t("div")]),t("div",{on:{scroll:this.update}},[t("div")])])}},a=o,s=(n("64d0"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"3f7e":function(t,e,n){"use strict";var i=n("e692"),r=n.n(i);r.a},"439a":function(t,e,n){"use strict";n.r(e),n.d(e,"downloadFile",(function(){return i}));var i={url:{type:String,required:!0},header:{type:Object,validator:function(t,e){e.header=t||{}}}}},"442e":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return a}));var i=n("5129"),r=n.n(i),o=n("85b6");function a(e){e.config.errorHandler=function(e){var n="function"===typeof getApp&&getApp();n&&Object(o["a"])(n.$options,"onError")?n.__call_hook("onError",e):t.error(e)};var n=e.config.isReservedTag;e.config.isReservedTag=function(t){return-1!==r.a.indexOf(t)||n(t)},e.config.ignoredElements=r.a;var i=e.config.getTagNamespace,a=["switch","image","text","view"];e.config.getTagNamespace=function(t){return!~a.indexOf(t)&&(i(t)||!1)}}}).call(this,n("3ad9")["default"])},"44de":function(t,e,n){"use strict";n.r(e),n.d(e,"vibrateLong",(function(){return r})),n.d(e,"vibrateShort",(function(){return o}));var i=!!window.navigator.vibrate;function r(){return i&&window.navigator.vibrate(400)?{errMsg:"vibrateLong:ok"}:{errMsg:"vibrateLong:fail"}}function o(){return i&&window.navigator.vibrate(15)?{errMsg:"vibrateShort:ok"}:{errMsg:"vibrateShort:fail"}}},"454d":function(t,e,n){"use strict";n.r(e),n.d(e,"removeTabBarBadge",(function(){return o})),n.d(e,"showTabBarRedDot",(function(){return a})),n.d(e,"hideTabBarRedDot",(function(){return s})),n.d(e,"onTabBarMidButtonTap",(function(){return u}));var i=n("db70"),r=n("a118");function o(t){var e=t.index;return Object(i["c"])("setTabBarBadge",{index:e,type:"none"})}function a(t){var e=t.index;return Object(i["c"])("setTabBarBadge",{index:e,type:"redDot"})}var s=o,c=[];function u(t){c.push(t)}Object(i["d"])("onTabBarMidButtonTap",(function(t){c.forEach((function(e){Object(r["a"])(e,t)}))}))},"45d2":function(t,e,n){"use strict";n.r(e),n.d(e,"upx2px",(function(){return u}));var i=1e-4,r=750,o=!1,a=0,s=0;function c(){var t=uni.getSystemInfoSync(),e=t.platform,n=t.pixelRatio,i=t.windowWidth;a=i,s=n,o="ios"===e}function u(t,e){if(0===a&&c(),t=Number(t),0===t)return 0;var n=t/r*(e||a);return n<0&&(n=-n),n=Math.floor(n+i),0===n?1!==s&&o?.5:1:t<0?-n:n}},"45db":function(t,e,n){"use strict";n.r(e),function(t){var i;function r(t){i=t}function o(){i&&t.emit(i+".stopPullDownRefresh",{},i);var e=getCurrentPages();return e.length&&(i=e[e.length-1].$page.id,t.emit(i+".startPullDownRefresh",{},i)),{}}function a(){if(i)t.emit(i+".stopPullDownRefresh",{},i),i=null;else{var e=getCurrentPages();e.length&&(i=e[e.length-1].$page.id,t.emit(i+".stopPullDownRefresh",{},i))}return{}}n.d(e,"setPullDownRefreshPageId",(function(){return r})),n.d(e,"startPullDownRefresh",(function(){return o})),n.d(e,"stopPullDownRefresh",(function(){return a}))}.call(this,n("0dd1"))},"4a59":function(t,e,n){"use strict";(function(t){function i(e,n,i){t.UniServiceJSBridge.subscribeHandler(e,n,i)}n.d(e,"a",(function(){return i}))}).call(this,n("c8ba"))},"4ca9":function(t,e,n){"use strict";n.r(e),function(t){var i=n("6389"),r=n.n(i),o=n("85b6"),a=n("abbf"),s=n("0784"),c=n("aa92"),u=n("02c9"),l=n("23e5");function h(t){var e=0;return t.forEach((function(t){t.meta.id&&e++})),e}function f(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":decodeURI(t.slice(e+1))}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=decodeURI(window.location.pathname);return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}e["default"]={install:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.routes;e.config.devtools&&"undefined"!==typeof window&&-1!==window.navigator.userAgent.toLowerCase().indexOf("hbuilderx")&&(e.config.devtools=!1),Object(u["a"])(e),Object(c["a"])(e);var p=h(i),g=new r.a({id:p,mode:__uniConfig.router.mode,base:__uniConfig.router.base,routes:i,scrollBehavior:function(t,e,n){if(n)return n;if(t&&e&&t.meta.isTabBar&&e.meta.isTabBar){var i=Object(l["b"])(t.params.__id__);if(i)return i}return{x:0,y:0}}}),m=[],v=g.match("history"===__uniConfig.router.mode?d(__uniConfig.router.base):f());if(v.meta.name&&(v.meta.id?m.push(v.meta.name+"-"+v.meta.id):m.push(v.meta.name+"-"+(p+1))),v.meta&&v.meta.name&&(document.body.className="uni-body "+v.meta.name,v.meta.isNVue)){var b="nvue-dir-"+__uniConfig.nvue["flex-direction"];document.body.setAttribute("nvue",""),document.body.setAttribute(b,"")}e.mixin({beforeCreate:function(){var e=this.$options;if("app"===e.mpType){e.data=function(){return{keepAliveInclude:m}};var n=Object(a["a"])(i,v);Object.keys(n).forEach((function(t){e[t]=e[t]?[].concat(n[t],e[t]):[n[t]]})),e.router=g,Array.isArray(e.onError)&&0!==e.onError.length||(e.onError=[function(e){t.error(e)}])}else if(Object(o["b"])(this)){var r=Object(s["a"])();Object.keys(r).forEach((function(t){e.mpOptions?e[t]=e[t]?[].concat(e[t],r[t]):[r[t]]:e[t]=e[t]?[].concat(r[t],e[t]):[r[t]]}))}else this.$parent&&this.$parent.__page__&&(this.__page__=this.$parent.__page__)}}),Object.defineProperty(e.prototype,"$page",{get:function(){return this.__page__}}),e.prototype.createSelectorQuery=function(){return uni.createSelectorQuery().in(this)},e.prototype.createIntersectionObserver=function(t){return uni.createIntersectionObserver(this,t)},e.use(r.a)}}}.call(this,n("3ad9")["default"])},"4da7":function(t,e,n){"use strict";n.r(e);var i,r,o=n("5881"),a=o["a"],s=(n("c8ed"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"4e0b":function(t,e,n){},"4e7c":function(t,e,n){"use strict";n.r(e),n.d(e,"getProvider",(function(){return r}));var i={OAUTH:"OAUTH",SHARE:"SHARE",PAYMENT:"PAYMENT",PUSH:"PUSH"},r={service:{type:String,required:!0,validator:function(t,e){if(t=(t||"").toUpperCase(),t&&Object.values(i).indexOf(t)<0)return"service error"}}}},"4f1c":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-switch",t._g({attrs:{disabled:t.disabled},on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-switch-wrapper"},[n("div",{directives:[{name:"show",rawName:"v-show",value:"switch"===t.type,expression:"type === 'switch'"}],staticClass:"uni-switch-input",class:[t.switchChecked?"uni-switch-input-checked":""],style:{backgroundColor:t.switchChecked?t.color:"#DFDFDF",borderColor:t.switchChecked?t.color:"#DFDFDF"}}),n("div",{directives:[{name:"show",rawName:"v-show",value:"checkbox"===t.type,expression:"type === 'checkbox'"}],staticClass:"uni-checkbox-input",class:[t.switchChecked?"uni-checkbox-input-checked":""],style:{color:t.color}})])])},r=[],o=n("8af1"),a={name:"Switch",mixins:[o["a"],o["e"]],props:{name:{type:String,default:""},checked:{type:[Boolean,String],default:!1},type:{type:String,default:"switch"},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"}},data:function(){return{switchChecked:this.checked}},watch:{checked:function(t){this.switchChecked=t}},created:function(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},listeners:{"label-click":"_onClick","@label-click":"_onClick"},methods:{_onClick:function(t){this.disabled||(this.switchChecked=!this.switchChecked,this.$trigger("change",t,{value:this.switchChecked}))},_resetFormData:function(){this.switchChecked=!1},_getFormData:function(){var t={};return""!==this.name&&(t.value=this.switchChecked,t.key=this.name),t}}},s=a,c=(n("a5ec"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"4f43":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"downloadFile",(function(){return u}));var i=n("e2e2");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n=0&&this._callbacks.splice(e,1)}},{key:"abort",value:function(){this._xhr&&(this._xhr.abort(),delete this._xhr)}}]),t}();function u(e,n){var r,o=e.url,a=e.header,s=__uniConfig.networkTimeout&&__uniConfig.networkTimeout.downloadFile||6e4,u=t,l=u.invokeCallbackHandler,h=new XMLHttpRequest,f=new c(h);return h.open("GET",o,!0),Object.keys(a).forEach((function(t){h.setRequestHeader(t,a[t])})),h.responseType="blob",h.onload=function(){clearTimeout(r);var t=h.status,e=this.response;l(n,{errMsg:"downloadFile:ok",statusCode:t,tempFilePath:Object(i["a"])(e)})},h.onabort=function(){clearTimeout(r),l(n,{errMsg:"downloadFile:fail abort"})},h.onerror=function(){clearTimeout(r),l(n,{errMsg:"downloadFile:fail"})},h.onprogress=function(t){f._callbacks.forEach((function(e){var n=t.loaded,i=t.total,r=Math.round(n/i*100);e({progress:r,totalBytesWritten:n,totalBytesExpectedToWrite:i})}))},h.send(),r=setTimeout((function(){h.onprogress=h.onload=h.onabort=h.onerror=null,f.abort(),l(n,{errMsg:"downloadFile:fail timeout"})}),s),f}}.call(this,n("0dd1"))},"4fef":function(t,e,n){"use strict";var i=n("7572"),r=n.n(i);r.a},"501c":function(t,e,n){"use strict";n.r(e),n.d(e,"on",(function(){return g})),n.d(e,"off",(function(){return m})),n.d(e,"once",(function(){return v})),n.d(e,"emit",(function(){return b})),n.d(e,"subscribe",(function(){return y})),n.d(e,"unsubscribe",(function(){return _})),n.d(e,"subscribeHandler",(function(){return w})),n.d(e,"publishHandler",(function(){return d["a"]}));var i=n("8bbf"),r=n.n(i);function o(t){var e=t.pageStyle,n=t.rootFontSize,i=document.querySelector("uni-page-body")||document.body;i.setAttribute("style",e),n&&document.documentElement.style.fontSize!==n&&(document.documentElement.style.fontSize=n)}var a=n("6bdf"),s=n("5dc1"),c={setPageMeta:o,requestComponentInfo:a["a"],requestComponentObserver:s["b"],destroyComponentObserver:s["a"]},u=n("33ed"),l=n("7107"),h=n("764a");function f(t){Object.keys(c).forEach((function(e){t(e,c[e])})),t("pageScrollTo",u["c"]),t("loadFontFace",l["a"]),Object(h["a"])(t)}var d=n("4a59"),p=new r.a,g=p.$on.bind(p),m=p.$off.bind(p),v=p.$once.bind(p),b=p.$emit.bind(p);function y(t,e){return g("service."+t,e)}function _(t,e){return m("service."+t,e)}function w(t,e,n){b("service."+t,e,n)}f(y)},"50c5":function(t,e,n){},5129:function(t,e){t.exports=["uni-app","uni-tabbar","uni-page","uni-page-head","uni-page-wrapper","uni-page-body","uni-page-refresh","uni-actionsheet","uni-modal","uni-toast","uni-resize-sensor","uni-shadow-root","uni-ad","uni-audio","uni-button","uni-camera","uni-canvas","uni-checkbox","uni-checkbox-group","uni-cover-image","uni-cover-view","uni-editor","uni-form","uni-functional-page-navigator","uni-icon","uni-image","uni-input","uni-label","uni-live-player","uni-live-pusher","uni-map","uni-movable-area","uni-movable-view","uni-navigator","uni-official-account","uni-open-data","uni-picker","uni-picker-view","uni-picker-view-column","uni-progress","uni-radio","uni-radio-group","uni-rich-text","uni-scroll-view","uni-slider","uni-swiper","uni-swiper-item","uni-switch","uni-text","uni-textarea","uni-video","uni-view","uni-web-view"]},"515d":function(t,e,n){},5222:function(t,e,n){"use strict";(function(t){var i=n("5a56");e["a"]={name:"Toast",mixins:[i["default"]],props:{title:{type:String,default:""},icon:{default:"success",validator:function(t){return-1!==["success","loading","none"].indexOf(t)}},image:{type:String,default:""},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean,default:!1}},computed:{iconClass:function(){return"success"===this.icon?"uni-icon-success-no-circle":"loading"===this.icon?"uni-loading":""}},beforeUpdate:function(){this.visible&&(this.timeoutId&&clearTimeout(this.timeoutId),this.timeoutId=setTimeout((function(){t.emit("onHideToast")}),this.duration))}}}).call(this,n("0dd1"))},5363:function(t,e,n){"use strict";function i(t){this._drag=t,this._dragLog=Math.log(t),this._x=0,this._v=0,this._startTime=0}n.d(e,"a",(function(){return i})),i.prototype.set=function(t,e){this._x=t,this._v=e,this._startTime=(new Date).getTime()},i.prototype.setVelocityByEnd=function(t){this._v=(t-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)},i.prototype.x=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._x+this._v*e/this._dragLog-this._v/this._dragLog},i.prototype.dx=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._v*e},i.prototype.done=function(){return Math.abs(this.dx())<3},i.prototype.reconfigure=function(t){var e=this.x(),n=this.dx();this._drag=t,this._dragLog=Math.log(t),this.set(e,n)},i.prototype.configuration=function(){var t=this;return[{label:"Friction",read:function(){return t._drag},write:function(e){t.reconfigure(e)},min:.001,max:.1,step:.001}]}},5408:function(t,e,n){var i={"./button/index.vue":"d3bd","./canvas/index.vue":"bacd","./checkbox-group/index.vue":"25ce","./checkbox/index.vue":"7bb3","./editor/index.vue":"27c2","./form/index.vue":"b34d","./icon/index.vue":"9a8b","./image/index.vue":"1082","./input/index.vue":"250d","./label/index.vue":"70f4","./movable-area/index.vue":"c61c","./movable-view/index.vue":"8842","./navigator/index.vue":"17fd","./picker-view-column/index.vue":"1955","./picker-view/index.vue":"27ab","./progress/index.vue":"9b1f","./radio-group/index.vue":"d5ec","./radio/index.vue":"6491","./resize-sensor/index.vue":"3e8c","./rich-text/index.vue":"b705","./scroll-view/index.vue":"f1ef","./slider/index.vue":"9f96","./swiper-item/index.vue":"9213","./swiper/index.vue":"5513","./switch/index.vue":"4f1c","./text/index.vue":"4da7","./textarea/index.vue":"5768","./view/index.vue":"2bbe"};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id="5408"},"54bc":function(t,e,n){},5513:function(t,e,n){"use strict";n.r(e);var i,r,o=n("ba15"),a=n("f2b3"),s={name:"Swiper",mixins:[o["a"]],props:{indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1}},data:function(){return{currentSync:Math.round(this.current)||0,currentItemIdSync:this.currentItemId||"",userTracking:!1,currentChangeSource:"",items:[]}},computed:{intervalNumber:function(){var t=Number(this.interval);return isNaN(t)?5e3:t},durationNumber:function(){var t=Number(this.duration);return isNaN(t)?500:t},displayMultipleItemsNumber:function(){var t=Math.round(this.displayMultipleItems);return isNaN(t)?1:t},slidesStyle:function(){var t={};return(this.nextMargin||this.previousMargin)&&(t=this.vertical?{left:0,right:0,top:this._upx2px(this.previousMargin),bottom:this._upx2px(this.nextMargin)}:{top:0,bottom:0,left:this._upx2px(this.previousMargin),right:this._upx2px(this.nextMargin)}),t},slideFrameStyle:function(){var t=Math.abs(100/this.displayMultipleItemsNumber)+"%";return{width:this.vertical?"100%":t,height:this.vertical?t:"100%"}},circularEnabled:function(){return this.circular&&this.items.length>this.displayMultipleItemsNumber}},watch:{vertical:function(){this._resetLayout()},circular:function(){this._resetLayout()},intervalNumber:function(t){this._timer&&(this._cancelSchedule(),this._scheduleAutoplay())},current:function(t){this._currentCheck()},currentSync:function(t){this._currentChanged(t),this.$emit("update:current",t)},currentItemId:function(t){this._currentCheck()},currentItemIdSync:function(t){this.$emit("update:currentItemId",t)},displayMultipleItemsNumber:function(){this._resetLayout()}},created:function(){this._invalid=!0,this._viewportPosition=0,this._viewportMoveRatio=1,this._animating=null,this._requestedAnimation=!1,this._userDirectionChecked=!1,this._contentTrackViewport=0,this._contentTrackSpeed=0,this._contentTrackT=0},mounted:function(){var t=this;this._currentCheck(),this.touchtrack(this.$refs.slidesWrapper,"_handleContentTrack",!0),this._resetLayout(),this.$watch((function(){return t.autoplay&&!t.userTracking}),this._inintAutoplay),this._inintAutoplay(this.autoplay&&!this.userTracking),this.$watch("items.length",this._resetLayout)},beforeDestroy:function(){this._cancelSchedule(),cancelAnimationFrame(this._animationFrame)},methods:{_inintAutoplay:function(t){t?this._scheduleAutoplay():this._cancelSchedule()},_currentCheck:function(){var t=-1;if(this.currentItemId)for(var e=0,n=this.items;ee-this.displayMultipleItemsNumber)return e-this.displayMultipleItemsNumber;return n},_upx2px:function(t){return/\d+[ur]px$/i.test(t)&&t.replace(/\d+[ur]px$/i,(function(t){return"".concat(uni.upx2px(parseFloat(t)),"px")})),t||""},_resetLayout:function(){if(this._isMounted){this._cancelSchedule(),this._endViewportAnimation();for(var t=this.items,e=0;e0&&this._viewportMoveRatio<1||(this._viewportMoveRatio=1)}var r=this._viewportPosition;this._viewportPosition=-2;var o=this.currentSync;o>=0?(this._invalid=!1,this.userTracking?(this._updateViewport(r+o-this._contentTrackViewport),this._contentTrackViewport=o):(this._updateViewport(o),this.autoplay&&this._scheduleAutoplay())):(this._invalid=!0,this._updateViewport(-this.displayMultipleItemsNumber-1))}},_checkCircularLayout:function(t){if(!this._invalid)for(var e=this.items,n=e.length,i=t+this.displayMultipleItemsNumber,r=0;r=this.items.length&&(t-=this.items.length),t=this._transitionStart%1>.5||this._transitionStart<0?t-1:t,this.$trigger("transition",{},{dx:this.vertical?0:t*r.offsetWidth,dy:this.vertical?t*r.offsetHeight:0})},_animateFrameFuncProto:function(){var t=this;if(this._animating){var e=this._animating,n=e.toPos,i=e.acc,r=e.endTime,o=e.source,a=r-Date.now();if(a<=0){this._updateViewport(n),this._animating=null,this._requestedAnimation=!1,this._transitionStart=null;var s=this.items[this.currentSync];s&&this._itemReady(s,(function(){var e=s.componentInstance.itemId||"";t.$trigger("animationfinish",{},{current:t.currentSync,currentItemId:e,source:o})}))}else{var c=i*a*a/2,u=n+c;this._updateViewport(u),this._animationFrame=requestAnimationFrame(this._animateFrameFuncProto.bind(this))}}else this._requestedAnimation=!1},_animateViewport:function(t,e,n){this._cancelViewportAnimation();var i=this.durationNumber,r=this.items.length,o=this._viewportPosition;if(this.circularEnabled)if(n<0){for(;ot;)o-=r}else if(n>0){for(;o>t;)o-=r;for(;o+rt;)o-=r;o+r-tr)&&(i<0?i=-o(-i):i>r&&(i=r+o(i-r)),e._contentTrackSpeed=0),e._updateViewport(i)}var s=this._contentTrackT-n||1;this.vertical?a(-t.dy/this.$refs.slideFrame.offsetHeight,-t.ddy/s):a(-t.dx/this.$refs.slideFrame.offsetWidth,-t.ddx/s)},_handleTrackEnd:function(t){this.userTracking=!1;var e=this._contentTrackSpeed/Math.abs(this._contentTrackSpeed),n=0;!t&&Math.abs(this._contentTrackSpeed)>.2&&(n=.5*e);var i=this._normalizeCurrentValue(this._viewportPosition+n);t?this._updateViewport(this._contentTrackViewport):(this.currentChangeSource="touch",this.currentSync=i,this._animateViewport(i,"touch",0!==n?n:0===i&&this.circularEnabled&&this._viewportPosition>=1?1:0))},_handleContentTrack:function(t){if(!this.disableTouch&&!this._invalid){if("start"===t.detail.state)return this.userTracking=!0,this._userDirectionChecked=!1,this._handleTrackStart();if("end"===t.detail.state)return this._handleTrackEnd(!1);if("cancel"===t.detail.state)return this._handleTrackEnd(!0);if(this.userTracking){if(!this._userDirectionChecked){this._userDirectionChecked=!0;var e=Math.abs(t.detail.dx),n=Math.abs(t.detail.dy);if((e>=n&&this.vertical||e<=n&&!this.vertical)&&(this.userTracking=!1),!this.userTracking)return void(this.autoplay&&this._scheduleAutoplay())}return this._handleTrackMove(t.detail),!1}}}},render:function(t){var e=this,n=[],i=[];this.$slots.default&&Object(a["b"])(this.$slots.default,t).forEach((function(t){t.componentOptions&&"v-uni-swiper-item"===t.componentOptions.tag&&i.push(t)}));for(var r=function(i,r){var o=e.currentSync;n.push(t("div",{on:{click:function(){e._animateViewport(e.currentSync=i,e.currentChangeSource="click",e.circularEnabled?1:0)}},class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":i=o||i=4&&(e.text="...")}}}},5676:function(t,e,n){"use strict";var i=n("c33a"),r=n.n(i);r.a},"56e9":function(t,e,n){"use strict";n.r(e),function(t){function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"showModal",(function(){return s})),n.d(e,"showToast",(function(){return c})),n.d(e,"hideToast",(function(){return u})),n.d(e,"showLoading",(function(){return l})),n.d(e,"hideLoading",(function(){return h})),n.d(e,"showActionSheet",(function(){return f}));var r=t,o=r.emit,a=r.invokeCallbackHandler;function s(t,e){o("onShowModal",t,(function(t){a(e,i({},t,!0))}))}function c(t){return o("onShowToast",t),{}}function u(){return o("onHideToast"),{}}function l(t){return o("onShowLoading",t),{}}function h(){return o("onHideLoading"),{}}function f(t,e){o("onShowActionSheet",t,(function(t){a(e,-1===t?{errMsg:"showActionSheet:fail cancel"}:{tapIndex:t})}))}}.call(this,n("0dd1"))},5727:function(t,e,n){"use strict";var i=n("28da"),r=n.n(i);r.a},5768:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-textarea",t._g({on:{change:function(t){t.stopPropagation()}}},t.$listeners),[n("div",{staticClass:"uni-textarea-wrapper"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!(t.composition||t.valueSync.length),expression:"!(composition||valueSync.length)"}],ref:"placeholder",staticClass:"uni-textarea-placeholder",class:t.placeholderClass,style:t.placeholderStyle},[t._v(" "+t._s(t.placeholder)+" ")]),n("div",{ref:"line",staticClass:"uni-textarea-line"}),n("div",{staticClass:"uni-textarea-compute"},[t._l(t.valueCompute,(function(e,i){return n("div",{key:i},[t._v(" "+t._s(e.trim()?e:".")+" ")])})),n("v-uni-resize-sensor",{ref:"sensor",on:{resize:t._resize}})],2),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.valueSync,expression:"valueSync"}],ref:"textarea",staticClass:"uni-textarea-textarea",class:{"uni-textarea-textarea-fix-margin":t.fixMargin},style:{"overflow-y":t.autoHeight?"hidden":"auto"},attrs:{disabled:t.disabled,maxlength:t.maxlengthNumber,autofocus:t.autoFocus},domProps:{value:t.valueSync},on:{compositionstart:t._compositionstart,compositionend:t._compositionend,input:[function(e){e.target.composing||(t.valueSync=e.target.value)},function(e){return e.stopPropagation(),t._input(e)}],focus:t._focus,blur:t._blur,"&touchstart":function(e){return t._touchstart(e)}}})])])},r=[],o=n("8af1"),a="(prefers-color-scheme: dark)",s={name:"Textarea",mixins:[o["a"],o["d"]],model:{prop:"value",event:"update:value"},props:{name:{type:String,default:""},value:{type:[String,Number],default:""},maxlength:{type:[Number,String],default:140},placeholder:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},placeholderClass:{type:String,default:"textarea-placeholder"},placeholderStyle:{type:String,default:""},autoHeight:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1}},data:function(){return{valueSync:this._getValueString(this.value),valueComposition:"",composition:!1,focusSync:this.focus,height:0,focusChangeSource:"",fixMargin:0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&window.matchMedia(a).media!==a}},computed:{maxlengthNumber:function(){var t=Number(this.maxlength);return isNaN(t)?140:t},cursorNumber:function(){var t=Number(this.cursor);return isNaN(t)?-1:t},selectionStartNumber:function(){var t=Number(this.selectionStart);return isNaN(t)?-1:t},selectionEndNumber:function(){var t=Number(this.selectionEnd);return isNaN(t)?-1:t},valueCompute:function(){return(this.composition?this.valueComposition:this.valueSync).split("\n")}},watch:{value:function(t){this.valueSync=this._getValueString(t)},valueSync:function(t){t!==this._oldValue&&(this._oldValue=t,this.$trigger("input",{},{value:t,cursor:this.$refs.textarea.selectionEnd}),this.$emit("update:value",t))},focus:function(t){t?(this.focusChangeSource="focus",this.$refs.textarea&&this.$refs.textarea.focus()):this.$refs.textarea&&this.$refs.textarea.blur()},focusSync:function(t){this.$emit("update:focus",t),this._checkSelection(),this._checkCursor()},cursorNumber:function(){this._checkCursor()},selectionStartNumber:function(){this._checkSelection()},selectionEndNumber:function(){this._checkSelection()},height:function(t){var e=parseFloat(getComputedStyle(this.$el).lineHeight);isNaN(e)&&(e=this.$refs.line.offsetHeight);var n=Math.round(t/e);this.$trigger("linechange",{},{height:t,heightRpx:750/window.innerWidth*t,lineCount:n}),this.autoHeight&&(this.$el.style.height=this.height+"px")}},created:function(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},mounted:function(){this._oldValue=this.$refs.textarea.value=this.valueSync,this._resize({height:this.$refs.sensor.$el.offsetHeight});var t=this;while(t){var e=t.$options._scopeId;e&&this.$refs.placeholder.setAttribute(e,""),t=t.$parent}this.initKeyboard(this.$refs.textarea)},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_focus:function(t){this.focusSync=!0,this.$trigger("focus",t,{value:this.valueSync})},_checkSelection:function(){this.focusSync&&!this.focusChangeSource&&this.selectionStartNumber>-1&&this.selectionEndNumber>-1&&(this.$refs.textarea.selectionStart=this.selectionStartNumber,this.$refs.textarea.selectionEnd=this.selectionEndNumber)},_checkCursor:function(){this.focusSync&&("focus"===this.focusChangeSource||!this.focusChangeSource&&this.selectionStartNumber<0&&this.selectionEndNumber<0)&&this.cursorNumber>-1&&(this.$refs.textarea.selectionEnd=this.$refs.textarea.selectionStart=this.cursorNumber)},_blur:function(t){this.focusSync=!1,this.$trigger("blur",t,{value:this.valueSync,cursor:this.$refs.textarea.selectionEnd})},_compositionstart:function(t){this.composition=!0},_compositionend:function(t){this.composition=!1},_confirm:function(t){this.$trigger("confirm",t,{value:this.valueSync})},_linechange:function(t){this.$trigger("linechange",t,{value:this.valueSync})},_touchstart:function(){this.focusChangeSource="touch"},_resize:function(t){var e=t.height;this.height=e},_input:function(t){this.composition&&(this.valueComposition=t.target.value)},_getFormData:function(){return{value:this.valueSync,key:this.name}},_resetFormData:function(){this.valueSync=""},_getValueString:function(t){return null===t?"":String(t)}}},c=s,u=(n("9400"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},5881:function(t,e,n){"use strict";(function(t){var n={ensp:" ",emsp:" ",nbsp:" "};e["a"]={name:"Text",props:{selectable:{type:[Boolean,String],default:!1},space:{type:String,default:""},decode:{type:[Boolean,String],default:!1}},methods:{_decodeHtml:function(t){return this.space&&n[this.space]&&(t=t.replace(/ /g,n[this.space])),this.decode&&(t=t.replace(/ /g,n.nbsp).replace(/ /g,n.ensp).replace(/ /g,n.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")),t}},render:function(e){var n=this,i=[];return this.$slots.default&&this.$slots.default.forEach((function(r){if(r.text){var o=r.text.replace(/\\n/g,"\n"),a=o.split("\n");a.forEach((function(t,r){i.push(n._decodeHtml(t)),r!==a.length-1&&i.push(e("br"))}))}else r.componentOptions&&"v-uni-text"!==r.componentOptions.tag&&t.warn(" 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。"),i.push(r)})),e("uni-text",{on:this.$listeners,attrs:{selectable:!!this.selectable}},[e("span",{},i)])}}}).call(this,n("3ad9")["default"])},"594d":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-map",t._g({attrs:{id:t.id}},t.$listeners),[n("div",{ref:"map",staticStyle:{width:"100%",height:"100%",position:"relative",overflow:"hidden"}}),n("div",{staticStyle:{position:"absolute",top:"0",width:"100%",height:"100%",overflow:"hidden","pointer-events":"none"}},[t._t("default")],2)])},r=[],o=n("738e"),a=o["a"],s=(n("3f7e"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},5964:function(t,e,n){"use strict";n.r(e),function(t){function i(e,n){var i=getCurrentPages();if(i.length){var r=i[i.length-1].$holder;switch(e){case"setNavigationBarColor":var o=n.frontColor,a=n.backgroundColor,s=n.animation,c=s.duration,u=s.timingFunc;o&&(r.navigationBar.textColor="#000000"===o?"black":"white"),a&&(r.navigationBar.backgroundColor=a),t.emit("onNavigationBarChange",{textColor:"#000000"===o?"#000":"#fff",backgroundColor:r.navigationBar.backgroundColor}),r.navigationBar.duration=c+"ms",r.navigationBar.timingFunc=u;break;case"showNavigationBarLoading":r.navigationBar.loading=!0;break;case"hideNavigationBarLoading":r.navigationBar.loading=!1;break;case"setNavigationBarTitle":var l=n.title;r.navigationBar.titleText=l,document.title=l,t.emit("onNavigationBarChange",{titleText:l});break}}return{}}function r(t){return i("setNavigationBarColor",t)}function o(){return i("showNavigationBarLoading")}function a(){return i("hideNavigationBarLoading")}function s(t){return i("setNavigationBarTitle",t)}n.d(e,"setNavigationBarColor",(function(){return r})),n.d(e,"showNavigationBarLoading",(function(){return o})),n.d(e,"hideNavigationBarLoading",(function(){return a})),n.d(e,"setNavigationBarTitle",(function(){return s}))}.call(this,n("0dd1"))},"5a23":function(t,e,n){"use strict";(function(t){var i=n("f2b3");function r(){document.activeElement.blur()}function o(){}e["a"]={name:"Keyboard",props:{cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:Boolean,default:!0}},watch:{focus:function(t){t&&this.showSoftKeybord()}},mounted:function(){(this.autoFocus||this.focus)&&this.showSoftKeybord()},beforeDestroy:function(){this.onKeyboardHide()},methods:{initKeyboard:function(e){var n=this;e.addEventListener("focus",(function(){n.hideKeyboardTemp=function(){r()},t.subscribe("hideKeyboard",n.hideKeyboardTemp),document.addEventListener("click",o,!1),n.setSoftinputNavBar(),n.setSoftinputTemporary()})),e.addEventListener("blur",this.onKeyboardHide.bind(this))},showSoftKeybord:function(){Object(i["k"])((function(){plus.key.showSoftKeybord()}))},setSoftinputTemporary:function(){var t=this;Object(i["k"])((function(){var e=plus.webview.currentWebview(),n=e.getStyle()||{},i=t.$el.getBoundingClientRect();e.setSoftinputTemporary&&e.setSoftinputTemporary({mode:"adjustResize"===n.softinputMode?"adjustResize":t.adjustPosition?"adjustPan":"nothing",position:{top:i.top,height:i.height+(Number(t.cursorSpacing)||0)}})}))},setSoftinputNavBar:function(){var t=this;"auto"!==this.showConfirmBar?Object(i["k"])((function(){var e=plus.webview.currentWebview(),n=e.getStyle()||{},i=n.softinputNavBar,r="none"!==i;r!==t.showConfirmBar?(t.__softinputNavBar=i||"auto",e.setStyle({softinputNavBar:t.showConfirmBar?"auto":"none"})):delete t.__softinputNavBar})):delete this.__softinputNavBar},resetSoftinputNavBar:function(){var t=this.__softinputNavBar;t&&Object(i["k"])((function(){var e=plus.webview.currentWebview();e.setStyle({softinputNavBar:t})}))},onKeyboardHide:function(){t.unsubscribe("hideKeyboard",this.hideKeyboardTemp),document.removeEventListener("click",o,!1),this.resetSoftinputNavBar(),0===String(navigator.vendor).indexOf("Apple")&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}}}).call(this,n("501c"))},"5a56":function(t,e,n){"use strict";n.r(e),e["default"]={methods:{beforeTransition:function(){},afterTransition:function(){}}}},"5ab3":function(t,e,n){"use strict";var i=n("b2bb"),r=n.n(i);r.a},"5abe":function(t,e){(function(){"use strict";if("object"===typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=window.document,e=[];i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.USE_MUTATION_OBSERVER=!0,i.prototype.observe=function(t){var e=this._observationTargets.some((function(e){return e.element==t}));if(!e){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},i.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},i.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},i.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},i.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(a(window,"resize",this._checkForIntersections,!0),a(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},i.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,s(window,"resize",this._checkForIntersections,!0),s(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},i.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():l();this._observationTargets.forEach((function(i){var o=i.element,a=u(o),s=this._rootContainsTarget(o),c=i.entry,l=t&&s&&this._computeTargetAndRootIntersection(o,e),h=i.entry=new n({time:r(),target:o,boundingClientRect:a,rootBounds:e,intersectionRect:l});c?t&&s?this._hasCrossedThreshold(c,h)&&this._queuedEntries.push(h):c&&c.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},i.prototype._computeTargetAndRootIntersection=function(e,n){if("none"!=window.getComputedStyle(e).display){var i=u(e),r=i,o=f(e),a=!1;while(!a){var s=null,l=1==o.nodeType?window.getComputedStyle(o):{};if("none"==l.display)return;if(o==this.root||o==t?(a=!0,s=n):o!=t.body&&o!=t.documentElement&&"visible"!=l.overflow&&(s=u(o)),s&&(r=c(s,r),!r))break;o=f(o)}return r}},i.prototype._getRootRect=function(){var e;if(this.root)e=u(this.root);else{var n=t.documentElement,i=t.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},i.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},i.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,i=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==i)for(var r=0;r=0&&s>=0&&{top:n,bottom:i,left:r,right:o,width:a,height:s}}function u(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):l()}function l(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(t,e){var n=e;while(n){if(n==t)return!0;n=f(n)}return!1}function f(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}})()},"5d1d":function(t,e,n){"use strict";var i=n("50c5"),r=n.n(i);r.a},"5d70":function(t,e,n){},"5dc1":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return c}));n("5abe");var i=n("85b6"),r=n("db8e");function o(t){return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}var a={};function s(e,n){var s=e.reqId,c=e.component,u=e.options,l=getCurrentPages(),h=l.find((function(t){return t.$page.id===n}));if(!h)throw new Error("Not Found:Page[".concat(n,"]"));var f=h.$vm,d=Object(r["a"])(c,f),p=u.relativeToSelector?d.querySelector(u.relativeToSelector):null,g=a[s]=new IntersectionObserver((function(e,n){e.forEach((function(e){t.publishHandler("onRequestComponentObserver",{reqId:s,res:{intersectionRatio:e.intersectionRatio,intersectionRect:o(e.intersectionRect),boundingClientRect:o(e.boundingClientRect),relativeRect:o(e.rootBounds),time:Date.now(),dataset:Object(i["c"])(e.target.dataset||{}),id:e.target.id}},f.$page.id)}))}),{root:p,rootMargin:u.rootMargin,threshold:u.thresholds});u.observeAll?(g.USE_MUTATION_OBSERVER=!0,Array.prototype.map.call(d.querySelectorAll(u.selector),(function(t){g.observe(t)}))):(g.USE_MUTATION_OBSERVER=!1,g.observe(d.querySelector(u.selector)))}function c(e){var n=e.reqId,i=a[n];i&&(i.disconnect(),t.publishHandler("onRequestComponentObserver",{reqId:n,reqEnd:!0}))}}).call(this,n("501c"))},"5dc4":function(t,e,n){},"5ff9":function(t,e,n){"use strict";n.r(e),n.d(e,"loadFontFace",(function(){return i}));var i={family:{type:String,required:!0},source:{type:String,required:!0},desc:{type:Object,required:!1},success:{type:Function,required:!1},fail:{type:Function,required:!1},complete:{type:Function,required:!1}}},6062:function(t,e,n){"use strict";var i=n("ef36"),r=n.n(i);r.a},"60db":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"EditorContext",(function(){return u}));var i=n("f2b3");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0}},fields:{type:String,default:"day",validator:function(t){return Object.values(m).indexOf(t)>=0}},start:{type:String,default:d},end:{type:String,default:p},disabled:{type:[Boolean,String],default:!1}},data:function(){return{valueSync:null,visible:!1,valueChangeSource:"",timeArray:[],dateArray:[],valueArray:[],oldValueArray:[]}},computed:{rangeArray:function(){var t=this.range;switch(this.mode){case g.SELECTOR:return[t];case g.MULTISELECTOR:return t;case g.TIME:return this.timeArray;case g.DATE:var e=this.dateArray;switch(this.fields){case m.YEAR:return[e[0]];case m.MONTH:return[e[0],e[1]];case m.DAY:return[e[0],e[1],e[2]]}}return[]},startArray:function(){return this._getDateValueArray(this.start,d.bind(this)())},endArray:function(){return this._getDateValueArray(this.end,p.bind(this)())},units:function(){switch(this.mode){case g.DATE:return["年","月","日"];case g.TIME:return["时","分"];default:return[]}}},watch:{value:function(){this._setValueSync()},mode:function(){this._setValueSync()},range:function(){this._setValueSync()},valueSync:function(){this._setValueArray()},valueArray:function(t){var e=this;if(this.mode===g.TIME||this.mode===g.DATE){var n=this.mode===g.TIME?this._getTimeValue:this._getDateValue,i=this.valueArray,r=this.startArray,o=this.endArray;if(this.mode===g.DATE){var a=this.dateArray,s=a[2].length,c=Number(a[2][i[2]])||1,u=new Date("".concat(a[0][i[0]],"/").concat(a[1][i[1]],"/").concat(c)).getDate();un(o)&&this._cloneArray(i,o)}t.forEach((function(t,n){t!==e.oldValueArray[n]&&(e.oldValueArray[n]=t,e.mode===g.MULTISELECTOR&&e.$trigger("columnchange",{},{column:n,value:t}))}))}},created:function(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this}),this._createTime(),this._createDate(),this._setValueSync()},beforeDestroy:function(){this.$refs.picker.remove(),this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_show:function(){var t=this;if(!this.disabled){this.valueChangeSource="";var e=this.$refs.picker;e.remove(),(document.querySelector("uni-app")||document.body).appendChild(e),e.style.display="block",setTimeout((function(){t.visible=!0}),20)}},_getFormData:function(){return{value:this.valueSync,key:this.name}},_resetFormData:function(){switch(this.mode){case g.SELECTOR:this.valueSync=-1;break;case g.MULTISELECTOR:this.valueSync=this.value.map((function(t){return 0}));break;case g.DATE:case g.TIME:this.valueSync="";break;default:break}},_createTime:function(){var t=[],e=[];t.splice(0,t.length);for(var n=0;n<24;n++)t.push((n<10?"0":"")+n);e.splice(0,e.length);for(var i=0;i<60;i++)e.push((i<10?"0":"")+i);this.timeArray.push(t,e)},_createDate:function(){for(var t=[],e=(new Date).getFullYear(),n=e-150,i=e+150;n<=i;n++)t.push(String(n));for(var r=[],o=1;o<=12;o++)r.push((o<10?"0":"")+o);for(var a=[],s=1;s<=31;s++)a.push((s<10?"0":"")+s);this.dateArray.push(t,r,a)},_getTimeValue:function(t){return 60*t[0]+t[1]},_getDateValue:function(t){return 366*t[0]+31*(t[1]||0)+(t[2]||0)},_cloneArray:function(t,e){for(var n=0;na?0:o)}break;case g.TIME:case g.DATE:this.valueSync=String(t);break;default:this.valueSync=Number(t)||0;break}},_setValueArray:function(){var t,e=this.valueSync;switch(this.mode){case g.MULTISELECTOR:t=s(e);break;case g.TIME:t=this._getDateValueArray(e,Object(a["d"])({mode:g.TIME}));break;case g.DATE:t=this._getDateValueArray(e,Object(a["d"])({mode:g.DATE}));break;default:t=[e];break}this.oldValueArray=s(t),this.valueArray=s(t)},_getValue:function(){var t=this,e=this.valueArray;switch(this.mode){case g.SELECTOR:return e[0];case g.MULTISELECTOR:return e.map((function(t){return t}));case g.TIME:return this.valueArray.map((function(e,n){return t.timeArray[n][e]})).join(":");case g.DATE:return this.valueArray.map((function(e,n){return t.dateArray[n][e]})).join("-")}},_getDateValueArray:function(t,e){var n,i=this.mode===g.DATE?"-":":",r=this.mode===g.DATE?this.dateArray:this.timeArray;if(this.mode===g.TIME)n=2;else switch(this.fields){case m.YEAR:n=1;break;case m.MONTH:n=2;break;default:n=3;break}for(var o=String(t).split(i),a=[],s=0;s=0&&(a=e?this._getDateValueArray(e):a.map((function(){return 0}))),a},_change:function(){this._close(),this.valueChangeSource="click";var t=this._getValue();this.valueSync=Array.isArray(t)?t.map((function(t){return t})):t,this.$trigger("change",{},{value:t})},_cancel:function(){this._close(),this.$trigger("cancel",{},{})},_close:function(){var t=this;this.visible=!1,setTimeout((function(){var e=t.$refs.picker;e.remove(),t.$el.prepend(e),e.style.display="none"}),260)}}},b=v,y=(n("2d89"),n("2877")),_=Object(y["a"])(b,i,r,!1,null,null,null);e["default"]=_.exports},"70bb":function(t,e,n){"use strict";n.r(e),n.d(e,"openLocation",(function(){return i}));var i={latitude:{type:Number,required:!0},longitude:{type:Number,required:!0},scale:{type:Number,validator:function(t,e){t=Math.floor(t),e.scale=t>=5&&t<=18?t:18},default:18},name:{type:String},address:{type:String}}},"70f4":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-label",t._g({class:{"uni-label-pointer":t.pointer},on:{click:t._onClick}},t.$listeners),[t._t("default")],2)},r=[],o=n("f2ce"),a=o["a"],s=(n("6730"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},7107:function(t,e,n){"use strict";(function(t){function i(e){var n=e.options,i=e.callbackId,r=n.family,o=n.source,a=n.desc,s=void 0===a?{}:a,c=document.fonts;if(c){var u=new FontFace(r,o,s);u.load().then((function(){c.add(u),t.publishHandler("onLoadFontFaceCallback",{callbackId:i,data:{errMsg:"loadFontFace:ok"}})})).catch((function(e){t.publishHandler("onLoadFontFaceCallback",{callbackId:i,data:{errMsg:"loadFontFace:fail ".concat(e)}})}))}else{var l=document.createElement("style");l.innerText='@font-face{font-family:"'.concat(r,'";src:').concat(o,";font-style:").concat(s.style,";font-weight:").concat(s.weight,";font-stretch:").concat(s.stretch,";unicode-range:").concat(s.unicodeRange,";font-variant:").concat(s.variant,";font-feature-settings:").concat(s.featureSettings,";}"),document.head.appendChild(l),t.publishHandler("onLoadFontFaceCallback",{callbackId:i,data:{errMsg:"loadFontFace:ok"}})}}n.d(e,"a",(function(){return i}))}).call(this,n("501c"))},"72ad":function(t,e,n){},"72b3":function(t,e,n){"use strict";function i(t,e,n){return t>e-n&&t0){var u=(-n-Math.sqrt(o))/(2*i),l=(-n+Math.sqrt(o))/(2*i),h=(e-u*t)/(l-u),f=t-h;return{x:function(t){var e,n;return t===this._t&&(e=this._powER1T,n=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,u*t)),n||(n=this._powER2T=Math.pow(Math.E,l*t)),f*e+h*n},dx:function(t){var e,n;return t===this._t&&(e=this._powER1T,n=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,u*t)),n||(n=this._powER2T=Math.pow(Math.E,l*t)),f*u*e+h*l*n}}}var d=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,g=t,m=(e-p*t)/d;return{x:function(t){return Math.pow(Math.E,p*t)*(g*Math.cos(d*t)+m*Math.sin(d*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(d*t),i=Math.sin(d*t);return e*(m*d*n-g*d*i)+p*e*(m*i+g*n)}}},o.prototype.x=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0},o.prototype.dx=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0},o.prototype.setEnd=function(t,e,n){if(n||(n=(new Date).getTime()),t!==this._endPosition||!r(e,.4)){e=e||0;var i=this._endPosition;this._solution&&(r(e,.4)&&(e=this._solution.dx((n-this._startTime)/1e3)),i=this._solution.x((n-this._startTime)/1e3),r(e,.4)&&(e=0),r(i,.4)&&(i=0),i+=this._endPosition),this._solution&&r(i-t,.4)&&r(e,.4)||(this._endPosition=t,this._solution=this._solve(i-this._endPosition,e),this._startTime=n)}},o.prototype.snap=function(t){this._startTime=(new Date).getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}},o.prototype.done=function(t){return t||(t=(new Date).getTime()),i(this.x(),this._endPosition,.4)&&r(this.dx(),.4)},o.prototype.reconfigure=function(t,e,n){this._m=t,this._k=e,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},o.prototype.springConstant=function(){return this._k},o.prototype.damping=function(){return this._c},o.prototype.configuration=function(){function t(t,e){t.reconfigure(1,e,t.damping())}function e(t,e){t.reconfigure(1,t.springConstant(),e)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:e.bind(this,this),min:1,max:500}]}},"738e":function(t,e,n){"use strict";(function(t){var i,r,o=n("8af1"),a=n("f2b3");function s(t){if(i)t();else if(window.qq&&window.qq.maps)i=window.qq.maps,t();else if(r)r.push(t);else{r=[t];var e=__uniConfig.qqMapKey,n="_callback"+Date.now();window[n]=function(){delete window[n],i=window.qq.maps;var t=i.Callout=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=t;var e=t.map;this.position=t.position,this.index=1,this.visible=this.alwaysVisible="ALWAYS"===t.display,this.init(),Object.defineProperty(this,"onclick",{setter:function(t){this.div.onclick=t},getter:function(){return this.div.onclick}}),e&&this.setMap(e)};t.prototype=new i.Overlay,t.prototype.init=function(){var t=this.option,e=this.div=document.createElement("div"),n=e.style;n.position="absolute",n.whiteSpace="nowrap",n.transform="translateX(-50%) translateY(-100%)",n.zIndex=1,n.boxShadow=t.boxShadow||"none",n.display=this.visible?"block":"none";var i=this.triangle=document.createElement("div");i.setAttribute("style","position: absolute;white-space: nowrap;border-width: 4px;border-style: solid;border-color: #fff transparent transparent;border-image: initial;font-size: 12px;padding: 0px;background-color: transparent;width: 0px;height: 0px;transform: translate(-50%, 100%);left: 50%;bottom: 0;"),this.setStyle(t),this.changed=function(t){n.display=this.visible?"block":"none"},e.appendChild(i)},t.prototype.construct=function(){var t=this.div,e=this.getPanes();e.floatPane.appendChild(t)},t.prototype.draw=function(){var t=this.getProjection();if(this.position&&this.div&&t){var e=t.fromLatLngToDivPixel(this.position),n=this.div.style;n.left=e.x+"px",n.top=e.y+"px"}},t.prototype.destroy=function(){this.div.parentNode.removeChild(this.div),this.div=null,this.triangle=null},t.prototype.setOption=function(t){this.option=t,this.setPosition(t.position),"ALWAYS"===t.display?this.alwaysVisible=this.visible=!0:this.alwaysVisible=!1,this.setStyle(t)},t.prototype.setStyle=function(t){var e=this.div,n=e.style;e.innerText=t.content,n.lineHeight=(t.fontSize||14)+"px",n.fontSize=(t.fontSize||14)+"px",n.padding=(t.padding||8)+"px",n.color=t.color||"#000",n.borderRadius=(t.borderRadius||0)+"px",n.backgroundColor=t.bgColor||"#fff",n.marginTop="-"+(t.top+5)+"px",this.triangle.style.borderColor="".concat(t.bgColor||"#fff"," transparent transparent")},t.prototype.setPosition=function(t){this.position=t,this.draw()},r.forEach((function(t){return t()})),r=null};var o=document.createElement("script");o.src="https://map.qq.com/api/js?v=2.exp&key=".concat(e,"&callback=").concat(n,"&libraries=geometry"),document.body.appendChild(o)}}e["a"]={name:"Map",mixins:[o["f"]],props:{id:{type:String,default:""},latitude:{type:[String,Number],default:39.92},longitude:{type:[String,Number],default:116.46},scale:{type:[String,Number],default:16},markers:{type:Array,default:function(){return[]}},covers:{type:Array,default:function(){return[]}},includePoints:{type:Array,default:function(){return[]}},polyline:{type:Array,default:function(){return[]}},circles:{type:Array,default:function(){return[]}},controls:{type:Array,default:function(){return[]}},showLocation:{type:[Boolean,String],default:!1}},data:function(){return{center:{latitude:116.46,longitude:116.46},isMapReady:!1,isBoundsReady:!1,markersSync:[],polylineSync:[],circlesSync:[],controlsSync:[]}},watch:{latitude:function(){this.centerChange()},longitude:function(){this.centerChange()},scale:function(t){var e=this;this.mapReady((function(){e._map.setZoom(Number(t)||16)}))},markers:function(t,e){var n=this;this.mapReady((function(){var i=[],r=[],o=[],a=[],s=[];t.forEach((function(t){if("id"in t){for(var n=!1,s=0;s=0?(e=o.indexOf(i))>=0&&n.changeMarker(t,a[e]):s.push(t)})),n.removeMarkers(s),n.createMarkers(i)}))},polyline:function(t){var e=this;this.mapReady((function(){e.createPolyline()}))},circles:function(){var t=this;this.mapReady((function(){t.createCircles()}))},controls:function(){var t=this;this.mapReady((function(){t.createControls()}))},includePoints:function(){var t=this;this.mapReady((function(){t.fitBounds(t.includePoints)}))},showLocation:function(t){var e=this;this.mapReady((function(){e[t?"createLocation":"removeLocation"]()}))}},created:function(){var t=this.latitude,e=this.longitude;t&&e&&(this.center.latitude=t,this.center.longitude=e)},mounted:function(){var t=this;s((function(){t.init()}))},beforeDestroy:function(){this.removeMarkers(this.markersSync),this.removePolyline(),this.removeCircles(),this.removeControls(),this.removeLocation()},methods:{_handleSubscribe:function(t){var e=this,n=t.type,r=t.data,o=void 0===r?{}:r;function a(t,e){t=t||{},t.errMsg="".concat(n,":").concat(e?"fail"+e:"ok");var i=e?o.fail:o.success;"function"===typeof i&&i(t),"function"===typeof o.complete&&o.complete(t)}switch(n){case"getCenterLocation":this.mapReady((function(){var t,n,i=e._map.getCenter();t=i.getLat(),n=i.getLng(),a({latitude:t,longitude:n})}));break;case"moveToLocation":var s=o.latitude,c=o.longitude,u=s&&c?new i.LatLng(s,c):this._locationPosition;u&&(this._map.setCenter(u),a({}));break;case"translateMarker":this.mapReady((function(){try{var t=e.getMarker(o.markerId),n=o.destination,r=o.duration,s=!!o.autoRotate,c=Number(o.rotate)?o.rotate:0,u=t.getRotation(),l=t.getPosition(),h=new i.LatLng(n.latitude,n.longitude),f=i.geometry.spherical.computeDistanceBetween(l,h)/1e3,d=("number"===typeof r?r:1e3)/36e5,p=f/d,g=i.event.addListener(t,"moving",(function(e){var n=e.latLng,i=t.label;i&&i.setPosition(n);var r=t.callout;r&&r.setPosition(n)})),m=i.event.addListener(t,"moveend",(function(e){m.remove(),g.remove(),t.lastPosition=l,t.setPosition(h);var n=t.label;n&&n.setPosition(h);var i=t.callout;i&&i.setPosition(h);var r=o.animationEnd;"function"===typeof r&&r()})),v=0;s&&(t.lastPosition&&(v=i.geometry.spherical.computeHeading(t.lastPosition,l)),c=i.geometry.spherical.computeHeading(l,h)-v),t.setRotation(u+c),t.moveTo(h,p)}catch(b){a(null,b)}}));break;case"includePoints":this.fitBounds(o.points);break;case"getRegion":this.boundsReady((function(){var t=e._map.getBounds(),n=t.getSouthWest(),i=t.getNorthEast();a({southwest:{latitude:n.getLat(),longitude:n.getLng()},northeast:{latitude:i.getLat(),longitude:i.getLng()}})}));break;case"getScale":this.mapReady((function(){a({scale:Number(e.scale)})}));break}},init:function(){var t=this,e=new i.LatLng(this.center.latitude,this.center.longitude),n=this._map=new i.Map(this.$refs.map,{center:e,zoom:Number(this.scale),scrollwheel:!1,disableDoubleClickZoom:!0,mapTypeControl:!1,zoomControl:!1,scaleControl:!1,minZoom:5,maxZoom:18,draggable:!0}),r=i.event.addListener(n,"bounds_changed",(function(e){r.remove(),t.isBoundsReady=!0,t.$emit("boundsready")}));i.event.addListener(n,"click",(function(){t.$trigger("click",{},{})})),i.event.addListener(n,"dragstart",(function(){t.$trigger("regionchange",{},{type:"begin"})})),i.event.addListener(n,"dragend",(function(){t.$trigger("regionchange",{},{type:"end"})})),i.event.addListener(n,"zoom_changed",(function(){t.$emit("update:scale",n.getZoom())})),i.event.addListener(n,"center_changed",(function(){var e,i,r=n.getCenter();e=r.getLat(),i=r.getLng(),t.$emit("update:latitude",e),t.$emit("update:longitude",i)})),this.markers&&Array.isArray(this.markers)&&this.markers.length&&this.createMarkers(this.markers),this.polyline&&Array.isArray(this.polyline)&&this.polyline.length&&this.createPolyline(),this.circles&&Array.isArray(this.circles)&&this.circles.length&&this.createCircles(),this.controls&&Array.isArray(this.controls)&&this.controls.length&&this.createControls(),this.showLocation&&this.createLocation(),this.includePoints&&Array.isArray(this.includePoints)&&this.includePoints.length&&this.fitBounds(this.includePoints,(function(){n.setCenter(e)})),this.isMapReady=!0,this.$emit("mapready")},centerChange:function(){var t=this,e=Number(this.latitude),n=Number(this.longitude);e===this.center.latitude&&n===this.center.longitude||(this.center.latitude=e,this.center.longitude=n,this._map&&this.mapReady((function(){t._map.setCenter(new i.LatLng(e,n))})))},createMarkers:function(t){var e=this,n=this._map,r=this.markersSync;t.forEach((function(t){var o=new i.Marker({map:n,flat:!0,autoRotation:!1});o.id=t.id,e.changeMarker(o,t),i.event.addListener(o,"click",(function(n){var i=o.callout;if(i){var r=i.div,s=r.parentNode;i.alwaysVisible||i.set("visible",!i.visible),i.visible&&(s.removeChild(r),s.appendChild(r))}Object(a["f"])(t,"id")&&e.$trigger("markertap",{},{markerId:t.id})})),r.push(o)}))},changeMarker:function(t,e){var n=this,r=this._map,o=e.title||e.name,s=new i.LatLng(e.latitude,e.longitude),c=new Image;c.onload=function(){var u,l,h,f,d=e.anchor||{},p=d.x,g=d.y;e.iconPath&&(e.width||e.height)?(l=e.width||c.width/c.height*e.height,h=e.height||c.height/c.width*e.width):(l=c.width/2,h=c.height/2),p=("number"===typeof p?p:.5)*l,g=("number"===typeof g?g:1)*h,f=h-(h-g),u=new i.MarkerImage(c.src,null,null,new i.Point(p,g),new i.Size(l,h)),t.setPosition(s),t.setIcon(u),t.setRotation(e.rotate||0);var m,v=e.label||{};t.label&&(t.label.setMap(null),delete t.label),v.content&&(m=new i.Label({position:s,map:r,clickable:!1,content:v.content,style:{border:"none",padding:"8px",background:"none",color:v.color,fontSize:(v.fontSize||14)+"px",lineHeight:(v.fontSize||14)+"px",marginLeft:v.x,marginTop:v.y}}),t.label=m);var b,y=e.callout||{},_=t.callout;y.content?b={id:e.id,position:s,map:r,top:f,content:y.content,color:y.color,fontSize:y.fontSize,borderRadius:y.borderRadius,bgColor:y.bgColor,padding:y.padding,boxShadow:y.boxShadow,display:y.display}:o&&(b={id:e.id,position:s,map:r,top:f,content:o,boxShadow:"0px 0px 3px 1px rgba(0,0,0,0.5)"}),b?_?_.setOption(b):(_=t.callout=new i.Callout(b),_.div.onclick=function(t){Object(a["f"])(e,"id")&&n.$trigger("callouttap",t,{markerId:e.id}),t.stopPropagation(),t.preventDefault()}):_&&(_.setMap(null),delete t.callout)},c.src=e.iconPath?this.$getRealPath(e.iconPath):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAABQCAYAAABFyhZTAAANDElEQVR4nNWce4hc133Hv+fc92MeuytpV5ZXll2XuvTlUBTSP1IREsdNiKGEEAgE3EBLaBtK/2hNoQTStISUosiGOqVpQ+qkIdAax1FiG+oYIxyD4xi3uKlEXSFFke3d1e5od+a+H+ec/nHvmbkzs6ud2bmjTX7wY3b3zr3nfM7vd37n8Tt3CW6DiDP3EABSd/0KAEEuXBHzrsteFTiwVOBo+amUP9PK34ZuAcD30NoboTZgceYeCaQAUEvVAKiZ0lpiiv0Lgmi/imFLF5YV2SWFR1e0fGcDQF5qVn4y1Ag/E3DFmhJSB2Dk1D2Squ0HBdT3C0JPE6oco6oKqmm7PodnGXieQ3DWIYL/iCB/UWO95zTW2wCQlpqhgJ8J/MDApUUVFFY0AFiRdvwMJ8bvCaKcUW3bUE0DimGAKMpkz2QMLEnBkhhZEHICfoHy+AkrW3seQAwgQQHPyIUr/CD1nhq4tCpFAWoCsGNt5X2MWo9Qw/p1zXGgWiZAZu8teRQhCwLwOLpEefKolb3zDIAQBXyGAnwqa09Vq4pVDQBOqrTuTmn7c9S0H9QdB6ptT/O4iSWPY2S+DxYHFzTW+5zBti8BCFBYfCprTwxcwmoALABupK48lFPri0az1dSbjWkZDiSp5yPpdn2Vh39m5evPAPABRACySaH3Ba64sA7ABtD0tdXPUqvxKd1xoJrmDAjTSx7HCDsdroj0nJO99TiAHgprZwD4fi5+S+AKrAHA5UQ7EijH/05rND9sNJsglNaEMZ3wPEfq+8i97vdstv4IFdkWBi5+S2h1n2dL2IYAXQqU449pjdYHzFaruDr3edEelVJUmK02YpCPBD454uRrf0BFtlleTlAMX7vfu9eFSp91ALR95cRfq27zA2ariXK+cOhqtprQnOZ7AmXlLIA2ABeAXtZ9cuDSlVUUfbYVKCsPq27zo1arddiMY2q2WlCd5gd95fhnALTKOmslw/7A5RcVFGNsI6ILpzNi/rnu2IdPt4caDRc5Mf4opEu/DaBR1l3dDXo3CxMUEdkRoO2UuJ+3Wy1VUbXD5tpTKVVgt9s0I85fcahLKLqhvhvf0B/KFpFjbdOnRz+pOY17f5atK1W3LWiue8KnR38fQLNkGLPyaAvI8dZl0Jcz6J82bPuwWSZW03GRQ3s4JdYqigBmoOie48CVQGUBcAO68AnTbTQUVQWE+LlQSimsRsOKSPthFG49ZmU6Aq8DsAWomwnt4+bPgSuPqunYyIX6uwzqIoqIPdSXacW6clFgB6T9Xs0wFylVDrv+UyshFIZlOSFpP1ACG1Ury5mWdGcTgJkJ/UO2ZZVPqU+EqiL9xV8GWzoGAFC2t6C/eQkkS2stR7cs+KH2OwDOo2AKUcy1hQTur28FiJVDOa0bRm283HHhPfQxhL91BsIYXmyQLIX1yktofvdJ0N5OLeVpug4G5TcY1IaCvIuCLQHAq8A6ACOCe5+qag1CSBEMZpT01L3Y/vSfgi0e2fW60HSE730/4vtPY/Erj0J/8+LMZRIAmq7rUeLe75KdTRTACoCcVvqvBsBIhXG/qumoo0Plx5Zx80/+Yk/YqvBGE53PPILsxGotZWuahkxov4bCkDoARZy5h1S3UjUAKhf0pKrWE6x2Hv5DcMedwCaFCMPEzqf+GCB05rIVVQUHOVlySQuPAzNB7lAUBbOOickv/QrSe++bGFZKtnoK0f2nZy5foRRc0Dsw2C5WANDRvWRFAIv9/juDxr/5nqlhpcTvevfM5VNKwYHFijEVAEStWFgBQIWASQkKv5hBstVTM947W/mEABDCxMCgFBXgfkpECGgAmbW8seFnqntNc+byiSDggqgYSfPIKVc/2SUgcsH57C7V3T5wZWmvO3P5QnAAPMdwnotU59KkaBkR1AGs/fTqgYG1n16dHZhzQCAea8zKz4UTEdFl/EBZjCGxXn354Pe+8tLM5TPGAPAxN5PAQioR7CdZls1u4auXYf3wB1NX1Pjv/4Rx8Y2Zy8/zHAR8reTiko9W/sAAcIWwt+oAhhBofeMrUDfWJoZVtjtof/Xvayk7TTMo4D/BSL55FJiZNPvfNE1rKZT2ulj64mehX/m/fWG169ew9IW/hHJzqx7gLIVO00slWy6B1QpsBoC5SnR1O7K3GecLSg2ZBaWziSOffwTB+x5E8MGHkB8/MXx9cwPuf3wX9gvPgeT5zOUBgBACcZKmR63of1CwycS6UFFYeCjjrhD2WhTHD7iWVUsFwBic7z8L5/vPgh1dBneL5BsJg6lcflKJ4hgKYT8iENXTBAzl8lBgYOEMALOV9IUgDB9w55AoU26sQ7mxXvtzq+KHISyavogBV4oCXNAy8cSrF9pa+EaSJmtpWk/wup2a5zmiONle0MMflpD94xLkwhUhOykrL8TlJzNo9lQvDHHYe1TTai8MYSjZd0p3zjA4LcCB4XFYXowB5EeM4HkvDDpxmh4+xYSa5hm6fuAt6cH3Sp5kV+Aye55XvpAqRCSOmv5LLwgO3U0n1V4QwFLSf9UoD0tPjSrAomphoHDrBINDI/kxM3wxTMIf7/j+ocPsp90ggBcFV5bN8LnSeHHJIs+BjAFLt45QZNNjAOyIET3a8XwvTNLD9tg9NU4zbPa8dEmPzxIipKeGpabSnYeAyxbIS2BfftnVsrWmnjzWDQPkLD98uhHlgqMbBnC19PGmnl4rAUMMDrzk1SMQo1MpXt4QAPDKG7OjZvwKy4Ov3/R/9vrzVs9DmgZPrljRCyg8NCzr7o9adwx4xMpeqTEAdqcT/nuY+M9v9rxDh5S62fMQxP7Lq27wBIoYFJd17mFwnElUGXc71CLKlgowvONnrbrhl6/2sEoJuW/JcXa59fbJzTDATuRfu7sRfgmDgCthpXXF6H1jq4OyRWRr+QC65WeiEJEet+O/7fj+thfHOKx+6ycxtjy/u2Ilf6NSISdLsq59r9zt+NKuy6EKdFS2WBeFxVNHY5sLRnr27Z0dzhi77W7MGMNb2zu8ZaTnGnq+hoE37mDgynuewdxz/VdORuTDuqUWQcxO/8tU+ZObfnDbDbzpBzBV9m/LdvraCGzfKLc6hnjLBW8F2q88NATATjaib3pxcLFzG2dim74PLw5eP9mIv4U9PHC/M5eTrPCrQ5XszzElyFac9OwN3/P8NMG8TeslMbZCf/tEIzlHSX8m5VXqlGBkCDoQ8C5BrH+Ys6GzjZaRP3YzDCHmaFnOOW6GERaM/Jyt8u0SLijrcssgNTXwLtAy9AcAsjvc7JWMxc9seP7cDHzDD8B49NSKk72OwUyqV+rEsBMDl9DVICZbNgLATjXTf96OgiudMKzdup0wxHYcvHlXM/sGxvttiCnOSk8FXIrsz8PjMxXpspOffcfz8rTG+XbCcqx5Xrri5OcUKuQGRbXssaljrcC36M/posWuuTr/+lYY1ebKnTCCq/MnFkx2HYPAKWdSQ8u+uQCPQEvX6qFwrfyuVvadnTi4uFmDa28GAXbi4Men2tl5FPN7uSiYKkjNDFxCy/4sg0d/qLqjwR5b9/04Znue0d5X4jzHehDEJxrsUYwHy6n7bVVm2WnnKNxqyLXbJn/b1fkTswSwrSiCq/OvtUy+juHl6sTjbe3AFdeW0DJqZ3e182d3kujNThxh2o7biSJ0k+ji3Qv5sxj2Ig8H7LdVmSmXUhY8VilKkB1z2Jev9zzOuZiYl3GB656XL7vsHzC85Os35qzvH9bxWorAsNsFANKjDr9saeL82hRz7fUggKWJp4/Y/CoGw1//mWVZM8nMwLdw7fxUm31zKwo7vXT/s5S9NMVWFK7ds8C+heG9NR8zROVRqeXFoxHXlhZJDBXBoi0e34yi/YehKMKiLf5JU/p7yUONV9d7xHW+aSWhhzYAV1v81SBPLm7FY8ct+rIVxwjz5I3VFn8V4w1XiytLqQ24sgEoXbvviiuu+Me9rCyEwDXP48uu+CqGZ3G1urKUWt+l28W1QwDpMVdcZsgvrIXh2D0bUQRDxUvHXHEZw8GvVleWMo+XB6sbBnIznJ1s8a+9EwQ5rxyJ4pzjbd/P72xyuc1aTQLMNMHYS2oHrri2dM0QQNI0sWnrOL8eRf3vrkcRbB3n2xY2MEiP9NM88/ivD/N6PbTq2rIv5qtt8dRaGKaccwgh8E4Y5ne2xNMYb6B+tq9umQvwyDIyKDVxddw0VfH8jTjGZhzDVMWLDQNbGGzZzNW6wPwsXM05V7OR+fEmvn09CPiNKMKyi29jYN0Ag0BVe9+Vst/7w7OKnIEFKF6pMRdtrL3VxctMMOOoi2q2r5/LnWeF5vqK90gAGyTaXTy5ZAtpXRms5jIMjcq8LQwMnywIAVgrDVwuD+9K68oZ1dxcWcrcX+IfScHKwBRWfu9H8Xn2XSm3w8LAYHfEQ5F6TVGYWM6qYsy570q5Lf+mYSRH1QFwA8AGgJsooOXe7tzl/wGchYFKtBMCwAAAAABJRU5ErkJggg=="},removeMarkers:function(t){for(var e=0;e0){n=k.split("Build")[0].trim();break}for(var T=void 0,x=0;x0&&void 0!==arguments[0]?arguments[0]:{};t.interval;if(!a)return a=!0,Object(r["c"])("enableAccelerometer",{enable:!0})}function u(){return a=!1,Object(r["c"])("enableAccelerometer",{enable:!1})}},"7d18":function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"uploadFile",(function(){return u}));var i=n("e2e2");function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n=0&&this._callbacks.splice(e,1)}},{key:"abort",value:function(){this._isAbort=!0,this._xhr&&(this._xhr.abort(),delete this._xhr)}}]),t}();function u(e,n){var r=e.url,o=e.file,a=e.filePath,s=e.name,u=e.files,l=e.header,h=e.formData,f=__uniConfig.networkTimeout&&__uniConfig.networkTimeout.uploadFile||6e4,d=t,p=d.invokeCallbackHandler,g=new c(null,n);function m(t){var e,i=new XMLHttpRequest,o=new FormData;Object.keys(h).forEach((function(t){o.append(t,h[t])})),Object.values(u).forEach((function(e,n){var i=e.name,r=t[n];o.append(i||"file",r,r.name||"file-".concat(Date.now()))})),i.open("POST",r),Object.keys(l).forEach((function(t){i.setRequestHeader(t,l[t])})),i.upload.onprogress=function(t){g._callbacks.forEach((function(e){var n=t.loaded,i=t.total,r=Math.round(n/i*100);e({progress:r,totalBytesSent:n,totalBytesExpectedToSend:i})}))},i.onerror=function(){clearTimeout(e),p(n,{errMsg:"uploadFile:fail"})},i.onabort=function(){clearTimeout(e),p(n,{errMsg:"uploadFile:fail abort"})},i.onload=function(){clearTimeout(e);var t=i.status;p(n,{errMsg:"uploadFile:ok",statusCode:t,data:i.responseText||i.response})},g._isAbort?p(n,{errMsg:"uploadFile:fail abort"}):(e=setTimeout((function(){i.upload.onprogress=i.onload=i.onabort=i.onerror=null,g.abort(),p(n,{errMsg:"uploadFile:fail timeout"})}),f),i.send(o),g._xhr=i)}return Array.isArray(u)&&u.length||(u=[{name:s,file:o,uri:a}]),Promise.all(u.map((function(t){var e=t.file,n=t.uri;return e instanceof File?Promise.resolve(e):Object(i["c"])(n)}))).then(m).catch((function(){setTimeout((function(){p(n,{errMsg:"uploadFile:fail file error"})}),0)})),g}}.call(this,n("0dd1"))},"7df2":function(t,e,n){},"7e6a":function(t,e,n){"use strict";var i=n("515d"),r=n.n(i);r.a},"7f4e":function(t,e,n){"use strict";function i(t){var e=t.phoneNumber;return window.location.href="tel:".concat(e),{errMsg:"makePhoneCall:ok"}}n.r(e),n.d(e,"makePhoneCall",(function(){return i}))},"811a":function(t,e,n){"use strict";n.r(e),n.d(e,"connectSocket",(function(){return f})),n.d(e,"sendSocketMessage",(function(){return d})),n.d(e,"closeSocket",(function(){return p})),n.d(e,"onSocketOpen",(function(){return g})),n.d(e,"onSocketError",(function(){return m})),n.d(e,"onSocketMessage",(function(){return v})),n.d(e,"onSocketClose",(function(){return b}));var i=n("a118"),r=n("db70");function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=t.fail,i=t.complete,r=arguments.length>1?arguments[1]:void 0,o={errMsg:r};/:ok$/.test(r)?"function"===typeof e&&e(o):"function"===typeof n&&n(o),"function"===typeof i&&i(o)}}]),t}(),u=Object.create(null),l=[],h=Object.create(null);function f(t,e){var n=Object(r["c"])("createSocketTask",t),o=n.socketTaskId,a=new c(o);return u[o]=a,l.push(a),setTimeout((function(){Object(i["a"])(e,{errMsg:"connectSocket:ok"})}),0),a}function d(t,e){var n=l[0];if(n&&n.readyState===n.OPEN)return Object(r["c"])("operateSocketTask",Object.assign({},t,{operationType:"send",socketTaskId:n.id}));Object(i["a"])(e,{errMsg:"sendSocketMessage:fail WebSocket is not connected"})}function p(t,e){var n=l[0];if(n)return n.readyState=n.CLOSING,Object(r["c"])("operateSocketTask",Object.assign({},t,{operationType:"close",socketTaskId:n.id}));Object(i["a"])(e,{errMsg:"closeSocket:fail WebSocket is not connected"})}function g(t){h.open=t}function m(t){h.error=t}function v(t){h.message=t}function b(t){h.close=t}Object(r["d"])("onSocketTaskStateChange",(function(t){var e=t.socketTaskId,n=t.state,r=t.data,o=(t.errMsg,u[e]);if(o){if("open"===n&&(o.readyState=o.OPEN),o===l[0]&&h[n]&&Object(i["a"])(h[n],"message"===n?{data:r}:{}),"error"===n||"close"===n){o.readyState=o.CLOSED,delete u[e];var a=l.indexOf(o);a>=0&&l.splice(a,1)}o._callbacks[n].forEach((function(t){"function"===typeof t&&t("message"===n?{data:r}:{})}))}}))},8188:function(t,e,n){"use strict";(function(t){var i=n("8af1"),r=n("18fd"),o=n("b253");function a(t){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}e["a"]={name:"Editor",mixins:[i["f"],i["a"],i["d"]],props:{id:{type:String,default:""},readOnly:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},showImgSize:{type:[Boolean,String],default:!1},showImgToolbar:{type:[Boolean,String],default:!1},showImgResize:{type:[Boolean,String],default:!1}},data:function(){return{quillReady:!1}},computed:{},watch:{readOnly:function(t){if(this.quillReady){var e=this.quill;e.enable(!t),t||e.blur()}},placeholder:function(t){this.quillReady&&this.quill.root.setAttribute("data-placeholder",t)}},mounted:function(){var t=this,e=[];this.showImgSize&&e.push("DisplaySize"),this.showImgToolbar&&e.push("Toolbar"),this.showImgResize&&e.push("Resize"),this.loadQuill((function(){e.length?t.loadImageResizeModule((function(){t.initQuill(e)})):t.initQuill(e)}))},methods:{_handleSubscribe:function(e){var n,i,r,o=e.type,s=e.data,c=s.options,u=s.callbackId,l=this.quill,h=window.Quill;if(this.quillReady){switch(o){case"format":var f=c.name,d=void 0===f?"":f,p=c.value,g=void 0!==p&&p;i=l.getSelection(!0);var m=l.getFormat(i)[d]||!1;if(["bold","italic","underline","strike","ins"].includes(d))g=!m;else if("direction"===d){g=("rtl"!==g||!m)&&g;var v=l.getFormat(i).align;"rtl"!==g||v?g||"right"!==v||l.format("align",!1,h.sources.USER):l.format("align","right",h.sources.USER)}else if("indent"===d){var b="rtl"===l.getFormat(i).direction;g="+1"===g,b&&(g=!g),g=g?"+1":"-1"}else"list"===d&&(g="check"===g?"unchecked":g,m="checked"===m?"unchecked":m),g=m&&m!==(g||!1)||!m&&g?g:!m;l.format(d,g,h.sources.USER);break;case"insertDivider":i=l.getSelection(!0),l.insertText(i.index,"\n",h.sources.USER),l.insertEmbed(i.index+1,"divider",!0,h.sources.USER),l.setSelection(i.index+2,h.sources.SILENT);break;case"insertImage":i=l.getSelection(!0);var y=c.src,_=void 0===y?"":y,w=c.alt,S=void 0===w?"":w,k=c.width,T=void 0===k?"":k,x=c.height,C=void 0===x?"":x,O=c.extClass,E=void 0===O?"":O,M=c.data,j=void 0===M?{}:M,A=this.$getRealPath(_);l.insertEmbed(i.index,"image",A,h.sources.USER);var I=!!/^(file|blob):/.test(A)&&A;l.formatText(i.index,1,"data-local",I),l.formatText(i.index,1,"alt",S),l.formatText(i.index,1,"width",T),l.formatText(i.index,1,"height",C),l.formatText(i.index,1,"class",E),l.formatText(i.index,1,"data-custom",Object.keys(j).map((function(t){return"".concat(t,"=").concat(j[t])})).join("&")),l.setSelection(i.index+1,h.sources.SILENT);break;case"insertText":i=l.getSelection(!0);var $=c.text,P=void 0===$?"":$;l.insertText(i.index,P,h.sources.USER),l.setSelection(i.index+P.length,0,h.sources.SILENT);break;case"setContents":var B=c.delta,L=c.html;"object"===a(B)?l.setContents(B,h.sources.SILENT):"string"===typeof L?l.setContents(this.html2delta(L),h.sources.SILENT):r="contents is missing";break;case"getContents":n=this.getContents();break;case"clear":l.setContents([]);break;case"removeFormat":i=l.getSelection(!0);var N=h.import("parchment");i.length?l.removeFormat(i,h.sources.USER):Object.keys(l.getFormat(i)).forEach((function(t){N.query(t,N.Scope.INLINE)&&l.format(t,!1)}));break;case"undo":l.history.undo();break;case"redo":l.history.redo();break;default:break}this.updateStatus(i)}else r="not ready";u&&t.publishHandler("onEditorMethodCallback",{callbackId:u,data:Object.assign({},n,{errMsg:"".concat(o,":").concat(r?"fail "+r:"ok")})},this.$page.id)},loadQuill:function(t){if("function"!==typeof window.Quill){var e=document.createElement("script");e.src=window.plus?"./__uniappquill.js":"https://unpkg.com/quill@1.3.7/dist/quill.min.js",document.body.appendChild(e),e.onload=t}else"function"===typeof t&&t()},loadImageResizeModule:function(t){if("function"!==typeof window.ImageResize){var e=document.createElement("script");e.src=window.plus?"./__uniappquillimageresize.js":"https://unpkg.com/quill-image-resize-mp@3.0.1/image-resize.min.js",document.body.appendChild(e),e.onload=t}else"function"===typeof t&&t()},initQuill:function(t){var e=this,n=window.Quill;o["a"](n);var i={toolbar:!1,readOnly:this.readOnly,placeholder:this.placeholder,modules:{}};t.length&&(n.register("modules/ImageResize",window.ImageResize.default),i.modules.ImageResize={modules:t});var r=this.quill=new n(this.$el,i),a=r.root,s=["focus","blur","input"];s.forEach((function(t){a.addEventListener(t,(function(n){"input"===t?n.stopPropagation():e.$trigger(t,n,e.getContents())}))})),r.on(n.events.TEXT_CHANGE,(function(){e.$trigger("input",{},e.getContents())})),r.on(n.events.SELECTION_CHANGE,this.updateStatus.bind(this)),r.on(n.events.SCROLL_OPTIMIZE,(function(){var t=r.selection.getRange()[0];e.updateStatus(t)})),r.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,n){return e.skipMatcher?n:{ops:n.ops.filter((function(t){var e=t.insert;return"string"===typeof e})).map((function(t){var e=t.insert;return{insert:e}}))}})),this.initKeyboard(a),this.quillReady=!0,this.$trigger("ready",event,{})},getContents:function(){var t=this.quill,e=t.root.innerHTML,n=t.getText(),i=t.getContents();return{html:e,text:n,delta:i}},html2delta:function(t){var e,n=["span","strong","b","ins","em","i","u","a","del","s","sub","sup","img","div","p","h1","h2","h3","h4","h5","h6","hr","ol","ul","li"],i="";Object(r["a"])(t,{start:function(t,r,o){if(n.includes(t)){e=!1;var a=r.map((function(t){var e=t.name,n=t.value;return"".concat(e,'="').concat(n,'"')})).join(" "),s="<".concat(t," ").concat(a," ").concat(o?"/":"",">");i+=s}else e=!o},end:function(t){e||(i+=""))},chars:function(t){e||(i+=t)}}),this.skipMatcher=!0;var o=this.quill.clipboard.convert(i);return this.skipMatcher=!1,o},updateStatus:function(t){var e=this,n=t?this.quill.getFormat(t):{},i=Object.keys(n);(i.length!==Object.keys(this.__status||{}).length||i.find((function(t){return n[t]!==e.__status[t]})))&&(this.__status=n,this.$trigger("statuschange",{},n))}}}}).call(this,n("501c"))},"81ea":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-tabbar",[n("div",{staticClass:"uni-tabbar",style:{backgroundColor:t.backgroundColor}},[n("div",{staticClass:"uni-tabbar-border",style:{backgroundColor:t.borderColor}}),t._l(t.list,(function(e,i){return n("div",{key:e.pagePath,staticClass:"uni-tabbar__item",on:{click:function(n){return t._switchTab(e,i)}}},[n("div",{staticClass:"uni-tabbar__bd"},[e.iconPath?n("div",{staticClass:"uni-tabbar__icon",class:{"uni-tabbar__icon__diff":!e.text}},[n("img",{attrs:{src:t._getRealPath(t.$route.meta.pagePath===e.pagePath?e.selectedIconPath:e.iconPath)}}),e.redDot?n("div",{staticClass:"uni-tabbar__reddot",class:{"uni-tabbar__badge":!!e.badge}},[t._v(" "+t._s(e.badge)+" ")]):t._e()]):t._e(),e.text?n("div",{staticClass:"uni-tabbar__label",style:{color:t.$route.meta.pagePath===e.pagePath?t.selectedColor:t.color,fontSize:e.iconPath?"10px":"14px"}},[t._v(" "+t._s(e.text)+" "),e.redDot&&!e.iconPath?n("div",{staticClass:"uni-tabbar__reddot",class:{"uni-tabbar__badge":!!e.badge}},[t._v(" "+t._s(e.badge)+" ")]):t._e()]):t._e()])])}))],2),n("div",{staticClass:"uni-placeholder"})])},r=[],o=n("a919"),a=o["a"],s=(n("f4e0"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null),u=c.exports,l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"uni-fade"}},[t.visible?n("uni-toast",{attrs:{"data-duration":t.duration}},[t.mask?n("div",{staticClass:"uni-mask",staticStyle:{background:"transparent"},on:{touchmove:function(t){t.preventDefault()}}}):t._e(),t.image||t.iconClass?n("div",{staticClass:"uni-toast"},[t.image?n("img",{staticClass:"uni-toast__icon",attrs:{src:t.image}}):n("i",{staticClass:"uni-icon_toast",class:t.iconClass}),n("p",{staticClass:"uni-toast__content"},[t._v(" "+t._s(t.title)+" ")])]):n("div",{staticClass:"uni-sample-toast"},[n("p",{staticClass:"uni-simple-toast__text"},[t._v(" "+t._s(t.title)+" ")])])]):t._e()],1)},h=[],f=n("5222"),d=f["a"],p=(n("ff28"),Object(s["a"])(d,l,h,!1,null,null,null)),g=p.exports,m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"uni-fade"}},[n("uni-modal",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],on:{touchmove:function(t){t.preventDefault()}}},[n("div",{staticClass:"uni-mask"}),n("div",{staticClass:"uni-modal"},[t.title?n("div",{staticClass:"uni-modal__hd"},[n("strong",{staticClass:"uni-modal__title"},[t._v(t._s(t.title))])]):t._e(),n("div",{staticClass:"uni-modal__bd",on:{touchmove:function(t){t.stopPropagation()}}},[t._v(" "+t._s(t.content)+" ")]),n("div",{staticClass:"uni-modal__ft"},[t.showCancel?n("div",{staticClass:"uni-modal__btn uni-modal__btn_default",style:{color:t.cancelColor},on:{click:function(e){return t._close("cancel")}}},[t._v(" "+t._s(t.cancelText)+" ")]):t._e(),n("div",{staticClass:"uni-modal__btn uni-modal__btn_primary",style:{color:t.confirmColor},on:{click:function(e){return t._close("confirm")}}},[t._v(" "+t._s(t.confirmText)+" ")])])])])],1)},v=[],b=n("5a56"),y={name:"Modal",mixins:[b["default"]],props:{title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"取消"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"确定"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean,default:!1}},methods:{_close:function(t){this.$emit("close",t)}}},_=y,w=(n("2765"),Object(s["a"])(_,m,v,!1,null,null,null)),S=w.exports,k=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("uni-actionsheet",{on:{touchmove:function(t){t.preventDefault()}}},[n("transition",{attrs:{name:"uni-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"uni-mask",on:{click:function(e){return t._close(-1)}}})]),n("div",{staticClass:"uni-actionsheet",class:{"uni-actionsheet_toggle":t.visible}},[n("div",{staticClass:"uni-actionsheet__menu"},[t.title?n("div",{staticClass:"uni-actionsheet__title"},[t._v(" "+t._s(t.title)+" ")]):t._e(),t._l(t.itemList,(function(e,i){return n("div",{key:i,staticClass:"uni-actionsheet__cell",style:{color:t.itemColor},on:{click:function(e){return t._close(i)}}},[t._v(" "+t._s(e)+" ")])}))],2),n("div",{staticClass:"uni-actionsheet__action"},[n("div",{staticClass:"uni-actionsheet__cell",style:{color:t.itemColor},on:{click:function(e){return t._close(-1)}}},[t._v(" 取消 ")])])])],1)},T=[],x={name:"ActionSheet",props:{title:{type:String,default:""},itemList:{type:Array,default:function(){return[]}},itemColor:{type:String,default:"#000000"},visible:{type:Boolean,default:!1}},methods:{_close:function(t){this.$emit("close",t)}}},C=x,O=(n("4fef"),Object(s["a"])(C,k,T,!1,null,null,null)),E=O.exports,M={Toast:g,Modal:S,ActionSheet:E};function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function A(t){for(var e=1;e0&&t<1?t:1}}},c={canvasId:{type:String,require:!0},actions:{type:Array,require:!0},reserve:{type:Boolean,default:!1}}},"82c2":function(t,e,n){"use strict";n.r(e),n.d(e,"request",(function(){return f}));var i=n("f2b3"),r=n("a118"),o=n("db70");function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n>2],o+=t[(3&i[n])<<4|i[n+1]>>4],o+=t[(15&i[n+1])<<2|i[n+2]>>6],o+=t[63&i[n+2]];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=function(t){var e,i,r,o,a,s=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var l=new ArrayBuffer(s),h=new Uint8Array(l);for(e=0;e>4,h[u++]=(15&r)<<4|o>>2,h[u++]=(3&o)<<6|63&a;return l}})()},"83a6":function(t,e,n){"use strict";e["a"]={data:function(){return{hovering:!1}},props:{hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}},methods:{_hoverTouchStart:function(t){var e=this;t._hoverPropagationStopped||this.hoverClass&&"none"!==this.hoverClass&&!this.disabled&&(t.touches.length>1||(this.hoverStopPropagation&&(t._hoverPropagationStopped=!0),this._hoverTouch=!0,this._hoverStartTimer=setTimeout((function(){e.hovering=!0,e._hoverTouch||e._hoverReset()}),this.hoverStartTime)))},_hoverTouchEnd:function(t){this._hoverTouch=!1,this.hovering&&this._hoverReset()},_hoverReset:function(){var t=this;requestAnimationFrame((function(){clearTimeout(t._hoverStayTimer),t._hoverStayTimer=setTimeout((function(){t.hovering=!1}),t.hoverStayTime)}))},_hoverTouchCancel:function(t){this._hoverTouch=!1,this.hovering=!1,clearTimeout(this._hoverStartTimer)}}}},"84e0":function(t,e,n){"use strict";n.r(e),function(t){function i(e){var n=getCurrentPages();return n.length&&t.publishHandler("pageScrollTo",e,n[n.length-1].$page.id),{}}n.d(e,"pageScrollTo",(function(){return i}))}.call(this,n("0dd1"))},8542:function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return x})),n.d(e,"b",(function(){return O})),n.d(e,"c",(function(){return E}));var i=n("f2b3");function r(t){return c(t)||s(t)||a(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function s(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function c(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(t[n])){var r=e[n];e[n]=function(e){k(t[n],e).then((function(t){return Object(i["h"])(r)&&r(t)||t}))}}})),e}function x(t,e){var n=[];Array.isArray(f.returnValue)&&n.push.apply(n,r(f.returnValue));var i=d[t];return i&&Array.isArray(i.returnValue)&&n.push.apply(n,r(i.returnValue)),n.forEach((function(t){e=t(e)||e})),e}function C(t){var e=Object.create(null);Object.keys(f).forEach((function(t){"returnValue"!==t&&(e[t]=f[t].slice())}));var n=d[t];return n&&Object.keys(n).forEach((function(t){"returnValue"!==t&&(e[t]=(e[t]||[]).concat(n[t]))})),e}function O(t,e,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return Array.isArray(t[e])&&t[e].length}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=JSON.parse(JSON.stringify(t)),n=Object.keys(e),i=n.length;if(i)for(var r=0;re-n&&tthis._t&&(t=this._t,this._lastDt=t);var e=this._x_v*t+.5*this._x_a*Math.pow(t,2)+this._x_s,n=this._y_v*t+.5*this._y_a*Math.pow(t,2)+this._y_s;return(this._x_a>0&&ethis._endPositionX)&&(e=this._endPositionX),(this._y_a>0&&nthis._endPositionY)&&(n=this._endPositionY),{x:e,y:n}},u.prototype.ds=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),t>this._t&&(t=this._t),{dx:this._x_v+this._x_a*t,dy:this._y_v+this._y_a*t}},u.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},u.prototype.dt=function(){return-this._x_v/this._x_a},u.prototype.done=function(){var t=a(this.s().x,this._endPositionX)||a(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,t},u.prototype.setEnd=function(t,e){this._endPositionX=t,this._endPositionY=e},u.prototype.reconfigure=function(t,e){this._m=t,this._f=1e3*e},l.prototype._solve=function(t,e){var n=this._c,i=this._m,r=this._k,o=n*n-4*i*r;if(0===o){var a=-n/(2*i),s=t,c=e/(a*t);return{x:function(t){return(s+c*t)*Math.pow(Math.E,a*t)},dx:function(t){var e=Math.pow(Math.E,a*t);return a*(s+c*t)*e+c*e}}}if(o>0){var u=(-n-Math.sqrt(o))/(2*i),l=(-n+Math.sqrt(o))/(2*i),h=(e-u*t)/(l-u),f=t-h;return{x:function(t){var e,n;return t===this._t&&(e=this._powER1T,n=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,u*t)),n||(n=this._powER2T=Math.pow(Math.E,l*t)),f*e+h*n},dx:function(t){var e,n;return t===this._t&&(e=this._powER1T,n=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,u*t)),n||(n=this._powER2T=Math.pow(Math.E,l*t)),f*u*e+h*l*n}}}var d=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,g=t,m=(e-p*t)/d;return{x:function(t){return Math.pow(Math.E,p*t)*(g*Math.cos(d*t)+m*Math.sin(d*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(d*t),i=Math.sin(d*t);return e*(m*d*n-g*d*i)+p*e*(m*i+g*n)}}},l.prototype.x=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0},l.prototype.dx=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0},l.prototype.setEnd=function(t,e,n){if(n||(n=(new Date).getTime()),t!==this._endPosition||!s(e,.1)){e=e||0;var i=this._endPosition;this._solution&&(s(e,.1)&&(e=this._solution.dx((n-this._startTime)/1e3)),i=this._solution.x((n-this._startTime)/1e3),s(e,.1)&&(e=0),s(i,.1)&&(i=0),i+=this._endPosition),this._solution&&s(i-t,.1)&&s(e,.1)||(this._endPosition=t,this._solution=this._solve(i-this._endPosition,e),this._startTime=n)}},l.prototype.snap=function(t){this._startTime=(new Date).getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}},l.prototype.done=function(t){return t||(t=(new Date).getTime()),a(this.x(),this._endPosition,.1)&&s(this.dx(),.1)},l.prototype.reconfigure=function(t,e,n){this._m=t,this._k=e,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},l.prototype.springConstant=function(){return this._k},l.prototype.damping=function(){return this._c},l.prototype.configuration=function(){function t(t,e){t.reconfigure(1,e,t.damping())}function e(t,e){t.reconfigure(1,t.springConstant(),e)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:e.bind(this,this),min:1,max:500}]},h.prototype.setEnd=function(t,e,n,i){var r=(new Date).getTime();this._springX.setEnd(t,i,r),this._springY.setEnd(e,i,r),this._springScale.setEnd(n,i,r),this._startTime=r},h.prototype.x=function(){var t=((new Date).getTime()-this._startTime)/1e3;return{x:this._springX.x(t),y:this._springY.x(t),scale:this._springScale.x(t)}},h.prototype.done=function(){var t=(new Date).getTime();return this._springX.done(t)&&this._springY.done(t)&&this._springScale.done(t)},h.prototype.reconfigure=function(t,e,n){this._springX.reconfigure(t,e,n),this._springY.reconfigure(t,e,n),this._springScale.reconfigure(t,e,n)};var f=n("f2b3"),d=!1;function p(t){d||(d=!0,requestAnimationFrame((function(){t(),d=!1})))}function g(t,e){if(t===e)return 0;var n=t.offsetLeft;return t.offsetParent?n+=g(t.offsetParent,e):0}function m(t,e){if(t===e)return 0;var n=t.offsetTop;return t.offsetParent?n+=m(t.offsetParent,e):0}function v(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)}function b(t,e,n){var i=function(t){t&&t.id&&cancelAnimationFrame(t.id),t&&(t.cancelled=!0)},r={id:0,cancelled:!1};function o(e,n,i,r){if(!e||!e.cancelled){i(n);var a=t.done();a||e.cancelled||(e.id=requestAnimationFrame(o.bind(null,e,n,i,r))),a&&r&&r(n)}}return o(r,t,e,n),{cancel:i.bind(null,r),model:t}}var y={name:"MovableView",mixins:[o["a"]],props:{direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.5},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},data:function(){return{xSync:this._getPx(this.x),ySync:this._getPx(this.y),scaleValueSync:Number(this.scaleValue)||1,width:0,height:0,minX:0,minY:0,maxX:0,maxY:0}},computed:{dampingNumber:function(){var t=Number(this.damping);return isNaN(t)?20:t},frictionNumber:function(){var t=Number(this.friction);return isNaN(t)||t<=0?2:t},scaleMinNumber:function(){var t=Number(this.scaleMin);return isNaN(t)?.5:t},scaleMaxNumber:function(){var t=Number(this.scaleMax);return isNaN(t)?10:t},xMove:function(){return"all"===this.direction||"horizontal"===this.direction},yMove:function(){return"all"===this.direction||"vertical"===this.direction}},watch:{x:function(t){this.xSync=this._getPx(t)},xSync:function(t){this._setX(t)},y:function(t){this.ySync=this._getPx(t)},ySync:function(t){this._setY(t)},scaleValue:function(t){this.scaleValueSync=Number(t)||0},scaleValueSync:function(t){this._setScaleValue(t)},scaleMinNumber:function(){this._setScaleMinOrMax()},scaleMaxNumber:function(){this._setScaleMinOrMax()}},created:function(){this._offset={x:0,y:0},this._scaleOffset={x:0,y:0},this._translateX=0,this._translateY=0,this._scale=1,this._oldScale=1,this._STD=new h(1,9*Math.pow(this.dampingNumber,2)/40,this.dampingNumber),this._friction=new u(1,this.frictionNumber),this._declineX=new c,this._declineY=new c,this.__touchInfo={historyX:[0,0],historyY:[0,0],historyT:[0,0]}},mounted:function(){this.touchtrack(this.$el,"_onTrack"),this.setParent(),this._friction.reconfigure(1,this.frictionNumber),this._STD.reconfigure(1,9*Math.pow(this.dampingNumber,2)/40,this.dampingNumber),this.$el.style.transformOrigin="center"},methods:{_getPx:function(t){return/\d+[ur]px$/i.test(t)?uni.upx2px(parseFloat(t)):Number(t)||0},_setX:function(t){if(this.xMove){if(t+this._scaleOffset.x===this._translateX)return this._translateX;this._SFA&&this._SFA.cancel(),this._animationTo(t+this._scaleOffset.x,this.ySync+this._scaleOffset.y,this._scale)}return t},_setY:function(t){if(this.yMove){if(t+this._scaleOffset.y===this._translateY)return this._translateY;this._SFA&&this._SFA.cancel(),this._animationTo(this.xSync+this._scaleOffset.x,t+this._scaleOffset.y,this._scale)}return t},_setScaleMinOrMax:function(){if(!this.scale)return!1;this._updateScale(this._scale,!0),this._updateOldScale(this._scale)},_setScaleValue:function(t){return!!this.scale&&(t=this._adjustScale(t),this._updateScale(t,!0),this._updateOldScale(t),t)},__handleTouchStart:function(){this._isScaling||this.disabled||(Object(f["c"])({disable:!0}),this._FA&&this._FA.cancel(),this._SFA&&this._SFA.cancel(),this.__touchInfo.historyX=[0,0],this.__touchInfo.historyY=[0,0],this.__touchInfo.historyT=[0,0],this.xMove&&(this.__baseX=this._translateX),this.yMove&&(this.__baseY=this._translateY),this.$el.style.willChange="transform",this._checkCanMove=null,this._firstMoveDirection=null,this._isTouching=!0)},__handleTouchMove:function(t){var e=this;if(!this._isScaling&&!this.disabled&&this._isTouching){var n=this._translateX,i=this._translateY;if(null===this._firstMoveDirection&&(this._firstMoveDirection=Math.abs(t.detail.dx/t.detail.dy)>1?"htouchmove":"vtouchmove"),this.xMove&&(n=t.detail.dx+this.__baseX,this.__touchInfo.historyX.shift(),this.__touchInfo.historyX.push(n),this.yMove||null!==this._checkCanMove||(this._checkCanMove=Math.abs(t.detail.dx/t.detail.dy)<1)),this.yMove&&(i=t.detail.dy+this.__baseY,this.__touchInfo.historyY.shift(),this.__touchInfo.historyY.push(i),this.xMove||null!==this._checkCanMove||(this._checkCanMove=Math.abs(t.detail.dy/t.detail.dx)<1)),this.__touchInfo.historyT.shift(),this.__touchInfo.historyT.push(t.detail.timeStamp),!this._checkCanMove){t.preventDefault();var r="touch";nthis.maxX&&(this.outOfBounds?(r="touch-out-of-bounds",n=this.maxX+this._declineX.x(n-this.maxX)):n=this.maxX),ithis.maxY&&(this.outOfBounds?(r="touch-out-of-bounds",i=this.maxY+this._declineY.x(i-this.maxY)):i=this.maxY),p((function(){e._setTransform(n,i,e._scale,r)}))}}},__handleTouchEnd:function(){var t=this;if(!this._isScaling&&!this.disabled&&this._isTouching&&(Object(f["c"])({disable:!1}),this.$el.style.willChange="auto",this._isTouching=!1,!this._checkCanMove&&!this._revise("out-of-bounds")&&this.inertia)){var e=1e3*(this.__touchInfo.historyX[1]-this.__touchInfo.historyX[0])/(this.__touchInfo.historyT[1]-this.__touchInfo.historyT[0]),n=1e3*(this.__touchInfo.historyY[1]-this.__touchInfo.historyY[0])/(this.__touchInfo.historyT[1]-this.__touchInfo.historyT[0]);this._friction.setV(e,n),this._friction.setS(this._translateX,this._translateY);var i=this._friction.delta().x,r=this._friction.delta().y,o=i+this._translateX,a=r+this._translateY;othis.maxX&&(o=this.maxX,a=this._translateY+(this.maxX-this._translateX)*r/i),athis.maxY&&(a=this.maxY,o=this._translateX+(this.maxY-this._translateY)*i/r),this._friction.setEnd(o,a),this._FA=b(this._friction,(function(){var e=t._friction.s(),n=e.x,i=e.y;t._setTransform(n,i,t._scale,"friction")}),(function(){t._FA.cancel()}))}},_onTrack:function(t){switch(t.detail.state){case"start":this.__handleTouchStart();break;case"move":this.__handleTouchMove(t);break;case"end":this.__handleTouchEnd()}},_getLimitXY:function(t,e){var n=!1;return t>this.maxX?(t=this.maxX,n=!0):tthis.maxY?(e=this.maxY,n=!0):e3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;null!==t&&"NaN"!==t.toString()&&"number"===typeof t||(t=this._translateX||0),null!==e&&"NaN"!==e.toString()&&"number"===typeof e||(e=this._translateY||0),t=Number(t.toFixed(1)),e=Number(e.toFixed(1)),n=Number(n.toFixed(1)),this._translateX===t&&this._translateY===e||r||this.$trigger("change",{},{x:v(t,this._scaleOffset.x),y:v(e,this._scaleOffset.y),source:i}),this.scale||(n=this._scale),n=this._adjustScale(n),n=+n.toFixed(3),o&&n!==this._scale&&this.$trigger("scale",{},{x:t,y:e,scale:n});var a="translateX("+t+"px) translateY("+e+"px) translateZ(0px) scale("+n+")";this.$el.style.transform=a,this.$el.style.webkitTransform=a,this._translateX=t,this._translateY=e,this._scale=n}}},_=y,w=(n("7c2b"),n("2877")),S=Object(w["a"])(_,i,r,!1,null,null,null);e["default"]=S.exports},8875:function(t,e,n){var i,r,o;(function(n,a){r=[],i=a,o="function"===typeof i?i.apply(e,r):i,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){if(document.currentScript)return document.currentScript;try{throw new Error}catch(h){var t,e,n,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,r=/@([^@]*):(\d+):(\d+)\s*$/gi,o=i.exec(h.stack)||r.exec(h.stack),a=o&&o[1]||!1,s=o&&o[2]||!1,c=document.location.href.replace(document.location.hash,""),u=document.getElementsByTagName("script");a===c&&(t=document.documentElement.outerHTML,e=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*