@e-techsolutions/e-baas-sdk 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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){function _0x16218b(_0x45ba2f,_0x130808){return _0x1e97(_0x45ba2f-0x55,_0x130808);}const stringArray=stringArrayFunction();while(!![]){try{const _0x19ce91=-parseInt(_0x16218b(0x1d8,0x246))/0x1+-parseInt(_0x16218b(0x159,0x19a))/0x2+-parseInt(_0x16218b(0x20f,0x1e7))/0x3*(-parseInt(_0x16218b(0x148,0x10f))/0x4)+-parseInt(_0x16218b(0x143,0xfb))/0x5*(parseInt(_0x16218b(0x18b,0x19f))/0x6)+-parseInt(_0x16218b(0x152,0x1c5))/0x7*(parseInt(_0x16218b(0x1ec,0x21f))/0x8)+-parseInt(_0x16218b(0x1d4,0x1b2))/0x9*(parseInt(_0x16218b(0x22b,0x1fe))/0xa)+-parseInt(_0x16218b(0x1a3,0x1f8))/0xb*(-parseInt(_0x16218b(0x165,0x113))/0xc);if(_0x19ce91===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x3e0ab5){stringArray['push'](stringArray['shift']());}}}(_0x5df5,0xc901c));import axios from'axios';class EBaaSError extends Error{constructor(_0x10db32,status=0x0,_0x1fb62e){super(_0x10db32),this[_0x5c9a48(0x31c,0x2b7)]=_0x5c9a48(0x24c,0x2af),this['status']=status,this['details']=_0x1fb62e;function _0x5c9a48(_0x1889d9,_0x551a7b){return _0x1e97(_0x551a7b-0xce,_0x1889d9);}Error[_0x5c9a48(0x2fc,0x298)]&&Error[_0x5c9a48(0x22b,0x298)](this,EBaaSError);}[_0x4bcf27(-0x2c7,-0x303)](){function _0xf71b9b(_0x3adda8,_0x825c76){return _0x1e97(_0x825c76-0x315,_0x3adda8);}return{'name':this[_0xf71b9b(0x567,0x4fe)],'message':this['message'],'status':this['status'],'details':this[_0xf71b9b(0x49c,0x4d5)],'stack':this[_0xf71b9b(0x4ef,0x4ab)]};}['toString'](){function _0x212a39(_0x31adeb,_0x3144db){return _0x1e97(_0x3144db- -0x193,_0x31adeb);}return this['name']+':\x20'+this[_0x212a39(0xab,0x52)]+'\x20(Status:\x20'+this['status']+')';}}class HttpClient{constructor(config){this[_0x53c16a(0x18e,0x162)]=config[_0x53c16a(0x147,0xc6)];function _0x53c16a(_0x4f695c,_0x5bb283){return _0x1e97(_0x4f695c-0x3a,_0x5bb283);}this[_0x53c16a(0x156,0x14b)]=config['apiKey'],this[_0x53c16a(0x13c,0xd7)]=axios['create']({'baseURL':this[_0x53c16a(0x18e,0x183)],'timeout':config[_0x53c16a(0x20b,0x183)]||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x53c16a(0x156,0x159)],...config[_0x53c16a(0x217,0x1c9)]}}),this[_0x53c16a(0x166,0x12b)]();}[_0x4bcf27(-0x2b8,-0x270)](){this['client']['interceptors']['request'][_0x30a29f(-0x276,-0x205)](config=>{return config;},_0x481f57=>{return Promise['reject'](new EBaaSError('Request\x20failed',0x0,_0x481f57));});function _0x30a29f(_0x4c1fc6,_0x11eae8){return _0x1e97(_0x11eae8- -0x3dc,_0x4c1fc6);}this['client'][_0x30a29f(-0x299,-0x2c6)]['response'][_0x30a29f(-0x198,-0x205)](response=>{return response;},_0xe911a0=>{const status=_0xe911a0['response']?.['status']||0x0;function _0xd47aff(_0x4035c6,_0xe0ed56){return _0x1e97(_0x4035c6- -0x64,_0xe0ed56);}const _0x26cd03=_0xe911a0[_0xd47aff(0xc0,0xb9)]?.['data']?.['message']||_0xe911a0['message']||'Unknown\x20error',_0x12d93d=_0xe911a0[_0xd47aff(0xc0,0xe2)]?.[_0xd47aff(0x120,0xe7)]||_0xe911a0;return Promise[_0xd47aff(0xbc,0xbd)](new EBaaSError(_0x26cd03,status,_0x12d93d));});}async[_0x4bcf27(-0x204,-0x231)](_0x12c9e4,config){try{const response=await this['client']['get'](_0x12c9e4,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x52f10c){throw this['handleError'](_0x52f10c);}}async[_0x4bcf27(-0x2cc,-0x309)](_0x4655aa,data,config){function _0x950f45(_0x18aad5,_0x5da8c9){return _0x1e97(_0x18aad5- -0x394,_0x5da8c9);}try{const response=await this[_0x950f45(-0x292,-0x2c9)]['post'](_0x4655aa,data,config);return{'data':response[_0x950f45(-0x210,-0x292)],'status':response[_0x950f45(-0x1ce,-0x225)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x5c1c4e){throw this[_0x950f45(-0x1cc,-0x21c)](_0x5c1c4e);}}async['put'](_0x549dc2,data,config){function _0x1e1697(_0x358898,_0x29bd43){return _0x1e97(_0x358898- -0x2ec,_0x29bd43);}try{const response=await this[_0x1e1697(-0x1ea,-0x23f)]['put'](_0x549dc2,data,config);return{'data':response[_0x1e1697(-0x168,-0x1c3)],'status':response[_0x1e1697(-0x126,-0xb6)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x514775){throw this['handleError'](_0x514775);}}async['patch'](_0x59856b,data,config){function _0xdeb0da(_0x6f0673,_0x26419f){return _0x1e97(_0x26419f- -0x22,_0x6f0673);}try{const response=await this['client']['patch'](_0x59856b,data,config);return{'data':response[_0xdeb0da(0x1bf,0x162)],'status':response[_0xdeb0da(0x1e1,0x1a4)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x5a602e){throw this[_0xdeb0da(0x1c9,0x1a6)](_0x5a602e);}}async['delete'](_0x361c1a,config){function _0x309c24(_0x3db93b,_0x4dd548){return _0x1e97(_0x3db93b-0x38d,_0x4dd548);}try{const response=await this[_0x309c24(0x48f,0x446)][_0x309c24(0x475,0x471)](_0x361c1a,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x2731fc){throw this['handleError'](_0x2731fc);}}['setAuthToken'](_0x27ebe5){function _0x2d7cec(_0x4aeac0,_0x42fcc0){return _0x1e97(_0x4aeac0- -0xa5,_0x42fcc0);}this[_0x2d7cec(0x5d,-0x9)][_0x2d7cec(0x4c,0x3a)][_0x2d7cec(0x138,0x111)]['common']['Authorization']='Bearer\x20'+_0x27ebe5;}[_0x4bcf27(-0x2de,-0x331)](){function _0x4f15a8(_0x2874fe,_0x2135c0){return _0x1e97(_0x2135c0- -0x2b3,_0x2874fe);}delete this[_0x4f15a8(-0x1b9,-0x1b1)][_0x4f15a8(-0x142,-0x1c2)]['headers']['common']['Authorization'],this[_0x4f15a8(-0x234,-0x1b1)][_0x4f15a8(-0x1ff,-0x1c2)][_0x4f15a8(-0x108,-0xd6)][_0x4f15a8(-0x103,-0x124)]['Authorization']='Bearer\x20'+this[_0x4f15a8(-0x176,-0x197)];}[_0x4bcf27(-0x21c,-0x283)](_0xffe721){if(_0xffe721 instanceof EBaaSError)return _0xffe721;return new EBaaSError(_0xffe721['message']||'HTTP\x20request\x20failed',_0xffe721['status']||0x0,_0xffe721);}}class AuthClient{constructor(_0x2a936e,_0x5c1a17){this['currentSession']=null;function _0x168d17(_0x3ed356,_0x42d16f){return _0x1e97(_0x3ed356- -0x1df,_0x42d16f);}this['httpClient']=_0x2a936e,this[_0x168d17(-0xe8,-0x155)]=_0x5c1a17,this['loadSession']();}async['signUp'](data){function _0x3cd40e(_0x47c513,_0x575a1d){return _0x1e97(_0x47c513-0x2a9,_0x575a1d);}try{const response=await this[_0x3cd40e(0x443,0x404)][_0x3cd40e(0x3c1,0x3de)]('/auth/v1/signup',data);return response[_0x3cd40e(0x42d,0x3c2)]['session']&&this[_0x3cd40e(0x49b,0x4d5)](response['data']['session']),response[_0x3cd40e(0x42d,0x3ca)];}catch(_0x1c1009){throw this[_0x3cd40e(0x46d,0x400)](_0x1c1009);}}async['signIn'](data){function _0x253c16(_0x33384f,_0x11d0ef){return _0x1e97(_0x33384f-0xa5,_0x11d0ef);}try{const headers={};this[_0x253c16(0x19c,0x195)]&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this[_0x253c16(0x23f,0x233)][_0x253c16(0x1bd,0x1ba)](_0x253c16(0x232,0x1f7),data,{'headers':headers});return response[_0x253c16(0x229,0x1a2)]['session']&&this[_0x253c16(0x297,0x21d)](response['data'][_0x253c16(0x247,0x2c5)]),response[_0x253c16(0x229,0x27e)];}catch(_0x1ce18f){throw this['handleAuthError'](_0x1ce18f);}}async[_0x4bcf27(-0x216,-0x29b)](){function _0x5118f7(_0x464c54,_0x212176){return _0x1e97(_0x212176- -0x2be,_0x464c54);}try{await this[_0x5118f7(-0xee,-0x124)][_0x5118f7(-0x1c5,-0x1a6)](_0x5118f7(-0xb0,-0x129)),this[_0x5118f7(-0x140,-0x161)]();}catch(_0x5ea821){this[_0x5118f7(-0x1a8,-0x161)]();throw this['handleAuthError'](_0x5ea821);}}async[_0x4bcf27(-0x2a4,-0x296)](){if(!this[_0x4769ec(0x4df,0x479)]?.['access_token'])return null;function _0x4769ec(_0x478132,_0x8b2421){return _0x1e97(_0x478132-0x395,_0x8b2421);}try{const response=await this['httpClient'][_0x4769ec(0x575,0x5de)]('/auth/v1/user');return response[_0x4769ec(0x519,0x4fe)][_0x4769ec(0x551,0x5b4)];}catch(_0x3d88f0){if(_0x3d88f0 instanceof EBaaSError&&_0x3d88f0['status']===0x191)return this[_0x4769ec(0x4f2,0x528)](),null;throw this[_0x4769ec(0x559,0x59e)](_0x3d88f0);}}async['refreshSession'](){if(!this[_0x5a9271(0x1a4,0x192)]?.[_0x5a9271(0x16e,0x1eb)])return null;function _0x5a9271(_0x3bd48c,_0x268986){return _0x1e97(_0x268986-0x48,_0x3bd48c);}try{const response=await this['httpClient'][_0x5a9271(0x193,0x160)](_0x5a9271(0xec,0x170),{'refresh_token':this[_0x5a9271(0x16a,0x192)]['refresh_token']});if(response[_0x5a9271(0x242,0x1cc)]['session'])return this['setSession'](response['data']['session']),response[_0x5a9271(0x181,0x1cc)][_0x5a9271(0x193,0x1ea)];return null;}catch(_0x4eae95){this[_0x5a9271(0x127,0x1a5)]();throw this['handleAuthError'](_0x4eae95);}}async['resetPassword'](_0x44e0b3){function _0x34e16e(_0x249663,_0x11ddc1){return _0x1e97(_0x249663- -0x37,_0x11ddc1);}try{await this['httpClient'][_0x34e16e(0xe1,0x5c)](_0x34e16e(0x111,0xf9),{'email':_0x44e0b3});}catch(_0x436524){throw this['handleAuthError'](_0x436524);}}async[_0x4bcf27(-0x23c,-0x28b)](data){function _0x5dc104(_0x257b2d,_0x46202c){return _0x1e97(_0x257b2d-0x3d5,_0x46202c);}try{const response=await this[_0x5dc104(0x56f,0x58f)][_0x5dc104(0x571,0x56f)]('/auth/v1/user',data);return response[_0x5dc104(0x559,0x581)]['user'];}catch(_0x3f3574){throw this['handleAuthError'](_0x3f3574);}}[_0x4bcf27(-0x263,-0x287)](){return this['currentSession'];}[_0x4bcf27(-0x294,-0x283)](_0x2415a6){function _0xed3616(_0x50b75e,_0x3768fd){return _0x1e97(_0x3768fd- -0x3a1,_0x50b75e);}this[_0xed3616(-0x1cf,-0x257)]=_0x2415a6,this['httpClient'][_0xed3616(-0x197,-0x1f8)](_0x2415a6['access_token']),typeof localStorage!==_0xed3616(-0x22c,-0x280)&&localStorage['setItem']('ebaas.auth.session',JSON[_0xed3616(-0x2f8,-0x2a1)](_0x2415a6));}['onAuthStateChange'](_0x3a3fc0){return()=>{};}['setWorkspaceId'](_0x4fdbda){function _0x113caf(_0x2c97a7,_0x10af1f){return _0x1e97(_0x2c97a7- -0x130,_0x10af1f);}this[_0x113caf(-0x39,-0xa2)]=_0x4fdbda;}[_0x4bcf27(-0x1f2,-0x204)](_0x5282a8){this['currentSession']=_0x5282a8,this[_0x2fc37c(-0x232,-0x217)]['setAuthToken'](_0x5282a8['access_token']);function _0x2fc37c(_0x1d1dc5,_0x1bd58c){return _0x1e97(_0x1d1dc5- -0x3cc,_0x1bd58c);}typeof localStorage!=='undefined'&&localStorage[_0x2fc37c(-0x1dc,-0x1c9)]('ebaas.auth.session',JSON[_0x2fc37c(-0x2cc,-0x28c)](_0x5282a8));}['clearSession'](){this['currentSession']=null,this[_0x3f1c7c(0xa2,0xec)]['removeAuthToken']();function _0x3f1c7c(_0x300fbe,_0x12ac7a){return _0x1e97(_0x12ac7a- -0xae,_0x300fbe);}typeof localStorage!==_0x3f1c7c(0x7b,0x73)&&localStorage['removeItem'](_0x3f1c7c(0x108,0x13e));}[_0x4bcf27(-0x239,-0x262)](){function _0x3348c9(_0x2f5529,_0x1369a6){return _0x1e97(_0x1369a6-0x240,_0x2f5529);}if(typeof localStorage!==_0x3348c9(0x2f3,0x361)){const _0x21ba48=localStorage['getItem'](_0x3348c9(0x48a,0x42c));if(_0x21ba48)try{const _0x22d407=JSON[_0x3348c9(0x378,0x3de)](_0x21ba48);this[_0x3348c9(0x497,0x432)](_0x22d407);}catch(_0x401a89){this[_0x3348c9(0x3d5,0x39d)]();}}}[_0x4bcf27(-0x220,-0x1f1)](_0x5b9352){function _0x20ca90(_0x217f29,_0x3ae3fe){return _0x1e97(_0x3ae3fe-0x20c,_0x217f29);}if(_0x5b9352 instanceof EBaaSError)return _0x5b9352;return new EBaaSError(_0x5b9352[_0x20ca90(0x373,0x3f1)]||'Authentication\x20failed',_0x5b9352[_0x20ca90(0x443,0x3d2)]||0x0,_0x5b9352);}}class QueryBuilder{constructor(_0x8f7549,_0x3d2b86,_0x2133de,_0x4f5ba8){this['httpClient']=_0x8f7549,this[_0x2f86c2(-0xde,-0x126)]=_0x3d2b86;function _0x2f86c2(_0x219cfd,_0x20c296){return _0x1e97(_0x20c296- -0x268,_0x219cfd);}this[_0x2f86c2(-0x36,-0x82)]=_0x2133de,this[_0x2f86c2(-0x1b8,-0x171)]=_0x4f5ba8,this['query']={'filters':[]};}['select'](_0x11cf37='*',_0x271c09){return this['query']['select']=_0x11cf37,this;}['insert'](data,_0x589764){function _0x346e3c(_0x16ad0a,_0x1019d1){return _0x1e97(_0x16ad0a- -0x294,_0x1019d1);}return this[_0x346e3c(-0x12d,-0xc1)]('POST','/sdk/v1/'+this['table']+'?operation=insert',{'data':data,'options':_0x589764});}[_0x4bcf27(-0x249,-0x223)](data,_0x22ee6a){function _0x40b352(_0x5dde20,_0x5e9b62){return _0x1e97(_0x5dde20-0x34c,_0x5e9b62);}return this['query']['updateData']=data,this['query'][_0x40b352(0x4b2,0x44c)]=_0x22ee6a,this;}['upsert'](data,_0xa7cc36){function _0x50566(_0x550eb8,_0x3f1370){return _0x1e97(_0x3f1370-0x1c0,_0x550eb8);}return this[_0x50566(0x39e,0x327)]('POST','/sdk/v1/'+this['table']+_0x50566(0x336,0x36d),{'data':data,'options':{..._0xa7cc36,'upsert':!![]}});}['delete'](_0x3649e3){this[_0x5ef4da(-0x244,-0x2ad)]['deleteOptions']=_0x3649e3,this['query'][_0x5ef4da(-0x25f,-0x2a7)]=!![];function _0x5ef4da(_0x4845ec,_0x6b6d97){return _0x1e97(_0x4845ec- -0x3bf,_0x6b6d97);}return this;}['eq'](_0x27bd89,_0x57ae0e){function _0x15c234(_0x54e5d6,_0x558f10){return _0x1e97(_0x54e5d6- -0x172,_0x558f10);}return this[_0x15c234(0x9,-0x18)][_0x15c234(0x2e,-0x40)][_0x15c234(-0x7,-0x8c)]({'column':_0x27bd89,'operator':'eq','value':_0x57ae0e}),this;}[_0x4bcf27(-0x1f5,-0x23c)](_0x21574b,_0x5bb5b4){function _0xa6988e(_0x516056,_0x3f5cfe){return _0x1e97(_0x516056- -0xac,_0x3f5cfe);}return this[_0xa6988e(0xcf,0x9d)][_0xa6988e(0xf4,0xb9)][_0xa6988e(0xbf,0x121)]({'column':_0x21574b,'operator':_0xa6988e(0x143,0x16f),'value':_0x5bb5b4}),this;}['gt'](_0x28aa64,_0x1a9e25){function _0x1af12f(_0x29e10a,_0x36b417){return _0x1e97(_0x36b417- -0x2d1,_0x29e10a);}return this[_0x1af12f(-0x1ab,-0x156)]['filters'][_0x1af12f(-0x1c4,-0x166)]({'column':_0x28aa64,'operator':'gt','value':_0x1a9e25}),this;}['gte'](_0x28236b,_0x1eedc6){this['query'][_0x556326(0x38,0x25)][_0x556326(0x3,-0x56)]({'column':_0x28236b,'operator':_0x556326(0x24,0x3d),'value':_0x1eedc6});function _0x556326(_0x215545,_0x1e1823){return _0x1e97(_0x215545- -0x168,_0x1e1823);}return this;}['lt'](_0x15c51a,_0xdb3d71){this[_0x491a6c(-0x110,-0x14f)][_0x491a6c(-0xb1,-0x12a)][_0x491a6c(-0x13c,-0x15f)]({'column':_0x15c51a,'operator':'lt','value':_0xdb3d71});function _0x491a6c(_0x5a7d58,_0x4c8aaf){return _0x1e97(_0x4c8aaf- -0x2ca,_0x5a7d58);}return this;}['lte'](_0x12e586,_0x480c85){this[_0x3f733d(0x26f,0x1f6)][_0x3f733d(0x1f2,0x21b)][_0x3f733d(0x19d,0x1e6)]({'column':_0x12e586,'operator':'lte','value':_0x480c85});function _0x3f733d(_0x5c4c7a,_0x334096){return _0x1e97(_0x334096-0x7b,_0x5c4c7a);}return this;}['like'](_0x2e3238,_0x4e217a){this[_0x142000(0x13,0x42)]['filters']['push']({'column':_0x2e3238,'operator':_0x142000(-0x6f,-0x8a),'value':_0x4e217a});function _0x142000(_0x4f7186,_0x46c458){return _0x1e97(_0x4f7186- -0x168,_0x46c458);}return this;}['ilike'](_0x56abd1,_0xa85a7b){function _0x5995cd(_0x266346,_0x4d30e4){return _0x1e97(_0x4d30e4-0x1bb,_0x266346);}return this[_0x5995cd(0x376,0x336)][_0x5995cd(0x32e,0x35b)]['push']({'column':_0x56abd1,'operator':_0x5995cd(0x326,0x36c),'value':_0xa85a7b}),this;}['is'](_0x3b7594,_0x191bd8){function _0x125b24(_0x2b2db6,_0x2aeecb){return _0x1e97(_0x2aeecb- -0x257,_0x2b2db6);}return this['query'][_0x125b24(-0x3f,-0xb7)]['push']({'column':_0x3b7594,'operator':'is','value':_0x191bd8}),this;}['in'](_0x27992e,_0x19a6f2){function _0x11d7b8(_0x387d22,_0x794f27){return _0x1e97(_0x794f27- -0x1c8,_0x387d22);}return this[_0x11d7b8(-0xcc,-0x4d)][_0x11d7b8(0x2a,-0x28)]['push']({'column':_0x27992e,'operator':'in','value':_0x19a6f2}),this;}[_0x4bcf27(-0x1fc,-0x21b)](_0x22bc5d,_0x31640f){this['query'][_0x2b81c0(0x5b4,0x55b)][_0x2b81c0(0x538,0x526)]({'column':_0x22bc5d,'operator':_0x2b81c0(0x5ec,0x5a3),'value':_0x31640f});function _0x2b81c0(_0x46502b,_0x506819){return _0x1e97(_0x506819-0x3bb,_0x46502b);}return this;}['match'](_0x57d472){Object[_0x12e779(0x12,0x8f)](_0x57d472)[_0x12e779(0x1e,0x80)](([_0x3389c7,_0x10d68e])=>{this['eq'](_0x3389c7,_0x10d68e);});function _0x12e779(_0x5d3699,_0x49d787){return _0x1e97(_0x49d787- -0xb2,_0x5d3699);}return this;}['order'](_0x2b58f0,_0x4ad617){!this[_0x3d4019(0x1cf,0x153)]['order']&&(this[_0x3d4019(0x103,0x153)]['order']=[]);function _0x3d4019(_0x33b0be,_0x472706){return _0x1e97(_0x472706- -0x28,_0x33b0be);}return this[_0x3d4019(0x149,0x153)]['order']['push']({'column':_0x2b58f0,'ascending':_0x4ad617?.[_0x3d4019(0x187,0x15f)]!==![]}),this;}['limit'](count){return this['query']['limit']=count,this;}['range'](from,_0x42be16){function _0x4b9151(_0x39cce4,_0x5a1d75){return _0x1e97(_0x39cce4-0x212,_0x5a1d75);}return this[_0x4b9151(0x38d,0x3e8)]['range']={'from':from,'to':_0x42be16},this;}async[_0x4bcf27(-0x25c,-0x296)](){function _0x5b3280(_0xf0aab9,_0x1b2b73){return _0x1e97(_0x1b2b73-0x175,_0xf0aab9);}if(this[_0x5b3280(0x2e8,0x2f0)]['updateData'])return this['executeQuery']('PATCH','/sdk/v1/'+this[_0x5b3280(0x2a6,0x2b7)],{'data':this[_0x5b3280(0x28f,0x2f0)]['updateData'],'options':this['query']['updateOptions'],'filters':this[_0x5b3280(0x369,0x2f0)]['filters']});else return this['query'][_0x5b3280(0x33e,0x2d5)]?this['executeQuery']('DELETE',_0x5b3280(0x2ee,0x28f)+this[_0x5b3280(0x300,0x2b7)]+'?operation=delete',{'options':this[_0x5b3280(0x344,0x2f0)]['deleteOptions'],'filters':this['query'][_0x5b3280(0x29d,0x315)]}):this[_0x5b3280(0x361,0x2dc)]('GET','/sdk/v1/'+this['table']+_0x5b3280(0x290,0x2d1),{'select':this[_0x5b3280(0x2f8,0x2f0)][_0x5b3280(0x308,0x2b8)],'filters':this[_0x5b3280(0x34e,0x2f0)][_0x5b3280(0x2e4,0x315)],'order':this[_0x5b3280(0x343,0x2f0)][_0x5b3280(0x2b0,0x2a2)],'limit':this['query']['limit'],'range':this[_0x5b3280(0x304,0x2f0)]['range']});}async['single'](){this[_0x4dfae1(0x1f5,0x233)](0x1);function _0x4dfae1(_0x4d6fdb,_0x4a6a97){return _0x1e97(_0x4d6fdb-0x19,_0x4a6a97);}const result=await this['execute']();return{'data':result['data']?.[0x0]||null,'error':result[_0x4dfae1(0x17e,0x13f)]};}async['executeQuery'](_0x58c34e,_0x52f568,_0x10c3f8){function _0x2324c4(_0x2c36e4,_0x2afab2){return _0x1e97(_0x2afab2-0x9b,_0x2c36e4);}try{let response;const headers={};this[_0x2324c4(0x119,0x192)]&&(headers['x-workspace-id']=this['workspaceId']);if(_0x58c34e==='GET'){const _0xfc35e8=_0x52f568['split']('?'),_0x3dcd39=_0xfc35e8[0x0],existingParams=new URLSearchParams(_0xfc35e8[0x1]||'');if(_0x10c3f8[_0x2324c4(0x24a,0x1de)])existingParams['append']('select',_0x10c3f8['select']);_0x10c3f8['filters']?.['length']&&_0x10c3f8['filters']['forEach'](filter=>{function _0x2fda8f(_0x4e048d,_0x5469b1){return _0x1e97(_0x5469b1- -0x35c,_0x4e048d);}existingParams['append'](filter[_0x2fda8f(-0x1ba,-0x197)],filter['operator']+'.'+filter['value']);});if(_0x10c3f8[_0x2324c4(0x24f,0x1c8)]?.['length']){const orderStr=_0x10c3f8[_0x2324c4(0x21e,0x1c8)][_0x2324c4(0x142,0x18a)](_0x1dd550=>''+_0x1dd550['column']+(_0x1dd550[_0x2324c4(0x1c1,0x222)]?_0x2324c4(0x2e9,0x264):_0x2324c4(0x1b2,0x1f2)))['join'](',');existingParams['append']('order',orderStr);}if(_0x10c3f8['limit'])existingParams['append'](_0x2324c4(0x2a2,0x277),_0x10c3f8['limit']['toString']());_0x10c3f8['range']&&(existingParams['append']('offset',_0x10c3f8['range'][_0x2324c4(0x297,0x240)][_0x2324c4(0x210,0x1c4)]()),existingParams[_0x2324c4(0x307,0x286)]('limit',(_0x10c3f8[_0x2324c4(0x1a8,0x1e2)]['to']-_0x10c3f8['range'][_0x2324c4(0x246,0x240)]+0x1)[_0x2324c4(0x22c,0x1c4)]())),response=await this[_0x2324c4(0x2b8,0x235)]['get'](_0x3dcd39+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x58c34e==='DELETE'){const _0x1f4c0a=_0x52f568['split']('?'),_0xc11854=_0x1f4c0a[0x0],existingParams=new URLSearchParams(_0x1f4c0a[0x1]||'');!existingParams[_0x2324c4(0x185,0x187)](_0x2324c4(0x20d,0x275))&&existingParams['append']('operation',_0x2324c4(0x1dd,0x183));_0x10c3f8[_0x2324c4(0x26d,0x23b)]?.[_0x2324c4(0x1ed,0x1a4)]&&_0x10c3f8['filters']['forEach'](filter=>{function _0x225b01(_0x1b4f42,_0x50948d){return _0x1e97(_0x1b4f42-0xf9,_0x50948d);}existingParams[_0x225b01(0x2e4,0x2b1)](filter[_0x225b01(0x2be,0x268)],filter[_0x225b01(0x2ba,0x2ac)]+'.'+filter['value']);});const deleteUrl=_0xc11854+'?'+existingParams[_0x2324c4(0x218,0x1c4)]();console[_0x2324c4(0x27c,0x262)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console[_0x2324c4(0x214,0x262)]('\uD83D\uDD27 DELETE headers:',headers),console['log']('\uD83D\uDD27 DELETE filtros originais:',_0x10c3f8['filters']),response=await this['httpClient'][_0x2324c4(0x17d,0x183)](deleteUrl,{'headers':headers});}else{if(_0x58c34e==='PATCH'){const _0x209908=_0x52f568['split']('?'),_0x37c3ad=_0x209908[0x0],existingParams=new URLSearchParams(_0x209908[0x1]||'');!existingParams[_0x2324c4(0x174,0x187)]('operation')&&existingParams[_0x2324c4(0x2b4,0x286)]('operation',_0x2324c4(0x250,0x236));_0x10c3f8['filters']?.['length']&&_0x10c3f8['filters'][_0x2324c4(0x23f,0x1cd)](filter=>{function _0x146568(_0xe92ef4,_0x4e12ed){return _0x1e97(_0x4e12ed-0x2aa,_0xe92ef4);}existingParams[_0x146568(0x509,0x495)](filter['column'],filter[_0x146568(0x4ef,0x46b)]+'.'+filter['value']);});_0x10c3f8['options']?.['prefer']&&(headers['Prefer']=_0x10c3f8[_0x2324c4(0x2b2,0x24f)][_0x2324c4(0x1f7,0x203)]);const updateUrl=_0x37c3ad+'?'+existingParams['toString']();response=await this['httpClient'][_0x2324c4(0x1cb,0x1ed)](updateUrl,_0x10c3f8['data'],{'headers':headers});}else{let _0x53f510=_0x10c3f8['data'];!headers[_0x2324c4(0x225,0x1b0)]&&(headers['Prefer']='return=representation'),_0x10c3f8[_0x2324c4(0x288,0x24f)]?.['upsert']&&(headers[_0x2324c4(0x222,0x1b0)]=_0x2324c4(0x171,0x1e6)),_0x10c3f8['dataArray']&&(_0x53f510=_0x10c3f8[_0x2324c4(0x2c1,0x26f)]),response=await this[_0x2324c4(0x25b,0x235)]['post'](_0x52f568,_0x53f510,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response[_0x2324c4(0x2a8,0x278)]?.['x-total-count']?parseInt(response[_0x2324c4(0x24b,0x278)][_0x2324c4(0x208,0x221)]):undefined};}catch(_0x5c312c){return{'data':null,'error':_0x5c312c instanceof EBaaSError?_0x5c312c:new EBaaSError(_0x5c312c instanceof Error?_0x5c312c['message']:'Database\x20operation\x20failed',0x0,_0x5c312c)};}}}class CustomDatabaseManager{constructor(_0x2f32fd,_0x4cf8f0){this[_0x3f81c5(0x2d,0x96)]=_0x2f32fd;function _0x3f81c5(_0x30df03,_0x57d5c3){return _0x1e97(_0x57d5c3- -0x104,_0x30df03);}this[_0x3f81c5(-0x2e,-0xd)]=_0x4cf8f0;}async['detectCustomDatabase'](){if(!this[_0x13d976(-0x173,-0x131)])return{'hasCustomDatabase':![]};try{const response=await this['httpClient'][_0x13d976(-0x8a,-0x111)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this['workspaceId']}});if(response[_0x13d976(-0xa4,-0xf4)]===0xc8&&response[_0x13d976(-0xe6,-0x126)]?.[_0x13d976(-0x167,-0x1b1)]){const config=response[_0x13d976(-0xe6,-0xb7)]['config'],_0x3dcb2b={'host':config[_0x13d976(-0x157,-0x15e)],'port':config[_0x13d976(-0x124,-0x128)],'database':config[_0x13d976(-0xf7,-0x11f)],'username':config['postgresUsername'],'password':'','schema':config[_0x13d976(-0xb3,-0x43)],'sslEnabled':config[_0x13d976(-0x91,-0x96)]};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x3dcb2b},this['detectedConfig'];}}catch(_0x38820c){if(_0x38820c?.[_0x13d976(-0xa4,-0x7c)]===0x194)return this['detectedConfig']={'hasCustomDatabase':![]},this['detectedConfig'];console['warn']('Failed to detect custom database configuration:',_0x38820c);}this[_0x13d976(-0xb8,-0x13d)]={'hasCustomDatabase':![]};function _0x13d976(_0x1a635d,_0x21e183){return _0x1e97(_0x1a635d- -0x26a,_0x21e183);}return this['detectedConfig'];}async['testConnection'](_0x5afb99){function _0x56c45d(_0x2db072,_0xd25011){return _0x1e97(_0xd25011-0x3b9,_0x2db072);}try{const response=await this[_0x56c45d(0x5ad,0x553)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x5afb99,{'headers':this['workspaceId']?{'X-Workspace-ID':this[_0x56c45d(0x449,0x4b0)]}:{}});return response[_0x56c45d(0x52d,0x53d)];}catch(_0xd4ad51){return{'success':![],'message':_0xd4ad51?.['message']||_0x56c45d(0x5d4,0x58b)};}}async['configureCustomDatabase'](_0x134a49){if(!this[_0x229870(0x389,0x338)])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x229870(0x3aa,0x3ad)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x134a49},{'headers':{'X-Workspace-ID':this[_0x229870(0x389,0x35f)]}}),config=response['data']['config'];function _0x229870(_0x157e37,_0x12a750){return _0x1e97(_0x157e37-0x292,_0x12a750);}return this[_0x229870(0x444,0x3f7)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x134a49},config;}async[_0x4bcf27(-0x2e5,-0x2c5)](){function _0x4b1fc1(_0x190779,_0x536579){return _0x1e97(_0x190779-0x81,_0x536579);}if(!this[_0x4b1fc1(0x178,0x1a0)])throw new Error('Workspace ID is required to remove custom database');await this['httpClient']['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this[_0x4b1fc1(0x178,0x10c)]}}),this['detectedConfig']={'hasCustomDatabase':![]};}[_0x4bcf27(-0x2c2,-0x33e)](){return this['detectedConfig'];}[_0x4bcf27(-0x278,-0x203)](){function _0x51e11(_0x26be23,_0x941d61){return _0x1e97(_0x26be23- -0x190,_0x941d61);}return this[_0x51e11(0x22,-0x24)]?.['hasCustomDatabase']??![];}[_0x4bcf27(-0x22c,-0x1c1)](){function _0x44e15(_0x549620,_0x1a8c26){return _0x1e97(_0x549620- -0x37e,_0x1a8c26);}return this['detectedConfig']?.[_0x44e15(-0x1f4,-0x19e)];}[_0x4bcf27(-0x20c,-0x183)](_0xdef9b){this['workspaceId']=_0xdef9b;function _0xc06c89(_0x5f0a9e,_0x5c7573){return _0x1e97(_0x5c7573-0x8,_0x5f0a9e);}this[_0xc06c89(0x203,0x1ba)]=undefined;}[_0x4bcf27(-0x2ac,-0x25e)](){return this['workspaceId'];}[_0x4bcf27(-0x2fd,-0x2b3)](){function _0x115f63(_0x55beef,_0x47cd34){return _0x1e97(_0x47cd34- -0x35e,_0x55beef);}return{'workspaceId':this[_0x115f63(-0x2e1,-0x267)],'hasConfig':this['hasCustomDatabase'](),'configDetails':this[_0x115f63(-0x1de,-0x1ac)]?.['credentials']?{'host':this[_0x115f63(-0x181,-0x1ac)][_0x115f63(-0x243,-0x1d4)][_0x115f63(-0x1f5,-0x230)],'port':this['detectedConfig'][_0x115f63(-0x1f3,-0x1d4)][_0x115f63(-0x16f,-0x1e8)],'database':this['detectedConfig'][_0x115f63(-0x198,-0x1d4)][_0x115f63(-0x241,-0x224)],'schema':this[_0x115f63(-0x156,-0x1ac)][_0x115f63(-0x1fa,-0x1d4)]['schema']||_0x115f63(-0x18e,-0x1de),'sslEnabled':this['detectedConfig'][_0x115f63(-0x1a8,-0x1d4)][_0x115f63(-0x175,-0x185)]||![]}:undefined};}}class DatabaseClient{constructor(_0x17e20a,_0x25af0b){this['httpClient']=_0x17e20a,this['customDatabaseManager']=new CustomDatabaseManager(_0x17e20a,_0x25af0b);}['from'](_0x25b317){function _0x78ae68(_0x60069b,_0x3d1d82){return _0x1e97(_0x3d1d82- -0x1be,_0x60069b);}return new QueryBuilder(this['httpClient'],_0x25b317,this[_0x78ae68(-0x9c,-0x89)],this['customDatabaseManager'][_0x78ae68(-0x38,-0x86)]());}[_0x4bcf27(-0x277,-0x259)](_0x352a38,_0x114a7a){function _0x28cad8(_0x581532,_0x4dfb2a){return _0x1e97(_0x581532- -0x2a,_0x4dfb2a);}return this[_0x28cad8(0x170,0xf8)][_0x28cad8(0xee,0x16a)]('/rpc/'+_0x352a38,_0x114a7a);}['schema'](_0x544784){const _0x20d405=new DatabaseClient(this['httpClient'],this['customDatabaseManager']['getWorkspaceId']());_0x20d405[_0x406a6e(0x376,0x334)]=_0x544784;function _0x406a6e(_0x1e443c,_0x36bb69){return _0x1e97(_0x36bb69-0x1ff,_0x1e443c);}return _0x20d405['customDatabaseManager']=this[_0x406a6e(0x3e2,0x3f3)],_0x20d405;}async['detectCustomDatabase'](){return this['customDatabaseManager']['detectCustomDatabase']();}async['testCustomConnection'](_0x47e350){function _0x369a8b(_0x468f80,_0x1e7302){return _0x1e97(_0x468f80- -0x327,_0x1e7302);}return this[_0x369a8b(-0x133,-0xf6)][_0x369a8b(-0x1ec,-0x1d0)](_0x47e350);}async[_0x4bcf27(-0x252,-0x20e)](_0x29c3bb){function _0x736b39(_0xf304a6,_0x120497){return _0x1e97(_0x120497-0x288,_0xf304a6);}return this[_0x736b39(0x414,0x47c)][_0x736b39(0x39d,0x41a)](_0x29c3bb);}async['removeCustomDatabase'](){function _0x5dfafc(_0x4620b0,_0x370bde){return _0x1e97(_0x4620b0- -0x137,_0x370bde);}return this['customDatabaseManager'][_0x5dfafc(-0x38,-0xa6)]();}[_0x4bcf27(-0x2df,-0x30c)](){function _0x419227(_0x31379c,_0x6581eb){return _0x1e97(_0x6581eb-0xb3,_0x31379c);}return this[_0x419227(0x24b,0x2a7)][_0x419227(0x27c,0x21f)]();}['getCustomDatabaseStatus'](){function _0x353d72(_0x50c55a,_0x960305){return _0x1e97(_0x960305- -0x117,_0x50c55a);}return this[_0x353d72(0xb6,0xdd)]['getStatus']();}[_0x4bcf27(-0x20c,-0x18c)](_0x413635){function _0x52ade4(_0x3d363a,_0x1279d8){return _0x1e97(_0x3d363a-0x16e,_0x1279d8);}this[_0x52ade4(0x362,0x344)]['setWorkspaceId'](_0x413635);}async['initialize'](){function _0xfd5419(_0x1a3158,_0x5b5f99){return _0x1e97(_0x1a3158- -0x347,_0x5b5f99);}try{await this[_0xfd5419(-0x153,-0x16b)]['detectCustomDatabase']();}catch(_0x55cd05){console[_0xfd5419(-0x177,-0x15a)]('Failed to initialize custom database detection:',_0x55cd05);}}}class StorageBucket{constructor(_0x330dcf,bucketId){this[_0x22148a(-0xae,-0xc4)]=_0x330dcf;function _0x22148a(_0x53f90b,_0x5a38bb){return _0x1e97(_0x53f90b- -0x248,_0x5a38bb);}this['bucketId']=bucketId;}async[_0x4bcf27(-0x1f6,-0x248)](_0x523823,_0xd3d5d4,_0x1e4e0a){function _0x2e5353(_0x4516a5,_0x5d8009){return _0x1e97(_0x4516a5- -0x1e4,_0x5d8009);}try{const _0x342624=new FormData();if(_0xd3d5d4 instanceof File)_0x342624['append']('file',_0xd3d5d4);else{if(_0xd3d5d4 instanceof Blob)_0x342624[_0x2e5353(0x7,0x26)](_0x2e5353(-0xad,-0x4a),_0xd3d5d4,_0x523823);else{if(_0xd3d5d4 instanceof ArrayBuffer)_0x342624[_0x2e5353(0x7,0x1e)]('file',new Blob([_0xd3d5d4]),_0x523823);else typeof _0xd3d5d4==='string'&&_0x342624['append'](_0x2e5353(-0xad,-0x31),new Blob([_0xd3d5d4],{'type':'text/plain'}),_0x523823);}}_0x342624[_0x2e5353(0x7,0x4a)]('path',_0x523823);_0x1e4e0a?.['cacheControl']&&_0x342624[_0x2e5353(0x7,-0x3a)](_0x2e5353(-0xe6,-0x14a),_0x1e4e0a['cacheControl']);_0x1e4e0a?.[_0x2e5353(-0x9f,-0x112)]&&_0x342624[_0x2e5353(0x7,-0x70)](_0x2e5353(-0x9f,-0x8b),_0x1e4e0a[_0x2e5353(-0x9f,-0x1f)]);_0x1e4e0a?.['metadata']&&_0x342624['append']('metadata',JSON['stringify'](_0x1e4e0a[_0x2e5353(-0x40,-0x1)]));const _0x36820e='/storage/buckets/'+this[_0x2e5353(-0xc9,-0xc8)]+'/files'+(_0x1e4e0a?.[_0x2e5353(0x6,-0x3b)]?'?upsert=true':''),response=await this['httpClient'][_0x2e5353(-0xcc,-0x83)](_0x36820e,_0x342624,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response[_0x2e5353(-0x60,-0x6)],'error':null};}catch(_0x38ef23){return{'data':null,'error':_0x38ef23 instanceof EBaaSError?_0x38ef23:new EBaaSError(_0x38ef23 instanceof Error?_0x38ef23['message']:'Failed\x20to\x20upload\x20file',0x0,_0x38ef23)};}}async['download'](_0x33a4cd,_0x2fde01){function _0x2f4974(_0x5d3c6e,_0x2d77c4){return _0x1e97(_0x2d77c4- -0x1a6,_0x5d3c6e);}try{const _0xbc512d=new URLSearchParams();_0x2fde01?.['transform']&&Object['entries'](_0x2fde01[_0x2f4974(-0x9e,-0x34)])['forEach'](([_0x401660,_0x3ba7a8])=>{_0x3ba7a8!==undefined&&_0xbc512d['append'](_0x401660,String(_0x3ba7a8));});const _0xacf894='/storage/buckets/'+this[_0x2f4974(-0xb,-0x8b)]+'/files/'+_0x33a4cd+(_0xbc512d['toString']()?'?'+_0xbc512d['toString']():''),response=await this['httpClient']['get'](_0xacf894,{'responseType':'blob'});return{'data':response[_0x2f4974(0x1e,-0x22)],'error':null};}catch(_0x406b14){return{'data':null,'error':_0x406b14 instanceof EBaaSError?_0x406b14:new EBaaSError(_0x406b14 instanceof Error?_0x406b14[_0x2f4974(0x52,0x3f)]:'Failed\x20to\x20download\x20file',0x0,_0x406b14)};}}async[_0x4bcf27(-0x281,-0x2b2)](_0xb8e78a,_0x4d0e91){function _0x296c84(_0x477465,_0x323364){return _0x1e97(_0x477465- -0x35a,_0x323364);}try{const _0x437983=new URLSearchParams();_0xb8e78a&&_0x437983['append'](_0x296c84(-0x22a,-0x234),_0xb8e78a);_0x4d0e91?.['limit']&&_0x437983[_0x296c84(-0x16f,-0x176)](_0x296c84(-0x17e,-0x1d6),String(_0x4d0e91[_0x296c84(-0x17e,-0x1f5)]));_0x4d0e91?.['offset']&&_0x437983[_0x296c84(-0x16f,-0x174)](_0x296c84(-0x20b,-0x289),String(_0x4d0e91['offset']));_0x4d0e91?.[_0x296c84(-0x270,-0x256)]&&_0x437983['append']('sortBy',JSON[_0x296c84(-0x25a,-0x287)](_0x4d0e91['sortBy']));_0x4d0e91?.['search']&&_0x437983['append'](_0x296c84(-0x17f,-0x1d7),_0x4d0e91['search']);const _0x4a0a4f='/storage/buckets/'+this['bucketId']+'/files'+(_0x437983['toString']()?'?'+_0x437983['toString']():''),response=await this['httpClient']['get'](_0x4a0a4f);return{'data':response[_0x296c84(-0x1d6,-0x249)],'error':null};}catch(_0x464cb1){return{'data':null,'error':_0x464cb1 instanceof EBaaSError?_0x464cb1:new EBaaSError(_0x464cb1 instanceof Error?_0x464cb1['message']:_0x296c84(-0x1ea,-0x25a),0x0,_0x464cb1)};}}async['remove'](_0x354792){function _0x7cc89b(_0x52a249,_0xfccdde){return _0x1e97(_0x52a249- -0x30f,_0xfccdde);}try{const response=await this[_0x7cc89b(-0x175,-0xf6)]['delete']('/storage/buckets/'+this[_0x7cc89b(-0x1f4,-0x1e7)]+'/files',{'data':{'paths':_0x354792}});return{'data':response[_0x7cc89b(-0x18b,-0x125)],'error':null};}catch(_0x212b58){return{'data':null,'error':_0x212b58 instanceof EBaaSError?_0x212b58:new EBaaSError(_0x212b58 instanceof Error?_0x212b58[_0x7cc89b(-0x12a,-0x196)]:'Failed\x20to\x20remove\x20files',0x0,_0x212b58)};}}async[_0x4bcf27(-0x1fd,-0x278)](fromPath,_0x16f21d){function _0x1edd8d(_0x8a2b2c,_0x43557f){return _0x1e97(_0x43557f- -0x1b,_0x8a2b2c);}try{const response=await this['httpClient']['post']('/storage/buckets/'+this['bucketId']+_0x1edd8d(0x210,0x1a4),{'sourceKey':fromPath,'destinationKey':_0x16f21d});return{'data':response['data'],'error':null};}catch(_0x5e2101){return{'data':null,'error':_0x5e2101 instanceof EBaaSError?_0x5e2101:new EBaaSError(_0x5e2101 instanceof Error?_0x5e2101['message']:'Failed\x20to\x20move\x20file',0x0,_0x5e2101)};}}async[_0x4bcf27(-0x2a0,-0x261)](fromPath,_0x19c955){function _0x4dd2c6(_0x152434,_0x23afbb){return _0x1e97(_0x152434-0x318,_0x23afbb);}try{const response=await this['httpClient']['post'](_0x4dd2c6(0x48f,0x462)+this[_0x4dd2c6(0x433,0x47e)]+_0x4dd2c6(0x410,0x3ad),{'sourceKey':fromPath,'destinationKey':_0x19c955});return{'data':response[_0x4dd2c6(0x49c,0x500)],'error':null};}catch(_0x4f5bdb){return{'data':null,'error':_0x4f5bdb instanceof EBaaSError?_0x4f5bdb:new EBaaSError(_0x4f5bdb instanceof Error?_0x4f5bdb[_0x4dd2c6(0x4fd,0x504)]:'Failed\x20to\x20copy\x20file',0x0,_0x4f5bdb)};}}async['createSignedUrl'](_0x17dad9,_0xd25562,_0x1d440c){function _0x34c661(_0x5ab250,_0x20862e){return _0x1e97(_0x20862e- -0x3e4,_0x5ab250);}try{const response=await this['httpClient'][_0x34c661(-0x308,-0x2cc)]('/storage/buckets/'+this[_0x34c661(-0x27f,-0x2c9)]+'/files/'+_0x17dad9+'/sign',{'expiresIn':_0xd25562,..._0x1d440c});return{'data':response['data'],'error':null};}catch(_0x203cc3){return{'data':null,'error':_0x203cc3 instanceof EBaaSError?_0x203cc3:new EBaaSError(_0x203cc3 instanceof Error?_0x203cc3[_0x34c661(-0x1b2,-0x1ff)]:_0x34c661(-0x253,-0x28a),0x0,_0x203cc3)};}}[_0x4bcf27(-0x2d5,-0x293)](_0x28adb0,_0x3d696e){const _0x44d7d2=new URLSearchParams();function _0x1f7074(_0x32207e,_0x3417ea){return _0x1e97(_0x3417ea- -0x3de,_0x32207e);}_0x3d696e?.[_0x1f7074(-0x28c,-0x26c)]&&Object[_0x1f7074(-0x236,-0x29d)](_0x3d696e[_0x1f7074(-0x29c,-0x26c)])['forEach'](([_0x271e49,_0x9c9382])=>{function _0x33afe0(_0x16351a,_0x50dc98){return _0x1e97(_0x16351a- -0x309,_0x50dc98);}_0x9c9382!==undefined&&_0x44d7d2[_0x33afe0(-0x11e,-0xf1)](_0x271e49,String(_0x9c9382));});const _0x11218a=this[_0x1f7074(-0x216,-0x244)]['baseURL']||'',_0x5a66a6=_0x11218a+'/storage/buckets/'+this['bucketId']+'/files/'+_0x28adb0+(_0x44d7d2['toString']()?'?'+_0x44d7d2['toString']():'');return{'data':{'publicUrl':_0x5a66a6}};}async[_0x4bcf27(-0x2ab,-0x2a2)](_0x2bb478){function _0x21f384(_0x15e52f,_0x574386){return _0x1e97(_0x15e52f- -0x29b,_0x574386);}try{const response=await this[_0x21f384(-0x101,-0xce)]['get']('/storage/buckets/'+this['bucketId']+_0x21f384(-0x12d,-0xd6)+_0x2bb478+_0x21f384(-0x1ab,-0x123));return{'data':response['data'],'error':null};}catch(_0x4946aa){return{'data':null,'error':_0x4946aa instanceof EBaaSError?_0x4946aa:new EBaaSError(_0x4946aa instanceof Error?_0x4946aa['message']:_0x21f384(-0xf5,-0x17d),0x0,_0x4946aa)};}}async['updateFileMetadata'](_0x3a4540,metadata){function _0x469047(_0x2316c5,_0x369d1d){return _0x1e97(_0x369d1d- -0x3db,_0x2316c5);}try{const response=await this['httpClient']['put'](_0x469047(-0x25b,-0x264)+this['bucketId']+'/files/'+_0x3a4540+'/metadata',{'metadata':metadata});return{'data':response['data'],'error':null};}catch(_0x142d0f){return{'data':null,'error':_0x142d0f instanceof EBaaSError?_0x142d0f:new EBaaSError(_0x142d0f instanceof Error?_0x142d0f[_0x469047(-0x19b,-0x1f6)]:_0x469047(-0x2bc,-0x2c7),0x0,_0x142d0f)};}}}class StorageClient{constructor(_0x70bc8){function _0x34ecf5(_0x513893,_0x5813cb){return _0x1e97(_0x513893-0x3b4,_0x5813cb);}this[_0x34ecf5(0x54e,0x58a)]=_0x70bc8;}[_0x4bcf27(-0x23f,-0x284)](bucketId){function _0x444113(_0x797eef,_0x1c7e5e){return _0x1e97(_0x1c7e5e- -0x24f,_0x797eef);}return new StorageBucket(this[_0x444113(-0x123,-0xb5)],bucketId);}async['createBucket'](_0x1f7f90,_0xa57d4a){function _0x44d64a(_0x411cdc,_0x3f9b84){return _0x1e97(_0x3f9b84-0x3b5,_0x411cdc);}try{const response=await this[_0x44d64a(0x571,0x54f)][_0x44d64a(0x4ae,0x4cd)]('/storage/buckets',{'id':_0x1f7f90,..._0xa57d4a});return{'data':response['data'],'error':null};}catch(_0x41e3b7){return{'data':null,'error':_0x41e3b7 instanceof EBaaSError?_0x41e3b7:new EBaaSError(_0x41e3b7 instanceof Error?_0x41e3b7['message']:'Failed\x20to\x20create\x20bucket',0x0,_0x41e3b7)};}}async[_0x4bcf27(-0x22b,-0x24c)](_0x3e187b){function _0x3f1f5e(_0x4dd790,_0x5f5840){return _0x1e97(_0x5f5840-0x2f1,_0x4dd790);}try{const response=await this[_0x3f1f5e(0x480,0x48b)]['get'](_0x3f1f5e(0x46b,0x468)+_0x3e187b);return{'data':response[_0x3f1f5e(0x49a,0x475)],'error':null};}catch(_0x2652d4){return{'data':null,'error':_0x2652d4 instanceof EBaaSError?_0x2652d4:new EBaaSError(_0x2652d4 instanceof Error?_0x2652d4[_0x3f1f5e(0x508,0x4d6)]:_0x3f1f5e(0x3e5,0x3e7),0x0,_0x2652d4)};}}async['listBuckets'](){function _0x1f089e(_0x497e73,_0x378fbd){return _0x1e97(_0x497e73-0x33f,_0x378fbd);}try{const response=await this['httpClient'][_0x1f089e(0x51f,0x555)]('/storage/buckets');return{'data':response[_0x1f089e(0x4c3,0x512)],'error':null};}catch(_0x497f8c){return{'data':null,'error':_0x497f8c instanceof EBaaSError?_0x497f8c:new EBaaSError(_0x497f8c instanceof Error?_0x497f8c[_0x1f089e(0x524,0x4c8)]:_0x1f089e(0x530,0x56f),0x0,_0x497f8c)};}}async['updateBucket'](_0x4c2855,_0xa9d043){function _0xb2df81(_0x575e96,_0x21010a){return _0x1e97(_0x21010a-0x206,_0x575e96);}try{const response=await this['httpClient'][_0xb2df81(0x418,0x3a2)]('/storage/buckets/'+_0x4c2855,_0xa9d043);return{'data':response[_0xb2df81(0x3c2,0x38a)],'error':null};}catch(_0x7026c3){return{'data':null,'error':_0x7026c3 instanceof EBaaSError?_0x7026c3:new EBaaSError(_0x7026c3 instanceof Error?_0x7026c3[_0xb2df81(0x46a,0x3eb)]:'Failed\x20to\x20update\x20bucket',0x0,_0x7026c3)};}}async['deleteBucket'](_0x532e34){function _0xc55dae(_0x124c0b,_0x13be33){return _0x1e97(_0x124c0b-0x336,_0x13be33);}try{const response=await this[_0xc55dae(0x4d0,0x517)]['delete'](_0xc55dae(0x4ad,0x446)+_0x532e34);return{'data':response['data'],'error':null};}catch(_0x3deb7e){return{'data':null,'error':_0x3deb7e instanceof EBaaSError?_0x3deb7e:new EBaaSError(_0x3deb7e instanceof Error?_0x3deb7e[_0xc55dae(0x51b,0x4ee)]:'Failed\x20to\x20delete\x20bucket',0x0,_0x3deb7e)};}}async['getUsage'](){function _0x5e5742(_0x3eeaf3,_0x1c9107){return _0x1e97(_0x3eeaf3-0x204,_0x1c9107);}try{const response=await this['httpClient']['get']('/storage/usage');return{'data':response[_0x5e5742(0x388,0x3ac)],'error':null};}catch(_0x1f2905){return{'data':null,'error':_0x1f2905 instanceof EBaaSError?_0x1f2905:new EBaaSError(_0x1f2905 instanceof Error?_0x1f2905[_0x5e5742(0x3e9,0x460)]:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x1f2905)};}}}function _0x5df5(){const _0x43cb85=['BM9Kzq','zxjYB3i','DxbKyxrLt3b0Aw9UCW','zxHLy3v0zvf1zxj5','ChjLzMvY','yM9KEq','AM9PBMvK','ChvZAa','AgfZq3vZDg9Trgf0ywjHC2u','CNbJ','l2zPBgvZlW','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','rMfPBgvKihrVigXPC3qGzMLSzxm','C2vUza','DhjHBNnMB3jT','Cg9ZDgDYzxneyxrHyMfZzq','z2v0twv0CMLJCW','CMfUzg9T','Cg9YDa','l3n0B3jHz2uVyNvJA2v0CY8','Cg9ZDgDYzxnFy2HHBMDLCW','B25qB3n0z3jLC0nOyw5Nzxm','yxv0B0rLDgvJDen1C3rVBurHDgfIyxnL','CxvLCNK','Aw5PDgLHBgL6zun1C3rVBurHDgfIyxnL','x3jLAM9PBG','CMvTB3zLq2HHBM5LBa','mZa0mta1nwfLDgTiCa','ChvIBgLJ','z2v0u2vZC2LVBG','zxjYB3jLza','ndu3mti1sM10wvjv','zgf0yq','C3vIC2nYAxb0Aw9UCW','Ec10B3rHBc1JB3vUDa','yxnJzw5KAw5N','zxHLy3v0zq','ms4XlJG','y3jLzgvUDgLHBhm','Dw5ZDwjZy3jPyMu','z3rL','l2f1DgGVDJeVC2rRl3nPz25PBG','C3rHDgu','y29TBw9U','y29UBMvJDgLUzW','Cg9ZDgDYzxnFy2HHBMDLCZO','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','CMvHBhrPBwu','y2HHBM5LBa','l2f1DgGVDJeVC2LNBM91Da','C3rHy2S','mta3mLPSA2LKvq','y29UBMvJDf9LCNjVCG','rMfPBgvKihrVigrLCgXVEsbMDw5JDgLVBG','Ahr0CenSAwvUDa','DxbKyxrL','Chv0','CMvJB25Uzwn0','CgfYC2u','z2XVyMfS','zMLSDgvYCW','Bgv2zwW','C2vZC2LVBG','CMvMCMvZAf90B2TLBG','Bwv0ywrHDge','zNjVBq','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','zxzLBNrZ','DxbKyxrLvxnLCG','C2v0qxv0AfrVA2vU','x2PVAw4','Bg9HzfnLC3nPB24','CgvYAw9K','p29WzxjHDgLVBJ11ChnLCNq','Aw1WB3j0twfW','AxndB25Uzwn0zwq','AM9PBG','AwXPA2u','zgv0zwn0zwrdB25MAwC','z2v0twf4tgLZDgvUzxjZ','B3b0Aw9UCW','y29Kzq','DMfSDwvZ','Cg9ZDgDYzxnty2HLBwe','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','z2v0qNvJA2v0','mtqWnZntzhHezvi','CMvHy3qTBMf0AxzL','DxnLCG','DMvYAwz5','Aw5PDgLHBgL6zq','l2zPBgvZl21VDMu','zgv0ywLSCW','B3bLCMf0B3i','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','zw1PDa','AgfUzgXLqxv0AevYCM9Y','y29SDw1U','C3rHDhvZ','Bg9N','AgfUzgXLrxjYB3i','lMfZyW','y2fWDhvYzvn0ywnRvhjHy2u','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','C2v0','igf0DgvTChrZoIa','C2LNBK91Da','rNvUy3rPB24GAw52B2nHDgLVBIbMywLSzwq','D2fYBG','DgLTzw91Da','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSlIbqyxjHifjLywn0ie5HDgL2zsWGAw5ZDgfSztOGBNbTigLUC3rHBgWGC29JA2v0lMLVlwnSAwvUDa','zgf0yufYCMf5','B2zM','mJbXsvD5wwm','DxnL','C2v0v29YA3nWywnLswq','C3nSrw5HyMXLza','B3bLCMf0Aw9U','C2vHCMnO','BgLTAxq','AgvHzgvYCW','l21LDhjPy3m','z2v0tg9NCW','z2v0','rujHyvnfCNjVCG','y2XVC2vK','CMvWBgfJzq','C2L6zq','BwvZC2fNzq','C2nOzw1H','Bw92zq','y29UDgfPBNm','BMfTzq','DxbZzxj0','yxbWzw5K','zwjHyxmUyxv0Ac5ZzxnZAw9U','BgvHDMLUzW','DxbSB2fK','BMvX','C2v0sxrLBq','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','C2v0u2vZC2LVBKLUDgvYBMfS','BgvHDMu','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','BgLZDgvUzxjZ','zgLZy29UBMvJDa','DhjHy2S','z2v0u3rHDhvZ','zgvSzxrL','BwfRzvjLzG','C29YDej5','AM9PBMvKt25Jzq','AgfZ','Dw50CMfJAW','mZK1otvVDe11y3O','BwfW','l2LUzM8','zgvMyxvSDhm','yNjVywrJyxn0','mte3mMfXsu5Tta','Aw5KzxGUDhm','vw5ZDxbWB3j0zwqGsfruucbTzxrOB2q6ia','rMfPBgvKihrVigDLDcbIDwnRzxq','D29YA3nWywnLswq','l2zPBgvZl2nVChK','BgLRzq','B25dB25Uzwn0Aw9Uu3rHDgvdAgfUz2u','yNvJA2v0','C3rYAw5N','ntyYoen5q1jAzW','y2fJAgvdB250CM9S','CMvTB3zLq3vZDg9Trgf0ywjHC2u','C3rYAw5NAwz5','C29JA2v0lMLVlwnSAwvUDcbUB3qGyxzHAwXHyMXL','y2XPzw50','y29UzMLN','mJaZnZm1mg5vD0HmDW','AxnvC2LUz0n1C3rVBurHDgfIyxnL','CMvTB3zLqxv0AfrVA2vU','zgvWBg95','AM9PBMLUzW','BgvUz3rO','y29UBMvJDa','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSig5LC3rLigfTyMLLBNrLlIbqyxjHihvZyxiGzNvUy2LVBMfSAwrHzgvZigrLihjLywX0Aw1LlcbPBNn0ywXLoIbUCg0GAw5ZDgfSBcbZB2nRzxqUAw8Ty2XPzw50','CMvZB2X2zq','DxjS','Aw52B2TL','z2v0uhvIBgLJvxjS','mJrht3jzu2K','z2v0q2HHBM5LBhm','DMvYC2LVBNm','Cg9ZDgDYzxniB3n0','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','uhjLzMvY','Aw50zxjJzxb0B3jZ','Dgv4Dc9WBgfPBG','Cg9ZDa','BxvSDgLWyxj0l2zVCM0Tzgf0yq','l3nKAY92ms8','yNvJA2v0swq','yxbPs2v5','Dg9ku09o','y29UBMvJDgvK','AgvHCNrIzwf0sw50zxj2ywW','CMvQzwn0','Dw5KzwzPBMvK','z2v0rgv0zwn0zwrdB25MAwC','Dg9WAwm','CMvZCg9UC2u','zw50CNLWB2LUDa','zgLZy29UBMvJDgvK','DxbKyxrLrw52','l2f1DgGVDJeVCMvMCMvZAa','Dg9tDhjPBMC','Bwf4tgLZDgvUzxjZ','l2XVz3m','C2v0DxbjBNrLCMnLChrVCNm','B3jKzxi','Ag9ZDa','y2HHBM5LBhm','ChjLzML4','C3rHCNrZv2L0Aa','zM9YrwfJAa','B25Jzq','l2z1BMn0Aw9UCY92ms8','y3vYCMvUDfnJAgvTyq','mta4nNLfzwHuBW','zMLSzq','z2v0v29YA3nWywnLswq','z2v0rMLSzuLUzM8','zgf0ywjHC2u','DgvZDenVBM5Ly3rPB24','C29JA2v0lMLVlwnSAwvUDa','yNjVywrJyxn0oG','zw52','y2XLyxi','z2v0vxnLCG','zw50CMLLCW','DgfIBgu','C2vSzwn0','y29WEq','y29UDgvUDfr5Cgu','Cg9ZDgDYzxnqB3j0','CMfUz2u','l2f1DgGVDJeVCMvZzxqTCgfZC3DVCMq','y29UBMvJDgLVBLn0yxrL','y3vYCMvUDfnLC3nPB24','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','C29JA2v0qwrHChrLCG','mtCYnZGZotnlzNbQv3u','B2zMC2v0','C2v0u2vZC2LVBG','ChjLC2vUy2u6','Cgf0y2G','ChjLCgvUzeXPC3rLBMvY','yMfZzvvsta','CMf3tgLZDgvUzxjZ','C29JA2v0','lMrLC2m','x3nLDfn0yxrL','ChjLC2vUy2u','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','zxzLBNq','p29WzxjHDgLVBJ1ZzwXLy3q','y2XLyxjtzxnZAw9U','C29JA2v0t3b0Aw9UCW','ChjLCgvUze9Uy2vmAxn0zw5LCG','AxnezwXLDgu','x3rYAwDNzxi','u1vcu0nssujfra','BgLZDa'];_0x5df5=function(){return _0x43cb85;};return _0x5df5();}function _0x1e97(_0x1256b1,_0x3bacd6){const _0x5df500=_0x5df5();return _0x1e97=function(_0x1e9716,_0x4589a7){_0x1e9716=_0x1e9716-0xe5;let _0x177aed=_0x5df500[_0x1e9716];if(_0x1e97['JRHTFw']===undefined){var _0x693b3f=function(_0x10db32){const _0x1fb62e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x481f57='',_0xe911a0='';for(let _0x26cd03=0x0,_0x12d93d,_0x12c9e4,_0x52f10c=0x0;_0x12c9e4=_0x10db32['charAt'](_0x52f10c++);~_0x12c9e4&&(_0x12d93d=_0x26cd03%0x4?_0x12d93d*0x40+_0x12c9e4:_0x12c9e4,_0x26cd03++%0x4)?_0x481f57+=String['fromCharCode'](0xff&_0x12d93d>>(-0x2*_0x26cd03&0x6)):0x0){_0x12c9e4=_0x1fb62e['indexOf'](_0x12c9e4);}for(let _0x4655aa=0x0,_0x5c1c4e=_0x481f57['length'];_0x4655aa<_0x5c1c4e;_0x4655aa++){_0xe911a0+='%'+('00'+_0x481f57['charCodeAt'](_0x4655aa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xe911a0);};_0x1e97['edwsyl']=_0x693b3f,_0x1256b1=arguments,_0x1e97['JRHTFw']=!![];}const _0x12bbe6=_0x5df500[0x0],_0x258443=_0x1e9716+_0x12bbe6,_0x507cff=_0x1256b1[_0x258443];return!_0x507cff?(_0x177aed=_0x1e97['edwsyl'](_0x177aed),_0x1256b1[_0x258443]=_0x177aed):_0x177aed=_0x507cff,_0x177aed;},_0x1e97(_0x1256b1,_0x3bacd6);}class EventManager{constructor(){function _0x27ba21(_0x21af30,_0x10b2a2){return _0x1e97(_0x10b2a2- -0x2a2,_0x21af30);}this['events']=new Map(),this[_0x27ba21(-0x1e0,-0x178)]=0xa;}['on'](_0x2614f8,_0x49f56f){!this[_0xe8db23(-0x87,-0xb3)][_0xe8db23(-0x10d,-0x16e)](_0x2614f8)&&this['events'][_0xe8db23(-0x110,-0x8e)](_0x2614f8,new Set());function _0xe8db23(_0x5478d6,_0x1a16db){return _0x1e97(_0x1a16db- -0x25a,_0x5478d6);}this[_0xe8db23(-0x48,-0xb3)][_0xe8db23(-0x60,-0x7a)](_0x2614f8)['add'](_0x49f56f);}[_0x4bcf27(-0x20f,-0x258)](_0x3302a0,_0x3fcdd9){if(!this[_0x641eba(0x2e6,0x28d)][_0x641eba(0x1d7,0x1d2)](_0x3302a0))return;function _0x641eba(_0xd142be,_0x546948){return _0x1e97(_0x546948-0xe6,_0xd142be);}const _0x79106f=this['events']['get'](_0x3302a0);_0x3fcdd9?_0x79106f[_0x641eba(0x181,0x1ce)](_0x3fcdd9):_0x79106f[_0x641eba(0x294,0x225)](),_0x79106f[_0x641eba(0x26a,0x2ca)]===0x0&&this[_0x641eba(0x252,0x28d)][_0x641eba(0x1ac,0x1ce)](_0x3302a0);}['emit'](_0x4c007c,..._0x5bc328){if(!this[_0x5c7383(0x23f,0x2c3)][_0x5c7383(0x18b,0x208)](_0x4c007c))return![];function _0x5c7383(_0x2c051a,_0x45ecd4){return _0x1e97(_0x45ecd4-0x11c,_0x2c051a);}const _0x22e2a8=this['events'][_0x5c7383(0x2d5,0x2fc)](_0x4c007c);for(const _0x533c1b of _0x22e2a8){try{_0x533c1b(..._0x5bc328);}catch(_0x2601c8){console[_0x5c7383(0x22c,0x281)]('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x4c007c+'\x22:',_0x2601c8);}}return _0x22e2a8['size']>0x0;}['removeAllListeners'](_0x8d5bb3){_0x8d5bb3?this['events']['delete'](_0x8d5bb3):this['events']['clear']();}['listenerCount'](_0x186569){function _0x489464(_0xe6de31,_0x1389b1){return _0x1e97(_0xe6de31- -0x393,_0x1389b1);}return this[_0x489464(-0x1ec,-0x164)]['get'](_0x186569)?.['size']??0x0;}['eventNames'](){function _0x4dfbdb(_0x252b29,_0x34a3cb){return _0x1e97(_0x252b29- -0x21,_0x34a3cb);}return Array['from'](this[_0x4dfbdb(0x186,0x1a6)]['keys']());}[_0x4bcf27(-0x1ef,-0x249)](_0x18f594){function _0x20060a(_0x55c6b8,_0x53d536){return _0x1e97(_0x53d536-0x2af,_0x55c6b8);}return Array['from'](this['events'][_0x20060a(0x406,0x48f)](_0x18f594)??[]);}['addListener'](_0xa10ef2,_0x173863){this['on'](_0xa10ef2,_0x173863);}['removeListener'](_0x59bd16,_0x4fddf8){function _0x1f7f72(_0x5ce929,_0x18ee55){return _0x1e97(_0x18ee55-0x124,_0x5ce929);}this[_0x1f7f72(0x296,0x2f9)](_0x59bd16,_0x4fddf8);}[_0x4bcf27(-0x2b1,-0x321)](_0x5ca79b,_0x10176d){const _0xb39156=(..._0x298c12)=>{this['off'](_0x5ca79b,_0xb39156),_0x10176d(..._0x298c12);};this['on'](_0x5ca79b,_0xb39156);}[_0x4bcf27(-0x291,-0x283)](_0x11344a,_0x2c68a0){this['on'](_0x11344a,_0x2c68a0);}[_0x4bcf27(-0x285,-0x291)](_0x18d7ac,_0x360d16){const _0x2fc9cd=(..._0xbe3615)=>{this[_0x56995f(-0x72,-0xb3)](_0x18d7ac,_0x2fc9cd);function _0x56995f(_0x598a6e,_0x4d4a94){return _0x1e97(_0x4d4a94- -0x288,_0x598a6e);}_0x360d16(..._0xbe3615);};this['on'](_0x18d7ac,_0x2fc9cd);}['setMaxListeners'](_0x4d87e0){return this['maxListeners']=_0x4d87e0,this;}[_0x4bcf27(-0x231,-0x285)](){return this['maxListeners'];}[_0x4bcf27(-0x28f,-0x305)](_0x43f66a){function _0x3799bc(_0x5d690e,_0x3e5e97){return _0x1e97(_0x5d690e-0x173,_0x3e5e97);}return this[_0x3799bc(0x368,0x348)](_0x43f66a);}}class RealtimeChannel extends EventManager{constructor(_0x7adbd2,_0x5b14c9){super(),this['joinedOnce']=![],this['state']=_0x35fc1f(-0xcc,-0xab),this[_0x35fc1f(-0x129,-0x113)]=new Map(),this[_0x35fc1f(-0x18b,-0x1e3)]=_0x7adbd2;function _0x35fc1f(_0x2f1049,_0x123a31){return _0x1e97(_0x2f1049- -0x2ae,_0x123a31);}this['socket']=_0x5b14c9;}['subscribe'](_0x2d1d78){!this[_0x8ed3b6(-0x231,-0x253)]&&(this[_0x8ed3b6(-0x231,-0x296)]=!![],this['_join']());_0x2d1d78&&this['on']('status',_0x2d1d78);function _0x8ed3b6(_0x8dbf7c,_0x5662cc){return _0x1e97(_0x8dbf7c- -0x31c,_0x5662cc);}return this;}[_0x4bcf27(-0x26b,-0x249)](filter,_0x2f09d0){const _0x40dd05=_0x155c6b(0x2e3,0x296)+JSON[_0x155c6b(0x252,0x1e7)](filter);this['on'](_0x40dd05,_0x2f09d0);const _0x553830={'unsubscribe':()=>{function _0x5a01cc(_0x1ffa14,_0x34d8de){return _0x1e97(_0x34d8de- -0x1b0,_0x1ffa14);}this[_0x5a01cc(0x9f,0x25)](_0x40dd05,_0x2f09d0),this[_0x5a01cc(0x26,-0x2b)]['delete'](_0x40dd05);}};function _0x155c6b(_0x27287b,_0xa57598){return _0x1e97(_0x27287b-0x152,_0xa57598);}return this[_0x155c6b(0x2d7,0x339)][_0x155c6b(0x31e,0x36c)](_0x40dd05,_0x553830),this[_0x155c6b(0x2a8,0x28b)]?.[_0x155c6b(0x270,0x2c5)]&&this['state']===_0x155c6b(0x2bc,0x317)&&this['socket'][_0x155c6b(0x315,0x330)]('subscribe_postgres_changes',{'topic':this[_0x155c6b(0x275,0x29b)],'filter':filter,'ref':this['makeRef']()}),_0x553830;}['onBroadcast'](filter,_0x44a58d){const _0x2e7e1a=_0x5b5215(-0x135,-0xcd)+JSON[_0x5b5215(-0x14b,-0x10a)](filter);function _0x5b5215(_0x1c1541,_0x50a384){return _0x1e97(_0x50a384- -0x20a,_0x1c1541);}this['on'](_0x2e7e1a,_0x44a58d);const _0x33b839={'unsubscribe':()=>{this['off'](_0x2e7e1a,_0x44a58d);function _0x3fcf54(_0x802571,_0x453896){return _0x1e97(_0x453896- -0x224,_0x802571);}this['subscriptions'][_0x3fcf54(-0x14d,-0x13c)](_0x2e7e1a);}};return this['subscriptions'][_0x5b5215(-0x5e,-0x3e)](_0x2e7e1a,_0x33b839),_0x33b839;}['onPresence'](filter,_0x100f51){const _0xa6fdf3=_0xf0ae25(0x239,0x24f)+JSON[_0xf0ae25(0x1b6,0x1fe)](filter);this['on'](_0xa6fdf3,_0x100f51);const _0x15c269={'unsubscribe':()=>{this[_0x49396d(0x28b,0x27d)](_0xa6fdf3,_0x100f51);function _0x49396d(_0x382524,_0x3432fb){return _0x1e97(_0x3432fb-0xa8,_0x382524);}this['subscriptions'][_0x49396d(0x1a4,0x190)](_0xa6fdf3);}};this['subscriptions']['set'](_0xa6fdf3,_0x15c269);function _0xf0ae25(_0x312be0,_0x48aeb5){return _0x1e97(_0x48aeb5-0xfe,_0x312be0);}return _0x15c269;}[_0x4bcf27(-0x273,-0x29a)](_0x4c37ba){return new Promise(_0x53992f=>{function _0x1de3e1(_0x19b39e,_0x41cadc){return _0x1e97(_0x41cadc-0x101,_0x19b39e);}this[_0x1de3e1(0x25f,0x257)]?.[_0x1de3e1(0x25b,0x21f)]&&this['state']==='joined'?(this[_0x1de3e1(0x2c4,0x257)][_0x1de3e1(0x336,0x2c4)]('broadcast',{'topic':this[_0x1de3e1(0x2a1,0x224)],'event':_0x4c37ba[_0x1de3e1(0x243,0x25c)],'payload':_0x4c37ba,'ref':this['makeRef']()}),_0x53992f('ok')):_0x53992f('error');});}[_0x4bcf27(-0x2fe,-0x284)](_0x5750d2){return new Promise(_0x3d4669=>{function _0x31f720(_0x1ab698,_0x310ac0){return _0x1e97(_0x310ac0- -0x2b4,_0x1ab698);}this[_0x31f720(-0x11f,-0x15e)]?.[_0x31f720(-0x198,-0x196)]&&this[_0x31f720(-0x18e,-0x126)]==='joined'?(this[_0x31f720(-0x1da,-0x15e)][_0x31f720(-0xb0,-0xf1)]('presence',{'topic':this['topic'],'event':'track','payload':_0x5750d2,'ref':this['makeRef']()}),_0x3d4669('ok')):_0x3d4669('error');});}[_0x4bcf27(-0x2f7,-0x334)](){return new Promise(_0x5a3f49=>{function _0x1fac05(_0x5b5958,_0x386849){return _0x1e97(_0x386849-0x139,_0x5b5958);}this[_0x1fac05(0x2b8,0x28f)]?.['connected']&&this['state']===_0x1fac05(0x311,0x2a3)?(this[_0x1fac05(0x2a9,0x28f)][_0x1fac05(0x2c4,0x2fc)](_0x1fac05(0x2ca,0x292),{'topic':this['topic'],'event':_0x1fac05(0x290,0x226),'ref':this[_0x1fac05(0x292,0x222)]()}),_0x5a3f49('ok')):_0x5a3f49('error');});}[_0x4bcf27(-0x259,-0x26e)](){return new Promise(_0x3f9676=>{this[_0x4bc7dd(-0x1ca,-0x19c)]='leaving',this['subscriptions']['forEach'](_0x12ee5c=>{function _0x345cf6(_0x2dcd2e,_0x171e9a){return _0x1e97(_0x171e9a- -0x234,_0x2dcd2e);}_0x12ee5c[_0x345cf6(-0xd7,-0xa9)]();}),this[_0x4bc7dd(-0x219,-0x1a5)]['clear']();this['socket']?.[_0x4bc7dd(-0x227,-0x20c)]&&this['socket'][_0x4bc7dd(-0x155,-0x167)](_0x4bc7dd(-0x1b1,-0x137),{'topic':this['topic'],'ref':this['makeRef']()});this[_0x4bc7dd(-0x1d6,-0x19c)]=_0x4bc7dd(-0x195,-0x148);function _0x4bc7dd(_0x30023f,_0x30f2b6){return _0x1e97(_0x30f2b6- -0x32a,_0x30023f);}this['removeAllListeners'](),_0x3f9676('ok');});}[_0x4bcf27(-0x23a,-0x2a9)](){function _0x28c461(_0xbd634f,_0x292e28){return _0x1e97(_0xbd634f-0x42,_0x292e28);}if(this['state']===_0x28c461(0x22f,0x200))return;this['state']='joining',this[_0x28c461(0x198,0x18f)]?.[_0x28c461(0x160,0x149)]&&(this['socket']['emit'](_0x28c461(0x1f2,0x1dd),{'topic':this['topic'],'ref':this['makeRef']()}),setTimeout(()=>{function _0x49332e(_0x5e8a2a,_0x55a25c){return _0x1e97(_0x5e8a2a-0x324,_0x55a25c);}this['state']===_0x49332e(0x42c,0x3e1)&&(this['state']='joined',this['emit'](_0x49332e(0x4ea,0x480),_0x49332e(0x486,0x45a)));},0x64));}[_0x4bcf27(-0x267,-0x2ca)](){function _0x55d38e(_0x282c6e,_0x508d9c){return _0x1e97(_0x508d9c- -0x1b9,_0x282c6e);}this['joinedOnce']&&(this[_0x55d38e(-0x47,-0xf)](),this['subscriptions']['forEach']((_0x3f93bf,_0x1a901e)=>{function _0x3252bf(_0x4b5e4b,_0x3b4069){return _0x1e97(_0x3b4069- -0x16f,_0x4b5e4b);}if(_0x1a901e[_0x3252bf(-0x85,-0x3e)]('postgres_changes:')){const filter=JSON[_0x3252bf(0xe,0x2f)](_0x1a901e[_0x3252bf(0x13,0x74)](_0x3252bf(-0x47,0x22),''));this[_0x3252bf(0x52,-0x19)]?.['emit'](_0x3252bf(-0x9,0x53),{'topic':this['topic'],'filter':filter,'ref':this[_0x3252bf(-0xd,-0x86)]()});}}));}['_trigger'](_0x31b1bd,_0x4f43ee){if(_0x31b1bd===_0x54f34c(-0x1e5,-0x26a)){const _0x3ccf5f=_0x54f34c(-0x1ed,-0x251)+JSON[_0x54f34c(-0x268,-0x2e2)](_0x4f43ee['filter']||{});this['emit'](_0x3ccf5f,_0x4f43ee);}else{if(_0x31b1bd==='broadcast'){const _0x25dd41='broadcast:'+JSON['stringify']({'event':_0x4f43ee[_0x54f34c(-0x264,-0x287)]});this[_0x54f34c(-0x1fc,-0x21f)](_0x25dd41,_0x4f43ee);}else{if(_0x31b1bd==='presence'){const _0xead4f3=_0x54f34c(-0x294,-0x291)+JSON[_0x54f34c(-0x342,-0x2e2)]({'event':_0x4f43ee['event']});this[_0x54f34c(-0x20f,-0x21f)](_0xead4f3,_0x4f43ee);}}}function _0x54f34c(_0x565d9d,_0x229b29){return _0x1e97(_0x229b29- -0x3e2,_0x565d9d);}this[_0x54f34c(-0x197,-0x21f)](_0x31b1bd,_0x4f43ee);}[_0x4bcf27(-0x28c,-0x312)](_0x196b5b){this['state']=_0x196b5b;let status;function _0x20c606(_0x56480d,_0x3b5c05){return _0x1e97(_0x56480d-0x332,_0x3b5c05);}switch(_0x196b5b){case _0x20c606(0x49c,0x420):status='SUBSCRIBED';break;case _0x20c606(0x4b4,0x4df):status='CHANNEL_ERROR';break;case _0x20c606(0x514,0x4a1):status='CLOSED';break;default:return;}this[_0x20c606(0x4f5,0x4e2)]('status',status);}[_0x4bcf27(-0x2fb,-0x298)](){function _0x1dd50c(_0x738616,_0x33c612){return _0x1e97(_0x33c612- -0xd2,_0x738616);}return Math[_0x1dd50c(0x2c,0xa3)]()['toString'](0x24)['substring'](0x2,0xf);}['getState'](){function _0x408744(_0x22c408,_0x3dde82){return _0x1e97(_0x3dde82-0x352,_0x22c408);}return this[_0x408744(0x45e,0x4e0)];}}function getEnvironment(){if(typeof navigator!==_0x251394(0x45f,0x4bf)&&navigator['product']==='ReactNative')return _0x251394(0x527,0x559);if(typeof window!=='undefined'&&typeof document!==_0x251394(0x48e,0x4bf))return'browser';function _0x251394(_0x353a1b,_0x44a729){return _0x1e97(_0x44a729-0x39e,_0x353a1b);}if(typeof global!==_0x251394(0x451,0x4bf)&&typeof process!==_0x251394(0x44c,0x4bf)&&process[_0x251394(0x49c,0x4b0)]?.[_0x251394(0x499,0x502)])return'node';return'browser';}function isSocketIOAvailable(){function _0x40aaeb(_0x16d91c,_0x1878ae){return _0x1e97(_0x1878ae-0x1c5,_0x16d91c);}try{const _0x9d98a2=getEnvironment();switch(_0x9d98a2){case _0x40aaeb(0x32b,0x329):return typeof require!=='undefined'&&require[_0x40aaeb(0x2ae,0x2d1)]&&!!require[_0x40aaeb(0x350,0x2d1)]('socket.io-client');case'browser':if(typeof globalThis!==_0x40aaeb(0x369,0x2e6)&&'io'in globalThis)return!![];return typeof require!=='undefined'&&require[_0x40aaeb(0x2c6,0x2d1)]&&!!require[_0x40aaeb(0x272,0x2d1)]('socket.io-client');case'react-native':try{return typeof require!==_0x40aaeb(0x29b,0x2e6)&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x11f852(_0x998979,_0x200792){return _0x1e97(_0x200792- -0xb9,_0x998979);}try{if(typeof require!==_0x11f852(0xc2,0x68))return require(_0x11f852(0x1c,0x83));if(typeof globalThis!==_0x11f852(0x62,0x68)&&'io'in globalThis)return{'io':globalThis['io']};throw new Error(_0x11f852(0x62,0x48));}catch(_0x3eaef7){throw new Error(_0x11f852(0xae,0x52));}}class WebSocketAdapter{constructor(){function _0x35a3a2(_0x5c1353,_0x2e45cf){return _0x1e97(_0x5c1353-0x21a,_0x2e45cf);}this[_0x35a3a2(0x370,0x3b9)]=null;}async['connect'](_0x453c16,_0x2da356){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:_0x54dafb}=getSocketIO();return new Promise((_0x1b5cb3,_0x54002c)=>{function _0x3b8def(_0x46c47b,_0xa71522){return _0x1e97(_0xa71522-0x2b4,_0x46c47b);}this[_0x3b8def(0x402,0x40a)]=_0x54dafb(_0x453c16,_0x2da356),this[_0x3b8def(0x3a3,0x40a)]['on'](_0x3b8def(0x38a,0x3be),()=>_0x1b5cb3()),this['socket']['on']('connect_error',_0x36087a=>_0x54002c(_0x36087a));});}[_0x4bcf27(-0x2ff,-0x2d9)](){function _0x1c199e(_0x168844,_0x59db92){return _0x1e97(_0x59db92-0xdf,_0x168844);}this[_0x1c199e(0x20e,0x235)]&&(this['socket'][_0x1c199e(0x223,0x1c4)](),this[_0x1c199e(0x1c7,0x235)]=null);}['emit'](_0x50c5aa,data){function _0xfdea43(_0x286e8e,_0x318306){return _0x1e97(_0x318306-0x1dd,_0x286e8e);}this[_0xfdea43(0x304,0x333)]?.['emit'](_0x50c5aa,data);}['on'](_0x13c960,_0x162e78){function _0x40a67e(_0x297492,_0x5ad559){return _0x1e97(_0x5ad559-0x2c0,_0x297492);}this[_0x40a67e(0x450,0x416)]?.['on'](_0x13c960,_0x162e78);}['off'](_0x366110,_0x2d7800){_0x2d7800?this['socket']?.['off'](_0x366110,_0x2d7800):this['socket']?.['off'](_0x366110);}get['connected'](){function _0x3d0f2a(_0x2bdc92,_0x2e439a){return _0x1e97(_0x2bdc92- -0xe0,_0x2e439a);}return this['socket']?.[_0x3d0f2a(0x3e,-0x22)]??![];}}class ReactNativeSocketAdapter{constructor(){this['socket']=null;}async['connect'](_0x59b96a,_0x2d30b5){if(!isSocketIOAvailable())throw new Error(_0x5415c7(0x50f,0x4e2));const {io:_0x104237}=getSocketIO();function _0x5415c7(_0x3eea18,_0x573c79){return _0x1e97(_0x573c79-0x30f,_0x3eea18);}return new Promise((_0x2ed51e,_0x40d733)=>{function _0x8dc0d3(_0x5edc95,_0x71b1d9){return _0x1e97(_0x5edc95- -0x3a1,_0x71b1d9);}this['socket']=_0x104237(_0x59b96a,{..._0x2d30b5,'transports':['websocket'],'upgrade':![],'autoConnect':!![]}),this[_0x8dc0d3(-0x24b,-0x223)]['on']('connect',()=>_0x2ed51e()),this['socket']['on']('connect_error',_0x3ea8a2=>_0x40d733(_0x3ea8a2));});}[_0x4bcf27(-0x2ff,-0x28d)](){function _0x265004(_0xce23bf,_0x252a9c){return _0x1e97(_0x252a9c- -0x150,_0xce23bf);}this['socket']&&(this[_0x265004(-0x4e,0x6)][_0x265004(-0x43,-0x6b)](),this['socket']=null);}['emit'](_0x4dbc7e,data){this['socket']?.['emit'](_0x4dbc7e,data);}['on'](_0x48a0b7,_0x3fef56){function _0x45201c(_0x5c62fe,_0x5cee4f){return _0x1e97(_0x5c62fe- -0xaf,_0x5cee4f);}this[_0x45201c(0xa7,0xf1)]?.['on'](_0x48a0b7,_0x3fef56);}['off'](_0x2622df,_0x1af53f){function _0x37ffd9(_0x3f54b6,_0x131cd4){return _0x1e97(_0x3f54b6- -0x266,_0x131cd4);}_0x1af53f?this[_0x37ffd9(-0x110,-0xfa)]?.['off'](_0x2622df,_0x1af53f):this[_0x37ffd9(-0x110,-0x18a)]?.[_0x37ffd9(-0x91,-0x7a)](_0x2622df);}get['connected'](){return this['socket']?.['connected']??![];}}function createSocketAdapter(){const _0x320cf8=getEnvironment();function _0x5e107f(_0x5a6117,_0x11a6b2){return _0x1e97(_0x11a6b2-0x6c,_0x5a6117);}switch(_0x320cf8){case _0x5e107f(0x203,0x227):return new ReactNativeSocketAdapter();case'browser':case'node':default:return new WebSocketAdapter();}}function _0x4bcf27(_0x5e739a,_0x16ad07){return _0x1e97(_0x5e739a- -0x3e4,_0x16ad07);}class RealtimeClient{constructor(_0x1177ae,_0x505d3c,_0x23736b={}){function _0x50b847(_0x47d2d3,_0x3c29f1){return _0x1e97(_0x47d2d3- -0xc5,_0x3c29f1);}this['socket']=null,this['channels']=new Map(),this['connectionState']='disconnected',this['reconnectAttempts']=0x0,this[_0x50b847(0xaa,0xb2)]=0x5,this[_0x50b847(0x48,0xa8)]=_0x1177ae,this[_0x50b847(0x57,0x16)]=_0x505d3c,this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x23736b},this['socketAdapter']=createSocketAdapter();}[_0x4bcf27(-0x2da,-0x2a6)](){return new Promise(async(_0x4dfe2e,_0xa056b4)=>{function _0x49688d(_0x5521cd,_0x4419f4){return _0x1e97(_0x4419f4- -0x239,_0x5521cd);}if(this[_0x49688d(-0xec,-0xec)]['connected']){_0x4dfe2e();return;}this['connectionState']=_0x49688d(-0x8e,-0xa9);try{await this[_0x49688d(-0x130,-0xec)][_0x49688d(-0x124,-0x12f)](this['url'],{'auth':{'apikey':this['apiKey']},'transports':['websocket'],'reconnection':!![],'reconnectionDelay':this['options']['reconnectInterval'],'reconnectionAttempts':this[_0x49688d(-0x3d,-0x85)][_0x49688d(-0xdf,-0xca)],...this[_0x49688d(-0x1d,-0x85)][_0x49688d(-0x8f,-0xdb)]}),this[_0x49688d(-0x11b,-0xe3)]=this['socketAdapter']['socket'],this['socketAdapter']['on'](_0x49688d(-0x11a,-0x12f),()=>{this[_0x10c92c(0x14d,0x1a7)]='connected';function _0x10c92c(_0x262b9a,_0x1ab548){return _0x1e97(_0x262b9a-0x4,_0x1ab548);}this['reconnectAttempts']=0x0,this['setupHeartbeat'](),_0x4dfe2e();}),this[_0x49688d(-0x165,-0xec)]['on']('disconnect',()=>{function _0x228f39(_0x29aa03,_0x208ef2){return _0x1e97(_0x208ef2- -0x2c9,_0x29aa03);}this[_0x228f39(-0x1ed,-0x180)]='disconnected',this['channels'][_0x228f39(-0x21e,-0x197)](channel=>{function _0x49cc59(_0x4f4be2,_0x1a6a2a){return _0x1e97(_0x1a6a2a- -0x2ac,_0x4f4be2);}channel[_0x49cc59(-0x125,-0x154)](_0x49cc59(-0x6d,-0xca));});}),this['socketAdapter']['on'](_0x49688d(-0x10d,-0xa1),_0x21bbe9=>{function _0x245b16(_0x3f78ef,_0x2c6d42){return _0x1e97(_0x2c6d42- -0xa2,_0x3f78ef);}this['connectionState']=_0x245b16(0xc1,0xc3),this['reconnectAttempts']++,this['reconnectAttempts']>=this[_0x245b16(0x96,0xcd)]&&_0xa056b4(new Error('Failed\x20to\x20connect\x20after\x20'+this[_0x245b16(0x73,0xcd)]+_0x245b16(0xfb,0x12b)+_0x21bbe9['message']));}),this[_0x49688d(-0x12a,-0xec)]['on'](_0x49688d(-0x68,-0x9c),()=>{function _0x76a6c6(_0x3bf758,_0x39e807){return _0x1e97(_0x39e807-0x253,_0x3bf758);}this[_0x76a6c6(0x326,0x39c)]=_0x76a6c6(0x31b,0x371),this['reconnectAttempts']=0x0,this[_0x76a6c6(0x33f,0x382)]['forEach'](channel=>{channel['_rejoin']();});}),this[_0x49688d(-0x11f,-0xec)]['on'](_0x49688d(-0x7f,-0xc1),_0x4556e4=>{function _0x2a10ff(_0x1bc25f,_0x2bea9a){return _0x1e97(_0x2bea9a-0x38a,_0x1bc25f);}const channel=this[_0x2a10ff(0x4fd,0x4b9)]['get'](_0x4556e4['topic']);channel&&channel[_0x2a10ff(0x532,0x4eb)]('postgres_changes',_0x4556e4);}),this['socketAdapter']['on'](_0x49688d(-0xe8,-0x147),_0x181d8e=>{const channel=this['channels'][_0x4390fc(-0x4f,-0x6)](_0x181d8e['topic']);function _0x4390fc(_0x5150d8,_0x1ec7ba){return _0x1e97(_0x1ec7ba- -0x1e6,_0x5150d8);}channel&&channel[_0x4390fc(-0x51,-0x85)](_0x4390fc(-0x128,-0xf4),_0x181d8e);}),this[_0x49688d(-0xfb,-0xec)]['on']('presence',_0x48b76f=>{const channel=this[_0xaea61f(0x34f,0x375)]['get'](_0x48b76f[_0xaea61f(0x332,0x369)]);function _0xaea61f(_0x3e1133,_0x5b7acd){return _0x1e97(_0x5b7acd-0x246,_0x3e1133);}channel&&channel[_0xaea61f(0x3ed,0x3a7)](_0xaea61f(0x390,0x39f),_0x48b76f);});}catch(_0x37f248){this[_0x49688d(-0xc8,-0xf0)]='error',_0xa056b4(_0x37f248);}});}[_0x4bcf27(-0x2ff,-0x320)](){this[_0x40bf7c(0x4fe,0x505)]&&(this[_0x40bf7c(0x4fe,0x4dd)][_0x40bf7c(0x496,0x4bf)](),this[_0x40bf7c(0x507,0x53d)]=null);this[_0x40bf7c(0x4fa,0x484)]=_0x40bf7c(0x4d7,0x513);function _0x40bf7c(_0x25d7b7,_0x489632){return _0x1e97(_0x25d7b7-0x3b1,_0x489632);}this[_0x40bf7c(0x4e0,0x52c)][_0x40bf7c(0x4f0,0x4f4)]();}['channel'](_0x46cf52){function _0x111c0b(_0x1acf63,_0x5120a0){return _0x1e97(_0x1acf63-0x22,_0x5120a0);}if(this['channels'][_0x111c0b(0x10e,0x153)](_0x46cf52))return this[_0x111c0b(0x151,0xd4)][_0x111c0b(0x202,0x218)](_0x46cf52);const channel=new RealtimeChannel(_0x46cf52,this[_0x111c0b(0x178,0x188)]);return this[_0x111c0b(0x151,0x131)][_0x111c0b(0x1ee,0x1fd)](_0x46cf52,channel),this[_0x111c0b(0x16b,0x169)]==='connected'&&channel['_join'](),channel;}[_0x4bcf27(-0x266,-0x2d4)](channel){const _0x32c2bd=channel[_0x1e379d(0x20d,0x1a5)];function _0x1e379d(_0xfc8e9c,_0x3f3ed4){return _0x1e97(_0xfc8e9c-0xea,_0x3f3ed4);}this['channels']['has'](_0x32c2bd)&&(this['channels'][_0x1e379d(0x1d2,0x1d6)](_0x32c2bd),channel['unsubscribe']());}['removeAllChannels'](){function _0x2b245c(_0x3c2706,_0xa47e9e){return _0x1e97(_0x3c2706-0x169,_0xa47e9e);}this[_0x2b245c(0x298,0x2d8)][_0x2b245c(0x29b,0x25f)](channel=>{channel['unsubscribe']();}),this[_0x2b245c(0x298,0x310)][_0x2b245c(0x2a8,0x26e)]();}[_0x4bcf27(-0x2d3,-0x2e1)](){function _0x46a4b4(_0x12c92f,_0x5d7293){return _0x1e97(_0x12c92f- -0x1d1,_0x5d7293);}return Array['from'](this['channels'][_0x46a4b4(-0x1b,0x24)]());}[_0x4bcf27(-0x235,-0x29b)](){function _0x50ff71(_0x57429a,_0x418d58){return _0x1e97(_0x57429a- -0x276,_0x418d58);}return this[_0x50ff71(-0x12d,-0x19d)]===_0x50ff71(-0x158,-0x15d)&&this['socketAdapter']['connected'];}['getConnectionState'](){return this['connectionState'];}[_0x4bcf27(-0x2ea,-0x2cc)](_0x500c0f){const _0x5754b6=()=>_0x500c0f(this[_0x4c2833(-0xb2,-0x91)]);this[_0x4c2833(-0xab,-0x8d)]&&(this['socketAdapter']['on'](_0x4c2833(-0x131,-0xd0),()=>{this['connectionState']='connected',_0x5754b6();}),this[_0x4c2833(-0x5b,-0x8d)]['on']('disconnect',()=>{function _0x439a99(_0x2f16a9,_0x2a9029){return _0x1e97(_0x2f16a9-0xfc,_0x2a9029);}this[_0x439a99(0x245,0x1f8)]=_0x439a99(0x222,0x231),_0x5754b6();}),this['socketAdapter']['on'](_0x4c2833(-0x76,-0x42),()=>{this['connectionState']='error',_0x5754b6();}));function _0x4c2833(_0x1e1aa3,_0x5ba13f){return _0x1e97(_0x5ba13f- -0x1da,_0x1e1aa3);}return()=>{function _0x4dc363(_0x413017,_0x265c64){return _0x1e97(_0x265c64-0x191,_0x413017);}this[_0x4dc363(0x271,0x2de)]&&(this['socketAdapter']['off']('connect',_0x5754b6),this['socketAdapter'][_0x4dc363(0x2f6,0x366)]('disconnect',_0x5754b6),this[_0x4dc363(0x2b0,0x2de)][_0x4dc363(0x2e0,0x366)](_0x4dc363(0x2b6,0x329),_0x5754b6));};}['setupHeartbeat'](){if(!this['options']['heartbeatInterval']||!this[_0x2f53f4(-0x1e1,-0x1e2)])return;function _0x2f53f4(_0x179aa9,_0x42e189){return _0x1e97(_0x179aa9- -0x32e,_0x42e189);}const interval=setInterval(()=>{function _0x3a2257(_0x3323a8,_0x3d7f6d){return _0x1e97(_0x3323a8- -0x34b,_0x3d7f6d);}this[_0x3a2257(-0x1fe,-0x223)]?.[_0x3a2257(-0x22d,-0x286)]?this[_0x3a2257(-0x1fe,-0x1ac)]['emit']('heartbeat',{'timestamp':Date['now']()}):clearInterval(interval);},this[_0x2f53f4(-0x17a,-0x196)][_0x2f53f4(-0x20f,-0x1c4)]);}['_getSocket'](){return this['socket'];}}class FunctionsClient{constructor(_0x1a3fe0){this['httpClient']=_0x1a3fe0;}async[_0x4bcf27(-0x2d6,-0x296)](_0x41d7ea,_0x3b7b41){function _0x260812(_0x3147c9,_0x4269f5){return _0x1e97(_0x4269f5- -0x34b,_0x3147c9);}try{const _0x1aa9b4=_0x3b7b41?.['method']||'POST',headers={'Content-Type':'application/json',..._0x3b7b41?.[_0x260812(-0x188,-0x16e)]};let response;const _0x3d025e=_0x260812(-0x1d1,-0x217)+_0x41d7ea;switch(_0x1aa9b4['toUpperCase']()){case'GET':response=await this['httpClient'][_0x260812(-0x1d7,-0x16b)](_0x3d025e,{'headers':headers,'params':_0x3b7b41?.[_0x260812(-0x1ba,-0x1e2)]});break;case'POST':response=await this['httpClient'][_0x260812(-0x2b7,-0x233)](_0x3d025e,_0x3b7b41?.['body'],{'headers':headers});break;case'PUT':response=await this[_0x260812(-0x236,-0x1b1)]['put'](_0x3d025e,_0x3b7b41?.[_0x260812(-0x1ee,-0x1e2)],{'headers':headers});break;case'PATCH':response=await this['httpClient']['patch'](_0x3d025e,_0x3b7b41?.[_0x260812(-0x1e1,-0x1e2)],{'headers':headers});break;case'DELETE':response=await this[_0x260812(-0x139,-0x1b1)]['delete'](_0x3d025e,{'headers':headers,'data':_0x3b7b41?.[_0x260812(-0x22b,-0x1e2)]});break;default:throw new EBaaSError(_0x260812(-0x22a,-0x256)+_0x1aa9b4,0x190);}return{'data':response['data'],'error':null};}catch(_0x38080e){return{'data':null,'error':_0x38080e instanceof EBaaSError?_0x38080e:new EBaaSError(_0x38080e instanceof Error?_0x38080e[_0x260812(-0x186,-0x166)]:_0x260812(-0x122,-0x17c),0x0,_0x38080e)};}}async[_0x4bcf27(-0x281,-0x2e0)](){function _0x19cdad(_0x50787d,_0x56deab){return _0x1e97(_0x50787d-0x1e6,_0x56deab);}try{const response=await this['httpClient'][_0x19cdad(0x3c6,0x418)]('/functions/v1');return{'data':response['data'],'error':null};}catch(_0x4423d6){return{'data':null,'error':_0x4423d6 instanceof EBaaSError?_0x4423d6:new EBaaSError(_0x4423d6 instanceof Error?_0x4423d6['message']:'Failed\x20to\x20list\x20functions',0x0,_0x4423d6)};}}async[_0x4bcf27(-0x204,-0x1ba)](_0x29c1ca){function _0x3f3b2b(_0x13d185,_0x50d1b3){return _0x1e97(_0x50d1b3-0x32b,_0x13d185);}try{const response=await this['httpClient']['get'](_0x3f3b2b(0x461,0x45f)+_0x29c1ca+'/info');return{'data':response[_0x3f3b2b(0x499,0x4af)],'error':null};}catch(_0x1c0c2e){return{'data':null,'error':_0x1c0c2e instanceof EBaaSError?_0x1c0c2e:new EBaaSError(_0x1c0c2e instanceof Error?_0x1c0c2e[_0x3f3b2b(0x4bc,0x510)]:'Failed\x20to\x20get\x20function',0x0,_0x1c0c2e)};}}async[_0x4bcf27(-0x2dd,-0x2c7)](_0x3d0aa8,_0x55de8c){function _0x548966(_0x5e0e91,_0x263a71){return _0x1e97(_0x5e0e91- -0x1c7,_0x263a71);}try{const _0x3cc28b=new FormData();if(_0x55de8c[_0x548966(-0x12,0x1b)]instanceof File)_0x3cc28b[_0x548966(0x24,-0x58)]('code',_0x55de8c['code']);else typeof _0x55de8c['code']===_0x548966(-0xcb,-0x135)&&_0x3cc28b['append']('code',new Blob([_0x55de8c[_0x548966(-0x12,-0x76)]],{'type':_0x548966(-0xb0,-0x10f)}),_0x548966(-0xd3,-0x14a));_0x55de8c['entrypoint']&&_0x3cc28b['append']('entrypoint',_0x55de8c[_0x548966(-0xa2,-0x44)]);_0x55de8c[_0x548966(-0x89,-0xda)]&&_0x3cc28b[_0x548966(0x24,-0x10)](_0x548966(-0x89,-0x7a),JSON[_0x548966(-0xc7,-0x7f)](_0x55de8c[_0x548966(-0x89,-0xd2)]));_0x55de8c['importMap']&&_0x3cc28b[_0x548966(0x24,-0xe)](_0x548966(-0x19,-0x7),JSON['stringify'](_0x55de8c['importMap']));_0x55de8c['verify']!==undefined&&_0x3cc28b['append'](_0x548966(-0xa,-0x40),String(_0x55de8c[_0x548966(-0xa,-0x42)]));const response=await this[_0x548966(-0x2d,-0x2)][_0x548966(-0xaf,-0x41)](_0x548966(-0x93,-0x18)+_0x3d0aa8+'/deploy',_0x3cc28b,{'headers':{'Content-Type':_0x548966(-0xae,-0x112)}});return{'data':response['data'],'error':null};}catch(_0x4357c5){return{'data':null,'error':_0x4357c5 instanceof EBaaSError?_0x4357c5:new EBaaSError(_0x4357c5 instanceof Error?_0x4357c5[_0x548966(0x1e,0xc)]:_0x548966(-0x2e,-0x6d),0x0,_0x4357c5)};}}async['delete'](_0x59f17d){function _0x2666e8(_0x1615d4,_0x35a2c2){return _0x1e97(_0x1615d4- -0x375,_0x35a2c2);}try{const response=await this['httpClient']['delete'](_0x2666e8(-0x241,-0x1c3)+_0x59f17d);return{'data':response['data'],'error':null};}catch(_0x605054){return{'data':null,'error':_0x605054 instanceof EBaaSError?_0x605054:new EBaaSError(_0x605054 instanceof Error?_0x605054[_0x2666e8(-0x190,-0x179)]:'Failed\x20to\x20delete\x20function',0x0,_0x605054)};}}async[_0x4bcf27(-0x2bd,-0x305)](_0x4b2f68,_0x3603b2){function _0x515df8(_0x2ade83,_0x56f5ab){return _0x1e97(_0x2ade83-0x79,_0x56f5ab);}try{const response=await this['httpClient']['put']('/functions/v1/'+_0x4b2f68+'/env',{'env':_0x3603b2});return{'data':response['data'],'error':null};}catch(_0x37b46b){return{'data':null,'error':_0x37b46b instanceof EBaaSError?_0x37b46b:new EBaaSError(_0x37b46b instanceof Error?_0x37b46b[_0x515df8(0x25e,0x246)]:'Failed\x20to\x20update\x20function\x20environment',0x0,_0x37b46b)};}}async[_0x4bcf27(-0x205,-0x1da)](_0x2f0062,_0x5b9887){function _0x53ca71(_0x5bf744,_0x2f9527){return _0x1e97(_0x2f9527-0x1e7,_0x5bf744);}try{const _0x41ad26=new URLSearchParams();_0x5b9887?.[_0x53ca71(0x3ff,0x3c3)]&&_0x41ad26[_0x53ca71(0x44d,0x3d2)](_0x53ca71(0x367,0x3c3),String(_0x5b9887['limit']));_0x5b9887?.['offset']&&_0x41ad26[_0x53ca71(0x43b,0x3d2)]('offset',String(_0x5b9887['offset']));_0x5b9887?.[_0x53ca71(0x336,0x388)]&&_0x41ad26[_0x53ca71(0x3a5,0x3d2)](_0x53ca71(0x311,0x388),_0x5b9887['level']);const _0x3be71e=_0x53ca71(0x33d,0x31b)+_0x2f0062+_0x53ca71(0x295,0x312)+(_0x41ad26[_0x53ca71(0x2ee,0x310)]()?'?'+_0x41ad26['toString']():''),response=await this['httpClient'][_0x53ca71(0x379,0x3c7)](_0x3be71e);return{'data':response[_0x53ca71(0x334,0x36b)],'error':null};}catch(_0x27ecbd){return{'data':null,'error':_0x27ecbd instanceof EBaaSError?_0x27ecbd:new EBaaSError(_0x27ecbd instanceof Error?_0x27ecbd[_0x53ca71(0x3cd,0x3cc)]:'Failed\x20to\x20get\x20function\x20logs',0x0,_0x27ecbd)};}}async[_0x4bcf27(-0x270,-0x2f8)](_0x361a41,_0x1a98ed){function _0x6d862b(_0x32223f,_0x296724){return _0x1e97(_0x296724-0x257,_0x32223f);}try{const _0xab63c2=new URLSearchParams();_0x1a98ed?.[_0x6d862b(0x3bb,0x403)]&&_0xab63c2[_0x6d862b(0x4c6,0x442)](_0x6d862b(0x3af,0x403),_0x1a98ed['period']);const _0x5c1589='/functions/v1/'+_0x361a41+_0x6d862b(0x433,0x435)+(_0xab63c2['toString']()?'?'+_0xab63c2['toString']():''),response=await this[_0x6d862b(0x433,0x3f1)][_0x6d862b(0x464,0x437)](_0x5c1589);return{'data':response['data'],'error':null};}catch(_0xbe1c19){return{'data':null,'error':_0xbe1c19 instanceof EBaaSError?_0xbe1c19:new EBaaSError(_0xbe1c19 instanceof Error?_0xbe1c19[_0x6d862b(0x457,0x43c)]:_0x6d862b(0x3e8,0x422),0x0,_0xbe1c19)};}}}class EBaaSClient{constructor(_0x2c9d13,_0x1b728e,_0x5e4755){this['options']=_0x5e4755,this['httpClient']=new HttpClient({'url':_0x2c9d13,'apiKey':_0x1b728e,'timeout':0x7530,'headers':_0x5e4755?.[_0x41d58e(-0xa4,-0x101)]?.['headers']}),this['auth']=new AuthClient(this['httpClient'],_0x5e4755?.[_0x41d58e(-0x186,-0x166)]?.['workspaceId']),this[_0x41d58e(-0x18a,-0x166)]=new DatabaseClient(this['httpClient'],_0x5e4755?.[_0x41d58e(-0x14f,-0x166)]?.['workspaceId']),this['storage']=new StorageClient(this[_0x41d58e(-0xd8,-0x106)]),this[_0x41d58e(-0x194,-0x10d)]=new RealtimeClient(_0x2c9d13,_0x1b728e,_0x5e4755?.['realtime']);function _0x41d58e(_0x1dd942,_0x4efd82){return _0x1e97(_0x4efd82- -0x2a0,_0x1dd942);}this['functions']=new FunctionsClient(this['httpClient']),this['initializeCustomDatabase']();}['from'](_0x47fad3){function _0x203179(_0x3e0184,_0x6e4203){return _0x1e97(_0x3e0184- -0x3c8,_0x6e4203);}return this[_0x203179(-0x28e,-0x282)][_0x203179(-0x223,-0x253)](_0x47fad3);}['rpc'](_0x59f355,_0x427811){function _0x5e143a(_0x2857d4,_0x224037){return _0x1e97(_0x2857d4- -0xdd,_0x224037);}return this[_0x5e143a(0x5d,0x6b)]['rpc'](_0x59f355,_0x427811);}[_0x4bcf27(-0x2e9,-0x27d)](_0x40058b){return this['storage']['from'](_0x40058b);}[_0x4bcf27(-0x250,-0x288)](_0x1d732d){function _0x253b4c(_0x18a257,_0xb57052){return _0x1e97(_0x18a257- -0x283,_0xb57052);}return this[_0x253b4c(-0xf0,-0xc6)]['channel'](_0x1d732d);}[_0x4bcf27(-0x2d6,-0x2f0)](_0x30f53f,_0x1ff8b7){return this['functions']['invoke'](_0x30f53f,_0x1ff8b7);}async[_0x4bcf27(-0x268,-0x2cb)](){function _0x290446(_0x55bef4,_0x421602){return _0x1e97(_0x421602- -0x1ad,_0x55bef4);}if(this[_0x290446(-0x5f,0x7)]?.['database']?.['autoDetectCustomDatabase'])try{await this[_0x290446(-0xd0,-0x73)][_0x290446(-0x2e,0x11)]();}catch(_0x14ac16){console['warn']('Failed to initialize custom database detection:',_0x14ac16);}}async[_0x4bcf27(-0x20c,-0x1c0)](_0x31264e){this['auth'][_0x1e0cf7(0x301,0x331)](_0x31264e),this[_0x1e0cf7(0x292,0x293)][_0x1e0cf7(0x36c,0x331)](_0x31264e);function _0x1e0cf7(_0x285002,_0x10a9d9){return _0x1e97(_0x10a9d9-0x159,_0x285002);}this[_0x1e0cf7(0x303,0x30d)]?.[_0x1e0cf7(0x22c,0x293)]?.[_0x1e0cf7(0x30e,0x2d3)]&&await this[_0x1e0cf7(0x2cb,0x293)][_0x1e0cf7(0x2a5,0x317)]();}async['configureCustomDatabase'](_0x2ce36b){function _0x1b3575(_0x59cfcf,_0x2afe29){return _0x1e97(_0x2afe29- -0x157,_0x59cfcf);}await this['database'][_0x1b3575(0x2c,0x3b)](_0x2ce36b);}['getCustomDatabaseStatus'](){function _0x4c154a(_0x459e82,_0x166ea5){return _0x1e97(_0x459e82-0x12,_0x166ea5);}return this[_0x4c154a(0x14c,0x13f)][_0x4c154a(0x15e,0x1ad)]();}}function createClient(_0x1aa2a1,_0x124d77,_0x37c6af){return new EBaaSClient(_0x1aa2a1,_0x124d77,_0x37c6af);}const version=_0x4bcf27(-0x25b,-0x21d);export{AuthClient,CustomDatabaseManager,DatabaseClient,EBaaSClient,EBaaSError,FunctionsClient,HttpClient,QueryBuilder,RealtimeChannel,RealtimeClient,StorageBucket,StorageClient,createClient,version};