@cloudbase/js-sdk 3.3.14-beta.1 → 3.3.14-beta.3

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 (102) hide show
  1. package/ai/dist/index.esm.js +3 -0
  2. package/ai/dist/index.js +21 -0
  3. package/ai/package.json +6 -0
  4. package/analytics/dist/index.esm.js +4 -0
  5. package/analytics/dist/index.js +9 -0
  6. package/analytics/package.json +6 -0
  7. package/apis/dist/index.esm.js +3 -0
  8. package/apis/dist/index.js +21 -0
  9. package/apis/package.json +6 -0
  10. package/app/dist/index.esm.js +11 -0
  11. package/app/dist/index.js +18 -0
  12. package/app/package.json +6 -0
  13. package/auth/dist/index.esm.js +8 -0
  14. package/auth/dist/index.js +13 -0
  15. package/auth/package.json +6 -0
  16. package/cloudrun/dist/index.esm.js +3 -0
  17. package/cloudrun/dist/index.js +21 -0
  18. package/cloudrun/package.json +6 -0
  19. package/container/dist/index.esm.js +8 -0
  20. package/container/dist/index.js +13 -0
  21. package/container/package.json +6 -0
  22. package/database/dist/index.d.ts +3 -0
  23. package/database/dist/index.esm.js +503 -0
  24. package/database/dist/index.js +509 -0
  25. package/database/package.json +6 -0
  26. package/dist/index.cjs.js +40 -2
  27. package/dist/index.esm.js +35 -2
  28. package/functions/dist/index.esm.js +8 -0
  29. package/functions/dist/index.js +13 -0
  30. package/functions/package.json +6 -0
  31. package/miniprogram_dist/app.js +1 -1
  32. package/miniprogram_dist/database.js +1 -1
  33. package/miniprogram_dist/index.js +1 -1
  34. package/miniprogram_dist/model.js +1 -1
  35. package/miniprogram_dist/mysql.js +1 -1
  36. package/model/dist/index.esm.js +3 -0
  37. package/model/dist/index.js +21 -0
  38. package/model/package.json +6 -0
  39. package/mysql/dist/index.esm.js +3 -0
  40. package/mysql/dist/index.js +21 -0
  41. package/mysql/package.json +6 -0
  42. package/oauth/dist/index.esm.js +3 -0
  43. package/oauth/dist/index.js +21 -0
  44. package/oauth/package.json +6 -0
  45. package/package.json +44 -68
  46. package/realtime/dist/index.esm.js +8 -0
  47. package/realtime/dist/index.js +13 -0
  48. package/realtime/package.json +6 -0
  49. package/storage/dist/index.esm.js +4 -0
  50. package/storage/dist/index.js +9 -0
  51. package/storage/package.json +6 -0
  52. package/dist/index.cjs.js.LICENSE.txt +0 -37
  53. package/dist/index.esm.js.LICENSE.txt +0 -37
  54. package/dist/packages/ai/index.cjs.js +0 -2
  55. package/dist/packages/ai/index.cjs.js.LICENSE.txt +0 -22
  56. package/dist/packages/ai/index.esm.js +0 -2
  57. package/dist/packages/ai/index.esm.js.LICENSE.txt +0 -22
  58. package/dist/packages/analytics/index.cjs.js +0 -1
  59. package/dist/packages/analytics/index.esm.js +0 -1
  60. package/dist/packages/apis/index.cjs.js +0 -1
  61. package/dist/packages/apis/index.esm.js +0 -1
  62. package/dist/packages/app/index.cjs.js +0 -2
  63. package/dist/packages/app/index.cjs.js.LICENSE.txt +0 -7
  64. package/dist/packages/app/index.esm.js +0 -2
  65. package/dist/packages/app/index.esm.js.LICENSE.txt +0 -7
  66. package/dist/packages/auth/index.cjs.js +0 -2
  67. package/dist/packages/auth/index.cjs.js.LICENSE.txt +0 -22
  68. package/dist/packages/auth/index.esm.js +0 -2
  69. package/dist/packages/auth/index.esm.js.LICENSE.txt +0 -22
  70. package/dist/packages/cloudrun/index.cjs.js +0 -1
  71. package/dist/packages/cloudrun/index.esm.js +0 -1
  72. package/dist/packages/container/index.cjs.js +0 -1
  73. package/dist/packages/container/index.esm.js +0 -1
  74. package/dist/packages/functions/index.cjs.js +0 -1
  75. package/dist/packages/functions/index.esm.js +0 -1
  76. package/dist/packages/model/index.cjs.js +0 -1
  77. package/dist/packages/model/index.esm.js +0 -1
  78. package/dist/packages/mysql/index.cjs.js +0 -1
  79. package/dist/packages/mysql/index.esm.js +0 -1
  80. package/dist/packages/oauth/index.cjs.js +0 -2
  81. package/dist/packages/oauth/index.cjs.js.LICENSE.txt +0 -14
  82. package/dist/packages/oauth/index.esm.js +0 -2
  83. package/dist/packages/oauth/index.esm.js.LICENSE.txt +0 -14
  84. package/dist/packages/realtime/index.cjs.js +0 -1
  85. package/dist/packages/realtime/index.esm.js +0 -1
  86. package/dist/packages/storage/index.cjs.js +0 -1
  87. package/dist/packages/storage/index.esm.js +0 -1
  88. package/dist/packages/utilities/index.cjs.js +0 -1
  89. package/dist/packages/utilities/index.esm.js +0 -1
  90. /package/{dist/packages/ai → ai/dist}/index.d.ts +0 -0
  91. /package/{dist/packages/analytics → analytics/dist}/index.d.ts +0 -0
  92. /package/{dist/packages/apis → apis/dist}/index.d.ts +0 -0
  93. /package/{dist/packages/app → app/dist}/index.d.ts +0 -0
  94. /package/{dist/packages/auth → auth/dist}/index.d.ts +0 -0
  95. /package/{dist/packages/cloudrun → cloudrun/dist}/index.d.ts +0 -0
  96. /package/{dist/packages/container → container/dist}/index.d.ts +0 -0
  97. /package/{dist/packages/functions → functions/dist}/index.d.ts +0 -0
  98. /package/{dist/packages/model → model/dist}/index.d.ts +0 -0
  99. /package/{dist/packages/mysql → mysql/dist}/index.d.ts +0 -0
  100. /package/{dist/packages/oauth → oauth/dist}/index.d.ts +0 -0
  101. /package/{dist/packages/realtime → realtime/dist}/index.d.ts +0 -0
  102. /package/{dist/packages/storage → storage/dist}/index.d.ts +0 -0
