zartui 2.1.28 → 2.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/image-preview/Download.js +17 -0
- package/es/image-preview/ImagePreview.js +97 -13
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.js +1 -0
- package/es/image-preview/index.less +37 -25
- package/es/image-preview/style/index.js +1 -0
- package/es/image-preview/style/less.js +1 -0
- package/es/index.js +1 -1
- package/es/media-picker/index.js +11 -1
- package/es/multiple-picker/index.js +10 -15
- package/es/uploader/style/index.js +1 -0
- package/es/uploader/style/less.js +1 -0
- package/lib/1.js +6668 -0
- package/lib/1.min.js +1 -0
- package/lib/image-preview/Download.js +21 -0
- package/lib/image-preview/ImagePreview.js +101 -14
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.js +1 -0
- package/lib/image-preview/index.less +37 -25
- package/lib/image-preview/style/index.js +1 -0
- package/lib/image-preview/style/less.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +11 -1
- package/lib/multiple-picker/index.js +10 -15
- package/lib/uploader/style/index.js +1 -0
- package/lib/uploader/style/less.js +1 -0
- package/lib/zart.js +307 -84
- package/lib/zart.min.js +3 -3
- package/package.json +8 -1
package/lib/1.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
("undefined"!=typeof self?self:this.webpackJsonpzart="undefined"!=typeof self?self:this.webpackJsonpzart||[]).push([[1],{14:function(e,n,t){"use strict";(function(e,o){t.d(n,"g",(function(){return r})),t.d(n,"e",(function(){return i})),t.d(n,"d",(function(){return c})),t.d(n,"b",(function(){return u})),t.d(n,"a",(function(){return s})),t.d(n,"c",(function(){return l})),t.d(n,"f",(function(){return f}));var r="undefined"!=typeof window&&"onload"in window,i=void 0!==e&&!(!e.versions||!e.versions.node),a="undefined"!=typeof WXEnvironment&&"Web"!==WXEnvironment.platform,c="undefined"!=typeof my&&null!==my&&void 0!==my.alert,u="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,s="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,l="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,f=!u&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),d=(null!=o&&o.callNative,c&&r&&my.isFRM,"object"==typeof navigator?navigator.userAgent||navigator.swuserAgent:"");/.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(d)&&r&&"undefined"!=typeof WindVane&&WindVane.call}).call(this,t(16),t(10))},16:function(e,n){var t,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var u,s=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&p())}function p(){if(!l){var e=c(d);l=!0;for(var n=s.length;n;){for(u=s,s=[];++f<n;)u&&u[f].run();f=-1,n=s.length}u=null,l=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(n){try{return o.call(null,e)}catch(n){return o.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function v(){}r.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];s.push(new h(e,n)),1!==s.length||l||c(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},24:function(e,n,t){"use strict";function o(){var e=window.jsi&&window.jsi.callNative,n=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative;return!!e||!!n}function r(e,n){void 0===n&&(n=window);var t=n||window;delete t[e],t.top&&delete t.top[e]}function i(e){var n=e.methodName,t=void 0===n?"":n,i=e.requestCode,a=void 0===i?-1:i,c=e.params,u=void 0===c?{}:c,s=e.callbackName,l=void 0===s?null:s,f=e.callbackFunc,d=void 0===f?null:f,p=e.autoClear,h=void 0===p||p,v=e.onFail,m=void 0===v?null:v;if(o()){var g={method:t,params:u,callback:null};a&&a>=0&&(g.requestCode=a);var w,y,b=l,I=d;b?I||(I=window[b]):I&&((w=window.top||window).hasOwnProperty("__callId__")||(w.__callId__=0),w.__callId__+=1,b="jsicallback"+w.__callId__),g.callback=b,b&&function(e,n,t){var o=this,i=window;window[e]=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];n&&r(e,i),t.apply(o,a)},window.top&&(window.top[e]=window[e])}(b,h,(y=I,function(e){var n=e;try{"string"==typeof n&&(n=n.replace(/\n/g,"\\n").replace(/\r/g,"\\r"),n=JSON.parse(n)||{})}catch(e){console.log(e),n={code:-1,msg:"返回数据格式异常:".concat(n)}}console.debug(n),y&&(n||(n={}),n.isSuccess=0===n.code,y(n))}));var P=JSON.stringify(g);window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative?window.webkit.messageHandlers.callNative.postMessage(P):window.jsi.callNative(P)}else m&&m()}function a(e){var n=e.methodName,t=void 0===n?"":n,o=e.requestCode,r=void 0===o?-1:o,a=e.params,c=void 0===a?{}:a,u=e.callbackName,s=void 0===u?null:u,l=e.autoClear,f=void 0===l||l,d=e.timeout,p=void 0===d?1e4:d,h=e.raw,v=void 0===h||h,m=e.onFail,g=void 0===m?null:m;return new Promise((function(e,n){var o=!1,a=!1;i({methodName:t,requestCode:r,params:c,callbackName:s,autoClear:f,callbackFunc:function(t){t&&t.isSuccess&&t.data&&t.data.cancelFlag?a=!0:(v?e(t):t.isSuccess?e(t.data):n(t.msg),o=!0)},onFail:function(){n("callNative ".concat(t," not supported")),console.error("callNative ".concat(t," not supported")),o=!0,g&&g()}}),p>0&&setTimeout((function(){o||a||(n(t+"超时"),g&&g())}),p)}))}var c,u;t.r(n),t.d(n,"SCREEN_ORIENTATION",(function(){return c})),t.d(n,"JsInterface",(function(){return s})),t.d(n,"isV22",(function(){return g})),t.d(n,"isZhixin",(function(){return f})),t.d(n,"isSMT",(function(){return d})),t.d(n,"isDingDing",(function(){return p})),t.d(n,"isWeiXin",(function(){return h})),t.d(n,"isIOS",(function(){return v})),t.d(n,"isAndroid",(function(){return m})),t.d(n,"isIframe",(function(){return w})),t.d(n,"isJinBan",(function(){return y})),t.d(n,"isZhuanYouDingDing",(function(){return b})),t.d(n,"registerJSI",(function(){return Er})),t.d(n,"unregisterJSI",(function(){return Sr})),t.d(n,"getJSI",(function(){return Ar})),t.d(n,"canIUse",(function(){return Mr})),function(e){e.LANDSCAPE="landscape",e.PORTRAIT="portrait"}(c||(c={})),function(e){e.BAIDU="baidu",e.DEFAULT="default"}(u||(u={}));var s=function(){function e(){}return e.prototype.isEnvironmentEnabled=function(){return!1},e}(),l=navigator.userAgent.toLowerCase(),f=window.jsi&&window.jsi.callNative,d=window.jsInterface&&window.jsInterface.loadFinish,p=l&&/dingtalk/.test(l),h=l&&/micromessenger/.test(l),v=l&&/iphone|ipad|ipod|ios/.test(l),m=l&&/android/.test(l),g=l&&(/egovamobilev22/.test(l)||/egovamobilepro/.test(l)),w=window.self!==window.top,y=l&&/gwork/.test(l),b=l&&/taurusapp/.test(l);function I(e){return a({methodName:"getLocation",params:g?{}:{needConvert:null==e?void 0:e.needConvertInZhixin}}).then((function(n){var t,o,r=(null==n?void 0:n.data)||{},i=g?{longitude:r.x,latitude:r.y,accuracy:"",horizontalAccuracy:"",coordType:1}:{longitude:r.x,latitude:r.y,accuracy:"",horizontalAccuracy:"",coordType:r.coordType,convertType:null!==(t=r.convertType)&&void 0!==t?t:"",convertParams:null!==(o=r.convertParams)&&void 0!==o?o:""};return e&&e.success&&e.success(i),Promise.resolve(i)})).catch((function(n){e&&e.fail&&e.fail(n)}))}function P(e){return a({methodName:"getBase64FileData",params:{path:e},raw:!1}).then((function(e){return Promise.resolve(e.base64)}))}function x(e,n,t){for(var o=atob(e),r=o.length,i=new Uint8Array(r);r--;)i[r]=o.charCodeAt(r);return new File([i],n,{type:t})}function j(e){var n=function(e){return{status:"rejected",reason:e}},t=function(e){return{status:"fulfilled",value:e}};return Promise.all(e.map((function(e){return Promise.resolve(e).then(t,n)})))}function k(e){var n=e.lastIndexOf("/");return e.substring(n+1)}function O(e){var n=g?"image.pickPhoto":"media.pickPhoto",t=!0;e.sourceType&&e.sourceType.includes("camera")&&(n=g?"image.takePhoto":"media.takePhoto",t=!1);var o={watermarkConfigString:e.watermarkConfigString||"",cameraFacingType:e.cameraFacingType||0,watermarkContext:e.watermarkContext||{}};return t&&e.count&&e.count>0&&(g?o.count=e.count:o.photoCount=e.count),a({methodName:n,timeout:3e5,params:o}).then((function(n){var t,o=(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.resultList)||[];if("string"==typeof o)try{o=JSON.parse(o)||[]}catch(e){console.log(e)}var r=[],i=[];return j(o.map((function(e){return P(e)}))).then((function(n){n.forEach((function(e,n){if("fulfilled"===e.status){var t=e.value,a=k(o[n]);r.push(x(t,a,"image/jpeg")),i.push("data:image/jpeg;base64,".concat(t))}}));var t={files:r,tempFilePaths:i};return e.success&&e.success(t),Promise.resolve(t)}))})).catch((function(n){return e.fail&&e.fail(n),Promise.reject(n)}))}function N(e,n){var t="media.pickVideo";return n?t=n:e.sourceType&&e.sourceType.includes("camera")&&(t="media.takeVideo"),a({methodName:t,params:e,timeout:3e5}).then((function(n){var t,o=(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.resultList)||[];if("string"==typeof o)try{o=JSON.parse(o)||[]}catch(e){console.log(e)}var r=[];return j(o.map((function(e){return P(e)}))).then((function(n){n.forEach((function(e,n){if("fulfilled"===e.status){var t=e.value,i=k(o[n]);r.push(x(t,i,"video/mp4"))}}));var t={files:r};return e.success&&e.success(t),Promise.resolve(t)}))})).catch((function(n){return e.fail&&e.fail(n),Promise.reject(n)}))}function C(e){return N(e,g?"video.takeVideo":"media.takeVideo")}function T(e){var n=g?"video.pickVideo":"media.pickVideo";return e.sourceType&&e.sourceType.includes("camera")&&(n=g?"video.takeVideo":"media.takeVideo"),N(e,n)}function _(e){var n=e.endX,t=e.endY,o=e.longitude,r=e.latitude,i=e.endAddress,c=e.needConvertInZhixin,u=o||n||-1,s=r||t||-1;return a(g?{methodName:"location.navigateToPosition",params:{longitude:u,latitude:s,address:i}}:{methodName:"navigateToPosition",params:{coordX:u,coordY:s,address:i,needConvert:c}})}function E(e){return i({methodName:g?"navigation.setTitle":"bindNavBar",raw:!1,params:{title:e.title||""}}),e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()}function S(e){return a({methodName:"navigation.setColor",params:{backgroundColor:e.backgroundColor,frontColor:e.frontColor}}).then((function(){return e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()})).catch((function(n){return e.fail&&e.fail(n),e.complete&&e.complete(),Promise.reject(n)}))}function A(e){return a({methodName:g?"navigate.openLink":"openWebPage",raw:!1,params:{url:e.url||""}}).then((function(){return e.success&&e.success(),Promise.resolve()})).catch((function(n){return e.fail&&e.fail(n),Promise.reject(n)}))}function M(){return a({methodName:g?"navigate.close":"close",raw:!1}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function B(e){var n=e.success,t=e.fail,o=e.phoneNumber;return a({methodName:g?"device.phoneCall":"phoneCall",params:{phoneNum:o},onFail:t}).then((function(e){return n&&n(e),Promise.resolve(e)}))}function L(e){return a({methodName:g?"device.scan":"startQrCodeScan",timeout:3e5}).then((function(n){return n&&n.isSuccess?(e.success&&e.success(n&&n.data&&n.data.result),Promise.resolve(n&&n.data&&n.data.result)):(e.fail&&e.fail(n&&n.msg||"扫码失败"),Promise.reject(n&&n.msg||"扫码失败"))}))}function V(e){return a({methodName:"device.ocrScan",params:{scanType:e.scanType,photoTypes:(null==e?void 0:e.photoTypes)||""},timeout:3e5}).then((function(n){return n&&n.isSuccess?(e.success&&e.success(n.data),Promise.resolve(n.data)):(e.fail&&e.fail(n&&n.msg||"扫描识别失败"),Promise.reject(n&&n.msg||"扫描识别失败"))}))}function F(e){return a({methodName:"getDeviceInfo"}).then((function(n){return e.success&&e.success(n.data),Promise.resolve(n.data)}))}function R(e){return a({methodName:"navigation.setStatusBarBlackFont",params:{blackFont:e}}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function D(e){return a({raw:!1,methodName:"audio.startRecord",timeout:3e5}).then((function(n){return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function z(e){return a({raw:!1,methodName:"audio.stopRecord",timeout:3e5}).then((function(n){return e&&e.success&&e.success({localAudioId:n.path,duration:n.duration,size:n.size}),Promise.resolve({localAudioId:n.path,duration:n.duration,size:n.size})})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function q(e){return a({raw:!1,methodName:"audio.onRecordEnd",timeout:3e5}).then((function(n){return e&&e.success&&e.success({localAudioId:n.path,duration:n.duration,size:n.size}),Promise.resolve({localAudioId:n.path,duration:n.duration,size:n.size})})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function U(e){return a({raw:!1,methodName:"audio.playVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(n){return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function G(e){return a({raw:!1,methodName:"audio.pauseVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(n){return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function W(e){return a({methodName:"audio.stopVoice",raw:!1,timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(n){return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function X(e){return a({methodName:"audio.onPlayEnd",raw:!1,timeout:36e5}).then((function(n){return e&&e.success&&e.success({localAudioId:n.path}),Promise.resolve({localAudioId:n.path})})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function H(e){return a({methodName:"audio.uploadVoice",raw:!1,timeout:3e5,params:{localAudioId:e.localAudioId}}).then((function(n){return e&&e.success&&e.success({mediaId:n.mediaId}),Promise.resolve({mediaId:n.mediaId})})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function J(e){return a({methodName:"audio.downloadVoice",raw:!1,timeout:3e5,params:{mediaId:e.mediaId}}).then((function(n){return e&&e.success&&e.success({localAudioId:n.path,duration:n.duration,size:n.size}),Promise.resolve({localAudioId:n.path,duration:n.duration,size:n.size})})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function Y(e){return a({methodName:"file.isLocalFileExist",params:{mediaIdArray:e.mediaIdArray}}).then((function(n){var t,o=(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.list)||[];return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function Z(e){return a({methodName:"file.download",timeout:36e5,params:{url:e.url}}).then((function(n){var t;if((null==n?void 0:n.isSuccess)||!1){var o={tempFilePath:(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.tempFilePath)||""};return e&&e.success&&e.success(o),Promise.resolve(o)}var r=(null==n?void 0:n.msg)||"下载失败";return e&&e.fail&&e.fail(r),Promise.reject(r)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function K(e){return a({methodName:"file.openDocument",params:{localFilePath:e.localFilePath}}).then((function(n){if((null==n?void 0:n.isSuccess)||!1){var t=(null==n?void 0:n.data)||{};return e&&e.success&&e.success(t),Promise.resolve(t)}var o=(null==n?void 0:n.msg)||"打开文件失败";return e&&e.fail&&e.fail(o),Promise.reject(o)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function Q(e){if(g)return a({methodName:"device.setScreenOrientation",params:{orientation:e.orientation}}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve()})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}));return a({methodName:e.orientation===c.LANDSCAPE?"setLandScape":"setPortrait"}).then((function(){return Promise.resolve()})).catch((function(){return Promise.resolve()}))}function $(e){return g?a({methodName:"contact.createGroup",params:{groupName:(null==e?void 0:e.groupName)||"",initUserIdList:(null==e?void 0:e.initUserIdList)||[],useInitUser:null==e?void 0:e.useInitUser,hiddenExistGroup:null==e?void 0:e.hiddenExistGroup,autoSendMsg:(null==e?void 0:e.autoSendMsg)||"",themeGroupId:(null==e?void 0:e.themeGroupId)||""}}).then((function(n){var t=(null==n?void 0:n.data)||{};return e&&e.success&&e.success(t),Promise.resolve(t)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)})):a({methodName:"startDiscuss",params:{title:(null==e?void 0:e.groupName)||""}}).then((function(n){var t=(null==n?void 0:n.data)||{};return e&&e.success&&e.success(t),Promise.resolve(t)})).catch((function(){return Promise.resolve()}))}function ee(e){return g?a({methodName:"im.getGroupsInfo",params:{data:(null==e?void 0:e.data)||[]}}).then((function(n){var t=(null==n?void 0:n.data)||{};return e&&e.success&&e.success(t),Promise.resolve(t)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)})):Promise.resolve()}function ne(e){return g?a({methodName:"im.getGroupMemberList",params:{groupID:null==e?void 0:e.groupID,filter:(null==e?void 0:e.filter)||0,offset:(null==e?void 0:e.offset)||0,count:(null==e?void 0:e.count)||9999}}).then((function(n){var t=(null==n?void 0:n.data)||{};return e&&e.success&&e.success(t),Promise.resolve(t)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)})):Promise.resolve()}function te(e){return a({methodName:"egova.speak",params:{content:(null==e?void 0:e.content)||"",ttsType:(null==e?void 0:e.ttsType)||u.DEFAULT}}).then((function(n){return n&&n.isSuccess?(e.success&&e.success(n),Promise.resolve(n)):(e.fail&&e.fail(n&&n.msg||"转换语音失败"),Promise.reject(n&&n.msg||"转换语音失败"))}))}function oe(e){return a({methodName:"egova.stopSpeak"}).then((function(n){return n&&n.isSuccess?(e.success&&e.success(n),Promise.resolve(n)):(e.fail&&e.fail(n&&n.msg||"转换语音失败"),Promise.reject(n&&n.msg||"转换语音失败"))}))}function re(e){return g?a({methodName:"navigate.openNativePage",params:{pageAddress:(null==e?void 0:e.pageAddress)||""}}).then((function(n){if((null==n?void 0:n.isSuccess)||!1)return e&&e.success&&e.success(null==n?void 0:n.data),Promise.resolve(null==n?void 0:n.data);var t=n.msg||"";return e&&e.fail&&e.fail(t),Promise.reject(t)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)})):new Promise((function(n,t){e&&e.fail&&e.fail("暂不支持"),t("暂不支持")}))}function ie(e){return a({methodName:"device.openBluetoothAdapter"}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve()})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function ae(e){return a({methodName:"device.startBluetoothDevicesDiscovery",params:{services:(null==e?void 0:e.services)||[],allowDuplicatesKey:!!(null==e?void 0:e.allowDuplicatesKey),interval:(null==e?void 0:e.interval)||0}}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve()})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function ce(e){return a({methodName:"device.stopBluetoothDevicesDiscovery"}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve()})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function ue(e){return delete window.callbackBluetoothDeviceFound,a({methodName:"device.closeBluetoothAdapter"}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve()})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function se(e){return a({methodName:"device.getBluetoothDevices"}).then((function(n){return e&&e.success&&e.success(n.data),Promise.resolve(n.data)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))}function le(e){return window.callbackBluetoothDeviceFound&&(window.callbackBluetoothDeviceFound=null),window.callbackBluetoothDeviceFound=function(n){try{var t=JSON.parse(n);"function"==typeof e&&e(t)}catch(n){"function"==typeof e&&e("onBluetoothDeviceFound发生异常"+(null==n?void 0:n.toString())),console.error("onBluetoothDeviceFound 发生异常",n)}},a({methodName:"device.onBluetoothDeviceFound"}).then((function(e){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}var fe,de=(fe=function(e,n){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}fe(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}),pe=function(e){function n(){var n=e.call(this)||this;return n.contact={createGroup:$},g?(n.navigate={close:M,openLink:A,openNativePage:re},n.navigationBar={setNavigationBarTitle:E,setNavigationBarColor:S,setStatusBarBlackFont:R},n.location={getLocation:I,navigateTo:_},n.device={makePhoneCall:B,scan:L,ocrScan:V,setScreenOrientation:Q,openBluetoothAdapter:ie,startBluetoothDevicesDiscovery:ae,stopBluetoothDevicesDiscovery:ce,getBluetoothDevices:se,closeBluetoothAdapter:ue,onBluetoothDeviceFound:le,speak:te,stopSpeak:oe},n.audio={startRecord:D,stopRecord:z,onRecordEnd:q,playVoice:U,pauseVoice:G,stopVoice:W,onPlayEnd:X,uploadVoice:H,downloadVoice:J},n.file={isLocalFileExist:Y,download:Z,openDocument:K},n.media={chooseImage:O,takeVideo:C,chooseVideo:T},n.im={getGroupsInfo:ee,getGroupMemberList:ne}):(n.navigate={close:M,openLink:A},n.navigationBar={setNavigationBarTitle:E},n.location={getLocation:I,navigateTo:_},n.device={makePhoneCall:B,scan:L,getSystemInfo:F,setScreenOrientation:Q},n.media={chooseImage:O,chooseVideo:T,takeVideo:C},n.file={download:Z,openDocument:K}),n}return de(n,e),n.prototype.isEnvironmentEnabled=function(){return o()},n.prototype.share=function(e){return a({methodName:"share",params:{title:e.title,description:e.description,url:e.url,platforms:e.platforms,image:e.image,needAuth:e.needAuth}}).then((function(){return e.success&&e.success(),Promise.resolve()})).catch((function(n){return e.fail&&e.fail(n),Promise.reject(n)}))},n}(s),he=t(14);function ve(){return(ve=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function me(e){return function(n){return new Promise((function(t,o){var r=n;e(ve({},r,{success:function(e){r&&"function"==typeof r.success&&r.success(e),t(e)},onSuccess:function(e){r&&"function"==typeof r.onSuccess&&r.onSuccess(e),t(e)},fail:function(e){r&&"function"==typeof r.fail&&r.fail(e),o(e)},onFail:function(e){r&&"function"==typeof r.onFail&&r.onFail(e),o(e)},complete:function(e){r&&"function"==typeof r.complete&&r.complete(e)},onComplete:function(e){r&&"function"==typeof r.onComplete&&r.onComplete(e)}}))}))}}var ge=["_ext"];function we(){return(we=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var ye=function(e,n){var t=e||{},o=t._ext,r=void 0===o?{}:o;return we({},function(e,n){if(null==e)return{};var t,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(t,ge),r[n]||{})};function be(e,n){return function(t){return me(e)(ye(t,n))}}var Ie="wechatMiniProgram",Pe="aliMiniApp",xe="bytedanceMicroApp",je="web",ke="baiduSmartProgram",Oe="kuaishouMiniProgram",Ne="node";function Ce(e){return"undefined"===e}var Te=!Ce(typeof dd)&&null!==dd&&!Ce(typeof dd.alert),_e=["phoneNumber"];function Ee(){return(Ee=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Se=be((function(e){if(Te)dd.showCallMenu(e);else{var n=e.phoneNumber,t=function(e,n){if(null==e)return{};var t,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,_e);my.makePhoneCall(Ee({},t,{number:n}))}}),Pe),Ae=be((function(e){var n=null==e?void 0:e.phoneNumber,t=document.createElement("a");t.href="tel:"+n,t.innerHTML="tel:"+n,t.style.display="none",document.body.appendChild(t),setTimeout((function(){t.click(),setTimeout((function(){try{document.body.removeChild(t)}catch(e){}finally{null==e||e.success()}}),0)}),0)}),je),Me=be((function(e){wx.makePhoneCall(e)}),Ie),Be=be((function(e){tt.makePhoneCall(e)}),xe),Le=be((function(e){ks.makePhoneCall(e)}),Oe),Ve=be((function(e){swan.makePhoneCall(e)}),ke);var Fe=function(e){if(he.g)return Ae(e);if(he.c)return Le(e);if(he.f)return Me(e);if(he.b)return Be(e);if(he.d)return Se(e);if(he.a)return Ve(e);throw new Error("Uni API:makePhoneCall 暂不支持")};function Re(){return(Re=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var De=function(e,n){return function(t){void 0===t&&(t={});var o=ye(t,n),r=Re({hideAlbum:!1,scanType:["barCode","qrCode"]},o,{success:function(e){o.success&&o.success(e)},complete:function(e){o.complete&&o.complete(e)}});return me(e)(r)}},ze=De((function(e){var n=e.hideAlbum,t=e.scanType,o=e.success,r=e.fail,i=e.complete;my.scan({hideAlbum:n,scanType:t,success:o,fail:r,complete:i})}),Pe),qe={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"},Ue=De((function(e){var n=e.hideAlbum,t=e.scanType,o=e.success,r=e.fail,i=e.complete;wx.scanCode({onlyFromCamera:n,scanType:qe[t],success:o,fail:r,complete:i})}),Ie),Ge=De((function(e){var n=e.hideAlbum,t=e.scanType,o=e.success,r=e.fail,i=e.complete;tt.scanCode({onlyFromCamera:n,scanType:t,success:o,fail:r,complete:i})}),xe),We=De((function(e){var n=e.success,t=e.fail,o=e.complete;swan.scanCode({success:n,fail:t,complete:o})}),ke),Xe={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"},He=De((function(e){var n=e.hideAlbum,t=e.scanType,o=e.success,r=e.fail,i=e.complete;ks.scanCode({onlyFromCamera:n,scanType:Xe[t],success:o,fail:r,complete:i})}),Oe),Je=function(e){if(he.g)return function(){throw new Error("Uni API: scanCode不支持")}();if(he.c)return He(e);if(he.f)return Ue(e);if(he.b)return Ge(e);if(he.d)return ze(e);if(he.a)return We(e);throw new Error("Uni API:scanCode暂不支持")};function Ye(){return(Ye=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Ze=function(e){var n="en";switch(e.toLowerCase()){case"zh_cn":case"zh-hans":case"zh-cn":case"chinese":n="zh_CN";break;case"zh_tw":case"zh-hant":case"zh-hk":n="zh_TW";break;case"en":case"english":case"en-us":n="en";break;default:n="en"}return n},Ke=function(e){return function(){var n=e();return Qe(n)}},Qe=function(e){return Ye({},{pixelRatio:1,screenWidth:0,screenHeight:0,windowWidth:0,windowHeight:0,language:"",version:"",platform:""},e,{language:e.language?Ze(e.language):""})},$e=function(e,n){return function(t){var o=ye(t,n),r=Ye({},o,{success:function(e){o.success&&o.success(Qe(e))},complete:function(e){o.complete&&o.complete(e.pixelRatio?Qe(e):e)}});return me(e)(r).then(Qe)}};var en=Ke((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(r=navigator.platform,r?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(n=e.userAgent)?void 0:n.toLowerCase())?"iOS":/android/.test(null==(t=navigator)||null==(o=t.userAgent)?void 0:o.toLowerCase())?"Android":r:"")};var e,n,t,o,r}));var nn=Ke((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(r=navigator.platform,(r?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(n=e.userAgent)?void 0:n.toLowerCase())?"iOS":/android/.test(null==(t=navigator)||null==(o=t.userAgent)?void 0:o.toLowerCase())?"Android":r:"")||"")};var e,n,t,o,r})),tn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;try{var r=nn();n&&n(r),o&&o(r)}catch(e){t&&t(e),o&&o(e)}}),je),on=Ke((function(){return Te?dd.getSystemInfoSync():my.getSystemInfoSync()})),rn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;(Te?dd.getSystemInfo:my.getSystemInfo)({success:function(e){n&&n(e)},fail:function(e){t&&t(e)},complete:function(e){o&&o(e)}})}),Pe),an=Ke((function(){return wx.getSystemInfoSync()})),cn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;wx.getSystemInfo({success:function(e){n&&n(e)},fail:function(e){t&&t(e)},complete:function(e){o&&o(e)}})}),Ie),un=Ke((function(){return tt.getSystemInfoSync()})),sn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;tt.getSystemInfo({success:function(e){n&&n(e)},fail:function(e){t&&t(e)},complete:function(e){o&&o(e)}})}),xe),ln=Ke((function(){return ks.getSystemInfoSync()})),fn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;ks.getSystemInfo({success:function(e){n&&n(e)},fail:function(e){t&&t(e)},complete:function(e){o&&o(e)}})}),Oe),dn=Ke((function(){return swan.getSystemInfoSync()})),pn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;swan.getSystemInfo({success:function(e){n&&n(e)},fail:function(e){t&&t(e)},complete:function(e){o&&o(e)}})}),ke),hn=Ke((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}})),vn=Ke((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}})),mn=$e((function(e){var n=e.success,t=e.fail,o=e.complete;try{var r=vn();n&&n(r),o&&o(r)}catch(e){t&&t(e),o&&o(e)}}),Ne),gn={getInfoSync:function(){if(he.g)return en();if(he.c)return ln();if(he.f)return an();if(he.b)return un();if(he.d)return on();if(he.a)return dn();if(he.e)return hn();throw new Error("Uni API:getInfoSync暂不支持")},getInfo:function(e){if(he.g)return tn(e);if(he.c)return fn(e);if(he.f)return cn(e);if(he.b)return sn(e);if(he.d)return rn(e);if(he.a)return pn(e);if(he.e)return mn(e);throw new Error("Uni API:getInfo暂不支持")}};function wn(){return(wn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var yn=function(e,n){var t=function(e){return wn({},e,{tempFiles:e.tempFiles||e.files,tempFilePaths:e.tempFilePaths})};return function(o){return o=ye(o,n),me(e)(wn({},o,{count:o.count||1,success:function(e){o.success&&o.success(t(e))},complete:function(e){o.complete&&o.complete(e)}})).then(t)}},bn=function(e,n){var t=function(e){return{tempFilePath:e.tempFilePath||(e.filePaths||[])[0]||(e.apFilePaths||[])[0]||""}};return function(o){return o=ye(o,n),me(e)(wn({},o,{success:function(e){o.success&&o.success(t(e))},complete:function(e){o.complete&&o.complete(e)}})).then(t)}},In=function(e,n){return function(t){return me(e)(ye(t,n))}},Pn=function(e,n){return function(t){return me(e)(ye(t,n))}},xn=function(e,n){return function(t){return me(e)(ye(t,n))}},jn={chooseImage:yn((function(e){return Te?dd.chooseImage(e):my.chooseImage(e)}),Pe),compressImage:bn((function(e){return Te?e.filePaths=[e.src]:e.apFilePaths=[e.src],e&&"number"==typeof e.quality&&(e.compressLevel=e.quality),Te?dd.compressImage(e):my.compressImage(e)}),Pe),getImageInfo:In((function(e){return Te?dd.getImageInfo(e):my.getImageInfo(e)}),Pe),previewImage:Pn((function(e){return Te?dd.previewImage(e):my.previewImage(e)}),Pe),saveImage:xn((function(e){return Te?dd.saveImage(e):my.saveImage(e)}),Pe)};function kn(){return(kn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var On=function(e,n){var t=function(e){return kn({},e,{tempFilePath:e.tempFilePath||e.filePath})};return function(o){return o=ye(o,n),me(e)(kn({},o,{success:function(e){o.success&&o.success(t(e))},complete:function(e){o.complete&&o.complete(e)}})).then(t)}},Nn=function(e,n){var t=function(e){return kn({},e,{tempFiles:(e.tempFiles||e.files).map((function(e){return kn({},e,{tempFilePath:e.tempFilePath||e.path})}))})};return function(o){return void 0===o&&(o={}),o=ye(kn({count:9,sizeType:["original","compressed"],sourceType:["camera","album"],mediaType:["image","video"],maxDuration:60},o),n),me(e)(kn({},o,{success:function(e){o.success&&o.success(t(e))},fail:function(e){o.fail&&o.fail(e)},complete:function(e){o.complete&&o.complete(e)}})).then(t)}};var Cn=Nn((function(e){void 0===e&&(e={});var n=e,t=n.count,o=void 0===t?9:t,r=n.success,i=void 0===r?function(){}:r,a=n.fail,c=void 0===a?function(){}:a,u=n.complete,s=void 0===u?function(){}:u;try{var l=function(e,n){var t=document.createElement("INPUT");return t.name="file",t.id="input-"+1e8*Math.random(),t.type="file",e&&t.setAttribute("multiple","multiple"),t.style.display="none",n&&t.setAttribute("accept",n),document.body.appendChild(t),t}(o>1,e.accept),f=[];l.addEventListener("change",(function(e){var n={tempFiles:(f=e.target.files&&Array.from(e.target.files).slice(0,o)).map((function(e){return{tempFilePath:window.URL.createObjectURL(e),size:e.size}})),files:f};i(n),s(n),l.remove&&l.remove()}),!1);var d=document.createEvent("MouseEvents");d.initEvent("click",!0,!0),l.dispatchEvent(d)}catch(e){c(e),s(e)}}),je),Tn=yn((function(e){void 0===e&&(e={});var n=e,t=n.count,o=void 0===t?1:t,r=n.success,i=void 0===r?function(){}:r,a=n.fail,c=void 0===a?function(){}:a,u=n.complete,s=void 0===u?function(){}:u;Cn({count:o,accept:"image/*"}).then((function(e){var n={tempFilePaths:e.tempFiles.map((function(e){return e.tempFilePath})),tempFiles:e.tempFiles.map((function(e){return{path:e.tempFilePath,size:e.size}})),files:e.files};i(n),s(n)})).catch((function(e){c(e),s(e)}))}),je),_n=function(){throw new Error("Uni API: compressImage不支持")},En=In((function(e){var n=new Image;if(n.src=e.src,n.naturalWidth){var t={width:n.naturalWidth,height:n.naturalHeight,path:e.src};e.success(t),e.complete(t)}else{var o=function(){var t={width:n.width,height:n.height,path:e.src};e.success(t),e.complete(t)};if(n.complete)o();else{var r=null,i=function(){clearInterval(r),r=null};r=setInterval((function(){(n.width>0||n.height>0)&&(o(),i())}),40),n.onload=function(){r&&(o(),i())},n.onabort=n.onerror=function(n){e.fail(n),e.complete(n),i()}}}}),je),Sn="__universal_preview_image",An=("."+Sn+" {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n text-align: center;\n background: #000;\n box-sizing: border-box;\n outline: none;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n}\n."+Sn+"_pageindex {\n position: absolute;\n top: 12px;\n left: 0;\n right: 0;\n text-align: center;\n color: #fff;\n font-size: 16px;\n z-index: 2;\n}\n."+Sn+"_swiper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n align-items: center;\n transition-property: transform;\n box-sizing: content-box;\n}\n."+Sn+"_item {\n max-height: 70%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 100%;\n position: relative;\n transition-property: transform;\n overflow: hidden;\n}\n."+Sn+"_img {\n width: 100%;\n}\n@keyframes "+Sn+"_fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes "+Sn+"_fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}").replace(/\n/g,""),Mn=null,Bn={chooseImage:Tn,compressImage:_n,getImageInfo:En,previewImage:Pn((function(e){var n=(e||{}).urls,t=void 0===n?[]:n,o=(e||{}).current,r=void 0===o?0:o;if("[object Array]"!==Object.prototype.toString.call(t))throw new Error("the arguments must contain urls that type is a Array");if(t.length<=0)throw new Error("the urls`s length is at least 1");if(!Number.isSafeInteger(r))throw new Error("the current must be a safe integer");r=Math.min(Math.max(r,0),t.length-1),Mn||((Mn=document.createElement("style")).innerHTML=An,document.body.appendChild(Mn));var i=document.createElement("div");i.className=Sn,i.style.animationName=Sn+"_fadeIn",i.addEventListener("click",(function(){i&&(i.style.animationName=Sn+"_fadeOut"),setTimeout((function(){i&&document.body.removeChild(i),i=null}),300)}));var a=document.createElement("div");a.className=Sn+"_pageindex",a.innerText=r+1+"/"+t.length,i.appendChild(a);var c=document.createElement("div");c.className=Sn+"_swiper";var u=document.documentElement.clientWidth,s=0;c.addEventListener("touchstart",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault()),s=e.targetTouches[0].pageX})),c.addEventListener("touchmove",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault());var n=e.targetTouches[0].pageX-s;c.style.transform="translateX("+(-u*r+1*n)+"px)"})),c.addEventListener("touchend",(function(e){var n=e.changedTouches[0].pageX-s;Math.abs(1*n)>u/5&&(r=n<0?Math.min(r+1,t.length-1):Math.max(r-1,0)),a.innerText=r+1+"/"+t.length;c.style.transitionDuration="300ms",c.style.transform="translateX("+-u*r+"px)",setTimeout((function(){c.style.transitionDuration="0ms"}),300)})),c.style.transform="translateX("+-u*r+"px)",i.appendChild(c),t.forEach((function(e){var n=document.createElement("div");n.className=Sn+"_item",n.addEventListener("click",(function(e){e.stopPropagation(),i&&(i.style.animationName=Sn+"_fadeOut"),setTimeout((function(){i&&document.body.removeChild(i),i=null}),300)})),c.appendChild(n);var t=document.createElement("img");t.className=Sn+"_img",t.src=e,n.appendChild(t),n.addEventListener("touchstart",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var t=e.touches[0],o=e.touches[1],r=Math.abs(o.pageX-t.pageX),i=Math.abs(o.pageY-t.pageY);n.touchDistance=Math.sqrt(r*r+i*i)}else n.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}})),n.addEventListener("touchmove",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var o=Math.abs(e.touches[0].pageX-e.touches[1].pageX),r=Math.abs(e.touches[1].pageY-e.touches[1].pageY),i=Math.sqrt(o*o+r*r);if(n.touchDistance){var a=(n.previousPinchScale||1)+(i-n.touchDistance)/n.touchDistance,c=Math.max(1,a);t.style.transform="scale("+c+")",n.previousPinchScale=c}n.touchDistance=i}else if(n.previousPinchScale>1){e.stopPropagation();var u=(n.preX||0)+(e.touches[0].pageX-n.touched.x),s=(n.preY||0)+(e.touches[0].pageY-n.touched.y);t.style.transform="scale("+n.previousPinchScale+") translate("+u+"px, "+s+"px)",n.preX=u,n.preY=s,n.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}}}))})),document.body.appendChild(i)}),je),saveImage:function(){throw new Error("Uni API: saveImage不支持")}};function Ln(){return(Ln=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function Vn(){return(Vn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Fn={chooseImage:yn((function(e){return wx.chooseImage(e)}),Ie),compressImage:bn((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),wx.compressImage(e)}),Ie),getImageInfo:In((function(e){return wx.getImageInfo(e)}),Ie),previewImage:Pn((function(e){wx.previewImage(Ln({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Ie),saveImage:xn((function(e){wx.saveImageToPhotosAlbum(Vn({},e,{filePath:e.url}))}),Ie)};function Rn(){return(Rn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function Dn(){return(Dn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var zn={chooseImage:yn((function(e){return tt.chooseImage(e)}),xe),compressImage:bn((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),tt.compressImage(e)}),xe),getImageInfo:In((function(e){return tt.getImageInfo(e)}),xe),previewImage:Pn((function(e){tt.previewImage(Rn({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),xe),saveImage:xn((function(e){tt.saveImageToPhotosAlbum(Dn({},e,{filePath:e.url}))}),xe)};function qn(){return(qn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function Un(){return(Un=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Gn={chooseImage:yn((function(e){return ks.chooseImage(e)}),Oe),compressImage:bn((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),ks.compressImage(e)}),Oe),getImageInfo:In((function(e){return ks.getImageInfo(e)}),Oe),previewImage:Pn((function(e){ks.previewImage(qn({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Oe),saveImage:xn((function(e){ks.saveImageToPhotosAlbum(Un({},e,{filePath:e.url}))}),Oe)};function Wn(){return(Wn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function Xn(){return(Xn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Hn={chooseImage:yn((function(e){return swan.chooseImage(e)}),ke),compressImage:bn((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),swan.compressImage(e)}),ke),getImageInfo:In((function(e){return swan.getImageInfo(e)}),ke),previewImage:Pn((function(e){swan.previewImage(Wn({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),ke),saveImage:xn((function(e){swan.saveImageToPhotosAlbum(Xn({},e,{filePath:e.url}))}),ke)},Jn={chooseImage:function(e){if(he.g)return Bn.chooseImage(e);if(he.c)return Gn.chooseImage(e);if(he.f)return Fn.chooseImage(e);if(he.b)return zn.chooseImage(e);if(he.d)return jn.chooseImage(e);if(he.a)return Hn.chooseImage(e);throw new Error("Uni API:chooseImage暂不支持")},compressImage:function(e){if(he.g)return Bn.compressImage();if(he.c)return Gn.compressImage(e);if(he.f)return Fn.compressImage(e);if(he.b)return zn.compressImage(e);if(he.d)return jn.compressImage(e);if(he.a)return Hn.compressImage(e);throw new Error("Uni API:compressImage暂不支持")},getImageInfo:function(e){if(he.g)return Bn.getImageInfo(e);if(he.c)return Gn.getImageInfo(e);if(he.f)return Fn.getImageInfo(e);if(he.b)return zn.getImageInfo(e);if(he.d)return jn.getImageInfo(e);if(he.a)return Hn.getImageInfo(e);throw new Error("Uni API:getImageInfo暂不支持")},previewImage:function(e){if(he.g)return Bn.previewImage(e);if(he.c)return Gn.previewImage(e);if(he.f)return Fn.previewImage(e);if(he.b)return zn.previewImage(e);if(he.d)return jn.previewImage(e);if(he.a)return Hn.previewImage(e);throw new Error("Uni API:previewImage暂不支持")},saveImage:function(e){if(he.g)return Bn.saveImage();if(he.c)return Gn.saveImage(e);if(he.f)return Fn.saveImage(e);if(he.b)return zn.saveImage(e);if(he.d)return jn.saveImage(e);if(he.a)return Hn.saveImage(e);throw new Error("Uni API:saveImage暂不支持")}},Yn=On((function(e){return Te?dd.chooseVideo(e):my.chooseVideo(e)}),Pe);function Zn(){return(Zn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Kn=function(e){return Zn({},e,{tapIndex:null!=e.tapIndex?e.tapIndex:e.index})};var Qn,$n,et=(Qn=function(e){e.items=e.itemList,Te?dd.showActionSheet(e):my.showActionSheet(e)},$n=Pe,function(e){return e=ye(e,$n),me(Qn)(Zn({},e,{success:function(n){e.success&&e.success(Kn(n))},complete:function(n){e.complete&&e.complete(n)}})).then(Kn)});function nt(){return(nt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var ot={chooseVideo:Yn,createVideoContext:function(e){return Te?dd.createVideoContext(e):my.createVideoContext(e)},chooseMedia:Nn((function(e){var n=e.mediaType,t=function(){return my.chooseImage(nt({},e,{success:function(n){var t={type:"image",tempFiles:n.tempFiles.map((function(e){return nt({},e,{tempFilePath:e.path})}))};e.success(t)}}))},o=function(){return my.chooseVideo(nt({},e,{success:function(n){var t={type:"video",tempFiles:[n]};e.success(t)}}))};1===n.length&&"image"===n[0]?t():1===n.length&&"video"===n[0]?o():et({itemList:["图片","视频"]}).then((function(e){if(0===e.tapIndex)t();else{if(1!==e.tapIndex)return Promise.reject({errMsg:"用户取消选择"});o()}}))}),Pe)};function rt(){return(rt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var it={chooseVideo:On((function(e){void 0===e&&(e={});var n=e,t=n.success,o=void 0===t?function(){}:t,r=n.fail,i=void 0===r?function(){}:r,a=n.complete,c=void 0===a?function(){}:a;Cn({count:1,accept:"video/*"}).then((function(e){var n=rt({},e.tempFiles[0],{files:e.files});o(n),c(n)})).catch((function(e){i(e),c(e)}))}),je),createVideoContext:function(){throw new Error("@uni/apis: createVideoContext不支持")},chooseMedia:Cn},at={chooseVideo:On((function(e){return wx.chooseVideo(e)}),Ie),createVideoContext:function(e,n){return n?wx.createVideoContext(e,n):wx.createVideoContext(e)},chooseMedia:Nn((function(e){return wx.canIUse("chooseMedia")?wx.chooseMedia(e):wx.chooseImage(e)}),Ie)},ct={chooseVideo:On((function(e){return tt.chooseVideo(e)}),xe),createVideoContext:function(e,n){return n?tt.createVideoContext(e,n):tt.createVideoContext(e)},chooseMedia:Nn((function(e){return tt.chooseImage(e)}),xe)},ut={chooseVideo:On((function(e){return swan.chooseVideo(e)}),ke),createVideoContext:function(e){return swan.createVideoContext(e)},chooseMedia:Nn((function(e){return swan.canIUse("chooseMedia")?swan.chooseMedia(e):swan.chooseImage(e)}),ke)},st={chooseVideo:On((function(e){return ks.chooseVideo(e)}),Oe),createVideoContext:function(e,n){return n?ks.createVideoContext(e,n):ks.createVideoContext(e)},chooseMedia:Nn((function(e){return ks.canIUse("chooseMedia")?ks.chooseMedia(e):ks.chooseImage(e)}),Oe)},lt={chooseMedia:function(e){if(he.g)return it.chooseMedia(e);if(he.c)return st.chooseMedia(e);if(he.f)return at.chooseMedia(e);if(he.b)return ct.chooseMedia(e);if(he.d)return ot.chooseMedia(e);if(he.a)return ut.chooseMedia(e);throw new Error("@uni/apis:chooseMedia暂不支持")},chooseVideo:function(e){if(he.g)return it.chooseVideo(e);if(he.c)return st.chooseVideo(e);if(he.f)return at.chooseVideo(e);if(he.b)return ct.chooseVideo(e);if(he.d)return ot.chooseVideo(e);if(he.a)return ut.chooseVideo(e);throw new Error("@uni/apis:chooseVideo暂不支持")},createVideoContext:function(e,n){if(he.g)return it.createVideoContext();if(he.c)return st.createVideoContext(e,n);if(he.f)return at.createVideoContext(e,n);if(he.b)return ct.createVideoContext(e,n);if(he.d)return ot.createVideoContext(e);if(he.a)return ut.createVideoContext(e);throw new Error("@uni/apis:createVideoContext暂不支持")}};function ft(){return(ft=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function dt(e,n){return function(t){return me(e)(ye(t,n))}}function pt(e,n){return function(t){return me(e)((o=ye(t,n),(r=ft({},o)).frontColor||(r.frontColor="#000000"),r));var o,r}}var ht={setNavigationBarColor:pt((function(e){return Te?dd.setNavigationBar(e):my.setNavigationBar(e)}),Pe),setNavigationBarTitle:dt((function(e){return Te?dd.setNavigationBar(e):my.setNavigationBar(e)}),Pe)},vt={setNavigationBarTitle:dt((function(e){var n=e.title,t=e.success,o=void 0===t?function(){}:t,r=e.fail,i=void 0===r?function(){}:r,a=e.complete,c=void 0===a?function(){}:a;try{document.title=n,o(),c()}catch(e){i(),c()}}),je)},mt={setNavigationBarColor:pt((function(e){wx.setNavigationBarColor(e)}),Ie),setNavigationBarTitle:dt((function(e){return wx.setNavigationBarTitle(e)}),Ie),getMenuButtonBoundingClientRect:function(){return wx.getMenuButtonBoundingClientRect()}},gt={setNavigationBarColor:pt((function(e){tt.setNavigationBarColor(e)}),xe),setNavigationBarTitle:dt((function(e){return tt.setNavigationBarTitle(e)}),xe),getMenuButtonBoundingClientRect:function(){return tt.getMenuButtonBoundingClientRect()}},wt={setNavigationBarColor:pt((function(e){ks.setNavigationBarColor(e)}),Oe),setNavigationBarTitle:dt((function(e){return ks.setNavigationBarTitle(e)}),Oe),getMenuButtonBoundingClientRect:function(){return ks.getMenuButtonBoundingClientRect()}},yt={setNavigationBarColor:pt((function(e){swan.setNavigationBarColor(e)}),ke),setNavigationBarTitle:dt((function(e){return swan.setNavigationBarTitle(e)}),ke),getMenuButtonBoundingClientRect:function(){return swan.getMenuButtonBoundingClientRect()}},bt={setNavigationBarColor:function(e){if(he.c)return wt.setNavigationBarColor(e);if(he.f)return mt.setNavigationBarColor(e);if(he.b)return gt.setNavigationBarColor(e);if(he.d)return ht.setNavigationBarColor(e);if(he.a)return yt.setNavigationBarColor(e);throw new Error("Uni API:setNavigationBarColor暂不支持")},setNavigationBarTitle:function(e){if(he.g)return vt.setNavigationBarTitle(e);if(he.c)return wt.setNavigationBarTitle(e);if(he.f)return mt.setNavigationBarTitle(e);if(he.b)return gt.setNavigationBarTitle(e);if(he.d)return ht.setNavigationBarTitle(e);if(he.a)return yt.setNavigationBarTitle(e);throw new Error("Uni API:setNavigationBarTitle暂不支持")},getMenuButtonBoundingClientRect:function(){if(he.c)return wt.getMenuButtonBoundingClientRect();if(he.f)return mt.getMenuButtonBoundingClientRect();if(he.b)return gt.getMenuButtonBoundingClientRect();if(he.a)return yt.getMenuButtonBoundingClientRect();throw new Error("Uni API:getMenuButtonBoundingClientRect暂不支持")}},It=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Pt=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function xt(e){return It(this,void 0,void 0,(function(){var n,t,o,r,i,a,c,u,s,l,f,d;return Pt(this,(function(p){return n=e.endX,t=e.endY,o=e.longitude,r=e.latitude,i=e.endAddress,a=e.medium,c=o||n||-1,u=r||t||-1,s=document.createElement("a"),l="",f="destination=name:".concat(i||"","|latlng:").concat(u,",").concat(c,"&coord_type=wgs84"),l="bdapp://map/direction?".concat(f),v&&(l="baidumap://map/direction?".concat(f)),"gaode"===a&&(d="dlat=".concat(u,"&dlon=").concat(c,"&dname=").concat(i,"&dev=1&t=0"),l="amapuri://route/plan/?".concat(d),v&&(l="iosamap://path?".concat(d))),s.setAttribute("href",l),s.setAttribute("style","visibility:hidden;"),s.setAttribute("id","navgatorLink"),document.getElementById("navgatorLink")&&document.body.removeChild(document.getElementById("navgatorLink")),document.body.appendChild(s),s.click(),[2]}))}))}function jt(){return(jt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var kt=function(e){return jt({},e,{latitude:String(e.latitude),longitude:String(e.longitude),accuracy:String(e.accuracy),horizontalAccuracy:String(e.horizontalAccuracy)})};function Ot(e,n){return function(t){return me(e)((o=ye(t,n),void 0===o&&(o={}),jt({},o,{success:function(e){o.success&&o.success(kt(e))},complete:function(e){o.complete&&o.complete(e)}}))).then(kt);var o}}function Nt(e,n){return function(t){return me(e)(ye(t,n))}}function Ct(e,n){return function(t){return me(e)(ye(t,n))}}function Tt(){return(Tt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var _t={getLocation:Ot((function(e){return e.resultType=e.resultType||0,null!=e&&e.type&&"string"==typeof e.type&&(e.type=0),null!=e&&e.resultType&&"number"==typeof e.resultType&&!isNaN(e.resultType)&&(e.type=e.resultType),Te?dd.getLocation(e):my.getLocation(e)}),Pe),openLocation:Nt((function(e){var n=Tt({},e,{latitude:String(e.latitude),longitude:String(e.longitude)});Te?dd.openLocation(n):my.openLocation(n)}),Pe),chooseLocation:Ct((function(e){return Te?dd.chooseLocation(e):my.chooseLocation(e)}),Pe)},Et={getLocation:Ot((function(e){var n=e.success,t=void 0===n?function(){}:n,o=e.fail,r=void 0===o?function(){}:o,i=e.complete,a=void 0===i?function(){}:i;if("geolocation"in navigator)navigator.geolocation.getCurrentPosition((function(e){t(e.coords),a(e.coords)}),(function(e){r(e),a(e)}));else{var c={code:-1,message:"地理位置服务不可用"};r(c),a(c)}}),je),openLocation:Nt((function(){throw new Error("Uni API: openLocation不支持")}),je),chooseLocation:Ct((function(){throw new Error("@uni/apis: chooseLocation不支持")}),je)};function St(){return(St=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var At={getLocation:Ot((function(e){return wx.getLocation(e)}),Ie),openLocation:Nt((function(e){return wx.openLocation(St({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Ie),chooseLocation:Ct((function(e){return wx.chooseLocation(e)}),Ie)};function Mt(){return(Mt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Bt={getLocation:Ot((function(e){return tt.getLocation(e)}),xe),openLocation:Nt((function(e){return tt.openLocation(Mt({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),xe),chooseLocation:Ct((function(e){return tt.chooseLocation(e)}),xe)};function Lt(){return(Lt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Vt={getLocation:Ot((function(e){return swan.getLocation(e)}),ke),openLocation:Nt((function(e){return swan.openLocation(Lt({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),ke),chooseLocation:Ct((function(e){return swan.chooseLocation(e)}),ke)};function Ft(){return(Ft=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Rt={getLocation:Ot((function(e){return ks.getLocation(e)}),Oe),openLocation:Nt((function(e){return ks.openLocation(Ft({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Oe),chooseLocation:Ct((function(e){return ks.chooseLocation(e)}),Oe)},Dt=function(e){if(he.g)return Et.getLocation(e);if(he.c)return Rt.getLocation(e);if(he.f)return At.getLocation(e);if(he.b)return Bt.getLocation(e);if(he.d)return _t.getLocation(e);if(he.a)return Vt.getLocation(e);throw new Error("Uni API:getLocation暂不支持")},zt=3.141592653589793,qt=.006693421622965943;function Ut(e,n){if(function(e,n){return e<72.004||e>137.8347||n<.8293||n>55.8271||!1}(e,n))return{longitude:e,latitude:n};var t=function(e,n){var t=2*e-100+3*n+.2*n*n+.1*e*n+.2*Math.sqrt(Math.abs(e));return t+=2*(20*Math.sin(6*e*zt)+20*Math.sin(2*e*zt))/3,t+=2*(20*Math.sin(n*zt)+40*Math.sin(n/3*zt))/3,t+=2*(160*Math.sin(n/12*zt)+320*Math.sin(n*zt/30))/3}(e-105,n-35),o=function(e,n){var t=300+e+2*n+.1*e*e+.1*e*n+.1*Math.sqrt(Math.abs(e));return t+=2*(20*Math.sin(6*e*zt)+20*Math.sin(2*e*zt))/3,t+=2*(20*Math.sin(e*zt)+40*Math.sin(e/3*zt))/3,t+=2*(150*Math.sin(e/12*zt)+300*Math.sin(e/30*zt))/3}(e-105,n-35),r=n/180*zt,i=Math.sin(r);i=1-qt*i*i;var a=Math.sqrt(i);return t=180*t/(6378245*(1-qt)/(i*a)*zt),{longitude:2*e-(e+(o=180*o/(6378245/a*Math.cos(r)*zt))),latitude:2*n-(n+t)}}var Gt=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Wt=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Xt(e){return Gt(this,void 0,void 0,(function(){return Wt(this,(function(n){switch(n.label){case 0:return y?(console.info("jsi use jinban"),[4,(t="https://jzb.beijing.gov.cn/oss/focus-desktop/gwork/jssdk/JZB-JSSDK-1.1.0.js",new Promise((function(e,n){try{var o=document.createElement("script");o.type="text/javascript",o.src=t,document.body.appendChild(o),o.onload=function(){e()}}catch(e){n()}})))]):[3,2];case 1:return n.sent(),[2,new Promise((function(n,t){try{console.log("getDeviceInfo",window.jme.device.getDeviceInfo()),window.jme.device.getDeviceInfo()&&window.jme.location.startLocationUpdate({callBackInterval:0,callback:function(o){if(console.log("startLocationUpdate",o),o&&0===o.statusCode){var r=Ut(o.longitude,o.latitude),i={accuracy:o.accuracy.toString(),latitude:r.latitude.toString(),longitude:r.longitude.toString(),horizontalAccuracy:o.accuracy.toString()};e.success&&e.success(i),n(i)}else{var a="获取定位失败,statusCode".concat(o.statusCode);e.fail&&e.fail(a),t(a)}}})}catch(n){e.fail&&e.fail(n),t(n)}}))];case 2:return[2,Dt(e)]}var t}))}))}var Ht=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),Jt=function(e){function n(){var n=e.call(this)||this;return n.device={makePhoneCall:Fe,scan:Je,getSystemInfo:gn.getInfo},n.location={getLocation:Xt,navigateTo:xt},n.media={chooseImage:Jn.chooseImage,chooseVideo:lt.chooseVideo},n.navigationBar={setNavigationBarTitle:bt.setNavigationBarTitle},n}return Ht(n,e),n.prototype.isEnvironmentEnabled=function(){return!0},n}(s);function Yt(e,n){if(eo(e,n))return[e,n];var t=Kt(e-105,n-35),o=Qt(e-105,n-35),r=n/180*3.141592653589793,i=Math.sin(r);i=1-.006693421622965943*i*i;var a=Math.sqrt(i);return t=180*t/(6335552.717000426/(i*a)*3.141592653589793),[e+(o=180*o/(6378245/a*Math.cos(r)*3.141592653589793)),n+t]}function Zt(e,n){if(eo(e,n))return[e,n];var t=Kt(e-105,n-35),o=Qt(e-105,n-35),r=n/180*3.141592653589793,i=Math.sin(r);i=1-.006693421622965943*i*i;var a=Math.sqrt(i);return t=180*t/(6335552.717000426/(i*a)*3.141592653589793),[2*e-(e+(o=180*o/(6378245/a*Math.cos(r)*3.141592653589793))),2*n-(n+t)]}function Kt(e,n){var t=2*e-100+3*n+.2*n*n+.1*e*n+.2*Math.sqrt(Math.abs(e));return t+=2*(20*Math.sin(6*e*3.141592653589793)+20*Math.sin(2*e*3.141592653589793))/3,t+=2*(20*Math.sin(3.141592653589793*n)+40*Math.sin(n/3*3.141592653589793))/3,t+=2*(160*Math.sin(n/12*3.141592653589793)+320*Math.sin(3.141592653589793*n/30))/3}function Qt(e,n){var t=300+e+2*n+.1*e*e+.1*e*n+.1*Math.sqrt(Math.abs(e));return t+=2*(20*Math.sin(6*e*3.141592653589793)+20*Math.sin(2*e*3.141592653589793))/3,t+=2*(20*Math.sin(3.141592653589793*e)+40*Math.sin(e/3*3.141592653589793))/3,t+=2*(150*Math.sin(e/12*3.141592653589793)+300*Math.sin(e/30*3.141592653589793))/3}function $t(e,n){var t,o,r,i,a,c=(t=52.35987755982988,o=e-.0065,r=n-.006,i=Math.sqrt(o*o+r*r)-2e-5*Math.sin(r*t),a=Math.atan2(r,o)-3e-6*Math.cos(o*t),[i*Math.cos(a),i*Math.sin(a)]);return Zt(c[0],c[1])}function eo(e,n){return e<72.004||e>137.8347||n<.8293||n>55.8271||!1}function no(e){return new Promise((function(n,t){if(window.jsInterface&&window.jsInterface.getLocationInfo){var o=setTimeout((function(){t(new Error("定位超时"))}),15e3);window.callbackLocation=function(r){var i=r;if("string"==typeof i&&(i=JSON.parse(i)),i)if(i.error)t(new Error(""+i.error)),clearTimeout(o);else{var a=$t(i.longitude,i.latitude);(!a||a.length<2)&&(t(new Error("定位失败")),clearTimeout(o));var c={longitude:a[0]+"",latitude:a[1]+"",address:"".concat(i.address),accuracy:"",horizontalAccuracy:""};e&&e.success&&e.success(c),n(c),clearTimeout(o)}else t(new Error("定位失败")),clearTimeout(o)},window.jsInterface&&window.jsInterface.getLocationInfo()}else t(new Error("不存在对应方法,无法调用定位"))}))}var to=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),oo=function(e){function n(){var n=e.call(this)||this;return n.location={getLocation:no},n}return to(n,e),n.prototype.isEnvironmentEnabled=function(){return!0},n}(s),ro=function(){return new Promise((function(e,n){try{var t=document.createElement("script");t.type="text/javascript",t.src="https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.12/dingtalk.open.js",document.body.appendChild(t),t.onload=function(){e()}}catch(e){n()}}))};function io(e,n){void 0===n&&(n=0);var t=parseInt(e);return isNaN(t)?n:t}var ao=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},co=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function uo(e){return ao(this,void 0,void 0,(function(){return co(this,(function(n){switch(n.label){case 0:return window.dd?[3,2]:[4,ro()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise((function(n,t){window.dd.device.geolocation.get({targetAccuracy:200,coordinate:1,withReGeocode:io(e.resultType)>0,useCache:!1,onSuccess:function(t){var o=Zt(t.longitude,t.latitude),r={longitude:(null==o?void 0:o[0])||t.longitude,latitude:(null==o?void 0:o[1])||t.latitude,accuracy:t.accuracy,horizontalAccuracy:"",address:t.address,province:t.province,city:t.city,district:t.district,road:t.road,netType:t.netType,operatorType:t.operatorType,isWifiEnabled:t.isWifiEnabled,isGpsEnabled:t.isGpsEnabled,isFromMock:t.isFromMock,provider:t.provider,isMobileEnabled:t.isMobileEnabled};e.success&&e.success(r),n(r)},onFail:function(n){e.fail&&e.fail(n),t(n)}})}))]}}))}))}var so=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},lo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function fo(e){return so(this,void 0,void 0,(function(){var n,t,o,r,i,a,c,u,s;return lo(this,(function(l){switch(l.label){case 0:return n=e.endX,t=e.endY,o=e.longitude,r=e.latitude,i=e.endAddress,a=o||n||-1,c=r||t||-1,window.dd?[3,2]:[4,ro()];case 1:l.sent(),l.label=2;case 2:return u=window.dd&&window.dd.biz.map.view,s=Yt(a,c),u&&u({latitude:s[1],longitude:s[0],title:i}),[2]}}))}))}var po=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},ho=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function vo(e){var n=e.title,t=e.success,o=void 0===t?function(){}:t,r=e.complete,i=void 0===r?function(){}:r;return po(this,void 0,void 0,(function(){var e;return ho(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),window.dd?[3,2]:[4,ro()];case 1:t.sent(),t.label=2;case 2:return window.dd.biz.navigation.setTitle({title:n}),o(),i(),[3,4];case 3:return e=t.sent(),console.error(e),[3,4];case 4:return[2]}}))}))}var mo=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},go=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function wo(e){return mo(this,void 0,void 0,(function(){var n,t,o,r;return go(this,(function(i){switch(i.label){case 0:return window.dd?[3,2]:[4,ro()];case 1:i.sent(),i.label=2;case 2:return n=e.success,t=e.fail,o=e.phoneNumber,(r=window.dd&&window.dd.biz.telephone.showCallMenu)&&r({phoneNumber:o,code:"+86",showDingCall:!0,onSuccess:n,onFail:t}),[2]}}))}))}var yo=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},bo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Io(e){return yo(this,void 0,void 0,(function(){var n,t,o,r,i,a,c;return bo(this,(function(u){switch(u.label){case 0:return window.dd?[3,2]:[4,ro()];case 1:u.sent(),u.label=2;case 2:return n=e.success,t=e.fail,o=e.scanType,r=window.dd&&window.dd.biz.util.scan,i="all",o&&(a=o.indexOf("qrCode")>-1,c=o.indexOf("barCode")>-1,a&&!c&&(i="qrCode"),!a&&c&&(i="barCode")),r&&r({type:i,onSuccess:n,onFail:t}),[2]}}))}))}var Po=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},xo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function jo(e){return Po(this,void 0,void 0,(function(){var n,t,o;return xo(this,(function(r){switch(r.label){case 0:return window.dd?[3,2]:[4,ro()];case 1:r.sent(),r.label=2;case 2:return n=e.success,t=e.fail,(o=window.dd&&window.dd.device.base.getPhoneInfo)&&o({onSuccess:n,onFail:t}),[2]}}))}))}var ko=function(){return(ko=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},Oo=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},No=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},Co=function(){return null};function To(e){var n=e.methodName,t=e.params,o=void 0===t?{}:t,r=e.success,i=void 0===r?Co:r,a=e.fail,c=void 0===a?Co:a;return Oo(this,void 0,void 0,(function(){return No(this,(function(e){switch(e.label){case 0:return window.dd?[3,2]:[4,ro()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,t){var r=window.dd&&window.dd.device.audio[n];r||t("".concat(n," library not loaded")),r(ko(ko({},o),{onSuccess:function(n){i(n),e(n)},onFail:function(e){c(e),t(e)}}))}))]}}))}))}function _o(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function Eo(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.mediaId})),Promise.resolve({localAudioId:n.mediaId})}))]}))}))}function So(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({methodName:"onRecordEnd",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.mediaId})),Promise.resolve({localAudioId:n.mediaId})}))]}))}))}function Ao(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({params:{localAudioId:e.localAudioId},methodName:"play",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function Mo(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({params:{localAudioId:e.localAudioId},methodName:"pause",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function Bo(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({params:{localAudioId:e.localAudioId},methodName:"stop",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function Lo(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({methodName:"onPlayEnd",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.mediaId})),Promise.resolve({localAudioId:n.mediaId})}))]}))}))}function Vo(e){return Oo(this,void 0,void 0,(function(){return No(this,(function(n){return[2,To({params:{mediaId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({content:n.content})),Promise.resolve({content:n.content})}))]}))}))}var Fo=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),Ro=function(e){function n(){var n=e.call(this)||this;return n.device={makePhoneCall:wo,scan:Io,getSystemInfo:jo},n.location={getLocation:uo,navigateTo:fo},n.navigationBar={setNavigationBarTitle:vo},n.audio={startRecord:_o,stopRecord:Eo,onRecordEnd:So,playVoice:Ao,pauseVoice:Mo,stopVoice:Bo,onPlayEnd:Lo,translateVoice:Vo},n}return Fo(n,e),n.prototype.isEnvironmentEnabled=function(){return p&&window.dd},n}(s),Do=function(){return new Promise((function(e,n){try{var t=document.createElement("script");t.type="text/javascript",t.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",document.body.appendChild(t),t.onload=function(){e()}}catch(e){n()}}))},zo=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},qo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Uo(e){return zo(this,void 0,void 0,(function(){return qo(this,(function(n){switch(n.label){case 0:return window.wx?[3,2]:[4,Do()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise((function(n,t){var o=window.wx&&window.wx.getLocation;o||t("getLocationWeixin library not loaded"),o({type:"wgs84",success:function(o){if(console.log("weixinLocationAPI",o),o.longitude){var r={longitude:o.longitude,latitude:o.latitude,accuracy:o.accuracy,speed:o.speed,horizontalAccuracy:""};return e&&e.success&&e.success(r),n(r)}console.error("get wx location fail"),e&&e.fail&&e.fail("定位失败"),t("定位失败")},fail:function(n){console.error("get wx location fail",n),e&&e.fail&&e.fail(n),t("定位失败")}})}))]}}))}))}var Go=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Wo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Xo(e){return Go(this,void 0,void 0,(function(){var n,t,o,r,i,a,c,u,s;return Wo(this,(function(l){switch(l.label){case 0:return window.wx?[3,2]:[4,Do()];case 1:l.sent(),l.label=2;case 2:return n=e.endX,t=e.endY,o=e.longitude,r=e.latitude,i=e.endAddress,e.fail,a=o||n||-1,c=r||t||-1,u=window.wx&&window.wx.openLocation,s=Yt(a,c),u&&u({latitude:s[1],longitude:s[0],name:i,address:i}),[2]}}))}))}function Ho(e){if(window.wx&&window.wx.miniProgram&&window.wx.miniProgram.navigateTo){for(var n=new URLSearchParams(window.location.search),t=0,o=Object.entries({isFromShiMinTong:"/pages/pubinspect/attachment",isFromZhiXin:"/pages/main/attachment",isFromQiJian:"/pages/attachment/index"});t<o.length;t++){var r=o[t],i=r[0],a=r[1];if(n.has(i)&&"1"===n.get(i))return void Jo("".concat(a,"?fileUrl=").concat(encodeURIComponent(e.url),"&fileName=").concat(encodeURIComponent(e.name)))}!function(e){if(!e.trim())return void window.alert("附件下载链接为空");if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){window.alert("已经复制下载链接,请在浏览器中下载")})).catch((function(e){window.alert("复制链接失败"+e),console.error("复制失败:",e)}));else{var n=document.createElement("textarea");document.body.appendChild(n),n.value=e,n.select();try{document.execCommand("copy",!0),window.alert("已经复制下载链接,请在浏览器中下载")}catch(e){window.alert("复制链接失败"),console.error("复制失败:",e)}document.body.removeChild(n)}}(e.url)}else window.alert("暂只支持图片、录音、视频类型附件的预览")}function Jo(e){window.wx.miniProgram.navigateTo({url:e,fail:function(){window.alert("暂只支持图片、录音、视频类型附件的预览")}})}var Yo=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Zo=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Ko(e){return Yo(this,void 0,void 0,(function(){var n,t,o,r,i,a;return Zo(this,(function(c){switch(c.label){case 0:return window.wx?[3,2]:[4,Do()];case 1:c.sent(),c.label=2;case 2:return n=e.success,t=e.scanType,o=window.wx&&window.wx.scanQRCode,r=["qrCode","barCode"],t&&(i=t.indexOf("qrCode")>-1,a=t.indexOf("barCode")>-1,i&&!a&&(r=["qrCode"]),!i&&a&&(r=["barCode"])),o&&o({needResult:1,scanType:r,success:n}),[2]}}))}))}var Qo=function(){return(Qo=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},$o=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},er=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},nr=function(){return null};function tr(e){var n=e.methodName,t=e.params,o=void 0===t?{}:t,r=e.success,i=void 0===r?nr:r,a=e.fail,c=void 0===a?nr:a;return $o(this,void 0,void 0,(function(){return er(this,(function(e){switch(e.label){case 0:return window.wx?[3,2]:[4,Do()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,t){var r=window.wx&&window.wx[n];r||t("".concat(n," library not loaded")),r(Qo(Qo({},o),{success:function(n){i(n),e(n)},fail:function(e){c(e),t(e)},complete:function(n){e(n)}}))}))]}}))}))}function or(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function rr(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.localId})),Promise.resolve({localAudioId:n.localId})}))]}))}))}function ir(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({methodName:"onVoiceRecordEnd",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.localId})),Promise.resolve({localAudioId:n.localId})}))]}))}))}function ar(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({params:{localId:e.localAudioId},methodName:"playVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function cr(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({params:{localId:e.localAudioId},methodName:"pauseVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function ur(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({params:{localId:e.localAudioId},methodName:"stopVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function sr(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({methodName:"onVoicePlayEnd",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:n.localId})),Promise.resolve({localAudioId:n.localId})}))]}))}))}function lr(e){return $o(this,void 0,void 0,(function(){return er(this,(function(n){return[2,tr({params:{localId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(n){return(null==e?void 0:e.success)&&(null==e||e.success({content:n.translateResult})),Promise.resolve({content:n.translateResult})}))]}))}))}var fr=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),dr=function(e){function n(){var n=e.call(this)||this;return n.device={makePhoneCall:Fe,scan:Ko,getSystemInfo:gn.getInfo},n.location={getLocation:Uo,navigateTo:Xo},n.navigationBar={setNavigationBarTitle:bt.setNavigationBarTitle},n.audio={startRecord:or,stopRecord:rr,onRecordEnd:ir,playVoice:ar,pauseVoice:cr,stopVoice:ur,onPlayEnd:sr,translateVoice:lr},n.file={openDownload:Ho},n}return fr(n,e),n.prototype.isEnvironmentEnabled=function(){return h&&window.wx},n}(s),pr=function(){return new Promise((function(e,n){try{var t=document.createElement("script");t.type="text/javascript",t.src="https://g.alicdn.com/gdt/jsapi/1.9.43/index.js",document.body.appendChild(t),t.onload=function(){e()}}catch(e){n()}}))},hr=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},vr=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function mr(e){return hr(this,void 0,void 0,(function(){return vr(this,(function(n){switch(n.label){case 0:return window.dd?[3,2]:[4,pr()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise((function(n,t){window.dd.getGeolocation({targetAccuracy:200,coordinate:1,withReGeocode:io(e.resultType)>0,useCache:!1}).then((function(t){var o=Zt(t.longitude,t.latitude),r={longitude:(null==o?void 0:o[0])||t.longitude,latitude:(null==o?void 0:o[1])||t.latitude,accuracy:t.accuracy,horizontalAccuracy:"",address:t.address,province:t.province,city:t.city,district:t.district,road:t.road,netType:t.netType,operatorType:t.operatorType,isWifiEnabled:t.isWifiEnabled,isGpsEnabled:t.isGpsEnabled,isFromMock:t.isFromMock,provider:t.provider,isMobileEnabled:t.isMobileEnabled};e.success&&e.success(r),n(r)})).catch((function(n){e.fail&&e.fail(n),t(n)}))}))]}}))}))}var gr=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},wr=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function yr(e){return gr(this,void 0,void 0,(function(){var n,t,o;return wr(this,(function(r){switch(r.label){case 0:return window.dd?[3,2]:[4,pr()];case 1:r.sent(),r.label=2;case 2:return n=e.longitude,t=e.latitude,e.fail,o=Yt(n||-1,t||-1),[2,new Promise((function(n,t){window.dd.locateOnMap({latitude:o[1],longtitude:o[0]}).then((function(e){n(e)})).catch((function(n){e.fail&&e.fail(n),t(n)}))}))]}}))}))}var br=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Ir=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function Pr(e){return br(this,void 0,void 0,(function(){return Ir(this,(function(n){switch(n.label){case 0:return window.dd?[3,2]:[4,pr()];case 1:n.sent(),n.label=2;case 2:return window.dd.setTitle({title:e.title||""}).then((function(){return Promise.resolve()})).catch((function(n){return e.fail&&e.fail(n),Promise.reject(n)})),[2]}}))}))}var xr=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),jr=function(e){function n(){var n=e.call(this)||this;return n.location={getLocation:mr,navigateTo:yr},n.navigationBar={setNavigationBarTitle:Pr},n}return xr(n,e),n.prototype.isEnvironmentEnabled=function(){return b&&window.dd},n}(s),kr=function(){var e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(n,t)};return function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),Or=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((o=o.apply(e,n||[])).next())}))},Nr=function(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],o=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},Cr=function(){return null},Tr=function(e){function n(){var n=e.call(this)||this;return n.location={getLocation:function(e){return n.crossOriginPostMessage({methodName:"location.getLocation"}).then((function(n){var t=n||{},o={longitude:t.longitude,latitude:t.latitude,accuracy:t.address,horizontalAccuracy:""};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(n){return e&&e.fail&&e.fail(n),Promise.reject(n)}))},navigateTo:function(e){return n.crossOriginPostMessage({methodName:"location.navigateTo",params:{longitude:e.longitude,latitude:e.latitude}})}},n.navigationBar={setNavigationBarTitle:function(e){return Or(n,void 0,void 0,(function(){return Nr(this,(function(n){switch(n.label){case 0:return[4,this.crossOriginPostMessage({methodName:"navigationBar.setNavigationBarTitle",params:{longitude:e.longitude,latitude:e.latitude}})];case 1:return n.sent(),[2,Promise.resolve()]}}))}))}},n}return kr(n,e),n.prototype.crossOriginPostMessage=function(e){var n=e.methodName,t=e.params,o=void 0===t?{}:t,r=e.success,i=void 0===r?Cr:r,a=e.fail,c=void 0===a?Cr:a,u={methodName:n};o&&Object.keys(o).length>0&&(u.params=o);var s=n.split("."),l=s.length>1?s[1]:s[0];try{window.parent.postMessage(JSON.stringify(u),"*")}catch(e){console.error("window.parent.postMessage发生异常",e)}return new Promise((function(e,t){window.addEventListener("message",(function(o){var r=o&&o.data;if("string"==typeof r)try{r=JSON.parse(r)}catch(e){console.error("字符串转换异常",e)}if(r&&r.success){var a=r[l]||{};i&&i(a),e&&e(a)}else{var u=r&&r.message?r.message:"浙政钉".concat(n,"失败");c&&c(u),t(u)}}))}))},n.prototype.isEnvironmentEnabled=function(){return!!b},n}(s),_r=[];function Er(e){_r.push(e)}function Sr(e){var n=_r.indexOf(e);n>=0&&_r.splice(n,1)}function Ar(){if(window.__mobile__uni__api)return window.__mobile__uni__api;for(var e=0;e<_r.length;e++){var n=_r[e];if(n.isEnvironmentEnabled())return window.__mobile__uni__api=n,window.__mobile__uni__api}try{if(w&&window.parent&&window.parent.__mobile__uni__api)return window.parent.__mobile__uni__api}catch(e){if(b)return window.__mobile__uni__api=new Tr,window.__mobile__uni__api}var t;return o()?(t=new pe,console.info("jsi use egova",t)):b?(t=new jr,console.info("jsi use zhuanyou dingding",t)):p?(t=new Ro,console.info("jsi use dingding",t)):h&&window.wx?(t=new dr,console.info("jsi use weixin",t)):d?(t=new oo,console.info("jsi use smt",t)):(t=new Jt,console.info("jsi use uni",t)),window.__mobile__uni__api=t,window.__mobile__uni__api}function Mr(e,n){void 0===n&&(n=Ar());var t=e.split(".");if(1===t.length)return"function"==typeof n[e];var o=t[0],r=t.slice(1),i=n[o];if(!i)return!1;for(var a=i,c=0,u=r;c<u.length;c++){var s=u[c];if(!a||"object"!=typeof a||!(s in a))return!1;a=a[s]}return"function"==typeof a}}}]);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = exports.default = {
|
|
6
|
+
render: function render() {
|
|
7
|
+
var h = arguments[0];
|
|
8
|
+
return h("svg", {
|
|
9
|
+
"attrs": {
|
|
10
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
11
|
+
"viewBox": "0 0 20 20"
|
|
12
|
+
}
|
|
13
|
+
}, [h("path", {
|
|
14
|
+
"attrs": {
|
|
15
|
+
"d": "M3.75,17.5 C3.28976271,17.5 2.91666667,17.126904 2.91666667,16.6666667 L2.91666667,12.5 C2.91666667,12.0397627 3.28976271,11.6666667 3.75,11.6666667 C4.21023729,11.6666667 4.58333333,12.0397627 4.58333333,12.5 L4.58266667,15.833 L15.4166667,15.833 L15.4166667,12.5 C15.4166667,12.0397627 15.7897627,11.6666667 16.25,11.6666667 C16.7102373,11.6666667 17.0833333,12.0397627 17.0833333,12.5 L17.0833333,16.6666667 C17.0833333,17.0915011 16.765429,17.442085 16.3545316,17.4935072 L16.25,17.5 L3.75,17.5 Z M10,2.5 C10.4602373,2.5 10.8333333,2.87309604 10.8333333,3.33333333 L10.834,10.904 L12.327411,9.41074435 L12.3804172,9.36206404 C12.7078286,9.08620893 13.1976137,9.1024357 13.5059223,9.41074435 C13.8313592,9.73618126 13.8313592,10.2638187 13.5059223,10.5892557 L10.5892557,13.5059223 L10.5659501,13.5283458 C10.5602582,13.5336148 10.5544926,13.5388053 10.548655,13.5439156 L10.5362495,13.5546026 L10.5121742,13.5740743 C10.4949132,13.5875412 10.4771081,13.6003432 10.4586783,13.6126074 C10.4455853,13.6212563 10.4323019,13.6294968 10.4192578,13.6370097 C10.4029078,13.6465464 10.3862038,13.6555423 10.3690405,13.664083 C10.3522054,13.6723976 10.3351478,13.6801087 10.3177097,13.6872958 C10.3045293,13.6927357 10.2911788,13.6978473 10.2777746,13.7025471 C10.2584813,13.7093513 10.2389875,13.7154237 10.2194971,13.7207897 C10.2011918,13.7257748 10.1826357,13.7301514 10.1634324,13.7339067 L10.1207556,13.7413147 C10.0813306,13.7470375 10.0410112,13.75 10,13.75 L10.0566667,13.747 L10.0399512,13.7490477 L9.96132783,13.7491078 C9.94161389,13.7481976 9.92192612,13.746591 9.89546844,13.7435072 C9.79274407,13.7306516 9.69583178,13.6990985 9.6082458,13.6523619 L9.59484365,13.6451239 C9.58442452,13.639322 9.57410342,13.6332795 9.56375825,13.6268308 C9.54437371,13.6148978 9.52551484,13.6021934 9.50686916,13.5885746 L9.48480346,13.5717051 L9.41074435,13.5059223 L6.49407768,10.5892557 L6.44539737,10.5362495 C6.16954226,10.2088381 6.18576903,9.719053 6.49407768,9.41074435 L6.54708384,9.36206404 C6.87449527,9.08620893 7.36428033,9.1024357 7.67258898,9.41074435 L9.167,10.905 L9.16666667,3.33333333 C9.16666667,2.87309604 9.53976271,2.5 10,2.5 Z",
|
|
16
|
+
"fill": "#FFF",
|
|
17
|
+
"fill-rule": "nonzero"
|
|
18
|
+
}
|
|
19
|
+
})]);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.default = void 0;
|
|
6
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
6
8
|
var _shared = require("./shared");
|
|
7
9
|
var _popup = require("../mixins/popup");
|
|
8
10
|
var _touch = require("../mixins/touch");
|
|
@@ -10,7 +12,10 @@ var _bindEvent = require("../mixins/bind-event");
|
|
|
10
12
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
13
|
var _swipe = _interopRequireDefault(require("../swipe"));
|
|
12
14
|
var _ImagePreviewItem = _interopRequireDefault(require("./ImagePreviewItem"));
|
|
13
|
-
|
|
15
|
+
var _Download = _interopRequireDefault(require("./Download"));
|
|
16
|
+
var _toast = _interopRequireDefault(require("../toast"));
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } // Utils
|
|
14
19
|
// Mixins
|
|
15
20
|
// Components
|
|
16
21
|
var _default2 = exports.default = (0, _shared.createComponent)({
|
|
@@ -78,6 +83,14 @@ var _default2 = exports.default = (0, _shared.createComponent)({
|
|
|
78
83
|
closeIconPosition: {
|
|
79
84
|
type: String,
|
|
80
85
|
default: 'top-right'
|
|
86
|
+
},
|
|
87
|
+
showDownload: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
downloadAction: {
|
|
92
|
+
type: Function,
|
|
93
|
+
default: function _default() {}
|
|
81
94
|
}
|
|
82
95
|
},
|
|
83
96
|
data: function data() {
|
|
@@ -130,15 +143,31 @@ var _default2 = exports.default = (0, _shared.createComponent)({
|
|
|
130
143
|
this.$emit('change', active);
|
|
131
144
|
}
|
|
132
145
|
},
|
|
133
|
-
|
|
146
|
+
genFooter: function genFooter() {
|
|
147
|
+
var _this$images$this$act, _this$images$this$act2;
|
|
134
148
|
var h = this.$createElement;
|
|
135
|
-
|
|
149
|
+
var indexSlot = this.slots('index', {
|
|
150
|
+
index: this.active
|
|
151
|
+
});
|
|
152
|
+
if (indexSlot) {
|
|
136
153
|
return h("div", {
|
|
137
|
-
"class": (0, _shared.bem)('
|
|
138
|
-
}, [
|
|
139
|
-
index: this.active
|
|
140
|
-
}) || this.active + 1 + "/" + this.images.length]);
|
|
154
|
+
"class": (0, _shared.bem)('footer')
|
|
155
|
+
}, [indexSlot]);
|
|
141
156
|
}
|
|
157
|
+
return h("div", {
|
|
158
|
+
"class": (0, _shared.bem)('footer')
|
|
159
|
+
}, [h("div", {
|
|
160
|
+
"class": (0, _shared.bem)('footer-left')
|
|
161
|
+
}, [this.showIndex && h("span", {
|
|
162
|
+
"class": (0, _shared.bem)('index')
|
|
163
|
+
}, [this.active + 1, "/", this.images.length]), h("span", {
|
|
164
|
+
"class": (0, _shared.bem)('title')
|
|
165
|
+
}, [((_this$images$this$act = this.images[this.active]) == null ? void 0 : _this$images$this$act.title) || ''])]), this.showDownload && !((_this$images$this$act2 = this.images[this.active]) != null && _this$images$this$act2.url.startsWith('data:')) && h("span", {
|
|
166
|
+
"class": (0, _shared.bem)('download'),
|
|
167
|
+
"on": {
|
|
168
|
+
"click": this.onDownload
|
|
169
|
+
}
|
|
170
|
+
}, [h(_Download.default)])]);
|
|
142
171
|
},
|
|
143
172
|
genCover: function genCover() {
|
|
144
173
|
var h = this.$createElement;
|
|
@@ -208,12 +237,70 @@ var _default2 = exports.default = (0, _shared.createComponent)({
|
|
|
208
237
|
this.$refs.swipe.swipeTo(index, options);
|
|
209
238
|
}
|
|
210
239
|
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
240
|
+
onDownload: function onDownload() {
|
|
241
|
+
var _this3 = this;
|
|
242
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
243
|
+
var _this3$images$_this3$, _this3$images$_this3$2;
|
|
244
|
+
var downloadParams, result, universalJsSdk, _universalJsSdk$getJS, fileJsi;
|
|
245
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
246
|
+
while (1) switch (_context.prev = _context.next) {
|
|
247
|
+
case 0:
|
|
248
|
+
downloadParams = {
|
|
249
|
+
index: _this3.active,
|
|
250
|
+
url: (_this3$images$_this3$ = _this3.images[_this3.active]) == null ? void 0 : _this3$images$_this3$.url,
|
|
251
|
+
title: (_this3$images$_this3$2 = _this3.images[_this3.active]) == null ? void 0 : _this3$images$_this3$2.title
|
|
252
|
+
}; // 如果提供了 downloadAction 并且返回 true,则阻止默认逻辑
|
|
253
|
+
if (!_this3.downloadAction) {
|
|
254
|
+
_context.next = 5;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
result = _this3.downloadAction(downloadParams);
|
|
258
|
+
if (!result) {
|
|
259
|
+
_context.next = 5;
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
return _context.abrupt("return");
|
|
263
|
+
case 5:
|
|
264
|
+
_context.prev = 5;
|
|
265
|
+
_context.next = 8;
|
|
266
|
+
return Promise.resolve().then(function () {
|
|
267
|
+
return _interopRequireWildcard(require("@egova/universal-js-sdk"));
|
|
268
|
+
});
|
|
269
|
+
case 8:
|
|
270
|
+
universalJsSdk = _context.sent;
|
|
271
|
+
if (universalJsSdk && universalJsSdk.getJSI && downloadParams.url) {
|
|
272
|
+
fileJsi = (_universalJsSdk$getJS = universalJsSdk.getJSI()) == null ? void 0 : _universalJsSdk$getJS.file;
|
|
273
|
+
if (fileJsi && fileJsi.download) {
|
|
274
|
+
_toast.default.loading({
|
|
275
|
+
message: '加载中...',
|
|
276
|
+
forbidClick: true,
|
|
277
|
+
duration: 0
|
|
278
|
+
});
|
|
279
|
+
fileJsi.download({
|
|
280
|
+
url: downloadParams.url
|
|
281
|
+
}).then(function () {
|
|
282
|
+
_toast.default.clear();
|
|
283
|
+
_toast.default.success('下载成功');
|
|
284
|
+
}).catch(function () {
|
|
285
|
+
_toast.default.clear();
|
|
286
|
+
_toast.default.fail("下载失败");
|
|
287
|
+
});
|
|
288
|
+
} else {
|
|
289
|
+
_toast.default.fail("当前环境暂不支持下载");
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
_context.next = 15;
|
|
293
|
+
break;
|
|
294
|
+
case 12:
|
|
295
|
+
_context.prev = 12;
|
|
296
|
+
_context.t0 = _context["catch"](5);
|
|
297
|
+
console.log(_context.t0.message);
|
|
298
|
+
case 15:
|
|
299
|
+
case "end":
|
|
300
|
+
return _context.stop();
|
|
301
|
+
}
|
|
302
|
+
}, _callee, null, [[5, 12]]);
|
|
303
|
+
}))();
|
|
217
304
|
}
|
|
218
305
|
},
|
|
219
306
|
render: function render() {
|
|
@@ -231,6 +318,6 @@ var _default2 = exports.default = (0, _shared.createComponent)({
|
|
|
231
318
|
value: this.value
|
|
232
319
|
}],
|
|
233
320
|
"class": [(0, _shared.bem)(), this.className]
|
|
234
|
-
}, [this.genClose(), this.genImages(), this.
|
|
321
|
+
}, [this.genClose(), this.genImages(), this.genFooter(), this.genCover()]) : null]);
|
|
235
322
|
}
|
|
236
323
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-image-preview{position:fixed;top:0;left:0;width:100%;height:100%}.zt2-image-preview__swipe{height:100%}.zt2-image-preview__swipe-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden}.zt2-image-preview__cover{position:absolute;top:0;left:0}.zt2-image-preview__image{width:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.zt2-image-preview__image--vertical{width:auto;height:100%}.zt2-image-preview__image img{-webkit-user-drag:none}.zt2-image-preview__image .zt2-image__error{top:30%;height:40%}.zt2-image-preview__image .zt2-image__error-icon{font-size:36px}.zt2-image-preview__image .zt2-image__loading{background-color:transparent}.zt2-image-
|
|
1
|
+
.zt2-image-preview{position:fixed;top:0;left:0;width:100%;height:100%}.zt2-image-preview__swipe{height:100%}.zt2-image-preview__swipe-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden}.zt2-image-preview__cover{position:absolute;top:0;left:0}.zt2-image-preview__image{width:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.zt2-image-preview__image--vertical{width:auto;height:100%}.zt2-image-preview__image img{-webkit-user-drag:none}.zt2-image-preview__image .zt2-image__error{top:30%;height:40%}.zt2-image-preview__image .zt2-image__error-icon{font-size:36px}.zt2-image-preview__image .zt2-image__loading{background-color:transparent}.zt2-image-preview__footer{position:absolute;bottom:0;left:0;right:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;height:48px;line-height:24px;background:rgba(45,75,115,.5);color:#fff;font-size:12px;z-index:10}.zt2-image-preview__footer-left{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-image-preview__index{color:#fff;padding:0 9px;height:24px;background:rgba(45,75,115,.8);border-radius:2px}.zt2-image-preview__title{margin-left:8px;font-size:14px;color:#fff;line-height:24px}.zt2-image-preview__download{width:20px;height:20px;cursor:pointer}.zt2-image-preview__overlay.zt2-overlay{background-color:#000}.zt2-image-preview__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.zt2-image-preview__close-icon:active{color:#969799}.zt2-image-preview__close-icon--top-left{top:16px;left:16px}.zt2-image-preview__close-icon--top-right{top:16px;right:16px}.zt2-image-preview__close-icon--bottom-left{bottom:16px;left:16px}.zt2-image-preview__close-icon--bottom-right{right:16px;bottom:16px}
|
|
@@ -54,22 +54,47 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
&
|
|
57
|
+
&__footer {
|
|
58
58
|
position: absolute;
|
|
59
|
-
bottom:
|
|
60
|
-
left:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: 0 16px;
|
|
66
|
+
height: 48px;
|
|
67
|
+
line-height: @image-preview-index-line-height;
|
|
68
|
+
background: @image-preview-title-background;
|
|
67
69
|
color: @image-preview-index-text-color;
|
|
68
70
|
font-size: @font-size-sm;
|
|
69
|
-
text-shadow: @image-preview-index-text-shadow;
|
|
70
|
-
transform: translate(-50%, 0);
|
|
71
|
-
text-align: center;
|
|
72
71
|
z-index: @image-preview-index-z-index;
|
|
72
|
+
|
|
73
|
+
&-left {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__index {
|
|
80
|
+
color: @image-preview-index-text-color;
|
|
81
|
+
padding: 0 9px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
background: @image-preview-index-background;
|
|
84
|
+
border-radius: 2px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__title {
|
|
88
|
+
margin-left: 8px;
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
color: #FFFFFF;
|
|
91
|
+
line-height: 24px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__download {
|
|
95
|
+
width: 20px;
|
|
96
|
+
height: 20px;
|
|
97
|
+
cursor: pointer;
|
|
73
98
|
}
|
|
74
99
|
|
|
75
100
|
&__overlay.@{base-prefix}-overlay {
|
|
@@ -107,17 +132,4 @@
|
|
|
107
132
|
bottom: @image-preview-close-icon-margin;
|
|
108
133
|
}
|
|
109
134
|
}
|
|
110
|
-
&__title{
|
|
111
|
-
position:absolute;
|
|
112
|
-
bottom:@image-preview-title-bottom;
|
|
113
|
-
height: @image-preview-title-height;
|
|
114
|
-
width: @image-preview-title-width;
|
|
115
|
-
padding-left: @image-preview-title-padding-left;
|
|
116
|
-
left:@image-preview-title-left;
|
|
117
|
-
line-height: @image-preview-title-line-height;
|
|
118
|
-
font-size: @image-preview-title-font-size;
|
|
119
|
-
color: @white;
|
|
120
|
-
background:@image-preview-title-background;
|
|
121
|
-
z-index:@image-preview-title-z-index
|
|
122
|
-
}
|
|
123
135
|
}
|
|
@@ -5,6 +5,7 @@ require('../../icon/index.css');
|
|
|
5
5
|
require('../../image/index.css');
|
|
6
6
|
require('../../popup/index.css');
|
|
7
7
|
require('../../loading/index.css');
|
|
8
|
+
require('../../toast/index.css');
|
|
8
9
|
require('../../swipe/index.css');
|
|
9
10
|
require('../../swipe-item/index.css');
|
|
10
11
|
require('../index.css');
|
|
@@ -5,6 +5,7 @@ require('../../icon/index.less');
|
|
|
5
5
|
require('../../image/index.less');
|
|
6
6
|
require('../../popup/index.less');
|
|
7
7
|
require('../../loading/index.less');
|
|
8
|
+
require('../../toast/index.less');
|
|
8
9
|
require('../../swipe/index.less');
|
|
9
10
|
require('../../swipe-item/index.less');
|
|
10
11
|
require('../index.less');
|