hylid-bridge 4.0.21 → 4.0.22

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 (41) hide show
  1. package/lib/bridges.js +8 -16
  2. package/lib/clients/web/demo/getStorage.d.ts +1 -1
  3. package/lib/clients/web/demo/getStorage.js +1 -1
  4. package/lib/clients/web/demo/index.d.ts +23 -23
  5. package/lib/clients/web/demo/index.js +10 -10
  6. package/lib/clients/web/demo/request.d.ts +1 -1
  7. package/lib/clients/web/demo/request.js +1 -1
  8. package/lib/clients/web/demo/setNavigationBar.d.ts +1 -1
  9. package/lib/clients/web/demo/setNavigationBar.js +1 -1
  10. package/lib/clients/web/demo/setStorage.d.ts +1 -1
  11. package/lib/clients/web/demo/setStorage.js +1 -1
  12. package/lib/common/apis/generated/web/getStorage.d.ts +11 -0
  13. package/lib/common/apis/generated/web/getStorage.js +14 -0
  14. package/lib/common/apis/generated/web/request.d.ts +39 -0
  15. package/lib/common/apis/generated/web/request.js +14 -0
  16. package/lib/common/apis/generated/web/setNavigationBar.d.ts +9 -0
  17. package/lib/common/apis/generated/web/setNavigationBar.js +14 -0
  18. package/lib/common/apis/generated/web/setStorage.d.ts +9 -0
  19. package/lib/common/apis/generated/web/setStorage.js +14 -0
  20. package/lib/umd/index.js +1 -1
  21. package/lib/umd/mp_web_alipay.js +1 -1
  22. package/lib/umd/mp_web_mpay.js +1 -1
  23. package/lib/umd/web_alipay.js +1 -1
  24. package/lib/umd/web_demo.js +1 -1
  25. package/package.json +6 -8
  26. package/lib/clients/web/alipay/getStorage.d.ts +0 -2
  27. package/lib/clients/web/alipay/getStorage.js +0 -3
  28. package/lib/clients/web/alipay/request.d.ts +0 -2
  29. package/lib/clients/web/alipay/request.js +0 -3
  30. package/lib/clients/web/alipay/setNavigationBar.d.ts +0 -2
  31. package/lib/clients/web/alipay/setNavigationBar.js +0 -3
  32. package/lib/clients/web/alipay/setStorage.d.ts +0 -2
  33. package/lib/clients/web/alipay/setStorage.js +0 -3
  34. package/lib/common/apis/custom/web/getStorage.d.ts +0 -3
  35. package/lib/common/apis/custom/web/getStorage.js +0 -3
  36. package/lib/common/apis/custom/web/request.d.ts +0 -3
  37. package/lib/common/apis/custom/web/request.js +0 -3
  38. package/lib/common/apis/custom/web/setNavigationBar.d.ts +0 -3
  39. package/lib/common/apis/custom/web/setNavigationBar.js +0 -3
  40. package/lib/common/apis/custom/web/setStorage.d.ts +0 -3
  41. package/lib/common/apis/custom/web/setStorage.js +0 -3
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.my=e():t.my=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t,e,n){!function(t){if(window.AlipayJSBridge)return t();document.addEventListener("AlipayJSBridgeReady",(function(){return t()}),!1)}((function(){var i=(n||{}).type,r=void 0===i?"async":i;"async"===r&&window.AlipayJSBridge.call(t,e,(function(t){var n=e||{},i=n.success,r=n.fail,o=n.complete;t.error||t.errorCode?null==r||r(t):null==i||i(t),null==o||o(t)})),"callback"===r&&window.AlipayJSBridge.call(t,e)}))}t.d(e,{default:()=>gn});function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var o=["content","buttonText"];function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var s=["confirmButtonText","cancelButtonText","content"];function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var p=["format","currentDate","startDate","endDate"];function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u={"HH:mm:ss":0,"yyyy-MM-dd":1,"yyyy-MM-dd HH:mm:ss":2};var f=["url"];function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var d=[{type:"image",exts:["jpg","jpeg","png","bmp","gif"]},{type:"video",exts:["mp4","3gp","avi","wmv"]},{type:"audio",exts:["mp3","wma","wav"]}];var y=["scopes"];function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var m=["type"];function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var b=["success"];function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function _(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function k(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push([n,t[n]]);return e}var C,S,A,w,x,j,T,M=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"isString",value:function(t){return"string"==typeof t}},{key:"isFunction",value:function(t){return"function"==typeof t}},{key:"isNotEmpty",value:function(t){return t&&t.length>0}},{key:"isEmpty",value:function(e){return!t.isNotEmpty(e)}},{key:"parseObjectSafe",value:function(t,e){try{return JSON.parse(t)}catch(t){console.warn("parseObjectSafe error: ",t)}return e}},{key:"encodeMap",value:function(t){if(t){var e=[];return k(t).forEach((function(t){var n=t[0],i=t[1];null!=i&&e.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i)))})),e.length>0?e.join("&"):void 0}}}],null&&_(e.prototype,null),n&&_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function D(){var t,e=null===(t=w)||void 0===t?void 0:t.siteName;return M.isNotEmpty(e)?e:(e=(x||(x=function(){var t={};k(N(window.location.search)).forEach((function(e){var n=e[0],i=e[1],r=n.toLowerCase();if("query"===r)try{t.query=N(i)}catch(t){console.warn("parse query error: ",t)}else"referrerinfo"===r?t.referrerInfo=N(i):t[n]=i}));var e=window.location.hash;if(e){var n=e.indexOf("?");t.hashPath=n>0?e.substring(1,n):e.substring(1),t.hashQuery=N(e)}return t}()),x).site,M.isNotEmpty(e)?e:void console.error("no siteName! please specify siteName in initWebPolyfill(...)"))}function N(t){var e,n={};if(M.isEmpty(t))return n;var i=t.indexOf("?");return i>=0&&(t=t.substring(i+1)),null===(e=t.split("&"))||void 0===e||e.forEach((function(t){var e=t.split("=");if(!(e.length<2)){var i=decodeURIComponent(e[0]);n[i]=decodeURIComponent(e[1])}})),n}!function(t){t.EASYPAISA="EASYPAISA",t.TRUEMONEY="TRUEMONEY",t.KAKAOPAY="KAKAOPAY",t.BKASH="BKASH",t.ALIPAY_CN="ALIPAY_CN",t.ALIPAY_HK="ALIPAY_HK",t.ALIPAY_MO="ALIPAY_MO",t.GCASH="GCASH",t.TNG="TNG",t.DANA="DANA"}(C||(C={})),(A=S||(S={})).alipayhk="alipayhk",A.alipaymo="alipaymo",A.gcash="gcash",A.tngd="tngd",A.dana="dana",A.kakaopay="kakaopay",i(i(i(i(i(i({},C.ALIPAY_HK,S.alipayhk),C.ALIPAY_MO,S.alipaymo),C.GCASH,S.gcash),C.DANA,S.dana),C.TNG,S.tngd),C.KAKAOPAY,S.kakaopay),(T=j||(j={})).STABLE="STABLE",T.TEST="TEST",T.PRE="PRE",T.PROD="PROD";var L=Object.prototype.hasOwnProperty,R=Object.assign||function(t,e){for(var n,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),r=1;r<arguments.length;r++)for(var o in n=Object(arguments[r]))L.call(n,o)&&(i[o]=n[o]);return i},B=function(t,e){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},B(t,e)};function U(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var F=function(){return F=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},F.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var V=Function.prototype.apply.call.bind(Function.prototype.apply),H=Function.prototype.bind;function Y(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return V(t,e,n)}function G(t,e,n){return V(t,e,n)}function K(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return V(H,t,e)}var W,q,J,z,Q,Z,$,X,tt,et,nt=JSON.stringify,it=JSON.parse;function rt(){return q||(t="undefined"!=typeof Set,q=t?Set:function(){function t(){this.itemList=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),t.prototype.add=function(t){return-1===this.itemList.indexOf(t)&&this.itemList.push(t),this},t.prototype.delete=function(t){var e=this.itemList.indexOf(t);return-1!==e&&(this.itemList.splice(e,1),!0)},t.prototype.clear=function(){this.itemList=[]},t.prototype.has=function(t){return-1!==this.itemList.indexOf(t)},t.prototype.forEach=function(t){for(var e=0,n=this.itemList.slice();e<n.length;e++){var i=n[e];t(i,i,this)}},t}()),new q;var t}function ot(t){return"number"==typeof t&&t>=0&&t<=8}function at(t){var e=t.split(".");if(!e.length)return!1;var n=function(t){for(var e=(et||"undefined"!=typeof __APPX_CAN_I_USE_DATA__&&(et=__APPX_CAN_I_USE_DATA__),et),n=0,i=t;n<i.length;n++){var r=i[n];if(void 0===(e=e&&e[r]))return;var o=e._;if(o){var a=o[tt.default];if(a||(a=o[tt[void 0]]),!a)return!1;if(void 0!==a[tt.const])return Boolean(a[tt.const]);var s=a[tt.version_added];return void 0!==s&&void 0>=s}}}(e);return void 0!==n?n:function(t,e){if(!e.length)return!1;for(var n=void 0,i=0,r=e;i<r.length;i++){var o=r[i];if(void 0===(n=n&&n[o]))return;if("number"==typeof n._||"boolean"==typeof n._)return Boolean(n._);if("number"==typeof n||"boolean"==typeof n)return Boolean(n)}}(0,e)}J||(J="undefined"!=typeof WeakMap?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+o()+"."+o()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function r(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function o(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(r(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(r(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(r(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(r(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var o=t[this._id];return o&&o[0]===t?(o[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()),new J,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(V||(V=Function.prototype.apply.call.bind(Function.prototype.apply)),V(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(V||(V=Function.prototype.apply.call.bind(Function.prototype.apply)),V(t,e,n)):t.apply(e,n)}),function(t){t.CanvasContext="CanvasContext"}(z||(z={})),function(t){t[t.PLUGIN=1]="PLUGIN",t[t.SUB_PACKAGE=2]="SUB_PACKAGE"}(Q||(Q={})),function(t){t.PLUGIN="plugin",t.SUB_PACKAGE="subpackage"}(Z||(Z={})),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}($||($={})),function(t){t.AppxLifecycle="AppxLifecycle"}(X||(X={})),"undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE,function(t){t.version_added="v",t.const="c",t.android="a",t.ios="i",t.default="d"}(tt||(tt={}));var st,ct={scope:void 0,type:"empty"};function pt(t){return t&&"empty"===t.type}function lt(t){return t&&"extension"===t.type}function ut(t){return t&&"openCapability"===t.type}function ft(){return st||(st=function(){try{return INSIDE_CONFIG_STATIC||{}}catch(t){return{}}}()),st}"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var ht,dt,yt,vt=function(){function t(t){this.taskMap=Object.create(null),this.addEventListener=t}return t.prototype.hasMatcher=function(t,e){var n=this.taskMap[t];if(!n)return!1;if(void 0===e){var i=Object.keys(n.callbacks).some((function(t){var e=n.callbacks[t];return!!(e&&e.length>0)}));return i}var r=n.callbacks[e];return!!r&&r.length>0},t.prototype.removeMatcher=function(t,e,n){var i=this.taskMap[t];if(!i)return 0;var r=i.callbacks[e];if(!r)return 0;if(n){var o=r.length;return i.callbacks[e]=r.filter((function(t){return t!==n})),o-i.callbacks[e].length}return o=r.length,r.length=0,o},t.prototype.addMatcher=function(t,e,n,i,r,o){var a=this.taskMap[t];a||(a=this.taskMap[t]={callbacks:Object.create(null)},this.addEventListener(t,K(this.onEventHandler,this,t,i,r),o));var s=a.callbacks[e];return s||(s=a.callbacks[e]=[]),s.indexOf(n)<0?(s.push(n),1):0},t.prototype.onEventHandler=function(t,e,n,i){var r=this.taskMap[t],o=e(i,r);if(o)for(var a=r.callbacks,s=0,c=o;s<c.length;s++){var p=a[c[s]];if(p){var l=n(i);if(l)for(var u=0,f=p;u<f.length;u++)(0,f[u])(l)}}},t}();function gt(t){return void 0===t}function mt(t){return t&&"object"==typeof t}function It(t){return"function"==typeof t}function bt(t){return!!(t&&t.get&&t.update)}var Ot=function(t,e,n,i,r,o,a){e().getKernel().__BRIDGE_CALL__(o,n,i,r)},Pt=function(t,e,n,i,r,o){return e().getKernel().__BRIDGE_CALL_SYNC__(r,n,i)};function Et(t,e){var n=t.jsApiCacheWhitelist;return!!(n&&"string"==typeof n&&n.indexOf(e)>=0)}function _t(t,e){return t[e]}var kt={internalAPI:!0,openInBrowser:!0},Ct={};function St(t,e,n,i,r,o,a,s){var c="".concat(o),p=!!(1&r),l=!!(2&r),u=!!(4&r),f=!1===p&&!0===l,h=f?t.getPublicCallProxyAPIInfoByName(c):t.getAPIInfoByName(c),d=f?"my.callSync":xt(h,o);if(h||(h=Ct),!kt[c]){(p||l)&&(s=null);var y=ne(h,n,i,p,u,s,e,c,a,{caller:d});try{return y.invoke()}finally{}}}function At(t,e,n,i,r,o,a,s,c){var p="".concat(o),l=!!(1&r),u=!!(2&r),f=!!(4&r),h=!1===l&&!0===u,d=Ct;t&&(d=h?t.getPublicCallProxyAPIInfoByName(p):t.getAPIInfoByName(p));var y=h?"my.call":xt(d,o);if(d||(d=Ct),!kt[p]){(l||u)&&(c=null);var v=ee(d,n,i,l,f,c,e,p,a,s,{caller:y});try{return v.invoke()}finally{}}}function wt(t,e,n,i,r,o,a,s){var c=function(t,e,n,i,r,o,a,s,c,p){return new Xt(e,n,o,a,s,t,{caller:null==p?void 0:p.caller,callerContext:null==p?void 0:p.callerContext,directly:!0,inside:!1,shouldNotRewriteIdOrClass:c,viewId:null})}(t,i,r,0,0,n,e,o,a,s);return c.invoke()}function xt(t,e){if(t)return t.avaliableNamespace?"my.".concat(t.avaliableNamespace,".").concat(e):"my.".concat(e)}var jt,Tt,Mt=function(){function t(t){this._context=t,this.__appxDomain=t.appxDomain.scope;var e=this._context.runtime().getEnv(),n=e.isIOS,i=e.isAndroid,r=e.isIDE;this.isIOS=n,this.isAndroid=i,this.isIDE=r}return t.prototype.callBridge=function(t,e,n){this._context.callDefaultBridge(t,e,n)},t.prototype.callBridgeSync=function(t,e){return this._context.callDefaultBridgeSync(t,e)},t.prototype.on=function(t,e){return this._context.runtime().getBridge().event.addEventListener(t,0,e)},t.prototype.off=function(t,e){return this._context.runtime().getBridge().event.removeEventListener(t,0,e)},t.prototype.getStartupParams=function(){return this._context.runtime().getEnv().originalStartupParams},t}();function Dt(t){var e;jt||(W||(e="undefined"!=typeof Map,W=e?Map:function(){function t(){this.keyList=[],this.valueList=[]}return t.prototype.set=function(t,e){var n=this.keyList,i=n.indexOf(t);if(-1===i){var r=n.push(t)-1;this.valueList[r]=e}else this.valueList[i]=e;return this},t.prototype.get=function(t){var e=this.keyList.indexOf(t);return-1===e?void 0:this.valueList[e]},t.prototype.forEach=function(t){for(var e=this.keyList.slice(),n=this.valueList.slice(),i=e.length,r=0;r<i;r++){var o=e[r];t(n[r],o,this)}},Object.defineProperty(t.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),t.prototype.has=function(t){return-1!==this.keyList.indexOf(t)},t.prototype.delete=function(t){var e=this.keyList.indexOf(t);return-1!==e&&(this.keyList.splice(e,1),this.valueList.splice(e,1),!0)},t.prototype.clear=function(){this.keyList=[],this.valueList=[]},t}()),jt=new W);var n=jt.get(t);if(!n){n=rt(),jt.set(t,n);for(var i=0,r=t;i<r.length;i++){var o=r[i];"string"==typeof o&&n.add(o)}}return n}function Nt(){return Tt||((Tt=rt()).add("success"),Tt.add("error"),Tt.add("errorMessage")),Tt}function Lt(t,e,n){if(t&&"object"==typeof t){for(var i=Dt(e),r={},o=0,a=Object.keys(t);o<a.length;o++){var s=a[o];i.has(s)||n&&n.has(s)?r[s]=t[s]:"undefined"!=typeof process&&process&&process.env}return r}return t}function Rt(t,e,n){var i=t,r=e;return It(t)&&(gt(e)||n()&&(r=t,i={})),function(t,e){var n=t,i=e;return gt(e)&&It(t)&&(i=t,n={}),mt(t)||void 0===t||(n={}),gt(n)&&(n={}),{callback:i,option:n}}(i,r)}function Bt(t,e,n){try{var i=ft().config;if(!i||"ap"!==i.clientName)return!0;if(e().getBehaviorManager().report("duplicated my.call(".concat(n,")")),t.getFlag("ignoreCallbackWhenInvokeMyCall"))return!0}catch(t){}return!1}function Ut(t){var e={};return It((t=t||{}).success)&&(e.success=t.success,delete t.success),It(t.fail)&&(e.fail=t.fail,delete t.fail),It(t.complete)&&(e.complete=t.complete,delete t.complete),e}var Ft=1,Vt={};function Ht(){}var Yt=Object.defineProperty;function Gt(t,e,n){Yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}var Kt,Wt=function(){function t(t,e,n,i,r,o,a,s){if(p=r,"[object Object]"===Object.prototype.toString.call(p)){var c=F({},r);void 0!==c.page&&(c.page=void 0),this.option=c}else this.option=r;var p;Gt(this,"ctx",t),Gt(this,"runtime",e),Gt(this,"extraInfo",s),Gt(this,"apiName",i),Gt(this,"appxDomain",n),Gt(this,"appxDomainIsNotEmpty",!pt(n)),Gt(this,"callback",a),Gt(this,"apiInfo",this.getFlag("freezeAPIInfo")?function(t){try{Object.isFrozen(t)||(Object.setPrototypeOf(t,null),Object.freeze(t))}finally{return t}}(F({},o)):o||{}),o.t&&(this.taskId=Ft++),this.startTime=(new Date).getTime(),this.initDependency(r,s.viewId,o,a),this.callStack=new Error("")}return t.prototype.invoke=function(){},t.prototype.callScopedBridge=function(t,e,n,i){var r=this.appxDomain;return r&&!pt(r)&&(e=F(F({},e),{__appxDomain:r.scope})),this.callDefaultBridge(t,e,n,i)},t.prototype.callScopedBridgeSync=function(t,e,n){var i=this.appxDomain;return i&&!pt(i)&&(e=F(F({},e),{__appxDomain:i.scope})),this.callDefaultBridgeSync(t,e,n)},t.prototype.callBridge=function(t,e,n,i){return this.callDefaultBridge(t,e,n,i)},t.prototype.callDefaultBridge=function(t,e,n,i){var r=this.runtime();if(r){var o=r.getBridge();o&&o.callBridge(t,e,n,void 0,{caller:this.extraInfo.caller})}},t.prototype.callDefaultBridgeSync=function(t,e,n){var i=this.runtime();if(i){var r=i.getBridge();if(r)return r.callBridgeSync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPI=function(t,e,n,i){var r=this.runtime();if(r){var o=r.getBridge();o&&o.callInternalAPI(t,e,n,i,{caller:this.extraInfo.caller})}},t.prototype.callInternalAPISync=function(t,e,n){var i=this.runtime();if(i){var r=i.getBridge();if(r)return r.callInternalAPISync(t,e,n,{caller:this.extraInfo.caller})}},t.prototype.getEnvAppBiz=function(){return"TinyAppBiz-".concat(this.getEnvAppId())},t.prototype.getEnvAppId=function(){var t=this.runtime().getEnv().startupParams.appId;return void 0===t?"":t},t.prototype.getEnvPlatformIOS=function(){return"ios"===this.runtime().getEnv().platform},t.prototype.invokeExternalElementMethod=function(t,e,n,i){if(t&&void 0!==t.$viewId){var r=t.$viewId,o=this.runtime().getPageManager().getInstanceById("".concat(r));o&&o.invokeClientElementMethod(e,"onHostExternalMessage",[n,i])}},t.prototype.getBridgeExtraInfo=function(){return this.runtime().getBridge().extraInfo},t.prototype.getEnvPlatformAndroid=function(){return"android"===this.runtime().getEnv().platform},t.prototype.getEnvOnlyCube=function(){return this.runtime().getEnv().isOnlyCube},t.prototype.invokeCallback=function(t,e){t?this.callbackUnion[t]&&this.callbackUnion[t](e):this.callback&&this.callback(e)},t.prototype.dispatchResultCallback=function(t){var e=!1;if("object"==typeof t&&(e="error"in t||"errorMessage"in t),e?(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"fail"}]),t=this.callHookAfterLog(t),this.invokeCallback("fail",t)):(this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,option:this.option,result:t,type:"success"}]),this.invokeCallback("success",t)),this.invokeCallback("complete",t),this.invokeCallback(null,t),!e)return t;if(!this.shouldNotReturnPromise()){var n=this.runtime();if(n&&"function"==typeof n.getLogger){var i=n.getLogger();i&&i.attachErrorSource&&i.attachErrorSource(t,{from:"api",method:this.apiName,payload:this.option,stack:this.callStack})}throw t}},t.prototype.shouldNotReturnPromise=function(){if(this.apiInfo.noPromise)return!0;var t=!!(this.callbackUnion.complete||this.callbackUnion.success||this.callbackUnion.fail||this.callback),e=this.apiInfo.allowAbort||this.apiInfo.progress||this.apiInfo.returnProto;return t&&!e},t.prototype.shouldEmitEvent=function(){return this.extraInfo.directly&&"object"==typeof this.option&&!Vt[this.apiName]},t.prototype.prepareOption=function(){return this.shouldEmitEvent()&&this.runtime().getTypedEventManager().invokeInternalEvent(8,[{key:this.apiName,type:"invoke"}]),this.callHookBefore()},t.prototype.getInsideContext=function(){var t=this.insideContext;return t||(t=this.insideContext=new Mt(this)),t},t.prototype.callHookValidate=function(){var t=this.apiInfo.tapMark;if("function"!=typeof t||this.extraInfo.inside||(t=Y(t,this)),!0===t){var e=this.getPageInstance();e&&!e.getTapMarkManager().checkTapMark()&&(this.validateResult={error:5,errorMessage:"".concat(this.apiName," can only be invoked by user tap gesture")})}return void 0===this.validateResult&&this.apiInfo.v&&!this.extraInfo.inside&&(this.apiInfo.b_v&&(this.validateResult=Y(this.apiInfo.b_v,this,this.option)),void 0===this.validateResult&&(this.validateResult=Y(this.apiInfo.v,this,this.option)),void 0===this.validateResult&&this.apiInfo.a_v&&(this.validateResult=Y(this.apiInfo.a_v,this,this.option))),this.validateResult},t.prototype.callHookBefore=function(){var t=this.option;return this.optionPageViewId||this.apiInfo.b?(t=F({},t),Array.isArray(this.apiInfo.in)&&(t=Lt(t,this.apiInfo.in,Nt())),this.optionPageViewId&&(t.viewId=this.optionPageViewId),this.apiInfo.b&&(this.apiInfo.b_b&&(t=this.extraInfo.inside?Y(this.apiInfo.b_b,this.getInsideContext(),t,this.callback)||t:Y(this.apiInfo.b_b,this,t,this.callback)||t),t=this.extraInfo.inside?Y(this.apiInfo.b,this.getInsideContext(),t,this.callback)||t:Y(this.apiInfo.b,this,t,this.callback)||t,this.apiInfo.a_b&&(t=this.extraInfo.inside?Y(this.apiInfo.a_b,this.getInsideContext(),t,this.callback)||t:Y(this.apiInfo.a_b,this,t,this.callback)||t))):Array.isArray(this.apiInfo.in)&&(t=Lt(t,this.apiInfo.in,Nt())),ut(this.appxDomain)?t.__openCapabilityId=this.appxDomain.origin:t.__openCapabilityId&&delete t.__openCapabilityId,t},t.prototype.callHookAfter=function(t){var e=t;return this.apiInfo.a&&(this.apiInfo.b_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=F({},e)),e=!0===this.extraInfo.inside?Y(this.apiInfo.b_a,this.getInsideContext(),e,this.finalOption,this.option)||e:Y(this.apiInfo.b_a,this,e,this.finalOption,this.option)||e),this.apiInfo.ignoreShadowCopyResponse||(e=F({},e)),e=!0===this.extraInfo.inside?Y(this.apiInfo.a,this.getInsideContext(),e,this.finalOption,this.option)||e:Y(this.apiInfo.a,this,e,this.finalOption,this.option)||e,this.apiInfo.a_a&&(this.apiInfo.ignoreShadowCopyResponse||(e=F({},e)),e=!0===this.extraInfo.inside?Y(this.apiInfo.a_a,this.getInsideContext(),e,this.finalOption,this.option)||e:Y(this.apiInfo.a_a,this,e,this.finalOption,this.option)||e)),Array.isArray(this.apiInfo.out)&&(e=Lt(e,this.apiInfo.out,Nt())),e},t.prototype.callHookAfterLog=function(t){var e=t;return this.apiInfo.a_l&&(e=Y(this.apiInfo.a_l,this,e,this.finalOption,this.option)||e),e},t.prototype.processResult=function(t){var e,n=t||{};n=this.callHookAfter(n);var i=!0;return(null===(e=this.extraInfo)||void 0===e?void 0:e.directly)&&this.getFlag("disablePublicCallErrorCodeNormalize")&&(i=!1),i&&(n=function(t){return"string"==typeof t.error&&(t.error=parseInt(t.error,10)),0===t.error&&(delete t.error,delete t.errorMessage),t}(n)),n},t.prototype.getRewriteIdWithAppxDomain=function(t){var e,n,i=t,r=this.appxDomain;return!lt(r)&&!ut(r)||this.extraInfo.shouldNotRewriteIdOrClass||(i=(e={type:4,value:r.origin},n={type:8,value:i},{type:9,value:"p-".concat(e.value,"-").concat(n.value)}).value),i},t.prototype.getPageInstance=function(){var t=this.pageInstance;return t&&!t.hasPageUnloaded()||(t&&(this.pageInstance=null),t=this.runtime().getNav().getTopInstance()),t},t.prototype.initDependency=function(t,e,n,i){var r,o,a=this.runtime(),s=t&&t.page&&t.page.$viewId||void 0,c=s||e||void 0;c&&(o=a.getPageManager().getInstanceById(c)),o&&!o.hasPageUnloaded()||(o=null===(r=a.getNav())||void 0===r?void 0:r.getTopInstance()),o&&(c=o.pageId,this.pageInstance=o),this.assignedViewId=c,this.optionPageViewId=s},t.prototype.getState=function(){return this.extraInfo.parentState},t.prototype.getProtoContext=function(){return this.extraInfo.parentProtoContext},t.prototype.getCallerContext=function(){return this.extraInfo.callerContext},t.prototype.callProtoAPI=function(t,e){return wt(t,this.apiName,this.appxDomain,this.ctx,this.runtime,e,this.extraInfo.shouldNotRewriteIdOrClass,{caller:this.extraInfo.caller,callerContext:this})},t.prototype.reportHostError=function(t,e,n,i,r){return this.runtime().getKernel().reportHostError(t,e,n,i,r)},t.prototype.getFlag=function(t){return this.ctx.getFlags()[t]},t.prototype.invokeCompositeElementMethod=function(t,e,n){var i;void 0===e&&(e=Ht);var r=null===(i=this.extraInfo)||void 0===i?void 0:i.scopedElementId;if(r){var o=n||this.apiName,a=function(t,e,n,i){if(t){var r=t.success,o=t.fail;return{complete:t.complete,data:function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(t,["success","fail","complete"]),element:n,fail:o,success:r,viewId:e,action:i}}return{element:n,viewId:e,action:i}}(t,this.assignedViewId,r,o);this.pageInstance?this.pageInstance.invokeCompositeElementMethod(a,this,e):e({error:1,errorMessage:"page not found"})}},t}();var qt,Jt,zt=/^(?:on|off)([A-Z])(\w+)/;var Qt,Zt,$t={},Xt=function(t){function e(e,n,i,r,o,a,s){return t.call(this,e,n,i,r,o,a,void 0,s)||this}return U(e,t),e.prototype.invoke=function(){for(var t=this,e=G(this.apiInfo.state,this,this.option),n={},i=function(i){var o=r.apiInfo.proto[i];if("function"==typeof o.feature&&!Y(o.feature,r))return"continue";var a=r.apiName?"".concat(r.extractProtoEntityNameFromAPIInfo(r.apiName),".").concat(i):void 0,s=function(i){i.extraInfo.caller=a,i.extraInfo.scopedElementId=t.apiInfo.compositeElement?t.getRewriteIdWithAppxDomain(t.option[0]):void 0,i.extraInfo.parentState=e,i.extraInfo.parentProtoContext=n,i.extraInfo.callerContext=t.extraInfo.callerContext||t};if(o.getter){var c,p=function(t,e,n,i,r,o,a){return new te(e,n,o,a,t,{caller:void 0,directly:!1,viewId:r,inside:!1,scopedElementId:void 0})}(o,r.ctx,r.runtime,0,r.assignedViewId,r.appxDomain,i);s(p);var l=!1;Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return l||(c=p.invoke()),c},set:function(t){return c=t,l=!0,!0}})}else n[i]=function(e,n){if(t.apiInfo.compositeElement&&!t.hasPermission())return t.invokeNoPermissionCallbackDirectly(a,i,e,n);var r=ee(o,t.ctx,t.runtime,!1,!1,t.assignedViewId,t.appxDomain,i,e,n);return s(r),r.invoke()}},r=this,o=0,a=Object.keys(this.apiInfo.proto);o<a.length;o++)i(a[o]);return n},e.prototype.initDependency=function(e,n,i,r){var o=i.createOptionIndex,a=!1===o?null:e[o];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.extractProtoEntityNameFromAPIInfo=function(t){var e=t.match(/^(create|get)(.*)$/);return e?e[2]:"".concat(t[0].toUpperCase()).concat(t.slice(1))},e.prototype.hasPermission=function(){var t=this.runtime().getPermissionManager();return!t||t.checkElementPermission4ContextAPI(this.apiInfo.compositeElement,this.appxDomain)},e.prototype.invokeNoPermissionCallbackDirectly=function(t,e,n,i){var r=this,o={error:4,errorMessage:"无权调用 ".concat(t)},a=Rt(n,i,(function(){return Bt(r.ctx,r.runtime,e)})),s=a.option,c=a.callback,p=Ut(s),l=function(t){return r.runtime().getKernel().setTimeout(t,0)};p.fail&&l((function(){p.fail(o)})),p.complete&&l((function(){p.complete(o)})),c&&l((function(){c(o)}))},e}(Wt);var te=function(t){function e(e,n,i,r,o,a){return t.call(this,e,n,i,r,null,o,null,a)||this}return U(e,t),e.prototype.invoke=function(){return Y(this.apiInfo.getter,this)},e}(Wt);function ee(t,e,n,i,r,o,a,s,c,p,l){if(t.fn)return new(Jt||(Jt=function(t){function e(e,n,i,r,o,a,s,c){return t.call(this,e,n,i,r,o,s,a,c)||this}return U(e,t),e.prototype.invoke=function(){return!0===this.extraInfo.inside?Y(this.apiInfo.fn,this.getInsideContext(),this.option,this.callback):Y(this.apiInfo.fn,this,this.option,this.callback)},e.prototype.initDependency=function(e,n,i,r){var o=i.fnOptionIndex,a=0===o?e:1===o?r:null;t.prototype.initDependency.call(this,a,n,i,null)},e}(Wt)),Jt)(e,n,a,s,c,p,t,{caller:void 0,directly:i,inside:r,viewId:o,scopedElementId:null==l?void 0:l.scopedElementId});var u=Rt(c,p,(function(){return Bt(e,n,s)})),f=u.option,h=u.callback;return function(t){return/^(?:on|off)[A-Z](?:\w+)/.test(t)}(s)?new(qt||(qt=function(t){function e(e,n,i,r,o,a,s,c){var p=t.call(this,e,n,i,r,o,a,s,c)||this;return"function"==typeof a.e?p.eventName=Y(a.e,p):p.eventName=function(t,e){var n="";if(e&&zt.test(t)){var i=t.match(zt);"string"==typeof e.m&&(n=e.m),!n&&i[1]&&i[2]&&(n=i[1].toLowerCase()+i[2])}return n}(r,p.apiInfo),p}return U(e,t),e.prototype.invoke=function(){if(this.finalOption=this.prepareOption(),this.callbackUnion=Ut(this.finalOption),/^on/.test(this.apiName)){if(ot(this.apiInfo.m))return"function"==typeof this.callback?this.runtime().getTypedEventManager().addEventListener(this.apiInfo.m,this.callback,!0):{remove:function(){}};if(this.apiInfo.task){if("function"==typeof this.callback){var t=this.apiInfo.task,e=t.id,n=t.getTaskId,i=t.getPayload,r=t.isolate,o="function"==typeof e?Y(e,this):e;this.callHookEventTask("start",r,o),this.runtime().getBridge().event.taskManager.addMatcher(this.eventName,o,this.callback,n,i)}}else this.callHookEvent("start"),this.runtime().getBridge().event.addEventListener(this.eventName,1,K(this.processEventResult,this),this.callback)}else if(ot(this.apiInfo.m))"function"==typeof this.callback&&this.runtime().getTypedEventManager().removeEventListener(this.apiInfo.m,this.callback);else if(this.apiInfo.task){if("function"==typeof this.callback){var a=this.apiInfo.task;e=a.id,r=a.isolate,o="function"==typeof e?Y(e,this):e,this.runtime().getBridge().event.taskManager.removeMatcher(this.eventName,o,this.callback),this.callHookEventTask("end",r,o)}}else this.runtime().getBridge().event.removeEventListener(this.eventName,1,this.callback),this.callHookEvent("end")},e.prototype.processEventResult=function(t){var e,n;n={},gt((e=t).data)||(n=mt(n=e.data)?n:{data:n}),t=n;var i=this.processResult(t);this.dispatchResultCallback(i)},e.prototype.callHookEventTask=function(t,e,n){var i=this.runtime().getBridge().event.taskManager;(2===e?i.hasMatcher(this.eventName,n):1===e&&i.hasMatcher(this.eventName))||It(this.apiInfo[t])&&(this.extraInfo.inside?Y(this.apiInfo[t],this.getInsideContext()):Y(this.apiInfo[t],this))},e.prototype.callHookEvent=function(t){this.runtime().getBridge().event.hasEventListener(this.eventName,1)||It(this.apiInfo[t])&&(this.extraInfo.inside?Y(this.apiInfo[t],this.getInsideContext()):Y(this.apiInfo[t],this))},e}(Wt)),qt)(e,n,a,s,f,t,h,{caller:null==l?void 0:l.caller,directly:i,inside:r,viewId:o,scopedElementId:null==l?void 0:l.scopedElementId}):new(Kt||(Kt=function(t){function e(e,n,i,r,o,a,s,c){return t.call(this,e,n,i,r,o,a,s,c)||this}return U(e,t),e.prototype.invoke=function(){var t=this,e=this.invokeMethodAsync();if(!this.shouldNotReturnPromise()){var n=this.apiInfo,i=n.allowAbort,r=n.progress,o=n.returnEvent,a=n.returnProto;if(i||r||o||a){if(i){var s=this.apiInfo.cancelname||"abort";e[s]=function(){It(t.apiInfo.c)&&Y(t.apiInfo.c,t),t.resolveImmediate&&t.resolveImmediate({error:9,errorMessage:"".concat(t.apiName,":fail abort")})}}if("object"==typeof o&&o)for(var c=function(n){var i=o[n],r=i.taskId,a=i.getTaskId,s=i.eventName,c=i.getPayload,l=i.feature;if("function"==typeof l&&!Y(l,p))return"continue";var u=n[0].toUpperCase()+n.slice(1);e["on".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var o="function"==typeof r?Y(r,t):r;i.taskManager.addMatcher(s,o,e,a,c)}}},e["off".concat(u)]=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;if(i){var o="function"==typeof r?Y(r,t):r;i.taskManager.removeMatcher(s,o)}}}},p=this,l=0,u=Object.keys(o);l<u.length;l++)c(u[l]);if(r){var f=this.taskId,h=r.key,d=r.getPayload,y=r.getTaskId;e.onProgressUpdate=function(e){var n=t.runtime();if(n){var i=n.getBridge().event;i&&i.taskManager.addMatcher("".concat(h,"StateChange"),f,e,y,d)}}}if(a){var v=Y(a,this);R(e,v)}}return e}},e.prototype.callHookDoingAsync=function(t){this.apiInfo.allowAbort&&(this.resolveImmediate=t);var e=this.getFlag("idempotentAPIWhiteList"),n=this.apiInfo.m||this.apiName;if(this.apiInfo.i||Array.isArray(e)&&e.indexOf(n)>-1){var i=this.getFlag("idempotentAPIBlackList");Array.isArray(i)&&i.indexOf(n)>-1?this.doingAsync(t):this.invokeIdempotentAPI(this.apiInfo.i,t)}else this.doingAsync(t)},e.prototype.doingAsync=function(t){It(this.apiInfo.d)?!0===this.extraInfo.inside?Y(this.apiInfo.d,this.getInsideContext(),this.finalOption,t):Y(this.apiInfo.d,this,this.finalOption,t):It(this.apiInfo.d_with_cache)?this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(!0===this.extraInfo.inside?Y(this.apiInfo.d_with_cache,this.getInsideContext(),this.finalOption,t):Y(this.apiInfo.d_with_cache,this,this.finalOption,t)):this.apiInfo.compositeElementAction?this.invokeCompositeElementMethod(this.finalOption,t):this.interceptBridgeCall4Cache(this.apiInfo.cache,t)||(this.shouldForbidAsyncJSAPI(this.apiInfo.m||this.apiName,this.finalOption)?(this.runtime().getEnv().packageAndRunSceneType,t({error:4,errorMessage:"API调用受限"})):Ot(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,t,this.assignedViewId,{caller:this.extraInfo.caller}))},e.prototype.shouldForbidAsyncJSAPI=function(t,e){var n=!1;if("hideOptionMenuItem"===t){var i=this.getFlag("forbidAPIList");"favorite"===e.name&&i&&i.indexOf("hideOptionMenuItem")>-1&&(n=!0)}return n},e.prototype.interceptBridgeCall4Cache=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),r=i.getBridge(),o=t.key,a=i.getEnv().originalStartupParams;if(!Et(a,o))return!1;var s=r.extraInfo[o];if(s||(s=r.extraInfo[o]={cache:_t(a,o)}),bt(t)){var c=Y(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(Ot(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){Y(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(Y(t.set,null,s,this.finalOption),!1):void 0},e.prototype.invokeMethodAsync=function(){var t=this,e=this.runtime(),n=e.getKernel(),i=n.Promise;return this.callHookValidate()?(this.callbackUnion=Ut(this.option),i.resolve().then((function(){return t.dispatchResultCallback(t.validateResult)}))):(this.callbackUnion=Ut(this.option),this.finalOption=this.prepareOption(),new i((function(i,r){var o=1;t.callHookDoingAsync((function(a){var s=t.apiInfo,c=s.progress;if(c){var p=c.key,l=e.getBridge().event;l&&l.taskManager.removeMatcher("".concat(p,"StateChange"),t.taskId)}if(s.allowAbort){if(!t.resolveImmediate)return;t.resolveImmediate=null}var u=t.processResult(a);try{if(o)return void n.setTimeout((function(){try{i(t.dispatchResultCallback(u))}catch(t){r(t)}}),2);i(t.dispatchResultCallback(u))}catch(t){r(t)}})),o=0})))},e.prototype.invokeIdempotentAPI=function(t,e){if(this.finalOption&&Object.keys(this.finalOption).length>0)return this.doingAsync(e);var n=this.runtime(),i=n.getBridge(),r=i.extraInfo.idempotenceInfo;r||(r=i.extraInfo.idempotenceInfo={});var o=this.apiInfo.m||this.apiName,a=void 0!==this.optionPageViewId?this.optionPageViewId:void 0!==this.assignedViewId?this.assignedViewId:"default",s=this.appxDomainIsNotEmpty?this.appxDomain.scope:"default",c="".concat(o,"-").concat(a,"-").concat(s),p=r[c];p||(p=r[c]={processing:!1,resolveQueue:[]}),p.processing?p.resolveQueue.push(e):(p.processing=!0,this.doingAsync((function(t){var i;p.processing=!1;try{i=it(nt(t))}catch(t){i={},n.getLogger().reportError(12,t)}e(t),p.resolveQueue&&p.resolveQueue.length>0&&(p.resolveQueue.forEach((function(t){t(it(nt(i)))})),p.resolveQueue=[])})))},e.prototype.abort=function(){this.resolveImmediate&&this.resolveImmediate({error:9,errorMessage:"".concat(this.apiName,":fail abort")})},e}(Wt)),Kt)(e,n,a,s,f,t,h,{caller:null==l?void 0:l.caller,directly:i,inside:r,viewId:o,scopedElementId:null==l?void 0:l.scopedElementId})}function ne(t,e,n,i,r,o,a,s,c,p){var l=Rt(c,void 0,(function(){return Bt(e,n,s)})).option;return new(Zt||(Zt=function(t){function e(e,n,i,r,o,a,s){return t.call(this,e,n,i,r,o,a,null,s)||this}return U(e,t),e.prototype.interceptBridgeCallSync4Cache=function(t){if(t){var e=this.runtime(),n=e.getBridge(),i=t.key,r=e.getEnv().originalStartupParams;if(Et(r,i)){var o=n.extraInfo[i];if(o||(o=n.extraInfo[i]={cache:_t(r,i)}),bt(t)){var a=Y(t.get,null,o,this.finalOption);if(a)return{hit:!0,result:a};var s=Pt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller});return Y(t.update,null,o,this.finalOption,s),{hit:!1,result:s}}t.set&&Y(t.set,null,o,this.finalOption)}}},e.prototype.callHookDoingSync=function(){var t;if(It(this.apiInfo.d))t=!0===this.extraInfo.inside?Y(this.apiInfo.d,this.getInsideContext(),this.finalOption,void 0):Y(this.apiInfo.d,this,this.finalOption,void 0);else if(It(this.apiInfo.d_with_cache_sync))(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:!0===this.extraInfo.inside?Y(this.apiInfo.d_with_cache_sync,this.getInsideContext(),this.finalOption,void 0):Y(this.apiInfo.d_with_cache_sync,this,this.finalOption,void 0))&&(t=this.processResult(t)||t);else{var e;(t=(e=this.interceptBridgeCallSync4Cache(this.apiInfo.cache))?e.result:Pt(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,this.assignedViewId,{caller:this.extraInfo.caller}))&&(t=this.processResult(t)||t)}return t||(t={error:999,errorMessage:"System Error: Return ".concat(t)}),t},e.prototype.invoke=function(){return this.callHookValidate()?this.validateResult:(this.finalOption=this.prepareOption(),It(this.apiInfo.responseProxy)&&!0!==this.extraInfo.inside&&this.getFlag("enableBridgeResponseProxy")&&(t=Y(this.apiInfo.responseProxy,this,this.finalOption,K(this.callHookDoingSync,this),K(this.callHookDoingAsync4ResponseProxy,this))),t||(t=this.callHookDoingSync()),t);var t},e.prototype.callHookDoingAsync4ResponseProxy=function(t){var e=this,n=function(n){var i=e.processResult(n);t(i)};this.interceptBridgeCall4CacheAsync(this.apiInfo.cache,n)||Ot(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,n,this.assignedViewId,{caller:this.extraInfo.caller})},e.prototype.interceptBridgeCall4CacheAsync=function(t,e){var n=this;if(!t)return!1;var i=this.runtime(),r=i.getBridge(),o=t.key,a=i.getEnv().originalStartupParams;if(!Et(a,o))return!1;var s=r.extraInfo[o];if(s||(s=r.extraInfo[o]={cache:_t(a,o)}),bt(t)){var c=Y(t.get,null,s,this.finalOption);return c?((0,this.runtime().getKernel().setTimeout)((function(){e(c)}),0),!0):(Ot(this.ctx,this.runtime,this.apiInfo.m||this.apiName,this.appxDomainIsNotEmpty?F(F({},this.finalOption),{__appxDomain:this.appxDomain.scope}):this.finalOption,(function(i){Y(t.update,null,s,n.finalOption,i),e(i)}),this.assignedViewId,{caller:this.extraInfo.caller}),!0)}return t.set?(Y(t.set,null,s,this.finalOption),!1):void 0},e}(Wt)),Zt)(e,n,a,s,l,t,{caller:null==p?void 0:p.caller,directly:i,inside:r,viewId:o})}function ie(t){var e=function(){};return e.prototype=t,oe(new e),t}function re(t){return t.__MAGIC_SLOW_PROPERTY=1,delete t.__MAGIC_SLOW_PROPERTY,t}function oe(t){if(t===oe)throw oe;return t}var ae={SDKVersion:!0,call:!0,callSync:!0,canIUse:!0,emit:!0,off:!0,on:!0,renderTarget:!0};function se(t,e){if(!e.length)return!1;for(var n=t,i=0,r=e;i<r.length;i++){var o=r[i];if(!(n=n&&n[o]))return!1}return!0}function ce(t,e){if(!e.length)return!1;for(var n=t,i=0,r=e;i<r.length;i++){var o=r[i];if(null==(n=n&&n[o]))return!1}return!0}var pe=function(){function t(t,e,n,i,r){this.collection=new ue,this.collectedCanIUseKeys=rt(),this.hasRegisteredCanIUseReportHandler=!1,this.ctx=n,this.getRuntime=i,this.appxDomain=e,this.unrefRuntime=r,this.callSync4PublicNamed=K(this.callSync4PublicNamed,this),this.callSync4PublicNamedInside=K(this.callSync4PublicNamedInside,this),this.call4PublicNamed=K(this.call4PublicNamed,this),this.call4PublicNamedInside=K(this.call4PublicNamedInside,this),this.call=K(this.call,this),this.callSync=K(this.callSync,this),this.canIUse=K(this.canIUse,this),this.call4LinkedContext=K(this.call4LinkedContext,this),this.call4ProtoContext=K(this.call4ProtoContext,this),this.call4PublicCall=K(this.call4PublicCall,this),this.callSync4PublicCall=K(this.callSync4PublicCall,this),ut(e)?this.publicInstance={canIUse:this.canIUse}:this.publicInstance={call:this.call4PublicCall,callSync:this.callSync4PublicCall,canIUse:this.canIUse,emit:t.emit,off:t.off,on:t.on}}return t.prototype.callSync4PublicNamed=function(t,e,n){return St(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n)},t.prototype.callSync4PublicNamedInside=function(t,e,n){return St(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n)},t.prototype.callSync4PublicCall=function(t,e,n){return St(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n)},t.prototype.call4PublicCall=function(t,e,n,i){return At(this.collection,this.appxDomain,this.ctx,this.getRuntime,2,t,e,n,i)},t.prototype.call4PublicNamed=function(t,e,n,i){return At(this.collection,this.appxDomain,this.ctx,this.getRuntime,1,t,e,n,i)},t.prototype.call4PublicNamedInside=function(t,e,n,i){return At(this.collection,this.appxDomain,this.ctx,this.getRuntime,5,t,e,n,i)},t.prototype.removeAPIs=function(t,e){this.collection.removeAPIs(t);for(var n=e?this.publicInstance[e]:this.publicInstance,i=0,r=t;i<r.length;i++){var o=r[i];n&&n[o]&&(n[o]=void 0)}},t.prototype.replaceAPI=function(t,e){this.collection.replaceAPI(t,e)},t.prototype.replacePublicCallProxyAPI=function(t,e){this.collection.replacePublicCallProxyAPI(t,e)},t.prototype.replaceLinkedContextAPI2Proto=function(t,e){this.replaceAPI(t,e),this.publicInstance[t]=K(this.call4ProtoContext,null,t,!1)},t.prototype.getCollection=function(){return this.collection},t.prototype.callSync=function(t,e,n){return St(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n)},t.prototype.canIUse=function(t){return"string"!=typeof t&&(t=String(t)),this.registerCanIUseReportHandler(),this.collectedCanIUseKeys.add(t),function(t,e,n,i,r,o){if(!i.getFlag("disableCanIUseByMetaInBridge")){var a=at(o);if(void 0!==a)return a}var s=String(o).split(".");if(1===s.length&&ae[s[0]])return!0;var c=0,p=r();if(p){var l=p.getNav().getTopInstance();l&&(c=l.getEngineType())}return!!se(t.getCanIUseMap(i,r,c),s)||!!t.evaluateCanIUse(i,r,e,s)||!!(i.getFlag("enableCanIUseFix4PublicInstanceCheck")?ce:se)(n,s)}(this.collection,this.appxDomain,this.publicInstance,this.ctx,this.getRuntime,t)},t.prototype.call=function(t,e,n,i){return At(this.collection,this.appxDomain,this.ctx,this.getRuntime,0,t,e,n,i)},t.prototype.call4LinkedContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(t,e,n,i,r,o,a){var s="".concat(r),c=t.getAPIInfoByName(s)||Ct;if(!kt[s]){xt(c,r);var p=function(t,e,n,i,r,o,a,s,c){return new(Qt||(Qt=function(t){function e(e,n,i,r,o,a,s){var c=t.call(this,e,n,i,r,o,a,void 0,s)||this;return c.cache4ApiInfo=Object.create(null),c.callLinkedCollection=K(c.callLinkedCollection,c),c.callAfterCompositeElementReady=K(c.callAfterCompositeElementReady,c),c.callSyncLinkedCollection=K(c.callSyncLinkedCollection,c),c}return U(e,t),e.prototype.invoke=function(){return G(this.apiInfo.create,this,this.option)},e.prototype.callScopedBridge=function(t,e,n,i){var r=this.appxDomain;r&&!pt(r)&&(e=F(F({},e),{__appxDomain:r.scope}));var o=this.runtime();if(o){var a=o.getBridge();a&&a.callBridge(t,e,n)}},e.prototype.callLinkedCollection=function(t,e,n){return ee(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e,n).invoke()},e.prototype.callSyncLinkedCollection=function(t,e){return ne(this.getApiInfoFromLinkedCollection(t),this.ctx,this.runtime,!1,!1,this.assignedViewId,this.appxDomain,t,e).invoke()},e.prototype.callAfterCompositeElementReady=function(t,e){var n=this,i=this.getPageInstance();i&&i.whenCompositeElementReady(e.element,(function(){n.callLinkedCollection(t,e)}))},e.prototype.initDependency=function(e,n,i,r){var o=i.createOptionIndex,a=!1===o?null:e[o];t.prototype.initDependency.call(this,a,n,i,null)},e.prototype.getApiInfoFromLinkedCollection=function(t){if(!this.cache4ApiInfo[t]){var e,n=this.apiInfo.linked;e=n&&n[t]||$t,this.cache4ApiInfo[t]=e}return this.cache4ApiInfo[t]},e}(Wt)),Qt)(e,n,o,a,s,t,{caller:void 0,directly:!0,shouldNotRewriteIdOrClass:c,viewId:null})}(c,n,i,0,0,e,s,o,a);return p.invoke()}}(this.collection,this.appxDomain,this.ctx,this.getRuntime,t,n,e)},t.prototype.call4ProtoContext=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=this.collection.getAPIInfoByName(t),o=xt(r,t);return wt(r,t,this.appxDomain,this.ctx,this.getRuntime,n,e,{caller:o})},t.prototype.destroy=function(){this.publicInstance=null,this.collection=null,this.unrefRuntime&&this.unrefRuntime()},t.prototype.registerCanIUseReportHandler=function(){var t=this;if(!this.hasRegisteredCanIUseReportHandler){var e=this.getRuntime();this.ctx.getFlag("enableCanIUseReport")&&e.getEventManager().addEventListener("pause",(function(){var n,i,r,o=[];t.collectedCanIUseKeys.forEach((function(t){o.push(t)})),o.length>0&&t.call("remoteLog",{actionId:"event",bizType:"TAC",param4:(n={key:o.join("|"),appxDomain:lt(t.appxDomain)||ut(t.appxDomain)?t.appxDomain.origin:e.getEnv().startupParams.appId},i=!0,n?"string"==typeof n?n:(r=n,r&&"object"==typeof r?Object.keys(r):[]).filter((function(t){return void 0!==n[t]||!i})).map((function(t){var e="".concat(t,"=");return e+=function(t){return null!==t&&"object"==typeof t?"function"==typeof t.toString?String(t):"":String(t)}(n[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),e})).join("^"):""),seedId:"miniapi.canIUse",type:"behavior"}),t.collectedCanIUseKeys.clear()})),this.hasRegisteredCanIUseReportHandler=!0}},t}();var le=function(){function t(t,e,n){var i=this;this.extraInfo={},this.scope4Domain=Object.create(null),this.scopeList4Plugin=[],this.dynamicAPIs={},this.ctx=t,this.getRuntime=e,this.unrefRuntime=n,this.callBridge=function(t,e,n,r,o){return i.callBridgeImpl(t,e,n,r,o)},this.callBridgeSync=function(t,e,n,r){return i.callBridgeSyncImpl(t,e,n,r)},this.on=K(this.on,this),this.off=K(this.off,this),this.emit=K(this.emit,this),this.defaultScope=new pe(this,ct,this.ctx,this.getRuntime)}return Object.defineProperty(t.prototype,"event",{get:function(){return this.getEventManager()},enumerable:!1,configurable:!0}),t.prototype.off=function(t,e){return this.getEventManager().removeEventListener(t,1,e)},t.prototype.on=function(t,e,n){var i=this.extraInfo;if(!i.reportMyOnComposite){var r=!0;try{var o=this.getRuntime().getBehaviorManager().get("reportMyOnComposite");o.report&&(t.startsWith("nbcomponent.")?o.report("myoncomposite"):r=!1)}catch(t){}r&&(i.reportMyOnComposite=!0)}return this.getEventManager().addEventListener(t,1,e,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.getEventManager().invokeTypedEvent(t,1,e)},t.prototype.callBridgeImpl=function(t,e,n,i,r){return Ot(this.ctx,this.getRuntime,t,e,n,void 0,r)},t.prototype.callBridgeSyncImpl=function(t,e,n,i){return Pt(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.dispose=function(){this.unrefRuntime&&this.unrefRuntime()},t.prototype.callInternalAPI=function(t,e,n,i,r){return function(t,e,n,i,r,o,a){if(e().getEnv()){var s=ft().config;s&&!0===s.noUseInternalAPI?Ot(t,e,n,i,r,o,a):Ot(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},r,o,a)}}(this.ctx,this.getRuntime,t,e,n,i,r)},t.prototype.callInternalAPISync=function(t,e,n,i){return function(t,e,n,i,r,o){if(e().getEnv()){var a=ft().config;return a&&!0===a.noUseInternalAPI?Pt(t,e,n,i,r,o):Pt(t,e,"internalAPI",{method:n,param:i,viewId:i&&i.viewId},void 0,o)}}(this.ctx,this.getRuntime,t,e,n,i)},t.prototype.getPluginScopes=function(){return this.scopeList4Plugin},t.prototype.createScope=function(t){if(pt(t))return this.defaultScope;var e=this.scope4Domain,n=lt(t),i=n||ut(t)?t.origin:t.scope;if(!e[i]){var r=e[i]=new pe(this,t,this.ctx,this.getRuntime);n&&this.scopeList4Plugin.push(r)}return e[i]},t.prototype.getScope=function(t){return pt(t)?this.defaultScope:this.scope4Domain[lt(t)||ut(t)?t.origin:t.scope]},t.prototype.getScopeByProviderInfo=function(t){if(function(t){return t&&1===t.providerType}(t)||function(t){return t&&2===t.providerType}(t))return this.scope4Domain[t.providerId];var e=this.getRuntime();return e?e.getKernel().isUsingExtensionMode?this.scope4Domain.app:this.defaultScope:void 0},t.prototype.setDynamicDistributedAPIs=function(t){this.dynamicAPIs=F(F({},this.dynamicAPIs),t)},t.prototype.getDynamicDistributedAPIs=function(){return this.dynamicAPIs},t.prototype.getEventManager=function(){var t;return this.eventInstance||(this.eventInstance=(t=this.getRuntime,new(function(){function e(){var t=this;this.eventMap=Object.create(null),this.eventInvokeMap=Object.create(null),this.taskManager=new vt((function(e,n,i){t.addEventListener(e,i?0:1,n)}))}return e.prototype.hasEventListener=function(t,e){var n=this.getCustomTypeContext(t);return e?!(!n[e]||!n[e].length):!!(n[0].length||n[1].length||n[2].length)},e.prototype.addEventListener=function(t,e,n,i){var r=this;if(void 0===i&&(i=n),this.hasCustomEventMatched(t,e,i)||this.eventMap[t][e].push({cache:i,invoke:n}),this.registerListener(t),1===e)return{remove:function(){r.removeEventListener(t,e,i)}}},e.prototype.removeEventListener=function(t,e,n){e?(this.removeEventListener4Type(t,e,n),this.hasEventListener(t)||this.unregisterListener(t)):(this.eventMap[t]=null,this.unregisterListener(t))},e.prototype.removeEventListener4Type=function(t,e,n){var i=this.getCustomTypeContext(t);n||(i[e]=[]),i[e].length&&(i[e]=i[e].filter((function(t){return t.cache!==n})))},e.prototype.invokeTypedEvent=function(t,e,n){if(this.hasEventListener(t)){var i=this.getCustomTypeContext(t)[e];if(i&&i.length)for(var r=0,o=i;r<o.length;r++)o[r].invoke.apply(null,n)}},e.prototype.getCustomTypeContext=function(t){return this.eventMap[t]||(this.eventMap[t]=[[],[],[]]),this.eventMap[t]},e.prototype.hasCustomEventMatched=function(t,e,n){return this.getCustomTypeContext(t)[e].some((function(t){return t.cache===n}))},e.prototype.registerListener=function(e){if(!this.eventInvokeMap[e]){var n=this.eventInvokeMap[e]=K(this.invokeEventImpl,this,e);t().getKernel().__EVENT_ADD_LISTENER__(e,n)}},e.prototype.unregisterListener=function(e){var n=this.eventInvokeMap[e];n&&(t().getKernel().__EVENT_REMOVE_LISTENER__(e,n),this.eventInvokeMap[e]=null)},e.prototype.invokeEventImpl=function(t,e){if(this.hasEventListener(t)){for(var n=this.getCustomTypeContext(t),i=0,r=n[0];i<r.length;i++)Y(r[i].invoke,null,e);var o=n[1].length,a=n[2].length;(o||a)&&function(t,e){var n;if(!(!t||!t.data)){var i=t.data,r=(delete(n=F({},i)).appInstanceId,delete n.instanceId,delete n.pageName,n);t.data=r,e(t),t.data=i}else e(t)}(e,(function(t){for(var e=0,i=n[1];e<i.length;e++)Y(i[e].invoke,null,t);for(var r=0,o=n[2];r<o.length;r++)Y(o[r].invoke,null,t.data)}))}},e}()))),this.eventInstance},t}(),ue=function(){function t(){this.apiMap=Object.create(null),this.publicProxyMap=Object.create(null)}return t.prototype.setCanIUses=function(t){this.typedCanIUseMapInfo=t},t.prototype.removeAPIs=function(t){for(var e=this.apiMap,n=0,i=t;n<i.length;n++)e[i[n]]=void 0},t.prototype.setAPIs=function(t){var e=this.apiMap;re(e);for(var n=0,i=t;n<i.length;n++){for(var r=i[n],o=r.values,a=0,s=r.keys;a<s.length;a++)e[l=s[a]]=o[l];if(r.namespace)for(var c=0,p=r.keys;c<p.length;c++){var l;e[l=p[c]].avaliableNamespace=r.namespace}}return ie(e),e},t.prototype.replaceAPI=function(t,e){var n=this.apiMap;n[t]&&e&&(n[t]=e)},t.prototype.setPublicCallProxyAPIs=function(t){var e=this.publicProxyMap;re(e);for(var n=0,i=t;n<i.length;n++)for(var r=i[n],o=r.values,a=0,s=r.keys;a<s.length;a++){var c=s[a];e[c]=o[c]}return ie(e),this.publicProxyMap=e,e},t.prototype.getPublicCallProxyAPIInfoByName=function(t){return this.publicProxyMap[t]},t.prototype.hasPublicCallProxyAPI=function(t){return!!this.publicProxyMap[t]},t.prototype.replacePublicCallProxyAPI=function(t,e){var n=this.publicProxyMap;n[t]&&e&&(n[t]=e)},t.prototype.has=function(t){return!!this.apiMap[t]},t.prototype.evaluateCanIUse=function(t,e,n,i){if(e()){var r=!n||pt(n)?"empty":"".concat(n.type,"_").concat(n.scope);this.typedCanIUseMap||(this.typedCanIUseMap=fe(this.typedCanIUseMapInfo,t,e));var o=this.typedCanIUseMap.evaluate,a=o[r];o[r]||(a=o[r]={});var s=this.typedCanIUseMapInfo.evaluate;if(s)for(var c=0,p=s;c<p.length;c++){var l=(0,p[c])(t,e,n,i,a);if(void 0!==l)return l}}return 0},t.prototype.getCanIUseMap=function(t,e,n){if(e()){if(this.typedCanIUseMap||(this.typedCanIUseMap=fe(this.typedCanIUseMapInfo,t,e)),1!==n&&2!==n){if(!this.typedCanIUseMap)return{};n=this.typedCanIUseMap.defaultType}return this.typedCanIUseMap?this.typedCanIUseMap[n]:{}}return{}},t.prototype.getAPIMap=function(){return this.apiMap},t.prototype.getAPIInfoByName=function(t){return this.apiMap[t]},t}();function fe(t,e,n){for(var i,r=((i={defaultType:t.defaultType,evaluate:{}})[1]=Object.create(null),i[2]=Object.create(null),i),o=0,a=[1,2];o<a.length;o++){var s=a[o],c=t[s];if(c){for(var p=r[s],l=0,u=c(e,n);l<u.length;l++)p=he(p,u[l]);r[s]=p}}return r}function he(t,e){if(!t)return e;if(!e)return t;var n=1===t?{}:F({},t);if("object"==typeof e)for(var i=0,r=Object.keys(e);i<r.length;i++){var o=r[i];n[o]=he(n[o],e[o])}return n}var de=function(){function t(t){this.callbackMap=Object.create(null),this.implMap=Object.create(null),this.appInstanceId=t}return t.prototype.dispose=function(){var t=this;Object.keys(this.implMap).forEach((function(e){t.removeEventListeners(e)})),this.implMap=null,this.callbackMap=null},t.prototype.addEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");if(!this.implMap[t]){var n=this.invokeEvent.bind(this,t);this.addEventImpl(t,n),this.implMap[t]=n}this.callbackMap[t]=this.callbackMap[t]||[];var i=this.callbackMap[t];i.indexOf(e)<0&&i.push(e)},t.prototype.removeEventListener=function(t,e){if("function"!=typeof e)throw new Error("callback is not function");this.callbackMap[t]=this.callbackMap[t]||[],this.callbackMap[t]=this.callbackMap[t].filter((function(t){return t!==e})),0===this.callbackMap[t].length&&(this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t])},t.prototype.removeEventListeners=function(t){this.callbackMap[t]=[],this.removeEventImpl(t,this.implMap[t]),delete this.implMap[t]},t.prototype.invokeEvent=function(t,e){for(var n=0,i=this.callbackMap[t]||[];n<i.length;n++)(0,i[n])(e)},t.prototype.addEventImpl=function(t,e){document.addEventListener(t,e)},t.prototype.removeEventImpl=function(t,e){document.removeEventListener(t,e)},t}(),ye=function(){function t(){this.flag=0}return t.prototype.invokeInternalEvent=function(t,e){},t.prototype.addEventListener=function(t,e,n){var i=this;if(n)return{remove:function(){i.removeEventListener(t,e)}}},t.prototype.removeEventListener=function(t,e){},t}(),ve=function(){function t(){}return t.prototype.isFirstPage=function(){return!0},t.prototype.getTopViewId=function(){},t.prototype.getTopInstance=function(){},t}(),ge=function(){},me=function(){function t(t,e){this.id="1",this.type=0,this._kernel=t,this._eventManager=e,this._nav=new ve,this._page={getInstanceById:function(){}},this._switch={get:ge}}return t.prototype.getLogger=function(){},t.prototype.getMeta=function(){return{getAppBehavior:ge,getTabBar:ge,isTabPage:ge,removeTabBarItem:ge,getAppExt:ge}},t.prototype.getBehaviorManager=function(){return{report:ge}},t.prototype.getApp=function(){return{appInstanceId:this.getKernel().appInstanceId}},t.prototype.getSubPackageManager=function(){},t.prototype.getTypedEventManager=function(){return this._typedEventManager||(this._typedEventManager=new ye),this._typedEventManager},t.prototype.getRegistry=function(){},t.prototype.setRegistry=function(){},t.prototype.getMiniExtensionManager=function(){},t.prototype.getSwitchManager=function(){return this._switch},t.prototype.getPageManager=function(){return this._page},t.prototype.getNav=function(){return this._nav},t.prototype.getEnv=function(){return this._env},t.prototype.setEnv=function(t){this._env=t},t.prototype.setBridge=function(t){this._bridge=t},t.prototype.getBridge=function(){return this._bridge},t.prototype.getKernel=function(){return this._kernel},t.prototype.getEventManager=function(){return this._eventManager},t}(),Ie=function(){};function be(t,e,n,i,r){var o="smallfish",a=new de(o),s={appInstanceId:o,userAgent:"",isDisableAppContext:!1,isUsingExtensionMode:!1,__BRIDGE_CALL__:function(t,e,n,i){"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.call(e,n,i):document.addEventListener("AlipayJSBridgeReady",(function(){AlipayJSBridge.call(e,n,i)}))},__BRIDGE_CALL_SYNC__:function(t,e,n){return{error:10,errorMessage:"callSync is not avaliable in H5WebView"}},__EVENT_ADD_LISTENER__:a.addEventListener.bind(a),__EVENT_REMOVE_LISTENER__:a.removeEventListener.bind(a),__FATAL_ERROR__:Ie,__GET_PLATFORM_ELEMENTS__:function(){return[]},__GET_STARTUP_PARAMS__:function(){return"undefined"!=typeof AlipayJSBridge?AlipayJSBridge.startupParams:{}},__EVAL__:Ie,__IMPORT_SCRIPT__:Ie,__PERFORMANCE__:Ie,__REPORT_ERROR__:Ie,__SET_PAGE_CONTEXT_GETTER__:Ie,__SET_CURRENT_PAGE_ID_GETTER__:Ie,__SET_RUNTIME_ERROR_REPORTER__:Ie,Promise:t,setTimeout:"undefined"==typeof window?e:e.bind(window),clearTimeout:"undefined"==typeof window?n:n.bind(window),setInterval:"undefined"==typeof window?i:i.bind(window),clearInterval:"undefined"==typeof window?r:r.bind(window),getFrameworkContextSymbol:Ie,reportHostError:Ie},c=new me(s,a);return c.setEnv(function(t){var e,n="undefined"!=typeof navigator?navigator.userAgent:"",i=function(t){if(ht)return ht;var e=t.match(/Griver\/(\d+\.\d+\.\d+)/),n=t.match(/AliApp\((\S*)/),i=t.match(/AriverApp\((\S*)/),r=t.match(/GriverApp\((\S*)/),o=!!n&&2===n.length&&n[1].split("/")||!!i&&2===i.length&&i[1].split("/")||!!r&&2===r.length&&r[1].split("/"),a="unknown",s="0.0.0",c=0,p="",l=function(t){if(!dt){var e=t.match(/UCBS\/((\d+)\.(\d+))/);if(e){var n=e[1]||"",i=parseInt(e[2],10),r=parseInt(e[3],10);dt=[n,i,r]}else dt=["",0,0]}return dt}(t),u=!(!l||!l[0]),f=t.indexOf("AlipayIDE")>-1,h=t.match(/Language\/(\S+)/),d=t.indexOf("Android")>-1,y=!d&&!!t.match(/iPhone|iPad/i),v=y?"ios":d?"android":"unknown",g=function(t,e){if(!yt){if(e){var n=t.match(/OS (\d+)_(\d+)(?:_(\d+))?/);if(n){var i=parseInt(n[1],10),r=parseInt(n[2],10),o=parseInt(n[3]||"0",10);yt=[i,r,o]}}yt=yt||[0,0,0]}return yt}(t,y);if(o?(a=o[0],s=o[1].match(/(\d+\.\d+\.\d+)/)[0],p=o[1].match(/([\w.]+)/)[0]):e&&(a="Griver",p=s=e[0]),"string"==typeof s){var m=function(t){for(var e=[],n=0,i=t.split(".");n<i.length;n++){var r=i[n];e.push(parseInt(r,10))}return e}(s);c=(m[0]?1e6*m[0]:0)+(m[1]?1e3*m[1]:0)+(m[2]?1*m[2]:0)}return ht={alipayVersionSequence:c,clientName:a.toLowerCase(),clientVersion:s,clientVersionSequence:c,iosMajorVersion:g[0],iosMinorVersion:g[1],iosPatchVersion:g[2],isAndroid:d,isIDE:f,isIOS:y,isUCWebView:u,language:h?h[1]:"",originalClientName:a,originalClientVersion:p,platform:v,ucMajorVersion:l[1],ucMinorVersion:l[2],ucVersion:l[0]}}(n),r=i.alipayVersionSequence,o=i.clientName,a=i.clientVersion,s=i.clientVersionSequence,c=i.isAndroid,p=i.isIDE,l=i.isIOS,u=i.isUCWebView,f=i.language,h=i.originalClientName,d=i.platform,y=i.ucMajorVersion,v=i.ucMinorVersion,g=i.ucVersion;return{alipayVersionSequence:r,appxVersion:"2.0.0",clientName:o,clientVersion:a,clientVersionSequence:s,isAndroid:c,isIDE:p,isIOS:l,isUCWebView:u,language:f,iosMajorVersion:i.iosMajorVersion,iosMinorVersion:i.iosMinorVersion,iosPatchVersion:i.iosPatchVersion,isPortalWorkerScene:void 0,get originalStartupParams(){return e||(e=t.__GET_STARTUP_PARAMS__()),e},originalClientName:h,packageAndRunSceneType:17,platform:d,startupParams:{get appId(){return e||(e=t.__GET_STARTUP_PARAMS__()),e&&e.appId||""}},ucMajorVersion:y,ucMinorVersion:v,ucVersion:g,userAgent:n}}(s)),c}var Oe=function(){function t(){var t,e=this;this.flags=((t={}).idempotentAPIWhiteList=["getStartupParams","getUserInfo","getRunScene","getSystemInfo","getClientInfo"],t.idempotentAPIBlackList=void 0,t.forbidAPIList=void 0,t.filterAppxDomainForSecurity=void 0,t.invokeBridgeWithCaller=void 0,t.disablePublicCallErrorCodeNormalize=void 0,t.ignoreCallbackWhenInvokeMyCall=void 0,t.enableBridgeResponseProxy=1,t.disableCanIUseByMetaInBridge=void 0,t.authCodeMapping4Aplus=void 0,t.uep=void 0,t.fixTempFilePath=void 0,t.selectorQueryContextClearActions=void 0,t.validSignContractURL=void 0,t.enableOpenEmbeddedMiniProgramScopedBridgeCall=void 0,t.openEmbeddedMiniProgramDefaultBridgeCallExtensionsWhiteList=void 0,t.disableGetWidthFromUA=void 0,t.enableGetterFromState4Audio=void 0,t.compositeElement=void 0,t.cameraContextPermissionCheck=void 0,t.navigateToMiniProgramQuery=1,t.enableExtConfigFromStartupParms=void 0,t.enableNavigateToMiniProgramScopedBridgeCall=void 0,t.disableLoadFontFaceLoadCanvasFont=void 0,t.disableSubscribeMsgJSAPI=void 0,t.fixNavigateBackMiniProgram=void 0,t.iosVersion4GetSystemInfoProxy=void 0,t.disableSystemInfoTaskCache282=void 0,t.enableAppXStorageCache=void 0,t),this.getFlags=function(){return e.flags}}return t.prototype.getFlag=function(t){return this.flags[t]},t.prototype.getCurrentCallStep=function(){},t}();function Pe(t,e,n,i){var r;Ot=Ee,Pt=_e;var o=function(t,e,n){var i=function(t,e,n){return new le(t,e,n)}(t,e,n);return i}(new Oe,(function(){return i})),a=o.defaultScope;return function(t,e,n,i){var r=i.getCollection();r.setCanIUses(n),r.setPublicCallProxyAPIs(e),function(t,e){var n=e.getCollection();n.setAPIs(t);var i=n.getAPIMap(),r=e.callSync4PublicNamed,o=e.callSync4PublicNamedInside,a=e.call4PublicNamed,s=e.call4PublicNamedInside,c=e.call4LinkedContext,p=e.call4ProtoContext,l=e.publicInstance;re(l);for(var u=0,f=t;u<f.length;u++){var h=f[u],d=h.namespace,y=l;if(d&&(y[d]||(y[d]={}),re(y=y[d])),h.linked)for(var v=0,g=h.keys;v<g.length;v++)i[E=g[v]]&&(y[E]=K(c,null,E,!1));else if(h.proto)for(var m=0,I=h.keys;m<I.length;m++)i[E=I[m]]&&(y[E]=K(p,null,E,!1));else for(var b=h.sync?h.inside?o:r:h.inside?s:a,O=0,P=h.keys;O<P.length;O++){var E;if(i[E=P[O]]){var _=i[E].feature;if("function"==typeof _&&!_())continue;y[E]=K(b,null,E)}}d&&ie(y)}ie(l)}(t,i),i.publicInstance}(t,e,((r={defaultType:1,evaluate:[]})[1]=function(){return n},r[2]=function(){return[]},r),a),i.setBridge(o),o}function Ee(t,e,n,i,r,o){e().getKernel().__BRIDGE_CALL__(o,n,i,r)}function _e(t,e,n,i,r){return e().getKernel().__BRIDGE_CALL_SYNC__(r,n,i)}var ke=Object.prototype.hasOwnProperty,Ce=Object.assign||function(t,e){for(var n,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),r=1;r<arguments.length;r++)for(var o in n=Object(arguments[r]))ke.call(n,o)&&(i[o]=n[o]);return i},Se=function(){return Se=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},Se.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Ae=Function.prototype.apply.call.bind(Function.prototype.apply);Function.prototype.bind;var we,xe,je,Te=JSON.stringify,Me=JSON.parse,De=encodeURIComponent;function Ne(t,e){return e.encode?e.strict?De(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):De(t):t}we||function(){var t="undefined"!=typeof WeakMap;we=t?WeakMap:function(){var t=Object.prototype.hasOwnProperty,e=function(t,e,n){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:n,writable:!0}):t[e]=n};function n(t){return Object(t)===t}function i(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(e(this,"_id","_WeakMap_"+o()+"."+o()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function r(e,i){if(!n(e)||!t.call(e,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof e)}function o(){return Math.random().toString().substring(2)}return e(i.prototype,"delete",(function(t){if(r(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t||(delete t[this._id],0))})),e(i.prototype,"get",(function(t){if(r(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),e(i.prototype,"has",(function(t){if(r(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),e(i.prototype,"set",(function(t,i){if(r(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var o=t[this._id];return o&&o[0]===t?(o[1]=i,this):(e(t,this._id,[t,i]),this)})),e(i,"_polyfill",!0),i}()}(),new we,"undefined"!=typeof SECURITY_FUNCTION_CALL&&(SECURITY_FUNCTION_CALL=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return"function"==typeof t?(Ae||(Ae=Function.prototype.apply.call.bind(Function.prototype.apply)),Ae(t,e,n)):t.call.apply(t,function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}([e],n,!1))}),"undefined"!=typeof SECURITY_FUNCTION_APPLY&&(SECURITY_FUNCTION_APPLY=function(t,e,n){return"function"==typeof t?(Ae||(Ae=Function.prototype.apply.call.bind(Function.prototype.apply)),Ae(t,e,n)):t.apply(e,n)}),function(t){t[t.Info=0]="Info",t[t.Warn=1]="Warn",t[t.Error=2]="Error"}(xe||(xe={})),function(t){t.AppxLifecycle="AppxLifecycle"}(je||(je={}));var Le="undefined"!=typeof HAS_INSIDE_FEATURE&&HAS_INSIDE_FEATURE||function(t){return!1};function Re(t){return t&&"openCapability"===t.type}"undefined"!=typeof ZEPHYR_HAS_INSIDE_FEATURE&&ZEPHYR_HAS_INSIDE_FEATURE,"undefined"!=typeof ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT&&ZEPHYR_IS_INSIDE_UNSUPPORT_ELEMENT;var Be="undefined"!=typeof nativeLog&&"undefined"!=typeof mqEnvironment;function Ue(t){return t&&"object"==typeof t?Object.keys(t):[]}function Fe(t,e){var n,i;return"%s"===t?e="object"==typeof(i=e)?Te(i):i+"":"%c"===t?e=function(t){var e=""+t;0===e.indexOf("#")&&(e=e.substr(1)),3===e.length&&(e=e.replace(/(.)/g,"$1$1"));var n,i=parseInt(e,16);return isNaN(i)&&(n="".concat(t," is invalid hex color."),Be?nativeLog(n,Date.now()):console.error(n,Date.now())),i}(e):"%b"===t?("string"==typeof(n=e)&&(n=n.replace(/^data:(\/|\w|\-|\.)+;base64,/i,"")),e=n):"%d"===t?e=parseInt(e,10):"%f"===t&&(e=parseFloat(e)),e}function Ve(t,e,n){var i;return n=n||{},Ue(e).forEach((function(r){var o,a,s,c=e[r];a=((o=c)||"").match(/(\w+)(%\w)$/i),s={k:o},a&&(s.k=a[1],s.t=a[2]),void 0!==(c=(i=s).k)&&(r in t||r in n)&&void 0===t[c]&&(t[c]=Fe(i.t,void 0===n[r]?t[r]:n[r]),c!==r&&delete t[r])})),t}function He(t){return"[object ArrayBuffer]"===(e=t,Object.prototype.toString.call(e))&&void 0!==t.byteLength;var e}function Ye(t){return e=t,i=function(t){switch(t.arrayFormat){case"index":return function(e,n,i){return null===n?[Ne(e,t),"[",i,"]"].join(""):[Ne(e,t),"[",Ne(i,t),"]=",Ne(n,t)].join("")};case"bracket":return function(e,n){return null===n?Ne(e,t):[Ne(e,t),"[]=",Ne(n,t)].join("")};default:return function(e,n){return null===n?Ne(e,t):[Ne(e,t),"=",Ne(n,t)].join("")}}}(n=Ce({encode:!0,strict:!0,arrayFormat:"none"},n)),e?Object.keys(e).sort().map((function(t){var r=e[t];if(void 0===r)return"";if(null===r)return Ne(t,n);if(Array.isArray(r)){var o=[];return r.slice().forEach((function(e){void 0!==e&&o.push(i(t,e,o.length))})),o.join("&")}return Ne(t,n)+"="+Ne(r,n)})).filter((function(t){return t.length>0})).join("&"):"";var e,n,i}function Ge(t){return/^application\/x-www-form-urlencoded\b/i.test(t)}var Ke={allowAbort:!0,returnEvent:{headersReceived:{feature:function(){return Le("a_request_headersReceived_2_8_7")},eventName:"requestTaskHeadersReceived",getPayload:function(t){return{header:t.data.headers}},getTaskId:function(t){return[t.data.requestTaskId]},taskId:function(){return"".concat(this.taskId)}}},t:!0,b:function(t){Ve(t,{header:"headers"}),t.requestTaskId=this.taskId,t.method=(t.method||"GET").toUpperCase(),t.enableSubErrorCode=!0;var e=this.runtime();if(void 0!==t.dataType||"arraybuffer"!==t.responseType&&"text"!==t.responseType)t.dataType=(t.dataType||"json").toLowerCase(),t.responseType=t.dataType;else{var n=e.getBehaviorManager().get("requestBehaviors",0),i=n.standard,r=n.report;r&&r("request.dataType is undefined and has request.responseType",{url:t.url,responseType:t.responseType}),i?t.dataType=t.responseType:(t.dataType=(t.dataType||"json").toLowerCase(),t.responseType=t.dataType)}t.responseType="base64"!==t.responseType&&"arraybuffer"!==t.responseType?"text":t.responseType;var o,a,s,c,p=t.headers=t.headers||{},l="";for(var u in p)if("content-type"==u.toLowerCase()){l=p[u];break}if(l||(l=p["content-type"]="application/json"),this.getEnvPlatformAndroid()&&(t.headers=function(t){for(var e=[],n=0,i=Ue(t);n<i.length;n++){var r=i[n],o={};o[r]=t[r],e.push(o)}return e}(t.headers)),"GET"===t.method?(t.hasAssembleParams=!0,t.url=(a=t.url,s=function(t,e){var n=e;return Ge(t)&&"object"==typeof e&&(n=function(t,e){for(var n={},i=0,r=Ue(e);i<r.length;i++){var o=r[i];n[o]="object"==typeof(a=e[o])?Te(a):a}var a;return n}(0,e)),n}(l,t.data),c=s||"","object"==typeof s&&(c=Ye(s)),""===c?a:(/\?/.test(a)?/&$/.test(a)||/\?$/.test(a)||(c="&"+c):c="?"+c,a+c))):"DELETE"===t.method&&(t.hasAssembleParams=!1),"string"!=typeof t.data&&He(t.data)||(t.data=function(t,e){return void 0===e?e="":"string"!=typeof e&&(e=Ge(t)?Ye(e):/^application\/json\b/i.test(t)||"object"==typeof e?Te(e):e.toString()),e}(l,t.data)),!t.referrerStrategy)if((o=this.appxDomain)&&"empty"===o.type||function(t){return t&&"app"===t.type}(this.appxDomain)){var f=e.getMeta().getAppBehavior();f&&f.requestReferrerStrategy&&("page"===f.requestReferrerStrategy?t.referrerStrategy="page":"index"===f.requestReferrerStrategy&&(t.referrerStrategy="index"))}else if(function(t){return t&&"extension"===t.type}(this.appxDomain)){var h=e.getMiniExtensionManager().getMetaByExtensionId({type:4,value:this.appxDomain.origin});if(h&&h.config&&h.config.behavior){var d=h.config.behavior;d.requestReferrerStrategy&&("page"===d.requestReferrerStrategy?t.referrerStrategy="page":"index"===d.requestReferrerStrategy&&(t.referrerStrategy="index"))}}},a:function(t,e){switch(Ve(t,{header:"headers",statusCode:"status"}),e.dataType){case"json":if(t.data)try{t.data=Me(t.data)}catch(e){void 0!==t.error&&0!==t.error||(t.error=14,t.errorMessage="JSON parse data error")}break;case"base64":t.data&&t.headers&&(t.data=(n=t.data,i=t.headers["Content-Type"]||t.headers["content-type"],n&&n.startsWith&&n.startsWith("data:")||n&&i&&(n="data:".concat(i,";base64,")+n),n));break;case"arraybuffer":if(t.data&&!He(t.data))try{t.data=function(t){for(var e=function(t){var e="",n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new Error('"atob" failed');for(var i=0,r=0,o=0,a=0;r=n.charAt(a);)a+=1,~(r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r))&&(i=o%4?64*i+r:r,o++%4&&(e+=String.fromCharCode(255&i>>(-2*o&6))));return e}(t),n=e.length,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.charCodeAt(r);return i.buffer}(t.data)}catch(e){void 0!==t.error&&0!==t.error||(t.error=14,t.errorMessage="parse arraybuffer data error")}}var n,i;if("status"in t){var r=t.status+"";/^[45]/.test(r)&&(void 0!==t.error&&0!==t.error||(t.error=19,t.errorMessage="http status error"))}t.appxProfile&&delete t.appxProfile,t.status&&(t.statusCode=t.status),t.headers&&(t.header=t.headers)},a_l:function(t){t.subErrorCode&&delete t.subErrorCode},c:function(){this.callScopedBridge("operateRequestTask",{operationType:"abort",requestTaskId:this.taskId})}},We="_appx_open_capability_";function qe(t,e){return"".concat(We).concat(t,"_").concat(e)}function Je(t,e,n){if(0===e.indexOf(We)){var i=n().getBehaviorManager().get("enableIsolation4OCStorage");if(i.report&&i.report("unexpected key when using storage API: ".concat(e,", type: ").concat(t)),i.standard)return{error:15,errorMessage:"无效key,key不能以".concat(We,"开头")}}}var ze,Qe,Ze,$e,Xe,tn={m:"setTinyLocalStorage",v:function(t){return Je("setStorage",String(t.key),this.runtime)},b:function(t){t.value=Te({APDataStorage:t.data}),t.data=t.value,Le("a_setStorage_value_remove_2_8_16")&&this.getFlag("removeSetStorageParamValue")&&(t.value=void 0),Re(this.appxDomain)&&!Le("a_storage_open_capability_2_8_15")?t.key=qe(this.appxDomain.origin,String(t.key)):t.key=String(t.key),t.type="user"},cache:{key:"jsApi_tinyLocalStorage",set:function(t,e){t.cache||(t.cache={}),t.cache[e.key]={data:e.data}}}},en={m:"getTinyLocalStorage",v:function(t){return Je("getStorage",String(t.key),this.runtime)},cache:{key:"jsApi_tinyLocalStorage",get:function(t,e){t.cache||(t.cache={});var n=t.cache[e.key];if(n&&"object"==typeof n){if(n.data)return{success:!0,data:n.data};if(11===n.error)return{success:!1,error:11}}},update:function(t,e,n){t.cache||(t.cache={}),n.data?t.cache[e.key]={data:n.data}:11===n.error&&(t.cache[e.key]={error:11})}},b:function(t){Re(this.appxDomain)&&!Le("a_storage_open_capability_2_8_15")?t.key=qe(this.appxDomain.origin,String(t.key)):t.key=String(t.key),t.type="user";var e=this.runtime().getNav();t.isAppFirstPage=e.isFirstPage()},a:function(t){if(11===t.error&&(t.data=null,delete t.error,delete t.errorMessage,delete t.success),t.data){var e=Me(t.data);t.data=e.APDataStorage}}};function nn(){if(!$e){var t=be(Promise,setTimeout,clearTimeout,setInterval,clearInterval);$e=Pe([],[],[],t)}return $e}function rn(t,e){var n=function(t){if("undefined"==typeof navigator||!navigator||void 0===navigator.userAgent)return function(){throw new Error("API ".concat(t," should not initialized by smallfish. Please check your environment"))}}(t);if(n)return n;var i=(Xe||(Xe=nn().defaultScope.publicInstance),Xe);if(!i[t]){var r=nn().defaultScope;r.getCollection().apiMap[t]=e;var o=r.call4PublicNamed;i[t]=o.bind(null,t)}return i[t]}ze||(ze={}),Qe||(Qe={}),Ze||(Ze={});var on=rn("setNavigationBar",{v:function(t){if(void 0!==t.frontColor){var e=Fe("%c",t.frontColor);if(16777215!==e&&0!==e)return{error:2,errorMessage:"frontColor 参数 ".concat(t.frontColor," 颜色值不合法")}}},b:function(t){t.reset&&(t.backgroundColor="#ffffff"),delete t.reset;var e,n="setTitle",i="setTitleColor",r="setBarBottomLineColor",o=this.optionPageViewId;return(e=o?{setTitle:{viewId:o},setTitleColor:{viewId:o},setBarBottomLineColor:{viewId:o}}:{setTitle:{},setTitleColor:{},setBarBottomLineColor:{}})[n]=Ve(e[n],{title:"title%s",image:"image%b"},t),e[i]=Ve(e[i],{backgroundColor:"color%c",frontColor:"frontColor%c"},t),e[r]=Ve(e[r],{borderBottomColor:"color%c"},t),e},d:function(t,e){var n="setTitle",i="setTitleColor",r="setBarBottomLineColor",o={};0!==Ue(t[n]).length&&this.callDefaultBridge(n,t[n],void 0,this.optionPageViewId),0!==Ue(t[r]).length&&(isNaN(t[r].color)?(o.error=2,o.errorMessage="borderBottomColor 颜色值不合法"):this.callDefaultBridge(r,t[r],void 0,this.optionPageViewId)),0!==Ue(t[i]).length?isNaN(t[i].color)?(o.error=2,o.errorMessage="frontColor 需和 backgroundColor 同时设置",e(o)):this.callDefaultBridge(i,t[i],(function(t){o=Se(Se({},t),o),e(o)}),this.optionPageViewId):e(o)}}),an=rn("request",Ke),sn=rn("setStorage",tn),cn=["current","urls"];function pn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var ln=["items","cancelButtonText"];function un(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function fn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var hn=["content"];function dn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var yn=["fileName","fileType"];function vn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}const gn={addFatigueAction:function(t){return n("addFatigueAction",t,{type:"async"})},addPhoneContact:function(t){return n("addPhoneContact",t,{type:"async"})},apDisableJSAPI:function(t){return n("apDisableJSAPI",t,{type:"async"})},appxrpc:function(t){return n("appxrpc",t,{type:"async"})},APRegionRPC:function(t){return n("APRegionRPC",t,{type:"async"})},batchQueryCdpSpaceInfo:function(t){return n("batchQueryCdpSpaceInfo",t,{type:"async"})},chooseImage:function(t){return n("chooseImage",t,{type:"async"})},exitApp:function(t){return n("exitApp",t,{type:"async"})},getAppToken:function(t){return n("getAppToken",t,{type:"async"})},getBatteryInfo:function(t){return n("getBatteryInfo",t,{type:"async"})},getClipboard:function(t){return n("getClipboard",t,{type:"async"})},getComponentAuth:function(t){return n("getComponentAuth",t,{type:"async"})},getFileInfo:function(t){return n("getFileInfo",t,{type:"async"})},getImageInfo:function(t){return n("getImageInfo",t,{type:"async"})},getOpenUserInfo:function(t){return n("getOpenUserInfo",t,{type:"async"})},getPaymentCode:function(t){return n("getPaymentCode",t,{type:"async"})},getSavedFileInfo:function(t){return n("getSavedFileInfo",t,{type:"async"})},getSavedFileList:function(t){return n("getSavedFileList",t,{type:"async"})},getScreenBrightness:function(t){return n("getScreenBrightness",t,{type:"async"})},getServerTime:function(t){return n("getServerTime",t,{type:"async"})},getSetting:function(t){return n("getSetting",t,{type:"async"})},getSystemInfo:function(t){return n("getSystemInfo",t,{type:"async"})},hideKeyboard:function(t){return n("hideKeyboard",t,{type:"async"})},hideLoading:function(t){return n("hideLoading",t,{type:"async"})},hideToast:function(t){return n("hideToast",t,{type:"async"})},inquireQuote:function(t){return n("inquireQuote",t,{type:"async"})},isInstalledApp:function(t){return n("isInstalledApp",t,{type:"async"})},makePhoneCall:function(t){return n("makePhoneCall",t,{type:"async"})},navigateBackMiniProgram:function(t){return n("navigateBackMiniProgram",t,{type:"async"})},navigateToMiniProgram:function(t){return n("navigateToMiniProgram",t,{type:"async"})},openDocument:function(t){return n("openDocument",t,{type:"async"})},openSchemeWithBacking:function(t){return n("openSchemeWithBacking",t,{type:"async"})},openSetting:function(t){return n("openSetting",t,{type:"async"})},prompt:function(t){return n("prompt",t,{type:"async"})},regionFetchAllApps:function(t){return n("regionFetchAllApps",t,{type:"async"})},regionSearchAppsByKeywords:function(t){return n("regionSearchAppsByKeywords",t,{type:"async"})},removeSavedFile:function(t){return n("removeSavedFile",t,{type:"async"})},rpc:function(t){return n("rpc",t,{type:"async"})},saveFile:function(t){return n("saveFile",t,{type:"async"})},saveImage:function(t){return n("saveImage",t,{type:"async"})},scan:function(t){return n("scan",t,{type:"async"})},setClipboard:function(t){return n("setClipboard",t,{type:"async"})},setKeepScreenOn:function(t){return n("setKeepScreenOn",t,{type:"async"})},setScreenBrightness:function(t){return n("setScreenBrightness",t,{type:"async"})},showLoading:function(t){return n("showLoading",t,{type:"async"})},signContract:function(t){return n("signContract",t,{type:"async"})},startApp:function(t){return n("startApp",t,{type:"async"})},startBizService:function(t){return n("startBizService",t,{type:"async"})},thirdPartyAuthForAc:function(t){return n("thirdPartyAuthForAc",t,{type:"async"})},tradePay:function(t){return n("tradePay",t,{type:"async"})},uploadApdidToken:function(t){return n("uploadApdidToken",t,{type:"async"})},vibrate:function(t){return n("vibrate",t,{type:"async"})},writeBLECharacteristicValue:function(t){return n("writeBLECharacteristicValue",t,{type:"async"})},alert:function(t){var e=t||{};n("alert",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({message:e.content,button:e.buttonText},r(e,o)))},choosePhoneContact:function(t){n("contact",t)},clearStorage:function(t){n("clearTinyLocalStorage",t)},confirm:function(t){var e=t||{};n("confirm",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({okButton:e.confirmButtonText,cancelButton:e.cancelButtonText,message:e.content},r(e,s)))},datePicker:function(t){var e=t||{},o=e.format,a=(e.currentDate,e.startDate),s=e.endDate,c=r(e,p);n("datePicker",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({mode:u[o||"yyyy-MM-dd"],beginDate:a,minDate:a,maxDate:s},c))},downloadFile:function(t){var e,o,a=t||{},s=a.url,c=r(a,f),p=null===(e=s.match(/\.(\w+)$/))||void 0===e?void 0:e[1];n("downloadFile",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({url:s,type:null===(o=d.find((function(t){return t.exts.includes(p||"png")})))||void 0===o?void 0:o.type},c))},getAuthCode:function(t){var e=t||{},i=e.scopes,o=r(e,y);n("getAuthCode",g(g({scopeNicks:i},o),{},{success:function(t){var e;return null===(e=o.success)||void 0===e?void 0:e.call(o,g(g({},t),{},{authCode:t.authCode||t.authcode}))}}))},getLocation:function(t){var e=t||{},o=e.type,a=r(e,m);n("getCurrentLocation",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({bizType:(null==t?void 0:t.bizType)||"alipayIntl",requestType:o},a))},getNetworkType:function(t){var e=t.success;n("getNetworkType",P(P({},r(t,b)),{},{success:function(t){e&&e(P(P({},t),{},{networkType:t.networkInfo.toLocaleUpperCase()}))}}))},getPhoneNumber:function(t){n("appxrpc",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({requestData:[{method:"getPhoneNumber"}]},t))},getSiteInfo:function(t){return function(t){var e=t.success,n=t.fail,i=t.complete;setTimeout((function(){var t=D();t&&t.length?null==e||e({siteName:t}):null==n||n(new Error("siteName is empty!")),null==i||i()}),0)}(t)},getStorage:rn("getStorage",en),hideNavigationBarLoading:function(){n("hideTitleLoading")},multiLevelSelect:function(t){n("beehiveMultilevelSelect",t)},navigateBack:function(t){n("popWindow",{options:t})},navigateTo:function(t){n("pushWindow",t)},previewImage:function(t){var e=t.current,o=t.urls,a=void 0===o?[]:o,s=r(t,cn);n("imageViewer",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pn(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({images:a.map((function(t){return{u:t}})),init:e},s))},redirectTo:function(t){var e=t||{},n=e.url,i=e.success,r=e.complete;window.location.replace(n),null==i||i({}),null==r||r({})},removeStorage:function(t){n("removeTinyLocalStorage",t)},request:an,setNavigationBar:on,setStorage:sn,showActionSheet:function(t){var e=t||{};n("actionSheet",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?un(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({btns:e.items,cancelBtn:e.cancelButtonText},r(e,ln)))},showAuthGuide:function(t){n("showAuthGuide",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fn(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({bizType:(null==t?void 0:t.bizType)||"alipayIntl"},t))},showNavigationBarLoading:function(){n("showTitleLoading")},showToast:function(t){var e=t||{};n("toast",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?dn(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({content:e.content||""},r(e,hn)))},uploadFile:function(t){var e=t||{};e.fileName,n("uploadFile",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:e.fileType},r(e,yn)))}};return e.default})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.my=t():e.my=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t,n){!function(e){if(window.AlipayJSBridge)return e();document.addEventListener("AlipayJSBridgeReady",(function(){return e()}),!1)}((function(){var r=(n||{}).type,o=void 0===r?"async":r;"async"===o&&window.AlipayJSBridge.call(e,t,(function(e){var n=t||{},r=n.success,o=n.fail,c=n.complete;e.error||e.errorCode?null==o||o(e):null==r||r(e),null==c||c(e)})),"callback"===o&&window.AlipayJSBridge.call(e,t)}))}e.d(t,{default:()=>_});function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=["content","buttonText"];function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var a=["confirmButtonText","cancelButtonText","content"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var p=["format","currentDate","startDate","endDate"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var y={"HH:mm:ss":0,"yyyy-MM-dd":1,"yyyy-MM-dd HH:mm:ss":2};var f=["url"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var O=[{type:"image",exts:["jpg","jpeg","png","bmp","gif"]},{type:"video",exts:["mp4","3gp","avi","wmv"]},{type:"audio",exts:["mp3","wma","wav"]}];var b=["scopes"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=["type"];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var P=["success"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push([n,e[n]]);return t}var D,E,k,T,I,C,B,N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"isString",value:function(e){return"string"==typeof e}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"isNotEmpty",value:function(e){return e&&e.length>0}},{key:"isEmpty",value:function(t){return!e.isNotEmpty(t)}},{key:"parseObjectSafe",value:function(e,t){try{return JSON.parse(e)}catch(e){console.warn("parseObjectSafe error: ",e)}return t}},{key:"encodeMap",value:function(e){if(e){var t=[];return A(e).forEach((function(e){var n=e[0],r=e[1];null!=r&&t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r)))})),t.length>0?t.join("&"):void 0}}}],null&&S(t.prototype,null),n&&S(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function L(){var e,t=null===(e=T)||void 0===e?void 0:e.siteName;return N.isNotEmpty(t)?t:(t=(I||(I=function(){var e={};A(x(window.location.search)).forEach((function(t){var n=t[0],r=t[1],o=n.toLowerCase();if("query"===o)try{e.query=x(r)}catch(e){console.warn("parse query error: ",e)}else"referrerinfo"===o?e.referrerInfo=x(r):e[n]=r}));var t=window.location.hash;if(t){var n=t.indexOf("?");e.hashPath=n>0?t.substring(1,n):t.substring(1),e.hashQuery=x(t)}return e}()),I).site,N.isNotEmpty(t)?t:void console.error("no siteName! please specify siteName in initWebPolyfill(...)"))}function x(e){var t,n={};if(N.isEmpty(e))return n;var r=e.indexOf("?");return r>=0&&(e=e.substring(r+1)),null===(t=e.split("&"))||void 0===t||t.forEach((function(e){var t=e.split("=");if(!(t.length<2)){var r=decodeURIComponent(t[0]);n[r]=decodeURIComponent(t[1])}})),n}!function(e){e.EASYPAISA="EASYPAISA",e.TRUEMONEY="TRUEMONEY",e.KAKAOPAY="KAKAOPAY",e.BKASH="BKASH",e.ALIPAY_CN="ALIPAY_CN",e.ALIPAY_HK="ALIPAY_HK",e.ALIPAY_MO="ALIPAY_MO",e.GCASH="GCASH",e.TNG="TNG",e.DANA="DANA"}(D||(D={})),(k=E||(E={})).alipayhk="alipayhk",k.alipaymo="alipaymo",k.gcash="gcash",k.tngd="tngd",k.dana="dana",k.kakaopay="kakaopay",r(r(r(r(r(r({},D.ALIPAY_HK,E.alipayhk),D.ALIPAY_MO,E.alipaymo),D.GCASH,E.gcash),D.DANA,E.dana),D.TNG,E.tngd),D.KAKAOPAY,E.kakaopay),(B=C||(C={})).STABLE="STABLE",B.TEST="TEST",B.PRE="PRE",B.PROD="PROD";var F=["current","urls"];function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var M=["items","cancelButtonText"];function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var H=["content"];function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var U=["fileName","fileType"];function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const _={addFatigueAction:function(e){return n("addFatigueAction",e,{type:"async"})},addPhoneContact:function(e){return n("addPhoneContact",e,{type:"async"})},apDisableJSAPI:function(e){return n("apDisableJSAPI",e,{type:"async"})},appxrpc:function(e){return n("appxrpc",e,{type:"async"})},APRegionRPC:function(e){return n("APRegionRPC",e,{type:"async"})},batchQueryCdpSpaceInfo:function(e){return n("batchQueryCdpSpaceInfo",e,{type:"async"})},chooseImage:function(e){return n("chooseImage",e,{type:"async"})},exitApp:function(e){return n("exitApp",e,{type:"async"})},getAppToken:function(e){return n("getAppToken",e,{type:"async"})},getBatteryInfo:function(e){return n("getBatteryInfo",e,{type:"async"})},getClipboard:function(e){return n("getClipboard",e,{type:"async"})},getComponentAuth:function(e){return n("getComponentAuth",e,{type:"async"})},getFileInfo:function(e){return n("getFileInfo",e,{type:"async"})},getImageInfo:function(e){return n("getImageInfo",e,{type:"async"})},getOpenUserInfo:function(e){return n("getOpenUserInfo",e,{type:"async"})},getPaymentCode:function(e){return n("getPaymentCode",e,{type:"async"})},getSavedFileInfo:function(e){return n("getSavedFileInfo",e,{type:"async"})},getSavedFileList:function(e){return n("getSavedFileList",e,{type:"async"})},getScreenBrightness:function(e){return n("getScreenBrightness",e,{type:"async"})},getServerTime:function(e){return n("getServerTime",e,{type:"async"})},getSetting:function(e){return n("getSetting",e,{type:"async"})},getStorage:function(e){return n("getStorage",e,{type:"async"})},getSystemInfo:function(e){return n("getSystemInfo",e,{type:"async"})},hideKeyboard:function(e){return n("hideKeyboard",e,{type:"async"})},hideLoading:function(e){return n("hideLoading",e,{type:"async"})},hideToast:function(e){return n("hideToast",e,{type:"async"})},inquireQuote:function(e){return n("inquireQuote",e,{type:"async"})},isInstalledApp:function(e){return n("isInstalledApp",e,{type:"async"})},makePhoneCall:function(e){return n("makePhoneCall",e,{type:"async"})},navigateBackMiniProgram:function(e){return n("navigateBackMiniProgram",e,{type:"async"})},navigateToMiniProgram:function(e){return n("navigateToMiniProgram",e,{type:"async"})},openDocument:function(e){return n("openDocument",e,{type:"async"})},openSchemeWithBacking:function(e){return n("openSchemeWithBacking",e,{type:"async"})},openSetting:function(e){return n("openSetting",e,{type:"async"})},prompt:function(e){return n("prompt",e,{type:"async"})},regionFetchAllApps:function(e){return n("regionFetchAllApps",e,{type:"async"})},regionSearchAppsByKeywords:function(e){return n("regionSearchAppsByKeywords",e,{type:"async"})},removeSavedFile:function(e){return n("removeSavedFile",e,{type:"async"})},request:function(e){return n("request",e,{type:"async"})},rpc:function(e){return n("rpc",e,{type:"async"})},saveFile:function(e){return n("saveFile",e,{type:"async"})},saveImage:function(e){return n("saveImage",e,{type:"async"})},scan:function(e){return n("scan",e,{type:"async"})},setClipboard:function(e){return n("setClipboard",e,{type:"async"})},setKeepScreenOn:function(e){return n("setKeepScreenOn",e,{type:"async"})},setNavigationBar:function(e){return n("setNavigationBar",e,{type:"async"})},setScreenBrightness:function(e){return n("setScreenBrightness",e,{type:"async"})},setStorage:function(e){return n("setStorage",e,{type:"async"})},showLoading:function(e){return n("showLoading",e,{type:"async"})},signContract:function(e){return n("signContract",e,{type:"async"})},startApp:function(e){return n("startApp",e,{type:"async"})},startBizService:function(e){return n("startBizService",e,{type:"async"})},thirdPartyAuthForAc:function(e){return n("thirdPartyAuthForAc",e,{type:"async"})},tradePay:function(e){return n("tradePay",e,{type:"async"})},uploadApdidToken:function(e){return n("uploadApdidToken",e,{type:"async"})},vibrate:function(e){return n("vibrate",e,{type:"async"})},writeBLECharacteristicValue:function(e){return n("writeBLECharacteristicValue",e,{type:"async"})},alert:function(e){var t=e||{};n("alert",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({message:t.content,button:t.buttonText},o(t,c)))},choosePhoneContact:function(e){n("contact",e)},clearStorage:function(e){n("clearTinyLocalStorage",e)},confirm:function(e){var t=e||{};n("confirm",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({okButton:t.confirmButtonText,cancelButton:t.cancelButtonText,message:t.content},o(t,a)))},datePicker:function(e){var t=e||{},c=t.format,i=(t.currentDate,t.startDate),a=t.endDate,u=o(t,p);n("datePicker",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({mode:y[c||"yyyy-MM-dd"],beginDate:i,minDate:i,maxDate:a},u))},downloadFile:function(e){var t,c,i=e||{},a=i.url,u=o(i,f),p=null===(t=a.match(/\.(\w+)$/))||void 0===t?void 0:t[1];n("downloadFile",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({url:a,type:null===(c=O.find((function(e){return e.exts.includes(p||"png")})))||void 0===c?void 0:c.type},u))},getAuthCode:function(e){var t=e||{},r=t.scopes,c=o(t,b);n("getAuthCode",d(d({scopeNicks:r},c),{},{success:function(e){var t;return null===(t=c.success)||void 0===t?void 0:t.call(c,d(d({},e),{},{authCode:e.authCode||e.authcode}))}}))},getLocation:function(e){var t=e||{},c=t.type,i=o(t,v);n("getCurrentLocation",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({bizType:(null==e?void 0:e.bizType)||"alipayIntl",requestType:c},i))},getNetworkType:function(e){var t=e.success;n("getNetworkType",m(m({},o(e,P)),{},{success:function(e){t&&t(m(m({},e),{},{networkType:e.networkInfo.toLocaleUpperCase()}))}}))},getPhoneNumber:function(e){n("appxrpc",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({requestData:[{method:"getPhoneNumber"}]},e))},getSiteInfo:function(e){return function(e){var t=e.success,n=e.fail,r=e.complete;setTimeout((function(){var e=L();e&&e.length?null==t||t({siteName:e}):null==n||n(new Error("siteName is empty!")),null==r||r()}),0)}(e)},hideNavigationBarLoading:function(){n("hideTitleLoading")},multiLevelSelect:function(e){n("beehiveMultilevelSelect",e)},navigateBack:function(e){n("popWindow",{options:e})},navigateTo:function(e){n("pushWindow",e)},previewImage:function(e){var t=e.current,c=e.urls,i=void 0===c?[]:c,a=o(e,F);n("imageViewer",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({images:i.map((function(e){return{u:e}})),init:t},a))},redirectTo:function(e){var t=e||{},n=t.url,r=t.success,o=t.complete;window.location.replace(n),null==r||r({}),null==o||o({})},removeStorage:function(e){n("removeTinyLocalStorage",e)},showActionSheet:function(e){var t=e||{};n("actionSheet",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({btns:t.items,cancelBtn:t.cancelButtonText},o(t,M)))},showAuthGuide:function(e){n("showAuthGuide",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({bizType:(null==e?void 0:e.bizType)||"alipayIntl"},e))},showNavigationBarLoading:function(){n("showTitleLoading")},showToast:function(e){var t=e||{};n("toast",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({content:t.content||""},o(t,H)))},uploadFile:function(e){var t=e||{};t.fileName,n("uploadFile",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:t.fileType},o(t,U)))}};return t.default})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hylid-bridge",
3
- "version": "4.0.21",
3
+ "version": "4.0.22",
4
4
  "main": "lib/index.js",
5
5
  "description": "Unite Api For MiniProgram Project",
6
6
  "files": [
@@ -53,16 +53,14 @@
53
53
  },
54
54
  "license": "MIT",
55
55
  "dependencies": {
56
- "@alipay/intl-callapp": "^1.1.14",
57
- "@alipay/stdlib": "^1.22.5",
58
56
  "@babel/runtime": "7.18.9",
59
57
  "@goldfishjs/utils": "^2.18.0",
60
- "@hylid/call": "^4.0.21",
61
- "@hylid/custom-jsapi": "^4.0.21",
62
- "@hylid/env": "^4.0.21",
63
- "@hylid/types": "^4.0.21",
58
+ "@hylid/call": "^4.0.22",
59
+ "@hylid/custom-jsapi": "^4.0.22",
60
+ "@hylid/env": "^4.0.22",
61
+ "@hylid/types": "^4.0.22",
64
62
  "@types/miniprogram": "^1.0.3",
65
- "miniapp-web-jsapi": "^4.0.21",
63
+ "miniapp-web-jsapi": "^4.0.22",
66
64
  "qs-es5": "^6.8.4",
67
65
  "url-parse": "^1.5.10"
68
66
  },
@@ -1,2 +0,0 @@
1
- import fill from '../../../common/apis/custom/web/getStorage';
2
- export default fill;
@@ -1,3 +0,0 @@
1
- // auto-generated
2
- import fill from '../../../common/apis/custom/web/getStorage';
3
- export default fill;
@@ -1,2 +0,0 @@
1
- import fill from '../../../common/apis/custom/web/request';
2
- export default fill;
@@ -1,3 +0,0 @@
1
- // auto-generated
2
- import fill from '../../../common/apis/custom/web/request';
3
- export default fill;
@@ -1,2 +0,0 @@
1
- import fill from '../../../common/apis/custom/web/setNavigationBar';
2
- export default fill;
@@ -1,3 +0,0 @@
1
- // auto-generated
2
- import fill from '../../../common/apis/custom/web/setNavigationBar';
3
- export default fill;
@@ -1,2 +0,0 @@
1
- import fill from '../../../common/apis/custom/web/setStorage';
2
- export default fill;
@@ -1,3 +0,0 @@
1
- // auto-generated
2
- import fill from '../../../common/apis/custom/web/setStorage';
3
- export default fill;
@@ -1,3 +0,0 @@
1
- import { PickMPAttr } from '@hylid/types';
2
- declare const getStorage: PickMPAttr<'getStorage'>;
3
- export default getStorage;
@@ -1,3 +0,0 @@
1
- import { getStorage as _getStorage } from '@alipay/stdlib/jsapi/smallfish/my';
2
- var getStorage = _getStorage;
3
- export default getStorage;
@@ -1,3 +0,0 @@
1
- import { PickMPAttr } from '@hylid/types';
2
- declare const request: PickMPAttr<'request'>;
3
- export default request;
@@ -1,3 +0,0 @@
1
- import { request as _request } from '@alipay/stdlib/jsapi/smallfish/my';
2
- var request = _request;
3
- export default request;
@@ -1,3 +0,0 @@
1
- import { PickMPAttr } from '@hylid/types';
2
- declare const setNavigationBar: PickMPAttr<'setNavigationBar'>;
3
- export default setNavigationBar;
@@ -1,3 +0,0 @@
1
- import { setNavigationBar as _setNavigationBar } from '@alipay/stdlib/jsapi/smallfish/my';
2
- var setNavigationBar = _setNavigationBar;
3
- export default setNavigationBar;
@@ -1,3 +0,0 @@
1
- import { PickMPAttr } from '@hylid/types';
2
- declare const setStorage: PickMPAttr<'setStorage'>;
3
- export default setStorage;
@@ -1,3 +0,0 @@
1
- import { setStorage as _setStorage } from '@alipay/stdlib/jsapi/smallfish/my';
2
- var setStorage = _setStorage;
3
- export default setStorage;