@@ -1 +0,0 @@
1
- (()=>{"use strict";var t={829:(t,e,n)=>{var r;n.r(e),n.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>a,StorageType:()=>r,formatUrl:()=>i}),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},a=function(){};function i(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var a in n)""===o?!r&&(e+="?"):o+="&",o+=a+"="+encodeURIComponent(n[a]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}},949:(t,e,n)=>{function r(t){this.message=t}n.r(e),n.d(e,{InvalidTokenError:()=>i,default:()=>c}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=e.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function a(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(o(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return o(e)}}function i(t){this.message=t}i.prototype=new Error,i.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(a(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}}},385:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerCloudrun=e.requestContainer=void 0;var i=n(515).constants.ERRORS,c="cloudrun",s=function(){function t(){}return t.prototype.callContainer=function(t,e){return o(this,void 0,void 0,(function(){var n,o,s;return a(this,(function(a){switch(a.label){case 0:if(n=t.name,o=t.data,!n)throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid name")}));try{s=o?JSON.stringify(o):""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid data")}))}return[4,u.call(this,r(r({},t),{data:s}),e)];case 1:return[2,a.sent()]}}))}))},t}();function u(t,e){var n;return o(this,void 0,void 0,(function(){var o,i,c,s,u,l,f,d,p,h,v,y,b,g,m;return a(this,(function(a){switch(a.label){case 0:if(o=t.name,i=t.data,c=t.path,s=void 0===c?"":c,u=t.method,l=t.header,f=void 0===l?{}:l,d=this.getEndPointWithKey("GATEWAY"),p=d.BASE_URL,h=d.PROTOCOL,v="".concat(h).concat(p,"/cloudrun/").concat(o),y=s.startsWith("/")?s:"/".concat(s),b=["GET","HEAD"].includes(null===(n=null==u?void 0:u.toUpperCase)||void 0===n?void 0:n.call(u)))try{g={};try{g=JSON.parse(i)}catch(t){g=i||{}}y="".concat(y).concat(y.includes("?")?"&":"?").concat(Object.keys(g).map((function(t){return"".concat(t,"=").concat(g[t])})).join("&"))}catch(t){}return[4,this.request.fetch(r(r({method:u||"POST",headers:Object.assign({},{"Content-Type":"application/json; charset=utf-8"},f)},b?{}:{body:i}),{url:"".concat(v).concat(y),customReqOpts:e}))];case 1:return m=a.sent(),"node-sdk"===(null==e?void 0:e.from)?[2,m]:[4,m.data];case 2:return[2,a.sent()]}}))}))}e.requestContainer=u;var l=new s,f={name:c,entity:{callContainer:l.callContainer}};try{cloudbase.registerComponent(f)}catch(t){}function d(t){try{t.registerComponent(f)}catch(t){console.warn(t)}}e.registerCloudrun=d;try{window.registerCloudrun=d}catch(t){}},842:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__decorate||function(t,e,n,r){var o,a=arguments.length,i=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(i=(a<3?o(i):a>3?o(e,n,i):o(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerFunctions=void 0;var s=n(Object(function(){var t=new Error("Cannot find module '@cloudbase/types/functions'");throw t.code="MODULE_NOT_FOUND",t}())),u=n(515),l=n(385),f=u.constants.getSdkName,d=u.constants.ERRORS,p=u.constants.COMMUNITY_SITE_URL,h=u.utils.execCallback,v=u.helpers.catchErrorsDecorator,y="functions",b=new(function(){function t(){}var e,n,b;return t.prototype.callFunction=function(t,e,n){var o,a,s;return i(this,void 0,void 0,(function(){var i,p,v,b,g,m,w,O,_,E,S,j,I,P,R,A,x,N,C,k,M,T,D;return c(this,(function(c){switch(c.label){case 0:if(i=t.name,p=t.data,v=t.query,b=t.parse,g=t.search,m=t.type,w=t.path,O=void 0===w?"":w,_=t.method,E=t.header,S=void 0===E?{}:E,!i)throw new Error(JSON.stringify({code:d.INVALID_PARAMS,msg:"[".concat(y,".callFunction] invalid function name")}));try{j=p?JSON.stringify(p):""}catch(t){throw new Error(JSON.stringify({code:d.INVALID_PARAMS,msg:"[".concat(y,".callFunction] invalid data")}))}return"cloudrun"!==m?[3,2]:(I=u.utils.generateRequestId(),[4,l.requestContainer.call(this,{name:i,data:j,path:O,method:_,header:r(r({},S),{"X-Request-Id":I})})]);case 1:return[2,{result:T=c.sent(),requestId:I}];case 2:R=(P=this).request,A=P.config,x="functions.invokeFunction",N={inQuery:v,parse:b,search:g,function_name:i,request_data:j},C={},k=!("GATEWAY"!==A.endPointMode||(L=i,"lcap-common-service"===L||"lcap-datasource-test"===L||L.startsWith("lcap-data")||L.startsWith("lowcode-datasource")||"cloudbase_module"===L)||function(t){return"lowcode-wx-datasource"===t}(i)),c.label=3;case 3:return c.trys.push([3,8,,9]),k?[4,R.gateWay(r(r({},t),{path:"functions"}),n)]:[3,5];case 4:return M=c.sent(),C=r({requestId:M.requestId},(null===(o=M.data)||void 0===o?void 0:o.code)?M.data:{data:{response_data:M.data}}),[3,7];case 5:return[4,R.send(x,N,{endPointMode:"CLOUD_API",defaultQuery:(null===(a=null==p?void 0:p.params)||void 0===a?void 0:a.action)?{action:null===(s=null==p?void 0:p.params)||void 0===s?void 0:s.action}:{}},n)];case 6:C=c.sent(),c.label=7;case 7:if(C.code)return[2,h(e,null,C)];if(T=C.data.response_data,b||k)return[2,h(e,null,{result:T,requestId:C.requestId})];try{return T=JSON.parse(C.data.response_data),[2,h(e,null,{result:T,requestId:C.requestId})]}catch(t){h(e,new Error("[".concat(f(),"][").concat(d.INVALID_PARAMS,"][").concat(y,".callFunction] response data must be json")))}return[3,9];case 8:return D=c.sent(),h(e,D),[3,9];case 9:return[2]}var L}))}))},o([v({customInfo:{className:"Cloudbase",methodName:"callFunction"},title:"函数调用失败",messages:["请确认以下各项:"," 1 - 调用 callFunction() 的语法或参数是否正确"," 2 - 当前环境下是否存在此函数"," 3 - 函数安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(p)]}),a("design:type",Function),a("design:paramtypes",["function"==typeof(e=void 0!==s.ICallFunctionOptions&&s.ICallFunctionOptions)?e:Object,"function"==typeof(n="undefined"!=typeof Function&&Function)?n:Object,"function"==typeof(b=void 0!==s.ICustomReqOpts&&s.ICustomReqOpts)?b:Object]),a("design:returntype",Promise)],t.prototype,"callFunction",null),t}()),g={name:y,entity:{callFunction:b.callFunction}};try{cloudbase.registerComponent(g)}catch(t){}e.registerFunctions=function(t){try{t.registerComponent(g)}catch(t){console.warn(t)}}},662:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=i(n(853)),u=n(102);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(c=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var n=0,o=(0,u.isArray)(t)?t:[t];n<o.length;n++){var a=o[n],i=a.isMatch,c=a.genAdapter,s=a.runtime;if(i())return{adapter:r({isMatch:i},c(e)),runtime:s}}},e.useDefaultAdapter=function(){return{adapter:r({},s.genAdapter()),runtime:c.WEB}}},853:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebRequest=e.genAdapter=void 0;var s=n(829),u=n(102),l=n(78),f=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,a=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=a||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(a(a({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(a(a({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(a(a({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,c=void 0===i?{}:i,s={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",u=new FormData;return"post"===s?(Object.keys(e).forEach((function(t){u.append(t,e[t])})),u.append("key",r),u.append("file",n),this.request(a(a({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(a(a({},t),{method:"put",headers:c,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return i(this,void 0,Promise,(function(){var e,n,r,o;return c(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(a(a({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return i(this,void 0,Promise,(function(){var n,r,o,s,u,l,f,d,p,h,v,y,b,g=this;return c(this,(function(m){switch(m.label){case 0:return n=new AbortController,r=t.url,o=t.enableAbort,s=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,d=t.timeout,p=t.shouldThrowOnError,h=void 0===p||p,v=null!=d?d:this.timeout,f&&(f.aborted&&n.abort(),f.addEventListener("abort",(function(){return n.abort()}))),y=null,s&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),n.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(r,a(a({},t),{signal:n.signal})).then((function(t){return i(g,void 0,void 0,(function(){var e,n,r;return c(this,(function(o){switch(o.label){case 0:return clearTimeout(y),h?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,t.json()];case 2:e=r.apply(n,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(y),h)return Promise.reject(t)}))];case 1:return b=m.sent(),[2,{data:l?b.body:(null===(e=b.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?b.json():b.text(),statusCode:b.status,header:b.headers}]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var a,i,c=t.url,s=t.headers,f=void 0===s?{}:s,d=t.data,p=t.responseType,h=t.withCredentials,v=t.body,y=t.onUploadProgress,b=(0,u.formatUrl)((0,l.getProtocol)(),c,"get"===r?d:{}),g=new XMLHttpRequest;g.open(r,b),p&&(g.responseType=p),Object.keys(f).forEach((function(t){g.setRequestHeader(t,f[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=g.status;try{t.data="blob"===p?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===p?g.response:g.responseText}clearTimeout(a),o(t)}},e&&n.timeout&&(a=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),i=(0,u.isFormData)(d)?d:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(d):v||(d?JSON.stringify(d):void 0),h&&(g.withCredentials=!0),g.send(i)}))},e}(s.AbstractSDKRequest);e.WebRequest=f,e.genAdapter=function(){return{type:"default",root:window,reqClass:f,wsClass:WebSocket,localStorage}}},78:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.COMMUNITY_SITE_URL=e.IS_DEBUG_MODE=e.getProtocol=e.setProtocol=e.getSdkName=e.setSdkName=void 0;var n="@cloudbase/js-sdk";e.setSdkName=function(t){n=t},e.getSdkName=function(){return n};var r="https:";e.setProtocol=function(t){r=t},e.getProtocol=function(){return r},e.IS_DEBUG_MODE=("undefined"==typeof process||process.env,!1),e.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},630:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ERRORS=void 0,e.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},546:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(n(78),e),o(n(630),e),e.OATUH_LOGINTYPE="constants"},640:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.catchErrorsDecorator=void 0;var a=n(102),i=n(546),c=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(c=-1!==navigator.userAgent.indexOf("Firefox"));var s=c?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,u=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function l(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var a,i=e.stack.split("\n"),s=c?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]\\s*\\(.*\\)$")),l=c?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]")),f=i.findIndex((function(t){return s.test(t)}));if(-1!==f){var d=i.filter((function(t,e){return e>f}));d.unshift(i[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(a=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(d.join("\n"))}return a}e.catchErrorsDecorator=function(t){var e=t.mode,n=void 0===e?"async":e,c=t.customInfo,f=void 0===c?{}:c,d=t.title,p=t.messages,h=void 0===p?[]:p;return function(t,e,c){if(i.IS_DEBUG_MODE){var p=f.className||t.constructor.name,v=f.methodName||e,y=c.value,b=function(){var t="",e=(new Error).stack.split("\n"),n=e.findIndex((function(t){return s.test(t)}));if(-1!==n){var r=u.exec(e[n+1]||"");t=r?r[0]:""}return t}();c.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=l({err:new Error,className:p,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var r=t,o=t.message,i=t.error,c=t.error_description,s={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);s.subtitle=o,u.code&&(n?(n.code=u.code,n.msg=u.msg):(t.code=u.code,t.message=u.msg),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}})))}throw i&&c&&(s.subtitle=c,n?(n.code=i,n.msg=c):(t.code=i,t.message=c),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,a.printGroupLog)(s),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,i,c,s,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:p,methodName:v,sourceLink:b}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,y.apply(this,t)];case 2:return[2,o.sent()];case 3:throw n=o.sent(),r=n,i=n.message,c=n.error,s=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},i&&/^\{.*\}$/.test(i)&&(f=JSON.parse(i),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(n.code=f.code,n.message=f.msg),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}})))),c&&s&&(u.subtitle=s,e?(e.code=c,e.msg=s):(n.code=c,n.message=s),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,a.printGroupLog)(u),r;case 4:return[2]}}))}))}}}}},607:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(640),e)},515:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.langEvent=e.AbortController=e.jwt=e.helpers=e.utils=e.events=e.cache=e.adapters=e.constants=void 0;var c=a(n(546));e.constants=c;var s=a(n(662));e.adapters=s;var u=a(n(388));e.cache=u;var l=a(n(363));e.events=l;var f=a(n(587));e.langEvent=f;var d=a(n(102));e.utils=d;var p=a(n(607));e.helpers=p;var h=i(n(450));e.AbortController=h.default;var v={decode:i(n(949)).default};e.jwt=v},450:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,n){"abort"===e&&t.listeners.push(n)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=n},388:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CloudbaseCache=void 0;var c=n(829),s=n(102),u=n(546),l=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return o(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(c.AbstractStorage),f=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,a=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:((0,s.printWarn)(u.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new l(e.root));case"none":return new l(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=a)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:u.ERRORS.OPERATION_FAIL,msg:"[".concat((0,u.getSdkName)(),"][").concat(u.ERRORS.OPERATION_FAIL,"]setStore failed"),info:t}))}}else(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return a(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return a(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return a(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CloudbaseCache=f},363:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,a=e.length;o<a;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.removeEventListener=e.activateEvent=e.addEventListener=e.CloudbaseEventEmitter=e.IErrorEvent=e.CloudbaseEvent=void 0;var i=n(102),c=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=c;var s=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return o(e,t),e}(c);e.IErrorEvent=s;var u=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,i.isInstanceOf)(t,s))return console.error(t.error),this;var n=(0,i.isString)(t)?new c(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,u=this.listeners[r]?a([],this.listeners[r],!0):[];o<u.length;o++)u[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();e.CloudbaseEventEmitter=u;var l=new u;e.addEventListener=function(t,e){l.on(t,e)},e.activateEvent=function(t,e){void 0===e&&(e={}),l.fire(t,e)},e.removeEventListener=function(t,e){l.off(t,e)}},587:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var r=n(363);e.bus=new r.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},102:function(t,e,n){var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.parseCaptcha=e.parseQueryString=e.transformPhone=e.sleep=e.printGroupLog=e.throwError=e.printInfo=e.printError=e.printWarn=e.execCallback=e.createPromiseCallback=e.removeParam=e.getHash=e.getQuery=e.toQueryString=e.formatUrl=e.generateRequestId=e.genSeqId=e.isFormData=e.isInstanceOf=e.isNull=e.isPalinObject=e.isUndefined=e.isString=e.isArray=void 0;var o=n(546);e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isUndefined=function(t){return void 0===t},e.isPalinObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isNull=function(t){return"[object Null]"===Object.prototype.toString.call(t)},e.isInstanceOf=function(t,e){return t instanceof e},e.isFormData=function(t){return"[object FormData]"===Object.prototype.toString.call(t)},e.genSeqId=function(){return Math.random().toString(16).slice(2)},e.generateRequestId=function(){var t=(new Date).getTime(),e=(null===Date||void 0===Date?void 0:Date.now)&&1e3*Date.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:7&r|8).toString(16)}))},e.formatUrl=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)},e.toQueryString=function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var n=e||decodeURIComponent(window.location.search),r=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},e.getHash=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]".concat(t,"=([^&#]*)")));return e?e[1]:""},e.removeParam=function(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var a=(r=o.split("&")).length-1;a>=0;a-=1)r[a].split("=")[0]===t&&r.splice(a,1);n="".concat(n,"?").concat(r.join("&"))}return n},e.createPromiseCallback=function(){var t={};if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t},e.execCallback=function(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n},e.printWarn=function(t,e){console.warn("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.printError=function(t,e){console.error({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)})},e.printInfo=function(t,e){console.log("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.throwError=function(t,e){throw new Error(JSON.stringify({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)}))},e.printGroupLog=function(t){var e,n=t.title,r=t.subtitle,o=void 0===r?"":r,a=t.content,i=void 0===a?[]:a,c=t.printTrace,s=void 0!==c&&c,u=t.collapsed;void 0!==u&&u?(console.groupCollapsed||console.error)(n,o):(console.group||console.error)(n,o);for(var l=0,f=i;l<f.length;l++){var d=f[l],p=d.type,h=d.body;switch(p){case"info":console.log(h);break;case"warn":console.warn(h);break;case"error":console.error(h)}}s&&(console.trace||console.log)("stack trace:"),null===(e=console.groupEnd)||void 0===e||e.call(console)},e.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},e.transformPhone=function(t){return"+86".concat(t)},e.parseQueryString=function(t){t=t.replace(/^\?/,"");var e={};return t.split("&").forEach((function(t){var n=t.split("="),r=n[0],o=n[1];r=decodeURIComponent(r),o=decodeURIComponent(o),r&&(e[r]?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o)})),e},e.parseCaptcha=function(t){var n={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var a=o[2];a&&(n=(0,e.parseQueryString)(a))}var i=n.token,c=r(n,["token"]);return/^data:/.test(t)&&!i?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:i?{state:c.state,token:i,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={exports:{}};return t[r].call(a.exports,a,a.exports,n),a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r=n(842);module.exports=r})();
@@ -1 +0,0 @@
1
- var t={829:(t,e,n)=>{var r;n.r(e),n.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>a,StorageType:()=>r,formatUrl:()=>i}),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},a=function(){};function i(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var a in n)""===o?!r&&(e+="?"):o+="&",o+=a+"="+encodeURIComponent(n[a]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}},949:(t,e,n)=>{function r(t){this.message=t}n.r(e),n.d(e,{InvalidTokenError:()=>i,default:()=>c}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=e.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function a(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(o(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return o(e)}}function i(t){this.message=t}i.prototype=new Error,i.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(a(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}}},385:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerCloudrun=e.requestContainer=void 0;var i=n(515).constants.ERRORS,c="cloudrun",s=function(){function t(){}return t.prototype.callContainer=function(t,e){return o(this,void 0,void 0,(function(){var n,o,s;return a(this,(function(a){switch(a.label){case 0:if(n=t.name,o=t.data,!n)throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid name")}));try{s=o?JSON.stringify(o):""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid data")}))}return[4,u.call(this,r(r({},t),{data:s}),e)];case 1:return[2,a.sent()]}}))}))},t}();function u(t,e){var n;return o(this,void 0,void 0,(function(){var o,i,c,s,u,l,f,d,p,h,v,y,b,g,m;return a(this,(function(a){switch(a.label){case 0:if(o=t.name,i=t.data,c=t.path,s=void 0===c?"":c,u=t.method,l=t.header,f=void 0===l?{}:l,d=this.getEndPointWithKey("GATEWAY"),p=d.BASE_URL,h=d.PROTOCOL,v="".concat(h).concat(p,"/cloudrun/").concat(o),y=s.startsWith("/")?s:"/".concat(s),b=["GET","HEAD"].includes(null===(n=null==u?void 0:u.toUpperCase)||void 0===n?void 0:n.call(u)))try{g={};try{g=JSON.parse(i)}catch(t){g=i||{}}y="".concat(y).concat(y.includes("?")?"&":"?").concat(Object.keys(g).map((function(t){return"".concat(t,"=").concat(g[t])})).join("&"))}catch(t){}return[4,this.request.fetch(r(r({method:u||"POST",headers:Object.assign({},{"Content-Type":"application/json; charset=utf-8"},f)},b?{}:{body:i}),{url:"".concat(v).concat(y),customReqOpts:e}))];case 1:return m=a.sent(),"node-sdk"===(null==e?void 0:e.from)?[2,m]:[4,m.data];case 2:return[2,a.sent()]}}))}))}e.requestContainer=u;var l=new s,f={name:c,entity:{callContainer:l.callContainer}};try{cloudbase.registerComponent(f)}catch(t){}function d(t){try{t.registerComponent(f)}catch(t){console.warn(t)}}e.registerCloudrun=d;try{window.registerCloudrun=d}catch(t){}},842:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__decorate||function(t,e,n,r){var o,a=arguments.length,i=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(i=(a<3?o(i):a>3?o(e,n,i):o(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerFunctions=void 0;var s=n(Object(function(){var t=new Error("Cannot find module '@cloudbase/types/functions'");throw t.code="MODULE_NOT_FOUND",t}())),u=n(515),l=n(385),f=u.constants.getSdkName,d=u.constants.ERRORS,p=u.constants.COMMUNITY_SITE_URL,h=u.utils.execCallback,v=u.helpers.catchErrorsDecorator,y="functions",b=new(function(){function t(){}var e,n,b;return t.prototype.callFunction=function(t,e,n){var o,a,s;return i(this,void 0,void 0,(function(){var i,p,v,b,g,m,w,O,_,E,S,j,I,P,R,A,x,N,C,k,M,T,D;return c(this,(function(c){switch(c.label){case 0:if(i=t.name,p=t.data,v=t.query,b=t.parse,g=t.search,m=t.type,w=t.path,O=void 0===w?"":w,_=t.method,E=t.header,S=void 0===E?{}:E,!i)throw new Error(JSON.stringify({code:d.INVALID_PARAMS,msg:"[".concat(y,".callFunction] invalid function name")}));try{j=p?JSON.stringify(p):""}catch(t){throw new Error(JSON.stringify({code:d.INVALID_PARAMS,msg:"[".concat(y,".callFunction] invalid data")}))}return"cloudrun"!==m?[3,2]:(I=u.utils.generateRequestId(),[4,l.requestContainer.call(this,{name:i,data:j,path:O,method:_,header:r(r({},S),{"X-Request-Id":I})})]);case 1:return[2,{result:T=c.sent(),requestId:I}];case 2:R=(P=this).request,A=P.config,x="functions.invokeFunction",N={inQuery:v,parse:b,search:g,function_name:i,request_data:j},C={},k=!("GATEWAY"!==A.endPointMode||(L=i,"lcap-common-service"===L||"lcap-datasource-test"===L||L.startsWith("lcap-data")||L.startsWith("lowcode-datasource")||"cloudbase_module"===L)||function(t){return"lowcode-wx-datasource"===t}(i)),c.label=3;case 3:return c.trys.push([3,8,,9]),k?[4,R.gateWay(r(r({},t),{path:"functions"}),n)]:[3,5];case 4:return M=c.sent(),C=r({requestId:M.requestId},(null===(o=M.data)||void 0===o?void 0:o.code)?M.data:{data:{response_data:M.data}}),[3,7];case 5:return[4,R.send(x,N,{endPointMode:"CLOUD_API",defaultQuery:(null===(a=null==p?void 0:p.params)||void 0===a?void 0:a.action)?{action:null===(s=null==p?void 0:p.params)||void 0===s?void 0:s.action}:{}},n)];case 6:C=c.sent(),c.label=7;case 7:if(C.code)return[2,h(e,null,C)];if(T=C.data.response_data,b||k)return[2,h(e,null,{result:T,requestId:C.requestId})];try{return T=JSON.parse(C.data.response_data),[2,h(e,null,{result:T,requestId:C.requestId})]}catch(t){h(e,new Error("[".concat(f(),"][").concat(d.INVALID_PARAMS,"][").concat(y,".callFunction] response data must be json")))}return[3,9];case 8:return D=c.sent(),h(e,D),[3,9];case 9:return[2]}var L}))}))},o([v({customInfo:{className:"Cloudbase",methodName:"callFunction"},title:"函数调用失败",messages:["请确认以下各项:"," 1 - 调用 callFunction() 的语法或参数是否正确"," 2 - 当前环境下是否存在此函数"," 3 - 函数安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(p)]}),a("design:type",Function),a("design:paramtypes",["function"==typeof(e=void 0!==s.ICallFunctionOptions&&s.ICallFunctionOptions)?e:Object,"function"==typeof(n="undefined"!=typeof Function&&Function)?n:Object,"function"==typeof(b=void 0!==s.ICustomReqOpts&&s.ICustomReqOpts)?b:Object]),a("design:returntype",Promise)],t.prototype,"callFunction",null),t}()),g={name:y,entity:{callFunction:b.callFunction}};try{cloudbase.registerComponent(g)}catch(t){}e.registerFunctions=function(t){try{t.registerComponent(g)}catch(t){console.warn(t)}}},662:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=i(n(853)),u=n(102);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(c=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var n=0,o=(0,u.isArray)(t)?t:[t];n<o.length;n++){var a=o[n],i=a.isMatch,c=a.genAdapter,s=a.runtime;if(i())return{adapter:r({isMatch:i},c(e)),runtime:s}}},e.useDefaultAdapter=function(){return{adapter:r({},s.genAdapter()),runtime:c.WEB}}},853:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebRequest=e.genAdapter=void 0;var s=n(829),u=n(102),l=n(78),f=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,a=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=a||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(a(a({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(a(a({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(a(a({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,i=t.headers,c=void 0===i?{}:i,s={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",u=new FormData;return"post"===s?(Object.keys(e).forEach((function(t){u.append(t,e[t])})),u.append("key",r),u.append("file",n),this.request(a(a({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(a(a({},t),{method:"put",headers:c,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return i(this,void 0,Promise,(function(){var e,n,r,o;return c(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(a(a({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return i(this,void 0,Promise,(function(){var n,r,o,s,u,l,f,d,p,h,v,y,b,g=this;return c(this,(function(m){switch(m.label){case 0:return n=new AbortController,r=t.url,o=t.enableAbort,s=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,d=t.timeout,p=t.shouldThrowOnError,h=void 0===p||p,v=null!=d?d:this.timeout,f&&(f.aborted&&n.abort(),f.addEventListener("abort",(function(){return n.abort()}))),y=null,s&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),n.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(r,a(a({},t),{signal:n.signal})).then((function(t){return i(g,void 0,void 0,(function(){var e,n,r;return c(this,(function(o){switch(o.label){case 0:return clearTimeout(y),h?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,t.json()];case 2:e=r.apply(n,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(y),h)return Promise.reject(t)}))];case 1:return b=m.sent(),[2,{data:l?b.body:(null===(e=b.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?b.json():b.text(),statusCode:b.status,header:b.headers}]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var a,i,c=t.url,s=t.headers,f=void 0===s?{}:s,d=t.data,p=t.responseType,h=t.withCredentials,v=t.body,y=t.onUploadProgress,b=(0,u.formatUrl)((0,l.getProtocol)(),c,"get"===r?d:{}),g=new XMLHttpRequest;g.open(r,b),p&&(g.responseType=p),Object.keys(f).forEach((function(t){g.setRequestHeader(t,f[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=g.status;try{t.data="blob"===p?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===p?g.response:g.responseText}clearTimeout(a),o(t)}},e&&n.timeout&&(a=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),i=(0,u.isFormData)(d)?d:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(d):v||(d?JSON.stringify(d):void 0),h&&(g.withCredentials=!0),g.send(i)}))},e}(s.AbstractSDKRequest);e.WebRequest=f,e.genAdapter=function(){return{type:"default",root:window,reqClass:f,wsClass:WebSocket,localStorage}}},78:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.COMMUNITY_SITE_URL=e.IS_DEBUG_MODE=e.getProtocol=e.setProtocol=e.getSdkName=e.setSdkName=void 0;var n="@cloudbase/js-sdk";e.setSdkName=function(t){n=t},e.getSdkName=function(){return n};var r="https:";e.setProtocol=function(t){r=t},e.getProtocol=function(){return r},e.IS_DEBUG_MODE=("undefined"==typeof process||process.env,!1),e.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},630:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ERRORS=void 0,e.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},546:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(n(78),e),o(n(630),e),e.OATUH_LOGINTYPE="constants"},640:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.catchErrorsDecorator=void 0;var a=n(102),i=n(546),c=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(c=-1!==navigator.userAgent.indexOf("Firefox"));var s=c?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,u=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function l(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var a,i=e.stack.split("\n"),s=c?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]\\s*\\(.*\\)$")),l=c?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]")),f=i.findIndex((function(t){return s.test(t)}));if(-1!==f){var d=i.filter((function(t,e){return e>f}));d.unshift(i[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(a=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(d.join("\n"))}return a}e.catchErrorsDecorator=function(t){var e=t.mode,n=void 0===e?"async":e,c=t.customInfo,f=void 0===c?{}:c,d=t.title,p=t.messages,h=void 0===p?[]:p;return function(t,e,c){if(i.IS_DEBUG_MODE){var p=f.className||t.constructor.name,v=f.methodName||e,y=c.value,b=function(){var t="",e=(new Error).stack.split("\n"),n=e.findIndex((function(t){return s.test(t)}));if(-1!==n){var r=u.exec(e[n+1]||"");t=r?r[0]:""}return t}();c.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=l({err:new Error,className:p,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var r=t,o=t.message,i=t.error,c=t.error_description,s={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);s.subtitle=o,u.code&&(n?(n.code=u.code,n.msg=u.msg):(t.code=u.code,t.message=u.msg),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}})))}throw i&&c&&(s.subtitle=c,n?(n.code=i,n.msg=c):(t.code=i,t.message=c),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,a.printGroupLog)(s),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,i,c,s,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:p,methodName:v,sourceLink:b}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,y.apply(this,t)];case 2:return[2,o.sent()];case 3:throw n=o.sent(),r=n,i=n.message,c=n.error,s=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},i&&/^\{.*\}$/.test(i)&&(f=JSON.parse(i),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(n.code=f.code,n.message=f.msg),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}})))),c&&s&&(u.subtitle=s,e?(e.code=c,e.msg=s):(n.code=c,n.message=s),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,a.printGroupLog)(u),r;case 4:return[2]}}))}))}}}}},607:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(640),e)},515:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.langEvent=e.AbortController=e.jwt=e.helpers=e.utils=e.events=e.cache=e.adapters=e.constants=void 0;var c=a(n(546));e.constants=c;var s=a(n(662));e.adapters=s;var u=a(n(388));e.cache=u;var l=a(n(363));e.events=l;var f=a(n(587));e.langEvent=f;var d=a(n(102));e.utils=d;var p=a(n(607));e.helpers=p;var h=i(n(450));e.AbortController=h.default;var v={decode:i(n(949)).default};e.jwt=v},450:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,n){"abort"===e&&t.listeners.push(n)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=n},388:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{s(r.next(t))}catch(t){a(t)}}function c(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CloudbaseCache=void 0;var c=n(829),s=n(102),u=n(546),l=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return o(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(c.AbstractStorage),f=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,a=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:((0,s.printWarn)(u.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new l(e.root));case"none":return new l(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=a)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:u.ERRORS.OPERATION_FAIL,msg:"[".concat((0,u.getSdkName)(),"][").concat(u.ERRORS.OPERATION_FAIL,"]setStore failed"),info:t}))}}else(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return a(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return a(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):(0,s.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return a(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CloudbaseCache=f},363:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=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])},r(t,e)},function(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}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,a=e.length;o<a;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.removeEventListener=e.activateEvent=e.addEventListener=e.CloudbaseEventEmitter=e.IErrorEvent=e.CloudbaseEvent=void 0;var i=n(102),c=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=c;var s=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return o(e,t),e}(c);e.IErrorEvent=s;var u=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,i.isInstanceOf)(t,s))return console.error(t.error),this;var n=(0,i.isString)(t)?new c(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,u=this.listeners[r]?a([],this.listeners[r],!0):[];o<u.length;o++)u[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();e.CloudbaseEventEmitter=u;var l=new u;e.addEventListener=function(t,e){l.on(t,e)},e.activateEvent=function(t,e){void 0===e&&(e={}),l.fire(t,e)},e.removeEventListener=function(t,e){l.off(t,e)}},587:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var r=n(363);e.bus=new r.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},102:function(t,e,n){var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.parseCaptcha=e.parseQueryString=e.transformPhone=e.sleep=e.printGroupLog=e.throwError=e.printInfo=e.printError=e.printWarn=e.execCallback=e.createPromiseCallback=e.removeParam=e.getHash=e.getQuery=e.toQueryString=e.formatUrl=e.generateRequestId=e.genSeqId=e.isFormData=e.isInstanceOf=e.isNull=e.isPalinObject=e.isUndefined=e.isString=e.isArray=void 0;var o=n(546);e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isUndefined=function(t){return void 0===t},e.isPalinObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isNull=function(t){return"[object Null]"===Object.prototype.toString.call(t)},e.isInstanceOf=function(t,e){return t instanceof e},e.isFormData=function(t){return"[object FormData]"===Object.prototype.toString.call(t)},e.genSeqId=function(){return Math.random().toString(16).slice(2)},e.generateRequestId=function(){var t=(new Date).getTime(),e=(null===Date||void 0===Date?void 0:Date.now)&&1e3*Date.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:7&r|8).toString(16)}))},e.formatUrl=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)},e.toQueryString=function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var n=e||decodeURIComponent(window.location.search),r=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},e.getHash=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]".concat(t,"=([^&#]*)")));return e?e[1]:""},e.removeParam=function(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var a=(r=o.split("&")).length-1;a>=0;a-=1)r[a].split("=")[0]===t&&r.splice(a,1);n="".concat(n,"?").concat(r.join("&"))}return n},e.createPromiseCallback=function(){var t={};if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t},e.execCallback=function(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n},e.printWarn=function(t,e){console.warn("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.printError=function(t,e){console.error({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)})},e.printInfo=function(t,e){console.log("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.throwError=function(t,e){throw new Error(JSON.stringify({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)}))},e.printGroupLog=function(t){var e,n=t.title,r=t.subtitle,o=void 0===r?"":r,a=t.content,i=void 0===a?[]:a,c=t.printTrace,s=void 0!==c&&c,u=t.collapsed;void 0!==u&&u?(console.groupCollapsed||console.error)(n,o):(console.group||console.error)(n,o);for(var l=0,f=i;l<f.length;l++){var d=f[l],p=d.type,h=d.body;switch(p){case"info":console.log(h);break;case"warn":console.warn(h);break;case"error":console.error(h)}}s&&(console.trace||console.log)("stack trace:"),null===(e=console.groupEnd)||void 0===e||e.call(console)},e.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},e.transformPhone=function(t){return"+86".concat(t)},e.parseQueryString=function(t){t=t.replace(/^\?/,"");var e={};return t.split("&").forEach((function(t){var n=t.split("="),r=n[0],o=n[1];r=decodeURIComponent(r),o=decodeURIComponent(o),r&&(e[r]?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o)})),e},e.parseCaptcha=function(t){var n={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var a=o[2];a&&(n=(0,e.parseQueryString)(a))}var i=n.token,c=r(n,["token"]);return/^data:/.test(t)&&!i?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:i?{state:c.state,token:i,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={exports:{}};return t[r].call(a.exports,a,a.exports,n),a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(842);
@@ -1 +0,0 @@
1
- (()=>{var e={829:(e,t,r)=>{"use strict";var n;r.r(t),r.d(t,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>n,formatUrl:()=>a}),function(e){e.local="local",e.none="none",e.session="session"}(n||(n={}));var o=function(){},i=function(){};function a(e,t,r){void 0===r&&(r={});var n=/\?/.test(t),o="";for(var i in r)""===o?!n&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(r[i]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}},949:(e,t,r)=>{"use strict";function n(e){this.message=e}r.r(t),r.d(t,{InvalidTokenError:()=>a,default:()=>s}),n.prototype=new Error,n.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,s="";o=t.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?s+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};function i(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return o(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";const s=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(".")[r]))}catch(e){throw new a("Invalid token specified: "+e.message)}}},842:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.registerModel=t.lazyGetEntity=void 0;var c=r(918),u=r(515).events.CloudbaseEventEmitter,l="models",f=new WeakMap;function h(e){return new Proxy({},{get:function(t,r){var o=e.getEndPointWithKey("GATEWAY"),i=o.BASE_URL,u=o.PROTOCOL,l=n(n({},e),{BASE_URL:i,PROTOCOL:u}),h=f.get(l);return h||(h=function(e){var t=this,r=e.callFunction.bind(e),o=e.request.fetch.bind(e.request),i=e.getEndPointWithKey("GATEWAY"),u=i.BASE_URL,l=i.PROTOCOL,f="".concat(l).concat(u,"/model"),h="".concat(l).concat(u,"/sql"),p=(0,c.generateHTTPClient)(r,(function(e){return a(t,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,o(n(n({},e),{headers:n({"Content-Type":"application/json"},e.headers)}))];case 1:return[4,t.sent().data];case 2:return[2,t.sent()]}}))}))}),f,{sqlBaseUrl:h});return p}(e),f.set(l,h)),h[r]}})}t.lazyGetEntity=h;var p="cloudbase_init",d=new u;d.on(p,(function(e){var t=e.data;Object.assign(t,{models:h(t)})}));var v={name:l,namespace:l,entity:new Proxy({},{get:function(e,t){console.warn("【deprecated】Accessing Cloudbase.prototype.models.".concat(t,"."))}}),injectEvents:{bus:d,events:[p]}};try{cloudbase.registerComponent(v)}catch(e){}function y(e){try{e.registerComponent(v)}catch(e){console.warn(e)}}t.registerModel=y;try{window.registerModel=y}catch(e){}i(r(918),t)},662:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useDefaultAdapter=t.useAdapters=t.RUNTIME=void 0;var s,c=a(r(853)),u=r(102);!function(e){e.WEB="web",e.WX_MP="wx_mp"}(s=t.RUNTIME||(t.RUNTIME={})),t.useAdapters=function(e,t){for(var r=0,o=(0,u.isArray)(e)?e:[e];r<o.length;r++){var i=o[r],a=i.isMatch,s=i.genAdapter,c=i.runtime;if(a())return{adapter:n({isMatch:a},s(t)),runtime:c}}},t.useDefaultAdapter=function(){return{adapter:n({},c.genAdapter()),runtime:s.WEB}}},853:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebRequest=t.genAdapter=void 0;var c=r(829),u=r(102),l=r(78),f=function(e){function t(t){var r=e.call(this)||this,n=t.timeout,o=t.timeoutMsg,i=t.restrictedMethods;return r.timeout=n||0,r.timeoutMsg=o||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}return o(t,e),t.prototype.get=function(e){return this.request(i(i({},e),{method:"get"}),this.restrictedMethods.includes("get"))},t.prototype.post=function(e){return this.request(i(i({},e),{method:"post"}),this.restrictedMethods.includes("post"))},t.prototype.put=function(e){return this.request(i(i({},e),{method:"put"}))},t.prototype.upload=function(e){var t=e.data,r=e.file,n=e.name,o=e.method,a=e.headers,s=void 0===a?{}:a,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",u=new FormData;return"post"===c?(Object.keys(t).forEach((function(e){u.append(e,t[e])})),u.append("key",n),u.append("file",r),this.request(i(i({},e),{data:u,method:c}),this.restrictedMethods.includes("upload"))):this.request(i(i({},e),{method:"put",headers:s,body:r}),this.restrictedMethods.includes("upload"))},t.prototype.download=function(e){return a(this,void 0,Promise,(function(){var t,r,n,o;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},e),{headers:{},responseType:"blob"}))];case 1:return t=a.sent().data,r=window.URL.createObjectURL(new Blob([t])),n=decodeURIComponent(new URL(e.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=r,o.setAttribute("download",n),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise((function(t){t({statusCode:200,tempFilePath:e.url})}))]}}))}))},t.prototype.fetch=function(e){var t;return a(this,void 0,Promise,(function(){var r,n,o,c,u,l,f,h,p,d,v,y,m,g=this;return s(this,(function(b){switch(b.label){case 0:return r=new AbortController,n=e.url,o=e.enableAbort,c=void 0!==o&&o,u=e.stream,l=void 0!==u&&u,f=e.signal,h=e.timeout,p=e.shouldThrowOnError,d=void 0===p||p,v=null!=h?h:this.timeout,f&&(f.aborted&&r.abort(),f.addEventListener("abort",(function(){return r.abort()}))),y=null,c&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),r.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(n,i(i({},e),{signal:r.signal})).then((function(e){return a(g,void 0,void 0,(function(){var t,r,n;return s(this,(function(o){switch(o.label){case 0:return clearTimeout(y),d?e.ok?(t=e,[3,3]):[3,1]:[3,4];case 1:return n=(r=Promise).reject,[4,e.json()];case 2:t=n.apply(r,[o.sent()]),o.label=3;case 3:return[2,t];case 4:return[2,e]}}))}))})).catch((function(e){if(clearTimeout(y),d)return Promise.reject(e)}))];case 1:return m=b.sent(),[2,{data:l?m.body:(null===(t=m.headers.get("content-type"))||void 0===t?void 0:t.includes("application/json"))?m.json():m.text(),statusCode:m.status,header:m.headers}]}}))}))},t.prototype.request=function(e,t){var r=this;void 0===t&&(t=!1);var n=String(e.method).toLowerCase()||"get";return new Promise((function(o){var i,a,s=e.url,c=e.headers,f=void 0===c?{}:c,h=e.data,p=e.responseType,d=e.withCredentials,v=e.body,y=e.onUploadProgress,m=(0,u.formatUrl)((0,l.getProtocol)(),s,"get"===n?h:{}),g=new XMLHttpRequest;g.open(n,m),p&&(g.responseType=p),Object.keys(f).forEach((function(e){g.setRequestHeader(e,f[e])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var e={};if(4===g.readyState){var t=g.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};t.forEach((function(e){var t=e.split(": "),n=t.shift().toLowerCase(),o=t.join(": ");r[n]=o})),e.header=r,e.statusCode=g.status;try{e.data="blob"===p?g.response:JSON.parse(g.responseText)}catch(t){e.data="blob"===p?g.response:g.responseText}clearTimeout(i),o(e)}},t&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),g.abort()}),r.timeout)),a=(0,u.isFormData)(h)?h:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(h):v||(h?JSON.stringify(h):void 0),d&&(g.withCredentials=!0),g.send(a)}))},t}(c.AbstractSDKRequest);t.WebRequest=f,t.genAdapter=function(){return{type:"default",root:window,reqClass:f,wsClass:WebSocket,localStorage}}},78:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMUNITY_SITE_URL=t.IS_DEBUG_MODE=t.getProtocol=t.setProtocol=t.getSdkName=t.setSdkName=void 0;var r="@cloudbase/js-sdk";t.setSdkName=function(e){r=e},t.getSdkName=function(){return r};var n="https:";t.setProtocol=function(e){n=e},t.getProtocol=function(){return n},t.IS_DEBUG_MODE=("undefined"==typeof process||process.env,!1),t.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},630:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERRORS=void 0,t.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},546:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.OATUH_LOGINTYPE=void 0,o(r(78),t),o(r(630),t),t.OATUH_LOGINTYPE="constants"},640:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.catchErrorsDecorator=void 0;var i=r(102),a=r(546),s=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(s=-1!==navigator.userAgent.indexOf("Firefox"));var c=s?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,u=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function l(e){var t=e.err,r=e.className,n=e.methodName,o=e.sourceLink;if(!o)return null;var i,a=t.stack.split("\n"),c=s?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]\\s*\\(.*\\)$")),l=s?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]")),f=a.findIndex((function(e){return c.test(e)}));if(-1!==f){var h=a.filter((function(e,t){return t>f}));h.unshift(a[f].replace(l,"".concat(r,".").concat(n)).replace(u,o)),(i=new Error).stack="".concat(s?"@debugger":"Error","\n").concat(h.join("\n"))}return i}t.catchErrorsDecorator=function(e){var t=e.mode,r=void 0===t?"async":t,s=e.customInfo,f=void 0===s?{}:s,h=e.title,p=e.messages,d=void 0===p?[]:p;return function(e,t,s){if(a.IS_DEBUG_MODE){var p=f.className||e.constructor.name,v=f.methodName||t,y=s.value,m=function(){var e="",t=(new Error).stack.split("\n"),r=t.findIndex((function(e){return c.test(e)}));if(-1!==r){var n=u.exec(t[r+1]||"");e=n?n[0]:""}return e}();s.value="sync"===r?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l({err:new Error,className:p,methodName:v,sourceLink:m});try{return y.apply(this,e)}catch(e){var n=e,o=e.message,a=e.error,s=e.error_description,c={title:h||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:e}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);c.subtitle=o,u.code&&(r?(r.code=u.code,r.msg=u.msg):(e.code=u.code,e.message=u.msg),n=r||e,c.content=d.map((function(e){return{type:"info",body:e}})))}throw a&&s&&(c.subtitle=s,r?(r.code=a,r.msg=s):(e.code=a,e.message=s),n=r||e,c.content=d.map((function(e){return{type:"info",body:e}}))),(0,i.printGroupLog)(c),n}}:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(this,void 0,void 0,(function(){var t,r,n,a,s,c,u,f;return o(this,(function(o){switch(o.label){case 0:t=l({err:new Error,className:p,methodName:v,sourceLink:m}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,y.apply(this,e)];case 2:return[2,o.sent()];case 3:throw r=o.sent(),n=r,a=r.message,s=r.error,c=r.error_description,u={title:h||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:r}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),u.subtitle=f,f.code&&(t?(t.code=f.code,t.message=f.msg):(r.code=f.code,r.message=f.msg),n=t||r,u.content=d.map((function(e){return{type:"info",body:e}})))),s&&c&&(u.subtitle=c,t?(t.code=s,t.msg=c):(r.code=s,r.message=c),n=t||r,u.content=d.map((function(e){return{type:"info",body:e}}))),(0,i.printGroupLog)(u),n;case 4:return[2]}}))}))}}}}},607:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(640),t)},515:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.langEvent=t.AbortController=t.jwt=t.helpers=t.utils=t.events=t.cache=t.adapters=t.constants=void 0;var s=i(r(546));t.constants=s;var c=i(r(662));t.adapters=c;var u=i(r(388));t.cache=u;var l=i(r(363));t.events=l;var f=i(r(587));t.langEvent=f;var h=i(r(102));t.utils=h;var p=i(r(607));t.helpers=p;var d=a(r(450));t.AbortController=d.default;var v={decode:a(r(949)).default};t.jwt=v},450:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(t,r){"abort"===t&&e.listeners.push(r)}}}return e.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(e){return e()})))},e}();t.default=r},388:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.CloudbaseCache=void 0;var s=r(829),c=r(102),u=r(546),l=function(e){function t(t){var r=e.call(this)||this;return r.root=t,t.tcbCacheObject||(t.tcbCacheObject={}),r}return o(t,e),t.prototype.setItem=function(e,t){this.root.tcbCacheObject[e]=t},t.prototype.getItem=function(e){return this.root.tcbCacheObject[e]},t.prototype.removeItem=function(e){delete this.root.tcbCacheObject[e]},t.prototype.clear=function(){delete this.root.tcbCacheObject},t}(s.AbstractStorage),f=function(){function e(e){this.keys={};var t=e.persistence,r=e.platformInfo,n=void 0===r?{}:r,o=e.keys,i=void 0===o?{}:o;this.platformInfo=n,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||t,this.storage=function(e,t){switch(e){case"local":default:return t.localStorage?t.localStorage:((0,c.printWarn)(u.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new l(t.root));case"none":return new l(t.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}return Object.defineProperty(e.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),e.prototype.setStore=function(e,t,r){if("async"!==this.mode){if(this.storage)try{var n={version:r||"localCachev1",content:t};this.storage.setItem(e,JSON.stringify(n))}catch(e){throw new Error(JSON.stringify({code:u.ERRORS.OPERATION_FAIL,msg:"[".concat((0,u.getSdkName)(),"][").concat(u.ERRORS.OPERATION_FAIL,"]setStore failed"),info:e}))}}else(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},e.prototype.setStoreAsync=function(e,t,r){return i(this,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),n={version:r||"localCachev1",content:t},[4,this.storage.setItem(e,JSON.stringify(n))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},e.prototype.getStore=function(e,t){var r;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(r=process.env)||void 0===r?void 0:r.tcb_token))return process.env.tcb_token;if(!this.storage)return""}catch(e){return""}t=t||"localCachev1";var n=this.storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},e.prototype.getStoreAsync=function(e,t){var r;return i(this,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(r=process.env)||void 0===r?void 0:r.tcb_token))return[2,process.env.tcb_token];if(!this.storage)return[2,""]}catch(e){return[2,""]}return t=t||"localCachev1",[4,this.storage.getItem(e)];case 1:return(n=o.sent())&&n.indexOf(t)>=0?[2,JSON.parse(n).content]:[2,""]}}))}))},e.prototype.removeStore=function(e){"async"!==this.mode?this.storage.removeItem(e):(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},e.prototype.removeStoreAsync=function(e){return i(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.storage.removeItem(e)];case 1:return t.sent(),[2]}}))}))},e}();t.CloudbaseCache=f},363:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.removeEventListener=t.activateEvent=t.addEventListener=t.CloudbaseEventEmitter=t.IErrorEvent=t.CloudbaseEvent=void 0;var a=r(102),s=function(e,t){this.data=t||null,this.name=e};t.CloudbaseEvent=s;var c=function(e){function t(t,r){var n=e.call(this,"error",{error:t,data:r})||this;return n.error=t,n}return o(t,e),t}(s);t.IErrorEvent=c;var u=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return function(e,t,r){r[e]=r[e]||[],r[e].push(t)}(e,t,this.listeners),this},e.prototype.off=function(e,t){return function(e,t,r){if(null==r?void 0:r[e]){var n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}(e,t,this.listeners),this},e.prototype.fire=function(e,t){if((0,a.isInstanceOf)(e,c))return console.error(e.error),this;var r=(0,a.isString)(e)?new s(e,t||{}):e,n=r.name;if(this.listens(n)){r.target=this;for(var o=0,u=this.listeners[n]?i([],this.listeners[n],!0):[];o<u.length;o++)u[o].call(this,r)}return this},e.prototype.listens=function(e){return this.listeners[e]&&this.listeners[e].length>0},e}();t.CloudbaseEventEmitter=u;var l=new u;t.addEventListener=function(e,t){l.on(e,t)},t.activateEvent=function(e,t){void 0===t&&(t={}),l.fire(e,t)},t.removeEventListener=function(e,t){l.off(e,t)}},587:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LANG_CHANGE_EVENT=t.bus=void 0;var n=r(363);t.bus=new n.CloudbaseEventEmitter,t.LANG_CHANGE_EVENT="lang_change"},102:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.parseCaptcha=t.parseQueryString=t.transformPhone=t.sleep=t.printGroupLog=t.throwError=t.printInfo=t.printError=t.printWarn=t.execCallback=t.createPromiseCallback=t.removeParam=t.getHash=t.getQuery=t.toQueryString=t.formatUrl=t.generateRequestId=t.genSeqId=t.isFormData=t.isInstanceOf=t.isNull=t.isPalinObject=t.isUndefined=t.isString=t.isArray=void 0;var o=r(546);t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isString=function(e){return"string"==typeof e},t.isUndefined=function(e){return void 0===e},t.isPalinObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.isNull=function(e){return"[object Null]"===Object.prototype.toString.call(e)},t.isInstanceOf=function(e,t){return e instanceof t},t.isFormData=function(e){return"[object FormData]"===Object.prototype.toString.call(e)},t.genSeqId=function(){return Math.random().toString(16).slice(2)},t.generateRequestId=function(){var e=(new Date).getTime(),t=(null===Date||void 0===Date?void 0:Date.now)&&1e3*Date.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(r){var n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)}))},t.formatUrl=function(e,t,r){void 0===r&&(r={});var n=/\?/.test(t),o="";return Object.keys(r).forEach((function(e){""===o?!n&&(t+="?"):o+="&",o+="".concat(e,"=").concat(encodeURIComponent(r[e]))})),/^http(s)?:\/\//.test(t+=o)?t:"".concat(e).concat(t)},t.toQueryString=function(e){void 0===e&&(e={});var t=[];return Object.keys(e).forEach((function(r){t.push("".concat(r,"=").concat(encodeURIComponent(e[r])))})),t.join("&")},t.getQuery=function(e,t){if("undefined"==typeof window)return!1;var r=t||decodeURIComponent(window.location.search),n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),o=r.substr(r.indexOf("?")+1).match(n);return null!=o?o[2]:""},t.getHash=function(e){if("undefined"==typeof window)return"";var t=window.location.hash.match(new RegExp("[#?&/]".concat(e,"=([^&#]*)")));return t?t[1]:""},t.removeParam=function(e,t){var r=t.split("?")[0],n=[],o=-1!==t.indexOf("?")?t.split("?")[1]:"";if(""!==o){for(var i=(n=o.split("&")).length-1;i>=0;i-=1)n[i].split("=")[0]===e&&n.splice(i,1);r="".concat(r,"?").concat(n.join("&"))}return r},t.createPromiseCallback=function(){var e={};if(!Promise){(e=function(){}).promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var r=new Promise((function(t,r){e=function(e,n){return e?r(e):t(n)}}));return e.promise=r,e},t.execCallback=function(e,t,r){if(void 0===r&&(r=null),e&&"function"==typeof e)return e(t,r);if(t)throw t;return r},t.printWarn=function(e,t){console.warn("[".concat((0,o.getSdkName)(),"][").concat(e,"]:").concat(t))},t.printError=function(e,t){console.error({code:e,msg:"[".concat((0,o.getSdkName)(),"][").concat(e,"]:").concat(t)})},t.printInfo=function(e,t){console.log("[".concat((0,o.getSdkName)(),"][").concat(e,"]:").concat(t))},t.throwError=function(e,t){throw new Error(JSON.stringify({code:e,msg:"[".concat((0,o.getSdkName)(),"][").concat(e,"]:").concat(t)}))},t.printGroupLog=function(e){var t,r=e.title,n=e.subtitle,o=void 0===n?"":n,i=e.content,a=void 0===i?[]:i,s=e.printTrace,c=void 0!==s&&s,u=e.collapsed;void 0!==u&&u?(console.groupCollapsed||console.error)(r,o):(console.group||console.error)(r,o);for(var l=0,f=a;l<f.length;l++){var h=f[l],p=h.type,d=h.body;switch(p){case"info":console.log(d);break;case"warn":console.warn(d);break;case"error":console.error(d)}}c&&(console.trace||console.log)("stack trace:"),null===(t=console.groupEnd)||void 0===t||t.call(console)},t.sleep=function(e){return void 0===e&&(e=0),new Promise((function(t){return setTimeout(t,e)}))},t.transformPhone=function(e){return"+86".concat(e)},t.parseQueryString=function(e){e=e.replace(/^\?/,"");var t={};return e.split("&").forEach((function(e){var r=e.split("="),n=r[0],o=r[1];n=decodeURIComponent(n),o=decodeURIComponent(o),n&&(t[n]?Array.isArray(t[n])?t[n].push(o):t[n]=[t[n],o]:t[n]=o)})),t},t.parseCaptcha=function(e){var r={},o=e.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){e=o[1];var i=o[2];i&&(r=(0,t.parseQueryString)(i))}var a=r.token,s=n(r,["token"]);return/^data:/.test(e)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(e)}:a?{state:s.state,token:a,captchaData:e}:{error:"unimplemented",error_description:"need to impl captcha data"}}},918:function(e,t,r){!function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function n(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}s((n=n.apply(e,[])).next())}))}function a(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.name="WxCloudSDKError",n.code=null==r?void 0:r.code,n.requestId=null==r?void 0:r.requestId,n.originError=null==r?void 0:r.originError,n}return n(t,e),t}(Error);function c(){return"undefined"!=typeof window&&window||"undefined"!=typeof globalThis&&globalThis}function u(){try{var e=c();if(!e)return;return"undefined"==typeof wx?c().location.href:e.__wxRoute}catch(e){}}var l=function(e){var t=e.dataSourceName,r=e.methodName,n=e.params,o=e.realMethodName,l=e.callFunction,f=e.envType,h=void 0===f?"prod":f,p=e.mode;return e.cloud,i(void 0,0,void 0,(function(){var e,i,f,d,v,y;return a(this,(function(a){switch(a.label){case 0:e={data:{},requestId:""},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l({name:"lowcode-datasource",data:{dataSourceName:t,methodName:r,params:n,userAgent:(g=c(),(null==g?void 0:g.navigator)?g.navigator.userAgent:"undefined"!=typeof wx&&wx.getSystemInfo?(wx.getSystemInfo({success:function(e){e&&(m=["brand","model","version","system","platform","SDKVersion","language"].map((function(t){return"".concat(t,": ").concat(e[t])})).join(", "))}}),m):void 0),referrer:u(),"x-sdk-version":"1.8.8",envType:h,mode:p}})];case 2:if(i=a.sent(),f=(null===(v=null==i?void 0:i.result)||void 0===v?void 0:v.requestId)||(null==i?void 0:i.requestId)||(null==i?void 0:i.requestID),null==i?void 0:i.result.code)throw new s("【错误】".concat(null==i?void 0:i.result.message,"\n【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n【错误码】").concat(null==i?void 0:i.result.code,"\n【请求ID】").concat(f||"N/A"),{code:null==i?void 0:i.result.code,requestId:f});return e.data=(null===(y=null==i?void 0:i.result)||void 0===y?void 0:y.data)||{},e.requestId=f,[3,4];case 3:throw"WxCloudSDKError"===(d=a.sent()).name?d:(console.log(d),new s("【错误】".concat(d.message,"\n 【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n 【请求ID】N/A"),{code:"UnknownError",originError:d}));case 4:return[2,e]}var m,g}))}))},f=function(e){var t=e.sql,r=e.params,n=e.config,o=e.callFunction,s=e.unsafe,c=void 0!==s&&s,u=e.cloud;return i(void 0,0,void 0,(function(){return a(this,(function(e){return[2,l({realMethodName:"$runSQL",methodName:"callWedaApi",params:{action:"RunMysqlCommand",data:{sqlTemplate:t,config:n,parameter:c?"":Object.entries(r||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[])||[]}},callFunction:o,mode:"sdk",cloud:u})]}))}))},h=function(e,t){return{$runSQL:function(r,n,s){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,f({sql:r,params:n,config:o(o({},s),{preparedStatements:!0}),callFunction:e,cloud:t})];case 1:return[2,i.sent()]}}))}))},$runSQLRaw:function(r,n){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,f({sql:r,params:[],config:o(o({},n),{preparedStatements:!1}),callFunction:e,cloud:t})];case 1:return[2,i.sent()]}}))}))}}},p={filter:{where:{}},select:{$master:!0}};function d(e){return{getUrl:function(t){return"".concat(t,"/").concat(e)},method:"post"}}var v={get:o(o({},d("get")),{defaultParams:o({},p)}),list:o(o({},d("list")),{defaultParams:o({},p)}),create:d("create"),createMany:d("createMany"),update:o(o({},d("update")),{method:"put"}),updateMany:o(o({},d("updateMany")),{method:"put"}),upsert:d("upsert"),delete:d("delete"),deleteMany:d("deleteMany")},y="Unknown error occurred",m="NotSupported",g=function(e,t,r,n){var o=h(e,null==n?void 0:n.cloud);return new Proxy({},{get:function(e,i){if("string"==typeof i)return Object.prototype.hasOwnProperty.call(o,i)?o[i]:w(r,i,t,n)}})},b=function(e,t,r,n,o){return new s("【错误】".concat(e,"\n【操作】调用 models.").concat(t,".").concat(r,"\n【错误码】").concat(n,"\n【请求ID】").concat(o),{code:n,requestId:o})},w=function(e,t,r,n){var c=new Proxy({},{get:function(c,u){if("runSQLTemplate"!==u){var l=v[u];if(!l){var f=new Error("不支持的操作: ".concat(u));throw new s(f.message||y,{originError:f,code:m,requestId:"N/A"})}return function(n){return void 0===n&&(n={}),i(void 0,0,void 0,(function(){var o,i,c,f,h,p,d,v,m,g;return a(this,(function(a){switch(a.label){case 0:o=l.getUrl,i=l.method,c=l.defaultParams,f=void 0===c?{}:c,h=Object.assign({},f,n),p="pre"===h.envType?"pre":"prod",d=[e,p,o(t)].join("/"),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:d,body:JSON.stringify(h),method:i})];case 2:if((v=a.sent()).code)throw b(null==v?void 0:v.message,t,u,null==v?void 0:v.code,null==v?void 0:v.requestId);return"get"===u&&Object.assign(v,{data:null!==(g=v.data.record)&&void 0!==g?g:v.data}),[2,v];case 3:throw m=a.sent(),new s((null==m?void 0:m.message)||y,{originError:m});case 4:return[2]}}))}))}}if(!(null==n?void 0:n.sqlBaseUrl))throw f=new Error("不支持的操作: ".concat(u)),new s(f.message||y,{originError:f,code:m,requestId:"N/A"});return function(e){return i(void 0,0,void 0,(function(){var i,c,l,f,h,p,d,v,m,g,w,O,P,S,E,j;return a(this,(function(a){switch(a.label){case 0:i=e.params,c=e.templateName,l=e.envType,f="pre"===l?"pre":"prod",h=[n.sqlBaseUrl,f,c,"run"].join("/"),p=Object.entries(i||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[]),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:h,body:JSON.stringify({parameter:p}),method:"POST"})];case 2:if(d=a.sent(),null===(m=null==d?void 0:d.Response)||void 0===m?void 0:m.Error)throw b(null===(w=null===(g=null==d?void 0:d.Response)||void 0===g?void 0:g.Error)||void 0===w?void 0:w.Message,t,u,null===(P=null===(O=null==d?void 0:d.Response)||void 0===O?void 0:O.Error)||void 0===P?void 0:P.Code,null===(S=null==d?void 0:d.Response)||void 0===S?void 0:S.RequestId);return[2,o(o({},null!==(E=null==d?void 0:d.Response)&&void 0!==E?E:{}),{data:null===(j=null==d?void 0:d.Response)||void 0===j?void 0:j.Data})];case 3:throw v=a.sent(),new s((null==v?void 0:v.message)||y,{originError:v});case 4:return[2]}}))}))}}});return c},O={create:{methodName:"wedaCreateV2"},createMany:{methodName:"wedaBatchCreateV2"},update:{methodName:"wedaUpdateV2"},upsert:{methodName:"wedaUpsertV2"},updateMany:{methodName:"wedaBatchUpdateV2"},delete:{methodName:"wedaDeleteV2"},deleteMany:{methodName:"wedaBatchDeleteV2"},get:{methodName:"wedaGetItemV2",defaultParams:{filter:{where:{}},select:{$master:!0}}},list:{methodName:"wedaGetRecordsV2",defaultParams:{filter:{where:{}},select:{$master:!0}}}},P=function(e,t){var r=h(e,t);return new Proxy({},{get:function(n,c){if("string"==typeof c)return Object.prototype.hasOwnProperty.call(r,c)?r[c]:function(e,t,r){return new Proxy({},{get:function(n,c){var u=O[c];if(!u){var f=new Error("不支持的操作: ".concat(c));throw new s(f.message||"Unknown error occurred",{originError:f,code:"NotSupported",requestId:"N/A"})}return function(n){return i(void 0,0,void 0,(function(){var i,s,f,h,p;return a(this,(function(a){switch(a.label){case 0:return i=o(o({},u.defaultParams||{}),n||{}),[4,l({callFunction:t,dataSourceName:e,methodName:u.methodName,realMethodName:c,params:i,envType:null==n?void 0:n.envType,cloud:r})];case 1:return s=a.sent(),f={data:{}},h=u.responseKey,f.data=h?null===(p=null==s?void 0:s.data)||void 0===p?void 0:p[h]:null==s?void 0:s.data,[2,f]}}))}))}}})}(c,e,t)}})},S=function(){function e(e){var t=this;this.map=new Map,e&&(e instanceof Headers?e.forEach((function(e,r){t.append(r,e)})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];t.append(r,n)})):"object"==typeof e&&Object.keys(e).forEach((function(r){t.append(r,e[r])})))}return e.prototype.append=function(e,t){var r=e.toLowerCase(),n=this.map.get(r);n?this.map.set(r,"".concat(n,", ").concat(t)):this.map.set(r,String(t))},e.prototype.delete=function(e){this.map.delete(e.toLowerCase())},e.prototype.forEach=function(e,t){var r=this;this.map.forEach((function(n,o){e.call(t,n,o,r)}))},e.prototype.get=function(e){return this.map.get(e.toLowerCase())||null},e.prototype.has=function(e){return this.map.has(e.toLowerCase())},e.prototype.set=function(e,t){this.map.set(e.toLowerCase(),String(t))},e.prototype.entries=function(){return this.map.entries()},e.prototype.keys=function(){return this.map.keys()},e.prototype.values=function(){return this.map.values()},e.prototype.getSetCookie=function(){var e=[];return this.map.forEach((function(t,r){"set-cookie"===r&&e.push(t)})),e},e.prototype.toJSON=function(){var e={};return this.map.forEach((function(t,r){e[r]=t})),e},e.prototype[Symbol.iterator]=function(){return this.entries()},e}();"object"!=typeof globalThis||globalThis.Headers||(globalThis.Headers=S);var E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};var j,_,A=function(e){try{return!!e()}catch(e){return!0}},R=!A((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),k=R,x=Function.prototype,T=x.call,I=k&&x.bind.bind(T,T),C=k?I:function(e){return function(){return T.apply(e,arguments)}},N=C,U=N({}.toString),L=N("".slice),M=function(e){return L(U(e),8,-1)},q=A,D=M,B=Object,F=C("".split),H=q((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"===D(e)?F(e,""):B(e)}:B,G=function(e){return null==e},J=G,W=TypeError,z=function(e){if(J(e))throw new W("Can't call method on "+e);return e},V=H,$=z,Q=function(e){return V($(e))},K={},Y=function(e){return e&&e.Math===Math&&e},X=Y("object"==typeof globalThis&&globalThis)||Y("object"==typeof window&&window)||Y("object"==typeof self&&self)||Y("object"==typeof E&&E)||Y("object"==typeof E&&E)||function(){return this}()||Function("return this")(),Z="object"==typeof document&&document.all,ee=void 0===Z&&void 0!==Z?function(e){return"function"==typeof e||e===Z}:function(e){return"function"==typeof e},te=ee,re=X.WeakMap,ne=te(re)&&/native code/.test(String(re)),oe=ee,ie=function(e){return"object"==typeof e?null!==e:oe(e)},ae=!A((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),se={},ce=ie,ue=X.document,le=ce(ue)&&ce(ue.createElement),fe=function(e){return le?ue.createElement(e):{}},he=fe,pe=!ae&&!A((function(){return 7!==Object.defineProperty(he("div"),"a",{get:function(){return 7}}).a})),de=ae&&A((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ve=ie,ye=String,me=TypeError,ge=function(e){if(ve(e))return e;throw new me(ye(e)+" is not an object")},be=R,we=Function.prototype.call,Oe=be?we.bind(we):function(){return we.apply(we,arguments)},Pe={},Se=Pe,Ee=X,je=ee,_e=function(e){return je(e)?e:void 0},Ae=function(e,t){return arguments.length<2?_e(Se[e])||_e(Ee[e]):Se[e]&&Se[e][t]||Ee[e]&&Ee[e][t]},Re=C({}.isPrototypeOf),ke=X.navigator,xe=ke&&ke.userAgent,Te=X,Ie=xe?String(xe):"",Ce=Te.process,Ne=Te.Deno,Ue=Ce&&Ce.versions||Ne&&Ne.version,Le=Ue&&Ue.v8;Le&&(_=(j=Le.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!_&&Ie&&(!(j=Ie.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=Ie.match(/Chrome\/(\d+)/))&&(_=+j[1]);var Me=_,qe=A,De=X.String,Be=!!Object.getOwnPropertySymbols&&!qe((function(){var e=Symbol("symbol detection");return!De(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Me&&Me<41})),Fe=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,He=Ae,Ge=ee,Je=Re,We=Object,ze=Fe?function(e){return"symbol"==typeof e}:function(e){var t=He("Symbol");return Ge(t)&&Je(t.prototype,We(e))},Ve=String,$e=function(e){try{return Ve(e)}catch(e){return"Object"}},Qe=ee,Ke=$e,Ye=TypeError,Xe=function(e){if(Qe(e))return e;throw new Ye(Ke(e)+" is not a function")},Ze=Xe,et=G,tt=function(e,t){var r=e[t];return et(r)?void 0:Ze(r)},rt=Oe,nt=ee,ot=ie,it=TypeError,at={exports:{}},st=X,ct=Object.defineProperty,ut=X,lt="__core-js_shared__",ft=at.exports=ut[lt]||function(e,t){try{ct(st,e,{value:t,configurable:!0,writable:!0})}catch(r){st[e]=t}return t}(lt,{});(ft.versions||(ft.versions=[])).push({version:"3.45.0",mode:"pure",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ht=at.exports,pt=ht,dt=function(e,t){return pt[e]||(pt[e]=t||{})},vt=z,yt=Object,mt=function(e){return yt(vt(e))},gt=mt,bt=C({}.hasOwnProperty),wt=Object.hasOwn||function(e,t){return bt(gt(e),t)},Ot=C,Pt=0,St=Math.random(),Et=Ot(1.1.toString),jt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Et(++Pt+St,36)},_t=dt,At=wt,Rt=jt,kt=Be,xt=Fe,Tt=X.Symbol,It=_t("wks"),Ct=xt?Tt.for||Tt:Tt&&Tt.withoutSetter||Rt,Nt=function(e){return At(It,e)||(It[e]=kt&&At(Tt,e)?Tt[e]:Ct("Symbol."+e)),It[e]},Ut=Oe,Lt=ie,Mt=ze,qt=tt,Dt=TypeError,Bt=Nt("toPrimitive"),Ft=function(e,t){if(!Lt(e)||Mt(e))return e;var r,n=qt(e,Bt);if(n){if(void 0===t&&(t="default"),r=Ut(n,e,t),!Lt(r)||Mt(r))return r;throw new Dt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&nt(r=e.toString)&&!ot(n=rt(r,e)))return n;if(nt(r=e.valueOf)&&!ot(n=rt(r,e)))return n;if("string"!==t&&nt(r=e.toString)&&!ot(n=rt(r,e)))return n;throw new it("Can't convert object to primitive value")}(e,t)},Ht=ze,Gt=function(e){var t=Ft(e,"string");return Ht(t)?t:t+""},Jt=ae,Wt=pe,zt=de,Vt=ge,$t=Gt,Qt=TypeError,Kt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Xt="enumerable",Zt="configurable",er="writable";se.f=Jt?zt?function(e,t,r){if(Vt(e),t=$t(t),Vt(r),"function"==typeof e&&"prototype"===t&&"value"in r&&er in r&&!r[er]){var n=Yt(e,t);n&&n[er]&&(e[t]=r.value,r={configurable:Zt in r?r[Zt]:n[Zt],enumerable:Xt in r?r[Xt]:n[Xt],writable:!1})}return Kt(e,t,r)}:Kt:function(e,t,r){if(Vt(e),t=$t(t),Vt(r),Wt)try{return Kt(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Qt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var tr,rr,nr,or=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ir=se,ar=or,sr=ae?function(e,t,r){return ir.f(e,t,ar(1,r))}:function(e,t,r){return e[t]=r,e},cr=jt,ur=dt("keys"),lr=function(e){return ur[e]||(ur[e]=cr(e))},fr={},hr=ne,pr=X,dr=ie,vr=sr,yr=wt,mr=ht,gr=lr,br=fr,wr="Object already initialized",Or=pr.TypeError,Pr=pr.WeakMap;if(hr||mr.state){var Sr=mr.state||(mr.state=new Pr);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,tr=function(e,t){if(Sr.has(e))throw new Or(wr);return t.facade=e,Sr.set(e,t),t},rr=function(e){return Sr.get(e)||{}},nr=function(e){return Sr.has(e)}}else{var Er=gr("state");br[Er]=!0,tr=function(e,t){if(yr(e,Er))throw new Or(wr);return t.facade=e,vr(e,Er,t),t},rr=function(e){return yr(e,Er)?e[Er]:{}},nr=function(e){return yr(e,Er)}}var jr={set:tr,get:rr,has:nr,enforce:function(e){return nr(e)?rr(e):tr(e,{})},getterFor:function(e){return function(t){var r;if(!dr(t)||(r=rr(t)).type!==e)throw new Or("Incompatible receiver, "+e+" required");return r}}},_r=R,Ar=Function.prototype,Rr=Ar.apply,kr=Ar.call,xr="object"==typeof Reflect&&Reflect.apply||(_r?kr.bind(Rr):function(){return kr.apply(Rr,arguments)}),Tr=M,Ir=C,Cr=function(e){if("Function"===Tr(e))return Ir(e)},Nr={},Ur={},Lr={}.propertyIsEnumerable,Mr=Object.getOwnPropertyDescriptor,qr=Mr&&!Lr.call({1:2},1);Ur.f=qr?function(e){var t=Mr(this,e);return!!t&&t.enumerable}:Lr;var Dr=ae,Br=Oe,Fr=Ur,Hr=or,Gr=Q,Jr=Gt,Wr=wt,zr=pe,Vr=Object.getOwnPropertyDescriptor;Nr.f=Dr?Vr:function(e,t){if(e=Gr(e),t=Jr(t),zr)try{return Vr(e,t)}catch(e){}if(Wr(e,t))return Hr(!Br(Fr.f,e,t),e[t])};var $r=A,Qr=ee,Kr=/#|\.prototype\./,Yr=function(e,t){var r=Zr[Xr(e)];return r===tn||r!==en&&(Qr(t)?$r(t):!!t)},Xr=Yr.normalize=function(e){return String(e).replace(Kr,".").toLowerCase()},Zr=Yr.data={},en=Yr.NATIVE="N",tn=Yr.POLYFILL="P",rn=Yr,nn=Xe,on=R,an=Cr(Cr.bind),sn=function(e,t){return nn(e),void 0===t?e:on?an(e,t):function(){return e.apply(t,arguments)}},cn=X,un=xr,ln=Cr,fn=ee,hn=Nr.f,pn=rn,dn=Pe,vn=sn,yn=sr,mn=wt,gn=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return un(e,this,arguments)};return t.prototype=e.prototype,t},bn=function(e,t){var r,n,o,i,a,s,c,u,l,f=e.target,h=e.global,p=e.stat,d=e.proto,v=h?cn:p?cn[f]:cn[f]&&cn[f].prototype,y=h?dn:dn[f]||yn(dn,f,{})[f],m=y.prototype;for(i in t)n=!(r=pn(h?i:f+(p?".":"#")+i,e.forced))&&v&&mn(v,i),s=y[i],n&&(c=e.dontCallGetSet?(l=hn(v,i))&&l.value:v[i]),a=n&&c?c:t[i],(r||d||typeof s!=typeof a)&&(u=e.bind&&n?vn(a,cn):e.wrap&&n?gn(a):d&&fn(a)?ln(a):a,(e.sham||a&&a.sham||s&&s.sham)&&yn(u,"sham",!0),yn(y,i,u),d&&(mn(dn,o=f+"Prototype")||yn(dn,o,{}),yn(dn[o],i,a),e.real&&m&&(r||!m[i])&&yn(m,i,a)))},wn=ae,On=wt,Pn=Function.prototype,Sn=wn&&Object.getOwnPropertyDescriptor,En=On(Pn,"name"),jn={EXISTS:En,PROPER:En&&"something"===function(){}.name,CONFIGURABLE:En&&(!wn||wn&&Sn(Pn,"name").configurable)},_n={},An=Math.ceil,Rn=Math.floor,kn=Math.trunc||function(e){var t=+e;return(t>0?Rn:An)(t)},xn=function(e){var t=+e;return t!=t||0===t?0:kn(t)},Tn=xn,In=Math.max,Cn=Math.min,Nn=function(e,t){var r=Tn(e);return r<0?In(r+t,0):Cn(r,t)},Un=xn,Ln=Math.min,Mn=function(e){return function(e){var t=Un(e);return t>0?Ln(t,9007199254740991):0}(e.length)},qn=Q,Dn=Nn,Bn=Mn,Fn=function(e){return function(t,r,n){var o=qn(t),i=Bn(o);if(0===i)return!e&&-1;var a,s=Dn(n,i);if(e&&r!=r){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},Hn={includes:Fn(!0),indexOf:Fn(!1)},Gn=wt,Jn=Q,Wn=Hn.indexOf,zn=fr,Vn=C([].push),$n=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qn=$n,Kn=Object.keys||function(e){return function(e,t){var r,n=Jn(e),o=0,i=[];for(r in n)!Gn(zn,r)&&Gn(n,r)&&Vn(i,r);for(;t.length>o;)Gn(n,r=t[o++])&&(~Wn(i,r)||Vn(i,r));return i}(e,Qn)},Yn=ae,Xn=de,Zn=se,eo=ge,to=Q,ro=Kn;_n.f=Yn&&!Xn?Object.defineProperties:function(e,t){eo(e);for(var r,n=to(t),o=ro(t),i=o.length,a=0;i>a;)Zn.f(e,r=o[a++],n[r]);return e};var no,oo=Ae("document","documentElement"),io=ge,ao=_n,so=$n,co=fr,uo=oo,lo=fe,fo="prototype",ho="script",po=lr("IE_PROTO"),vo=function(){},yo=function(e){return"<"+ho+">"+e+"</"+ho+">"},mo=function(e){e.write(yo("")),e.close();var t=e.parentWindow.Object;return e=null,t},go=function(){try{no=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;go="undefined"!=typeof document?document.domain&&no?mo(no):(t=lo("iframe"),r="java"+ho+":",t.style.display="none",uo.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(yo("document.F=Object")),e.close(),e.F):mo(no);for(var n=so.length;n--;)delete go[fo][so[n]];return go()};co[po]=!0;var bo,wo,Oo,Po=Object.create||function(e,t){var r;return null!==e?(vo[fo]=io(e),r=new vo,vo[fo]=null,r[po]=e):r=go(),void 0===t?r:ao.f(r,t)},So=!A((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Eo=wt,jo=ee,_o=mt,Ao=So,Ro=lr("IE_PROTO"),ko=Object,xo=ko.prototype,To=Ao?ko.getPrototypeOf:function(e){var t=_o(e);if(Eo(t,Ro))return t[Ro];var r=t.constructor;return jo(r)&&t instanceof r?r.prototype:t instanceof ko?xo:null},Io=sr,Co=function(e,t,r,n){return n&&n.enumerable?e[t]=r:Io(e,t,r),e},No=A,Uo=ee,Lo=ie,Mo=Po,qo=To,Do=Co,Bo=Nt("iterator"),Fo=!1;[].keys&&("next"in(Oo=[].keys())?(wo=qo(qo(Oo)))!==Object.prototype&&(bo=wo):Fo=!0);var Ho=!Lo(bo)||No((function(){var e={};return bo[Bo].call(e)!==e}));Uo((bo=Ho?{}:Mo(bo))[Bo])||Do(bo,Bo,(function(){return this}));var Go={IteratorPrototype:bo,BUGGY_SAFARI_ITERATORS:Fo},Jo={};Jo[Nt("toStringTag")]="z";var Wo="[object z]"===String(Jo),zo=Wo,Vo=ee,$o=M,Qo=Nt("toStringTag"),Ko=Object,Yo="Arguments"===$o(function(){return arguments}()),Xo=zo?$o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Ko(e),Qo))?r:Yo?$o(t):"Object"===(n=$o(t))&&Vo(t.callee)?"Arguments":n},Zo=Xo,ei=Wo?{}.toString:function(){return"[object "+Zo(this)+"]"},ti=Wo,ri=se.f,ni=sr,oi=wt,ii=ei,ai=Nt("toStringTag"),si=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(oi(o,ai)||ri(o,ai,{configurable:!0,value:t}),n&&!ti&&ni(o,"toString",ii))},ci=Go.IteratorPrototype,ui=Po,li=or,fi=si,hi=K,pi=function(){return this},di=function(e,t,r,n){var o=t+" Iterator";return e.prototype=ui(ci,{next:li(+!n,r)}),fi(e,o,!1,!0),hi[o]=pi,e},vi=bn,yi=Oe,mi=di,gi=To,bi=si,wi=Co,Oi=K,Pi=jn.PROPER,Si=Go.BUGGY_SAFARI_ITERATORS,Ei=Nt("iterator"),ji="keys",_i="values",Ai="entries",Ri=function(){return this},ki=function(e,t,r,n,o,i,a){mi(r,t,n);var s,c,u,l=function(e){if(e===o&&v)return v;if(!Si&&e&&e in p)return p[e];switch(e){case ji:case _i:case Ai:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,p=e.prototype,d=p[Ei]||p["@@iterator"]||o&&p[o],v=!Si&&d||l(o),y="Array"===t&&p.entries||d;if(y&&(s=gi(y.call(new e)))!==Object.prototype&&s.next&&(bi(s,f,!0,!0),Oi[f]=Ri),Pi&&o===_i&&d&&d.name!==_i&&(h=!0,v=function(){return yi(d,this)}),o)if(c={values:l(_i),keys:i?v:l(ji),entries:l(Ai)},a)for(u in c)(Si||h||!(u in p))&&wi(p,u,c[u]);else vi({target:t,proto:!0,forced:Si||h},c);return a&&p[Ei]!==v&&wi(p,Ei,v,{name:o}),Oi[t]=v,c},xi=function(e,t){return{value:e,done:t}},Ti=Q,Ii=K,Ci=jr;se.f;var Ni=ki,Ui=xi,Li="Array Iterator",Mi=Ci.set,qi=Ci.getterFor(Li);Ni(Array,"Array",(function(e,t){Mi(this,{type:Li,target:Ti(e),index:0,kind:t})}),(function(){var e=qi(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Ui(void 0,!0);switch(e.kind){case"keys":return Ui(r,!1);case"values":return Ui(t[r],!1)}return Ui([r,t[r]],!1)}),"values"),Ii.Arguments=Ii.Array;var Di=bn,Bi=C,Fi=Nn,Hi=RangeError,Gi=String.fromCharCode,Ji=String.fromCodePoint,Wi=Bi([].join);Di({target:"String",stat:!0,arity:1,forced:!!Ji&&1!==Ji.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],Fi(t,1114111)!==t)throw new Hi(t+" is not a valid code point");r[o]=t<65536?Gi(t):Gi(55296+((t-=65536)>>10),t%1024+56320)}return Wi(r,"")}});var zi=X,Vi=ae,$i=Object.getOwnPropertyDescriptor,Qi=A,Ki=Nt("iterator"),Yi=!Qi((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b")||!t.size&&true||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ki]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})),Xi=se,Zi=function(e,t,r){return Xi.f(e,t,r)},ea=Co,ta=Re,ra=TypeError,na=function(e,t){if(ta(t,e))return e;throw new ra("Incorrect invocation")},oa=Xo,ia=String,aa=function(e){if("Symbol"===oa(e))throw new TypeError("Cannot convert a Symbol value to a string");return ia(e)},sa=Xo,ca=tt,ua=G,la=K,fa=Nt("iterator"),ha=function(e){if(!ua(e))return ca(e,fa)||ca(e,"@@iterator")||la[sa(e)]},pa=Oe,da=Xe,va=ge,ya=$e,ma=ha,ga=TypeError,ba=function(e,t){var r=arguments.length<2?ma(e):t;if(da(r))return va(pa(r,e));throw new ga(ya(e)+" is not iterable")},wa=TypeError,Oa=function(e,t){if(e<t)throw new wa("Not enough arguments");return e},Pa=C([].slice),Sa=Pa,Ea=Math.floor,ja=function(e,t){var r=e.length;if(r<8)for(var n,o,i=1;i<r;){for(o=i,n=e[i];o&&t(e[o-1],n)>0;)e[o]=e[--o];o!==i++&&(e[o]=n)}else for(var a=Ea(r/2),s=ja(Sa(e,0,a),t),c=ja(Sa(e,a),t),u=s.length,l=c.length,f=0,h=0;f<u||h<l;)e[f+h]=f<u&&h<l?t(s[f],c[h])<=0?s[f++]:c[h++]:f<u?s[f++]:c[h++];return e},_a=bn,Aa=X,Ra=function(e){if(!Vi)return zi[e];var t=$i(zi,e);return t&&t.value},ka=Ae,xa=Oe,Ta=C,Ia=ae,Ca=Yi,Na=Co,Ua=Zi,La=si,Ma=di,qa=jr,Da=na,Ba=ee,Fa=wt,Ha=sn,Ga=Xo,Ja=ge,Wa=ie,za=aa,Va=Po,$a=or,Qa=ba,Ka=ha,Ya=xi,Xa=Oa,Za=ja,es=Nt("iterator"),ts="URLSearchParams",rs=ts+"Iterator",ns=qa.set,os=qa.getterFor(ts),is=qa.getterFor(rs),as=Ra("fetch"),ss=Ra("Request"),cs=Ra("Headers"),us=ss&&ss.prototype,ls=cs&&cs.prototype,fs=Aa.TypeError,hs=Aa.encodeURIComponent,ps=String.fromCharCode,ds=ka("String","fromCodePoint"),vs=parseInt,ys=Ta("".charAt),ms=Ta([].join),gs=Ta([].push),bs=Ta("".replace),ws=Ta([].shift),Os=Ta([].splice),Ps=Ta("".split),Ss=Ta("".slice),Es=Ta(/./.exec),js=/\+/g,_s=/^[0-9a-f]+$/i,As=function(e,t){var r=Ss(e,t,t+2);return Es(_s,r)?vs(r,16):NaN},Rs=function(e){for(var t=0,r=128;r>0&&e&r;r>>=1)t++;return t},ks=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},xs=function(e){for(var t=(e=bs(e,js," ")).length,r="",n=0;n<t;){var o=ys(e,n);if("%"===o){if("%"===ys(e,n+1)||n+3>t){r+="%",n++;continue}var i=As(e,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=Rs(i);if(0===a)o=ps(i);else{if(1===a||a>4){r+="�",n++;continue}for(var s=[i],c=1;c<a&&!(3+ ++n>t||"%"!==ys(e,n));){var u=As(e,n+1);if(u!=u){n+=3;break}if(u>191||u<128)break;gs(s,u),n+=2,c++}if(s.length!==a){r+="�";continue}var l=ks(s);null===l?r+="�":o=ds(l)}}r+=o,n++}return r},Ts=/[!'()~]|%20/g,Is={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Cs=function(e){return Is[e]},Ns=function(e){return bs(hs(e),Ts,Cs)},Us=Ma((function(e,t){ns(this,{type:rs,target:os(e).entries,index:0,kind:t})}),ts,(function(){var e=is(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Ya(void 0,!0);var n=t[r];switch(e.kind){case"keys":return Ya(n.key,!1);case"values":return Ya(n.value,!1)}return Ya([n.key,n.value],!1)}),!0),Ls=function(e){this.entries=[],this.url=null,void 0!==e&&(Wa(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ys(e,0)?Ss(e,1):e:za(e)))};Ls.prototype={type:ts,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,c=this.entries,u=Ka(e);if(u)for(r=(t=Qa(e,u)).next;!(n=xa(r,t)).done;){if(i=(o=Qa(Ja(n.value))).next,(a=xa(i,o)).done||(s=xa(i,o)).done||!xa(i,o).done)throw new fs("Expected sequence with length 2");gs(c,{key:za(a.value),value:za(s.value)})}else for(var l in e)Fa(e,l)&&gs(c,{key:l,value:za(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,o=Ps(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(r=Ps(t,"="),gs(n,{key:xs(ws(r)),value:xs(ms(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],gs(r,Ns(e.key)+"="+Ns(e.value));return ms(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ms=function(){Da(this,qs);var e=ns(this,new Ls(arguments.length>0?arguments[0]:void 0));Ia||(this.size=e.entries.length)},qs=Ms.prototype;if(function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ea(e,n,t[n],r)}(qs,{append:function(e,t){var r=os(this);Xa(arguments.length,2),gs(r.entries,{key:za(e),value:za(t)}),Ia||this.length++,r.updateURL()},delete:function(e){for(var t=os(this),r=Xa(arguments.length,1),n=t.entries,o=za(e),i=r<2?void 0:arguments[1],a=void 0===i?i:za(i),s=0;s<n.length;){var c=n[s];if(c.key!==o||void 0!==a&&c.value!==a)s++;else if(Os(n,s,1),void 0!==a)break}Ia||(this.size=n.length),t.updateURL()},get:function(e){var t=os(this).entries;Xa(arguments.length,1);for(var r=za(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=os(this).entries;Xa(arguments.length,1);for(var r=za(e),n=[],o=0;o<t.length;o++)t[o].key===r&&gs(n,t[o].value);return n},has:function(e){for(var t=os(this).entries,r=Xa(arguments.length,1),n=za(e),o=r<2?void 0:arguments[1],i=void 0===o?o:za(o),a=0;a<t.length;){var s=t[a++];if(s.key===n&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var r=os(this);Xa(arguments.length,1);for(var n,o=r.entries,i=!1,a=za(e),s=za(t),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?Os(o,c--,1):(i=!0,n.value=s));i||gs(o,{key:a,value:s}),Ia||(this.size=o.length),r.updateURL()},sort:function(){var e=os(this);Za(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=os(this).entries,n=Ha(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new Us(this,"keys")},values:function(){return new Us(this,"values")},entries:function(){return new Us(this,"entries")}},{enumerable:!0}),Na(qs,es,qs.entries,{name:"entries"}),Na(qs,"toString",(function(){return os(this).serialize()}),{enumerable:!0}),Ia&&Ua(qs,"size",{get:function(){return os(this).entries.length},configurable:!0,enumerable:!0}),La(Ms,ts),_a({global:!0,constructor:!0,forced:!Ca},{URLSearchParams:Ms}),!Ca&&Ba(cs)){var Ds=Ta(ls.has),Bs=Ta(ls.set),Fs=function(e){if(Wa(e)){var t,r=e.body;if(Ga(r)===ts)return t=e.headers?new cs(e.headers):new cs,Ds(t,"content-type")||Bs(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Va(e,{body:$a(0,za(r)),headers:$a(0,t)})}return e};if(Ba(as)&&_a({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return as(e,arguments.length>1?Fs(arguments[1]):{})}}),Ba(ss)){var Hs=function(e){return Da(this,us),new ss(e,arguments.length>1?Fs(arguments[1]):{})};us.constructor=Hs,Hs.prototype=us,_a({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Hs})}}var Gs={URLSearchParams:Ms,getState:os},Js=C,Ws=xn,zs=aa,Vs=z,$s=Js("".charAt),Qs=Js("".charCodeAt),Ks=Js("".slice),Ys=function(e){return function(t,r){var n,o,i=zs(Vs(t)),a=Ws(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=Qs(i,a))<55296||n>56319||a+1===s||(o=Qs(i,a+1))<56320||o>57343?e?$s(i,a):n:e?Ks(i,a,a+2):o-56320+(n-55296<<10)+65536}},Xs={codeAt:Ys(!1),charAt:Ys(!0)},Zs=Xs.charAt,ec=aa,tc=jr,rc=ki,nc=xi,oc="String Iterator",ic=tc.set,ac=tc.getterFor(oc);rc(String,"String",(function(e){ic(this,{type:oc,string:ec(e),index:0})}),(function(){var e,t=ac(this),r=t.string,n=t.index;return n>=r.length?nc(void 0,!0):(e=Zs(r,n),t.index+=e.length,nc(e,!1))}));var sc={};sc.f=Object.getOwnPropertySymbols;var cc=ae,uc=C,lc=Oe,fc=A,hc=Kn,pc=sc,dc=Ur,vc=mt,yc=H,mc=Object.assign,gc=Object.defineProperty,bc=uc([].concat),wc=!mc||fc((function(){if(cc&&1!==mc({b:1},mc(gc({},"a",{enumerable:!0,get:function(){gc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==mc({},e)[r]||hc(mc({},t)).join("")!==n}))?function(e,t){for(var r=vc(e),n=arguments.length,o=1,i=pc.f,a=dc.f;n>o;)for(var s,c=yc(arguments[o++]),u=i?bc(hc(c),i(c)):hc(c),l=u.length,f=0;l>f;)s=u[f++],cc&&!lc(a,c,s)||(r[s]=c[s]);return r}:mc,Oc=Oe,Pc=ge,Sc=tt,Ec=ge,jc=K,_c=Nt("iterator"),Ac=Array.prototype,Rc=ee,kc=ht,xc=C(Function.toString);Rc(kc.inspectSource)||(kc.inspectSource=function(e){return xc(e)});var Tc=kc.inspectSource,Ic=C,Cc=A,Nc=ee,Uc=Xo,Lc=Tc,Mc=function(){},qc=Ae("Reflect","construct"),Dc=/^\s*(?:class|function)\b/,Bc=Ic(Dc.exec),Fc=!Dc.test(Mc),Hc=function(e){if(!Nc(e))return!1;try{return qc(Mc,[],e),!0}catch(e){return!1}},Gc=function(e){if(!Nc(e))return!1;switch(Uc(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Fc||!!Bc(Dc,Lc(e))}catch(e){return!0}};Gc.sham=!0;var Jc,Wc=!qc||Cc((function(){var e;return Hc(Hc.call)||!Hc(Object)||!Hc((function(){e=!0}))||e}))?Gc:Hc,zc=ae,Vc=se,$c=or,Qc=sn,Kc=Oe,Yc=mt,Xc=function(e,t,r,n){try{return n?t(Ec(r)[0],r[1]):t(r)}catch(t){!function(e,t,r){var n,o;Pc(e);try{if(!(n=Sc(e,"return"))){if("throw"===t)throw r;return r}n=Oc(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;Pc(n)}(e,"throw",t)}},Zc=Wc,eu=Mn,tu=function(e,t,r){zc?Vc.f(e,t,$c(0,r)):e[t]=r},ru=ba,nu=ha,ou=Array,iu=C,au=2147483647,su=/[^\0-\u007E]/,cu=/[.\u3002\uFF0E\uFF61]/g,uu="Overflow: input needs wider integers to process",lu=RangeError,fu=iu(cu.exec),hu=Math.floor,pu=String.fromCharCode,du=iu("".charCodeAt),vu=iu([].join),yu=iu([].push),mu=iu("".replace),gu=iu("".split),bu=iu("".toLowerCase),wu=function(e){return e+22+75*(e<26)},Ou=function(e,t,r){var n=0;for(e=r?hu(e/700):e>>1,e+=hu(e/t);e>455;)e=hu(e/35),n+=36;return hu(n+36*e/(e+38))},Pu=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=du(e,r++);if(o>=55296&&o<=56319&&r<n){var i=du(e,r++);56320==(64512&i)?yu(t,((1023&o)<<10)+(1023&i)+65536):(yu(t,o),r--)}else yu(t,o)}return t}(e);var r,n,o=e.length,i=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&yu(t,pu(n));var c=t.length,u=c;for(c&&yu(t,"-");u<o;){var l=au;for(r=0;r<e.length;r++)(n=e[r])>=i&&n<l&&(l=n);var f=u+1;if(l-i>hu((au-a)/f))throw new lu(uu);for(a+=(l-i)*f,i=l,r=0;r<e.length;r++){if((n=e[r])<i&&++a>au)throw new lu(uu);if(n===i){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var v=h-d,y=36-d;yu(t,pu(wu(d+v%y))),h=hu(v/y),p+=36}yu(t,pu(wu(h))),s=Ou(a,f,u===c),a=0,u++}}a++,i++}return vu(t,"")},Su=bn,Eu=ae,ju=Yi,_u=X,Au=sn,Ru=C,ku=Co,xu=Zi,Tu=na,Iu=wt,Cu=wc,Nu=function(e){var t=Yc(e),r=Zc(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Qc(o,n>2?arguments[2]:void 0));var a,s,c,u,l,f,h=nu(t),p=0;if(!h||this===ou&&function(e){return void 0!==e&&(jc.Array===e||Ac[_c]===e)}(h))for(a=eu(t),s=r?new this(a):ou(a);a>p;p++)f=i?o(t[p],p):t[p],tu(s,p,f);else for(s=r?new this:[],l=(u=ru(t,h)).next;!(c=Kc(l,u)).done;p++)f=i?Xc(u,o,[c.value,p],!0):c.value,tu(s,p,f);return s.length=p,s},Uu=Pa,Lu=Xs.codeAt,Mu=aa,qu=si,Du=Oa,Bu=Gs,Fu=jr,Hu=Fu.set,Gu=Fu.getterFor("URL"),Ju=Bu.URLSearchParams,Wu=Bu.getState,zu=_u.URL,Vu=_u.TypeError,$u=_u.parseInt,Qu=Math.floor,Ku=Math.pow,Yu=Ru("".charAt),Xu=Ru(/./.exec),Zu=Ru([].join),el=Ru(1.1.toString),tl=Ru([].pop),rl=Ru([].push),nl=Ru("".replace),ol=Ru([].shift),il=Ru("".split),al=Ru("".slice),sl=Ru("".toLowerCase),cl=Ru([].unshift),ul="Invalid scheme",ll="Invalid host",fl="Invalid port",hl=/[a-z]/i,pl=/[\d+-.a-z]/i,dl=/\d/,vl=/^0x/i,yl=/^[0-7]+$/,ml=/^\d+$/,gl=/^[\da-f]+$/i,bl=/[\0\t\n\r #%/:<>?@[\\\]^|]/,wl=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ol=/^[\u0000-\u0020]+/,Pl=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sl=/[\t\n\r]/g,El=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)cl(t,e%256),e=Qu(e/256);return Zu(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=el(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},jl={},_l=Cu({},jl,{" ":1,'"':1,"<":1,">":1,"`":1}),Al=Cu({},_l,{"#":1,"?":1,"{":1,"}":1}),Rl=Cu({},Al,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),kl=function(e,t){var r=Lu(e,0);return r>32&&r<127&&!Iu(t,e)?e:encodeURIComponent(e)},xl={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tl=function(e,t){var r;return 2===e.length&&Xu(hl,Yu(e,0))&&(":"===(r=Yu(e,1))||!t&&"|"===r)},Il=function(e){var t;return e.length>1&&Tl(al(e,0,2))&&(2===e.length||"/"===(t=Yu(e,2))||"\\"===t||"?"===t||"#"===t)},Cl=function(e){return"."===e||"%2e"===sl(e)},Nl=function(e){return".."===(e=sl(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},Ul={},Ll={},Ml={},ql={},Dl={},Bl={},Fl={},Hl={},Gl={},Jl={},Wl={},zl={},Vl={},$l={},Ql={},Kl={},Yl={},Xl={},Zl={},ef={},tf={},rf=function(e,t,r){var n,o,i,a=Mu(e);if(t){if(o=this.parse(a))throw new Vu(o);this.searchParams=null}else{if(void 0!==r&&(n=new rf(r,!0)),o=this.parse(a,null,n))throw new Vu(o);(i=Wu(new Ju)).bindURL(this),this.searchParams=i}};rf.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,c=t||Ul,u=0,l="",f=!1,h=!1,p=!1;for(e=Mu(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=nl(e,Ol,""),e=nl(e,Pl,"$1")),e=nl(e,Sl,""),n=Nu(e);u<=n.length;){switch(o=n[u],c){case Ul:if(!o||!Xu(hl,o)){if(t)return ul;c=Ml;continue}l+=sl(o),c=Ll;break;case Ll:if(o&&(Xu(pl,o)||"+"===o||"-"===o||"."===o))l+=sl(o);else{if(":"!==o){if(t)return ul;l="",c=Ml,u=0;continue}if(t&&(s.isSpecial()!==Iu(xl,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,t)return void(s.isSpecial()&&xl[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=$l:s.isSpecial()&&r&&r.scheme===s.scheme?c=ql:s.isSpecial()?c=Hl:"/"===n[u+1]?(c=Dl,u++):(s.cannotBeABaseURL=!0,rl(s.path,""),c=Zl)}break;case Ml:if(!r||r.cannotBeABaseURL&&"#"!==o)return ul;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=Uu(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=tf;break}c="file"===r.scheme?$l:Bl;continue;case ql:if("/"!==o||"/"!==n[u+1]){c=Bl;continue}c=Gl,u++;break;case Dl:if("/"===o){c=Jl;break}c=Xl;continue;case Bl:if(s.scheme=r.scheme,o===Jc)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Uu(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=Fl;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Uu(r.path),s.query="",c=ef;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Uu(r.path),s.path.length--,c=Xl;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Uu(r.path),s.query=r.query,s.fragment="",c=tf}break;case Fl:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=Xl;continue}c=Jl}else c=Gl;break;case Hl:if(c=Gl,"/"!==o||"/"!==Yu(l,u+1))continue;u++;break;case Gl:if("/"!==o&&"\\"!==o){c=Jl;continue}break;case Jl:if("@"===o){f&&(l="%40"+l),f=!0,i=Nu(l);for(var d=0;d<i.length;d++){var v=i[d];if(":"!==v||p){var y=kl(v,Rl);p?s.password+=y:s.username+=y}else p=!0}l=""}else if(o===Jc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(f&&""===l)return"Invalid authority";u-=Nu(l).length+1,l="",c=Wl}else l+=o;break;case Wl:case zl:if(t&&"file"===s.scheme){c=Kl;continue}if(":"!==o||h){if(o===Jc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(s.isSpecial()&&""===l)return ll;if(t&&""===l&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(l))return a;if(l="",c=Yl,t)return;continue}"["===o?h=!0:"]"===o&&(h=!1),l+=o}else{if(""===l)return ll;if(a=s.parseHost(l))return a;if(l="",c=Vl,t===zl)return}break;case Vl:if(!Xu(dl,o)){if(o===Jc||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()||t){if(""!==l){var m=$u(l,10);if(m>65535)return fl;s.port=s.isSpecial()&&m===xl[s.scheme]?null:m,l=""}if(t)return;c=Yl;continue}return fl}l+=o;break;case $l:if(s.scheme="file","/"===o||"\\"===o)c=Ql;else{if(!r||"file"!==r.scheme){c=Xl;continue}switch(o){case Jc:s.host=r.host,s.path=Uu(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=Uu(r.path),s.query="",c=ef;break;case"#":s.host=r.host,s.path=Uu(r.path),s.query=r.query,s.fragment="",c=tf;break;default:Il(Zu(Uu(n,u),""))||(s.host=r.host,s.path=Uu(r.path),s.shortenPath()),c=Xl;continue}}break;case Ql:if("/"===o||"\\"===o){c=Kl;break}r&&"file"===r.scheme&&!Il(Zu(Uu(n,u),""))&&(Tl(r.path[0],!0)?rl(s.path,r.path[0]):s.host=r.host),c=Xl;continue;case Kl:if(o===Jc||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&Tl(l))c=Xl;else if(""===l){if(s.host="",t)return;c=Yl}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),t)return;l="",c=Yl}continue}l+=o;break;case Yl:if(s.isSpecial()){if(c=Xl,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==Jc&&(c=Xl,"/"!==o))continue}else s.fragment="",c=tf;else s.query="",c=ef;break;case Xl:if(o===Jc||"/"===o||"\\"===o&&s.isSpecial()||!t&&("?"===o||"#"===o)){if(Nl(l)?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,"")):Cl(l)?"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,""):("file"===s.scheme&&!s.path.length&&Tl(l)&&(s.host&&(s.host=""),l=Yu(l,0)+":"),rl(s.path,l)),l="","file"===s.scheme&&(o===Jc||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)ol(s.path);"?"===o?(s.query="",c=ef):"#"===o&&(s.fragment="",c=tf)}else l+=kl(o,Al);break;case Zl:"?"===o?(s.query="",c=ef):"#"===o?(s.fragment="",c=tf):o!==Jc&&(s.path[0]+=kl(o,jl));break;case ef:t||"#"!==o?o!==Jc&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":kl(o,jl)):(s.fragment="",c=tf);break;case tf:o!==Jc&&(s.fragment+=kl(o,_l))}u++}},parseHost:function(e){var t,r,n;if("["===Yu(e,0)){if("]"!==Yu(e,e.length-1))return ll;if(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,h=function(){return Yu(e,f)};if(":"===h()){if(":"!==Yu(e,1))return;f+=2,l=++u}for(;h();){if(8===u)return;if(":"!==h()){for(t=r=0;r<4&&Xu(gl,h());)t=16*t+$u(h(),16),f++,r++;if("."===h()){if(0===r)return;if(f-=r,u>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;f++}if(!Xu(dl,h()))return;for(;Xu(dl,h());){if(i=$u(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;f++}c[u]=256*c[u]+o,2!=++n&&4!==n||u++}if(4!==n)return;break}if(":"===h()){if(f++,!h())return}else if(h())return;c[u++]=t}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(a=u-l,u=7;0!==u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!==u)return;return c}(al(e,1,-1)),!t)return ll;this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],o=gu(mu(bu(e),cu,"."),".");for(t=0;t<o.length;t++)r=o[t],yu(n,fu(su,r)?"xn--"+Pu(r):r);return vu(n,".")}(e),Xu(bl,e))return ll;if(t=function(e){var t,r,n,o,i,a,s,c=il(e,".");if(c.length&&""===c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(o=c[n]))return e;if(i=10,o.length>1&&"0"===Yu(o,0)&&(i=Xu(vl,o)?16:8,o=al(o,8===i?1:2)),""===o)a=0;else{if(!Xu(10===i?ml:8===i?yl:gl,o))return e;a=$u(o,i)}rl(r,a)}for(n=0;n<t;n++)if(a=r[n],n===t-1){if(a>=Ku(256,5-t))return null}else if(a>255)return null;for(s=tl(r),n=0;n<r.length;n++)s+=r[n]*Ku(256,3-n);return s}(e),null===t)return ll;this.host=t}else{if(Xu(wl,e))return ll;for(t="",r=Nu(e),n=0;n<r.length;n++)t+=kl(r[n],jl);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Iu(xl,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Tl(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=El(o),null!==i&&(u+=":"+i)):"file"===t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+Zu(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw new Vu(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new nf(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+El(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Mu(e)+":",Ul)},getUsername:function(){return this.username},setUsername:function(e){var t=Nu(Mu(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=kl(t[r],Rl)}},getPassword:function(){return this.password},setPassword:function(e){var t=Nu(Mu(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=kl(t[r],Rl)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?El(e):El(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wl)},getHostname:function(){var e=this.host;return null===e?"":El(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,zl)},getPort:function(){var e=this.port;return null===e?"":Mu(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=Mu(e))?this.port=null:this.parse(e,Vl))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Zu(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Yl))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=Mu(e))?this.query=null:("?"===Yu(e,0)&&(e=al(e,1)),this.query="",this.parse(e,ef)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=Mu(e))?("#"===Yu(e,0)&&(e=al(e,1)),this.fragment="",this.parse(e,tf)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nf=function(e){var t=Tu(this,of),r=Du(arguments.length,1)>1?arguments[1]:void 0,n=Hu(t,new rf(e,!1,r));Eu||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},of=nf.prototype,af=function(e,t){return{get:function(){return Gu(this)[e]()},set:t&&function(e){return Gu(this)[t](e)},configurable:!0,enumerable:!0}};if(Eu&&(xu(of,"href",af("serialize","setHref")),xu(of,"origin",af("getOrigin")),xu(of,"protocol",af("getProtocol","setProtocol")),xu(of,"username",af("getUsername","setUsername")),xu(of,"password",af("getPassword","setPassword")),xu(of,"host",af("getHost","setHost")),xu(of,"hostname",af("getHostname","setHostname")),xu(of,"port",af("getPort","setPort")),xu(of,"pathname",af("getPathname","setPathname")),xu(of,"search",af("getSearch","setSearch")),xu(of,"searchParams",af("getSearchParams")),xu(of,"hash",af("getHash","setHash"))),ku(of,"toJSON",(function(){return Gu(this).serialize()}),{enumerable:!0}),ku(of,"toString",(function(){return Gu(this).serialize()}),{enumerable:!0}),zu){var sf=zu.createObjectURL,cf=zu.revokeObjectURL;sf&&ku(nf,"createObjectURL",Au(sf,zu)),cf&&ku(nf,"revokeObjectURL",Au(cf,zu))}qu(nf,"URL"),Su({global:!0,constructor:!0,forced:!ju,sham:!Eu},{URL:nf});var uf=bn,lf=A,ff=Oa,hf=aa,pf=Yi,df=Ae("URL"),vf=pf&&lf((function(){df.canParse()})),yf=lf((function(){return 1!==df.canParse.length}));uf({target:"URL",stat:!0,forced:!vf||yf},{canParse:function(e){var t=ff(arguments.length,1),r=hf(e),n=t<2||void 0===arguments[1]?void 0:hf(arguments[1]);try{return!!new df(r,n)}catch(e){return!1}}});var mf=bn,gf=Oa,bf=aa,wf=Yi,Of=Ae("URL");mf({target:"URL",stat:!0,forced:!wf},{parse:function(e){var t=gf(arguments.length,1),r=bf(e),n=t<2||void 0===arguments[1]?void 0:bf(arguments[1]);try{return new Of(r,n)}catch(e){return null}}});var Pf=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Pe.URL),Sf=function(e){function t(t){var r=e.call(this,t.message)||this;return r.name="PostgrestError",r.details=t.details,r.hint=t.hint,r.code=t.code,r}return n(t,e),t}(Error),Ef=function(){function e(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,e.fetch?this.fetch=e.fetch:this.fetch=fetch}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.setHeader=function(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this},e.prototype.then=function(e,t){var r=this;void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");var n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((function(e){return i(r,0,void 0,(function(){var t,r,n,o,i,s,c,u,l,f,h,p;return a(this,(function(a){switch(a.label){case 0:return t=null,r=null,n=null,o=e.status,i=e.statusText,e.ok?"HEAD"===this.method?[3,2]:[4,e.text()]:[3,3];case 1:""===(u=a.sent())||(r="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(l=this.headers.get("Accept"))||void 0===l?void 0:l.includes("application/vnd.pgrst.plan+text"))?u:JSON.parse(u)),a.label=2;case 2:return s=null===(f=this.headers.get("Prefer"))||void 0===f?void 0:f.match(/count=(exact|planned|estimated)/),c=null===(h=e.headers.get("content-range"))||void 0===h?void 0:h.split("/"),s&&c&&c.length>1&&(n=parseInt(c[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(r)&&(r.length>1?(t={code:"PGRST116",details:"Results contain ".concat(r.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,n=null,o=406,i="Not Acceptable"):r=1===r.length?r[0]:null),[3,5];case 3:return[4,e.text()];case 4:u=a.sent();try{t=JSON.parse(u),Array.isArray(t)&&404===e.status&&(r=[],t=null,o=200,i="OK")}catch(r){404===e.status&&""===u?(o=204,i="No Content"):t={message:u}}if(t&&this.isMaybeSingle&&(null===(p=null==t?void 0:t.details)||void 0===p?void 0:p.includes("0 rows"))&&(t=null,o=200,i="OK"),t&&this.shouldThrowOnError)throw new Sf(t);a.label=5;case 5:return[2,{error:t,data:r,count:n,status:o,statusText:i}]}}))}))}));return this.shouldThrowOnError||(n=n.catch((function(e){var t,r,n;return{error:{message:"".concat(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError",": ").concat(null==e?void 0:e.message),details:"".concat(null!==(r=null==e?void 0:e.stack)&&void 0!==r?r:""),hint:"",code:"".concat(null!==(n=null==e?void 0:e.code)&&void 0!==n?n:"")},data:null,count:null,status:0,statusText:""}}))),n.then(e,t)},e.prototype.returns=function(){return this},e.prototype.overrideTypes=function(){return this},e}(),jf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.select=function(e){var t=!1,r=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)})).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this},t.prototype.order=function(e,t){var r=void 0===t?{}:t,n=r.ascending,o=void 0===n||n,i=r.nullsFirst,a=r.foreignTable,s=r.referencedTable,c=void 0===s?a:s,u=c?"".concat(c,".order"):"order",l=this.url.searchParams.get(u);return this.url.searchParams.set(u,"".concat(l?"".concat(l,","):"").concat(e,".").concat(o?"asc":"desc").concat(void 0===i?"":i?".nullsfirst":".nullslast")),this},t.prototype.limit=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=void 0===i?"limit":"".concat(i,".limit");return this.url.searchParams.set(a,"".concat(e)),this},t.prototype.range=function(e,t,r){var n=void 0===r?{}:r,o=n.foreignTable,i=n.referencedTable,a=void 0===i?o:i,s=void 0===a?"offset":"".concat(a,".offset"),c=void 0===a?"limit":"".concat(a,".limit");return this.url.searchParams.set(s,"".concat(e)),this.url.searchParams.set(c,"".concat(t-e+1)),this},t.prototype.abortSignal=function(e){return this.signal=e,this},t.prototype.single=function(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this},t.prototype.maybeSingle=function(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this},t.prototype.csv=function(){return this.headers.set("Accept","text/csv"),this},t.prototype.geojson=function(){return this.headers.set("Accept","application/geo+json"),this},t.prototype.explain=function(e){var t,r=void 0===e?{}:e,n=r.analyze,o=void 0!==n&&n,i=r.verbose,a=void 0!==i&&i,s=r.settings,c=void 0!==s&&s,u=r.buffers,l=void 0!==u&&u,f=r.wal,h=void 0!==f&&f,p=r.format,d=void 0===p?"text":p,v=[o?"analyze":null,a?"verbose":null,c?"settings":null,l?"buffers":null,h?"wal":null].filter(Boolean).join("|"),y=null!==(t=this.headers.get("Accept"))&&void 0!==t?t:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(d,'; for="').concat(y,'"; options=').concat(v,";")),this},t.prototype.rollback=function(){return this.headers.append("Prefer","tx=rollback"),this},t.prototype.returns=function(){return this},t.prototype.maxAffected=function(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(e)),this},t}(Ef),_f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.eq=function(e,t){return this.url.searchParams.append(e,"eq.".concat(t)),this},t.prototype.neq=function(e,t){return this.url.searchParams.append(e,"neq.".concat(t)),this},t.prototype.gt=function(e,t){return this.url.searchParams.append(e,"gt.".concat(t)),this},t.prototype.gte=function(e,t){return this.url.searchParams.append(e,"gte.".concat(t)),this},t.prototype.lt=function(e,t){return this.url.searchParams.append(e,"lt.".concat(t)),this},t.prototype.lte=function(e,t){return this.url.searchParams.append(e,"lte.".concat(t)),this},t.prototype.like=function(e,t){return this.url.searchParams.append(e,"like.".concat(t)),this},t.prototype.likeAllOf=function(e,t){return this.url.searchParams.append(e,"like(all).{".concat(t.join(","),"}")),this},t.prototype.likeAnyOf=function(e,t){return this.url.searchParams.append(e,"like(any).{".concat(t.join(","),"}")),this},t.prototype.ilike=function(e,t){return this.url.searchParams.append(e,"ilike.".concat(t)),this},t.prototype.ilikeAllOf=function(e,t){return this.url.searchParams.append(e,"ilike(all).{".concat(t.join(","),"}")),this},t.prototype.ilikeAnyOf=function(e,t){return this.url.searchParams.append(e,"ilike(any).{".concat(t.join(","),"}")),this},t.prototype.is=function(e,t){return this.url.searchParams.append(e,"is.".concat(t)),this},t.prototype.in=function(e,t){var r=Array.from(new Set(t)).map((function(e){return"string"==typeof e&&new RegExp("[,()]").test(e)?'"'.concat(e,'"'):"".concat(e)})).join(",");return this.url.searchParams.append(e,"in.(".concat(r,")")),this},t.prototype.contains=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cs.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cs.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cs.".concat(JSON.stringify(t))),this},t.prototype.containedBy=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cd.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cd.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cd.".concat(JSON.stringify(t))),this},t.prototype.rangeGt=function(e,t){return this.url.searchParams.append(e,"sr.".concat(t)),this},t.prototype.rangeGte=function(e,t){return this.url.searchParams.append(e,"nxl.".concat(t)),this},t.prototype.rangeLt=function(e,t){return this.url.searchParams.append(e,"sl.".concat(t)),this},t.prototype.rangeLte=function(e,t){return this.url.searchParams.append(e,"nxr.".concat(t)),this},t.prototype.rangeAdjacent=function(e,t){return this.url.searchParams.append(e,"adj.".concat(t)),this},t.prototype.overlaps=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"ov.".concat(t)):this.url.searchParams.append(e,"ov.{".concat(t.join(","),"}")),this},t.prototype.textSearch=function(e,t,r){var n=void 0===r?{}:r,o=n.config,i=n.type,a="";"plain"===i?a="pl":"phrase"===i?a="ph":"websearch"===i&&(a="w");var s=void 0===o?"":"(".concat(o,")");return this.url.searchParams.append(e,"".concat(a,"fts").concat(s,".").concat(t)),this},t.prototype.match=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t.url.searchParams.append(r,"eq.".concat(n))})),this},t.prototype.not=function(e,t,r){return this.url.searchParams.append(e,"not.".concat(t,".").concat(r)),this},t.prototype.or=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=i?"".concat(i,".or"):"or";return this.url.searchParams.append(a,"(".concat(e,")")),this},t.prototype.filter=function(e,t,r){return this.url.searchParams.append(e,"".concat(t,".").concat(r)),this},t}(jf),Af=function(){function e(e,t){var r=t.headers,n=void 0===r?{}:r,o=t.schema,i=t.fetch;this.url=e,this.headers=new Headers(n),this.schema=o,this.fetch=i}return e.prototype.select=function(e,t){var r=void 0===t?{}:t,n=r.head,o=void 0!==n&&n,i=r.count,a=o?"HEAD":"GET",s=!1,c=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!s?"":('"'===e&&(s=!s),e)})).join("");return this.url.searchParams.set("select",c),i&&this.headers.append("Prefer","count=".concat(i)),new _f({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})},e.prototype.insert=function(e,t){var r,n=void 0===t?{}:t,o=n.count,i=n.defaultToNull,a=void 0===i||i;if(o&&this.headers.append("Prefer","count=".concat(o)),a||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var s=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(s.length>0){var c=Array.from(new Set(s)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",c.join(","))}}return new _f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.upsert=function(e,t){var r,n=void 0===t?{}:t,o=n.onConflict,i=n.ignoreDuplicates,a=void 0!==i&&i,s=n.count,c=n.defaultToNull,u=void 0===c||c;if(this.headers.append("Prefer","resolution=".concat(a?"ignore":"merge","-duplicates")),void 0!==o&&this.url.searchParams.set("on_conflict",o),s&&this.headers.append("Prefer","count=".concat(s)),u||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var l=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(l.length>0){var f=Array.from(new Set(l)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",f.join(","))}}return new _f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.update=function(e,t){var r,n=(void 0===t?{}:t).count;return n&&this.headers.append("Prefer","count=".concat(n)),new _f({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.delete=function(e){var t,r=(void 0===e?{}:e).count;return r&&this.headers.append("Prefer","count=".concat(r)),new _f({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch})},e}(),Rf=function(){function e(e,t){var r=void 0===t?{}:t,n=r.headers,o=void 0===n?{}:n,i=r.schema,a=r.fetch;this.url=e,this.headers=new Headers(o),this.schemaName=i,this.fetch=a}return e.prototype.from=function(e){var t=new URL("".concat(this.url,"/").concat(e));return new Af(t,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})},e.prototype.schema=function(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch})},e.prototype.rpc=function(e,t,r){var n;void 0===t&&(t={});var o,i,a=void 0===r?{}:r,s=a.head,c=void 0!==s&&s,u=a.get,l=void 0!==u&&u,f=a.count,h=new URL("".concat(this.url,"/rpc/").concat(e));c||l?(o=c?"HEAD":"GET",Object.entries(t).filter((function(e){return e[0],void 0!==e[1]})).map((function(e){var t=e[0],r=e[1];return[t,Array.isArray(r)?"{".concat(r.join(","),"}"):"".concat(r)]})).forEach((function(e){var t=e[0],r=e[1];h.searchParams.append(t,r)}))):(o="POST",i=t);var p=new Headers(this.headers);return f&&p.set("Prefer","count=".concat(f)),new _f({method:o,url:h,headers:p,schema:this.schemaName,body:i,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch})},e}(),kf=function(e){function t(t,r){var n=r.headers,o=void 0===n?{}:n,i=r.fetch;return e.call(this,t,{headers:o,schema:void 0,fetch:i})||this}return n(t,e),t}(Af),xf=function(){function e(e,t){var r=void 0===t?{}:t,n=r.headers,o=void 0===n?{}:n,i=r.fetch;this.url=e,this.headers=new Headers(o),this.fetch=i}return e.prototype.from=function(e){var t=new Pf("".concat(this.url,"/").concat(e));return new kf(t,{headers:this.headers,fetch:this.fetch})},e}();function Tf(e,t){if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var r=e.callFunction.bind(e);return e.models=P(r,e),e.mysql=Cf(e,{envId:null==t?void 0:t.envId}),e.rdb=Nf(e,{envId:null==t?void 0:t.envId}),e}function If(e,t,r){var n=this;return function(t){if(r)return r;var s=null==t?void 0:t.instance,c=null==t?void 0:t.database;return function(t,r){return i(n,0,void 0,(function(){var n;return a(this,(function(i){return n={},(null==r?void 0:r.headers)instanceof Headers?r.headers.forEach((function(e,t){n[t]=e})):n=(null==r?void 0:r.headers)||{},[2,e.callFunction({name:"httpOverCallFunction",data:{url:t.toString(),method:(null==r?void 0:r.method)||"GET",headers:o(o({"Content-Type":"application/json"},n||{}),{"X-Db-Instance":s||(null==n?void 0:n["X-Db-Instance"]),"Accept-Profile":c||(null==n?void 0:n["Accept-Profile"]),"Content-Profile":c||(null==n?void 0:n["Content-Profile"])}),body:null==r?void 0:r.body}}).then((function(e){var t=null==e?void 0:e.result;return{ok:(null==t?void 0:t.statusCode)>=200&&(null==t?void 0:t.statusCode)<300,status:(null==t?void 0:t.statusCode)||200,statusText:(null==t?void 0:t.statusMessage)||"OK",json:function(){return Promise.resolve((null==t?void 0:t.body)||{})},text:function(){return Promise.resolve("string"==typeof(null==t?void 0:t.body)?t.body:JSON.stringify((null==t?void 0:t.body)||{}))},headers:new Headers((null==t?void 0:t.headers)||{})}}))]}))}))}}}function Cf(e,t){var r=(null==t?void 0:t.mysqlBaseUrl)||Uf(e,null==t?void 0:t.envId).mysql,n=If(e,null==t||t.envId,null==t?void 0:t.fetch);return function(e){return new xf(r,{fetch:n(e)})}}function Nf(e,t){var r=(null==t?void 0:t.pgBaseUrl)||Uf(e,null==t?void 0:t.envId).rdb,n=If(e,null==t||t.envId,null==t?void 0:t.fetch);return function(e){return new Rf(r,{fetch:n(e),schema:(null==e?void 0:e.schema)||(null==e?void 0:e.database)})}}function Uf(e,t){var r=function(e,t){var r,n,o,i,a=t||(null===(n=null===(r=null==e?void 0:e.extend)||void 0===r?void 0:r.AI)||void 0===n?void 0:n.env);return"string"==typeof a&&a.trim()||(a=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.env),"string"==typeof a&&a.trim()||(a=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.envName),"string"==typeof a&&a.trim()?a.trim():""}(e,t);if(!r)throw new Error("Generating default gateway base url failed: env not found");return{model:"https://".concat(r,".api.tcloudbasegateway.com/v1/model"),sql:"https://".concat(r,".api.tcloudbasegateway.com/v1/sql"),mysql:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest"),rdb:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest")}}var Lf={init:Tf,generateHTTPClient:g,generateMySQLClient:Cf,generatePGClient:Nf};e.default=Lf,e.generateHTTPClient=g,e.generateMySQLClient=Cf,e.generatePGClient=Nf,e.init=Tf,e.initHTTPOverCallFunction=function(e,t){var r=this;if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var n,s=e.callFunction.bind(e);try{var c=(null==t?void 0:t.baseUrl)||Uf(e,null==t?void 0:t.envId).model,u=(null==t?void 0:t.sqlBaseUrl)||Uf(e,null==t?void 0:t.envId).sql;n=g(s,(function(e){var t=e.url,n=e.body,c=e.method,u=e.headers;return i(r,0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return[4,s({name:"httpOverCallFunction",data:{url:t,method:null==c?void 0:c.toUpperCase(),headers:o(o({},u||{}),{"Content-Type":"application/json"}),body:n}})];case 1:return e=i.sent(),[2,null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.body]}}))}))}),c,{sqlBaseUrl:u,cloud:e})}catch(e){console.error("init http orm client failed, try call function orm",e),n=P(s)}return e.models=n,e.mysql=Cf(e,{envId:null==t?void 0:t.envId,mysqlBaseUrl:null==t?void 0:t.mysqlBaseUrl}),e},Object.defineProperty(e,"__esModule",{value:!0})}(t)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(842);module.exports=n})();