@cloudbase/js-sdk 3.3.13 → 3.3.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -40
- package/dist/index.cjs.js.LICENSE.txt +37 -0
- package/dist/index.esm.js +2 -35
- package/dist/index.esm.js.LICENSE.txt +37 -0
- package/dist/packages/ai/index.cjs.js +2 -0
- package/dist/packages/ai/index.cjs.js.LICENSE.txt +22 -0
- package/dist/packages/ai/index.esm.js +2 -0
- package/dist/packages/ai/index.esm.js.LICENSE.txt +22 -0
- package/dist/packages/analytics/index.cjs.js +1 -0
- package/dist/packages/analytics/index.esm.js +1 -0
- package/dist/packages/apis/index.cjs.js +1 -0
- package/dist/packages/apis/index.esm.js +1 -0
- package/dist/packages/app/index.cjs.js +2 -0
- package/dist/packages/app/index.cjs.js.LICENSE.txt +7 -0
- package/dist/packages/app/index.esm.js +2 -0
- package/dist/packages/app/index.esm.js.LICENSE.txt +7 -0
- package/dist/packages/auth/index.cjs.js +2 -0
- package/dist/packages/auth/index.cjs.js.LICENSE.txt +22 -0
- package/dist/packages/auth/index.esm.js +2 -0
- package/dist/packages/auth/index.esm.js.LICENSE.txt +22 -0
- package/dist/packages/cloudrun/index.cjs.js +1 -0
- package/dist/packages/cloudrun/index.esm.js +1 -0
- package/dist/packages/container/index.cjs.js +1 -0
- package/dist/packages/container/index.esm.js +1 -0
- package/dist/packages/functions/index.cjs.js +1 -0
- package/dist/packages/functions/index.esm.js +1 -0
- package/dist/packages/model/index.cjs.js +1 -0
- package/dist/packages/model/index.esm.js +1 -0
- package/dist/packages/mysql/index.cjs.js +1 -0
- package/dist/packages/mysql/index.esm.js +1 -0
- package/dist/packages/oauth/index.cjs.js +2 -0
- package/dist/packages/oauth/index.cjs.js.LICENSE.txt +14 -0
- package/dist/packages/oauth/index.esm.js +2 -0
- package/dist/packages/oauth/index.esm.js.LICENSE.txt +14 -0
- package/dist/packages/realtime/index.cjs.js +1 -0
- package/dist/packages/realtime/index.esm.js +1 -0
- package/dist/packages/storage/index.cjs.js +1 -0
- package/dist/packages/storage/index.esm.js +1 -0
- package/dist/packages/utilities/index.cjs.js +1 -0
- package/dist/packages/utilities/index.esm.js +1 -0
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/database.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/package.json +68 -17
- package/ai/dist/index.esm.js +0 -3
- package/ai/dist/index.js +0 -21
- package/ai/package.json +0 -6
- package/analytics/dist/index.esm.js +0 -4
- package/analytics/dist/index.js +0 -9
- package/analytics/package.json +0 -6
- package/apis/dist/index.esm.js +0 -3
- package/apis/dist/index.js +0 -21
- package/apis/package.json +0 -6
- package/app/dist/index.esm.js +0 -11
- package/app/dist/index.js +0 -18
- package/app/package.json +0 -6
- package/auth/dist/index.esm.js +0 -8
- package/auth/dist/index.js +0 -13
- package/auth/package.json +0 -6
- package/cloudrun/dist/index.esm.js +0 -3
- package/cloudrun/dist/index.js +0 -21
- package/cloudrun/package.json +0 -6
- package/container/dist/index.esm.js +0 -8
- package/container/dist/index.js +0 -13
- package/container/package.json +0 -6
- package/database/dist/index.d.ts +0 -3
- package/database/dist/index.esm.js +0 -503
- package/database/dist/index.js +0 -509
- package/database/package.json +0 -6
- package/functions/dist/index.esm.js +0 -8
- package/functions/dist/index.js +0 -13
- package/functions/package.json +0 -6
- package/model/dist/index.esm.js +0 -3
- package/model/dist/index.js +0 -21
- package/model/package.json +0 -6
- package/mysql/dist/index.esm.js +0 -3
- package/mysql/dist/index.js +0 -21
- package/mysql/package.json +0 -6
- package/oauth/dist/index.esm.js +0 -3
- package/oauth/dist/index.js +0 -21
- package/oauth/package.json +0 -6
- package/realtime/dist/index.esm.js +0 -8
- package/realtime/dist/index.js +0 -13
- package/realtime/package.json +0 -6
- package/storage/dist/index.esm.js +0 -4
- package/storage/dist/index.js +0 -9
- package/storage/package.json +0 -6
- /package/{ai/dist → dist/packages/ai}/index.d.ts +0 -0
- /package/{analytics/dist → dist/packages/analytics}/index.d.ts +0 -0
- /package/{apis/dist → dist/packages/apis}/index.d.ts +0 -0
- /package/{app/dist → dist/packages/app}/index.d.ts +0 -0
- /package/{auth/dist → dist/packages/auth}/index.d.ts +0 -0
- /package/{cloudrun/dist → dist/packages/cloudrun}/index.d.ts +0 -0
- /package/{container/dist → dist/packages/container}/index.d.ts +0 -0
- /package/{functions/dist → dist/packages/functions}/index.d.ts +0 -0
- /package/{model/dist → dist/packages/model}/index.d.ts +0 -0
- /package/{mysql/dist → dist/packages/mysql}/index.d.ts +0 -0
- /package/{oauth/dist → dist/packages/oauth}/index.d.ts +0 -0
- /package/{realtime/dist → dist/packages/realtime}/index.d.ts +0 -0
- /package/{storage/dist → dist/packages/storage}/index.d.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
* web-streams-polyfill v4.0.0
|
|
19
|
+
* Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
|
|
20
|
+
* This code is released under the MIT license.
|
|
21
|
+
* SPDX-License-Identifier: MIT
|
|
22
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={829:(t,e,r)=>{var n;r.r(e),r.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>n,formatUrl:()=>a}),function(t){t.local="local",t.none="none",t.session="session"}(n||(n={}));var o=function(){},i=function(){};function a(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";for(var i in r)""===o?!n&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(r[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}},949:(t,e,r)=>{function n(t){this.message=t}r.r(e),r.d(e,{InvalidTokenError:()=>a,default:()=>c}),n.prototype=new Error,n.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 n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,c="";o=e.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?c+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function i(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 r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(e)}catch(t){return o(e)}}function a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var r=!0===(e=e||{}).header?0:1;try{return JSON.parse(i(t.split(".")[r]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},385:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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 a=r(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 r,o,s;return i(this,(function(i){switch(i.label){case 0:if(r=t.name,o=t.data,!r)throw new Error(JSON.stringify({code:a.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid name")}));try{s=o?JSON.stringify(o):""}catch(t){throw new Error(JSON.stringify({code:a.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid data")}))}return[4,u.call(this,n(n({},t),{data:s}),e)];case 1:return[2,i.sent()]}}))}))},t}();function u(t,e){var r;return o(this,void 0,void 0,(function(){var o,a,c,s,u,l,f,p,d,h,v,y,b,g,m;return i(this,(function(i){switch(i.label){case 0:if(o=t.name,a=t.data,c=t.path,s=void 0===c?"":c,u=t.method,l=t.header,f=void 0===l?{}:l,p=this.getEndPointWithKey("GATEWAY"),d=p.BASE_URL,h=p.PROTOCOL,v="".concat(h).concat(d,"/cloudrun/").concat(o),y=s.startsWith("/")?s:"/".concat(s),b=["GET","HEAD"].includes(null===(r=null==u?void 0:u.toUpperCase)||void 0===r?void 0:r.call(u)))try{g={};try{g=JSON.parse(a)}catch(t){g=a||{}}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(n(n({method:u||"POST",headers:Object.assign({},{"Content-Type":"application/json; charset=utf-8"},f)},b?{}:{body:a}),{url:"".concat(v).concat(y),customReqOpts:e}))];case 1:return m=i.sent(),"node-sdk"===(null==e?void 0:e.from)?[2,m]:[4,m.data];case 2:return[2,i.sent()]}}))}))}e.requestContainer=u;var l=new s,f={name:c,entity:{callContainer:l.callContainer}};try{cloudbase.registerComponent(f)}catch(t){}function p(t){try{t.registerComponent(f)}catch(t){console.warn(t)}}e.registerCloudrun=p;try{window.registerCloudrun=p}catch(t){}},662:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=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 r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=a(r(853)),u=r(102);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(c=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var r=0,o=(0,u.isArray)(t)?t:[t];r<o.length;r++){var i=o[r],a=i.isMatch,c=i.genAdapter,s=i.runtime;if(a())return{adapter:n({isMatch:a},c(e)),runtime:s}}},e.useDefaultAdapter=function(){return{adapter:n({},s.genAdapter()),runtime:c.WEB}}},853:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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=r(829),u=r(102),l=r(78),f=function(t){function e(e){var r=t.call(this)||this,n=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return r.timeout=n||0,r.timeoutMsg=o||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,r=t.file,n=t.name,o=t.method,a=t.headers,c=void 0===a?{}:a,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",n),u.append("file",r),this.request(i(i({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:c,body:r}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,r,n,o;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.sent().data,r=window.URL.createObjectURL(new Blob([e])),n=decodeURIComponent(new URL(t.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(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return a(this,void 0,Promise,(function(){var r,n,o,s,u,l,f,p,d,h,v,y,b,g=this;return c(this,(function(m){switch(m.label){case 0:return r=new AbortController,n=t.url,o=t.enableAbort,s=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,p=t.timeout,d=t.shouldThrowOnError,h=void 0===d||d,v=null!=p?p:this.timeout,f&&(f.aborted&&r.abort(),f.addEventListener("abort",(function(){return r.abort()}))),y=null,s&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),r.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(n,i(i({},t),{signal:r.signal})).then((function(t){return a(g,void 0,void 0,(function(){var e,r,n;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 n=(r=Promise).reject,[4,t.json()];case 2:e=n.apply(r,[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 r=this;void 0===e&&(e=!1);var n=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,c=t.url,s=t.headers,f=void 0===s?{}:s,p=t.data,d=t.responseType,h=t.withCredentials,v=t.body,y=t.onUploadProgress,b=(0,u.formatUrl)((0,l.getProtocol)(),c,"get"===n?p:{}),g=new XMLHttpRequest;g.open(n,b),d&&(g.responseType=d),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]+/),r={};e.forEach((function(t){var e=t.split(": "),n=e.shift().toLowerCase(),o=e.join(": ");r[n]=o})),t.header=r,t.statusCode=g.status;try{t.data="blob"===d?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===d?g.response:g.responseText}clearTimeout(i),o(t)}},e&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),g.abort()}),r.timeout)),a=(0,u.isFormData)(p)?p:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(p):v||(p?JSON.stringify(p):void 0),h&&(g.withCredentials=!0),g.send(a)}))},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 r="@cloudbase/js-sdk";e.setSdkName=function(t){r=t},e.getSdkName=function(){return r};var n="https:";e.setProtocol=function(t){n=t},e.getProtocol=function(){return n},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,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(r(78),e),o(r(630),e),e.OATUH_LOGINTYPE="constants"},640:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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 i=r(102),a=r(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,r=t.className,n=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),s=c?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]\\s*\\(.*\\)$")),l=c?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]")),f=a.findIndex((function(t){return s.test(t)}));if(-1!==f){var p=a.filter((function(t,e){return e>f}));p.unshift(a[f].replace(l,"".concat(r,".").concat(n)).replace(u,o)),(i=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(p.join("\n"))}return i}e.catchErrorsDecorator=function(t){var e=t.mode,r=void 0===e?"async":e,c=t.customInfo,f=void 0===c?{}:c,p=t.title,d=t.messages,h=void 0===d?[]:d;return function(t,e,c){if(a.IS_DEBUG_MODE){var d=f.className||t.constructor.name,v=f.methodName||e,y=c.value,b=function(){var t="",e=(new Error).stack.split("\n"),r=e.findIndex((function(t){return s.test(t)}));if(-1!==r){var n=u.exec(e[r+1]||"");t=n?n[0]:""}return t}();c.value="sync"===r?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=l({err:new Error,className:d,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var n=t,o=t.message,a=t.error,c=t.error_description,s={title:p||"".concat(d,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);s.subtitle=o,u.code&&(r?(r.code=u.code,r.msg=u.msg):(t.code=u.code,t.message=u.msg),n=r||t,s.content=h.map((function(t){return{type:"info",body:t}})))}throw a&&c&&(s.subtitle=c,r?(r.code=a,r.msg=c):(t.code=a,t.message=c),n=r||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(s),n}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n(this,void 0,void 0,(function(){var e,r,n,a,c,s,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:d,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 r=o.sent(),n=r,a=r.message,c=r.error,s=r.error_description,u={title:p||"".concat(d,".").concat(v," failed"),content:[{type:"error",body:r}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(r.code=f.code,r.message=f.msg),n=e||r,u.content=h.map((function(t){return{type:"info",body:t}})))),c&&s&&(u.subtitle=s,e?(e.code=c,e.msg=s):(r.code=c,r.message=s),n=e||r,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(u),n;case 4:return[2]}}))}))}}}}},607:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(640),e)},515:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=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 r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=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=i(r(546));e.constants=c;var s=i(r(662));e.adapters=s;var u=i(r(388));e.cache=u;var l=i(r(363));e.events=l;var f=i(r(587));e.langEvent=f;var p=i(r(102));e.utils=p;var d=i(r(607));e.helpers=d;var h=a(r(450));e.AbortController=h.default;var v={decode:a(r(949)).default};e.jwt=v},450:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,r){"abort"===e&&t.listeners.push(r)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=r},388:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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=r(829),s=r(102),u=r(546),l=function(t){function e(e){var r=t.call(this)||this;return r.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),r}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,r=t.platformInfo,n=void 0===r?{}:r,o=t.keys,i=void 0===o?{}:o;this.platformInfo=n,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=i)}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,r){if("async"!==this.mode){if(this.storage)try{var n={version:r||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(n))}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,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:e},[4,this.storage.setItem(t,JSON.stringify(n))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){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(t){return""}e=e||"localCachev1";var n=this.storage.getItem(t);return n&&n.indexOf(e)>=0?JSON.parse(n).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 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(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(n=o.sent())&&n.indexOf(e)>=0?[2,JSON.parse(n).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 i(this,void 0,void 0,(function(){return a(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,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||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 a=r(102),c=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=c;var s=function(t){function e(e,r){var n=t.call(this,"error",{error:e,data:r})||this;return n.error=e,n}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,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,r){if(null==r?void 0:r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,a.isInstanceOf)(t,s))return console.error(t.error),this;var r=(0,a.isString)(t)?new c(t,e||{}):t,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},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,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var n=r(363);e.bus=new n.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},102:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};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=r(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(r){var n=16*Math.random();return t>0?(n=(t+n)%16|0,t=Math.floor(t/16)):(n=(e+n)%16|0,e=Math.floor(e/16)),("x"===r?n:7&n|8).toString(16)}))},e.formatUrl=function(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";return Object.keys(r).forEach((function(t){""===o?!n&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(r[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(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var r=e||decodeURIComponent(window.location.search),n=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=r.substr(r.indexOf("?")+1).match(n);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 r=e.split("?")[0],n=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(n=o.split("&")).length-1;i>=0;i-=1)n[i].split("=")[0]===t&&n.splice(i,1);r="".concat(r,"?").concat(n.join("&"))}return r},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 r=new Promise((function(e,r){t=function(t,n){return t?r(t):e(n)}}));return t.promise=r,t},e.execCallback=function(t,e,r){if(void 0===r&&(r=null),t&&"function"==typeof t)return t(e,r);if(e)throw e;return r},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,r=t.title,n=t.subtitle,o=void 0===n?"":n,i=t.content,a=void 0===i?[]:i,c=t.printTrace,s=void 0!==c&&c,u=t.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 p=f[l],d=p.type,h=p.body;switch(d){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 r=t.split("="),n=r[0],o=r[1];n=decodeURIComponent(n),o=decodeURIComponent(o),n&&(e[n]?Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]:e[n]=o)})),e},e.parseCaptcha=function(t){var r={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var i=o[2];i&&(r=(0,e.parseQueryString)(i))}var a=r.token,c=n(r,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:c.state,token:a,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=r(385);module.exports=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={829:(t,e,r)=>{var n;r.r(e),r.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>n,formatUrl:()=>a}),function(t){t.local="local",t.none="none",t.session="session"}(n||(n={}));var o=function(){},i=function(){};function a(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";for(var i in r)""===o?!n&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(r[i]);return/^http(s)?\:\/\//.test(e+=o)?e:""+t+e}},949:(t,e,r)=>{function n(t){this.message=t}r.r(e),r.d(e,{InvalidTokenError:()=>a,default:()=>c}),n.prototype=new Error,n.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 n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,c="";o=e.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?c+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function i(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 r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(e)}catch(t){return o(e)}}function a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var r=!0===(e=e||{}).header?0:1;try{return JSON.parse(i(t.split(".")[r]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},385:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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 a=r(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 r,o,s;return i(this,(function(i){switch(i.label){case 0:if(r=t.name,o=t.data,!r)throw new Error(JSON.stringify({code:a.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid name")}));try{s=o?JSON.stringify(o):""}catch(t){throw new Error(JSON.stringify({code:a.INVALID_PARAMS,msg:"[".concat(c,".callContainer] invalid data")}))}return[4,u.call(this,n(n({},t),{data:s}),e)];case 1:return[2,i.sent()]}}))}))},t}();function u(t,e){var r;return o(this,void 0,void 0,(function(){var o,a,c,s,u,l,f,p,d,h,v,y,b,g,m;return i(this,(function(i){switch(i.label){case 0:if(o=t.name,a=t.data,c=t.path,s=void 0===c?"":c,u=t.method,l=t.header,f=void 0===l?{}:l,p=this.getEndPointWithKey("GATEWAY"),d=p.BASE_URL,h=p.PROTOCOL,v="".concat(h).concat(d,"/cloudrun/").concat(o),y=s.startsWith("/")?s:"/".concat(s),b=["GET","HEAD"].includes(null===(r=null==u?void 0:u.toUpperCase)||void 0===r?void 0:r.call(u)))try{g={};try{g=JSON.parse(a)}catch(t){g=a||{}}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(n(n({method:u||"POST",headers:Object.assign({},{"Content-Type":"application/json; charset=utf-8"},f)},b?{}:{body:a}),{url:"".concat(v).concat(y),customReqOpts:e}))];case 1:return m=i.sent(),"node-sdk"===(null==e?void 0:e.from)?[2,m]:[4,m.data];case 2:return[2,i.sent()]}}))}))}e.requestContainer=u;var l=new s,f={name:c,entity:{callContainer:l.callContainer}};try{cloudbase.registerComponent(f)}catch(t){}function p(t){try{t.registerComponent(f)}catch(t){console.warn(t)}}e.registerCloudrun=p;try{window.registerCloudrun=p}catch(t){}},662:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=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 r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=a(r(853)),u=r(102);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(c=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var r=0,o=(0,u.isArray)(t)?t:[t];r<o.length;r++){var i=o[r],a=i.isMatch,c=i.genAdapter,s=i.runtime;if(a())return{adapter:n({isMatch:a},c(e)),runtime:s}}},e.useDefaultAdapter=function(){return{adapter:n({},s.genAdapter()),runtime:c.WEB}}},853:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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=r(829),u=r(102),l=r(78),f=function(t){function e(e){var r=t.call(this)||this,n=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return r.timeout=n||0,r.timeoutMsg=o||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,r=t.file,n=t.name,o=t.method,a=t.headers,c=void 0===a?{}:a,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",n),u.append("file",r),this.request(i(i({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:c,body:r}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,r,n,o;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.sent().data,r=window.URL.createObjectURL(new Blob([e])),n=decodeURIComponent(new URL(t.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(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return a(this,void 0,Promise,(function(){var r,n,o,s,u,l,f,p,d,h,v,y,b,g=this;return c(this,(function(m){switch(m.label){case 0:return r=new AbortController,n=t.url,o=t.enableAbort,s=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,p=t.timeout,d=t.shouldThrowOnError,h=void 0===d||d,v=null!=p?p:this.timeout,f&&(f.aborted&&r.abort(),f.addEventListener("abort",(function(){return r.abort()}))),y=null,s&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),r.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(n,i(i({},t),{signal:r.signal})).then((function(t){return a(g,void 0,void 0,(function(){var e,r,n;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 n=(r=Promise).reject,[4,t.json()];case 2:e=n.apply(r,[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 r=this;void 0===e&&(e=!1);var n=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,c=t.url,s=t.headers,f=void 0===s?{}:s,p=t.data,d=t.responseType,h=t.withCredentials,v=t.body,y=t.onUploadProgress,b=(0,u.formatUrl)((0,l.getProtocol)(),c,"get"===n?p:{}),g=new XMLHttpRequest;g.open(n,b),d&&(g.responseType=d),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]+/),r={};e.forEach((function(t){var e=t.split(": "),n=e.shift().toLowerCase(),o=e.join(": ");r[n]=o})),t.header=r,t.statusCode=g.status;try{t.data="blob"===d?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===d?g.response:g.responseText}clearTimeout(i),o(t)}},e&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),g.abort()}),r.timeout)),a=(0,u.isFormData)(p)?p:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(p):v||(p?JSON.stringify(p):void 0),h&&(g.withCredentials=!0),g.send(a)}))},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 r="@cloudbase/js-sdk";e.setSdkName=function(t){r=t},e.getSdkName=function(){return r};var n="https:";e.setProtocol=function(t){n=t},e.getProtocol=function(){return n},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,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(r(78),e),o(r(630),e),e.OATUH_LOGINTYPE="constants"},640:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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 i=r(102),a=r(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,r=t.className,n=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),s=c?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]\\s*\\(.*\\)$")),l=c?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(r,"\\.descriptor.value\\s*\\[as\\s").concat(n,"\\]")),f=a.findIndex((function(t){return s.test(t)}));if(-1!==f){var p=a.filter((function(t,e){return e>f}));p.unshift(a[f].replace(l,"".concat(r,".").concat(n)).replace(u,o)),(i=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(p.join("\n"))}return i}e.catchErrorsDecorator=function(t){var e=t.mode,r=void 0===e?"async":e,c=t.customInfo,f=void 0===c?{}:c,p=t.title,d=t.messages,h=void 0===d?[]:d;return function(t,e,c){if(a.IS_DEBUG_MODE){var d=f.className||t.constructor.name,v=f.methodName||e,y=c.value,b=function(){var t="",e=(new Error).stack.split("\n"),r=e.findIndex((function(t){return s.test(t)}));if(-1!==r){var n=u.exec(e[r+1]||"");t=n?n[0]:""}return t}();c.value="sync"===r?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=l({err:new Error,className:d,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var n=t,o=t.message,a=t.error,c=t.error_description,s={title:p||"".concat(d,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);s.subtitle=o,u.code&&(r?(r.code=u.code,r.msg=u.msg):(t.code=u.code,t.message=u.msg),n=r||t,s.content=h.map((function(t){return{type:"info",body:t}})))}throw a&&c&&(s.subtitle=c,r?(r.code=a,r.msg=c):(t.code=a,t.message=c),n=r||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(s),n}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n(this,void 0,void 0,(function(){var e,r,n,a,c,s,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:d,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 r=o.sent(),n=r,a=r.message,c=r.error,s=r.error_description,u={title:p||"".concat(d,".").concat(v," failed"),content:[{type:"error",body:r}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(r.code=f.code,r.message=f.msg),n=e||r,u.content=h.map((function(t){return{type:"info",body:t}})))),c&&s&&(u.subtitle=s,e?(e.code=c,e.msg=s):(r.code=c,r.message=s),n=e||r,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(u),n;case 4:return[2]}}))}))}}}}},607:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(640),e)},515:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=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 r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=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=i(r(546));e.constants=c;var s=i(r(662));e.adapters=s;var u=i(r(388));e.cache=u;var l=i(r(363));e.events=l;var f=i(r(587));e.langEvent=f;var p=i(r(102));e.utils=p;var d=i(r(607));e.helpers=d;var h=a(r(450));e.AbortController=h.default;var v={decode:a(r(949)).default};e.jwt=v},450:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,r){"abort"===e&&t.listeners.push(r)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=r},388:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){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:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],n=0}finally{r=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=r(829),s=r(102),u=r(546),l=function(t){function e(e){var r=t.call(this)||this;return r.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),r}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,r=t.platformInfo,n=void 0===r?{}:r,o=t.keys,i=void 0===o?{}:o;this.platformInfo=n,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=i)}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,r){if("async"!==this.mode){if(this.storage)try{var n={version:r||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(n))}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,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:e},[4,this.storage.setItem(t,JSON.stringify(n))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){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(t){return""}e=e||"localCachev1";var n=this.storage.getItem(t);return n&&n.indexOf(e)>=0?JSON.parse(n).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 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(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(n=o.sent())&&n.indexOf(e)>=0?[2,JSON.parse(n).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 i(this,void 0,void 0,(function(){return a(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,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(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 r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||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 a=r(102),c=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=c;var s=function(t){function e(e,r){var n=t.call(this,"error",{error:e,data:r})||this;return n.error=e,n}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,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,r){if(null==r?void 0:r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,a.isInstanceOf)(t,s))return console.error(t.error),this;var r=(0,a.isString)(t)?new c(t,e||{}):t,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},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,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var n=r(363);e.bus=new n.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},102:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};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=r(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(r){var n=16*Math.random();return t>0?(n=(t+n)%16|0,t=Math.floor(t/16)):(n=(e+n)%16|0,e=Math.floor(e/16)),("x"===r?n:7&n|8).toString(16)}))},e.formatUrl=function(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";return Object.keys(r).forEach((function(t){""===o?!n&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(r[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(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var r=e||decodeURIComponent(window.location.search),n=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=r.substr(r.indexOf("?")+1).match(n);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 r=e.split("?")[0],n=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(n=o.split("&")).length-1;i>=0;i-=1)n[i].split("=")[0]===t&&n.splice(i,1);r="".concat(r,"?").concat(n.join("&"))}return r},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 r=new Promise((function(e,r){t=function(t,n){return t?r(t):e(n)}}));return t.promise=r,t},e.execCallback=function(t,e,r){if(void 0===r&&(r=null),t&&"function"==typeof t)return t(e,r);if(e)throw e;return r},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,r=t.title,n=t.subtitle,o=void 0===n?"":n,i=t.content,a=void 0===i?[]:i,c=t.printTrace,s=void 0!==c&&c,u=t.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 p=f[l],d=p.type,h=p.body;switch(d){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 r=t.split("="),n=r[0],o=r[1];n=decodeURIComponent(n),o=decodeURIComponent(o),n&&(e[n]?Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]:e[n]=o)})),e},e.parseCaptcha=function(t){var r={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var i=o[2];i&&(r=(0,e.parseQueryString)(i))}var a=r.token,c=n(r,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:c.state,token:a,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(385);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={829:(t,e,n)=>{var r;n.r(e),n.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>r,formatUrl:()=>a}),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},i=function(){};function a(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);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:()=>a,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,i=0,a=0,c="";o=e.charAt(a++);~o&&(n=i%4?64*n+o:o,i++%4)?c+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function i(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 a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(i(t.split(".")[n]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},645:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_NAME=void 0,e.COMPONENT_NAME="container"},408:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}};if(Object.defineProperty(e,"__esModule",{value:!0}),void 0!==n.g);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}n.g.require;var i=function(){var t=new Error("not implemented");return t.code="ENOSYS",t};if(!n.g.fs){var a="";n.g.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(t,e){var n=(a+=s.decode(e)).lastIndexOf("\n");return-1!=n&&(console.log(a.substr(0,n)),a=a.substr(n+1)),e.length},write:function(t,e,n,r,o,a){0===n&&r===e.length&&null===o?a(null,this.writeSync(t,e)):a(i())},chmod:function(t,e,n){n(i())},chown:function(t,e,n,r){r(i())},close:function(t,e){e(i())},fchmod:function(t,e,n){n(i())},fchown:function(t,e,n,r){r(i())},fstat:function(t,e){e(i())},fsync:function(t,e){e(null)},ftruncate:function(t,e,n){n(i())},lchown:function(t,e,n,r){r(i())},link:function(t,e,n){n(i())},lstat:function(t,e){e(i())},mkdir:function(t,e,n){n(i())},open:function(t,e,n,r){r(i())},read:function(t,e,n,r,o,a){a(i())},readdir:function(t,e){e(i())},readlink:function(t,e){e(i())},rename:function(t,e,n){n(i())},rmdir:function(t,e){e(i())},stat:function(t,e){e(i())},symlink:function(t,e,n){n(i())},truncate:function(t,e,n){n(i())},unlink:function(t,e){e(i())},utimes:function(t,e,n,r){r(i())}}}if(n.g.process||(n.g.process={getuid:function(){return-1},getgid:function(){return-1},geteuid:function(){return-1},getegid:function(){return-1},getgroups:function(){throw i()},pid:-1,ppid:-1,umask:function(){throw i()},cwd:function(){throw i()},chdir:function(){throw i()}}),!n.g.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!n.g.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!n.g.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!n.g.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");var c=new TextEncoder("utf-8"),s=new TextDecoder("utf-8"),u=[];n.g.Go=function(){function t(){var t=this;this._callbackTimeouts=new Map,this._nextCallbackTimeoutID=1;var e=function(){return new DataView(t._inst.exports.memory.buffer)},r=function(t,n){e().setUint32(t+0,n,!0),e().setUint32(t+4,Math.floor(n/4294967296),!0)},o=function(n){var r=e().getFloat64(n,!0);if(0!==r){if(!isNaN(r))return r;var o=e().getUint32(n,!0);return t._values[o]}},i=function(n,r){var o=2146959360;if("number"==typeof r)return isNaN(r)?(e().setUint32(n+4,o,!0),void e().setUint32(n,0,!0)):0===r?(e().setUint32(n+4,o,!0),void e().setUint32(n,1,!0)):void e().setFloat64(n,r,!0);switch(r){case void 0:return void e().setFloat64(n,0,!0);case null:return e().setUint32(n+4,o,!0),void e().setUint32(n,2,!0);case!0:return e().setUint32(n+4,o,!0),void e().setUint32(n,3,!0);case!1:return e().setUint32(n+4,o,!0),void e().setUint32(n,4,!0)}var i=t._ids.get(r);void 0===i&&(void 0===(i=t._idPool.pop())&&(i=t._values.length),t._values[i]=r,t._goRefCounts[i]=0,t._ids.set(r,i)),t._goRefCounts[i]++;var a=1;switch(typeof r){case"string":a=2;break;case"symbol":a=3;break;case"function":a=4}e().setUint32(n+4,o|a,!0),e().setUint32(n,i,!0)},a=function(e,n,r){return new Uint8Array(t._inst.exports.memory.buffer,e,n)},l=function(t,e,n){for(var r=new Array(e),i=0;i<e;i++)r[i]=o(t+8*i);return r},f=function(e,n){return s.decode(new DataView(t._inst.exports.memory.buffer,e,n))},d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,r,o){var i=0;if(1==t)for(var a=0;a<r;a++){var c=n+8*a,l=e().getUint32(c+0,!0),f=e().getUint32(c+4,!0);i+=f;for(var d=0;d<f;d++){var p=e().getUint8(l+d);if(13==p);else if(10==p){var h=s.decode(new Uint8Array(u));u=[],console.log(h)}else u.push(p)}}else console.error("invalid file descriptor:",t);return e().setUint32(o,i,!0),0},fd_close:function(){return 0},fd_fdstat_get:function(){return 0},fd_seek:function(){return 0},proc_exit:function(t){if(!n.g.process)throw"trying to exit with code "+t;process.exit(t)},random_get:function(t,e){return crypto.getRandomValues(a(t,e)),0}},env:{"runtime.ticks":function(){return d+performance.now()},"runtime.sleepTicks":function(e){setTimeout(t._inst.exports.go_scheduler,e)},"syscall/js.finalizeRef":function(n){var r=e().getUint32(n,!0);if(t._goRefCounts[r]--,0===t._goRefCounts[r]){var o=t._values[r];t._values[r]=null,t._ids.delete(o),t._idPool.push(r)}},"syscall/js.stringVal":function(t,e,n){var r=f(e,n);i(t,r)},"syscall/js.valueGet":function(t,e,n,r){var a=f(n,r),c=o(e),s=Reflect.get(c,a);i(t,s)},"syscall/js.valueSet":function(t,e,n,r){var i=o(t),a=f(e,n),c=o(r);Reflect.set(i,a,c)},"syscall/js.valueDelete":function(t,e,n){var r=o(t),i=f(e,n);Reflect.deleteProperty(r,i)},"syscall/js.valueIndex":function(t,e,n){i(t,Reflect.get(o(e),n))},"syscall/js.valueSetIndex":function(t,e,n){Reflect.set(o(t),e,o(n))},"syscall/js.valueCall":function(t,n,r,a,c,s,u){var d=o(n),p=f(r,a),h=l(c,s);try{var v=Reflect.get(d,p);i(t,Reflect.apply(v,d,h)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueInvoke":function(t,n,r,a,c){try{var s=o(n),u=l(r,a);i(t,Reflect.apply(s,void 0,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueNew":function(t,n,r,a,c){var s=o(n),u=l(r,a);try{i(t,Reflect.construct(s,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueLength":function(t){return o(t).length},"syscall/js.valuePrepareString":function(t,e){var n=String(o(e)),a=c.encode(n);i(t,a),r(t+8,a.length)},"syscall/js.valueLoadString":function(t,e,n,r){var i=o(t);a(e,n).set(i)},"syscall/js.valueInstanceOf":function(t,e){return o(t)instanceof o(e)},"syscall/js.copyBytesToGo":function(t,n,i,c,s){var u=t,l=t+4,f=a(n,i),d=o(s);if(d instanceof Uint8Array||d instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)},"syscall/js.copyBytesToJS":function(t,n,i,c,s){var u=t,l=t+4,f=o(n),d=a(i,c);if(f instanceof Uint8Array||f instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)}}}}return t.prototype.run=function(t){return r(this,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:this._inst=t,this._values=[NaN,0,null,!0,!1,n.g,this],this._goRefCounts=[],this._ids=new Map,this._idPool=[],this.exited=!1,new DataView(this._inst.exports.memory.buffer),o.label=1;case 1:return e=new Promise((function(t){r._resolveCallbackPromise=function(){if(r.exited)throw new Error("bad callback: Go program has already exited");setTimeout(t,0)}})),this._inst.exports._start(),this.exited?[3,3]:[4,e];case 2:return o.sent(),[3,1];case 3:return[2]}}))}))},t.prototype._resume=function(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()},t.prototype._makeFuncWrapper=function(t){var e=this;return function(){var n={id:t,this:this,args:arguments};return e._pendingEvent=n,e._resume(),n.result}},t}(),e.default=n.g.Go},906: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)}),i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},c=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}},l=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.registerContainers=e.CloudbaseContainers=e.t=void 0;var f=n(Object(function(){var t=new Error("Cannot find module '@cloudbase/types/container'");throw t.code="MODULE_NOT_FOUND",t}())),d=n(515),p=n(50),h=n(645),v=d.constants.ERRORS,y=d.constants.COMMUNITY_SITE_URL,b=d.utils.execCallback,g=d.utils.printWarn,m=d.helpers.catchErrorsDecorator;e.t=function(t){return t};var w=function(){throw new Error("getExportFunction ".concat((0,e.t)("未实现")))},_=function(){throw new Error("loadJSExportFunction ".concat((0,e.t)("未实现")))};if(globalThis.IS_MP_BUILD)w=function(){new Error((0,e.t)("小程序不支持 wasm 加载"))},_=function(t){return t&&new Error((0,e.t)("小程序不支持动态 js 加载")),{initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}};else{var O=n(119);w=O.getExportFunction,_=O.loadJSExportFunction}var E=function(t){function e(e,n){var r=this,o=JSON.stringify({code:v.INVALID_PARAMS,msg:"[".concat(e,"] ").concat(n)});return(r=t.call(this,o)||this).code=v.INVALID_PARAMS,r}return o(e,t),e.prototype.toJSON=function(){return{code:this.code,message:this.message}},e}(Error);function j(t,e,n){void 0===e&&(e=h.COMPONENT_NAME),void 0===n&&(n="call container error");var r=t instanceof Error?t:new Error("[".concat(e,"] ").concat((null==t?void 0:t.message)||n));return r.code=(null==t?void 0:t.code)||"UNKNOWN_ERROR",r}var P=e.CloudbaseContainers=function(){function t(t){var n,r,o=this;if(this.config=i(i({},t),{jsUrl:"string"==typeof t.jsUrl?{vm:t.jsUrl}:t.jsUrl}),e.t=(null===(n=t.i18n)||void 0===n?void 0:n.t)||function(t){return t},!this.config.wasmUrl&&this.config.publicKey);else if(!this.config.wasmUrl&&!(null===(r=this.config.jsUrl)||void 0===r?void 0:r.vm)&&!globalThis.cloudbase_private_link)throw new E("".concat(h.COMPONENT_NAME),(0,e.t)("缺少 privatelink sdk 地址"));this.config.wasmUrl?this.wasm=w(this.config.wasmUrl).catch((function(t){if(o.config.jsUrl)return console.warn("load wams error, fall back to use js",t),_(o.config.jsUrl);if(globalThis.cloudbase_private_link)return globalThis.cloudbase_private_link;throw t})):this.config.jsUrl||this.config.publicKey?this.wasm=_(this.config.jsUrl):this.wasm=Promise.resolve({initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}),d.langEvent.bus.on(d.langEvent.LANG_CHANGE_EVENT,(function(t){var n,r,a,c,s;e.t=(null===(a=null===(r=t.data)||void 0===r?void 0:r.i18n)||void 0===a?void 0:a.t)||function(t){return t},o.defaultHeaders=i(i({},o.defaultHeaders),((n={})[d.langEvent.LANG_CHANGE_EVENT]=null===(s=null===(c=t.data)||void 0===c?void 0:c.i18n)||void 0===s?void 0:s.lang,n))}))}var n,r;return t.prototype.callContainer=function(t,e){return s(this,void 0,void 0,(function(){var n,r,o,a,c,s,f,d,v,y,g,m,w,_,O,P,x;return u(this,(function(u){switch(u.label){case 0:return[4,this.initContainer(this.config)];case 1:return u.sent(),n="".concat(h.COMPONENT_NAME,".callContainer"),[4,this.wasm];case 2:if(r=u.sent().callContainer,o=i({},t),a=o.url,_=o.method,c=void 0===_?"GET":_,s=o.data,O=o.timeout,f=void 0===O?6e4:O,P=o.dataType,d=void 0===P?"json":P,x=o.responseType,v=void 0===x?"text":x,y=l(o,["url","method","data","timeout","dataType","responseType"]),!a)throw new E(n,"invalid request url");if(!c)throw new E(n,"invalid request method");g=i(i({},this.defaultHeaders),t.header),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,new Promise((function(t,e){var o=i({url:a,method:c,header:g,data:(0,p.serializeRequestBody)(g,s,c),timeout:f,dataType:d,responseType:v},y);if(s&&((0,p.isBuffer)(o.data)||"string"==typeof o.data)&&(null==s?void 0:s.length)>1024e4)e(new E(n,"body too large"));else{if("GET"===c){var u=o.data;if(u&&(o.data=void 0),!(0,p.isBuffer)(u)&&"string"!=typeof u){var l=Object.entries(u||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))),t}),[]);l.length&&(u=l.join("&"))}if("string"==typeof o.data){var h=(0,p.parseURL)(a);h.search?h.search+="&".concat(o.data):h.search="?".concat(o.data),o.url=h.href,o.data=void 0}}r(i(i({},o),{success:t,fail:function(t){var r=(t||{}).data;e(j(r,n,"call container error"))}}))}}))];case 4:return m=u.sent(),[2,b(e,null,m)];case 5:return w=u.sent(),b(e,w),[3,6];case 6:return[2]}}))}))},t.prototype.initContainer=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.wasm];case 1:return e=r.sent().initContainer,this.containerInitPromise||(this.containerInitPromise=new Promise((function(r,o){e({config:t,success:function(t){"200"!==String(t.statusCode)&&o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),r(t)},fail:function(t){o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),n.containerInitPromise=null}})}))),[2,this.containerInitPromise]}}))}))},a([m({customInfo:{className:"Cloudbase",methodName:"callContainer"},title:"调用失败",messages:["请确认以下各项:"," 1 - 调用 callContainer() 的语法或参数是否正确"," 2 - 域名 & 路径是否存在","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(y)]}),c("design:type",Function),c("design:paramtypes",["function"==typeof(n=void 0!==f.ICallContainerOptions&&f.ICallContainerOptions)?n:Object,"function"==typeof(r="undefined"!=typeof Function&&Function)?r:Object]),c("design:returntype",Promise)],t.prototype,"callContainer",null),t}(),x={name:h.COMPONENT_NAME,namespace:"container",entity:function(t){if(this.containerInstance)return g(v.INVALID_OPERATION,"every cloudbase instance should has only one container object"),this.containerInstance;var e=new P(t);return this.containerInstance=e,this.callContainer=e.callContainer.bind(e),this.containerInstance}};try{cloudbase.registerComponent(x)}catch(t){}e.registerContainers=function(t){try{t.registerComponent(x)}catch(t){console.warn(t)}}},50:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serializeRequestBody=e.isBuffer=e.parseURL=void 0;var r=n(515),o=n(645),i=r.constants.ERRORS;function a(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function c(t){var e=Object.entries(t||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),t}),[]);if(e.length)return e.join("&")}e.parseURL=function(t){if(document){var e=document.createElement("a");return e.href=t,e}return new URL(new Request(t).url)},e.isBuffer=a,e.serializeRequestBody=function(t,e,n){void 0===n&&(n="POST");var r=e,s="Content-Type";if("object"==typeof e&&!a(e)){t[s]||t["content-type"]||(t[s]="application/json");var u=t[s]||t["content-type"];if("GET"===n)try{return c(e)||""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data in query method, ").concat(t.message)}))}switch(u){case"application/json":try{r=JSON.stringify(e)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/json, ").concat(t.message)}))}break;case"application/x-www-form-urlencoded":try{var l=c(e);l&&(r=l)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/x-www-form-urlencoded,").concat(t.message)}))}}}return r}},119: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,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.loadJSExportFunction=e.getExportFunction=void 0;var c=a(n(408)),s=n(50);function u(t,e,n){return void 0===n&&(n=!1),o(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return!n&&WebAssembly.instantiateStreaming?[3,3]:[4,t];case 1:return[4,i.sent().arrayBuffer()];case 2:if(r=i.sent(),n)throw new Error("do not support *.br");return o=r,[2,WebAssembly.instantiate(o,e)];case 3:return[2,WebAssembly.instantiateStreaming(t,e)]}}))}))}function l(t,e,n){return void 0===n&&(n=document),new Promise((function(r,o){var i=n.defaultView,a=n.createElement("script");a.setAttribute("src",t),a.setAttribute("class",e),a.addEventListener("load",(function(){if(Object.prototype.hasOwnProperty.call(i,e))return r(i[e]);var n=new Error("Fail to load UMD module ".concat(e," from [").concat(t,"]."));return o(n)})),a.addEventListener("error",(function(n){var r=new Error("main bundle [".concat(e,"] load failed from [").concat(t,"]: ").concat((null==n?void 0:n.message)||""));o(r)})),n.body?n.body.appendChild(a):n.head.appendChild(a)}))}e.getExportFunction=function(t,e,n){return void 0===n&&(n="go"),o(this,void 0,void 0,(function(){var o,a,l,f;return i(this,(function(i){switch(i.label){case 0:return o=r({env:{memoryBase:0,tableBase:0,memory:new WebAssembly.Memory({initial:256})}},e),l=function(t){var e=!1,n="";try{n=(0,s.parseURL)(t).pathname}catch(e){n=t}return/\.br$/.test(n)&&(e=!0),e}(t),"go"===n&&((a=new c.default)._initedModulePromise=new Promise((function(t){a._initedModuleResolve=t})),o=r(r({},a.importObject),{env:r(r({},a.importObject.env),{exportModule:function(t){return a._initedModuleResolve(t)}})})),[4,u(fetch(t),o,l)];case 1:return f=i.sent(),"go"!==n?[3,3]:[4,Promise.race([a.run(f.instance),new Promise((function(t){return setTimeout((function(){t(null)}),500)}))])];case 2:return i.sent(),[2,{callContainer:window.callContainer,initContainer:window.initContainer}];case 3:return[2,f.instance.exports]}}))}))},e.loadJSExportFunction=function(t){return o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).vm,r=e.vender,o="cloudbase_private_link_vender",!r&&Object.prototype.hasOwnProperty.call(document.defaultView,o)?[3,2]:[4,l(r||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink-vender@0.0.2/dist/cdn/cloudbase.privatelink.vender.js",o)];case 1:i.sent(),i.label=2;case 2:return[2,l(n||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink@0.0.1/dist/cdn/cloudbase.privatelink.vm.js","cloudbase_private_link")]}}))}))}},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]}),i=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)&&o(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=a(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 i=o[n],a=i.isMatch,c=i.genAdapter,s=i.runtime;if(a())return{adapter:r({isMatch:a},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)}),i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,a=t.headers,c=void 0===a?{}:a,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(i(i({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:c,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,n,r,o;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.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 a.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 a(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,i(i({},t),{signal:n.signal})).then((function(t){return a(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 i,a,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(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),a=(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(a)}))},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,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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 i=n(102),a=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 i,a=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=a.findIndex((function(t){return s.test(t)}));if(-1!==f){var d=a.filter((function(t,e){return e>f}));d.unshift(a[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(i=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(d.join("\n"))}return i}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(a.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,a=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 a&&c&&(s.subtitle=c,n?(n.code=a,n.msg=c):(t.code=a,t.message=c),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.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,a,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,a=n.message,c=n.error,s=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),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,i.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}),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)&&r(e,t,n);return o(e,t),e},a=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=i(n(546));e.constants=c;var s=i(n(662));e.adapters=s;var u=i(n(388));e.cache=u;var l=i(n(363));e.events=l;var f=i(n(587));e.langEvent=f;var d=i(n(102));e.utils=d;var p=i(n(607));e.helpers=p;var h=a(n(450));e.AbortController=h.default;var v={decode:a(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)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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,i=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=i)}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 i(this,void 0,void 0,(function(){var r;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]),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 i(this,void 0,void 0,(function(){var r;return a(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 i(this,void 0,void 0,(function(){return a(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)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;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 a=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,a.isInstanceOf)(t,s))return console.error(t.error),this;var n=(0,a.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]?i([],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 i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,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,i=t.content,a=void 0===i?[]:i,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=a;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 i=o[2];i&&(n=(0,e.parseQueryString)(i))}var a=n.token,c=r(n,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:c.state,token:a,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 i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),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(906);module.exports=r})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={829:(t,e,n)=>{var r;n.r(e),n.d(e,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>r,formatUrl:()=>a}),function(t){t.local="local",t.none="none",t.session="session"}(r||(r={}));var o=function(){},i=function(){};function a(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";for(var i in n)""===o?!r&&(e+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);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:()=>a,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,i=0,a=0,c="";o=e.charAt(a++);~o&&(n=i%4?64*n+o:o,i++%4)?c+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function i(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 a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const c=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(i(t.split(".")[n]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},645:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_NAME=void 0,e.COMPONENT_NAME="container"},408:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}};if(Object.defineProperty(e,"__esModule",{value:!0}),void 0!==n.g);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}n.g.require;var i=function(){var t=new Error("not implemented");return t.code="ENOSYS",t};if(!n.g.fs){var a="";n.g.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(t,e){var n=(a+=s.decode(e)).lastIndexOf("\n");return-1!=n&&(console.log(a.substr(0,n)),a=a.substr(n+1)),e.length},write:function(t,e,n,r,o,a){0===n&&r===e.length&&null===o?a(null,this.writeSync(t,e)):a(i())},chmod:function(t,e,n){n(i())},chown:function(t,e,n,r){r(i())},close:function(t,e){e(i())},fchmod:function(t,e,n){n(i())},fchown:function(t,e,n,r){r(i())},fstat:function(t,e){e(i())},fsync:function(t,e){e(null)},ftruncate:function(t,e,n){n(i())},lchown:function(t,e,n,r){r(i())},link:function(t,e,n){n(i())},lstat:function(t,e){e(i())},mkdir:function(t,e,n){n(i())},open:function(t,e,n,r){r(i())},read:function(t,e,n,r,o,a){a(i())},readdir:function(t,e){e(i())},readlink:function(t,e){e(i())},rename:function(t,e,n){n(i())},rmdir:function(t,e){e(i())},stat:function(t,e){e(i())},symlink:function(t,e,n){n(i())},truncate:function(t,e,n){n(i())},unlink:function(t,e){e(i())},utimes:function(t,e,n,r){r(i())}}}if(n.g.process||(n.g.process={getuid:function(){return-1},getgid:function(){return-1},geteuid:function(){return-1},getegid:function(){return-1},getgroups:function(){throw i()},pid:-1,ppid:-1,umask:function(){throw i()},cwd:function(){throw i()},chdir:function(){throw i()}}),!n.g.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!n.g.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!n.g.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!n.g.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");var c=new TextEncoder("utf-8"),s=new TextDecoder("utf-8"),u=[];n.g.Go=function(){function t(){var t=this;this._callbackTimeouts=new Map,this._nextCallbackTimeoutID=1;var e=function(){return new DataView(t._inst.exports.memory.buffer)},r=function(t,n){e().setUint32(t+0,n,!0),e().setUint32(t+4,Math.floor(n/4294967296),!0)},o=function(n){var r=e().getFloat64(n,!0);if(0!==r){if(!isNaN(r))return r;var o=e().getUint32(n,!0);return t._values[o]}},i=function(n,r){var o=2146959360;if("number"==typeof r)return isNaN(r)?(e().setUint32(n+4,o,!0),void e().setUint32(n,0,!0)):0===r?(e().setUint32(n+4,o,!0),void e().setUint32(n,1,!0)):void e().setFloat64(n,r,!0);switch(r){case void 0:return void e().setFloat64(n,0,!0);case null:return e().setUint32(n+4,o,!0),void e().setUint32(n,2,!0);case!0:return e().setUint32(n+4,o,!0),void e().setUint32(n,3,!0);case!1:return e().setUint32(n+4,o,!0),void e().setUint32(n,4,!0)}var i=t._ids.get(r);void 0===i&&(void 0===(i=t._idPool.pop())&&(i=t._values.length),t._values[i]=r,t._goRefCounts[i]=0,t._ids.set(r,i)),t._goRefCounts[i]++;var a=1;switch(typeof r){case"string":a=2;break;case"symbol":a=3;break;case"function":a=4}e().setUint32(n+4,o|a,!0),e().setUint32(n,i,!0)},a=function(e,n,r){return new Uint8Array(t._inst.exports.memory.buffer,e,n)},l=function(t,e,n){for(var r=new Array(e),i=0;i<e;i++)r[i]=o(t+8*i);return r},f=function(e,n){return s.decode(new DataView(t._inst.exports.memory.buffer,e,n))},d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,r,o){var i=0;if(1==t)for(var a=0;a<r;a++){var c=n+8*a,l=e().getUint32(c+0,!0),f=e().getUint32(c+4,!0);i+=f;for(var d=0;d<f;d++){var p=e().getUint8(l+d);if(13==p);else if(10==p){var h=s.decode(new Uint8Array(u));u=[],console.log(h)}else u.push(p)}}else console.error("invalid file descriptor:",t);return e().setUint32(o,i,!0),0},fd_close:function(){return 0},fd_fdstat_get:function(){return 0},fd_seek:function(){return 0},proc_exit:function(t){if(!n.g.process)throw"trying to exit with code "+t;process.exit(t)},random_get:function(t,e){return crypto.getRandomValues(a(t,e)),0}},env:{"runtime.ticks":function(){return d+performance.now()},"runtime.sleepTicks":function(e){setTimeout(t._inst.exports.go_scheduler,e)},"syscall/js.finalizeRef":function(n){var r=e().getUint32(n,!0);if(t._goRefCounts[r]--,0===t._goRefCounts[r]){var o=t._values[r];t._values[r]=null,t._ids.delete(o),t._idPool.push(r)}},"syscall/js.stringVal":function(t,e,n){var r=f(e,n);i(t,r)},"syscall/js.valueGet":function(t,e,n,r){var a=f(n,r),c=o(e),s=Reflect.get(c,a);i(t,s)},"syscall/js.valueSet":function(t,e,n,r){var i=o(t),a=f(e,n),c=o(r);Reflect.set(i,a,c)},"syscall/js.valueDelete":function(t,e,n){var r=o(t),i=f(e,n);Reflect.deleteProperty(r,i)},"syscall/js.valueIndex":function(t,e,n){i(t,Reflect.get(o(e),n))},"syscall/js.valueSetIndex":function(t,e,n){Reflect.set(o(t),e,o(n))},"syscall/js.valueCall":function(t,n,r,a,c,s,u){var d=o(n),p=f(r,a),h=l(c,s);try{var v=Reflect.get(d,p);i(t,Reflect.apply(v,d,h)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueInvoke":function(t,n,r,a,c){try{var s=o(n),u=l(r,a);i(t,Reflect.apply(s,void 0,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueNew":function(t,n,r,a,c){var s=o(n),u=l(r,a);try{i(t,Reflect.construct(s,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueLength":function(t){return o(t).length},"syscall/js.valuePrepareString":function(t,e){var n=String(o(e)),a=c.encode(n);i(t,a),r(t+8,a.length)},"syscall/js.valueLoadString":function(t,e,n,r){var i=o(t);a(e,n).set(i)},"syscall/js.valueInstanceOf":function(t,e){return o(t)instanceof o(e)},"syscall/js.copyBytesToGo":function(t,n,i,c,s){var u=t,l=t+4,f=a(n,i),d=o(s);if(d instanceof Uint8Array||d instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)},"syscall/js.copyBytesToJS":function(t,n,i,c,s){var u=t,l=t+4,f=o(n),d=a(i,c);if(f instanceof Uint8Array||f instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)}}}}return t.prototype.run=function(t){return r(this,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:this._inst=t,this._values=[NaN,0,null,!0,!1,n.g,this],this._goRefCounts=[],this._ids=new Map,this._idPool=[],this.exited=!1,new DataView(this._inst.exports.memory.buffer),o.label=1;case 1:return e=new Promise((function(t){r._resolveCallbackPromise=function(){if(r.exited)throw new Error("bad callback: Go program has already exited");setTimeout(t,0)}})),this._inst.exports._start(),this.exited?[3,3]:[4,e];case 2:return o.sent(),[3,1];case 3:return[2]}}))}))},t.prototype._resume=function(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()},t.prototype._makeFuncWrapper=function(t){var e=this;return function(){var n={id:t,this:this,args:arguments};return e._pendingEvent=n,e._resume(),n.result}},t}(),e.default=n.g.Go},906: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)}),i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},c=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}},l=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.registerContainers=e.CloudbaseContainers=e.t=void 0;var f=n(Object(function(){var t=new Error("Cannot find module '@cloudbase/types/container'");throw t.code="MODULE_NOT_FOUND",t}())),d=n(515),p=n(50),h=n(645),v=d.constants.ERRORS,y=d.constants.COMMUNITY_SITE_URL,b=d.utils.execCallback,g=d.utils.printWarn,m=d.helpers.catchErrorsDecorator;e.t=function(t){return t};var w=function(){throw new Error("getExportFunction ".concat((0,e.t)("未实现")))},_=function(){throw new Error("loadJSExportFunction ".concat((0,e.t)("未实现")))};if(globalThis.IS_MP_BUILD)w=function(){new Error((0,e.t)("小程序不支持 wasm 加载"))},_=function(t){return t&&new Error((0,e.t)("小程序不支持动态 js 加载")),{initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}};else{var O=n(119);w=O.getExportFunction,_=O.loadJSExportFunction}var E=function(t){function e(e,n){var r=this,o=JSON.stringify({code:v.INVALID_PARAMS,msg:"[".concat(e,"] ").concat(n)});return(r=t.call(this,o)||this).code=v.INVALID_PARAMS,r}return o(e,t),e.prototype.toJSON=function(){return{code:this.code,message:this.message}},e}(Error);function j(t,e,n){void 0===e&&(e=h.COMPONENT_NAME),void 0===n&&(n="call container error");var r=t instanceof Error?t:new Error("[".concat(e,"] ").concat((null==t?void 0:t.message)||n));return r.code=(null==t?void 0:t.code)||"UNKNOWN_ERROR",r}var P=e.CloudbaseContainers=function(){function t(t){var n,r,o=this;if(this.config=i(i({},t),{jsUrl:"string"==typeof t.jsUrl?{vm:t.jsUrl}:t.jsUrl}),e.t=(null===(n=t.i18n)||void 0===n?void 0:n.t)||function(t){return t},!this.config.wasmUrl&&this.config.publicKey);else if(!this.config.wasmUrl&&!(null===(r=this.config.jsUrl)||void 0===r?void 0:r.vm)&&!globalThis.cloudbase_private_link)throw new E("".concat(h.COMPONENT_NAME),(0,e.t)("缺少 privatelink sdk 地址"));this.config.wasmUrl?this.wasm=w(this.config.wasmUrl).catch((function(t){if(o.config.jsUrl)return console.warn("load wams error, fall back to use js",t),_(o.config.jsUrl);if(globalThis.cloudbase_private_link)return globalThis.cloudbase_private_link;throw t})):this.config.jsUrl||this.config.publicKey?this.wasm=_(this.config.jsUrl):this.wasm=Promise.resolve({initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}),d.langEvent.bus.on(d.langEvent.LANG_CHANGE_EVENT,(function(t){var n,r,a,c,s;e.t=(null===(a=null===(r=t.data)||void 0===r?void 0:r.i18n)||void 0===a?void 0:a.t)||function(t){return t},o.defaultHeaders=i(i({},o.defaultHeaders),((n={})[d.langEvent.LANG_CHANGE_EVENT]=null===(s=null===(c=t.data)||void 0===c?void 0:c.i18n)||void 0===s?void 0:s.lang,n))}))}var n,r;return t.prototype.callContainer=function(t,e){return s(this,void 0,void 0,(function(){var n,r,o,a,c,s,f,d,v,y,g,m,w,_,O,P,S;return u(this,(function(u){switch(u.label){case 0:return[4,this.initContainer(this.config)];case 1:return u.sent(),n="".concat(h.COMPONENT_NAME,".callContainer"),[4,this.wasm];case 2:if(r=u.sent().callContainer,o=i({},t),a=o.url,_=o.method,c=void 0===_?"GET":_,s=o.data,O=o.timeout,f=void 0===O?6e4:O,P=o.dataType,d=void 0===P?"json":P,S=o.responseType,v=void 0===S?"text":S,y=l(o,["url","method","data","timeout","dataType","responseType"]),!a)throw new E(n,"invalid request url");if(!c)throw new E(n,"invalid request method");g=i(i({},this.defaultHeaders),t.header),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,new Promise((function(t,e){var o=i({url:a,method:c,header:g,data:(0,p.serializeRequestBody)(g,s,c),timeout:f,dataType:d,responseType:v},y);if(s&&((0,p.isBuffer)(o.data)||"string"==typeof o.data)&&(null==s?void 0:s.length)>1024e4)e(new E(n,"body too large"));else{if("GET"===c){var u=o.data;if(u&&(o.data=void 0),!(0,p.isBuffer)(u)&&"string"!=typeof u){var l=Object.entries(u||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))),t}),[]);l.length&&(u=l.join("&"))}if("string"==typeof o.data){var h=(0,p.parseURL)(a);h.search?h.search+="&".concat(o.data):h.search="?".concat(o.data),o.url=h.href,o.data=void 0}}r(i(i({},o),{success:t,fail:function(t){var r=(t||{}).data;e(j(r,n,"call container error"))}}))}}))];case 4:return m=u.sent(),[2,b(e,null,m)];case 5:return w=u.sent(),b(e,w),[3,6];case 6:return[2]}}))}))},t.prototype.initContainer=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.wasm];case 1:return e=r.sent().initContainer,this.containerInitPromise||(this.containerInitPromise=new Promise((function(r,o){e({config:t,success:function(t){"200"!==String(t.statusCode)&&o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),r(t)},fail:function(t){o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),n.containerInitPromise=null}})}))),[2,this.containerInitPromise]}}))}))},a([m({customInfo:{className:"Cloudbase",methodName:"callContainer"},title:"调用失败",messages:["请确认以下各项:"," 1 - 调用 callContainer() 的语法或参数是否正确"," 2 - 域名 & 路径是否存在","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(y)]}),c("design:type",Function),c("design:paramtypes",["function"==typeof(n=void 0!==f.ICallContainerOptions&&f.ICallContainerOptions)?n:Object,"function"==typeof(r="undefined"!=typeof Function&&Function)?r:Object]),c("design:returntype",Promise)],t.prototype,"callContainer",null),t}(),S={name:h.COMPONENT_NAME,namespace:"container",entity:function(t){if(this.containerInstance)return g(v.INVALID_OPERATION,"every cloudbase instance should has only one container object"),this.containerInstance;var e=new P(t);return this.containerInstance=e,this.callContainer=e.callContainer.bind(e),this.containerInstance}};try{cloudbase.registerComponent(S)}catch(t){}e.registerContainers=function(t){try{t.registerComponent(S)}catch(t){console.warn(t)}}},50:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serializeRequestBody=e.isBuffer=e.parseURL=void 0;var r=n(515),o=n(645),i=r.constants.ERRORS;function a(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function c(t){var e=Object.entries(t||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),t}),[]);if(e.length)return e.join("&")}e.parseURL=function(t){if(document){var e=document.createElement("a");return e.href=t,e}return new URL(new Request(t).url)},e.isBuffer=a,e.serializeRequestBody=function(t,e,n){void 0===n&&(n="POST");var r=e,s="Content-Type";if("object"==typeof e&&!a(e)){t[s]||t["content-type"]||(t[s]="application/json");var u=t[s]||t["content-type"];if("GET"===n)try{return c(e)||""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data in query method, ").concat(t.message)}))}switch(u){case"application/json":try{r=JSON.stringify(e)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/json, ").concat(t.message)}))}break;case"application/x-www-form-urlencoded":try{var l=c(e);l&&(r=l)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/x-www-form-urlencoded,").concat(t.message)}))}}}return r}},119: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,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.loadJSExportFunction=e.getExportFunction=void 0;var c=a(n(408)),s=n(50);function u(t,e,n){return void 0===n&&(n=!1),o(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return!n&&WebAssembly.instantiateStreaming?[3,3]:[4,t];case 1:return[4,i.sent().arrayBuffer()];case 2:if(r=i.sent(),n)throw new Error("do not support *.br");return o=r,[2,WebAssembly.instantiate(o,e)];case 3:return[2,WebAssembly.instantiateStreaming(t,e)]}}))}))}function l(t,e,n){return void 0===n&&(n=document),new Promise((function(r,o){var i=n.defaultView,a=n.createElement("script");a.setAttribute("src",t),a.setAttribute("class",e),a.addEventListener("load",(function(){if(Object.prototype.hasOwnProperty.call(i,e))return r(i[e]);var n=new Error("Fail to load UMD module ".concat(e," from [").concat(t,"]."));return o(n)})),a.addEventListener("error",(function(n){var r=new Error("main bundle [".concat(e,"] load failed from [").concat(t,"]: ").concat((null==n?void 0:n.message)||""));o(r)})),n.body?n.body.appendChild(a):n.head.appendChild(a)}))}e.getExportFunction=function(t,e,n){return void 0===n&&(n="go"),o(this,void 0,void 0,(function(){var o,a,l,f;return i(this,(function(i){switch(i.label){case 0:return o=r({env:{memoryBase:0,tableBase:0,memory:new WebAssembly.Memory({initial:256})}},e),l=function(t){var e=!1,n="";try{n=(0,s.parseURL)(t).pathname}catch(e){n=t}return/\.br$/.test(n)&&(e=!0),e}(t),"go"===n&&((a=new c.default)._initedModulePromise=new Promise((function(t){a._initedModuleResolve=t})),o=r(r({},a.importObject),{env:r(r({},a.importObject.env),{exportModule:function(t){return a._initedModuleResolve(t)}})})),[4,u(fetch(t),o,l)];case 1:return f=i.sent(),"go"!==n?[3,3]:[4,Promise.race([a.run(f.instance),new Promise((function(t){return setTimeout((function(){t(null)}),500)}))])];case 2:return i.sent(),[2,{callContainer:window.callContainer,initContainer:window.initContainer}];case 3:return[2,f.instance.exports]}}))}))},e.loadJSExportFunction=function(t){return o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).vm,r=e.vender,o="cloudbase_private_link_vender",!r&&Object.prototype.hasOwnProperty.call(document.defaultView,o)?[3,2]:[4,l(r||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink-vender@0.0.2/dist/cdn/cloudbase.privatelink.vender.js",o)];case 1:i.sent(),i.label=2;case 2:return[2,l(n||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink@0.0.1/dist/cdn/cloudbase.privatelink.vm.js","cloudbase_private_link")]}}))}))}},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]}),i=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)&&o(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var c,s=a(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 i=o[n],a=i.isMatch,c=i.genAdapter,s=i.runtime;if(a())return{adapter:r({isMatch:a},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)}),i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,a=t.headers,c=void 0===a?{}:a,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(i(i({},t),{data:u,method:s}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:c,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,n,r,o;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.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 a.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 a(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,i(i({},t),{signal:n.signal})).then((function(t){return a(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 i,a,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(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),a=(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(a)}))},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,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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 i=n(102),a=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 i,a=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=a.findIndex((function(t){return s.test(t)}));if(-1!==f){var d=a.filter((function(t,e){return e>f}));d.unshift(a[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(i=new Error).stack="".concat(c?"@debugger":"Error","\n").concat(d.join("\n"))}return i}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(a.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,a=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 a&&c&&(s.subtitle=c,n?(n.code=a,n.msg=c):(t.code=a,t.message=c),r=n||t,s.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.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,a,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,a=n.message,c=n.error,s=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),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,i.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}),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)&&r(e,t,n);return o(e,t),e},a=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=i(n(546));e.constants=c;var s=i(n(662));e.adapters=s;var u=i(n(388));e.cache=u;var l=i(n(363));e.events=l;var f=i(n(587));e.langEvent=f;var d=i(n(102));e.utils=d;var p=i(n(607));e.helpers=p;var h=a(n(450));e.AbortController=h.default;var v={decode:a(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)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(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(a,c)}s((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)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 a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}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,i=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=i)}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 i(this,void 0,void 0,(function(){var r;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]),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 i(this,void 0,void 0,(function(){var r;return a(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 i(this,void 0,void 0,(function(){return a(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)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;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 a=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,a.isInstanceOf)(t,s))return console.error(t.error),this;var n=(0,a.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]?i([],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 i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,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,i=t.content,a=void 0===i?[]:i,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=a;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 i=o[2];i&&(n=(0,e.parseQueryString)(i))}var a=n.token,c=r(n,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:c.state,token:a,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 i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),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(906);
|