yach.open.jssdk 4.1.24-beta1 → 4.1.24

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.
Files changed (154) hide show
  1. package/dist/yach_jssdk_4.1.24.js +1 -0
  2. package/es/api/biz/navigation/tencentMeeting.d.ts +16 -0
  3. package/es/api/biz/navigation/tencentMeeting.js +10 -0
  4. package/es/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
  5. package/es/api/biz/navigation/tencentMeetingBegin.js +10 -0
  6. package/es/api/biz/util/injectScript.d.ts +9 -0
  7. package/es/api/biz/util/injectScript.js +10 -0
  8. package/es/api/util/tool/flushLog.d.ts +7 -0
  9. package/es/api/util/tool/flushLog.js +17 -0
  10. package/es/api/util/tool/log.d.ts +9 -0
  11. package/es/api/util/tool/log.js +17 -0
  12. package/es/index.d.ts +13 -1
  13. package/es/index.js +16 -3
  14. package/es/lib/bridge/mobile.js +3 -3
  15. package/es/lib/bridge/pc.js +1 -1
  16. package/es/lib/helper/event.js +7 -6
  17. package/es/lib/helper/pcIframe.js +7 -6
  18. package/es/lib/sdk/index.d.ts +1 -0
  19. package/es/lib/sdk/index.js +31 -28
  20. package/es/utils/compareVersions.d.ts +58 -0
  21. package/es/utils/compareVersions.js +192 -0
  22. package/es/utils/console.js +1 -2
  23. package/es/utils/index.js +1 -1
  24. package/libs/api/app/custom/talYoungFilesUpload.js +2 -2
  25. package/libs/api/biz/chat/chooseConversationByCorpId.js +2 -2
  26. package/libs/api/biz/chat/openSingleChat.js +2 -2
  27. package/libs/api/biz/chat/openSquad.js +2 -2
  28. package/libs/api/biz/chat/openTeamChat.js +2 -2
  29. package/libs/api/biz/chat/pickConversation.js +2 -2
  30. package/libs/api/biz/chat/sendP2PMsg.js +2 -2
  31. package/libs/api/biz/contact/complexPicker.js +2 -2
  32. package/libs/api/biz/contact/departmentsPicker.js +2 -2
  33. package/libs/api/biz/group/groupComplexPicker.js +2 -2
  34. package/libs/api/biz/map/multipointView.js +2 -2
  35. package/libs/api/biz/map/view.js +2 -2
  36. package/libs/api/biz/navigation/close.js +2 -2
  37. package/libs/api/biz/navigation/goBack.js +2 -2
  38. package/libs/api/biz/navigation/quit.js +2 -2
  39. package/libs/api/biz/navigation/replace.js +2 -2
  40. package/libs/api/biz/navigation/setIcon.js +2 -2
  41. package/libs/api/biz/navigation/setLeft.js +2 -2
  42. package/libs/api/biz/navigation/setMenu.js +2 -2
  43. package/libs/api/biz/navigation/setRight.js +2 -2
  44. package/libs/api/biz/navigation/setTitle.js +2 -2
  45. package/libs/api/biz/navigation/setTitleExpandIcon.js +2 -2
  46. package/libs/api/biz/navigation/setWindowBig.js +2 -2
  47. package/libs/api/biz/navigation/tencentMeeting.d.ts +16 -0
  48. package/libs/api/biz/navigation/tencentMeeting.js +21 -0
  49. package/libs/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
  50. package/libs/api/biz/navigation/tencentMeetingBegin.js +21 -0
  51. package/libs/api/biz/navigation/updateExpandTitle.js +2 -2
  52. package/libs/api/biz/telephone/call.js +2 -2
  53. package/libs/api/biz/telephone/showCallMenu.js +2 -2
  54. package/libs/api/biz/util/authFinish.js +2 -2
  55. package/libs/api/biz/util/authStart.js +2 -2
  56. package/libs/api/biz/util/chosen.js +2 -2
  57. package/libs/api/biz/util/clipboardFileUpload.js +2 -2
  58. package/libs/api/biz/util/closeWindow.js +2 -2
  59. package/libs/api/biz/util/complain.js +2 -2
  60. package/libs/api/biz/util/createModifySchedule.js +2 -2
  61. package/libs/api/biz/util/datepicker.js +2 -2
  62. package/libs/api/biz/util/datetimepicker.js +2 -2
  63. package/libs/api/biz/util/downloadFile.js +2 -2
  64. package/libs/api/biz/util/externalLinkPreviewFile.js +2 -2
  65. package/libs/api/biz/util/feedback.js +2 -2
  66. package/libs/api/biz/util/getSingleWebviewData.js +2 -2
  67. package/libs/api/biz/util/getTogetherConfig.js +2 -2
  68. package/libs/api/biz/util/getToken.js +2 -2
  69. package/libs/api/biz/util/injectScript.d.ts +9 -0
  70. package/libs/api/biz/util/injectScript.js +21 -0
  71. package/libs/api/biz/util/invoice.js +2 -2
  72. package/libs/api/biz/util/mediaFileUpload.js +2 -2
  73. package/libs/api/biz/util/open.js +2 -2
  74. package/libs/api/biz/util/openLink.js +2 -2
  75. package/libs/api/biz/util/openMediaFileDialog.js +2 -2
  76. package/libs/api/biz/util/openSingleWebview.js +2 -2
  77. package/libs/api/biz/util/openSlidePanel.js +2 -2
  78. package/libs/api/biz/util/openTalYoungToTopic.js +2 -2
  79. package/libs/api/biz/util/openTogetherEyeWebview.js +2 -2
  80. package/libs/api/biz/util/openVideoPlayer.js +2 -2
  81. package/libs/api/biz/util/previewFile.js +2 -2
  82. package/libs/api/biz/util/previewImage.js +2 -2
  83. package/libs/api/biz/util/proxy.js +2 -2
  84. package/libs/api/biz/util/pushWorkMsg.js +2 -2
  85. package/libs/api/biz/util/remind.js +2 -2
  86. package/libs/api/biz/util/rouseApp.js +2 -2
  87. package/libs/api/biz/util/savePic.js +2 -2
  88. package/libs/api/biz/util/scan.js +2 -2
  89. package/libs/api/biz/util/selectDepartment.js +2 -2
  90. package/libs/api/biz/util/share.js +2 -2
  91. package/libs/api/biz/util/takePicture.js +2 -2
  92. package/libs/api/biz/util/uploadAttachment.js +2 -2
  93. package/libs/api/biz/util/zfbAuth.js +2 -2
  94. package/libs/api/biz/webViewMessage/send.js +2 -2
  95. package/libs/api/device/audio/download.js +2 -2
  96. package/libs/api/device/audio/onPlayEnd.js +2 -2
  97. package/libs/api/device/audio/onRecordEnd.js +2 -2
  98. package/libs/api/device/audio/onRecordEnd_v2.js +2 -2
  99. package/libs/api/device/audio/pause.js +2 -2
  100. package/libs/api/device/audio/play.js +2 -2
  101. package/libs/api/device/audio/resume.js +2 -2
  102. package/libs/api/device/audio/startRecord.js +2 -2
  103. package/libs/api/device/audio/startRecord_v2.js +2 -2
  104. package/libs/api/device/audio/stop.js +2 -2
  105. package/libs/api/device/audio/stopRecord.js +2 -2
  106. package/libs/api/device/audio/stopRecord_v2.js +2 -2
  107. package/libs/api/device/base/checkStepPermission.js +2 -2
  108. package/libs/api/device/base/getPhoneInfo.js +2 -2
  109. package/libs/api/device/base/getUUID.js +2 -2
  110. package/libs/api/device/connection/getNetworkType.js +2 -2
  111. package/libs/api/device/connection/isAtTal.js +2 -2
  112. package/libs/api/device/geolocation/get.js +2 -2
  113. package/libs/api/device/geolocation/getSwitch.js +2 -2
  114. package/libs/api/device/notification/actionSheet.js +2 -2
  115. package/libs/api/device/notification/alert.js +2 -2
  116. package/libs/api/device/notification/confirm.js +2 -2
  117. package/libs/api/device/notification/hidePreloader.js +2 -2
  118. package/libs/api/device/notification/showPreloader.js +2 -2
  119. package/libs/api/device/notification/toast.js +2 -2
  120. package/libs/api/device/notification/vibrate.js +2 -2
  121. package/libs/api/device/system/getLang.js +2 -2
  122. package/libs/api/device/system/setLight.js +2 -2
  123. package/libs/api/primary/createTab.js +2 -2
  124. package/libs/api/primary/weeklyShare.js +2 -2
  125. package/libs/api/runtime/permission/requestAuthCode.js +2 -2
  126. package/libs/api/ui/pullToRefresh/disable.js +2 -2
  127. package/libs/api/ui/pullToRefresh/enable.js +2 -2
  128. package/libs/api/ui/pullToRefresh/stop.js +2 -2
  129. package/libs/api/ui/webViewBounce/disable.js +2 -2
  130. package/libs/api/util/domainStorage/getItem.js +2 -2
  131. package/libs/api/util/domainStorage/removeItem.js +2 -2
  132. package/libs/api/util/domainStorage/setItem.js +2 -2
  133. package/libs/api/util/tool/flushLog.d.ts +7 -0
  134. package/libs/api/util/tool/flushLog.js +28 -0
  135. package/libs/api/util/tool/log.d.ts +9 -0
  136. package/libs/api/util/tool/log.js +28 -0
  137. package/libs/index.d.ts +13 -1
  138. package/libs/index.js +269 -202
  139. package/libs/lib/bridge/index.js +7 -7
  140. package/libs/lib/bridge/mobile.js +6 -6
  141. package/libs/lib/bridge/pc.js +5 -5
  142. package/libs/lib/helper/apiHelper.js +2 -2
  143. package/libs/lib/helper/codeMap.js +2 -2
  144. package/libs/lib/helper/event.js +9 -8
  145. package/libs/lib/helper/pcIframe.js +9 -9
  146. package/libs/lib/index.js +2 -2
  147. package/libs/lib/sdk/index.d.ts +1 -0
  148. package/libs/lib/sdk/index.js +35 -30
  149. package/libs/utils/compareVersions.d.ts +58 -0
  150. package/libs/utils/compareVersions.js +218 -0
  151. package/libs/utils/console.js +3 -3
  152. package/libs/utils/index.js +10 -10
  153. package/package.json +2 -2
  154. package/dist/yach_jssdk_4.1.24-beta1.js +0 -1
