@e-techsolutions/e-baas-sdk 1.1.7 → 1.1.9
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/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x21559a(_0x397798,_0x20a959){return _0x9482(_0x20a959- -0xf6,_0x397798);}while(!![]){try{const _0x5c67f3=parseInt(_0x21559a(0x1e,-0x26))/0x1*(-parseInt(_0x21559a(-0x17,-0x43))/0x2)+-parseInt(_0x21559a(0xad,0x5b))/0x3+-parseInt(_0x21559a(0x70,0xe))/0x4*(-parseInt(_0x21559a(0x5,0x73))/0x5)+-parseInt(_0x21559a(-0xd,-0x17))/0x6*(-parseInt(_0x21559a(0x7b,0x56))/0x7)+-parseInt(_0x21559a(0x7,0x23))/0x8*(-parseInt(_0x21559a(0x17,-0x34))/0x9)+-parseInt(_0x21559a(0x76,0x5f))/0xa*(parseInt(_0x21559a(0xdb,0x7c))/0xb)+parseInt(_0x21559a(0x4d,-0x36))/0xc*(parseInt(_0x21559a(0x34,0x31))/0xd);if(_0x5c67f3===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x5a4b25){stringArray['push'](stringArray['shift']());}}}(_0x5a3d,0x35fe4));import axios from'axios';class EBaaSError extends Error{constructor(_0x5d116f,status=0x0,_0x5e677a){super(_0x5d116f);function _0x3fa25f(_0xbc02a8,_0x5f46f7){return _0x9482(_0xbc02a8-0x32d,_0x5f46f7);}this[_0x3fa25f(0x471,0x3f8)]=_0x3fa25f(0x3df,0x357),this[_0x3fa25f(0x458,0x435)]=status,this['details']=_0x5e677a,Error['captureStackTrace']&&Error[_0x3fa25f(0x3da,0x453)](this,EBaaSError);}[_0x154533(-0x207,-0x28f)](){function _0x96f8b7(_0x1b6477,_0x407a13){return _0x9482(_0x407a13- -0x339,_0x1b6477);}return{'name':this['name'],'message':this[_0x96f8b7(-0x263,-0x27c)],'status':this[_0x96f8b7(-0x1a9,-0x20e)],'details':this['details'],'stack':this[_0x96f8b7(-0x27b,-0x1fd)]};}[_0x154533(-0x19c,-0x1f5)](){function _0x2798e9(_0x23820d,_0x26f31b){return _0x9482(_0x26f31b- -0x131,_0x23820d);}return this[_0x2798e9(-0xd,0x13)]+':\x20'+this[_0x2798e9(-0xc7,-0x74)]+'\x20(Status:\x20'+this['status']+')';}}class HttpClient{constructor(config){this[_0x200677(0x365,0x34b)]=config['url'],this['apiKey']=config[_0x200677(0x3a4,0x335)],this[_0x200677(0x397,0x32d)]=axios[_0x200677(0x355,0x2fb)]({'baseURL':this['baseURL'],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this['apiKey'],...config['headers']}});function _0x200677(_0x4996c8,_0x1e5276){return _0x9482(_0x4996c8-0x23d,_0x1e5276);}this['setupInterceptors']();}[_0x154533(-0x1c4,-0x1f3)](){this['client'][_0x4e1c53(0x252,0x1fc)][_0x4e1c53(0x227,0x28b)][_0x4e1c53(0x279,0x247)](config=>{return config;},_0x4c2db5=>{return Promise['reject'](new EBaaSError('Request\x20failed',0x0,_0x4c2db5));});function _0x4e1c53(_0x355c7a,_0x4ff8e6){return _0x9482(_0x355c7a-0x144,_0x4ff8e6);}this[_0x4e1c53(0x29e,0x266)]['interceptors'][_0x4e1c53(0x1dd,0x1d5)]['use'](response=>{return response;},_0x23f064=>{const status=_0x23f064['response']?.['status']||0x0,_0x9b57f1=_0x23f064[_0xac162e(-0x302,-0x2d4)]?.['data']?.[_0xac162e(-0x2de,-0x364)]||_0x23f064['message']||_0xac162e(-0x2b3,-0x27a);function _0xac162e(_0x319696,_0x368e7f){return _0x9482(_0x319696- -0x39b,_0x368e7f);}const _0x2d4003=_0x23f064['response']?.['data']||_0x23f064;return Promise['reject'](new EBaaSError(_0x9b57f1,status,_0x2d4003));});}async[_0x154533(-0x161,-0x114)](_0x170489,config){function _0x3f0629(_0x5ac45e,_0xade4bf){return _0x9482(_0xade4bf-0xb9,_0x5ac45e);}try{const response=await this[_0x3f0629(0x266,0x213)]['get'](_0x170489,config);return{'data':response[_0x3f0629(0x137,0x14b)],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x3f0629(0x1f6,0x175)]};}catch(_0x557a0a){throw this['handleError'](_0x557a0a);}}async[_0x154533(-0x1a2,-0x210)](_0x4dfd6a,data,config){function _0x583245(_0x34eaf8,_0xaf7b97){return _0x9482(_0xaf7b97-0x146,_0x34eaf8);}try{const response=await this['client']['post'](_0x4dfd6a,data,config);return{'data':response[_0x583245(0x1a7,0x1d8)],'status':response[_0x583245(0x28a,0x271)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0xed1e7f){throw this['handleError'](_0xed1e7f);}}async['put'](_0x37756d,data,config){function _0xe5d5e9(_0x39f483,_0x219607){return _0x9482(_0x219607- -0x189,_0x39f483);}try{const response=await this['client'][_0xe5d5e9(-0xe4,-0xef)](_0x37756d,data,config);return{'data':response[_0xe5d5e9(-0x122,-0xf7)],'status':response['status'],'statusText':response[_0xe5d5e9(-0x87,-0x32)],'headers':response['headers']};}catch(_0x45e6ea){throw this[_0xe5d5e9(-0xce,-0xe7)](_0x45e6ea);}}async['patch'](_0x35ad0b,data,config){function _0x36de27(_0x47815f,_0x24ecb4){return _0x9482(_0x47815f-0x1f0,_0x24ecb4);}try{const response=await this[_0x36de27(0x34a,0x34f)]['patch'](_0x35ad0b,data,config);return{'data':response[_0x36de27(0x282,0x2d0)],'status':response['status'],'statusText':response[_0x36de27(0x347,0x3c6)],'headers':response['headers']};}catch(_0x446922){throw this[_0x36de27(0x292,0x24e)](_0x446922);}}async['delete'](_0x336141,config){function _0x256632(_0x3b70bd,_0x4c3d4e){return _0x9482(_0x4c3d4e-0xc4,_0x3b70bd);}try{const response=await this[_0x256632(0x1be,0x21e)][_0x256632(0x13e,0x159)](_0x336141,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x256632(0x22e,0x21b)],'headers':response[_0x256632(0x102,0x180)]};}catch(_0x5b72a3){throw this['handleError'](_0x5b72a3);}}[_0x154533(-0x18e,-0x145)](_0x16fccc){function _0x4c31d6(_0x9d7be6,_0x5df057){return _0x9482(_0x5df057- -0x240,_0x9d7be6);}this['client'][_0x4c31d6(-0xbc,-0xb7)][_0x4c31d6(-0x205,-0x184)]['common']['Authorization']='Bearer\x20'+_0x16fccc;}[_0x154533(-0x1b9,-0x22f)](){delete this['client'][_0x4a19b6(-0x1a2,-0x229)]['headers'][_0x4a19b6(-0x251,-0x2d0)]['Authorization'];function _0x4a19b6(_0x4f828e,_0x58d651){return _0x9482(_0x4f828e- -0x32b,_0x58d651);}this['client']['defaults'][_0x4a19b6(-0x26f,-0x2f2)]['common']['Authorization']=_0x4a19b6(-0x28f,-0x2d0)+this['apiKey'];}[_0x154533(-0x20d,-0x21d)](_0x36e6e0){function _0x4aa831(_0x38334e,_0x45ed55){return _0x9482(_0x45ed55- -0x33b,_0x38334e);}if(_0x36e6e0 instanceof EBaaSError)return _0x36e6e0;return new EBaaSError(_0x36e6e0['message']||'HTTP\x20request\x20failed',_0x36e6e0[_0x4aa831(-0x22a,-0x210)]||0x0,_0x36e6e0);}}class AuthClient{constructor(_0x71220e,_0x503a90){function _0x4a96a8(_0x59cba9,_0x24f16e){return _0x9482(_0x24f16e-0x5b,_0x59cba9);}this['currentSession']=null,this[_0x4a96a8(0x1cc,0x1ae)]=_0x71220e,this[_0x4a96a8(0x118,0x188)]=_0x503a90,this['loadSession']();}async[_0x154533(-0x179,-0x157)](data){function _0x101317(_0xc720de,_0x2c6806){return _0x9482(_0xc720de-0xdc,_0x2c6806);}try{const response=await this['httpClient']['post'](_0x101317(0x1ca,0x202),data);return response[_0x101317(0x16e,0x155)]['session']&&this['setSessionInternal'](response[_0x101317(0x16e,0xf0)]['session']),response['data'];}catch(_0x156b98){throw this['handleAuthError'](_0x156b98);}}async[_0x154533(-0x186,-0x1e4)](data){function _0xb1e92(_0x16f840,_0xdd01fa){return _0x9482(_0xdd01fa-0x26b,_0x16f840);}try{const headers={};this['workspaceId']&&(headers[_0xb1e92(0x413,0x3b8)]=this['workspaceId']);const response=await this[_0xb1e92(0x429,0x3be)]['post'](_0xb1e92(0x3b3,0x36a),data,{'headers':headers});return response[_0xb1e92(0x285,0x2fd)]['session']&&this[_0xb1e92(0x31b,0x326)](response['data'][_0xb1e92(0x352,0x2f8)]),response['data'];}catch(_0x45d214){throw this['handleAuthError'](_0x45d214);}}async['signOut'](){function _0x1c7777(_0x1c38a0,_0x1dc4d8){return _0x9482(_0x1c38a0-0x3ca,_0x1dc4d8);}try{await this['httpClient']['post'](_0x1c7777(0x512,0x4a6)),this[_0x1c7777(0x540,0x5bf)]();}catch(_0x4be588){this['clearSession']();throw this[_0x1c7777(0x54a,0x543)](_0x4be588);}}async[_0x154533(-0x1ca,-0x1e2)](){if(!this['currentSession']?.[_0x1cd3b0(0x388,0x3b0)])return null;function _0x1cd3b0(_0x4307db,_0x116077){return _0x9482(_0x116077-0x2da,_0x4307db);}try{const response=await this[_0x1cd3b0(0x45b,0x42d)][_0x1cd3b0(0x48b,0x428)]('/auth/v1/user');return response['data'][_0x1cd3b0(0x304,0x37b)];}catch(_0x446251){if(_0x446251 instanceof EBaaSError&&_0x446251['status']===0x191)return this[_0x1cd3b0(0x44a,0x450)](),null;throw this['handleAuthError'](_0x446251);}}async[_0x154533(-0x1d3,-0x1c5)](){if(!this[_0x373cc7(0x105,0x114)]?.['refresh_token'])return null;function _0x373cc7(_0x3b4dc0,_0x3b6c63){return _0x9482(_0x3b6c63-0x36,_0x3b4dc0);}try{const response=await this['httpClient'][_0x373cc7(0x1cd,0x143)](_0x373cc7(0x184,0xfa),{'refresh_token':this[_0x373cc7(0x18c,0x114)]['refresh_token']});if(response[_0x373cc7(0xdd,0xc8)]['session'])return this['setSession'](response[_0x373cc7(0xf9,0xc8)][_0x373cc7(0x74,0xc3)]),response[_0x373cc7(0x119,0xc8)]['session'];return null;}catch(_0x41f910){this[_0x373cc7(0x1fc,0x1ac)]();throw this[_0x373cc7(0x19b,0x1b6)](_0x41f910);}}async['resetPassword'](_0x5ae576){function _0x1727ac(_0x1f0a54,_0x33a862){return _0x9482(_0x33a862- -0x36b,_0x1f0a54);}try{await this['httpClient']['post'](_0x1727ac(-0x291,-0x25a),{'email':_0x5ae576});}catch(_0x2acfce){throw this[_0x1727ac(-0x252,-0x1eb)](_0x2acfce);}}async['updateUser'](data){function _0x388afb(_0x46e6f8,_0xc45482){return _0x9482(_0x46e6f8-0x48,_0xc45482);}try{const response=await this[_0x388afb(0x19b,0x154)]['put'](_0x388afb(0x1c6,0x22a),data);return response[_0x388afb(0xda,0x111)][_0x388afb(0xe9,0x16a)];}catch(_0x59109b){throw this[_0x388afb(0x1c8,0x24c)](_0x59109b);}}[_0x154533(-0x208,-0x186)](){function _0x1efba6(_0x549e93,_0x19f858){return _0x9482(_0x549e93-0x3c8,_0x19f858);}return this[_0x1efba6(0x4a6,0x4e4)];}['setSession'](_0x1e2578){function _0x120748(_0x32d936,_0x301136){return _0x9482(_0x301136-0x3d,_0x32d936);}this['currentSession']=_0x1e2578,this['httpClient']['setAuthToken'](_0x1e2578[_0x120748(0x96,0x113)]),typeof localStorage!==_0x120748(0x15f,0xf6)&&localStorage['setItem'](_0x120748(0x216,0x18c),JSON[_0x120748(0x1d3,0x152)](_0x1e2578));}[_0x154533(-0x205,-0x1dc)](_0x1b63a6){return()=>{};}['setWorkspaceId'](_0x25bfce){this['workspaceId']=_0x25bfce;}[_0x154533(-0x1f4,-0x238)](_0x59dd91){function _0x57813f(_0x48f02f,_0x5d6506){return _0x9482(_0x48f02f- -0x370,_0x5d6506);}this[_0x57813f(-0x292,-0x246)]=_0x59dd91,this[_0x57813f(-0x21d,-0x1c6)]['setAuthToken'](_0x59dd91[_0x57813f(-0x29a,-0x231)]),typeof localStorage!=='undefined'&&localStorage[_0x57813f(-0x2a4,-0x2a5)](_0x57813f(-0x221,-0x1e1),JSON[_0x57813f(-0x25b,-0x235)](_0x59dd91));}[_0x154533(-0x139,-0x137)](){this['currentSession']=null,this[_0xe95c90(-0x10d,-0xd3)]['removeAuthToken']();function _0xe95c90(_0x514ca2,_0xdd45aa){return _0x9482(_0x514ca2- -0x260,_0xdd45aa);}typeof localStorage!=='undefined'&&localStorage['removeItem'](_0xe95c90(-0x111,-0xb5));}[_0x154533(-0x194,-0x185)](){function _0x142ea1(_0x50fff4,_0x1a8bc2){return _0x9482(_0x50fff4- -0x156,_0x1a8bc2);}if(typeof localStorage!==_0x142ea1(-0x9d,-0x77)){const _0x41407e=localStorage['getItem']('ebaas.auth.session');if(_0x41407e)try{const _0x164492=JSON['parse'](_0x41407e);this[_0x142ea1(-0x9b,-0xd1)](_0x164492);}catch(_0x317d24){this['clearSession']();}}}[_0x154533(-0x12f,-0x11c)](_0x4dfcfa){function _0x63481c(_0x2c0a8c,_0x1228f5){return _0x9482(_0x2c0a8c-0x333,_0x1228f5);}if(_0x4dfcfa instanceof EBaaSError)return _0x4dfcfa;return new EBaaSError(_0x4dfcfa[_0x63481c(0x3f0,0x40a)]||_0x63481c(0x44a,0x3e7),_0x4dfcfa[_0x63481c(0x45e,0x480)]||0x0,_0x4dfcfa);}}class QueryBuilder{constructor(_0xdc049f,_0x19e392,_0x23c2f8,_0x41caf4){this['httpClient']=_0xdc049f,this['table']=_0x19e392,this['schema']=_0x23c2f8,this['workspaceId']=_0x41caf4,this['query']={'filters':[]};}[_0x154533(-0x191,-0x13e)](_0x49f055='*',_0xb4cfab){function _0x117331(_0x1bb3f6,_0x9551d6){return _0x9482(_0x9551d6-0x393,_0x1bb3f6);}return this[_0x117331(0x598,0x512)][_0x117331(0x494,0x4b1)]=_0x49f055,this;}[_0x154533(-0x18f,-0x1aa)](data,_0x13bf5f){function _0x3d0ef3(_0xa195ec,_0x51e37a){return _0x9482(_0x51e37a-0x3cb,_0xa195ec);}return this['executeQuery']('POST',_0x3d0ef3(0x505,0x4f7)+this['table']+_0x3d0ef3(0x50a,0x498),{'data':data,'options':_0x13bf5f});}['update'](data,_0x252b35){this[_0x5777f7(0x28a,0x2bd)][_0x5777f7(0x292,0x279)]=data;function _0x5777f7(_0x2f11d4,_0x37f350){return _0x9482(_0x2f11d4-0x10b,_0x37f350);}return this['query']['updateOptions']=_0x252b35,this;}['upsert'](data,_0x165011){function _0x20f892(_0xac26c8,_0x236521){return _0x9482(_0xac26c8-0x241,_0x236521);}return this['executeQuery']('POST','/sdk/v1/'+this['table']+_0x20f892(0x32b,0x366),{'data':data,'options':{..._0x165011,'upsert':!![]}});}['delete'](_0x4d134e){this[_0x42a6a1(0x3a8,0x3cd)]['deleteOptions']=_0x4d134e,this[_0x42a6a1(0x3a8,0x38e)]['isDelete']=!![];function _0x42a6a1(_0x2587c1,_0xdbe7ea){return _0x9482(_0x2587c1-0x229,_0xdbe7ea);}return this;}['eq'](_0x56843c,_0x49b7e3){function _0x9ef3f7(_0x192abd,_0x4d8a8b){return _0x9482(_0x4d8a8b- -0x1ed,_0x192abd);}return this[_0x9ef3f7(-0x1e,-0x6e)]['filters'][_0x9ef3f7(-0x12f,-0xec)]({'column':_0x56843c,'operator':'eq','value':_0x49b7e3}),this;}['neq'](_0x2dcfe6,_0x3e10e0){function _0x18996a(_0x277c5d,_0x2fdd85){return _0x9482(_0x2fdd85-0x38a,_0x277c5d);}return this['query'][_0x18996a(0x515,0x4b9)]['push']({'column':_0x2dcfe6,'operator':_0x18996a(0x4f5,0x519),'value':_0x3e10e0}),this;}['gt'](_0x368728,_0x1ee7e2){function _0x230a18(_0x5c224e,_0x531f65){return _0x9482(_0x531f65- -0x27b,_0x5c224e);}return this[_0x230a18(-0x184,-0xfc)][_0x230a18(-0xcb,-0x14c)]['push']({'column':_0x368728,'operator':'gt','value':_0x1ee7e2}),this;}['gte'](_0x45e3c3,_0x472202){function _0x381383(_0x5ead33,_0x4a0d50){return _0x9482(_0x5ead33-0xb1,_0x4a0d50);}return this[_0x381383(0x230,0x24f)]['filters'][_0x381383(0x1b2,0x232)]({'column':_0x45e3c3,'operator':_0x381383(0x1ee,0x201),'value':_0x472202}),this;}['lt'](_0x286a41,_0x14b825){function _0x51df78(_0x1dddbe,_0x542fa0){return _0x9482(_0x1dddbe- -0x1ab,_0x542fa0);}return this[_0x51df78(-0x2c,-0xab)][_0x51df78(-0x7c,-0x103)]['push']({'column':_0x286a41,'operator':'lt','value':_0x14b825}),this;}[_0x154533(-0x21b,-0x1a2)](_0x22a89e,_0x2216eb){this['query']['filters'][_0x3bda79(0x478,0x425)]({'column':_0x22a89e,'operator':'lte','value':_0x2216eb});function _0x3bda79(_0x5bfb67,_0x25793e){return _0x9482(_0x25793e-0x324,_0x5bfb67);}return this;}[_0x154533(-0x192,-0x21c)](_0x5e5780,_0x2713ac){this[_0x48554e(-0x71,-0x66)]['filters']['push']({'column':_0x5e5780,'operator':'like','value':_0x2713ac});function _0x48554e(_0x3000b9,_0x3294a8){return _0x9482(_0x3000b9- -0x1f0,_0x3294a8);}return this;}['ilike'](_0x4f7eaa,_0x463600){function _0x3a212b(_0x167364,_0x411831){return _0x9482(_0x167364-0x1a3,_0x411831);}return this[_0x3a212b(0x322,0x32b)]['filters']['push']({'column':_0x4f7eaa,'operator':'ilike','value':_0x463600}),this;}['is'](_0x4ba4c9,_0x50d2a7){function _0x497bb0(_0xc91f90,_0x3c52d3){return _0x9482(_0x3c52d3-0x1ec,_0xc91f90);}return this['query']['filters'][_0x497bb0(0x361,0x2ed)]({'column':_0x4ba4c9,'operator':'is','value':_0x50d2a7}),this;}['in'](_0x5f3ae7,_0x255f86){return this['query']['filters']['push']({'column':_0x5f3ae7,'operator':'in','value':_0x255f86}),this;}[_0x154533(-0x1fa,-0x1bc)](_0x3019a5,_0x33f78e){function _0x274942(_0x130670,_0xf04d46){return _0x9482(_0x130670-0x210,_0xf04d46);}return this[_0x274942(0x38f,0x308)][_0x274942(0x33f,0x323)][_0x274942(0x311,0x363)]({'column':_0x3019a5,'operator':'contains','value':_0x33f78e}),this;}['match'](_0x1ac4fc){function _0x2eb886(_0x252e85,_0x31bc0b){return _0x9482(_0x31bc0b-0x2a1,_0x252e85);}return Object['entries'](_0x1ac4fc)[_0x2eb886(0x2ac,0x32a)](([_0x5c834a,_0x3bc37a])=>{this['eq'](_0x5c834a,_0x3bc37a);}),this;}[_0x154533(-0x1cb,-0x1a0)](_0x550e28,_0x261c2a){function _0x25caa3(_0x471520,_0xac7be0){return _0x9482(_0x471520- -0x5d,_0xac7be0);}return!this[_0x25caa3(0x122,0x142)][_0x25caa3(0x87,0xdb)]&&(this['query']['order']=[]),this['query']['order']['push']({'column':_0x550e28,'ascending':_0x261c2a?.[_0x25caa3(0x129,0x163)]!==![]}),this;}[_0x154533(-0x1e9,-0x236)](count){function _0xa465ce(_0x53ee9f,_0x1cab7b){return _0x9482(_0x53ee9f-0x1dc,_0x1cab7b);}return this['query'][_0xa465ce(0x2a2,0x26f)]=count,this;}[_0x154533(-0x1e1,-0x1ad)](from,_0x1c3789){this['query'][_0x598e88(0x160,0xfc)]={'from':from,'to':_0x1c3789};function _0x598e88(_0x4801da,_0x20b235){return _0x9482(_0x4801da-0x92,_0x20b235);}return this;}async[_0x154533(-0x140,-0x138)](){function _0x452ebc(_0x346c8e,_0x2c696b){return _0x9482(_0x346c8e-0xf3,_0x2c696b);}if(this['query'][_0x452ebc(0x27a,0x2e0)])return this[_0x452ebc(0x24b,0x274)]('PATCH','/sdk/v1/'+this[_0x452ebc(0x1b4,0x13e)],{'data':this['query']['updateData'],'options':this[_0x452ebc(0x272,0x2f2)]['updateOptions'],'filters':this['query']['filters']});else return this[_0x452ebc(0x272,0x242)]['isDelete']?this[_0x452ebc(0x24b,0x286)]('DELETE','/sdk/v1/'+this['table']+_0x452ebc(0x1f3,0x259),{'options':this['query']['deleteOptions'],'filters':this[_0x452ebc(0x272,0x21d)]['filters']}):this['executeQuery']('GET',_0x452ebc(0x21f,0x23f)+this['table']+'?operation=select',{'select':this['query']['select'],'filters':this['query']['filters'],'order':this[_0x452ebc(0x272,0x29a)]['order'],'limit':this[_0x452ebc(0x272,0x27e)]['limit'],'range':this[_0x452ebc(0x272,0x206)]['range']});}async['single'](){this[_0x5b40ac(-0x2bc,-0x2cb)](0x1);const result=await this['execute']();function _0x5b40ac(_0x2e8806,_0x37f793){return _0x9482(_0x2e8806- -0x382,_0x37f793);}return{'data':result[_0x5b40ac(-0x2f0,-0x303)]?.[0x0]||null,'error':result[_0x5b40ac(-0x2d7,-0x2e4)]};}async['executeQuery'](_0x495f39,_0xaafff3,_0x502522){function _0x2fa45f(_0x2b0b3a,_0x1ffee4){return _0x9482(_0x1ffee4-0x1e6,_0x2b0b3a);}try{let response;const headers={};this['workspaceId']&&(headers['x-workspace-id']=this[_0x2fa45f(0x333,0x313)]);if(_0x495f39==='GET'){const _0x272f4c=_0xaafff3['split']('?'),_0x1e6aa5=_0x272f4c[0x0],existingParams=new URLSearchParams(_0x272f4c[0x1]||'');if(_0x502522['select'])existingParams[_0x2fa45f(0x33d,0x349)]('select',_0x502522['select']);_0x502522[_0x2fa45f(0x37b,0x315)]?.[_0x2fa45f(0x358,0x2ed)]&&_0x502522[_0x2fa45f(0x34f,0x315)][_0x2fa45f(0x231,0x26f)](filter=>{function _0x461558(_0x215592,_0x315b96){return _0x9482(_0x215592-0x179,_0x315b96);}existingParams[_0x461558(0x2dc,0x2f2)](filter['column'],filter[_0x461558(0x27c,0x2a5)]+'.'+filter['value']);});if(_0x502522['order']?.['length']){const orderStr=_0x502522['order']['map'](_0x44f92f=>''+_0x44f92f['column']+(_0x44f92f[_0x2fa45f(0x3c8,0x36c)]?_0x2fa45f(0x2b0,0x2f5):_0x2fa45f(0x2ad,0x274)))['join'](',');existingParams[_0x2fa45f(0x2fc,0x349)]('order',orderStr);}if(_0x502522['limit'])existingParams[_0x2fa45f(0x320,0x349)](_0x2fa45f(0x29b,0x2ac),_0x502522['limit']['toString']());_0x502522[_0x2fa45f(0x31b,0x2b4)]&&(existingParams[_0x2fa45f(0x32f,0x349)]('offset',_0x502522[_0x2fa45f(0x332,0x2b4)]['from'][_0x2fa45f(0x274,0x2f9)]()),existingParams[_0x2fa45f(0x34c,0x349)](_0x2fa45f(0x308,0x2ac),(_0x502522[_0x2fa45f(0x22a,0x2b4)]['to']-_0x502522['range']['from']+0x1)['toString']())),response=await this[_0x2fa45f(0x36b,0x339)]['get'](_0x1e6aa5+'?'+existingParams[_0x2fa45f(0x2dd,0x2f9)](),{'headers':headers});}else{if(_0x495f39==='DELETE'){const _0x26b905=_0xaafff3['split']('?'),_0x10e5e6=_0x26b905[0x0],existingParams=new URLSearchParams(_0x26b905[0x1]||'');!existingParams['has']('operation')&&existingParams['append'](_0x2fa45f(0x309,0x34e),'delete');_0x502522[_0x2fa45f(0x35a,0x315)]?.['length']&&_0x502522['filters'][_0x2fa45f(0x295,0x26f)](filter=>{function _0x20bb06(_0x1d1723,_0x349a38){return _0x9482(_0x349a38-0x5f,_0x1d1723);}existingParams[_0x20bb06(0x16d,0x1c2)](filter[_0x20bb06(0x1f6,0x1eb)],filter['operator']+'.'+filter[_0x20bb06(0x19f,0x193)]);});const deleteUrl=_0x10e5e6+'?'+existingParams[_0x2fa45f(0x33b,0x2f9)]();console[_0x2fa45f(0x269,0x2cc)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console[_0x2fa45f(0x313,0x2cc)]('\uD83D\uDD27 DELETE filtros originais:',_0x502522['filters']),response=await this['httpClient'][_0x2fa45f(0x29a,0x27b)](deleteUrl,{'headers':headers});}else{if(_0x495f39==='PATCH'){const _0x31d973=_0xaafff3[_0x2fa45f(0x237,0x2c1)]('?'),_0x2f2a5c=_0x31d973[0x0],existingParams=new URLSearchParams(_0x31d973[0x1]||'');!existingParams['has'](_0x2fa45f(0x3c9,0x34e))&&existingParams[_0x2fa45f(0x382,0x349)](_0x2fa45f(0x34b,0x34e),_0x2fa45f(0x2e7,0x361));_0x502522['filters']?.[_0x2fa45f(0x292,0x2ed)]&&_0x502522['filters']['forEach'](filter=>{function _0x15d324(_0xa69c39,_0x2dd13d){return _0x9482(_0x2dd13d- -0x146,_0xa69c39);}existingParams[_0x15d324(0x90,0x1d)](filter['column'],filter[_0x15d324(-0x18,-0x43)]+'.'+filter[_0x15d324(-0x41,-0x12)]);});_0x502522['options']?.['prefer']&&(headers['Prefer']=_0x502522['options']['prefer']);const updateUrl=_0x2f2a5c+'?'+existingParams[_0x2fa45f(0x37a,0x2f9)]();response=await this[_0x2fa45f(0x397,0x339)]['patch'](updateUrl,_0x502522['data'],{'headers':headers});}else{let _0x3a2596=_0x502522[_0x2fa45f(0x267,0x278)];!headers['Prefer']&&(headers[_0x2fa45f(0x2f6,0x2ee)]=_0x2fa45f(0x384,0x317)),_0x502522[_0x2fa45f(0x27b,0x2cf)]?.['upsert']&&(headers[_0x2fa45f(0x30f,0x2ee)]=_0x2fa45f(0x2d7,0x343)),_0x502522[_0x2fa45f(0x35d,0x36a)]&&(_0x3a2596=_0x502522[_0x2fa45f(0x3c2,0x36a)]),response=await this['httpClient'][_0x2fa45f(0x36f,0x2f3)](_0xaafff3,_0x3a2596,{'headers':headers});}}}return{'data':response[_0x2fa45f(0x23c,0x278)],'error':null,'count':response[_0x2fa45f(0x2df,0x2a2)]?.['x-total-count']?parseInt(response['headers'][_0x2fa45f(0x31f,0x348)]):undefined};}catch(_0x551f52){return{'data':null,'error':_0x551f52 instanceof EBaaSError?_0x551f52:new EBaaSError(_0x551f52 instanceof Error?_0x551f52['message']:_0x2fa45f(0x385,0x302),0x0,_0x551f52)};}}}class CustomDatabaseManager{constructor(_0x52f56b,_0x547226){this[_0x1ec0b0(-0x2b8,-0x23b)]=_0x52f56b;function _0x1ec0b0(_0x18740e,_0x53d449){return _0x9482(_0x53d449- -0x38e,_0x18740e);}this['workspaceId']=_0x547226;}async[_0x154533(-0x210,-0x28c)](){if(!this[_0xdef5e8(0x23a,0x21f)])return{'hasCustomDatabase':![]};try{const response=await this['httpClient']['get']('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this['workspaceId']}});if(response['status']===0xc8&&response['data']?.['config']){const config=response[_0xdef5e8(0x19f,0x131)]['config'],_0x4d879a={'host':config[_0xdef5e8(0x204,0x184)],'port':config[_0xdef5e8(0x250,0x28c)],'database':config['postgresDatabase'],'username':config[_0xdef5e8(0x287,0x2d3)],'password':'','schema':config[_0xdef5e8(0x23d,0x22f)],'sslEnabled':config[_0xdef5e8(0x290,0x2f3)]};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x4d879a},this['detectedConfig'];}}catch(_0x111a33){if(_0x111a33?.[_0xdef5e8(0x238,0x2bc)]===0x194)return this[_0xdef5e8(0x219,0x208)]={'hasCustomDatabase':![]},this['detectedConfig'];console['warn']('Failed to detect custom database configuration:',_0x111a33);}this['detectedConfig']={'hasCustomDatabase':![]};function _0xdef5e8(_0x328e6c,_0x4e2f07){return _0x9482(_0x328e6c-0x10d,_0x4e2f07);}return this[_0xdef5e8(0x219,0x1a0)];}async[_0x154533(-0x1c3,-0x141)](_0x5b6c49){function _0x158d28(_0x408dad,_0x158fc6){return _0x9482(_0x408dad-0x3d9,_0x158fc6);}try{const response=await this[_0x158d28(0x52c,0x505)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x5b6c49,{'headers':this['workspaceId']?{'X-Workspace-ID':this[_0x158d28(0x506,0x4bf)]}:{}});return response[_0x158d28(0x46b,0x479)];}catch(_0xee788c){return{'success':![],'message':_0xee788c?.['message']||_0x158d28(0x4e3,0x56c)};}}async['configureCustomDatabase'](_0x49483a){if(!this['workspaceId'])throw new Error('Workspace ID is required to configure custom database');const response=await this[_0xd9bbc3(-0xdb,-0xdd)]['post']('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x49483a},{'headers':{'X-Workspace-ID':this[_0xd9bbc3(-0xf5,-0x103)]}}),config=response[_0xd9bbc3(-0x173,-0x19e)][_0xd9bbc3(-0x113,-0x16b)];function _0xd9bbc3(_0x4ea91b,_0x5a5a5c){return _0x9482(_0x5a5a5c- -0x230,_0x4ea91b);}return this[_0xd9bbc3(-0x1a6,-0x124)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x49483a},config;}async[_0x154533(-0x220,-0x278)](){function _0x424059(_0x5c8b60,_0x3a45e3){return _0x9482(_0x3a45e3- -0x2bc,_0x5c8b60);}if(!this[_0x424059(-0x11e,-0x18f)])throw new Error('Workspace ID is required to remove custom database');await this[_0x424059(-0x148,-0x169)][_0x424059(-0x257,-0x227)]('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}}),this[_0x424059(-0x1f4,-0x1b0)]={'hasCustomDatabase':![]};}[_0x154533(-0x15f,-0x1c4)](){function _0x3762ca(_0x4b037d,_0x18bde2){return _0x9482(_0x4b037d-0x37f,_0x18bde2);}return this[_0x3762ca(0x48b,0x4ad)];}['hasCustomDatabase'](){return this['detectedConfig']?.['hasCustomDatabase']??![];}[_0x154533(-0x1c0,-0x1a9)](){function _0x513515(_0x2f8959,_0x5dae0e){return _0x9482(_0x2f8959- -0x98,_0x5dae0e);}return this[_0x513515(0x74,0x28)]?.['credentials'];}[_0x154533(-0x178,-0x1cb)](_0x479054){function _0xf3e7e2(_0x3b34be,_0x3cc970){return _0x9482(_0x3b34be- -0x1a3,_0x3cc970);}this[_0xf3e7e2(-0x76,-0xd1)]=_0x479054,this[_0xf3e7e2(-0x97,-0xe8)]=undefined;}['getWorkspaceId'](){return this['workspaceId'];}['getStatus'](){function _0x555cc2(_0x59a0d3,_0x35a3eb){return _0x9482(_0x35a3eb- -0xb7,_0x59a0d3);}return{'workspaceId':this[_0x555cc2(0x3,0x76)],'hasConfig':this['hasCustomDatabase'](),'configDetails':this['detectedConfig']?.[_0x555cc2(-0x88,-0x2c)]?{'host':this['detectedConfig'][_0x555cc2(-0x62,-0x2c)]['host'],'port':this['detectedConfig'][_0x555cc2(-0x86,-0x2c)]['port'],'database':this[_0x555cc2(0xa8,0x55)]['credentials']['database'],'schema':this[_0x555cc2(0x89,0x55)]['credentials']['schema']||_0x555cc2(0x139,0xce),'sslEnabled':this[_0x555cc2(0x22,0x55)][_0x555cc2(0x4a,-0x2c)]['sslEnabled']||![]}:undefined};}}class DatabaseClient{constructor(_0x5aff74,_0x2d7565){function _0x4c8a66(_0x13a0d0,_0x4d7d0d){return _0x9482(_0x13a0d0-0x77,_0x4d7d0d);}this['httpClient']=_0x5aff74,this[_0x4c8a66(0x13e,0x199)]=new CustomDatabaseManager(_0x5aff74,_0x2d7565);}[_0x154533(-0x1ce,-0x1da)](_0x486498){return new QueryBuilder(this['httpClient'],_0x486498,this['currentSchema'],this['customDatabaseManager']['getWorkspaceId']());}['rpc'](_0x13d063,_0x2962dd){function _0x1d8ba2(_0x31220d,_0x2e4b31){return _0x9482(_0x31220d- -0x2a6,_0x2e4b31);}return this['httpClient'][_0x1d8ba2(-0x199,-0x1fd)](_0x1d8ba2(-0x154,-0x19f)+_0x13d063,_0x2962dd);}['schema'](_0x4f9998){function _0x35aebd(_0x1134a2,_0x23ea8d){return _0x9482(_0x23ea8d-0x12,_0x1134a2);}const _0xf74b1e=new DatabaseClient(this[_0x35aebd(0x1ee,0x165)],this[_0x35aebd(0x11f,0xd9)]['getWorkspaceId']());return _0xf74b1e[_0x35aebd(0x87,0xc9)]=_0x4f9998,_0xf74b1e[_0x35aebd(0x13e,0xd9)]=this['customDatabaseManager'],_0xf74b1e;}async['detectCustomDatabase'](){function _0x170e1b(_0x324ac6,_0x537571){return _0x9482(_0x324ac6-0x377,_0x537571);}return this[_0x170e1b(0x43e,0x46e)][_0x170e1b(0x416,0x47b)]();}async['testCustomConnection'](_0x1b902a){function _0x161e60(_0x29b498,_0x2edc0a){return _0x9482(_0x2edc0a- -0x371,_0x29b498);}return this['customDatabaseManager'][_0x161e60(-0x276,-0x285)](_0x1b902a);}async[_0x154533(-0x200,-0x17f)](_0x8d9305){return this['customDatabaseManager']['configureCustomDatabase'](_0x8d9305);}async[_0x154533(-0x220,-0x1d9)](){function _0x429f2f(_0x341247,_0x1a4672){return _0x9482(_0x341247- -0x33c,_0x1a4672);}return this[_0x429f2f(-0x275,-0x2d1)]['removeCustomDatabase']();}[_0x154533(-0x177,-0x1f0)](){function _0x48919a(_0x4233dd,_0x563edf){return _0x9482(_0x4233dd-0xcd,_0x563edf);}return this[_0x48919a(0x194,0x1eb)]['hasCustomDatabase']();}[_0x154533(-0x16d,-0x189)](){return this['customDatabaseManager']['getStatus']();}[_0x154533(-0x178,-0x124)](_0x2188cc){function _0xe1af69(_0x4e64d0,_0x497856){return _0x9482(_0x4e64d0-0x224,_0x497856);}this[_0xe1af69(0x2eb,0x30d)]['setWorkspaceId'](_0x2188cc);}async['initialize'](){function _0x60c2e6(_0x2c895b,_0x17e614){return _0x9482(_0x17e614-0x1de,_0x2c895b);}try{await this['customDatabaseManager'][_0x60c2e6(0x204,0x27d)]();}catch(_0x20b2bc){console['warn']('Failed to initialize custom database detection:',_0x20b2bc);}}}class StorageBucket{constructor(_0xf7696,bucketId){this['httpClient']=_0xf7696,this['bucketId']=bucketId;}async[_0x154533(-0x22f,-0x22a)](_0x54c6bd,_0x15d837,_0x366658){function _0x3295d4(_0x4b812c,_0x5d1a9e){return _0x9482(_0x5d1a9e- -0x40,_0x4b812c);}try{const _0x2abf8d=new FormData();if(_0x15d837 instanceof File)_0x2abf8d[_0x3295d4(0x16e,0x123)](_0x3295d4(0xc5,0x11c),_0x15d837);else{if(_0x15d837 instanceof Blob)_0x2abf8d[_0x3295d4(0x180,0x123)](_0x3295d4(0x94,0x11c),_0x15d837,_0x54c6bd);else{if(_0x15d837 instanceof ArrayBuffer)_0x2abf8d['append'](_0x3295d4(0x107,0x11c),new Blob([_0x15d837]),_0x54c6bd);else typeof _0x15d837==='string'&&_0x2abf8d[_0x3295d4(0xe9,0x123)]('file',new Blob([_0x15d837],{'type':_0x3295d4(0x192,0x11f)}),_0x54c6bd);}}_0x2abf8d['append'](_0x3295d4(0x18c,0x152),_0x54c6bd);_0x366658?.['cacheControl']&&_0x2abf8d['append']('cacheControl',_0x366658['cacheControl']);_0x366658?.[_0x3295d4(0xe5,0x65)]&&_0x2abf8d['append'](_0x3295d4(0x22,0x65),_0x366658['contentType']);_0x366658?.[_0x3295d4(0x3d,0xa2)]&&_0x2abf8d[_0x3295d4(0xb2,0x123)]('metadata',JSON[_0x3295d4(0x53,0xd5)](_0x366658['metadata']));const _0x4d385b='/storage/buckets/'+this['bucketId']+'/files'+(_0x366658?.[_0x3295d4(0x40,0x97)]?_0x3295d4(0x183,0x100):''),response=await this['httpClient'][_0x3295d4(0xf9,0xcd)](_0x4d385b,_0x2abf8d,{'headers':{'Content-Type':_0x3295d4(0xfd,0x11b)}});return{'data':response['data'],'error':null};}catch(_0x394429){return{'data':null,'error':_0x394429 instanceof EBaaSError?_0x394429:new EBaaSError(_0x394429 instanceof Error?_0x394429['message']:'Failed\x20to\x20upload\x20file',0x0,_0x394429)};}}async[_0x154533(-0x1be,-0x1df)](_0x23710e,_0x2344c6){function _0x123cd9(_0x53ec40,_0x155188){return _0x9482(_0x53ec40- -0x310,_0x155188);}try{const _0x3a7684=new URLSearchParams();_0x2344c6?.['transform']&&Object['entries'](_0x2344c6[_0x123cd9(-0x1ec,-0x1da)])[_0x123cd9(-0x287,-0x2d4)](([_0x2e30c9,_0x1ee3fc])=>{function _0x5bd193(_0x250f87,_0x5df0c4){return _0x9482(_0x250f87- -0x1ae,_0x5df0c4);}_0x1ee3fc!==undefined&&_0x3a7684[_0x5bd193(-0x4b,0x2c)](_0x2e30c9,String(_0x1ee3fc));});const _0x13ac0c='/storage/buckets/'+this[_0x123cd9(-0x21d,-0x272)]+_0x123cd9(-0x1ba,-0x193)+_0x23710e+(_0x3a7684[_0x123cd9(-0x1fd,-0x24d)]()?'?'+_0x3a7684[_0x123cd9(-0x1fd,-0x1d9)]():''),response=await this['httpClient']['get'](_0x13ac0c,{'responseType':_0x123cd9(-0x289,-0x2a6)});return{'data':response['data'],'error':null};}catch(_0x13e554){return{'data':null,'error':_0x13e554 instanceof EBaaSError?_0x13e554:new EBaaSError(_0x13e554 instanceof Error?_0x13e554[_0x123cd9(-0x253,-0x268)]:_0x123cd9(-0x1af,-0x198),0x0,_0x13e554)};}}async['list'](_0x33fe2b,_0x379df7){function _0x5a0034(_0x1ca2d3,_0x348592){return _0x9482(_0x1ca2d3- -0xfc,_0x348592);}try{const _0x113702=new URLSearchParams();_0x33fe2b&&_0x113702['append'](_0x5a0034(0x72,0xf7),_0x33fe2b);_0x379df7?.[_0x5a0034(-0x36,-0x79)]&&_0x113702['append'](_0x5a0034(-0x36,-0x90),String(_0x379df7['limit']));_0x379df7?.['offset']&&_0x113702[_0x5a0034(0x67,0x72)](_0x5a0034(-0x77,-0xe1),String(_0x379df7[_0x5a0034(-0x77,-0x96)]));_0x379df7?.['sortBy']&&_0x113702['append'](_0x5a0034(0x85,0x3d),JSON['stringify'](_0x379df7[_0x5a0034(0x85,0xee)]));_0x379df7?.[_0x5a0034(-0x2d,-0xc)]&&_0x113702[_0x5a0034(0x67,-0x5)]('search',_0x379df7['search']);const _0x15c8ae=_0x5a0034(0x1,0x28)+this['bucketId']+_0x5a0034(0x18,-0x72)+(_0x113702['toString']()?'?'+_0x113702['toString']():''),response=await this['httpClient'][_0x5a0034(0x52,-0x1f)](_0x15c8ae);return{'data':response[_0x5a0034(-0x6a,-0x19)],'error':null};}catch(_0x5b500e){return{'data':null,'error':_0x5b500e instanceof EBaaSError?_0x5b500e:new EBaaSError(_0x5b500e instanceof Error?_0x5b500e[_0x5a0034(-0x3f,-0xb3)]:_0x5a0034(0x78,0x8c),0x0,_0x5b500e)};}}async['remove'](_0x2a3793){function _0x38f7cf(_0x749159,_0x3ba8aa){return _0x9482(_0x3ba8aa-0x27c,_0x749159);}try{const response=await this['httpClient'][_0x38f7cf(0x36e,0x311)](_0x38f7cf(0x3dc,0x379)+this['bucketId']+_0x38f7cf(0x3fe,0x390),{'data':{'paths':_0x2a3793}});return{'data':response[_0x38f7cf(0x345,0x30e)],'error':null};}catch(_0x5b7537){return{'data':null,'error':_0x5b7537 instanceof EBaaSError?_0x5b7537:new EBaaSError(_0x5b7537 instanceof Error?_0x5b7537[_0x38f7cf(0x2b0,0x339)]:'Failed\x20to\x20remove\x20files',0x0,_0x5b7537)};}}async['move'](fromPath,_0x3df394){function _0x1beec1(_0x23585e,_0x462c01){return _0x9482(_0x23585e- -0x371,_0x462c01);}try{const response=await this[_0x1beec1(-0x21e,-0x244)]['post'](_0x1beec1(-0x274,-0x2f2)+this[_0x1beec1(-0x27e,-0x206)]+'/files/move',{'sourceKey':fromPath,'destinationKey':_0x3df394});return{'data':response[_0x1beec1(-0x2df,-0x333)],'error':null};}catch(_0x8cb9e7){return{'data':null,'error':_0x8cb9e7 instanceof EBaaSError?_0x8cb9e7:new EBaaSError(_0x8cb9e7 instanceof Error?_0x8cb9e7['message']:'Failed\x20to\x20move\x20file',0x0,_0x8cb9e7)};}}async['copy'](fromPath,_0x687613){function _0x5e6675(_0x23cf99,_0x518c78){return _0x9482(_0x23cf99- -0x398,_0x518c78);}try{const response=await this[_0x5e6675(-0x245,-0x208)]['post'](_0x5e6675(-0x29b,-0x282)+this[_0x5e6675(-0x2a5,-0x2dd)]+'/files/copy',{'sourceKey':fromPath,'destinationKey':_0x687613});return{'data':response[_0x5e6675(-0x306,-0x357)],'error':null};}catch(_0x1b324b){return{'data':null,'error':_0x1b324b instanceof EBaaSError?_0x1b324b:new EBaaSError(_0x1b324b instanceof Error?_0x1b324b[_0x5e6675(-0x2db,-0x2ab)]:'Failed\x20to\x20copy\x20file',0x0,_0x1b324b)};}}async['createSignedUrl'](_0x308aa0,_0x3263e1,_0x252ea6){function _0xaa0da9(_0x222f7d,_0x318965){return _0x9482(_0x318965-0x30c,_0x222f7d);}try{const response=await this[_0xaa0da9(0x4b9,0x45f)]['post']('/storage/buckets/'+this['bucketId']+'/files/'+_0x308aa0+'/sign',{'expiresIn':_0x3263e1,..._0x252ea6});return{'data':response[_0xaa0da9(0x35f,0x39e)],'error':null};}catch(_0x4e4ffc){return{'data':null,'error':_0x4e4ffc instanceof EBaaSError?_0x4e4ffc:new EBaaSError(_0x4e4ffc instanceof Error?_0x4e4ffc['message']:_0xaa0da9(0x340,0x3a2),0x0,_0x4e4ffc)};}}['getPublicUrl'](_0x46c7e8,_0x1d5abe){const _0x4d913e=new URLSearchParams();_0x1d5abe?.[_0xf6347f(0x3d1,0x431)]&&Object[_0xf6347f(0x3a5,0x3ad)](_0x1d5abe['transform'])['forEach'](([_0xbba327,_0x7b32d0])=>{_0x7b32d0!==undefined&&_0x4d913e['append'](_0xbba327,String(_0x7b32d0));});const _0x1ec499=this['httpClient'][_0xf6347f(0x3d5,0x3bd)]||'',_0xbfccc1=_0x1ec499+'/storage/buckets/'+this['bucketId']+'/files/'+_0x46c7e8+(_0x4d913e['toString']()?'?'+_0x4d913e['toString']():'');function _0xf6347f(_0x3d7e3a,_0xb10d8){return _0x9482(_0x3d7e3a-0x2ad,_0xb10d8);}return{'data':{'publicUrl':_0xbfccc1}};}async['getFileInfo'](_0x34dc5b){function _0x36654b(_0x2c7e0a,_0x59973d){return _0x9482(_0x2c7e0a-0x231,_0x59973d);}try{const response=await this['httpClient']['get'](_0x36654b(0x32e,0x2c2)+this['bucketId']+_0x36654b(0x387,0x34e)+_0x34dc5b+'/info');return{'data':response[_0x36654b(0x2c3,0x23d)],'error':null};}catch(_0x40b514){return{'data':null,'error':_0x40b514 instanceof EBaaSError?_0x40b514:new EBaaSError(_0x40b514 instanceof Error?_0x40b514['message']:_0x36654b(0x311,0x2ef),0x0,_0x40b514)};}}async[_0x154533(-0x11e,-0x168)](_0xcb49ee,metadata){function _0x325f12(_0x350700,_0x4aa6a3){return _0x9482(_0x4aa6a3-0x3d6,_0x350700);}try{const response=await this['httpClient'][_0x325f12(0x42a,0x470)]('/storage/buckets/'+this[_0x325f12(0x441,0x4c9)]+'/files/'+_0xcb49ee+_0x325f12(0x4e0,0x520),{'metadata':metadata});return{'data':response['data'],'error':null};}catch(_0x379f5d){return{'data':null,'error':_0x379f5d instanceof EBaaSError?_0x379f5d:new EBaaSError(_0x379f5d instanceof Error?_0x379f5d['message']:_0x325f12(0x504,0x52a),0x0,_0x379f5d)};}}}class StorageClient{constructor(_0x1285fd){this['httpClient']=_0x1285fd;}['from'](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async[_0x154533(-0x17c,-0xf8)](_0x2bb3d8,_0x52ff52){function _0x457857(_0x4ca4ba,_0x59dfdf){return _0x9482(_0x4ca4ba-0x2a,_0x59dfdf);}try{const response=await this[_0x457857(0x17d,0x13e)][_0x457857(0x137,0xe7)]('/storage/buckets',{'id':_0x2bb3d8,..._0x52ff52});return{'data':response[_0x457857(0xbc,0x87)],'error':null};}catch(_0x41a8c5){return{'data':null,'error':_0x41a8c5 instanceof EBaaSError?_0x41a8c5:new EBaaSError(_0x41a8c5 instanceof Error?_0x41a8c5['message']:_0x457857(0x16f,0x1c4),0x0,_0x41a8c5)};}}async['getBucket'](_0x21a468){function _0x54195f(_0x56f179,_0x213941){return _0x9482(_0x213941- -0x52,_0x56f179);}try{const response=await this[_0x54195f(0xaf,0x101)]['get'](_0x54195f(0x64,0xab)+_0x21a468);return{'data':response[_0x54195f(0x34,0x40)],'error':null};}catch(_0x3f79f4){return{'data':null,'error':_0x3f79f4 instanceof EBaaSError?_0x3f79f4:new EBaaSError(_0x3f79f4 instanceof Error?_0x3f79f4[_0x54195f(0xe1,0x6b)]:'Failed\x20to\x20get\x20bucket',0x0,_0x3f79f4)};}}async['listBuckets'](){function _0x30578e(_0x3ce058,_0x44708d){return _0x9482(_0x44708d-0x39c,_0x3ce058);}try{const response=await this['httpClient'][_0x30578e(0x46d,0x4ea)](_0x30578e(0x551,0x4d5));return{'data':response['data'],'error':null};}catch(_0x1a98b7){return{'data':null,'error':_0x1a98b7 instanceof EBaaSError?_0x1a98b7:new EBaaSError(_0x1a98b7 instanceof Error?_0x1a98b7['message']:_0x30578e(0x475,0x466),0x0,_0x1a98b7)};}}async[_0x154533(-0x13c,-0x114)](_0x126a87,_0x53db05){function _0x2f2c7a(_0x2996e2,_0x59ea3a){return _0x9482(_0x2996e2- -0x360,_0x59ea3a);}try{const response=await this['httpClient']['put'](_0x2f2c7a(-0x263,-0x238)+_0x126a87,_0x53db05);return{'data':response[_0x2f2c7a(-0x2ce,-0x33a)],'error':null};}catch(_0x2178a0){return{'data':null,'error':_0x2178a0 instanceof EBaaSError?_0x2178a0:new EBaaSError(_0x2178a0 instanceof Error?_0x2178a0[_0x2f2c7a(-0x2a3,-0x235)]:_0x2f2c7a(-0x267,-0x22d),0x0,_0x2178a0)};}}async['deleteBucket'](_0x56752d){function _0x41f994(_0x677021,_0x2521f8){return _0x9482(_0x2521f8-0x89,_0x677021);}try{const response=await this['httpClient']['delete'](_0x41f994(0x15c,0x186)+_0x56752d);return{'data':response[_0x41f994(0x192,0x11b)],'error':null};}catch(_0x2e2240){return{'data':null,'error':_0x2e2240 instanceof EBaaSError?_0x2e2240:new EBaaSError(_0x2e2240 instanceof Error?_0x2e2240['message']:'Failed\x20to\x20delete\x20bucket',0x0,_0x2e2240)};}}async[_0x154533(-0x11f,-0x120)](){function _0x2febc5(_0x31678e,_0x95c19d){return _0x9482(_0x31678e- -0x125,_0x95c19d);}try{const response=await this[_0x2febc5(0x2e,0xa1)]['get']('/storage/usage');return{'data':response[_0x2febc5(-0x93,-0xea)],'error':null};}catch(_0x437a03){return{'data':null,'error':_0x437a03 instanceof EBaaSError?_0x437a03:new EBaaSError(_0x437a03 instanceof Error?_0x437a03[_0x2febc5(-0x68,-0x31)]:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x437a03)};}}}class EventManager{constructor(){this['events']=new Map();function _0x2c3f78(_0x3d2dbf,_0x422f0d){return _0x9482(_0x3d2dbf- -0x3c7,_0x422f0d);}this[_0x2c3f78(-0x330,-0x328)]=0xa;}['on'](_0x409865,_0x2d4d85){!this['events'][_0x244bda(-0x1b3,-0x202)](_0x409865)&&this['events']['set'](_0x409865,new Set());function _0x244bda(_0x118657,_0x555358){return _0x9482(_0x555358- -0x286,_0x118657);}this[_0x244bda(-0x21b,-0x1f6)][_0x244bda(-0x191,-0x138)](_0x409865)[_0x244bda(-0x17e,-0x116)](_0x2d4d85);}['off'](_0xa6ae4,_0x309528){if(!this[_0x122a5a(0x12d,0x13c)]['has'](_0xa6ae4))return;const _0x258b03=this['events'][_0x122a5a(0x238,0x1fa)](_0xa6ae4);_0x309528?_0x258b03['delete'](_0x309528):_0x258b03[_0x122a5a(0x1ee,0x180)]();function _0x122a5a(_0x348cd5,_0x82dffb){return _0x9482(_0x82dffb-0xac,_0x348cd5);}_0x258b03['size']===0x0&&this[_0x122a5a(0x11d,0x13c)]['delete'](_0xa6ae4);}[_0x154533(-0x1c8,-0x252)](_0x3d5337,..._0x37851a){function _0xe31007(_0x4a066c,_0x37d574){return _0x9482(_0x4a066c- -0x1cb,_0x37d574);}if(!this['events'][_0xe31007(-0x147,-0x19b)](_0x3d5337))return![];const _0x5c9e0b=this['events'][_0xe31007(-0x7d,-0x42)](_0x3d5337);for(const _0x97e3e2 of _0x5c9e0b){try{_0x97e3e2(..._0x37851a);}catch(_0xa17def){console[_0xe31007(-0x120,-0x98)]('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x3d5337+'\x22:',_0xa17def);}}return _0x5c9e0b['size']>0x0;}['removeAllListeners'](_0x4fa69e){function _0x3e0536(_0x493c44,_0x3b5b25){return _0x9482(_0x3b5b25-0x3b1,_0x493c44);}_0x4fa69e?this[_0x3e0536(0x3d3,0x441)]['delete'](_0x4fa69e):this[_0x3e0536(0x3dc,0x441)]['clear']();}[_0x154533(-0x181,-0x186)](_0x43ef38){function _0xcd20d0(_0x4b1895,_0x445f1b){return _0x9482(_0x4b1895- -0x34b,_0x445f1b);}return this['events']['get'](_0x43ef38)?.[_0xcd20d0(-0x231,-0x289)]??0x0;}['eventNames'](){function _0x10b9fb(_0x4a3aa9,_0x3372a5){return _0x9482(_0x4a3aa9-0x12d,_0x3372a5);}return Array['from'](this[_0x10b9fb(0x1bd,0x18b)]['keys']());}[_0x154533(-0x1a9,-0x201)](_0x4a2f81){function _0x2d2425(_0xa45157,_0x5781c0){return _0x9482(_0x5781c0-0x232,_0xa45157);}return Array[_0x2d2425(0x34b,0x313)](this[_0x2d2425(0x280,0x2c2)][_0x2d2425(0x3e1,0x380)](_0x4a2f81)??[]);}['addListener'](_0x507921,_0xf96bd2){this['on'](_0x507921,_0xf96bd2);}['removeListener'](_0x5929cf,_0x339052){this['off'](_0x5929cf,_0x339052);}[_0x154533(-0x14b,-0xcf)](_0x14e932,_0x4aff26){const _0x68ee56=(..._0x1b90bc)=>{this[_0x1ceab4(0x1c5,0x210)](_0x14e932,_0x68ee56);function _0x1ceab4(_0x5a8056,_0x2493e9){return _0x9482(_0x2493e9-0xd6,_0x5a8056);}_0x4aff26(..._0x1b90bc);};this['on'](_0x14e932,_0x68ee56);}['prependListener'](_0x2037ca,_0x49df7d){this['on'](_0x2037ca,_0x49df7d);}['prependOnceListener'](_0x23b5b4,_0xb01fce){const _0x542dbc=(..._0x2c6500)=>{this[_0x1187f8(0x150,0x1c7)](_0x23b5b4,_0x542dbc);function _0x1187f8(_0x4cdd2c,_0x504414){return _0x9482(_0x4cdd2c-0x16,_0x504414);}_0xb01fce(..._0x2c6500);};this['on'](_0x23b5b4,_0x542dbc);}[_0x154533(-0x14a,-0x149)](_0x481b51){this[_0x410861(0x26b,0x284)]=_0x481b51;function _0x410861(_0x1caa16,_0x571af7){return _0x9482(_0x571af7-0x1ed,_0x1caa16);}return this;}['getMaxListeners'](){return this['maxListeners'];}['rawListeners'](_0x59fb2a){return this['listeners'](_0x59fb2a);}}class RealtimeChannel extends EventManager{constructor(_0x472f5e,_0x368695){function _0x22e38e(_0x11b1ae,_0x3f0dc4){return _0x9482(_0x3f0dc4-0x188,_0x11b1ae);}super(),this['joinedOnce']=![],this['state']='closed',this[_0x22e38e(0x290,0x261)]=new Map(),this[_0x22e38e(0x289,0x22b)]=_0x472f5e,this['socket']=_0x368695;}[_0x154533(-0x145,-0x194)](_0x10a04e){!this['joinedOnce']&&(this[_0x5e8451(-0x19b,-0x13a)]=!![],this['_join']());function _0x5e8451(_0x3ece76,_0xaf5624){return _0x9482(_0x3ece76- -0x2d9,_0xaf5624);}return _0x10a04e&&this['on'](_0x5e8451(-0x1ae,-0x215),_0x10a04e),this;}[_0x154533(-0x1c2,-0x1ac)](filter,_0x358bf3){const _0xed5af4='postgres_changes:'+JSON['stringify'](filter);this['on'](_0xed5af4,_0x358bf3);function _0x186791(_0xbdde54,_0x5d1027){return _0x9482(_0xbdde54-0x251,_0x5d1027);}const _0xb9837b={'unsubscribe':()=>{this['off'](_0xed5af4,_0x358bf3),this['subscriptions']['delete'](_0xed5af4);}};return this[_0x186791(0x32a,0x35c)][_0x186791(0x301,0x360)](_0xed5af4,_0xb9837b),this[_0x186791(0x3bc,0x3fe)]?.[_0x186791(0x373,0x316)]&&this['state']==='joined'&&this['socket'][_0x186791(0x338,0x321)]('subscribe_postgres_changes',{'topic':this['topic'],'filter':filter,'ref':this[_0x186791(0x353,0x2f6)]()}),_0xb9837b;}[_0x154533(-0x168,-0xe7)](filter,_0x7bc840){function _0x41024d(_0x34d2a0,_0x9d3161){return _0x9482(_0x9d3161- -0x150,_0x34d2a0);}const _0x96f390='broadcast:'+JSON['stringify'](filter);this['on'](_0x96f390,_0x7bc840);const _0x476a6e={'unsubscribe':()=>{this[_0x127806(-0x287,-0x231)](_0x96f390,_0x7bc840);function _0x127806(_0x6abbe0,_0x4ebf51){return _0x9482(_0x4ebf51- -0x36b,_0x6abbe0);}this[_0x127806(-0x21f,-0x292)]['delete'](_0x96f390);}};return this[_0x41024d(-0x43,-0x77)][_0x41024d(-0x62,-0xa0)](_0x96f390,_0x476a6e),_0x476a6e;}['onPresence'](filter,_0x58f77b){const _0xc74dc4=_0x2250b0(0x1d8,0x18e)+JSON[_0x2250b0(0x26a,0x2d9)](filter);this['on'](_0xc74dc4,_0x58f77b);const _0x4f2e08={'unsubscribe':()=>{this[_0x21ec53(0x1fe,0x25d)](_0xc74dc4,_0x58f77b);function _0x21ec53(_0x41d44b,_0x5105e3){return _0x9482(_0x41d44b-0xc4,_0x5105e3);}this['subscriptions']['delete'](_0xc74dc4);}};function _0x2250b0(_0x43bf27,_0x2e9f98){return _0x9482(_0x43bf27-0x155,_0x2e9f98);}return this['subscriptions'][_0x2250b0(0x205,0x1c1)](_0xc74dc4,_0x4f2e08),_0x4f2e08;}[_0x154533(-0x199,-0x1ed)](_0x39c2ff){return new Promise(_0x12c6c0=>{function _0xc9f533(_0x53d1df,_0x35aaf1){return _0x9482(_0x53d1df- -0x55,_0x35aaf1);}this['socket']?.[_0xc9f533(0xcd,0x63)]&&this['state']==='joined'?(this['socket']['emit']('broadcast',{'topic':this['topic'],'event':_0x39c2ff[_0xc9f533(0x12d,0xc0)],'payload':_0x39c2ff,'ref':this[_0xc9f533(0xad,0xb8)]()}),_0x12c6c0('ok')):_0x12c6c0('error');});}['track'](_0xfef1e0){return new Promise(_0x11fe68=>{function _0x5393cf(_0x3b49a9,_0xda6010){return _0x9482(_0x3b49a9-0x15b,_0xda6010);}this[_0x5393cf(0x2c6,0x326)]?.['connected']&&this['state']==='joined'?(this['socket'][_0x5393cf(0x242,0x28a)]('presence',{'topic':this['topic'],'event':_0x5393cf(0x209,0x26a),'payload':_0xfef1e0,'ref':this[_0x5393cf(0x25d,0x2ac)]()}),_0x11fe68('ok')):_0x11fe68('error');});}[_0x154533(-0x1a4,-0x193)](){return new Promise(_0x44368d=>{function _0x538c46(_0x30d219,_0x192021){return _0x9482(_0x192021- -0x359,_0x30d219);}this['socket']?.['connected']&&this[_0x538c46(-0x2cf,-0x2b0)]==='joined'?(this['socket'][_0x538c46(-0x2b1,-0x272)](_0x538c46(-0x16f,-0x1d1),{'topic':this[_0x538c46(-0x317,-0x2b6)],'event':'untrack','ref':this['makeRef']()}),_0x44368d('ok')):_0x44368d(_0x538c46(-0x30f,-0x2ae));});}['unsubscribe'](){return new Promise(_0xc1d4d4=>{this['state']='leaving';function _0x2c9062(_0x2f9223,_0x18bf8e){return _0x9482(_0x2f9223-0x85,_0x18bf8e);}this[_0x2c9062(0x15e,0xd4)][_0x2c9062(0x10e,0x127)](_0x32bd3f=>{_0x32bd3f['unsubscribe']();}),this[_0x2c9062(0x15e,0x122)][_0x2c9062(0x159,0x1c2)](),this[_0x2c9062(0x1f0,0x1ef)]?.[_0x2c9062(0x1a7,0x183)]&&this[_0x2c9062(0x1f0,0x1f8)][_0x2c9062(0x16c,0x1b2)]('leave',{'topic':this[_0x2c9062(0x128,0x17c)],'ref':this['makeRef']()}),this[_0x2c9062(0x12e,0xbe)]='closed',this[_0x2c9062(0x1c4,0x15f)](),_0xc1d4d4('ok');});}[_0x154533(-0x1f1,-0x169)](){function _0x4901f3(_0x1d54c7,_0x2298cf){return _0x9482(_0x2298cf- -0x1e9,_0x1d54c7);}if(this[_0x4901f3(-0x180,-0x140)]===_0x4901f3(-0x182,-0x15f))return;this[_0x4901f3(-0x109,-0x140)]=_0x4901f3(-0x129,-0xed),this['socket']?.[_0x4901f3(-0x136,-0xc7)]&&(this['socket']['emit'](_0x4901f3(-0x7a,-0x78),{'topic':this['topic'],'ref':this['makeRef']()}),setTimeout(()=>{function _0x221e76(_0x301aba,_0x8b6c30){return _0x9482(_0x8b6c30-0xd3,_0x301aba);}this[_0x221e76(0x136,0x17c)]===_0x221e76(0x239,0x1cf)&&(this[_0x221e76(0x14e,0x17c)]='joined',this[_0x221e76(0x212,0x1ba)](_0x221e76(0x244,0x1fe),'SUBSCRIBED'));},0x64));}['_rejoin'](){function _0x3c8aa8(_0x85b09e,_0xcb16a8){return _0x9482(_0xcb16a8- -0x223,_0x85b09e);}this[_0x3c8aa8(-0x5f,-0xe5)]&&(this[_0x3c8aa8(-0x167,-0x165)](),this[_0x3c8aa8(-0x1c0,-0x14a)]['forEach']((_0x9e99f0,_0x39605c)=>{function _0x112338(_0x72ae1e,_0x466e75){return _0x9482(_0x72ae1e-0xab,_0x466e75);}if(_0x39605c[_0x112338(0x12a,0x136)](_0x112338(0x17e,0x157))){const filter=JSON[_0x112338(0x1dd,0x190)](_0x39605c[_0x112338(0x143,0x173)]('postgres_changes:',''));this['socket']?.['emit'](_0x112338(0x17c,0x1e3),{'topic':this[_0x112338(0x14e,0xcd)],'filter':filter,'ref':this[_0x112338(0x1ad,0x1be)]()});}}));}[_0x154533(-0x19d,-0x1d7)](_0x1b3b7b,_0xf143ed){if(_0x1b3b7b===_0x21028c(-0x2a4,-0x2d6)){const _0x2efb48='postgres_changes:'+JSON['stringify'](_0xf143ed[_0x21028c(-0x26a,-0x294)]||{});this['emit'](_0x2efb48,_0xf143ed);}else{if(_0x1b3b7b==='broadcast'){const _0xf463a9='broadcast:'+JSON[_0x21028c(-0x27f,-0x22d)]({'event':_0xf143ed['event']});this[_0x21028c(-0x2ad,-0x294)](_0xf463a9,_0xf143ed);}else{if(_0x1b3b7b===_0x21028c(-0x20c,-0x20d)){const _0x4c04a8=_0x21028c(-0x311,-0x395)+JSON['stringify']({'event':_0xf143ed[_0x21028c(-0x212,-0x1dc)]});this[_0x21028c(-0x2ad,-0x28b)](_0x4c04a8,_0xf143ed);}}}function _0x21028c(_0x3c0054,_0x3d7485){return _0x9482(_0x3c0054- -0x394,_0x3d7485);}this[_0x21028c(-0x2ad,-0x25a)](_0x1b3b7b,_0xf143ed);}['_setState'](_0x183894){this['state']=_0x183894;function _0x3b5705(_0x5934e8,_0x34ab67){return _0x9482(_0x34ab67-0x11f,_0x5934e8);}let status;switch(_0x183894){case _0x3b5705(0x2cf,0x297):status=_0x3b5705(0x287,0x260);break;case _0x3b5705(0x231,0x1c5):status='CHANNEL_ERROR';break;case'closed':status=_0x3b5705(0x271,0x244);break;default:return;}this['emit'](_0x3b5705(0x2a8,0x24a),status);}['makeRef'](){function _0x20497e(_0x2ee75b,_0x1edaca){return _0x9482(_0x2ee75b- -0x125,_0x1edaca);}return Math['random']()[_0x20497e(-0x12,-0x8a)](0x24)[_0x20497e(0x68,0xd5)](0x2,0xf);}[_0x154533(-0x190,-0x144)](){return this['state'];}}function _0x154533(_0x31e462,_0x1c3a46){return _0x9482(_0x31e462- -0x2af,_0x1c3a46);}function getEnvironment(){function _0x119972(_0x385699,_0xb4c648){return _0x9482(_0x385699-0xd2,_0xb4c648);}if(typeof navigator!==_0x119972(0x18b,0x1f3)&&navigator[_0x119972(0x15a,0x12c)]===_0x119972(0x25c,0x297))return'react-native';if(typeof window!=='undefined'&&typeof document!==_0x119972(0x18b,0x1cd))return'browser';if(typeof global!=='undefined'&&typeof process!=='undefined'&&process['versions']?.[_0x119972(0x22b,0x29a)])return _0x119972(0x22b,0x1e8);return'browser';}function _0x9482(_0x218d84,_0x4c87d9){const _0x5a3def=_0x5a3d();return _0x9482=function(_0x948259,_0x454cbd){_0x948259=_0x948259-0x7e;let _0x305e91=_0x5a3def[_0x948259];if(_0x9482['kaOWhp']===undefined){var _0x256c7c=function(_0x5d116f){const _0x5e677a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c2db5='',_0x23f064='';for(let _0x9b57f1=0x0,_0x2d4003,_0x170489,_0x557a0a=0x0;_0x170489=_0x5d116f['charAt'](_0x557a0a++);~_0x170489&&(_0x2d4003=_0x9b57f1%0x4?_0x2d4003*0x40+_0x170489:_0x170489,_0x9b57f1++%0x4)?_0x4c2db5+=String['fromCharCode'](0xff&_0x2d4003>>(-0x2*_0x9b57f1&0x6)):0x0){_0x170489=_0x5e677a['indexOf'](_0x170489);}for(let _0x4dfd6a=0x0,_0xed1e7f=_0x4c2db5['length'];_0x4dfd6a<_0xed1e7f;_0x4dfd6a++){_0x23f064+='%'+('00'+_0x4c2db5['charCodeAt'](_0x4dfd6a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x23f064);};_0x9482['rowTsp']=_0x256c7c,_0x218d84=arguments,_0x9482['kaOWhp']=!![];}const _0x3f040e=_0x5a3def[0x0],_0x551c99=_0x948259+_0x3f040e,_0x453804=_0x218d84[_0x551c99];return!_0x453804?(_0x305e91=_0x9482['rowTsp'](_0x305e91),_0x218d84[_0x551c99]=_0x305e91):_0x305e91=_0x453804,_0x305e91;},_0x9482(_0x218d84,_0x4c87d9);}function isSocketIOAvailable(){function _0x25b9e3(_0xa738d9,_0x5ee4bb){return _0x9482(_0xa738d9-0x1d9,_0x5ee4bb);}try{const _0x3c1f18=getEnvironment();switch(_0x3c1f18){case _0x25b9e3(0x332,0x39f):return typeof require!=='undefined'&&require['resolve']&&!!require[_0x25b9e3(0x293,0x262)](_0x25b9e3(0x28a,0x214));case _0x25b9e3(0x2ae,0x271):if(typeof globalThis!=='undefined'&&'io'in globalThis)return!![];return typeof require!==_0x25b9e3(0x292,0x2a7)&&require['resolve']&&!!require['resolve']('socket.io-client');case'react-native':try{return typeof require!==_0x25b9e3(0x292,0x222)&&!!require(_0x25b9e3(0x28a,0x266));}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0xeb04e2(_0x59bf02,_0x15095f){return _0x9482(_0x15095f-0x183,_0x59bf02);}try{if(typeof require!==_0xeb04e2(0x298,0x23c))return require(_0xeb04e2(0x1d4,0x234));if(typeof globalThis!=='undefined'&&'io'in globalThis)return{'io':globalThis['io']};throw new Error('socket.io-client\x20not\x20available');}catch(_0x3245be){throw new Error(_0xeb04e2(0x24e,0x2a6));}}class WebSocketAdapter{constructor(){function _0x5395fb(_0x555de3,_0x35b198){return _0x9482(_0x35b198-0xe5,_0x555de3);}this[_0x5395fb(0x2d9,0x250)]=null;}async['connect'](_0x157410,_0x5c3261){if(!isSocketIOAvailable())throw new Error('Socket.io-client não está disponível. Para usar funcionalidades de realtime, instale: npm install socket.io-client');const {io:_0x2dfa11}=getSocketIO();return new Promise((_0x593f71,_0x4cea5e)=>{this[_0x4ad1ee(-0x21f,-0x222)]=_0x2dfa11(_0x157410,_0x5c3261);function _0x4ad1ee(_0x2647a0,_0xf41ddf){return _0x9482(_0xf41ddf- -0x38d,_0x2647a0);}this[_0x4ad1ee(-0x254,-0x222)]['on']('connect',()=>_0x593f71()),this[_0x4ad1ee(-0x1f9,-0x222)]['on']('connect_error',_0x376dcf=>_0x4cea5e(_0x376dcf));});}['disconnect'](){this['socket']&&(this['socket']['disconnect'](),this['socket']=null);}[_0x154533(-0x1c8,-0x198)](_0x24c180,data){this['socket']?.['emit'](_0x24c180,data);}['on'](_0x3ee64f,_0x3774d1){function _0x37de99(_0x1838f0,_0x2abd96){return _0x9482(_0x1838f0-0x7d,_0x2abd96);}this[_0x37de99(0x1e8,0x21e)]?.['on'](_0x3ee64f,_0x3774d1);}['off'](_0x51984f,_0x45c85d){function _0x17b745(_0x193865,_0x4a18de){return _0x9482(_0x193865-0x2e4,_0x4a18de);}_0x45c85d?this[_0x17b745(0x44f,0x472)]?.['off'](_0x51984f,_0x45c85d):this[_0x17b745(0x44f,0x3c9)]?.['off'](_0x51984f);}get[_0x154533(-0x18d,-0x198)](){function _0x1e2a41(_0x5d385f,_0x47e04f){return _0x9482(_0x5d385f- -0x39f,_0x47e04f);}return this[_0x1e2a41(-0x234,-0x1af)]?.['connected']??![];}}class ReactNativeSocketAdapter{constructor(){function _0xd27320(_0x3202bd,_0x4b0ca9){return _0x9482(_0x3202bd- -0x19f,_0x4b0ca9);}this[_0xd27320(-0x34,-0x69)]=null;}async[_0x154533(-0x151,-0x119)](_0x2abf4e,_0x465408){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x1c1eb5}=getSocketIO();return new Promise((_0x2915c6,_0x1cbdae)=>{function _0x847b1f(_0x4474cc,_0x529593){return _0x9482(_0x4474cc- -0x3da,_0x529593);}this['socket']=_0x1c1eb5(_0x2abf4e,{..._0x465408,'transports':[_0x847b1f(-0x274,-0x276)],'upgrade':![],'autoConnect':!![]}),this['socket']['on'](_0x847b1f(-0x27c,-0x250),()=>_0x2915c6()),this['socket']['on'](_0x847b1f(-0x2d1,-0x24c),_0x309bb6=>_0x1cbdae(_0x309bb6));});}[_0x154533(-0x121,-0x19c)](){function _0xb6ff50(_0x1513cd,_0x50ae96){return _0x9482(_0x1513cd- -0x69,_0x50ae96);}this['socket']&&(this[_0xb6ff50(0x102,0x106)]['disconnect'](),this['socket']=null);}[_0x154533(-0x1c8,-0x193)](_0x2224c3,data){function _0x5e18ee(_0x3dd339,_0x5eb548){return _0x9482(_0x3dd339- -0x3df,_0x5eb548);}this[_0x5e18ee(-0x274,-0x2a9)]?.[_0x5e18ee(-0x2f8,-0x2df)](_0x2224c3,data);}['on'](_0x411089,_0x3dc73a){function _0x38ae34(_0x26977f,_0x3aa016){return _0x9482(_0x3aa016-0xeb,_0x26977f);}this[_0x38ae34(0x2c7,0x256)]?.['on'](_0x411089,_0x3dc73a);}['off'](_0x109fdd,_0x7b580e){function _0x10bc7e(_0x412dbe,_0x49786f){return _0x9482(_0x412dbe- -0x20a,_0x49786f);}_0x7b580e?this[_0x10bc7e(-0x9f,-0x3e)]?.[_0x10bc7e(-0xd0,-0x5e)](_0x109fdd,_0x7b580e):this['socket']?.['off'](_0x109fdd);}get['connected'](){function _0x1308cc(_0x1c0df2,_0x20cce8){return _0x9482(_0x1c0df2-0x1bc,_0x20cce8);}return this[_0x1308cc(0x327,0x387)]?.['connected']??![];}}function createSocketAdapter(){const _0x39b07f=getEnvironment();function _0x5baa51(_0x3ac71d,_0x37eb0e){return _0x9482(_0x3ac71d-0x3bd,_0x37eb0e);}switch(_0x39b07f){case _0x5baa51(0x458,0x481):return new ReactNativeSocketAdapter();case'browser':case _0x5baa51(0x516,0x51a):default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x23b15d,_0x3884fa,_0x4b4485={}){this[_0x5e5179(0x4e4,0x4c3)]=null,this['channels']=new Map(),this['connectionState']='disconnected';function _0x5e5179(_0x102fa8,_0x87d172){return _0x9482(_0x87d172-0x358,_0x102fa8);}this[_0x5e5179(0x39b,0x3d6)]=0x0,this['maxReconnectAttempts']=0x5,this['url']=_0x23b15d,this[_0x5e5179(0x474,0x4bf)]=_0x3884fa,this[_0x5e5179(0x402,0x441)]={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x4b4485},this['socketAdapter']=createSocketAdapter();}[_0x154533(-0x151,-0x13a)](){return new Promise(async(_0x25c8dd,_0x5eda67)=>{if(this[_0x1ff368(0x48a,0x4cb)]['connected']){_0x25c8dd();return;}this[_0x1ff368(0x4f9,0x49f)]='connecting';function _0x1ff368(_0x55c408,_0x3b7d9b){return _0x9482(_0x3b7d9b-0x356,_0x55c408);}try{await this[_0x1ff368(0x522,0x4cb)]['connect'](this[_0x1ff368(0x49e,0x4c2)],{'auth':{'apikey':this['apiKey']},'transports':[_0x1ff368(0x490,0x4bc)],'reconnection':!![],'reconnectionDelay':this['options']['reconnectInterval'],'reconnectionAttempts':this[_0x1ff368(0x3fd,0x43f)]['maxReconnectAttempts'],...this[_0x1ff368(0x425,0x43f)][_0x1ff368(0x468,0x4cf)]}),this['socket']=this[_0x1ff368(0x498,0x4cb)][_0x1ff368(0x510,0x4c1)],this[_0x1ff368(0x4cf,0x4cb)]['on'](_0x1ff368(0x511,0x4b4),()=>{this[_0x154446(0x14c,0x15c)]=_0x154446(0xbb,0x135),this[_0x154446(0xe6,0x91)]=0x0,this[_0x154446(0x6e,0x95)]();function _0x154446(_0x3ba32e,_0x45f467){return _0x9482(_0x45f467-0x13,_0x3ba32e);}_0x25c8dd();}),this[_0x1ff368(0x46b,0x4cb)]['on']('disconnect',()=>{this['connectionState']='disconnected';function _0x104b21(_0x22f3fd,_0x5a38ea){return _0x9482(_0x22f3fd-0x2db,_0x5a38ea);}this['channels'][_0x104b21(0x364,0x357)](channel=>{function _0x59f6ba(_0x5dde73,_0x1f84ec){return _0x9482(_0x5dde73-0x326,_0x1f84ec);}channel[_0x59f6ba(0x3c6,0x3cc)](_0x59f6ba(0x4a2,0x436));});}),this['socketAdapter']['on']('connect_error',_0xd4c80f=>{function _0x174fef(_0x47a98a,_0x5b0cbb){return _0x9482(_0x5b0cbb- -0x9d,_0x47a98a);}this['connectionState']=_0x174fef(0x23,0xe),this['reconnectAttempts']++,this['reconnectAttempts']>=this[_0x174fef(-0x5,0x7)]&&_0x5eda67(new Error(_0x174fef(0xaf,0x26)+this[_0x174fef(0x13,0x7)]+_0x174fef(0x12,0x2b)+_0xd4c80f['message']));}),this['socketAdapter']['on']('reconnect',()=>{this['connectionState']='connected',this[_0x4e66ba(-0x26d,-0x28a)]=0x0;function _0x4e66ba(_0x319ca0,_0xb86a7a){return _0x9482(_0x319ca0- -0x2eb,_0xb86a7a);}this['channels'][_0x4e66ba(-0x262,-0x1f1)](channel=>{channel['_rejoin']();});}),this[_0x1ff368(0x4b1,0x4cb)]['on'](_0x1ff368(0x414,0x446),_0x3c54e2=>{const channel=this[_0x5bd64c(0x6f,0x63)]['get'](_0x3c54e2['topic']);function _0x5bd64c(_0x5467fd,_0x35a1b7){return _0x9482(_0x35a1b7- -0x55,_0x5467fd);}channel&&channel[_0x5bd64c(0x12e,0xbd)](_0x5bd64c(0x7f,0x9b),_0x3c54e2);}),this[_0x1ff368(0x495,0x4cb)]['on']('broadcast',_0x4a6896=>{const channel=this['channels']['get'](_0x4a6896[_0x337750(-0x13a,-0x141)]);function _0x337750(_0x5d06fb,_0xb8f9f6){return _0x9482(_0xb8f9f6- -0x1e4,_0x5d06fb);}channel&&channel['_trigger']('broadcast',_0x4a6896);}),this['socketAdapter']['on']('presence',_0x83791d=>{const channel=this[_0x16e058(-0x2de,-0x298)]['get'](_0x83791d['topic']);function _0x16e058(_0x1a516e,_0x41e3f7){return _0x9482(_0x41e3f7- -0x350,_0x1a516e);}channel&&channel['_trigger'](_0x16e058(-0x152,-0x1c8),_0x83791d);});}catch(_0x5e6f0b){this['connectionState']='error',_0x5eda67(_0x5e6f0b);}});}['disconnect'](){this[_0x231741(0x167,0x195)]&&(this[_0x231741(0x167,0x102)]['disconnect'](),this[_0x231741(0x15d,0x1be)]=null);this['connectionState']='disconnected';function _0x231741(_0x4260da,_0x5c4d75){return _0x9482(_0x4260da- -0xe,_0x5c4d75);}this['channels']['clear']();}[_0x154533(-0x212,-0x276)](_0x303949){if(this['channels'][_0x1af592(0x1c8,0x214)](_0x303949))return this[_0x1af592(0x1fc,0x1f8)]['get'](_0x303949);const channel=new RealtimeChannel(_0x303949,this['socket']);this['channels']['set'](_0x303949,channel);function _0x1af592(_0x1af676,_0x533a41){return _0x9482(_0x1af676-0x144,_0x533a41);}return this[_0x1af592(0x28d,0x2c1)]===_0x1af592(0x266,0x2a5)&&channel[_0x1af592(0x202,0x1d9)](),channel;}['removeChannel'](channel){function _0x47c2a1(_0x3a684e,_0x2c842a){return _0x9482(_0x2c842a- -0x2c5,_0x3a684e);}const _0x3b266d=channel[_0x47c2a1(-0x19f,-0x222)];this['channels'][_0x47c2a1(-0x296,-0x241)](_0x3b266d)&&(this['channels']['delete'](_0x3b266d),channel['unsubscribe']());}[_0x154533(-0x1b1,-0x192)](){function _0x308a4b(_0x24e5f5,_0x47f0bf){return _0x9482(_0x24e5f5-0x9c,_0x47f0bf);}this['channels'][_0x308a4b(0x125,0x148)](channel=>{channel['unsubscribe']();}),this[_0x308a4b(0x154,0x13e)][_0x308a4b(0x170,0x199)]();}['getChannels'](){function _0xb3b362(_0x587a3e,_0x3ff5d4){return _0x9482(_0x3ff5d4-0x346,_0x587a3e);}return Array[_0xb3b362(0x480,0x427)](this['channels'][_0xb3b362(0x43a,0x4c3)]());}[_0x154533(-0x124,-0x197)](){function _0x11c00d(_0x55939c,_0x5adaf4){return _0x9482(_0x5adaf4-0x46,_0x55939c);}return this[_0x11c00d(0x198,0x18f)]==='connected'&&this[_0x11c00d(0x1bd,0x1bb)]['connected'];}['getConnectionState'](){return this['connectionState'];}['onConnectionStateChange'](_0xa17dc5){const _0xd8f9d8=()=>_0xa17dc5(this[_0x580191(0x278,0x223)]);this[_0x580191(0x2a4,0x266)]&&(this['socketAdapter']['on'](_0x580191(0x28d,0x289),()=>{this['connectionState']=_0x12bb22(0x48d,0x46f);function _0x12bb22(_0xf42695,_0x107574){return _0x9482(_0xf42695-0x36b,_0x107574);}_0xd8f9d8();}),this[_0x580191(0x2a4,0x243)]['on'](_0x580191(0x2bd,0x28b),()=>{this[_0x537a65(0x4d5,0x4bf)]=_0x537a65(0x4ec,0x46c);function _0x537a65(_0x3bcbd2,_0x309142){return _0x9482(_0x3bcbd2-0x38c,_0x309142);}_0xd8f9d8();}),this[_0x580191(0x2a4,0x2e6)]['on']('connect_error',()=>{function _0x2417f1(_0x15551f,_0x4f0430){return _0x9482(_0x15551f- -0x242,_0x4f0430);}this[_0x2417f1(-0xf9,-0x126)]=_0x2417f1(-0x197,-0x112),_0xd8f9d8();}));function _0x580191(_0x49ee77,_0x580e85){return _0x9482(_0x49ee77-0x12f,_0x580e85);}return()=>{function _0x4c6002(_0x233353,_0x27da2c){return _0x9482(_0x27da2c-0xc3,_0x233353);}this['socketAdapter']&&(this['socketAdapter']['off'](_0x4c6002(0x244,0x221),_0xd8f9d8),this['socketAdapter']['off']('disconnect',_0xd8f9d8),this['socketAdapter']['off']('connect_error',_0xd8f9d8));};}[_0x154533(-0x22d,-0x1a8)](){if(!this['options']['heartbeatInterval']||!this[_0x1e5566(0x14c,0xc5)])return;function _0x1e5566(_0x524eaa,_0x32e7d1){return _0x9482(_0x524eaa- -0x29,_0x32e7d1);}const interval=setInterval(()=>{function _0x36e28a(_0x3c00b1,_0xdc1f09){return _0x9482(_0x3c00b1- -0x3d,_0xdc1f09);}this[_0x36e28a(0x138,0x19d)]?.['connected']?this[_0x36e28a(0x138,0x195)][_0x36e28a(0xaa,0x99)]('heartbeat',{'timestamp':Date['now']()}):clearInterval(interval);},this[_0x1e5566(0xc0,0x105)]['heartbeatInterval']);}['_getSocket'](){function _0x21363b(_0x545f0c,_0x29b8fe){return _0x9482(_0x29b8fe-0x1d5,_0x545f0c);}return this[_0x21363b(0x39d,0x340)];}}class FunctionsClient{constructor(_0x1b1fec){this['httpClient']=_0x1b1fec;}async['invoke'](_0x42a237,_0x2f3914){function _0x358f1e(_0x8b2582,_0x4dbd96){return _0x9482(_0x4dbd96-0x20c,_0x8b2582);}try{const _0x2b1724=_0x2f3914?.[_0x358f1e(0x299,0x2c2)]||'POST',headers={'Content-Type':'application/json',..._0x2f3914?.[_0x358f1e(0x2c5,0x2c8)]};let response;const _0x3b0c43=_0x358f1e(0x29b,0x300)+_0x42a237;switch(_0x2b1724['toUpperCase']()){case'GET':response=await this[_0x358f1e(0x38f,0x35f)][_0x358f1e(0x32e,0x35a)](_0x3b0c43,{'headers':headers,'params':_0x2f3914?.[_0x358f1e(0x2b4,0x2d5)]});break;case'POST':response=await this[_0x358f1e(0x332,0x35f)][_0x358f1e(0x37e,0x319)](_0x3b0c43,_0x2f3914?.[_0x358f1e(0x2ef,0x2d5)],{'headers':headers});break;case'PUT':response=await this[_0x358f1e(0x3d7,0x35f)][_0x358f1e(0x2a3,0x2a6)](_0x3b0c43,_0x2f3914?.['body'],{'headers':headers});break;case'PATCH':response=await this['httpClient'][_0x358f1e(0x2ba,0x28d)](_0x3b0c43,_0x2f3914?.['body'],{'headers':headers});break;case'DELETE':response=await this['httpClient']['delete'](_0x3b0c43,{'headers':headers,'data':_0x2f3914?.['body']});break;default:throw new EBaaSError(_0x358f1e(0x307,0x2e4)+_0x2b1724,0x190);}return{'data':response[_0x358f1e(0x2b1,0x29e)],'error':null};}catch(_0x157068){return{'data':null,'error':_0x157068 instanceof EBaaSError?_0x157068:new EBaaSError(_0x157068 instanceof Error?_0x157068[_0x358f1e(0x258,0x2c9)]:'Function\x20invocation\x20failed',0x0,_0x157068)};}}async[_0x154533(-0x164,-0x121)](){function _0x33df04(_0x3236a0,_0x4557e4){return _0x9482(_0x3236a0-0x36a,_0x4557e4);}try{const response=await this[_0x33df04(0x4bd,0x448)][_0x33df04(0x4b8,0x4fa)](_0x33df04(0x3f6,0x41c));return{'data':response[_0x33df04(0x3fc,0x46c)],'error':null};}catch(_0x5b092b){return{'data':null,'error':_0x5b092b instanceof EBaaSError?_0x5b092b:new EBaaSError(_0x5b092b instanceof Error?_0x5b092b[_0x33df04(0x427,0x3c0)]:_0x33df04(0x43c,0x43a),0x0,_0x5b092b)};}}async[_0x154533(-0x161,-0x124)](_0x394920){function _0x469311(_0x2b338b,_0x55ca9a){return _0x9482(_0x2b338b- -0x262,_0x55ca9a);}try{const response=await this[_0x469311(-0x10f,-0x14c)][_0x469311(-0x114,-0x175)](_0x469311(-0x16e,-0x1d2)+_0x394920+_0x469311(-0x16d,-0x1bf));return{'data':response['data'],'error':null};}catch(_0x18973a){return{'data':null,'error':_0x18973a instanceof EBaaSError?_0x18973a:new EBaaSError(_0x18973a instanceof Error?_0x18973a[_0x469311(-0x1a5,-0x219)]:_0x469311(-0x127,-0xe0),0x0,_0x18973a)};}}async['deploy'](_0x4cd386,_0x5ae2d9){function _0x202c58(_0x4e42b6,_0x7ee7e4){return _0x9482(_0x7ee7e4-0xbd,_0x4e42b6);}try{const _0x3fc1c9=new FormData();if(_0x5ae2d9[_0x202c58(0x189,0x17c)]instanceof File)_0x3fc1c9[_0x202c58(0x1cd,0x220)](_0x202c58(0x189,0x17c),_0x5ae2d9['code']);else typeof _0x5ae2d9['code']==='string'&&_0x3fc1c9[_0x202c58(0x1af,0x220)](_0x202c58(0x16e,0x17c),new Blob([_0x5ae2d9['code']],{'type':_0x202c58(0x225,0x21c)}),'index.ts');_0x5ae2d9[_0x202c58(0x179,0x203)]&&_0x3fc1c9['append'](_0x202c58(0x202,0x203),_0x5ae2d9[_0x202c58(0x265,0x203)]);_0x5ae2d9['env']&&_0x3fc1c9['append'](_0x202c58(0x223,0x1af),JSON['stringify'](_0x5ae2d9[_0x202c58(0x162,0x1af)]));_0x5ae2d9[_0x202c58(0x10b,0x143)]&&_0x3fc1c9['append']('importMap',JSON[_0x202c58(0x25a,0x1d2)](_0x5ae2d9['importMap']));_0x5ae2d9[_0x202c58(0x155,0x19a)]!==undefined&&_0x3fc1c9[_0x202c58(0x21c,0x220)]('verify',String(_0x5ae2d9['verify']));const response=await this[_0x202c58(0x239,0x210)]['post']('/functions/v1/'+_0x4cd386+_0x202c58(0x1b6,0x171),_0x3fc1c9,{'headers':{'Content-Type':_0x202c58(0x23e,0x218)}});return{'data':response['data'],'error':null};}catch(_0x3b714e){return{'data':null,'error':_0x3b714e instanceof EBaaSError?_0x3b714e:new EBaaSError(_0x3b714e instanceof Error?_0x3b714e[_0x202c58(0xff,0x17a)]:_0x202c58(0x1bb,0x1e3),0x0,_0x3b714e)};}}async[_0x154533(-0x21a,-0x1f2)](_0x143aae){function _0x3ae2a2(_0xc01c75,_0x86f5df){return _0x9482(_0xc01c75- -0x1e1,_0x86f5df);}try{const response=await this[_0x3ae2a2(-0x8e,-0xf4)]['delete']('/functions/v1/'+_0x143aae);return{'data':response['data'],'error':null};}catch(_0x460b4e){return{'data':null,'error':_0x460b4e instanceof EBaaSError?_0x460b4e:new EBaaSError(_0x460b4e instanceof Error?_0x460b4e[_0x3ae2a2(-0x124,-0x14d)]:_0x3ae2a2(-0xe6,-0x152),0x0,_0x460b4e)};}}async['updateEnv'](_0x2b5f28,_0x5b2ba2){function _0x57580d(_0x22ddbd,_0x36037e){return _0x9482(_0x36037e-0x101,_0x22ddbd);}try{const response=await this[_0x57580d(0x1d1,0x254)][_0x57580d(0x1fd,0x19b)]('/functions/v1/'+_0x2b5f28+'/env',{'env':_0x5b2ba2});return{'data':response['data'],'error':null};}catch(_0x5383e1){return{'data':null,'error':_0x5383e1 instanceof EBaaSError?_0x5383e1:new EBaaSError(_0x5383e1 instanceof Error?_0x5383e1['message']:'Failed\x20to\x20update\x20function\x20environment',0x0,_0x5383e1)};}}async['getLogs'](_0x193ae8,_0x2c3d35){function _0x100f95(_0x4dee98,_0x8accbe){return _0x9482(_0x8accbe-0x24d,_0x4dee98);}try{const _0x99120e=new URLSearchParams();_0x2c3d35?.['limit']&&_0x99120e[_0x100f95(0x328,0x3b0)]('limit',String(_0x2c3d35['limit']));_0x2c3d35?.['offset']&&_0x99120e[_0x100f95(0x412,0x3b0)](_0x100f95(0x24e,0x2d2),String(_0x2c3d35['offset']));_0x2c3d35?.['level']&&_0x99120e[_0x100f95(0x418,0x3b0)](_0x100f95(0x34e,0x318),_0x2c3d35['level']);const _0x53a6f7='/functions/v1/'+_0x193ae8+'/logs'+(_0x99120e['toString']()?'?'+_0x99120e['toString']():''),response=await this[_0x100f95(0x389,0x3a0)][_0x100f95(0x3b1,0x39b)](_0x53a6f7);return{'data':response['data'],'error':null};}catch(_0x4d6af2){return{'data':null,'error':_0x4d6af2 instanceof EBaaSError?_0x4d6af2:new EBaaSError(_0x4d6af2 instanceof Error?_0x4d6af2[_0x100f95(0x2c7,0x30a)]:_0x100f95(0x385,0x3ba),0x0,_0x4d6af2)};}}async['getMetrics'](_0x4315d8,_0x11c234){function _0x52b74b(_0x1d0f98,_0x4f8dcc){return _0x9482(_0x1d0f98- -0x3c5,_0x4f8dcc);}try{const _0x2a6785=new URLSearchParams();_0x11c234?.['period']&&_0x2a6785['append']('period',_0x11c234[_0x52b74b(-0x332,-0x314)]);const _0x59e1dd=_0x52b74b(-0x2d1,-0x324)+_0x4315d8+'/metrics'+(_0x2a6785[_0x52b74b(-0x2b2,-0x309)]()?'?'+_0x2a6785[_0x52b74b(-0x2b2,-0x22c)]():''),response=await this['httpClient']['get'](_0x59e1dd);return{'data':response['data'],'error':null};}catch(_0x136ad5){return{'data':null,'error':_0x136ad5 instanceof EBaaSError?_0x136ad5:new EBaaSError(_0x136ad5 instanceof Error?_0x136ad5[_0x52b74b(-0x308,-0x310)]:'Failed\x20to\x20get\x20function\x20metrics',0x0,_0x136ad5)};}}}function _0x5a3d(){const _0x4b38db=['l2zPBgvZ','C3rYAw5NAwz5','C2vUza','qxv0AgvUDgLJyxrPB24GzMfPBgvK','y3jLyxrL','mJrdthrzvfC','C2L6zq','Bg9HzfnLC3nPB24','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','BgLRzq','C2vSzwn0','z2v0u3rHDgu','Aw5Zzxj0','C2v0qxv0AfrVA2vU','y29UBMvJDgvK','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSig5LC3rLigfTyMLLBNrLlIbqyxjHihvZyxiGzNvUy2LVBMfSAwrHzgvZigrLihjLywX0Aw1LlcbPBNn0ywXLoIbUCg0GAw5ZDgfSBcbZB2nRzxqUAw8Ty2XPzw50','DhjHBNnMB3jT','q0Xpu0ve','rMfPBgvKihrVigrLCgXVEsbMDw5JDgLVBG','mJG2zxvXuxH1','yMfZzvvsta','C2LNBKLU','zMLSDgvY','C3rHDhvZ','l3nKAY92ms8','D29YA3nWywnLswq','BgLZDgvUzxjdB3vUDa','zMLSDgvYCW','Cg9ZDgDYzxnty2HLBwe','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','CgfYC2u','y3jLyxrLqNvJA2v0','DMfSDwu','DxnL','C2LNBLvW','C2v0v29YA3nWywnLswq','AxnvC2LUz0n1C3rVBurHDgfIyxnL','l3n0B3jHz2uVyNvJA2v0CW','B2zM','rMfPBgvKihrVigDLDcbMDw5JDgLVBG','C3rHy2S','z3rL','AM9PBMvKt25Jzq','CMvTB3zLqwXStgLZDgvUzxjZ','p3vWC2vYDd10CNvL','u1vcu0nssujfra','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','Cg9ZDgDYzxnqB3j0','BMfTzq','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','zw50CNLWB2LUDa','B25cCM9HzgnHC3q','l2f1DgGVDJeVC2LNBM91Da','y29UBMvJDgLVBLn0yxrL','l21LDgfKyxrH','BgLZDa','n29Wv2zQAW','wc1xB3jRC3bHy2uTsuq','z2v0','zwjHyxmUyxv0Ac5ZzxnZAw9U','z2v0rgv0zwn0zwrdB25MAwC','mty5ode4uwTdzw53','l3jWyY8','Ahr0CenSAwvUDa','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','mZq0mdKZmg1crNzZqG','l2zPBgvZlW','C3rHDhvZvgv4Da','zxHLy3v0zvf1zxj5','BM9Kzq','y2XPzw50','BxvSDgLWyxj0l2zVCM0Tzgf0yq','zMLSzq','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','y29UBMvJDa','Dgv4Dc9WBgfPBG','zgLZy29UBMvJDgvK','rMfPBgvKihrVigrVD25SB2fKigzPBgu','Ec10B3rHBc1JB3vUDa','yxbWzw5K','B25Jzq','C2v0twf4tgLZDgvUzxjZ','D2vIC29JA2v0','yxbPs2v5','B3bLCMf0Aw9U','mtv2zuLAB2y','C3vIC2nYAwjL','C29JA2v0','DxjS','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','ChjLzML4','zxHLy3v0zq','ywrK','AM9PBG','mtfsEvnHwfG','DxbKyxrLqNvJA2v0','rMfPBgvKihrVigXPC3qGzMLSzxm','C29JA2v0qwrHChrLCG','y2XLyxjtzxnZAw9U','yxv0Aa','AM9PBMvK','C29JA2v0t3b0Aw9UCW','Cg9ZDgDYzxnvC2vYBMfTzq','DxbKyxrL','y2XVC2vK','DMfSDwvZ','l2f1DgGVDJeVDxnLCG','CxvLCNK','AgfUzgXLqxv0AevYCM9Y','C29YDej5','zxzLBNq','C3nSrw5HyMXLza','zgf0yufYCMf5','ChvIBgLJ','yxnJzw5KAw5N','DxbKyxrLrgf0yq','ChjLC2vUy2u','zgvMyxvSDhm','uMvHy3royxrPDMu','AxndB25Uzwn0zwq','y29SDw1U','C3vIC3rYAw5N','zgLZy29UBMvJDa','BMvX','z2v0vxnHz2u','DxbKyxrLrMLSzu1LDgfKyxrH','Cgf0Aa','CMvJB25Uzwn0qxr0zw1WDhm','C3rHCNrZv2L0Aa','DxbSB2fK','Cgf0y2G','C2v0DxbizwfYDgjLyxq','ChjLC2vUy2u6','AgfZ','B2zMC2v0','Aw1WB3j0twfW','yMXVyG','ChjVzhvJDa','zM9YrwfJAa','BgvHDMLUzW','y3jLzgvUDgLHBhm','l2z1BMn0Aw9UCY92mq','C2vZC2LVBG','lMrLC2m','CMvTB3zLq3vZDg9Trgf0ywjHC2u','zxzLBNrZ','C3rVCMfNzq','zgf0yq','CgvYAw9K','BhrL','zgvSzxrL','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','Bwf4tgLZDgvUzxjZ','CMvWBgfJzq','CMvZCg9UC2u','Chv0','CMvHy3qTBMf0AxzL','qMvHCMvYia','y2HHBM5LBa','CNbJ','zgv0zwn0q3vZDg9Trgf0ywjHC2u','x3nLDfn0yxrL','DxnLCG','AgfUzgXLrxjYB3i','Dg9WAwm','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','y29UDgvUDfr5Cgu','zxjYB3jLza','z2v0u2vZC2LVBG','Dg9ku09o','C3rHDgu','B25bDxrOu3rHDgvdAgfUz2u','zxjYB3i','yNvJA2v0','y2fWDhvYzvn0ywnRvhjHy2u','DhjHy2S','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','C2v0','C29JA2v0lMLVlwnSAwvUDa','rujHyvnfCNjVCG','ndrvu2DltMu','l2rLCgXVEq','y29UDgfPBNm','Bwv0Ag9K','y3vYCMvUDfnJAgvTyq','y2HHBM5LBhm','Dw5KzwzPBMvK','CMvZB2X2zq','C2v0u2vZC2LVBKLUDgvYBMfS','AgvHzgvYCW','BwvZC2fNzq','x2PVAw4','y29Kzq','ndqXotzQD0P1r2C','DgfIBgu','nteXmdy1v25jEMjH','rMfPBgvKihrVignVBM5Ly3qGywz0zxiG','l2f1DgGVDJeVCMvMCMvZAa','y29UzMLN','BgLTAxq','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','igf0DgvTChrZoIa','yM9KEq','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','Bgv2zwW','C2v0sxrLBq','p29WzxjHDgLVBJ1PBNnLCNq','CMfUz2u','C2vHCMnO','mZa0uKrpvwDV','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','rMfPBgvKihrVigXPC3qGzNvUy3rPB25Z','Cg9ZDgDYzxnFy2HHBMDLCZO','y2XLyxi','yNjVD3nLCG','ywnJzxnZx3rVA2vU','DxbZzxj0','vw5ZDxbWB3j0zwqGsfruucbTzxrOB2q6ia','C3vIC2nYAxb0Aw9UCW','y29TBw9U','C3bSAxq','CMvMCMvZAfnLC3nPB24','DMvYAwz5','y3vYCMvUDfnLC3nPB24','mtm1mdq5offxse94qG','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','zNjVBq','Bwv0ywrHDge','CMvXDwvZDa','B3jKzxi','z2v0vxnLCG','Bg9N','zw1PDa','vw5RBM93BIbLCNjVCG','B3b0Aw9UCW','p29WzxjHDgLVBJ11ChnLCNq','C2v0DxbjBNrLCMnLChrVCNm','DgvZDenVBM5Ly3rPB24','B25qB3n0z3jLC0nOyw5Nzxm','l2f1DgGVDJeVC2LNBNvW','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','Cg9ZDgDYzxnFy2HHBMDLCW','zg93BMXVywq','zw52','yNvJA2v0swq','l2z1BMn0Aw9UCY92ms8','l2LUzM8','CMvTB3zLqxv0AfrVA2vU','Cg9ZDgDYzxniB3n0','zw50CMLLCW','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','zgf0ywjHC2u','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','AM9PBMLUzW','l3n0B3jHz2uVyNvJA2v0CY8','CMvTB3zLqwXSq2HHBM5LBhm','l2f1DgGVDJeVC2rRl3nPz25PBG','p29WzxjHDgLVBJ1KzwXLDgu','ChvZAa','BwfRzvjLzG','B3bLCMf0B3i','mJaYnZCYBMnisLvZ','Aw5PDgLHBgL6zq','BgLZDgvUzxjZ','BgvUz3rO','uhjLzMvY','y29UBMvJDf9LCNjVCG','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','Dw50CMfJAW','zgv0zwn0zwrdB25MAwC','Cg9ZDa','Aw50zxjJzxb0B3jZ','lMfZyW','CMvHBhrPBwu','l2f1DgGVDJeVCMvZzxqTCgfZC3DVCMq','x3rYAwDNzxi','Dg9tDhjPBMC'];_0x5a3d=function(){return _0x4b38db;};return _0x5a3d();}class EBaaSClient{constructor(_0x60b729,_0x57a362,_0x3b3cee){this[_0x5484bc(0x88,0x1f)]=_0x3b3cee,this[_0x5484bc(0x50,0x89)]=new HttpClient({'url':_0x60b729,'apiKey':_0x57a362,'timeout':0x7530,'headers':_0x3b3cee?.['global']?.['headers']}),this[_0x5484bc(0x87,0xad)]=new AuthClient(this[_0x5484bc(0xfa,0x89)],_0x3b3cee?.[_0x5484bc(0x5e,0x30)]?.['workspaceId']),this['database']=new DatabaseClient(this['httpClient'],_0x3b3cee?.['database']?.[_0x5484bc(-0x27,0x63)]),this['storage']=new StorageClient(this[_0x5484bc(0x4f,0x89)]);function _0x5484bc(_0x1120e2,_0x227f35){return _0x9482(_0x227f35- -0xca,_0x1120e2);}this[_0x5484bc(-0x28,0x46)]=new RealtimeClient(_0x60b729,_0x57a362,_0x3b3cee?.['realtime']),this['functions']=new FunctionsClient(this[_0x5484bc(0x7d,0x89)]),this['initializeCustomDatabase']();}[_0x154533(-0x1ce,-0x201)](_0x1a8841){function _0x128218(_0x4eae15,_0x10bdbb){return _0x9482(_0x10bdbb- -0x58,_0x4eae15);}return this[_0x128218(0x79,0xa2)]['from'](_0x1a8841);}[_0x154533(-0x211,-0x1ca)](_0x45e395,_0x371fe9){function _0x208844(_0x14a445,_0x1c68f6){return _0x9482(_0x1c68f6-0x206,_0x14a445);}return this[_0x208844(0x327,0x300)][_0x208844(0x2ec,0x2a4)](_0x45e395,_0x371fe9);}[_0x154533(-0x203,-0x21f)](_0xe26d24){function _0x3995a2(_0x160988,_0x816b7c){return _0x9482(_0x816b7c-0x1f9,_0x160988);}return this[_0x3995a2(0x20b,0x28a)]['from'](_0xe26d24);}['channel'](_0x47f366){function _0x3237f1(_0x7fb71c,_0x2348f0){return _0x9482(_0x2348f0-0x25,_0x7fb71c);}return this['realtime'][_0x3237f1(0xeb,0xc2)](_0x47f366);}['invoke'](_0x173ae1,_0x4b2664){return this['functions']['invoke'](_0x173ae1,_0x4b2664);}async['initializeCustomDatabase'](){if(this['options']?.['database']?.['autoDetectCustomDatabase'])try{await this['database']['initialize']();}catch(_0x5d38f3){console['warn']('Failed to initialize custom database detection:',_0x5d38f3);}}async[_0x154533(-0x178,-0x152)](_0x3cd3f2){this[_0xd188f(0x12,0x6e)][_0xd188f(0x67,0x2e)](_0x3cd3f2),this['database']['setWorkspaceId'](_0x3cd3f2);function _0xd188f(_0x2f2c34,_0x4c6f8c){return _0x9482(_0x4c6f8c- -0x109,_0x2f2c34);}this[_0xd188f(0x5b,-0x20)]?.[_0xd188f(0x5d,-0xf)]?.['autoDetectCustomDatabase']&&await this[_0xd188f(0x7,-0xf)][_0xd188f(-0x8e,-0x4)]();}async['configureCustomDatabase'](_0x283d41){await this['database']['configureCustomDatabase'](_0x283d41);}[_0x154533(-0x16d,-0xe7)](){function _0x25a26a(_0x217678,_0x4259a7){return _0x9482(_0x217678- -0x99,_0x4259a7);}return this[_0x25a26a(0x61,0x6f)]['getCustomDatabaseStatus']();}}function createClient(_0x351169,_0x31eefe,_0x3d17d9){return new EBaaSClient(_0x351169,_0x31eefe,_0x3d17d9);}const version='1.0.0';export{AuthClient,CustomDatabaseManager,DatabaseClient,EBaaSClient,EBaaSError,FunctionsClient,HttpClient,QueryBuilder,RealtimeChannel,RealtimeClient,StorageBucket,StorageClient,createClient,version};
|
|
1
|
+
(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x510194(_0x3a8e5d,_0x55d84a){return _0x30c5(_0x3a8e5d-0x1d5,_0x55d84a);}while(!![]){try{const _0x59c24e=parseInt(_0x510194(0x3d8,0x352))/0x1+parseInt(_0x510194(0x387,0x3b1))/0x2*(-parseInt(_0x510194(0x3eb,0x3f7))/0x3)+-parseInt(_0x510194(0x37f,0x3ed))/0x4+-parseInt(_0x510194(0x397,0x384))/0x5*(parseInt(_0x510194(0x3e0,0x372))/0x6)+parseInt(_0x510194(0x3b2,0x3ce))/0x7*(parseInt(_0x510194(0x3fc,0x469))/0x8)+parseInt(_0x510194(0x3d7,0x3b9))/0x9+-parseInt(_0x510194(0x3c5,0x423))/0xa;if(_0x59c24e===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x464f08){stringArray['push'](stringArray['shift']());}}}(_0x5035,0xe93cb));function _0x30c5(_0x2d85c0,_0x3e6822){const _0x50359b=_0x5035();return _0x30c5=function(_0x30c563,_0x89ef48){_0x30c563=_0x30c563-0x15d;let _0x51eb1a=_0x50359b[_0x30c563];if(_0x30c5['gDoLDn']===undefined){var _0x523de9=function(_0x26b5d7){const _0x33cf35='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x48483f='',_0x45e808='';for(let _0xc6a3d8=0x0,_0x949364,_0xa96bf5,_0x11ecee=0x0;_0xa96bf5=_0x26b5d7['charAt'](_0x11ecee++);~_0xa96bf5&&(_0x949364=_0xc6a3d8%0x4?_0x949364*0x40+_0xa96bf5:_0xa96bf5,_0xc6a3d8++%0x4)?_0x48483f+=String['fromCharCode'](0xff&_0x949364>>(-0x2*_0xc6a3d8&0x6)):0x0){_0xa96bf5=_0x33cf35['indexOf'](_0xa96bf5);}for(let _0xd12b69=0x0,_0x46c884=_0x48483f['length'];_0xd12b69<_0x46c884;_0xd12b69++){_0x45e808+='%'+('00'+_0x48483f['charCodeAt'](_0xd12b69)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x45e808);};_0x30c5['mirDYz']=_0x523de9,_0x2d85c0=arguments,_0x30c5['gDoLDn']=!![];}const _0xa95629=_0x50359b[0x0],_0x308bf5=_0x30c563+_0xa95629,_0x24661b=_0x2d85c0[_0x308bf5];return!_0x24661b?(_0x51eb1a=_0x30c5['mirDYz'](_0x51eb1a),_0x2d85c0[_0x308bf5]=_0x51eb1a):_0x51eb1a=_0x24661b,_0x51eb1a;},_0x30c5(_0x2d85c0,_0x3e6822);}import axios from'axios';class EBaaSError extends Error{constructor(_0x26b5d7,status=0x0,_0x33cf35){super(_0x26b5d7),this[_0x1c73fe(-0x180,-0x1dc)]='EBaaSError',this[_0x1c73fe(-0x13b,-0xb4)]=status;function _0x1c73fe(_0x3b1156,_0x4a6a55){return _0x30c5(_0x3b1156- -0x350,_0x4a6a55);}this[_0x1c73fe(-0x199,-0x1e0)]=_0x33cf35,Error[_0x1c73fe(-0x1db,-0x219)]&&Error['captureStackTrace'](this,EBaaSError);}['toJSON'](){function _0x728abd(_0x6a54c5,_0x19a594){return _0x30c5(_0x19a594- -0x20,_0x6a54c5);}return{'name':this['name'],'message':this[_0x728abd(0x1aa,0x1ea)],'status':this['status'],'details':this['details'],'stack':this[_0x728abd(0x1eb,0x231)]};}['toString'](){return this['name']+':\x20'+this['message']+'\x20(Status:\x20'+this['status']+')';}}class HttpClient{constructor(config){this[_0x17643a(0x410,0x489)]=config[_0x17643a(0x39e,0x352)];function _0x17643a(_0x476798,_0x468fc3){return _0x30c5(_0x476798-0x216,_0x468fc3);}this[_0x17643a(0x44f,0x4c3)]=config['apiKey'],this['client']=axios[_0x17643a(0x386,0x314)]({'baseURL':this['baseURL'],'timeout':config[_0x17643a(0x3ba,0x42a)]||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x17643a(0x44f,0x3f7)],...config[_0x17643a(0x403,0x46e)]}}),this['setupInterceptors']();}['setupInterceptors'](){function _0x1fe32c(_0x3cd200,_0x5bf09d){return _0x30c5(_0x3cd200-0x33a,_0x5bf09d);}this[_0x1fe32c(0x4bc,0x542)]['interceptors'][_0x1fe32c(0x588,0x5ce)]['use'](config=>{return config;},_0x48483f=>{function _0x4b2879(_0x419a30,_0x5e8f4d){return _0x30c5(_0x5e8f4d-0x5,_0x419a30);}return Promise[_0x4b2879(0x212,0x1a4)](new EBaaSError('Request\x20failed',0x0,_0x48483f));}),this[_0x1fe32c(0x4bc,0x521)]['interceptors']['response'][_0x1fe32c(0x4e3,0x4a7)](response=>{return response;},_0x45e808=>{const status=_0x45e808[_0xde271f(0x105,0x179)]?.['status']||0x0;function _0xde271f(_0x2dcffb,_0x4e315d){return _0x30c5(_0x4e315d- -0xf2,_0x2dcffb);}const _0xc6a3d8=_0x45e808['response']?.[_0xde271f(0x42,0xbe)]?.['message']||_0x45e808[_0xde271f(0x15b,0x118)]||_0xde271f(0x10f,0xd9),_0x949364=_0x45e808['response']?.[_0xde271f(0xb3,0xbe)]||_0x45e808;return Promise['reject'](new EBaaSError(_0xc6a3d8,status,_0x949364));});}async['get'](_0xa96bf5,config){function _0x2c347e(_0x9a492d,_0x1350e5){return _0x30c5(_0x9a492d- -0x1fb,_0x1350e5);}try{const response=await this['client']['get'](_0xa96bf5,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x2c347e(0x1c,0x51)],'headers':response[_0x2c347e(-0xe,0x30)]};}catch(_0x11ecee){throw this['handleError'](_0x11ecee);}}async['post'](_0xd12b69,data,config){function _0x171bf8(_0x2067b2,_0xe25ea5){return _0x30c5(_0x2067b2- -0x220,_0xe25ea5);}try{const response=await this['client']['post'](_0xd12b69,data,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x171bf8(-0x9,-0x16)],'headers':response['headers']};}catch(_0x46c884){throw this[_0x171bf8(-0x38,-0xf)](_0x46c884);}}async[_0x684fad(0x4db,0x465)](_0x1588e3,data,config){try{const response=await this['client']['put'](_0x1588e3,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x4f79b5){throw this['handleError'](_0x4f79b5);}}async[_0x684fad(0x4c4,0x4a7)](_0x26826a,data,config){function _0x128f14(_0xbe2855,_0x1bffeb){return _0x30c5(_0xbe2855-0x110,_0x1bffeb);}try{const response=await this['client']['patch'](_0x26826a,data,config);return{'data':response['data'],'status':response[_0x128f14(0x325,0x343)],'statusText':response[_0x128f14(0x327,0x2ba)],'headers':response[_0x128f14(0x2fd,0x2b6)]};}catch(_0x1a1592){throw this[_0x128f14(0x2f8,0x29b)](_0x1a1592);}}async['delete'](_0x57ab20,config){function _0x21b9bb(_0x1c3cbf,_0x2c2251){return _0x30c5(_0x2c2251-0xc1,_0x1c3cbf);}try{const response=await this['client']['delete'](_0x57ab20,config);return{'data':response['data'],'status':response[_0x21b9bb(0x26f,0x2d6)],'statusText':response[_0x21b9bb(0x31c,0x2d8)],'headers':response['headers']};}catch(_0x5de01e){throw this[_0x21b9bb(0x32a,0x2a9)](_0x5de01e);}}[_0x684fad(0x4e7,0x47c)](_0x3b930b){function _0x2246cb(_0x3a4c80,_0x3b70ee){return _0x30c5(_0x3b70ee- -0xf0,_0x3a4c80);}this[_0x2246cb(0x44,0x92)][_0x2246cb(0x110,0xe6)][_0x2246cb(0xa5,0xfd)]['common']['Authorization']=_0x2246cb(0x1da,0x16f)+_0x3b930b;}['removeAuthToken'](){delete this[_0x5ade67(-0x6,-0x35)]['defaults']['headers']['common']['Authorization'];function _0x5ade67(_0x425698,_0x303d87){return _0x30c5(_0x425698- -0x188,_0x303d87);}this[_0x5ade67(-0x6,-0x23)]['defaults']['headers'][_0x5ade67(0x6a,-0x1e)]['Authorization']='Bearer\x20'+this['apiKey'];}['handleError'](_0x42dbe8){function _0x4dfb0f(_0x1d76b3,_0x5b3e2f){return _0x30c5(_0x1d76b3- -0x36d,_0x5b3e2f);}if(_0x42dbe8 instanceof EBaaSError)return _0x42dbe8;return new EBaaSError(_0x42dbe8[_0x4dfb0f(-0x163,-0x123)]||_0x4dfb0f(-0x15d,-0x148),_0x42dbe8[_0x4dfb0f(-0x158,-0xe4)]||0x0,_0x42dbe8);}}class AuthClient{constructor(_0x2d5ee9,_0x211ce0){this['currentSession']=null,this['httpClient']=_0x2d5ee9;function _0x2414d1(_0x25b8e0,_0x49d40a){return _0x30c5(_0x49d40a- -0x97,_0x25b8e0);}this['workspaceId']=_0x211ce0,this[_0x2414d1(0x204,0x1d3)]();}async[_0x684fad(0x546,0x500)](data){function _0x26cda3(_0x1fece1,_0x347d04){return _0x30c5(_0x1fece1-0x1c,_0x347d04);}try{const response=await this[_0x26cda3(0x1c9,0x198)]['post'](_0x26cda3(0x1d5,0x223),data);return response['data']['session']&&this['setSessionInternal'](response['data']['session']),response[_0x26cda3(0x1cc,0x22c)];}catch(_0x36979a){throw this[_0x26cda3(0x1b1,0x1f3)](_0x36979a);}}async[_0x684fad(0x563,0x5cb)](data){function _0x1d83b7(_0x3274ed,_0x47cc32){return _0x30c5(_0x47cc32- -0x170,_0x3274ed);}try{const headers={};this['workspaceId']&&(headers[_0x1d83b7(0x14c,0xf2)]=this['workspaceId']);const response=await this['httpClient']['post'](_0x1d83b7(0x61,0xc8),data,{'headers':headers});return response[_0x1d83b7(0x59,0x40)][_0x1d83b7(-0x7a,0x2)]&&this['setSessionInternal'](response['data']['session']),response['data'];}catch(_0x3d9ed8){throw this['handleAuthError'](_0x3d9ed8);}}async[_0x684fad(0x4f2,0x470)](){function _0xb568d6(_0x3b4559,_0x2924da){return _0x30c5(_0x2924da-0x108,_0x3b4559);}try{await this['httpClient']['post'](_0xb568d6(0x2bf,0x2a4)),this[_0xb568d6(0x312,0x29b)]();}catch(_0x2dfe93){this['clearSession']();throw this['handleAuthError'](_0x2dfe93);}}async['getUser'](){if(!this['currentSession']?.[_0xecf5e9(0x93,0xa7)])return null;function _0xecf5e9(_0x13cb9d,_0x3026a2){return _0x30c5(_0x3026a2- -0x14c,_0x13cb9d);}try{const response=await this['httpClient'][_0xecf5e9(0x13c,0xfc)](_0xecf5e9(0x13f,0xf6));return response['data']['user'];}catch(_0x3e7f23){if(_0x3e7f23 instanceof EBaaSError&&_0x3e7f23[_0xecf5e9(0x14f,0xc9)]===0x191)return this['clearSession'](),null;throw this['handleAuthError'](_0x3e7f23);}}async[_0x684fad(0x573,0x547)](){function _0x4997e5(_0x1c3e21,_0x1c0ad8){return _0x30c5(_0x1c0ad8-0x5a,_0x1c3e21);}if(!this[_0x4997e5(0x302,0x29b)]?.[_0x4997e5(0x2c3,0x2b0)])return null;try{const response=await this[_0x4997e5(0x1ba,0x207)]['post'](_0x4997e5(0x294,0x227),{'refresh_token':this[_0x4997e5(0x2fe,0x29b)]['refresh_token']});if(response['data'][_0x4997e5(0x1ec,0x1cc)])return this[_0x4997e5(0x205,0x24f)](response['data'][_0x4997e5(0x1c6,0x1cc)]),response['data']['session'];return null;}catch(_0x13f10){this['clearSession']();throw this['handleAuthError'](_0x13f10);}}async[_0x684fad(0x579,0x589)](_0x53620f){function _0x3c2218(_0x1353f8,_0x522047){return _0x30c5(_0x1353f8- -0x36c,_0x522047);}try{await this['httpClient']['post']('/auth/v1/reset-password',{'email':_0x53620f});}catch(_0x48e4de){throw this[_0x3c2218(-0x1d7,-0x19b)](_0x48e4de);}}async['updateUser'](data){function _0x3a2e2c(_0x35a5fe,_0x35c5ed){return _0x30c5(_0x35c5ed- -0x105,_0x35a5fe);}try{const response=await this[_0x3a2e2c(0xc9,0xa8)][_0x3a2e2c(0xf3,0xaa)]('/auth/v1/user',data);return response[_0x3a2e2c(0xc7,0xab)]['user'];}catch(_0x4d21a4){throw this['handleAuthError'](_0x4d21a4);}}['getSession'](){return this['currentSession'];}['setSession'](_0x5a18db){this['currentSession']=_0x5a18db,this['httpClient'][_0x22b02f(0x3f6,0x38a)](_0x5a18db[_0x22b02f(0x34c,0x3c2)]);function _0x22b02f(_0x1422f3,_0x1efbc7){return _0x30c5(_0x1efbc7-0x1cf,_0x1422f3);}typeof localStorage!=='undefined'&&localStorage['setItem'](_0x22b02f(0x31a,0x34d),JSON['stringify'](_0x5a18db));}['onAuthStateChange'](_0x50a9f4){return()=>{};}['setWorkspaceId'](_0x53d1cb){function _0x1ed560(_0x2ac1f5,_0x280971){return _0x30c5(_0x280971-0x102,_0x2ac1f5);}this[_0x1ed560(0x21c,0x28b)]=_0x53d1cb;}['setSessionInternal'](_0x34c598){this['currentSession']=_0x34c598,this['httpClient'][_0x2a2c14(0x12e,0x18e)](_0x34c598[_0x2a2c14(0x229,0x1c6)]);function _0x2a2c14(_0x4cc36f,_0x4098d3){return _0x30c5(_0x4098d3- -0x2d,_0x4cc36f);}typeof localStorage!==_0x2a2c14(0x1ff,0x194)&&localStorage[_0x2a2c14(0x180,0x14b)](_0x2a2c14(0x151,0x151),JSON[_0x2a2c14(0x274,0x227)](_0x34c598));}['clearSession'](){this['currentSession']=null;function _0x352933(_0x5988e7,_0x30b15d){return _0x30c5(_0x5988e7-0x176,_0x30b15d);}this['httpClient'][_0x352933(0x2d4,0x35a)](),typeof localStorage!==_0x352933(0x337,0x2b7)&&localStorage['removeItem']('ebaas.auth.session');}[_0x684fad(0x596,0x5d7)](){function _0x443fd6(_0x2f6eca,_0x26a941){return _0x30c5(_0x2f6eca-0x1ae,_0x26a941);}if(typeof localStorage!=='undefined'){const _0x4300da=localStorage[_0x443fd6(0x3dc,0x3ff)](_0x443fd6(0x32c,0x322));if(_0x4300da)try{const _0x41530d=JSON['parse'](_0x4300da);this[_0x443fd6(0x329,0x363)](_0x41530d);}catch(_0x311ef3){this['clearSession']();}}}[_0x684fad(0x4c1,0x513)](_0x1f78ad){if(_0x1f78ad instanceof EBaaSError)return _0x1f78ad;return new EBaaSError(_0x1f78ad['message']||'Authentication\x20failed',_0x1f78ad['status']||0x0,_0x1f78ad);}}class QueryBuilder{constructor(_0x144c4a,_0x167d83,_0x422ce6,_0x18a4c7){this['httpClient']=_0x144c4a,this[_0x342211(0x8e,0x7c)]=_0x167d83,this['schema']=_0x422ce6,this['workspaceId']=_0x18a4c7;function _0x342211(_0x206405,_0x24953d){return _0x30c5(_0x24953d- -0x19c,_0x206405);}this['query']={'filters':[]};}['select'](_0x124209='*',_0x431477){this[_0x3cee0a(0x48a,0x4ae)]['select']=_0x124209;function _0x3cee0a(_0x2500b0,_0x4d7f44){return _0x30c5(_0x2500b0-0x28b,_0x4d7f44);}return this;}['insert'](data,_0x137e12){function _0x21ace9(_0x4e8ac5,_0xa9d229){return _0x30c5(_0x4e8ac5-0x326,_0xa9d229);}return this[_0x21ace9(0x535,0x580)]('POST',_0x21ace9(0x48d,0x4f3)+this['table']+_0x21ace9(0x49c,0x4b8),{'data':data,'options':_0x137e12});}['update'](data,_0x2235f9){function _0x4d9591(_0x641fec,_0x597003){return _0x30c5(_0x597003- -0xb2,_0x641fec);}return this[_0x4d9591(0x162,0x14d)]['updateData']=data,this[_0x4d9591(0xf6,0x14d)]['updateOptions']=_0x2235f9,this;}['upsert'](data,_0x7fddb0){function _0x2bc767(_0x3a3967,_0x20e629){return _0x30c5(_0x20e629-0xa1,_0x3a3967);}return this['executeQuery']('POST','/sdk/v1/'+this[_0x2bc767(0x2f2,0x2b9)]+'?operation=upsert',{'data':data,'options':{..._0x7fddb0,'upsert':!![]}});}['delete'](_0x37ed3e){this[_0x31b60a(0x55d,0x56e)][_0x31b60a(0x52d,0x56e)]=_0x37ed3e,this[_0x31b60a(0x55d,0x514)]['isDelete']=!![];function _0x31b60a(_0x295b74,_0x402314){return _0x30c5(_0x295b74-0x35e,_0x402314);}return this;}['eq'](_0x36bce3,_0x30c004){this[_0x3d7396(0x107,0x13b)][_0x3d7396(0x6a,-0x1e)]['push']({'column':_0x36bce3,'operator':'eq','value':_0x30c004});function _0x3d7396(_0xf677c5,_0xba2a87){return _0x30c5(_0xf677c5- -0xf8,_0xba2a87);}return this;}['neq'](_0x5f0c80,_0x3b0883){function _0x33e323(_0x495ff0,_0x4c5b4a){return _0x30c5(_0x495ff0-0x10a,_0x4c5b4a);}return this[_0x33e323(0x309,0x304)][_0x33e323(0x26c,0x29f)]['push']({'column':_0x5f0c80,'operator':'neq','value':_0x3b0883}),this;}['gt'](_0x535dc4,_0x854ed4){this['query']['filters'][_0x18285d(0x1f2,0x1d5)]({'column':_0x535dc4,'operator':'gt','value':_0x854ed4});function _0x18285d(_0x1d2c11,_0x476886){return _0x30c5(_0x1d2c11-0xd,_0x476886);}return this;}['gte'](_0x105399,_0x3b7714){function _0x5d1598(_0x13afbc,_0x1916d0){return _0x30c5(_0x13afbc- -0xff,_0x1916d0);}return this[_0x5d1598(0x100,0xa3)]['filters']['push']({'column':_0x105399,'operator':'gte','value':_0x3b7714}),this;}['lt'](_0x21d2a6,_0x5b2815){function _0x186dae(_0x285d8e,_0x26cd06){return _0x30c5(_0x26cd06- -0x14a,_0x285d8e);}return this[_0x186dae(0x113,0xb5)][_0x186dae(-0x3,0x18)][_0x186dae(0x44,0x9b)]({'column':_0x21d2a6,'operator':'lt','value':_0x5b2815}),this;}[_0x684fad(0x50b,0x519)](_0x5c8583,_0x5c35f0){function _0x50b918(_0x5b5439,_0x3e7d66){return _0x30c5(_0x3e7d66- -0x2c6,_0x5b5439);}return this[_0x50b918(-0x6b,-0xc7)][_0x50b918(-0x132,-0x164)]['push']({'column':_0x5c8583,'operator':'lte','value':_0x5c35f0}),this;}[_0x684fad(0x560,0x516)](_0x33ee2c,_0x34399f){this[_0x59697e(0x15e,0x18d)][_0x59697e(0xc1,0x110)][_0x59697e(0x144,0x185)]({'column':_0x33ee2c,'operator':_0x59697e(0x193,0x18d),'value':_0x34399f});function _0x59697e(_0x2d3951,_0x1b635a){return _0x30c5(_0x2d3951- -0xa1,_0x1b635a);}return this;}[_0x684fad(0x505,0x49c)](_0x12d3a8,_0x20ca8c){this[_0xed491a(0x5e8,0x570)][_0xed491a(0x46d,0x4d3)]['push']({'column':_0x12d3a8,'operator':'ilike','value':_0x20ca8c});function _0xed491a(_0x7c5f5e,_0x1941e9){return _0x30c5(_0x1941e9-0x371,_0x7c5f5e);}return this;}['is'](_0x4505f8,_0x1e1ab8){function _0x21463a(_0x44dca2,_0x471e2c){return _0x30c5(_0x471e2c- -0x1c1,_0x44dca2);}return this['query'][_0x21463a(-0x40,-0x5f)]['push']({'column':_0x4505f8,'operator':'is','value':_0x1e1ab8}),this;}['in'](_0x4b5b9c,_0x42bd49){function _0x3312c3(_0x4b76e8,_0x1f0204){return _0x30c5(_0x4b76e8- -0xb3,_0x1f0204);}return this['query'][_0x3312c3(0xaf,0x12a)][_0x3312c3(0x132,0xb8)]({'column':_0x4b5b9c,'operator':'in','value':_0x42bd49}),this;}['contains'](_0x394782,_0x38aa33){function _0x2374c1(_0x9ff409,_0x3cf4c4){return _0x30c5(_0x9ff409-0xda,_0x3cf4c4);}return this[_0x2374c1(0x2d9,0x253)][_0x2374c1(0x23c,0x241)]['push']({'column':_0x394782,'operator':_0x2374c1(0x2bc,0x245),'value':_0x38aa33}),this;}[_0x684fad(0x4a9,0x42a)](_0x1d8a1e){function _0x51bb59(_0x5b2e5a,_0x5adec9){return _0x30c5(_0x5adec9- -0xc7,_0x5b2e5a);}return Object[_0x51bb59(0x108,0xf3)](_0x1d8a1e)[_0x51bb59(0x128,0x10a)](([_0x5acdf6,_0x4e9a57])=>{this['eq'](_0x5acdf6,_0x4e9a57);}),this;}[_0x684fad(0x568,0x4ea)](_0x1be3c6,_0x5afe30){function _0xfce785(_0x51b5be,_0x1d9bcf){return _0x30c5(_0x51b5be-0xb3,_0x1d9bcf);}return!this['query'][_0xfce785(0x2ef,0x357)]&&(this[_0xfce785(0x2b2,0x2cc)][_0xfce785(0x2ef,0x2b9)]=[]),this[_0xfce785(0x2b2,0x2fd)]['order'][_0xfce785(0x298,0x2fb)]({'column':_0x1be3c6,'ascending':_0x5afe30?.['ascending']!==![]}),this;}[_0x684fad(0x52d,0x5b3)](count){function _0x5a92cd(_0xe1ec22,_0x5b2c9f){return _0x30c5(_0x5b2c9f- -0xc1,_0xe1ec22);}return this[_0x5a92cd(0x1a4,0x13e)]['limit']=count,this;}[_0x684fad(0x495,0x50f)](from,_0x339d6b){this[_0x5f0023(0x562,0x58a)]['range']={'from':from,'to':_0x339d6b};function _0x5f0023(_0x450ce3,_0x5aeb36){return _0x30c5(_0x5aeb36-0x38b,_0x450ce3);}return this;}async[_0x684fad(0x507,0x4dd)](){function _0x56f846(_0x13a576,_0x4c08c5){return _0x30c5(_0x4c08c5-0x6e,_0x13a576);}if(this[_0x56f846(0x1f2,0x26d)]['updateData'])return this['executeQuery']('PATCH','/sdk/v1/'+this[_0x56f846(0x2d7,0x286)],{'data':this['query'][_0x56f846(0x19d,0x1f5)],'options':this[_0x56f846(0x2cd,0x26d)][_0x56f846(0x23c,0x1dd)],'filters':this[_0x56f846(0x24f,0x26d)][_0x56f846(0x151,0x1d0)]});else return this['query']['isDelete']?this['executeQuery']('DELETE',_0x56f846(0x1e6,0x1d5)+this[_0x56f846(0x264,0x286)]+'?operation=delete',{'options':this['query']['deleteOptions'],'filters':this['query']['filters']}):this['executeQuery']('GET',_0x56f846(0x20d,0x1d5)+this[_0x56f846(0x257,0x286)]+'?operation=select',{'select':this['query'][_0x56f846(0x2f2,0x272)],'filters':this[_0x56f846(0x1f1,0x26d)][_0x56f846(0x14a,0x1d0)],'order':this[_0x56f846(0x23c,0x26d)]['order'],'limit':this[_0x56f846(0x2d1,0x26d)][_0x56f846(0x1f8,0x26f)],'range':this[_0x56f846(0x233,0x26d)]['range']});}async['single'](){this['limit'](0x1);function _0x4447b2(_0x14c462,_0x4395a3){return _0x30c5(_0x4395a3-0x28e,_0x14c462);}const result=await this[_0x4447b2(0x415,0x469)]();return{'data':result['data']?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x4b03fe,_0xa4aff9,_0x1591a4){function _0x3f558b(_0x2a52c4,_0x3a3e44){return _0x30c5(_0x3a3e44- -0x25e,_0x2a52c4);}try{let response;const headers={};this['workspaceId']&&(headers['x-workspace-id']=this['workspaceId']);if(_0x4b03fe==='GET'){const _0xff3063=_0xa4aff9['split']('?'),_0x132de1=_0xff3063[0x0],existingParams=new URLSearchParams(_0xff3063[0x1]||'');if(_0x1591a4[_0x3f558b(-0x66,-0x5a)])existingParams['append']('select',_0x1591a4['select']);_0x1591a4['filters']?.['length']&&_0x1591a4[_0x3f558b(-0xbf,-0xfc)]['forEach'](filter=>{function _0x37e697(_0x2be5a6,_0x251218){return _0x30c5(_0x2be5a6-0xdf,_0x251218);}existingParams['append'](filter['column'],filter['operator']+'.'+filter[_0x37e697(0x2ce,0x2b8)]);});if(_0x1591a4[_0x3f558b(0x3c,-0x22)]?.[_0x3f558b(-0x77,-0x4d)]){const orderStr=_0x1591a4['order']['map'](_0x264bbf=>''+_0x264bbf[_0x3f558b(-0x140,-0xe5)]+(_0x264bbf['ascending']?_0x3f558b(-0x4e,-0x56):_0x3f558b(-0x63,-0x28)))[_0x3f558b(-0xa5,-0x1e)](',');existingParams['append']('order',orderStr);}if(_0x1591a4[_0x3f558b(-0x58,-0x5d)])existingParams[_0x3f558b(-0x21,-0x9e)](_0x3f558b(0x0,-0x5d),_0x1591a4[_0x3f558b(-0xb,-0x5d)]['toString']());_0x1591a4['range']&&(existingParams['append']('offset',_0x1591a4['range']['from'][_0x3f558b(-0xd9,-0xb0)]()),existingParams[_0x3f558b(-0xe5,-0x9e)](_0x3f558b(-0xc1,-0x5d),(_0x1591a4['range']['to']-_0x1591a4[_0x3f558b(-0x7f,-0xf5)][_0x3f558b(-0x13a,-0xc4)]+0x1)[_0x3f558b(-0x10b,-0xb0)]())),response=await this[_0x3f558b(-0x76,-0xb1)][_0x3f558b(-0x5b,-0x16)](_0x132de1+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x4b03fe==='DELETE'){const _0x5ce6e2=_0xa4aff9[_0x3f558b(-0x67,-0xa9)]('?'),_0x179a9a=_0x5ce6e2[0x0],existingParams=new URLSearchParams(_0x5ce6e2[0x1]||'');!existingParams[_0x3f558b(-0xf2,-0x9a)]('operation')&&existingParams['append'](_0x3f558b(-0x6e,-0x34),'delete');_0x1591a4['filters']?.['length']&&_0x1591a4['filters'][_0x3f558b(-0x1a,-0x8d)](filter=>{function _0x451264(_0x141af2,_0x1b86f2){return _0x30c5(_0x1b86f2- -0x306,_0x141af2);}existingParams[_0x451264(-0x190,-0x146)](filter['column'],filter[_0x451264(-0x144,-0xde)]+'.'+filter[_0x451264(-0xe1,-0x117)]);});const deleteUrl=_0x179a9a+'?'+existingParams['toString']();console['log']('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console[_0x3f558b(-0xf8,-0xfa)]('\uD83D\uDD27 DELETE filtros originais:',_0x1591a4['filters']),response=await this['httpClient']['delete'](deleteUrl,{'headers':headers});}else{if(_0x4b03fe==='PATCH'){const _0x75d956=_0xa4aff9['split']('?'),_0x24f4f5=_0x75d956[0x0],existingParams=new URLSearchParams(_0x75d956[0x1]||'');!existingParams[_0x3f558b(-0x1e,-0x9a)](_0x3f558b(-0x39,-0x34))&&existingParams[_0x3f558b(-0x16,-0x9e)](_0x3f558b(-0x9c,-0x34),'update');_0x1591a4[_0x3f558b(-0x11e,-0xfc)]?.['length']&&_0x1591a4['filters']['forEach'](filter=>{function _0x3b8e6c(_0x3027a7,_0x1579a7){return _0x30c5(_0x1579a7- -0x134,_0x3027a7);}existingParams[_0x3b8e6c(0xa,0x8c)](filter['column'],filter['operator']+'.'+filter['value']);});_0x1591a4['options']?.['prefer']&&(headers['Prefer']=_0x1591a4['options']['prefer']);const updateUrl=_0x24f4f5+'?'+existingParams['toString']();response=await this['httpClient'][_0x3f558b(-0x144,-0xc6)](updateUrl,_0x1591a4[_0x3f558b(-0xe0,-0xae)],{'headers':headers});}else{let _0x28a867=_0x1591a4[_0x3f558b(-0xb6,-0xae)];!headers['Prefer']&&(headers['Prefer']=_0x3f558b(-0x34,-0x2d)),_0x1591a4['options']?.['upsert']&&(headers['Prefer']='resolution=merge-duplicates,return=representation'),_0x1591a4['dataArray']&&(_0x28a867=_0x1591a4[_0x3f558b(-0x51,-0x15)]),response=await this[_0x3f558b(-0x78,-0xb1)][_0x3f558b(-0x139,-0xf3)](_0xa4aff9,_0x28a867,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response[_0x3f558b(-0x7b,-0x71)]?.[_0x3f558b(-0x61,-0x62)]?parseInt(response[_0x3f558b(-0x50,-0x71)]['x-total-count']):undefined};}catch(_0x36e816){return{'data':null,'error':_0x36e816 instanceof EBaaSError?_0x36e816:new EBaaSError(_0x36e816 instanceof Error?_0x36e816['message']:_0x3f558b(-0x19,-0x8a),0x0,_0x36e816)};}}}class CustomDatabaseManager{constructor(_0x56724d,_0x3ee3eb){this[_0x5ddab5(0x9b,0x63)]=_0x56724d;function _0x5ddab5(_0x111dcb,_0x3566e4){return _0x30c5(_0x3566e4- -0x14a,_0x111dcb);}this['workspaceId']=_0x3ee3eb;}async[_0x684fad(0x4fe,0x4bf)](){if(!this['workspaceId'])return{'hasCustomDatabase':![]};try{const response=await this['httpClient'][_0x37f313(0x555,0x521)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this[_0x37f313(0x496,0x474)]}});if(response['status']===0xc8&&response[_0x37f313(0x4bd,0x479)]?.[_0x37f313(0x499,0x471)]){const config=response[_0x37f313(0x4bd,0x448)]['config'],_0x845471={'host':config[_0x37f313(0x520,0x57f)],'port':config['postgresPort'],'database':config[_0x37f313(0x4b0,0x4ab)],'username':config['postgresUsername'],'password':'','schema':config['postgresSchema'],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x845471},this[_0x37f313(0x530,0x4f5)];}}catch(_0x31d94e){if(_0x31d94e?.[_0x37f313(0x522,0x4bd)]===0x194)return this[_0x37f313(0x530,0x5b1)]={'hasCustomDatabase':![]},this['detectedConfig'];console['warn']('Failed to detect custom database configuration:',_0x31d94e);}this[_0x37f313(0x530,0x4df)]={'hasCustomDatabase':![]};function _0x37f313(_0x176848,_0x8a9b12){return _0x30c5(_0x176848-0x30d,_0x8a9b12);}return this[_0x37f313(0x530,0x53f)];}async['testConnection'](_0x551881){try{const response=await this['httpClient']['post']('/admin/v1/workspace/custom-database/test-connection',_0x551881,{'headers':this['workspaceId']?{'X-Workspace-ID':this['workspaceId']}:{}});return response['data'];}catch(_0x45edc4){return{'success':![],'message':_0x45edc4?.['message']||'Failed\x20to\x20test\x20connection'};}}async['configureCustomDatabase'](_0x467196){if(!this[_0x130298(0x191,0x1a7)])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x130298(0x173,0xf5)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x467196},{'headers':{'X-Workspace-ID':this['workspaceId']}}),config=response[_0x130298(0x1b8,0x14e)][_0x130298(0x194,0x1ca)];this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x467196};function _0x130298(_0x3827a4,_0x1048a8){return _0x30c5(_0x3827a4-0x8,_0x1048a8);}return config;}async[_0x684fad(0x48f,0x49d)](){if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');function _0x5404e5(_0xb17610,_0x4dfe68){return _0x30c5(_0x4dfe68-0xc5,_0xb17610);}await this[_0x5404e5(0x23f,0x272)]['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}}),this['detectedConfig']={'hasCustomDatabase':![]};}['getDetectedConfig'](){function _0x566aa2(_0x540e76,_0x46bf21){return _0x30c5(_0x540e76- -0x2a,_0x46bf21);}return this[_0x566aa2(0x1f9,0x1d2)];}['hasCustomDatabase'](){return this['detectedConfig']?.['hasCustomDatabase']??![];}[_0x684fad(0x4b0,0x4b4)](){return this['detectedConfig']?.['credentials'];}['setWorkspaceId'](_0x3e149d){function _0x122cae(_0x32b9f3,_0x2ff81c){return _0x30c5(_0x32b9f3- -0x15c,_0x2ff81c);}this['workspaceId']=_0x3e149d,this[_0x122cae(0xc7,0x68)]=undefined;}[_0x684fad(0x48c,0x4d8)](){function _0xbc62ee(_0x4dc3c4,_0x391bfd){return _0x30c5(_0x4dc3c4-0x348,_0x391bfd);}return this[_0xbc62ee(0x4d1,0x503)];}['getStatus'](){function _0x409864(_0x50e5e5,_0x4048cf){return _0x30c5(_0x4048cf- -0xec,_0x50e5e5);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x409864(0x1f,0x97)](),'configDetails':this[_0x409864(0x156,0x137)]?.[_0x409864(0x1c1,0x13f)]?{'host':this[_0x409864(0xf1,0x137)]['credentials']['host'],'port':this[_0x409864(0x14d,0x137)][_0x409864(0x107,0x13f)]['port'],'database':this[_0x409864(0x13d,0x137)][_0x409864(0x17a,0x13f)][_0x409864(0x87,0xde)],'schema':this[_0x409864(0x180,0x137)]['credentials'][_0x409864(0xd2,0x87)]||_0x409864(0x37,0x80),'sslEnabled':this[_0x409864(0x1a4,0x137)][_0x409864(0x12b,0x13f)][_0x409864(0xe4,0xa6)]||![]}:undefined};}}class DatabaseClient{constructor(_0x114ac7,_0x1237da){this[_0x37a8cc(-0x1df,-0x264)]=_0x114ac7;function _0x37a8cc(_0x5315ed,_0x1e4e8d){return _0x30c5(_0x5315ed- -0x38c,_0x1e4e8d);}this[_0x37a8cc(-0x148,-0x14c)]=new CustomDatabaseManager(_0x114ac7,_0x1237da);}[_0x684fad(0x4c6,0x51b)](_0x266071){function _0x389505(_0x2d02bb,_0x1966a4){return _0x30c5(_0x2d02bb- -0x195,_0x1966a4);}return new QueryBuilder(this[_0x389505(0x18,0x80)],_0x266071,this['currentSchema'],this['customDatabaseManager'][_0x389505(-0x35,0x53)]());}['rpc'](_0x21e2a7,_0x56ea1c){function _0x1fb885(_0x220798,_0x49e816){return _0x30c5(_0x220798-0x40,_0x49e816);}return this[_0x1fb885(0x1ed,0x25b)]['post'](_0x1fb885(0x23d,0x232)+_0x21e2a7,_0x56ea1c);}[_0x684fad(0x49f,0x485)](_0xf40fd5){const _0xa64e9d=new DatabaseClient(this['httpClient'],this['customDatabaseManager']['getWorkspaceId']());function _0x180fee(_0x4ca35e,_0x195217){return _0x30c5(_0x4ca35e- -0x10,_0x195217);}return _0xa64e9d[_0x180fee(0x184,0x1b8)]=_0xf40fd5,_0xa64e9d[_0x180fee(0x234,0x1ca)]=this[_0x180fee(0x234,0x287)],_0xa64e9d;}async['detectCustomDatabase'](){return this['customDatabaseManager']['detectCustomDatabase']();}async['testCustomConnection'](_0x312c4f){function _0x138930(_0x5cb105,_0x57bbd9){return _0x30c5(_0x5cb105- -0x8,_0x57bbd9);}return this[_0x138930(0x23c,0x225)][_0x138930(0x24d,0x201)](_0x312c4f);}async[_0x684fad(0x548,0x4eb)](_0x461a3a){function _0x376118(_0xd9c829,_0x56d781){return _0x30c5(_0xd9c829- -0xb2,_0x56d781);}return this[_0x376118(0x192,0x16d)]['configureCustomDatabase'](_0x461a3a);}async['removeCustomDatabase'](){return this['customDatabaseManager']['removeCustomDatabase']();}[_0x684fad(0x594,0x603)](){function _0x5c45cf(_0x1235f8,_0x104600){return _0x30c5(_0x104600- -0x10b,_0x1235f8);}return this['customDatabaseManager'][_0x5c45cf(0xbf,0x78)]();}['getCustomDatabaseStatus'](){function _0x7a7a52(_0x41be6a,_0x13b295){return _0x30c5(_0x13b295- -0x2a6,_0x41be6a);}return this['customDatabaseManager'][_0x7a7a52(-0x163,-0xde)]();}['setWorkspaceId'](_0x4bf979){function _0x14d6c3(_0xceb578,_0x4499b1){return _0x30c5(_0xceb578-0x3e2,_0x4499b1);}this['customDatabaseManager'][_0x14d6c3(0x5c0,0x598)](_0x4bf979);}async['initialize'](){try{await this['customDatabaseManager']['detectCustomDatabase']();}catch(_0x3fa6ae){console['warn']('Failed to initialize custom database detection:',_0x3fa6ae);}}}function _0x684fad(_0x75299c,_0x4d824c){return _0x30c5(_0x75299c-0x32c,_0x4d824c);}class StorageBucket{constructor(_0x899482,bucketId){function _0x359f8a(_0x52b651,_0x32421a){return _0x30c5(_0x32421a- -0x8b,_0x52b651);}this[_0x359f8a(0xfd,0x122)]=_0x899482,this['bucketId']=bucketId;}async['upload'](_0x3c5613,_0x35de88,_0x26cadd){function _0x2c6981(_0x362d90,_0x2693ad){return _0x30c5(_0x2693ad- -0x1c3,_0x362d90);}try{const _0x4281ab=new FormData();if(_0x35de88 instanceof File)_0x4281ab['append']('file',_0x35de88);else{if(_0x35de88 instanceof Blob)_0x4281ab[_0x2c6981(-0x1f,-0x3)]('file',_0x35de88,_0x3c5613);else{if(_0x35de88 instanceof ArrayBuffer)_0x4281ab['append'](_0x2c6981(-0x56,-0x12),new Blob([_0x35de88]),_0x3c5613);else typeof _0x35de88==='string'&&_0x4281ab['append']('file',new Blob([_0x35de88],{'type':_0x2c6981(0xf7,0x80)}),_0x3c5613);}}_0x4281ab['append']('path',_0x3c5613);_0x26cadd?.['cacheControl']&&_0x4281ab[_0x2c6981(-0x63,-0x3)]('cacheControl',_0x26cadd[_0x2c6981(-0x16,0x63)]);_0x26cadd?.[_0x2c6981(-0x6f,0x6)]&&_0x4281ab['append'](_0x2c6981(0x89,0x6),_0x26cadd['contentType']);_0x26cadd?.['metadata']&&_0x4281ab['append'](_0x2c6981(0x85,0x44),JSON['stringify'](_0x26cadd['metadata']));const _0x35786c='/storage/buckets/'+this[_0x2c6981(0x8,0x2b)]+'/files'+(_0x26cadd?.['upsert']?'?upsert=true':''),response=await this[_0x2c6981(0x5e,-0x16)]['post'](_0x35786c,_0x4281ab,{'headers':{'Content-Type':_0x2c6981(0x6a,0x4f)}});return{'data':response['data'],'error':null};}catch(_0xcd4e27){return{'data':null,'error':_0xcd4e27 instanceof EBaaSError?_0xcd4e27:new EBaaSError(_0xcd4e27 instanceof Error?_0xcd4e27[_0x2c6981(0x71,0x47)]:_0x2c6981(0x54,0xa9),0x0,_0xcd4e27)};}}async[_0x684fad(0x527,0x589)](_0x21b82f,_0x30c244){function _0x3cd4e5(_0x1668b9,_0x4745cd){return _0x30c5(_0x4745cd- -0x158,_0x1668b9);}try{const _0x2da49b=new URLSearchParams();_0x30c244?.['transform']&&Object['entries'](_0x30c244[_0x3cd4e5(-0x21,0x35)])['forEach'](([_0x174aa2,_0x5392e1])=>{function _0x1b6aae(_0x571332,_0x4497c1){return _0x30c5(_0x4497c1- -0x7a,_0x571332);}_0x5392e1!==undefined&&_0x2da49b[_0x1b6aae(0xc8,0x146)](_0x174aa2,String(_0x5392e1));});const _0x5a470f='/storage/buckets/'+this['bucketId']+_0x3cd4e5(0xbb,0x65)+_0x21b82f+(_0x2da49b[_0x3cd4e5(-0x20,0x56)]()?'?'+_0x2da49b['toString']():''),response=await this[_0x3cd4e5(0xc6,0x55)]['get'](_0x5a470f,{'responseType':_0x3cd4e5(0x139,0x10f)});return{'data':response['data'],'error':null};}catch(_0x4119ad){return{'data':null,'error':_0x4119ad instanceof EBaaSError?_0x4119ad:new EBaaSError(_0x4119ad instanceof Error?_0x4119ad[_0x3cd4e5(0x93,0xb2)]:_0x3cd4e5(0xcc,0x5b),0x0,_0x4119ad)};}}async['list'](_0x381016,_0x23eac5){function _0x7ee452(_0x2f6d7f,_0x13acb3){return _0x30c5(_0x13acb3- -0x336,_0x2f6d7f);}try{const _0x1b6c14=new URLSearchParams();_0x381016&&_0x1b6c14['append'](_0x7ee452(-0x19f,-0x11d),_0x381016);_0x23eac5?.[_0x7ee452(-0x1a0,-0x135)]&&_0x1b6c14[_0x7ee452(-0x111,-0x176)]('limit',String(_0x23eac5['limit']));_0x23eac5?.['offset']&&_0x1b6c14['append'](_0x7ee452(-0xd2,-0x14a),String(_0x23eac5[_0x7ee452(-0x1ca,-0x14a)]));_0x23eac5?.[_0x7ee452(-0xfc,-0xd3)]&&_0x1b6c14['append']('sortBy',JSON[_0x7ee452(-0xc6,-0xe2)](_0x23eac5[_0x7ee452(-0xb2,-0xd3)]));_0x23eac5?.['search']&&_0x1b6c14['append']('search',_0x23eac5['search']);const _0xb630a7=_0x7ee452(-0x168,-0x12d)+this['bucketId']+_0x7ee452(-0x14e,-0x10d)+(_0x1b6c14[_0x7ee452(-0x120,-0x188)]()?'?'+_0x1b6c14[_0x7ee452(-0x1b3,-0x188)]():''),response=await this[_0x7ee452(-0x1cd,-0x189)][_0x7ee452(-0xde,-0xee)](_0xb630a7);return{'data':response['data'],'error':null};}catch(_0x3c3fa7){return{'data':null,'error':_0x3c3fa7 instanceof EBaaSError?_0x3c3fa7:new EBaaSError(_0x3c3fa7 instanceof Error?_0x3c3fa7[_0x7ee452(-0x11e,-0x12c)]:'Failed\x20to\x20list\x20files',0x0,_0x3c3fa7)};}}async['remove'](_0x18ff70){function _0xf94f4d(_0x34906a,_0x538100){return _0x30c5(_0x538100- -0x1a7,_0x34906a);}try{const response=await this[_0xf94f4d(-0x21,0x6)]['delete']('/storage/buckets/'+this[_0xf94f4d(0x49,0x47)]+'/files',{'data':{'paths':_0x18ff70}});return{'data':response['data'],'error':null};}catch(_0x499c67){return{'data':null,'error':_0x499c67 instanceof EBaaSError?_0x499c67:new EBaaSError(_0x499c67 instanceof Error?_0x499c67['message']:_0xf94f4d(0x12b,0xa4),0x0,_0x499c67)};}}async[_0x684fad(0x54c,0x5ca)](fromPath,_0x534abc){function _0x2bcb8d(_0x435062,_0x17f6dd){return _0x30c5(_0x435062- -0xf3,_0x17f6dd);}try{const response=await this[_0x2bcb8d(0xba,0x12a)][_0x2bcb8d(0x78,0xd)](_0x2bcb8d(0x116,0xb6)+this[_0x2bcb8d(0xfb,0xb5)]+'/files/move',{'sourceKey':fromPath,'destinationKey':_0x534abc});return{'data':response['data'],'error':null};}catch(_0x591885){return{'data':null,'error':_0x591885 instanceof EBaaSError?_0x591885:new EBaaSError(_0x591885 instanceof Error?_0x591885['message']:_0x2bcb8d(0x128,0x18a),0x0,_0x591885)};}}async['copy'](fromPath,_0x24a1f7){function _0x52dc6f(_0x1e37a4,_0x52bffb){return _0x30c5(_0x1e37a4-0x36e,_0x52bffb);}try{const response=await this['httpClient']['post'](_0x52dc6f(0x577,0x50e)+this['bucketId']+_0x52dc6f(0x533,0x576),{'sourceKey':fromPath,'destinationKey':_0x24a1f7});return{'data':response['data'],'error':null};}catch(_0x295224){return{'data':null,'error':_0x295224 instanceof EBaaSError?_0x295224:new EBaaSError(_0x295224 instanceof Error?_0x295224[_0x52dc6f(0x578,0x5ee)]:'Failed\x20to\x20copy\x20file',0x0,_0x295224)};}}async[_0x684fad(0x57e,0x576)](_0x362bc7,_0x23cd3f,_0x4efd1d){function _0x37b72e(_0x497572,_0x30ab10){return _0x30c5(_0x497572-0x1a9,_0x30ab10);}try{const response=await this['httpClient'][_0x37b72e(0x314,0x36f)]('/storage/buckets/'+this[_0x37b72e(0x397,0x329)]+'/files/'+_0x362bc7+_0x37b72e(0x3d5,0x377),{'expiresIn':_0x23cd3f,..._0x4efd1d});return{'data':response['data'],'error':null};}catch(_0x192908){return{'data':null,'error':_0x192908 instanceof EBaaSError?_0x192908:new EBaaSError(_0x192908 instanceof Error?_0x192908[_0x37b72e(0x3b3,0x3bc)]:_0x37b72e(0x402,0x46d),0x0,_0x192908)};}}['getPublicUrl'](_0x59e159,_0x1b9812){function _0x226c57(_0x339a0d,_0x4d4b8a){return _0x30c5(_0x339a0d- -0xc5,_0x4d4b8a);}const _0x39fc1d=new URLSearchParams();_0x1b9812?.['transform']&&Object[_0x226c57(0xf5,0x12b)](_0x1b9812['transform'])[_0x226c57(0x10c,0x155)](([_0x5e94ad,_0x1dffb8])=>{_0x1dffb8!==undefined&&_0x39fc1d['append'](_0x5e94ad,String(_0x1dffb8));});const _0x553033=this[_0x226c57(0xe8,0xa6)][_0x226c57(0x135,0x155)]||'',_0x419bc6=_0x553033+_0x226c57(0x144,0x145)+this[_0x226c57(0x129,0x1a8)]+'/files/'+_0x59e159+(_0x39fc1d[_0x226c57(0xe9,0x94)]()?'?'+_0x39fc1d[_0x226c57(0xe9,0x153)]():'');return{'data':{'publicUrl':_0x419bc6}};}async['getFileInfo'](_0x4e4391){function _0x35dac3(_0x5f1eed,_0x32c378){return _0x30c5(_0x5f1eed-0x3b4,_0x32c378);}try{const response=await this['httpClient']['get'](_0x35dac3(0x5bd,0x62c)+this[_0x35dac3(0x5a2,0x595)]+_0x35dac3(0x571,0x518)+_0x4e4391+'/info');return{'data':response[_0x35dac3(0x564,0x58a)],'error':null};}catch(_0x43bd0f){return{'data':null,'error':_0x43bd0f instanceof EBaaSError?_0x43bd0f:new EBaaSError(_0x43bd0f instanceof Error?_0x43bd0f['message']:_0x35dac3(0x55b,0x530),0x0,_0x43bd0f)};}}async[_0x684fad(0x494,0x45e)](_0x25cc4f,metadata){function _0x4f5dff(_0x575205,_0x4571a0){return _0x30c5(_0x575205- -0x25e,_0x4571a0);}try{const response=await this[_0x4f5dff(-0xb1,-0xc3)][_0x4f5dff(-0xaf,-0xab)](_0x4f5dff(-0x55,0xf)+this['bucketId']+'/files/'+_0x25cc4f+_0x4f5dff(-0xe2,-0x7e),{'metadata':metadata});return{'data':response['data'],'error':null};}catch(_0x51d2cb){return{'data':null,'error':_0x51d2cb instanceof EBaaSError?_0x51d2cb:new EBaaSError(_0x51d2cb instanceof Error?_0x51d2cb['message']:_0x4f5dff(-0x3c,-0x58),0x0,_0x51d2cb)};}}}class StorageClient{constructor(_0x139b86){function _0x316611(_0x3b1d93,_0x50fd21){return _0x30c5(_0x50fd21-0x24,_0x3b1d93);}this[_0x316611(0x1ac,0x1d1)]=_0x139b86;}[_0x684fad(0x4c6,0x52b)](bucketId){function _0x32a2b1(_0x52d6c8,_0x1e7d9f){return _0x30c5(_0x52d6c8- -0x30a,_0x1e7d9f);}return new StorageBucket(this[_0x32a2b1(-0x15d,-0x12d)],bucketId);}async[_0x684fad(0x53a,0x540)](_0x1d9f36,_0x4343f0){function _0x10d61a(_0x4b23bb,_0x269042){return _0x30c5(_0x269042- -0x1dc,_0x4b23bb);}try{const response=await this[_0x10d61a(-0xb6,-0x2f)]['post']('/storage/buckets',{'id':_0x1d9f36,..._0x4343f0});return{'data':response['data'],'error':null};}catch(_0x5555f3){return{'data':null,'error':_0x5555f3 instanceof EBaaSError?_0x5555f3:new EBaaSError(_0x5555f3 instanceof Error?_0x5555f3['message']:_0x10d61a(-0x56,-0x4b),0x0,_0x5555f3)};}}async['getBucket'](_0x4201a1){function _0x532386(_0x40d927,_0x2c83e8){return _0x30c5(_0x40d927- -0x2d2,_0x2c83e8);}try{const response=await this[_0x532386(-0x125,-0x114)][_0x532386(-0x8a,-0x77)]('/storage/buckets/'+_0x4201a1);return{'data':response['data'],'error':null};}catch(_0x242572){return{'data':null,'error':_0x242572 instanceof EBaaSError?_0x242572:new EBaaSError(_0x242572 instanceof Error?_0x242572[_0x532386(-0xc8,-0xb6)]:'Failed\x20to\x20get\x20bucket',0x0,_0x242572)};}}async[_0x684fad(0x513,0x49a)](){function _0x203bbc(_0x5787b6,_0x485aee){return _0x30c5(_0x485aee-0x23c,_0x5787b6);}try{const response=await this[_0x203bbc(0x453,0x3e9)]['get']('/storage/buckets');return{'data':response[_0x203bbc(0x3b2,0x3ec)],'error':null};}catch(_0x4e9b9d){return{'data':null,'error':_0x4e9b9d instanceof EBaaSError?_0x4e9b9d:new EBaaSError(_0x4e9b9d instanceof Error?_0x4e9b9d[_0x203bbc(0x432,0x446)]:_0x203bbc(0x49d,0x416),0x0,_0x4e9b9d)};}}async['updateBucket'](_0x1c9c0d,_0x32b4ae){function _0x1875c3(_0x5cc284,_0x4b2d65){return _0x30c5(_0x5cc284-0x1dc,_0x4b2d65);}try{const response=await this[_0x1875c3(0x389,0x3ae)]['put']('/storage/buckets/'+_0x1c9c0d,_0x32b4ae);return{'data':response['data'],'error':null};}catch(_0x567f28){return{'data':null,'error':_0x567f28 instanceof EBaaSError?_0x567f28:new EBaaSError(_0x567f28 instanceof Error?_0x567f28[_0x1875c3(0x3e6,0x3a1)]:_0x1875c3(0x3aa,0x35b),0x0,_0x567f28)};}}async['deleteBucket'](_0x5882f1){function _0x3e42f7(_0x41959c,_0x25fdd0){return _0x30c5(_0x41959c- -0x16f,_0x25fdd0);}try{const response=await this[_0x3e42f7(0x3e,0xa7)]['delete']('/storage/buckets/'+_0x5882f1);return{'data':response['data'],'error':null};}catch(_0x1ed502){return{'data':null,'error':_0x1ed502 instanceof EBaaSError?_0x1ed502:new EBaaSError(_0x1ed502 instanceof Error?_0x1ed502[_0x3e42f7(0x9b,0xb2)]:_0x3e42f7(0x45,0xaa),0x0,_0x1ed502)};}}async['getUsage'](){try{const response=await this['httpClient']['get']('/storage/usage');return{'data':response['data'],'error':null};}catch(_0xcae998){return{'data':null,'error':_0xcae998 instanceof EBaaSError?_0xcae998:new EBaaSError(_0xcae998 instanceof Error?_0xcae998['message']:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0xcae998)};}}}class EventManager{constructor(){function _0x2bfe90(_0x24f6d4,_0x37108d){return _0x30c5(_0x24f6d4- -0xf3,_0x37108d);}this[_0x2bfe90(0x169,0x1f1)]=new Map(),this['maxListeners']=0xa;}['on'](_0x2e0bae,_0x2e6fbc){!this['events']['has'](_0x2e0bae)&&this[_0x1c8cce(0x578,0x567)]['set'](_0x2e0bae,new Set());function _0x1c8cce(_0x12fc4c,_0x2308d8){return _0x30c5(_0x12fc4c-0x31c,_0x2308d8);}this['events']['get'](_0x2e0bae)['add'](_0x2e6fbc);}['off'](_0x3cd215,_0x2399d3){if(!this['events']['has'](_0x3cd215))return;function _0x31d09b(_0x24908e,_0x16b70c){return _0x30c5(_0x16b70c- -0xa0,_0x24908e);}const _0x5dd375=this['events'][_0x31d09b(0x211,0x1a8)](_0x3cd215);_0x2399d3?_0x5dd375[_0x31d09b(0x1ba,0x190)](_0x2399d3):_0x5dd375['clear'](),_0x5dd375[_0x31d09b(0x128,0x195)]===0x0&&this['events'][_0x31d09b(0x12f,0x190)](_0x3cd215);}['emit'](_0x39d9e4,..._0xc27fd3){if(!this[_0x2a7115(0xba,0xcf)]['has'](_0x39d9e4))return![];function _0x2a7115(_0x1f86b9,_0x50dccb){return _0x30c5(_0x1f86b9- -0x1a2,_0x50dccb);}const _0x444772=this['events']['get'](_0x39d9e4);for(const _0xb28fcd of _0x444772){try{_0xb28fcd(..._0xc27fd3);}catch(_0x4a58b3){console['error'](_0x2a7115(0xa,0x66)+_0x39d9e4+'\x22:',_0x4a58b3);}}return _0x444772[_0x2a7115(0x93,0x4c)]>0x0;}['removeAllListeners'](_0x174de7){function _0x2b3768(_0xae50a6,_0xb9cfa0){return _0x30c5(_0xae50a6-0x38f,_0xb9cfa0);}_0x174de7?this['events'][_0x2b3768(0x5bf,0x572)](_0x174de7):this['events']['clear']();}['listenerCount'](_0x52d382){function _0x5922c1(_0x3e2528,_0x466656){return _0x30c5(_0x3e2528-0x272,_0x466656);}return this['events'][_0x5922c1(0x4ba,0x4ad)](_0x52d382)?.['size']??0x0;}['eventNames'](){function _0x186aa3(_0x177ce1,_0x429765){return _0x30c5(_0x177ce1-0x103,_0x429765);}return Array[_0x186aa3(0x29d,0x276)](this['events']['keys']());}[_0x684fad(0x512,0x498)](_0x2a53cc){function _0x229d45(_0x229b83,_0x555f8a){return _0x30c5(_0x229b83-0x9e,_0x555f8a);}return Array[_0x229d45(0x238,0x284)](this[_0x229d45(0x2fa,0x2a2)]['get'](_0x2a53cc)??[]);}['addListener'](_0x4dae67,_0x3abf53){this['on'](_0x4dae67,_0x3abf53);}['removeListener'](_0x645e99,_0x394ad7){this['off'](_0x645e99,_0x394ad7);}[_0x684fad(0x504,0x48a)](_0x17be6e,_0x14b231){const _0x93878e=(..._0x153bb5)=>{function _0x45f239(_0x3cce78,_0x47dd10){return _0x30c5(_0x3cce78- -0x1e2,_0x47dd10);}this[_0x45f239(-0x24,-0x4d)](_0x17be6e,_0x93878e),_0x14b231(..._0x153bb5);};this['on'](_0x17be6e,_0x93878e);}[_0x684fad(0x52c,0x4ab)](_0x4de672,_0x13188a){this['on'](_0x4de672,_0x13188a);}['prependOnceListener'](_0x588b2b,_0xf221fd){const _0x209be0=(..._0xaec049)=>{this['off'](_0x588b2b,_0x209be0),_0xf221fd(..._0xaec049);};this['on'](_0x588b2b,_0x209be0);}[_0x684fad(0x525,0x5ab)](_0x15640e){return this['maxListeners']=_0x15640e,this;}[_0x684fad(0x4bc,0x4c6)](){function _0x41f076(_0x40c632,_0xa6bd00){return _0x30c5(_0xa6bd00-0x38a,_0x40c632);}return this[_0x41f076(0x56a,0x509)];}['rawListeners'](_0x4675a4){function _0x4f6fb3(_0x36bdf0,_0x5712e6){return _0x30c5(_0x5712e6-0x18a,_0x36bdf0);}return this[_0x4f6fb3(0x34a,0x370)](_0x4675a4);}}class RealtimeChannel extends EventManager{constructor(_0x1952f7,_0x25e2d8){super();function _0x345c96(_0x3a018c,_0xfe0f62){return _0x30c5(_0xfe0f62-0x20b,_0x3a018c);}this[_0x345c96(0x42b,0x45a)]=![],this['state']='closed',this[_0x345c96(0x3e7,0x3ab)]=new Map(),this[_0x345c96(0x3ea,0x3ec)]=_0x1952f7,this[_0x345c96(0x407,0x399)]=_0x25e2d8;}['subscribe'](_0x30e4fd){!this[_0x1c0d6b(0x10f,0xe3)]&&(this[_0x1c0d6b(0xfd,0xe3)]=!![],this['_join']());function _0x1c0d6b(_0x22bd8c,_0x4759f0){return _0x30c5(_0x4759f0- -0x16c,_0x22bd8c);}return _0x30e4fd&&this['on']('status',_0x30e4fd),this;}[_0x684fad(0x591,0x533)](filter,_0x541f54){const _0x6769ad='postgres_changes:'+JSON['stringify'](filter);this['on'](_0x6769ad,_0x541f54);const _0x2035cb={'unsubscribe':()=>{function _0x432209(_0x38ff80,_0x114b47){return _0x30c5(_0x114b47-0xe6,_0x38ff80);}this[_0x432209(0x2d4,0x2a4)](_0x6769ad,_0x541f54),this[_0x432209(0x2b2,0x286)]['delete'](_0x6769ad);}};this[_0xd9210d(-0x23b,-0x1ff)][_0xd9210d(-0x27c,-0x26d)](_0x6769ad,_0x2035cb);function _0xd9210d(_0x4bf96c,_0x365999){return _0x30c5(_0x4bf96c- -0x3db,_0x365999);}return this['socket']?.['connected']&&this['state']===_0xd9210d(-0x26e,-0x1f6)&&this[_0xd9210d(-0x24d,-0x1f5)]['emit'](_0xd9210d(-0x244,-0x1f3),{'topic':this[_0xd9210d(-0x1fa,-0x260)],'filter':filter,'ref':this['makeRef']()}),_0x2035cb;}[_0x684fad(0x4b6,0x4cd)](filter,_0x5120c1){const _0x4b34da='broadcast:'+JSON[_0x357b46(0x46a,0x4c0)](filter);this['on'](_0x4b34da,_0x5120c1);function _0x357b46(_0x563aea,_0x3a5cd4){return _0x30c5(_0x563aea-0x216,_0x3a5cd4);}const _0x3495dd={'unsubscribe':()=>{this['off'](_0x4b34da,_0x5120c1),this['subscriptions']['delete'](_0x4b34da);}};return this[_0x357b46(0x3b6,0x3b4)]['set'](_0x4b34da,_0x3495dd),_0x3495dd;}[_0x684fad(0x599,0x5a8)](filter,_0x1e5956){const _0x522b03='presence:'+JSON['stringify'](filter);this['on'](_0x522b03,_0x1e5956);function _0x445406(_0x22ab82,_0x9b6606){return _0x30c5(_0x22ab82-0x1cf,_0x9b6606);}const _0x2b8fe6={'unsubscribe':()=>{this[_0x4a41a4(0xf7,0xad)](_0x522b03,_0x1e5956);function _0x4a41a4(_0xed1921,_0xf27306){return _0x30c5(_0xed1921- -0xc7,_0xf27306);}this[_0x4a41a4(0xd9,0x117)]['delete'](_0x522b03);}};return this['subscriptions'][_0x445406(0x32e,0x333)](_0x522b03,_0x2b8fe6),_0x2b8fe6;}['send'](_0x28be1c){return new Promise(_0x3382cf=>{function _0x8ea1a1(_0x1ad8fa,_0x4dd258){return _0x30c5(_0x4dd258- -0x2bf,_0x1ad8fa);}this['socket']?.['connected']&&this['state']===_0x8ea1a1(-0x11f,-0x152)?(this[_0x8ea1a1(-0x11b,-0x131)]['emit'](_0x8ea1a1(-0xb8,-0x139),{'topic':this['topic'],'event':_0x28be1c[_0x8ea1a1(-0x14,-0x8c)],'payload':_0x28be1c,'ref':this['makeRef']()}),_0x3382cf('ok')):_0x3382cf('error');});}[_0x684fad(0x57f,0x56f)](_0x47e8f9){return new Promise(_0x112aad=>{function _0x11b6b4(_0x506dcb,_0x277c76){return _0x30c5(_0x506dcb-0x21f,_0x277c76);}this[_0x11b6b4(0x3ad,0x3ce)]?.[_0x11b6b4(0x3f4,0x3aa)]&&this['state']===_0x11b6b4(0x38c,0x33d)?(this[_0x11b6b4(0x3ad,0x375)][_0x11b6b4(0x3fb,0x42a)]('presence',{'topic':this[_0x11b6b4(0x400,0x436)],'event':'track','payload':_0x47e8f9,'ref':this['makeRef']()}),_0x112aad('ok')):_0x112aad(_0x11b6b4(0x393,0x39a));});}['untrack'](){return new Promise(_0x59fac5=>{function _0x3b0902(_0x2dd050,_0x43527b){return _0x30c5(_0x43527b-0x84,_0x2dd050);}this['socket']?.[_0x3b0902(0x1ec,0x259)]&&this[_0x3b0902(0x1b1,0x1f5)]==='joined'?(this[_0x3b0902(0x223,0x212)]['emit'](_0x3b0902(0x1db,0x23c),{'topic':this['topic'],'event':_0x3b0902(0x2ee,0x2bf),'ref':this[_0x3b0902(0x299,0x267)]()}),_0x59fac5('ok')):_0x59fac5('error');});}['unsubscribe'](){return new Promise(_0x375bff=>{this[_0x4500c8(0x2c4,0x2a0)]='leaving',this['subscriptions'][_0x4500c8(0x2e9,0x300)](_0x4de785=>{function _0x1b28a8(_0x2dcf77,_0x47b89d){return _0x30c5(_0x2dcf77-0x240,_0x47b89d);}_0x4de785[_0x1b28a8(0x46f,0x4b0)]();}),this[_0x4500c8(0x345,0x2cf)][_0x4500c8(0x38f,0x38d)]();this['socket']?.[_0x4500c8(0x2f7,0x304)]&&this['socket'][_0x4500c8(0x35c,0x30b)](_0x4500c8(0x2a5,0x306),{'topic':this[_0x4500c8(0x304,0x310)],'ref':this[_0x4500c8(0x320,0x312)]()});this[_0x4500c8(0x2e8,0x2a0)]=_0x4500c8(0x33d,0x375),this[_0x4500c8(0x27a,0x2f2)]();function _0x4500c8(_0x49211e,_0x50cdc6){return _0x30c5(_0x50cdc6-0x12f,_0x49211e);}_0x375bff('ok');});}['_join'](){function _0x21db74(_0x5cf96c,_0x374bce){return _0x30c5(_0x5cf96c- -0x11e,_0x374bce);}if(this[_0x21db74(0x53,0x28)]==='leaving')return;this['state']=_0x21db74(0x7d,0xd4),this['socket']?.['connected']&&(this['socket'][_0x21db74(0xbe,0x4d)](_0x21db74(0x122,0x135),{'topic':this['topic'],'ref':this['makeRef']()}),setTimeout(()=>{function _0x3a67e2(_0x38820e,_0x35054c){return _0x30c5(_0x35054c- -0x246,_0x38820e);}this[_0x3a67e2(-0x13a,-0xd5)]==='joining'&&(this['state']=_0x3a67e2(-0x137,-0xd9),this[_0x3a67e2(-0xd8,-0x6a)]('status',_0x3a67e2(-0x63,-0x7f)));},0x64));}['_rejoin'](){function _0x327e80(_0x5b7cb1,_0x28d13c){return _0x30c5(_0x28d13c- -0x3c9,_0x5b7cb1);}this[_0x327e80(-0x1c9,-0x17a)]&&(this['_join'](),this[_0x327e80(-0x266,-0x229)]['forEach']((_0x3ac344,_0x22114e)=>{function _0x398e94(_0x2e1e1b,_0x231296){return _0x30c5(_0x2e1e1b- -0x7,_0x231296);}if(_0x22114e['startsWith']('postgres_changes:')){const filter=JSON[_0x398e94(0x15f,0x1df)](_0x22114e[_0x398e94(0x251,0x2a8)](_0x398e94(0x17e,0x1bb),''));this[_0x398e94(0x187,0x176)]?.['emit'](_0x398e94(0x190,0x1ee),{'topic':this[_0x398e94(0x1da,0x157)],'filter':filter,'ref':this['makeRef']()});}}));}[_0x684fad(0x4d2,0x4f3)](_0x41800f,_0x245698){function _0x1a3563(_0x4495a8,_0x3879f0){return _0x30c5(_0x3879f0-0x3a9,_0x4495a8);}if(_0x41800f==='postgres_changes'){const _0x43eb58=_0x1a3563(0x572,0x52e)+JSON[_0x1a3563(0x5b4,0x5fd)](_0x245698[_0x1a3563(0x594,0x5ca)]||{});this['emit'](_0x43eb58,_0x245698);}else{if(_0x41800f==='broadcast'){const _0x4f98d3='broadcast:'+JSON['stringify']({'event':_0x245698[_0x1a3563(0x5ff,0x5dc)]});this[_0x1a3563(0x5ca,0x585)](_0x4f98d3,_0x245698);}else{if(_0x41800f==='presence'){const _0x33dd37=_0x1a3563(0x66c,0x600)+JSON['stringify']({'event':_0x245698['event']});this['emit'](_0x33dd37,_0x245698);}}}this['emit'](_0x41800f,_0x245698);}['_setState'](_0x543fb7){function _0x3b4e4a(_0x2e1222,_0x219f16){return _0x30c5(_0x219f16- -0x33e,_0x2e1222);}this['state']=_0x543fb7;let status;switch(_0x543fb7){case'joined':status='SUBSCRIBED';break;case _0x3b4e4a(-0x159,-0xf9):status='CHANNEL_ERROR';break;case'closed':status=_0x3b4e4a(-0x12f,-0x15a);break;default:return;}this[_0x3b4e4a(-0x1e1,-0x162)](_0x3b4e4a(-0xfc,-0x129),status);}[_0x684fad(0x50f,0x49b)](){function _0xf5b85f(_0x3443e6,_0x3cea22){return _0x30c5(_0x3443e6-0x29f,_0x3cea22);}return Math['random']()[_0xf5b85f(0x44d,0x406)](0x24)[_0xf5b85f(0x508,0x501)](0x2,0xf);}[_0x684fad(0x520,0x591)](){return this['state'];}}function _0x5035(){const _0x39a6b2=['l2vUDG','l2f1DgGVDJeVCMvMCMvZAa','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','zgvSzxrLt3b0Aw9UCW','BMfTzq','zM9YrwfJAa','zgv0zwn0q3vZDg9Trgf0ywjHC2u','y2HHBM5LBa','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','y29UBMvJDgvK','zgvMyxvSDhm','BgvHDMu','B25Jzq','AwXPA2u','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','zxHLy3v0zq','zw1PDa','nJm3tM1htfDM','C2v0v29YA3nWywnLswq','BhrL','DxbKyxrLrw52','Dg9WAwm','y29UDgfPBNm','BwfRzvjLzG','q0Xpu0ve','ChvZAa','BgLZDgvUzxjZ','BgLZDej1y2TLDhm','AgfUzgXLrxjYB3i','rMfPBgvKihrVigDLDcbMDw5JDgLVBG','Bgv2zwW','yxv0Aa','B2zMC2v0','AgvHzgvYCW','yNvJA2v0swq','DMfSDwu','mty1nduXmZbpzMTbCwm','C29JA2v0lMLVlwnSAwvUDa','y29TBw9U','ywnJzxnZx3rVA2vU','z2v0u3rHDgu','C2v0u2vZC2LVBG','yNjVD3nLCG','z2XVyMfS','zw50CNLWB2LUDa','C2v0twf4tgLZDgvUzxjZ','yMfZzvvsta','zg93BMXVywq','Ec10B3rHBc1JB3vUDa','l3jWyY8','y29UBMvJDa','CxvLCNK','ChjLCgvUzeXPC3rLBMvY','BgLTAxq','ntG5mty0m2HkCe9Yva','mtmZmdK3oer0CfHpvW','C2vSzwn0','y29UBMvJDgLVBLn0yxrL','Dg9vChbLCKnHC2u','Bwv0ywrHDge','lMfZyW','l3n0B3jHz2uVyNvJA2v0CY8','BwvZC2fNzq','nNfPsKz1DW','CgvYAw9K','ChjVzhvJDa','y3jLyxrLqNvJA2v0','zxHLy3v0zvf1zxj5','sfruucbYzxf1zxn0igzHAwXLza','BgvUz3rO','BxvSDgLWyxj0l2zVCM0Tzgf0yq','Cg9ZDgDYzxniB3n0','Aw1WB3j0twfW','C3rHDhvZ','nZuXmdi2zuHgsgvM','C3rHDhvZvgv4Da','DgfIBgu','ChjLzML4','C2LNBLvW','rMfPBgvKihrVig1VDMuGzMLSzq','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','l2z1BMn0Aw9UCY92ms8','D2fYBG','yxv0B0rLDgvJDen1C3rVBurHDgfIyxnL','Bw92zq','zMLSDgvY','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','zgv0zwn0zwrdB25MAwC','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','y2fJAgvdB250CM9S','mtm5ndK2vhDYtfPc','B3bLCMf0B3i','l2zPBgvZ','B3bLCMf0Aw9U','y3jLzgvUDgLHBhm','l3nPz24','C2v0DxbizwfYDgjLyxq','z2v0sxrLBq','Dw5ZDwjZy3jPyMu','zgvSzxrL','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','x3nLDfn0yxrL','zxzLBNq','BgLRzq','C2L6zq','lMrLC2m','C2LNBKLU','l2f1DgGVDJeVC2rRl3nPz25PBG','yxbPs2v5','l21LDhjPy3m','Dw50CMfJAW','B3jKzxi','CMvJB25Uzwn0qxr0zw1WDhm','C29JA2v0qwrHChrLCG','DMfSDwvZ','AM9PBG','y3vYCMvUDfnLC3nPB24','l2f1DgGVDJeVDxnLCG','Dgv4Dc9WBgfPBG','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','zxjYB3jLza','y2XVC2vK','CMvMCMvZAfnLC3nPB24','z2v0','zgf0yufYCMf5','zw52','rMfPBgvKihrVihjLBw92zsbMAwXLCW','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','CMvZzxrqyxnZD29Yza','CMvXDwvZDa','AM9PBMvKt25Jzq','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','C3rHy2S','y3jLyxrLu2LNBMvKvxjS','DhjHy2S','C3rYAw5NAwz5','DgvZDenVBM5Ly3rPB24','CMvMCMvZAf90B2TLBG','ChjLC2vUy2u6','CMvWBgfJzq','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','igf0DgvTChrZoIa','yNvJA2v0','zxzLBNrZ','z2v0tg9NCW','y2XLyxi','qMvHCMvYia','ms4XlJG','C3rYAw5N','wc1xB3jRC3bHy2uTsuq','C29YDej5','Aw52B2TL','B25qB3n0z3jLC0nOyw5Nzxm','D2vIC29JA2v0','yMXVyG','AxnvC2LUz0n1C3rVBurHDgfIyxnL','C3vIC3rYAw5N','Bg9HzfnLC3nPB24','CMvZCg9UC2u','rMfPBgvKihrVihvWBg9HzcbMAwXL','B25qCMvZzw5Jzq','z2v0twv0CMLJCW','CMvTB3zLqxv0AfrVA2vU','C2v0','z2v0v29YA3nWywnLswq','C3rVCMfNzq','zMLSDgvYCW','CMvTB3zLq3vZDg9Trgf0ywjHC2u','Bg9N','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','CgfYC2u','l3nKAY92ms8','DxbKyxrLrMLSzu1LDgfKyxrH','CMfUz2u','l2z1BMn0Aw9UCY92mq','Cg9ZDa','ChvIBgLJ','AM9PBMvK','BM9Kzq','DxbKyxrLt3b0Aw9UCW','y3jLyxrL','C3rHDgu','C2vZC2LVBG','C2nOzw1H','zxjYB3i','y2fWDhvYzvn0ywnRvhjHy2u','p29WzxjHDgLVBJ1PBNnLCNq','yM9KEq','C2v0sxrLBq','y29SDw1U','y29UBMvJDf9LCNjVCG','C2v0u2vZC2LVBKLUDgvYBMfS','l21LDgfKyxrH','Bwf0y2G','zwjHyxmUyxv0Ac5ZzxnZAw9U','Bwf4tgLZDgvUzxjZ','z2v0q2HHBM5LBhm','x2DLDfnVy2TLDa','y2XPzw50','AgfZq3vZDg9Trgf0ywjHC2u','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','Cg9ZDgDYzxnFy2HHBMDLCZO','yNjVywrJyxn0','DxbKyxrLrgf0yq','DxjS','D29YA3nWywnLswq','B25cCM9HzgnHC3q','zgLZy29UBMvJDa','y29UzMLN','DhjHBNnMB3jT','C29JA2v0','B3b0Aw9UCW','z2v0twf4tgLZDgvUzxjZ','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','C3nSrw5HyMXLza','y2XLyxjtzxnZAw9U','y3vYCMvUDfnJAgvTyq','AgfUzgXLqxv0AevYCM9Y','Cg9ZDgDYzxnFy2HHBMDLCW','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','Cgf0y2G','y2HHBM5LBhm','zNjVBq','AM9PBMLUzW','l2f1DgGVDJeVC2LNBM91Da','zgLZy29UBMvJDgvK','Aw5PDgLHBgL6zun1C3rVBurHDgfIyxnL','CMvQzwn0','C3vIC2nYAxb0Aw9UCW','DMvYAwz5','CNbJ','Cg9ZDgDYzxneyxrHyMfZzq','DgLTzw91Da','zNvUy3rPB25Z','x3rYAwDNzxi','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','AxndB25Uzwn0zwq','DxnL','mJe4mJe2uMPxEfb1','CMvHy3qTBMf0AxzL','rxjYB3iGAw4GzxzLBNqGBgLZDgvUzxiGzM9Yici','Ahr0CenSAwvUDa','Dg9tDhjPBMC','Chv0','zgf0yq','zMLSzq','ngzrzejbvW','rMfPBgvKihrVigrVD25SB2fKigzPBgu','rMfPBgvKihrVigrLBgv0zsbIDwnRzxq','C3bSAxq','CMvZB2X2zq','zgv0ywLSCW','ChjLC2vUy2u','l2f1DgGVDJeVC2LNBNvW','zw50CMLLCW','C2v0qxv0AfrVA2vU','DMvYC2LVBNm','l2zPBgvZlW','B2zM','y29Kzq','yxbWzw5K','Dw5KzwzPBMvK','mJaZnJqXmgPRENPqsG','CMvTB3zLqwXStgLZDgvUzxjZ','AgfZ','l2zPBgvZl2nVChK','C2LNBK91Da','u1vcu0nssujfra','z2v0u3rHDhvZ','y29UDgvUDfr5Cgu','zgf0ywjHC2u','vw5RBM93BIbLCNjVCG'];_0x5035=function(){return _0x39a6b2;};return _0x5035();}function getEnvironment(){if(typeof navigator!=='undefined'&&navigator[_0x5e0f19(-0x77,-0xc2)]==='ReactNative')return _0x5e0f19(-0xd9,-0x55);if(typeof window!==_0x5e0f19(-0xc3,-0x139)&&typeof document!==_0x5e0f19(-0xc3,-0x77))return _0x5e0f19(-0x8e,-0x9b);function _0x5e0f19(_0x3e0575,_0x210cff){return _0x30c5(_0x3e0575- -0x284,_0x210cff);}if(typeof global!==_0x5e0f19(-0xc3,-0x4d)&&typeof process!==_0x5e0f19(-0xc3,-0x101)&&process[_0x5e0f19(-0xc8,-0x44)]?.['node'])return _0x5e0f19(-0x116,-0xaa);return _0x5e0f19(-0x8e,-0x38);}function isSocketIOAvailable(){function _0x243993(_0x28fa42,_0x28577d){return _0x30c5(_0x28577d-0x1b6,_0x28fa42);}try{const _0x420812=getEnvironment();switch(_0x420812){case _0x243993(0x2cd,0x324):return typeof require!==_0x243993(0x366,0x377)&&require['resolve']&&!!require[_0x243993(0x2ee,0x36c)](_0x243993(0x3cf,0x3a7));case _0x243993(0x3aa,0x3ac):if(typeof globalThis!==_0x243993(0x300,0x377)&&'io'in globalThis)return!![];return typeof require!==_0x243993(0x343,0x377)&&require[_0x243993(0x2f8,0x36c)]&&!!require['resolve']('socket.io-client');case'react-native':try{return typeof require!=='undefined'&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x1eef33(_0x11a61f,_0x31f697){return _0x30c5(_0x11a61f- -0x295,_0x31f697);}try{if(typeof require!==_0x1eef33(-0xd4,-0xfe))return require(_0x1eef33(-0xa4,-0xf0));if(typeof globalThis!=='undefined'&&'io'in globalThis)return{'io':globalThis['io']};throw new Error('socket.io-client\x20not\x20available');}catch(_0x3f1840){throw new Error('Socket.io-client\x20não\x20está\x20disponível\x20neste\x20ambiente.\x20Para\x20usar\x20funcionalidades\x20de\x20realtime,\x20instale:\x20npm\x20install\x20socket.io-client');}}class WebSocketAdapter{constructor(){function _0x4d6290(_0x2caf29,_0x44088d){return _0x30c5(_0x44088d-0x19c,_0x2caf29);}this[_0x4d6290(0x2cf,0x32a)]=null;}async['connect'](_0x311f16,_0x41c251){if(!isSocketIOAvailable())throw new Error('Socket.io-client não está disponível. Para usar funcionalidades de realtime, instale: npm install socket.io-client');const {io:_0x2fbb6e}=getSocketIO();return new Promise((_0x4d832b,_0x4b1e54)=>{function _0x3c7237(_0x128811,_0x9b0da2){return _0x30c5(_0x9b0da2-0x306,_0x128811);}this['socket']=_0x2fbb6e(_0x311f16,_0x41c251),this[_0x3c7237(0x4e3,0x494)]['on']('connect',()=>_0x4d832b()),this['socket']['on'](_0x3c7237(0x452,0x480),_0x33ba83=>_0x4b1e54(_0x33ba83));});}[_0x684fad(0x4b7,0x44b)](){function _0x43be1a(_0x59c2e1,_0x1623f9){return _0x30c5(_0x1623f9- -0x27b,_0x59c2e1);}this[_0x43be1a(-0x11a,-0xed)]&&(this[_0x43be1a(-0x10c,-0xed)][_0x43be1a(-0x8a,-0xf0)](),this[_0x43be1a(-0x8c,-0xed)]=null);}['emit'](_0x5c2ba2,data){function _0xdedf0b(_0x4952b2,_0x14a518){return _0x30c5(_0x14a518-0x137,_0x4952b2);}this[_0xdedf0b(0x310,0x2c5)]?.['emit'](_0x5c2ba2,data);}['on'](_0x8bb0af,_0x42c832){this['socket']?.['on'](_0x8bb0af,_0x42c832);}['off'](_0x5b755d,_0x58e971){function _0x410588(_0x138463,_0x4ac6b4){return _0x30c5(_0x138463- -0x1dc,_0x4ac6b4);}_0x58e971?this[_0x410588(-0x4e,-0xb5)]?.[_0x410588(-0x1e,-0xd)](_0x5b755d,_0x58e971):this['socket']?.['off'](_0x5b755d);}get['connected'](){function _0x5705ea(_0x263f17,_0x454604){return _0x30c5(_0x263f17-0x35c,_0x454604);}return this[_0x5705ea(0x4ea,0x474)]?.[_0x5705ea(0x531,0x4f4)]??![];}}class ReactNativeSocketAdapter{constructor(){function _0x508dcd(_0x422719,_0x481417){return _0x30c5(_0x422719-0x26a,_0x481417);}this[_0x508dcd(0x3f8,0x472)]=null;}async['connect'](_0x3dd7ec,_0x5b3d15){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x2583ec}=getSocketIO();return new Promise((_0x10ddab,_0x8d0b2d)=>{this[_0x11680e(0x25b,0x1dc)]=_0x2583ec(_0x3dd7ec,{..._0x5b3d15,'transports':['websocket'],'upgrade':![],'autoConnect':!![]});function _0x11680e(_0x4780f5,_0x376d26){return _0x30c5(_0x4780f5-0xcd,_0x376d26);}this[_0x11680e(0x25b,0x1d2)]['on'](_0x11680e(0x2cb,0x319),()=>_0x10ddab()),this[_0x11680e(0x25b,0x2b6)]['on']('connect_error',_0x10f902=>_0x8d0b2d(_0x10f902));});}[_0x684fad(0x4b7,0x462)](){function _0x45476(_0x4fd04e,_0x44d778){return _0x30c5(_0x44d778-0x1f,_0x4fd04e);}this[_0x45476(0x22d,0x1ad)]&&(this[_0x45476(0x164,0x1ad)][_0x45476(0x1e4,0x1aa)](),this['socket']=null);}['emit'](_0x2ae6aa,data){function _0x20b8d3(_0x46562a,_0x5dffc9){return _0x30c5(_0x46562a- -0x7d,_0x5dffc9);}this[_0x20b8d3(0x111,0x8e)]?.[_0x20b8d3(0x15f,0x1c8)](_0x2ae6aa,data);}['on'](_0x506e56,_0x39b854){this['socket']?.['on'](_0x506e56,_0x39b854);}['off'](_0x387442,_0x2d3d4d){function _0x3e103f(_0x357da4,_0x5df6be){return _0x30c5(_0x5df6be-0x31f,_0x357da4);}_0x2d3d4d?this['socket']?.[_0x3e103f(0x46b,0x4dd)](_0x387442,_0x2d3d4d):this[_0x3e103f(0x46f,0x4ad)]?.[_0x3e103f(0x4cc,0x4dd)](_0x387442);}get['connected'](){function _0x1ce830(_0x37b2fa,_0x313040){return _0x30c5(_0x37b2fa-0x23,_0x313040);}return this['socket']?.[_0x1ce830(0x1f8,0x20f)]??![];}}function createSocketAdapter(){const _0x2b8ff7=getEnvironment();function _0x2c8fc5(_0x5e8254,_0x154169){return _0x30c5(_0x5e8254- -0x279,_0x154169);}switch(_0x2b8ff7){case'react-native':return new ReactNativeSocketAdapter();case _0x2c8fc5(-0x83,-0xa0):case _0x2c8fc5(-0x10b,-0x151):default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x170c7f,_0x2a2877,_0x11b778={}){this[_0x7c0117(0x4e8,0x55d)]=null,this['channels']=new Map(),this['connectionState']=_0x7c0117(0x4f7,0x4c0),this[_0x7c0117(0x597,0x59f)]=0x0,this[_0x7c0117(0x5aa,0x597)]=0x5;function _0x7c0117(_0xd8a976,_0xe0fdbb){return _0x30c5(_0xd8a976-0x35a,_0xe0fdbb);}this['url']=_0x170c7f,this[_0x7c0117(0x593,0x58a)]=_0x2a2877,this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x11b778},this['socketAdapter']=createSocketAdapter();}[_0x684fad(0x52a,0x4f1)](){return new Promise(async(_0x2f8db7,_0x38f07b)=>{if(this['socketAdapter']['connected']){_0x2f8db7();return;}this[_0x3cdfd6(0x219,0x194)]='connecting';function _0x3cdfd6(_0x3d32b4,_0xf3aa1e){return _0x30c5(_0x3d32b4-0x14,_0xf3aa1e);}try{await this[_0x3cdfd6(0x252,0x2d5)][_0x3cdfd6(0x212,0x261)](this[_0x3cdfd6(0x19c,0x11e)],{'auth':{'apikey':this[_0x3cdfd6(0x24d,0x257)]},'transports':[_0x3cdfd6(0x27a,0x23c)],'reconnection':!![],'reconnectionDelay':this['options']['reconnectInterval'],'reconnectionAttempts':this[_0x3cdfd6(0x1a3,0x212)][_0x3cdfd6(0x264,0x239)],...this[_0x3cdfd6(0x1a3,0x215)]['socketOptions']}),this['socket']=this[_0x3cdfd6(0x252,0x259)]['socket'],this['socketAdapter']['on']('connect',()=>{this[_0x2c7625(-0x1ca,-0x228)]='connected',this['reconnectAttempts']=0x0;function _0x2c7625(_0x9bb862,_0x23fad8){return _0x30c5(_0x9bb862- -0x3cf,_0x23fad8);}this[_0x2c7625(-0x1a2,-0x12e)](),_0x2f8db7();}),this[_0x3cdfd6(0x252,0x1ef)]['on'](_0x3cdfd6(0x19f,0x1c7),()=>{function _0x35b411(_0x5a1ccb,_0x3c5537){return _0x30c5(_0x5a1ccb-0x3e7,_0x3c5537);}this['connectionState']=_0x35b411(0x584,0x5df),this[_0x35b411(0x580,0x5e9)][_0x35b411(0x5b8,0x56d)](channel=>{function _0x5f2a55(_0x3f4003,_0x31b01c){return _0x30c5(_0x31b01c-0x32a,_0x3f4003);}channel[_0x5f2a55(0x4df,0x55c)](_0x5f2a55(0x4ec,0x570));});}),this['socketAdapter']['on'](_0x3cdfd6(0x18e,0x112),_0x330b0d=>{this[_0x5adad9(-0xfa,-0xcf)]='error',this['reconnectAttempts']++;function _0x5adad9(_0x37b43d,_0x4f0387){return _0x30c5(_0x37b43d- -0x2ff,_0x4f0387);}this[_0x5adad9(-0xc2,-0xf8)]>=this['maxReconnectAttempts']&&_0x38f07b(new Error('Failed\x20to\x20connect\x20after\x20'+this[_0x5adad9(-0xaf,-0x80)]+_0x5adad9(-0xa5,-0x98)+_0x330b0d[_0x5adad9(-0xf5,-0xef)]));}),this[_0x3cdfd6(0x252,0x2d0)]['on']('reconnect',()=>{this[_0x2a748a(-0xb9,-0x96)]=_0x2a748a(-0xe9,-0x7f),this['reconnectAttempts']=0x0;function _0x2a748a(_0x2730f0,_0x54d9bd){return _0x30c5(_0x2730f0- -0x2be,_0x54d9bd);}this['channels'][_0x2a748a(-0xed,-0xeb)](channel=>{channel['_rejoin']();});}),this['socketAdapter']['on']('postgres_changes',_0x3f29a1=>{const channel=this[_0x5480fe(0xbc,0x8f)][_0x5480fe(0x16b,0x192)](_0x3f29a1['topic']);function _0x5480fe(_0x273ce8,_0x19b1da){return _0x30c5(_0x273ce8- -0xdd,_0x19b1da);}channel&&channel['_trigger'](_0x5480fe(0xb9,0x70),_0x3f29a1);}),this[_0x3cdfd6(0x252,0x29b)]['on'](_0x3cdfd6(0x19a,0x210),_0x1769ad=>{function _0x2593ba(_0x2c4af6,_0x29e9a0){return _0x30c5(_0x29e9a0- -0x15b,_0x2c4af6);}const channel=this['channels'][_0x2593ba(0x75,0xed)](_0x1769ad['topic']);channel&&channel['_trigger'](_0x2593ba(0x3a,0x2b),_0x1769ad);}),this['socketAdapter']['on']('presence',_0x429456=>{function _0xbad9fe(_0x1cc30b,_0x376bc5){return _0x30c5(_0x376bc5-0x2a1,_0x1cc30b);}const channel=this[_0xbad9fe(0x3fd,0x43a)][_0xbad9fe(0x56d,0x4e9)](_0x429456['topic']);channel&&channel[_0xbad9fe(0x405,0x447)](_0xbad9fe(0x4c0,0x459),_0x429456);});}catch(_0x32b9a3){this[_0x3cdfd6(0x219,0x1e4)]=_0x3cdfd6(0x188,0x167),_0x38f07b(_0x32b9a3);}});}['disconnect'](){function _0x40e08d(_0x17d43e,_0x6b3bd1){return _0x30c5(_0x6b3bd1-0x2f4,_0x17d43e);}this['socketAdapter']&&(this['socketAdapter'][_0x40e08d(0x474,0x47f)](),this[_0x40e08d(0x433,0x482)]=null),this['connectionState']='disconnected',this['channels'][_0x40e08d(0x55c,0x552)]();}[_0x684fad(0x4ff,0x49a)](_0x1d2e0a){function _0x3e1147(_0x453f34,_0x1595fa){return _0x30c5(_0x453f34-0x81,_0x1595fa);}if(this[_0x3e1147(0x21a,0x23c)]['has'](_0x1d2e0a))return this['channels'][_0x3e1147(0x2c9,0x29c)](_0x1d2e0a);const channel=new RealtimeChannel(_0x1d2e0a,this['socket']);return this['channels']['set'](_0x1d2e0a,channel),this['connectionState']===_0x3e1147(0x256,0x22d)&&channel['_join'](),channel;}['removeChannel'](channel){function _0x553237(_0xf6c977,_0x3b8063){return _0x30c5(_0xf6c977-0x9f,_0x3b8063);}const _0x4b8fff=channel['topic'];this[_0x553237(0x238,0x1f9)]['has'](_0x4b8fff)&&(this[_0x553237(0x238,0x1da)]['delete'](_0x4b8fff),channel[_0x553237(0x2ce,0x2b1)]());}['removeAllChannels'](){function _0x4142c2(_0x43bf4f,_0x452698){return _0x30c5(_0x43bf4f-0x79,_0x452698);}this[_0x4142c2(0x212,0x1d3)]['forEach'](channel=>{channel['unsubscribe']();}),this[_0x4142c2(0x212,0x1fb)]['clear']();}[_0x684fad(0x4ac,0x47f)](){function _0x388e0c(_0x53cadf,_0x36b430){return _0x30c5(_0x36b430-0x178,_0x53cadf);}return Array[_0x388e0c(0x39b,0x312)](this[_0x388e0c(0x398,0x311)][_0x388e0c(0x41f,0x3b7)]());}[_0x684fad(0x4d4,0x54d)](){function _0x3fcc56(_0x321821,_0xfd7427){return _0x30c5(_0xfd7427- -0x3b4,_0x321821);}return this[_0x3fcc56(-0x177,-0x1af)]==='connected'&&this['socketAdapter'][_0x3fcc56(-0x188,-0x1df)];}['getConnectionState'](){return this['connectionState'];}['onConnectionStateChange'](_0x300f99){function _0x592b92(_0x2e6e58,_0xace098){return _0x30c5(_0x2e6e58- -0x217,_0xace098);}const _0x4cecd1=()=>_0x300f99(this['connectionState']);return this['socketAdapter']&&(this['socketAdapter']['on'](_0x592b92(-0x19,-0x19),()=>{this['connectionState']='connected',_0x4cecd1();}),this[_0x592b92(0x27,0x7)]['on'](_0x592b92(-0x8c,-0xdd),()=>{function _0x34f9e4(_0x130046,_0x29ebda){return _0x30c5(_0x29ebda-0x3d7,_0x130046);}this['connectionState']=_0x34f9e4(0x5fb,0x574),_0x4cecd1();}),this[_0x592b92(0x27,-0x14)]['on']('connect_error',()=>{function _0x44a9f7(_0x37e2ea,_0x32dd3c){return _0x30c5(_0x37e2ea-0x2c3,_0x32dd3c);}this[_0x44a9f7(0x4c8,0x47a)]=_0x44a9f7(0x437,0x41f),_0x4cecd1();})),()=>{function _0x25df25(_0x4df9ef,_0x418628){return _0x30c5(_0x4df9ef- -0x28b,_0x418628);}this[_0x25df25(-0x4d,-0x1e)]&&(this[_0x25df25(-0x4d,-0x93)][_0x25df25(-0xcd,-0xe1)](_0x25df25(-0x8d,-0x109),_0x4cecd1),this['socketAdapter'][_0x25df25(-0xcd,-0xae)](_0x25df25(-0x100,-0x8b),_0x4cecd1),this[_0x25df25(-0x4d,-0x96)][_0x25df25(-0xcd,-0x144)]('connect_error',_0x4cecd1));};}[_0x684fad(0x559,0x5a8)](){if(!this[_0x38863d(-0x6c,-0x3a)]['heartbeatInterval']||!this['socketAdapter'])return;function _0x38863d(_0x48c965,_0x279c6a){return _0x30c5(_0x48c965- -0x1fb,_0x279c6a);}const interval=setInterval(()=>{function _0x815bed(_0x112fbc,_0x4b2b02){return _0x30c5(_0x112fbc- -0x159,_0x4b2b02);}this[_0x815bed(0xe5,0x128)]?.[_0x815bed(0x7c,0x1)]?this['socketAdapter']['emit']('heartbeat',{'timestamp':Date['now']()}):clearInterval(interval);},this[_0x38863d(-0x6c,-0x50)]['heartbeatInterval']);}[_0x684fad(0x4ad,0x502)](){return this['socket'];}}class FunctionsClient{constructor(_0x47f5f7){this['httpClient']=_0x47f5f7;}async[_0x684fad(0x590,0x602)](_0x5d3860,_0x35aee8){function _0x18b15b(_0x31860f,_0x269330){return _0x30c5(_0x31860f- -0x233,_0x269330);}try{const _0x4fd2b6=_0x35aee8?.['method']||'POST',headers={'Content-Type':'application/json',..._0x35aee8?.[_0x18b15b(-0x46,-0x9c)]};let response;const _0x6ba6f2=_0x18b15b(-0x16,-0x60)+_0x5d3860;switch(_0x4fd2b6[_0x18b15b(-0x2d,0x54)]()){case'GET':response=await this['httpClient'][_0x18b15b(0x15,0xc)](_0x6ba6f2,{'headers':headers,'params':_0x35aee8?.[_0x18b15b(-0xbc,-0x4f)]});break;case'POST':response=await this[_0x18b15b(-0x86,-0xf)][_0x18b15b(-0xc8,-0xc4)](_0x6ba6f2,_0x35aee8?.[_0x18b15b(-0xbc,-0x68)],{'headers':headers});break;case'PUT':response=await this['httpClient']['put'](_0x6ba6f2,_0x35aee8?.['body'],{'headers':headers});break;case'PATCH':response=await this[_0x18b15b(-0x86,-0x1c)][_0x18b15b(-0x9b,-0xf9)](_0x6ba6f2,_0x35aee8?.[_0x18b15b(-0xbc,-0x8b)],{'headers':headers});break;case'DELETE':response=await this['httpClient']['delete'](_0x6ba6f2,{'headers':headers,'data':_0x35aee8?.[_0x18b15b(-0xbc,-0xbc)]});break;default:throw new EBaaSError('Unsupported\x20HTTP\x20method:\x20'+_0x4fd2b6,0x190);}return{'data':response['data'],'error':null};}catch(_0x3d30ae){return{'data':null,'error':_0x3d30ae instanceof EBaaSError?_0x3d30ae:new EBaaSError(_0x3d30ae instanceof Error?_0x3d30ae[_0x18b15b(-0x29,-0x2b)]:'Function\x20invocation\x20failed',0x0,_0x3d30ae)};}}async['list'](){function _0x4fbfbe(_0x284e66,_0x472105){return _0x30c5(_0x284e66-0x83,_0x472105);}try{const response=await this['httpClient'][_0x4fbfbe(0x2cb,0x2ef)](_0x4fbfbe(0x1ed,0x1d3));return{'data':response[_0x4fbfbe(0x233,0x1c7)],'error':null};}catch(_0x39a4cb){return{'data':null,'error':_0x39a4cb instanceof EBaaSError?_0x39a4cb:new EBaaSError(_0x39a4cb instanceof Error?_0x39a4cb[_0x4fbfbe(0x28d,0x28c)]:'Failed\x20to\x20list\x20functions',0x0,_0x39a4cb)};}}async[_0x684fad(0x574,0x5f5)](_0x338b6b){function _0x2a4cfb(_0x3b1962,_0x386754){return _0x30c5(_0x3b1962- -0x3d4,_0x386754);}try{const response=await this[_0x2a4cfb(-0x227,-0x20b)]['get']('/functions/v1/'+_0x338b6b+'/info');return{'data':response[_0x2a4cfb(-0x224,-0x22d)],'error':null};}catch(_0x437cb8){return{'data':null,'error':_0x437cb8 instanceof EBaaSError?_0x437cb8:new EBaaSError(_0x437cb8 instanceof Error?_0x437cb8[_0x2a4cfb(-0x1ca,-0x1f8)]:_0x2a4cfb(-0x1eb,-0x268),0x0,_0x437cb8)};}}async['deploy'](_0x2f7acf,_0x318278){function _0xeec390(_0x5a05ed,_0x2a3102){return _0x30c5(_0x5a05ed- -0x366,_0x2a3102);}try{const _0x44a239=new FormData();if(_0x318278['code']instanceof File)_0x44a239[_0xeec390(-0x1a6,-0x13b)](_0xeec390(-0x1a7,-0x179),_0x318278[_0xeec390(-0x1a7,-0x1c3)]);else typeof _0x318278[_0xeec390(-0x1a7,-0x1f2)]===_0xeec390(-0x105,-0x123)&&_0x44a239['append'](_0xeec390(-0x1a7,-0x1a9),new Blob([_0x318278[_0xeec390(-0x1a7,-0x120)]],{'type':_0xeec390(-0x123,-0x155)}),'index.ts');_0x318278['entrypoint']&&_0x44a239['append']('entrypoint',_0x318278[_0xeec390(-0x16e,-0x109)]);_0x318278[_0xeec390(-0x11c,-0xa3)]&&_0x44a239[_0xeec390(-0x1a6,-0x1d5)](_0xeec390(-0x11c,-0x18a),JSON['stringify'](_0x318278[_0xeec390(-0x11c,-0x16d)]));_0x318278[_0xeec390(-0x152,-0x19e)]&&_0x44a239[_0xeec390(-0x1a6,-0x218)](_0xeec390(-0x152,-0x157),JSON['stringify'](_0x318278[_0xeec390(-0x152,-0xff)]));_0x318278['verify']!==undefined&&_0x44a239['append'](_0xeec390(-0x1c5,-0x24b),String(_0x318278[_0xeec390(-0x1c5,-0x1d6)]));const response=await this[_0xeec390(-0x1b9,-0x164)][_0xeec390(-0x1fb,-0x258)]('/functions/v1/'+_0x2f7acf+'/deploy',_0x44a239,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response['data'],'error':null};}catch(_0x326aaf){return{'data':null,'error':_0x326aaf instanceof EBaaSError?_0x326aaf:new EBaaSError(_0x326aaf instanceof Error?_0x326aaf['message']:'Failed\x20to\x20deploy\x20function',0x0,_0x326aaf)};}}async['delete'](_0x20b964){function _0x53c615(_0x2b6510,_0x2e19a7){return _0x30c5(_0x2b6510-0x20d,_0x2e19a7);}try{const response=await this[_0x53c615(0x3ba,0x40d)]['delete'](_0x53c615(0x42a,0x413)+_0x20b964);return{'data':response[_0x53c615(0x3bd,0x440)],'error':null};}catch(_0x269176){return{'data':null,'error':_0x269176 instanceof EBaaSError?_0x269176:new EBaaSError(_0x269176 instanceof Error?_0x269176[_0x53c615(0x417,0x3fb)]:_0x53c615(0x432,0x3ef),0x0,_0x269176)};}}async[_0x684fad(0x50c,0x560)](_0x35f981,_0x546349){function _0x17a1fb(_0x117050,_0x54cdd3){return _0x30c5(_0x117050- -0x34b,_0x54cdd3);}try{const response=await this['httpClient'][_0x17a1fb(-0x19c,-0x185)]('/functions/v1/'+_0x35f981+_0x17a1fb(-0x17f,-0x13d),{'env':_0x546349});return{'data':response[_0x17a1fb(-0x19b,-0x1f6)],'error':null};}catch(_0x2fed34){return{'data':null,'error':_0x2fed34 instanceof EBaaSError?_0x2fed34:new EBaaSError(_0x2fed34 instanceof Error?_0x2fed34[_0x17a1fb(-0x141,-0x19d)]:_0x17a1fb(-0xff,-0x86),0x0,_0x2fed34)};}}async[_0x684fad(0x589,0x524)](_0x1d314f,_0x2aca85){function _0x2f2b56(_0xe7fe4e,_0x24abd9){return _0x30c5(_0xe7fe4e-0x33,_0x24abd9);}try{const _0x276806=new URLSearchParams();_0x2aca85?.['limit']&&_0x276806[_0x2f2b56(0x1f3,0x1a1)](_0x2f2b56(0x234,0x1ff),String(_0x2aca85[_0x2f2b56(0x234,0x1f2)]));_0x2aca85?.[_0x2f2b56(0x21f,0x1ef)]&&_0x276806[_0x2f2b56(0x1f3,0x230)](_0x2f2b56(0x21f,0x244),String(_0x2aca85[_0x2f2b56(0x21f,0x246)]));_0x2aca85?.['level']&&_0x276806[_0x2f2b56(0x1f3,0x1a4)](_0x2f2b56(0x21d,0x1d8),_0x2aca85[_0x2f2b56(0x21d,0x208)]);const _0x5be271='/functions/v1/'+_0x1d314f+'/logs'+(_0x276806[_0x2f2b56(0x1e1,0x169)]()?'?'+_0x276806[_0x2f2b56(0x1e1,0x1b9)]():''),response=await this['httpClient']['get'](_0x5be271);return{'data':response[_0x2f2b56(0x1e3,0x25a)],'error':null};}catch(_0x32c0d5){return{'data':null,'error':_0x32c0d5 instanceof EBaaSError?_0x32c0d5:new EBaaSError(_0x32c0d5 instanceof Error?_0x32c0d5[_0x2f2b56(0x23d,0x1c7)]:_0x2f2b56(0x257,0x295),0x0,_0x32c0d5)};}}async[_0x684fad(0x489,0x46d)](_0x3bffad,_0x4ea1e7){function _0x1e926a(_0x4d8716,_0x1600bf){return _0x30c5(_0x1600bf- -0x98,_0x4d8716);}try{const _0x3cc3d1=new URLSearchParams();_0x4ea1e7?.['period']&&_0x3cc3d1[_0x1e926a(0xc2,0x128)](_0x1e926a(0x101,0x174),_0x4ea1e7['period']);const _0x32fce1=_0x1e926a(0x1c9,0x185)+_0x3bffad+_0x1e926a(0x20c,0x1a2)+(_0x3cc3d1[_0x1e926a(0x144,0x116)]()?'?'+_0x3cc3d1['toString']():''),response=await this[_0x1e926a(0x98,0x115)]['get'](_0x32fce1);return{'data':response['data'],'error':null};}catch(_0x312944){return{'data':null,'error':_0x312944 instanceof EBaaSError?_0x312944:new EBaaSError(_0x312944 instanceof Error?_0x312944['message']:'Failed\x20to\x20get\x20function\x20metrics',0x0,_0x312944)};}}}class EBaaSClient{constructor(_0x2881a0,_0x4831d4,_0x431906){this[_0xce304(0x22e,0x27c)]=_0x431906,this['httpClient']=new HttpClient({'url':_0x2881a0,'apiKey':_0x4831d4,'timeout':0x7530,'headers':_0x431906?.[_0xce304(0x296,0x2e0)]?.['headers']}),this['auth']=new AuthClient(this['httpClient'],_0x431906?.['database']?.['workspaceId']),this['database']=new DatabaseClient(this['httpClient'],_0x431906?.['database']?.[_0xce304(0x228,0x1f8)]),this[_0xce304(0x200,0x22b)]=new StorageClient(this[_0xce304(0x24c,0x1c8)]),this['realtime']=new RealtimeClient(_0x2881a0,_0x4831d4,_0x431906?.['realtime']),this['functions']=new FunctionsClient(this['httpClient']);function _0xce304(_0x216d32,_0x10c296){return _0x30c5(_0x216d32-0x9f,_0x10c296);}this[_0xce304(0x23d,0x1cd)]();}[_0x684fad(0x4c6,0x465)](_0x55181c){function _0x9cd8b(_0x6e6fc4,_0x676dd8){return _0x30c5(_0x6e6fc4-0x36a,_0x676dd8);}return this[_0x9cd8b(0x534,0x4f8)]['from'](_0x55181c);}[_0x684fad(0x4ce,0x46d)](_0x5765f2,_0x262114){function _0x39ff8b(_0x3f6810,_0x4a1654){return _0x30c5(_0x4a1654- -0x3e4,_0x3f6810);}return this[_0x39ff8b(-0x288,-0x21a)][_0x39ff8b(-0x2c4,-0x242)](_0x5765f2,_0x262114);}[_0x684fad(0x587,0x522)](_0x2b32ec){function _0x3c8b59(_0x4a3c47,_0x249fa6){return _0x30c5(_0x4a3c47-0x366,_0x249fa6);}return this[_0x3c8b59(0x4c7,0x527)][_0x3c8b59(0x500,0x4d1)](_0x2b32ec);}['channel'](_0x30cb27){return this['realtime']['channel'](_0x30cb27);}['invoke'](_0x35aebe,_0x3cbea4){function _0x4bece5(_0x5e938f,_0x18ab47){return _0x30c5(_0x18ab47-0x3d6,_0x5e938f);}return this[_0x4bece5(0x50a,0x57b)]['invoke'](_0x35aebe,_0x3cbea4);}async[_0x684fad(0x4ca,0x474)](){function _0x899056(_0x5f001a,_0x5cd332){return _0x30c5(_0x5cd332-0x151,_0x5f001a);}if(this['options']?.[_0x899056(0x2f1,0x31b)]?.[_0x899056(0x32f,0x370)])try{await this[_0x899056(0x2cb,0x31b)]['initialize']();}catch(_0x2aeea9){console[_0x899056(0x3a7,0x36f)]('Failed to initialize custom database detection:',_0x2aeea9);}}async['setWorkspaceId'](_0x2225cc){this[_0x6bce9d(-0x91,-0x12)][_0x6bce9d(-0x9e,-0x6a)](_0x2225cc);function _0x6bce9d(_0x74ec41,_0xf8a96f){return _0x30c5(_0x74ec41- -0x27c,_0xf8a96f);}this['database']['setWorkspaceId'](_0x2225cc),this['options']?.[_0x6bce9d(-0xb2,-0xce)]?.['autoDetectCustomDatabase']&&await this['database']['initialize']();}async['configureCustomDatabase'](_0x1210ee){function _0x3b0d99(_0x3e6850,_0xa0e44d){return _0x30c5(_0x3e6850- -0x2f2,_0xa0e44d);}await this[_0x3b0d99(-0x128,-0x102)][_0x3b0d99(-0xd6,-0xa9)](_0x1210ee);}['getCustomDatabaseStatus'](){function _0x2f2bb9(_0x1c222a,_0xdc9e8f){return _0x30c5(_0x1c222a- -0x2a,_0xdc9e8f);}return this['database'][_0x2f2bb9(0x13b,0x19c)]();}}function createClient(_0x44168b,_0x268a9a,_0x14d7ed){return new EBaaSClient(_0x44168b,_0x268a9a,_0x14d7ed);}const version=_0x684fad(0x58c,0x560);export{AuthClient,CustomDatabaseManager,DatabaseClient,EBaaSClient,EBaaSError,FunctionsClient,HttpClient,QueryBuilder,RealtimeChannel,RealtimeClient,StorageBucket,StorageClient,createClient,version};
|