diff --git a/lib/apis.js b/lib/apis.js index 775a4f72deef4fba53bb62b63c8ae8a61867f7ec..d88a327d615c135aae89df6a7a20e5da7b693884 100644 --- a/lib/apis.js +++ b/lib/apis.js @@ -201,6 +201,10 @@ const third = [ 'setPageMeta' ] +const ad = [ + 'createRewardedVideoAd' +] + const apis = [ ...base, ...network, @@ -214,7 +218,8 @@ const apis = [ ...event, ...file, ...canvas, - ...third + ...third, + ...ad ] module.exports = apis diff --git a/lib/modules.json b/lib/modules.json index 2592668e20512f7989d9960264610c1f4c872ea7..d0c37f133ac5aed8c541dd1a997e5c27ac11d1e3 100644 --- a/lib/modules.json +++ b/lib/modules.json @@ -206,4 +206,10 @@ "uni.base64ToArrayBuffer": true, "uni.arrayBufferToBase64": true } +}, { + "name": "ad", + "title": "广告", + "apiList": { + "uni.createRewardedVideoAd": true + } }] diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index 9cf8f9fd4a844ffa9b8d4a13eaf67faa64fb0c9e..9208cab1f002342c7c7dfe56b97e4091b4282937 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -213,6 +213,10 @@ var serviceContext = (function () { 'setPageMeta' ]; + const ad = [ + 'createRewardedVideoAd' + ]; + const apis = [ ...base, ...network, @@ -226,7 +230,8 @@ var serviceContext = (function () { ...event, ...file, ...canvas, - ...third + ...third, + ...ad ]; var apis_1 = apis; @@ -335,43 +340,43 @@ var serviceContext = (function () { return res } - let id = 0; - const callbacks = {}; - - function warp (fn) { - return function (options = {}) { - const callbackId = String(id++); - callbacks[callbackId] = { - success: options.success, - fail: options.fail, - complete: options.complete - }; - const data = Object.assign({}, options); - delete data.success; - delete data.fail; - delete data.complete; - const res = fn.bind(this)(data, callbackId); - if (res) { - invoke(callbackId, res); - } - } - } - - function invoke (callbackId, res) { - const callback = callbacks[callbackId] || {}; - delete callbacks[callbackId]; - const errMsg = res.errMsg || ''; - if (new RegExp('\\:\\s*fail').test(errMsg)) { - callback.fail && callback.fail(res); - } else { - callback.success && callback.success(res); - } - callback.complete && callback.complete(res); - } - - const callback = { - warp, - invoke + let id = 0; + const callbacks = {}; + + function warp (fn) { + return function (options = {}) { + const callbackId = String(id++); + callbacks[callbackId] = { + success: options.success, + fail: options.fail, + complete: options.complete + }; + const data = Object.assign({}, options); + delete data.success; + delete data.fail; + delete data.complete; + const res = fn.bind(this)(data, callbackId); + if (res) { + invoke(callbackId, res); + } + } + } + + function invoke (callbackId, res) { + const callback = callbacks[callbackId] || {}; + delete callbacks[callbackId]; + const errMsg = res.errMsg || ''; + if (new RegExp('\\:\\s*fail').test(errMsg)) { + callback.fail && callback.fail(res); + } else { + callback.success && callback.success(res); + } + callback.complete && callback.complete(res); + } + + const callback = { + warp, + invoke }; /** @@ -662,16 +667,16 @@ var serviceContext = (function () { } } - const base64ToArrayBuffer = [{ - name: 'base64', - type: String, - required: true - }]; - - const arrayBufferToBase64 = [{ - name: 'arrayBuffer', - type: [ArrayBuffer, Uint8Array], - required: true + const base64ToArrayBuffer = [{ + name: 'base64', + type: String, + required: true + }]; + + const arrayBufferToBase64 = [{ + name: 'arrayBuffer', + type: [ArrayBuffer, Uint8Array], + required: true }]; var require_context_module_0_0 = /*#__PURE__*/Object.freeze({ @@ -749,136 +754,136 @@ var serviceContext = (function () { upx2px: upx2px }); - function getInt (method) { - return function (value, params) { - if (value) { - params[method] = Math.round(value); - } - } - } - - const canvasGetImageData = { - canvasId: { - type: String, - required: true - }, - x: { - type: Number, - required: true, - validator: getInt('x') - }, - y: { - type: Number, - required: true, - validator: getInt('y') - }, - width: { - type: Number, - required: true, - validator: getInt('width') - }, - height: { - type: Number, - required: true, - validator: getInt('height') - } - }; - - const canvasPutImageData = { - canvasId: { - type: String, - required: true - }, - data: { - type: Uint8ClampedArray, - required: true - }, - x: { - type: Number, - required: true, - validator: getInt('x') - }, - y: { - type: Number, - required: true, - validator: getInt('y') - }, - width: { - type: Number, - required: true, - validator: getInt('width') - }, - height: { - type: Number, - validator: getInt('height') - } - }; - - const fileType = { - PNG: 'png', - JPG: 'jpeg' - }; - - const canvasToTempFilePath = { - x: { - type: Number, - default: 0, - validator: getInt('x') - }, - y: { - type: Number, - default: 0, - validator: getInt('y') - }, - width: { - type: Number, - validator: getInt('width') - }, - height: { - type: Number, - validator: getInt('height') - }, - destWidth: { - type: Number, - validator: getInt('destWidth') - }, - destHeight: { - type: Number, - validator: getInt('destHeight') - }, - canvasId: { - type: String, - require: true - }, - fileType: { - type: String, - validator (value, params) { - value = (value || '').toUpperCase(); - params.fileType = value in fileType ? fileType[value] : fileType.PNG; - } - }, - quality: { - type: Number, - validator (value, params) { - value = Math.floor(value); - params.quality = value > 0 && value < 1 ? value : 1; - } - } - }; - - const drawCanvas = { - canvasId: { - type: String, - require: true - }, - actions: { - type: Array, - require: true - }, - reserve: { - type: Boolean, - default: false - } + function getInt (method) { + return function (value, params) { + if (value) { + params[method] = Math.round(value); + } + } + } + + const canvasGetImageData = { + canvasId: { + type: String, + required: true + }, + x: { + type: Number, + required: true, + validator: getInt('x') + }, + y: { + type: Number, + required: true, + validator: getInt('y') + }, + width: { + type: Number, + required: true, + validator: getInt('width') + }, + height: { + type: Number, + required: true, + validator: getInt('height') + } + }; + + const canvasPutImageData = { + canvasId: { + type: String, + required: true + }, + data: { + type: Uint8ClampedArray, + required: true + }, + x: { + type: Number, + required: true, + validator: getInt('x') + }, + y: { + type: Number, + required: true, + validator: getInt('y') + }, + width: { + type: Number, + required: true, + validator: getInt('width') + }, + height: { + type: Number, + validator: getInt('height') + } + }; + + const fileType = { + PNG: 'png', + JPG: 'jpeg' + }; + + const canvasToTempFilePath = { + x: { + type: Number, + default: 0, + validator: getInt('x') + }, + y: { + type: Number, + default: 0, + validator: getInt('y') + }, + width: { + type: Number, + validator: getInt('width') + }, + height: { + type: Number, + validator: getInt('height') + }, + destWidth: { + type: Number, + validator: getInt('destWidth') + }, + destHeight: { + type: Number, + validator: getInt('destHeight') + }, + canvasId: { + type: String, + require: true + }, + fileType: { + type: String, + validator (value, params) { + value = (value || '').toUpperCase(); + params.fileType = value in fileType ? fileType[value] : fileType.PNG; + } + }, + quality: { + type: Number, + validator (value, params) { + value = Math.floor(value); + params.quality = value > 0 && value < 1 ? value : 1; + } + } + }; + + const drawCanvas = { + canvasId: { + type: String, + require: true + }, + actions: { + type: Array, + require: true + }, + reserve: { + type: Boolean, + default: false + } }; var require_context_module_0_5 = /*#__PURE__*/Object.freeze({ @@ -947,14 +952,14 @@ var serviceContext = (function () { setClipboardData: setClipboardData }); - const openDocument = { - filePath: { - type: String, - required: true - }, - fileType: { - type: String - } + const openDocument = { + filePath: { + type: String, + required: true + }, + fileType: { + type: String + } }; var require_context_module_0_9 = /*#__PURE__*/Object.freeze({ @@ -997,29 +1002,29 @@ var serviceContext = (function () { getLocation: getLocation }); - const openLocation = { - latitude: { - type: Number, - required: true - }, - longitude: { - type: Number, - required: true - }, - scale: { - type: Number, - validator (value, params) { - value = Math.floor(value); - params.scale = value >= 5 && value <= 18 ? value : 18; - }, - default: 18 - }, - name: { - type: String - }, - address: { - type: String - } + const openLocation = { + latitude: { + type: Number, + required: true + }, + longitude: { + type: Number, + required: true + }, + scale: { + type: Number, + validator (value, params) { + value = Math.floor(value); + params.scale = value >= 5 && value <= 18 ? value : 18; + }, + default: 18 + }, + name: { + type: String + }, + address: { + type: String + } }; var require_context_module_0_12 = /*#__PURE__*/Object.freeze({ @@ -1210,35 +1215,35 @@ var serviceContext = (function () { getImageInfo: getImageInfo }); - const previewImage = { - urls: { - type: Array, - required: true, - validator (value, params) { - var typeError; - params.urls = value.map(url => { - if (typeof url === 'string') { - return getRealPath(url) - } else { - typeError = true; - } - }); - if (typeError) { - return 'url is not string' - } - } - }, - current: { - type: [String, Number], - validator (value, params) { - if (typeof value === 'number') { - params.current = value > 0 && value < params.urls.length ? value : 0; - } else if (typeof value === 'string' && value) { - params.current = getRealPath(value); - } - }, - default: 0 - } + const previewImage = { + urls: { + type: Array, + required: true, + validator (value, params) { + var typeError; + params.urls = value.map(url => { + if (typeof url === 'string') { + return getRealPath(url) + } else { + typeError = true; + } + }); + if (typeError) { + return 'url is not string' + } + } + }, + current: { + type: [String, Number], + validator (value, params) { + if (typeof value === 'number') { + params.current = value > 0 && value < params.urls.length ? value : 0; + } else if (typeof value === 'string' && value) { + params.current = getRealPath(value); + } + }, + default: 0 + } }; var require_context_module_0_16 = /*#__PURE__*/Object.freeze({ @@ -1246,17 +1251,17 @@ var serviceContext = (function () { previewImage: previewImage }); - const downloadFile = { - url: { - type: String, - required: true - }, - header: { - type: Object, - validator (value, params) { - params.header = value || {}; - } - } + const downloadFile = { + url: { + type: String, + required: true + }, + header: { + type: Object, + validator (value, params) { + params.header = value || {}; + } + } }; var require_context_module_0_17 = /*#__PURE__*/Object.freeze({ @@ -1367,53 +1372,53 @@ var serviceContext = (function () { request: request }); - const method$1 = { - OPTIONS: 'OPTIONS', - GET: 'GET', - HEAD: 'HEAD', - POST: 'POST', - PUT: 'PUT', - DELETE: 'DELETE', - TRACE: 'TRACE', - CONNECT: 'CONNECT' - }; - const connectSocket = { - url: { - type: String, - required: true - }, - header: { - type: Object, - validator (value, params) { - params.header = value || {}; - } - }, - method: { - type: String, - validator (value, params) { - value = (value || '').toUpperCase(); - params.method = Object.values(method$1).indexOf(value) < 0 ? method$1.GET : value; - } - }, - protocols: { - type: Array, - validator (value, params) { - params.protocols = (value || []).filter(str => typeof str === 'string'); - } - } - }; - const sendSocketMessage = { - data: { - type: [String, ArrayBuffer] - } - }; - const closeSocket = { - code: { - type: Number - }, - reason: { - type: String - } + const method$1 = { + OPTIONS: 'OPTIONS', + GET: 'GET', + HEAD: 'HEAD', + POST: 'POST', + PUT: 'PUT', + DELETE: 'DELETE', + TRACE: 'TRACE', + CONNECT: 'CONNECT' + }; + const connectSocket = { + url: { + type: String, + required: true + }, + header: { + type: Object, + validator (value, params) { + params.header = value || {}; + } + }, + method: { + type: String, + validator (value, params) { + value = (value || '').toUpperCase(); + params.method = Object.values(method$1).indexOf(value) < 0 ? method$1.GET : value; + } + }, + protocols: { + type: Array, + validator (value, params) { + params.protocols = (value || []).filter(str => typeof str === 'string'); + } + } + }; + const sendSocketMessage = { + data: { + type: [String, ArrayBuffer] + } + }; + const closeSocket = { + code: { + type: Number + }, + reason: { + type: String + } }; var require_context_module_0_19 = /*#__PURE__*/Object.freeze({ @@ -1423,34 +1428,34 @@ var serviceContext = (function () { closeSocket: closeSocket }); - const uploadFile = { - url: { - type: String, - required: true - }, - filePath: { - type: String, - required: true, - validator (value, params) { - params.type = getRealPath(value); - } - }, - name: { - type: String, - required: true - }, - header: { - type: Object, - validator (value, params) { - params.header = value || {}; - } - }, - formData: { - type: Object, - validator (value, params) { - params.formData = value || {}; - } - } + const uploadFile = { + url: { + type: String, + required: true + }, + filePath: { + type: String, + required: true, + validator (value, params) { + params.type = getRealPath(value); + } + }, + name: { + type: String, + required: true + }, + header: { + type: Object, + validator (value, params) { + params.header = value || {}; + } + }, + formData: { + type: Object, + validator (value, params) { + params.formData = value || {}; + } + } }; var require_context_module_0_20 = /*#__PURE__*/Object.freeze({ @@ -1458,24 +1463,24 @@ var serviceContext = (function () { uploadFile: uploadFile }); - const service = { - OAUTH: 'OAUTH', - SHARE: 'SHARE', - PAYMENT: 'PAYMENT', - PUSH: 'PUSH' - }; - - const getProvider = { - service: { - type: String, - required: true, - validator (value, params) { - value = (value || '').toUpperCase(); - if (value && Object.values(service).indexOf(value) < 0) { - return 'service error' - } - } - } + const service = { + OAUTH: 'OAUTH', + SHARE: 'SHARE', + PAYMENT: 'PAYMENT', + PUSH: 'PUSH' + }; + + const getProvider = { + service: { + type: String, + required: true, + validator (value, params) { + value = (value || '').toUpperCase(); + if (value && Object.values(service).indexOf(value) < 0) { + return 'service error' + } + } + } }; var require_context_module_0_21 = /*#__PURE__*/Object.freeze({ @@ -1681,31 +1686,31 @@ var serviceContext = (function () { removeStorageSync: removeStorageSync }); - const loadFontFace = { - family: { - type: String, - required: true - }, - source: { - type: String, - required: true - }, - desc: { - type: Object, - required: false - }, - success: { - type: Function, - required: false - }, - fail: { - type: Function, - required: false - }, - complete: { - type: Function, - required: false - } + const loadFontFace = { + family: { + type: String, + required: true + }, + source: { + type: String, + required: true + }, + desc: { + type: Object, + required: false + }, + success: { + type: Function, + required: false + }, + fail: { + type: Function, + required: false + }, + complete: { + type: Function, + required: false + } }; var require_context_module_0_24 = /*#__PURE__*/Object.freeze({ @@ -3256,75 +3261,75 @@ var serviceContext = (function () { const TEMP_PATH_BASE = '_doc/uniapp_temp'; const TEMP_PATH = `${TEMP_PATH_BASE}_${Date.now()}`; - /** - * 5+错误对象转换为错误消息 - * @param {*} error 5+错误对象 - */ - function toErrMsg (error) { - var msg = 'base64ToTempFilePath:fail'; - if (error && error.message) { - msg += ` ${error.message}`; - } else if (error) { - msg += ` ${error}`; - } - return msg - } - - function base64ToTempFilePath ({ - base64Data, - x, - y, - width, - height, - destWidth, - destHeight, - canvasId, - fileType, - quality - } = {}, callbackId) { - var id = Date.now(); - var bitmap = new plus.nativeObj.Bitmap(`bitmap${id}`); - bitmap.loadBase64Data(base64Data, function () { - var formats = ['jpg', 'png']; - var format = String(fileType).toLowerCase(); - if (formats.indexOf(format) < 0) { - format = 'png'; - } - /** - * 保存配置 - */ - var saveOption = { - overwrite: true, - quality: typeof quality === 'number' ? quality * 100 : 100, - format - }; - /** - * 保存文件路径 - */ - var tempFilePath = `${TEMP_PATH}/canvas/${id}.${format}`; - - bitmap.save(tempFilePath, saveOption, function () { - clear(); - invoke$1(callbackId, { - tempFilePath, - errMsg: 'base64ToTempFilePath:ok' - }); - }, function (error) { - clear(); - invoke$1(callbackId, { - errMsg: toErrMsg(error) - }); - }); - }, function (error) { - clear(); - invoke$1(callbackId, { - errMsg: toErrMsg(error) - }); - }); - - function clear () { - bitmap.clear(); - } + /** + * 5+错误对象转换为错误消息 + * @param {*} error 5+错误对象 + */ + function toErrMsg (error) { + var msg = 'base64ToTempFilePath:fail'; + if (error && error.message) { + msg += ` ${error.message}`; + } else if (error) { + msg += ` ${error}`; + } + return msg + } + + function base64ToTempFilePath ({ + base64Data, + x, + y, + width, + height, + destWidth, + destHeight, + canvasId, + fileType, + quality + } = {}, callbackId) { + var id = Date.now(); + var bitmap = new plus.nativeObj.Bitmap(`bitmap${id}`); + bitmap.loadBase64Data(base64Data, function () { + var formats = ['jpg', 'png']; + var format = String(fileType).toLowerCase(); + if (formats.indexOf(format) < 0) { + format = 'png'; + } + /** + * 保存配置 + */ + var saveOption = { + overwrite: true, + quality: typeof quality === 'number' ? quality * 100 : 100, + format + }; + /** + * 保存文件路径 + */ + var tempFilePath = `${TEMP_PATH}/canvas/${id}.${format}`; + + bitmap.save(tempFilePath, saveOption, function () { + clear(); + invoke$1(callbackId, { + tempFilePath, + errMsg: 'base64ToTempFilePath:ok' + }); + }, function (error) { + clear(); + invoke$1(callbackId, { + errMsg: toErrMsg(error) + }); + }); + }, function (error) { + clear(); + invoke$1(callbackId, { + errMsg: toErrMsg(error) + }); + }); + + function clear () { + bitmap.clear(); + } } function operateMapPlayer (mapId, pageVm, type, data) { @@ -4469,82 +4474,82 @@ var serviceContext = (function () { return new Page(page) } - function getStatusBarStyle$1 () { - let style = plus.navigator.getStatusBarStyle(); - if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style === 'null') { - style = 'light'; - } else if (style === 'UIStatusBarStyleDefault') { - style = 'dark'; - } - return style - } - - function scanCode$1 (options, callbackId) { - const statusBarStyle = getStatusBarStyle$1(); - const isDark = statusBarStyle !== 'light'; - - let result; - const page = showPage({ - url: '__uniappscan', - data: { - scanType: options.scanType - }, - style: { - animationType: options.animationType || 'pop-in', - titleNView: { - autoBackButton: true, - type: 'float', - titleText: options.titleText || '扫码', - titleColor: '#ffffff', - backgroundColor: 'rgba(0,0,0,0)', - buttons: !options.onlyFromCamera ? [{ - text: options.albumText || '相册', - fontSize: '17px', - width: '60px', - onclick: () => { - page.sendMessage({ - type: 'gallery' - }); - } - }] : [] - }, - popGesture: 'close', - backButtonAutoControl: 'close' - }, - onMessage ({ - event, - detail - }) { - result = detail; - if (event === 'marked') { - result.errMsg = 'scanCode:ok'; - } else { - result.errMsg = 'scanCode:fail ' + detail.message; - } - }, - onClose () { - if (isDark) { - plus.navigator.setStatusBarStyle('dark'); - } - invoke$1(callbackId, result || { - errMsg: 'scanCode:fail cancel' - }); - } - }); - - if (isDark) { - plus.navigator.setStatusBarStyle('light'); - page.webview.addEventListener('popGesture', ({ - type, - result - }) => { - if (type === 'start') { - plus.navigator.setStatusBarStyle('dark'); - } else if (type === 'end' && !result) { - plus.navigator.setStatusBarStyle('light'); - } - }); - } + function getStatusBarStyle$1 () { + let style = plus.navigator.getStatusBarStyle(); + if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style === 'null') { + style = 'light'; + } else if (style === 'UIStatusBarStyleDefault') { + style = 'dark'; + } + return style + } + + function scanCode$1 (options, callbackId) { + const statusBarStyle = getStatusBarStyle$1(); + const isDark = statusBarStyle !== 'light'; + + let result; + const page = showPage({ + url: '__uniappscan', + data: { + scanType: options.scanType + }, + style: { + animationType: options.animationType || 'pop-in', + titleNView: { + autoBackButton: true, + type: 'float', + titleText: options.titleText || '扫码', + titleColor: '#ffffff', + backgroundColor: 'rgba(0,0,0,0)', + buttons: !options.onlyFromCamera ? [{ + text: options.albumText || '相册', + fontSize: '17px', + width: '60px', + onclick: () => { + page.sendMessage({ + type: 'gallery' + }); + } + }] : [] + }, + popGesture: 'close', + backButtonAutoControl: 'close' + }, + onMessage ({ + event, + detail + }) { + result = detail; + if (event === 'marked') { + result.errMsg = 'scanCode:ok'; + } else { + result.errMsg = 'scanCode:fail ' + detail.message; + } + }, + onClose () { + if (isDark) { + plus.navigator.setStatusBarStyle('dark'); + } + invoke$1(callbackId, result || { + errMsg: 'scanCode:fail cancel' + }); + } + }); + + if (isDark) { + plus.navigator.setStatusBarStyle('light'); + page.webview.addEventListener('popGesture', ({ + type, + result + }) => { + if (type === 'start') { + plus.navigator.setStatusBarStyle('dark'); + } else if (type === 'end' && !result) { + plus.navigator.setStatusBarStyle('light'); + } + }); + } } var weex$1 = /*#__PURE__*/Object.freeze({ @@ -4552,231 +4557,231 @@ var serviceContext = (function () { scanCode: scanCode$1 }); - function scanCode$2 (...array) { - const api = __uniConfig.nvueCompiler !== 'weex' ? weex$1 : webview; - return api.scanCode(...array) - } - - function checkIsSupportFaceID () { - const platform = plus.os.name.toLowerCase(); - if (platform !== 'ios') { - return false - } - const faceID = requireNativePlugin('faceID'); - return !!(faceID && faceID.isSupport()) - } - - function checkIsSupportFingerPrint () { - return !!(plus.fingerprint && plus.fingerprint.isSupport()) - } - - function checkIsSupportSoterAuthentication () { - let supportMode = []; - if (checkIsSupportFingerPrint()) { - supportMode.push('fingerPrint'); - } - if (checkIsSupportFaceID()) { - supportMode.push('facial'); - } - return { - supportMode, - errMsg: 'checkIsSupportSoterAuthentication:ok' - } - } - - function checkIsSoterEnrolledInDevice ({ - checkAuthMode - } = {}) { - if (checkAuthMode === 'fingerPrint') { - if (checkIsSupportFingerPrint()) { - const isEnrolled = plus.fingerprint.isKeyguardSecure() && plus.fingerprint.isEnrolledFingerprints(); - return { - isEnrolled, - errMsg: 'checkIsSoterEnrolledInDevice:ok' - } - } - return { - isEnrolled: false, - errMsg: 'checkIsSoterEnrolledInDevice:fail not support' - } - } else if (checkAuthMode === 'facial') { - if (checkIsSupportFaceID()) { - const faceID = requireNativePlugin('faceID'); - const isEnrolled = faceID && faceID.isKeyguardSecure() && faceID.isEnrolledFaceID(); - return { - isEnrolled, - errMsg: 'checkIsSoterEnrolledInDevice:ok' - } - } - return { - isEnrolled: false, - errMsg: 'checkIsSoterEnrolledInDevice:fail not support' - } - } - return { - isEnrolled: false, - errMsg: 'checkIsSoterEnrolledInDevice:fail not support' - } + function scanCode$2 (...array) { + const api = __uniConfig.nvueCompiler !== 'weex' ? weex$1 : webview; + return api.scanCode(...array) } - function startSoterAuthentication ({ - requestAuthModes, - challenge = false, - authContent - } = {}, callbackId) { - /* - 以手机不支持facial未录入fingerPrint为例 - requestAuthModes:['facial','fingerPrint']时,微信小程序返回值里的authMode为"fingerPrint" - requestAuthModes:['fingerPrint','facial']时,微信小程序返回值里的authMode为"fingerPrint" - 即先过滤不支持的方式之后再判断是否录入 - 微信小程序errCode(从企业号开发者中心查到如下文档): - 0:识别成功 'startSoterAuthentication:ok' - 90001:本设备不支持SOTER 'startSoterAuthentication:fail not support soter' - 90002:用户未授权微信使用该生物认证接口 注:APP端暂不支持 - 90003:请求使用的生物认证方式不支持 'startSoterAuthentication:fail no corresponding mode' - 90004:未传入challenge或challenge长度过长(最长512字符)注:APP端暂不支持 - 90005:auth_content长度超过限制(最长42个字符)注:微信小程序auth_content指纹识别时无效果,faceID暂未测试 - 90007:内部错误 'startSoterAuthentication:fail auth key update error' - 90008:用户取消授权 'startSoterAuthentication:fail cancel' - 90009:识别失败 'startSoterAuthentication:fail' - 90010:重试次数过多被冻结 'startSoterAuthentication:fail authenticate freeze. please try again later' - 90011:用户未录入所选识别方式 'startSoterAuthentication:fail no fingerprint enrolled' - */ - const supportMode = checkIsSupportSoterAuthentication().supportMode; - if (supportMode.length === 0) { - return { - authMode: supportMode[0] || 'fingerPrint', - errCode: 90001, - errMsg: 'startSoterAuthentication:fail' - } - } - let supportRequestAuthMode = []; - requestAuthModes.map((item, index) => { - if (supportMode.indexOf(item) > -1) { - supportRequestAuthMode.push(item); - } - }); - if (supportRequestAuthMode.length === 0) { - return { - authMode: supportRequestAuthMode[0] || 'fingerPrint', - errCode: 90003, - errMsg: 'startSoterAuthentication:fail no corresponding mode' - } - } - let enrolledRequestAuthMode = []; - supportRequestAuthMode.map((item, index) => { - const checked = checkIsSoterEnrolledInDevice({ - checkAuthMode: item - }).isEnrolled; - if (checked) { - enrolledRequestAuthMode.push(item); - } - }); - if (enrolledRequestAuthMode.length === 0) { - return { - authMode: supportRequestAuthMode[0], - errCode: 90011, - errMsg: `startSoterAuthentication:fail no ${supportRequestAuthMode[0]} enrolled` - } - } - const realAuthMode = enrolledRequestAuthMode[0]; - if (realAuthMode === 'fingerPrint') { - if (plus.os.name.toLowerCase() === 'android') { - plus.nativeUI.showWaiting(authContent || '指纹识别中...').onclose = function () { - plus.fingerprint.cancel(); - }; - } - plus.fingerprint.authenticate(() => { - plus.nativeUI.closeWaiting(); - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 0, - errMsg: 'startSoterAuthentication:ok' - }); - }, (e) => { - switch (e.code) { - case e.AUTHENTICATE_MISMATCH: - // 微信小程序没有这个回调,如果要实现此处回调需要多次触发需要用事件publish实现 - // invoke(callbackId, { - // authMode: realAuthMode, - // errCode: 90009, - // errMsg: 'startSoterAuthentication:fail' - // }) - break - case e.AUTHENTICATE_OVERLIMIT: - // 微信小程序在第一次重试次数超限时安卓IOS返回不一致,安卓端会返回次数超过限制(errCode: 90010),IOS端会返回认证失败(errCode: 90009)。APP-IOS实际运行时不会次数超限,超过指定次数之后会弹出输入密码的界面 - plus.nativeUI.closeWaiting(); - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90010, - errMsg: 'startSoterAuthentication:fail authenticate freeze. please try again later' - }); - break - case e.CANCEL: - plus.nativeUI.closeWaiting(); - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90008, - errMsg: 'startSoterAuthentication:fail cancel' - }); - break - default: - plus.nativeUI.closeWaiting(); - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90007, - errMsg: 'startSoterAuthentication:fail' - }); - break - } - }, { - message: authContent - }); - } else if (realAuthMode === 'facial') { - const faceID = requireNativePlugin('faceID'); - faceID.authenticate({ - message: authContent - }, (e) => { - if (e.type === 'success' && e.code === 0) { - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 0, - errMsg: 'startSoterAuthentication:ok' - }); - } else { - switch (e.code) { - case 4: - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90009, - errMsg: 'startSoterAuthentication:fail' - }); - break - case 5: - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90010, - errMsg: 'startSoterAuthentication:fail authenticate freeze. please try again later' - }); - break - case 6: - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90008, - errMsg: 'startSoterAuthentication:fail cancel' - }); - break - default: - invoke$1(callbackId, { - authMode: realAuthMode, - errCode: 90007, - errMsg: 'startSoterAuthentication:fail' - }); - break - } - } - }); - } + function checkIsSupportFaceID () { + const platform = plus.os.name.toLowerCase(); + if (platform !== 'ios') { + return false + } + const faceID = requireNativePlugin('faceID'); + return !!(faceID && faceID.isSupport()) + } + + function checkIsSupportFingerPrint () { + return !!(plus.fingerprint && plus.fingerprint.isSupport()) + } + + function checkIsSupportSoterAuthentication () { + let supportMode = []; + if (checkIsSupportFingerPrint()) { + supportMode.push('fingerPrint'); + } + if (checkIsSupportFaceID()) { + supportMode.push('facial'); + } + return { + supportMode, + errMsg: 'checkIsSupportSoterAuthentication:ok' + } + } + + function checkIsSoterEnrolledInDevice ({ + checkAuthMode + } = {}) { + if (checkAuthMode === 'fingerPrint') { + if (checkIsSupportFingerPrint()) { + const isEnrolled = plus.fingerprint.isKeyguardSecure() && plus.fingerprint.isEnrolledFingerprints(); + return { + isEnrolled, + errMsg: 'checkIsSoterEnrolledInDevice:ok' + } + } + return { + isEnrolled: false, + errMsg: 'checkIsSoterEnrolledInDevice:fail not support' + } + } else if (checkAuthMode === 'facial') { + if (checkIsSupportFaceID()) { + const faceID = requireNativePlugin('faceID'); + const isEnrolled = faceID && faceID.isKeyguardSecure() && faceID.isEnrolledFaceID(); + return { + isEnrolled, + errMsg: 'checkIsSoterEnrolledInDevice:ok' + } + } + return { + isEnrolled: false, + errMsg: 'checkIsSoterEnrolledInDevice:fail not support' + } + } + return { + isEnrolled: false, + errMsg: 'checkIsSoterEnrolledInDevice:fail not support' + } + } + + function startSoterAuthentication ({ + requestAuthModes, + challenge = false, + authContent + } = {}, callbackId) { + /* + 以手机不支持facial未录入fingerPrint为例 + requestAuthModes:['facial','fingerPrint']时,微信小程序返回值里的authMode为"fingerPrint" + requestAuthModes:['fingerPrint','facial']时,微信小程序返回值里的authMode为"fingerPrint" + 即先过滤不支持的方式之后再判断是否录入 + 微信小程序errCode(从企业号开发者中心查到如下文档): + 0:识别成功 'startSoterAuthentication:ok' + 90001:本设备不支持SOTER 'startSoterAuthentication:fail not support soter' + 90002:用户未授权微信使用该生物认证接口 注:APP端暂不支持 + 90003:请求使用的生物认证方式不支持 'startSoterAuthentication:fail no corresponding mode' + 90004:未传入challenge或challenge长度过长(最长512字符)注:APP端暂不支持 + 90005:auth_content长度超过限制(最长42个字符)注:微信小程序auth_content指纹识别时无效果,faceID暂未测试 + 90007:内部错误 'startSoterAuthentication:fail auth key update error' + 90008:用户取消授权 'startSoterAuthentication:fail cancel' + 90009:识别失败 'startSoterAuthentication:fail' + 90010:重试次数过多被冻结 'startSoterAuthentication:fail authenticate freeze. please try again later' + 90011:用户未录入所选识别方式 'startSoterAuthentication:fail no fingerprint enrolled' + */ + const supportMode = checkIsSupportSoterAuthentication().supportMode; + if (supportMode.length === 0) { + return { + authMode: supportMode[0] || 'fingerPrint', + errCode: 90001, + errMsg: 'startSoterAuthentication:fail' + } + } + let supportRequestAuthMode = []; + requestAuthModes.map((item, index) => { + if (supportMode.indexOf(item) > -1) { + supportRequestAuthMode.push(item); + } + }); + if (supportRequestAuthMode.length === 0) { + return { + authMode: supportRequestAuthMode[0] || 'fingerPrint', + errCode: 90003, + errMsg: 'startSoterAuthentication:fail no corresponding mode' + } + } + let enrolledRequestAuthMode = []; + supportRequestAuthMode.map((item, index) => { + const checked = checkIsSoterEnrolledInDevice({ + checkAuthMode: item + }).isEnrolled; + if (checked) { + enrolledRequestAuthMode.push(item); + } + }); + if (enrolledRequestAuthMode.length === 0) { + return { + authMode: supportRequestAuthMode[0], + errCode: 90011, + errMsg: `startSoterAuthentication:fail no ${supportRequestAuthMode[0]} enrolled` + } + } + const realAuthMode = enrolledRequestAuthMode[0]; + if (realAuthMode === 'fingerPrint') { + if (plus.os.name.toLowerCase() === 'android') { + plus.nativeUI.showWaiting(authContent || '指纹识别中...').onclose = function () { + plus.fingerprint.cancel(); + }; + } + plus.fingerprint.authenticate(() => { + plus.nativeUI.closeWaiting(); + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 0, + errMsg: 'startSoterAuthentication:ok' + }); + }, (e) => { + switch (e.code) { + case e.AUTHENTICATE_MISMATCH: + // 微信小程序没有这个回调,如果要实现此处回调需要多次触发需要用事件publish实现 + // invoke(callbackId, { + // authMode: realAuthMode, + // errCode: 90009, + // errMsg: 'startSoterAuthentication:fail' + // }) + break + case e.AUTHENTICATE_OVERLIMIT: + // 微信小程序在第一次重试次数超限时安卓IOS返回不一致,安卓端会返回次数超过限制(errCode: 90010),IOS端会返回认证失败(errCode: 90009)。APP-IOS实际运行时不会次数超限,超过指定次数之后会弹出输入密码的界面 + plus.nativeUI.closeWaiting(); + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90010, + errMsg: 'startSoterAuthentication:fail authenticate freeze. please try again later' + }); + break + case e.CANCEL: + plus.nativeUI.closeWaiting(); + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90008, + errMsg: 'startSoterAuthentication:fail cancel' + }); + break + default: + plus.nativeUI.closeWaiting(); + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90007, + errMsg: 'startSoterAuthentication:fail' + }); + break + } + }, { + message: authContent + }); + } else if (realAuthMode === 'facial') { + const faceID = requireNativePlugin('faceID'); + faceID.authenticate({ + message: authContent + }, (e) => { + if (e.type === 'success' && e.code === 0) { + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 0, + errMsg: 'startSoterAuthentication:ok' + }); + } else { + switch (e.code) { + case 4: + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90009, + errMsg: 'startSoterAuthentication:fail' + }); + break + case 5: + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90010, + errMsg: 'startSoterAuthentication:fail authenticate freeze. please try again later' + }); + break + case 6: + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90008, + errMsg: 'startSoterAuthentication:fail cancel' + }); + break + default: + invoke$1(callbackId, { + authMode: realAuthMode, + errCode: 90007, + errMsg: 'startSoterAuthentication:fail' + }); + break + } + } + }); + } } var safeAreaInsets = { @@ -5331,73 +5336,73 @@ var serviceContext = (function () { chooseLocation: chooseLocation$1 }); - function getStatusBarStyle$2 () { - let style = plus.navigator.getStatusBarStyle(); - if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style === 'null') { - style = 'light'; - } else if (style === 'UIStatusBarStyleDefault') { - style = 'dark'; - } - return style - } - - function chooseLocation$2 (options, callbackId) { - const statusBarStyle = getStatusBarStyle$2(); - const isDark = statusBarStyle !== 'light'; - - let result; - const page = showPage({ - url: '__uniappchooselocation', - data: options, - style: { - animationType: options.animationType || 'slide-in-bottom', - titleNView: false, - popGesture: 'close', - scrollIndicator: 'none' - }, - onMessage ({ - event, - detail - }) { - if (event === 'selected') { - result = detail; - result.errMsg = 'chooseLocation:ok'; - } - }, - onClose () { - if (isDark) { - plus.navigator.setStatusBarStyle('dark'); - } - - invoke$1(callbackId, result || { - errMsg: 'chooseLocation:fail cancel' - }); - } - }); - - if (isDark) { - plus.navigator.setStatusBarStyle('light'); - page.webview.addEventListener('popGesture', ({ - type, - result - }) => { - if (type === 'start') { - plus.navigator.setStatusBarStyle('dark'); - } else if (type === 'end' && !result) { - plus.navigator.setStatusBarStyle('light'); - } - }); - } - } + function getStatusBarStyle$2 () { + let style = plus.navigator.getStatusBarStyle(); + if (style === 'UIStatusBarStyleBlackTranslucent' || style === 'UIStatusBarStyleBlackOpaque' || style === 'null') { + style = 'light'; + } else if (style === 'UIStatusBarStyleDefault') { + style = 'dark'; + } + return style + } + + function chooseLocation$2 (options, callbackId) { + const statusBarStyle = getStatusBarStyle$2(); + const isDark = statusBarStyle !== 'light'; + + let result; + const page = showPage({ + url: '__uniappchooselocation', + data: options, + style: { + animationType: options.animationType || 'slide-in-bottom', + titleNView: false, + popGesture: 'close', + scrollIndicator: 'none' + }, + onMessage ({ + event, + detail + }) { + if (event === 'selected') { + result = detail; + result.errMsg = 'chooseLocation:ok'; + } + }, + onClose () { + if (isDark) { + plus.navigator.setStatusBarStyle('dark'); + } + + invoke$1(callbackId, result || { + errMsg: 'chooseLocation:fail cancel' + }); + } + }); + + if (isDark) { + plus.navigator.setStatusBarStyle('light'); + page.webview.addEventListener('popGesture', ({ + type, + result + }) => { + if (type === 'start') { + plus.navigator.setStatusBarStyle('dark'); + } else if (type === 'end' && !result) { + plus.navigator.setStatusBarStyle('light'); + } + }); + } + } var weex$2 = /*#__PURE__*/Object.freeze({ __proto__: null, chooseLocation: chooseLocation$2 }); - function chooseLocation$3 (...array) { - const api = __uniConfig.nvueCompiler !== 'weex' ? weex$2 : webview$1; - return api.chooseLocation(...array) + function chooseLocation$3 (...array) { + const api = __uniConfig.nvueCompiler !== 'weex' ? weex$2 : webview$1; + return api.chooseLocation(...array) } function getLocationSuccess (type, position, callbackId) { @@ -6177,152 +6182,152 @@ var serviceContext = (function () { return createDownloadTaskById(++downloadTaskId, args) } - let requestTaskId = 0; - const requestTasks = {}; - - const publishStateChange$1 = res => { - publish('onRequestTaskStateChange', res); - delete requestTasks[requestTaskId]; - }; - - function createRequestTaskById (requestTaskId, { - url, - data, - header, - method = 'GET', - responseType, - sslVerify = true - } = {}) { - const stream = requireNativePlugin('stream'); - const headers = {}; - - let abortTimeout; - let aborted; - let hasContentType = false; - for (const name in header) { - if (!hasContentType && name.toLowerCase() === 'content-type') { - hasContentType = true; - headers['Content-Type'] = header[name]; - // TODO 需要重构 - if (method !== 'GET' && header[name].indexOf('application/x-www-form-urlencoded') === 0 && typeof data !== 'string' && !(data instanceof ArrayBuffer)) { - let bodyArray = []; - for (let key in data) { - if (data.hasOwnProperty(key)) { - bodyArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key])); - } - } - data = bodyArray.join('&'); - } - } else { - headers[name] = header[name]; - } - } - - if (!hasContentType && method === 'POST') { - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; - } - - const timeout = __uniConfig.networkTimeout.request; - if (timeout) { - abortTimeout = setTimeout(() => { - aborted = true; - publishStateChange$1({ - requestTaskId, - state: 'fail', - statusCode: 0, - errMsg: 'timeout' - }); - }, timeout); - } - const options = { - method, - url: url.trim(), - // weex 官方文档有误,headers 类型实际 object,用 string 类型会无响应 - headers, - type: responseType === 'arraybuffer' ? 'base64' : 'text', - // weex 官方文档未说明实际支持 timeout,单位:ms - timeout: timeout || 6e5, - // 配置和weex模块内相反 - sslVerify: !sslVerify - }; - if (method !== 'GET') { - options.body = data; - } - try { - stream.fetch(options, ({ - ok, - status, - data, - headers - }) => { - if (aborted) { - return - } - if (abortTimeout) { - clearTimeout(abortTimeout); - } - const statusCode = status; - if (statusCode > 0) { - publishStateChange$1({ - requestTaskId, - state: 'success', - data: ok && responseType === 'arraybuffer' ? base64ToArrayBuffer$2(data) : data, - statusCode, - header: headers - }); - } else { - publishStateChange$1({ - requestTaskId, - state: 'fail', - statusCode, - errMsg: 'abort statusCode:' + statusCode - }); - } - }); - requestTasks[requestTaskId] = { - abort () { - aborted = true; - if (abortTimeout) { - clearTimeout(abortTimeout); - } - publishStateChange$1({ - requestTaskId, - state: 'fail', - statusCode: 0, - errMsg: 'abort' - }); - } - }; - } catch (e) { - return { - requestTaskId, - errMsg: 'createRequestTask:fail' - } - } - return { - requestTaskId, - errMsg: 'createRequestTask:ok' - } - } - - function createRequestTask (args) { - return createRequestTaskById(++requestTaskId, args) - } - - function operateRequestTask ({ - requestTaskId, - operationType - } = {}) { - const requestTask = requestTasks[requestTaskId]; - if (requestTask && operationType === 'abort') { - requestTask.abort(); - return { - errMsg: 'operateRequestTask:ok' - } - } - return { - errMsg: 'operateRequestTask:fail' - } + let requestTaskId = 0; + const requestTasks = {}; + + const publishStateChange$1 = res => { + publish('onRequestTaskStateChange', res); + delete requestTasks[requestTaskId]; + }; + + function createRequestTaskById (requestTaskId, { + url, + data, + header, + method = 'GET', + responseType, + sslVerify = true + } = {}) { + const stream = requireNativePlugin('stream'); + const headers = {}; + + let abortTimeout; + let aborted; + let hasContentType = false; + for (const name in header) { + if (!hasContentType && name.toLowerCase() === 'content-type') { + hasContentType = true; + headers['Content-Type'] = header[name]; + // TODO 需要重构 + if (method !== 'GET' && header[name].indexOf('application/x-www-form-urlencoded') === 0 && typeof data !== 'string' && !(data instanceof ArrayBuffer)) { + let bodyArray = []; + for (let key in data) { + if (data.hasOwnProperty(key)) { + bodyArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key])); + } + } + data = bodyArray.join('&'); + } + } else { + headers[name] = header[name]; + } + } + + if (!hasContentType && method === 'POST') { + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; + } + + const timeout = __uniConfig.networkTimeout.request; + if (timeout) { + abortTimeout = setTimeout(() => { + aborted = true; + publishStateChange$1({ + requestTaskId, + state: 'fail', + statusCode: 0, + errMsg: 'timeout' + }); + }, timeout); + } + const options = { + method, + url: url.trim(), + // weex 官方文档有误,headers 类型实际 object,用 string 类型会无响应 + headers, + type: responseType === 'arraybuffer' ? 'base64' : 'text', + // weex 官方文档未说明实际支持 timeout,单位:ms + timeout: timeout || 6e5, + // 配置和weex模块内相反 + sslVerify: !sslVerify + }; + if (method !== 'GET') { + options.body = data; + } + try { + stream.fetch(options, ({ + ok, + status, + data, + headers + }) => { + if (aborted) { + return + } + if (abortTimeout) { + clearTimeout(abortTimeout); + } + const statusCode = status; + if (statusCode > 0) { + publishStateChange$1({ + requestTaskId, + state: 'success', + data: ok && responseType === 'arraybuffer' ? base64ToArrayBuffer$2(data) : data, + statusCode, + header: headers + }); + } else { + publishStateChange$1({ + requestTaskId, + state: 'fail', + statusCode, + errMsg: 'abort statusCode:' + statusCode + }); + } + }); + requestTasks[requestTaskId] = { + abort () { + aborted = true; + if (abortTimeout) { + clearTimeout(abortTimeout); + } + publishStateChange$1({ + requestTaskId, + state: 'fail', + statusCode: 0, + errMsg: 'abort' + }); + } + }; + } catch (e) { + return { + requestTaskId, + errMsg: 'createRequestTask:fail' + } + } + return { + requestTaskId, + errMsg: 'createRequestTask:ok' + } + } + + function createRequestTask (args) { + return createRequestTaskById(++requestTaskId, args) + } + + function operateRequestTask ({ + requestTaskId, + operationType + } = {}) { + const requestTask = requestTasks[requestTaskId]; + if (requestTask && operationType === 'abort') { + requestTask.abort(); + return { + errMsg: 'operateRequestTask:ok' + } + } + return { + errMsg: 'operateRequestTask:fail' + } } const socketTasks = {}; @@ -6483,7 +6488,7 @@ var serviceContext = (function () { } for (const name in formData) { if (formData.hasOwnProperty(name)) { - uploader.addData(name, formData[name]); + uploader.addData(name, String(formData[name])); } } if (files && files.length) { @@ -7347,29 +7352,29 @@ var serviceContext = (function () { } } - const REGEX_UPX = /(\d+(\.\d+)?)[r|u]px/g; - - function transformCSS (css) { - return css.replace(REGEX_UPX, (a, b) => { - return uni.upx2px(parseInt(b) || 0) + 'px' - }) + const REGEX_UPX = /(\d+(\.\d+)?)[r|u]px/g; + + function transformCSS (css) { + return css.replace(REGEX_UPX, (a, b) => { + return uni.upx2px(parseInt(b) || 0) + 'px' + }) } - function parseStyleUnit (styles) { - let newStyles = {}; - const stylesStr = JSON.stringify(styles); - if (~stylesStr.indexOf('upx') || ~stylesStr.indexOf('rpx')) { - try { - newStyles = JSON.parse(transformCSS(stylesStr)); - } catch (e) { - newStyles = styles; - console.error(e); - } - } else { - newStyles = JSON.parse(stylesStr); - } - - return newStyles + function parseStyleUnit (styles) { + let newStyles = {}; + const stylesStr = JSON.stringify(styles); + if (~stylesStr.indexOf('upx') || ~stylesStr.indexOf('rpx')) { + try { + newStyles = JSON.parse(transformCSS(stylesStr)); + } catch (e) { + newStyles = styles; + console.error(e); + } + } else { + newStyles = JSON.parse(stylesStr); + } + + return newStyles } const WEBVIEW_STYLE_BLACKLIST = [ @@ -7442,134 +7447,134 @@ var serviceContext = (function () { return webviewStyle } - function backbuttonListener () { - uni.navigateBack({ - from: 'backbutton' - }); - } - - function initPopupSubNVue (subNVueWebview, style, maskWebview) { - if (!maskWebview.popupSubNVueWebviews) { - maskWebview.popupSubNVueWebviews = {}; - } - - maskWebview.popupSubNVueWebviews[subNVueWebview.id] = subNVueWebview; - - if (process.env.NODE_ENV !== 'production') { - console.log( - `UNIAPP[webview][${maskWebview.id}]:add.popupSubNVueWebview[${subNVueWebview.id}]` - ); - } - - const hideSubNVue = function () { - maskWebview.setStyle({ - mask: 'none' - }); - subNVueWebview.hide('auto'); - }; - maskWebview.addEventListener('maskClick', hideSubNVue); - let isRemoved = false; // 增加个 remove 标记,防止出错 - subNVueWebview.addEventListener('show', () => { - if (!isRemoved) { - plus.key.removeEventListener('backbutton', backbuttonListener); - plus.key.addEventListener('backbutton', hideSubNVue); - isRemoved = true; - } - }); - subNVueWebview.addEventListener('hide', () => { - if (isRemoved) { - plus.key.removeEventListener('backbutton', hideSubNVue); - plus.key.addEventListener('backbutton', backbuttonListener); - isRemoved = false; - } - }); - subNVueWebview.addEventListener('close', () => { - delete maskWebview.popupSubNVueWebviews[subNVueWebview.id]; - if (isRemoved) { - plus.key.removeEventListener('backbutton', hideSubNVue); - plus.key.addEventListener('backbutton', backbuttonListener); - isRemoved = false; - } - }); - } - - function initNormalSubNVue (subNVueWebview, style, webview) { - webview.append(subNVueWebview); - } - - function initSubNVue (subNVue, routeOptions, webview) { - if (!subNVue.path) { - return - } - const style = subNVue.style || {}; - const isNavigationBar = subNVue.type === 'navigationBar'; - const isPopup = subNVue.type === 'popup'; - - delete style.type; - - if (isPopup && !subNVue.id) { - console.warn('subNVue[' + subNVue.path + '] 尚未配置 id'); - } - // TODO lazyload - - style.uniNView = { - path: subNVue.path.replace('.nvue', '.js'), - defaultFontSize: __uniConfig.defaultFontSize, - viewport: __uniConfig.viewport - }; - - const extras = { - __uniapp_host: routeOptions.path, - __uniapp_origin: style.uniNView.path.split('?')[0].replace('.js', ''), - __uniapp_origin_id: webview.id, - __uniapp_origin_type: webview.__uniapp_type - }; - - let maskWebview; - - if (isNavigationBar) { - style.position = 'dock'; - style.dock = 'top'; - style.top = 0; - style.width = '100%'; - style.height = TITLEBAR_HEIGHT + getStatusbarHeight(); - delete style.left; - delete style.right; - delete style.bottom; - delete style.margin; - } else if (isPopup) { - style.position = 'absolute'; - if (isTabBarPage(routeOptions.path)) { - maskWebview = tabBar$1; - } else { - maskWebview = webview; - } - extras.__uniapp_mask = style.mask || 'rgba(0,0,0,0.5)'; - extras.__uniapp_mask_id = maskWebview.id; - } - - if (process.env.NODE_ENV !== 'production') { - console.log( - `UNIAPP[webview][${webview.id}]:create[${subNVue.id}]:${JSON.stringify(style)}` - ); - } - const subNVueWebview = plus.webview.create('', subNVue.id, style, extras); - - if (isPopup) { - initPopupSubNVue(subNVueWebview, style, maskWebview); - } else { - initNormalSubNVue(subNVueWebview, style, webview); - } + function backbuttonListener () { + uni.navigateBack({ + from: 'backbutton' + }); } - function initSubNVues (routeOptions, webview) { - const subNVues = routeOptions.window.subNVues; - if (!subNVues || !subNVues.length) { - return - } - subNVues.forEach(subNVue => { - initSubNVue(subNVue, routeOptions, webview); - }); + function initPopupSubNVue (subNVueWebview, style, maskWebview) { + if (!maskWebview.popupSubNVueWebviews) { + maskWebview.popupSubNVueWebviews = {}; + } + + maskWebview.popupSubNVueWebviews[subNVueWebview.id] = subNVueWebview; + + if (process.env.NODE_ENV !== 'production') { + console.log( + `UNIAPP[webview][${maskWebview.id}]:add.popupSubNVueWebview[${subNVueWebview.id}]` + ); + } + + const hideSubNVue = function () { + maskWebview.setStyle({ + mask: 'none' + }); + subNVueWebview.hide('auto'); + }; + maskWebview.addEventListener('maskClick', hideSubNVue); + let isRemoved = false; // 增加个 remove 标记,防止出错 + subNVueWebview.addEventListener('show', () => { + if (!isRemoved) { + plus.key.removeEventListener('backbutton', backbuttonListener); + plus.key.addEventListener('backbutton', hideSubNVue); + isRemoved = true; + } + }); + subNVueWebview.addEventListener('hide', () => { + if (isRemoved) { + plus.key.removeEventListener('backbutton', hideSubNVue); + plus.key.addEventListener('backbutton', backbuttonListener); + isRemoved = false; + } + }); + subNVueWebview.addEventListener('close', () => { + delete maskWebview.popupSubNVueWebviews[subNVueWebview.id]; + if (isRemoved) { + plus.key.removeEventListener('backbutton', hideSubNVue); + plus.key.addEventListener('backbutton', backbuttonListener); + isRemoved = false; + } + }); + } + + function initNormalSubNVue (subNVueWebview, style, webview) { + webview.append(subNVueWebview); + } + + function initSubNVue (subNVue, routeOptions, webview) { + if (!subNVue.path) { + return + } + const style = subNVue.style || {}; + const isNavigationBar = subNVue.type === 'navigationBar'; + const isPopup = subNVue.type === 'popup'; + + delete style.type; + + if (isPopup && !subNVue.id) { + console.warn('subNVue[' + subNVue.path + '] 尚未配置 id'); + } + // TODO lazyload + + style.uniNView = { + path: subNVue.path.replace('.nvue', '.js'), + defaultFontSize: __uniConfig.defaultFontSize, + viewport: __uniConfig.viewport + }; + + const extras = { + __uniapp_host: routeOptions.path, + __uniapp_origin: style.uniNView.path.split('?')[0].replace('.js', ''), + __uniapp_origin_id: webview.id, + __uniapp_origin_type: webview.__uniapp_type + }; + + let maskWebview; + + if (isNavigationBar) { + style.position = 'dock'; + style.dock = 'top'; + style.top = 0; + style.width = '100%'; + style.height = TITLEBAR_HEIGHT + getStatusbarHeight(); + delete style.left; + delete style.right; + delete style.bottom; + delete style.margin; + } else if (isPopup) { + style.position = 'absolute'; + if (isTabBarPage(routeOptions.path)) { + maskWebview = tabBar$1; + } else { + maskWebview = webview; + } + extras.__uniapp_mask = style.mask || 'rgba(0,0,0,0.5)'; + extras.__uniapp_mask_id = maskWebview.id; + } + + if (process.env.NODE_ENV !== 'production') { + console.log( + `UNIAPP[webview][${webview.id}]:create[${subNVue.id}]:${JSON.stringify(style)}` + ); + } + const subNVueWebview = plus.webview.create('', subNVue.id, style, extras); + + if (isPopup) { + initPopupSubNVue(subNVueWebview, style, maskWebview); + } else { + initNormalSubNVue(subNVueWebview, style, webview); + } + } + + function initSubNVues (routeOptions, webview) { + const subNVues = routeOptions.window.subNVues; + if (!subNVues || !subNVues.length) { + return + } + subNVues.forEach(subNVue => { + initSubNVue(subNVue, routeOptions, webview); + }); } function onWebviewClose (webview) { @@ -8791,6 +8796,92 @@ var serviceContext = (function () { : requestComponentInfo(pageVm, queue, callback); } + const eventNames = [ + 'load', + 'close', + 'error' + ]; + + class RewardedVideoAd { + constructor (adpid) { + this._options = { + adpid: adpid + }; + + const _callbacks = this._callbacks = {}; + eventNames.forEach(item => { + _callbacks[item] = []; + const name = item[0].toUpperCase() + item.substr(1); + this[`on${name}`] = function (callback) { + _callbacks[item].push(callback); + }; + }); + + this._isLoad = false; + this._loadPromiseResolve = null; + this._loadPromisereject = null; + const rewardAd = this._rewardAd = plus.ad.createRewardedVideoAd(this._options); + rewardAd.onLoad((e) => { + this._isLoad = true; + this._dispatchEvent('load', {}); + if(this._loadPromiseResolve != null) { + this._loadPromiseResolve(); + this._loadPromiseResolve = null; + } + }); + rewardAd.onClose((e) => { + this._dispatchEvent('close', {isEnded: e.isEnded}); + }); + rewardAd.onError((e) => { + const detail = {code: e.code, message: e.message}; + this._dispatchEvent('error', detail); + if(this._loadPromisereject != null) { + this._loadPromisereject(detail); + this._loadPromisereject = null; + } + }); + this._loadAd(); + } + load () { + return new Promise((resolve, reject) => { + if(this._isLoad) { + resolve(); + return + } + this._loadPromiseResolve = resolve; + this._loadPromisereject = reject; + this._loadAd(); + }) + } + show () { + return new Promise((resolve, reject) => { + if(this._isLoad) { + this._rewardAd.show(); + resolve(); + } else { + reject(); + } + }) + } + _loadAd () { + this._isLoad = false; + this._rewardAd.load(); + } + _dispatchEvent(name, data) { + this._callbacks[name].forEach(callback => { + if (typeof callback === 'function') { + callback(data || {}); + } + }); + } + } + + function createRewardedVideoAd ({ + adpid = '' + } = {}) { + return new RewardedVideoAd(adpid) + } + var api = /*#__PURE__*/Object.freeze({ @@ -8920,7 +9011,8 @@ var serviceContext = (function () { setTabBarStyle: setTabBarStyle$2, hideTabBar: hideTabBar$2, showTabBar: showTabBar$2, - requestComponentInfo: requestComponentInfo$2 + requestComponentInfo: requestComponentInfo$2, + createRewardedVideoAd: createRewardedVideoAd }); var platformApi = Object.assign(Object.create(null), api, eventApis); @@ -8956,7 +9048,7 @@ var serviceContext = (function () { return page && page.$page.id } - const eventNames = [ + const eventNames$1 = [ 'canplay', 'play', 'pause', @@ -9021,7 +9113,7 @@ var serviceContext = (function () { this.id = id; this._callbacks = {}; this._options = {}; - eventNames.forEach(name => { + eventNames$1.forEach(name => { this._callbacks[name.toLowerCase()] = []; }); props.forEach(item => { @@ -9075,7 +9167,7 @@ var serviceContext = (function () { } } - eventNames.forEach(item => { + eventNames$1.forEach(item => { const name = item[0].toUpperCase() + item.substr(1); item = item.toLowerCase(); InnerAudioContext.prototype[`on${name}`] = function (callback) { @@ -9140,7 +9232,7 @@ var serviceContext = (function () { createInnerAudioContext: createInnerAudioContext }); - const eventNames$1 = [ + const eventNames$2 = [ 'canplay', 'play', 'pause', @@ -9153,7 +9245,7 @@ var serviceContext = (function () { 'waiting' ]; const callbacks$4 = {}; - eventNames$1.forEach(name => { + eventNames$2.forEach(name => { callbacks$4[name] = []; }); @@ -9267,7 +9359,7 @@ var serviceContext = (function () { } } - eventNames$1.forEach(item => { + eventNames$2.forEach(item => { const name = item[0].toUpperCase() + item.substr(1); BackgroundAudioManager.prototype[`on${name}`] = function (callback) { callbacks$4[item].push(callback); @@ -9285,860 +9377,860 @@ var serviceContext = (function () { getBackgroundAudioManager: getBackgroundAudioManager }); - const canvasEventCallbacks = createCallbacks('canvasEvent'); - - UniServiceJSBridge.subscribe('onDrawCanvas', ({ - callbackId, - data - }) => { - const callback = canvasEventCallbacks.pop(callbackId); - if (callback) { - callback(data); - } - }); - - UniServiceJSBridge.subscribe('onCanvasMethodCallback', ({ - callbackId, - data - }) => { - const callback = canvasEventCallbacks.pop(callbackId); - if (callback) { - callback(data); - } - }); - - function operateCanvas (canvasId, pageId, type, data) { - UniServiceJSBridge.publishHandler(pageId + '-canvas-' + canvasId, { - canvasId, - type, - data - }, pageId); - } - - const predefinedColor = { - aliceblue: '#f0f8ff', - antiquewhite: '#faebd7', - aqua: '#00ffff', - aquamarine: '#7fffd4', - azure: '#f0ffff', - beige: '#f5f5dc', - bisque: '#ffe4c4', - black: '#000000', - blanchedalmond: '#ffebcd', - blue: '#0000ff', - blueviolet: '#8a2be2', - brown: '#a52a2a', - burlywood: '#deb887', - cadetblue: '#5f9ea0', - chartreuse: '#7fff00', - chocolate: '#d2691e', - coral: '#ff7f50', - cornflowerblue: '#6495ed', - cornsilk: '#fff8dc', - crimson: '#dc143c', - cyan: '#00ffff', - darkblue: '#00008b', - darkcyan: '#008b8b', - darkgoldenrod: '#b8860b', - darkgray: '#a9a9a9', - darkgrey: '#a9a9a9', - darkgreen: '#006400', - darkkhaki: '#bdb76b', - darkmagenta: '#8b008b', - darkolivegreen: '#556b2f', - darkorange: '#ff8c00', - darkorchid: '#9932cc', - darkred: '#8b0000', - darksalmon: '#e9967a', - darkseagreen: '#8fbc8f', - darkslateblue: '#483d8b', - darkslategray: '#2f4f4f', - darkslategrey: '#2f4f4f', - darkturquoise: '#00ced1', - darkviolet: '#9400d3', - deeppink: '#ff1493', - deepskyblue: '#00bfff', - dimgray: '#696969', - dimgrey: '#696969', - dodgerblue: '#1e90ff', - firebrick: '#b22222', - floralwhite: '#fffaf0', - forestgreen: '#228b22', - fuchsia: '#ff00ff', - gainsboro: '#dcdcdc', - ghostwhite: '#f8f8ff', - gold: '#ffd700', - goldenrod: '#daa520', - gray: '#808080', - grey: '#808080', - green: '#008000', - greenyellow: '#adff2f', - honeydew: '#f0fff0', - hotpink: '#ff69b4', - indianred: '#cd5c5c', - indigo: '#4b0082', - ivory: '#fffff0', - khaki: '#f0e68c', - lavender: '#e6e6fa', - lavenderblush: '#fff0f5', - lawngreen: '#7cfc00', - lemonchiffon: '#fffacd', - lightblue: '#add8e6', - lightcoral: '#f08080', - lightcyan: '#e0ffff', - lightgoldenrodyellow: '#fafad2', - lightgray: '#d3d3d3', - lightgrey: '#d3d3d3', - lightgreen: '#90ee90', - lightpink: '#ffb6c1', - lightsalmon: '#ffa07a', - lightseagreen: '#20b2aa', - lightskyblue: '#87cefa', - lightslategray: '#778899', - lightslategrey: '#778899', - lightsteelblue: '#b0c4de', - lightyellow: '#ffffe0', - lime: '#00ff00', - limegreen: '#32cd32', - linen: '#faf0e6', - magenta: '#ff00ff', - maroon: '#800000', - mediumaquamarine: '#66cdaa', - mediumblue: '#0000cd', - mediumorchid: '#ba55d3', - mediumpurple: '#9370db', - mediumseagreen: '#3cb371', - mediumslateblue: '#7b68ee', - mediumspringgreen: '#00fa9a', - mediumturquoise: '#48d1cc', - mediumvioletred: '#c71585', - midnightblue: '#191970', - mintcream: '#f5fffa', - mistyrose: '#ffe4e1', - moccasin: '#ffe4b5', - navajowhite: '#ffdead', - navy: '#000080', - oldlace: '#fdf5e6', - olive: '#808000', - olivedrab: '#6b8e23', - orange: '#ffa500', - orangered: '#ff4500', - orchid: '#da70d6', - palegoldenrod: '#eee8aa', - palegreen: '#98fb98', - paleturquoise: '#afeeee', - palevioletred: '#db7093', - papayawhip: '#ffefd5', - peachpuff: '#ffdab9', - peru: '#cd853f', - pink: '#ffc0cb', - plum: '#dda0dd', - powderblue: '#b0e0e6', - purple: '#800080', - rebeccapurple: '#663399', - red: '#ff0000', - rosybrown: '#bc8f8f', - royalblue: '#4169e1', - saddlebrown: '#8b4513', - salmon: '#fa8072', - sandybrown: '#f4a460', - seagreen: '#2e8b57', - seashell: '#fff5ee', - sienna: '#a0522d', - silver: '#c0c0c0', - skyblue: '#87ceeb', - slateblue: '#6a5acd', - slategray: '#708090', - slategrey: '#708090', - snow: '#fffafa', - springgreen: '#00ff7f', - steelblue: '#4682b4', - tan: '#d2b48c', - teal: '#008080', - thistle: '#d8bfd8', - tomato: '#ff6347', - turquoise: '#40e0d0', - violet: '#ee82ee', - wheat: '#f5deb3', - white: '#ffffff', - whitesmoke: '#f5f5f5', - yellow: '#ffff00', - yellowgreen: '#9acd32', - transparent: '#00000000' - }; - - function checkColor (e) { - var t = null; - if ((t = /^#([0-9|A-F|a-f]{6})$/.exec(e)) != null) { - let n = parseInt(t[1].slice(0, 2), 16); - let o = parseInt(t[1].slice(2, 4), 16); - let r = parseInt(t[1].slice(4), 16); - return [n, o, r, 255] - } - if ((t = /^#([0-9|A-F|a-f]{3})$/.exec(e)) != null) { - let n = t[1].slice(0, 1); - let o = t[1].slice(1, 2); - let r = t[1].slice(2, 3); - n = parseInt(n + n, 16); - o = parseInt(o + o, 16); - r = parseInt(r + r, 16); - return [n, o, r, 255] - } - if ((t = /^rgb\((.+)\)$/.exec(e)) != null) { - return t[1].split(',').map(function (e) { - return Math.min(255, parseInt(e.trim())) - }).concat(255) - } - if ((t = /^rgba\((.+)\)$/.exec(e)) != null) { - return t[1].split(',').map(function (e, t) { - return t === 3 ? Math.floor(255 * parseFloat(e.trim())) : Math.min(255, parseInt(e.trim())) - }) - } - var i = e.toLowerCase(); - if (predefinedColor.hasOwnProperty(i)) { - t = /^#([0-9|A-F|a-f]{6,8})$/.exec(predefinedColor[i]); - let n = parseInt(t[1].slice(0, 2), 16); - let o = parseInt(t[1].slice(2, 4), 16); - let r = parseInt(t[1].slice(4, 6), 16); - let a = parseInt(t[1].slice(6, 8), 16); - a = a >= 0 ? a : 255; - return [n, o, r, a] - } - console.group('非法颜色: ' + e); - console.error('不支持颜色:' + e); - console.groupEnd(); - return [0, 0, 0, 255] - } - - function Pattern (image, repetition) { - this.image = image; - this.repetition = repetition; - } - - class CanvasGradient { - constructor (type, data) { - this.type = type; - this.data = data; - this.colorStop = []; - } - addColorStop (position, color) { - this.colorStop.push([position, checkColor(color)]); - } - } - var methods1 = ['scale', 'rotate', 'translate', 'setTransform', 'transform']; - var methods2 = ['drawImage', 'fillText', 'fill', 'stroke', 'fillRect', 'strokeRect', 'clearRect', - 'strokeText' - ]; - var methods3 = ['setFillStyle', 'setTextAlign', 'setStrokeStyle', 'setGlobalAlpha', 'setShadow', - 'setFontSize', 'setLineCap', 'setLineJoin', 'setLineWidth', 'setMiterLimit', - 'setTextBaseline', 'setLineDash' - ]; - - var tempCanvas; - function getTempCanvas (width = 0, height = 0) { - if (!tempCanvas) { - tempCanvas = document.createElement('canvas'); - } - tempCanvas.width = width; - tempCanvas.height = height; - return tempCanvas - } - - function TextMetrics (width) { - this.width = width; - } - - class CanvasContext { - constructor (id, pageId) { - this.id = id; - this.pageId = pageId; - 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' - }; - } - draw (reserve = false, callback) { - var actions = [...this.actions]; - this.actions = []; - this.path = []; - var callbackId; - - if (typeof callback === 'function') { - callbackId = canvasEventCallbacks.push(callback); - } - - operateCanvas(this.id, this.pageId, 'actionsChanged', { - actions, - reserve, - callbackId - }); - } - createLinearGradient (x0, y0, x1, y1) { - return new CanvasGradient('linear', [x0, y0, x1, y1]) - } - createCircularGradient (x, y, r) { - return new CanvasGradient('radial', [x, y, r]) - } - createPattern (image, repetition) { - if (undefined === repetition) { - console.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present."); - } else if (['repeat', 'repeat-x', 'repeat-y', 'no-repeat'].indexOf(repetition) < 0) { - console.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('" + repetition + "') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'."); - } else { - return new Pattern(image, repetition) - } - } - // TODO - measureText (text) { - if (typeof document === 'object') { - var c2d = getTempCanvas().getContext('2d'); - c2d.font = this.state.font; - return new TextMetrics(c2d.measureText(text).width || 0) - } else { - return new TextMetrics(0) - } - } - save () { - this.actions.push({ - method: 'save', - data: [] - }); - this.drawingState.push(this.state); - } - restore () { - 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' - }; - } - beginPath () { - this.path = []; - this.subpath = []; - } - moveTo (x, y) { - this.path.push({ - method: 'moveTo', - data: [x, y] - }); - this.subpath = [ - [x, y] - ]; - } - lineTo (x, y) { - if (this.path.length === 0 && this.subpath.length === 0) { - this.path.push({ - method: 'moveTo', - data: [x, y] - }); - } else { - this.path.push({ - method: 'lineTo', - data: [x, y] - }); - } - this.subpath.push([x, y]); - } - quadraticCurveTo (cpx, cpy, x, y) { - this.path.push({ - method: 'quadraticCurveTo', - data: [cpx, cpy, x, y] - }); - this.subpath.push([x, y]); - } - bezierCurveTo (cp1x, cp1y, cp2x, cp2y, x, y) { - this.path.push({ - method: 'bezierCurveTo', - data: [cp1x, cp1y, cp2x, cp2y, x, y] - }); - this.subpath.push([x, y]); - } - arc (x, y, r, sAngle, eAngle, counterclockwise = false) { - this.path.push({ - method: 'arc', - data: [x, y, r, sAngle, eAngle, counterclockwise] - }); - this.subpath.push([x, y]); - } - rect (x, y, width, height) { - this.path.push({ - method: 'rect', - data: [x, y, width, height] - }); - this.subpath = [ - [x, y] - ]; - } - arcTo (x1, y1, x2, y2, radius) { - this.path.push({ - method: 'arcTo', - data: [x1, y1, x2, y2, radius] - }); - this.subpath.push([x2, y2]); - } - clip () { - this.actions.push({ - method: 'clip', - data: [...this.path] - }); - } - closePath () { - this.path.push({ - method: 'closePath', - data: [] - }); - if (this.subpath.length) { - this.subpath = [this.subpath.shift()]; - } - } - clearActions () { - this.actions = []; - this.path = []; - this.subpath = []; - } - getActions () { - var actions = [...this.actions]; - this.clearActions(); - return actions - } - set lineDashOffset (value) { - this.actions.push({ - method: 'setLineDashOffset', - data: [value] - }); - } - set globalCompositeOperation (type) { - this.actions.push({ - method: 'setGlobalCompositeOperation', - data: [type] - }); - } - set shadowBlur (level) { - this.actions.push({ - method: 'setShadowBlur', - data: [level] - }); - } - set shadowColor (color) { - this.actions.push({ - method: 'setShadowColor', - data: [color] - }); - } - set shadowOffsetX (x) { - this.actions.push({ - method: 'setShadowOffsetX', - data: [x] - }); - } - set shadowOffsetY (y) { - this.actions.push({ - method: 'setShadowOffsetY', - data: [y] - }); - } - set font (value) { - var self = this; - this.state.font = value; - // eslint-disable-next-line - var fontFormat = value.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/); - if (fontFormat) { - var style = fontFormat[1].trim().split(/\s/); - var fontSize = parseFloat(fontFormat[3]); - var fontFamily = fontFormat[7]; - var actions = []; - style.forEach(function (value, index) { - if (['italic', 'oblique', 'normal'].indexOf(value) > -1) { - actions.push({ - method: 'setFontStyle', - data: [value] - }); - self.state.fontStyle = value; - } else if (['bold', 'normal'].indexOf(value) > -1) { - actions.push({ - method: 'setFontWeight', - data: [value] - }); - self.state.fontWeight = value; - } else if (index === 0) { - actions.push({ - method: 'setFontStyle', - data: ['normal'] - }); - self.state.fontStyle = 'normal'; - } else if (index === 1) { - pushAction(); - } - }); - if (style.length === 1) { - pushAction(); - } - style = actions.map(function (action) { - return action.data[0] - }).join(' '); - this.state.fontSize = fontSize; - this.state.fontFamily = fontFamily; - this.actions.push({ - method: 'setFont', - data: [`${style} ${fontSize}px ${fontFamily}`] - }); - } else { - console.warn("Failed to set 'font' on 'CanvasContext': invalid format."); - } - function pushAction () { - actions.push({ - method: 'setFontWeight', - data: ['normal'] - }); - self.state.fontWeight = 'normal'; - } - } - get font () { - return this.state.font - } - set fillStyle (color) { - this.setFillStyle(color); - } - set strokeStyle (color) { - this.setStrokeStyle(color); - } - set globalAlpha (value) { - value = Math.floor(255 * parseFloat(value)); - this.actions.push({ - method: 'setGlobalAlpha', - data: [value] - }); - } - set textAlign (align) { - this.actions.push({ - method: 'setTextAlign', - data: [align] - }); - } - set lineCap (type) { - this.actions.push({ - method: 'setLineCap', - data: [type] - }); - } - set lineJoin (type) { - this.actions.push({ - method: 'setLineJoin', - data: [type] - }); - } - set lineWidth (value) { - this.actions.push({ - method: 'setLineWidth', - data: [value] - }); - } - set miterLimit (value) { - this.actions.push({ - method: 'setMiterLimit', - data: [value] - }); - } - set textBaseline (type) { - this.actions.push({ - method: 'setTextBaseline', - data: [type] - }); - } - } - - [...methods1, ...methods2].forEach(function (method) { - function get (method) { - switch (method) { - case 'fill': - case 'stroke': - return function () { - this.actions.push({ - method: method + 'Path', - data: [...this.path] - }); - } - case 'fillRect': - return function (x, y, width, height) { - this.actions.push({ - method: 'fillPath', - data: [{ - method: 'rect', - data: [x, y, width, height] - }] - }); - } - case 'strokeRect': - return function (x, y, width, height) { - this.actions.push({ - method: 'strokePath', - data: [{ - method: 'rect', - data: [x, y, width, height] - }] - }); - } - case 'fillText': - case 'strokeText': - return function (text, x, y, maxWidth) { - var data = [text.toString(), x, y]; - if (typeof maxWidth === 'number') { - data.push(maxWidth); - } - this.actions.push({ - method, - data - }); - } - case 'drawImage': - return function (imageResource, dx, dy, dWidth, dHeight, sx, sy, sWidth, sHeight) { - if (sHeight === undefined) { - sx = dx; - sy = dy; - sWidth = dWidth; - sHeight = dHeight; - dx = undefined; - dy = undefined; - dWidth = undefined; - dHeight = undefined; - } - var data; - function isNumber (e) { - return typeof e === 'number' - } - data = isNumber(dx) && isNumber(dy) && isNumber(dWidth) && isNumber(dHeight) ? [imageResource, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight] : isNumber(sWidth) && isNumber( - sHeight) ? [imageResource, sx, sy, sWidth, sHeight] : [imageResource, sx, sy]; - this.actions.push({ - method, - data - }); - } - default: - return function (...data) { - this.actions.push({ - method, - data - }); - } - } - } - CanvasContext.prototype[method] = get(method); - }); - methods3.forEach(function (method) { - function get (method) { - switch (method) { - case 'setFillStyle': - case 'setStrokeStyle': - return function (color) { - if (typeof color !== 'object') { - this.actions.push({ - method, - data: ['normal', checkColor(color)] - }); - } else { - this.actions.push({ - method, - data: [color.type, color.data, color.colorStop] - }); - } - } - case 'setGlobalAlpha': - return function (alpha) { - alpha = Math.floor(255 * parseFloat(alpha)); - this.actions.push({ - method, - data: [alpha] - }); - } - case 'setShadow': - return function (offsetX, offsetY, blur, color) { - color = checkColor(color); - this.actions.push({ - method, - data: [offsetX, offsetY, blur, color] - }); - this.state.shadowBlur = blur; - this.state.shadowColor = color; - this.state.shadowOffsetX = offsetX; - this.state.shadowOffsetY = offsetY; - } - case 'setLineDash': - return function (pattern, offset) { - pattern = pattern || [0, 0]; - offset = offset || 0; - this.actions.push({ - method, - data: [pattern, offset] - }); - this.state.lineDash = pattern; - } - case 'setFontSize': - return function (fontSize) { - this.state.font = this.state.font.replace(/\d+\.?\d*px/, fontSize + 'px'); - this.state.fontSize = fontSize; - this.actions.push({ - method, - data: [fontSize] - }); - } - default: - return function (...data) { - this.actions.push({ - method, - data - }); - } - } - } - CanvasContext.prototype[method] = get(method); - }); - - function createCanvasContext$1 (id, context) { - if (context) { - return new CanvasContext(id, context.$page.id) - } - const pageId = getCurrentPageId(); - if (pageId) { - return new CanvasContext(id, pageId) - } else { - UniServiceJSBridge.emit('onError', 'createCanvasContext:fail'); - } - } - - function canvasGetImageData$1 ({ - canvasId, - x, - y, - width, - height - }, callbackId) { - var pageId = getCurrentPageId(); - if (!pageId) { - invoke$1(callbackId, { - errMsg: 'canvasGetImageData:fail' - }); - return - } - var cId = canvasEventCallbacks.push(function (data) { - var imgData = data.data; - if (imgData && imgData.length) { - data.data = new Uint8ClampedArray(imgData); - } - invoke$1(callbackId, data); - }); - operateCanvas(canvasId, pageId, 'getImageData', { - x, - y, - width, - height, - callbackId: cId - }); - } - - function canvasPutImageData$1 ({ - canvasId, - data, - x, - y, - width, - height - }, callbackId) { - var pageId = getCurrentPageId(); - if (!pageId) { - invoke$1(callbackId, { - errMsg: 'canvasPutImageData:fail' - }); - return - } - var cId = canvasEventCallbacks.push(function (data) { - invoke$1(callbackId, data); - }); - operateCanvas(canvasId, pageId, 'putImageData', { - data: [...data], - x, - y, - width, - height, - callbackId: cId - }); - } - - function canvasToTempFilePath$1 ({ - x = 0, - y = 0, - width, - height, - destWidth, - destHeight, - canvasId, - fileType, - qualit - }, callbackId) { - var pageId = getCurrentPageId(); - if (!pageId) { - invoke$1(callbackId, { - errMsg: 'canvasToTempFilePath:fail' - }); - return - } - const cId = canvasEventCallbacks.push(function ({ - base64 - }) { - if (!base64 || !base64.length) { - invoke$1(callbackId, { - errMsg: 'canvasToTempFilePath:fail' - }); - } - invokeMethod('base64ToTempFilePath', { - base64Data: base64, - x, - y, - width, - height, - destWidth, - destHeight, - canvasId, - fileType, - qualit - }, callbackId); - }); - operateCanvas(canvasId, pageId, 'getDataUrl', { - x, - y, - width, - height, - destWidth, - destHeight, - hidpi: false, - fileType, - qualit, - callbackId: cId - }); + const canvasEventCallbacks = createCallbacks('canvasEvent'); + + UniServiceJSBridge.subscribe('onDrawCanvas', ({ + callbackId, + data + }) => { + const callback = canvasEventCallbacks.pop(callbackId); + if (callback) { + callback(data); + } + }); + + UniServiceJSBridge.subscribe('onCanvasMethodCallback', ({ + callbackId, + data + }) => { + const callback = canvasEventCallbacks.pop(callbackId); + if (callback) { + callback(data); + } + }); + + function operateCanvas (canvasId, pageId, type, data) { + UniServiceJSBridge.publishHandler(pageId + '-canvas-' + canvasId, { + canvasId, + type, + data + }, pageId); + } + + const predefinedColor = { + aliceblue: '#f0f8ff', + antiquewhite: '#faebd7', + aqua: '#00ffff', + aquamarine: '#7fffd4', + azure: '#f0ffff', + beige: '#f5f5dc', + bisque: '#ffe4c4', + black: '#000000', + blanchedalmond: '#ffebcd', + blue: '#0000ff', + blueviolet: '#8a2be2', + brown: '#a52a2a', + burlywood: '#deb887', + cadetblue: '#5f9ea0', + chartreuse: '#7fff00', + chocolate: '#d2691e', + coral: '#ff7f50', + cornflowerblue: '#6495ed', + cornsilk: '#fff8dc', + crimson: '#dc143c', + cyan: '#00ffff', + darkblue: '#00008b', + darkcyan: '#008b8b', + darkgoldenrod: '#b8860b', + darkgray: '#a9a9a9', + darkgrey: '#a9a9a9', + darkgreen: '#006400', + darkkhaki: '#bdb76b', + darkmagenta: '#8b008b', + darkolivegreen: '#556b2f', + darkorange: '#ff8c00', + darkorchid: '#9932cc', + darkred: '#8b0000', + darksalmon: '#e9967a', + darkseagreen: '#8fbc8f', + darkslateblue: '#483d8b', + darkslategray: '#2f4f4f', + darkslategrey: '#2f4f4f', + darkturquoise: '#00ced1', + darkviolet: '#9400d3', + deeppink: '#ff1493', + deepskyblue: '#00bfff', + dimgray: '#696969', + dimgrey: '#696969', + dodgerblue: '#1e90ff', + firebrick: '#b22222', + floralwhite: '#fffaf0', + forestgreen: '#228b22', + fuchsia: '#ff00ff', + gainsboro: '#dcdcdc', + ghostwhite: '#f8f8ff', + gold: '#ffd700', + goldenrod: '#daa520', + gray: '#808080', + grey: '#808080', + green: '#008000', + greenyellow: '#adff2f', + honeydew: '#f0fff0', + hotpink: '#ff69b4', + indianred: '#cd5c5c', + indigo: '#4b0082', + ivory: '#fffff0', + khaki: '#f0e68c', + lavender: '#e6e6fa', + lavenderblush: '#fff0f5', + lawngreen: '#7cfc00', + lemonchiffon: '#fffacd', + lightblue: '#add8e6', + lightcoral: '#f08080', + lightcyan: '#e0ffff', + lightgoldenrodyellow: '#fafad2', + lightgray: '#d3d3d3', + lightgrey: '#d3d3d3', + lightgreen: '#90ee90', + lightpink: '#ffb6c1', + lightsalmon: '#ffa07a', + lightseagreen: '#20b2aa', + lightskyblue: '#87cefa', + lightslategray: '#778899', + lightslategrey: '#778899', + lightsteelblue: '#b0c4de', + lightyellow: '#ffffe0', + lime: '#00ff00', + limegreen: '#32cd32', + linen: '#faf0e6', + magenta: '#ff00ff', + maroon: '#800000', + mediumaquamarine: '#66cdaa', + mediumblue: '#0000cd', + mediumorchid: '#ba55d3', + mediumpurple: '#9370db', + mediumseagreen: '#3cb371', + mediumslateblue: '#7b68ee', + mediumspringgreen: '#00fa9a', + mediumturquoise: '#48d1cc', + mediumvioletred: '#c71585', + midnightblue: '#191970', + mintcream: '#f5fffa', + mistyrose: '#ffe4e1', + moccasin: '#ffe4b5', + navajowhite: '#ffdead', + navy: '#000080', + oldlace: '#fdf5e6', + olive: '#808000', + olivedrab: '#6b8e23', + orange: '#ffa500', + orangered: '#ff4500', + orchid: '#da70d6', + palegoldenrod: '#eee8aa', + palegreen: '#98fb98', + paleturquoise: '#afeeee', + palevioletred: '#db7093', + papayawhip: '#ffefd5', + peachpuff: '#ffdab9', + peru: '#cd853f', + pink: '#ffc0cb', + plum: '#dda0dd', + powderblue: '#b0e0e6', + purple: '#800080', + rebeccapurple: '#663399', + red: '#ff0000', + rosybrown: '#bc8f8f', + royalblue: '#4169e1', + saddlebrown: '#8b4513', + salmon: '#fa8072', + sandybrown: '#f4a460', + seagreen: '#2e8b57', + seashell: '#fff5ee', + sienna: '#a0522d', + silver: '#c0c0c0', + skyblue: '#87ceeb', + slateblue: '#6a5acd', + slategray: '#708090', + slategrey: '#708090', + snow: '#fffafa', + springgreen: '#00ff7f', + steelblue: '#4682b4', + tan: '#d2b48c', + teal: '#008080', + thistle: '#d8bfd8', + tomato: '#ff6347', + turquoise: '#40e0d0', + violet: '#ee82ee', + wheat: '#f5deb3', + white: '#ffffff', + whitesmoke: '#f5f5f5', + yellow: '#ffff00', + yellowgreen: '#9acd32', + transparent: '#00000000' + }; + + function checkColor (e) { + var t = null; + if ((t = /^#([0-9|A-F|a-f]{6})$/.exec(e)) != null) { + let n = parseInt(t[1].slice(0, 2), 16); + let o = parseInt(t[1].slice(2, 4), 16); + let r = parseInt(t[1].slice(4), 16); + return [n, o, r, 255] + } + if ((t = /^#([0-9|A-F|a-f]{3})$/.exec(e)) != null) { + let n = t[1].slice(0, 1); + let o = t[1].slice(1, 2); + let r = t[1].slice(2, 3); + n = parseInt(n + n, 16); + o = parseInt(o + o, 16); + r = parseInt(r + r, 16); + return [n, o, r, 255] + } + if ((t = /^rgb\((.+)\)$/.exec(e)) != null) { + return t[1].split(',').map(function (e) { + return Math.min(255, parseInt(e.trim())) + }).concat(255) + } + if ((t = /^rgba\((.+)\)$/.exec(e)) != null) { + return t[1].split(',').map(function (e, t) { + return t === 3 ? Math.floor(255 * parseFloat(e.trim())) : Math.min(255, parseInt(e.trim())) + }) + } + var i = e.toLowerCase(); + if (predefinedColor.hasOwnProperty(i)) { + t = /^#([0-9|A-F|a-f]{6,8})$/.exec(predefinedColor[i]); + let n = parseInt(t[1].slice(0, 2), 16); + let o = parseInt(t[1].slice(2, 4), 16); + let r = parseInt(t[1].slice(4, 6), 16); + let a = parseInt(t[1].slice(6, 8), 16); + a = a >= 0 ? a : 255; + return [n, o, r, a] + } + console.group('非法颜色: ' + e); + console.error('不支持颜色:' + e); + console.groupEnd(); + return [0, 0, 0, 255] + } + + function Pattern (image, repetition) { + this.image = image; + this.repetition = repetition; + } + + class CanvasGradient { + constructor (type, data) { + this.type = type; + this.data = data; + this.colorStop = []; + } + addColorStop (position, color) { + this.colorStop.push([position, checkColor(color)]); + } + } + var methods1 = ['scale', 'rotate', 'translate', 'setTransform', 'transform']; + var methods2 = ['drawImage', 'fillText', 'fill', 'stroke', 'fillRect', 'strokeRect', 'clearRect', + 'strokeText' + ]; + var methods3 = ['setFillStyle', 'setTextAlign', 'setStrokeStyle', 'setGlobalAlpha', 'setShadow', + 'setFontSize', 'setLineCap', 'setLineJoin', 'setLineWidth', 'setMiterLimit', + 'setTextBaseline', 'setLineDash' + ]; + + var tempCanvas; + function getTempCanvas (width = 0, height = 0) { + if (!tempCanvas) { + tempCanvas = document.createElement('canvas'); + } + tempCanvas.width = width; + tempCanvas.height = height; + return tempCanvas + } + + function TextMetrics (width) { + this.width = width; + } + + class CanvasContext { + constructor (id, pageId) { + this.id = id; + this.pageId = pageId; + 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' + }; + } + draw (reserve = false, callback) { + var actions = [...this.actions]; + this.actions = []; + this.path = []; + var callbackId; + + if (typeof callback === 'function') { + callbackId = canvasEventCallbacks.push(callback); + } + + operateCanvas(this.id, this.pageId, 'actionsChanged', { + actions, + reserve, + callbackId + }); + } + createLinearGradient (x0, y0, x1, y1) { + return new CanvasGradient('linear', [x0, y0, x1, y1]) + } + createCircularGradient (x, y, r) { + return new CanvasGradient('radial', [x, y, r]) + } + createPattern (image, repetition) { + if (undefined === repetition) { + console.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present."); + } else if (['repeat', 'repeat-x', 'repeat-y', 'no-repeat'].indexOf(repetition) < 0) { + console.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('" + repetition + "') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'."); + } else { + return new Pattern(image, repetition) + } + } + // TODO + measureText (text) { + if (typeof document === 'object') { + var c2d = getTempCanvas().getContext('2d'); + c2d.font = this.state.font; + return new TextMetrics(c2d.measureText(text).width || 0) + } else { + return new TextMetrics(0) + } + } + save () { + this.actions.push({ + method: 'save', + data: [] + }); + this.drawingState.push(this.state); + } + restore () { + 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' + }; + } + beginPath () { + this.path = []; + this.subpath = []; + } + moveTo (x, y) { + this.path.push({ + method: 'moveTo', + data: [x, y] + }); + this.subpath = [ + [x, y] + ]; + } + lineTo (x, y) { + if (this.path.length === 0 && this.subpath.length === 0) { + this.path.push({ + method: 'moveTo', + data: [x, y] + }); + } else { + this.path.push({ + method: 'lineTo', + data: [x, y] + }); + } + this.subpath.push([x, y]); + } + quadraticCurveTo (cpx, cpy, x, y) { + this.path.push({ + method: 'quadraticCurveTo', + data: [cpx, cpy, x, y] + }); + this.subpath.push([x, y]); + } + bezierCurveTo (cp1x, cp1y, cp2x, cp2y, x, y) { + this.path.push({ + method: 'bezierCurveTo', + data: [cp1x, cp1y, cp2x, cp2y, x, y] + }); + this.subpath.push([x, y]); + } + arc (x, y, r, sAngle, eAngle, counterclockwise = false) { + this.path.push({ + method: 'arc', + data: [x, y, r, sAngle, eAngle, counterclockwise] + }); + this.subpath.push([x, y]); + } + rect (x, y, width, height) { + this.path.push({ + method: 'rect', + data: [x, y, width, height] + }); + this.subpath = [ + [x, y] + ]; + } + arcTo (x1, y1, x2, y2, radius) { + this.path.push({ + method: 'arcTo', + data: [x1, y1, x2, y2, radius] + }); + this.subpath.push([x2, y2]); + } + clip () { + this.actions.push({ + method: 'clip', + data: [...this.path] + }); + } + closePath () { + this.path.push({ + method: 'closePath', + data: [] + }); + if (this.subpath.length) { + this.subpath = [this.subpath.shift()]; + } + } + clearActions () { + this.actions = []; + this.path = []; + this.subpath = []; + } + getActions () { + var actions = [...this.actions]; + this.clearActions(); + return actions + } + set lineDashOffset (value) { + this.actions.push({ + method: 'setLineDashOffset', + data: [value] + }); + } + set globalCompositeOperation (type) { + this.actions.push({ + method: 'setGlobalCompositeOperation', + data: [type] + }); + } + set shadowBlur (level) { + this.actions.push({ + method: 'setShadowBlur', + data: [level] + }); + } + set shadowColor (color) { + this.actions.push({ + method: 'setShadowColor', + data: [color] + }); + } + set shadowOffsetX (x) { + this.actions.push({ + method: 'setShadowOffsetX', + data: [x] + }); + } + set shadowOffsetY (y) { + this.actions.push({ + method: 'setShadowOffsetY', + data: [y] + }); + } + set font (value) { + var self = this; + this.state.font = value; + // eslint-disable-next-line + var fontFormat = value.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/); + if (fontFormat) { + var style = fontFormat[1].trim().split(/\s/); + var fontSize = parseFloat(fontFormat[3]); + var fontFamily = fontFormat[7]; + var actions = []; + style.forEach(function (value, index) { + if (['italic', 'oblique', 'normal'].indexOf(value) > -1) { + actions.push({ + method: 'setFontStyle', + data: [value] + }); + self.state.fontStyle = value; + } else if (['bold', 'normal'].indexOf(value) > -1) { + actions.push({ + method: 'setFontWeight', + data: [value] + }); + self.state.fontWeight = value; + } else if (index === 0) { + actions.push({ + method: 'setFontStyle', + data: ['normal'] + }); + self.state.fontStyle = 'normal'; + } else if (index === 1) { + pushAction(); + } + }); + if (style.length === 1) { + pushAction(); + } + style = actions.map(function (action) { + return action.data[0] + }).join(' '); + this.state.fontSize = fontSize; + this.state.fontFamily = fontFamily; + this.actions.push({ + method: 'setFont', + data: [`${style} ${fontSize}px ${fontFamily}`] + }); + } else { + console.warn("Failed to set 'font' on 'CanvasContext': invalid format."); + } + function pushAction () { + actions.push({ + method: 'setFontWeight', + data: ['normal'] + }); + self.state.fontWeight = 'normal'; + } + } + get font () { + return this.state.font + } + set fillStyle (color) { + this.setFillStyle(color); + } + set strokeStyle (color) { + this.setStrokeStyle(color); + } + set globalAlpha (value) { + value = Math.floor(255 * parseFloat(value)); + this.actions.push({ + method: 'setGlobalAlpha', + data: [value] + }); + } + set textAlign (align) { + this.actions.push({ + method: 'setTextAlign', + data: [align] + }); + } + set lineCap (type) { + this.actions.push({ + method: 'setLineCap', + data: [type] + }); + } + set lineJoin (type) { + this.actions.push({ + method: 'setLineJoin', + data: [type] + }); + } + set lineWidth (value) { + this.actions.push({ + method: 'setLineWidth', + data: [value] + }); + } + set miterLimit (value) { + this.actions.push({ + method: 'setMiterLimit', + data: [value] + }); + } + set textBaseline (type) { + this.actions.push({ + method: 'setTextBaseline', + data: [type] + }); + } + } + + [...methods1, ...methods2].forEach(function (method) { + function get (method) { + switch (method) { + case 'fill': + case 'stroke': + return function () { + this.actions.push({ + method: method + 'Path', + data: [...this.path] + }); + } + case 'fillRect': + return function (x, y, width, height) { + this.actions.push({ + method: 'fillPath', + data: [{ + method: 'rect', + data: [x, y, width, height] + }] + }); + } + case 'strokeRect': + return function (x, y, width, height) { + this.actions.push({ + method: 'strokePath', + data: [{ + method: 'rect', + data: [x, y, width, height] + }] + }); + } + case 'fillText': + case 'strokeText': + return function (text, x, y, maxWidth) { + var data = [text.toString(), x, y]; + if (typeof maxWidth === 'number') { + data.push(maxWidth); + } + this.actions.push({ + method, + data + }); + } + case 'drawImage': + return function (imageResource, dx, dy, dWidth, dHeight, sx, sy, sWidth, sHeight) { + if (sHeight === undefined) { + sx = dx; + sy = dy; + sWidth = dWidth; + sHeight = dHeight; + dx = undefined; + dy = undefined; + dWidth = undefined; + dHeight = undefined; + } + var data; + function isNumber (e) { + return typeof e === 'number' + } + data = isNumber(dx) && isNumber(dy) && isNumber(dWidth) && isNumber(dHeight) ? [imageResource, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight] : isNumber(sWidth) && isNumber( + sHeight) ? [imageResource, sx, sy, sWidth, sHeight] : [imageResource, sx, sy]; + this.actions.push({ + method, + data + }); + } + default: + return function (...data) { + this.actions.push({ + method, + data + }); + } + } + } + CanvasContext.prototype[method] = get(method); + }); + methods3.forEach(function (method) { + function get (method) { + switch (method) { + case 'setFillStyle': + case 'setStrokeStyle': + return function (color) { + if (typeof color !== 'object') { + this.actions.push({ + method, + data: ['normal', checkColor(color)] + }); + } else { + this.actions.push({ + method, + data: [color.type, color.data, color.colorStop] + }); + } + } + case 'setGlobalAlpha': + return function (alpha) { + alpha = Math.floor(255 * parseFloat(alpha)); + this.actions.push({ + method, + data: [alpha] + }); + } + case 'setShadow': + return function (offsetX, offsetY, blur, color) { + color = checkColor(color); + this.actions.push({ + method, + data: [offsetX, offsetY, blur, color] + }); + this.state.shadowBlur = blur; + this.state.shadowColor = color; + this.state.shadowOffsetX = offsetX; + this.state.shadowOffsetY = offsetY; + } + case 'setLineDash': + return function (pattern, offset) { + pattern = pattern || [0, 0]; + offset = offset || 0; + this.actions.push({ + method, + data: [pattern, offset] + }); + this.state.lineDash = pattern; + } + case 'setFontSize': + return function (fontSize) { + this.state.font = this.state.font.replace(/\d+\.?\d*px/, fontSize + 'px'); + this.state.fontSize = fontSize; + this.actions.push({ + method, + data: [fontSize] + }); + } + default: + return function (...data) { + this.actions.push({ + method, + data + }); + } + } + } + CanvasContext.prototype[method] = get(method); + }); + + function createCanvasContext$1 (id, context) { + if (context) { + return new CanvasContext(id, context.$page.id) + } + const pageId = getCurrentPageId(); + if (pageId) { + return new CanvasContext(id, pageId) + } else { + UniServiceJSBridge.emit('onError', 'createCanvasContext:fail'); + } + } + + function canvasGetImageData$1 ({ + canvasId, + x, + y, + width, + height + }, callbackId) { + var pageId = getCurrentPageId(); + if (!pageId) { + invoke$1(callbackId, { + errMsg: 'canvasGetImageData:fail' + }); + return + } + var cId = canvasEventCallbacks.push(function (data) { + var imgData = data.data; + if (imgData && imgData.length) { + data.data = new Uint8ClampedArray(imgData); + } + invoke$1(callbackId, data); + }); + operateCanvas(canvasId, pageId, 'getImageData', { + x, + y, + width, + height, + callbackId: cId + }); + } + + function canvasPutImageData$1 ({ + canvasId, + data, + x, + y, + width, + height + }, callbackId) { + var pageId = getCurrentPageId(); + if (!pageId) { + invoke$1(callbackId, { + errMsg: 'canvasPutImageData:fail' + }); + return + } + var cId = canvasEventCallbacks.push(function (data) { + invoke$1(callbackId, data); + }); + operateCanvas(canvasId, pageId, 'putImageData', { + data: [...data], + x, + y, + width, + height, + callbackId: cId + }); + } + + function canvasToTempFilePath$1 ({ + x = 0, + y = 0, + width, + height, + destWidth, + destHeight, + canvasId, + fileType, + qualit + }, callbackId) { + var pageId = getCurrentPageId(); + if (!pageId) { + invoke$1(callbackId, { + errMsg: 'canvasToTempFilePath:fail' + }); + return + } + const cId = canvasEventCallbacks.push(function ({ + base64 + }) { + if (!base64 || !base64.length) { + invoke$1(callbackId, { + errMsg: 'canvasToTempFilePath:fail' + }); + } + invokeMethod('base64ToTempFilePath', { + base64Data: base64, + x, + y, + width, + height, + destWidth, + destHeight, + canvasId, + fileType, + qualit + }, callbackId); + }); + operateCanvas(canvasId, pageId, 'getDataUrl', { + x, + y, + width, + height, + destWidth, + destHeight, + hidpi: false, + fileType, + qualit, + callbackId: cId + }); } var require_context_module_1_6 = /*#__PURE__*/Object.freeze({ @@ -10268,45 +10360,45 @@ var serviceContext = (function () { createVideoContext: createVideoContext$1 }); - function operateEditor (componentId, pageId, type, data) { - UniServiceJSBridge.publishHandler(pageId + '-editor-' + componentId, { - componentId, - type, - data - }, pageId); - } - - UniServiceJSBridge.subscribe('onEditorMethodCallback', ({ - callbackId, - data - }) => { - callback.invoke(callbackId, data); - }); - - const methods$1 = ['insertDivider', 'insertImage', 'insertText', 'setContents', 'getContents', 'clear', 'removeFormat', 'undo', 'redo']; - - class EditorContext { - constructor (id, pageId) { - this.id = id; - this.pageId = pageId; - } - format (name, value) { - operateEditor(this.id, this.pageId, 'format', { - options: { - name, - value - } - }); - } - } - - methods$1.forEach(function (method) { - EditorContext.prototype[method] = callback.warp(function (options, callbackId) { - operateEditor(this.id, this.pageId, method, { - options, - callbackId - }); - }); + function operateEditor (componentId, pageId, type, data) { + UniServiceJSBridge.publishHandler(pageId + '-editor-' + componentId, { + componentId, + type, + data + }, pageId); + } + + UniServiceJSBridge.subscribe('onEditorMethodCallback', ({ + callbackId, + data + }) => { + callback.invoke(callbackId, data); + }); + + const methods$1 = ['insertDivider', 'insertImage', 'insertText', 'setContents', 'getContents', 'clear', 'removeFormat', 'undo', 'redo']; + + class EditorContext { + constructor (id, pageId) { + this.id = id; + this.pageId = pageId; + } + format (name, value) { + operateEditor(this.id, this.pageId, 'format', { + options: { + name, + value + } + }); + } + } + + methods$1.forEach(function (method) { + EditorContext.prototype[method] = callback.warp(function (options, callbackId) { + operateEditor(this.id, this.pageId, method, { + options, + callbackId + }); + }); }); var require_context_module_1_9 = /*#__PURE__*/Object.freeze({ @@ -10450,77 +10542,77 @@ var serviceContext = (function () { onNetworkStatusChange: onNetworkStatusChange }); - const callbacks$8 = { - pause: [], - resume: [], - start: [], - stop: [], - error: [] - }; - - class RecorderManager { - constructor () { - onMethod('onRecorderStateChange', res => { - const state = res.state; - delete res.state; - delete res.errMsg; - callbacks$8[state].forEach(callback => { - if (typeof callback === 'function') { - callback(res); - } - }); - }); - } - onError (callback) { - callbacks$8.error.push(callback); - } - onFrameRecorded (callback) { - - } - onInterruptionBegin (callback) { - - } - onInterruptionEnd (callback) { - - } - onPause (callback) { - callbacks$8.pause.push(callback); - } - onResume (callback) { - callbacks$8.resume.push(callback); - } - onStart (callback) { - callbacks$8.start.push(callback); - } - onStop (callback) { - callbacks$8.stop.push(callback); - } - pause () { - invokeMethod('operateRecorder', { - operationType: 'pause' - }); - } - resume () { - invokeMethod('operateRecorder', { - operationType: 'resume' - }); - } - start (options) { - invokeMethod('operateRecorder', Object.assign({}, options, { - operationType: 'start' - })); - } - stop () { - invokeMethod('operateRecorder', { - operationType: 'stop' - }); - } - } - - let recorderManager; - - function getRecorderManager () { - return recorderManager || (recorderManager = new RecorderManager()) + const callbacks$8 = { + pause: [], + resume: [], + start: [], + stop: [], + error: [] + }; + + class RecorderManager { + constructor () { + onMethod('onRecorderStateChange', res => { + const state = res.state; + delete res.state; + delete res.errMsg; + callbacks$8[state].forEach(callback => { + if (typeof callback === 'function') { + callback(res); + } + }); + }); + } + onError (callback) { + callbacks$8.error.push(callback); + } + onFrameRecorded (callback) { + + } + onInterruptionBegin (callback) { + + } + onInterruptionEnd (callback) { + + } + onPause (callback) { + callbacks$8.pause.push(callback); + } + onResume (callback) { + callbacks$8.resume.push(callback); + } + onStart (callback) { + callbacks$8.start.push(callback); + } + onStop (callback) { + callbacks$8.stop.push(callback); + } + pause () { + invokeMethod('operateRecorder', { + operationType: 'pause' + }); + } + resume () { + invokeMethod('operateRecorder', { + operationType: 'resume' + }); + } + start (options) { + invokeMethod('operateRecorder', Object.assign({}, options, { + operationType: 'start' + })); + } + stop () { + invokeMethod('operateRecorder', { + operationType: 'stop' + }); + } + } + + let recorderManager; + + function getRecorderManager () { + return recorderManager || (recorderManager = new RecorderManager()) } var require_context_module_1_14 = /*#__PURE__*/Object.freeze({ @@ -10996,6 +11088,23 @@ var serviceContext = (function () { const STORAGE_DATA_TYPE = '__TYPE'; const STORAGE_KEYS = 'uni-storage-keys'; + function parseValue (value) { + const types = ['object', 'string', 'number', 'boolean', 'undefined']; + try { + const object = typeof value === 'string' ? JSON.parse(value) : value; + const type = object.type; + if (types.indexOf(type) >= 0) { + const keys = Object.keys(object); + // eslint-disable-next-line valid-typeof + if (keys.length === 2 && 'data' in object && typeof object.data === type) { + return object.data + } else if (keys.length === 1) { + return '' + } + } + } catch (error) { } + } + function setStorage$1 ({ key, data @@ -11006,6 +11115,11 @@ var serviceContext = (function () { data: data }); try { + if (type === 'string' && parseValue(value) !== undefined) { + localStorage.setItem(key + STORAGE_DATA_TYPE, type); + } else { + localStorage.removeItem(key + STORAGE_DATA_TYPE); + } localStorage.setItem(key, value); } catch (error) { return { @@ -11035,22 +11149,26 @@ var serviceContext = (function () { } } let data = value; - try { - const object = JSON.parse(value); - // 兼容App端历史格式 - const type = localStorage.getItem(key + STORAGE_DATA_TYPE); - if (!type) { - const keys = Object.keys(object); - if (keys.length === 2 && 'type' in object && 'data' in object) { - data = object.data; - } else if (keys.length === 1 && 'type' in object) { - data = ''; + const typeOrigin = localStorage.getItem(key + STORAGE_DATA_TYPE) || ''; + const type = typeOrigin.toLowerCase(); + if (type !== 'string' || (typeOrigin === 'String' && value === '{"type":"undefined"}')) { + try { + // 兼容H5和V3初期历史格式 + let object = JSON.parse(value); + const result = parseValue(object); + if (result !== undefined) { + data = result; + } else if (type) { + // 兼容App端历史格式 + data = object; + if (typeof object === 'string') { + object = JSON.parse(object); + // eslint-disable-next-line valid-typeof + data = typeof object === (type === 'null' ? 'object' : type) ? object : data; + } } - } else if (type !== 'String') { - data = object; - data = typeof data === 'string' ? JSON.parse(data) : data; - } - } catch (error) { } + } catch (error) { } + } return { data, errMsg: 'getStorage:ok' @@ -11134,82 +11252,82 @@ var serviceContext = (function () { getStorageInfoSync: getStorageInfoSync }); - const defaultOption = { - duration: 400, - timingFunction: 'linear', - delay: 0, - transformOrigin: '50% 50% 0' - }; - - class MPAnimation { - constructor (option) { - this.actions = []; - this.currentTransform = {}; - this.currentStepAnimates = []; - this.option = Object.assign({}, defaultOption, option); - } - _getOption (option) { - let _option = { - transition: Object.assign({}, this.option, option) - }; - _option.transformOrigin = _option.transition.transformOrigin; - delete _option.transition.transformOrigin; - return _option - } - _pushAnimates (type, args) { - this.currentStepAnimates.push({ - type: type, - args: args - }); - } - _converType (type) { - return type.replace(/[A-Z]/g, text => { - return `-${text.toLowerCase()}` - }) - } - _getValue (value) { - return typeof value === 'number' ? `${value}px` : value - } - export () { - const actions = this.actions; - this.actions = []; - return { - actions - } - } - step (option) { - this.currentStepAnimates.forEach(animate => { - if (animate.type !== 'style') { - this.currentTransform[animate.type] = animate; - } else { - this.currentTransform[`${animate.type}.${animate.args[0]}`] = animate; - } - }); - this.actions.push({ - animates: Object.values(this.currentTransform), - option: this._getOption(option) - }); - this.currentStepAnimates = []; - return this - } - } - - const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ']; - const animateTypes2 = ['opacity', 'backgroundColor']; - const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']; - animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { - MPAnimation.prototype[type] = function (...args) { - if (animateTypes2.concat(animateTypes3).includes(type)) { - this._pushAnimates('style', [this._converType(type), animateTypes3.includes(type) ? this._getValue(args[0]) : args[0]]); - } else { - this._pushAnimates(type, args); - } - return this - }; - }); - - function createAnimation (option) { - return new MPAnimation(option) + const defaultOption = { + duration: 400, + timingFunction: 'linear', + delay: 0, + transformOrigin: '50% 50% 0' + }; + + class MPAnimation { + constructor (option) { + this.actions = []; + this.currentTransform = {}; + this.currentStepAnimates = []; + this.option = Object.assign({}, defaultOption, option); + } + _getOption (option) { + let _option = { + transition: Object.assign({}, this.option, option) + }; + _option.transformOrigin = _option.transition.transformOrigin; + delete _option.transition.transformOrigin; + return _option + } + _pushAnimates (type, args) { + this.currentStepAnimates.push({ + type: type, + args: args + }); + } + _converType (type) { + return type.replace(/[A-Z]/g, text => { + return `-${text.toLowerCase()}` + }) + } + _getValue (value) { + return typeof value === 'number' ? `${value}px` : value + } + export () { + const actions = this.actions; + this.actions = []; + return { + actions + } + } + step (option) { + this.currentStepAnimates.forEach(animate => { + if (animate.type !== 'style') { + this.currentTransform[animate.type] = animate; + } else { + this.currentTransform[`${animate.type}.${animate.args[0]}`] = animate; + } + }); + this.actions.push({ + animates: Object.values(this.currentTransform), + option: this._getOption(option) + }); + this.currentStepAnimates = []; + return this + } + } + + const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ']; + const animateTypes2 = ['opacity', 'backgroundColor']; + const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']; + animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function (...args) { + if (animateTypes2.concat(animateTypes3).includes(type)) { + this._pushAnimates('style', [this._converType(type), animateTypes3.includes(type) ? this._getValue(args[0]) : args[0]]); + } else { + this._pushAnimates(type, args); + } + return this + }; + }); + + function createAnimation (option) { + return new MPAnimation(option) } var require_context_module_1_20 = /*#__PURE__*/Object.freeze({ @@ -11440,24 +11558,24 @@ var serviceContext = (function () { onKeyboardHeightChange: onKeyboardHeightChange }); - UniServiceJSBridge.subscribe('onLoadFontFaceCallback', ({ - callbackId, - data - }) => { - invoke$1(callbackId, data); - }); - - function loadFontFace$1 (options, callbackId) { - const pageId = getCurrentPageId(); - if (!pageId) { - return { - errMsg: 'loadFontFace:fail not font page' - } - } - UniServiceJSBridge.publishHandler('loadFontFace', { - options, - callbackId - }, pageId); + UniServiceJSBridge.subscribe('onLoadFontFaceCallback', ({ + callbackId, + data + }) => { + invoke$1(callbackId, data); + }); + + function loadFontFace$1 (options, callbackId) { + const pageId = getCurrentPageId(); + if (!pageId) { + return { + errMsg: 'loadFontFace:fail not font page' + } + } + UniServiceJSBridge.publishHandler('loadFontFace', { + options, + callbackId + }, pageId); } var require_context_module_1_24 = /*#__PURE__*/Object.freeze({ @@ -11930,21 +12048,21 @@ var serviceContext = (function () { vm[method] && vm[method](args); } - function findPage (pageId) { - pageId = parseInt(pageId); - const page = getCurrentPages(true).find(page => page.$page.id === pageId); - if (!page) { - return console.error(`Page[${pageId}] not found`) - } - return page - } - function onWebviewInserted (data, pageId) { - const page = findPage(pageId); - page && (page.__uniapp_webview = true); - } - function onWebviewRemoved (data, pageId) { - const page = findPage(pageId); - page && (delete page.__uniapp_webview); + function findPage (pageId) { + pageId = parseInt(pageId); + const page = getCurrentPages(true).find(page => page.$page.id === pageId); + if (!page) { + return console.error(`Page[${pageId}] not found`) + } + return page + } + function onWebviewInserted (data, pageId) { + const page = findPage(pageId); + page && (page.__uniapp_webview = true); + } + function onWebviewRemoved (data, pageId) { + const page = findPage(pageId); + page && (delete page.__uniapp_webview); } function initSubscribeHandlers () { @@ -12339,54 +12457,54 @@ var serviceContext = (function () { }; } - const isAndroid = plus.os.name.toLowerCase() === 'android'; - const FOCUS_TIMEOUT = isAndroid ? 300 : 700; - const HIDE_TIMEOUT = 800; - let keyboardHeight = 0; - let onKeyboardShow; - let focusTimer; - let hideKeyboardTimeout; - - function hookKeyboardEvent (event, callback) { - onKeyboardShow = null; - focusTimer && clearTimeout(focusTimer); - if (event.type === 'focus') { - if (keyboardHeight > 0) { - event.detail.height = keyboardHeight; - } else { - focusTimer = setTimeout(function () { - event.detail.height = keyboardHeight; - callback(event); - }, FOCUS_TIMEOUT); - onKeyboardShow = function () { - clearTimeout(focusTimer); - event.detail.height = keyboardHeight; - callback(event); - }; - return - } - } - callback(event); - } - - onMethod('onKeyboardHeightChange', res => { - keyboardHeight = res.height; - if (keyboardHeight > 0) { - onKeyboardShow && onKeyboardShow(); - if (hideKeyboardTimeout) { - clearTimeout(hideKeyboardTimeout); - hideKeyboardTimeout = null; - } - } else { - // 安卓/iOS13收起键盘时通知view层失去焦点 - if (isAndroid || parseInt(plus.os.version) >= 13) { - hideKeyboardTimeout = setTimeout(function () { - hideKeyboardTimeout = null; - var pageId = getCurrentPageId(); - UniServiceJSBridge.publishHandler('hideKeyboard', {}, pageId); - }, HIDE_TIMEOUT); - } - } + const isAndroid = plus.os.name.toLowerCase() === 'android'; + const FOCUS_TIMEOUT = isAndroid ? 300 : 700; + const HIDE_TIMEOUT = 800; + let keyboardHeight = 0; + let onKeyboardShow; + let focusTimer; + let hideKeyboardTimeout; + + function hookKeyboardEvent (event, callback) { + onKeyboardShow = null; + focusTimer && clearTimeout(focusTimer); + if (event.type === 'focus') { + if (keyboardHeight > 0) { + event.detail.height = keyboardHeight; + } else { + focusTimer = setTimeout(function () { + event.detail.height = keyboardHeight; + callback(event); + }, FOCUS_TIMEOUT); + onKeyboardShow = function () { + clearTimeout(focusTimer); + event.detail.height = keyboardHeight; + callback(event); + }; + return + } + } + callback(event); + } + + onMethod('onKeyboardHeightChange', res => { + keyboardHeight = res.height; + if (keyboardHeight > 0) { + onKeyboardShow && onKeyboardShow(); + if (hideKeyboardTimeout) { + clearTimeout(hideKeyboardTimeout); + hideKeyboardTimeout = null; + } + } else { + // 安卓/iOS13收起键盘时通知view层失去焦点 + if (isAndroid || parseInt(plus.os.version) >= 13) { + hideKeyboardTimeout = setTimeout(function () { + hideKeyboardTimeout = null; + var pageId = getCurrentPageId(); + UniServiceJSBridge.publishHandler('hideKeyboard', {}, pageId); + }, HIDE_TIMEOUT); + } + } }); function parseComponentCreateOptions (vm) { diff --git a/packages/uni-app-plus/dist/view.umd.min.js b/packages/uni-app-plus/dist/view.umd.min.js index b8a72f36e17cfff91531d3e79bac2732ef9efba0..1db4d65dd4fd26e5ec6ed981f0d989a617c57a85 100644 --- a/packages/uni-app-plus/dist/view.umd.min.js +++ b/packages/uni-app-plus/dist/view.umd.min.js @@ -1,4 +1,4 @@ -(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["uni"]=e():t["uni"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fae3")}({"01ab":function(t,e,n){},"03df":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-web-view",t._g({},t.$listeners))},r=[],o=n("ed56"),a=o["a"],s=(n("2df3"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"0516":function(t,e,n){"use strict";(function(t,i){n.d(e,"a",(function(){return d}));var r=n("f2b3"),o=n("33ed"),a=n("2522"),s=n("a20d"),c=!!r["i"]&&{passive:!1};function u(e){var n=e.statusbarHeight,i=e.windowTop,r=e.windowBottom;if(t.__WINDOW_TOP=i,t.__WINDOW_BOTTOM=r,uni.canIUse("css.var")){var o=document.documentElement.style;o.setProperty("--window-top",i+"px"),o.setProperty("--window-bottom",r+"px"),o.setProperty("--status-bar-height",n+"px")}}function l(t,e){var n=t.statusbarHeight,i=t.windowTop,r=t.windowBottom,a=t.disableScroll,s=t.onPageScroll,l=t.onPageReachBottom,h=t.onReachBottomDistance;u({statusbarHeight:n,windowTop:i,windowBottom:r}),a?document.addEventListener("touchmove",o["b"],c):(s||l)&&requestAnimationFrame((function(){document.addEventListener("scroll",Object(o["a"])(e,{enablePageScroll:s,enablePageReachBottom:l,onReachBottomDistance:h}))}))}function h(){i.publishHandler("webviewReady")}function d(t){t(s["k"],h),t(a["a"],l)}}).call(this,n("c8ba"),n("501c"))},"0741":function(t,e,n){"use strict";var i=n("3c79"),r=n.n(i);r.a},"0998":function(t,e,n){"use strict";var i=n("927d"),r=n.n(i);r.a},"0aa0":function(t,e,n){"use strict";var i=44;function r(){return plus.navigator.isImmersedStatusbar()?Math.round("iOS"===plus.os.name?plus.navigator.getSafeAreaInsets().top:plus.navigator.getStatusbarHeight()):0}function o(){var t=plus.webview.currentWebview(),e=t.getStyle();return e=e&&e.titleNView,e&&"default"===e.type?i+r():0}function a(t){var e;while(t){var n=getComputedStyle(t),i=n.transform||n.webkitTransform;e=(!i||"none"===i)&&e,e="fixed"===n.position||e,t=t.parentElement}return e}e["a"]={name:"Native",data:function(){return{position:{top:"0px",left:"0px",width:"0px",height:"0px",position:"static"},hidden:!1}},created:function(){this.isNative=!0,this.onCanInsertCallbacks=[]},mounted:function(){var t=this;this._updatePosition(),this.$nextTick((function(){t.onCanInsertCallbacks.forEach((function(t){return t()}))})),this.$on("uni-view-update",this._requestPositionUpdate)},methods:{_updatePosition:function(){var t=(this.$refs.container||this.$el).getBoundingClientRect();if(this.hidden=0===t.width||0===t.height,!this.hidden){var e=this.position;e.position=a(this.$el)?"absolute":"static";var n=["top","left","width","height"];n.forEach((function(n){var i=t[n];i="top"===n?i+("static"===e.position?document.documentElement.scrollTop||document.body.scrollTop||0:o()):i,e[n]=i+"px"}))}},_requestPositionUpdate:function(){var t=this;this._positionUpdateRequest&&cancelAnimationFrame(this._positionUpdateRequest),this._positionUpdateRequest=requestAnimationFrame((function(){delete t._positionUpdateRequest,t._updatePosition()}))}}}},"0f55":function(t,e,n){"use strict";var i=n("2190"),r=n.n(i);r.a},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:"",sizeFixed:!1}},computed:{ratio:function(){return this.originalWidth&&this.originalHeight?this.originalWidth/this.originalHeight:0},realImagePath:function(){return this.src&&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,this.sizeFixed=!1),"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.sizeFixed||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",this.sizeFixed=!0}},_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},1307:function(t,e,n){},1364:function(t,e,n){"use strict";(function(t){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;n should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab")}}},c=s,u=(n("f7fd"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},"18fd":function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,o=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,a=f("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),s=f("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=f("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=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),l=f("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),h=f("script,style");function d(t,e){var n,d,f,p=[],v=t;p.last=function(){return this[this.length-1]};while(t){if(d=!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),""})),_("",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),d=!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}}_()}function f(t){for(var e={},n=t.split(","),i=0;i*{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["b"])({disable:!0});break;case"move":this._handleTouchMove(t);break;case"end":case"cancel":this._handleTouchEnd(t),Object(s["b"])({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])])])}},d=h,f=(n("edfa"),n("2877")),p=Object(f["a"])(d,u,l,!1,null,null,null);e["default"]=p.exports},"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["e"])(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},"1e88":function(t,e,n){"use strict";function i(){return{top:0,bottom:0}}n.d(e,"a",(function(){return i}))},"1efd":function(t,e,n){"use strict";n.r(e);var i=n("e571"),r=n("a34f"),o=n("d4b6"),a={methods:{$getRealPath:function(t){return Object(r["a"])(t)},$trigger:function(t,e,n){this.$emit(t,o["b"].call(this,t,e,n,this.$el,this.$el))}}};function s(t){return l(t)||u(t)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function u(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function l(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=0&&(a.length=1),l.push("".concat(o,"(").concat(a.join(","),")"));else if(i.concat(r).includes(a[0])){o=a[0];var c=a[1];u[o]=r.includes(o)?h(c):c}})),u.transform=u.webkitTransform=l.join(" "),u.transition=u.webkitTransition=Object.keys(u).map((function(t){return"".concat(d(t)," ").concat(c.duration,"ms ").concat(c.timingFunction," ").concat(c.delay,"ms")})).join(","),u.transformOrigin=u.webkitTransformOrigin=a.transformOrigin,u}function p(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=f(e);Object.keys(s).forEach((function(e){t.$el.style[e]=s[e]})),n+=1,n0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger(n,{},e)}))}))},beforeDestroy:function(){this.video&&this.video.close(),delete this.video},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;if(c.includes(e)){if("object"===s(i))switch(e){case"seek":i=i.position;break;case"playbackRate":i=i.rate;break;case"requestFullScreen":i=i.direction;break}this.video&&this.video[e](i)}}}},d=h,f=(n("7f2f"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},2190:function(t,e,n){},"21c3":function(t,e,n){"use strict";var i=n("2937"),r=n.n(i);r.a},2376:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n("f2b3"),r=Object.create(null);function o(t,e){r[t]=e}var a=Object(i["a"])((function(t){return r[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["c"]],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:""},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.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=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}:{}}}},u=c,l=(n("0f55"),n("2877")),h=Object(l["a"])(u,i,r,!1,null,null,null);e["default"]=h.exports},2522:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="onPageCreate"},"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["d"]],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},"27ab":function(t,e,n){"use strict";function i(t){return a(t)||o(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function o(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function a(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=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&&this.$slots.default.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)])}},l=u,h=(n("6062"),n("2877")),d=Object(h["a"])(l,s,c,!1,null,null,null);e["default"]=d.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("3e4d"),a=o["a"],s=(n("e298"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"27ef":function(t,e,n){"use strict";var i=n("a250"),r=n.n(i);r.a},"286b":function(t,e,n){"use strict";(function(t){var i=n("8af1"),r=n("0aa0"),o=["getCenterLocation","moveToLocation","getRegion","getScale","$getAppMap"],a=["latitude","longitude","scale","markers","polyline","circles","controls","show-location"],s=function(t,e,n){n({coord:{latitude:e,longitude:t}})};function c(t){if(0!==t.indexOf("#"))return{color:t,opacity:1};var e=t.substr(7,2);return{color:t.substr(0,7),opacity:e?Number("0x"+e)/255:1}}e["a"]={name:"Map",mixins:[i["e"],r["a"]],props:{id:{type:String,default:""},latitude:{type:[Number,String],default:""},longitude:{type:[Number,String],default:""},scale:{type:[String,Number],default:1},markers:{type:Array,default:function(){return[]}},polyline:{type:Array,default:function(){return[]}},circles:{type:Array,default:function(){return[]}},controls:{type:Array,default:function(){return[]}}},data:function(){return{style:{top:"0px",left:"0px",width:"0px",height:"0px",position:"static"},hidden:!1}},computed:{attrs:function(){var t=this,e={};return a.forEach((function(n){var i=t.$props[n];i="src"===n?t.$getRealPath(i):i,e[n.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))]=i})),e},mapControls:function(){var t=this,e=this.controls.map((function(e){var n={position:"absolute"};return["top","left","width","height"].forEach((function(t){e.position[t]&&(n[t]=e.position[t]+"px")})),{id:e.id,iconPath:t.$getRealPath(e.iconPath),position:n}}));return e}},watch:{hidden:function(t){this.map&&this.map[t?"hide":"show"]()},latitude:function(t){this.map&&this.map.setStyles({center:new plus.maps.Point(this.longitude,this.latitude)})},longitude:function(t){this.map&&this.map.setStyles({center:new plus.maps.Point(this.longitude,this.latitude)})},markers:function(t){this.map&&this._addMarkers(t)},polyline:function(t){this.map&&this._addMapLines(t)},circles:function(t){this.map&&this._addMapCircles(t)}},mounted:function(){var t=this,e=Object.assign({},this.attrs,this.position);this.latitude&&this.longitude&&(e.center=new plus.maps.Point(this.longitude,this.latitude));var n=this.map=plus.maps.create(this.$page.id+"-map-"+(this.id||Date.now()),e);n.__markers__={},n.__lines__=[],n.__circles__=[],plus.webview.currentWebview().append(n),this.hidden&&n.hide(),this.$watch("position",(function(){t.map&&t.map.setStyles(t.position)}),{deep:!0}),n.onclick((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger("tap",{},e)})),n.onstatuschanged((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger("end",{},e)})),this._addMarkers(this.markers),this._addMapLines(this.polyline),this._addMapCircles(this.circles)},beforeDestroy:function(){delete this.map},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;o.includes(e)&&this.map&&this[e](i)},moveToLocation:function(t){this.map.setCenter(new plus.maps.Point(this.longitude,this.latitude))},getCenterLocation:function(t){var e=t.callbackId,n=this.map.getCenter();this._publishHandler(e,{longitude:n.longitude,latitude:n.latitude,errMsg:"getCenterLocation:ok"})},getRegion:function(t){var e=t.callbackId,n=this.map.getBounds();this._publishHandler(e,{southwest:n.southwest,northeast:n.northeast||n.northease,errMsg:"getRegion:ok"})},getScale:function(t){var e=t.callbackId;this._publishHandler(e,{scale:this.map.getZoom(),errMsg:"getScale:ok"})},controlclick:function(t){this.$trigger("controltap",{},{id:t.id})},_publishHandler:function(e,n){t.publishHandler("onMapMethodCallback",{callbackId:e,data:n},this.$page.id)},_addMarker:function(t,e){var n=this,i=e.id,r=e.latitude,o=e.longitude,a=e.iconPath,c=e.callout,u=e.label;s(o,r,(function(e){var r=e.coord,o=r.latitude,s=r.longitude,l=new plus.maps.Marker(new plus.maps.Point(s,o));a&&l.setIcon(n.$getRealPath(a)),u&&u.content&&l.setLabel(u.content);var h=!1;c&&c.content&&(h=new plus.maps.Bubble(c.content)),h&&l.setBubble(h),(i||0===i)&&(l.onclick=function(t){n.$trigger("markertap",{},{id:i})},h&&(h.onclick=function(){n.$trigger("callouttap",{},{id:i})})),t.addOverlay(l),t.__markers__[i+""]=l}))},_addMarkers:function(t,e){var n=this;return this.map?(e&&this.map.clearOverlays(),t.forEach((function(t){n._addMarker(n.map,t)})),{errMsg:"addMapMarkers:ok"}):{errMsg:"addMapMarkers:fail:请先创建地图元素"}},_translateMapMarker:function(t){t.autoRotate,t.callbackId;var e=t.destination,n=(t.duration,t.markerId);if(this.map){var i=this.map.__markers__[n+""];i&&i.setPoint(new plus.maps.Point(e.longitude,e.latitude))}return{errMsg:"translateMapMarker:ok"}},_addMapLines:function(t){var e=this.map;return e?(e.__lines__.length>0&&(e.__lines__.forEach((function(t){e.removeOverlay(t)})),e.__lines__=[]),t.forEach((function(t){var n=t.color,i=t.width,r=t.points.map((function(t){return new plus.maps.Point(t.longitude,t.latitude)})),o=new plus.maps.Polyline(r);if(n){var a=c(n);o.setStrokeColor(a.color),o.setStrokeOpacity(a.opacity)}i&&o.setLineWidth(i),e.addOverlay(o),e.__lines__.push(o)})),{errMsg:"addMapLines:ok"}):{errMsg:"addMapLines:fail:请先创建地图元素"}},_addMapCircles:function(t){var e=this.map;return e?(e.__circles__.length>0&&(e.__circles__.forEach((function(t){e.removeOverlay(t)})),e.__circles__=[]),t.forEach((function(t){var n=t.latitude,i=t.longitude,r=t.color,o=t.fillColor,a=t.radius,s=t.strokeWidth,u=new plus.maps.Circle(new plus.maps.Point(i,n),a);if(r){var l=c(r);u.setStrokeColor(l.color),u.setStrokeOpacity(l.opacity)}if(o){var h=c(o);u.setFillColor(h.color),u.setFillOpacity(h.opacity)}s&&u.setLineWidth(s),e.addOverlay(u),e.__circles__.push(u)})),{errMsg:"addMapCircles:ok"}):{errMsg:"addMapCircles:fail:请先创建地图元素"}}}}}).call(this,n("501c"))},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}))},2937: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},"2c45":function(t,e,n){},"2df3":function(t,e,n){"use strict";var i=n("b1a3"),r=n.n(i);r.a},"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("5bb5");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,d=!0;function f(){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&&d&&(c()||(i=setTimeout(c,300))),l=!1}function c(){if(f())return Object(r["a"])("onReachBottom",{},e),d=!1,setTimeout((function(){d=!0}),350),!0}}return function(){clearTimeout(i),l||requestAnimationFrame(p),l=!0}}}).call(this,n("501c"))},"39ba":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-cover-view",t._g({},t.$listeners),[n("div",{ref:"container",staticClass:"uni-cover-view"})])},r=[],o=n("0aa0"),a=n("5077"),s={name:"CoverView",mixins:[o["a"],a["a"]],props:{},data:function(){return{coverType:"text",coverContent:""}},watch:{},mounted:function(){this._updateContent(),this.$watch("$slot",this._updateContent)},methods:{_updateContent:function(t){var e=this,n=this.$slots.default||[];n.forEach((function(t){t.tag||(e.coverContent+=t.text||"")}))}}},c=s,u=(n("4ba9"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},"3c47":function(t,e,n){"use strict";(function(t){var i=n("8af1");e["a"]={name:"Label",mixins:[i["a"]],props:{for:{type:String,default:""}},methods:{_onClick:function(e){var n=/^uni-(checkbox|radio|switch)-/.test(e.target.className);n||(n=/^uni-(checkbox|radio|switch|button)$/i.test(e.target.tagName)),n||(this.for?t.emit("uni-label-click-"+this.$page.id+"-"+this.for,e,!0):this.$broadcast(["Checkbox","Radio","Switch","Button"],"uni-label-click",e,!0))}}}}).call(this,n("501c"))},"3c79":function(t,e,n){},"3e4d":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["e"],i["a"],i["c"]],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 d=c.name,f=void 0===d?"":d,p=c.value,v=void 0!==p&&p;i=l.getSelection(!0);var m=l.getFormat(i)[f]||!1;if(["bold","italic","underline","strike","ins"].includes(f))v=!m;else if("direction"===f){v=("rtl"!==v||!m)&&v;var g=l.getFormat(i).align;"rtl"!==v||g?v||"right"!==g||l.format("align",!1,h.sources.USER):l.format("align","right",h.sources.USER)}else if("indent"===f){var _="rtl"===l.getFormat(i).direction;v="+1"===v,_&&(v=!v),v=v?"+1":"-1"}else"list"===f&&(v="check"===v?"unchecked":v,m="checked"===m?"unchecked":m),v=m&&m!==(v||!1)||!m&&v?v:!m;l.format(f,v,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,b=void 0===y?"":y,w=c.alt,x=void 0===w?"":w,S=c.data,k=void 0===S?{}:S;l.insertEmbed(i.index,"image",this.$getRealPath(b),h.sources.USER),l.formatText(i.index,1,"alt",x),l.formatText(i.index,1,"data-custom",Object.keys(k).map((function(t){return"".concat(t,"=").concat(k[t])})).join("&")),l.setSelection(i.index+1,h.sources.SILENT);break;case"insertText":i=l.getSelection(!0);var $=c.text,C=void 0===$?"":$;l.insertText(i.index,C,h.sources.USER),l.setSelection(i.index+C.length,0,h.sources.SILENT);break;case"setContents":var T=c.delta,O=c.html;"object"===a(T)?l.setContents(T,h.sources.SILENT):"string"===typeof O?l.setContents(this.html2delta(O),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 E=h.import("parchment");i.length?l.removeFormat(i,h.sources.USER):Object.keys(l.getFormat(i)).forEach((function(t){E.query(t,E.Scope.INLINE)&&l.format(t,!1)}));break;case"undo":l.history.undo();break;case"redo":l.history.redo();break;default:break}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"];s.forEach((function(t){a.addEventListener(t,(function(n){e.$trigger(t,n,e.getContents())}))})),r.on(n.events.TEXT_CHANGE,(function(){e.$trigger("input",{},e.getContents())})),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}}}}).call(this,n("501c"))},"3e5d":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return k}));var i,r,o,a=n("e571"),s=n("a20d"),c=n("2522"),u=n("9d20"),l=n("9856"),h=n("2376");function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return m(t)||v(t,e)||p()}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function v(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)if(n.push(a.value),e&&n.length===e)break}catch(c){r=!0,o=c}finally{try{i||null==s["return"]||s["return"]()}finally{if(r)throw o}}return n}}function m(t){if(Array.isArray(t))return t}var g=(i={},d(i,s["d"],(function(e){var n=f(e,3),i=n[0],a=n[1],s=n[2];document.title="".concat(a,"[").concat(i,"]"),Object(l["b"])(i,a),t.subscribeHandler(c["a"],s,i),o=Object(h["b"])(a),r=new u["a"](i)})),d(i,s["c"],(function(t){r.addVData.apply(r,t)})),d(i,s["g"],(function(t){r.updateVData.apply(r,t)})),d(i,s["e"],(function(t){var e=f(t,2),n=e[0],i=e[1],r=getCurrentPages()[0];r.$vm=new o({mpType:"page",pageId:n,pagePath:i}).$mount("#app")})),i);function _(t,e,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")),t}},render:function(t){var e=this,n=[];return this.$slots.default&&this.$slots.default.forEach((function(i){if(i.text){var r=i.text.replace(/\\n/g,"\n"),o=r.split("\n");o.forEach((function(i,r){n.push(e._decodeHtml(i)),r!==o.length-1&&n.push(t("br"))}))}else i.componentOptions&&"v-uni-text"!==i.componentOptions.tag&&console.warn(" 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。"),n.push(i)})),t("uni-text",{on:this.$listeners,attrs:{selectable:!!this.selectable}},[t("span",{},n)])}},s=a,c=(n("c8ed"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"4e0b":function(t,e,n){},"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({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["d"]],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},"501c":function(t,e,n){"use strict";n.r(e);var i=n("e571");function r(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 o=n("6bdf"),a=n("5dc1"),s={setPageMeta:r,requestComponentInfo:o["a"],requestComponentObserver:a["b"],destroyComponentObserver:a["a"]},c=n("33ed"),u=n("7107"),l=n("0516");function h(t){Object.keys(s).forEach((function(e){t(e,s[e])})),t("pageScrollTo",c["c"]),t("loadFontFace",u["a"]),Object(l["a"])(t)}var d=n("5bb5");n.d(e,"on",(function(){return p})),n.d(e,"off",(function(){return v})),n.d(e,"once",(function(){return m})),n.d(e,"emit",(function(){return g})),n.d(e,"subscribe",(function(){return _})),n.d(e,"unsubscribe",(function(){return y})),n.d(e,"subscribeHandler",(function(){return b})),n.d(e,"publishHandler",(function(){return d["a"]}));var f=new i["a"],p=f.$on.bind(f),v=f.$off.bind(f),m=f.$once.bind(f),g=f.$emit.bind(f);function _(t,e){return p("service."+t,e)}function y(t,e){return v("service."+t,e)}function b(t,e,n){g("service."+t,e,n)}h(_)},5077:function(t,e,n){"use strict";var i=["padding","borderRadius","borderColor","borderWidth","backgroundColor"],r=["color","textAlign","lineHeight","fontSize","fontWeight","textOverflow","whiteSpace"],o=[],a={start:"left",end:"right"},s=0;e["a"]={name:"Cover",data:function(){return{style:{}}},computed:{viewPosition:function(){var t={};for(var e in this.position){var n=this.position[e],i=parseFloat(n),r=parseFloat(this.$parent.position[e]);if("top"===e||"left"===e)n=Math.max(i,r)+"px";else if("width"===e||"height"===e){var o="left",a=parseFloat(this.$parent.position[o]),s=parseFloat(this.position[o]),c=Math.max(a-s,0),u=Math.max(s+i-(a+r),0);n=Math.max(i-c-u,0)+"px"}t[e]=n}return t},tags:function(){var t=this._getTagPosition(),e=this.style;return[{tag:"rect",position:t,rectStyles:{color:e.backgroundColor,radius:e.borderRadius,borderColor:e.borderColor,borderWidth:e.borderWidth}},"image"===this.coverType?{tag:"img",position:t,src:this.coverContent}:{tag:"font",position:t,textStyles:{align:a[e.textAlign]||e.textAlign,color:e.color,decoration:"none",lineSpacing:parseFloat(e.lineHeight)-parseFloat(e.fontSize)+"px",margin:e.padding,overflow:e.textOverflow,size:e.fontSize,verticalAlign:"top",weight:e.fontWeight,whiteSpace:e.whiteSpace},text:this.coverContent}]}},mounted:function(){var t=this;this._updateStyle();var e=this.$parent;e.isNative&&(e._isMounted?this._onCanInsert():e.onCanInsertCallbacks.push((function(){t._onCanInsert()})),this.$watch("hidden",(function(e){t.cover&&t.cover[e?"hide":"show"]()})),this.$watch("viewPosition",(function(e){t.cover&&t.cover.setStyle(e)}),{deep:!0}),this.$watch("tags",(function(){var e=t.cover;e&&(e.reset(),e.draw(t.tags))}),{deep:!0}),this.$on("uni-view-update",this._requestStyleUpdate))},beforeDestroy:function(){this.$parent.isNative&&(this.cover&&this.cover.close(),delete this.cover)},methods:{_onCanInsert:function(){var t=this,e=this.cover=new plus.nativeObj.View("cover-".concat(Date.now(),"-").concat(s++),this.viewPosition,this.tags);plus.webview.currentWebview().append(e),this.hidden&&e.hide(),e.addEventListener("click",(function(){t.$trigger("click",{},{})}))},_getTagPosition:function(){var t={};for(var e in this.position){var n=this.position[e];"top"!==e&&"left"!==e||(n=Math.min(parseFloat(n)-parseFloat(this.$parent.position[e]),0)+"px"),t[e]=n}return t},_updateStyle:function(){var t=this,e=getComputedStyle(this.$el);i.concat(r,o).forEach((function(n){t.style[n]=e[n]}))},_requestStyleUpdate:function(){var t=this;this._styleUpdateRequest&&cancelAnimationFrame(this._styleUpdateRequest),this._styleUpdateRequest=requestAnimationFrame((function(){delete t._styleUpdateRequest,t._updateStyle()}))}}}},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){},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={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?this.userTracking=!1: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=[],n=[];this.$slots.default&&this.$slots.default.forEach((function(t){t.componentOptions&&"v-uni-swiper-item"===t.componentOptions.tag&&n.push(t)}));for(var i=0,r=n.length;i=o||i0?n(o.splice(0,1)[0]):plus.ad.getAds({adpid:t,count:10,width:e},(function(t){var e=t.ads;n(e.splice(0,1)[0]),s[r]=o?o.concat(e):e}),(function(t){i({errCode:t.code,errMsg:t.message})}))}var u=["draw"],l=["adpid","data"],h={name:"Ad",mixins:[o["e"],a["a"]],props:{adpid:{type:[Number,String],default:""},data:{type:Object,default:null}},data:function(){return{hidden:!1}},computed:{attrs:function(){var t=this,e={};return l.forEach((function(n){var i=t.$props[n];i="src"===n?t.$getRealPath(i):i,e[n.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))]=i})),e}},watch:{hidden:function(t){this.adView&&this.adView[t?"hide":"show"]()},adpid:function(t){t&&this._loadData(t)},data:function(t){t&&this._fillData(t)}},mounted:function(){var t=this,e=Object.assign({id:"AdView"+Date.now()},this.position),n=this.adView=plus.ad.createAdView(e);n.interceptTouchEvent(!1),plus.webview.currentWebview().append(n),this.hidden&&n.hide(),this.$watch("attrs",(function(){t._request()}),{deep:!0}),this.$watch("position",(function(){t.adView&&t.adView.setStyle(t.position)}),{deep:!0}),n.setDislikeListener&&n.setDislikeListener((function(e){t.adView&&t.adView.close(),t.$refs.container.style.height="0px",t._updateView(),t.$trigger("close",{},e)})),n.setRenderingListener&&n.setRenderingListener((function(e){0===e.result?(t.$refs.container.style.height=e.height+"px",t._updateView()):t.$trigger("error",{},{errCode:e.result})})),n.setDownloadListener&&n.setDownloadListener((function(e){t.$trigger("downloadchange",{},e)})),this._request()},beforeDestroy:function(){delete this.adView},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;u.includes(e)&&this.adView&&this.adView[e](i)},_request:function(){this.adView&&(this.data?this._fillData(this.data):this.adpid&&this._loadData())},_loadData:function(t){var e=this;c(t||this.adpid,this.position.width,(function(t){e._fillData(t)}),(function(t){e.$trigger("error",t)}))},_fillData:function(t){this.adView.renderingBind(t),this.$trigger("load",{},{})},_updateView:function(){window.dispatchEvent(new CustomEvent("updateview"))}}},d=h,f=(n("27ef"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},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-ios":t.isIOS},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={name:"Textarea",mixins:[o["a"],o["c"]],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:""},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:String(this.value),valueComposition:"",composition:!1,focusSync:this.focus,height:0,focusChangeSource:"",isIOS:0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&String(navigator.appVersion).split("OS ")[1].split("_")[0]<13}},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=String(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}),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=""}}},s=a,c=(n("9400"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"599d":function(t,e,n){"use strict";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}var l=n("f2b8"),h=n("1e88"),d=n("d8c8"),f=n.n(d),p=navigator.userAgent,v=/android/i.test(p),m=/iphone|ipad|ipod/i.test(p);function g(){var t,e,n,i=window.screen,r=window.devicePixelRatio,o=i.width,a=i.height,s=Math.min(window.innerWidth,document.documentElement.clientWidth,o),c=window.innerHeight,u=navigator.language,l=f.a.top;if(m){t="iOS";var d=p.match(/OS\s([\w_]+)\slike/);d&&(e=d[1].replace(/_/g,"."));var g=p.match(/\(([a-zA-Z]+);/);g&&(n=g[1])}else if(v){t="Android";var _=p.match(/Android[\s/]([\w\.]+)[;\s]/);_&&(e=_[1]);for(var y=p.match(/\((.+?)\)/),b=y?y[1].split(";"):p.split(" "),w=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i],x=0;x0){n=S.split("Build")[0].trim();break}for(var k=void 0,$=0;$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=d(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=d(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=d(n)}return!1}function d(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}})()},"5bb5":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("a20d"),r=n("f2b3");function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r["h"])((function(){var n=plus.webview.currentWebview().id;plus.webview.postMessageToUniNView({type:"subscribeHandler",args:{type:t,data:e,pageId:n}},i["a"])}))}},"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 d=h.$vm,f=Object(r["a"])(c,d),p=u.relativeToSelector?f.querySelector(u.relativeToSelector):null,v=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}},d.$page.id)}))}),{root:p,rootMargin:u.rootMargin,threshold:u.thresholds});u.observeAll?(v.USE_MUTATION_OBSERVER=!0,Array.prototype.map.call(f.querySelectorAll(u.selector),(function(t){v.observe(t)}))):(v.USE_MUTATION_OBSERVER=!1,v.observe(f.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){},6062:function(t,e,n){"use strict";var i=n("ef36"),r=n.n(i);r.a},"60ee":function(t,e,n){},"61c2":function(t,e,n){"use strict";var i=n("f2b3"),r=n("8af1");function o(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})}function a(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})}var s={name:"uni://form-field",init:function(t,e){e.constructor.options.props&&e.constructor.options.props.name&&e.constructor.options.props.value||(e.constructor.options.props||(e.constructor.options.props={}),e.constructor.options.props.name||(e.constructor.options.props.name=t.props.name={type:String}),e.constructor.options.props.value||(e.constructor.options.props.value=t.props.value={type:null})),t.propsData||(t.propsData={});var n=e.$vnode;if(n&&n.data&&n.data.attrs&&(Object(i["d"])(n.data.attrs,"name")&&(t.propsData.name=n.data.attrs.name),Object(i["d"])(n.data.attrs,"value")&&(t.propsData.value=n.data.attrs.value)),!e.constructor.options.methods||!e.constructor.options.methods._getFormData){e.constructor.options.methods||(e.constructor.options.methods={}),t.methods||(t.methods={});var s={_getFormData:function(){return this.name?{key:this.name,value:this.value}:{}},_resetFormData:function(){this.value=""}};Object.assign(e.constructor.options.methods,s),Object.assign(t.methods,s),Object.assign(e.constructor.options.methods,r["a"].methods),Object.assign(t.methods,r["a"].methods);var c=t["created"];e.constructor.options["created"]=t["created"]=c?[].concat(o,c):[o];var u=t["beforeDestroy"];e.constructor.options["beforeDestroy"]=t["beforeDestroy"]=u?[].concat(a,u):[a]}}};function c(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,"a",(function(){return l}));var u=c({},s.name,s);function l(t,e){t.behaviors.forEach((function(n){var i=u[n];i&&i.init(t,e)}))}},"630f":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-cover-image",t._g({style:t.imageInfo,attrs:{src:t.src}},t.$listeners),[n("div",{ref:"container",staticClass:"uni-cover-image"})])},r=[],o=n("0aa0"),a=n("5077"),s=n("f2b3"),c="_doc/uniapp_temp",u="".concat(c,"_").concat(Date.now()),l={name:"CoverImage",mixins:[o["a"],a["a"]],props:{src:{type:String,default:""},autoSize:{type:[Boolean,String],default:!1}},data:function(){return{coverType:"image",coverContent:"",imageInfo:{}}},watch:{src:function(){this.loadImage()}},created:function(){this.loadImage()},beforeDestroy:function(){var t=this.downloaTask;t&&t.state<4&&t.abort()},methods:{loadImage:function(){var t=this;this.coverContent="",this.imageInfo=this.autoSize?{width:0,height:0}:{};var e=this.src?this.$getRealPath(this.src):"";0===e.indexOf("http://")||0===e.indexOf("https://")?Object(s["h"])((function(){t.downloaTask=plus.downloader.createDownload(e,{filename:u+"/download/"},(function(e,n){200===n?t.getImageInfo(e.filename):t.$trigger("error",{},{errMsg:"error"})})).start()})):e&&this.getImageInfo(e)},getImageInfo:function(t){var e=this;this.coverContent=t,Object(s["h"])((function(){plus.io.getImageInfo({src:t,success:function(t){var n=t.width,i=t.height;e.autoSize&&(e.imageInfo={width:"".concat(n,"px"),height:"".concat(i,"px")},e._isMounted&&e._requestPositionUpdate()),e.$trigger("load",{},{width:n,height:i})},fail:function(){e.$trigger("error",{},{errMsg:"error"})}})}))}}},h=l,d=(n("21c3"),n("2877")),f=Object(d["a"])(h,i,r,!1,null,null,null);e["default"]=f.exports},"634a":function(t,e,n){"use strict";(function(t,i){var r=n("e571"),o=(n("7522"),n("2376")),a=n("9856"),s=n("7d0f"),c=n("599d");n.d(e,"a",(function(){return c["a"]})),n.d(e,"b",(function(){return c["b"]})),n.d(e,"c",(function(){return c["c"]})),n.d(e,"d",(function(){return c["d"]})),n.d(e,"e",(function(){return c["e"]})),n.d(e,"f",(function(){return c["f"]})),n.d(e,"g",(function(){return c["g"]})),n.d(e,"h",(function(){return c["h"]})),i.UniViewJSBridge={publishHandler:t.publishHandler,subscribeHandler:t.subscribeHandler},i.getCurrentPages=a["a"],i.__definePage=o["a"],i.Vue=r["a"],r["a"].use(s["a"]),n("1efd")}).call(this,n("501c"),n("c8ba"))},6428:function(t,e,n){"use strict";var i=n("f756"),r=n.n(i);r.a},6491: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-radio",t._g({on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-radio-wrapper"},[n("div",{staticClass:"uni-radio-input",class:t.radioChecked?"uni-radio-input-checked":"",style:t.radioChecked?t.checkedStyle:""}),t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Radio",mixins:[o["a"],o["d"]],props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007AFF"},value:{type:String,default:""}},data:function(){return{radioChecked:this.checked,radioValue:this.value}},computed:{checkedStyle:function(){return"background-color: ".concat(this.color,";border-color: ").concat(this.color,";")}},watch:{checked:function(t){this.radioChecked=t},value:function(t){this.radioValue=t}},listeners:{"label-click":"_onClick","@label-click":"_onClick"},created:function(){this.$dispatch("RadioGroup","uni-radio-group-update",{type:"add",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("RadioGroup","uni-radio-group-update",{type:"remove",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_onClick:function(t){this.disabled||this.radioChecked||(this.radioChecked=!0,this.$dispatch("RadioGroup","uni-radio-change",t,this))},_resetFormData:function(){this.radioChecked=this.min}}},s=a,c=(n("c96e"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"64d0":function(t,e,n){"use strict";var i=n("c0e5"),r=n.n(i);r.a},"6bdf":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return u}));var i=n("85b6"),r=n("1e88"),o=n("db8e");function a(t){var e={};return t.id&&(e.id=""),t.dataset&&(e.dataset={}),t.rect&&(e.left=0,e.right=0,e.top=0,e.bottom=0),t.size&&(e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight),t.scrollOffset&&(e.scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft||0,e.scrollTop=document.documentElement.scrollTop||document.body.scrollTop||0),e}function s(t,e){var n={},o=Object(r["a"])(),a=o.top;if(e.id&&(n.id=t.id),e.dataset&&(n.dataset=Object(i["c"])(t.dataset||{})),e.rect||e.size){var s=t.getBoundingClientRect();e.rect&&(n.left=s.left,n.right=s.right,n.top=s.top-a,n.bottom=s.bottom-a),e.size&&(n.width=s.width,n.height=s.height)}return e.properties&&e.properties.forEach((function(t){t=t.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()}))})),e.scrollOffset&&("UNI-SCROLL-VIEW"===t.tagName&&t.__vue__&&t.__vue__.getScrollPosition?Object.assign(n,t.__vue__.getScrollPosition()):(n.scrollLeft=0,n.scrollTop=0)),e.context&&t.__vue__&&t.__vue__._getContextInfo&&(n.context=t.__vue__._getContextInfo()),n}function c(t,e,n,i,r){var a=Object(o["a"])(e,t);if(i){var c=a&&(a.matches(n)?a:a.querySelector(n));return c?s(c,r):null}if(a){var u=[],l=a.querySelectorAll(n);return l&&l.length&&(u=[].map.call(l,(function(t){return s(t,r)}))),a.matches(n)&&u.unshift(a),u}return[]}function u(e,n){var i=e.reqId,r=e.reqs,o=getCurrentPages(),s=o.find((function(t){return t.$page.id===n}));if(!s)throw new Error("Not Found:Page[".concat(n,"]"));var u=s.$vm,l=[];r.forEach((function(t){var e=t.component,n=t.selector,i=t.single,r=t.fields;0===e?l.push(a(r)):l.push(c(u,e,n,i,r))})),t.publishHandler("onRequestComponentInfo",{reqId:i,res:l},u.$page.id)}}).call(this,n("501c"))},"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({on:{click:t._onClick}},t.$listeners),[t._t("default")],2)},r=[],o=n("3c47"),a=o["a"],s=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),d=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)),d*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)),d*u*e+h*l*n}}}var f=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,v=t,m=(e-p*t)/f;return{x:function(t){return Math.pow(Math.E,p*t)*(v*Math.cos(f*t)+m*Math.sin(f*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(f*t),i=Math.sin(f*t);return e*(m*f*n-v*f*i)+p*e*(m*i+v*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}]}},7466: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({},t.$listeners),[n("div",{ref:"container",staticClass:"uni-map-container"}),t._l(t.mapControls,(function(e,i){return n("v-uni-cover-image",{key:i,style:e.position,attrs:{src:e.iconPath,"auto-size":""},on:{click:function(n){return t.controlclick(e)}}})})),n("div",{staticClass:"uni-map-slot"},[t._t("default")],2)],2)},r=[],o=n("286b"),a=o["a"],s=(n("a252"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},7522:function(t,e,n){},"76a8":function(t,e,n){"use strict";var i=n("3fe7"),r=n.n(i);r.a},"7bb3":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",t._g({on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-checkbox-wrapper"},[n("div",{staticClass:"uni-checkbox-input",class:[t.checkboxChecked?"uni-checkbox-input-checked":""],style:{color:t.color}}),t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Checkbox",mixins:[o["a"],o["d"]],props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},data:function(){return{checkboxChecked:this.checked,checkboxValue:this.value}},watch:{checked:function(t){this.checkboxChecked=t},value:function(t){this.checkboxValue=t}},listeners:{"label-click":"_onClick","@label-click":"_onClick"},created:function(){this.$dispatch("CheckboxGroup","uni-checkbox-group-update",{type:"add",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("CheckboxGroup","uni-checkbox-group-update",{type:"remove",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_onClick:function(t){this.disabled||(this.checkboxChecked=!this.checkboxChecked,this.$dispatch("CheckboxGroup","uni-checkbox-change",t))},_resetFormData:function(){this.checkboxChecked=!1}}},s=a,c=(n("f53a"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"7c2b":function(t,e,n){"use strict";var i=n("2c45"),r=n.n(i);r.a},"7d0f":function(t,e,n){"use strict";var i=n("5129"),r=n.n(i),o=n("85b6");function a(t){t.config.errorHandler=function(t){var e=getApp();e&&Object(o["a"])(e.$options,"onError")?e.__call_hook("onError",t):console.error(t)};var e=t.config.isReservedTag;t.config.isReservedTag=function(t){return-1!==r.a.indexOf(t)||e(t)},t.config.ignoredElements=r.a;var n=t.config.getTagNamespace,i=["switch","image","text","view"];t.config.getTagNamespace=function(t){return!~i.indexOf(t)&&(n(t)||!1)}}var s=n("8c15"),c=n("a34f"),u=n("3e5d");function l(t){Object.defineProperty(t.prototype,"$page",{get:function(){return getCurrentPages()[0].$page}}),t.prototype.$handleVModelEvent=function(t,e){u["b"].sendUIEvent(this._$id,t,{type:"input",target:{value:e}})},t.prototype.$handleViewEvent=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.stop&&t.stopPropagation(),e.prevent&&t.preventDefault();var n=this.$handleEvent(t),i=this._$id,r=t.$origCurrentTarget||t.currentTarget,o=r===this.$el?0:n.options.nid;if("undefined"===typeof o)return console.error("[".concat(i,"] nid not found"));delete n._processed,delete n.mp,delete n.preventDefault,delete n.stopPropagation,delete n.options,delete n.$origCurrentTarget,u["b"].sendUIEvent(i,o,n)}}e["a"]={install:function(t,e){t.prototype._$getRealPath=c["a"],a(t),s["a"].install(t,e),Object(u["a"])(t),l(t)}}},"7df2":function(t,e,n){},"7e6a":function(t,e,n){"use strict";var i=n("515d"),r=n.n(i);r.a},"7f2f":function(t,e,n){"use strict";var i=n("ce51"),r=n.n(i);r.a},"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)}}}},"85b6":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a}));var i=["SystemAsyncLoading","SystemAsyncError"];function r(t){return!(!t.$parent||"PageBody"!==t.$parent.$options.name)&&-1===i.indexOf(t.$options.name)}function o(){var t=arguments.length>0&&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));return e}},8779:function(t,e,n){},8842: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-movable-view",t._g({},t.$listeners),[n("v-uni-resize-sensor",{on:{resize:t.setParent}}),t._t("default")],2)},r=[],o=n("ba15");function a(t,e,n){return t>e-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),d=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)),d*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)),d*u*e+h*l*n}}}var f=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,v=t,m=(e-p*t)/f;return{x:function(t){return Math.pow(Math.E,p*t)*(v*Math.cos(f*t)+m*Math.sin(f*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(f*t),i=Math.sin(f*t);return e*(m*f*n-v*f*i)+p*e*(m*i+v*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 d=n("f2b3"),f=!1;function p(t){f||(f=!0,requestAnimationFrame((function(){t(),f=!1})))}function v(t,e){if(t===e)return 0;var n=t.offsetLeft;return t.offsetParent?n+=v(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 g(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)}function _(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(d["b"])({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||!0!==this._checkCanMove&&(Math.abs(t.detail.dx/t.detail.dy)>1?this._checkCanMove=!1:this._checkCanMove=!0)),this.yMove&&(i=t.detail.dy+this.__baseY,this.__touchInfo.historyY.shift(),this.__touchInfo.historyY.push(i),this.xMove||!0!==this._checkCanMove&&(Math.abs(t.detail.dy/t.detail.dx)>1?this._checkCanMove=!1:this._checkCanMove=!0)),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(d["b"])({disable:!0}),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=_(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:g(t,this._scaleOffset.x),y:g(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}}},b=y,w=(n("7c2b"),n("2877")),x=Object(w["a"])(b,i,r,!1,null,null,null);e["default"]=x.exports},"8a36":function(t,e,n){"use strict";(function(t){var i=n("f2b3");e["a"]={props:{id:{type:String,default:""}},created:function(){var t=this;this._addListeners(this.id),this.$watch("id",(function(e,n){t._removeListeners(n,!0),t._addListeners(e,!0)}))},beforeDestroy:function(){this._removeListeners(this.id)},methods:{_addListeners:function(e,n){var r=this;if(!n||e){var o=this.$options.listeners;Object(i["f"])(o)&&Object.keys(o).forEach((function(i){n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&t.on("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]]):0===i.indexOf("@")?r.$on("uni-".concat(i.substr(1)),r[o[i]]):0===i.indexOf("uni-")?t.on(i,r[o[i]]):e&&t.on("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]])}))}},_removeListeners:function(e,n){var r=this;if(!n||e){var o=this.$options.listeners;Object(i["f"])(o)&&Object.keys(o).forEach((function(i){n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&t.off("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]]):0===i.indexOf("@")?r.$off("uni-".concat(i.substr(1)),r[o[i]]):0===i.indexOf("uni-")?t.off(i,r[o[i]]):e&&t.off("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]])}))}}}}}).call(this,n("501c"))},"8aec":function(t,e,n){"use strict";var i=n("5363"),r=n("72b3");function o(t,e,n){this._extent=t,this._friction=e||new i["a"](.01),this._spring=n||new r["a"](1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}function a(t,e,n){function i(t,e,n,r){if(!t||!t.cancelled){n(e);var o=e.done();o||t.cancelled||(t.id=requestAnimationFrame(i.bind(null,t,e,n,r))),o&&r&&r(e)}}function r(t){t&&t.id&&cancelAnimationFrame(t.id),t&&(t.cancelled=!0)}var o={id:0,cancelled:!1};return i(o,t,e,n),{cancel:r.bind(null,o),model:t}}function s(t,e){e=e||{},this._element=t,this._options=e,this._enableSnap=e.enableSnap||!1,this._itemSize=e.itemSize||0,this._enableX=e.enableX||!1,this._enableY=e.enableY||!1,this._shouldDispatchScrollEvent=!!e.onScroll,this._enableX?(this._extent=(e.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=e.scrollWidth):(this._extent=(e.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=e.scrollHeight),this._position=0,this._scroll=new o(this._extent,e.friction,e.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}o.prototype.snap=function(t,e){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(e)},o.prototype.set=function(t,e){this._friction.set(t,e),t>0&&e>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&e<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()},o.prototype.x=function(t){if(!this._startTime)return 0;if(t||(t=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var e=this._friction.x(t),n=this.dx(t);return(e>0&&n>=0||e<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),e<-this._extent?this._springOffset=-this._extent:this._springOffset=0,e=this._spring.x()+this._springOffset),e},o.prototype.dx=function(t){var e=0;return e=this._lastTime===t?this._lastDx:this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=e,e},o.prototype.done=function(){return this._springing?this._spring.done():this._friction.done()},o.prototype.setVelocityByEnd=function(t){this._friction.setVelocityByEnd(t)},o.prototype.configuration=function(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t},s.prototype.onTouchStart=function(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()},s.prototype.onTouchMove=function(t,e){var n=this._startPosition;this._enableX?n+=t:this._enableY&&(n+=e),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()},s.prototype.onTouchEnd=function(t,e,n){var i=this;if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(e)this._itemSize/2?r-(this._itemSize-Math.abs(o)):r-o;s<=0&&s>=-this._extent&&this._scroll.setVelocityByEnd(s)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=a(this._scroll,(function(){var t=Date.now(),e=(t-i._scroll._startTime)/1e3,n=i._scroll.x(e);i._position=n,i.updatePosition();var r=i._scroll.dx(e);i._shouldDispatchScrollEvent&&t-i._lastTime>i._lastDelay&&(i.dispatchScroll(),i._lastDelay=Math.abs(2e3/r),i._lastTime=t)}),(function(){i._enableSnap&&(s<=0&&s>=-i._extent&&(i._position=s,i.updatePosition()),"function"===typeof i._options.onSnap&&i._options.onSnap(Math.floor(Math.abs(i._position)/i._itemSize))),i._shouldDispatchScrollEvent&&i.dispatchScroll(),i._scrolling=!1}))},s.prototype.onTransitionEnd=function(){this._element.style.transition="",this._element.style.webkitTransition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._element.removeEventListener("webkitTransitionEnd",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()},s.prototype.snap=function(){var t=this._itemSize,e=this._position%t,n=Math.abs(e)>this._itemSize/2?this._position-(t-Math.abs(e)):this._position-e;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))},s.prototype.scrollTo=function(t,e){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"===typeof t&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0),this._element.style.transition="transform "+(e||.2)+"s ease-out",this._element.style.webkitTransition="-webkit-transform "+(e||.2)+"s ease-out",this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd),this._element.addEventListener("webkitTransitionEnd",this._onTransitionEnd)},s.prototype.dispatchScroll=function(){if("function"===typeof this._options.onScroll&&Math.round(this._lastPos)!==Math.round(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}},s.prototype.update=function(t,e,n){var i=0,r=this._position;this._enableX?(i=this._element.childNodes.length?(e||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=e):(i=this._element.childNodes.length?(e||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=e),"number"===typeof t&&(this._position=-t),this._position<-i?this._position=-i:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),r!==this._position&&(this.dispatchScroll(),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=i,this._scroll._extent=i},s.prototype.updatePosition=function(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t},s.prototype.isScrolling=function(){return this._scrolling||this._snapping};e["a"]={methods:{initScroller:function(t,e){this._touchInfo={trackingID:-1,maxDy:0,maxDx:0},this._scroller=new s(t,e),this.__handleTouchStart=this._handleTouchStart.bind(this),this.__handleTouchMove=this._handleTouchMove.bind(this),this.__handleTouchEnd=this._handleTouchEnd.bind(this),this._initedScroller=!0},_findDelta:function(t){var e=this._touchInfo;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:t.screenX-e.x,y:t.screenY-e.y}},_handleTouchStart:function(t){var e=this._touchInfo,n=this._scroller;n&&("start"===t.detail.state?(e.trackingID="touch",e.x=t.detail.x,e.y=t.detail.y):(e.trackingID="mouse",e.x=t.screenX,e.y=t.screenY),e.maxDx=0,e.maxDy=0,e.historyX=[0],e.historyY=[0],e.historyTime=[t.detail.timeStamp],e.listener=n,n.onTouchStart&&n.onTouchStart(),event.preventDefault())},_handleTouchMove:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var n=this._findDelta(t);if(n){for(e.maxDy=Math.max(e.maxDy,Math.abs(n.y)),e.maxDx=Math.max(e.maxDx,Math.abs(n.x)),e.historyX.push(n.x),e.historyY.push(n.y),e.historyTime.push(t.detail.timeStamp);e.historyTime.length>10;)e.historyTime.shift(),e.historyX.shift(),e.historyY.shift();e.listener&&e.listener.onTouchMove&&e.listener.onTouchMove(n.x,n.y,t.detail.timeStamp)}}},_handleTouchEnd:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var n=this._findDelta(t);if(n){var i=e.listener;e.trackingID=-1,e.listener=null;var r=e.historyTime.length,o={x:0,y:0};if(r>2)for(var a=e.historyTime.length-1,s=e.historyTime[a],c=e.historyX[a],u=e.historyY[a];a>0;){a--;var l=e.historyTime[a],h=s-l;if(h>30&&h<50){o.x=(c-e.historyX[a])/(h/1e3),o.y=(u-e.historyY[a])/(h/1e3);break}}e.historyTime=[],e.historyX=[],e.historyY=[],i&&i.onTouchEnd&&i.onTouchEnd(n.x,n.y,o)}}}}}},"8af1":function(t,e,n){"use strict";function i(t,e){for(var n=this.$children,r=n.length,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s2?r-2:0),a=2;a2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{};e.routes;Object(r["a"])();var n=function(t,e){for(var n=t.target;n&&n!==e;n=n.parentNode)if(n.tagName&&0===n.tagName.indexOf("UNI-"))break;return n};t.prototype.$handleEvent=function(t){if(t instanceof Event){var e=n(t,this.$el);t=r["b"].call(this,t.type,t,{},e||t.target,t.currentTarget)}return t},t.prototype.$getComponentDescriptor=function(t,e){return Object(a["a"])(t||this,e)},t.prototype.$handleWxsEvent=function(t){if(t instanceof Event){var e=t.currentTarget,i=e&&e.__vue__&&e.__vue__.$getComponentDescriptor(e.__vue__,!1);t=r["b"].call(this,t.type,t,{},n(t,this.$el)||t.target,t.currentTarget),t.instance=i}return t},t.mixin({beforeCreate:function(){var t=this,e=this.$options,n=e.wxs;n&&Object.keys(n).forEach((function(e){t[e]=n[e]})),e.behaviors&&e.behaviors.length&&Object(o["a"])(e,this),Object(i["b"])(this)&&(e.mounted=e.mounted?[].concat(s,e.mounted):[s])}})}}}).call(this,n("501c"))},9213: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-swiper-item",t._g({},t.$listeners),[t._t("default")],2)},r=[],o={name:"SwiperItem",props:{itemId:{type:String,default:""}},mounted:function(){var t=this.$el;t.style.position="absolute",t.style.width="100%",t.style.height="100%";var e=this.$vnode._callbacks;e&&e.forEach((function(t){t()}))}},a=o,s=(n("bfea"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"927d":function(t,e,n){},9400:function(t,e,n){"use strict";var i=n("cc89"),r=n.n(i);r.a},"944e":function(t,e,n){"use strict";var i=n("a6bb"),r=n.n(i);r.a},9856:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=[];function r(){return i}function o(t,e){i.length=0,i.push({$page:{id:t,route:e}})}},"98e0":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-picker",t._g({on:{click:function(e){return e.stopPropagation(),t._show(e)}}},t.$listeners),[t._t("default")],2)},r=[],o=n("8af1"),a=n("1364"),s={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},c={YEAR:"year",MONTH:"month",DAY:"day"};function u(t){return t>9?t:"0".concat(t)}function l(t,e){var n=new Date;return e===s.TIME?(t=t.split(":"),2===t.length&&n.setHours(parseInt(t[0]),parseInt(t[1]))):(t=t.split("-"),3===t.length&&n.setFullYear(parseInt(t[0]),parseInt(t[1]-1),parseInt(t[2]))),n}var h={name:"Picker",mixins:[o["a"]],props:{name:{type:String,default:""},range:{type:Array,default:function(){return[]}},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:s.SELECTOR,validator:function(t){return Object.values(s).indexOf(t)>=0}},fields:{type:String,default:"day",validator:function(t){return Object.values(c).indexOf(t)>=0}},start:{type:String,default:function(){if(this.mode===s.TIME)return"00:00";if(this.mode===s.DATE){var t=(new Date).getFullYear()-60;switch(this.fields){case c.YEAR:return t;case c.MONTH:return t+"-01";case c.DAY:return t+"-01-01"}}return""}},end:{type:String,default:function(){if(this.mode===s.TIME)return"23:59";if(this.mode===s.DATE){var t=(new Date).getFullYear()+60;switch(this.fields){case c.YEAR:return t;case c.MONTH:return t+"-12";case c.DAY:return t+"-12-31"}}return""}},disabled:{type:[Boolean,String],default:!1}},created:function(){var t=this;this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this}),Object.keys(this.$props).forEach((function(e){"name"!==e&&t.$watch(e,(function(n){var i={};i[e]=n,t._updatePicker(i)}))}))},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_show:function(){this.disabled||this._showPicker(Object.assign({},this.$props))},_showPicker:function(t){var e=this;if(this.mode===s.TIME||this.mode===s.DATE)plus.nativeUI[this.mode===s.TIME?"pickTime":"pickDate"]((function(t){var n=t.date;e.$trigger("change",{},{value:e.mode===s.TIME?"".concat(u(n.getHours()),":").concat(u(n.getMinutes())):"".concat(n.getFullYear(),"-").concat(u(n.getMonth()+1),"-").concat(u(n.getDate()))})}),(function(){e.$trigger("cancel",{},{})}),this.mode===s.TIME?{time:l(this.value,s.TIME)}:{date:l(this.value,s.DATE),minDate:l(this.start,s.DATE),maxDate:l(this.end,s.DATE)});else{var n={event:"cancel"};this.page=Object(a["a"])({url:"__uniapppicker",data:t,style:{titleNView:!1,animationType:"none",animationDuration:0,background:"rgba(0,0,0,0)",popGesture:"none"},onMessage:function(i){var r=i.event;if("created"!==r)return"columnchange"===r?(delete i.event,void e.$trigger(r,{},i)):void(n=i);e._updatePicker(t)},onClose:function(){e.page=null;var t=n.event;delete n.event,e.$trigger(t,{},n)}})}},_updatePicker:function(t){this.page&&this.page.sendMessage(t)}}},d=h,f=(n("76a8"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},"9a8b":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-icon",t._g({},t.$listeners),[n("i",{class:"uni-icon-"+t.type,style:{"font-size":t._converPx(t.size),color:t.color},attrs:{role:"img"}})])},r=[],o={name:"Icon",props:{type:{type:String,required:!0,default:""},size:{type:[String,Number],default:23},color:{type:String,default:""}},methods:{_converPx:function(t){if(/\d+[ur]px$/i.test(t))t.replace(/\d+[ur]px$/i,(function(t){return"".concat(uni.upx2px(parseFloat(t)),"px")}));else if(/^-?[\d\.]+$/.test(t))return"".concat(t,"px");return t||""}}},a=o,s=(n("7e6a"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"9b1f":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-progress",t._g({staticClass:"uni-progress"},t.$listeners),[n("div",{staticClass:"uni-progress-bar",style:t.outerBarStyle},[n("div",{staticClass:"uni-progress-inner-bar",style:t.innerBarStyle})]),t.showInfo?[n("p",{staticClass:"uni-progress-info"},[t._v(t._s(t.currentPercent)+"%")])]:t._e()],2)},r=[],o={activeColor:"#007AFF",backgroundColor:"#EBEBEB",activeMode:"backwards"},a={name:"Progress",props:{percent:{type:[Number,String],default:0,validator:function(t){return!isNaN(parseFloat(t,10))}},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator:function(t){return!isNaN(parseFloat(t,10))}},color:{type:String,default:o.activeColor},activeColor:{type:String,default:o.activeColor},backgroundColor:{type:String,default:o.backgroundColor},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:o.activeMode}},data:function(){return{currentPercent:0,strokeTimer:0,lastPercent:0}},computed:{outerBarStyle:function(){return"background-color: ".concat(this.backgroundColor,"; height: ").concat(this.strokeWidth,"px;")},innerBarStyle:function(){var t="";return t=this.color!==o.activeColor&&this.activeColor===o.activeColor?this.color:this.activeColor,"width: ".concat(this.currentPercent,"%;background-color: ").concat(t)},realPercent:function(){var t=parseFloat(this.percent,10);return t<0&&(t=0),t>100&&(t=100),t}},watch:{realPercent:function(t,e){this.strokeTimer&&clearInterval(this.strokeTimer),this.lastPercent=e||0,this._activeAnimation()}},created:function(){this._activeAnimation()},methods:{_activeAnimation:function(){var t=this;this.active?(this.currentPercent=this.activeMode===o.activeMode?0:this.lastPercent,this.strokeTimer=setInterval((function(){t.currentPercent+1>t.realPercent?(t.currentPercent=t.realPercent,t.strokeTimer&&clearInterval(t.strokeTimer)):t.currentPercent+=1}),30)):this.currentPercent=this.realPercent}}},s=a,c=(n("944e"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"9d20":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return d}));var i=n("f2b3"),r=n("a20d");function o(t,e){return c(t)||s(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)if(n.push(a.value),e&&n.length===e)break}catch(c){r=!0,o=c}finally{try{i||null==s["return"]||s["return"]()}finally{if(r)throw o}}return n}}function c(t){if(Array.isArray(t))return t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.addBatchVData.push([t,e,n])}},{key:"updateVData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.updateBatchVData.push([t,e])}},{key:"initVm",value:function(t){var e=this.addBatchVData.shift(),n=o(e,3),r=n[0],a=n[1],s=n[2];r?t._$id=r:(t._$id=Object(i["c"])(),console.error("cid unmatched",t)),Object.assign(t.$options,s),t.$r=a||Object.create(null),this.vms[t._$id]=t}},{key:"sendUIEvent",value:function(e,n,i){t.publishHandler(r["h"],{data:[[r["f"],[[e,n,i]]]],options:{timestamp:Date.now()}})}},{key:"clearAddBatchVData",value:function(){this.addBatchVData.length=0}},{key:"flush",value:function(){var t=this;this.updateBatchVData.forEach((function(e){var n=o(e,2),i=n[0],r=n[1],a=t.vms[i];if(!a)return console.error("Not found ".concat(i));Object.keys(r).forEach((function(t){Object.assign(a.$r[t]||(a.$r[t]=Object.create(null)),r[t])})),a.$forceUpdate()})),this.updateBatchVData.length=0}}]),e}()}).call(this,n("501c"))},"9f96":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-slider",t._g({ref:"uni-slider",on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-slider-wrapper"},[n("div",{staticClass:"uni-slider-tap-area"},[n("div",{staticClass:"uni-slider-handle-wrapper",style:t.setBgColor},[n("div",{ref:"uni-slider-handle",staticClass:"uni-slider-handle",style:t.setBlockBg}),n("div",{staticClass:"uni-slider-thumb",style:t.setBlockStyle}),n("div",{staticClass:"uni-slider-track",style:t.setActiveColor})])]),n("span",{directives:[{name:"show",rawName:"v-show",value:t.showValue,expression:"showValue"}],staticClass:"uni-slider-value"},[t._v(t._s(t.sliderValue))])]),t._t("default")],2)},r=[],o=n("8af1"),a=n("ba15"),s={name:"Slider",mixins:[o["a"],o["d"],a["a"]],props:{name:{type:String,default:""},min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0},step:{type:[Number,String],default:1},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#e9e9e9"},backgroundColor:{type:String,default:"#e9e9e9"},activeColor:{type:String,default:"#007aff"},selectedColor:{type:String,default:"#007aff"},blockColor:{type:String,default:"#ffffff"},blockSize:{type:[Number,String],default:28},showValue:{type:[Boolean,String],default:!1}},data:function(){return{sliderValue:Number(this.value)}},computed:{setBlockStyle:function(){return{width:this.blockSize+"px",height:this.blockSize+"px",marginLeft:-this.blockSize/2+"px",marginTop:-this.blockSize/2+"px",left:this._getValueWidth(),backgroundColor:this.blockColor}},setBgColor:function(){return{backgroundColor:this._getBgColor()}},setBlockBg:function(){return{left:this._getValueWidth()}},setActiveColor:function(){return{backgroundColor:this._getActiveColor(),width:this._getValueWidth()}}},watch:{value:function(t){this.sliderValue=Number(t)}},mounted:function(){this.touchtrack(this.$refs["uni-slider-handle"],"_onTrack")},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:{_onUserChangedValue:function(t){var e=this.$refs["uni-slider"],n=e.offsetWidth,i=e.getBoundingClientRect().left,r=(t.x-i)*(this.max-this.min)/n+Number(this.min);this.sliderValue=this._filterValue(r)},_filterValue:function(t){return tthis.max?this.max:Math.round((t-this.min)/this.step)*this.step+Number(this.min)},_getValueWidth:function(){return 100*(this.sliderValue-this.min)/(this.max-this.min)+"%"},_getBgColor:function(){return"#e9e9e9"!==this.backgroundColor?this.backgroundColor:"#007aff"!==this.color?this.color:"#007aff"},_getActiveColor:function(){return"#007aff"!==this.activeColor?this.activeColor:"#e9e9e9"!==this.selectedColor?this.selectedColor:"#e9e9e9"},_onTrack:function(t){if(!this.disabled)return"move"===t.detail.state?(this._onUserChangedValue({x:t.detail.x0}),this.$trigger("changing",t,{value:this.sliderValue}),!1):void("end"===t.detail.state&&this.$trigger("change",t,{value:this.sliderValue}))},_onClick:function(t){this.disabled||(this._onUserChangedValue(t),this.$trigger("change",t,{value:this.sliderValue}))},_resetFormData:function(){this.sliderValue=this.min},_getFormData:function(){var t={};return""!==this.name&&(t["value"]=this.sliderValue,t["key"]=this.name),t}}},c=s,u=(n("6428"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},a20d:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"k",(function(){return l})),n.d(e,"i",(function(){return h})),n.d(e,"b",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"l",(function(){return p}));var i=2,r=4,o=6,a=10,s=20,c="vdSync",u="__uniapp__service",l="webviewReady",h="vdSyncCallback",d="invokeApi",f="webviewInserted",p="webviewRemoved"},a20f:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var i=function(){var t=document.createElement("canvas");t.height=t.width=0;var e=t.getContext("2d"),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/n}(),r=function(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},o={fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all",setTransform:[4,5]},a=CanvasRenderingContext2D.prototype;function s(t){t.width=t.offsetWidth*i,t.height=t.offsetHeight*i,t.getContext("2d").__hidpi__=!0}a.drawImageByCanvas=function(t){return function(e,n,r,o,a,s,c,u,l,h){if(!this.__hidpi__)return t.apply(this,arguments);n*=i,r*=i,o*=i,a*=i,s*=i,c*=i,u=h?u*i:u,l=h?l*i:l,t.call(this,e,n,r,o,a,s,c,u,l)}}(a.drawImage),1!==i&&(r(o,(function(t,e){a[e]=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);var n=Array.prototype.slice.call(arguments);if("all"===t)n=n.map((function(t){return t*i}));else if(Array.isArray(t))for(var r=0;r0?t.split("/"):[];return s.splice(s.length-a-1,a+1),"/"+s.concat(r).join("/")}n.d(e,"a",(function(){return u}));var r,o=/^([a-z-]+:)?\/\//i,a=/^data:.*,.*/;function s(t){return plus.io.convertLocalFileSystemURL(t).replace(/^\/?apps\//,"/android_asset/apps/").replace(/\/$/,"")}function c(t){return r||(r="file://"+s("_www")+"/"),r+t}function u(t){if(0===t.indexOf("/")){if(0!==t.indexOf("//"))return c(t.substr(1));t="https:"+t}if(o.test(t)||a.test(t)||0===t.indexOf("blob:"))return t;if(0===t.indexOf("_www")||0===t.indexOf("_do"))return"file://"+s(t);var e=getCurrentPages();return e.length?c(i(e[e.length-1].$page.route,t).substr(1)):t}},a3e5:function(t,e,n){"use strict";var i=n("df1e"),r=n.n(i);r.a},a5ec:function(t,e,n){"use strict";var i=n("54bc"),r=n.n(i);r.a},a6bb:function(t,e,n){},add1:function(t,e,n){},b1a3:function(t,e,n){},b253:function(t,e,n){"use strict";function i(t){return i="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},i(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function c(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){var e=t.import("blots/block/embed"),n=function(t){function e(){return r(this,e),o(this,s(e).apply(this,arguments))}return c(e,t),e}(e);return n.blotName="divider",n.tagName="HR",{"formats/divider":n}};function h(t){return h="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},h(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function m(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var _=function(t){var e=t.import("blots/inline"),n=function(t){function e(){return d(this,e),f(this,v(e).apply(this,arguments))}return m(e,t),e}(e);return n.blotName="ins",n.tagName="INS",{"formats/ins":n}},y=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK,whitelist:["left","right","center","justify"]},o=new i.Style("align","text-align",r);return{"formats/align":o}},b=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK,whitelist:["rtl"]},o=new i.Style("direction","direction",r);return{"formats/direction":o}};function w(t){return w="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},w(t)}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){return!e||"object"!==w(e)&&"function"!==typeof e?$(t):e}function $(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,e){if(t instanceof i)I(A(n.prototype),"insertBefore",this).call(this,t,e);else{var r=null==e?this.length():e.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){I(A(n.prototype),"optimize",this).call(this,t);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&e.domNode.tagName===this.domNode.tagName&&e.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(e.moveChildren(this),e.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var i=e.create(this.statics.defaultChild);t.moveChildren(i),this.appendChild(i)}I(A(n.prototype),"replace",this).call(this,t)}}]),n}(n);return r.blotName="list",r.scope=e.Scope.BLOCK_BLOT,r.tagName=["OL","UL"],r.defaultChild="list-item",r.allowedChildren=[i],{"formats/list":r}},P=function(t){var e=t.import("parchment"),n=e.Scope,i=t.import("formats/background"),r=new i.constructor("backgroundColor","background-color",{scope:n.INLINE});return{"formats/backgroundColor":r}},N=n("f2b3"),D=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK},o=["margin","marginTop","marginBottom","marginLeft","marginRight"],a=["padding","paddingTop","paddingBottom","paddingLeft","paddingRight"],s={};return o.concat(a).forEach((function(t){s["formats/".concat(t)]=new i.Style(t,Object(N["g"])(t),r)})),s},L=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.INLINE},o=["font","fontSize","fontStyle","fontVariant","fontWeight","fontFamily"],a={};return o.forEach((function(t){a["formats/".concat(t)]=new i.Style(t,Object(N["g"])(t),r)})),a},R=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r=[{name:"lineHeight",scope:n.BLOCK},{name:"letterSpacing",scope:n.INLINE},{name:"textDecoration",scope:n.INLINE},{name:"textIndent",scope:n.BLOCK}],o={};return r.forEach((function(t){var e=t.name,n=t.scope;o["formats/".concat(e)]=new i.Style(e,Object(N["g"])(e),{scope:n})})),o},F=function(t){var e=t.import("formats/image");e.sanitize=function(t){return t}};function V(t){var e={divider:l,ins:_,align:y,direction:b,list:j,background:P,box:D,font:L,text:R,image:F},n={};Object.values(e).forEach((function(e){return Object.assign(n,e(t))})),t.register(n,!0)}n.d(e,"a",(function(){return V}))},b2bb:function(t,e,n){},b34d: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-form",t._g({},t.$listeners),[n("span",[t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Form",mixins:[o["d"]],data:function(){return{childrenList:[]}},listeners:{"@form-submit":"_onSubmit","@form-reset":"_onReset","@form-group-update":"_formGroupUpdateHandler"},methods:{_onSubmit:function(t){var e={};this.childrenList.forEach((function(t){t._getFormData&&t._getFormData().key&&(e[t._getFormData().key]=t._getFormData().value)})),this.$trigger("submit",t,{value:e})},_onReset:function(t){this.$trigger("reset",t,{}),this.childrenList.forEach((function(t){t._resetFormData&&t._resetFormData()}))},_formGroupUpdateHandler:function(t){if("add"===t.type)this.childrenList.push(t.vm);else{var e=this.childrenList.indexOf(t.vm);this.childrenList.splice(e,1)}}}},s=a,c=n("2877"),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},b705: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-rich-text",t._g({},t.$listeners),[n("div")])},r=[],o=n("18fd");function a(t){return t.replace(/<\?xml.*\?>\n/,"").replace(/\n/,"").replace(/\n/,"")}function s(t){return t.reduce((function(t,e){var n=e.value,i=e.name;return n.match(/ /)&&"style"!==i&&(n=n.split(" ")),t[i]?Array.isArray(t[i])?t[i].push(n):t[i]=[t[i],n]:t[i]=n,t}),{})}function c(t){t=a(t);var e=[],n={node:"root",children:[]};return Object(o["a"])(t,{start:function(t,i,r){var o={name:t};if(0!==i.length&&(o.attrs=s(i)),r){var a=e[0]||n;a.children||(a.children=[]),a.children.push(o)}else e.unshift(o)},end:function(t){var i=e.shift();if(i.name!==t&&console.error("invalid state: mismatch end tag"),0===e.length)n.children.push(i);else{var r=e[0];r.children||(r.children=[]),r.children.push(i)}},chars:function(t){var i={type:"text",text:t};if(0===e.length)n.children.push(i);else{var r=e[0];r.children||(r.children=[]),r.children.push(i)}},comment:function(t){var n={node:"comment",text:t},i=e[0];i.children||(i.children=[]),i.children.push(n)}}),n.children}var u=n("f2b3"),l={a:"",abbr:"",b:"",blockquote:"",br:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",ol:["start","type"],p:"",q:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","rowspan","height","width"],tfoot:"",th:["colspan","rowspan","height","width"],thead:"",tr:"",ul:""},h={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'"};function d(t){return t.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,(function(t,e){if(Object(u["d"])(h,e)&&h[e])return h[e];if(/^#[0-9]{1,4}$/.test(e))return String.fromCharCode(e.slice(1));if(/^#x[0-9a-f]{1,4}$/i.test(e))return String.fromCharCode("0"+e.slice(1));var n=document.createElement("div");return n.innerHTML=t,n.innerText||n.textContent}))}function f(t,e){return t.forEach((function(t){if(Object(u["f"])(t))if(Object(u["d"])(t,"type")&&"node"!==t.type)"text"===t.type&&"string"===typeof t.text&&""!==t.text&&e.appendChild(document.createTextNode(d(t.text)));else{if("string"!==typeof t.name||!t.name)return;var n=t.name.toLowerCase();if(!Object(u["d"])(l,n))return;var i=document.createElement(n);if(!i)return;var r=t.attrs;if(Object(u["f"])(r)){var o=l[n]||[];Object.keys(r).forEach((function(t){var e=r[t];switch(t){case"class":Array.isArray(e)&&(e=e.join(" "));case"style":i.setAttribute(t,e);break;default:-1!==o.indexOf(t)&&i.setAttribute(t,e)}}))}var a=t.children;Array.isArray(a)&&a.length&&f(t.children,i),e.appendChild(i)}})),e}var p={name:"RichText",props:{nodes:{type:[Array,String],default:function(){return[]}}},watch:{nodes:function(t){this._renderNodes(t)}},mounted:function(){this._renderNodes(this.nodes)},methods:{_renderNodes:function(t){"string"===typeof t&&(t=c(t));var e=f(t,document.createDocumentFragment());this.$el.firstChild.innerHTML="",this.$el.firstChild.appendChild(e)}}},v=p,m=n("2877"),g=Object(m["a"])(v,i,r,!1,null,null,null);e["default"]=g.exports},ba15:function(t,e,n){"use strict";var i=function(t,e,n,i){t.addEventListener(e,(function(t){"function"===typeof n&&!1===n(t)&&(t.preventDefault(),t.stopPropagation())}),{passive:!1})};e["a"]={methods:{touchtrack:function(t,e,n){var r=this,o=0,a=0,s=0,c=0,u=function(t,n,i,u){if(!1===r[e]({target:t.target,currentTarget:t.currentTarget,preventDefault:t.preventDefault.bind(t),stopPropagation:t.stopPropagation.bind(t),touches:t.touches,changedTouches:t.changedTouches,detail:{state:n,x0:i,y0:u,dx:i-o,dy:u-a,ddx:i-s,ddy:u-c,timeStamp:t.timeStamp}}))return!1},l=null;i(t,"touchstart",(function(t){if(1===t.touches.length&&!l)return l=t,o=s=t.touches[0].pageX,a=c=t.touches[0].pageY,u(t,"start",o,a)})),i(t,"touchmove",(function(t){if(1===t.touches.length&&l){var e=u(t,"move",t.touches[0].pageX,t.touches[0].pageY);return s=t.touches[0].pageX,c=t.touches[0].pageY,e}})),i(t,"touchend",(function(t){if(0===t.touches.length&&l)return l=null,u(t,"end",t.changedTouches[0].pageX,t.changedTouches[0].pageY)})),i(t,"touchcancel",(function(t){if(l){var e=l;return l=null,u(t,n?"cancel":"end",e.touches[0].pageX,e.touches[0].pageY)}}))}}}},bacd: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-canvas",t._g({attrs:{"canvas-id":t.canvasId,"disable-scroll":t.disableScroll}},t._listeners),[n("canvas",{ref:"canvas",attrs:{width:"300",height:"150"}}),n("div",{staticStyle:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden"}},[t._t("default")],2),n("v-uni-resize-sensor",{ref:"sensor",on:{resize:t._resize}})],1)},r=[],o=n("e1df"),a=o["a"],s=(n("0741"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},bfea:function(t,e,n){"use strict";var i=n("4e0b"),r=n.n(i);r.a},c0e5:function(t,e,n){},c33a:function(t,e,n){},c418:function(t,e,n){},c4c5:function(t,e,n){"use strict";(function(t,i){n.d(e,"a",(function(){return f}));var r=n("f2b3");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;n1&&(e[n[0].trim()]=n[1].trim())}})),e}var d=function(){function e(t){o(this,e),this.$vm=t,this.$el=t.$el}return s(e,[{key:"selectComponent",value:function(t){if(this.$el&&t){var e=this.$el.querySelector(t);return e&&e.__vue__&&f(e.__vue__,!1)}}},{key:"selectAllComponents",value:function(t){if(!this.$el||!t)return[];for(var e=[],n=this.$el.querySelectorAll(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};this.$vm[e]?this.$vm[e](JSON.parse(JSON.stringify(n))):this.$vm._$id&&t.publishHandler("onWxsInvokeCallMethod",{cid:this.$vm._$id,method:e,args:n})}},{key:"requestAnimationFrame",value:function(t){return i.requestAnimationFrame(t),this}},{key:"getState",value:function(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}},{key:"triggerEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.$vm.$emit(t,e),this}}]),e}();function f(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&t&&t.$options.name&&0===t.$options.name.indexOf("VUni")&&(t=t.$parent),t&&t.$el)return t.$el.__wxsComponentDescriptor||(t.$el.__wxsComponentDescriptor=new d(t)),t.$el.__wxsComponentDescriptor}}).call(this,n("501c"),n("c8ba"))},c61c:function(t,e,n){"use strict";n.r(e);var i=n("f2b3");function r(t){return Math.sqrt(t.x*t.x+t.y*t.y)}var o,a,s={name:"MovableArea",props:{scaleArea:{type:Boolean,default:!1}},data:function(){return{width:0,height:0,items:[]}},created:function(){this.gapV={x:null,y:null},this.pinchStartLen=null},mounted:function(){this._resize()},methods:{_resize:function(){this._getWH(),this.items.forEach((function(t,e){t.componentInstance.setParent()}))},_find:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.items,n=this.$el;function i(t){for(var r=0;r1){var n={x:e[1].pageX-e[0].pageX,y:e[1].pageY-e[0].pageY};if(this.pinchStartLen=r(n),this.gapV=n,!this.scaleArea){var o=this._find(e[0].target),a=this._find(e[1].target);this._scaleMovableView=o&&o===a?o:null}}},_touchmove:function(t){var e=t.touches;if(e&&e.length>1){t.preventDefault();var n={x:e[1].pageX-e[0].pageX,y:e[1].pageY-e[0].pageY};if(null!==this.gapV.x&&this.pinchStartLen>0){var i=r(n)/this.pinchStartLen;this._updateScale(i)}this.gapV=n}},_touchend:function(t){Object(i["b"])({disable:!1});var e=t.touches;e&&e.length||t.changedTouches&&(this.gapV.x=0,this.gapV.y=0,this.pinchStartLen=null,this.scaleArea?this.items.forEach((function(t){t.componentInstance._endScale()})):this._scaleMovableView&&this._scaleMovableView.componentInstance._endScale())},_updateScale:function(t){t&&1!==t&&(this.scaleArea?this.items.forEach((function(e){e.componentInstance._setScale(t)})):this._scaleMovableView&&this._scaleMovableView.componentInstance._setScale(t))},_getWH:function(){var t=window.getComputedStyle(this.$el),e=this.$el.getBoundingClientRect();this.width=e.width-["Left","Right"].reduce((function(e,n){return e+parseFloat(t["border"+n+"Width"])+parseFloat(t["padding"+n])}),0),this.height=e.height-["Top","Bottom"].reduce((function(e,n){return e+parseFloat(t["border"+n+"Width"])+parseFloat(t["padding"+n])}),0)}},render:function(t){var e=this,n=[];this.$slots.default&&this.$slots.default.forEach((function(t){t.componentOptions&&"v-uni-movable-view"===t.componentOptions.tag&&n.push(t)})),this.items=n;var i=Object.assign({},this.$listeners),r=["touchstart","touchmove","touchend"];return r.forEach((function(t){var n=i[t],r=e["_".concat(t)];i[t]=n?[].concat(n,r):r})),t("uni-movable-area",{on:i},[t("v-uni-resize-sensor",{on:{resize:this._resize}}),this.$slots.default])}},c=s,u=(n("a3e5"),n("2877")),l=Object(u["a"])(c,o,a,!1,null,null,null);e["default"]=l.exports},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}t.exports=n},c8ed:function(t,e,n){"use strict";var i=n("72ad"),r=n.n(i);r.a},c96e:function(t,e,n){"use strict";var i=n("1307"),r=n.n(i);r.a},cc89:function(t,e,n){},ce51:function(t,e,n){},d3bd:function(t,e,n){"use strict";n.r(e);var i,r,o=n("8af1"),a={name:"Button",mixins:[o["b"],o["a"],o["d"]],props:{hoverClass:{type:String,default:"button-hover"},disabled:{type:[Boolean,String],default:!1},id:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},formType:{type:String,default:"",validator:function(t){return~["","submit","reset"].indexOf(t)}}},data:function(){return{clickFunction:null}},methods:{_onClick:function(t,e){this.disabled||(e&&this.$el.click(),this.formType&&this.$dispatch("Form","submit"===this.formType?"uni-form-submit":"uni-form-reset",{type:this.formType}))},_bindObjectListeners:function(t,e){if(e)for(var n in e){var i=t.on[n],r=e[n];t.on[n]=i?[].concat(i,r):r}return t}},render:function(t){var e=this,n=Object.create(null);return this.$listeners&&Object.keys(this.$listeners).forEach((function(t){(!e.disabled||"click"!==t&&"tap"!==t)&&(n[t]=e.$listeners[t])})),this.hoverClass&&"none"!==this.hoverClass?t("uni-button",this._bindObjectListeners({class:[this.hovering?this.hoverClass:""],attrs:{disabled:this.disabled},on:{touchstart:this._hoverTouchStart,touchend:this._hoverTouchEnd,touchcancel:this._hoverTouchCancel,click:this._onClick}},n),this.$slots.default):t("uni-button",this._bindObjectListeners({class:[this.hovering?this.hoverClass:""],attrs:{disabled:this.disabled},on:{click:this._onClick}},n),this.$slots.default)},listeners:{"label-click":"_onClick","@label-click":"_onClick"}},s=a,c=(n("5676"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},d4b6:function(t,e,n){"use strict";var i=n("f2b3"),r=n("85b6");function o(t){return Object.assign({mp:t,_processed:!0},t)}var a=n("1e88");function s(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var n={id:t.id,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,dataset:Object(r["c"])(t.dataset)};return e&&Object.assign(n,e),n}function c(t){if(t){for(var e=[],n=Object(a["a"])(),i=n.top,r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e._processed)return e.type=n.type||t,e;if("click"===t){var u=Object(a["a"])(),l=u.top;n={x:e.x,y:e.y-l},e.touches=e.changedTouches=[{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}]}var h=o({type:n.type||t,timeStamp:e.timeStamp||0,detail:n,target:s(i,n),currentTarget:s(r,!1,!0),touches:e instanceof Event||e instanceof CustomEvent?c(e.touches):e.touches,changedTouches:e instanceof Event||e instanceof CustomEvent?c(e.changedTouches):e.changedTouches,preventDefault:function(){},stopPropagation:function(){}}),d=r.getAttribute("_i");return h.options={nid:d},h.$origCurrentTarget=r,h}n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return y}));var l=350,h=10,d=!!i["i"]&&{passive:!0},f=!1;function p(){f&&(clearTimeout(f),f=!1)}var v=0,m=0;function g(t){if(p(),1===t.touches.length){var e=t.touches[0],n=e.pageX,i=e.pageY;v=n,m=i,f=setTimeout((function(){var e=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:t.target,currentTarget:t.currentTarget});e.touches=t.touches,e.changedTouches=t.changedTouches,t.target.dispatchEvent(e)}),l)}}function _(t){if(f){if(1!==t.touches.length)return p();var e=t.touches[0],n=e.pageX,i=e.pageY;return Math.abs(n-v)>h||Math.abs(i-m)>h?p():void 0}}function y(){window.addEventListener("touchstart",g,d),window.addEventListener("touchmove",_,d),window.addEventListener("touchend",p,d),window.addEventListener("touchcancel",p,d)}},d5ec: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-radio-group",t._g({},t.$listeners),[t._t("default")],2)},r=[],o=n("8af1"),a={name:"RadioGroup",mixins:[o["a"],o["d"]],props:{name:{type:String,default:""}},data:function(){return{radioList:[]}},listeners:{"@radio-change":"_changeHandler","@radio-group-update":"_radioGroupUpdateHandler"},mounted:function(){this._resetRadioGroupValue(this.radioList.length-1)},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,e){var n=this.radioList.indexOf(e);this._resetRadioGroupValue(n,!0),this.$trigger("change",t,{value:e.radioValue})},_radioGroupUpdateHandler:function(t){if("add"===t.type)this.radioList.push(t.vm);else{var e=this.radioList.indexOf(t.vm);this.radioList.splice(e,1)}},_resetRadioGroupValue:function(t,e){var n=this;this.radioList.forEach((function(i,r){r!==t&&(e?n.radioList[r].radioChecked=!1:n.radioList.forEach((function(t,e){r>=e||n.radioList[e].radioChecked&&(n.radioList[r].radioChecked=!1)})))}))},_getFormData:function(){var t={};if(""!==this.name){var e="";this.radioList.forEach((function(t){t.radioChecked&&(e=t.value)})),t["value"]=e,t["key"]=this.name}return t}}},s=a,c=(n("fb61"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},d8c8:function(t,e,n){"use strict";var i,r,o=["top","left","right","bottom"],a={};function s(){return r="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":"",r}function c(){if(r="string"===typeof r?r:s(),r){var t=[],e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e={passive:!0}}});window.addEventListener("test",null,n)}catch(f){}var c=document.createElement("div");u(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),o.forEach((function(t){d(c,t)})),document.body.appendChild(c),l(),i=!0}else o.forEach((function(t){a[t]=0}));function u(t,e){var n=t.style;Object.keys(e).forEach((function(t){var i=e[t];n[t]=i}))}function l(e){e?t.push(e):t.forEach((function(t){t()}))}function d(t,n){var i=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div"),c=document.createElement("div"),d=100,f=1e4,p={position:"absolute",width:d+"px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"(safe-area-inset-"+n+")"};u(i,p),u(o,p),u(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),u(c,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),o.appendChild(c),t.appendChild(i),t.appendChild(o),l((function(){i.scrollTop=o.scrollTop=f;var t=i.scrollTop,r=o.scrollTop;function a(){this.scrollTop!==(this===i?t:r)&&(i.scrollTop=o.scrollTop=f,t=i.scrollTop,r=o.scrollTop,h(n))}i.addEventListener("scroll",a,e),o.addEventListener("scroll",a,e)}));var v=getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return parseFloat(v.paddingBottom)}})}}function u(t){return i||c(),a[t]}var l=[];function h(t){l.length||setTimeout((function(){var t={};l.forEach((function(e){t[e]=a[e]})),l.length=0,d.forEach((function(e){e(t)}))}),0),l.push(t)}var d=[];function f(t){s()&&(i||c(),"function"===typeof t&&d.push(t))}function p(t){var e=d.indexOf(t);e>=0&&d.splice(e,1)}var v={get support(){return 0!=("string"===typeof r?r:s()).length},get top(){return u("top")},get left(){return u("left")},get right(){return u("right")},get bottom(){return u("bottom")},onChange:f,offChange:p};t.exports=v},db18:function(t,e,n){"use strict";var i=n("db76"),r=n.n(i);r.a},db76:function(t,e,n){},db8e:function(t,e,n){"use strict";function i(t,e){if(t===e._$id)return e;for(var n=e.$children,r=n.length,o=0;o=0;i--){var r=t[i];"."===r?t.splice(i,1):".."===r?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function i(t){"string"!==typeof t&&(t+="");var e,n=0,i=-1,r=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!r){n=e+1;break}}else-1===i&&(r=!1,i=e+1);return-1===i?"":t.slice(n,i)}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===o(t,-1);return t=n(r(t.split("/"),(function(t){return!!t})),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function i(t){for(var e=0;e=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var r=i(t.split("/")),o=i(n.split("/")),a=Math.min(r.length,o.length),s=a,c=0;c=1;--o)if(e=t.charCodeAt(o),47===e){if(!r){i=o;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"/":t.slice(0,i)},e.basename=function(t,e){var n=i(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,i=-1,r=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===i&&(r=!1,i=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!r){n=a+1;break}}return-1===e||-1===i||0===o||1===o&&e===i-1&&e===n+1?"":t.slice(e,i)};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e1df:function(t,e,n){"use strict";(function(t){var i,r=n("8af1"),o=n("a20f");function a(t){return u(t)||c(t)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function c(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function u(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i||(i=document.createElement("canvas")),i.width=t,i.height=e,i}e["a"]={name:"Canvas",mixins:[r["e"]],props:{canvasId:{type:String,default:""},disableScroll:{type:[Boolean,String],default:!1}},data:function(){return{actionsWaiting:!1}},computed:{id:function(){return this.canvasId},_listeners:function(){var t=this,e=Object.assign({},this.$listeners),n=["touchstart","touchmove","touchend"];return n.forEach((function(n){var i=e[n],r=[];i&&r.push((function(e){t.$trigger(n,Object.assign({},e,{touches:h(e.currentTarget,e.touches),changedTouches:h(e.currentTarget,e.changedTouches)}))})),t.disableScroll&&"touchmove"===n&&r.push(t._touchmove),e[n]=r})),e}},created:function(){this._actionsDefer=[],this._images={}},mounted:function(){this._resize({width:this.$refs.sensor.$el.offsetWidth,height:this.$refs.sensor.$el.offsetHeight})},beforeDestroy:function(){var t=this.$refs.canvas;t.height=t.width=0},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n,r=this[e];0!==e.indexOf("_")&&"function"===typeof r&&r(i)},_resize:function(){Object(o["b"])(this.$refs.canvas)},_touchmove:function(t){t.preventDefault()},actionsChanged:function(e){var n=this,i=e.actions,r=e.reserve,o=e.callbackId,s=this;if(i)if(this.actionsWaiting)this._actionsDefer.push([i,r,o]);else{var c=this.$refs.canvas,u=c.getContext("2d");r||(u.fillStyle="#000000",u.strokeStyle="#000000",u.shadowColor="#000000",u.shadowBlur=0,u.shadowOffsetX=0,u.shadowOffsetY=0,u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,c.width,c.height)),this.preloadImage(i);var h=function(t){var e=i[t],r=e.method,c=e.data;if(/^set/.test(r)&&"setTransform"!==r){var h,d=r[3].toLowerCase()+r.slice(4);if("fillStyle"===d||"strokeStyle"===d){if("normal"===c[0])h=l(c[1]);else if("linear"===c[0]){var v=u.createLinearGradient.apply(u,a(c[1]));c[2].forEach((function(t){var e=t[0],n=l(t[1]);v.addColorStop(e,n)})),h=v}else if("radial"===c[0]){var m=c[1][0],g=c[1][1],_=c[1][2],y=u.createRadialGradient(m,g,0,m,g,_);c[2].forEach((function(t){var e=t[0],n=l(t[1]);y.addColorStop(e,n)})),h=y}else if("pattern"===c[0]){var b=n.checkImageLoaded(c[1],i.slice(t+1),o,(function(t){t&&(u[d]=u.createPattern(t,c[2]))}));return b?"continue":"break"}u[d]=h}else"globalAlpha"===d?u[d]=c[0]/255:"shadow"===d?(f=["shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor"],c.forEach((function(t,e){u[f[e]]="shadowColor"===f[e]?l(t):t}))):"fontSize"===d?u.font=u.font.replace(/\d+\.?\d*px/,c[0]+"px"):"lineDash"===d?(u.setLineDash(c[0]),u.lineDashOffset=c[1]||0):"textBaseline"===d?("normal"===c[0]&&(c[0]="alphabetic"),u[d]=c[0]):u[d]=c[0]}else if("fillPath"===r||"strokePath"===r)r=r.replace(/Path/,""),u.beginPath(),c.forEach((function(t){u[t.method].apply(u,t.data)})),u[r]();else if("fillText"===r)u.fillText.apply(u,c);else if("drawImage"===r){if(p=function(){var e=a(c),n=e[0],r=e.slice(1);if(s._images=s._images||{},!s.checkImageLoaded(n,i.slice(t+1),o,(function(t){t&&u.drawImage.apply(u,[t].concat(a(r.slice(4,8)),a(r.slice(0,4))))})))return"break"}(),"break"===p)return"break"}else"clip"===r?(c.forEach((function(t){u[t.method].apply(u,t.data)})),u.clip()):u[r].apply(u,c)};t:for(var d=0;d10&&(e=2*Math.round(e/2)),this.$el.style.height=e+"px",this.sizeFixed=!0}},_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},1307:function(t,e,n){},1364:function(t,e,n){"use strict";(function(t){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;n should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab")}}},c=s,u=(n("f7fd"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},"18fd":function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,o=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,a=f("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),s=f("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=f("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=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),l=f("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),h=f("script,style");function d(t,e){var n,d,f,p=[],v=t;p.last=function(){return this[this.length-1]};while(t){if(d=!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),""})),_("",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),d=!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}}_()}function f(t){for(var e={},n=t.split(","),i=0;i*{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["b"])({disable:!0});break;case"move":this._handleTouchMove(t);break;case"end":case"cancel":this._handleTouchEnd(t),Object(s["b"])({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])])])}},d=h,f=(n("edfa"),n("2877")),p=Object(f["a"])(d,u,l,!1,null,null,null);e["default"]=p.exports},"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["e"])(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},"1e88":function(t,e,n){"use strict";function i(){return{top:0,bottom:0}}n.d(e,"a",(function(){return i}))},"1efd":function(t,e,n){"use strict";n.r(e);var i=n("e571"),r=n("a34f"),o=n("d4b6"),a={methods:{$getRealPath:function(t){return Object(r["a"])(t)},$trigger:function(t,e,n){this.$emit(t,o["b"].call(this,t,e,n,this.$el,this.$el))}}};function s(t){return l(t)||u(t)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function u(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function l(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=0&&(a.length=1),l.push("".concat(o,"(").concat(a.join(","),")"));else if(i.concat(r).includes(a[0])){o=a[0];var c=a[1];u[o]=r.includes(o)?h(c):c}})),u.transform=u.webkitTransform=l.join(" "),u.transition=u.webkitTransition=Object.keys(u).map((function(t){return"".concat(d(t)," ").concat(c.duration,"ms ").concat(c.timingFunction," ").concat(c.delay,"ms")})).join(","),u.transformOrigin=u.webkitTransformOrigin=a.transformOrigin,u}function p(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=f(e);Object.keys(s).forEach((function(e){t.$el.style[e]=s[e]})),n+=1,n0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger(n,{},e)}))}))},beforeDestroy:function(){this.video&&this.video.close(),delete this.video},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;if(c.includes(e)){if("object"===s(i))switch(e){case"seek":i=i.position;break;case"playbackRate":i=i.rate;break;case"requestFullScreen":i=i.direction;break}this.video&&this.video[e](i)}}}},d=h,f=(n("7f2f"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},2190:function(t,e,n){},"21c3":function(t,e,n){"use strict";var i=n("2937"),r=n.n(i);r.a},2376:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n("f2b3"),r=Object.create(null);function o(t,e){r[t]=e}var a=Object(i["a"])((function(t){return r[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["c"]],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:""},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.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=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}:{}}}},u=c,l=(n("0f55"),n("2877")),h=Object(l["a"])(u,i,r,!1,null,null,null);e["default"]=h.exports},2522:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="onPageCreate"},"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["d"]],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},"27ab":function(t,e,n){"use strict";function i(t){return a(t)||o(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function o(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function a(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=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&&this.$slots.default.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)])}},l=u,h=(n("6062"),n("2877")),d=Object(h["a"])(l,s,c,!1,null,null,null);e["default"]=d.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("3e4d"),a=o["a"],s=(n("e298"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"27ef":function(t,e,n){"use strict";var i=n("a250"),r=n.n(i);r.a},"286b":function(t,e,n){"use strict";(function(t){var i=n("8af1"),r=n("0aa0"),o=["getCenterLocation","moveToLocation","getRegion","getScale","$getAppMap"],a=["latitude","longitude","scale","markers","polyline","circles","controls","show-location"],s=function(t,e,n){n({coord:{latitude:e,longitude:t}})};function c(t){if(0!==t.indexOf("#"))return{color:t,opacity:1};var e=t.substr(7,2);return{color:t.substr(0,7),opacity:e?Number("0x"+e)/255:1}}e["a"]={name:"Map",mixins:[i["e"],r["a"]],props:{id:{type:String,default:""},latitude:{type:[Number,String],default:""},longitude:{type:[Number,String],default:""},scale:{type:[String,Number],default:1},markers:{type:Array,default:function(){return[]}},polyline:{type:Array,default:function(){return[]}},circles:{type:Array,default:function(){return[]}},controls:{type:Array,default:function(){return[]}}},data:function(){return{style:{top:"0px",left:"0px",width:"0px",height:"0px",position:"static"},hidden:!1}},computed:{attrs:function(){var t=this,e={};return a.forEach((function(n){var i=t.$props[n];i="src"===n?t.$getRealPath(i):i,e[n.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))]=i})),e},mapControls:function(){var t=this,e=this.controls.map((function(e){var n={position:"absolute"};return["top","left","width","height"].forEach((function(t){e.position[t]&&(n[t]=e.position[t]+"px")})),{id:e.id,iconPath:t.$getRealPath(e.iconPath),position:n}}));return e}},watch:{hidden:function(t){this.map&&this.map[t?"hide":"show"]()},latitude:function(t){this.map&&this.map.setStyles({center:new plus.maps.Point(this.longitude,this.latitude)})},longitude:function(t){this.map&&this.map.setStyles({center:new plus.maps.Point(this.longitude,this.latitude)})},markers:function(t){this.map&&this._addMarkers(t)},polyline:function(t){this.map&&this._addMapLines(t)},circles:function(t){this.map&&this._addMapCircles(t)}},mounted:function(){var t=this,e=Object.assign({},this.attrs,this.position);this.latitude&&this.longitude&&(e.center=new plus.maps.Point(this.longitude,this.latitude));var n=this.map=plus.maps.create(this.$page.id+"-map-"+(this.id||Date.now()),e);n.__markers__={},n.__lines__=[],n.__circles__=[],plus.webview.currentWebview().append(n),this.hidden&&n.hide(),this.$watch("position",(function(){t.map&&t.map.setStyles(t.position)}),{deep:!0}),n.onclick((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger("tap",{},e)})),n.onstatuschanged((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.$trigger("end",{},e)})),this._addMarkers(this.markers),this._addMapLines(this.polyline),this._addMapCircles(this.circles)},beforeDestroy:function(){delete this.map},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;o.includes(e)&&this.map&&this[e](i)},moveToLocation:function(t){this.map.setCenter(new plus.maps.Point(this.longitude,this.latitude))},getCenterLocation:function(t){var e=t.callbackId,n=this.map.getCenter();this._publishHandler(e,{longitude:n.longitude,latitude:n.latitude,errMsg:"getCenterLocation:ok"})},getRegion:function(t){var e=t.callbackId,n=this.map.getBounds();this._publishHandler(e,{southwest:n.southwest,northeast:n.northeast||n.northease,errMsg:"getRegion:ok"})},getScale:function(t){var e=t.callbackId;this._publishHandler(e,{scale:this.map.getZoom(),errMsg:"getScale:ok"})},controlclick:function(t){this.$trigger("controltap",{},{id:t.id})},_publishHandler:function(e,n){t.publishHandler("onMapMethodCallback",{callbackId:e,data:n},this.$page.id)},_addMarker:function(t,e){var n=this,i=e.id,r=e.latitude,o=e.longitude,a=e.iconPath,c=e.callout,u=e.label;s(o,r,(function(e){var r=e.coord,o=r.latitude,s=r.longitude,l=new plus.maps.Marker(new plus.maps.Point(s,o));a&&l.setIcon(n.$getRealPath(a)),u&&u.content&&l.setLabel(u.content);var h=!1;c&&c.content&&(h=new plus.maps.Bubble(c.content)),h&&l.setBubble(h),(i||0===i)&&(l.onclick=function(t){n.$trigger("markertap",{},{id:i})},h&&(h.onclick=function(){n.$trigger("callouttap",{},{id:i})})),t.addOverlay(l),t.__markers__[i+""]=l}))},_addMarkers:function(t,e){var n=this;return this.map?(e&&this.map.clearOverlays(),t.forEach((function(t){n._addMarker(n.map,t)})),{errMsg:"addMapMarkers:ok"}):{errMsg:"addMapMarkers:fail:请先创建地图元素"}},_translateMapMarker:function(t){t.autoRotate,t.callbackId;var e=t.destination,n=(t.duration,t.markerId);if(this.map){var i=this.map.__markers__[n+""];i&&i.setPoint(new plus.maps.Point(e.longitude,e.latitude))}return{errMsg:"translateMapMarker:ok"}},_addMapLines:function(t){var e=this.map;return e?(e.__lines__.length>0&&(e.__lines__.forEach((function(t){e.removeOverlay(t)})),e.__lines__=[]),t.forEach((function(t){var n=t.color,i=t.width,r=t.points.map((function(t){return new plus.maps.Point(t.longitude,t.latitude)})),o=new plus.maps.Polyline(r);if(n){var a=c(n);o.setStrokeColor(a.color),o.setStrokeOpacity(a.opacity)}i&&o.setLineWidth(i),e.addOverlay(o),e.__lines__.push(o)})),{errMsg:"addMapLines:ok"}):{errMsg:"addMapLines:fail:请先创建地图元素"}},_addMapCircles:function(t){var e=this.map;return e?(e.__circles__.length>0&&(e.__circles__.forEach((function(t){e.removeOverlay(t)})),e.__circles__=[]),t.forEach((function(t){var n=t.latitude,i=t.longitude,r=t.color,o=t.fillColor,a=t.radius,s=t.strokeWidth,u=new plus.maps.Circle(new plus.maps.Point(i,n),a);if(r){var l=c(r);u.setStrokeColor(l.color),u.setStrokeOpacity(l.opacity)}if(o){var h=c(o);u.setFillColor(h.color),u.setFillOpacity(h.opacity)}s&&u.setLineWidth(s),e.addOverlay(u),e.__circles__.push(u)})),{errMsg:"addMapCircles:ok"}):{errMsg:"addMapCircles:fail:请先创建地图元素"}}}}}).call(this,n("501c"))},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}))},2937: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},"2c45":function(t,e,n){},"2df3":function(t,e,n){"use strict";var i=n("b1a3"),r=n.n(i);r.a},"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("5bb5");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,d=!0;function f(){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&&d&&(c()||(i=setTimeout(c,300))),l=!1}function c(){if(f())return Object(r["a"])("onReachBottom",{},e),d=!1,setTimeout((function(){d=!0}),350),!0}}return function(){clearTimeout(i),l||requestAnimationFrame(p),l=!0}}}).call(this,n("501c"))},"39ba":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-cover-view",t._g({},t.$listeners),[n("div",{ref:"container",staticClass:"uni-cover-view"})])},r=[],o=n("0aa0"),a=n("5077"),s={name:"CoverView",mixins:[o["a"],a["a"]],props:{},data:function(){return{coverType:"text",coverContent:""}},watch:{},mounted:function(){this._updateContent(),this.$watch("$slot",this._updateContent)},methods:{_updateContent:function(t){var e=this,n=this.$slots.default||[];n.forEach((function(t){t.tag||(e.coverContent+=t.text||"")}))}}},c=s,u=(n("4ba9"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},"3c47":function(t,e,n){"use strict";(function(t){var i=n("8af1");e["a"]={name:"Label",mixins:[i["a"]],props:{for:{type:String,default:""}},methods:{_onClick:function(e){var n=/^uni-(checkbox|radio|switch)-/.test(e.target.className);n||(n=/^uni-(checkbox|radio|switch|button)$/i.test(e.target.tagName)),n||(this.for?t.emit("uni-label-click-"+this.$page.id+"-"+this.for,e,!0):this.$broadcast(["Checkbox","Radio","Switch","Button"],"uni-label-click",e,!0))}}}}).call(this,n("501c"))},"3c79":function(t,e,n){},"3e4d":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["e"],i["a"],i["c"]],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 d=c.name,f=void 0===d?"":d,p=c.value,v=void 0!==p&&p;i=l.getSelection(!0);var m=l.getFormat(i)[f]||!1;if(["bold","italic","underline","strike","ins"].includes(f))v=!m;else if("direction"===f){v=("rtl"!==v||!m)&&v;var g=l.getFormat(i).align;"rtl"!==v||g?v||"right"!==g||l.format("align",!1,h.sources.USER):l.format("align","right",h.sources.USER)}else if("indent"===f){var _="rtl"===l.getFormat(i).direction;v="+1"===v,_&&(v=!v),v=v?"+1":"-1"}else"list"===f&&(v="check"===v?"unchecked":v,m="checked"===m?"unchecked":m),v=m&&m!==(v||!1)||!m&&v?v:!m;l.format(f,v,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,b=void 0===y?"":y,w=c.alt,x=void 0===w?"":w,S=c.data,k=void 0===S?{}:S;l.insertEmbed(i.index,"image",this.$getRealPath(b),h.sources.USER),l.formatText(i.index,1,"alt",x),l.formatText(i.index,1,"data-custom",Object.keys(k).map((function(t){return"".concat(t,"=").concat(k[t])})).join("&")),l.setSelection(i.index+1,h.sources.SILENT);break;case"insertText":i=l.getSelection(!0);var $=c.text,C=void 0===$?"":$;l.insertText(i.index,C,h.sources.USER),l.setSelection(i.index+C.length,0,h.sources.SILENT);break;case"setContents":var T=c.delta,O=c.html;"object"===a(T)?l.setContents(T,h.sources.SILENT):"string"===typeof O?l.setContents(this.html2delta(O),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 E=h.import("parchment");i.length?l.removeFormat(i,h.sources.USER):Object.keys(l.getFormat(i)).forEach((function(t){E.query(t,E.Scope.INLINE)&&l.format(t,!1)}));break;case"undo":l.history.undo();break;case"redo":l.history.redo();break;default:break}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"];s.forEach((function(t){a.addEventListener(t,(function(n){e.$trigger(t,n,e.getContents())}))})),r.on(n.events.TEXT_CHANGE,(function(){e.$trigger("input",{},e.getContents())})),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}}}}).call(this,n("501c"))},"3e5d":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return k}));var i,r,o,a=n("e571"),s=n("a20d"),c=n("2522"),u=n("9d20"),l=n("9856"),h=n("2376");function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return m(t)||v(t,e)||p()}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function v(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)if(n.push(a.value),e&&n.length===e)break}catch(c){r=!0,o=c}finally{try{i||null==s["return"]||s["return"]()}finally{if(r)throw o}}return n}}function m(t){if(Array.isArray(t))return t}var g=(i={},d(i,s["d"],(function(e){var n=f(e,3),i=n[0],a=n[1],s=n[2];document.title="".concat(a,"[").concat(i,"]"),Object(l["b"])(i,a),t.subscribeHandler(c["a"],s,i),o=Object(h["b"])(a),r=new u["a"](i)})),d(i,s["c"],(function(t){r.addVData.apply(r,t)})),d(i,s["g"],(function(t){r.updateVData.apply(r,t)})),d(i,s["e"],(function(t){var e=f(t,2),n=e[0],i=e[1],r=getCurrentPages()[0];r.$vm=new o({mpType:"page",pageId:n,pagePath:i}).$mount("#app")})),i);function _(t,e,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")),t}},render:function(t){var e=this,n=[];return this.$slots.default&&this.$slots.default.forEach((function(i){if(i.text){var r=i.text.replace(/\\n/g,"\n"),o=r.split("\n");o.forEach((function(i,r){n.push(e._decodeHtml(i)),r!==o.length-1&&n.push(t("br"))}))}else i.componentOptions&&"v-uni-text"!==i.componentOptions.tag&&console.warn(" 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。"),n.push(i)})),t("uni-text",{on:this.$listeners,attrs:{selectable:!!this.selectable}},[t("span",{},n)])}},s=a,c=(n("c8ed"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"4e0b":function(t,e,n){},"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({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["d"]],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},"501c":function(t,e,n){"use strict";n.r(e);var i=n("e571");function r(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 o=n("6bdf"),a=n("5dc1"),s={setPageMeta:r,requestComponentInfo:o["a"],requestComponentObserver:a["b"],destroyComponentObserver:a["a"]},c=n("33ed"),u=n("7107"),l=n("0516");function h(t){Object.keys(s).forEach((function(e){t(e,s[e])})),t("pageScrollTo",c["c"]),t("loadFontFace",u["a"]),Object(l["a"])(t)}var d=n("5bb5");n.d(e,"on",(function(){return p})),n.d(e,"off",(function(){return v})),n.d(e,"once",(function(){return m})),n.d(e,"emit",(function(){return g})),n.d(e,"subscribe",(function(){return _})),n.d(e,"unsubscribe",(function(){return y})),n.d(e,"subscribeHandler",(function(){return b})),n.d(e,"publishHandler",(function(){return d["a"]}));var f=new i["a"],p=f.$on.bind(f),v=f.$off.bind(f),m=f.$once.bind(f),g=f.$emit.bind(f);function _(t,e){return p("service."+t,e)}function y(t,e){return v("service."+t,e)}function b(t,e,n){g("service."+t,e,n)}h(_)},5077:function(t,e,n){"use strict";var i=["padding","borderRadius","borderColor","borderWidth","backgroundColor"],r=["color","textAlign","lineHeight","fontSize","fontWeight","textOverflow","whiteSpace"],o=[],a={start:"left",end:"right"},s=0;e["a"]={name:"Cover",data:function(){return{style:{}}},computed:{viewPosition:function(){var t={};for(var e in this.position){var n=this.position[e],i=parseFloat(n),r=parseFloat(this.$parent.position[e]);if("top"===e||"left"===e)n=Math.max(i,r)+"px";else if("width"===e||"height"===e){var o="left",a=parseFloat(this.$parent.position[o]),s=parseFloat(this.position[o]),c=Math.max(a-s,0),u=Math.max(s+i-(a+r),0);n=Math.max(i-c-u,0)+"px"}t[e]=n}return t},tags:function(){var t=this._getTagPosition(),e=this.style;return[{tag:"rect",position:t,rectStyles:{color:e.backgroundColor,radius:e.borderRadius,borderColor:e.borderColor,borderWidth:e.borderWidth}},"image"===this.coverType?{tag:"img",position:t,src:this.coverContent}:{tag:"font",position:t,textStyles:{align:a[e.textAlign]||e.textAlign,color:e.color,decoration:"none",lineSpacing:parseFloat(e.lineHeight)-parseFloat(e.fontSize)+"px",margin:e.padding,overflow:e.textOverflow,size:e.fontSize,verticalAlign:"top",weight:e.fontWeight,whiteSpace:e.whiteSpace},text:this.coverContent}]}},mounted:function(){var t=this;this._updateStyle();var e=this.$parent;e.isNative&&(e._isMounted?this._onCanInsert():e.onCanInsertCallbacks.push((function(){t._onCanInsert()})),this.$watch("hidden",(function(e){t.cover&&t.cover[e?"hide":"show"]()})),this.$watch("viewPosition",(function(e){t.cover&&t.cover.setStyle(e)}),{deep:!0}),this.$watch("tags",(function(){var e=t.cover;e&&(e.reset(),e.draw(t.tags))}),{deep:!0}),this.$on("uni-view-update",this._requestStyleUpdate))},beforeDestroy:function(){this.$parent.isNative&&(this.cover&&this.cover.close(),delete this.cover)},methods:{_onCanInsert:function(){var t=this,e=this.cover=new plus.nativeObj.View("cover-".concat(Date.now(),"-").concat(s++),this.viewPosition,this.tags);plus.webview.currentWebview().append(e),this.hidden&&e.hide(),e.addEventListener("click",(function(){t.$trigger("click",{},{})}))},_getTagPosition:function(){var t={};for(var e in this.position){var n=this.position[e];"top"!==e&&"left"!==e||(n=Math.min(parseFloat(n)-parseFloat(this.$parent.position[e]),0)+"px"),t[e]=n}return t},_updateStyle:function(){var t=this,e=getComputedStyle(this.$el);i.concat(r,o).forEach((function(n){t.style[n]=e[n]}))},_requestStyleUpdate:function(){var t=this;this._styleUpdateRequest&&cancelAnimationFrame(this._styleUpdateRequest),this._styleUpdateRequest=requestAnimationFrame((function(){delete t._styleUpdateRequest,t._updateStyle()}))}}}},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){},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={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?this.userTracking=!1: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=[],n=[];this.$slots.default&&this.$slots.default.forEach((function(t){t.componentOptions&&"v-uni-swiper-item"===t.componentOptions.tag&&n.push(t)}));for(var i=0,r=n.length;i=o||i0?n(o.splice(0,1)[0]):plus.ad.getAds({adpid:t,count:10,width:e},(function(t){var e=t.ads;n(e.splice(0,1)[0]),s[r]=o?o.concat(e):e}),(function(t){i({errCode:t.code,errMsg:t.message})}))}var u=["draw"],l=["adpid","data"],h={name:"Ad",mixins:[o["e"],a["a"]],props:{adpid:{type:[Number,String],default:""},data:{type:Object,default:null}},data:function(){return{hidden:!1}},computed:{attrs:function(){var t=this,e={};return l.forEach((function(n){var i=t.$props[n];i="src"===n?t.$getRealPath(i):i,e[n.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))]=i})),e}},watch:{hidden:function(t){this.adView&&this.adView[t?"hide":"show"]()},adpid:function(t){t&&this._loadData(t)},data:function(t){t&&this._fillData(t)}},mounted:function(){var t=this,e=Object.assign({id:"AdView"+Date.now()},this.position),n=this.adView=plus.ad.createAdView(e);n.interceptTouchEvent(!1),plus.webview.currentWebview().append(n),this.hidden&&n.hide(),this.$watch("attrs",(function(){t._request()}),{deep:!0}),this.$watch("position",(function(){t.adView&&t.adView.setStyle(t.position)}),{deep:!0}),n.setDislikeListener&&n.setDislikeListener((function(e){t.adView&&t.adView.close(),t.$refs.container.style.height="0px",t._updateView(),t.$trigger("close",{},e)})),n.setRenderingListener&&n.setRenderingListener((function(e){0===e.result?(t.$refs.container.style.height=e.height+"px",t._updateView()):t.$trigger("error",{},{errCode:e.result})})),n.setDownloadListener&&n.setDownloadListener((function(e){t.$trigger("downloadchange",{},e)})),this._request()},beforeDestroy:function(){delete this.adView},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n;u.includes(e)&&this.adView&&this.adView[e](i)},_request:function(){this.adView&&(this.data?this._fillData(this.data):this.adpid&&this._loadData())},_loadData:function(t){var e=this;c(t||this.adpid,this.position.width,(function(t){e._fillData(t)}),(function(t){e.$trigger("error",t)}))},_fillData:function(t){this.adView.renderingBind(t),this.$trigger("load",{},{})},_updateView:function(){window.dispatchEvent(new CustomEvent("updateview"))}}},d=h,f=(n("27ef"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},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-ios":t.isIOS},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={name:"Textarea",mixins:[o["a"],o["c"]],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:""},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:String(this.value),valueComposition:"",composition:!1,focusSync:this.focus,height:0,focusChangeSource:"",isIOS:0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&String(navigator.appVersion).split("OS ")[1].split("_")[0]<13}},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=String(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}),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=""}}},s=a,c=(n("9400"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"599d":function(t,e,n){"use strict";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}var l=n("f2b8"),h=n("1e88"),d=n("d8c8"),f=n.n(d),p=navigator.userAgent,v=/android/i.test(p),m=/iphone|ipad|ipod/i.test(p);function g(){var t,e,n,i=window.screen,r=window.devicePixelRatio,o=i.width,a=i.height,s=Math.min(window.innerWidth,document.documentElement.clientWidth,o),c=window.innerHeight,u=navigator.language,l=f.a.top;if(m){t="iOS";var d=p.match(/OS\s([\w_]+)\slike/);d&&(e=d[1].replace(/_/g,"."));var g=p.match(/\(([a-zA-Z]+);/);g&&(n=g[1])}else if(v){t="Android";var _=p.match(/Android[\s/]([\w\.]+)[;\s]/);_&&(e=_[1]);for(var y=p.match(/\((.+?)\)/),b=y?y[1].split(";"):p.split(" "),w=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i],x=0;x0){n=S.split("Build")[0].trim();break}for(var k=void 0,$=0;$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=d(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=d(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=d(n)}return!1}function d(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}})()},"5bb5":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("a20d"),r=n("f2b3");function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r["h"])((function(){var n=plus.webview.currentWebview().id;plus.webview.postMessageToUniNView({type:"subscribeHandler",args:{type:t,data:e,pageId:n}},i["a"])}))}},"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 d=h.$vm,f=Object(r["a"])(c,d),p=u.relativeToSelector?f.querySelector(u.relativeToSelector):null,v=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}},d.$page.id)}))}),{root:p,rootMargin:u.rootMargin,threshold:u.thresholds});u.observeAll?(v.USE_MUTATION_OBSERVER=!0,Array.prototype.map.call(f.querySelectorAll(u.selector),(function(t){v.observe(t)}))):(v.USE_MUTATION_OBSERVER=!1,v.observe(f.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){},6062:function(t,e,n){"use strict";var i=n("ef36"),r=n.n(i);r.a},"60ee":function(t,e,n){},"61c2":function(t,e,n){"use strict";var i=n("f2b3"),r=n("8af1");function o(){this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})}function a(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})}var s={name:"uni://form-field",init:function(t,e){e.constructor.options.props&&e.constructor.options.props.name&&e.constructor.options.props.value||(e.constructor.options.props||(e.constructor.options.props={}),e.constructor.options.props.name||(e.constructor.options.props.name=t.props.name={type:String}),e.constructor.options.props.value||(e.constructor.options.props.value=t.props.value={type:null})),t.propsData||(t.propsData={});var n=e.$vnode;if(n&&n.data&&n.data.attrs&&(Object(i["d"])(n.data.attrs,"name")&&(t.propsData.name=n.data.attrs.name),Object(i["d"])(n.data.attrs,"value")&&(t.propsData.value=n.data.attrs.value)),!e.constructor.options.methods||!e.constructor.options.methods._getFormData){e.constructor.options.methods||(e.constructor.options.methods={}),t.methods||(t.methods={});var s={_getFormData:function(){return this.name?{key:this.name,value:this.value}:{}},_resetFormData:function(){this.value=""}};Object.assign(e.constructor.options.methods,s),Object.assign(t.methods,s),Object.assign(e.constructor.options.methods,r["a"].methods),Object.assign(t.methods,r["a"].methods);var c=t["created"];e.constructor.options["created"]=t["created"]=c?[].concat(o,c):[o];var u=t["beforeDestroy"];e.constructor.options["beforeDestroy"]=t["beforeDestroy"]=u?[].concat(a,u):[a]}}};function c(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,"a",(function(){return l}));var u=c({},s.name,s);function l(t,e){t.behaviors.forEach((function(n){var i=u[n];i&&i.init(t,e)}))}},"630f":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-cover-image",t._g({style:t.imageInfo,attrs:{src:t.src}},t.$listeners),[n("div",{ref:"container",staticClass:"uni-cover-image"})])},r=[],o=n("0aa0"),a=n("5077"),s=n("f2b3"),c="_doc/uniapp_temp",u="".concat(c,"_").concat(Date.now()),l={name:"CoverImage",mixins:[o["a"],a["a"]],props:{src:{type:String,default:""},autoSize:{type:[Boolean,String],default:!1}},data:function(){return{coverType:"image",coverContent:"",imageInfo:{}}},watch:{src:function(){this.loadImage()}},created:function(){this.loadImage()},beforeDestroy:function(){var t=this.downloaTask;t&&t.state<4&&t.abort()},methods:{loadImage:function(){var t=this;this.coverContent="",this.imageInfo=this.autoSize?{width:0,height:0}:{};var e=this.src?this.$getRealPath(this.src):"";0===e.indexOf("http://")||0===e.indexOf("https://")?Object(s["h"])((function(){t.downloaTask=plus.downloader.createDownload(e,{filename:u+"/download/"},(function(e,n){200===n?t.getImageInfo(e.filename):t.$trigger("error",{},{errMsg:"error"})})).start()})):e&&this.getImageInfo(e)},getImageInfo:function(t){var e=this;this.coverContent=t,Object(s["h"])((function(){plus.io.getImageInfo({src:t,success:function(t){var n=t.width,i=t.height;e.autoSize&&(e.imageInfo={width:"".concat(n,"px"),height:"".concat(i,"px")},e._isMounted&&e._requestPositionUpdate()),e.$trigger("load",{},{width:n,height:i})},fail:function(){e.$trigger("error",{},{errMsg:"error"})}})}))}}},h=l,d=(n("21c3"),n("2877")),f=Object(d["a"])(h,i,r,!1,null,null,null);e["default"]=f.exports},"634a":function(t,e,n){"use strict";(function(t,i){var r=n("e571"),o=(n("7522"),n("2376")),a=n("9856"),s=n("7d0f"),c=n("599d");n.d(e,"a",(function(){return c["a"]})),n.d(e,"b",(function(){return c["b"]})),n.d(e,"c",(function(){return c["c"]})),n.d(e,"d",(function(){return c["d"]})),n.d(e,"e",(function(){return c["e"]})),n.d(e,"f",(function(){return c["f"]})),n.d(e,"g",(function(){return c["g"]})),n.d(e,"h",(function(){return c["h"]})),i.UniViewJSBridge={publishHandler:t.publishHandler,subscribeHandler:t.subscribeHandler},i.getCurrentPages=a["a"],i.__definePage=o["a"],i.Vue=r["a"],r["a"].use(s["a"]),n("1efd")}).call(this,n("501c"),n("c8ba"))},6428:function(t,e,n){"use strict";var i=n("f756"),r=n.n(i);r.a},6491: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-radio",t._g({on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-radio-wrapper"},[n("div",{staticClass:"uni-radio-input",class:t.radioChecked?"uni-radio-input-checked":"",style:t.radioChecked?t.checkedStyle:""}),t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Radio",mixins:[o["a"],o["d"]],props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007AFF"},value:{type:String,default:""}},data:function(){return{radioChecked:this.checked,radioValue:this.value}},computed:{checkedStyle:function(){return"background-color: ".concat(this.color,";border-color: ").concat(this.color,";")}},watch:{checked:function(t){this.radioChecked=t},value:function(t){this.radioValue=t}},listeners:{"label-click":"_onClick","@label-click":"_onClick"},created:function(){this.$dispatch("RadioGroup","uni-radio-group-update",{type:"add",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("RadioGroup","uni-radio-group-update",{type:"remove",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_onClick:function(t){this.disabled||this.radioChecked||(this.radioChecked=!0,this.$dispatch("RadioGroup","uni-radio-change",t,this))},_resetFormData:function(){this.radioChecked=this.min}}},s=a,c=(n("c96e"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"64d0":function(t,e,n){"use strict";var i=n("c0e5"),r=n.n(i);r.a},"6bdf":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return u}));var i=n("85b6"),r=n("1e88"),o=n("db8e");function a(t){var e={};return t.id&&(e.id=""),t.dataset&&(e.dataset={}),t.rect&&(e.left=0,e.right=0,e.top=0,e.bottom=0),t.size&&(e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight),t.scrollOffset&&(e.scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft||0,e.scrollTop=document.documentElement.scrollTop||document.body.scrollTop||0),e}function s(t,e){var n={},o=Object(r["a"])(),a=o.top;if(e.id&&(n.id=t.id),e.dataset&&(n.dataset=Object(i["c"])(t.dataset||{})),e.rect||e.size){var s=t.getBoundingClientRect();e.rect&&(n.left=s.left,n.right=s.right,n.top=s.top-a,n.bottom=s.bottom-a),e.size&&(n.width=s.width,n.height=s.height)}return e.properties&&e.properties.forEach((function(t){t=t.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()}))})),e.scrollOffset&&("UNI-SCROLL-VIEW"===t.tagName&&t.__vue__&&t.__vue__.getScrollPosition?Object.assign(n,t.__vue__.getScrollPosition()):(n.scrollLeft=0,n.scrollTop=0)),e.context&&t.__vue__&&t.__vue__._getContextInfo&&(n.context=t.__vue__._getContextInfo()),n}function c(t,e,n,i,r){var a=Object(o["a"])(e,t);if(!a||a&&8===a.nodeType)return i?null:[];if(i){var c=a.matches(n)?a:a.querySelector(n);return c?s(c,r):null}var u=[],l=a.querySelectorAll(n);return l&&l.length&&(u=[].map.call(l,(function(t){return s(t,r)}))),a.matches(n)&&u.unshift(s(a,r)),u}function u(e,n){var i=e.reqId,r=e.reqs,o=getCurrentPages(),s=o.find((function(t){return t.$page.id===n}));if(!s)throw new Error("Not Found:Page[".concat(n,"]"));var u=s.$vm,l=[];r.forEach((function(t){var e=t.component,n=t.selector,i=t.single,r=t.fields;0===e?l.push(a(r)):l.push(c(u,e,n,i,r))})),t.publishHandler("onRequestComponentInfo",{reqId:i,res:l},u.$page.id)}}).call(this,n("501c"))},"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({on:{click:t._onClick}},t.$listeners),[t._t("default")],2)},r=[],o=n("3c47"),a=o["a"],s=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),d=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)),d*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)),d*u*e+h*l*n}}}var f=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,v=t,m=(e-p*t)/f;return{x:function(t){return Math.pow(Math.E,p*t)*(v*Math.cos(f*t)+m*Math.sin(f*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(f*t),i=Math.sin(f*t);return e*(m*f*n-v*f*i)+p*e*(m*i+v*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}]}},7466: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({},t.$listeners),[n("div",{ref:"container",staticClass:"uni-map-container"}),t._l(t.mapControls,(function(e,i){return n("v-uni-cover-image",{key:i,style:e.position,attrs:{src:e.iconPath,"auto-size":""},on:{click:function(n){return t.controlclick(e)}}})})),n("div",{staticClass:"uni-map-slot"},[t._t("default")],2)],2)},r=[],o=n("286b"),a=o["a"],s=(n("a252"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},7522:function(t,e,n){},"76a8":function(t,e,n){"use strict";var i=n("3fe7"),r=n.n(i);r.a},"7bb3":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",t._g({on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-checkbox-wrapper"},[n("div",{staticClass:"uni-checkbox-input",class:[t.checkboxChecked?"uni-checkbox-input-checked":""],style:{color:t.color}}),t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Checkbox",mixins:[o["a"],o["d"]],props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},data:function(){return{checkboxChecked:this.checked,checkboxValue:this.value}},watch:{checked:function(t){this.checkboxChecked=t},value:function(t){this.checkboxValue=t}},listeners:{"label-click":"_onClick","@label-click":"_onClick"},created:function(){this.$dispatch("CheckboxGroup","uni-checkbox-group-update",{type:"add",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this})},beforeDestroy:function(){this.$dispatch("CheckboxGroup","uni-checkbox-group-update",{type:"remove",vm:this}),this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_onClick:function(t){this.disabled||(this.checkboxChecked=!this.checkboxChecked,this.$dispatch("CheckboxGroup","uni-checkbox-change",t))},_resetFormData:function(){this.checkboxChecked=!1}}},s=a,c=(n("f53a"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"7c2b":function(t,e,n){"use strict";var i=n("2c45"),r=n.n(i);r.a},"7d0f":function(t,e,n){"use strict";var i=n("5129"),r=n.n(i),o=n("85b6");function a(t){t.config.errorHandler=function(t){var e="function"===typeof getApp&&getApp();e&&Object(o["a"])(e.$options,"onError")?e.__call_hook("onError",t):console.error(t)};var e=t.config.isReservedTag;t.config.isReservedTag=function(t){return-1!==r.a.indexOf(t)||e(t)},t.config.ignoredElements=r.a;var n=t.config.getTagNamespace,i=["switch","image","text","view"];t.config.getTagNamespace=function(t){return!~i.indexOf(t)&&(n(t)||!1)}}var s=n("8c15"),c=n("a34f"),u=n("3e5d");function l(t){Object.defineProperty(t.prototype,"$page",{get:function(){return getCurrentPages()[0].$page}}),t.prototype.$handleVModelEvent=function(t,e){u["b"].sendUIEvent(this._$id,t,{type:"input",target:{value:e}})},t.prototype.$handleViewEvent=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.stop&&t.stopPropagation(),e.prevent&&t.preventDefault();var n=this.$handleEvent(t),i=this._$id,r=t.$origCurrentTarget||t.currentTarget,o=r===this.$el?0:n.options.nid;if("undefined"===typeof o)return console.error("[".concat(i,"] nid not found"));delete n._processed,delete n.mp,delete n.preventDefault,delete n.stopPropagation,delete n.options,delete n.$origCurrentTarget,u["b"].sendUIEvent(i,o,n)}}e["a"]={install:function(t,e){t.prototype._$getRealPath=c["a"],a(t),s["a"].install(t,e),Object(u["a"])(t),l(t)}}},"7df2":function(t,e,n){},"7e6a":function(t,e,n){"use strict";var i=n("515d"),r=n.n(i);r.a},"7f2f":function(t,e,n){"use strict";var i=n("ce51"),r=n.n(i);r.a},"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)}}}},"85b6":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a}));var i=["SystemAsyncLoading","SystemAsyncError"];function r(t){return!(!t.$parent||"PageBody"!==t.$parent.$options.name)&&-1===i.indexOf(t.$options.name)}function o(){var t=arguments.length>0&&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));return e}},8779:function(t,e,n){},8842: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-movable-view",t._g({},t.$listeners),[n("v-uni-resize-sensor",{on:{resize:t.setParent}}),t._t("default")],2)},r=[],o=n("ba15");function a(t,e,n){return t>e-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),d=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)),d*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)),d*u*e+h*l*n}}}var f=Math.sqrt(4*i*r-n*n)/(2*i),p=-n/2*i,v=t,m=(e-p*t)/f;return{x:function(t){return Math.pow(Math.E,p*t)*(v*Math.cos(f*t)+m*Math.sin(f*t))},dx:function(t){var e=Math.pow(Math.E,p*t),n=Math.cos(f*t),i=Math.sin(f*t);return e*(m*f*n-v*f*i)+p*e*(m*i+v*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 d=n("f2b3"),f=!1;function p(t){f||(f=!0,requestAnimationFrame((function(){t(),f=!1})))}function v(t,e){if(t===e)return 0;var n=t.offsetLeft;return t.offsetParent?n+=v(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 g(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)}function _(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(d["b"])({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||!0!==this._checkCanMove&&(Math.abs(t.detail.dx/t.detail.dy)>1?this._checkCanMove=!1:this._checkCanMove=!0)),this.yMove&&(i=t.detail.dy+this.__baseY,this.__touchInfo.historyY.shift(),this.__touchInfo.historyY.push(i),this.xMove||!0!==this._checkCanMove&&(Math.abs(t.detail.dy/t.detail.dx)>1?this._checkCanMove=!1:this._checkCanMove=!0)),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(d["b"])({disable:!0}),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=_(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:g(t,this._scaleOffset.x),y:g(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}}},b=y,w=(n("7c2b"),n("2877")),x=Object(w["a"])(b,i,r,!1,null,null,null);e["default"]=x.exports},"8a36":function(t,e,n){"use strict";(function(t){var i=n("f2b3");e["a"]={props:{id:{type:String,default:""}},created:function(){var t=this;this._addListeners(this.id),this.$watch("id",(function(e,n){t._removeListeners(n,!0),t._addListeners(e,!0)}))},beforeDestroy:function(){this._removeListeners(this.id)},methods:{_addListeners:function(e,n){var r=this;if(!n||e){var o=this.$options.listeners;Object(i["f"])(o)&&Object.keys(o).forEach((function(i){n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&t.on("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]]):0===i.indexOf("@")?r.$on("uni-".concat(i.substr(1)),r[o[i]]):0===i.indexOf("uni-")?t.on(i,r[o[i]]):e&&t.on("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]])}))}},_removeListeners:function(e,n){var r=this;if(!n||e){var o=this.$options.listeners;Object(i["f"])(o)&&Object.keys(o).forEach((function(i){n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&t.off("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]]):0===i.indexOf("@")?r.$off("uni-".concat(i.substr(1)),r[o[i]]):0===i.indexOf("uni-")?t.off(i,r[o[i]]):e&&t.off("uni-".concat(i,"-").concat(r.$page.id,"-").concat(e),r[o[i]])}))}}}}}).call(this,n("501c"))},"8aec":function(t,e,n){"use strict";var i=n("5363"),r=n("72b3");function o(t,e,n){this._extent=t,this._friction=e||new i["a"](.01),this._spring=n||new r["a"](1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}function a(t,e,n){function i(t,e,n,r){if(!t||!t.cancelled){n(e);var o=e.done();o||t.cancelled||(t.id=requestAnimationFrame(i.bind(null,t,e,n,r))),o&&r&&r(e)}}function r(t){t&&t.id&&cancelAnimationFrame(t.id),t&&(t.cancelled=!0)}var o={id:0,cancelled:!1};return i(o,t,e,n),{cancel:r.bind(null,o),model:t}}function s(t,e){e=e||{},this._element=t,this._options=e,this._enableSnap=e.enableSnap||!1,this._itemSize=e.itemSize||0,this._enableX=e.enableX||!1,this._enableY=e.enableY||!1,this._shouldDispatchScrollEvent=!!e.onScroll,this._enableX?(this._extent=(e.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=e.scrollWidth):(this._extent=(e.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=e.scrollHeight),this._position=0,this._scroll=new o(this._extent,e.friction,e.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}o.prototype.snap=function(t,e){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(e)},o.prototype.set=function(t,e){this._friction.set(t,e),t>0&&e>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&e<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()},o.prototype.x=function(t){if(!this._startTime)return 0;if(t||(t=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var e=this._friction.x(t),n=this.dx(t);return(e>0&&n>=0||e<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),e<-this._extent?this._springOffset=-this._extent:this._springOffset=0,e=this._spring.x()+this._springOffset),e},o.prototype.dx=function(t){var e=0;return e=this._lastTime===t?this._lastDx:this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=e,e},o.prototype.done=function(){return this._springing?this._spring.done():this._friction.done()},o.prototype.setVelocityByEnd=function(t){this._friction.setVelocityByEnd(t)},o.prototype.configuration=function(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t},s.prototype.onTouchStart=function(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()},s.prototype.onTouchMove=function(t,e){var n=this._startPosition;this._enableX?n+=t:this._enableY&&(n+=e),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()},s.prototype.onTouchEnd=function(t,e,n){var i=this;if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(e)this._itemSize/2?r-(this._itemSize-Math.abs(o)):r-o;s<=0&&s>=-this._extent&&this._scroll.setVelocityByEnd(s)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=a(this._scroll,(function(){var t=Date.now(),e=(t-i._scroll._startTime)/1e3,n=i._scroll.x(e);i._position=n,i.updatePosition();var r=i._scroll.dx(e);i._shouldDispatchScrollEvent&&t-i._lastTime>i._lastDelay&&(i.dispatchScroll(),i._lastDelay=Math.abs(2e3/r),i._lastTime=t)}),(function(){i._enableSnap&&(s<=0&&s>=-i._extent&&(i._position=s,i.updatePosition()),"function"===typeof i._options.onSnap&&i._options.onSnap(Math.floor(Math.abs(i._position)/i._itemSize))),i._shouldDispatchScrollEvent&&i.dispatchScroll(),i._scrolling=!1}))},s.prototype.onTransitionEnd=function(){this._element.style.transition="",this._element.style.webkitTransition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._element.removeEventListener("webkitTransitionEnd",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()},s.prototype.snap=function(){var t=this._itemSize,e=this._position%t,n=Math.abs(e)>this._itemSize/2?this._position-(t-Math.abs(e)):this._position-e;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))},s.prototype.scrollTo=function(t,e){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"===typeof t&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0),this._element.style.transition="transform "+(e||.2)+"s ease-out",this._element.style.webkitTransition="-webkit-transform "+(e||.2)+"s ease-out",this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd),this._element.addEventListener("webkitTransitionEnd",this._onTransitionEnd)},s.prototype.dispatchScroll=function(){if("function"===typeof this._options.onScroll&&Math.round(this._lastPos)!==Math.round(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}},s.prototype.update=function(t,e,n){var i=0,r=this._position;this._enableX?(i=this._element.childNodes.length?(e||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=e):(i=this._element.childNodes.length?(e||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=e),"number"===typeof t&&(this._position=-t),this._position<-i?this._position=-i:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),r!==this._position&&(this.dispatchScroll(),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=i,this._scroll._extent=i},s.prototype.updatePosition=function(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t},s.prototype.isScrolling=function(){return this._scrolling||this._snapping};e["a"]={methods:{initScroller:function(t,e){this._touchInfo={trackingID:-1,maxDy:0,maxDx:0},this._scroller=new s(t,e),this.__handleTouchStart=this._handleTouchStart.bind(this),this.__handleTouchMove=this._handleTouchMove.bind(this),this.__handleTouchEnd=this._handleTouchEnd.bind(this),this._initedScroller=!0},_findDelta:function(t){var e=this._touchInfo;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:t.screenX-e.x,y:t.screenY-e.y}},_handleTouchStart:function(t){var e=this._touchInfo,n=this._scroller;n&&("start"===t.detail.state?(e.trackingID="touch",e.x=t.detail.x,e.y=t.detail.y):(e.trackingID="mouse",e.x=t.screenX,e.y=t.screenY),e.maxDx=0,e.maxDy=0,e.historyX=[0],e.historyY=[0],e.historyTime=[t.detail.timeStamp],e.listener=n,n.onTouchStart&&n.onTouchStart(),event.preventDefault())},_handleTouchMove:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var n=this._findDelta(t);if(n){for(e.maxDy=Math.max(e.maxDy,Math.abs(n.y)),e.maxDx=Math.max(e.maxDx,Math.abs(n.x)),e.historyX.push(n.x),e.historyY.push(n.y),e.historyTime.push(t.detail.timeStamp);e.historyTime.length>10;)e.historyTime.shift(),e.historyX.shift(),e.historyY.shift();e.listener&&e.listener.onTouchMove&&e.listener.onTouchMove(n.x,n.y,t.detail.timeStamp)}}},_handleTouchEnd:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var n=this._findDelta(t);if(n){var i=e.listener;e.trackingID=-1,e.listener=null;var r=e.historyTime.length,o={x:0,y:0};if(r>2)for(var a=e.historyTime.length-1,s=e.historyTime[a],c=e.historyX[a],u=e.historyY[a];a>0;){a--;var l=e.historyTime[a],h=s-l;if(h>30&&h<50){o.x=(c-e.historyX[a])/(h/1e3),o.y=(u-e.historyY[a])/(h/1e3);break}}e.historyTime=[],e.historyX=[],e.historyY=[],i&&i.onTouchEnd&&i.onTouchEnd(n.x,n.y,o)}}}}}},"8af1":function(t,e,n){"use strict";function i(t,e){for(var n=this.$children,r=n.length,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s2?r-2:0),a=2;a2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{};e.routes;Object(r["a"])();var n=function(t,e){for(var n=t.target;n&&n!==e;n=n.parentNode)if(n.tagName&&0===n.tagName.indexOf("UNI-"))break;return n};t.prototype.$handleEvent=function(t){if(t instanceof Event){var e=n(t,this.$el);t=r["b"].call(this,t.type,t,{},e||t.target,t.currentTarget)}return t},t.prototype.$getComponentDescriptor=function(t,e){return Object(a["a"])(t||this,e)},t.prototype.$handleWxsEvent=function(t){if(t instanceof Event){var e=t.currentTarget,i=e&&e.__vue__&&e.__vue__.$getComponentDescriptor(e.__vue__,!1);t=r["b"].call(this,t.type,t,{},n(t,this.$el)||t.target,t.currentTarget),t.instance=i}return t},t.mixin({beforeCreate:function(){var t=this,e=this.$options,n=e.wxs;n&&Object.keys(n).forEach((function(e){t[e]=n[e]})),e.behaviors&&e.behaviors.length&&Object(o["a"])(e,this),Object(i["b"])(this)&&(e.mounted=e.mounted?[].concat(s,e.mounted):[s])}})}}}).call(this,n("501c"))},9213: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-swiper-item",t._g({},t.$listeners),[t._t("default")],2)},r=[],o={name:"SwiperItem",props:{itemId:{type:String,default:""}},mounted:function(){var t=this.$el;t.style.position="absolute",t.style.width="100%",t.style.height="100%";var e=this.$vnode._callbacks;e&&e.forEach((function(t){t()}))}},a=o,s=(n("bfea"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"927d":function(t,e,n){},9400:function(t,e,n){"use strict";var i=n("cc89"),r=n.n(i);r.a},"944e":function(t,e,n){"use strict";var i=n("a6bb"),r=n.n(i);r.a},9856:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=[];function r(){return i}function o(t,e){i.length=0,i.push({$page:{id:t,route:e}})}},"98e0":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-picker",t._g({on:{click:function(e){return e.stopPropagation(),t._show(e)}}},t.$listeners),[t._t("default")],2)},r=[],o=n("8af1"),a=n("1364"),s={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},c={YEAR:"year",MONTH:"month",DAY:"day"};function u(t){return t>9?t:"0".concat(t)}function l(t,e){var n=new Date;return e===s.TIME?(t=t.split(":"),2===t.length&&n.setHours(parseInt(t[0]),parseInt(t[1]))):(t=t.split("-"),3===t.length&&n.setFullYear(parseInt(t[0]),parseInt(t[1]-1),parseInt(t[2]))),n}var h={name:"Picker",mixins:[o["a"]],props:{name:{type:String,default:""},range:{type:Array,default:function(){return[]}},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:s.SELECTOR,validator:function(t){return Object.values(s).indexOf(t)>=0}},fields:{type:String,default:"day",validator:function(t){return Object.values(c).indexOf(t)>=0}},start:{type:String,default:function(){if(this.mode===s.TIME)return"00:00";if(this.mode===s.DATE){var t=(new Date).getFullYear()-60;switch(this.fields){case c.YEAR:return t;case c.MONTH:return t+"-01";case c.DAY:return t+"-01-01"}}return""}},end:{type:String,default:function(){if(this.mode===s.TIME)return"23:59";if(this.mode===s.DATE){var t=(new Date).getFullYear()+60;switch(this.fields){case c.YEAR:return t;case c.MONTH:return t+"-12";case c.DAY:return t+"-12-31"}}return""}},disabled:{type:[Boolean,String],default:!1}},created:function(){var t=this;this.$dispatch("Form","uni-form-group-update",{type:"add",vm:this}),Object.keys(this.$props).forEach((function(e){"name"!==e&&t.$watch(e,(function(n){var i={};i[e]=n,t._updatePicker(i)}))}))},beforeDestroy:function(){this.$dispatch("Form","uni-form-group-update",{type:"remove",vm:this})},methods:{_show:function(){this.disabled||this._showPicker(Object.assign({},this.$props))},_showPicker:function(t){var e=this;if(this.mode===s.TIME||this.mode===s.DATE)plus.nativeUI[this.mode===s.TIME?"pickTime":"pickDate"]((function(t){var n=t.date;e.$trigger("change",{},{value:e.mode===s.TIME?"".concat(u(n.getHours()),":").concat(u(n.getMinutes())):"".concat(n.getFullYear(),"-").concat(u(n.getMonth()+1),"-").concat(u(n.getDate()))})}),(function(){e.$trigger("cancel",{},{})}),this.mode===s.TIME?{time:l(this.value,s.TIME)}:{date:l(this.value,s.DATE),minDate:l(this.start,s.DATE),maxDate:l(this.end,s.DATE)});else{var n={event:"cancel"};this.page=Object(a["a"])({url:"__uniapppicker",data:t,style:{titleNView:!1,animationType:"none",animationDuration:0,background:"rgba(0,0,0,0)",popGesture:"none"},onMessage:function(i){var r=i.event;if("created"!==r)return"columnchange"===r?(delete i.event,void e.$trigger(r,{},i)):void(n=i);e._updatePicker(t)},onClose:function(){e.page=null;var t=n.event;delete n.event,e.$trigger(t,{},n)}})}},_updatePicker:function(t){this.page&&this.page.sendMessage(t)}}},d=h,f=(n("76a8"),n("2877")),p=Object(f["a"])(d,i,r,!1,null,null,null);e["default"]=p.exports},"9a8b":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-icon",t._g({},t.$listeners),[n("i",{class:"uni-icon-"+t.type,style:{"font-size":t._converPx(t.size),color:t.color},attrs:{role:"img"}})])},r=[],o={name:"Icon",props:{type:{type:String,required:!0,default:""},size:{type:[String,Number],default:23},color:{type:String,default:""}},methods:{_converPx:function(t){if(/\d+[ur]px$/i.test(t))t.replace(/\d+[ur]px$/i,(function(t){return"".concat(uni.upx2px(parseFloat(t)),"px")}));else if(/^-?[\d\.]+$/.test(t))return"".concat(t,"px");return t||""}}},a=o,s=(n("7e6a"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},"9b1f":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-progress",t._g({staticClass:"uni-progress"},t.$listeners),[n("div",{staticClass:"uni-progress-bar",style:t.outerBarStyle},[n("div",{staticClass:"uni-progress-inner-bar",style:t.innerBarStyle})]),t.showInfo?[n("p",{staticClass:"uni-progress-info"},[t._v(t._s(t.currentPercent)+"%")])]:t._e()],2)},r=[],o={activeColor:"#007AFF",backgroundColor:"#EBEBEB",activeMode:"backwards"},a={name:"Progress",props:{percent:{type:[Number,String],default:0,validator:function(t){return!isNaN(parseFloat(t,10))}},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator:function(t){return!isNaN(parseFloat(t,10))}},color:{type:String,default:o.activeColor},activeColor:{type:String,default:o.activeColor},backgroundColor:{type:String,default:o.backgroundColor},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:o.activeMode}},data:function(){return{currentPercent:0,strokeTimer:0,lastPercent:0}},computed:{outerBarStyle:function(){return"background-color: ".concat(this.backgroundColor,"; height: ").concat(this.strokeWidth,"px;")},innerBarStyle:function(){var t="";return t=this.color!==o.activeColor&&this.activeColor===o.activeColor?this.color:this.activeColor,"width: ".concat(this.currentPercent,"%;background-color: ").concat(t)},realPercent:function(){var t=parseFloat(this.percent,10);return t<0&&(t=0),t>100&&(t=100),t}},watch:{realPercent:function(t,e){this.strokeTimer&&clearInterval(this.strokeTimer),this.lastPercent=e||0,this._activeAnimation()}},created:function(){this._activeAnimation()},methods:{_activeAnimation:function(){var t=this;this.active?(this.currentPercent=this.activeMode===o.activeMode?0:this.lastPercent,this.strokeTimer=setInterval((function(){t.currentPercent+1>t.realPercent?(t.currentPercent=t.realPercent,t.strokeTimer&&clearInterval(t.strokeTimer)):t.currentPercent+=1}),30)):this.currentPercent=this.realPercent}}},s=a,c=(n("944e"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},"9d20":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return d}));var i=n("f2b3"),r=n("a20d");function o(t,e){return c(t)||s(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0)if(n.push(a.value),e&&n.length===e)break}catch(c){r=!0,o=c}finally{try{i||null==s["return"]||s["return"]()}finally{if(r)throw o}}return n}}function c(t){if(Array.isArray(t))return t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.addBatchVData.push([t,e,n])}},{key:"updateVData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.updateBatchVData.push([t,e])}},{key:"initVm",value:function(t){var e=this.addBatchVData.shift(),n=o(e,3),r=n[0],a=n[1],s=n[2];r?t._$id=r:(t._$id=Object(i["c"])(),console.error("cid unmatched",t)),Object.assign(t.$options,s),t.$r=a||Object.create(null),this.vms[t._$id]=t}},{key:"sendUIEvent",value:function(e,n,i){t.publishHandler(r["h"],{data:[[r["f"],[[e,n,i]]]],options:{timestamp:Date.now()}})}},{key:"clearAddBatchVData",value:function(){this.addBatchVData.length=0}},{key:"flush",value:function(){var t=this;this.updateBatchVData.forEach((function(e){var n=o(e,2),i=n[0],r=n[1],a=t.vms[i];if(!a)return console.error("Not found ".concat(i));Object.keys(r).forEach((function(t){Object.assign(a.$r[t]||(a.$r[t]=Object.create(null)),r[t])})),a.$forceUpdate()})),this.updateBatchVData.length=0}}]),e}()}).call(this,n("501c"))},"9f96":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-slider",t._g({ref:"uni-slider",on:{click:t._onClick}},t.$listeners),[n("div",{staticClass:"uni-slider-wrapper"},[n("div",{staticClass:"uni-slider-tap-area"},[n("div",{staticClass:"uni-slider-handle-wrapper",style:t.setBgColor},[n("div",{ref:"uni-slider-handle",staticClass:"uni-slider-handle",style:t.setBlockBg}),n("div",{staticClass:"uni-slider-thumb",style:t.setBlockStyle}),n("div",{staticClass:"uni-slider-track",style:t.setActiveColor})])]),n("span",{directives:[{name:"show",rawName:"v-show",value:t.showValue,expression:"showValue"}],staticClass:"uni-slider-value"},[t._v(t._s(t.sliderValue))])]),t._t("default")],2)},r=[],o=n("8af1"),a=n("ba15"),s={name:"Slider",mixins:[o["a"],o["d"],a["a"]],props:{name:{type:String,default:""},min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0},step:{type:[Number,String],default:1},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#e9e9e9"},backgroundColor:{type:String,default:"#e9e9e9"},activeColor:{type:String,default:"#007aff"},selectedColor:{type:String,default:"#007aff"},blockColor:{type:String,default:"#ffffff"},blockSize:{type:[Number,String],default:28},showValue:{type:[Boolean,String],default:!1}},data:function(){return{sliderValue:Number(this.value)}},computed:{setBlockStyle:function(){return{width:this.blockSize+"px",height:this.blockSize+"px",marginLeft:-this.blockSize/2+"px",marginTop:-this.blockSize/2+"px",left:this._getValueWidth(),backgroundColor:this.blockColor}},setBgColor:function(){return{backgroundColor:this._getBgColor()}},setBlockBg:function(){return{left:this._getValueWidth()}},setActiveColor:function(){return{backgroundColor:this._getActiveColor(),width:this._getValueWidth()}}},watch:{value:function(t){this.sliderValue=Number(t)}},mounted:function(){this.touchtrack(this.$refs["uni-slider-handle"],"_onTrack")},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:{_onUserChangedValue:function(t){var e=this.$refs["uni-slider"],n=e.offsetWidth,i=e.getBoundingClientRect().left,r=(t.x-i)*(this.max-this.min)/n+Number(this.min);this.sliderValue=this._filterValue(r)},_filterValue:function(t){return tthis.max?this.max:Math.round((t-this.min)/this.step)*this.step+Number(this.min)},_getValueWidth:function(){return 100*(this.sliderValue-this.min)/(this.max-this.min)+"%"},_getBgColor:function(){return"#e9e9e9"!==this.backgroundColor?this.backgroundColor:"#007aff"!==this.color?this.color:"#007aff"},_getActiveColor:function(){return"#007aff"!==this.activeColor?this.activeColor:"#e9e9e9"!==this.selectedColor?this.selectedColor:"#e9e9e9"},_onTrack:function(t){if(!this.disabled)return"move"===t.detail.state?(this._onUserChangedValue({x:t.detail.x0}),this.$trigger("changing",t,{value:this.sliderValue}),!1):void("end"===t.detail.state&&this.$trigger("change",t,{value:this.sliderValue}))},_onClick:function(t){this.disabled||(this._onUserChangedValue(t),this.$trigger("change",t,{value:this.sliderValue}))},_resetFormData:function(){this.sliderValue=this.min},_getFormData:function(){var t={};return""!==this.name&&(t["value"]=this.sliderValue,t["key"]=this.name),t}}},c=s,u=(n("6428"),n("2877")),l=Object(u["a"])(c,i,r,!1,null,null,null);e["default"]=l.exports},a20d:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"k",(function(){return l})),n.d(e,"i",(function(){return h})),n.d(e,"b",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"l",(function(){return p}));var i=2,r=4,o=6,a=10,s=20,c="vdSync",u="__uniapp__service",l="webviewReady",h="vdSyncCallback",d="invokeApi",f="webviewInserted",p="webviewRemoved"},a20f:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var i=function(){var t=document.createElement("canvas");t.height=t.width=0;var e=t.getContext("2d"),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/n}(),r=function(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},o={fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all",setTransform:[4,5]},a=CanvasRenderingContext2D.prototype;function s(t){t.width=t.offsetWidth*i,t.height=t.offsetHeight*i,t.getContext("2d").__hidpi__=!0}a.drawImageByCanvas=function(t){return function(e,n,r,o,a,s,c,u,l,h){if(!this.__hidpi__)return t.apply(this,arguments);n*=i,r*=i,o*=i,a*=i,s*=i,c*=i,u=h?u*i:u,l=h?l*i:l,t.call(this,e,n,r,o,a,s,c,u,l)}}(a.drawImage),1!==i&&(r(o,(function(t,e){a[e]=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);var n=Array.prototype.slice.call(arguments);if("all"===t)n=n.map((function(t){return t*i}));else if(Array.isArray(t))for(var r=0;r0?t.split("/"):[];return s.splice(s.length-a-1,a+1),"/"+s.concat(r).join("/")}n.d(e,"a",(function(){return u}));var r,o=/^([a-z-]+:)?\/\//i,a=/^data:.*,.*/;function s(t){return plus.io.convertLocalFileSystemURL(t).replace(/^\/?apps\//,"/android_asset/apps/").replace(/\/$/,"")}function c(t){return r||(r="file://"+s("_www")+"/"),r+t}function u(t){if(0===t.indexOf("/")){if(0!==t.indexOf("//"))return c(t.substr(1));t="https:"+t}if(o.test(t)||a.test(t)||0===t.indexOf("blob:"))return t;if(0===t.indexOf("_www")||0===t.indexOf("_do"))return"file://"+s(t);var e=getCurrentPages();return e.length?c(i(e[e.length-1].$page.route,t).substr(1)):t}},a3e5:function(t,e,n){"use strict";var i=n("df1e"),r=n.n(i);r.a},a5ec:function(t,e,n){"use strict";var i=n("54bc"),r=n.n(i);r.a},a6bb:function(t,e,n){},add1:function(t,e,n){},b1a3:function(t,e,n){},b253:function(t,e,n){"use strict";function i(t){return i="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},i(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function c(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){var e=t.import("blots/block/embed"),n=function(t){function e(){return r(this,e),o(this,s(e).apply(this,arguments))}return c(e,t),e}(e);return n.blotName="divider",n.tagName="HR",{"formats/divider":n}};function h(t){return h="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},h(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return!e||"object"!==h(e)&&"function"!==typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function m(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var _=function(t){var e=t.import("blots/inline"),n=function(t){function e(){return d(this,e),f(this,v(e).apply(this,arguments))}return m(e,t),e}(e);return n.blotName="ins",n.tagName="INS",{"formats/ins":n}},y=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK,whitelist:["left","right","center","justify"]},o=new i.Style("align","text-align",r);return{"formats/align":o}},b=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK,whitelist:["rtl"]},o=new i.Style("direction","direction",r);return{"formats/direction":o}};function w(t){return w="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},w(t)}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){return!e||"object"!==w(e)&&"function"!==typeof e?$(t):e}function $(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,e){if(t instanceof i)I(A(n.prototype),"insertBefore",this).call(this,t,e);else{var r=null==e?this.length():e.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){I(A(n.prototype),"optimize",this).call(this,t);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&e.domNode.tagName===this.domNode.tagName&&e.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(e.moveChildren(this),e.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var i=e.create(this.statics.defaultChild);t.moveChildren(i),this.appendChild(i)}I(A(n.prototype),"replace",this).call(this,t)}}]),n}(n);return r.blotName="list",r.scope=e.Scope.BLOCK_BLOT,r.tagName=["OL","UL"],r.defaultChild="list-item",r.allowedChildren=[i],{"formats/list":r}},P=function(t){var e=t.import("parchment"),n=e.Scope,i=t.import("formats/background"),r=new i.constructor("backgroundColor","background-color",{scope:n.INLINE});return{"formats/backgroundColor":r}},N=n("f2b3"),D=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.BLOCK},o=["margin","marginTop","marginBottom","marginLeft","marginRight"],a=["padding","paddingTop","paddingBottom","paddingLeft","paddingRight"],s={};return o.concat(a).forEach((function(t){s["formats/".concat(t)]=new i.Style(t,Object(N["g"])(t),r)})),s},L=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r={scope:n.INLINE},o=["font","fontSize","fontStyle","fontVariant","fontWeight","fontFamily"],a={};return o.forEach((function(t){a["formats/".concat(t)]=new i.Style(t,Object(N["g"])(t),r)})),a},R=function(t){var e=t.import("parchment"),n=e.Scope,i=e.Attributor,r=[{name:"lineHeight",scope:n.BLOCK},{name:"letterSpacing",scope:n.INLINE},{name:"textDecoration",scope:n.INLINE},{name:"textIndent",scope:n.BLOCK}],o={};return r.forEach((function(t){var e=t.name,n=t.scope;o["formats/".concat(e)]=new i.Style(e,Object(N["g"])(e),{scope:n})})),o},F=function(t){var e=t.import("formats/image");e.sanitize=function(t){return t}};function V(t){var e={divider:l,ins:_,align:y,direction:b,list:j,background:P,box:D,font:L,text:R,image:F},n={};Object.values(e).forEach((function(e){return Object.assign(n,e(t))})),t.register(n,!0)}n.d(e,"a",(function(){return V}))},b2bb:function(t,e,n){},b34d: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-form",t._g({},t.$listeners),[n("span",[t._t("default")],2)])},r=[],o=n("8af1"),a={name:"Form",mixins:[o["d"]],data:function(){return{childrenList:[]}},listeners:{"@form-submit":"_onSubmit","@form-reset":"_onReset","@form-group-update":"_formGroupUpdateHandler"},methods:{_onSubmit:function(t){var e={};this.childrenList.forEach((function(t){t._getFormData&&t._getFormData().key&&(e[t._getFormData().key]=t._getFormData().value)})),this.$trigger("submit",t,{value:e})},_onReset:function(t){this.$trigger("reset",t,{}),this.childrenList.forEach((function(t){t._resetFormData&&t._resetFormData()}))},_formGroupUpdateHandler:function(t){if("add"===t.type)this.childrenList.push(t.vm);else{var e=this.childrenList.indexOf(t.vm);this.childrenList.splice(e,1)}}}},s=a,c=n("2877"),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},b705: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-rich-text",t._g({},t.$listeners),[n("div")])},r=[],o=n("18fd");function a(t){return t.replace(/<\?xml.*\?>\n/,"").replace(/\n/,"").replace(/\n/,"")}function s(t){return t.reduce((function(t,e){var n=e.value,i=e.name;return n.match(/ /)&&"style"!==i&&(n=n.split(" ")),t[i]?Array.isArray(t[i])?t[i].push(n):t[i]=[t[i],n]:t[i]=n,t}),{})}function c(t){t=a(t);var e=[],n={node:"root",children:[]};return Object(o["a"])(t,{start:function(t,i,r){var o={name:t};if(0!==i.length&&(o.attrs=s(i)),r){var a=e[0]||n;a.children||(a.children=[]),a.children.push(o)}else e.unshift(o)},end:function(t){var i=e.shift();if(i.name!==t&&console.error("invalid state: mismatch end tag"),0===e.length)n.children.push(i);else{var r=e[0];r.children||(r.children=[]),r.children.push(i)}},chars:function(t){var i={type:"text",text:t};if(0===e.length)n.children.push(i);else{var r=e[0];r.children||(r.children=[]),r.children.push(i)}},comment:function(t){var n={node:"comment",text:t},i=e[0];i.children||(i.children=[]),i.children.push(n)}}),n.children}var u=n("f2b3"),l={a:"",abbr:"",b:"",blockquote:"",br:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",ol:["start","type"],p:"",q:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","rowspan","height","width"],tfoot:"",th:["colspan","rowspan","height","width"],thead:"",tr:"",ul:""},h={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'"};function d(t){return t.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,(function(t,e){if(Object(u["d"])(h,e)&&h[e])return h[e];if(/^#[0-9]{1,4}$/.test(e))return String.fromCharCode(e.slice(1));if(/^#x[0-9a-f]{1,4}$/i.test(e))return String.fromCharCode("0"+e.slice(1));var n=document.createElement("div");return n.innerHTML=t,n.innerText||n.textContent}))}function f(t,e){return t.forEach((function(t){if(Object(u["f"])(t))if(Object(u["d"])(t,"type")&&"node"!==t.type)"text"===t.type&&"string"===typeof t.text&&""!==t.text&&e.appendChild(document.createTextNode(d(t.text)));else{if("string"!==typeof t.name||!t.name)return;var n=t.name.toLowerCase();if(!Object(u["d"])(l,n))return;var i=document.createElement(n);if(!i)return;var r=t.attrs;if(Object(u["f"])(r)){var o=l[n]||[];Object.keys(r).forEach((function(t){var e=r[t];switch(t){case"class":Array.isArray(e)&&(e=e.join(" "));case"style":i.setAttribute(t,e);break;default:-1!==o.indexOf(t)&&i.setAttribute(t,e)}}))}var a=t.children;Array.isArray(a)&&a.length&&f(t.children,i),e.appendChild(i)}})),e}var p={name:"RichText",props:{nodes:{type:[Array,String],default:function(){return[]}}},watch:{nodes:function(t){this._renderNodes(t)}},mounted:function(){this._renderNodes(this.nodes)},methods:{_renderNodes:function(t){"string"===typeof t&&(t=c(t));var e=f(t,document.createDocumentFragment());this.$el.firstChild.innerHTML="",this.$el.firstChild.appendChild(e)}}},v=p,m=n("2877"),g=Object(m["a"])(v,i,r,!1,null,null,null);e["default"]=g.exports},ba15:function(t,e,n){"use strict";var i=function(t,e,n,i){t.addEventListener(e,(function(t){"function"===typeof n&&!1===n(t)&&(t.preventDefault(),t.stopPropagation())}),{passive:!1})};e["a"]={methods:{touchtrack:function(t,e,n){var r=this,o=0,a=0,s=0,c=0,u=function(t,n,i,u){if(!1===r[e]({target:t.target,currentTarget:t.currentTarget,preventDefault:t.preventDefault.bind(t),stopPropagation:t.stopPropagation.bind(t),touches:t.touches,changedTouches:t.changedTouches,detail:{state:n,x0:i,y0:u,dx:i-o,dy:u-a,ddx:i-s,ddy:u-c,timeStamp:t.timeStamp}}))return!1},l=null;i(t,"touchstart",(function(t){if(1===t.touches.length&&!l)return l=t,o=s=t.touches[0].pageX,a=c=t.touches[0].pageY,u(t,"start",o,a)})),i(t,"touchmove",(function(t){if(1===t.touches.length&&l){var e=u(t,"move",t.touches[0].pageX,t.touches[0].pageY);return s=t.touches[0].pageX,c=t.touches[0].pageY,e}})),i(t,"touchend",(function(t){if(0===t.touches.length&&l)return l=null,u(t,"end",t.changedTouches[0].pageX,t.changedTouches[0].pageY)})),i(t,"touchcancel",(function(t){if(l){var e=l;return l=null,u(t,n?"cancel":"end",e.touches[0].pageX,e.touches[0].pageY)}}))}}}},bacd: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-canvas",t._g({attrs:{"canvas-id":t.canvasId,"disable-scroll":t.disableScroll}},t._listeners),[n("canvas",{ref:"canvas",attrs:{width:"300",height:"150"}}),n("div",{staticStyle:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden"}},[t._t("default")],2),n("v-uni-resize-sensor",{ref:"sensor",on:{resize:t._resize}})],1)},r=[],o=n("e1df"),a=o["a"],s=(n("0741"),n("2877")),c=Object(s["a"])(a,i,r,!1,null,null,null);e["default"]=c.exports},bfea:function(t,e,n){"use strict";var i=n("4e0b"),r=n.n(i);r.a},c0e5:function(t,e,n){},c33a:function(t,e,n){},c418:function(t,e,n){},c4c5:function(t,e,n){"use strict";(function(t,i){n.d(e,"a",(function(){return f}));var r=n("f2b3");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;n1&&(e[n[0].trim()]=n[1].trim())}})),e}var d=function(){function e(t){o(this,e),this.$vm=t,this.$el=t.$el}return s(e,[{key:"selectComponent",value:function(t){if(this.$el&&t){var e=this.$el.querySelector(t);return e&&e.__vue__&&f(e.__vue__,!1)}}},{key:"selectAllComponents",value:function(t){if(!this.$el||!t)return[];for(var e=[],n=this.$el.querySelectorAll(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};this.$vm[e]?this.$vm[e](JSON.parse(JSON.stringify(n))):this.$vm._$id&&t.publishHandler("onWxsInvokeCallMethod",{cid:this.$vm._$id,method:e,args:n})}},{key:"requestAnimationFrame",value:function(t){return i.requestAnimationFrame(t),this}},{key:"getState",value:function(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}},{key:"triggerEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.$vm.$emit(t,e),this}}]),e}();function f(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&t&&t.$options.name&&0===t.$options.name.indexOf("VUni")&&(t=t.$parent),t&&t.$el)return t.$el.__wxsComponentDescriptor||(t.$el.__wxsComponentDescriptor=new d(t)),t.$el.__wxsComponentDescriptor}}).call(this,n("501c"),n("c8ba"))},c61c:function(t,e,n){"use strict";n.r(e);var i=n("f2b3");function r(t){return Math.sqrt(t.x*t.x+t.y*t.y)}var o,a,s={name:"MovableArea",props:{scaleArea:{type:Boolean,default:!1}},data:function(){return{width:0,height:0,items:[]}},created:function(){this.gapV={x:null,y:null},this.pinchStartLen=null},mounted:function(){this._resize()},methods:{_resize:function(){this._getWH(),this.items.forEach((function(t,e){t.componentInstance.setParent()}))},_find:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.items,n=this.$el;function i(t){for(var r=0;r1){var n={x:e[1].pageX-e[0].pageX,y:e[1].pageY-e[0].pageY};if(this.pinchStartLen=r(n),this.gapV=n,!this.scaleArea){var o=this._find(e[0].target),a=this._find(e[1].target);this._scaleMovableView=o&&o===a?o:null}}},_touchmove:function(t){var e=t.touches;if(e&&e.length>1){t.preventDefault();var n={x:e[1].pageX-e[0].pageX,y:e[1].pageY-e[0].pageY};if(null!==this.gapV.x&&this.pinchStartLen>0){var i=r(n)/this.pinchStartLen;this._updateScale(i)}this.gapV=n}},_touchend:function(t){Object(i["b"])({disable:!1});var e=t.touches;e&&e.length||t.changedTouches&&(this.gapV.x=0,this.gapV.y=0,this.pinchStartLen=null,this.scaleArea?this.items.forEach((function(t){t.componentInstance._endScale()})):this._scaleMovableView&&this._scaleMovableView.componentInstance._endScale())},_updateScale:function(t){t&&1!==t&&(this.scaleArea?this.items.forEach((function(e){e.componentInstance._setScale(t)})):this._scaleMovableView&&this._scaleMovableView.componentInstance._setScale(t))},_getWH:function(){var t=window.getComputedStyle(this.$el),e=this.$el.getBoundingClientRect();this.width=e.width-["Left","Right"].reduce((function(e,n){return e+parseFloat(t["border"+n+"Width"])+parseFloat(t["padding"+n])}),0),this.height=e.height-["Top","Bottom"].reduce((function(e,n){return e+parseFloat(t["border"+n+"Width"])+parseFloat(t["padding"+n])}),0)}},render:function(t){var e=this,n=[];this.$slots.default&&this.$slots.default.forEach((function(t){t.componentOptions&&"v-uni-movable-view"===t.componentOptions.tag&&n.push(t)})),this.items=n;var i=Object.assign({},this.$listeners),r=["touchstart","touchmove","touchend"];return r.forEach((function(t){var n=i[t],r=e["_".concat(t)];i[t]=n?[].concat(n,r):r})),t("uni-movable-area",{on:i},[t("v-uni-resize-sensor",{on:{resize:this._resize}}),this.$slots.default])}},c=s,u=(n("a3e5"),n("2877")),l=Object(u["a"])(c,o,a,!1,null,null,null);e["default"]=l.exports},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}t.exports=n},c8ed:function(t,e,n){"use strict";var i=n("72ad"),r=n.n(i);r.a},c96e:function(t,e,n){"use strict";var i=n("1307"),r=n.n(i);r.a},cc89:function(t,e,n){},ce51:function(t,e,n){},d3bd:function(t,e,n){"use strict";n.r(e);var i,r,o=n("8af1"),a={name:"Button",mixins:[o["b"],o["a"],o["d"]],props:{hoverClass:{type:String,default:"button-hover"},disabled:{type:[Boolean,String],default:!1},id:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},formType:{type:String,default:"",validator:function(t){return~["","submit","reset"].indexOf(t)}}},data:function(){return{clickFunction:null}},methods:{_onClick:function(t,e){this.disabled||(e&&this.$el.click(),this.formType&&this.$dispatch("Form","submit"===this.formType?"uni-form-submit":"uni-form-reset",{type:this.formType}))},_bindObjectListeners:function(t,e){if(e)for(var n in e){var i=t.on[n],r=e[n];t.on[n]=i?[].concat(i,r):r}return t}},render:function(t){var e=this,n=Object.create(null);return this.$listeners&&Object.keys(this.$listeners).forEach((function(t){(!e.disabled||"click"!==t&&"tap"!==t)&&(n[t]=e.$listeners[t])})),this.hoverClass&&"none"!==this.hoverClass?t("uni-button",this._bindObjectListeners({class:[this.hovering?this.hoverClass:""],attrs:{disabled:this.disabled},on:{touchstart:this._hoverTouchStart,touchend:this._hoverTouchEnd,touchcancel:this._hoverTouchCancel,click:this._onClick}},n),this.$slots.default):t("uni-button",this._bindObjectListeners({class:[this.hovering?this.hoverClass:""],attrs:{disabled:this.disabled},on:{click:this._onClick}},n),this.$slots.default)},listeners:{"label-click":"_onClick","@label-click":"_onClick"}},s=a,c=(n("5676"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},d4b6:function(t,e,n){"use strict";var i=n("f2b3"),r=n("85b6");function o(t){return Object.assign({mp:t,_processed:!0},t)}var a=n("1e88");function s(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var n={id:t.id,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,dataset:Object(r["c"])(t.dataset)};return e&&Object.assign(n,e),n}function c(t){if(t){for(var e=[],n=Object(a["a"])(),i=n.top,r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e._processed)return e.type=n.type||t,e;if("click"===t){var u=Object(a["a"])(),l=u.top;n={x:e.x,y:e.y-l},e.touches=e.changedTouches=[{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}]}var h=o({type:n.type||t,timeStamp:e.timeStamp||0,detail:n,target:s(i,n),currentTarget:s(r,!1,!0),touches:e instanceof Event||e instanceof CustomEvent?c(e.touches):e.touches,changedTouches:e instanceof Event||e instanceof CustomEvent?c(e.changedTouches):e.changedTouches,preventDefault:function(){},stopPropagation:function(){}}),d=r.getAttribute("_i");return h.options={nid:d},h.$origCurrentTarget=r,h}n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return y}));var l=350,h=10,d=!!i["i"]&&{passive:!0},f=!1;function p(){f&&(clearTimeout(f),f=!1)}var v=0,m=0;function g(t){if(p(),1===t.touches.length){var e=t.touches[0],n=e.pageX,i=e.pageY;v=n,m=i,f=setTimeout((function(){var e=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:t.target,currentTarget:t.currentTarget});e.touches=t.touches,e.changedTouches=t.changedTouches,t.target.dispatchEvent(e)}),l)}}function _(t){if(f){if(1!==t.touches.length)return p();var e=t.touches[0],n=e.pageX,i=e.pageY;return Math.abs(n-v)>h||Math.abs(i-m)>h?p():void 0}}function y(){window.addEventListener("touchstart",g,d),window.addEventListener("touchmove",_,d),window.addEventListener("touchend",p,d),window.addEventListener("touchcancel",p,d)}},d5ec: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-radio-group",t._g({},t.$listeners),[t._t("default")],2)},r=[],o=n("8af1"),a={name:"RadioGroup",mixins:[o["a"],o["d"]],props:{name:{type:String,default:""}},data:function(){return{radioList:[]}},listeners:{"@radio-change":"_changeHandler","@radio-group-update":"_radioGroupUpdateHandler"},mounted:function(){this._resetRadioGroupValue(this.radioList.length-1)},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,e){var n=this.radioList.indexOf(e);this._resetRadioGroupValue(n,!0),this.$trigger("change",t,{value:e.radioValue})},_radioGroupUpdateHandler:function(t){if("add"===t.type)this.radioList.push(t.vm);else{var e=this.radioList.indexOf(t.vm);this.radioList.splice(e,1)}},_resetRadioGroupValue:function(t,e){var n=this;this.radioList.forEach((function(i,r){r!==t&&(e?n.radioList[r].radioChecked=!1:n.radioList.forEach((function(t,e){r>=e||n.radioList[e].radioChecked&&(n.radioList[r].radioChecked=!1)})))}))},_getFormData:function(){var t={};if(""!==this.name){var e="";this.radioList.forEach((function(t){t.radioChecked&&(e=t.value)})),t["value"]=e,t["key"]=this.name}return t}}},s=a,c=(n("fb61"),n("2877")),u=Object(c["a"])(s,i,r,!1,null,null,null);e["default"]=u.exports},d8c8:function(t,e,n){"use strict";var i,r,o=["top","left","right","bottom"],a={};function s(){return r="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":"",r}function c(){if(r="string"===typeof r?r:s(),r){var t=[],e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e={passive:!0}}});window.addEventListener("test",null,n)}catch(f){}var c=document.createElement("div");u(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),o.forEach((function(t){d(c,t)})),document.body.appendChild(c),l(),i=!0}else o.forEach((function(t){a[t]=0}));function u(t,e){var n=t.style;Object.keys(e).forEach((function(t){var i=e[t];n[t]=i}))}function l(e){e?t.push(e):t.forEach((function(t){t()}))}function d(t,n){var i=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div"),c=document.createElement("div"),d=100,f=1e4,p={position:"absolute",width:d+"px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"(safe-area-inset-"+n+")"};u(i,p),u(o,p),u(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),u(c,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),o.appendChild(c),t.appendChild(i),t.appendChild(o),l((function(){i.scrollTop=o.scrollTop=f;var t=i.scrollTop,r=o.scrollTop;function a(){this.scrollTop!==(this===i?t:r)&&(i.scrollTop=o.scrollTop=f,t=i.scrollTop,r=o.scrollTop,h(n))}i.addEventListener("scroll",a,e),o.addEventListener("scroll",a,e)}));var v=getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return parseFloat(v.paddingBottom)}})}}function u(t){return i||c(),a[t]}var l=[];function h(t){l.length||setTimeout((function(){var t={};l.forEach((function(e){t[e]=a[e]})),l.length=0,d.forEach((function(e){e(t)}))}),0),l.push(t)}var d=[];function f(t){s()&&(i||c(),"function"===typeof t&&d.push(t))}function p(t){var e=d.indexOf(t);e>=0&&d.splice(e,1)}var v={get support(){return 0!=("string"===typeof r?r:s()).length},get top(){return u("top")},get left(){return u("left")},get right(){return u("right")},get bottom(){return u("bottom")},onChange:f,offChange:p};t.exports=v},db18:function(t,e,n){"use strict";var i=n("db76"),r=n.n(i);r.a},db76:function(t,e,n){},db8e:function(t,e,n){"use strict";function i(t,e){if(t===e._$id)return e;for(var n=e.$children,r=n.length,o=0;o=0;i--){var r=t[i];"."===r?t.splice(i,1):".."===r?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function i(t){"string"!==typeof t&&(t+="");var e,n=0,i=-1,r=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!r){n=e+1;break}}else-1===i&&(r=!1,i=e+1);return-1===i?"":t.slice(n,i)}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===o(t,-1);return t=n(r(t.split("/"),(function(t){return!!t})),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function i(t){for(var e=0;e=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var r=i(t.split("/")),o=i(n.split("/")),a=Math.min(r.length,o.length),s=a,c=0;c=1;--o)if(e=t.charCodeAt(o),47===e){if(!r){i=o;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"/":t.slice(0,i)},e.basename=function(t,e){var n=i(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,i=-1,r=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===i&&(r=!1,i=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!r){n=a+1;break}}return-1===e||-1===i||0===o||1===o&&e===i-1&&e===n+1?"":t.slice(e,i)};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e1df:function(t,e,n){"use strict";(function(t){var i,r=n("8af1"),o=n("a20f");function a(t){return u(t)||c(t)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function c(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function u(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i||(i=document.createElement("canvas")),i.width=t,i.height=e,i}e["a"]={name:"Canvas",mixins:[r["e"]],props:{canvasId:{type:String,default:""},disableScroll:{type:[Boolean,String],default:!1}},data:function(){return{actionsWaiting:!1}},computed:{id:function(){return this.canvasId},_listeners:function(){var t=this,e=Object.assign({},this.$listeners),n=["touchstart","touchmove","touchend"];return n.forEach((function(n){var i=e[n],r=[];i&&r.push((function(e){t.$trigger(n,Object.assign({},e,{touches:h(e.currentTarget,e.touches),changedTouches:h(e.currentTarget,e.changedTouches)}))})),t.disableScroll&&"touchmove"===n&&r.push(t._touchmove),e[n]=r})),e}},created:function(){this._actionsDefer=[],this._images={}},mounted:function(){this._resize({width:this.$refs.sensor.$el.offsetWidth,height:this.$refs.sensor.$el.offsetHeight})},beforeDestroy:function(){var t=this.$refs.canvas;t.height=t.width=0},methods:{_handleSubscribe:function(t){var e=t.type,n=t.data,i=void 0===n?{}:n,r=this[e];0!==e.indexOf("_")&&"function"===typeof r&&r(i)},_resize:function(){Object(o["b"])(this.$refs.canvas)},_touchmove:function(t){t.preventDefault()},actionsChanged:function(e){var n=this,i=e.actions,r=e.reserve,o=e.callbackId,s=this;if(i)if(this.actionsWaiting)this._actionsDefer.push([i,r,o]);else{var c=this.$refs.canvas,u=c.getContext("2d");r||(u.fillStyle="#000000",u.strokeStyle="#000000",u.shadowColor="#000000",u.shadowBlur=0,u.shadowOffsetX=0,u.shadowOffsetY=0,u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,c.width,c.height)),this.preloadImage(i);var h=function(t){var e=i[t],r=e.method,c=e.data;if(/^set/.test(r)&&"setTransform"!==r){var h,d=r[3].toLowerCase()+r.slice(4);if("fillStyle"===d||"strokeStyle"===d){if("normal"===c[0])h=l(c[1]);else if("linear"===c[0]){var v=u.createLinearGradient.apply(u,a(c[1]));c[2].forEach((function(t){var e=t[0],n=l(t[1]);v.addColorStop(e,n)})),h=v}else if("radial"===c[0]){var m=c[1][0],g=c[1][1],_=c[1][2],y=u.createRadialGradient(m,g,0,m,g,_);c[2].forEach((function(t){var e=t[0],n=l(t[1]);y.addColorStop(e,n)})),h=y}else if("pattern"===c[0]){var b=n.checkImageLoaded(c[1],i.slice(t+1),o,(function(t){t&&(u[d]=u.createPattern(t,c[2]))}));return b?"continue":"break"}u[d]=h}else"globalAlpha"===d?u[d]=c[0]/255:"shadow"===d?(f=["shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor"],c.forEach((function(t,e){u[f[e]]="shadowColor"===f[e]?l(t):t}))):"fontSize"===d?u.font=u.font.replace(/\d+\.?\d*px/,c[0]+"px"):"lineDash"===d?(u.setLineDash(c[0]),u.lineDashOffset=c[1]||0):"textBaseline"===d?("normal"===c[0]&&(c[0]="alphabetic"),u[d]=c[0]):u[d]=c[0]}else if("fillPath"===r||"strokePath"===r)r=r.replace(/Path/,""),u.beginPath(),c.forEach((function(t){u[t.method].apply(u,t.data)})),u[r]();else if("fillText"===r)u.fillText.apply(u,c);else if("drawImage"===r){if(p=function(){var e=a(c),n=e[0],r=e.slice(1);if(s._images=s._images||{},!s.checkImageLoaded(n,i.slice(t+1),o,(function(t){t&&u.drawImage.apply(u,[t].concat(a(r.slice(4,8)),a(r.slice(0,4))))})))return"break"}(),"break"===p)return"break"}else"clip"===r?(c.forEach((function(t){u[t.method].apply(u,t.data)})),u.clip()):u[r].apply(u,c)};t:for(var d=0;d { '', `with(this){return _c('view',{attrs:{"data-b":_$s(0,'a-data-b',b),"_i":0}})}` ) + }) + it('generate v-if directive', () => { + assertCodegen( + '123d', + `with(this){return (_$s(0,'i',a))?_c('text'):(_$s(1,'e',b))?_c('text'):(_$s(2,'e',c))?_c('text'):_c('text')}` + ) }) }) /* eslint-enable quotes */ diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js index 00e7dbfe705d0af113792d66977afea500b4e3b1..23b14375a49b1835c5099f1f13ced7e7fc04b59e 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js @@ -75,6 +75,12 @@ describe('codegen', () => { '', `with(this){return _c('v-uni-view',{attrs:{"data-a":"1","data-b":_$g(0,'a-data-b'),"_i":0}})}` ) + }) + it('generate v-if directive', () => { + assertCodegen( + '123d', + `with(this){return (_$g(0,'i'))?_c('v-uni-text',{attrs:{"_i":0}},[_v("1")]):(_$g(1,'e'))?_c('v-uni-text',{attrs:{"_i":1}},[_v("2")]):(_$g(2,'e'))?_c('v-uni-text',{attrs:{"_i":2}},[_v("3")]):_c('v-uni-text',{attrs:{"_i":3}},[_v("d")])}` + ) }) }) /* eslint-enable quotes */ diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js index a5a238df2e5dde3a2e27a0ee8c1e10c2fdf02964..f674c7805f768e3d628337bf02c06e16dccf99db 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js @@ -141,14 +141,14 @@ describe('codegen', () => { it('generate v-model directive', () => { assertCodegen( '', - `with(this){return _c('v-uni-input',{attrs:{"_i":0},model:{value:_$g(0,'v-model'),callback:function(){},expression:"test"}})}` + `with(this){return _c('v-uni-input',{attrs:{"_i":0},model:{value:_$g(0,'v-model'),callback:function($$v){$handleVModelEvent(0,$$v)},expression:"test"}})}` ) }) it('generate multiline v-model directive', () => { assertCodegen( '', - `with(this){return _c('v-uni-input',{attrs:{"_i":0},model:{value:_$g(0,'v-model'),callback:function(){},expression:"\\n test \\n"}})}` + `with(this){return _c('v-uni-input',{attrs:{"_i":0},model:{value:_$g(0,'v-model'),callback:function($$v){$handleVModelEvent(0,$$v)},expression:"\\n test \\n"}})}` ) }) diff --git a/packages/uni-template-compiler/__tests__/demo.js b/packages/uni-template-compiler/__tests__/demo.js index 88d2fae464a58d3e56098a173f576939f9fdc62d..d97e014ea4d8fa52ec9c55acda752392a95020b4 100644 --- a/packages/uni-template-compiler/__tests__/demo.js +++ b/packages/uni-template-compiler/__tests__/demo.js @@ -18,13 +18,8 @@ const scopedPath = path.resolve(__dirname, '../../') const compiler = require('../lib') const res = compiler.compile( - ` - - - - - - + ` +123d `, { miniprogram: true, resourcePath: '/User/fxy/Documents/test.wxml', @@ -37,9 +32,9 @@ const res = compiler.compile( mp: { platform: 'mp-weixin' }, - filterModules: ['swipe'] + filterModules: ['swipe'], // service: true, - // view: true + view: true }) console.log(require('util').inspect(res, { diff --git a/packages/uni-template-compiler/lib/app/parser/base-parser.js b/packages/uni-template-compiler/lib/app/parser/base-parser.js index 30fe8da69b31c38529317bd2804d04c593cff67d..538e294df78e8354f065a60ed1fc45a49139adab 100644 --- a/packages/uni-template-compiler/lib/app/parser/base-parser.js +++ b/packages/uni-template-compiler/lib/app/parser/base-parser.js @@ -18,6 +18,10 @@ function parseIs (el, genVar) { } } +function isProcessed (exp) { + return String(exp).indexOf('_$') === 0 +} +// 当根节点是由if,elseif,else组成,会调用多次parseIf来解析root function parseIf (el, createGenVar, isScopedSlot) { if (!el.if) { return @@ -26,11 +30,13 @@ function parseIf (el, createGenVar, isScopedSlot) { isScopedSlot = false } el.ifConditions.forEach(con => { - if (isVar(con.exp)) { + if (!isProcessed(con.exp) && isVar(con.exp)) { con.exp = createGenVar(con.block.attrsMap[ID], isScopedSlot)(con.block.elseif ? V_ELSE_IF : V_IF, con.exp) } }) - el.if = createGenVar(el.attrsMap[ID], isScopedSlot)(V_IF, el.if) + if (!isProcessed(el.if)) { + el.if = createGenVar(el.attrsMap[ID], isScopedSlot)(V_IF, el.if) + } } function parseFor (el, createGenVar, isScopedSlot, fill = false) { diff --git a/packages/uni-template-compiler/lib/app/service.js b/packages/uni-template-compiler/lib/app/service.js index fc46da0508fc97543b31242a5b963d4ecafed32f..f7cfad5ff55c83f30b7459711d43a95ea9ddb325 100644 --- a/packages/uni-template-compiler/lib/app/service.js +++ b/packages/uni-template-compiler/lib/app/service.js @@ -156,6 +156,11 @@ function transformNode (el, parent, state, isScopedSlot) { function postTransformNode (el, options) { if (!el.parent) { // 从根节点开始递归处理 + if (options.root) { // 当根节点是由if,elseif,else组成 + parseIf(options.root, createGenVar) + } else { + options.root = el + } traverseNode(el, false, { forIteratorId: 0, transformNode, diff --git a/packages/uni-template-compiler/lib/app/view.js b/packages/uni-template-compiler/lib/app/view.js index 46242f9206d9b4db36ea93cc9408398eec7c041d..7f7f179e405fc12b7356254d27b62e76ce25e0d2 100644 --- a/packages/uni-template-compiler/lib/app/view.js +++ b/packages/uni-template-compiler/lib/app/view.js @@ -155,6 +155,11 @@ function transformNode (el, parent, state, isScopedSlot) { function postTransformNode (el, options) { if (!el.parent) { // 从根节点开始递归处理 + if (options.root) { // 当根节点是由if,elseif,else组成 + parseIf(options.root, createGenVar) + } else { + options.root = el + } traverseNode(el, false, { forIteratorId: 0, transformNode, @@ -235,4 +240,4 @@ module.exports = { }, postTransformNode, genData -} +} diff --git a/packages/vue-cli-plugin-uni/commands/serve.js b/packages/vue-cli-plugin-uni/commands/serve.js index 43340257553d116803bb924847f4e22f047c423e..0620ccd6083a5c903091812bced7cec6958b5997 100644 --- a/packages/vue-cli-plugin-uni/commands/serve.js +++ b/packages/vue-cli-plugin-uni/commands/serve.js @@ -250,8 +250,8 @@ module.exports = (api, options) => { isFirstCompile = false if (!isProduction) { - if (process.UNI_CLOUD_ALIYUN) { - console.warn(`当前项目使用了阿里云服务空间,暂不支持发行到H5平台`) + if (process.UNI_CLOUD) { + console.warn(`当前项目使用了uniCloud,为避免云函数调用跨域问题,建议在HBuilderX内置浏览器里调试,如使用外部浏览器需处理跨域,详见:https://uniapp.dcloud.io/uniCloud/quickstart-H5`) } // const buildCommand = hasProjectYarn(api.getCwd()) ? `yarn build` : `npm run build` // console.log(` Note that the development build is not optimized.`) diff --git a/packages/vue-cli-plugin-uni/lib/env.js b/packages/vue-cli-plugin-uni/lib/env.js index 7fb3b7bdf56ff202e70fad186c8dabe9eb122df1..45b9dfd60b4e35c5a4a9aa685b3254394cfad37f 100644 --- a/packages/vue-cli-plugin-uni/lib/env.js +++ b/packages/vue-cli-plugin-uni/lib/env.js @@ -3,6 +3,7 @@ const path = require('path') const mkdirp = require('mkdirp') const loaderUtils = require('loader-utils') +process.UNI_CLOUD = false process.UNI_CLOUD_ALIYUN = false process.env.UNI_CLOUD_PROVIDER = JSON.stringify({}) @@ -10,9 +11,11 @@ if (process.env.UNI_CLOUD_SPACES) { try { const spaces = JSON.parse(process.env.UNI_CLOUD_SPACES) if (Array.isArray(spaces)) { + process.UNI_CLOUD = spaces.length > 0 process.UNI_CLOUD_ALIYUN = !!spaces.find(space => space.clientSecret) if (spaces.length === 1) { - const space = spaces[0] + const space = spaces[0] + console.log(`本项目的uniCloud使用的默认服务空间spaceId为:${space.id}`) if (space.clientSecret) { process.env.UNI_CLOUD_PROVIDER = JSON.stringify({ provider: 'aliyun', @@ -35,12 +38,11 @@ if (process.env.UNI_CLOUD_SPACES) { // h5 暂不支持阿里云服务空间 if ( - process.UNI_CLOUD_ALIYUN && + process.UNI_CLOUD && process.env.UNI_PLATFORM === 'h5' && process.env.NODE_ENV === 'production' ) { - console.error(`当前项目使用了阿里云服务空间,暂不支持发行到H5平台`) - process.exit(0) + console.warn(`发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart-H5`) } if (process.env.UNI_PLATFORM === 'mp-360') { diff --git a/packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js b/packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js index 09d93895fcbb4dc926fdcdbd1f632bf2e040f609..6a562d09bc69c3d8b90f851220c705e9f69cdb92 100644 --- a/packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js +++ b/packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js @@ -1 +1 @@ -var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=n((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},s=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=o.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var s=0;s>>2]>>>24-s%4*8&255;t[r+s>>>2]|=i<<24-(r+s)%4*8}else for(s=0;s>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=function(t){t=t;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},s=0;s>>2]>>>24-o%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new i.init(n,t/2)}},u=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new i.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var l=0;l>>24)|4278255360&(o<<24|o>>>8)}var s=this._hash.words,i=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],y=e[t+4],v=e[t+5],g=e[t+6],_=e[t+7],m=e[t+8],w=e[t+9],b=e[t+10],E=e[t+11],S=e[t+12],T=e[t+13],O=e[t+14],k=e[t+15],A=s[0],P=s[1],I=s[2],N=s[3];A=u(A,P,I,N,i,7,a[0]),N=u(N,A,P,I,c,12,a[1]),I=u(I,N,A,P,h,17,a[2]),P=u(P,I,N,A,d,22,a[3]),A=u(A,P,I,N,y,7,a[4]),N=u(N,A,P,I,v,12,a[5]),I=u(I,N,A,P,g,17,a[6]),P=u(P,I,N,A,_,22,a[7]),A=u(A,P,I,N,m,7,a[8]),N=u(N,A,P,I,w,12,a[9]),I=u(I,N,A,P,b,17,a[10]),P=u(P,I,N,A,E,22,a[11]),A=u(A,P,I,N,S,7,a[12]),N=u(N,A,P,I,T,12,a[13]),I=u(I,N,A,P,O,17,a[14]),A=l(A,P=u(P,I,N,A,k,22,a[15]),I,N,c,5,a[16]),N=l(N,A,P,I,g,9,a[17]),I=l(I,N,A,P,E,14,a[18]),P=l(P,I,N,A,i,20,a[19]),A=l(A,P,I,N,v,5,a[20]),N=l(N,A,P,I,b,9,a[21]),I=l(I,N,A,P,k,14,a[22]),P=l(P,I,N,A,y,20,a[23]),A=l(A,P,I,N,w,5,a[24]),N=l(N,A,P,I,O,9,a[25]),I=l(I,N,A,P,d,14,a[26]),P=l(P,I,N,A,m,20,a[27]),A=l(A,P,I,N,T,5,a[28]),N=l(N,A,P,I,h,9,a[29]),I=l(I,N,A,P,_,14,a[30]),A=f(A,P=l(P,I,N,A,S,20,a[31]),I,N,v,4,a[32]),N=f(N,A,P,I,m,11,a[33]),I=f(I,N,A,P,E,16,a[34]),P=f(P,I,N,A,O,23,a[35]),A=f(A,P,I,N,c,4,a[36]),N=f(N,A,P,I,y,11,a[37]),I=f(I,N,A,P,_,16,a[38]),P=f(P,I,N,A,b,23,a[39]),A=f(A,P,I,N,T,4,a[40]),N=f(N,A,P,I,i,11,a[41]),I=f(I,N,A,P,d,16,a[42]),P=f(P,I,N,A,g,23,a[43]),A=f(A,P,I,N,w,4,a[44]),N=f(N,A,P,I,S,11,a[45]),I=f(I,N,A,P,k,16,a[46]),A=p(A,P=f(P,I,N,A,h,23,a[47]),I,N,i,6,a[48]),N=p(N,A,P,I,_,10,a[49]),I=p(I,N,A,P,O,15,a[50]),P=p(P,I,N,A,v,21,a[51]),A=p(A,P,I,N,S,6,a[52]),N=p(N,A,P,I,d,10,a[53]),I=p(I,N,A,P,b,15,a[54]),P=p(P,I,N,A,c,21,a[55]),A=p(A,P,I,N,m,6,a[56]),N=p(N,A,P,I,k,10,a[57]),I=p(I,N,A,P,g,15,a[58]),P=p(P,I,N,A,T,21,a[59]),A=p(A,P,I,N,y,6,a[60]),N=p(N,A,P,I,E,10,a[61]),I=p(I,N,A,P,h,15,a[62]),P=p(P,I,N,A,w,21,a[63]),s[0]=s[0]+A|0,s[1]=s[1]+P|0,s[2]=s[2]+I|0,s[3]=s[3]+N|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var s=e.floor(r/4294967296),i=r;n[15+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,r,o,s,i){var a=e+(t&n|~t&r)+o+i;return(a<>>32-s)+t}function l(e,t,n,r,o,s,i){var a=e+(t&r|n&~r)+o+i;return(a<>>32-s)+t}function f(e,t,n,r,o,s,i){var a=e+(t^n^r)+o+i;return(a<>>32-s)+t}function p(e,t,n,r,o,s,i){var a=e+(n^(t|~r))+o+i;return(a<>>32-s)+t}t.MD5=s._createHelper(c),t.HmacMD5=s._createHmacHelper(c)}(Math),n.MD5)})),n((function(e,t){var n,o,s;e.exports=(o=(n=r).lib.Base,s=n.enc.Utf8,void(n.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),i=this._iKey=t.clone(),a=o.words,c=i.words,u=0;ue.code},requestId:{get:()=>e.requestId},message:{get(){return`errCode: ${e.code||""} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}var i={sign:function(e,t){let n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),o(n,t).toString()},wrappedRequest:function(e){return new Promise((t,n)=>{uni.request(Object.assign(e,{complete(e){e||(e={});const r=e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return n(new s({code:"SYS_ERR",message:"Request Error",requestId:r}));const o=e.data;if(o.error)return n(new s({code:o.error.code,message:o.error.message,requestId:r}));o.result=o.data,o.requestId=r,delete o.data,t(o)}}))})}};const a={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",mp4:"video/mp4",ogg:"audio/ogg",webm:"video/webm"};function c(e){return a[e.toLowerCase()]}class u{constructor(e){["spaceId","clientSecret"].forEach(t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`缺少参数${t}`)}),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.setAccessToken(uni.getStorageSync(this.config.accessTokenKey)||"")}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){uni.setStorageSync(this.config.accessTokenKey,e),this.accessToken=e}requestAuth(e){return i.wrappedRequest(e)}request(e,t){return this.hasAccessToken?t?i.wrappedRequest(e):i.wrappedRequest(e).catch(t=>new Promise((e,n)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()}).then(()=>this.getAccessToken()).then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})):this.getAccessToken().then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=i.sign(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=i.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}getAccessToken(){return this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then(e=>new Promise((t,n)=>{e.result&&e.result.accessToken?(this.setAccessToken(e.result.accessToken),t(this.accessToken)):n(new s({code:"AUTH_FAILED",message:"获取accessToken失败"}))}))}authorize(){this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,fileName:n,name:r,filePath:o,fileType:i,contentType:a}){return new Promise((a,c)=>{uni.uploadFile({url:e,formData:t,fileName:n,name:r,filePath:o,fileType:i,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?a(e):c(new s({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){c(e)}})})}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFile({filePath:e,config:t}){const n=t&&t.envType||this.config.envType;let r,o,i,u,l,f=e.split("/").pop();return(r="h5"===process.env.VUE_APP_PLATFORM?new Promise((t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.onload=function(){(o=function(e){let t;return Object.keys(a).forEach(n=>{a[n]===e&&(t=n)}),t}(this.response.type))||n(new s({code:"UNSUPPORTED_FILE_TYPE",message:"不支持的文件类型"})),f+="."+o,t()},r.send()}):c(o=e.split(".").pop())?Promise.resolve():Promise.reject(new s({code:"UNSUPPORTED_FILE_TYPE",message:"不支持的文件类型"}))).then(()=>this.getOSSUploadOptionsFromPath({env:n,filename:f})).then(t=>{const n=t.result;i=c(o),u=n.id,l="https://"+n.host+"/"+n.ossPath;const r={url:"https://"+n.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:n.accessKeyId,Signature:n.signature,host:n.host,id:u,key:n.ossPath,policy:n.policy,success_action_status:200},fileName:"file",name:"file",filePath:e,fileType:"image",contentType:i};return this.uploadFileToOSS(r)}).then(()=>this.reportOSSUpload({id:u,contentType:i})).then(t=>new Promise((n,r)=>{t.success?n({success:!0,filePath:e,fileID:l}):r(new s({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({id:e[0]})};return this.request(this.setupRequest(t))}}const l=require("uni-stat-config").default||require("uni-stat-config"),f="__DC_STAT_UUID",p="__DC_UUID_VALUE",h="https://ide.dcloud.net.cn/serverless/function/invoke";function d(){return{"app-plus":"n",h5:"h5","mp-weixin":"wx","mp-alipay":"ali","mp-baidu":"bd","mp-toutiao":"tt","mp-qq":"qq"}[process.env.VUE_APP_PLATFORM]}function y(e){return function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then(e=>{t.success&&t.success(e),t.complete&&t.complete(e)}).catch(e=>{t.fail&&t.fail(e),t.complete&&t.complete(e)})}}const v=uni.getSystemInfoSync(),g={PLATFORM:process.env.VUE_APP_PLATFORM,OS:v.platform,APPID:l.appid},_={ak:l.appid,p:"android"===v.platform?"a":"i",ut:d(),uuid:function(){let e="";if("n"===d()){try{e=plus.runtime.getDCloudId()}catch(t){e=""}return e}try{e=uni.getStorageSync(f)}catch(t){e=p}if(!e){e=Date.now()+""+Math.floor(1e7*Math.random());try{uni.setStorageSync(f,e)}catch(e){uni.setStorageSync(f,p)}}return e}()},m={init(e){const t=new u(e);t.authorize();return["callFunction","uploadFile","deleteFile"].forEach(e=>{t[e]=y(t[e]).bind(t)}),t}};var w;!function(e){e.local="local",e.none="none",e.session="session"}(w||(w={}));var b=function(){},E=function(){};function S(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var s in n)""===o?!r&&(t+="?"):o+="&",o+=s+"="+encodeURIComponent(n[s]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}var T,O=Object.freeze({__proto__:null,get StorageType(){return w},AbstractSDKRequest:b,AbstractStorage:E,formatUrl:S}),k=(T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=0;s-=1)r[s].split("=")[0]===e&&r.splice(s,1);n=n+"?"+r.join("&")}return n},t.createPromiseCallback=function(){var e;if(!Promise){(e=function(){}).promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e},t.getWeixinCode=function(){return t.getQuery("code")||t.getHash("code")},t.getMiniAppCode=function(){return new Promise((function(e,t){wx.login({success:function(t){e(t.code)},fail:function(e){t(e)}})}))},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isString=function(e){return"string"==typeof e},t.isUndefined=function(e){return void 0===e},t.isInstanceOf=function(e,t){return e instanceof t},t.isFormData=function(e){return"[object FormData]"===Object.prototype.toString.call(e)},t.genSeqId=function(){return Math.random().toString(16).slice(2)},t.getArgNames=function(e){var t=e.toString();return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(/([^\s,]+)/g)},t.formatUrl=function(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var s in n)""===o?!r&&(t+="?"):o+="&",o+=s+"="+encodeURIComponent(n[s]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}}));t(q);q.getQuery,q.getHash,q.removeParam,q.createPromiseCallback,q.getWeixinCode,q.getMiniAppCode,q.isArray,q.isString,q.isUndefined,q.isInstanceOf,q.isFormData,q.genSeqId,q.getArgNames,q.formatUrl;var j,U="dist/index.js",L="./dist/index.d.ts",D={build:"npm run tsc && webpack",tsc:"tsc -p tsconfig.json","tsc:w":"tsc -p tsconfig.json -w",test:"jest --verbose false -i",e2e:'NODE_ENV=e2e webpack && jest --config="./jest.e2e.config.js" --verbose false -i "e2e"',start:"webpack-dev-server --hot --open",eslint:'eslint "./**/*.js" "./**/*.ts"',"eslint-fix":'eslint --fix "./**/*.js" "./**/*.ts"',test_web:"npm run tsc && webpack-dev-server --devtool eval-source-map --progress --colors --hot --inline --content-base ./dist --host jimmytest-088bef.tcb.qcloud.la --port 80 --disableHostCheck true --mode development --config webpack.test.js"},K={type:"git",url:"https://github.com/TencentCloudBase/tcb-js-sdk"},F=["tcb","js-sdk"],M={"@cloudbase/adapter-interface":"^0.2.0","@cloudbase/adapter-wx_mp":"^0.2.1","@cloudbase/database":"^0.9.8"},G={"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-typescript":"^7.6.0","@babel/runtime":"^7.6.2","@types/jest":"^23.1.4","@types/node":"^10.14.4","@types/superagent":"^4.1.4",axios:"^0.19.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","babel-polyfill":"^6.26.0",eslint:"^5.16.0","eslint-config-alloy":"^1.4.2","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","eslint-plugin-typescript":"^1.0.0-rc.3",express:"^4.17.1",husky:"^3.1.0",jest:"^24.7.1","jest-puppeteer":"^4.3.0","lint-staged":"^9.5.0","power-assert":"^1.6.1",puppeteer:"^1.20.0","serve-static":"^1.14.1","ts-jest":"^23.10.4","ts-loader":"^6.2.1",typescript:"^3.4.3","typescript-eslint-parser":"^22.0.0",webpack:"^4.41.3","webpack-bundle-analyzer":"^3.4.1","webpack-cli":"^3.3.0","webpack-dev-server":"^3.3.1","webpack-merge":"^4.2.2","webpack-visualizer-plugin":"^0.1.11"},H={hooks:{"pre-commit":"lint-staged"}},Y={name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:U,types:L,scripts:D,repository:K,keywords:F,author:"jimmyjzhang",license:"ISC",dependencies:M,devDependencies:G,husky:H,"lint-staged":{"*.{js,ts}":["eslint --fix","git add"]}},V=(j=Object.freeze({__proto__:null,name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:U,types:L,scripts:D,repository:K,keywords:F,author:"jimmyjzhang",license:"ISC",dependencies:M,devDependencies:G,husky:H,default:Y}))&&j.default||j,B=n((function(t,n){var r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(n,"__esModule",{value:!0});var o=r(V);n.SDK_VERISON=o.version,n.ACCESS_TOKEN="access_token",n.ACCESS_TOKEN_Expire="access_token_expire",n.REFRESH_TOKEN="refresh_token",n.ANONYMOUS_UUID="anonymous_uuid",n.LOGIN_TYPE_KEY="login_type",n.protocol="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:",n.BASE_URL="e2e"===process.env.NODE_ENV&&"pre"===process.env.END_POINT?"//tcb-pre.tencentcloudapi.com/web":"//tcb-api.tencentcloudapi.com/web"}));t(B);B.SDK_VERISON,B.ACCESS_TOKEN,B.ACCESS_TOKEN_Expire,B.REFRESH_TOKEN,B.ANONYMOUS_UUID,B.LOGIN_TYPE_KEY,B.protocol,B.BASE_URL;var W=n((function(t,n){var r=e&&e.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=e&&e.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=0?JSON.parse(n).content:""},e.prototype.removeStore=function(e){this.storageClass.removeItem(e)},e}();n.Cache=o;var s=function(e){function t(){var t=e.call(this)||this;return z.Adapter.adapter.root.tcbObject||(z.Adapter.adapter.root.tcbObject={}),t}return r(t,e),t.prototype.setItem=function(e,t){z.Adapter.adapter.root.tcbObject[e]=t},t.prototype.getItem=function(e){return z.Adapter.adapter.root.tcbObject[e]},t.prototype.removeItem=function(e){delete z.Adapter.adapter.root.tcbObject[e]},t.prototype.clear=function(){delete z.Adapter.adapter.root.tcbObject},t}(O.AbstractStorage)}));t(J);J.Cache;var X=n((function(t,n){var r=e&&e.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0},e}();n.IEventEmitter=a;var c=new a;n.addEventListener=function(e,t){c.on(e,t)},n.activateEvent=function(e,t){void 0===t&&(t={}),c.fire(e,t)},n.removeEventListener=function(e,t){c.off(e,t)},n.EVENTS={LOGIN_STATE_CHANGED:"loginStateChanged",LOGIN_STATE_EXPIRE:"loginStateExpire",LOGIN_TYPE_CHANGE:"loginTypeChanged",ANONYMOUS_CONVERTED:"anonymousConverted",REFRESH_ACCESS_TOKEN:"refreshAccessToken"}}));t(X);X.IEvent,X.IErrorEvent,X.IEventEmitter,X.addEventListener,X.activateEvent,X.removeEventListener,X.EVENTS;var $=n((function(t,n){var r=e&&e.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]Date.now())return[2,{credential:{accessToken:e,refreshToken:this.cache.getStore(this.refreshTokenKey)}}];this.cache.removeStore(this.accessTokenKey),this.cache.removeStore(this.accessTokenExpireKey)}if(!1===Object.values(a).includes(a[this.scope]))throw new Error("错误的scope类型");return z.Adapter.runtime!==z.RUNTIME.WX_MP?[3,2]:[4,u.getMiniAppCode()];case 1:return n=s.sent(),[3,4];case 2:return[4,u.getWeixinCode()];case 3:if(!(n=s.sent()))return[2,this.redirect()];s.label=4;case 4:return r=function(e){switch(e){case a.snsapi_login:return"WECHAT-OPEN";default:return"WECHAT-PUBLIC"}}(this.scope),[4,this.getRefreshTokenByWXCode(this.appid,r,n)];case 5:return o=s.sent(),i=o.refreshToken,this.cache.setStore(this.refreshTokenKey,i),o.accessToken&&this.cache.setStore(this.accessTokenKey,o.accessToken),o.accessTokenExpire&&this.cache.setStore(this.accessTokenExpireKey,o.accessTokenExpire+Date.now()),X.activateEvent(X.EVENTS.LOGIN_STATE_CHANGED),X.activateEvent(X.EVENTS.LOGIN_TYPE_CHANGE,l.LOGINTYPE.WECHAT),[2,{credential:{refreshToken:i}}]}}))}))},t.prototype.redirect=function(){var e=u.removeParam("code",location.href);e=u.removeParam("state",e),e=encodeURIComponent(e);var t="//open.weixin.qq.com/connect/oauth2/authorize";"snsapi_login"===this.scope&&(t="//open.weixin.qq.com/connect/qrconnect"),"redirect"===c[this.loginMode]&&(location.href=t+"?appid="+this.appid+"&redirect_uri="+e+"&response_type=code&scope="+this.scope+"&state="+this.state+"#wechat_redirect")},t}(l.default);n.default=p}));t(Z);var ee=n((function(t,n){var r=e&&e.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=e&&e.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{uni.request({url:h,method:"POST",data:{param:a},complete(n){n||(n={});const r=n.data&&n.data.body;if(!r)return void t(new Error(`[FUNCTIONS_EXECUTE_FAIL] Request Fail: [${i}]`));if(console.log(`[uniCloud]${r.log}[/uniCloud]`),0!==r.invokeResult&&"0"!==r.invokeResult)return void t(new Error(r.errorMsg));const o=r.requestId;let s={};try{s=JSON.parse(r.result)}catch(e){s=r.result}e({requestId:o,result:s})}})})}fe.init=function(e){e.env=e.spaceId;const t=pe.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const n=t.auth;t.auth=function(e){const t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach(e=>{t[e]=y(t[e]).bind(t)}),t};if(["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile"].forEach(e=>{t[e]=y(t[e]).bind(t)}),!1!==e.autoSignIn){const e=t.auth();e.getLoginState().then(t=>{t||e.signInAnonymously()})}return t};const ye={init(e){let t={};switch(e.provider){case"tencent":t=fe.init(e);break;case"aliyun":t=m.init(e);break;default:throw new Error("未提供正确的provider参数")}const n=!1!==e.debugFunction&&"development"===process.env.NODE_ENV&&("app-plus"===process.env.VUE_APP_PLATFORM||"h5"===process.env.VUE_APP_PLATFORM)&&process.env.HBX_USER_TOKEN;if(n&&"tencent"===e.provider)t.callFunction=function(e){return y(de).call(this,e)};else if(n&&"aliyun"===e.provider){const n=t.callFunction;t.callFunction=function(t){const r=he.call(this,t);return n.call(this,r).then(t=>{if(t&&t.requestId){const n=JSON.stringify({spaceId:e.spaceId,functionName:r.name,requestId:t.requestId,token:process.env.HBX_USER_TOKEN});console.log(`[aliyun-request]${n}[/aliyun-request]`)}return Promise.resolve(t)}).catch(t=>{if(t&&t.requestId){const n=JSON.stringify({spaceId:e.spaceId,functionName:r.name,requestId:t.requestId,token:process.env.HBX_USER_TOKEN});console.log(`[aliyun-request]${n}[/aliyun-request]`)}return Promise.reject(t)})}}else{const e=t.callFunction;t.callFunction=function(t){const n=he.call(this,t);return e.call(this,n)}}return t.init=this.init,t}};let ve=ye;try{ve=ye.init(process.env.UNI_CLOUD_PROVIDER)}catch(e){["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile"].forEach(e=>{ve[e]=function(){return console.error("请先执行uniCloud.init指明所用的服务空间"),Promise.reject(new s({code:"SYS_ERR",message:"请先执行uniCloud.init指明所用的服务空间"}))}})}var ge=ve;export default ge; +"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t=e((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},i=s.lib={},r=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,s=this.sigBytes,i=e.sigBytes;if(this.clamp(),s%4)for(var r=0;r>>2]>>>24-r%4*8&255;t[s+r>>>2]|=o<<24-(s+r)%4*8}else for(r=0;r>>2]=n[r>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,s=[],i=function(t){t=t;var n=987654321,s=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&s)<<16)+(t=18e3*(65535&t)+(t>>16)&s)&s;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},r=0;r>>2]>>>24-i%4*8&255;s.push((r>>>4).toString(16)),s.push((15&r).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,n=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new o.init(n,t/2)}},u=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,s=[],i=0;i>>2]>>>24-i%4*8&255;s.push(String.fromCharCode(r))}return s.join("")},parse:function(e){for(var t=e.length,n=[],s=0;s>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new o.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=i.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,s=n.words,i=n.sigBytes,r=this.blockSize,a=i/(4*r),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*r,u=e.min(4*c,i);if(c){for(var l=0;l>>24)|4278255360&(i<<24|i>>>8)}var r=this._hash.words,o=e[t+0],c=e[t+1],f=e[t+2],d=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],_=e[t+8],w=e[t+9],S=e[t+10],T=e[t+11],O=e[t+12],P=e[t+13],I=e[t+14],q=e[t+15],b=r[0],E=r[1],A=r[2],k=r[3];b=u(b,E,A,k,o,7,a[0]),k=u(k,b,E,A,c,12,a[1]),A=u(A,k,b,E,f,17,a[2]),E=u(E,A,k,b,d,22,a[3]),b=u(b,E,A,k,g,7,a[4]),k=u(k,b,E,A,m,12,a[5]),A=u(A,k,b,E,y,17,a[6]),E=u(E,A,k,b,v,22,a[7]),b=u(b,E,A,k,_,7,a[8]),k=u(k,b,E,A,w,12,a[9]),A=u(A,k,b,E,S,17,a[10]),E=u(E,A,k,b,T,22,a[11]),b=u(b,E,A,k,O,7,a[12]),k=u(k,b,E,A,P,12,a[13]),A=u(A,k,b,E,I,17,a[14]),b=l(b,E=u(E,A,k,b,q,22,a[15]),A,k,c,5,a[16]),k=l(k,b,E,A,y,9,a[17]),A=l(A,k,b,E,T,14,a[18]),E=l(E,A,k,b,o,20,a[19]),b=l(b,E,A,k,m,5,a[20]),k=l(k,b,E,A,S,9,a[21]),A=l(A,k,b,E,q,14,a[22]),E=l(E,A,k,b,g,20,a[23]),b=l(b,E,A,k,w,5,a[24]),k=l(k,b,E,A,I,9,a[25]),A=l(A,k,b,E,d,14,a[26]),E=l(E,A,k,b,_,20,a[27]),b=l(b,E,A,k,P,5,a[28]),k=l(k,b,E,A,f,9,a[29]),A=l(A,k,b,E,v,14,a[30]),b=h(b,E=l(E,A,k,b,O,20,a[31]),A,k,m,4,a[32]),k=h(k,b,E,A,_,11,a[33]),A=h(A,k,b,E,T,16,a[34]),E=h(E,A,k,b,I,23,a[35]),b=h(b,E,A,k,c,4,a[36]),k=h(k,b,E,A,g,11,a[37]),A=h(A,k,b,E,v,16,a[38]),E=h(E,A,k,b,S,23,a[39]),b=h(b,E,A,k,P,4,a[40]),k=h(k,b,E,A,o,11,a[41]),A=h(A,k,b,E,d,16,a[42]),E=h(E,A,k,b,y,23,a[43]),b=h(b,E,A,k,w,4,a[44]),k=h(k,b,E,A,O,11,a[45]),A=h(A,k,b,E,q,16,a[46]),b=p(b,E=h(E,A,k,b,f,23,a[47]),A,k,o,6,a[48]),k=p(k,b,E,A,v,10,a[49]),A=p(A,k,b,E,I,15,a[50]),E=p(E,A,k,b,m,21,a[51]),b=p(b,E,A,k,O,6,a[52]),k=p(k,b,E,A,d,10,a[53]),A=p(A,k,b,E,S,15,a[54]),E=p(E,A,k,b,c,21,a[55]),b=p(b,E,A,k,_,6,a[56]),k=p(k,b,E,A,q,10,a[57]),A=p(A,k,b,E,y,15,a[58]),E=p(E,A,k,b,P,21,a[59]),b=p(b,E,A,k,g,6,a[60]),k=p(k,b,E,A,T,10,a[61]),A=p(A,k,b,E,f,15,a[62]),E=p(E,A,k,b,w,21,a[63]),r[0]=r[0]+b|0,r[1]=r[1]+E|0,r[2]=r[2]+A|0,r[3]=r[3]+k|0},_doFinalize:function(){var t=this._data,n=t.words,s=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var r=e.floor(s/4294967296),o=s;n[15+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,s,i,r,o){var a=e+(t&n|~t&s)+i+o;return(a<>>32-r)+t}function l(e,t,n,s,i,r,o){var a=e+(t&s|n&~s)+i+o;return(a<>>32-r)+t}function h(e,t,n,s,i,r,o){var a=e+(t^n^s)+i+o;return(a<>>32-r)+t}function p(e,t,n,s,i,r,o){var a=e+(n^(t|~s))+i+o;return(a<>>32-r)+t}t.MD5=r._createHelper(c),t.HmacMD5=r._createHmacHelper(c)}(Math),s.MD5)})),e((function(e,n){var s,i,r;e.exports=(i=(s=t).lib.Base,r=s.enc.Utf8,void(s.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,s=4*n;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),a=i.words,c=o.words,u=0;ue.code},requestId:{get:()=>e.requestId},message:{get(){return`errCode: ${e.code||""} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}var i={sign:function(e,t){let s="";return Object.keys(e).sort().forEach((function(t){e[t]&&(s=s+"&"+t+"="+e[t])})),s=s.slice(1),n(s,t).toString()},wrappedRequest:function(e){return new Promise((t,n)=>{uni.request(Object.assign(e,{complete(e){e||(e={});const i=e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return n(new s({code:"SYS_ERR",message:e.errMsg||"Request Error",requestId:i}));const r=e.data;if(r.error)return n(new s({code:r.error.code,message:r.error.message,requestId:i}));r.result=r.data,r.requestId=i,delete r.data,t(r)}}))})}};const r={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mp3",mp4:"video/mp4",ogg:"audio/ogg",webm:"video/webm"};function o(e){return r[e.toLowerCase()]}class a{constructor(e){["spaceId","clientSecret"].forEach(t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`缺少参数${t}`)}),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){uni.setStorageSync(this.config.accessTokenKey,e),this.accessToken=e}requestAuth(e){return i.wrappedRequest(e)}request(e,t){return this.hasAccessToken?t?i.wrappedRequest(e):i.wrappedRequest(e).catch(t=>new Promise((e,n)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()}).then(()=>this.getAccessToken()).then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})):this.getAccessToken().then(()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=i.sign(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),s={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,s["x-basement-token"]=this.accessToken),s["x-serverless-sign"]=i.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:s}}getAccessToken(){return this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then(e=>new Promise((t,n)=>{e.result&&e.result.accessToken?(this.setAccessToken(e.result.accessToken),t(this.accessToken)):n(new s({code:"AUTH_FAILED",message:"获取accessToken失败"}))}))}authorize(){this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.config.useDebugFunction?this.request(this.setupRequest(t)).then(t=>{if(t&&t.requestId){const n=JSON.stringify({spaceId:this.config.spaceId,functionName:e.name,requestId:t.requestId});console.log(`[aliyun-request]${n}[/aliyun-request]`)}return Promise.resolve(t)}).catch(t=>{if(t&&t.requestId){const n=JSON.stringify({spaceId:this.config.spaceId,functionName:e.name,requestId:t.requestId});console.log(`[aliyun-request]${n}[/aliyun-request]`)}return Promise.reject(t)}):this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,fileName:n,name:i,filePath:r,fileType:o,contentType:a}){return new Promise((a,c)=>{uni.uploadFile({url:e,formData:t,fileName:n,name:i,filePath:r,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?a(e):c(new s({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){c(e)}})})}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFile({filePath:e,config:t}){const n=t&&t.envType||this.config.envType;let i,a,c,u,l,h=e.split("/").pop();return(i="h5"===process.env.VUE_APP_PLATFORM?new Promise((t,n)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="blob",i.onload=function(){(a=function(e){let t;return Object.keys(r).forEach(n=>{r[n]===e&&(t=n)}),t}(this.response.type))||n(new s({code:"UNSUPPORTED_FILE_TYPE",message:"不支持的文件类型"})),h+="."+a,t()},i.send()}):o(a=e.split(".").pop())?Promise.resolve():Promise.reject(new s({code:"UNSUPPORTED_FILE_TYPE",message:"不支持的文件类型"}))).then(()=>this.getOSSUploadOptionsFromPath({env:n,filename:h})).then(t=>{const n=t.result;c=o(a),u=n.id,l="https://"+n.host+"/"+n.ossPath;const s={url:"https://"+n.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:n.accessKeyId,Signature:n.signature,host:n.host,id:u,key:n.ossPath,policy:n.policy,success_action_status:200},fileName:"file",name:"file",filePath:e,fileType:"image",contentType:c};return this.uploadFileToOSS(s)}).then(()=>this.reportOSSUpload({id:u,contentType:c})).then(t=>new Promise((n,i)=>{t.success?n({success:!0,filePath:e,fileID:l}):i(new s({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({id:e[0]})};return this.request(this.setupRequest(t))}}const c=require("uni-stat-config").default||require("uni-stat-config"),u="__DC_STAT_UUID",l="__DC_UUID_VALUE",h="https://ide.dcloud.net.cn/serverless/function/invoke";function p(){let e="";if("n"===f()){try{e=plus.runtime.getDCloudId()}catch(t){e=""}return e}try{e=uni.getStorageSync(u)}catch(t){e=l}if(!e){e=Date.now()+""+Math.floor(1e7*Math.random());try{uni.setStorageSync(u,e)}catch(e){uni.setStorageSync(u,l)}}return e}function f(){return{"app-plus":"n",h5:"h5","mp-weixin":"wx","mp-alipay":"ali","mp-baidu":"bd","mp-toutiao":"tt","mp-qq":"qq"}[process.env.VUE_APP_PLATFORM]}function d(e){return function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then(e=>{t.success&&t.success(e),t.complete&&t.complete(e)}).catch(e=>{t.fail&&t.fail(e),t.complete&&t.complete(e)})}}const g={init(e){const t=new a(e);return["callFunction","uploadFile","deleteFile"].forEach(e=>{t[e]=d(t[e]).bind(t)}),setTimeout(()=>{t.authorize()}),t}};let m,y;function v(e){m||(m=function(){const e=uni.getSystemInfoSync();return{PLATFORM:process.env.VUE_APP_PLATFORM,OS:e.platform,APPID:c.appid}}(),y=function(){const e=uni.getSystemInfoSync();return{ak:c.appid,p:"android"===e.platform?"a":"i",ut:f(),uuid:p()}}());const t=JSON.parse(JSON.stringify(e.data||{})),n=e.name,s=this.config.spaceId,i=Object.assign({},y,{fn:n,sid:s});return Object.assign(t,{clientInfo:m,uniCloudClientInfo:encodeURIComponent(JSON.stringify(i))}),e.data=t,e}function _(e){const t=v.call(this,e),n={tencent:"tcb",aliyun:"aliyun"}[this.config.provider],s=y.ak,i=this.config.spaceId,r=JSON.stringify(t.data),o=t.name,a=JSON.stringify({body:{provider:n,appid:s,spaceId:i,functionName:o,run_params:r},header:{token:process.env.HBX_USER_TOKEN}});return new Promise((e,t)=>{uni.request({url:h,method:"POST",data:{param:a},complete(n){n||(n={});const s=n.data&&n.data.body;if(!s)return void t(new Error(`[FUNCTIONS_EXECUTE_FAIL] Request Fail: [${o}]`));if(console.log(`[uniCloud]${s.log}[/uniCloud]`),0!==s.invokeResult&&"0"!==s.invokeResult)return void t(new Error(s.errorMsg));const i=s.requestId;let r={};try{r=JSON.parse(s.result)}catch(e){r=s.result}e({requestId:i,result:r})}})})}const w={init(e){let t={};const n=!(!1===e.debugFunction||"development"!==process.env.NODE_ENV||"app-plus"!==process.env.VUE_APP_PLATFORM&&"h5"!==process.env.VUE_APP_PLATFORM||!process.env.HBX_USER_TOKEN);switch(e.provider){case"aliyun":t=g.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error("未提供正确的provider参数")}if(n&&"tencent"===e.provider)t.callFunction=function(e){return d(_).call(this,e)};else{const e=t.callFunction;t.callFunction=function(t){const n=v.call(this,t);return e.call(this,n)}}const s=t.callFunction;return t.callFunction=function(e){return"development"===process.env.NODE_ENV&&console.log(`[spaceId:${this.config.spaceId}]`),s.call(this,e)},t.init=this.init,t}};let S=w;try{S=w.init(process.env.UNI_CLOUD_PROVIDER)}catch(e){["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile"].forEach(e=>{S[e]=function(){return console.error("请先执行uniCloud.init指明所用的服务空间"),Promise.reject(new s({code:"SYS_ERR",message:"请先执行uniCloud.init指明所用的服务空间"}))}})}var T=S;export default T; diff --git a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js index d9a6a113c6b357b1d0da900e8d89d1ee27a76dc6..478f18af3248419adfd569589fc79bda7c558799 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js @@ -34,23 +34,23 @@ function isPlainObject (obj) { function normalizeNetworkTimeout (appJson) { if (!isPlainObject(appJson.networkTimeout)) { appJson.networkTimeout = { - request: 6000, - connectSocket: 6000, - uploadFile: 6000, - downloadFile: 6000 + request: 60000, + connectSocket: 60000, + uploadFile: 60000, + downloadFile: 60000 } } else { if (typeof appJson.networkTimeout.request === 'undefined') { - appJson.networkTimeout.request = 6000 + appJson.networkTimeout.request = 60000 } if (typeof appJson.networkTimeout.connectSocket === 'undefined') { - appJson.networkTimeout.connectSocket = 6000 + appJson.networkTimeout.connectSocket = 60000 } if (typeof appJson.networkTimeout.uploadFile === 'undefined') { - appJson.networkTimeout.uploadFile = 6000 + appJson.networkTimeout.uploadFile = 60000 } if (typeof appJson.networkTimeout.downloadFile === 'undefined') { - appJson.networkTimeout.downloadFile = 6000 + appJson.networkTimeout.downloadFile = 60000 } } } diff --git a/src/core/helpers/api.js b/src/core/helpers/api.js index 9b7a2a8b2afbdcc8d64f28e1ac8e242198170a10..3ca954d8d507f24694270071af1f04e3e3c880d0 100644 --- a/src/core/helpers/api.js +++ b/src/core/helpers/api.js @@ -163,8 +163,13 @@ function createApiCallback (apiName, params = {}, extras = {}) { res.errMsg = apiName + ':ok' } else if (res.errMsg.indexOf(':cancel') !== -1) { res.errMsg = apiName + ':cancel' - } else if (res.errMsg.indexOf(':fail') !== -1) { - res.errMsg = apiName + ':fail' + res.errMsg.substr(res.errMsg.indexOf(' ')) + } else if (res.errMsg.indexOf(':fail') !== -1) { + let errDetail = '' + let spaceIndex = res.errMsg.indexOf(' ') + if (spaceIndex > -1) { + errDetail = res.errMsg.substr(spaceIndex) + } + res.errMsg = apiName + ':fail' + errDetail } const errMsg = res.errMsg diff --git a/src/core/helpers/protocol/network/upload-file.js b/src/core/helpers/protocol/network/upload-file.js index f18836c4f31cc0b00086b418b3c464969a1e33ec..ac648921e891bb237266484301894834c3a191fb 100644 --- a/src/core/helpers/protocol/network/upload-file.js +++ b/src/core/helpers/protocol/network/upload-file.js @@ -1,20 +1,19 @@ -import getRealPath from 'uni-platform/helpers/get-real-path' +// App端可以只使用files不传filePath和name +// import getRealPath from 'uni-platform/helpers/get-real-path' export const uploadFile = { url: { type: String, required: true }, + files: { + type: Array + }, filePath: { - type: String, - required: true, - validator (value, params) { - params.type = getRealPath(value) - } + type: String }, name: { - type: String, - required: true + type: String }, header: { type: Object, diff --git a/src/core/service/api/context/background-audio.js b/src/core/service/api/context/background-audio.js index ca2c661ecb88d62b6987ccbcd77c8c83a5de748a..f9c07702366069cc9e3187657db2816039d08db8 100644 --- a/src/core/service/api/context/background-audio.js +++ b/src/core/service/api/context/background-audio.js @@ -119,7 +119,7 @@ class BackgroundAudioManager { this._operate('stop') } seek (position) { - this._operate('play', { + this._operate('seek', { currentTime: position }) } diff --git a/src/core/view/bridge/subscribe/api/request-component-info.js b/src/core/view/bridge/subscribe/api/request-component-info.js index d99c272e60c98e9adcfe6c637f3b060e7c48818f..453d833f53a774eb225ab732a1abe43b6b0d8a36 100644 --- a/src/core/view/bridge/subscribe/api/request-component-info.js +++ b/src/core/view/bridge/subscribe/api/request-component-info.js @@ -84,14 +84,15 @@ function getNodeInfo (el, fields) { function getNodesInfo (pageVm, component, selector, single, fields) { const $el = findElm(component, pageVm) + if (!$el || ($el && $el.nodeType === 8)) { // Comment + return single ? null : [] + } if (single) { - const node = $el && ($el.matches(selector) ? $el : $el.querySelector(selector)) + const node = $el.matches(selector) ? $el : $el.querySelector(selector) if (node) { return getNodeInfo(node, fields) } return null - } else if (!$el) { - return [] } else { let infos = [] const nodeList = $el.querySelectorAll(selector) @@ -101,7 +102,7 @@ function getNodesInfo (pageVm, component, selector, single, fields) { }) } if ($el.matches(selector)) { - infos.unshift($el) + infos.unshift(getNodeInfo($el, fields)) } return infos } @@ -139,4 +140,4 @@ export function requestComponentInfo ({ reqId, res: result }, pageVm.$page.id) -} +} diff --git a/src/core/vue.js b/src/core/vue.js index 1a3b37f20b018a577dbf5561e359fddd64f2b398..ba808a9aa9f0904da66a7d88e06542e0cbe7bc76 100644 --- a/src/core/vue.js +++ b/src/core/vue.js @@ -7,7 +7,7 @@ import { export default function initVue (Vue) { Vue.config.errorHandler = function (err) { - const app = getApp() + const app = typeof getApp === 'function' && getApp() if (app && hasLifecycleHook(app.$options, 'onError')) { app.__call_hook('onError', err) } else { diff --git a/src/platforms/app-plus/service/api/ad/rewarded-video-ad.js b/src/platforms/app-plus/service/api/ad/rewarded-video-ad.js new file mode 100644 index 0000000000000000000000000000000000000000..c76dd29c01ff8ab4bbd0bf92d54080d0eabf4d61 --- /dev/null +++ b/src/platforms/app-plus/service/api/ad/rewarded-video-ad.js @@ -0,0 +1,92 @@ + +const eventNames = [ + 'load', + 'close', + 'error' +] + +const ERROR_CODE_LIST = [-5001, -5002, -5003, -5004, -5005, -5006] + +class RewardedVideoAd { + constructor (adpid) { + this._options = { + adpid: adpid + } + + const _callbacks = this._callbacks = {} + eventNames.forEach(item => { + _callbacks[item] = [] + const name = item[0].toUpperCase() + item.substr(1) + this[`on${name}`] = function (callback) { + _callbacks[item].push(callback) + } + }) + + this._isLoad = false + this._adError = '' + this._loadPromiseResolve = null + this._loadPromiseReject = null + const rewardAd = this._rewardAd = plus.ad.createRewardedVideoAd(this._options) + rewardAd.onLoad((e) => { + this._isLoad = true + this._dispatchEvent('load', {}) + if (this._loadPromiseResolve != null) { + this._loadPromiseResolve() + this._loadPromiseResolve = null + } + }) + rewardAd.onClose((e) => { + this._loadAd() + this._dispatchEvent('close', { isEnded: e.isEnded }) + }) + rewardAd.onError((e) => { + const { code, message } = e + const data = { code: code, errMsg: message } + this._adError = message + this._dispatchEvent('error', data) + if ((code === -5005 || ERROR_CODE_LIST.index(code) === -1) && this._loadPromiseReject != null) { + this._loadPromiseReject(data) + this._loadPromiseReject = null + } + }) + this._loadAd() + } + load () { + return new Promise((resolve, reject) => { + if (this._isLoad) { + resolve() + return + } + this._loadPromiseResolve = resolve + this._loadPromiseReject = reject + this._loadAd() + }) + } + show () { + return new Promise((resolve, reject) => { + if (this._isLoad) { + this._rewardAd.show() + resolve() + } else { + reject(new Error(this._adError)) + } + }) + } + _loadAd () { + this._isLoad = false + this._rewardAd.load() + } + _dispatchEvent (name, data) { + this._callbacks[name].forEach(callback => { + if (typeof callback === 'function') { + callback(data || {}) + } + }) + } +} + +export function createRewardedVideoAd ({ + adpid = '' +} = {}) { + return new RewardedVideoAd(adpid) +} diff --git a/src/platforms/app-plus/service/api/index.js b/src/platforms/app-plus/service/api/index.js index 71d3b4c32ab372282633724f55a293e4bc47bb93..0f7ec57a634fdd5110c6c8a7eae07c322c144bb0 100644 --- a/src/platforms/app-plus/service/api/index.js +++ b/src/platforms/app-plus/service/api/index.js @@ -69,3 +69,5 @@ export { export * from './ui/tab-bar' export * from './ui/request-component-info' + +export * from './ad/rewarded-video-ad'