@@ -0,0 +1 @@
1
+ window.yy=function(n){var e={};function t(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(o,i,function(e){return n[e]}.bind(null,i));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=1)}([function(n){n.exports=JSON.parse('{"name":"yach.open.jssdk","version":"4.1.24","description":"","module":"./es/index.js","main":"./libs/index.js","files":["es","libs","dist"],"sideEffects":false,"scripts":{"start":"yach del es && tsc -w","build":"node ./tools/run compile","prepublish":"npm run upload-cdn","postpublish":"yach open https://www.npmjs.com/package/yach.open.jssdk","upload-cdn":"npm run build && node ./upload/upload.js","lint":"eslint \'src/**/*.{js,ts}\'","lint-fix":"eslint --fix \'src/**/*.{js,ts}\'","p:beta":"npm publish --tag=beta --access public"},"dependencies":{"@babel/runtime-corejs3":"^7.10.3"},"authors":[{"name":"ostwind","email":"9837438@qq.com"}],"license":"ISC","devDependencies":{"@babel/core":"^7.10.2","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.9.5","@types/node":"^13.9.8","@typescript-eslint/eslint-plugin":"^2.25.0","@typescript-eslint/parser":"^2.25.0","babel-loader":"^8.1.0","colorful":"^2.1.0","commander":"^5.1.0","dingtalk-jsapi":"^2.10.2","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.2","gulp":"^4.0.2","gulp-babel":"^8.0.0","gulp-concat":"^2.6.1","gulp-typescript":"^6.0.0-alpha.1","gulp-uglify":"^3.0.2","gulp-umd":"^2.0.0","gulp-util":"^3.0.8","lint-staged":"^10.0.9","prettier":"^2.0.2","qiao.ext.cos":"^0.1.2","ts-loader":"^7.0.1","typescript":"^3.8.3","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-merge":"^4.2.2","yach.open.cli":"^1.0.1"}}')},function(n,e,t){"use strict";var o;function i(){var n="undefined"!=typeof navigator?navigator.userAgent:"",e=/Yach/i.test(n),t=/iPhone|iPad|iPod|iOS/i.test(n)&&e,i=/Android/i.test(n)&&e,r=/YachPc/i.test(n),a=/iPad/i.test(n)&&e,s=/iPhone/i.test(n)&&e,c=o.notInYach;return t&&(c=o.ios),i&&(c=o.android),r&&(c=o.pc),{platform:c,platformV2:{inYach:e,inIOS:t,inAndroid:i,inPC:r,inIpad:a,inIPhone:s},version:((n.match(/Yach\/[a-zA-Z0-9.-]+/)||[])[0]||"").split("/")[1]||"",language:"undefined"!=typeof navigator?navigator.language:"*"}}function r(n){if(n)if(n.group)if(n.project)if(n.hasOwnProperty("env"))if(n.hasOwnProperty("version")){var e=["https://es.zhiyinlou.com/log.js?"];e.push("group="+n.group),e.push("&project="+n.project),e.push("&env="+n.env),e.push("&version="+n.version),e.push("&method="+n.method),n.yachid&&e.push("&yachid="+n.yachid),n.workcode&&e.push("&workcode="+n.workcode),n.timestamp&&e.push("&timestamp="+n.timestamp),n.errorcode&&e.push("&errorcode="+n.errorcode),n.message&&e.push("&message="+n.message),n.api&&n.time&&(e.push("&api="+n.api),e.push("&load_time="+n.time));var t,o,i=e.join("");t=i,(o=document.createElement("script")).type="text/javascript",o.readyState?o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(o.onreadystatechange=null,document.getElementsByTagName("head")[0].removeChild(o))}:o.onload=function(){document.getElementsByTagName("head")[0].removeChild(o)},o.src=t,document.getElementsByTagName("head")[0].appendChild(o),"online"!=n.env&&console.log(i)}else console.log("bpit error: need options.version");else console.log("bpit error: need options.env");else console.log("bpit error: need options.project");else console.log("bpit error: need options.group");else console.log("bpit error: need options")}t.r(e),t.d(e,"version",(function(){return uo})),t.d(e,"sdkVersion",(function(){return po})),t.d(e,"env",(function(){return lo})),t.d(e,"platform",(function(){return fo})),t.d(e,"platformV2",(function(){return vo})),t.d(e,"config",(function(){return mo})),t.d(e,"ready",(function(){return go})),t.d(e,"error",(function(){return ho})),t.d(e,"on",(function(){return bo})),t.d(e,"off",(function(){return wo})),t.d(e,"openLink",(function(){return B})),t.d(e,"feedback",(function(){return O})),t.d(e,"open",(function(){return L})),t.d(e,"openSlidePanel",(function(){return H})),t.d(e,"share",(function(){return q})),t.d(e,"previewFile",(function(){return Y})),t.d(e,"previewImage",(function(){return J})),t.d(e,"downloadFile",(function(){return K})),t.d(e,"uploadAttachment",(function(){return G})),t.d(e,"clipboardFileUpload",(function(){return $})),t.d(e,"proxy",(function(){return X})),t.d(e,"datepicker",(function(){return Q})),t.d(e,"scan",(function(){return on})),t.d(e,"chosen",(function(){return dn})),t.d(e,"openSingleWebview",(function(){return ln})),t.d(e,"getSingleWebviewData",(function(){return fn})),t.d(e,"injectScript",(function(){return vn})),t.d(e,"closeWindow",(function(){return gn})),t.d(e,"showCallMenu",(function(){return _t})),t.d(e,"call",(function(){return Ot})),t.d(e,"setIcon",(function(){return Xn})),t.d(e,"setTitle",(function(){return Zn})),t.d(e,"setMenu",(function(){return ee})),t.d(e,"close",(function(){return te})),t.d(e,"replacePage",(function(){return oe})),t.d(e,"quit",(function(){return re})),t.d(e,"setRight",(function(){return ce})),t.d(e,"setTitleExpandIcon",(function(){return pe})),t.d(e,"updateExpandTitle",(function(){return le})),t.d(e,"setLeft",(function(){return me})),t.d(e,"goBack",(function(){return he})),t.d(e,"complexPicker",(function(){return Pe})),t.d(e,"departmentsPicker",(function(){return ze})),t.d(e,"groupComplexPicker",(function(){return Se})),t.d(e,"chooseConversationByCorpId",(function(){return Ie})),t.d(e,"pickConversation",(function(){return Me})),t.d(e,"openSingleChat",(function(){return Ce})),t.d(e,"openTeamChat",(function(){return xe})),t.d(e,"openSquad",(function(){return Ae})),t.d(e,"sendP2PMsg",(function(){return Fe})),t.d(e,"mapView",(function(){return an})),t.d(e,"multipointView",(function(){return cn})),t.d(e,"requestAuthCode",(function(){return We})),t.d(e,"createTab",(function(){return De})),t.d(e,"weeklyShare",(function(){return Ve})),t.d(e,"showPreloader",(function(){return _e})),t.d(e,"hidePreloader",(function(){return Oe})),t.d(e,"vibrate",(function(){return Ne})),t.d(e,"toast",(function(){return He})),t.d(e,"alert",(function(){return Ge})),t.d(e,"confirm",(function(){return Xe})),t.d(e,"getPhoneInfo",(function(){return Je})),t.d(e,"getUUID",(function(){return Tt})),t.d(e,"checkStepPermission",(function(){return Ct})),t.d(e,"getGeolocation",(function(){return Qe})),t.d(e,"getGeolocationSwitch",(function(){return et})),t.d(e,"getLang",(function(){return tt})),t.d(e,"startRecord",(function(){return it})),t.d(e,"stopRecord",(function(){return at})),t.d(e,"onRecordEnd",(function(){return ct})),t.d(e,"downloadAudio",(function(){return dt})),t.d(e,"playAudio",(function(){return lt})),t.d(e,"pauseAudio",(function(){return vt})),t.d(e,"stopAudio",(function(){return gt})),t.d(e,"onPlayEnd",(function(){return bt})),t.d(e,"resumeAudio",(function(){return yt})),t.d(e,"getNetworkType",(function(){return Pt})),t.d(e,"isAtTal",(function(){return St})),t.d(e,"webViewBounceDisable",(function(){return Nt})),t.d(e,"pullToRefreshEnable",(function(){return Ut})),t.d(e,"pullToRefreshStop",(function(){return Yt})),t.d(e,"pullToRefreshDisable",(function(){return Kt})),t.d(e,"getItem",(function(){return $t})),t.d(e,"setItem",(function(){return Zt})),t.d(e,"removeItem",(function(){return no})),t.d(e,"writeLog",(function(){return to})),t.d(e,"flushLog",(function(){return io})),t.d(e,"remind",(function(){return bn})),t.d(e,"takePicture",(function(){return wn})),t.d(e,"datetimepicker",(function(){return en})),t.d(e,"actionSheet",(function(){return qe})),t.d(e,"webViewMessageSend",(function(){return ao})),t.d(e,"talYoungFilesUpload",(function(){return so})),t.d(e,"openVideoPlayer",(function(){return kn})),t.d(e,"openMediaFileDialog",(function(){return Pn})),t.d(e,"mediaFileUpload",(function(){return zn})),t.d(e,"invoice",(function(){return Sn})),t.d(e,"pushWorkMsg",(function(){return In})),t.d(e,"openTalYoungToTopic",(function(){return Tn})),t.d(e,"getToken",(function(){return Cn})),t.d(e,"authStart",(function(){return An})),t.d(e,"authFinish",(function(){return jn})),t.d(e,"openTogetherEyeWebview",(function(){return En})),t.d(e,"getTogetherConfig",(function(){return Wn})),t.d(e,"rouseApp",(function(){return Rn})),t.d(e,"externalLinkPreviewFile",(function(){return _n})),t.d(e,"savePic",(function(){return Nn})),t.d(e,"zfbAuth",(function(){return On})),t.d(e,"complain",(function(){return Hn})),t.d(e,"onRecordEnd_v2",(function(){return At})),t.d(e,"startRecord_v2",(function(){return jt})),t.d(e,"stopRecord_v2",(function(){return Et})),t.d(e,"selectDepartment",(function(){return Un})),t.d(e,"setWindowBig",(function(){return we})),t.d(e,"tencentMeeting",(function(){return ye})),t.d(e,"tencentMeetingBegin",(function(){return ke})),t.d(e,"createModifySchedule",(function(){return Yn})),t.d(e,"setLight",(function(){return Wt})),function(n){n.pc="pc",n.android="android",n.ios="ios",n.notInYach="notInYach"}(o||(o={}));var a=function(){return(a=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)};function s(n){var e=i().version,t=Date.now(),o=a({group:"yach",project:"yach_31_jssdk",env:"test",version:e,timestamp:t},n);console.log("jssdk 项目 bpit 上报数据:",o),r(o)}var c=function(n,e){var t=d(n),o=d(e),i=t.pop(),r=o.pop(),a=v(t,o);return 0!==a?a:i&&r?v(i.split("."),r.split(".")):i||r?i?-1:1:0},u=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,d=function(n){if("string"!=typeof n)throw new TypeError("Invalid argument expected string");var e=n.match(u);if(!e)throw new Error("Invalid argument not valid semver ('"+n+"' received)");return e.shift(),e},p=function(n){return"*"===n||"x"===n||"X"===n},l=function(n){var e=parseInt(n,10);return isNaN(e)?n:e},f=function(n,e){if(p(n)||p(e))return 0;var t=function(n,e){return typeof n!=typeof e?[String(n),String(e)]:[n,e]}(l(n),l(e)),o=t[0],i=t[1];return o>i?1:o<i?-1:0},v=function(n,e){for(var t=0;t<Math.max(n.length,e.length);t++){var o=f(n[t]||"0",e[t]||"0");if(0!==o)return o}return 0},m={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},g=(Object.keys(m),t(0)),h=function(){function n(n){var e=this;this.invokeAPIConfigMapByMethod={},this.configJsApiList=[],this.platformConfigMap={},this.hadConfig=!1,this.bridgeInitFnPromise=null,this.cacheP={},this.config$=new Promise((function(n,t){e.cacheP.resolve=n,e.cacheP.reject=t})),this.env=n,this.exportSdk={version:n.version,sdkVersion:g.version,env:n,platform:n.platform,platformV2:n.platformV2,config:function(n){void 0===n&&(n={});var t=n.jsApiList,o=void 0===t?[]:t;e.hadConfig?console.log("Config has been executed"):e.bridgeInitFn().then((function(t){t("config",n).then((function(n){e.cacheP.resolve(n),e.hadConfig=!0,e.configJsApiList=o})).catch((function(n){e.cacheP.reject(n)}))}))},ready:function(n){e.bridgeInitFn().then((function(){n()}))},error:function(n){e.config$.catch((function(e){n(e)}))},on:function(t,o){e.bridgeInitFn().then((function(){e.platformConfigMap[n.platform].event.on(t,o)}))},off:function(t,o){e.bridgeInitFn().then((function(){e.platformConfigMap[n.platform].event.off(t,o)}))}}}return n.prototype.setAPI=function(n,e){this.invokeAPIConfigMapByMethod[n]=e},n.prototype.setPlatform=function(n){var e=n.platform;n.bridgeInit;this.platformConfigMap[e]=n},n.prototype.bridgeInitFn=function(){if(this.bridgeInitFnPromise)return this.bridgeInitFnPromise;var n=this.platformConfigMap[this.env.platform];if(n)this.bridgeInitFnPromise=n.bridgeInit();else{var e="Do not support the current environment�"+this.env.platform;this.bridgeInitFnPromise=Promise.reject(new Error(e))}return this.bridgeInitFnPromise},n.prototype._onFail=function(n,e,t,o){s({method:n,errorcode:e,message:t}),o&&"function"==typeof o&&o({code:e,message:t})},n.prototype.invokeAPI=function(n,e){if(e||(e={}),n){var t=this.invokeAPIConfigMapByMethod[n];if(!t)return this._onFail(n,"-1","["+n+"] method is not exist",e.onFail);var o=t[this.env.platform];if(o){var i=o.vs||"0.0.0";if(c(this.env.version,i)<0)return this._onFail(n,"-1","The current application version is "+this.env.version+". This method does not support versions less than "+i,e.onFail);var r=o.paramsDeal?o.paramsDeal(e):e;if("function"==typeof r.onSuccess){var a=r.onSuccess;r.onSuccess=function(n){a(n)}}this.bridgeInitFn().then((function(e){e(n,r).then((function(){})).catch((function(n){}))})).catch((function(n){console.log("wenai err",n)}))}else this._onFail(n,"-1","["+n+"] method do not support the current platform ("+this.env.platform+")",e.onFail)}},n}(),b={log:function(){},warn:function(){},error:function(){}};if(window&&window.console&&(b=window.console),document&&document.body){var w=document.createElement("iframe");w&&w.contentWindow&&w.contentWindow.console&&(w.style.display="none",document.body.appendChild(w),b=w.contentWindow.console)}var y=b.log.bind(b),k=(b.warn.bind(b),b.error.bind(b),"color:#fff;font-weight:bold;border-radius:5px;background:#67c23a;");function P(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return y("%c Yach-jssdk log: ",k,n)}var z=new function(){var n=this;this.on=function(e,t){if(!e||"function"!=typeof t)throw"eventName is null or handle is not a function, on fail";Array.isArray(n.eventsHandle[e])||(n.eventsHandle[e]=[]),n.eventsHandle[e].push(t)},this.off=function(e,t){if(!e)throw"eventName is null, invoke off fail";if(t){if(Array.isArray(n.eventsHandle[e])){var o=n.eventsHandle[e].indexOf(t);-1!==o&&n.eventsHandle[e].splice(o,1)}}else n.eventsHandle[e]=[]},this.execEvent=function(n,e){Array.isArray(this.eventsHandle[n])&&this.eventsHandle[n].forEach((function(n){try{n(e)}catch(n){console.error(e)}}))},this.eventsHandle={}},S=function(n,e,t){var o=this;this.genid=function(){var n=Date.now().toString(36);return n+=Math.random().toString(36).substr(3)},this.receiveResponse=function(n){o.callback(n)},this.getPayload=function(){return{msgId:o.id,methodName:o.methodName,body:o.plainMsg,type:"request",invokeType:o.invokeType}},this.id=this.genid(),this.PromiseObj={resolve:null,reject:null},this.methodName=n,this.plainMsg=e,this.invokeType=null==e?void 0:e.invokeType,this.callback=t},I=new function(){var n=this;this.addPending=function(e){n.pendingMsgs[e.id]=e},this.deletePending=function(e){delete n.pendingMsgs[e.id]},this.getPending=function(n){return this.pendingMsgs[n]},this.invokeAPIInBrowserView=function(n){window.sendTo(n)},this.invokeAPIInWebview=function(n){window.sendToHost(n)},this.invokeAPI=function(e,t,o){var i=new S(e,t,o),r=JSON.stringify(i.getPayload()),a=t.invokeType;return"browserView"===(void 0===a?"":a)?n.invokeAPIInBrowserView(r):n.invokeAPIInWebview(r),n.addPending(i),i},this.handleCallback=function(e,t){var o=e.type,i=e.methodName,r=e.eventName,a=e.msgId,s=e.data,c=e.code,u=e.message;if("request"===o)switch(i){case"refresh":window.location.reload();break;case"back":window.history.back();break;case"forward":window.history.forward();break;case"event":z.execEvent(r,s);break;case"zoomInClick":var d=document.documentElement.scrollTop||document.body.scrollTop,p=window.location.href;"browserView"===t?window.sendTo(JSON.stringify({type:o,methodName:i,body:{scrollTopVal:d,url:p,title:s&&s.title}})):window.sendToHost(JSON.stringify({type:o,methodName:i,body:{scrollTopVal:d,url:p,title:s&&s.title}}))}else if("response"===o){var l=n.getPending(a);l&&l.receiveResponse({data:s,code:c,message:u}),-3!=c&&n.deletePending(a)}},this.init=function(){window.addEventListener("message",(function(e){P("electron res: ",e),n.handleCallback(e.data||{})})),window.receiveBrowserViewData&&window.receiveBrowserViewData((function(e,t){return n.handleCallback(t)}))},this.pendingMsgs={}},T=new Map([[0,"onSuccess"],[-1,"onCancel"],[-2,"onFail"],[-3,"onProgress"],[-4,"onSubmit"]]);function M(n){return T.get(n)||"onFail"}var C=function(n,e){return new Promise((function(t){return I.invokeAPI(n,e,(function(o){var i=o.data,r=o.code,a=o.message,c=parseInt(r),u=M(c);-2===c&&s({method:n,errorcode:c,message:a||"SDK执行失败回调,相关参数"});var d=e[u];P("SDK执行后回调,相关参数 ",{method:n,param:e,data:i,_code:c,message:a,callbackFun:d}),"function"==typeof d&&d(i||a),t({_code:c,message:a,data:i})}))}))},x=function(){return(x=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)};function A(n){if(window.WebViewJavascriptBridge)return n(WebViewJavascriptBridge);if(window.WKWebViewJavascriptBridge)return n(WKWebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(n);window.WVJBCallbacks=[n];var e=document.createElement("iframe");e.style.display="none",e.src="https://__bridge_loaded__",document.documentElement.appendChild(e),setTimeout((function(){document.documentElement.removeChild(e)}),0)}var F=function(n,e){return new Promise((function(t,o){var i=x({},e);A((function(r){e.control&&r.registerHandler(n,(function(n){var o=e.onSuccess;delete i.onSuccess,"function"==typeof o&&(o(n),t({code:"0",message:"success"}))})),r.callHandler(n,e,(function(r){var a=r.code,c=r.message,u=r.data,d=parseInt(a),p=M(d);-2!==d&&7!==d||(s({method:n,errorcode:d,message:c||"SDK执行失败回调,相关参数"}),P("SDK执行后回调,相关参数 ",{method:n,param:e,data:u,_code:d,message:c}),o({_code:d,message:c}));var l=i[p];P("SDK执行后回调,相关参数 ",{method:n,param:e,data:u,_code:d,message:c,callbackFun:l}),"function"==typeof l&&l(u||c),t({_code:d,message:c,data:u})}))}))}))},j=function(n,e,t,o){return new(t||(t=Promise))((function(i,r){function a(n){try{c(o.next(n))}catch(n){r(n)}}function s(n){try{c(o.throw(n))}catch(n){r(n)}}function c(n){var e;n.done?i(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(a,s)}c((o=o.apply(n,e||[])).next())}))},D=function(n,e){var t,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(n,a)}catch(n){r=[6,n],o=0}finally{t=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}},E=i(),V=E.platform,W=new h(E);!function(){var n=this,e={platform:V,authMethod:"config",bridgeInit:"pc"===V?function(){return j(n,void 0,void 0,(function(){return D(this,(function(n){return I.init(),[2,C]}))}))}:function(){return new Promise((function(n,e){A((function(e){P("注册resume事件 "),e.registerHandler("resume",(function(n){P("resume监听到回调,相关参数 ",{resData:n}),z.execEvent("resume",n)})),P("注册unreadMsgAction事件 "),e.registerHandler("unreadMsgAction",(function(n){P("unreadMsgAction监听到回调,相关参数 ",{resData:n}),z.execEvent("unreadMsgAction",n)})),P("注册webViewMsgReceive事件 "),e.registerHandler("webViewMsgReceive",(function(n){P("webViewMsgReceive监听到回调,相关参数 ",{resData:n}),z.execEvent("webViewMsgReceive",n)})),e.registerHandler("pushWorkMsg",(function(n){P("pushWorkMsg监听到回调,相关参数 ",{resData:n}),z.execEvent("pushWorkMsg",n)})),e.registerHandler("getTogetherCallback",(function(n){P("getTogetherCallback监听到回调,相关参数 ",{resData:n}),z.execEvent("getTogetherCallback",n)})),e.registerHandler("sendMsgCommon",(function(n){P("sendMsgCommon ",{resData:n}),z.execEvent("sendMsgCommon",n)})),n()}))})).then((function(){return F}))},event:{on:function(n,e){z.on(n,e)},off:function(n,e){z.off(n,e)}}};W.setPlatform(e)}();var R={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};var _=function(n,e){var t=e.params,o=void 0===t?{}:t,i=e.platform,r=void 0===i?R:i;W.setAPI(n,r),W.invokeAPI(n,o)};function B(n){_("biz.util.openLink",{params:n})}function O(n){_("biz.util.feedback",{params:n})}function L(n){_("biz.util.open",{params:n})}var N={pc:{vs:"0.0.0"}};function H(n){_("biz.util.openSlidePanel",{params:n,platform:N})}var U={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function q(n){_("biz.util.share",{params:n,platform:U})}function Y(n){_("biz.util.previewFile",{params:n})}function J(n){_("biz.util.previewImage",{params:n})}function K(n){_("biz.util.downloadFile",{params:n})}function G(n){_("biz.util.uploadAttachment",{params:n})}function $(n){_("biz.util.clipboardFileUpload",{params:n})}function X(n){_("biz.util.proxy",{params:n})}var Z={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Q(n){_("biz.util.datepicker",{params:n,platform:Z})}var nn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function en(n){_("biz.util.datetimepicker",{params:n,platform:nn})}var tn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function on(n){_("biz.util.scan",{params:n,platform:tn})}var rn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function an(n){_("biz.map.view",{params:n,platform:rn})}var sn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function cn(n){_("biz.map.multipointView",{params:n,platform:sn})}var un={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function dn(n){_("biz.util.chosen",{params:n,platform:un})}var pn={pc:{vs:"0.0.0"}};function ln(n){_("biz.util.openSingleWebview",{params:n,platform:pn})}function fn(n){_("biz.util.getSingleWebviewData",{params:n})}function vn(n){_("biz.util.injectScript",{params:n})}var mn={pc:{vs:"0.0.0"}};function gn(n){_("biz.util.closeWindow",{params:n,platform:mn})}var hn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};function bn(n){_("biz.util.remind",{params:n,platform:hn})}function wn(n){_("biz.util.takePicture",{params:n})}var yn={pc:{vs:"0.0.0"},ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function kn(n){_("biz.util.openVideoPlayer",{params:n,platform:yn})}function Pn(n){_("biz.util.openMediaFileDialog",{params:n})}function zn(n){_("biz.util.mediaFileUpload",{params:n})}function Sn(n){_("biz.util.invoice",{params:n})}function In(n){_("biz.util.pushWorkMsg",{params:n})}function Tn(n){_("biz.util.openTalYoungToTopic",{params:n})}var Mn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Cn(n){_("biz.util.getToken",{params:n,platform:Mn})}var xn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function An(n){_("biz.util.authStart",{params:n,platform:xn})}var Fn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function jn(n){_("biz.util.authFinish",{params:n,platform:Fn})}var Dn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};function En(n){_("biz.util.openTogetherEyeWebview",{params:n,platform:Dn})}var Vn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};function Wn(n){_("biz.util.getTogetherConfig",{params:n,platform:Vn})}function Rn(n){_("biz.util.rouseApp",{params:n})}function _n(n){_("biz.util.externalLinkPreviewFile",{params:n})}var Bn={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function On(n){_("biz.util.zfbAuth",{params:n,platform:Bn})}var Ln={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Nn(n){_("biz.util.savePic",{params:n,platform:Ln})}function Hn(n){_("biz.util.complain",{params:n})}function Un(n){_("biz.util.selectDepartment",{params:n})}var qn={pc:{vs:"0.0.0"}};function Yn(n){_("biz.util.createModifySchedule",{params:n,platform:qn})}var Jn=function(){return(Jn=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)};function Kn(n){return function(e){return Jn(Jn({},n),e)}}var Gn=Kn({control:!0,showIcon:!0,iconIndex:1}),$n={ios:{vs:"0.0.0",paramsDeal:Gn},android:{vs:"0.0.0",paramsDeal:Gn}};function Xn(n){_("biz.navigation.setIcon",{params:n,platform:$n})}function Zn(n){_("biz.navigation.setTitle",{params:n})}var Qn=Kn({control:!0}),ne={ios:{vs:"0.0.0",paramsDeal:Qn},android:{vs:"0.0.0",paramsDeal:Qn}};function ee(n){_("biz.navigation.setMenu",{params:n,platform:ne})}function te(n){_("biz.navigation.close",{params:n})}function oe(n){_("biz.navigation.replace",{params:n})}var ie={pc:{vs:"0.0.0"}};function re(n){_("biz.navigation.quit",{params:n,platform:ie})}var ae=Kn({show:!0,control:!1,text:""}),se={ios:{vs:"0.0.0",paramsDeal:ae},android:{vs:"0.0.0",paramsDeal:ae},pc:{vs:"0.0.0"}};function ce(n){_("biz.navigation.setRight",{params:n,platform:se})}var ue=Kn({control:!0}),de={ios:{vs:"0.0.0",paramsDeal:ue},android:{vs:"0.0.0",paramsDeal:ue}};function pe(n){_("biz.navigation.setTitleExpandIcon",{params:n,platform:de})}function le(n){_("biz.navigation.updateExpandTitle",{params:n})}var fe=Kn({show:!0,control:!1,text:""}),ve={ios:{vs:"0.0.0",paramsDeal:fe},android:{vs:"0.0.0",paramsDeal:fe},pc:{vs:"0.0.0"}};function me(n){_("biz.navigation.setLeft",{params:n,platform:ve})}var ge={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function he(n){_("biz.navigation.goBack",{params:n,platform:ge})}var be={pc:{vs:"0.0.0"}};function we(n){_("biz.navigation.setWindowBig",{params:n,platform:be})}function ye(n){_("biz.navigation.tencentMeeting",{params:n})}function ke(n){_("biz.navigation.tencentMeetingBegin",{params:n})}function Pe(n){_("biz.contact.complexPicker",{params:n})}function ze(n){_("biz.contact.departmentsPicker",{params:n})}function Se(n){_("biz.group.groupComplexPicker",{params:n})}function Ie(n){_("biz.chat.chooseConversationByCorpId",{params:n})}var Te={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Me(n){_("biz.chat.pickConversation",{params:n,platform:Te})}function Ce(n){_("biz.chat.openSingleChat",{params:n})}function xe(n){_("biz.chat.openTeamChat",{params:n})}function Ae(n){_("biz.chat.openSquad",{params:n})}function Fe(n){_("biz.chat.sendP2PMsg",{params:n})}var je={pc:{vs:"0.0.0"}};function De(n){_("primary.createTab",{params:n,platform:je})}var Ee={pc:{vs:"0.0.0"}};function Ve(n){_("primary.weeklyShare",{params:n,platform:Ee})}function We(n){_("runtime.permission.requestAuthCode",{params:n})}var Re={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function _e(n){_("device.notification.showPreloader",{params:n,platform:Re})}var Be={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Oe(n){_("device.notification.hidePreloader",{params:n,platform:Be})}var Le={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Ne(n){_("device.notification.vibrate",{params:n,platform:Le})}function He(n){_("device.notification.toast",{params:n})}var Ue={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function qe(n){_("device.notification.actionSheet",{params:n,platform:Ue})}var Ye={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Je(n){_("device.base.getPhoneInfo",{params:n,platform:Ye})}var Ke={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};function Ge(n){_("device.notification.alert",{params:n,platform:Ke})}var $e={ios:{vs:"0.0.0"},android:{vs:"0.0.0"},pc:{vs:"0.0.0"}};function Xe(n){_("device.notification.confirm",{params:n,platform:$e})}var Ze={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Qe(n){_("device.geolocation.get",{params:n,platform:Ze})}var nt={android:{vs:"0.0.0"}};function et(n){_("device.geolocation.getSwitch",{params:n,platform:nt})}function tt(n){_("device.system.getLang",{params:n})}var ot={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function it(n){_("device.audio.startRecord",{params:n,platform:ot})}var rt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function at(n){_("device.audio.stopRecord",{params:n,platform:rt})}var st={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function ct(n){_("device.audio.onRecordEnd",{params:n,platform:st})}var ut={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function dt(n){_("device.audio.download",{params:n,platform:ut})}var pt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function lt(n){_("device.audio.play",{params:n,platform:pt})}var ft={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function vt(n){_("device.audio.pause",{params:n,platform:ft})}var mt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function gt(n){_("device.audio.stop",{params:n,platform:mt})}var ht={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function bt(n){_("device.audio.onPlayEnd",{params:n,platform:ht})}var wt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function yt(n){_("device.audio.resume",{params:n,platform:wt})}var kt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Pt(n){_("device.connection.getNetworkType",{params:n,platform:kt})}var zt={pc:{vs:"0.0.0"}};function St(n){_("device.connection.isAtTal",{params:n,platform:zt})}var It={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Tt(n){_("device.base.getUUID",{params:n,platform:It})}var Mt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Ct(n){_("device.base.checkStepPermission",{params:n,platform:Mt})}var xt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function At(n){_("device.audio.onRecordEnd_v2",{params:n,platform:xt})}var Ft={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function jt(n){_("device.audio.startRecord_v2",{params:n,platform:Ft})}var Dt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Et(n){_("device.audio.stopRecord_v2",{params:n,platform:Dt})}var Vt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Wt(n){_("device.system.setLight",{params:n,platform:Vt})}var Rt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function _t(n){_("biz.telephone.showCallMenu",{params:n,platform:Rt})}var Bt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Ot(n){_("biz.telephone.call",{params:n,platform:Bt})}var Lt={ios:{vs:"0.0.0"}};function Nt(n){_("ui.webViewBounce.disable",{params:n,platform:Lt})}var Ht={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Ut(n){_("ui.pullToRefresh.enable",{params:n,platform:Ht})}var qt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Yt(n){_("ui.pullToRefresh.stop",{params:n,platform:qt})}var Jt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Kt(n){_("ui.pullToRefresh.disable",{params:n,platform:Jt})}var Gt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function $t(n){_("util.domainStorage.getItem",{params:n,platform:Gt})}var Xt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function Zt(n){_("util.domainStorage.setItem",{params:n,platform:Xt})}var Qt={ios:{vs:"0.0.0"},android:{vs:"0.0.0"}};function no(n){_("util.domainStorage.removeItem",{params:n,platform:Qt})}var eo={pc:{vs:"1.7.0"}};function to(n){_("util.tool.writeLog",{params:n,platform:eo})}var oo={pc:{vs:"1.7.0"}};function io(n){_("util.tool.flushLog",{params:n,platform:oo})}var ro={ios:{vs:"0.0.0"}};function ao(n){_("biz.webViewMessage.send",{params:n,platform:ro})}function so(n){_("app.custom.talYoungFilesUpload",{params:n})}console.log("add rouseApp ------------\x3e",Rn);var co=W.exportSdk,uo=co.version,po=co.sdkVersion,lo=co.env,fo=co.platform,vo=co.platformV2,mo=co.config,go=co.ready,ho=co.error,bo=co.on,wo=co.off;e.default={version:uo,sdkVersion:po,env:lo,platform:fo,platformV2:vo,config:mo,ready:go,error:ho,on:bo,off:wo,biz:{util:{openLink:B,feedback:O,open:L,openSlidePanel:H,share:q,previewFile:Y,previewImage:J,downloadFile:K,uploadAttachment:G,clipboardFileUpload:$,proxy:X,datepicker:Q,datetimepicker:en,scan:on,chosen:dn,openSingleWebview:ln,getSingleWebviewData:fn,injectScript:vn,closeWindow:gn,remind:bn,takePicture:wn,openVideoPlayer:kn,openMediaFileDialog:Pn,mediaFileUpload:zn,invoice:Sn,pushWorkMsg:In,openTalYoungToTopic:Tn,getToken:Cn,authStart:An,authFinish:jn,openTogetherEyeWebview:En,getTogetherConfig:Wn,rouseApp:Rn,externalLinkPreviewFile:_n,savePic:Nn,zfbAuth:On,complain:Hn,selectDepartment:Un,createModifySchedule:Yn},telephone:{showCallMenu:_t,call:Ot},navigation:{setIcon:Xn,setTitle:Zn,setMenu:ee,close:te,replace:oe,quit:re,setRight:ce,setTitleExpandIcon:pe,updateExpandTitle:le,setLeft:me,goBack:he,setWindowBig:we,tencentMeeting:ye,tencentMeetingBegin:ke},contact:{complexPicker:Pe,departmentsPicker:ze},group:{groupComplexPicker:Se},chat:{chooseConversationByCorpId:Ie,pickConversation:Me,openSingleChat:Ce,openTeamChat:xe,openSquad:Ae,sendP2PMsg:Fe},map:{view:an,multipointView:cn},webViewMessage:{send:ao}},runtime:{permission:{requestAuthCode:We}},primary:{createTab:De,weeklyShare:Ve},device:{notification:{showPreloader:_e,hidePreloader:Oe,vibrate:Ne,toast:He,alert:Ge,confirm:Xe,actionSheet:qe},base:{getPhoneInfo:Je,getUUID:Tt,checkStepPermission:Ct},geolocation:{get:Qe,getSwitch:et},system:{getLang:tt,setLight:Wt},audio:{startRecord:it,stopRecord:at,onRecordEnd:ct,download:dt,play:lt,pause:vt,stop:gt,onPlayEnd:bt,resume:yt,onRecordEnd_v2:At,startRecord_v2:jt,stopRecord_v2:Et},connection:{getNetworkType:Pt,isAtTal:St}},ui:{webViewBounce:{disable:Nt},pullToRefresh:{enable:Ut,stop:Yt,disable:Kt}},util:{domainStorage:{getItem:$t,setItem:Zt,removeItem:no},tool:{writeLog:to,flushLog:io}},app:{custom:{talYoungFilesUpload:so}}}}]).default;
@@ -0,0 +1,16 @@
1
+ import { IError } from '../../common.typings';
2
+ interface IBizNavigationGetTencentMeetingUrl {
3
+ urlWithLoginState: string;
4
+ }
5
+ export interface IBizNavigationTencentMeetingParams {
6
+ /** 腾讯会议录制链接 */
7
+ url: string;
8
+ meeting_id: number;
9
+ meeting_record_id: string;
10
+ title: string;
11
+ start_time: string;
12
+ onSuccess?: (data: IBizNavigationGetTencentMeetingUrl) => void;
13
+ onFail?: (err: IError) => void;
14
+ }
15
+ declare function tencentMeeting(params?: IBizNavigationTencentMeetingParams): void;
16
+ export { tencentMeeting };
@@ -0,0 +1,10 @@
1
+ import initAPI from '../../initAPI';
2
+ var apiName = 'biz.navigation.tencentMeeting';
3
+
4
+ function tencentMeeting(params) {
5
+ initAPI(apiName, {
6
+ params: params
7
+ });
8
+ }
9
+
10
+ export { tencentMeeting };
@@ -0,0 +1,7 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IBizNavigationTencentMeetingBeginParams {
3
+ onSuccess?: () => void;
4
+ onFail?: (err: IError) => void;
5
+ }
6
+ declare function tencentMeetingBegin(params?: IBizNavigationTencentMeetingBeginParams): void;
7
+ export { tencentMeetingBegin };
@@ -0,0 +1,10 @@
1
+ import initAPI from '../../initAPI';
2
+ var apiName = 'biz.navigation.tencentMeetingBegin';
3
+
4
+ function tencentMeetingBegin(params) {
5
+ initAPI(apiName, {
6
+ params: params
7
+ });
8
+ }
9
+
10
+ export { tencentMeetingBegin };
@@ -0,0 +1,9 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IBizUtilInjectScriptParams {
3
+ /** 注入脚本内容 */
4
+ script: String;
5
+ onSuccess?: () => void;
6
+ onFail?: (err: IError) => void;
7
+ }
8
+ declare function injectScript(params?: IBizUtilInjectScriptParams): void;
9
+ export { injectScript };
@@ -0,0 +1,10 @@
1
+ import initAPI from '../../initAPI';
2
+ var apiName = 'biz.util.injectScript';
3
+
4
+ function injectScript(params) {
5
+ initAPI(apiName, {
6
+ params: params
7
+ });
8
+ }
9
+
10
+ export { injectScript };
@@ -0,0 +1,7 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IUtilFlushLogParams {
3
+ onSuccess?: () => void;
4
+ onFail?: (err: IError) => void;
5
+ }
6
+ declare function flushLog(params: IUtilFlushLogParams): void;
7
+ export { flushLog };
@@ -0,0 +1,17 @@
1
+ import initAPI from '../../initAPI';
2
+ var apiName = 'util.tool.flushLog';
3
+ var pc = {
4
+ vs: '1.7.0'
5
+ };
6
+ var platform = {
7
+ pc: pc
8
+ };
9
+
10
+ function flushLog(params) {
11
+ initAPI(apiName, {
12
+ params: params,
13
+ platform: platform
14
+ });
15
+ }
16
+
17
+ export { flushLog };
@@ -0,0 +1,9 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IUtilToolLogParams {
3
+ module: string;
4
+ logStr: string;
5
+ onSuccess?: () => void;
6
+ onFail?: (err: IError) => void;
7
+ }
8
+ declare function writeLog(params: IUtilToolLogParams): void;
9
+ export { writeLog };
@@ -0,0 +1,17 @@
1
+ import initAPI from '../../initAPI';
2
+ var apiName = 'util.tool.writeLog';
3
+ var pc = {
4
+ vs: '1.7.0'
5
+ };
6
+ var platform = {
7
+ pc: pc
8
+ };
9
+
10
+ function writeLog(params) {
11
+ initAPI(apiName, {
12
+ params: params,
13
+ platform: platform
14
+ });
15
+ }
16
+
17
+ export { writeLog };
package/es/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import { multipointView } from './api/biz/map/multipointView';
18
18
  import { chosen } from './api/biz/util/chosen';
19
19
  import { openSingleWebview } from './api/biz/util/openSingleWebview';
20
20
  import { getSingleWebviewData } from './api/biz/util/getSingleWebviewData';
21
+ import { injectScript } from './api/biz/util/injectScript';
21
22
  import { closeWindow } from './api/biz/util/closeWindow';
22
23
  import { remind } from './api/biz/util/remind';
23
24
  import { takePicture } from './api/biz/util/takePicture';
@@ -52,6 +53,8 @@ import { updateExpandTitle } from './api/biz/navigation/updateExpandTitle';
52
53
  import { setLeft } from './api/biz/navigation/setLeft';
53
54
  import { goBack } from './api/biz/navigation/goBack';
54
55
  import { setWindowBig } from './api/biz/navigation/setWindowBig';
56
+ import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
57
+ import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
55
58
  /**contact*/
56
59
  import { complexPicker } from './api/biz/contact/complexPicker';
57
60
  import { departmentsPicker } from './api/biz/contact/departmentsPicker';
@@ -107,10 +110,12 @@ import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable'
107
110
  import { getItem } from './api/util/domainStorage/getItem';
108
111
  import { setItem } from './api/util/domainStorage/setItem';
109
112
  import { removeItem } from './api/util/domainStorage/removeItem';
113
+ import { writeLog } from './api/util/tool/log';
114
+ import { flushLog } from './api/util/tool/flushLog';
110
115
  import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
111
116
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
112
117
  declare const version: string, sdkVersion: string, env: import("./lib/sdk/sdk.typings").IENV, platform: import("./lib/sdk/sdk.typings").ENV_ENUM, platformV2: import("./lib/sdk/sdk.typings").PlatformV2Props, config: (configParams: import("./lib/sdk/sdk.typings").IConfigParams) => void, ready: (readyCallback: () => void) => void, error: (callback: (err: any) => void) => void, on: (methodName: string, listener: (e: any) => void) => void, off: (methodName: string, listener: (e: any) => void) => void;
113
- export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, createModifySchedule, setLight, };
118
+ export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, setLight, };
114
119
  declare const _default: {
115
120
  version: string;
116
121
  sdkVersion: string;
@@ -141,6 +146,7 @@ declare const _default: {
141
146
  chosen: typeof chosen;
142
147
  openSingleWebview: typeof openSingleWebview;
143
148
  getSingleWebviewData: typeof getSingleWebviewData;
149
+ injectScript: typeof injectScript;
144
150
  closeWindow: typeof closeWindow;
145
151
  remind: typeof remind;
146
152
  takePicture: typeof takePicture;
@@ -180,6 +186,8 @@ declare const _default: {
180
186
  setLeft: typeof setLeft;
181
187
  goBack: typeof goBack;
182
188
  setWindowBig: typeof setWindowBig;
189
+ tencentMeeting: typeof tencentMeeting;
190
+ tencentMeetingBegin: typeof tencentMeetingBegin;
183
191
  };
184
192
  contact: {
185
193
  complexPicker: typeof complexPicker;
@@ -271,6 +279,10 @@ declare const _default: {
271
279
  setItem: typeof setItem;
272
280
  removeItem: typeof removeItem;
273
281
  };
282
+ tool: {
283
+ writeLog: typeof writeLog;
284
+ flushLog: typeof flushLog;
285
+ };
274
286
  };
275
287
  app: {
276
288
  custom: {
package/es/index.js CHANGED
@@ -22,6 +22,7 @@ import { multipointView } from './api/biz/map/multipointView';
22
22
  import { chosen } from './api/biz/util/chosen';
23
23
  import { openSingleWebview } from './api/biz/util/openSingleWebview';
24
24
  import { getSingleWebviewData } from './api/biz/util/getSingleWebviewData';
25
+ import { injectScript } from './api/biz/util/injectScript';
25
26
  import { closeWindow } from './api/biz/util/closeWindow';
26
27
  import { remind } from './api/biz/util/remind';
27
28
  import { takePicture } from './api/biz/util/takePicture';
@@ -57,6 +58,8 @@ import { updateExpandTitle } from './api/biz/navigation/updateExpandTitle';
57
58
  import { setLeft } from './api/biz/navigation/setLeft';
58
59
  import { goBack } from './api/biz/navigation/goBack';
59
60
  import { setWindowBig } from './api/biz/navigation/setWindowBig';
61
+ import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
62
+ import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
60
63
  /**contact*/
61
64
 
62
65
  import { complexPicker } from './api/biz/contact/complexPicker';
@@ -122,7 +125,10 @@ import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable'
122
125
 
123
126
  import { getItem } from './api/util/domainStorage/getItem';
124
127
  import { setItem } from './api/util/domainStorage/setItem';
125
- import { removeItem } from './api/util/domainStorage/removeItem';
128
+ import { removeItem } from './api/util/domainStorage/removeItem'; // log
129
+
130
+ import { writeLog } from './api/util/tool/log';
131
+ import { flushLog } from './api/util/tool/flushLog';
126
132
  import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
127
133
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
128
134
  console.log('add rouseApp ------------>', rouseApp);
@@ -137,7 +143,7 @@ var _yachSdk$exportSdk = yachSdk.exportSdk,
137
143
  error = _yachSdk$exportSdk.error,
138
144
  on = _yachSdk$exportSdk.on,
139
145
  off = _yachSdk$exportSdk.off;
140
- export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, createModifySchedule, setLight };
146
+ export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, setLight };
141
147
  export default {
142
148
  version: version,
143
149
  sdkVersion: sdkVersion,
@@ -168,6 +174,7 @@ export default {
168
174
  chosen: chosen,
169
175
  openSingleWebview: openSingleWebview,
170
176
  getSingleWebviewData: getSingleWebviewData,
177
+ injectScript: injectScript,
171
178
  closeWindow: closeWindow,
172
179
  remind: remind,
173
180
  takePicture: takePicture,
@@ -206,7 +213,9 @@ export default {
206
213
  updateExpandTitle: updateExpandTitle,
207
214
  setLeft: setLeft,
208
215
  goBack: goBack,
209
- setWindowBig: setWindowBig
216
+ setWindowBig: setWindowBig,
217
+ tencentMeeting: tencentMeeting,
218
+ tencentMeetingBegin: tencentMeetingBegin
210
219
  },
211
220
  contact: {
212
221
  complexPicker: complexPicker,
@@ -297,6 +306,10 @@ export default {
297
306
  getItem: getItem,
298
307
  setItem: setItem,
299
308
  removeItem: removeItem
309
+ },
310
+ tool: {
311
+ writeLog: writeLog,
312
+ flushLog: flushLog
300
313
  }
301
314
  },
302
315
  app: {
@@ -1,7 +1,7 @@
1
- import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
2
- import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
3
- import _Promise from "@babel/runtime-corejs3/core-js/promise";
4
1
  import _setTimeout from "@babel/runtime-corejs3/core-js/set-timeout";
2
+ import _Promise from "@babel/runtime-corejs3/core-js/promise";
3
+ import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
4
+ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
5
5
  import Event from '../helper/event';
6
6
  import { electronResCodeMap } from '../helper/codeMap';
7
7
  import { log, bpitLog } from '../../utils';
@@ -1,5 +1,5 @@
1
- import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
2
1
  import _Promise from "@babel/runtime-corejs3/core-js/promise";
2
+ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
3
3
  import PcIframe from '../helper/pcIframe';
4
4
  import { electronResCodeMap } from '../helper/codeMap';
5
5
  import { log, bpitLog } from '../../utils';
@@ -1,10 +1,11 @@
1
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
2
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
3
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
4
- import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
1
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
+ import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
4
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
5
+ import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
6
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
6
7
 
7
- var Event = function Event() {
8
+ var Event = /*#__PURE__*/_createClass(function Event() {
8
9
  var _this = this;
9
10
 
10
11
  _classCallCheck(this, Event);
@@ -46,7 +47,7 @@ var Event = function Event() {
46
47
  };
47
48
 
48
49
  this.eventsHandle = {};
49
- };
50
+ });
50
51
 
51
52
  var event = new Event();
52
53
  export default event;
@@ -1,10 +1,11 @@
1
- import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
2
- import _Date$now from "@babel/runtime-corejs3/core-js/date/now";
1
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
3
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
+ import _Date$now from "@babel/runtime-corejs3/core-js/date/now";
4
+ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
4
5
  import { log } from '../../utils';
5
6
  import Event from './event'; // 处理posmessage参数
6
7
 
7
- var GenPostMsg = function GenPostMsg(method, param, callback) {
8
+ var GenPostMsg = /*#__PURE__*/_createClass(function GenPostMsg(method, param, callback) {
8
9
  var _this = this;
9
10
 
10
11
  _classCallCheck(this, GenPostMsg);
@@ -47,9 +48,9 @@ var GenPostMsg = function GenPostMsg(method, param, callback) {
47
48
  // };
48
49
  // }.bind(this)
49
50
  // );
50
- };
51
+ });
51
52
 
52
- var Frame = function Frame() {
53
+ var Frame = /*#__PURE__*/_createClass(function Frame() {
53
54
  var _this2 = this;
54
55
 
55
56
  _classCallCheck(this, Frame);
@@ -172,7 +173,7 @@ var Frame = function Frame() {
172
173
  };
173
174
 
174
175
  this.pendingMsgs = {};
175
- };
176
+ });
176
177
 
177
178
  var frame = new Frame();
178
179
  export default frame;
@@ -13,6 +13,7 @@ declare class Sdk {
13
13
  setAPI(method: string, config: IInvokeAPIConfigMap): void;
14
14
  setPlatform(value: IPlatformConfig): void;
15
15
  bridgeInitFn(): any;
16
+ _onFail(method: any, errorcode: any, message: any, onFail: any): void;
16
17
  invokeAPI(method: string, params?: any): void;
17
18
  }
18
19
  export default Sdk;
@@ -1,8 +1,10 @@
1
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
2
- import _Promise from "@babel/runtime-corejs3/core-js/promise";
3
1
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
2
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
3
+ import _Promise from "@babel/runtime-corejs3/core-js/promise";
4
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
5
5
  import { bpitLog } from '../../utils';
6
+ import { compareVersions } from '../../utils/compareVersions';
7
+ import packageInfo from '../../../package.json';
6
8
 
7
9
  var Sdk = /*#__PURE__*/function () {
8
10
  function Sdk(env) {
@@ -23,7 +25,7 @@ var Sdk = /*#__PURE__*/function () {
23
25
  this.env = env;
24
26
  this.exportSdk = {
25
27
  version: env.version,
26
- sdkVersion: require('../../../package.json').version,
28
+ sdkVersion: packageInfo.version,
27
29
  // sdkVersion: '0.0.0',
28
30
  env: env,
29
31
  platform: env.platform,
@@ -107,31 +109,45 @@ var Sdk = /*#__PURE__*/function () {
107
109
 
108
110
  return this.bridgeInitFnPromise;
109
111
  }
112
+ }, {
113
+ key: "_onFail",
114
+ value: function _onFail(method, errorcode, message, onFail) {
115
+ bpitLog({
116
+ method: method,
117
+ errorcode: errorcode,
118
+ message: message
119
+ });
120
+ onFail && typeof onFail == 'function' && onFail({
121
+ code: errorcode,
122
+ message: message
123
+ });
124
+ }
110
125
  }, {
111
126
  key: "invokeAPI",
112
127
  value: function invokeAPI(method, params) {
128
+ var _context2;
129
+
113
130
  if (!params) params = {};
114
131
  if (!method) return; // 验证方法是否可用
115
132
 
116
133
  var apiConfigs = this.invokeAPIConfigMapByMethod[method];
117
134
 
118
135
  if (!apiConfigs) {
119
- bpitLog({
120
- method: method,
121
- errorcode: '-1',
122
- message: "".concat(method, " do not exist")
123
- });
124
- params.onFail({
125
- code: '-1',
126
- message: "".concat(method, " do not exist")
127
- });
128
- return;
136
+ return this._onFail(method, '-1', "[".concat(method, "] method is not exist"), params.onFail);
129
137
  }
130
138
 
131
139
  var apiConfig = apiConfigs[this.env.platform];
132
140
 
133
141
  if (apiConfig) {
134
- // 确定参数
142
+ var supportVersion = apiConfig.vs || '0.0.0';
143
+
144
+ if (compareVersions(this.env.version, supportVersion) < 0) {
145
+ var _context;
146
+
147
+ return this._onFail(method, '-1', _concatInstanceProperty(_context = "The current application version is ".concat(this.env.version, ". This method does not support versions less than ")).call(_context, supportVersion), params.onFail);
148
+ } // 确定参数
149
+
150
+
135
151
  var p = apiConfig.paramsDeal ? apiConfig.paramsDeal(params) : params; // 确定回调
136
152
 
137
153
  if ('function' == typeof p.onSuccess) {
@@ -153,20 +169,7 @@ var Sdk = /*#__PURE__*/function () {
153
169
  return;
154
170
  }
155
171
 
156
- if ('function' == typeof params.onFail) {
157
- var _context, _context2;
158
-
159
- bpitLog({
160
- method: method,
161
- errorcode: '-1',
162
- message: _concatInstanceProperty(_context = "".concat(method, " do not support the current platform (")).call(_context, this.env.platform, ")")
163
- });
164
- params.onFail({
165
- code: '-1',
166
- message: _concatInstanceProperty(_context2 = "".concat(method, " do not support the current platform (")).call(_context2, this.env.platform, ")")
167
- });
168
- } // console.log(`${method} do not support the current platform (${this.env.platform})`);
169
-
172
+ this._onFail(method, '-1', _concatInstanceProperty(_context2 = "[".concat(method, "] method do not support the current platform (")).call(_context2, this.env.platform, ")"), params.onFail);
170
173
  }
171
174
  }]);
172
175
 
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.
3
+ * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.
4
+ * @param v1 - First version to compare
5
+ * @param v2 - Second version to compare
6
+ * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).
7
+ */
8
+ export declare const compareVersions: (v1: string, v2: string) => 0 | 1 | -1;
9
+ /**
10
+ * Validate [semver](https://semver.org/) version strings.
11
+ *
12
+ * @param version Version number to validate
13
+ * @returns `true` if the version number is a valid semver version number, `false` otherwise.
14
+ *
15
+ * @example
16
+ * ```
17
+ * validate('1.0.0-rc.1'); // return true
18
+ * validate('1.0-rc.1'); // return false
19
+ * validate('foo'); // return false
20
+ * ```
21
+ */
22
+ export declare const validate: (version: string) => boolean;
23
+ /**
24
+ * Allowed arithmetic operators
25
+ */
26
+ export declare type CompareOperator = '>' | '>=' | '=' | '<' | '<=';
27
+ /**
28
+ * Compare [semver](https://semver.org/) version strings using the specified operator.
29
+ *
30
+ * @param v1 First version to compare
31
+ * @param v2 Second version to compare
32
+ * @param operator Allowed arithmetic operator to use
33
+ * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.
34
+ *
35
+ * @example
36
+ * ```
37
+ * compare('10.1.8', '10.0.4', '>'); // return true
38
+ * compare('10.0.1', '10.0.1', '='); // return true
39
+ * compare('10.1.1', '10.2.2', '<'); // return true
40
+ * compare('10.1.1', '10.2.2', '<='); // return true
41
+ * compare('10.1.1', '10.2.2', '>='); // return false
42
+ * ```
43
+ */
44
+ export declare const compare: (v1: string, v2: string, operator: CompareOperator) => boolean;
45
+ /**
46
+ * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.
47
+ *
48
+ * @param version Version number to match
49
+ * @param range Range pattern for version
50
+ * @returns `true` if the version number is within the range, `false` otherwise.
51
+ *
52
+ * @example
53
+ * ```
54
+ * satisfies('1.1.0', '^1.0.0'); // return true
55
+ * satisfies('1.1.0', '~1.0.0'); // return false
56
+ * ```
57
+ */
58
+ export declare const satisfies: (version: string, range: string) => boolean;