mtl-js-sdk
Version:
ynf-fw-mtl-api
2 lines • 421 kB
JavaScript
/*! For license information please see mtl.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("mtl",[],t):"object"==typeof exports?exports.mtl=t():e.mtl=t()}(self,()=>(()=>{var __webpack_modules__={88:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>s});var n=o(4980);function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach(function(t){(0,n.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(e,t){e&&(t&&!t.message&&(t.message=t.msg||t.errMsg),"function"==typeof e.fail&&e.fail(t))}function c(e,t){var o,n=t.isNative,a=void 0!==n&&n,r="xiaoyouLight";r=(null===(o=window.api)||void 0===o?void 0:o.require(r))&&!a?"xiaoyouLight":"xiaoyou",mtl.execPluginBridge(i(i({},t),{},{method:e,requireName:r}))}const s={initXiaoYou:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.bodyDomainId,o=e.appcode,n=e.tenantid,a=e.domain,s=e.token,l=e.userid,u=e.domainid,d=void 0===u?"yonapppro":u,p=e.robotVersion,f=void 0===p?"v2":p,m=e.isDialog,g=void 0!==m&&m,v=e.locale,h=void 0===v?"zh_cn":v,y=e.msgtype,b=void 0===y?"text":y,w=e.devicetype,S=void 0===w?"app":w,O=e.type,C=void 0===O?0:O,I=e.showModel,P=void 0===I||I,k=e.testFlag,A=void 0!==k&&k,T=e.isShowInputBox,x=void 0===T||T,j=e.isShowHelpBox,_=void 0===j||j,D=e.bosTime,E=void 0===D?3e3:D,L=e.eosTime,N=void 0===L?1e3:L;mtl.getUserYHTInfo({isEncrypt:!1,success:function(u){var p=null==u?void 0:u.yhtToken;n&&a&&s&&l&&p?(t||o?!t&&o?t=o:!o&&t&&(o=t):(t="diwork",o="diwork"),c("initXiaoYou",i(i({},e),{},{bodyDomainId:t,domainid:d,robotVersion:f,isDialog:g,locale:h,msgtype:b,devicetype:S,type:C,showModel:P,testFlag:A,isShowHelpBox:_,isShowInputBox:x,bosTime:E,eosTime:N,appcode:o,yhtAccessToken:p}))):r(e,{message:"initXiaoYou params error"})},fail:function(){r(e,{message:"initXiaoYou yhtAccessToken is null"})}})},openXiaoYou:function(){c("openXiaoYou",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},closeXY:function(){c("closeXY",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}}},189:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(2284),a=o(4980);function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){(0,a.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(e||{platform:window.mtl.platform}).platform,a=window.mtl.upesnVersion||0,i={code:1,message:"The current platform does not support"};function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.fail&&e.fail(i),e.complete&&e.complete(i)}function s(e,t){var o=t.closeNcc?"":"NCC",a=r(r({},t),{},{fail:function(a){t.fail(function(e,t,o){var a={code:-1,message:c};if("object"===(0,n.A)(t)){var i=t.errCode,r="";1003==i?r="by user canceled":-1e3==i?r="not found function":405==i?r="Unauthorized and unauthorized to perform this operation":401==i&&(r="User does not have permission to access"),a.code=i,a.message=r||JSON.stringify(t)}var c="YYZone api ".concat(o+e,", error message: ").concat(a.message);return a.message=c,a}(e,a,o))}});console.log("exec YYEsnBridge.do method :",o+e),console.log("data: ",a),YYEsnBridge.do(o+e,a)}return t.module={settingNavBar:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("settingNavBar",{hide:t.hide,backgroundColor:t.backgroundColor,hideShadowImage:t.hideShadowImage,statusBarStyle:t.statusBarStyle,fullScreen:t.fullScreen,leftItems:t.leftItems,centerItems:t.centerItems,rightItems:t.rightItems,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else mtl.settingNavBar(e)},backIntercept:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("backIntercept",{callback:t.callback,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else mtl.backIntercept(e)},changeScreenOrientation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("changeScreenOrientation",{orientation:t.orientation,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else mtl.changeScreenOrientation(e)},downloadFile:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("downloadFile",{url:t.url,success:function(o){var n=r({localId:o.filePath},o);t.success&&e.success(n)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else mtl.downloadFile(e)},openNewWebview:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("openNewWebview",{url:t.url,orientation:t.orientation,navShow:t.navShow,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else mtl.openNewWebview(e)},startPDAScan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("startPDAScan",{callback:e.callback,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else"APIAndroid"==o||"upesn"==o&&a>0&&a%2==0?mtl.startPDAScan(e):c(e)},stopPDAScan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("upesn"===o&&a<=0){var t=e||{};s("stopPDAScan",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}else"APIAndroid"==o||"upesn"==o&&a>0&&a%2==0?mtl.stopPDAScan(e):c(e)}},t.symbolPath=t.symbolPath||"mobile",t.strategy="m",t}},661:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(2284),a=o(4980);function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){(0,a.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(e||{platform:window.mtl.platform}).platform,a=window.mtl.upesnVersion||0;function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.success&&e.success({status:!0}),e.complete&&e.complete({status:!0})}function c(e,t,o){mtl.execPluginBridge(r(r({},o),{},{method:e,requireName:t}))}function s(e,t){var o=r(r({},t),{},{fail:function(o){t.fail(function(e,t,o){var a={code:-1,message:c};if("object"===(0,n.A)(t)){var i=t.errCode,r="";1003==i?r="by user canceled":-1e3==i?r="not found function":405==i?r="Unauthorized and unauthorized to perform this operation":401==i&&(r="User does not have permission to access"),a.code=i,a.message=r||JSON.stringify(t)}var c="YYZone api ".concat(o+e,", error message: ").concat(a.message);return a.message=c,a}(e,o))}});console.log("exec window.YYEsnBridge.do method :",e),console.log("data: ",o),window.YYEsnBridge.do(e,o)}var l={configuration:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){var t=e.minFaceSize,n=void 0===t?200:t,a=e.cropFaceSizeWidth,r=void 0===a?400:a,s=e.occluThreshold,l=void 0===s?.5:s,u=e.blurThreshold,d=void 0===u?.7:u,p=e.timeout,f=void 0===p?10:p,m=e.threshold,g=void 0===m?.6:m,v=e.maxCropImageNum,h=void 0===v?1:v,y=e.sound,b=void 0===y||y,w=e.eulurAngle,S=void 0===w?JSON.stringify({pitch:10,yaw:10,roll:10}):w;e.minFaceSize=n,e.cropFaceSizeWidth=r,e.occluThreshold=l,e.blurThreshold=d,e.timeout=f,e.threshold=g,e.maxCropImageNum=h,e.sound=b,e.eulurAngle=S,c("configuration","UIBdFace",e)}else i(e)},openLivenessView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){mtl.requestPermission({list:["camera"],success:function(){var t=e.isByOrder,o=void 0===t||t,n=e.numOfLiveness,a=void 0===n?3:n;e.isByOrder=o,e.numOfLiveness=a,c("openLivenessView","UIBdFace",e)},fail:e.fail})}else i(e)},openDetectionView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){mtl.requestPermission({list:["camera"],success:function(){c("openDetectionView","UIBdFace",e)},fail:e.fail})}else i(e)},closeLivenessView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("closeLivenessView","UIBdFace",e):i(e)},closeDetectionView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("closeDetectionView","UIBdFace",e):i(e)},isValid:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("isValid","touchID",e):i(e)},verifyLoginPassword:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("verifyLoginPassword","mtlGestureUnlock",e):"upesn"===o?a>0?c("verifyLoginPassword",null,e):s("verifyLoginPassword",e):i(e)},verify:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){var t=e.title,n=void 0===t?"验证指纹密码":t;e.title=n,c("verify","touchID",e)}else i(e)},cancelVerify:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o?c("cancelVerify","touchID",e):i(e)},gestureCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("create","mtlGestureUnlock",e):"upesn"===o?a>0?c("setGesturePassword",null,e):s("setGesturePassword",e):i(e)},gesturePassword:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("gesturesPassword","mtlGestureUnlock",e):"upesn"===o&&a>0?c("gesturePassword",null,e):i(e)},gestureDelete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("delete","mtlGestureUnlock",e):"upesn"===o&&a>0?c("gestureDelete",null,e):i(e)},gestureValidate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){var t=e.track,n=void 0===t||t;e.track=n,c("validate","mtlGestureUnlock",e)}else if("upesn"===o)if(a>0){var r=e.track,l=void 0===r||r;e.track=l,c("verifyGesturePassword",null,e)}else s("verifyGesturePassword",e);else i(e)},vrSetViewMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?(e.mode||(e.mode=1),c("setViewMode","detuPanoPlayer",e)):i(e)},vrClose:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"APIAndroid"===o||"APIIos"===o?c("close","detuPanoPlayer",e):i(e)},vrOpen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("APIAndroid"===o||"APIIos"===o){var t=e.path,n=e.type,a=void 0===n?"sphere":n,s=e.device,l=void 0===s?0:s,u=e.gyroEnable,d=void 0===u||u,p=e.zoomEnable,f=void 0===p||p,m=e.fixed,g=void 0===m||m,v=e.showBackBtn,h=void 0===v||v;if(!t)return void function(e,t){if(!e)return;t&&!t.message&&(t.message=t.msg||t.errMsg);"function"==typeof e.fail&&e.fail(t)}(e,{msg:"image path is null"});c("open","detuPanoPlayer",r(r({},e),{},{type:a,device:l,gyroEnable:d,zoomEnable:f,fixed:g,showBackBtn:h}))}else i(e)}};return t.module=l,t.symbolPath="ai",t}},680:function(e){e.exports=function(){"use strict";var e=function(){},t=Object.prototype.hasOwnProperty,o=Array.prototype.slice;function n(t,o){var n;return"function"==typeof Object.create?n=Object.create(t):(e.prototype=t,n=new e,e.prototype=null),o&&i(!0,n,o),n}function a(e,t,o,a){var r=this;return"string"!=typeof e&&(a=o,o=t,t=e,e=null),"function"!=typeof t&&(a=o,o=t,t=function(){return r.apply(this,arguments)}),i(!1,t,r,a),t.prototype=n(r.prototype,o),t.prototype.constructor=t,t.class_=e||r.class_,t.super_=r,t}function i(e,n,a){for(var i,r,c=0,s=(a=o.call(arguments,2)).length;c<s;c++)for(i in r=a[c])e&&!t.call(r,i)||(n[i]=r[i])}var r=a;function c(){}c.class_="Nevis",c.super_=Object,c.extend=r;var s=c,l=s.extend(function(e,t,o){this.qrious=e,this.element=t,this.element.qrious=e,this.enabled=Boolean(o)},{draw:function(e){},getElement:function(){return this.enabled||(this.enabled=!0,this.render()),this.element},getModuleSize:function(e){var t=this.qrious,o=t.padding||0,n=Math.floor((t.size-2*o)/e.width);return Math.max(1,n)},getOffset:function(e){var t=this.qrious,o=t.padding;if(null!=o)return o;var n=this.getModuleSize(e),a=Math.floor((t.size-n*e.width)/2);return Math.max(0,a)},render:function(e){this.enabled&&(this.resize(),this.reset(),this.draw(e))},reset:function(){},resize:function(){}}),u=l.extend({draw:function(e){var t,o,n=this.qrious,a=this.getModuleSize(e),i=this.getOffset(e),r=this.element.getContext("2d");for(r.fillStyle=n.foreground,r.globalAlpha=n.foregroundAlpha,t=0;t<e.width;t++)for(o=0;o<e.width;o++)e.buffer[o*e.width+t]&&r.fillRect(a*t+i,a*o+i,a,a)},reset:function(){var e=this.qrious,t=this.element.getContext("2d"),o=e.size;t.lineWidth=1,t.clearRect(0,0,o,o),t.fillStyle=e.background,t.globalAlpha=e.backgroundAlpha,t.fillRect(0,0,o,o)},resize:function(){var e=this.element;e.width=e.height=this.qrious.size}}),d=s.extend(null,{BLOCK:[0,11,15,19,23,27,31,16,18,20,22,24,26,28,20,22,24,24,26,28,28,22,24,24,26,26,28,28,24,24,26,26,26,28,28,24,26,26,26,28,28]}),p=s.extend(null,{BLOCKS:[1,0,19,7,1,0,16,10,1,0,13,13,1,0,9,17,1,0,34,10,1,0,28,16,1,0,22,22,1,0,16,28,1,0,55,15,1,0,44,26,2,0,17,18,2,0,13,22,1,0,80,20,2,0,32,18,2,0,24,26,4,0,9,16,1,0,108,26,2,0,43,24,2,2,15,18,2,2,11,22,2,0,68,18,4,0,27,16,4,0,19,24,4,0,15,28,2,0,78,20,4,0,31,18,2,4,14,18,4,1,13,26,2,0,97,24,2,2,38,22,4,2,18,22,4,2,14,26,2,0,116,30,3,2,36,22,4,4,16,20,4,4,12,24,2,2,68,18,4,1,43,26,6,2,19,24,6,2,15,28,4,0,81,20,1,4,50,30,4,4,22,28,3,8,12,24,2,2,92,24,6,2,36,22,4,6,20,26,7,4,14,28,4,0,107,26,8,1,37,22,8,4,20,24,12,4,11,22,3,1,115,30,4,5,40,24,11,5,16,20,11,5,12,24,5,1,87,22,5,5,41,24,5,7,24,30,11,7,12,24,5,1,98,24,7,3,45,28,15,2,19,24,3,13,15,30,1,5,107,28,10,1,46,28,1,15,22,28,2,17,14,28,5,1,120,30,9,4,43,26,17,1,22,28,2,19,14,28,3,4,113,28,3,11,44,26,17,4,21,26,9,16,13,26,3,5,107,28,3,13,41,26,15,5,24,30,15,10,15,28,4,4,116,28,17,0,42,26,17,6,22,28,19,6,16,30,2,7,111,28,17,0,46,28,7,16,24,30,34,0,13,24,4,5,121,30,4,14,47,28,11,14,24,30,16,14,15,30,6,4,117,30,6,14,45,28,11,16,24,30,30,2,16,30,8,4,106,26,8,13,47,28,7,22,24,30,22,13,15,30,10,2,114,28,19,4,46,28,28,6,22,28,33,4,16,30,8,4,122,30,22,3,45,28,8,26,23,30,12,28,15,30,3,10,117,30,3,23,45,28,4,31,24,30,11,31,15,30,7,7,116,30,21,7,45,28,1,37,23,30,19,26,15,30,5,10,115,30,19,10,47,28,15,25,24,30,23,25,15,30,13,3,115,30,2,29,46,28,42,1,24,30,23,28,15,30,17,0,115,30,10,23,46,28,10,35,24,30,19,35,15,30,17,1,115,30,14,21,46,28,29,19,24,30,11,46,15,30,13,6,115,30,14,23,46,28,44,7,24,30,59,1,16,30,12,7,121,30,12,26,47,28,39,14,24,30,22,41,15,30,6,14,121,30,6,34,47,28,46,10,24,30,2,64,15,30,17,4,122,30,29,14,46,28,49,10,24,30,24,46,15,30,4,18,122,30,13,32,46,28,48,14,24,30,42,32,15,30,20,4,117,30,40,7,47,28,43,22,24,30,10,67,15,30,19,6,118,30,18,31,47,28,34,34,24,30,20,61,15,30],FINAL_FORMAT:[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107],LEVELS:{L:1,M:2,Q:3,H:4}}),f=s.extend(null,{EXPONENT:[1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38,76,152,45,90,180,117,234,201,143,3,6,12,24,48,96,192,157,39,78,156,37,74,148,53,106,212,181,119,238,193,159,35,70,140,5,10,20,40,80,160,93,186,105,210,185,111,222,161,95,190,97,194,153,47,94,188,101,202,137,15,30,60,120,240,253,231,211,187,107,214,177,127,254,225,223,163,91,182,113,226,217,175,67,134,17,34,68,136,13,26,52,104,208,189,103,206,129,31,62,124,248,237,199,147,59,118,236,197,151,51,102,204,133,23,46,92,184,109,218,169,79,158,33,66,132,21,42,84,168,77,154,41,82,164,85,170,73,146,57,114,228,213,183,115,230,209,191,99,198,145,63,126,252,229,215,179,123,246,241,255,227,219,171,75,150,49,98,196,149,55,110,220,165,87,174,65,130,25,50,100,200,141,7,14,28,56,112,224,221,167,83,166,81,162,89,178,121,242,249,239,195,155,43,86,172,69,138,9,18,36,72,144,61,122,244,245,247,243,251,235,203,139,11,22,44,88,176,125,250,233,207,131,27,54,108,216,173,71,142,0],LOG:[255,0,1,25,2,50,26,198,3,223,51,238,27,104,199,75,4,100,224,14,52,141,239,129,28,193,105,248,200,8,76,113,5,138,101,47,225,36,15,33,53,147,142,218,240,18,130,69,29,181,194,125,106,39,249,185,201,154,9,120,77,228,114,166,6,191,139,98,102,221,48,253,226,152,37,179,16,145,34,136,54,208,148,206,143,150,219,189,241,210,19,92,131,56,70,64,30,66,182,163,195,72,126,110,107,58,40,84,250,133,186,61,202,94,155,159,10,21,121,43,78,212,229,172,115,243,167,87,7,112,192,247,140,128,99,13,103,74,222,237,49,197,254,24,227,165,153,119,38,184,180,124,17,68,146,217,35,32,137,46,55,63,209,91,149,188,207,205,144,135,151,178,220,252,190,97,242,86,211,171,20,42,93,158,132,60,57,83,71,109,65,162,31,45,67,216,183,123,164,118,196,23,73,236,127,12,111,246,108,161,59,82,41,157,85,170,251,96,134,177,187,204,62,90,203,89,95,176,156,169,160,81,11,245,22,235,122,117,44,215,79,174,213,233,230,231,173,232,116,214,244,234,168,80,88,175]}),m=s.extend(null,{BLOCK:[3220,1468,2713,1235,3062,1890,2119,1549,2344,2936,1117,2583,1330,2470,1667,2249,2028,3780,481,4011,142,3098,831,3445,592,2517,1776,2234,1951,2827,1070,2660,1345,3177]}),g=s.extend(function(e){var t,o,n,a,i,r=e.value.length;for(this._badness=[],this._level=p.LEVELS[e.level],this._polynomial=[],this._value=e.value,this._version=0,this._stringBuffer=[];this._version<40&&(this._version++,n=4*(this._level-1)+16*(this._version-1),a=p.BLOCKS[n++],i=p.BLOCKS[n++],t=p.BLOCKS[n++],o=p.BLOCKS[n],!(r<=(n=t*(a+i)+i-3+(this._version<=9)))););this._dataBlock=t,this._eccBlock=o,this._neccBlock1=a,this._neccBlock2=i;var c=this.width=17+4*this._version;this.buffer=g._createArray(c*c),this._ecc=g._createArray(t+(t+o)*(a+i)+i),this._mask=g._createArray((c*(c+1)+1)/2),this._insertFinders(),this._insertAlignments(),this.buffer[8+c*(c-8)]=1,this._insertTimingGap(),this._reverseMask(),this._insertTimingRowAndColumn(),this._insertVersion(),this._syncMask(),this._convertBitStream(r),this._calculatePolynomial(),this._appendEccToData(),this._interleaveBlocks(),this._pack(),this._finish()},{_addAlignment:function(e,t){var o,n=this.buffer,a=this.width;for(n[e+a*t]=1,o=-2;o<2;o++)n[e+o+a*(t-2)]=1,n[e-2+a*(t+o+1)]=1,n[e+2+a*(t+o)]=1,n[e+o+1+a*(t+2)]=1;for(o=0;o<2;o++)this._setMask(e-1,t+o),this._setMask(e+1,t-o),this._setMask(e-o,t-1),this._setMask(e+o,t+1)},_appendData:function(e,t,o,n){var a,i,r,c=this._polynomial,s=this._stringBuffer;for(i=0;i<n;i++)s[o+i]=0;for(i=0;i<t;i++){if(255!==(a=f.LOG[s[e+i]^s[o]]))for(r=1;r<n;r++)s[o+r-1]=s[o+r]^f.EXPONENT[g._modN(a+c[n-r])];else for(r=o;r<o+n;r++)s[r]=s[r+1];s[o+n-1]=255===a?0:f.EXPONENT[g._modN(a+c[0])]}},_appendEccToData:function(){var e,t=0,o=this._dataBlock,n=this._calculateMaxLength(),a=this._eccBlock;for(e=0;e<this._neccBlock1;e++)this._appendData(t,o,n,a),t+=o,n+=a;for(e=0;e<this._neccBlock2;e++)this._appendData(t,o+1,n,a),t+=o+1,n+=a},_applyMask:function(e){var t,o,n,a,i=this.buffer,r=this.width;switch(e){case 0:for(a=0;a<r;a++)for(n=0;n<r;n++)n+a&1||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 1:for(a=0;a<r;a++)for(n=0;n<r;n++)1&a||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 2:for(a=0;a<r;a++)for(t=0,n=0;n<r;n++,t++)3===t&&(t=0),t||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 3:for(o=0,a=0;a<r;a++,o++)for(3===o&&(o=0),t=o,n=0;n<r;n++,t++)3===t&&(t=0),t||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 4:for(a=0;a<r;a++)for(t=0,o=a>>1&1,n=0;n<r;n++,t++)3===t&&(t=0,o=!o),o||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 5:for(o=0,a=0;a<r;a++,o++)for(3===o&&(o=0),t=0,n=0;n<r;n++,t++)3===t&&(t=0),(n&a&1)+!(!t|!o)||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 6:for(o=0,a=0;a<r;a++,o++)for(3===o&&(o=0),t=0,n=0;n<r;n++,t++)3===t&&(t=0),(n&a&1)+(t&&t===o)&1||this._isMasked(n,a)||(i[n+a*r]^=1);break;case 7:for(o=0,a=0;a<r;a++,o++)for(3===o&&(o=0),t=0,n=0;n<r;n++,t++)3===t&&(t=0),(t&&t===o)+(n+a&1)&1||this._isMasked(n,a)||(i[n+a*r]^=1)}},_calculateMaxLength:function(){return this._dataBlock*(this._neccBlock1+this._neccBlock2)+this._neccBlock2},_calculatePolynomial:function(){var e,t,o=this._eccBlock,n=this._polynomial;for(n[0]=1,e=0;e<o;e++){for(n[e+1]=1,t=e;t>0;t--)n[t]=n[t]?n[t-1]^f.EXPONENT[g._modN(f.LOG[n[t]]+e)]:n[t-1];n[0]=f.EXPONENT[g._modN(f.LOG[n[0]]+e)]}for(e=0;e<=o;e++)n[e]=f.LOG[n[e]]},_checkBadness:function(){var e,t,o,n,a,i=0,r=this._badness,c=this.buffer,s=this.width;for(a=0;a<s-1;a++)for(n=0;n<s-1;n++)(c[n+s*a]&&c[n+1+s*a]&&c[n+s*(a+1)]&&c[n+1+s*(a+1)]||!(c[n+s*a]||c[n+1+s*a]||c[n+s*(a+1)]||c[n+1+s*(a+1)]))&&(i+=g.N2);var l=0;for(a=0;a<s;a++){for(o=0,r[0]=0,e=0,n=0;n<s;n++)e===(t=c[n+s*a])?r[o]++:r[++o]=1,l+=(e=t)?1:-1;i+=this._getBadness(o)}l<0&&(l=-l);var u=0,d=l;for(d+=d<<2,d<<=1;d>s*s;)d-=s*s,u++;for(i+=u*g.N4,n=0;n<s;n++){for(o=0,r[0]=0,e=0,a=0;a<s;a++)e===(t=c[n+s*a])?r[o]++:r[++o]=1,e=t;i+=this._getBadness(o)}return i},_convertBitStream:function(e){var t,o,n=this._ecc,a=this._version;for(o=0;o<e;o++)n[o]=this._value.charCodeAt(o);var i=this._stringBuffer=n.slice(),r=this._calculateMaxLength();e>=r-2&&(e=r-2,a>9&&e--);var c=e;if(a>9){for(i[c+2]=0,i[c+3]=0;c--;)t=i[c],i[c+3]|=255&t<<4,i[c+2]=t>>4;i[2]|=255&e<<4,i[1]=e>>4,i[0]=64|e>>12}else{for(i[c+1]=0,i[c+2]=0;c--;)t=i[c],i[c+2]|=255&t<<4,i[c+1]=t>>4;i[1]|=255&e<<4,i[0]=64|e>>4}for(c=e+3-(a<10);c<r;)i[c++]=236,i[c++]=17},_getBadness:function(e){var t,o=0,n=this._badness;for(t=0;t<=e;t++)n[t]>=5&&(o+=g.N1+n[t]-5);for(t=3;t<e-1;t+=2)n[t-2]===n[t+2]&&n[t+2]===n[t-1]&&n[t-1]===n[t+1]&&3*n[t-1]===n[t]&&(0===n[t-3]||t+3>e||3*n[t-3]>=4*n[t]||3*n[t+3]>=4*n[t])&&(o+=g.N3);return o},_finish:function(){var e,t;this._stringBuffer=this.buffer.slice();var o=0,n=3e4;for(t=0;t<8&&(this._applyMask(t),(e=this._checkBadness())<n&&(n=e,o=t),7!==o);t++)this.buffer=this._stringBuffer.slice();o!==t&&this._applyMask(o),n=p.FINAL_FORMAT[o+(this._level-1<<3)];var a=this.buffer,i=this.width;for(t=0;t<8;t++,n>>=1)1&n&&(a[i-1-t+8*i]=1,t<6?a[8+i*t]=1:a[8+i*(t+1)]=1);for(t=0;t<7;t++,n>>=1)1&n&&(a[8+i*(i-7+t)]=1,t?a[6-t+8*i]=1:a[7+8*i]=1)},_interleaveBlocks:function(){var e,t,o=this._dataBlock,n=this._ecc,a=this._eccBlock,i=0,r=this._calculateMaxLength(),c=this._neccBlock1,s=this._neccBlock2,l=this._stringBuffer;for(e=0;e<o;e++){for(t=0;t<c;t++)n[i++]=l[e+t*o];for(t=0;t<s;t++)n[i++]=l[c*o+e+t*(o+1)]}for(t=0;t<s;t++)n[i++]=l[c*o+e+t*(o+1)];for(e=0;e<a;e++)for(t=0;t<c+s;t++)n[i++]=l[r+e+t*a];this._stringBuffer=n},_insertAlignments:function(){var e,t,o,n=this._version,a=this.width;if(n>1)for(e=d.BLOCK[n],o=a-7;;){for(t=a-7;t>e-3&&(this._addAlignment(t,o),!(t<e));)t-=e;if(o<=e+9)break;o-=e,this._addAlignment(6,o),this._addAlignment(o,6)}},_insertFinders:function(){var e,t,o,n,a=this.buffer,i=this.width;for(e=0;e<3;e++){for(t=0,n=0,1===e&&(t=i-7),2===e&&(n=i-7),a[n+3+i*(t+3)]=1,o=0;o<6;o++)a[n+o+i*t]=1,a[n+i*(t+o+1)]=1,a[n+6+i*(t+o)]=1,a[n+o+1+i*(t+6)]=1;for(o=1;o<5;o++)this._setMask(n+o,t+1),this._setMask(n+1,t+o+1),this._setMask(n+5,t+o),this._setMask(n+o+1,t+5);for(o=2;o<4;o++)a[n+o+i*(t+2)]=1,a[n+2+i*(t+o+1)]=1,a[n+4+i*(t+o)]=1,a[n+o+1+i*(t+4)]=1}},_insertTimingGap:function(){var e,t,o=this.width;for(t=0;t<7;t++)this._setMask(7,t),this._setMask(o-8,t),this._setMask(7,t+o-7);for(e=0;e<8;e++)this._setMask(e,7),this._setMask(e+o-8,7),this._setMask(e,o-8)},_insertTimingRowAndColumn:function(){var e,t=this.buffer,o=this.width;for(e=0;e<o-14;e++)1&e?(this._setMask(8+e,6),this._setMask(6,8+e)):(t[8+e+6*o]=1,t[6+o*(8+e)]=1)},_insertVersion:function(){var e,t,o,n,a=this.buffer,i=this._version,r=this.width;if(i>6)for(e=m.BLOCK[i-7],t=17,o=0;o<6;o++)for(n=0;n<3;n++,t--)1&(t>11?i>>t-12:e>>t)?(a[5-o+r*(2-n+r-11)]=1,a[2-n+r-11+r*(5-o)]=1):(this._setMask(5-o,2-n+r-11),this._setMask(2-n+r-11,5-o))},_isMasked:function(e,t){var o=g._getMaskBit(e,t);return 1===this._mask[o]},_pack:function(){var e,t,o,n=1,a=1,i=this.width,r=i-1,c=i-1,s=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2;for(t=0;t<s;t++)for(e=this._stringBuffer[t],o=0;o<8;o++,e<<=1){128&e&&(this.buffer[r+i*c]=1);do{a?r--:(r++,n?0!==c?c--:(n=!n,6==(r-=2)&&(r--,c=9)):c!==i-1?c++:(n=!n,6==(r-=2)&&(r--,c-=8))),a=!a}while(this._isMasked(r,c))}},_reverseMask:function(){var e,t,o=this.width;for(e=0;e<9;e++)this._setMask(e,8);for(e=0;e<8;e++)this._setMask(e+o-8,8),this._setMask(8,e);for(t=0;t<7;t++)this._setMask(8,t+o-7)},_setMask:function(e,t){var o=g._getMaskBit(e,t);this._mask[o]=1},_syncMask:function(){var e,t,o=this.width;for(t=0;t<o;t++)for(e=0;e<=t;e++)this.buffer[e+o*t]&&this._setMask(e,t)}},{_createArray:function(e){var t,o=[];for(t=0;t<e;t++)o[t]=0;return o},_getMaskBit:function(e,t){var o;return e>t&&(o=e,e=t,t=o),o=t,o+=t*t,o>>=1,o+=e},_modN:function(e){for(;e>=255;)e=((e-=255)>>8)+(255&e);return e},N1:3,N2:3,N3:40,N4:10}),v=g,h=l.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var e=this.element;e.width=e.height=this.qrious.size}}),y=s.extend(function(e,t,o,n){this.name=e,this.modifiable=Boolean(t),this.defaultValue=o,this._valueTransformer=n},{transform:function(e){var t=this._valueTransformer;return"function"==typeof t?t(e,this):e}}),b=s.extend(null,{abs:function(e){return null!=e?Math.abs(e):null},hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},noop:function(){},toUpperCase:function(e){return null!=e?e.toUpperCase():null}}),w=s.extend(function(e){this.options={},e.forEach(function(e){this.options[e.name]=e},this)},{exists:function(e){return null!=this.options[e]},get:function(e,t){return w._get(this.options[e],t)},getAll:function(e){var t,o=this.options,n={};for(t in o)b.hasOwn(o,t)&&(n[t]=w._get(o[t],e));return n},init:function(e,t,o){var n,a;for(n in"function"!=typeof o&&(o=b.noop),this.options)b.hasOwn(this.options,n)&&(a=this.options[n],w._set(a,a.defaultValue,t),w._createAccessor(a,t,o));this._setAll(e,t,!0)},set:function(e,t,o){return this._set(e,t,o)},setAll:function(e,t){return this._setAll(e,t)},_set:function(e,t,o,n){var a=this.options[e];if(!a)throw new Error("Invalid option: "+e);if(!a.modifiable&&!n)throw new Error("Option cannot be modified: "+e);return w._set(a,t,o)},_setAll:function(e,t,o){if(!e)return!1;var n,a=!1;for(n in e)b.hasOwn(e,n)&&this._set(n,e[n],t,o)&&(a=!0);return a}},{_createAccessor:function(e,t,o){var n={get:function(){return w._get(e,t)}};e.modifiable&&(n.set=function(n){w._set(e,n,t)&&o(n,e)}),Object.defineProperty(t,e.name,n)},_get:function(e,t){return t["_"+e.name]},_set:function(e,t,o){var n="_"+e.name,a=o[n],i=e.transform(null!=t?t:e.defaultValue);return o[n]=i,i!==a}}),S=w,O=s.extend(function(){this._services={}},{getService:function(e){var t=this._services[e];if(!t)throw new Error("Service is not being managed with name: "+e);return t},setService:function(e,t){if(this._services[e])throw new Error("Service is already managed with name: "+e);t&&(this._services[e]=t)}}),C=new S([new y("background",!0,"white"),new y("backgroundAlpha",!0,1,b.abs),new y("element"),new y("foreground",!0,"black"),new y("foregroundAlpha",!0,1,b.abs),new y("level",!0,"L",b.toUpperCase),new y("mime",!0,"image/png"),new y("padding",!0,null,b.abs),new y("size",!0,100,b.abs),new y("value",!0,"")]),I=new O,P=s.extend(function(e){C.init(e,this,this.update.bind(this));var t=C.get("element",this),o=I.getService("element"),n=t&&o.isCanvas(t)?t:o.createCanvas(),a=t&&o.isImage(t)?t:o.createImage();this._canvasRenderer=new u(this,n,!0),this._imageRenderer=new h(this,a,a===t),this.update()},{get:function(){return C.getAll(this)},set:function(e){C.setAll(e,this)&&this.update()},toDataURL:function(e){return this.canvas.toDataURL(e||this.mime)},update:function(){var e=new v({level:this.level,value:this.value});this._canvasRenderer.render(e),this._imageRenderer.render(e)}},{use:function(e){I.setService(e.getName(),e)}});Object.defineProperties(P.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}});var k=P,A=s.extend({getName:function(){}}).extend({createCanvas:function(){},createImage:function(){},getName:function(){return"element"},isCanvas:function(e){},isImage:function(e){}}).extend({createCanvas:function(){return document.createElement("canvas")},createImage:function(){return document.createElement("img")},isCanvas:function(e){return e instanceof HTMLCanvasElement},isImage:function(e){return e instanceof HTMLImageElement}});return k.use(new A),k}()},742:(e,t,o)=>{"use strict";o.d(t,{A:()=>W});var n=o(2284),a=o(4980),i=o(2505),r=o.n(i),c=o(680),s=o.n(c);function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach(function(t){(0,a.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.success&&e.success({}),e.complete&&e.complete({})}function p(){return-1!==window.navigator.userAgent.indexOf("QYZone_1")}function f(e,t){var o=t.closeNcc?"":"NCC",a=u(u({},t),{},{fail:function(a){console.log("error:",a),t.fail(function(e,t,o){var a={code:-1,message:c};if("object"===(0,n.A)(t)){var i=t&&t.errCode,r="";1003==i?r="by user cancel":-1e3==i?r="method no found":405==i?r="Unauthorized and unauthorized to perform this operation!":401==i&&(r="User doesn't have permission to access"),a.code=i,a.message=r||JSON.stringify(t)}var c="YYZone api ".concat(o+e,", error message: ").concat(a.message);return a.message=c,a}(e,a,o))}});console.log("exec YYEsnBridge.do method :",o+e),console.log("data: ",a),YYEsnBridge.do(o+e,a)}function m(e,t){return{success:function(o){var n=t&&t(o)||o;e.success&&e.success(n),e.complete&&e.complete({code:200,data:n})},fail:function(t){console.log("handleResponse:fail",t),e.fail&&e.fail(t),e.complete&&e.complete(t)}}}function g(e,t,o){if(!t){var n={code:-1,message:"".concat(e," is null")};return o.fail&&o.fail(n),o.complete&&o.complete(n),!0}return!1}const v={upesn:{test:function(){console.log("test")},uploadImageBackBase64:function(e){var t=e||{};f("uploadFile",{url:"https://mdoctor.yonyoucloud.com/mtldebugger/mtl/file/convertBase64",filePath:t.filePath,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},showToast:function(e){var t=e||{};f("showToast",Object.assign({closeNcc:!0,content:t.content,duration:t.duration},m(t)))},customScanQRCode:function(e){var t=e||{},o=t.type,n=void 0===o?1:o,a=t.url,i=t.callback,r=t.scanLeftRatio,c=void 0===r?.25:r,s=t.scanTopRatio,l=void 0===s?.1:s,u=t.scanWidthRatio,d=void 0===u?.5:u,p=t.scanHeightRatio,g=void 0===p?.2:p,v=t.isHiddenLight,h=void 0===v?0:v,y=t.customNavi,b=t.leftItems,w=t.rightItems,S=t.centerItems,O=t.scanViewCloseCallback;if(!a||!i||0===d){var C={code:1,message:0===d?"scanWidthRatio is zero":"".concat(a?"callback":"url"," is null")};return t.fail&&e.fail(C),void(t.complete&&e.complete(C))}f("customScanQRCode",Object.assign({type:n,url:a,callback:i,scanLeftRatio:c,scanTopRatio:l,scanWidthRatio:d,scanHeightRatio:g,isHiddenLight:h,customNavi:y,leftItems:b,rightItems:w,centerItems:S,scanViewCloseCallback:O},m(t)))},mdfCustomScanQRCode:function(e){var t=e||{},o=t.type,n=t.hide,a=t.callback,i=t.scanLeftRatio,r=t.scanTopRatio,c=t.scanWidthRatio,s=t.scanHeightRatio,l=t.lineColor,u=void 0===l?"#00FF00":l,d=t.scanUIStyle,p=void 0===d?0:d,g=t.backgroundHeightRatio,v=t.isShowScanDesc,h=void 0===v?0:v,y=t.isShowLight,b=void 0===y?0:y,w=t.cornerLenthRatio,S=void 0===w?.1:w,O=t.scanDescription,C=void 0===O?"":O;"function"==typeof a&&(a="mdfQRCodeCallBack",mtl.upesn.registerCommonCallback(a,function(e,o){t.callback&&t.callback(e),t.complete&&t.complete({code:200})})),f("mdfCustomScanQRCode",Object.assign({type:o,hide:n,callback:a,scanLeftRatio:i,scanTopRatio:r,scanWidthRatio:c,scanHeightRatio:s,lineColor:u,scanUIStyle:p,backgroundHeightRatio:g,isShowScanDesc:h,isShowLight:b,cornerLenthRatio:S,scanDescription:C,closeNcc:!0},m(t)))},mdfChangeCustomScanMode:function(e){var t=e||{},o=t.type,n=Object.assign({type:o,closeNcc:!0},m(t));p()?f("changeCustomScanMode",n):f("mdfChangeCustomScanMode",n)},mdfChangeFlashLightStatus:function(e){var t=e||{},o=t.type,n=t.callback,a=Object.assign({type:o,callback:n,closeNcc:!0},m(t));p()?f("changeFlashLightStatus",a):f("mdfChangeFlashLightStatus",a)},getUserYHTInfo:function(e){var t=e||{};f("getUserYHTInfo",Object.assign({closeNcc:!0},m(t)))},registerCallback:function(e,t){var o={};o[e]=function(e,o){console.log(e),t(e&&"{}"!==e?JSON.parse(e).qrString:"",o)},YYEsnBridge.registerHandler(o)},registerCommonCallback:function(e,t){var o={};o[e]=function(e,o){t(e,o)},YYEsnBridge.registerHandler(o)},registerResumeCallback:function(e,t){var o={};o[e]=function(e){t(e)},YYEsnBridge.registerHandler(o)},executeDBOperate:function(e){var t=e||{};f("executeDBOperate",{executeType:t.executeType,executeSql:t.executeSql,success:function(e){t.success&&t.success(e)},fail:function(e){t.fail&&t.fail(e)},complete:function(e){t.complete&&t.complete(e)}})},loadImageFromLocal:function(e){var t=e||{};f("loadImageFromLocal",{url:t.url,closeNcc:!0,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseImage:function(e){var t=e||{};f("chooseImages",{sourceType:t.sourceType,count:t.count,watermark:t.watermark,returnThumbnail:t.returnThumbnail,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseImageToServer:function(e){var t=e||{},o=t.count,n=void 0===o?9:o,a=t.sourceType,i=void 0===a?["album","camera"]:a,r=t.watermark;r&&g("text",r.text,e)||f("chooseImageToServer",Object.assign({count:n,sourceType:i,watermark:r},m(t)))},compressLocalImage:function(e){var t=e||{};f("compressLocalImage",{type:t.type,level:t.level,imgData:t.imgData,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},viewUserInfo:function(e){var t=e||{};f("viewUserInfo",{memberId:t.memberId,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseDepartment:function(e){var t=e||{},o=t.multiple,n=t.selectedList,a=t.maxCount,i=t.selectedCount;f("chooseDepartment",{multiple:o,selectedList:n||[],maxCount:a,selectedCount:i||0,deptType:t.deptType,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseContacts:function(e){var t=e||{},o=t.multiple,n=t.selectedList;f("chooseContacts",{multiple:o,selectedList:n||[],maxCount:t.maxCount,navTitle:t.navTitle,navColor:t.navColor,qzId:t.qzId,canDelete:t.canDelete,canSelectDept:t.canSelectDept,needYhtUserId:t.needYhtUserId,filterCondition:t.filterCondition,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseAllContacts:function(e){var t=e||{};f("chooseAllContacts",{multiple:t.multiple,navTitle:t.navTitle,selectedList:t.selectedList,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseInsideGroup:function(e){var t=e||{},o={multiple:t.multiple,selectedList:t.selectedList,groupType:t.groupType,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}};YYEsnBridge.do("chooseInsideGroup",o)},createFeedComponent:function(e){var t=e||{};f("createFeedComponent",{groupId:t.groupId,groupName:t.groupName,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},openChatByUserId:function(e){var t=e||{},o=t.userType,n=t.userId;g("userId",n,e)||f("openChatByUserId",Object.assign({userId:n,userType:o},m(t)))},sendImageMessages:function(e){var t=e||{};f("sendImageMessages",{userType:t.userType,chatId:t.chatId,chatType:t.chatType,filePaths:t.filePaths,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},createNewSchedule:function(e){var t=e||{};f("createNewSchedule",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},viewScheduleList:function(e){var t=e||{};f("viewScheduleList",{time:t.time,memberId:t.memberId,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},viewScheduleDetail:function(e){var t=e||{};f("viewScheduleDetail",{scheduleId:t.scheduleId,subId:t.subId,memberId:t.memberId,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},sendMiniMail:function(e){var t=e||{};f("sendMiniMail",{users:t.users,spaceId:t.spaceId,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},openLibraryFiles:function(e){var t=e||{};f("openLibraryFiles",{firstCatalog:t.firstCatalog,secondCatalog:t.secondCatalog,thirdCatalog:t.thirdCatalog,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},previewDoc:function(e){var t=e||{},o=t.fileId,n=t.fromType,a=void 0===n?a||(o?0:5):n,i=t.downloadUrl,r=t.fileName,c=t.needDownload,s=t.upload_url;if(!o){var l;if(i&&r){var u=r.lastIndexOf("."),d=r.substr(u+1);if(["doc","docx","wps","dps","wpt","pot","potx","ppt","pptx","dpt","pps","ppsx","xls","xlsx","txt","pdf","rar","zip","avi","rmvb","rm","asf","divx","mpg","mpeg","mpe","wmv","mp4","mkv","vob","flv","jpg","jpeg","bmp","psd","gif","png","tiff","mp3","wav"].includes(d)){if(9!==a||s)return void f("previewDoc",Object.assign({fromType:a,downloadUrl:i,fileName:r,needDownload:c,upload_url:s},m(t)));l="upload_url is error "}else l="fileName format error "}else l="parameter is null";var p={code:1,message:l};return t.fail&&e.fail(p),void(t.complete&&e.complete(p))}f("previewDoc",Object.assign({fileId:o,fromType:a},m(t)))},wpsPreview:function(e){var t=e||{},o=t.fileName,n=t.fileExt,a=t.fileUrl,i=t.fileId,r=t.appId;f("wpsPreview",Object.assign({fileName:o,fileExt:n,fileUrl:a,fileId:i,appId:r},m(t)))},closeCurrentWebview:function(e){var t=e||{};f("closeCurrentWebview",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},settingNavBar:function(e){var t=e||{},o=t.hide,n=t.backgroundColor,a=t.tintColor,i=t.fullScreen,r=t.hideShadowImage,c=t.statusBarStyle,s=t.leftItems,l=t.centerItems,d=t.rightItems,p={hide:o,backgroundColor:n,tintColor:a,fullScreen:i,hideShadowImage:r,statusBarStyle:c};s&&(p.leftItems=s),l&&(p.centerItems=l),d&&(p.rightItems=d),f("settingNavBar",u(u({},p),{},{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}}))},chooseLocalFileToServer:function(e){var t=e||{};f("chooseLocalFileToServer",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},chooseLocalFiles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxNumber;f("chooseLocalFiles",u({maxNumber:void 0===t?5:t},m(e)))},chooseLibraryFiles:function(e){var t=e||{};f("chooseLibraryFiles",{type:t.type,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},startContinuousLocation:function(e){var t=e||{};f("continuousLocationStart",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},getContinuousLocation:function(e){var t=e||{};f("continuousLocationGet",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},stopContinuousLocation:function(e){var t=e||{};f("continuousLocationStop",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},shareWithType:function(e){var t=e||{};f("shareWithType",{title:t.title,type:t.type,desc:t.desc,imageUrl:t.imageUrl,pageUrl:t.pageUrl,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},showAlert:function(e){var t=e||{};f("showAlert",{type:t.type,title:t.title,content:t.content,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},getAppData:function(e){var t=e||{};f("getAppData",{appId:t.appId,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},faceDetect:function(e){var t=e||{};f("faceDetect",{spaceId:t.spaceId,faceGroupId:t.faceGroupId,needSmile:t.needSmile,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},setGesturePassword:function(e){var t=e||{};f("setGesturePassword",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},verifyGesturePassword:function(e){var t=e||{};f("verifyGesturePassword",{success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},verifyLoginPassword:function(e){var t=e||{};f("verifyLoginPassword",{title:t.title,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},showShareMenu:function(e){var t=e||{},o=t.type,n=t.title,a=t.desc,i=t.imageUrl,r=t.pageUrl;if(!g("desc",a,e)&&!g("pageUrl",r,e)){f("showShareMenu",Object.assign({title:n,type:o,desc:a,imageUrl:i,pageUrl:r,closeNcc:!0},m(t)))}},voiceToText:function(e){f("voiceToText",m(e))},chooseFile:function(){f("chooseFile",arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},changeFlashLightStatus:function(e){var t=e||{},o=t.type,n=t.callback;f("changeFlashLightStatus",Object.assign({callback:n,type:o},m(t)))},isShowTabbar:function(e){var t=e||{};f("isShowTabbar",{isShow:t.isShow,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},openNewWebview:function(e){var t=e||{};f("openNewWebview",{url:t.url,orientation:t.orientation,navShow:t.navShow,title:t.title,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},login:function(e){var t=e.url?e.url:"https://mdf-mobile-daily.yonyoucloud.com";mtl.upesn.getUserYHTInfo({success:function(o){var n=o.yhtToken,a=o.yht_access_token,i=o.yht_userid,c=o.tenant_id,s=n||a;s&&i&&c&&r().get(t+"/mobile/app/index/yht/token/context",{params:{yhtAccessTokenCipher:s,userId:i,tenantId:c},withCredentials:!0}).then(function(t){e.success&&e.success(t.data),e.complete&&e.complete({code:200,data:t.data})}).catch(function(t){e.fail&&e.fail(t),e.complete&&e.complete(t)})},fail:function(t){e.fail&&e.fail(t),e.complete&&e.complete(t)}})},openAppWithParams:function(e){var t=e||{};f("openAppWithParams",{app_id:t.app_id,qz_id:t.qz_id,pluginId:t.pluginId,closeNcc:!0,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},getToken:function(e){var t=e||{};f("getToken",{closeNcc:!0,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})},getBlueToothState:function(e){f("getBlueToothState",Object.assign({closeNcc:!0},m(e)))},blueToothConnectState:function(e){f("blueToothConnectState",Object.assign({closeNcc:!0},m(e)))},blueToothScan:function(e){var t=e.registerFunc;mtl.upesn.registerCommonCallback("blueToothDevices",function(e,o){t&&t(e)}),f("blueToothScan",Object.assign({closeNcc:!0,registerFunc:"blueToothDevices"},m(e)))},blueToothConnect:function(e){var t=e.deviceIndentify,o=e.deviceName;f("blueToothConnect",Object.assign({closeNcc:!0,deviceIndentify:t,deviceName:o},m(e)))},blueToothPrint:function(e){var t=e.printNum,o=e.content;f("blueToothPrint",Object.assign({closeNcc:!0,printNum:t,content:o},m(e)))},blueToothDisConnect:function(e){f("blueToothDisConnect",Object.assign({closeNcc:!0},m(e)))},blueToothStopScan:function(e){f("blueToothStopScan",Object.assign({closeNcc:!0},m(e)))},rfidConnect:function(e){var t=e.callback;mtl.upesn.registerCommonCallback("rfidConnectCallback",function(e,o){t&&t(e)}),f("rfidConnect",Object.assign({closeNcc:!0,callback:"rfidConnectCallback"},m(e)))},rfidDisconnect:function(e){f("rfidDisconnect",Object.assign({closeNcc:!0},m(e)))},setAppletCapsuleStyle:function(e){var t=e||{};f("setAppletCapsuleStyle",Object.assign(u(u({},t),{},{closeNcc:!0}),m(e)))},getAppletCapsuleParams:function(e){var t=e||{};f("getAppletCapsuleParams",Object.assign(u(u({},t),{},{closeNcc:!0}),m(e)))},setStatusBarStyle:function(e){var t=e||{};f("setStatusBarStyle",Object.assign(u(u({},t),{},{closeNcc:!0}),m(e)))},sendTodoReceipt:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},chooseDocFiles:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},getAppInfomation:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},execEsnBridge:f,handleResponse:m,successCallBack:d,isEmpty:g};function h(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?h(Object(o),!0).forEach(function(t){(0,a.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var b="domain.default",w=200,S=(null===r()||void 0===r()?void 0:r().default)||r(),O={code:1,message:"The current platform does not support"};function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.fail&&e.fail(O),e.complete&&e.complete(O)}function I(e){var t=e||{},o=t.type,n=void 0===o?0:o;0===n&&v.upesn.registerCallback("scanDataCallback",function(e,o){t.success&&t.success({resultStr:e}),t.complete&&t.complete({code:w,resultStr:e}),"function"==typeof o&&o({name:"FromJS scanDataCallback"})}),D("relayoutCustomWebview",{type:n,success:function(){},fail:function(o){t.fail&&e.fail(o)},complete:function(){}})}function P(e){var t=e||{};D("getSystemInfo",{closeNcc:!0,success:function(o){t.success&&e.success(o)},fail:function(o){t.fail&&e.fail(o)},complete:function(o){t.complete&&e.complete(o)}})}function k(e,t){var o=e.sourceType;mtl.chooseImage({count:1,sizeType:["original","compressed"],sourceType:o||["album","camera"],success:function(o){var n=o.localIds;A(y(y({},e),{},{image:n[0]}),t)},fail:e.fail})}function A(e,t){mtl.getLocalImgData({localId:e.image,success:function(o){var n=o.localData;n.startsWith("data:image/")&&(n=n.split(";base64,")[1]),T(e,n,t)},fail:e.fail})}function T(e,t,o){!function(e){var t,o=e.appCode,n=e.side,a=e.type,i=e.localData,r=e.url,c=void 0===r?"https://bip-daily.yonyoucloud.com/iuap-yonbuilder-mobile":r;"invoice"===a?t="".concat(c,"/rest/v1/api/apilink/ocr/invoice/vat/base64"):"id"===a?t="".concat(c,"/rest/v1/api/apilink/ocr/card/id/base64"):"bank"===a&&(t="".concat(c,"/rest/v1/api/apilink/ocr/card/bank/base64")),S({method:"post",url:t,params:null,data:{image:i,apiCode:o,isFront:"back"!==n},headers:{"Content-Type":"application/json"}}).then(function(t){e.success&&e.success(t.data),e.complete&&e.complete(t)}).catch(function(t){e.fail&&e.fail(t),e.com