@e-techsolutions/e-baas-sdk 1.1.9 → 1.2.0

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 _0x510194(_0x3a8e5d,_0x55d84a){return _0x30c5(_0x3a8e5d-0x1d5,_0x55d84a);}while(!![]){try{const _0x59c24e=parseInt(_0x510194(0x3d8,0x352))/0x1+parseInt(_0x510194(0x387,0x3b1))/0x2*(-parseInt(_0x510194(0x3eb,0x3f7))/0x3)+-parseInt(_0x510194(0x37f,0x3ed))/0x4+-parseInt(_0x510194(0x397,0x384))/0x5*(parseInt(_0x510194(0x3e0,0x372))/0x6)+parseInt(_0x510194(0x3b2,0x3ce))/0x7*(parseInt(_0x510194(0x3fc,0x469))/0x8)+parseInt(_0x510194(0x3d7,0x3b9))/0x9+-parseInt(_0x510194(0x3c5,0x423))/0xa;if(_0x59c24e===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x464f08){stringArray['push'](stringArray['shift']());}}}(_0x5035,0xe93cb));function _0x30c5(_0x2d85c0,_0x3e6822){const _0x50359b=_0x5035();return _0x30c5=function(_0x30c563,_0x89ef48){_0x30c563=_0x30c563-0x15d;let _0x51eb1a=_0x50359b[_0x30c563];if(_0x30c5['gDoLDn']===undefined){var _0x523de9=function(_0x26b5d7){const _0x33cf35='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x48483f='',_0x45e808='';for(let _0xc6a3d8=0x0,_0x949364,_0xa96bf5,_0x11ecee=0x0;_0xa96bf5=_0x26b5d7['charAt'](_0x11ecee++);~_0xa96bf5&&(_0x949364=_0xc6a3d8%0x4?_0x949364*0x40+_0xa96bf5:_0xa96bf5,_0xc6a3d8++%0x4)?_0x48483f+=String['fromCharCode'](0xff&_0x949364>>(-0x2*_0xc6a3d8&0x6)):0x0){_0xa96bf5=_0x33cf35['indexOf'](_0xa96bf5);}for(let _0xd12b69=0x0,_0x46c884=_0x48483f['length'];_0xd12b69<_0x46c884;_0xd12b69++){_0x45e808+='%'+('00'+_0x48483f['charCodeAt'](_0xd12b69)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x45e808);};_0x30c5['mirDYz']=_0x523de9,_0x2d85c0=arguments,_0x30c5['gDoLDn']=!![];}const _0xa95629=_0x50359b[0x0],_0x308bf5=_0x30c563+_0xa95629,_0x24661b=_0x2d85c0[_0x308bf5];return!_0x24661b?(_0x51eb1a=_0x30c5['mirDYz'](_0x51eb1a),_0x2d85c0[_0x308bf5]=_0x51eb1a):_0x51eb1a=_0x24661b,_0x51eb1a;},_0x30c5(_0x2d85c0,_0x3e6822);}import axios from'axios';class EBaaSError extends Error{constructor(_0x26b5d7,status=0x0,_0x33cf35){super(_0x26b5d7),this[_0x1c73fe(-0x180,-0x1dc)]='EBaaSError',this[_0x1c73fe(-0x13b,-0xb4)]=status;function _0x1c73fe(_0x3b1156,_0x4a6a55){return _0x30c5(_0x3b1156- -0x350,_0x4a6a55);}this[_0x1c73fe(-0x199,-0x1e0)]=_0x33cf35,Error[_0x1c73fe(-0x1db,-0x219)]&&Error['captureStackTrace'](this,EBaaSError);}['toJSON'](){function _0x728abd(_0x6a54c5,_0x19a594){return _0x30c5(_0x19a594- -0x20,_0x6a54c5);}return{'name':this['name'],'message':this[_0x728abd(0x1aa,0x1ea)],'status':this['status'],'details':this['details'],'stack':this[_0x728abd(0x1eb,0x231)]};}['toString'](){return this['name']+':\x20'+this['message']+'\x20(Status:\x20'+this['status']+')';}}class HttpClient{constructor(config){this[_0x17643a(0x410,0x489)]=config[_0x17643a(0x39e,0x352)];function _0x17643a(_0x476798,_0x468fc3){return _0x30c5(_0x476798-0x216,_0x468fc3);}this[_0x17643a(0x44f,0x4c3)]=config['apiKey'],this['client']=axios[_0x17643a(0x386,0x314)]({'baseURL':this['baseURL'],'timeout':config[_0x17643a(0x3ba,0x42a)]||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x17643a(0x44f,0x3f7)],...config[_0x17643a(0x403,0x46e)]}}),this['setupInterceptors']();}['setupInterceptors'](){function _0x1fe32c(_0x3cd200,_0x5bf09d){return _0x30c5(_0x3cd200-0x33a,_0x5bf09d);}this[_0x1fe32c(0x4bc,0x542)]['interceptors'][_0x1fe32c(0x588,0x5ce)]['use'](config=>{return config;},_0x48483f=>{function _0x4b2879(_0x419a30,_0x5e8f4d){return _0x30c5(_0x5e8f4d-0x5,_0x419a30);}return Promise[_0x4b2879(0x212,0x1a4)](new EBaaSError('Request\x20failed',0x0,_0x48483f));}),this[_0x1fe32c(0x4bc,0x521)]['interceptors']['response'][_0x1fe32c(0x4e3,0x4a7)](response=>{return response;},_0x45e808=>{const status=_0x45e808[_0xde271f(0x105,0x179)]?.['status']||0x0;function _0xde271f(_0x2dcffb,_0x4e315d){return _0x30c5(_0x4e315d- -0xf2,_0x2dcffb);}const _0xc6a3d8=_0x45e808['response']?.[_0xde271f(0x42,0xbe)]?.['message']||_0x45e808[_0xde271f(0x15b,0x118)]||_0xde271f(0x10f,0xd9),_0x949364=_0x45e808['response']?.[_0xde271f(0xb3,0xbe)]||_0x45e808;return Promise['reject'](new EBaaSError(_0xc6a3d8,status,_0x949364));});}async['get'](_0xa96bf5,config){function _0x2c347e(_0x9a492d,_0x1350e5){return _0x30c5(_0x9a492d- -0x1fb,_0x1350e5);}try{const response=await this['client']['get'](_0xa96bf5,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x2c347e(0x1c,0x51)],'headers':response[_0x2c347e(-0xe,0x30)]};}catch(_0x11ecee){throw this['handleError'](_0x11ecee);}}async['post'](_0xd12b69,data,config){function _0x171bf8(_0x2067b2,_0xe25ea5){return _0x30c5(_0x2067b2- -0x220,_0xe25ea5);}try{const response=await this['client']['post'](_0xd12b69,data,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x171bf8(-0x9,-0x16)],'headers':response['headers']};}catch(_0x46c884){throw this[_0x171bf8(-0x38,-0xf)](_0x46c884);}}async[_0x684fad(0x4db,0x465)](_0x1588e3,data,config){try{const response=await this['client']['put'](_0x1588e3,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x4f79b5){throw this['handleError'](_0x4f79b5);}}async[_0x684fad(0x4c4,0x4a7)](_0x26826a,data,config){function _0x128f14(_0xbe2855,_0x1bffeb){return _0x30c5(_0xbe2855-0x110,_0x1bffeb);}try{const response=await this['client']['patch'](_0x26826a,data,config);return{'data':response['data'],'status':response[_0x128f14(0x325,0x343)],'statusText':response[_0x128f14(0x327,0x2ba)],'headers':response[_0x128f14(0x2fd,0x2b6)]};}catch(_0x1a1592){throw this[_0x128f14(0x2f8,0x29b)](_0x1a1592);}}async['delete'](_0x57ab20,config){function _0x21b9bb(_0x1c3cbf,_0x2c2251){return _0x30c5(_0x2c2251-0xc1,_0x1c3cbf);}try{const response=await this['client']['delete'](_0x57ab20,config);return{'data':response['data'],'status':response[_0x21b9bb(0x26f,0x2d6)],'statusText':response[_0x21b9bb(0x31c,0x2d8)],'headers':response['headers']};}catch(_0x5de01e){throw this[_0x21b9bb(0x32a,0x2a9)](_0x5de01e);}}[_0x684fad(0x4e7,0x47c)](_0x3b930b){function _0x2246cb(_0x3a4c80,_0x3b70ee){return _0x30c5(_0x3b70ee- -0xf0,_0x3a4c80);}this[_0x2246cb(0x44,0x92)][_0x2246cb(0x110,0xe6)][_0x2246cb(0xa5,0xfd)]['common']['Authorization']=_0x2246cb(0x1da,0x16f)+_0x3b930b;}['removeAuthToken'](){delete this[_0x5ade67(-0x6,-0x35)]['defaults']['headers']['common']['Authorization'];function _0x5ade67(_0x425698,_0x303d87){return _0x30c5(_0x425698- -0x188,_0x303d87);}this[_0x5ade67(-0x6,-0x23)]['defaults']['headers'][_0x5ade67(0x6a,-0x1e)]['Authorization']='Bearer\x20'+this['apiKey'];}['handleError'](_0x42dbe8){function _0x4dfb0f(_0x1d76b3,_0x5b3e2f){return _0x30c5(_0x1d76b3- -0x36d,_0x5b3e2f);}if(_0x42dbe8 instanceof EBaaSError)return _0x42dbe8;return new EBaaSError(_0x42dbe8[_0x4dfb0f(-0x163,-0x123)]||_0x4dfb0f(-0x15d,-0x148),_0x42dbe8[_0x4dfb0f(-0x158,-0xe4)]||0x0,_0x42dbe8);}}class AuthClient{constructor(_0x2d5ee9,_0x211ce0){this['currentSession']=null,this['httpClient']=_0x2d5ee9;function _0x2414d1(_0x25b8e0,_0x49d40a){return _0x30c5(_0x49d40a- -0x97,_0x25b8e0);}this['workspaceId']=_0x211ce0,this[_0x2414d1(0x204,0x1d3)]();}async[_0x684fad(0x546,0x500)](data){function _0x26cda3(_0x1fece1,_0x347d04){return _0x30c5(_0x1fece1-0x1c,_0x347d04);}try{const response=await this[_0x26cda3(0x1c9,0x198)]['post'](_0x26cda3(0x1d5,0x223),data);return response['data']['session']&&this['setSessionInternal'](response['data']['session']),response[_0x26cda3(0x1cc,0x22c)];}catch(_0x36979a){throw this[_0x26cda3(0x1b1,0x1f3)](_0x36979a);}}async[_0x684fad(0x563,0x5cb)](data){function _0x1d83b7(_0x3274ed,_0x47cc32){return _0x30c5(_0x47cc32- -0x170,_0x3274ed);}try{const headers={};this['workspaceId']&&(headers[_0x1d83b7(0x14c,0xf2)]=this['workspaceId']);const response=await this['httpClient']['post'](_0x1d83b7(0x61,0xc8),data,{'headers':headers});return response[_0x1d83b7(0x59,0x40)][_0x1d83b7(-0x7a,0x2)]&&this['setSessionInternal'](response['data']['session']),response['data'];}catch(_0x3d9ed8){throw this['handleAuthError'](_0x3d9ed8);}}async[_0x684fad(0x4f2,0x470)](){function _0xb568d6(_0x3b4559,_0x2924da){return _0x30c5(_0x2924da-0x108,_0x3b4559);}try{await this['httpClient']['post'](_0xb568d6(0x2bf,0x2a4)),this[_0xb568d6(0x312,0x29b)]();}catch(_0x2dfe93){this['clearSession']();throw this['handleAuthError'](_0x2dfe93);}}async['getUser'](){if(!this['currentSession']?.[_0xecf5e9(0x93,0xa7)])return null;function _0xecf5e9(_0x13cb9d,_0x3026a2){return _0x30c5(_0x3026a2- -0x14c,_0x13cb9d);}try{const response=await this['httpClient'][_0xecf5e9(0x13c,0xfc)](_0xecf5e9(0x13f,0xf6));return response['data']['user'];}catch(_0x3e7f23){if(_0x3e7f23 instanceof EBaaSError&&_0x3e7f23[_0xecf5e9(0x14f,0xc9)]===0x191)return this['clearSession'](),null;throw this['handleAuthError'](_0x3e7f23);}}async[_0x684fad(0x573,0x547)](){function _0x4997e5(_0x1c3e21,_0x1c0ad8){return _0x30c5(_0x1c0ad8-0x5a,_0x1c3e21);}if(!this[_0x4997e5(0x302,0x29b)]?.[_0x4997e5(0x2c3,0x2b0)])return null;try{const response=await this[_0x4997e5(0x1ba,0x207)]['post'](_0x4997e5(0x294,0x227),{'refresh_token':this[_0x4997e5(0x2fe,0x29b)]['refresh_token']});if(response['data'][_0x4997e5(0x1ec,0x1cc)])return this[_0x4997e5(0x205,0x24f)](response['data'][_0x4997e5(0x1c6,0x1cc)]),response['data']['session'];return null;}catch(_0x13f10){this['clearSession']();throw this['handleAuthError'](_0x13f10);}}async[_0x684fad(0x579,0x589)](_0x53620f){function _0x3c2218(_0x1353f8,_0x522047){return _0x30c5(_0x1353f8- -0x36c,_0x522047);}try{await this['httpClient']['post']('/auth/v1/reset-password',{'email':_0x53620f});}catch(_0x48e4de){throw this[_0x3c2218(-0x1d7,-0x19b)](_0x48e4de);}}async['updateUser'](data){function _0x3a2e2c(_0x35a5fe,_0x35c5ed){return _0x30c5(_0x35c5ed- -0x105,_0x35a5fe);}try{const response=await this[_0x3a2e2c(0xc9,0xa8)][_0x3a2e2c(0xf3,0xaa)]('/auth/v1/user',data);return response[_0x3a2e2c(0xc7,0xab)]['user'];}catch(_0x4d21a4){throw this['handleAuthError'](_0x4d21a4);}}['getSession'](){return this['currentSession'];}['setSession'](_0x5a18db){this['currentSession']=_0x5a18db,this['httpClient'][_0x22b02f(0x3f6,0x38a)](_0x5a18db[_0x22b02f(0x34c,0x3c2)]);function _0x22b02f(_0x1422f3,_0x1efbc7){return _0x30c5(_0x1efbc7-0x1cf,_0x1422f3);}typeof localStorage!=='undefined'&&localStorage['setItem'](_0x22b02f(0x31a,0x34d),JSON['stringify'](_0x5a18db));}['onAuthStateChange'](_0x50a9f4){return()=>{};}['setWorkspaceId'](_0x53d1cb){function _0x1ed560(_0x2ac1f5,_0x280971){return _0x30c5(_0x280971-0x102,_0x2ac1f5);}this[_0x1ed560(0x21c,0x28b)]=_0x53d1cb;}['setSessionInternal'](_0x34c598){this['currentSession']=_0x34c598,this['httpClient'][_0x2a2c14(0x12e,0x18e)](_0x34c598[_0x2a2c14(0x229,0x1c6)]);function _0x2a2c14(_0x4cc36f,_0x4098d3){return _0x30c5(_0x4098d3- -0x2d,_0x4cc36f);}typeof localStorage!==_0x2a2c14(0x1ff,0x194)&&localStorage[_0x2a2c14(0x180,0x14b)](_0x2a2c14(0x151,0x151),JSON[_0x2a2c14(0x274,0x227)](_0x34c598));}['clearSession'](){this['currentSession']=null;function _0x352933(_0x5988e7,_0x30b15d){return _0x30c5(_0x5988e7-0x176,_0x30b15d);}this['httpClient'][_0x352933(0x2d4,0x35a)](),typeof localStorage!==_0x352933(0x337,0x2b7)&&localStorage['removeItem']('ebaas.auth.session');}[_0x684fad(0x596,0x5d7)](){function _0x443fd6(_0x2f6eca,_0x26a941){return _0x30c5(_0x2f6eca-0x1ae,_0x26a941);}if(typeof localStorage!=='undefined'){const _0x4300da=localStorage[_0x443fd6(0x3dc,0x3ff)](_0x443fd6(0x32c,0x322));if(_0x4300da)try{const _0x41530d=JSON['parse'](_0x4300da);this[_0x443fd6(0x329,0x363)](_0x41530d);}catch(_0x311ef3){this['clearSession']();}}}[_0x684fad(0x4c1,0x513)](_0x1f78ad){if(_0x1f78ad instanceof EBaaSError)return _0x1f78ad;return new EBaaSError(_0x1f78ad['message']||'Authentication\x20failed',_0x1f78ad['status']||0x0,_0x1f78ad);}}class QueryBuilder{constructor(_0x144c4a,_0x167d83,_0x422ce6,_0x18a4c7){this['httpClient']=_0x144c4a,this[_0x342211(0x8e,0x7c)]=_0x167d83,this['schema']=_0x422ce6,this['workspaceId']=_0x18a4c7;function _0x342211(_0x206405,_0x24953d){return _0x30c5(_0x24953d- -0x19c,_0x206405);}this['query']={'filters':[]};}['select'](_0x124209='*',_0x431477){this[_0x3cee0a(0x48a,0x4ae)]['select']=_0x124209;function _0x3cee0a(_0x2500b0,_0x4d7f44){return _0x30c5(_0x2500b0-0x28b,_0x4d7f44);}return this;}['insert'](data,_0x137e12){function _0x21ace9(_0x4e8ac5,_0xa9d229){return _0x30c5(_0x4e8ac5-0x326,_0xa9d229);}return this[_0x21ace9(0x535,0x580)]('POST',_0x21ace9(0x48d,0x4f3)+this['table']+_0x21ace9(0x49c,0x4b8),{'data':data,'options':_0x137e12});}['update'](data,_0x2235f9){function _0x4d9591(_0x641fec,_0x597003){return _0x30c5(_0x597003- -0xb2,_0x641fec);}return this[_0x4d9591(0x162,0x14d)]['updateData']=data,this[_0x4d9591(0xf6,0x14d)]['updateOptions']=_0x2235f9,this;}['upsert'](data,_0x7fddb0){function _0x2bc767(_0x3a3967,_0x20e629){return _0x30c5(_0x20e629-0xa1,_0x3a3967);}return this['executeQuery']('POST','/sdk/v1/'+this[_0x2bc767(0x2f2,0x2b9)]+'?operation=upsert',{'data':data,'options':{..._0x7fddb0,'upsert':!![]}});}['delete'](_0x37ed3e){this[_0x31b60a(0x55d,0x56e)][_0x31b60a(0x52d,0x56e)]=_0x37ed3e,this[_0x31b60a(0x55d,0x514)]['isDelete']=!![];function _0x31b60a(_0x295b74,_0x402314){return _0x30c5(_0x295b74-0x35e,_0x402314);}return this;}['eq'](_0x36bce3,_0x30c004){this[_0x3d7396(0x107,0x13b)][_0x3d7396(0x6a,-0x1e)]['push']({'column':_0x36bce3,'operator':'eq','value':_0x30c004});function _0x3d7396(_0xf677c5,_0xba2a87){return _0x30c5(_0xf677c5- -0xf8,_0xba2a87);}return this;}['neq'](_0x5f0c80,_0x3b0883){function _0x33e323(_0x495ff0,_0x4c5b4a){return _0x30c5(_0x495ff0-0x10a,_0x4c5b4a);}return this[_0x33e323(0x309,0x304)][_0x33e323(0x26c,0x29f)]['push']({'column':_0x5f0c80,'operator':'neq','value':_0x3b0883}),this;}['gt'](_0x535dc4,_0x854ed4){this['query']['filters'][_0x18285d(0x1f2,0x1d5)]({'column':_0x535dc4,'operator':'gt','value':_0x854ed4});function _0x18285d(_0x1d2c11,_0x476886){return _0x30c5(_0x1d2c11-0xd,_0x476886);}return this;}['gte'](_0x105399,_0x3b7714){function _0x5d1598(_0x13afbc,_0x1916d0){return _0x30c5(_0x13afbc- -0xff,_0x1916d0);}return this[_0x5d1598(0x100,0xa3)]['filters']['push']({'column':_0x105399,'operator':'gte','value':_0x3b7714}),this;}['lt'](_0x21d2a6,_0x5b2815){function _0x186dae(_0x285d8e,_0x26cd06){return _0x30c5(_0x26cd06- -0x14a,_0x285d8e);}return this[_0x186dae(0x113,0xb5)][_0x186dae(-0x3,0x18)][_0x186dae(0x44,0x9b)]({'column':_0x21d2a6,'operator':'lt','value':_0x5b2815}),this;}[_0x684fad(0x50b,0x519)](_0x5c8583,_0x5c35f0){function _0x50b918(_0x5b5439,_0x3e7d66){return _0x30c5(_0x3e7d66- -0x2c6,_0x5b5439);}return this[_0x50b918(-0x6b,-0xc7)][_0x50b918(-0x132,-0x164)]['push']({'column':_0x5c8583,'operator':'lte','value':_0x5c35f0}),this;}[_0x684fad(0x560,0x516)](_0x33ee2c,_0x34399f){this[_0x59697e(0x15e,0x18d)][_0x59697e(0xc1,0x110)][_0x59697e(0x144,0x185)]({'column':_0x33ee2c,'operator':_0x59697e(0x193,0x18d),'value':_0x34399f});function _0x59697e(_0x2d3951,_0x1b635a){return _0x30c5(_0x2d3951- -0xa1,_0x1b635a);}return this;}[_0x684fad(0x505,0x49c)](_0x12d3a8,_0x20ca8c){this[_0xed491a(0x5e8,0x570)][_0xed491a(0x46d,0x4d3)]['push']({'column':_0x12d3a8,'operator':'ilike','value':_0x20ca8c});function _0xed491a(_0x7c5f5e,_0x1941e9){return _0x30c5(_0x1941e9-0x371,_0x7c5f5e);}return this;}['is'](_0x4505f8,_0x1e1ab8){function _0x21463a(_0x44dca2,_0x471e2c){return _0x30c5(_0x471e2c- -0x1c1,_0x44dca2);}return this['query'][_0x21463a(-0x40,-0x5f)]['push']({'column':_0x4505f8,'operator':'is','value':_0x1e1ab8}),this;}['in'](_0x4b5b9c,_0x42bd49){function _0x3312c3(_0x4b76e8,_0x1f0204){return _0x30c5(_0x4b76e8- -0xb3,_0x1f0204);}return this['query'][_0x3312c3(0xaf,0x12a)][_0x3312c3(0x132,0xb8)]({'column':_0x4b5b9c,'operator':'in','value':_0x42bd49}),this;}['contains'](_0x394782,_0x38aa33){function _0x2374c1(_0x9ff409,_0x3cf4c4){return _0x30c5(_0x9ff409-0xda,_0x3cf4c4);}return this[_0x2374c1(0x2d9,0x253)][_0x2374c1(0x23c,0x241)]['push']({'column':_0x394782,'operator':_0x2374c1(0x2bc,0x245),'value':_0x38aa33}),this;}[_0x684fad(0x4a9,0x42a)](_0x1d8a1e){function _0x51bb59(_0x5b2e5a,_0x5adec9){return _0x30c5(_0x5adec9- -0xc7,_0x5b2e5a);}return Object[_0x51bb59(0x108,0xf3)](_0x1d8a1e)[_0x51bb59(0x128,0x10a)](([_0x5acdf6,_0x4e9a57])=>{this['eq'](_0x5acdf6,_0x4e9a57);}),this;}[_0x684fad(0x568,0x4ea)](_0x1be3c6,_0x5afe30){function _0xfce785(_0x51b5be,_0x1d9bcf){return _0x30c5(_0x51b5be-0xb3,_0x1d9bcf);}return!this['query'][_0xfce785(0x2ef,0x357)]&&(this[_0xfce785(0x2b2,0x2cc)][_0xfce785(0x2ef,0x2b9)]=[]),this[_0xfce785(0x2b2,0x2fd)]['order'][_0xfce785(0x298,0x2fb)]({'column':_0x1be3c6,'ascending':_0x5afe30?.['ascending']!==![]}),this;}[_0x684fad(0x52d,0x5b3)](count){function _0x5a92cd(_0xe1ec22,_0x5b2c9f){return _0x30c5(_0x5b2c9f- -0xc1,_0xe1ec22);}return this[_0x5a92cd(0x1a4,0x13e)]['limit']=count,this;}[_0x684fad(0x495,0x50f)](from,_0x339d6b){this[_0x5f0023(0x562,0x58a)]['range']={'from':from,'to':_0x339d6b};function _0x5f0023(_0x450ce3,_0x5aeb36){return _0x30c5(_0x5aeb36-0x38b,_0x450ce3);}return this;}async[_0x684fad(0x507,0x4dd)](){function _0x56f846(_0x13a576,_0x4c08c5){return _0x30c5(_0x4c08c5-0x6e,_0x13a576);}if(this[_0x56f846(0x1f2,0x26d)]['updateData'])return this['executeQuery']('PATCH','/sdk/v1/'+this[_0x56f846(0x2d7,0x286)],{'data':this['query'][_0x56f846(0x19d,0x1f5)],'options':this[_0x56f846(0x2cd,0x26d)][_0x56f846(0x23c,0x1dd)],'filters':this[_0x56f846(0x24f,0x26d)][_0x56f846(0x151,0x1d0)]});else return this['query']['isDelete']?this['executeQuery']('DELETE',_0x56f846(0x1e6,0x1d5)+this[_0x56f846(0x264,0x286)]+'?operation=delete',{'options':this['query']['deleteOptions'],'filters':this['query']['filters']}):this['executeQuery']('GET',_0x56f846(0x20d,0x1d5)+this[_0x56f846(0x257,0x286)]+'?operation=select',{'select':this['query'][_0x56f846(0x2f2,0x272)],'filters':this[_0x56f846(0x1f1,0x26d)][_0x56f846(0x14a,0x1d0)],'order':this[_0x56f846(0x23c,0x26d)]['order'],'limit':this[_0x56f846(0x2d1,0x26d)][_0x56f846(0x1f8,0x26f)],'range':this[_0x56f846(0x233,0x26d)]['range']});}async['single'](){this['limit'](0x1);function _0x4447b2(_0x14c462,_0x4395a3){return _0x30c5(_0x4395a3-0x28e,_0x14c462);}const result=await this[_0x4447b2(0x415,0x469)]();return{'data':result['data']?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x4b03fe,_0xa4aff9,_0x1591a4){function _0x3f558b(_0x2a52c4,_0x3a3e44){return _0x30c5(_0x3a3e44- -0x25e,_0x2a52c4);}try{let response;const headers={};this['workspaceId']&&(headers['x-workspace-id']=this['workspaceId']);if(_0x4b03fe==='GET'){const _0xff3063=_0xa4aff9['split']('?'),_0x132de1=_0xff3063[0x0],existingParams=new URLSearchParams(_0xff3063[0x1]||'');if(_0x1591a4[_0x3f558b(-0x66,-0x5a)])existingParams['append']('select',_0x1591a4['select']);_0x1591a4['filters']?.['length']&&_0x1591a4[_0x3f558b(-0xbf,-0xfc)]['forEach'](filter=>{function _0x37e697(_0x2be5a6,_0x251218){return _0x30c5(_0x2be5a6-0xdf,_0x251218);}existingParams['append'](filter['column'],filter['operator']+'.'+filter[_0x37e697(0x2ce,0x2b8)]);});if(_0x1591a4[_0x3f558b(0x3c,-0x22)]?.[_0x3f558b(-0x77,-0x4d)]){const orderStr=_0x1591a4['order']['map'](_0x264bbf=>''+_0x264bbf[_0x3f558b(-0x140,-0xe5)]+(_0x264bbf['ascending']?_0x3f558b(-0x4e,-0x56):_0x3f558b(-0x63,-0x28)))[_0x3f558b(-0xa5,-0x1e)](',');existingParams['append']('order',orderStr);}if(_0x1591a4[_0x3f558b(-0x58,-0x5d)])existingParams[_0x3f558b(-0x21,-0x9e)](_0x3f558b(0x0,-0x5d),_0x1591a4[_0x3f558b(-0xb,-0x5d)]['toString']());_0x1591a4['range']&&(existingParams['append']('offset',_0x1591a4['range']['from'][_0x3f558b(-0xd9,-0xb0)]()),existingParams[_0x3f558b(-0xe5,-0x9e)](_0x3f558b(-0xc1,-0x5d),(_0x1591a4['range']['to']-_0x1591a4[_0x3f558b(-0x7f,-0xf5)][_0x3f558b(-0x13a,-0xc4)]+0x1)[_0x3f558b(-0x10b,-0xb0)]())),response=await this[_0x3f558b(-0x76,-0xb1)][_0x3f558b(-0x5b,-0x16)](_0x132de1+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x4b03fe==='DELETE'){const _0x5ce6e2=_0xa4aff9[_0x3f558b(-0x67,-0xa9)]('?'),_0x179a9a=_0x5ce6e2[0x0],existingParams=new URLSearchParams(_0x5ce6e2[0x1]||'');!existingParams[_0x3f558b(-0xf2,-0x9a)]('operation')&&existingParams['append'](_0x3f558b(-0x6e,-0x34),'delete');_0x1591a4['filters']?.['length']&&_0x1591a4['filters'][_0x3f558b(-0x1a,-0x8d)](filter=>{function _0x451264(_0x141af2,_0x1b86f2){return _0x30c5(_0x1b86f2- -0x306,_0x141af2);}existingParams[_0x451264(-0x190,-0x146)](filter['column'],filter[_0x451264(-0x144,-0xde)]+'.'+filter[_0x451264(-0xe1,-0x117)]);});const deleteUrl=_0x179a9a+'?'+existingParams['toString']();console['log']('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console[_0x3f558b(-0xf8,-0xfa)]('\uD83D\uDD27 DELETE filtros originais:',_0x1591a4['filters']),response=await this['httpClient']['delete'](deleteUrl,{'headers':headers});}else{if(_0x4b03fe==='PATCH'){const _0x75d956=_0xa4aff9['split']('?'),_0x24f4f5=_0x75d956[0x0],existingParams=new URLSearchParams(_0x75d956[0x1]||'');!existingParams[_0x3f558b(-0x1e,-0x9a)](_0x3f558b(-0x39,-0x34))&&existingParams[_0x3f558b(-0x16,-0x9e)](_0x3f558b(-0x9c,-0x34),'update');_0x1591a4[_0x3f558b(-0x11e,-0xfc)]?.['length']&&_0x1591a4['filters']['forEach'](filter=>{function _0x3b8e6c(_0x3027a7,_0x1579a7){return _0x30c5(_0x1579a7- -0x134,_0x3027a7);}existingParams[_0x3b8e6c(0xa,0x8c)](filter['column'],filter['operator']+'.'+filter['value']);});_0x1591a4['options']?.['prefer']&&(headers['Prefer']=_0x1591a4['options']['prefer']);const updateUrl=_0x24f4f5+'?'+existingParams['toString']();response=await this['httpClient'][_0x3f558b(-0x144,-0xc6)](updateUrl,_0x1591a4[_0x3f558b(-0xe0,-0xae)],{'headers':headers});}else{let _0x28a867=_0x1591a4[_0x3f558b(-0xb6,-0xae)];!headers['Prefer']&&(headers['Prefer']=_0x3f558b(-0x34,-0x2d)),_0x1591a4['options']?.['upsert']&&(headers['Prefer']='resolution=merge-duplicates,return=representation'),_0x1591a4['dataArray']&&(_0x28a867=_0x1591a4[_0x3f558b(-0x51,-0x15)]),response=await this[_0x3f558b(-0x78,-0xb1)][_0x3f558b(-0x139,-0xf3)](_0xa4aff9,_0x28a867,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response[_0x3f558b(-0x7b,-0x71)]?.[_0x3f558b(-0x61,-0x62)]?parseInt(response[_0x3f558b(-0x50,-0x71)]['x-total-count']):undefined};}catch(_0x36e816){return{'data':null,'error':_0x36e816 instanceof EBaaSError?_0x36e816:new EBaaSError(_0x36e816 instanceof Error?_0x36e816['message']:_0x3f558b(-0x19,-0x8a),0x0,_0x36e816)};}}}class CustomDatabaseManager{constructor(_0x56724d,_0x3ee3eb){this[_0x5ddab5(0x9b,0x63)]=_0x56724d;function _0x5ddab5(_0x111dcb,_0x3566e4){return _0x30c5(_0x3566e4- -0x14a,_0x111dcb);}this['workspaceId']=_0x3ee3eb;}async[_0x684fad(0x4fe,0x4bf)](){if(!this['workspaceId'])return{'hasCustomDatabase':![]};try{const response=await this['httpClient'][_0x37f313(0x555,0x521)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this[_0x37f313(0x496,0x474)]}});if(response['status']===0xc8&&response[_0x37f313(0x4bd,0x479)]?.[_0x37f313(0x499,0x471)]){const config=response[_0x37f313(0x4bd,0x448)]['config'],_0x845471={'host':config[_0x37f313(0x520,0x57f)],'port':config['postgresPort'],'database':config[_0x37f313(0x4b0,0x4ab)],'username':config['postgresUsername'],'password':'','schema':config['postgresSchema'],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x845471},this[_0x37f313(0x530,0x4f5)];}}catch(_0x31d94e){if(_0x31d94e?.[_0x37f313(0x522,0x4bd)]===0x194)return this[_0x37f313(0x530,0x5b1)]={'hasCustomDatabase':![]},this['detectedConfig'];console['warn']('Failed to detect custom database configuration:',_0x31d94e);}this[_0x37f313(0x530,0x4df)]={'hasCustomDatabase':![]};function _0x37f313(_0x176848,_0x8a9b12){return _0x30c5(_0x176848-0x30d,_0x8a9b12);}return this[_0x37f313(0x530,0x53f)];}async['testConnection'](_0x551881){try{const response=await this['httpClient']['post']('/admin/v1/workspace/custom-database/test-connection',_0x551881,{'headers':this['workspaceId']?{'X-Workspace-ID':this['workspaceId']}:{}});return response['data'];}catch(_0x45edc4){return{'success':![],'message':_0x45edc4?.['message']||'Failed\x20to\x20test\x20connection'};}}async['configureCustomDatabase'](_0x467196){if(!this[_0x130298(0x191,0x1a7)])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x130298(0x173,0xf5)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x467196},{'headers':{'X-Workspace-ID':this['workspaceId']}}),config=response[_0x130298(0x1b8,0x14e)][_0x130298(0x194,0x1ca)];this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x467196};function _0x130298(_0x3827a4,_0x1048a8){return _0x30c5(_0x3827a4-0x8,_0x1048a8);}return config;}async[_0x684fad(0x48f,0x49d)](){if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');function _0x5404e5(_0xb17610,_0x4dfe68){return _0x30c5(_0x4dfe68-0xc5,_0xb17610);}await this[_0x5404e5(0x23f,0x272)]['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}}),this['detectedConfig']={'hasCustomDatabase':![]};}['getDetectedConfig'](){function _0x566aa2(_0x540e76,_0x46bf21){return _0x30c5(_0x540e76- -0x2a,_0x46bf21);}return this[_0x566aa2(0x1f9,0x1d2)];}['hasCustomDatabase'](){return this['detectedConfig']?.['hasCustomDatabase']??![];}[_0x684fad(0x4b0,0x4b4)](){return this['detectedConfig']?.['credentials'];}['setWorkspaceId'](_0x3e149d){function _0x122cae(_0x32b9f3,_0x2ff81c){return _0x30c5(_0x32b9f3- -0x15c,_0x2ff81c);}this['workspaceId']=_0x3e149d,this[_0x122cae(0xc7,0x68)]=undefined;}[_0x684fad(0x48c,0x4d8)](){function _0xbc62ee(_0x4dc3c4,_0x391bfd){return _0x30c5(_0x4dc3c4-0x348,_0x391bfd);}return this[_0xbc62ee(0x4d1,0x503)];}['getStatus'](){function _0x409864(_0x50e5e5,_0x4048cf){return _0x30c5(_0x4048cf- -0xec,_0x50e5e5);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x409864(0x1f,0x97)](),'configDetails':this[_0x409864(0x156,0x137)]?.[_0x409864(0x1c1,0x13f)]?{'host':this[_0x409864(0xf1,0x137)]['credentials']['host'],'port':this[_0x409864(0x14d,0x137)][_0x409864(0x107,0x13f)]['port'],'database':this[_0x409864(0x13d,0x137)][_0x409864(0x17a,0x13f)][_0x409864(0x87,0xde)],'schema':this[_0x409864(0x180,0x137)]['credentials'][_0x409864(0xd2,0x87)]||_0x409864(0x37,0x80),'sslEnabled':this[_0x409864(0x1a4,0x137)][_0x409864(0x12b,0x13f)][_0x409864(0xe4,0xa6)]||![]}:undefined};}}class DatabaseClient{constructor(_0x114ac7,_0x1237da){this[_0x37a8cc(-0x1df,-0x264)]=_0x114ac7;function _0x37a8cc(_0x5315ed,_0x1e4e8d){return _0x30c5(_0x5315ed- -0x38c,_0x1e4e8d);}this[_0x37a8cc(-0x148,-0x14c)]=new CustomDatabaseManager(_0x114ac7,_0x1237da);}[_0x684fad(0x4c6,0x51b)](_0x266071){function _0x389505(_0x2d02bb,_0x1966a4){return _0x30c5(_0x2d02bb- -0x195,_0x1966a4);}return new QueryBuilder(this[_0x389505(0x18,0x80)],_0x266071,this['currentSchema'],this['customDatabaseManager'][_0x389505(-0x35,0x53)]());}['rpc'](_0x21e2a7,_0x56ea1c){function _0x1fb885(_0x220798,_0x49e816){return _0x30c5(_0x220798-0x40,_0x49e816);}return this[_0x1fb885(0x1ed,0x25b)]['post'](_0x1fb885(0x23d,0x232)+_0x21e2a7,_0x56ea1c);}[_0x684fad(0x49f,0x485)](_0xf40fd5){const _0xa64e9d=new DatabaseClient(this['httpClient'],this['customDatabaseManager']['getWorkspaceId']());function _0x180fee(_0x4ca35e,_0x195217){return _0x30c5(_0x4ca35e- -0x10,_0x195217);}return _0xa64e9d[_0x180fee(0x184,0x1b8)]=_0xf40fd5,_0xa64e9d[_0x180fee(0x234,0x1ca)]=this[_0x180fee(0x234,0x287)],_0xa64e9d;}async['detectCustomDatabase'](){return this['customDatabaseManager']['detectCustomDatabase']();}async['testCustomConnection'](_0x312c4f){function _0x138930(_0x5cb105,_0x57bbd9){return _0x30c5(_0x5cb105- -0x8,_0x57bbd9);}return this[_0x138930(0x23c,0x225)][_0x138930(0x24d,0x201)](_0x312c4f);}async[_0x684fad(0x548,0x4eb)](_0x461a3a){function _0x376118(_0xd9c829,_0x56d781){return _0x30c5(_0xd9c829- -0xb2,_0x56d781);}return this[_0x376118(0x192,0x16d)]['configureCustomDatabase'](_0x461a3a);}async['removeCustomDatabase'](){return this['customDatabaseManager']['removeCustomDatabase']();}[_0x684fad(0x594,0x603)](){function _0x5c45cf(_0x1235f8,_0x104600){return _0x30c5(_0x104600- -0x10b,_0x1235f8);}return this['customDatabaseManager'][_0x5c45cf(0xbf,0x78)]();}['getCustomDatabaseStatus'](){function _0x7a7a52(_0x41be6a,_0x13b295){return _0x30c5(_0x13b295- -0x2a6,_0x41be6a);}return this['customDatabaseManager'][_0x7a7a52(-0x163,-0xde)]();}['setWorkspaceId'](_0x4bf979){function _0x14d6c3(_0xceb578,_0x4499b1){return _0x30c5(_0xceb578-0x3e2,_0x4499b1);}this['customDatabaseManager'][_0x14d6c3(0x5c0,0x598)](_0x4bf979);}async['initialize'](){try{await this['customDatabaseManager']['detectCustomDatabase']();}catch(_0x3fa6ae){console['warn']('Failed to initialize custom database detection:',_0x3fa6ae);}}}function _0x684fad(_0x75299c,_0x4d824c){return _0x30c5(_0x75299c-0x32c,_0x4d824c);}class StorageBucket{constructor(_0x899482,bucketId){function _0x359f8a(_0x52b651,_0x32421a){return _0x30c5(_0x32421a- -0x8b,_0x52b651);}this[_0x359f8a(0xfd,0x122)]=_0x899482,this['bucketId']=bucketId;}async['upload'](_0x3c5613,_0x35de88,_0x26cadd){function _0x2c6981(_0x362d90,_0x2693ad){return _0x30c5(_0x2693ad- -0x1c3,_0x362d90);}try{const _0x4281ab=new FormData();if(_0x35de88 instanceof File)_0x4281ab['append']('file',_0x35de88);else{if(_0x35de88 instanceof Blob)_0x4281ab[_0x2c6981(-0x1f,-0x3)]('file',_0x35de88,_0x3c5613);else{if(_0x35de88 instanceof ArrayBuffer)_0x4281ab['append'](_0x2c6981(-0x56,-0x12),new Blob([_0x35de88]),_0x3c5613);else typeof _0x35de88==='string'&&_0x4281ab['append']('file',new Blob([_0x35de88],{'type':_0x2c6981(0xf7,0x80)}),_0x3c5613);}}_0x4281ab['append']('path',_0x3c5613);_0x26cadd?.['cacheControl']&&_0x4281ab[_0x2c6981(-0x63,-0x3)]('cacheControl',_0x26cadd[_0x2c6981(-0x16,0x63)]);_0x26cadd?.[_0x2c6981(-0x6f,0x6)]&&_0x4281ab['append'](_0x2c6981(0x89,0x6),_0x26cadd['contentType']);_0x26cadd?.['metadata']&&_0x4281ab['append'](_0x2c6981(0x85,0x44),JSON['stringify'](_0x26cadd['metadata']));const _0x35786c='/storage/buckets/'+this[_0x2c6981(0x8,0x2b)]+'/files'+(_0x26cadd?.['upsert']?'?upsert=true':''),response=await this[_0x2c6981(0x5e,-0x16)]['post'](_0x35786c,_0x4281ab,{'headers':{'Content-Type':_0x2c6981(0x6a,0x4f)}});return{'data':response['data'],'error':null};}catch(_0xcd4e27){return{'data':null,'error':_0xcd4e27 instanceof EBaaSError?_0xcd4e27:new EBaaSError(_0xcd4e27 instanceof Error?_0xcd4e27[_0x2c6981(0x71,0x47)]:_0x2c6981(0x54,0xa9),0x0,_0xcd4e27)};}}async[_0x684fad(0x527,0x589)](_0x21b82f,_0x30c244){function _0x3cd4e5(_0x1668b9,_0x4745cd){return _0x30c5(_0x4745cd- -0x158,_0x1668b9);}try{const _0x2da49b=new URLSearchParams();_0x30c244?.['transform']&&Object['entries'](_0x30c244[_0x3cd4e5(-0x21,0x35)])['forEach'](([_0x174aa2,_0x5392e1])=>{function _0x1b6aae(_0x571332,_0x4497c1){return _0x30c5(_0x4497c1- -0x7a,_0x571332);}_0x5392e1!==undefined&&_0x2da49b[_0x1b6aae(0xc8,0x146)](_0x174aa2,String(_0x5392e1));});const _0x5a470f='/storage/buckets/'+this['bucketId']+_0x3cd4e5(0xbb,0x65)+_0x21b82f+(_0x2da49b[_0x3cd4e5(-0x20,0x56)]()?'?'+_0x2da49b['toString']():''),response=await this[_0x3cd4e5(0xc6,0x55)]['get'](_0x5a470f,{'responseType':_0x3cd4e5(0x139,0x10f)});return{'data':response['data'],'error':null};}catch(_0x4119ad){return{'data':null,'error':_0x4119ad instanceof EBaaSError?_0x4119ad:new EBaaSError(_0x4119ad instanceof Error?_0x4119ad[_0x3cd4e5(0x93,0xb2)]:_0x3cd4e5(0xcc,0x5b),0x0,_0x4119ad)};}}async['list'](_0x381016,_0x23eac5){function _0x7ee452(_0x2f6d7f,_0x13acb3){return _0x30c5(_0x13acb3- -0x336,_0x2f6d7f);}try{const _0x1b6c14=new URLSearchParams();_0x381016&&_0x1b6c14['append'](_0x7ee452(-0x19f,-0x11d),_0x381016);_0x23eac5?.[_0x7ee452(-0x1a0,-0x135)]&&_0x1b6c14[_0x7ee452(-0x111,-0x176)]('limit',String(_0x23eac5['limit']));_0x23eac5?.['offset']&&_0x1b6c14['append'](_0x7ee452(-0xd2,-0x14a),String(_0x23eac5[_0x7ee452(-0x1ca,-0x14a)]));_0x23eac5?.[_0x7ee452(-0xfc,-0xd3)]&&_0x1b6c14['append']('sortBy',JSON[_0x7ee452(-0xc6,-0xe2)](_0x23eac5[_0x7ee452(-0xb2,-0xd3)]));_0x23eac5?.['search']&&_0x1b6c14['append']('search',_0x23eac5['search']);const _0xb630a7=_0x7ee452(-0x168,-0x12d)+this['bucketId']+_0x7ee452(-0x14e,-0x10d)+(_0x1b6c14[_0x7ee452(-0x120,-0x188)]()?'?'+_0x1b6c14[_0x7ee452(-0x1b3,-0x188)]():''),response=await this[_0x7ee452(-0x1cd,-0x189)][_0x7ee452(-0xde,-0xee)](_0xb630a7);return{'data':response['data'],'error':null};}catch(_0x3c3fa7){return{'data':null,'error':_0x3c3fa7 instanceof EBaaSError?_0x3c3fa7:new EBaaSError(_0x3c3fa7 instanceof Error?_0x3c3fa7[_0x7ee452(-0x11e,-0x12c)]:'Failed\x20to\x20list\x20files',0x0,_0x3c3fa7)};}}async['remove'](_0x18ff70){function _0xf94f4d(_0x34906a,_0x538100){return _0x30c5(_0x538100- -0x1a7,_0x34906a);}try{const response=await this[_0xf94f4d(-0x21,0x6)]['delete']('/storage/buckets/'+this[_0xf94f4d(0x49,0x47)]+'/files',{'data':{'paths':_0x18ff70}});return{'data':response['data'],'error':null};}catch(_0x499c67){return{'data':null,'error':_0x499c67 instanceof EBaaSError?_0x499c67:new EBaaSError(_0x499c67 instanceof Error?_0x499c67['message']:_0xf94f4d(0x12b,0xa4),0x0,_0x499c67)};}}async[_0x684fad(0x54c,0x5ca)](fromPath,_0x534abc){function _0x2bcb8d(_0x435062,_0x17f6dd){return _0x30c5(_0x435062- -0xf3,_0x17f6dd);}try{const response=await this[_0x2bcb8d(0xba,0x12a)][_0x2bcb8d(0x78,0xd)](_0x2bcb8d(0x116,0xb6)+this[_0x2bcb8d(0xfb,0xb5)]+'/files/move',{'sourceKey':fromPath,'destinationKey':_0x534abc});return{'data':response['data'],'error':null};}catch(_0x591885){return{'data':null,'error':_0x591885 instanceof EBaaSError?_0x591885:new EBaaSError(_0x591885 instanceof Error?_0x591885['message']:_0x2bcb8d(0x128,0x18a),0x0,_0x591885)};}}async['copy'](fromPath,_0x24a1f7){function _0x52dc6f(_0x1e37a4,_0x52bffb){return _0x30c5(_0x1e37a4-0x36e,_0x52bffb);}try{const response=await this['httpClient']['post'](_0x52dc6f(0x577,0x50e)+this['bucketId']+_0x52dc6f(0x533,0x576),{'sourceKey':fromPath,'destinationKey':_0x24a1f7});return{'data':response['data'],'error':null};}catch(_0x295224){return{'data':null,'error':_0x295224 instanceof EBaaSError?_0x295224:new EBaaSError(_0x295224 instanceof Error?_0x295224[_0x52dc6f(0x578,0x5ee)]:'Failed\x20to\x20copy\x20file',0x0,_0x295224)};}}async[_0x684fad(0x57e,0x576)](_0x362bc7,_0x23cd3f,_0x4efd1d){function _0x37b72e(_0x497572,_0x30ab10){return _0x30c5(_0x497572-0x1a9,_0x30ab10);}try{const response=await this['httpClient'][_0x37b72e(0x314,0x36f)]('/storage/buckets/'+this[_0x37b72e(0x397,0x329)]+'/files/'+_0x362bc7+_0x37b72e(0x3d5,0x377),{'expiresIn':_0x23cd3f,..._0x4efd1d});return{'data':response['data'],'error':null};}catch(_0x192908){return{'data':null,'error':_0x192908 instanceof EBaaSError?_0x192908:new EBaaSError(_0x192908 instanceof Error?_0x192908[_0x37b72e(0x3b3,0x3bc)]:_0x37b72e(0x402,0x46d),0x0,_0x192908)};}}['getPublicUrl'](_0x59e159,_0x1b9812){function _0x226c57(_0x339a0d,_0x4d4b8a){return _0x30c5(_0x339a0d- -0xc5,_0x4d4b8a);}const _0x39fc1d=new URLSearchParams();_0x1b9812?.['transform']&&Object[_0x226c57(0xf5,0x12b)](_0x1b9812['transform'])[_0x226c57(0x10c,0x155)](([_0x5e94ad,_0x1dffb8])=>{_0x1dffb8!==undefined&&_0x39fc1d['append'](_0x5e94ad,String(_0x1dffb8));});const _0x553033=this[_0x226c57(0xe8,0xa6)][_0x226c57(0x135,0x155)]||'',_0x419bc6=_0x553033+_0x226c57(0x144,0x145)+this[_0x226c57(0x129,0x1a8)]+'/files/'+_0x59e159+(_0x39fc1d[_0x226c57(0xe9,0x94)]()?'?'+_0x39fc1d[_0x226c57(0xe9,0x153)]():'');return{'data':{'publicUrl':_0x419bc6}};}async['getFileInfo'](_0x4e4391){function _0x35dac3(_0x5f1eed,_0x32c378){return _0x30c5(_0x5f1eed-0x3b4,_0x32c378);}try{const response=await this['httpClient']['get'](_0x35dac3(0x5bd,0x62c)+this[_0x35dac3(0x5a2,0x595)]+_0x35dac3(0x571,0x518)+_0x4e4391+'/info');return{'data':response[_0x35dac3(0x564,0x58a)],'error':null};}catch(_0x43bd0f){return{'data':null,'error':_0x43bd0f instanceof EBaaSError?_0x43bd0f:new EBaaSError(_0x43bd0f instanceof Error?_0x43bd0f['message']:_0x35dac3(0x55b,0x530),0x0,_0x43bd0f)};}}async[_0x684fad(0x494,0x45e)](_0x25cc4f,metadata){function _0x4f5dff(_0x575205,_0x4571a0){return _0x30c5(_0x575205- -0x25e,_0x4571a0);}try{const response=await this[_0x4f5dff(-0xb1,-0xc3)][_0x4f5dff(-0xaf,-0xab)](_0x4f5dff(-0x55,0xf)+this['bucketId']+'/files/'+_0x25cc4f+_0x4f5dff(-0xe2,-0x7e),{'metadata':metadata});return{'data':response['data'],'error':null};}catch(_0x51d2cb){return{'data':null,'error':_0x51d2cb instanceof EBaaSError?_0x51d2cb:new EBaaSError(_0x51d2cb instanceof Error?_0x51d2cb['message']:_0x4f5dff(-0x3c,-0x58),0x0,_0x51d2cb)};}}}class StorageClient{constructor(_0x139b86){function _0x316611(_0x3b1d93,_0x50fd21){return _0x30c5(_0x50fd21-0x24,_0x3b1d93);}this[_0x316611(0x1ac,0x1d1)]=_0x139b86;}[_0x684fad(0x4c6,0x52b)](bucketId){function _0x32a2b1(_0x52d6c8,_0x1e7d9f){return _0x30c5(_0x52d6c8- -0x30a,_0x1e7d9f);}return new StorageBucket(this[_0x32a2b1(-0x15d,-0x12d)],bucketId);}async[_0x684fad(0x53a,0x540)](_0x1d9f36,_0x4343f0){function _0x10d61a(_0x4b23bb,_0x269042){return _0x30c5(_0x269042- -0x1dc,_0x4b23bb);}try{const response=await this[_0x10d61a(-0xb6,-0x2f)]['post']('/storage/buckets',{'id':_0x1d9f36,..._0x4343f0});return{'data':response['data'],'error':null};}catch(_0x5555f3){return{'data':null,'error':_0x5555f3 instanceof EBaaSError?_0x5555f3:new EBaaSError(_0x5555f3 instanceof Error?_0x5555f3['message']:_0x10d61a(-0x56,-0x4b),0x0,_0x5555f3)};}}async['getBucket'](_0x4201a1){function _0x532386(_0x40d927,_0x2c83e8){return _0x30c5(_0x40d927- -0x2d2,_0x2c83e8);}try{const response=await this[_0x532386(-0x125,-0x114)][_0x532386(-0x8a,-0x77)]('/storage/buckets/'+_0x4201a1);return{'data':response['data'],'error':null};}catch(_0x242572){return{'data':null,'error':_0x242572 instanceof EBaaSError?_0x242572:new EBaaSError(_0x242572 instanceof Error?_0x242572[_0x532386(-0xc8,-0xb6)]:'Failed\x20to\x20get\x20bucket',0x0,_0x242572)};}}async[_0x684fad(0x513,0x49a)](){function _0x203bbc(_0x5787b6,_0x485aee){return _0x30c5(_0x485aee-0x23c,_0x5787b6);}try{const response=await this[_0x203bbc(0x453,0x3e9)]['get']('/storage/buckets');return{'data':response[_0x203bbc(0x3b2,0x3ec)],'error':null};}catch(_0x4e9b9d){return{'data':null,'error':_0x4e9b9d instanceof EBaaSError?_0x4e9b9d:new EBaaSError(_0x4e9b9d instanceof Error?_0x4e9b9d[_0x203bbc(0x432,0x446)]:_0x203bbc(0x49d,0x416),0x0,_0x4e9b9d)};}}async['updateBucket'](_0x1c9c0d,_0x32b4ae){function _0x1875c3(_0x5cc284,_0x4b2d65){return _0x30c5(_0x5cc284-0x1dc,_0x4b2d65);}try{const response=await this[_0x1875c3(0x389,0x3ae)]['put']('/storage/buckets/'+_0x1c9c0d,_0x32b4ae);return{'data':response['data'],'error':null};}catch(_0x567f28){return{'data':null,'error':_0x567f28 instanceof EBaaSError?_0x567f28:new EBaaSError(_0x567f28 instanceof Error?_0x567f28[_0x1875c3(0x3e6,0x3a1)]:_0x1875c3(0x3aa,0x35b),0x0,_0x567f28)};}}async['deleteBucket'](_0x5882f1){function _0x3e42f7(_0x41959c,_0x25fdd0){return _0x30c5(_0x41959c- -0x16f,_0x25fdd0);}try{const response=await this[_0x3e42f7(0x3e,0xa7)]['delete']('/storage/buckets/'+_0x5882f1);return{'data':response['data'],'error':null};}catch(_0x1ed502){return{'data':null,'error':_0x1ed502 instanceof EBaaSError?_0x1ed502:new EBaaSError(_0x1ed502 instanceof Error?_0x1ed502[_0x3e42f7(0x9b,0xb2)]:_0x3e42f7(0x45,0xaa),0x0,_0x1ed502)};}}async['getUsage'](){try{const response=await this['httpClient']['get']('/storage/usage');return{'data':response['data'],'error':null};}catch(_0xcae998){return{'data':null,'error':_0xcae998 instanceof EBaaSError?_0xcae998:new EBaaSError(_0xcae998 instanceof Error?_0xcae998['message']:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0xcae998)};}}}class EventManager{constructor(){function _0x2bfe90(_0x24f6d4,_0x37108d){return _0x30c5(_0x24f6d4- -0xf3,_0x37108d);}this[_0x2bfe90(0x169,0x1f1)]=new Map(),this['maxListeners']=0xa;}['on'](_0x2e0bae,_0x2e6fbc){!this['events']['has'](_0x2e0bae)&&this[_0x1c8cce(0x578,0x567)]['set'](_0x2e0bae,new Set());function _0x1c8cce(_0x12fc4c,_0x2308d8){return _0x30c5(_0x12fc4c-0x31c,_0x2308d8);}this['events']['get'](_0x2e0bae)['add'](_0x2e6fbc);}['off'](_0x3cd215,_0x2399d3){if(!this['events']['has'](_0x3cd215))return;function _0x31d09b(_0x24908e,_0x16b70c){return _0x30c5(_0x16b70c- -0xa0,_0x24908e);}const _0x5dd375=this['events'][_0x31d09b(0x211,0x1a8)](_0x3cd215);_0x2399d3?_0x5dd375[_0x31d09b(0x1ba,0x190)](_0x2399d3):_0x5dd375['clear'](),_0x5dd375[_0x31d09b(0x128,0x195)]===0x0&&this['events'][_0x31d09b(0x12f,0x190)](_0x3cd215);}['emit'](_0x39d9e4,..._0xc27fd3){if(!this[_0x2a7115(0xba,0xcf)]['has'](_0x39d9e4))return![];function _0x2a7115(_0x1f86b9,_0x50dccb){return _0x30c5(_0x1f86b9- -0x1a2,_0x50dccb);}const _0x444772=this['events']['get'](_0x39d9e4);for(const _0xb28fcd of _0x444772){try{_0xb28fcd(..._0xc27fd3);}catch(_0x4a58b3){console['error'](_0x2a7115(0xa,0x66)+_0x39d9e4+'\x22:',_0x4a58b3);}}return _0x444772[_0x2a7115(0x93,0x4c)]>0x0;}['removeAllListeners'](_0x174de7){function _0x2b3768(_0xae50a6,_0xb9cfa0){return _0x30c5(_0xae50a6-0x38f,_0xb9cfa0);}_0x174de7?this['events'][_0x2b3768(0x5bf,0x572)](_0x174de7):this['events']['clear']();}['listenerCount'](_0x52d382){function _0x5922c1(_0x3e2528,_0x466656){return _0x30c5(_0x3e2528-0x272,_0x466656);}return this['events'][_0x5922c1(0x4ba,0x4ad)](_0x52d382)?.['size']??0x0;}['eventNames'](){function _0x186aa3(_0x177ce1,_0x429765){return _0x30c5(_0x177ce1-0x103,_0x429765);}return Array[_0x186aa3(0x29d,0x276)](this['events']['keys']());}[_0x684fad(0x512,0x498)](_0x2a53cc){function _0x229d45(_0x229b83,_0x555f8a){return _0x30c5(_0x229b83-0x9e,_0x555f8a);}return Array[_0x229d45(0x238,0x284)](this[_0x229d45(0x2fa,0x2a2)]['get'](_0x2a53cc)??[]);}['addListener'](_0x4dae67,_0x3abf53){this['on'](_0x4dae67,_0x3abf53);}['removeListener'](_0x645e99,_0x394ad7){this['off'](_0x645e99,_0x394ad7);}[_0x684fad(0x504,0x48a)](_0x17be6e,_0x14b231){const _0x93878e=(..._0x153bb5)=>{function _0x45f239(_0x3cce78,_0x47dd10){return _0x30c5(_0x3cce78- -0x1e2,_0x47dd10);}this[_0x45f239(-0x24,-0x4d)](_0x17be6e,_0x93878e),_0x14b231(..._0x153bb5);};this['on'](_0x17be6e,_0x93878e);}[_0x684fad(0x52c,0x4ab)](_0x4de672,_0x13188a){this['on'](_0x4de672,_0x13188a);}['prependOnceListener'](_0x588b2b,_0xf221fd){const _0x209be0=(..._0xaec049)=>{this['off'](_0x588b2b,_0x209be0),_0xf221fd(..._0xaec049);};this['on'](_0x588b2b,_0x209be0);}[_0x684fad(0x525,0x5ab)](_0x15640e){return this['maxListeners']=_0x15640e,this;}[_0x684fad(0x4bc,0x4c6)](){function _0x41f076(_0x40c632,_0xa6bd00){return _0x30c5(_0xa6bd00-0x38a,_0x40c632);}return this[_0x41f076(0x56a,0x509)];}['rawListeners'](_0x4675a4){function _0x4f6fb3(_0x36bdf0,_0x5712e6){return _0x30c5(_0x5712e6-0x18a,_0x36bdf0);}return this[_0x4f6fb3(0x34a,0x370)](_0x4675a4);}}class RealtimeChannel extends EventManager{constructor(_0x1952f7,_0x25e2d8){super();function _0x345c96(_0x3a018c,_0xfe0f62){return _0x30c5(_0xfe0f62-0x20b,_0x3a018c);}this[_0x345c96(0x42b,0x45a)]=![],this['state']='closed',this[_0x345c96(0x3e7,0x3ab)]=new Map(),this[_0x345c96(0x3ea,0x3ec)]=_0x1952f7,this[_0x345c96(0x407,0x399)]=_0x25e2d8;}['subscribe'](_0x30e4fd){!this[_0x1c0d6b(0x10f,0xe3)]&&(this[_0x1c0d6b(0xfd,0xe3)]=!![],this['_join']());function _0x1c0d6b(_0x22bd8c,_0x4759f0){return _0x30c5(_0x4759f0- -0x16c,_0x22bd8c);}return _0x30e4fd&&this['on']('status',_0x30e4fd),this;}[_0x684fad(0x591,0x533)](filter,_0x541f54){const _0x6769ad='postgres_changes:'+JSON['stringify'](filter);this['on'](_0x6769ad,_0x541f54);const _0x2035cb={'unsubscribe':()=>{function _0x432209(_0x38ff80,_0x114b47){return _0x30c5(_0x114b47-0xe6,_0x38ff80);}this[_0x432209(0x2d4,0x2a4)](_0x6769ad,_0x541f54),this[_0x432209(0x2b2,0x286)]['delete'](_0x6769ad);}};this[_0xd9210d(-0x23b,-0x1ff)][_0xd9210d(-0x27c,-0x26d)](_0x6769ad,_0x2035cb);function _0xd9210d(_0x4bf96c,_0x365999){return _0x30c5(_0x4bf96c- -0x3db,_0x365999);}return this['socket']?.['connected']&&this['state']===_0xd9210d(-0x26e,-0x1f6)&&this[_0xd9210d(-0x24d,-0x1f5)]['emit'](_0xd9210d(-0x244,-0x1f3),{'topic':this[_0xd9210d(-0x1fa,-0x260)],'filter':filter,'ref':this['makeRef']()}),_0x2035cb;}[_0x684fad(0x4b6,0x4cd)](filter,_0x5120c1){const _0x4b34da='broadcast:'+JSON[_0x357b46(0x46a,0x4c0)](filter);this['on'](_0x4b34da,_0x5120c1);function _0x357b46(_0x563aea,_0x3a5cd4){return _0x30c5(_0x563aea-0x216,_0x3a5cd4);}const _0x3495dd={'unsubscribe':()=>{this['off'](_0x4b34da,_0x5120c1),this['subscriptions']['delete'](_0x4b34da);}};return this[_0x357b46(0x3b6,0x3b4)]['set'](_0x4b34da,_0x3495dd),_0x3495dd;}[_0x684fad(0x599,0x5a8)](filter,_0x1e5956){const _0x522b03='presence:'+JSON['stringify'](filter);this['on'](_0x522b03,_0x1e5956);function _0x445406(_0x22ab82,_0x9b6606){return _0x30c5(_0x22ab82-0x1cf,_0x9b6606);}const _0x2b8fe6={'unsubscribe':()=>{this[_0x4a41a4(0xf7,0xad)](_0x522b03,_0x1e5956);function _0x4a41a4(_0xed1921,_0xf27306){return _0x30c5(_0xed1921- -0xc7,_0xf27306);}this[_0x4a41a4(0xd9,0x117)]['delete'](_0x522b03);}};return this['subscriptions'][_0x445406(0x32e,0x333)](_0x522b03,_0x2b8fe6),_0x2b8fe6;}['send'](_0x28be1c){return new Promise(_0x3382cf=>{function _0x8ea1a1(_0x1ad8fa,_0x4dd258){return _0x30c5(_0x4dd258- -0x2bf,_0x1ad8fa);}this['socket']?.['connected']&&this['state']===_0x8ea1a1(-0x11f,-0x152)?(this[_0x8ea1a1(-0x11b,-0x131)]['emit'](_0x8ea1a1(-0xb8,-0x139),{'topic':this['topic'],'event':_0x28be1c[_0x8ea1a1(-0x14,-0x8c)],'payload':_0x28be1c,'ref':this['makeRef']()}),_0x3382cf('ok')):_0x3382cf('error');});}[_0x684fad(0x57f,0x56f)](_0x47e8f9){return new Promise(_0x112aad=>{function _0x11b6b4(_0x506dcb,_0x277c76){return _0x30c5(_0x506dcb-0x21f,_0x277c76);}this[_0x11b6b4(0x3ad,0x3ce)]?.[_0x11b6b4(0x3f4,0x3aa)]&&this['state']===_0x11b6b4(0x38c,0x33d)?(this[_0x11b6b4(0x3ad,0x375)][_0x11b6b4(0x3fb,0x42a)]('presence',{'topic':this[_0x11b6b4(0x400,0x436)],'event':'track','payload':_0x47e8f9,'ref':this['makeRef']()}),_0x112aad('ok')):_0x112aad(_0x11b6b4(0x393,0x39a));});}['untrack'](){return new Promise(_0x59fac5=>{function _0x3b0902(_0x2dd050,_0x43527b){return _0x30c5(_0x43527b-0x84,_0x2dd050);}this['socket']?.[_0x3b0902(0x1ec,0x259)]&&this[_0x3b0902(0x1b1,0x1f5)]==='joined'?(this[_0x3b0902(0x223,0x212)]['emit'](_0x3b0902(0x1db,0x23c),{'topic':this['topic'],'event':_0x3b0902(0x2ee,0x2bf),'ref':this[_0x3b0902(0x299,0x267)]()}),_0x59fac5('ok')):_0x59fac5('error');});}['unsubscribe'](){return new Promise(_0x375bff=>{this[_0x4500c8(0x2c4,0x2a0)]='leaving',this['subscriptions'][_0x4500c8(0x2e9,0x300)](_0x4de785=>{function _0x1b28a8(_0x2dcf77,_0x47b89d){return _0x30c5(_0x2dcf77-0x240,_0x47b89d);}_0x4de785[_0x1b28a8(0x46f,0x4b0)]();}),this[_0x4500c8(0x345,0x2cf)][_0x4500c8(0x38f,0x38d)]();this['socket']?.[_0x4500c8(0x2f7,0x304)]&&this['socket'][_0x4500c8(0x35c,0x30b)](_0x4500c8(0x2a5,0x306),{'topic':this[_0x4500c8(0x304,0x310)],'ref':this[_0x4500c8(0x320,0x312)]()});this[_0x4500c8(0x2e8,0x2a0)]=_0x4500c8(0x33d,0x375),this[_0x4500c8(0x27a,0x2f2)]();function _0x4500c8(_0x49211e,_0x50cdc6){return _0x30c5(_0x50cdc6-0x12f,_0x49211e);}_0x375bff('ok');});}['_join'](){function _0x21db74(_0x5cf96c,_0x374bce){return _0x30c5(_0x5cf96c- -0x11e,_0x374bce);}if(this[_0x21db74(0x53,0x28)]==='leaving')return;this['state']=_0x21db74(0x7d,0xd4),this['socket']?.['connected']&&(this['socket'][_0x21db74(0xbe,0x4d)](_0x21db74(0x122,0x135),{'topic':this['topic'],'ref':this['makeRef']()}),setTimeout(()=>{function _0x3a67e2(_0x38820e,_0x35054c){return _0x30c5(_0x35054c- -0x246,_0x38820e);}this[_0x3a67e2(-0x13a,-0xd5)]==='joining'&&(this['state']=_0x3a67e2(-0x137,-0xd9),this[_0x3a67e2(-0xd8,-0x6a)]('status',_0x3a67e2(-0x63,-0x7f)));},0x64));}['_rejoin'](){function _0x327e80(_0x5b7cb1,_0x28d13c){return _0x30c5(_0x28d13c- -0x3c9,_0x5b7cb1);}this[_0x327e80(-0x1c9,-0x17a)]&&(this['_join'](),this[_0x327e80(-0x266,-0x229)]['forEach']((_0x3ac344,_0x22114e)=>{function _0x398e94(_0x2e1e1b,_0x231296){return _0x30c5(_0x2e1e1b- -0x7,_0x231296);}if(_0x22114e['startsWith']('postgres_changes:')){const filter=JSON[_0x398e94(0x15f,0x1df)](_0x22114e[_0x398e94(0x251,0x2a8)](_0x398e94(0x17e,0x1bb),''));this[_0x398e94(0x187,0x176)]?.['emit'](_0x398e94(0x190,0x1ee),{'topic':this[_0x398e94(0x1da,0x157)],'filter':filter,'ref':this['makeRef']()});}}));}[_0x684fad(0x4d2,0x4f3)](_0x41800f,_0x245698){function _0x1a3563(_0x4495a8,_0x3879f0){return _0x30c5(_0x3879f0-0x3a9,_0x4495a8);}if(_0x41800f==='postgres_changes'){const _0x43eb58=_0x1a3563(0x572,0x52e)+JSON[_0x1a3563(0x5b4,0x5fd)](_0x245698[_0x1a3563(0x594,0x5ca)]||{});this['emit'](_0x43eb58,_0x245698);}else{if(_0x41800f==='broadcast'){const _0x4f98d3='broadcast:'+JSON['stringify']({'event':_0x245698[_0x1a3563(0x5ff,0x5dc)]});this[_0x1a3563(0x5ca,0x585)](_0x4f98d3,_0x245698);}else{if(_0x41800f==='presence'){const _0x33dd37=_0x1a3563(0x66c,0x600)+JSON['stringify']({'event':_0x245698['event']});this['emit'](_0x33dd37,_0x245698);}}}this['emit'](_0x41800f,_0x245698);}['_setState'](_0x543fb7){function _0x3b4e4a(_0x2e1222,_0x219f16){return _0x30c5(_0x219f16- -0x33e,_0x2e1222);}this['state']=_0x543fb7;let status;switch(_0x543fb7){case'joined':status='SUBSCRIBED';break;case _0x3b4e4a(-0x159,-0xf9):status='CHANNEL_ERROR';break;case'closed':status=_0x3b4e4a(-0x12f,-0x15a);break;default:return;}this[_0x3b4e4a(-0x1e1,-0x162)](_0x3b4e4a(-0xfc,-0x129),status);}[_0x684fad(0x50f,0x49b)](){function _0xf5b85f(_0x3443e6,_0x3cea22){return _0x30c5(_0x3443e6-0x29f,_0x3cea22);}return Math['random']()[_0xf5b85f(0x44d,0x406)](0x24)[_0xf5b85f(0x508,0x501)](0x2,0xf);}[_0x684fad(0x520,0x591)](){return this['state'];}}function _0x5035(){const _0x39a6b2=['l2vUDG','l2f1DgGVDJeVCMvMCMvZAa','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','zgvSzxrLt3b0Aw9UCW','BMfTzq','zM9YrwfJAa','zgv0zwn0q3vZDg9Trgf0ywjHC2u','y2HHBM5LBa','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','y29UBMvJDgvK','zgvMyxvSDhm','BgvHDMu','B25Jzq','AwXPA2u','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','zxHLy3v0zq','zw1PDa','nJm3tM1htfDM','C2v0v29YA3nWywnLswq','BhrL','DxbKyxrLrw52','Dg9WAwm','y29UDgfPBNm','BwfRzvjLzG','q0Xpu0ve','ChvZAa','BgLZDgvUzxjZ','BgLZDej1y2TLDhm','AgfUzgXLrxjYB3i','rMfPBgvKihrVigDLDcbMDw5JDgLVBG','Bgv2zwW','yxv0Aa','B2zMC2v0','AgvHzgvYCW','yNvJA2v0swq','DMfSDwu','mty1nduXmZbpzMTbCwm','C29JA2v0lMLVlwnSAwvUDa','y29TBw9U','ywnJzxnZx3rVA2vU','z2v0u3rHDgu','C2v0u2vZC2LVBG','yNjVD3nLCG','z2XVyMfS','zw50CNLWB2LUDa','C2v0twf4tgLZDgvUzxjZ','yMfZzvvsta','zg93BMXVywq','Ec10B3rHBc1JB3vUDa','l3jWyY8','y29UBMvJDa','CxvLCNK','ChjLCgvUzeXPC3rLBMvY','BgLTAxq','ntG5mty0m2HkCe9Yva','mtmZmdK3oer0CfHpvW','C2vSzwn0','y29UBMvJDgLVBLn0yxrL','Dg9vChbLCKnHC2u','Bwv0ywrHDge','lMfZyW','l3n0B3jHz2uVyNvJA2v0CY8','BwvZC2fNzq','nNfPsKz1DW','CgvYAw9K','ChjVzhvJDa','y3jLyxrLqNvJA2v0','zxHLy3v0zvf1zxj5','sfruucbYzxf1zxn0igzHAwXLza','BgvUz3rO','BxvSDgLWyxj0l2zVCM0Tzgf0yq','Cg9ZDgDYzxniB3n0','Aw1WB3j0twfW','C3rHDhvZ','nZuXmdi2zuHgsgvM','C3rHDhvZvgv4Da','DgfIBgu','ChjLzML4','C2LNBLvW','rMfPBgvKihrVig1VDMuGzMLSzq','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','l2z1BMn0Aw9UCY92ms8','D2fYBG','yxv0B0rLDgvJDen1C3rVBurHDgfIyxnL','Bw92zq','zMLSDgvY','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','zgv0zwn0zwrdB25MAwC','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','y2fJAgvdB250CM9S','mtm5ndK2vhDYtfPc','B3bLCMf0B3i','l2zPBgvZ','B3bLCMf0Aw9U','y3jLzgvUDgLHBhm','l3nPz24','C2v0DxbizwfYDgjLyxq','z2v0sxrLBq','Dw5ZDwjZy3jPyMu','zgvSzxrL','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','x3nLDfn0yxrL','zxzLBNq','BgLRzq','C2L6zq','lMrLC2m','C2LNBKLU','l2f1DgGVDJeVC2rRl3nPz25PBG','yxbPs2v5','l21LDhjPy3m','Dw50CMfJAW','B3jKzxi','CMvJB25Uzwn0qxr0zw1WDhm','C29JA2v0qwrHChrLCG','DMfSDwvZ','AM9PBG','y3vYCMvUDfnLC3nPB24','l2f1DgGVDJeVDxnLCG','Dgv4Dc9WBgfPBG','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','zxjYB3jLza','y2XVC2vK','CMvMCMvZAfnLC3nPB24','z2v0','zgf0yufYCMf5','zw52','rMfPBgvKihrVihjLBw92zsbMAwXLCW','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','CMvZzxrqyxnZD29Yza','CMvXDwvZDa','AM9PBMvKt25Jzq','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','C3rHy2S','y3jLyxrLu2LNBMvKvxjS','DhjHy2S','C3rYAw5NAwz5','DgvZDenVBM5Ly3rPB24','CMvMCMvZAf90B2TLBG','ChjLC2vUy2u6','CMvWBgfJzq','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','igf0DgvTChrZoIa','yNvJA2v0','zxzLBNrZ','z2v0tg9NCW','y2XLyxi','qMvHCMvYia','ms4XlJG','C3rYAw5N','wc1xB3jRC3bHy2uTsuq','C29YDej5','Aw52B2TL','B25qB3n0z3jLC0nOyw5Nzxm','D2vIC29JA2v0','yMXVyG','AxnvC2LUz0n1C3rVBurHDgfIyxnL','C3vIC3rYAw5N','Bg9HzfnLC3nPB24','CMvZCg9UC2u','rMfPBgvKihrVihvWBg9HzcbMAwXL','B25qCMvZzw5Jzq','z2v0twv0CMLJCW','CMvTB3zLqxv0AfrVA2vU','C2v0','z2v0v29YA3nWywnLswq','C3rVCMfNzq','zMLSDgvYCW','CMvTB3zLq3vZDg9Trgf0ywjHC2u','Bg9N','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','CgfYC2u','l3nKAY92ms8','DxbKyxrLrMLSzu1LDgfKyxrH','CMfUz2u','l2z1BMn0Aw9UCY92mq','Cg9ZDa','ChvIBgLJ','AM9PBMvK','BM9Kzq','DxbKyxrLt3b0Aw9UCW','y3jLyxrL','C3rHDgu','C2vZC2LVBG','C2nOzw1H','zxjYB3i','y2fWDhvYzvn0ywnRvhjHy2u','p29WzxjHDgLVBJ1PBNnLCNq','yM9KEq','C2v0sxrLBq','y29SDw1U','y29UBMvJDf9LCNjVCG','C2v0u2vZC2LVBKLUDgvYBMfS','l21LDgfKyxrH','Bwf0y2G','zwjHyxmUyxv0Ac5ZzxnZAw9U','Bwf4tgLZDgvUzxjZ','z2v0q2HHBM5LBhm','x2DLDfnVy2TLDa','y2XPzw50','AgfZq3vZDg9Trgf0ywjHC2u','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','Cg9ZDgDYzxnFy2HHBMDLCZO','yNjVywrJyxn0','DxbKyxrLrgf0yq','DxjS','D29YA3nWywnLswq','B25cCM9HzgnHC3q','zgLZy29UBMvJDa','y29UzMLN','DhjHBNnMB3jT','C29JA2v0','B3b0Aw9UCW','z2v0twf4tgLZDgvUzxjZ','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','C3nSrw5HyMXLza','y2XLyxjtzxnZAw9U','y3vYCMvUDfnJAgvTyq','AgfUzgXLqxv0AevYCM9Y','Cg9ZDgDYzxnFy2HHBMDLCW','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','Cgf0y2G','y2HHBM5LBhm','zNjVBq','AM9PBMLUzW','l2f1DgGVDJeVC2LNBM91Da','zgLZy29UBMvJDgvK','Aw5PDgLHBgL6zun1C3rVBurHDgfIyxnL','CMvQzwn0','C3vIC2nYAxb0Aw9UCW','DMvYAwz5','CNbJ','Cg9ZDgDYzxneyxrHyMfZzq','DgLTzw91Da','zNvUy3rPB25Z','x3rYAwDNzxi','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','AxndB25Uzwn0zwq','DxnL','mJe4mJe2uMPxEfb1','CMvHy3qTBMf0AxzL','rxjYB3iGAw4GzxzLBNqGBgLZDgvUzxiGzM9Yici','Ahr0CenSAwvUDa','Dg9tDhjPBMC','Chv0','zgf0yq','zMLSzq','ngzrzejbvW','rMfPBgvKihrVigrVD25SB2fKigzPBgu','rMfPBgvKihrVigrLBgv0zsbIDwnRzxq','C3bSAxq','CMvZB2X2zq','zgv0ywLSCW','ChjLC2vUy2u','l2f1DgGVDJeVC2LNBNvW','zw50CMLLCW','C2v0qxv0AfrVA2vU','DMvYC2LVBNm','l2zPBgvZlW','B2zM','y29Kzq','yxbWzw5K','Dw5KzwzPBMvK','mJaZnJqXmgPRENPqsG','CMvTB3zLqwXStgLZDgvUzxjZ','AgfZ','l2zPBgvZl2nVChK','C2LNBK91Da','u1vcu0nssujfra','z2v0u3rHDhvZ','y29UDgvUDfr5Cgu','zgf0ywjHC2u','vw5RBM93BIbLCNjVCG'];_0x5035=function(){return _0x39a6b2;};return _0x5035();}function getEnvironment(){if(typeof navigator!=='undefined'&&navigator[_0x5e0f19(-0x77,-0xc2)]==='ReactNative')return _0x5e0f19(-0xd9,-0x55);if(typeof window!==_0x5e0f19(-0xc3,-0x139)&&typeof document!==_0x5e0f19(-0xc3,-0x77))return _0x5e0f19(-0x8e,-0x9b);function _0x5e0f19(_0x3e0575,_0x210cff){return _0x30c5(_0x3e0575- -0x284,_0x210cff);}if(typeof global!==_0x5e0f19(-0xc3,-0x4d)&&typeof process!==_0x5e0f19(-0xc3,-0x101)&&process[_0x5e0f19(-0xc8,-0x44)]?.['node'])return _0x5e0f19(-0x116,-0xaa);return _0x5e0f19(-0x8e,-0x38);}function isSocketIOAvailable(){function _0x243993(_0x28fa42,_0x28577d){return _0x30c5(_0x28577d-0x1b6,_0x28fa42);}try{const _0x420812=getEnvironment();switch(_0x420812){case _0x243993(0x2cd,0x324):return typeof require!==_0x243993(0x366,0x377)&&require['resolve']&&!!require[_0x243993(0x2ee,0x36c)](_0x243993(0x3cf,0x3a7));case _0x243993(0x3aa,0x3ac):if(typeof globalThis!==_0x243993(0x300,0x377)&&'io'in globalThis)return!![];return typeof require!==_0x243993(0x343,0x377)&&require[_0x243993(0x2f8,0x36c)]&&!!require['resolve']('socket.io-client');case'react-native':try{return typeof require!=='undefined'&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x1eef33(_0x11a61f,_0x31f697){return _0x30c5(_0x11a61f- -0x295,_0x31f697);}try{if(typeof require!==_0x1eef33(-0xd4,-0xfe))return require(_0x1eef33(-0xa4,-0xf0));if(typeof globalThis!=='undefined'&&'io'in globalThis)return{'io':globalThis['io']};throw new Error('socket.io-client\x20not\x20available');}catch(_0x3f1840){throw new Error('Socket.io-client\x20não\x20está\x20disponível\x20neste\x20ambiente.\x20Para\x20usar\x20funcionalidades\x20de\x20realtime,\x20instale:\x20npm\x20install\x20socket.io-client');}}class WebSocketAdapter{constructor(){function _0x4d6290(_0x2caf29,_0x44088d){return _0x30c5(_0x44088d-0x19c,_0x2caf29);}this[_0x4d6290(0x2cf,0x32a)]=null;}async['connect'](_0x311f16,_0x41c251){if(!isSocketIOAvailable())throw new Error('Socket.io-client não está disponível. Para usar funcionalidades de realtime, instale: npm install socket.io-client');const {io:_0x2fbb6e}=getSocketIO();return new Promise((_0x4d832b,_0x4b1e54)=>{function _0x3c7237(_0x128811,_0x9b0da2){return _0x30c5(_0x9b0da2-0x306,_0x128811);}this['socket']=_0x2fbb6e(_0x311f16,_0x41c251),this[_0x3c7237(0x4e3,0x494)]['on']('connect',()=>_0x4d832b()),this['socket']['on'](_0x3c7237(0x452,0x480),_0x33ba83=>_0x4b1e54(_0x33ba83));});}[_0x684fad(0x4b7,0x44b)](){function _0x43be1a(_0x59c2e1,_0x1623f9){return _0x30c5(_0x1623f9- -0x27b,_0x59c2e1);}this[_0x43be1a(-0x11a,-0xed)]&&(this[_0x43be1a(-0x10c,-0xed)][_0x43be1a(-0x8a,-0xf0)](),this[_0x43be1a(-0x8c,-0xed)]=null);}['emit'](_0x5c2ba2,data){function _0xdedf0b(_0x4952b2,_0x14a518){return _0x30c5(_0x14a518-0x137,_0x4952b2);}this[_0xdedf0b(0x310,0x2c5)]?.['emit'](_0x5c2ba2,data);}['on'](_0x8bb0af,_0x42c832){this['socket']?.['on'](_0x8bb0af,_0x42c832);}['off'](_0x5b755d,_0x58e971){function _0x410588(_0x138463,_0x4ac6b4){return _0x30c5(_0x138463- -0x1dc,_0x4ac6b4);}_0x58e971?this[_0x410588(-0x4e,-0xb5)]?.[_0x410588(-0x1e,-0xd)](_0x5b755d,_0x58e971):this['socket']?.['off'](_0x5b755d);}get['connected'](){function _0x5705ea(_0x263f17,_0x454604){return _0x30c5(_0x263f17-0x35c,_0x454604);}return this[_0x5705ea(0x4ea,0x474)]?.[_0x5705ea(0x531,0x4f4)]??![];}}class ReactNativeSocketAdapter{constructor(){function _0x508dcd(_0x422719,_0x481417){return _0x30c5(_0x422719-0x26a,_0x481417);}this[_0x508dcd(0x3f8,0x472)]=null;}async['connect'](_0x3dd7ec,_0x5b3d15){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x2583ec}=getSocketIO();return new Promise((_0x10ddab,_0x8d0b2d)=>{this[_0x11680e(0x25b,0x1dc)]=_0x2583ec(_0x3dd7ec,{..._0x5b3d15,'transports':['websocket'],'upgrade':![],'autoConnect':!![]});function _0x11680e(_0x4780f5,_0x376d26){return _0x30c5(_0x4780f5-0xcd,_0x376d26);}this[_0x11680e(0x25b,0x1d2)]['on'](_0x11680e(0x2cb,0x319),()=>_0x10ddab()),this[_0x11680e(0x25b,0x2b6)]['on']('connect_error',_0x10f902=>_0x8d0b2d(_0x10f902));});}[_0x684fad(0x4b7,0x462)](){function _0x45476(_0x4fd04e,_0x44d778){return _0x30c5(_0x44d778-0x1f,_0x4fd04e);}this[_0x45476(0x22d,0x1ad)]&&(this[_0x45476(0x164,0x1ad)][_0x45476(0x1e4,0x1aa)](),this['socket']=null);}['emit'](_0x2ae6aa,data){function _0x20b8d3(_0x46562a,_0x5dffc9){return _0x30c5(_0x46562a- -0x7d,_0x5dffc9);}this[_0x20b8d3(0x111,0x8e)]?.[_0x20b8d3(0x15f,0x1c8)](_0x2ae6aa,data);}['on'](_0x506e56,_0x39b854){this['socket']?.['on'](_0x506e56,_0x39b854);}['off'](_0x387442,_0x2d3d4d){function _0x3e103f(_0x357da4,_0x5df6be){return _0x30c5(_0x5df6be-0x31f,_0x357da4);}_0x2d3d4d?this['socket']?.[_0x3e103f(0x46b,0x4dd)](_0x387442,_0x2d3d4d):this[_0x3e103f(0x46f,0x4ad)]?.[_0x3e103f(0x4cc,0x4dd)](_0x387442);}get['connected'](){function _0x1ce830(_0x37b2fa,_0x313040){return _0x30c5(_0x37b2fa-0x23,_0x313040);}return this['socket']?.[_0x1ce830(0x1f8,0x20f)]??![];}}function createSocketAdapter(){const _0x2b8ff7=getEnvironment();function _0x2c8fc5(_0x5e8254,_0x154169){return _0x30c5(_0x5e8254- -0x279,_0x154169);}switch(_0x2b8ff7){case'react-native':return new ReactNativeSocketAdapter();case _0x2c8fc5(-0x83,-0xa0):case _0x2c8fc5(-0x10b,-0x151):default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x170c7f,_0x2a2877,_0x11b778={}){this[_0x7c0117(0x4e8,0x55d)]=null,this['channels']=new Map(),this['connectionState']=_0x7c0117(0x4f7,0x4c0),this[_0x7c0117(0x597,0x59f)]=0x0,this[_0x7c0117(0x5aa,0x597)]=0x5;function _0x7c0117(_0xd8a976,_0xe0fdbb){return _0x30c5(_0xd8a976-0x35a,_0xe0fdbb);}this['url']=_0x170c7f,this[_0x7c0117(0x593,0x58a)]=_0x2a2877,this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x11b778},this['socketAdapter']=createSocketAdapter();}[_0x684fad(0x52a,0x4f1)](){return new Promise(async(_0x2f8db7,_0x38f07b)=>{if(this['socketAdapter']['connected']){_0x2f8db7();return;}this[_0x3cdfd6(0x219,0x194)]='connecting';function _0x3cdfd6(_0x3d32b4,_0xf3aa1e){return _0x30c5(_0x3d32b4-0x14,_0xf3aa1e);}try{await this[_0x3cdfd6(0x252,0x2d5)][_0x3cdfd6(0x212,0x261)](this[_0x3cdfd6(0x19c,0x11e)],{'auth':{'apikey':this[_0x3cdfd6(0x24d,0x257)]},'transports':[_0x3cdfd6(0x27a,0x23c)],'reconnection':!![],'reconnectionDelay':this['options']['reconnectInterval'],'reconnectionAttempts':this[_0x3cdfd6(0x1a3,0x212)][_0x3cdfd6(0x264,0x239)],...this[_0x3cdfd6(0x1a3,0x215)]['socketOptions']}),this['socket']=this[_0x3cdfd6(0x252,0x259)]['socket'],this['socketAdapter']['on']('connect',()=>{this[_0x2c7625(-0x1ca,-0x228)]='connected',this['reconnectAttempts']=0x0;function _0x2c7625(_0x9bb862,_0x23fad8){return _0x30c5(_0x9bb862- -0x3cf,_0x23fad8);}this[_0x2c7625(-0x1a2,-0x12e)](),_0x2f8db7();}),this[_0x3cdfd6(0x252,0x1ef)]['on'](_0x3cdfd6(0x19f,0x1c7),()=>{function _0x35b411(_0x5a1ccb,_0x3c5537){return _0x30c5(_0x5a1ccb-0x3e7,_0x3c5537);}this['connectionState']=_0x35b411(0x584,0x5df),this[_0x35b411(0x580,0x5e9)][_0x35b411(0x5b8,0x56d)](channel=>{function _0x5f2a55(_0x3f4003,_0x31b01c){return _0x30c5(_0x31b01c-0x32a,_0x3f4003);}channel[_0x5f2a55(0x4df,0x55c)](_0x5f2a55(0x4ec,0x570));});}),this['socketAdapter']['on'](_0x3cdfd6(0x18e,0x112),_0x330b0d=>{this[_0x5adad9(-0xfa,-0xcf)]='error',this['reconnectAttempts']++;function _0x5adad9(_0x37b43d,_0x4f0387){return _0x30c5(_0x37b43d- -0x2ff,_0x4f0387);}this[_0x5adad9(-0xc2,-0xf8)]>=this['maxReconnectAttempts']&&_0x38f07b(new Error('Failed\x20to\x20connect\x20after\x20'+this[_0x5adad9(-0xaf,-0x80)]+_0x5adad9(-0xa5,-0x98)+_0x330b0d[_0x5adad9(-0xf5,-0xef)]));}),this[_0x3cdfd6(0x252,0x2d0)]['on']('reconnect',()=>{this[_0x2a748a(-0xb9,-0x96)]=_0x2a748a(-0xe9,-0x7f),this['reconnectAttempts']=0x0;function _0x2a748a(_0x2730f0,_0x54d9bd){return _0x30c5(_0x2730f0- -0x2be,_0x54d9bd);}this['channels'][_0x2a748a(-0xed,-0xeb)](channel=>{channel['_rejoin']();});}),this['socketAdapter']['on']('postgres_changes',_0x3f29a1=>{const channel=this[_0x5480fe(0xbc,0x8f)][_0x5480fe(0x16b,0x192)](_0x3f29a1['topic']);function _0x5480fe(_0x273ce8,_0x19b1da){return _0x30c5(_0x273ce8- -0xdd,_0x19b1da);}channel&&channel['_trigger'](_0x5480fe(0xb9,0x70),_0x3f29a1);}),this[_0x3cdfd6(0x252,0x29b)]['on'](_0x3cdfd6(0x19a,0x210),_0x1769ad=>{function _0x2593ba(_0x2c4af6,_0x29e9a0){return _0x30c5(_0x29e9a0- -0x15b,_0x2c4af6);}const channel=this['channels'][_0x2593ba(0x75,0xed)](_0x1769ad['topic']);channel&&channel['_trigger'](_0x2593ba(0x3a,0x2b),_0x1769ad);}),this['socketAdapter']['on']('presence',_0x429456=>{function _0xbad9fe(_0x1cc30b,_0x376bc5){return _0x30c5(_0x376bc5-0x2a1,_0x1cc30b);}const channel=this[_0xbad9fe(0x3fd,0x43a)][_0xbad9fe(0x56d,0x4e9)](_0x429456['topic']);channel&&channel[_0xbad9fe(0x405,0x447)](_0xbad9fe(0x4c0,0x459),_0x429456);});}catch(_0x32b9a3){this[_0x3cdfd6(0x219,0x1e4)]=_0x3cdfd6(0x188,0x167),_0x38f07b(_0x32b9a3);}});}['disconnect'](){function _0x40e08d(_0x17d43e,_0x6b3bd1){return _0x30c5(_0x6b3bd1-0x2f4,_0x17d43e);}this['socketAdapter']&&(this['socketAdapter'][_0x40e08d(0x474,0x47f)](),this[_0x40e08d(0x433,0x482)]=null),this['connectionState']='disconnected',this['channels'][_0x40e08d(0x55c,0x552)]();}[_0x684fad(0x4ff,0x49a)](_0x1d2e0a){function _0x3e1147(_0x453f34,_0x1595fa){return _0x30c5(_0x453f34-0x81,_0x1595fa);}if(this[_0x3e1147(0x21a,0x23c)]['has'](_0x1d2e0a))return this['channels'][_0x3e1147(0x2c9,0x29c)](_0x1d2e0a);const channel=new RealtimeChannel(_0x1d2e0a,this['socket']);return this['channels']['set'](_0x1d2e0a,channel),this['connectionState']===_0x3e1147(0x256,0x22d)&&channel['_join'](),channel;}['removeChannel'](channel){function _0x553237(_0xf6c977,_0x3b8063){return _0x30c5(_0xf6c977-0x9f,_0x3b8063);}const _0x4b8fff=channel['topic'];this[_0x553237(0x238,0x1f9)]['has'](_0x4b8fff)&&(this[_0x553237(0x238,0x1da)]['delete'](_0x4b8fff),channel[_0x553237(0x2ce,0x2b1)]());}['removeAllChannels'](){function _0x4142c2(_0x43bf4f,_0x452698){return _0x30c5(_0x43bf4f-0x79,_0x452698);}this[_0x4142c2(0x212,0x1d3)]['forEach'](channel=>{channel['unsubscribe']();}),this[_0x4142c2(0x212,0x1fb)]['clear']();}[_0x684fad(0x4ac,0x47f)](){function _0x388e0c(_0x53cadf,_0x36b430){return _0x30c5(_0x36b430-0x178,_0x53cadf);}return Array[_0x388e0c(0x39b,0x312)](this[_0x388e0c(0x398,0x311)][_0x388e0c(0x41f,0x3b7)]());}[_0x684fad(0x4d4,0x54d)](){function _0x3fcc56(_0x321821,_0xfd7427){return _0x30c5(_0xfd7427- -0x3b4,_0x321821);}return this[_0x3fcc56(-0x177,-0x1af)]==='connected'&&this['socketAdapter'][_0x3fcc56(-0x188,-0x1df)];}['getConnectionState'](){return this['connectionState'];}['onConnectionStateChange'](_0x300f99){function _0x592b92(_0x2e6e58,_0xace098){return _0x30c5(_0x2e6e58- -0x217,_0xace098);}const _0x4cecd1=()=>_0x300f99(this['connectionState']);return this['socketAdapter']&&(this['socketAdapter']['on'](_0x592b92(-0x19,-0x19),()=>{this['connectionState']='connected',_0x4cecd1();}),this[_0x592b92(0x27,0x7)]['on'](_0x592b92(-0x8c,-0xdd),()=>{function _0x34f9e4(_0x130046,_0x29ebda){return _0x30c5(_0x29ebda-0x3d7,_0x130046);}this['connectionState']=_0x34f9e4(0x5fb,0x574),_0x4cecd1();}),this[_0x592b92(0x27,-0x14)]['on']('connect_error',()=>{function _0x44a9f7(_0x37e2ea,_0x32dd3c){return _0x30c5(_0x37e2ea-0x2c3,_0x32dd3c);}this[_0x44a9f7(0x4c8,0x47a)]=_0x44a9f7(0x437,0x41f),_0x4cecd1();})),()=>{function _0x25df25(_0x4df9ef,_0x418628){return _0x30c5(_0x4df9ef- -0x28b,_0x418628);}this[_0x25df25(-0x4d,-0x1e)]&&(this[_0x25df25(-0x4d,-0x93)][_0x25df25(-0xcd,-0xe1)](_0x25df25(-0x8d,-0x109),_0x4cecd1),this['socketAdapter'][_0x25df25(-0xcd,-0xae)](_0x25df25(-0x100,-0x8b),_0x4cecd1),this[_0x25df25(-0x4d,-0x96)][_0x25df25(-0xcd,-0x144)]('connect_error',_0x4cecd1));};}[_0x684fad(0x559,0x5a8)](){if(!this[_0x38863d(-0x6c,-0x3a)]['heartbeatInterval']||!this['socketAdapter'])return;function _0x38863d(_0x48c965,_0x279c6a){return _0x30c5(_0x48c965- -0x1fb,_0x279c6a);}const interval=setInterval(()=>{function _0x815bed(_0x112fbc,_0x4b2b02){return _0x30c5(_0x112fbc- -0x159,_0x4b2b02);}this[_0x815bed(0xe5,0x128)]?.[_0x815bed(0x7c,0x1)]?this['socketAdapter']['emit']('heartbeat',{'timestamp':Date['now']()}):clearInterval(interval);},this[_0x38863d(-0x6c,-0x50)]['heartbeatInterval']);}[_0x684fad(0x4ad,0x502)](){return this['socket'];}}class FunctionsClient{constructor(_0x47f5f7){this['httpClient']=_0x47f5f7;}async[_0x684fad(0x590,0x602)](_0x5d3860,_0x35aee8){function _0x18b15b(_0x31860f,_0x269330){return _0x30c5(_0x31860f- -0x233,_0x269330);}try{const _0x4fd2b6=_0x35aee8?.['method']||'POST',headers={'Content-Type':'application/json',..._0x35aee8?.[_0x18b15b(-0x46,-0x9c)]};let response;const _0x6ba6f2=_0x18b15b(-0x16,-0x60)+_0x5d3860;switch(_0x4fd2b6[_0x18b15b(-0x2d,0x54)]()){case'GET':response=await this['httpClient'][_0x18b15b(0x15,0xc)](_0x6ba6f2,{'headers':headers,'params':_0x35aee8?.[_0x18b15b(-0xbc,-0x4f)]});break;case'POST':response=await this[_0x18b15b(-0x86,-0xf)][_0x18b15b(-0xc8,-0xc4)](_0x6ba6f2,_0x35aee8?.[_0x18b15b(-0xbc,-0x68)],{'headers':headers});break;case'PUT':response=await this['httpClient']['put'](_0x6ba6f2,_0x35aee8?.['body'],{'headers':headers});break;case'PATCH':response=await this[_0x18b15b(-0x86,-0x1c)][_0x18b15b(-0x9b,-0xf9)](_0x6ba6f2,_0x35aee8?.[_0x18b15b(-0xbc,-0x8b)],{'headers':headers});break;case'DELETE':response=await this['httpClient']['delete'](_0x6ba6f2,{'headers':headers,'data':_0x35aee8?.[_0x18b15b(-0xbc,-0xbc)]});break;default:throw new EBaaSError('Unsupported\x20HTTP\x20method:\x20'+_0x4fd2b6,0x190);}return{'data':response['data'],'error':null};}catch(_0x3d30ae){return{'data':null,'error':_0x3d30ae instanceof EBaaSError?_0x3d30ae:new EBaaSError(_0x3d30ae instanceof Error?_0x3d30ae[_0x18b15b(-0x29,-0x2b)]:'Function\x20invocation\x20failed',0x0,_0x3d30ae)};}}async['list'](){function _0x4fbfbe(_0x284e66,_0x472105){return _0x30c5(_0x284e66-0x83,_0x472105);}try{const response=await this['httpClient'][_0x4fbfbe(0x2cb,0x2ef)](_0x4fbfbe(0x1ed,0x1d3));return{'data':response[_0x4fbfbe(0x233,0x1c7)],'error':null};}catch(_0x39a4cb){return{'data':null,'error':_0x39a4cb instanceof EBaaSError?_0x39a4cb:new EBaaSError(_0x39a4cb instanceof Error?_0x39a4cb[_0x4fbfbe(0x28d,0x28c)]:'Failed\x20to\x20list\x20functions',0x0,_0x39a4cb)};}}async[_0x684fad(0x574,0x5f5)](_0x338b6b){function _0x2a4cfb(_0x3b1962,_0x386754){return _0x30c5(_0x3b1962- -0x3d4,_0x386754);}try{const response=await this[_0x2a4cfb(-0x227,-0x20b)]['get']('/functions/v1/'+_0x338b6b+'/info');return{'data':response[_0x2a4cfb(-0x224,-0x22d)],'error':null};}catch(_0x437cb8){return{'data':null,'error':_0x437cb8 instanceof EBaaSError?_0x437cb8:new EBaaSError(_0x437cb8 instanceof Error?_0x437cb8[_0x2a4cfb(-0x1ca,-0x1f8)]:_0x2a4cfb(-0x1eb,-0x268),0x0,_0x437cb8)};}}async['deploy'](_0x2f7acf,_0x318278){function _0xeec390(_0x5a05ed,_0x2a3102){return _0x30c5(_0x5a05ed- -0x366,_0x2a3102);}try{const _0x44a239=new FormData();if(_0x318278['code']instanceof File)_0x44a239[_0xeec390(-0x1a6,-0x13b)](_0xeec390(-0x1a7,-0x179),_0x318278[_0xeec390(-0x1a7,-0x1c3)]);else typeof _0x318278[_0xeec390(-0x1a7,-0x1f2)]===_0xeec390(-0x105,-0x123)&&_0x44a239['append'](_0xeec390(-0x1a7,-0x1a9),new Blob([_0x318278[_0xeec390(-0x1a7,-0x120)]],{'type':_0xeec390(-0x123,-0x155)}),'index.ts');_0x318278['entrypoint']&&_0x44a239['append']('entrypoint',_0x318278[_0xeec390(-0x16e,-0x109)]);_0x318278[_0xeec390(-0x11c,-0xa3)]&&_0x44a239[_0xeec390(-0x1a6,-0x1d5)](_0xeec390(-0x11c,-0x18a),JSON['stringify'](_0x318278[_0xeec390(-0x11c,-0x16d)]));_0x318278[_0xeec390(-0x152,-0x19e)]&&_0x44a239[_0xeec390(-0x1a6,-0x218)](_0xeec390(-0x152,-0x157),JSON['stringify'](_0x318278[_0xeec390(-0x152,-0xff)]));_0x318278['verify']!==undefined&&_0x44a239['append'](_0xeec390(-0x1c5,-0x24b),String(_0x318278[_0xeec390(-0x1c5,-0x1d6)]));const response=await this[_0xeec390(-0x1b9,-0x164)][_0xeec390(-0x1fb,-0x258)]('/functions/v1/'+_0x2f7acf+'/deploy',_0x44a239,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response['data'],'error':null};}catch(_0x326aaf){return{'data':null,'error':_0x326aaf instanceof EBaaSError?_0x326aaf:new EBaaSError(_0x326aaf instanceof Error?_0x326aaf['message']:'Failed\x20to\x20deploy\x20function',0x0,_0x326aaf)};}}async['delete'](_0x20b964){function _0x53c615(_0x2b6510,_0x2e19a7){return _0x30c5(_0x2b6510-0x20d,_0x2e19a7);}try{const response=await this[_0x53c615(0x3ba,0x40d)]['delete'](_0x53c615(0x42a,0x413)+_0x20b964);return{'data':response[_0x53c615(0x3bd,0x440)],'error':null};}catch(_0x269176){return{'data':null,'error':_0x269176 instanceof EBaaSError?_0x269176:new EBaaSError(_0x269176 instanceof Error?_0x269176[_0x53c615(0x417,0x3fb)]:_0x53c615(0x432,0x3ef),0x0,_0x269176)};}}async[_0x684fad(0x50c,0x560)](_0x35f981,_0x546349){function _0x17a1fb(_0x117050,_0x54cdd3){return _0x30c5(_0x117050- -0x34b,_0x54cdd3);}try{const response=await this['httpClient'][_0x17a1fb(-0x19c,-0x185)]('/functions/v1/'+_0x35f981+_0x17a1fb(-0x17f,-0x13d),{'env':_0x546349});return{'data':response[_0x17a1fb(-0x19b,-0x1f6)],'error':null};}catch(_0x2fed34){return{'data':null,'error':_0x2fed34 instanceof EBaaSError?_0x2fed34:new EBaaSError(_0x2fed34 instanceof Error?_0x2fed34[_0x17a1fb(-0x141,-0x19d)]:_0x17a1fb(-0xff,-0x86),0x0,_0x2fed34)};}}async[_0x684fad(0x589,0x524)](_0x1d314f,_0x2aca85){function _0x2f2b56(_0xe7fe4e,_0x24abd9){return _0x30c5(_0xe7fe4e-0x33,_0x24abd9);}try{const _0x276806=new URLSearchParams();_0x2aca85?.['limit']&&_0x276806[_0x2f2b56(0x1f3,0x1a1)](_0x2f2b56(0x234,0x1ff),String(_0x2aca85[_0x2f2b56(0x234,0x1f2)]));_0x2aca85?.[_0x2f2b56(0x21f,0x1ef)]&&_0x276806[_0x2f2b56(0x1f3,0x230)](_0x2f2b56(0x21f,0x244),String(_0x2aca85[_0x2f2b56(0x21f,0x246)]));_0x2aca85?.['level']&&_0x276806[_0x2f2b56(0x1f3,0x1a4)](_0x2f2b56(0x21d,0x1d8),_0x2aca85[_0x2f2b56(0x21d,0x208)]);const _0x5be271='/functions/v1/'+_0x1d314f+'/logs'+(_0x276806[_0x2f2b56(0x1e1,0x169)]()?'?'+_0x276806[_0x2f2b56(0x1e1,0x1b9)]():''),response=await this['httpClient']['get'](_0x5be271);return{'data':response[_0x2f2b56(0x1e3,0x25a)],'error':null};}catch(_0x32c0d5){return{'data':null,'error':_0x32c0d5 instanceof EBaaSError?_0x32c0d5:new EBaaSError(_0x32c0d5 instanceof Error?_0x32c0d5[_0x2f2b56(0x23d,0x1c7)]:_0x2f2b56(0x257,0x295),0x0,_0x32c0d5)};}}async[_0x684fad(0x489,0x46d)](_0x3bffad,_0x4ea1e7){function _0x1e926a(_0x4d8716,_0x1600bf){return _0x30c5(_0x1600bf- -0x98,_0x4d8716);}try{const _0x3cc3d1=new URLSearchParams();_0x4ea1e7?.['period']&&_0x3cc3d1[_0x1e926a(0xc2,0x128)](_0x1e926a(0x101,0x174),_0x4ea1e7['period']);const _0x32fce1=_0x1e926a(0x1c9,0x185)+_0x3bffad+_0x1e926a(0x20c,0x1a2)+(_0x3cc3d1[_0x1e926a(0x144,0x116)]()?'?'+_0x3cc3d1['toString']():''),response=await this[_0x1e926a(0x98,0x115)]['get'](_0x32fce1);return{'data':response['data'],'error':null};}catch(_0x312944){return{'data':null,'error':_0x312944 instanceof EBaaSError?_0x312944:new EBaaSError(_0x312944 instanceof Error?_0x312944['message']:'Failed\x20to\x20get\x20function\x20metrics',0x0,_0x312944)};}}}class EBaaSClient{constructor(_0x2881a0,_0x4831d4,_0x431906){this[_0xce304(0x22e,0x27c)]=_0x431906,this['httpClient']=new HttpClient({'url':_0x2881a0,'apiKey':_0x4831d4,'timeout':0x7530,'headers':_0x431906?.[_0xce304(0x296,0x2e0)]?.['headers']}),this['auth']=new AuthClient(this['httpClient'],_0x431906?.['database']?.['workspaceId']),this['database']=new DatabaseClient(this['httpClient'],_0x431906?.['database']?.[_0xce304(0x228,0x1f8)]),this[_0xce304(0x200,0x22b)]=new StorageClient(this[_0xce304(0x24c,0x1c8)]),this['realtime']=new RealtimeClient(_0x2881a0,_0x4831d4,_0x431906?.['realtime']),this['functions']=new FunctionsClient(this['httpClient']);function _0xce304(_0x216d32,_0x10c296){return _0x30c5(_0x216d32-0x9f,_0x10c296);}this[_0xce304(0x23d,0x1cd)]();}[_0x684fad(0x4c6,0x465)](_0x55181c){function _0x9cd8b(_0x6e6fc4,_0x676dd8){return _0x30c5(_0x6e6fc4-0x36a,_0x676dd8);}return this[_0x9cd8b(0x534,0x4f8)]['from'](_0x55181c);}[_0x684fad(0x4ce,0x46d)](_0x5765f2,_0x262114){function _0x39ff8b(_0x3f6810,_0x4a1654){return _0x30c5(_0x4a1654- -0x3e4,_0x3f6810);}return this[_0x39ff8b(-0x288,-0x21a)][_0x39ff8b(-0x2c4,-0x242)](_0x5765f2,_0x262114);}[_0x684fad(0x587,0x522)](_0x2b32ec){function _0x3c8b59(_0x4a3c47,_0x249fa6){return _0x30c5(_0x4a3c47-0x366,_0x249fa6);}return this[_0x3c8b59(0x4c7,0x527)][_0x3c8b59(0x500,0x4d1)](_0x2b32ec);}['channel'](_0x30cb27){return this['realtime']['channel'](_0x30cb27);}['invoke'](_0x35aebe,_0x3cbea4){function _0x4bece5(_0x5e938f,_0x18ab47){return _0x30c5(_0x18ab47-0x3d6,_0x5e938f);}return this[_0x4bece5(0x50a,0x57b)]['invoke'](_0x35aebe,_0x3cbea4);}async[_0x684fad(0x4ca,0x474)](){function _0x899056(_0x5f001a,_0x5cd332){return _0x30c5(_0x5cd332-0x151,_0x5f001a);}if(this['options']?.[_0x899056(0x2f1,0x31b)]?.[_0x899056(0x32f,0x370)])try{await this[_0x899056(0x2cb,0x31b)]['initialize']();}catch(_0x2aeea9){console[_0x899056(0x3a7,0x36f)]('Failed to initialize custom database detection:',_0x2aeea9);}}async['setWorkspaceId'](_0x2225cc){this[_0x6bce9d(-0x91,-0x12)][_0x6bce9d(-0x9e,-0x6a)](_0x2225cc);function _0x6bce9d(_0x74ec41,_0xf8a96f){return _0x30c5(_0x74ec41- -0x27c,_0xf8a96f);}this['database']['setWorkspaceId'](_0x2225cc),this['options']?.[_0x6bce9d(-0xb2,-0xce)]?.['autoDetectCustomDatabase']&&await this['database']['initialize']();}async['configureCustomDatabase'](_0x1210ee){function _0x3b0d99(_0x3e6850,_0xa0e44d){return _0x30c5(_0x3e6850- -0x2f2,_0xa0e44d);}await this[_0x3b0d99(-0x128,-0x102)][_0x3b0d99(-0xd6,-0xa9)](_0x1210ee);}['getCustomDatabaseStatus'](){function _0x2f2bb9(_0x1c222a,_0xdc9e8f){return _0x30c5(_0x1c222a- -0x2a,_0xdc9e8f);}return this['database'][_0x2f2bb9(0x13b,0x19c)]();}}function createClient(_0x44168b,_0x268a9a,_0x14d7ed){return new EBaaSClient(_0x44168b,_0x268a9a,_0x14d7ed);}const version=_0x684fad(0x58c,0x560);export{AuthClient,CustomDatabaseManager,DatabaseClient,EBaaSClient,EBaaSError,FunctionsClient,HttpClient,QueryBuilder,RealtimeChannel,RealtimeClient,StorageBucket,StorageClient,createClient,version};
1
+ (function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x27fc1b(_0x13daec,_0x545080){return _0x46d3(_0x13daec-0x309,_0x545080);}while(!![]){try{const _0x7a8ed8=-parseInt(_0x27fc1b(0x482,0x446))/0x1+parseInt(_0x27fc1b(0x55d,0x5cf))/0x2*(-parseInt(_0x27fc1b(0x466,0x40c))/0x3)+-parseInt(_0x27fc1b(0x51c,0x589))/0x4+parseInt(_0x27fc1b(0x49e,0x50c))/0x5*(-parseInt(_0x27fc1b(0x4d7,0x507))/0x6)+-parseInt(_0x27fc1b(0x54a,0x54a))/0x7*(parseInt(_0x27fc1b(0x4b2,0x50a))/0x8)+parseInt(_0x27fc1b(0x4b1,0x4b7))/0x9+parseInt(_0x27fc1b(0x478,0x3f1))/0xa;if(_0x7a8ed8===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x498775){stringArray['push'](stringArray['shift']());}}}(_0x1ed3,0xb4896));import axios from'axios';function _0x46d3(_0x4b98e2,_0x4220ff){const _0x1ed34a=_0x1ed3();return _0x46d3=function(_0x46d366,_0x5a555f){_0x46d366=_0x46d366-0x14d;let _0x9f5936=_0x1ed34a[_0x46d366];if(_0x46d3['SWDoWb']===undefined){var _0x3a3327=function(_0x46e9df){const _0x2b9a15='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd92010='',_0x39eb4e='';for(let _0x13b141=0x0,_0x49db59,_0x423aab,_0x1427ae=0x0;_0x423aab=_0x46e9df['charAt'](_0x1427ae++);~_0x423aab&&(_0x49db59=_0x13b141%0x4?_0x49db59*0x40+_0x423aab:_0x423aab,_0x13b141++%0x4)?_0xd92010+=String['fromCharCode'](0xff&_0x49db59>>(-0x2*_0x13b141&0x6)):0x0){_0x423aab=_0x2b9a15['indexOf'](_0x423aab);}for(let _0x4942ab=0x0,_0x24a908=_0xd92010['length'];_0x4942ab<_0x24a908;_0x4942ab++){_0x39eb4e+='%'+('00'+_0xd92010['charCodeAt'](_0x4942ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x39eb4e);};_0x46d3['IfoNgL']=_0x3a3327,_0x4b98e2=arguments,_0x46d3['SWDoWb']=!![];}const _0x3320aa=_0x1ed34a[0x0],_0x52b71f=_0x46d366+_0x3320aa,_0x5cd24b=_0x4b98e2[_0x52b71f];return!_0x5cd24b?(_0x9f5936=_0x46d3['IfoNgL'](_0x9f5936),_0x4b98e2[_0x52b71f]=_0x9f5936):_0x9f5936=_0x5cd24b,_0x9f5936;},_0x46d3(_0x4b98e2,_0x4220ff);}class EBaaSError extends Error{constructor(_0x46e9df,status=0x0,_0x2b9a15){super(_0x46e9df),this['name']='EBaaSError';function _0x2c88e2(_0x3af8ab,_0x5a60a0){return _0x46d3(_0x5a60a0-0x1b1,_0x3af8ab);}this[_0x2c88e2(0x358,0x309)]=status,this[_0x2c88e2(0x437,0x408)]=_0x2b9a15,Error['captureStackTrace']&&Error['captureStackTrace'](this,EBaaSError);}['toJSON'](){function _0x413905(_0x111034,_0x168b04){return _0x46d3(_0x111034- -0x143,_0x168b04);}return{'name':this[_0x413905(0x1b,0x9d)],'message':this['message'],'status':this[_0x413905(0x15,0x6e)],'details':this[_0x413905(0x114,0x96)],'stack':this[_0x413905(0x120,0x132)]};}[_0x294921(-0xa,-0x21)](){function _0x18650d(_0xc0e78d,_0x41d469){return _0x46d3(_0xc0e78d- -0x2f9,_0x41d469);}return this['name']+':\x20'+this['message']+_0x18650d(-0x134,-0xc7)+this['status']+')';}}class HttpClient{constructor(config){this['baseURL']=config[_0x19c64a(0x28a,0x2a7)],this[_0x19c64a(0x38d,0x35e)]=config[_0x19c64a(0x37d,0x35e)];function _0x19c64a(_0x17e5d4,_0x3eaad4){return _0x46d3(_0x3eaad4-0x151,_0x17e5d4);}this['client']=axios[_0x19c64a(0x3b6,0x39a)]({'baseURL':this['baseURL'],'timeout':config[_0x19c64a(0x33c,0x32b)]||0x2710,'headers':{'Content-Type':'application/json','apikey':this['apiKey'],...config['headers']}}),this[_0x19c64a(0x315,0x321)]();}[_0x294921(-0x4d,0x22)](){this['client']['interceptors']['request']['use'](config=>{return config;},_0xd92010=>{function _0xa174ec(_0x49b344,_0x455f87){return _0x46d3(_0x455f87- -0x2a5,_0x49b344);}return Promise[_0xa174ec(-0xa4,-0xe9)](new EBaaSError('Request\x20failed',0x0,_0xd92010));});function _0x30e2e3(_0x5df2b2,_0xc56c7f){return _0x46d3(_0x5df2b2- -0x3a7,_0xc56c7f);}this[_0x30e2e3(-0x1d4,-0x19c)]['interceptors']['response'][_0x30e2e3(-0x1de,-0x221)](response=>{return response;},_0x39eb4e=>{const status=_0x39eb4e[_0x45db50(0x19a,0x1e8)]?.['status']||0x0,_0x13b141=_0x39eb4e['response']?.['data']?.['message']||_0x39eb4e[_0x45db50(0x286,0x258)]||'Unknown\x20error',_0x49db59=_0x39eb4e['response']?.[_0x45db50(0x17a,0x1bd)]||_0x39eb4e;function _0x45db50(_0xf60450,_0x182318){return _0x46d3(_0x182318- -0x4,_0xf60450);}return Promise['reject'](new EBaaSError(_0x13b141,status,_0x49db59));});}async['get'](_0x423aab,config){function _0xce36d1(_0x51cb18,_0x19e0a7){return _0x46d3(_0x51cb18- -0xe3,_0x19e0a7);}try{const response=await this['client'][_0xce36d1(0x14c,0x169)](_0x423aab,config);return{'data':response[_0xce36d1(0xde,0x140)],'status':response[_0xce36d1(0x75,0xfd)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x1427ae){throw this['handleError'](_0x1427ae);}}async[_0x294921(-0x4f,-0x3d)](_0x4942ab,data,config){function _0x66bb5d(_0x10f6bf,_0x2edba4){return _0x46d3(_0x10f6bf- -0x229,_0x2edba4);}try{const response=await this[_0x66bb5d(-0x56,-0xba)]['post'](_0x4942ab,data,config);return{'data':response[_0x66bb5d(-0x68,-0x3e)],'status':response[_0x66bb5d(-0xd1,-0x14b)],'statusText':response[_0x66bb5d(-0x28,0xf)],'headers':response['headers']};}catch(_0x24a908){throw this[_0x66bb5d(-0x7a,-0x40)](_0x24a908);}}async[_0x294921(-0x33,-0x4e)](_0x5d9fc9,data,config){function _0x36b4eb(_0x39d0ec,_0x56bace){return _0x46d3(_0x56bace-0xaf,_0x39d0ec);}try{const response=await this[_0x36b4eb(0x27a,0x282)]['put'](_0x5d9fc9,data,config);return{'data':response[_0x36b4eb(0x287,0x270)],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x51f9e5){throw this['handleError'](_0x51f9e5);}}async['patch'](_0x4b61cc,data,config){function _0x398b73(_0x5018d5,_0x8d6328){return _0x46d3(_0x5018d5- -0x301,_0x8d6328);}try{const response=await this['client']['patch'](_0x4b61cc,data,config);return{'data':response['data'],'status':response[_0x398b73(-0x1a9,-0x1e3)],'statusText':response[_0x398b73(-0x100,-0x8a)],'headers':response[_0x398b73(-0x1a7,-0x155)]};}catch(_0x6a438){throw this[_0x398b73(-0x152,-0x1c0)](_0x6a438);}}async[_0x294921(0x4b,-0x2a)](_0x24db05,config){function _0x1f0122(_0x54aa37,_0x2d3539){return _0x46d3(_0x2d3539- -0x37f,_0x54aa37);}try{const response=await this[_0x1f0122(-0x1a3,-0x1ac)][_0x1f0122(-0x179,-0x1fb)](_0x24db05,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x1f0122(-0x279,-0x225)]};}catch(_0x55eace){throw this['handleError'](_0x55eace);}}[_0x294921(0x19,0x89)](_0x1fe112){function _0x888845(_0x4973db,_0x487777){return _0x46d3(_0x4973db-0x326,_0x487777);}this[_0x888845(0x4f9,0x48b)][_0x888845(0x56b,0x57a)][_0x888845(0x480,0x400)]['common']['Authorization']=_0x888845(0x4a9,0x502)+_0x1fe112;}[_0x294921(0x70,0x21)](){function _0x28d1c4(_0x221b8e,_0x2b9991){return _0x46d3(_0x2b9991- -0x13d,_0x221b8e);}delete this[_0x28d1c4(0x70,0x96)][_0x28d1c4(0xd9,0x108)]['headers'][_0x28d1c4(0x193,0x10b)]['Authorization'],this['client']['defaults'][_0x28d1c4(0x1f,0x1d)]['common']['Authorization']='Bearer\x20'+this[_0x28d1c4(0x12c,0xd0)];}['handleError'](_0x123f33){if(_0x123f33 instanceof EBaaSError)return _0x123f33;function _0x52f111(_0x15d296,_0x1f4e8e){return _0x46d3(_0x15d296-0x35c,_0x1f4e8e);}return new EBaaSError(_0x123f33[_0x52f111(0x5b8,0x52e)]||'HTTP\x20request\x20failed',_0x123f33[_0x52f111(0x4b4,0x464)]||0x0,_0x123f33);}}class AuthClient{constructor(_0x3454ed,_0x196b50){function _0x3795f6(_0x45ea0e,_0x377424){return _0x46d3(_0x377424-0x2b4,_0x45ea0e);}this['currentSession']=null,this[_0x3795f6(0x40e,0x467)]=_0x3454ed,this[_0x3795f6(0x44c,0x474)]=_0x196b50,this['loadSession']();}async['signUp'](data){function _0x507409(_0xcf53f4,_0xa77c86){return _0x46d3(_0xcf53f4-0x258,_0xa77c86);}try{const response=await this['httpClient'][_0x507409(0x3c9,0x455)]('/auth/v1/signup',data);return response[_0x507409(0x419,0x444)]['session']&&this['setSessionInternal'](response['data']['session']),response[_0x507409(0x419,0x4a3)];}catch(_0x51a8f7){throw this['handleAuthError'](_0x51a8f7);}}async[_0x294921(0x3a,0x55)](data){function _0x27137c(_0x583e22,_0x1e2cd1){return _0x46d3(_0x583e22- -0x313,_0x1e2cd1);}try{const headers={};this['workspaceId']&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this['httpClient']['post']('/auth/v1/sdk/signin',data,{'headers':headers});return response['data']['session']&&this[_0x27137c(-0x1b8,-0x133)](response['data']['session']),response[_0x27137c(-0x152,-0x174)];}catch(_0x45f9c3){throw this[_0x27137c(-0x10c,-0x13a)](_0x45f9c3);}}async['signOut'](){function _0x462eae(_0x258661,_0x1f2ad1){return _0x46d3(_0x1f2ad1-0x193,_0x258661);}try{await this['httpClient']['post']('/auth/v1/signout'),this[_0x462eae(0x3af,0x3d9)]();}catch(_0x2ca483){this[_0x462eae(0x36c,0x3d9)]();throw this['handleAuthError'](_0x2ca483);}}async[_0x294921(0x111,0xaa)](){if(!this[_0x43654b(0x352,0x34b)]?.['access_token'])return null;function _0x43654b(_0x1d5af1,_0x3d80cc){return _0x46d3(_0x3d80cc-0x1fc,_0x1d5af1);}try{const response=await this[_0x43654b(0x331,0x3af)]['get'](_0x43654b(0x426,0x39d));return response['data'][_0x43654b(0x42c,0x443)];}catch(_0x586832){if(_0x586832 instanceof EBaaSError&&_0x586832['status']===0x191)return this['clearSession'](),null;throw this[_0x43654b(0x41e,0x403)](_0x586832);}}async['refreshSession'](){function _0x39d02e(_0x53596,_0x58dc3d){return _0x46d3(_0x53596-0x2d4,_0x58dc3d);}if(!this['currentSession']?.[_0x39d02e(0x4ad,0x495)])return null;try{const response=await this['httpClient'][_0x39d02e(0x445,0x47b)]('/auth/v1/refresh',{'refresh_token':this[_0x39d02e(0x423,0x435)]['refresh_token']});if(response[_0x39d02e(0x495,0x49a)][_0x39d02e(0x4eb,0x4e2)])return this[_0x39d02e(0x4f7,0x580)](response[_0x39d02e(0x495,0x495)][_0x39d02e(0x4eb,0x517)]),response['data']['session'];return null;}catch(_0x5f1238){this[_0x39d02e(0x51a,0x592)]();throw this['handleAuthError'](_0x5f1238);}}async[_0x294921(0x23,0xaf)](_0x398042){function _0x546d19(_0x572d9e,_0x45d955){return _0x46d3(_0x572d9e- -0x365,_0x45d955);}try{await this['httpClient'][_0x546d19(-0x1f4,-0x1b0)](_0x546d19(-0x178,-0x140),{'email':_0x398042});}catch(_0x48860b){throw this['handleAuthError'](_0x48860b);}}async[_0x294921(0x18,0x50)](data){function _0x240698(_0x2c3616,_0x3bf6b1){return _0x46d3(_0x2c3616-0x1a0,_0x3bf6b1);}try{const response=await this['httpClient']['put']('/auth/v1/user',data);return response[_0x240698(0x361,0x3a2)]['user'];}catch(_0xfbdf38){throw this['handleAuthError'](_0xfbdf38);}}['getSession'](){function _0x316303(_0x5d6767,_0x26f4c7){return _0x46d3(_0x5d6767-0x2c,_0x26f4c7);}return this[_0x316303(0x17b,0x114)];}[_0x294921(0x68,0x75)](_0x58055b){this['currentSession']=_0x58055b,this['httpClient']['setAuthToken'](_0x58055b['access_token']);function _0x3f60e2(_0x127185,_0x399bcd){return _0x46d3(_0x127185-0x3b0,_0x399bcd);}typeof localStorage!==_0x3f60e2(0x582,0x5b6)&&localStorage[_0x3f60e2(0x572,0x54b)]('ebaas.auth.session',JSON['stringify'](_0x58055b));}[_0x294921(-0xa5,-0x2e)](_0x3aea47){return()=>{};}[_0x294921(0xa,-0x27)](_0x5c9cf5){function _0x3a2721(_0x2e8db3,_0x32c2a4){return _0x46d3(_0x32c2a4-0x213,_0x2e8db3);}this[_0x3a2721(0x399,0x3d3)]=_0x5c9cf5;}[_0x294921(-0x27,-0x53)](_0x11b980){function _0x396711(_0x360952,_0x4a2752){return _0x46d3(_0x4a2752- -0x384,_0x360952);}this[_0x396711(-0x1ab,-0x235)]=_0x11b980,this[_0x396711(-0x16a,-0x1d1)]['setAuthToken'](_0x11b980['access_token']),typeof localStorage!==_0x396711(-0x203,-0x1b2)&&localStorage['setItem'](_0x396711(-0x12f,-0x154),JSON[_0x396711(-0x262,-0x228)](_0x11b980));}[_0x294921(0x88,0x98)](){this[_0x1fd3bc(0xff,0xd6)]=null,this['httpClient'][_0x1fd3bc(0x1ac,0x156)]();function _0x1fd3bc(_0x3c81f8,_0x5cef3c){return _0x46d3(_0x5cef3c- -0x79,_0x3c81f8);}typeof localStorage!==_0x1fd3bc(0x18f,0x159)&&localStorage[_0x1fd3bc(0xaa,0x111)]('ebaas.auth.session');}['loadSession'](){function _0xd6881d(_0x91fdb2,_0x5ded93){return _0x46d3(_0x91fdb2- -0x121,_0x5ded93);}if(typeof localStorage!==_0xd6881d(0xb1,0x82)){const _0xf8e11f=localStorage['getItem']('ebaas.auth.session');if(_0xf8e11f)try{const _0x372407=JSON['parse'](_0xf8e11f);this[_0xd6881d(0x3a,0x7e)](_0x372407);}catch(_0x25b0b0){this[_0xd6881d(0x125,0xcc)]();}}}[_0x294921(0x6c,0x59)](_0x439fd6){if(_0x439fd6 instanceof EBaaSError)return _0x439fd6;return new EBaaSError(_0x439fd6['message']||'Authentication\x20failed',_0x439fd6['status']||0x0,_0x439fd6);}}class QueryBuilder{constructor(_0x4c616a,_0x2b18d3,_0x151c20,_0x461a59,_0x1e978c){this['httpClient']=_0x4c616a,this['table']=_0x2b18d3,this[_0x10f673(0x314,0x32e)]=_0x151c20,this['workspaceId']=_0x461a59;function _0x10f673(_0x36e538,_0x1b7206){return _0x46d3(_0x36e538-0xdc,_0x1b7206);}this[_0x10f673(0x24e,0x27d)]=_0x1e978c||'/sdk/v1',this[_0x10f673(0x2ed,0x2fc)]={'filters':[]};}[_0x294921(-0x44,-0x14)](_0x27c7d3='*',_0xa54851){function _0x537377(_0x54d9f9,_0x363a20){return _0x46d3(_0x363a20-0x6e,_0x54d9f9);}return this[_0x537377(0x2e5,0x27f)]['select']=_0x27c7d3,this;}[_0x294921(0x76,0x2)](data,_0x39fd46){function _0x4c376e(_0x30bfab,_0x14ee73){return _0x46d3(_0x30bfab-0x29c,_0x14ee73);}return this['executeQuery']('POST',this['restUrl']+'/'+this[_0x4c376e(0x498,0x461)]+_0x4c376e(0x453,0x429),{'data':data,'options':_0x39fd46});}[_0x294921(0x50,0x11)](data,_0x3e993c){this['query'][_0x30192b(-0x151,-0x196)]=data,this[_0x30192b(-0x18d,-0x1ec)]['updateOptions']=_0x3e993c;function _0x30192b(_0x107e1e,_0x6c451f){return _0x46d3(_0x107e1e- -0x39e,_0x6c451f);}return this;}['upsert'](data,_0x161097){function _0x4b0fe3(_0x14daeb,_0xbf18a5){return _0x46d3(_0xbf18a5-0x188,_0x14daeb);}return this[_0x4b0fe3(0x349,0x3c2)]('POST',this['restUrl']+'/'+this[_0x4b0fe3(0x3b0,0x384)]+_0x4b0fe3(0x355,0x38d),{'data':data,'options':{..._0x161097,'upsert':!![]}});}[_0x294921(0x38,-0x2a)](_0x245f16){function _0x2b9412(_0x2f7119,_0x3cee9a){return _0x46d3(_0x3cee9a- -0x21f,_0x2f7119);}return this[_0x2b9412(0x7e,-0xe)][_0x2b9412(-0x106,-0x87)]=_0x245f16,this['query'][_0x2b9412(-0x1a,-0x49)]=!![],this;}['eq'](_0x4024a0,_0x5422f5){this[_0x205e16(0x3c,-0x34)]['filters']['push']({'column':_0x4024a0,'operator':'eq','value':_0x5422f5});function _0x205e16(_0x56c20d,_0x182315){return _0x46d3(_0x56c20d- -0x1d5,_0x182315);}return this;}['neq'](_0x20b8e1,_0x4bb2bc){this[_0x4a8459(0x36c,0x383)][_0x4a8459(0x3d7,0x38b)][_0x4a8459(0x398,0x336)]({'column':_0x20b8e1,'operator':'neq','value':_0x4bb2bc});function _0x4a8459(_0x59d5d4,_0x4efd15){return _0x46d3(_0x4efd15-0x172,_0x59d5d4);}return this;}['gt'](_0x3c4032,_0x494e9f){this['query']['filters'][_0xbf7d3d(0x52d,0x58c)]({'column':_0x3c4032,'operator':'gt','value':_0x494e9f});function _0xbf7d3d(_0x4f7ad8,_0x14bdac){return _0x46d3(_0x14bdac-0x3c8,_0x4f7ad8);}return this;}[_0x294921(0xbf,0x7a)](_0x249400,_0x21a002){function _0x4dc382(_0x166111,_0x4af1fb){return _0x46d3(_0x166111- -0x1e5,_0x4af1fb);}return this[_0x4dc382(0x2c,0xa9)][_0x4dc382(0x34,0x58)]['push']({'column':_0x249400,'operator':_0x4dc382(0x43,-0x11),'value':_0x21a002}),this;}['lt'](_0x6d19c9,_0x7e86db){this[_0xff8829(0x235,0x2a6)]['filters'][_0xff8829(0x1e8,0x178)]({'column':_0x6d19c9,'operator':'lt','value':_0x7e86db});function _0xff8829(_0x168478,_0x25d628){return _0x46d3(_0x168478-0x24,_0x25d628);}return this;}['lte'](_0x1abe3f,_0x1eb1d4){function _0x935c19(_0x2fb795,_0x62ba07){return _0x46d3(_0x62ba07- -0x23a,_0x2fb795);}return this[_0x935c19(0x1f,-0x29)][_0x935c19(-0x16,-0x21)]['push']({'column':_0x1abe3f,'operator':_0x935c19(0x21,0x28),'value':_0x1eb1d4}),this;}['like'](_0x2112b7,_0x6ff611){function _0x1e72a4(_0x18257b,_0x34c9df){return _0x46d3(_0x34c9df-0xa4,_0x18257b);}return this['query']['filters'][_0x1e72a4(0x204,0x268)]({'column':_0x2112b7,'operator':_0x1e72a4(0x1ba,0x21c),'value':_0x6ff611}),this;}['ilike'](_0x5c8c35,_0x19b555){this[_0x526165(0x5e2,0x58c)]['filters']['push']({'column':_0x5c8c35,'operator':_0x526165(0x5b9,0x59d),'value':_0x19b555});function _0x526165(_0x28a756,_0x1fcc18){return _0x46d3(_0x28a756-0x3d1,_0x1fcc18);}return this;}['is'](_0x20b021,_0x5e78d5){this['query'][_0x44f8df(0x451,0x3f6)][_0x44f8df(0x3fc,0x410)]({'column':_0x20b021,'operator':'is','value':_0x5e78d5});function _0x44f8df(_0x276ffb,_0x369440){return _0x46d3(_0x276ffb-0x238,_0x369440);}return this;}['in'](_0x561173,_0x5b8d99){this[_0x183ce2(0xcf,0x129)][_0x183ce2(0x13b,0x131)]['push']({'column':_0x561173,'operator':'in','value':_0x5b8d99});function _0x183ce2(_0x2a8037,_0x4d7754){return _0x46d3(_0x4d7754- -0xe8,_0x2a8037);}return this;}[_0x294921(0x52,-0x2f)](_0x3af99b,_0xfdb906){this['query']['filters'][_0x41854f(0x5a1,0x600)]({'column':_0x3af99b,'operator':_0x41854f(0x55c,0x53f),'value':_0xfdb906});function _0x41854f(_0x15738a,_0x4a2974){return _0x46d3(_0x15738a-0x3dd,_0x4a2974);}return this;}[_0x294921(0x25,-0x61)](_0x9de57c){Object[_0x24ff13(0x388,0x34c)](_0x9de57c)['forEach'](([_0x1c03c0,_0x548139])=>{this['eq'](_0x1c03c0,_0x548139);});function _0x24ff13(_0x13984a,_0xce36e4){return _0x46d3(_0x13984a-0x18d,_0xce36e4);}return this;}[_0x294921(0xa3,0xa0)](_0x4f301d,_0x2f7ec4){!this['query'][_0x4b6114(-0x117,-0xc0)]&&(this['query']['order']=[]);this[_0x4b6114(-0x105,-0xfd)]['order']['push']({'column':_0x4f301d,'ascending':_0x2f7ec4?.['ascending']!==![]});function _0x4b6114(_0xf8871b,_0x2db352){return _0x46d3(_0x2db352- -0x30e,_0xf8871b);}return this;}[_0x294921(-0xcf,-0x5e)](count){return this['query']['limit']=count,this;}[_0x294921(0x29,-0x45)](from,_0x51c078){return this['query']['range']={'from':from,'to':_0x51c078},this;}async[_0x294921(0x7f,0x68)](){function _0x26f514(_0x243474,_0x766ee5){return _0x46d3(_0x766ee5-0x32b,_0x243474);}if(this[_0x26f514(0x5af,0x53c)]['updateData'])return this['executeQuery']('PATCH',this['restUrl']+'/'+this[_0x26f514(0x4f2,0x527)],{'data':this[_0x26f514(0x591,0x53c)]['updateData'],'options':this['query'][_0x26f514(0x582,0x53d)],'filters':this['query'][_0x26f514(0x516,0x544)]});else return this[_0x26f514(0x513,0x53c)][_0x26f514(0x4db,0x501)]?this['executeQuery']('DELETE',this[_0x26f514(0x41f,0x49d)]+'/'+this[_0x26f514(0x552,0x527)]+'?operation=delete',{'options':this['query'][_0x26f514(0x503,0x4c3)],'filters':this[_0x26f514(0x56c,0x53c)]['filters']}):this[_0x26f514(0x581,0x565)]('GET',this[_0x26f514(0x499,0x49d)]+'/'+this[_0x26f514(0x561,0x527)]+_0x26f514(0x57a,0x53f),{'select':this[_0x26f514(0x4fa,0x53c)][_0x26f514(0x4a5,0x4c5)],'filters':this['query'][_0x26f514(0x4fd,0x544)],'order':this['query']['order'],'limit':this['query']['limit'],'range':this[_0x26f514(0x504,0x53c)]['range']});}async[_0x294921(-0xad,-0x40)](){this['limit'](0x1);function _0x271d9c(_0x437dd9,_0x3fb1e8){return _0x46d3(_0x437dd9- -0x1e2,_0x3fb1e8);}const result=await this[_0x271d9c(0x34,0x26)]();return{'data':result['data']?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x3335f2,_0x16b908,_0x45771a){function _0x872c06(_0x493b71,_0x261836){return _0x46d3(_0x261836-0x264,_0x493b71);}try{let response;const headers={};this['workspaceId']&&(headers['x-workspace-id']=this['workspaceId']);if(_0x3335f2==='GET'){const _0x37681b=_0x16b908[_0x872c06(0x3d2,0x3e2)]('?'),_0x2187e7=_0x37681b[0x0],existingParams=new URLSearchParams(_0x37681b[0x1]||'');if(_0x45771a['select'])existingParams[_0x872c06(0x39d,0x416)](_0x872c06(0x3a5,0x3fe),_0x45771a[_0x872c06(0x375,0x3fe)]);_0x45771a[_0x872c06(0x4d8,0x47d)]?.['length']&&_0x45771a['filters']['forEach'](filter=>{function _0x56986f(_0x1102f5,_0x5d8117){return _0x46d3(_0x1102f5-0x368,_0x5d8117);}existingParams[_0x56986f(0x51a,0x4ae)](filter['column'],filter['operator']+'.'+filter[_0x56986f(0x532,0x4bf)]);});if(_0x45771a['order']?.[_0x872c06(0x3ef,0x403)]){const orderStr=_0x45771a[_0x872c06(0x4a4,0x4b2)][_0x872c06(0x40d,0x3c6)](_0x573b3d=>''+_0x573b3d['column']+(_0x573b3d['ascending']?_0x872c06(0x4ae,0x438):_0x872c06(0x484,0x402)))[_0x872c06(0x43e,0x45d)](',');existingParams[_0x872c06(0x433,0x416)](_0x872c06(0x475,0x4b2),orderStr);}if(_0x45771a['limit'])existingParams[_0x872c06(0x48b,0x416)](_0x872c06(0x421,0x3b4),_0x45771a['limit'][_0x872c06(0x393,0x3f1)]());_0x45771a['range']&&(existingParams[_0x872c06(0x459,0x416)]('offset',_0x45771a[_0x872c06(0x3d3,0x3cd)][_0x872c06(0x490,0x499)]['toString']()),existingParams[_0x872c06(0x43e,0x416)](_0x872c06(0x3b3,0x3b4),(_0x45771a[_0x872c06(0x44f,0x3cd)]['to']-_0x45771a['range']['from']+0x1)[_0x872c06(0x41b,0x3f1)]())),response=await this[_0x872c06(0x48b,0x417)]['get'](_0x2187e7+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x3335f2==='DELETE'){const _0x1710cb=_0x16b908['split']('?'),_0x5baa68=_0x1710cb[0x0],existingParams=new URLSearchParams(_0x1710cb[0x1]||'');!existingParams['has'](_0x872c06(0x41a,0x47c))&&existingParams['append']('operation','delete');_0x45771a['filters']?.[_0x872c06(0x37f,0x403)]&&_0x45771a['filters']['forEach'](filter=>{function _0x1c980e(_0x5e6e3a,_0x388b05){return _0x46d3(_0x388b05-0x1f2,_0x5e6e3a);}existingParams[_0x1c980e(0x341,0x3a4)](filter[_0x1c980e(0x3ae,0x383)],filter[_0x1c980e(0x3ab,0x3b5)]+'.'+filter[_0x1c980e(0x387,0x3bc)]);});const deleteUrl=_0x5baa68+'?'+existingParams['toString']();console[_0x872c06(0x460,0x46a)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console[_0x872c06(0x4a5,0x46a)]('\uD83D\uDD27 DELETE headers:',headers),console['log']('\uD83D\uDD27 DELETE filtros originais:',_0x45771a['filters']),response=await this['httpClient'][_0x872c06(0x45e,0x3e8)](deleteUrl,{'headers':headers});}else{if(_0x3335f2==='PATCH'){const _0x5ef162=_0x16b908[_0x872c06(0x39b,0x3e2)]('?'),_0x5d4139=_0x5ef162[0x0],existingParams=new URLSearchParams(_0x5ef162[0x1]||'');!existingParams[_0x872c06(0x3b7,0x435)]('operation')&&existingParams[_0x872c06(0x3d1,0x416)]('operation',_0x872c06(0x3e2,0x423));_0x45771a['filters']?.['length']&&_0x45771a['filters'][_0x872c06(0x437,0x3c3)](filter=>{function _0x36aa56(_0x1826e2,_0x29797b){return _0x46d3(_0x29797b- -0x1df,_0x1826e2);}existingParams['append'](filter['column'],filter[_0x36aa56(0x62,-0x1c)]+'.'+filter[_0x36aa56(-0x34,-0x15)]);});_0x45771a['options']?.[_0x872c06(0x4f6,0x4c5)]&&(headers[_0x872c06(0x414,0x3e6)]=_0x45771a[_0x872c06(0x470,0x3f8)][_0x872c06(0x48e,0x4c5)]);const updateUrl=_0x5d4139+'?'+existingParams[_0x872c06(0x40a,0x3f1)]();response=await this['httpClient'][_0x872c06(0x40c,0x42a)](updateUrl,_0x45771a[_0x872c06(0x492,0x425)],{'headers':headers});}else{let _0x37b02b=_0x45771a[_0x872c06(0x436,0x425)];!headers['Prefer']&&(headers['Prefer']=_0x872c06(0x515,0x4b4)),_0x45771a['options']?.['upsert']&&(headers['Prefer']=_0x872c06(0x3a4,0x3e5)),_0x45771a[_0x872c06(0x3eb,0x3ef)]&&(_0x37b02b=_0x45771a[_0x872c06(0x3d0,0x3ef)]),response=await this[_0x872c06(0x3aa,0x417)][_0x872c06(0x34f,0x3d5)](_0x16b908,_0x37b02b,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response['headers']?.[_0x872c06(0x44b,0x3ff)]?parseInt(response[_0x872c06(0x347,0x3be)]['x-total-count']):undefined};}catch(_0x51de63){return{'data':null,'error':_0x51de63 instanceof EBaaSError?_0x51de63:new EBaaSError(_0x51de63 instanceof Error?_0x51de63[_0x872c06(0x526,0x4c0)]:_0x872c06(0x4c3,0x45c),0x0,_0x51de63)};}}}class CustomDatabaseManager{constructor(_0x1d3c77,_0x150e4c){this[_0x3a99df(0x149,0x1cd)]=_0x1d3c77;function _0x3a99df(_0x5872b1,_0xd61cb3){return _0x46d3(_0x5872b1- -0x6a,_0xd61cb3);}this['workspaceId']=_0x150e4c;}async[_0x294921(-0xc7,-0x46)](){function _0x4df875(_0x377714,_0x42a0c4){return _0x46d3(_0x377714-0x1e0,_0x42a0c4);}if(!this['workspaceId'])return{'hasCustomDatabase':![]};try{const response=await this['httpClient']['get']('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this[_0x4df875(0x3a0,0x360)]}});if(response['status']===0xc8&&response[_0x4df875(0x3a1,0x38a)]?.[_0x4df875(0x385,0x323)]){const config=response['data']['config'],_0x4f460f={'host':config[_0x4df875(0x35d,0x2f2)],'port':config[_0x4df875(0x40a,0x37f)],'database':config['postgresDatabase'],'username':config['postgresUsername'],'password':'','schema':config[_0x4df875(0x354,0x345)],'sslEnabled':config[_0x4df875(0x366,0x2f3)]};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x4f460f},this['detectedConfig'];}}catch(_0x51e3cd){if(_0x51e3cd?.[_0x4df875(0x338,0x2b5)]===0x194)return this['detectedConfig']={'hasCustomDatabase':![]},this[_0x4df875(0x43e,0x404)];console[_0x4df875(0x3d0,0x3b0)]('Failed to detect custom database configuration:',_0x51e3cd);}return this[_0x4df875(0x43e,0x43a)]={'hasCustomDatabase':![]},this['detectedConfig'];}async['testConnection'](_0x2dd835){function _0x4fbb1f(_0x2b6bbf,_0x3a2f9b){return _0x46d3(_0x2b6bbf- -0x170,_0x3a2f9b);}try{const response=await this[_0x4fbb1f(0x43,0x25)][_0x4fbb1f(0x1,-0x6)]('/admin/v1/workspace/custom-database/test-connection',_0x2dd835,{'headers':this['workspaceId']?{'X-Workspace-ID':this['workspaceId']}:{}});return response['data'];}catch(_0x4d2495){return{'success':![],'message':_0x4d2495?.['message']||'Failed\x20to\x20test\x20connection'};}}async['configureCustomDatabase'](_0x25f721){if(!this['workspaceId'])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x76b320(0x66,-0x1e)]('/admin/v1/workspace/custom-database',{'workspaceId':this[_0x76b320(-0x33,0x31)],..._0x25f721},{'headers':{'X-Workspace-ID':this[_0x76b320(0x66,0x31)]}});function _0x76b320(_0x376ec8,_0x27a3a5){return _0x46d3(_0x27a3a5- -0x18f,_0x376ec8);}const config=response[_0x76b320(0x79,0x32)][_0x76b320(0x6c,0x16)];return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0x25f721},config;}async[_0x294921(0x1a,-0xa)](){if(!this[_0x13fd17(0x98,0xe2)])throw new Error('Workspace ID is required to remove custom database');await this['httpClient'][_0x13fd17(0xf0,0xa6)]('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this[_0x13fd17(0xe2,0xe2)]}});function _0x13fd17(_0x422494,_0x29d9b6){return _0x46d3(_0x29d9b6- -0xde,_0x422494);}this[_0x13fd17(0x1e2,0x180)]={'hasCustomDatabase':![]};}[_0x294921(-0xc6,-0x3e)](){function _0x578cd0(_0xe53021,_0x2a8109){return _0x46d3(_0xe53021- -0x30e,_0x2a8109);}return this[_0x578cd0(-0xb0,-0xa6)];}['hasCustomDatabase'](){function _0x324c2c(_0x355d0a,_0x28f2d3){return _0x46d3(_0x355d0a-0x173,_0x28f2d3);}return this[_0x324c2c(0x3d1,0x43d)]?.[_0x324c2c(0x36a,0x32f)]??![];}[_0x294921(0x3b,0x73)](){function _0x12a9a7(_0x38a129,_0x1f1c5e){return _0x46d3(_0x38a129-0x22b,_0x1f1c5e);}return this[_0x12a9a7(0x489,0x4bb)]?.['credentials'];}['setWorkspaceId'](_0xbb9bab){this['workspaceId']=_0xbb9bab;function _0x3c26c0(_0x17a2cb,_0x36119a){return _0x46d3(_0x36119a-0x3e1,_0x17a2cb);}this[_0x3c26c0(0x687,0x63f)]=undefined;}['getWorkspaceId'](){return this['workspaceId'];}[_0x294921(-0x15,-0x4a)](){function _0x144d1b(_0x512e72,_0x558aec){return _0x46d3(_0x512e72-0x3ab,_0x558aec);}return{'workspaceId':this['workspaceId'],'hasConfig':this['hasCustomDatabase'](),'configDetails':this['detectedConfig']?.['credentials']?{'host':this['detectedConfig'][_0x144d1b(0x5cb,0x60e)]['host'],'port':this[_0x144d1b(0x609,0x618)]['credentials']['port'],'database':this['detectedConfig'][_0x144d1b(0x5cb,0x56f)][_0x144d1b(0x59c,0x601)],'schema':this[_0x144d1b(0x609,0x5d0)]['credentials']['schema']||_0x144d1b(0x4f9,0x4a8),'sslEnabled':this['detectedConfig']['credentials'][_0x144d1b(0x531,0x597)]||![]}:undefined};}}class DatabaseClient{constructor(_0x4fd1e8,_0x98aff3,_0x17c0b9){this['httpClient']=_0x4fd1e8,this['customDatabaseManager']=new CustomDatabaseManager(_0x4fd1e8,_0x98aff3);function _0x23beb2(_0x30cd44,_0x60fd57){return _0x46d3(_0x60fd57-0x80,_0x30cd44);}this[_0x23beb2(0x1de,0x1f2)]=_0x17c0b9||'/sdk/v1';}[_0x294921(0x81,0x87)](_0x1d2846){function _0x155545(_0x2aee9b,_0xf3202){return _0x46d3(_0x2aee9b-0x361,_0xf3202);}return new QueryBuilder(this['httpClient'],_0x1d2846,this[_0x155545(0x55b,0x59b)],this['customDatabaseManager'][_0x155545(0x55e,0x5d4)](),this[_0x155545(0x4d3,0x475)]);}[_0x294921(-0x94,-0xb)](_0x4087e1,_0x59f4b5){return this['httpClient']['post']('/rpc/'+_0x4087e1,_0x59f4b5);}[_0x294921(0x53,0x8a)](_0x4b1fca){const _0x23b900=new DatabaseClient(this['httpClient'],this[_0x3f8beb(0x2d1,0x2e5)]['getWorkspaceId'](),this[_0x3f8beb(0x2a3,0x291)]);_0x23b900[_0x3f8beb(0x32b,0x325)]=_0x4b1fca;function _0x3f8beb(_0x32c5cc,_0x3d784a){return _0x46d3(_0x32c5cc-0x131,_0x3d784a);}return _0x23b900[_0x3f8beb(0x2d1,0x2fb)]=this['customDatabaseManager'],_0x23b900;}async[_0x294921(-0x85,-0x46)](){function _0x20c2fc(_0x55e833,_0x225978){return _0x46d3(_0x225978- -0xd2,_0x55e833);}return this[_0x20c2fc(0xee,0xce)]['detectCustomDatabase']();}async['testCustomConnection'](_0xb4cad9){function _0x166339(_0x4a68b8,_0x43fbe5){return _0x46d3(_0x4a68b8- -0x8a,_0x43fbe5);}return this[_0x166339(0x116,0x184)][_0x166339(0x15a,0x112)](_0xb4cad9);}async[_0x294921(0x27,0x48)](_0x46f577){function _0x56db48(_0x4fa32e,_0x4b6961){return _0x46d3(_0x4b6961-0x348,_0x4fa32e);}return this['customDatabaseManager'][_0x56db48(0x581,0x53e)](_0x46f577);}async['removeCustomDatabase'](){function _0x2f6e70(_0x11882a,_0x2fa683){return _0x46d3(_0x11882a-0x1e7,_0x2fa683);}return this[_0x2f6e70(0x387,0x33e)]['removeCustomDatabase']();}[_0x294921(0x7f,0x5c)](){return this['customDatabaseManager']['hasCustomDatabase']();}['getCustomDatabaseStatus'](){function _0x1df653(_0x1c4517,_0x221011){return _0x46d3(_0x221011- -0xa7,_0x1c4517);}return this[_0x1df653(0x70,0xf9)]['getStatus']();}['setWorkspaceId'](_0x55b584){function _0x5888dd(_0x1b34d1,_0x3bb5ac){return _0x46d3(_0x3bb5ac-0x56,_0x1b34d1);}this[_0x5888dd(0x275,0x1f6)]['setWorkspaceId'](_0x55b584);}async['initialize'](){function _0x14a01f(_0x29898e,_0x3eb13b){return _0x46d3(_0x29898e-0x229,_0x3eb13b);}try{await this[_0x14a01f(0x3c9,0x3af)]['detectCustomDatabase']();}catch(_0x517453){console[_0x14a01f(0x419,0x38d)]('Failed to initialize custom database detection:',_0x517453);}}}class StorageBucket{constructor(_0x5eb694,bucketId){function _0x403b77(_0x3003ba,_0x381e0e){return _0x46d3(_0x3003ba- -0x3c,_0x381e0e);}this[_0x403b77(0x177,0x15e)]=_0x5eb694,this[_0x403b77(0x18c,0x1cd)]=bucketId;}async['upload'](_0xfcb033,_0x12b0fa,_0x27e882){function _0x1d3a18(_0xdfd1d9,_0x2e399a){return _0x46d3(_0x2e399a- -0x312,_0xdfd1d9);}try{const _0x36f057=new FormData();if(_0x12b0fa instanceof File)_0x36f057['append']('file',_0x12b0fa);else{if(_0x12b0fa instanceof Blob)_0x36f057[_0x1d3a18(-0x14e,-0x160)](_0x1d3a18(-0xfa,-0x13d),_0x12b0fa,_0xfcb033);else{if(_0x12b0fa instanceof ArrayBuffer)_0x36f057[_0x1d3a18(-0x160,-0x160)]('file',new Blob([_0x12b0fa]),_0xfcb033);else typeof _0x12b0fa==='string'&&_0x36f057['append']('file',new Blob([_0x12b0fa],{'type':'text/plain'}),_0xfcb033);}}_0x36f057['append']('path',_0xfcb033);_0x27e882?.['cacheControl']&&_0x36f057['append'](_0x1d3a18(-0x146,-0x133),_0x27e882[_0x1d3a18(-0x1bf,-0x133)]);_0x27e882?.[_0x1d3a18(-0x71,-0xd2)]&&_0x36f057[_0x1d3a18(-0xd5,-0x160)]('contentType',_0x27e882['contentType']);_0x27e882?.[_0x1d3a18(-0xb3,-0xeb)]&&_0x36f057['append'](_0x1d3a18(-0x8c,-0xeb),JSON[_0x1d3a18(-0x173,-0x1b6)](_0x27e882[_0x1d3a18(-0x13b,-0xeb)]));const _0x53d828='/storage/buckets/'+this[_0x1d3a18(-0xc3,-0x14a)]+'/files'+(_0x27e882?.['upsert']?_0x1d3a18(-0x124,-0xd5):''),response=await this[_0x1d3a18(-0x15b,-0x15f)][_0x1d3a18(-0x1cc,-0x1a1)](_0x53d828,_0x36f057,{'headers':{'Content-Type':_0x1d3a18(-0x1f8,-0x17c)}});return{'data':response[_0x1d3a18(-0x114,-0x151)],'error':null};}catch(_0x1e1e66){return{'data':null,'error':_0x1e1e66 instanceof EBaaSError?_0x1e1e66:new EBaaSError(_0x1e1e66 instanceof Error?_0x1e1e66['message']:_0x1d3a18(-0x11d,-0x102),0x0,_0x1e1e66)};}}async[_0x294921(0xb7,0x45)](_0x2abe66,_0x225a79){function _0x1d7f87(_0x539e06,_0x2f15d8){return _0x46d3(_0x2f15d8-0xe,_0x539e06);}try{const _0x1b1f85=new URLSearchParams();_0x225a79?.['transform']&&Object[_0x1d7f87(0x1a0,0x209)](_0x225a79[_0x1d7f87(0x21b,0x23a)])['forEach'](([_0x3d13fc,_0x6c562b])=>{_0x6c562b!==undefined&&_0x1b1f85['append'](_0x3d13fc,String(_0x6c562b));});const _0x168a63='/storage/buckets/'+this['bucketId']+_0x1d7f87(0x1da,0x263)+_0x2abe66+(_0x1b1f85[_0x1d7f87(0x1a8,0x19b)]()?'?'+_0x1b1f85['toString']():''),response=await this[_0x1d7f87(0x237,0x1c1)][_0x1d7f87(0x1dc,0x23d)](_0x168a63,{'responseType':'blob'});return{'data':response['data'],'error':null};}catch(_0x24bf86){return{'data':null,'error':_0x24bf86 instanceof EBaaSError?_0x24bf86:new EBaaSError(_0x24bf86 instanceof Error?_0x24bf86[_0x1d7f87(0x272,0x26a)]:_0x1d7f87(0x22d,0x1d5),0x0,_0x24bf86)};}}async[_0x294921(-0x6c,0x8)](_0x2d802a,_0x3111ad){function _0x54ff48(_0x1a4c9d,_0x32dc2c){return _0x46d3(_0x1a4c9d- -0x63,_0x32dc2c);}try{const _0x4b1a60=new URLSearchParams();_0x2d802a&&_0x4b1a60['append']('prefix',_0x2d802a);_0x3111ad?.['limit']&&_0x4b1a60[_0x54ff48(0x14f,0xfc)](_0x54ff48(0xed,0x113),String(_0x3111ad['limit']));_0x3111ad?.['offset']&&_0x4b1a60['append'](_0x54ff48(0x104,0x88),String(_0x3111ad[_0x54ff48(0x104,0x146)]));_0x3111ad?.[_0x54ff48(0x184,0x1f7)]&&_0x4b1a60[_0x54ff48(0x14f,0x1c4)]('sortBy',JSON['stringify'](_0x3111ad['sortBy']));_0x3111ad?.['search']&&_0x4b1a60[_0x54ff48(0x14f,0x167)]('search',_0x3111ad['search']);const _0x3b8cf8='/storage/buckets/'+this['bucketId']+'/files'+(_0x4b1a60['toString']()?'?'+_0x4b1a60['toString']():''),response=await this[_0x54ff48(0x150,0x103)]['get'](_0x3b8cf8);return{'data':response['data'],'error':null};}catch(_0x2fbe07){return{'data':null,'error':_0x2fbe07 instanceof EBaaSError?_0x2fbe07:new EBaaSError(_0x2fbe07 instanceof Error?_0x2fbe07['message']:'Failed\x20to\x20list\x20files',0x0,_0x2fbe07)};}}async[_0x294921(0xa,0x88)](_0x103f3a){function _0x22c37b(_0x28d780,_0x1eb27a){return _0x46d3(_0x1eb27a-0x4c,_0x28d780);}try{const response=await this['httpClient']['delete'](_0x22c37b(0x185,0x1dc)+this['bucketId']+_0x22c37b(0x282,0x27d),{'data':{'paths':_0x103f3a}});return{'data':response['data'],'error':null};}catch(_0x2dc9ff){return{'data':null,'error':_0x2dc9ff instanceof EBaaSError?_0x2dc9ff:new EBaaSError(_0x2dc9ff instanceof Error?_0x2dc9ff[_0x22c37b(0x325,0x2a8)]:_0x22c37b(0x226,0x1d8),0x0,_0x2dc9ff)};}}async[_0x294921(0x5b,0x7)](fromPath,_0x351076){function _0x2a5ab0(_0x479594,_0x530879){return _0x46d3(_0x530879-0x398,_0x479594);}try{const response=await this[_0x2a5ab0(0x5ae,0x54b)]['post']('/storage/buckets/'+this[_0x2a5ab0(0x5d5,0x560)]+_0x2a5ab0(0x5ca,0x5eb),{'sourceKey':fromPath,'destinationKey':_0x351076});return{'data':response[_0x2a5ab0(0x5c9,0x559)],'error':null};}catch(_0x441e42){return{'data':null,'error':_0x441e42 instanceof EBaaSError?_0x441e42:new EBaaSError(_0x441e42 instanceof Error?_0x441e42[_0x2a5ab0(0x62a,0x5f4)]:'Failed\x20to\x20move\x20file',0x0,_0x441e42)};}}async[_0x294921(-0x55,0x1e)](fromPath,_0x292289){function _0xab4545(_0xae8b6f,_0x1f6da0){return _0x46d3(_0x1f6da0-0x19e,_0xae8b6f);}try{const response=await this['httpClient'][_0xab4545(0x306,0x30f)](_0xab4545(0x380,0x32e)+this['bucketId']+'/files/copy',{'sourceKey':fromPath,'destinationKey':_0x292289});return{'data':response['data'],'error':null};}catch(_0x5372b3){return{'data':null,'error':_0x5372b3 instanceof EBaaSError?_0x5372b3:new EBaaSError(_0x5372b3 instanceof Error?_0x5372b3['message']:_0xab4545(0x328,0x2f1),0x0,_0x5372b3)};}}async['createSignedUrl'](_0x121faa,_0x270372,_0x233a24){function _0x5c3bc3(_0x2c4c6e,_0x4e5f17){return _0x46d3(_0x4e5f17- -0xf8,_0x2c4c6e);}try{const response=await this[_0x5c3bc3(0x37,0xbb)]['post']('/storage/buckets/'+this[_0x5c3bc3(0x122,0xd0)]+_0x5c3bc3(0x1cb,0x15d)+_0x121faa+_0x5c3bc3(0x128,0xa1),{'expiresIn':_0x270372,..._0x233a24});return{'data':response['data'],'error':null};}catch(_0x2aa398){return{'data':null,'error':_0x2aa398 instanceof EBaaSError?_0x2aa398:new EBaaSError(_0x2aa398 instanceof Error?_0x2aa398['message']:_0x5c3bc3(0x51,0x9f),0x0,_0x2aa398)};}}['getPublicUrl'](_0x1b3615,_0xf71ed5){const _0x521b9f=new URLSearchParams();function _0x358fbe(_0x519f9f,_0x2d273a){return _0x46d3(_0x519f9f- -0x267,_0x2d273a);}_0xf71ed5?.['transform']&&Object['entries'](_0xf71ed5[_0x358fbe(-0x3b,0x2)])[_0x358fbe(-0x108,-0x12e)](([_0x4111eb,_0x1deec9])=>{_0x1deec9!==undefined&&_0x521b9f['append'](_0x4111eb,String(_0x1deec9));});const _0x377305=this['httpClient'][_0x358fbe(-0x2c,-0x6e)]||'',_0x6bb8fe=_0x377305+_0x358fbe(-0xd7,-0x13a)+this['bucketId']+_0x358fbe(-0x12,0x20)+_0x1b3615+(_0x521b9f['toString']()?'?'+_0x521b9f[_0x358fbe(-0xda,-0xe5)]():'');return{'data':{'publicUrl':_0x6bb8fe}};}async[_0x294921(0xe5,0x85)](_0x184d7a){function _0x3a3791(_0xbc1b95,_0x578ac3){return _0x46d3(_0x578ac3- -0x1a6,_0xbc1b95);}try{const response=await this[_0x3a3791(0x16,0xd)][_0x3a3791(0x31,0x89)](_0x3a3791(0x49,-0x16)+this['bucketId']+'/files/'+_0x184d7a+'/info');return{'data':response[_0x3a3791(0x3d,0x1b)],'error':null};}catch(_0x24df5f){return{'data':null,'error':_0x24df5f instanceof EBaaSError?_0x24df5f:new EBaaSError(_0x24df5f instanceof Error?_0x24df5f['message']:'Failed\x20to\x20get\x20file\x20info',0x0,_0x24df5f)};}}async['updateFileMetadata'](_0x3aa78b,metadata){function _0x33d6f6(_0x5f1208,_0x1057f6){return _0x46d3(_0x1057f6- -0x287,_0x5f1208);}try{const response=await this[_0x33d6f6(-0x7f,-0xd4)]['put'](_0x33d6f6(-0xf7,-0xf7)+this['bucketId']+_0x33d6f6(0x2f,-0x32)+_0x3aa78b+'/metadata',{'metadata':metadata});return{'data':response[_0x33d6f6(-0x12e,-0xc6)],'error':null};}catch(_0x44192c){return{'data':null,'error':_0x44192c instanceof EBaaSError?_0x44192c:new EBaaSError(_0x44192c instanceof Error?_0x44192c['message']:_0x33d6f6(-0xb8,-0xbc),0x0,_0x44192c)};}}}class StorageClient{constructor(_0x3348d3){this['httpClient']=_0x3348d3;}[_0x294921(0xd1,0x87)](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async[_0x294921(-0xce,-0x48)](_0x3d6209,_0x406b4b){function _0x1594b6(_0x25a4bc,_0x12e362){return _0x46d3(_0x25a4bc-0x2ab,_0x12e362);}try{const response=await this['httpClient']['post']('/storage/buckets',{'id':_0x3d6209,..._0x406b4b});return{'data':response['data'],'error':null};}catch(_0x20dc7d){return{'data':null,'error':_0x20dc7d instanceof EBaaSError?_0x20dc7d:new EBaaSError(_0x20dc7d instanceof Error?_0x20dc7d[_0x1594b6(0x507,0x4de)]:'Failed\x20to\x20create\x20bucket',0x0,_0x20dc7d)};}}async['getBucket'](_0x58f659){function _0x1fe553(_0x4eaf2c,_0x5ca4df){return _0x46d3(_0x4eaf2c-0xd5,_0x5ca4df);}try{const response=await this[_0x1fe553(0x288,0x293)]['get'](_0x1fe553(0x265,0x232)+_0x58f659);return{'data':response['data'],'error':null};}catch(_0xd6e9bb){return{'data':null,'error':_0xd6e9bb instanceof EBaaSError?_0xd6e9bb:new EBaaSError(_0xd6e9bb instanceof Error?_0xd6e9bb['message']:_0x1fe553(0x2b2,0x25b),0x0,_0xd6e9bb)};}}async[_0x294921(-0xa4,-0x44)](){function _0x13979d(_0x34cc56,_0x5072b1){return _0x46d3(_0x34cc56- -0x203,_0x5072b1);}try{const response=await this[_0x13979d(-0x50,0x20)][_0x13979d(0x2c,0xaa)]('/storage/buckets');return{'data':response['data'],'error':null};}catch(_0x5aa400){return{'data':null,'error':_0x5aa400 instanceof EBaaSError?_0x5aa400:new EBaaSError(_0x5aa400 instanceof Error?_0x5aa400['message']:_0x13979d(-0xa0,-0x113),0x0,_0x5aa400)};}}async['updateBucket'](_0x39c42a,_0x480b9e){function _0x4cc340(_0x1fc3e4,_0x55a2d2){return _0x46d3(_0x1fc3e4- -0x341,_0x55a2d2);}try{const response=await this[_0x4cc340(-0x18e,-0x138)][_0x4cc340(-0x1e1,-0x1f3)](_0x4cc340(-0x1b1,-0x195)+_0x39c42a,_0x480b9e);return{'data':response[_0x4cc340(-0x180,-0x170)],'error':null};}catch(_0x34f550){return{'data':null,'error':_0x34f550 instanceof EBaaSError?_0x34f550:new EBaaSError(_0x34f550 instanceof Error?_0x34f550['message']:_0x4cc340(-0x19b,-0x185),0x0,_0x34f550)};}}async['deleteBucket'](_0x2980d2){function _0x150d64(_0x55243b,_0x1e49fa){return _0x46d3(_0x55243b-0x68,_0x1e49fa);}try{const response=await this['httpClient']['delete'](_0x150d64(0x1f8,0x1f4)+_0x2980d2);return{'data':response['data'],'error':null};}catch(_0x2bce25){return{'data':null,'error':_0x2bce25 instanceof EBaaSError?_0x2bce25:new EBaaSError(_0x2bce25 instanceof Error?_0x2bce25[_0x150d64(0x2c4,0x2ca)]:'Failed\x20to\x20delete\x20bucket',0x0,_0x2bce25)};}}async['getUsage'](){function _0x44d3b4(_0x2e8d1e,_0x152b56){return _0x46d3(_0x2e8d1e-0xcf,_0x152b56);}try{const response=await this[_0x44d3b4(0x282,0x2df)]['get'](_0x44d3b4(0x2d7,0x30d));return{'data':response['data'],'error':null};}catch(_0x47d104){return{'data':null,'error':_0x47d104 instanceof EBaaSError?_0x47d104:new EBaaSError(_0x47d104 instanceof Error?_0x47d104['message']:_0x44d3b4(0x224,0x1ae),0x0,_0x47d104)};}}}class EventManager{constructor(){function _0x13c229(_0x81c0a8,_0x265b52){return _0x46d3(_0x81c0a8- -0x332,_0x265b52);}this['events']=new Map(),this[_0x13c229(-0x1cd,-0x15f)]=0xa;}['on'](_0x961cd2,_0x315750){function _0x16956e(_0x104046,_0x34d592){return _0x46d3(_0x104046- -0x9b,_0x34d592);}!this[_0x16956e(0x1bf,0x137)][_0x16956e(0x136,0x155)](_0x961cd2)&&this['events']['set'](_0x961cd2,new Set()),this[_0x16956e(0x1bf,0x1ed)]['get'](_0x961cd2)[_0x16956e(0x173,0x169)](_0x315750);}[_0x294921(0xb4,0x2e)](_0x31e2c2,_0x66f0c0){function _0xf81f7f(_0x473ff8,_0x2bcf42){return _0x46d3(_0x473ff8- -0x71,_0x2bcf42);}if(!this['events']['has'](_0x31e2c2))return;const _0xe04138=this[_0xf81f7f(0x1e9,0x256)][_0xf81f7f(0x1be,0x1ba)](_0x31e2c2);_0x66f0c0?_0xe04138[_0xf81f7f(0x113,0x103)](_0x66f0c0):_0xe04138['clear'](),_0xe04138[_0xf81f7f(0x1cd,0x238)]===0x0&&this[_0xf81f7f(0x1e9,0x216)][_0xf81f7f(0x113,0x136)](_0x31e2c2);}['emit'](_0x1459c5,..._0x32483e){if(!this[_0x2d89ff(0x5be,0x541)]['has'](_0x1459c5))return![];const _0x58ebb4=this[_0x2d89ff(0x5be,0x5df)][_0x2d89ff(0x593,0x510)](_0x1459c5);function _0x2d89ff(_0x29f04f,_0x219d19){return _0x46d3(_0x29f04f-0x364,_0x219d19);}for(const _0xf74873 of _0x58ebb4){try{_0xf74873(..._0x32483e);}catch(_0x5431b5){console['error']('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x1459c5+'\x22:',_0x5431b5);}}return _0x58ebb4[_0x2d89ff(0x5a2,0x5f7)]>0x0;}['removeAllListeners'](_0x32bded){function _0x5e0fc3(_0x5e34c0,_0xd8eb19){return _0x46d3(_0x5e34c0- -0x308,_0xd8eb19);}_0x32bded?this[_0x5e0fc3(-0xae,-0x97)]['delete'](_0x32bded):this['events']['clear']();}['listenerCount'](_0x260b12){function _0x8121ec(_0x537a69,_0x4d4b36){return _0x46d3(_0x537a69-0x3b3,_0x4d4b36);}return this['events'][_0x8121ec(0x5e2,0x5ff)](_0x260b12)?.['size']??0x0;}['eventNames'](){function _0x2695c3(_0x276d07,_0x4bd95b){return _0x46d3(_0x276d07-0x1a1,_0x4bd95b);}return Array['from'](this['events'][_0x2695c3(0x326,0x3a4)]());}['listeners'](_0x780f1c){function _0x55c835(_0x563d3e,_0x48c971){return _0x46d3(_0x48c971- -0xf,_0x563d3e);}return Array[_0x55c835(0x2a8,0x226)](this[_0x55c835(0x22f,0x24b)][_0x55c835(0x24e,0x220)](_0x780f1c)??[]);}[_0x294921(0x46,0x6e)](_0x31eccf,_0x50ec08){this['on'](_0x31eccf,_0x50ec08);}['removeListener'](_0x3701e3,_0x32b89f){this['off'](_0x3701e3,_0x32b89f);}['once'](_0x4b9d4f,_0x233769){const _0x126db7=(..._0x473e96)=>{this['off'](_0x4b9d4f,_0x126db7),_0x233769(..._0x473e96);};this['on'](_0x4b9d4f,_0x126db7);}['prependListener'](_0x5ab693,_0x4de130){this['on'](_0x5ab693,_0x4de130);}[_0x294921(0x7b,0x33)](_0x4e75a8,_0x4139c6){const _0x3f9cb6=(..._0x4e63cd)=>{this['off'](_0x4e75a8,_0x3f9cb6),_0x4139c6(..._0x4e63cd);};this['on'](_0x4e75a8,_0x3f9cb6);}[_0x294921(0x58,-0xc)](_0x382185){this[_0x3319f4(0x23c,0x28f)]=_0x382185;function _0x3319f4(_0x373cca,_0x4ee421){return _0x46d3(_0x4ee421-0x12a,_0x373cca);}return this;}[_0x294921(-0x6e,-0x1b)](){function _0xd7a4e2(_0x46903e,_0x10b347){return _0x46d3(_0x46903e-0xe5,_0x10b347);}return this[_0xd7a4e2(0x24a,0x2ac)];}['rawListeners'](_0x452110){return this['listeners'](_0x452110);}}function _0x294921(_0x1e8750,_0x5d58be){return _0x46d3(_0x5d58be- -0x1ae,_0x1e8750);}class RealtimeChannel extends EventManager{constructor(_0x13cb2f,_0x3034d0){super(),this[_0x4d77d0(0x3b1,0x343)]=![],this[_0x4d77d0(0x3b5,0x36b)]=_0x4d77d0(0x349,0x327);function _0x4d77d0(_0x1fce69,_0x530a01){return _0x46d3(_0x1fce69-0x1cf,_0x530a01);}this['subscriptions']=new Map(),this['topic']=_0x13cb2f,this[_0x4d77d0(0x328,0x2de)]=_0x3034d0;}['subscribe'](_0x3b65f9){!this[_0x18472d(-0xda,-0xcb)]&&(this['joinedOnce']=!![],this['_join']());_0x3b65f9&&this['on'](_0x18472d(-0x17f,-0x155),_0x3b65f9);function _0x18472d(_0x15d3e8,_0x233e15){return _0x46d3(_0x233e15- -0x2ad,_0x15d3e8);}return this;}['onPostgresChanges'](filter,_0xf4243b){const _0x138da1='postgres_changes:'+JSON['stringify'](filter);this['on'](_0x138da1,_0xf4243b);function _0x2f1936(_0x1e3638,_0x288791){return _0x46d3(_0x288791-0x124,_0x1e3638);}const _0x11ef56={'unsubscribe':()=>{function _0x2736d7(_0x44a4a8,_0x15fc7f){return _0x46d3(_0x15fc7f- -0x35c,_0x44a4a8);}this['off'](_0x138da1,_0xf4243b),this[_0x2736d7(-0x156,-0x168)]['delete'](_0x138da1);}};return this[_0x2f1936(0x335,0x318)]['set'](_0x138da1,_0x11ef56),this['socket']?.[_0x2f1936(0x2f5,0x33f)]&&this['state']==='joined'&&this['socket']['emit']('subscribe_postgres_changes',{'topic':this[_0x2f1936(0x2f3,0x342)],'filter':filter,'ref':this['makeRef']()}),_0x11ef56;}[_0x294921(0x7d,0x35)](filter,_0x5f17bf){const _0x47bf8b='broadcast:'+JSON['stringify'](filter);this['on'](_0x47bf8b,_0x5f17bf);const _0x3734b9={'unsubscribe':()=>{this[_0x42bd34(0x42a,0x467)](_0x47bf8b,_0x5f17bf);function _0x42bd34(_0x51ea37,_0x25644d){return _0x46d3(_0x51ea37-0x24e,_0x25644d);}this['subscriptions']['delete'](_0x47bf8b);}};this['subscriptions'][_0x146f85(-0x274,-0x1ed)](_0x47bf8b,_0x3734b9);function _0x146f85(_0x2ac0fa,_0x35725a){return _0x46d3(_0x35725a- -0x360,_0x2ac0fa);}return _0x3734b9;}[_0x294921(-0x7e,-0x20)](filter,_0x1682ac){const _0x4e3ec9=_0x528273(-0x1c8,-0x1f8)+JSON['stringify'](filter);this['on'](_0x4e3ec9,_0x1682ac);function _0x528273(_0x30bdde,_0x3ab3ce){return _0x46d3(_0x3ab3ce- -0x3a2,_0x30bdde);}const _0x1275f2={'unsubscribe':()=>{this['off'](_0x4e3ec9,_0x1682ac);function _0x5df842(_0xc9cd97,_0x5b7dc1){return _0x46d3(_0xc9cd97- -0x28a,_0x5b7dc1);}this['subscriptions'][_0x5df842(-0x106,-0x176)](_0x4e3ec9);}};return this[_0x528273(-0x225,-0x1ae)][_0x528273(-0x24c,-0x22f)](_0x4e3ec9,_0x1275f2),_0x1275f2;}[_0x294921(0x2e,0x7b)](_0x5a4ba2){return new Promise(_0x179ca5=>{function _0x2714ab(_0x581ce4,_0x35df6b){return _0x46d3(_0x581ce4-0x163,_0x35df6b);}this['socket']?.[_0x2714ab(0x37e,0x305)]&&this[_0x2714ab(0x349,0x30c)]==='joined'?(this[_0x2714ab(0x2bc,0x2b8)]['emit'](_0x2714ab(0x34d,0x364),{'topic':this[_0x2714ab(0x381,0x353)],'event':_0x5a4ba2['event'],'payload':_0x5a4ba2,'ref':this[_0x2714ab(0x33e,0x38d)]()}),_0x179ca5('ok')):_0x179ca5(_0x2714ab(0x2d8,0x35f));});}['track'](_0x75e26d){return new Promise(_0x14353b=>{function _0x433747(_0x2527a1,_0x184cdd){return _0x46d3(_0x2527a1-0xbc,_0x184cdd);}this['socket']?.['connected']&&this[_0x433747(0x2a2,0x2ef)]===_0x433747(0x263,0x233)?(this['socket']['emit'](_0x433747(0x213,0x254),{'topic':this[_0x433747(0x2da,0x30c)],'event':'track','payload':_0x75e26d,'ref':this[_0x433747(0x297,0x265)]()}),_0x14353b('ok')):_0x14353b('error');});}['untrack'](){return new Promise(_0x16f6ee=>{function _0x2226f6(_0x164dc0,_0x1f739b){return _0x46d3(_0x164dc0- -0x395,_0x1f739b);}this['socket']?.[_0x2226f6(-0x17a,-0xf9)]&&this['state']===_0x2226f6(-0x1ee,-0x271)?(this['socket'][_0x2226f6(-0x15c,-0x122)](_0x2226f6(-0x23e,-0x2c6),{'topic':this['topic'],'event':'untrack','ref':this['makeRef']()}),_0x16f6ee('ok')):_0x16f6ee(_0x2226f6(-0x220,-0x21d));});}[_0x294921(0x7c,0xa3)](){return new Promise(_0x1a6bd4=>{function _0x195c7c(_0x1ec16b,_0x327db0){return _0x46d3(_0x327db0-0xe2,_0x1ec16b);}this['state']=_0x195c7c(0x2ee,0x2cb),this['subscriptions'][_0x195c7c(0x261,0x241)](_0x4ce858=>{function _0x10ea1c(_0xaafdf4,_0x195b57){return _0x46d3(_0xaafdf4- -0x196,_0x195b57);}_0x4ce858[_0x10ea1c(0xbb,0xb3)]();}),this['subscriptions'][_0x195c7c(0x2c0,0x2d1)](),this['socket']?.[_0x195c7c(0x32e,0x2fd)]&&this['socket']['emit'](_0x195c7c(0x354,0x32e),{'topic':this[_0x195c7c(0x284,0x300)],'ref':this[_0x195c7c(0x2de,0x2bd)]()}),this[_0x195c7c(0x31b,0x2c8)]='closed',this[_0x195c7c(0x2f2,0x2ee)](),_0x1a6bd4('ok');});}[_0x294921(0xa6,0x9c)](){function _0xe8a895(_0x5ccea9,_0xb96e3b){return _0x46d3(_0xb96e3b- -0x17d,_0x5ccea9);}if(this[_0xe8a895(0x35,0x69)]==='leaving')return;this['state']=_0xe8a895(0x73,0xce),this[_0xe8a895(-0x50,-0x24)]?.['connected']&&(this['socket']['emit']('join',{'topic':this['topic'],'ref':this['makeRef']()}),setTimeout(()=>{function _0x437638(_0x498426,_0x429068){return _0x46d3(_0x429068- -0x2e7,_0x498426);}this[_0x437638(-0x181,-0x101)]==='joining'&&(this[_0x437638(-0x186,-0x101)]=_0x437638(-0x13b,-0x140),this[_0x437638(-0x40,-0xae)]('status',_0x437638(-0xdc,-0xde)));},0x64));}['_rejoin'](){function _0x41875c(_0x37a692,_0x2bc96d){return _0x46d3(_0x37a692-0x220,_0x2bc96d);}this[_0x41875c(0x402,0x38c)]&&(this['_join'](),this[_0x41875c(0x414,0x3f8)]['forEach']((_0x2fa2b8,_0x45c10a)=>{function _0x1d9a00(_0x412894,_0x448faf){return _0x46d3(_0x412894- -0x34a,_0x448faf);}if(_0x45c10a['startsWith'](_0x1d9a00(-0x1de,-0x1a6))){const filter=JSON['parse'](_0x45c10a['replace']('postgres_changes:',''));this['socket']?.[_0x1d9a00(-0x111,-0x8c)](_0x1d9a00(-0x148,-0xf6),{'topic':this['topic'],'filter':filter,'ref':this['makeRef']()});}}));}['_trigger'](_0x2760fc,_0x4de603){if(_0x2760fc==='postgres_changes'){const _0x1b9144=_0x139743(0x4b8,0x52a)+JSON['stringify'](_0x4de603[_0x139743(0x590,0x616)]||{});this[_0x139743(0x585,0x5e3)](_0x1b9144,_0x4de603);}else{if(_0x2760fc===_0x139743(0x536,0x552)){const _0x58681c='broadcast:'+JSON[_0x139743(0x4a8,0x458)]({'event':_0x4de603[_0x139743(0x4db,0x482)]});this['emit'](_0x58681c,_0x4de603);}else{if(_0x2760fc===_0x139743(0x4a3,0x461)){const _0x406293='presence:'+JSON['stringify']({'event':_0x4de603['event']});this['emit'](_0x406293,_0x4de603);}}}function _0x139743(_0x20b8cd,_0x2be4bb){return _0x46d3(_0x20b8cd-0x34c,_0x2be4bb);}this['emit'](_0x2760fc,_0x4de603);}[_0x294921(0x10,0x56)](_0x105763){function _0x2b6e32(_0x4b4001,_0x5a6a99){return _0x46d3(_0x5a6a99- -0x3aa,_0x4b4001);}this[_0x2b6e32(-0x149,-0x1c4)]=_0x105763;let status;switch(_0x105763){case'joined':status='SUBSCRIBED';break;case'errored':status='CHANNEL_ERROR';break;case'closed':status='CLOSED';break;default:return;}this[_0x2b6e32(-0x13d,-0x171)]('status',status);}[_0x294921(0x8,0x2d)](){function _0x4a67f0(_0x1b4a18,_0x38e669){return _0x46d3(_0x1b4a18-0x297,_0x38e669);}return Math[_0x4a67f0(0x4f6,0x582)]()['toString'](0x24)['substring'](0x2,0xf);}[_0x294921(0x27,0x80)](){return this['state'];}}function getEnvironment(){function _0x20683f(_0x3986e9,_0x3a81cd){return _0x46d3(_0x3986e9- -0xcd,_0x3a81cd);}if(typeof navigator!==_0x20683f(0x105,0x122)&&navigator['product']==='ReactNative')return _0x20683f(0xa0,0x7e);if(typeof window!==_0x20683f(0x105,0x102)&&typeof document!==_0x20683f(0x105,0x190))return _0x20683f(0x14d,0xc8);if(typeof global!==_0x20683f(0x105,0x12b)&&typeof process!==_0x20683f(0x105,0xc7)&&process[_0x20683f(0xde,0x114)]?.[_0x20683f(0x189,0x181)])return _0x20683f(0x189,0x1eb);return _0x20683f(0x14d,0x12c);}function _0x1ed3(){const _0x297fbe=['C29JA2v0qwrHChrLCG','z2v0twf4tgLZDgvUzxjZ','B3b0Aw9UCW','nuL4tgv6Bq','BxvSDgLWyxj0l2zVCM0Tzgf0yq','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','zgvSzxrLt3b0Aw9UCW','l3nPz24','C2vSzwn0','Ec10B3rHBc1JB3vUDa','Aw52B2TL','DMfSDwvZ','lMrLC2m','BgvUz3rO','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','l2f1DgGVDJeVDxnLCG','C2v0twf4tgLZDgvUzxjZ','CNbJ','CMvTB3zLq3vZDg9Trgf0ywjHC2u','y29UzMLN','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','AM9PBMvK','ota5mtG2m2TyrKz3za','mta0DfPZwvn0','ChjLC2vUy2u6','DMvYC2LVBNm','CMvHBhrPBwu','y29UBMvJDf9LCNjVCG','D2vIC29JA2v0','AgfUzgXLrxjYB3i','Aw5Zzxj0','C3rVCMfNzq','yxbWzw5K','Ahr0CenSAwvUDa','zgvWBg95','Bw92zq','BgLZDa','p29WzxjHDgLVBJ1PBNnLCNq','z2v0q29UBMvJDgLVBLn0yxrL','Cg9ZDgDYzxnFy2HHBMDLCW','zgLZy29UBMvJDgvK','z2XVyMfS','CMvQzwn0','yM9KEq','DxbKyxrLrw52','DxbKyxrL','D29YA3nWywnLswq','zgf0yq','C2v0sxrLBq','B3bLCMf0B3i','ChvZAa','icHtDgf0Dxm6ia','Cgf0y2G','rMfPBgvKihrVigrVD25SB2fKigzPBgu','yNvJA2v0swq','DxnL','DMfSDwu','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','y29WEq','Aw5KzxGUDhm','nJy3nZm0D3z2DhPq','CMvTB3zLqxv0AfrVA2vU','C2v0DxbjBNrLCMnLChrVCNm','AgfZ','Dw5KzwzPBMvK','y2XPzw50','lMfZyW','zMLSzq','AxnezwXLDgu','y29UBMvJDgLUzW','C29JA2v0t3b0Aw9UCW','CMvMCMvZAf90B2TLBG','DgLTzw91Da','BwfRzvjLzG','B2zM','rMfPBgvKihrVigDLDcbIDwnRzxq','zw50CNLWB2LUDa','y2fJAgvdB250CM9S','rMfPBgvKihrVigrLCgXVEsbMDw5JDgLVBG','ChjLCgvUze9Uy2vmAxn0zw5LCG','AM9PBMvKt25Jzq','B25cCM9HzgnHC3q','DgvZDenVBM5Ly3rPB24','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','C3rHDgu','C29YDej5','AwXPA2u','BgvHDMLUzW','yNjVywrJyxn0','rNvUy3rPB24GAw52B2nHDgLVBIbMywLSzwq','CMvZCg9UC2u','l2f1DgGVDJeVCMvZzxqTCgfZC3DVCMq','Aw5PDgLHBgL6zq','y2XLyxi','D2fYBG','zgf0ywjHC2u','z2v0tg9NCW','zg93BMXVywq','C3vIC2nYAxb0Aw9UCW','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSlIbqyxjHifjLywn0ie5HDgL2zsWGAw5ZDgfSztOGBNbTigLUC3rHBgWGC29JA2v0lMLVlwnSAwvUDa','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','AgfZq3vZDg9Trgf0ywjHC2u','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','AM9PBG','y3vYCMvUDfnJAgvTyq','zw50CMLLCW','DgfIBgu','z2v0v29YA3nWywnLswq','DxbKyxrLvxnLCG','rMfPBgvKihrVigXPC3qGzNvUy3rPB25Z','zgLZy29UBMvJDa','C3rHDhvZvgv4Da','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','C2LNBKLU','x3nLDfn0yxrL','p29WzxjHDgLVBJ11ChnLCNq','Bg9N','AgfUzgXLqxv0AevYCM9Y','l3n0B3jHz2uVDxnHz2u','u1vcu0nssujfra','AxnvC2LUz0n1C3rVBurHDgfIyxnL','x3rYAwDNzxi','CMvTB3zLqwXStgLZDgvUzxjZ','yxbPs2v5','ywrK','CMvTB3zLq2HHBM5LBa','rMfPBgvKihrVihvWBg9HzcbMAwXL','CxvLCNK','DxbKyxrLt3b0Aw9UCW','ntG0odu0nhr1Eej4DW','p29WzxjHDgLVBJ1ZzwXLy3q','z2v0twv0CMLJCW','zxHLy3v0zq','C2vZC2LVBG','B3bLCMf0Aw9U','zMLSDgvYCW','yNjVD3nLCG','y29UBMvJDgvK','ywrKtgLZDgvUzxi','l2z1BMn0Aw9UCY92ms8','Dg9WAwm','y29UBMvJDa','y3jLzgvUDgLHBhm','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','Aw5PDgLHBgL6zun1C3rVBurHDgfIyxnL','C2v0u2vZC2LVBG','CMvTB3zLqwXSq2HHBM5LBhm','l2XVz3m','CgvYAw9K','Bwv0ywrHDge','z3rL','C2vUza','Cg9ZDgDYzxnqB3j0','ms4XlJG','DhjHBNnMB3jT','C29JA2v0lMLVlwnSAwvUDcbUB3qGyxzHAwXHyMXL','z2v0u3rHDgu','z2v0','zwjHyxmUyxv0Ac5ZzxnZAw9U','l2zPBgvZ','x2DLDfnVy2TLDa','z2v0rMLSzuLUzM8','DMvYAwz5','zNjVBq','CMvTB3zL','C2v0qxv0AfrVA2vU','C2nOzw1H','zw1PDa','zxHLy3v0zvf1zxj5','yMfZzvvsta','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','p3vWC2vYDd10CNvL','C2L6zq','CMvJB25Uzwn0qxr0zw1WDhm','y29UDgvUDfr5Cgu','mZq3mJe0z3HRCg1e','y2HHBM5LBa','yxv0Aa','zMLSDgvY','zgvMyxvSDhm','y2XLyxjtzxnZAw9U','DxnLCG','y29TBw9U','y3jLyxrL','x2PVAw4','AM9PBMLUzW','BgvHDMu','DxbKyxrLrgf0yq','B3jKzxi','Dgv4Dc9WBgfPBG','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','Dw5ZDwjZy3jPyMu','BM93','l2zPBgvZl21VDMu','mtbOs0HWvuK','l2zPBgvZlW','BM9Kzq','zgv0ywLSCW','z2v0vxnLCG','y2HHBM5LBhm','zxzLBNrZ','Aw1WB3j0twfW','BwvZC2fNzq','CMvZzxrqyxnZD29Yza','zgv0zwn0zwrdB25MAwC','CMfUzg9T','zw52','ChjLzMvY','BhrL','C3rHy2S','Bwf0y2G','ChvIBgLJ','y3vYCMvUDfnLC3nPB24','BgLTAxq','rMfPBgvKihrVigDLDcbMDw5JDgLVBG','Bgv2zwW','rMfPBgvKihrVignVChKGzMLSzq','AgvHCNrIzwf0sw50zxj2ywW','rMfPBgvKihrVigDLDcbZDg9YywDLihvZywDL','DxjS','ChjLC2vUy2u','C3rHDhvZ','C29JA2v0','AgvHzgvYCW','C2v0u2vZC2LVBKLUDgvYBMfS','C3rYAw5NAwz5','ndi1mZfcvNflqxq','BMfTzq','zM9YrwfJAa','Chv0','yxv0B0rLDgvJDen1C3rVBurHDgfIyxnL','BwfW','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','z2v0u3rHDhvZ','Bwf4tgLZDgvUzxjZ','y3jLyxrLqNvJA2v0','B2zMC2v0','zgv0zwn0q3vZDg9Trgf0ywjHC2u','CMfUz2u','BgLZDej1y2TLDhm','vw5ZDxbWB3j0zwqGsfruucbTzxrOB2q6ia','Cg9ZDgDYzxnFy2HHBMDLCZO','CMvHy3qTBMf0AxzL','C2LUz2XL','mZaWmda2mdbLB3jLAfC','z2v0rgv0zwn0zwrdB25MAwC','Cg9ZDa','CMvZDfvYBa','C2v0','Cg9ZDgDYzxnty2HLBwe','zxjYB3i','y29Kzq','x3jLAM9PBG','BgLRzq','otGXnJuZBfHpEKX1','y2XVC2vK','C29JA2v0lMLVlwnSAwvUDa','CMvZB2X2zq','Cg9ZDgDYzxniB3n0','C3bSAxq','y29UDgfPBNm','B25bDxrOu3rHDgvdAgfUz2u','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','uhjLzMvY','qMvHCMvYia','zgvSzxrL','A2v5CW','C3nSrw5HyMXLza','C2v0v29YA3nWywnLswq','y29UBMvJDgLVBLn0yxrL','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','CMvTB3zLsxrLBq','zgf0yufYCMf5','rMfPBgvKihrVihjLBw92zsbMAwXLCW','Dg9tDhjPBMC','B25qCMvZzw5Jzq','zxzLBNq','l3n0B3jHz2uVyNvJA2v0CY8','y29SDw1U'];_0x1ed3=function(){return _0x297fbe;};return _0x1ed3();}function isSocketIOAvailable(){function _0xb8216(_0x3ec052,_0x247668){return _0x46d3(_0x3ec052- -0x390,_0x247668);}try{const _0x1be534=getEnvironment();switch(_0x1be534){case'node':return typeof require!=='undefined'&&require[_0xb8216(-0x214,-0x26e)]&&!!require['resolve'](_0xb8216(-0x215,-0x18b));case'browser':if(typeof globalThis!==_0xb8216(-0x1be,-0x1e3)&&'io'in globalThis)return!![];return typeof require!==_0xb8216(-0x1be,-0x1f9)&&require['resolve']&&!!require['resolve']('socket.io-client');case'react-native':try{return typeof require!==_0xb8216(-0x1be,-0x1de)&&!!require(_0xb8216(-0x215,-0x1a4));}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x59fed0(_0x15c0da,_0x269a52){return _0x46d3(_0x269a52- -0x203,_0x15c0da);}try{if(typeof require!=='undefined')return require(_0x59fed0(-0x99,-0x88));if(typeof globalThis!=='undefined'&&'io'in globalThis)return{'io':globalThis['io']};throw new Error(_0x59fed0(0x1e,0x2a));}catch(_0x369ce2){throw new Error('Socket.io-client\x20não\x20está\x20disponível\x20neste\x20ambiente.\x20Para\x20usar\x20funcionalidades\x20de\x20realtime,\x20instale:\x20npm\x20install\x20socket.io-client');}}class WebSocketAdapter{constructor(){function _0x57cbec(_0x52c14f,_0x14ef29){return _0x46d3(_0x14ef29- -0x4a,_0x52c14f);}this[_0x57cbec(0x15b,0x10f)]=null;}async[_0x294921(0xd1,0x71)](_0x52695f,_0x23ca10){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:_0x624c6b}=getSocketIO();return new Promise((_0x361b3f,_0x547b12)=>{function _0x581aec(_0x18fad5,_0x1983c3){return _0x46d3(_0x1983c3-0x36d,_0x18fad5);}this[_0x581aec(0x4f1,0x4c6)]=_0x624c6b(_0x52695f,_0x23ca10),this[_0x581aec(0x47d,0x4c6)]['on']('connect',()=>_0x361b3f()),this['socket']['on'](_0x581aec(0x4a1,0x51a),_0xbbd33d=>_0x547b12(_0xbbd33d));});}['disconnect'](){function _0x31b20c(_0x5b75a0,_0x1c061f){return _0x46d3(_0x1c061f-0x23b,_0x5b75a0);}this[_0x31b20c(0x40e,0x394)]&&(this[_0x31b20c(0x384,0x394)][_0x31b20c(0x4a7,0x43b)](),this['socket']=null);}[_0x294921(0x56,0x8b)](_0x4cd7fb,data){function _0x104e5c(_0x3f699d,_0x30a739){return _0x46d3(_0x3f699d- -0x31d,_0x30a739);}this[_0x104e5c(-0x1c4,-0x186)]?.[_0x104e5c(-0xe4,-0xb1)](_0x4cd7fb,data);}['on'](_0x13e26b,_0x1eaf32){function _0x45520d(_0x26ba07,_0x15a03d){return _0x46d3(_0x15a03d- -0xc,_0x26ba07);}this[_0x45520d(0x17e,0x14d)]?.['on'](_0x13e26b,_0x1eaf32);}[_0x294921(-0x5b,0x2e)](_0x159da3,_0x5e66b2){function _0x4c5cba(_0x24ff0e,_0x314e85){return _0x46d3(_0x24ff0e-0x23f,_0x314e85);}_0x5e66b2?this[_0x4c5cba(0x398,0x311)]?.[_0x4c5cba(0x41b,0x3ae)](_0x159da3,_0x5e66b2):this[_0x4c5cba(0x398,0x409)]?.['off'](_0x159da3);}get['connected'](){return this['socket']?.['connected']??![];}}class ReactNativeSocketAdapter{constructor(){this['socket']=null;}async['connect'](_0x4e7316,_0x2c64a6){function _0x1fa6e2(_0x115434,_0x4614f8){return _0x46d3(_0x4614f8-0xce,_0x115434);}if(!isSocketIOAvailable())throw new Error(_0x1fa6e2(0x293,0x2c3));const {io:_0x9aebf7}=getSocketIO();return new Promise((_0x215ec1,_0x10b4f9)=>{this[_0x27a83a(0x47c,0x478)]=_0x9aebf7(_0x4e7316,{..._0x2c64a6,'transports':['websocket'],'upgrade':![],'autoConnect':!![]});function _0x27a83a(_0x2b8e85,_0x25d461){return _0x46d3(_0x2b8e85-0x323,_0x25d461);}this[_0x27a83a(0x47c,0x418)]['on']('connect',()=>_0x215ec1()),this['socket']['on'](_0x27a83a(0x4d0,0x500),_0x497fb9=>_0x10b4f9(_0x497fb9));});}['disconnect'](){function _0x284ac6(_0x1a4433,_0x5a008a){return _0x46d3(_0x1a4433- -0x280,_0x5a008a);}this['socket']&&(this['socket'][_0x284ac6(-0x80,-0x93)](),this['socket']=null);}['emit'](_0x182934,data){function _0x119f23(_0x530f0a,_0x2d1942){return _0x46d3(_0x530f0a- -0x1c0,_0x2d1942);}this[_0x119f23(-0x67,-0xe7)]?.['emit'](_0x182934,data);}['on'](_0x4439bb,_0x583b26){this['socket']?.['on'](_0x4439bb,_0x583b26);}[_0x294921(0x1a,0x2e)](_0x483985,_0x319422){function _0x5390a5(_0x261e1d,_0x28ccdb){return _0x46d3(_0x28ccdb- -0x20,_0x261e1d);}_0x319422?this['socket']?.['off'](_0x483985,_0x319422):this[_0x5390a5(0xf6,0x139)]?.['off'](_0x483985);}get[_0x294921(0xe6,0x6d)](){function _0x1ff5ab(_0x44e9c8,_0x45a6db){return _0x46d3(_0x44e9c8-0x122,_0x45a6db);}return this[_0x1ff5ab(0x27b,0x223)]?.['connected']??![];}}function createSocketAdapter(){const _0x484206=getEnvironment();switch(_0x484206){case'react-native':return new ReactNativeSocketAdapter();case'browser':case'node':default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x489ace,_0x46a5ab,_0x381b38={}){this[_0x56d7bd(0x141,0x169)]=null,this[_0x56d7bd(0x241,0x1dc)]=new Map(),this[_0x56d7bd(0x170,0x15c)]='disconnected',this[_0x56d7bd(0x227,0x23c)]=0x0,this['maxReconnectAttempts']=0x5,this[_0x56d7bd(0x13e,0x110)]=_0x489ace;function _0x56d7bd(_0x98d8e3,_0x34e347){return _0x46d3(_0x98d8e3- -0x18,_0x34e347);}this['apiKey']=_0x46a5ab,this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x381b38},this['socketAdapter']=createSocketAdapter();}['connect'](){return new Promise(async(_0x14b604,_0x5b7014)=>{if(this['socketAdapter'][_0x498830(0x5e0,0x639)]){_0x14b604();return;}this[_0x498830(0x54d,0x545)]=_0x498830(0x59c,0x52f);function _0x498830(_0x3ebb3c,_0x3b6ec0){return _0x46d3(_0x3ebb3c-0x3c5,_0x3b6ec0);}try{await this[_0x498830(0x557,0x5a9)][_0x498830(0x5e4,0x5dc)](this['url'],{'auth':{'apikey':this[_0x498830(0x5d2,0x64e)]},'transports':[_0x498830(0x573,0x593)],'reconnection':!![],'reconnectionDelay':this[_0x498830(0x559,0x501)]['reconnectInterval'],'reconnectionAttempts':this[_0x498830(0x559,0x51d)]['maxReconnectAttempts'],...this['options'][_0x498830(0x59d,0x577)]}),this[_0x498830(0x51e,0x58b)]=this[_0x498830(0x557,0x4cf)]['socket'],this['socketAdapter']['on'](_0x498830(0x5e4,0x65d),()=>{this['connectionState']=_0x1def2a(0x3d1,0x357),this['reconnectAttempts']=0x0;function _0x1def2a(_0xf75bce,_0x2118d3){return _0x46d3(_0x2118d3-0x13c,_0xf75bce);}this['setupHeartbeat'](),_0x14b604();}),this[_0x498830(0x557,0x592)]['on'](_0x498830(0x5c5,0x5de),()=>{function _0x276738(_0x1a8c40,_0x1aef93){return _0x46d3(_0x1aef93- -0x3cd,_0x1a8c40);}this[_0x276738(-0x21c,-0x245)]='disconnected',this['channels'][_0x276738(-0x1ef,-0x26e)](channel=>{channel['_setState']('closed');});}),this[_0x498830(0x557,0x4ec)]['on'](_0x498830(0x572,0x5b4),_0x313c19=>{this['connectionState']='error',this[_0x1be2dd(0x44a,0x46a)]++;function _0x1be2dd(_0x1603dd,_0x2b781a){return _0x46d3(_0x2b781a-0x22b,_0x1603dd);}this[_0x1be2dd(0x470,0x46a)]>=this['maxReconnectAttempts']&&_0x5b7014(new Error('Failed\x20to\x20connect\x20after\x20'+this['maxReconnectAttempts']+'\x20attempts:\x20'+_0x313c19['message']));}),this['socketAdapter']['on']('reconnect',()=>{function _0x364fcf(_0x3ab677,_0x4eb0fc){return _0x46d3(_0x4eb0fc- -0x2f8,_0x3ab677);}this['connectionState']=_0x364fcf(-0xe6,-0xdd),this['reconnectAttempts']=0x0,this['channels']['forEach'](channel=>{function _0x894248(_0x4e7040,_0xf4d9d9){return _0x46d3(_0x4e7040-0xef,_0xf4d9d9);}channel[_0x894248(0x266,0x218)]();});}),this['socketAdapter']['on']('postgres_changes',_0x25751f=>{const channel=this[_0x4a3deb(0x401,0x47f)]['get'](_0x25751f['topic']);function _0x4a3deb(_0x3bef47,_0x54eea1){return _0x46d3(_0x54eea1-0x226,_0x3bef47);}channel&&channel['_trigger'](_0x4a3deb(0x3b7,0x3df),_0x25751f);}),this['socketAdapter']['on'](_0x498830(0x5af,0x5c8),_0x36f63f=>{function _0xa42cd7(_0x4025f7,_0x144da8){return _0x46d3(_0x4025f7-0xb0,_0x144da8);}const channel=this['channels']['get'](_0x36f63f[_0xa42cd7(0x2ce,0x268)]);channel&&channel[_0xa42cd7(0x2bb,0x2a2)](_0xa42cd7(0x29a,0x261),_0x36f63f);}),this[_0x498830(0x557,0x511)]['on']('presence',_0x4edb06=>{function _0x190301(_0x21727d,_0x4498e7){return _0x46d3(_0x4498e7-0x2f6,_0x21727d);}const channel=this[_0x190301(0x562,0x54f)][_0x190301(0x585,0x525)](_0x4edb06['topic']);channel&&channel[_0x190301(0x4c7,0x501)]('presence',_0x4edb06);});}catch(_0x4949a9){this['connectionState']='error',_0x5b7014(_0x4949a9);}});}[_0x294921(0x4c,0x52)](){this['socketAdapter']&&(this['socketAdapter']['disconnect'](),this['socket']=null);function _0x41c845(_0x115318,_0x3b80d2){return _0x46d3(_0x3b80d2-0x101,_0x115318);}this['connectionState']='disconnected',this['channels'][_0x41c845(0x2ec,0x2f0)]();}[_0x294921(0x10d,0x94)](_0x5e8092){if(this['channels']['has'](_0x5e8092))return this[_0x133a79(0x2e,-0x1d)][_0x133a79(0x4,0x7b)](_0x5e8092);const channel=new RealtimeChannel(_0x5e8092,this['socket']);function _0x133a79(_0x143f60,_0x54ca7b){return _0x46d3(_0x143f60- -0x22b,_0x54ca7b);}return this['channels'][_0x133a79(-0xb8,-0xfd)](_0x5e8092,channel),this[_0x133a79(-0xa3,-0xac)]==='connected'&&channel[_0x133a79(0x1f,0x9b)](),channel;}[_0x294921(0x8a,0x61)](channel){function _0xe21546(_0x4ca9fa,_0x1176cb){return _0x46d3(_0x1176cb-0x189,_0x4ca9fa);}const _0x7c8fb4=channel[_0xe21546(0x41d,0x3a7)];this[_0xe21546(0x3b5,0x3e2)]['has'](_0x7c8fb4)&&(this['channels']['delete'](_0x7c8fb4),channel[_0xe21546(0x43d,0x3da)]());}[_0x294921(0xe3,0x76)](){this['channels'][_0x19dbdd(-0x10e,-0x14f)](channel=>{function _0x47c8b5(_0x343841,_0xfed7d9){return _0x46d3(_0x343841- -0x2d9,_0xfed7d9);}channel[_0x47c8b5(-0x88,-0x73)]();});function _0x19dbdd(_0x5ac880,_0x49ee3f){return _0x46d3(_0x49ee3f- -0x2ae,_0x5ac880);}this['channels']['clear']();}['getChannels'](){function _0x2d7a47(_0x17e078,_0x133eee){return _0x46d3(_0x17e078-0x14,_0x133eee);}return Array['from'](this['channels'][_0x2d7a47(0x1b1,0x179)]());}['isConnected'](){function _0x3728ee(_0x12d254,_0x5cc987){return _0x46d3(_0x5cc987-0x37d,_0x12d254);}return this[_0x3728ee(0x543,0x505)]==='connected'&&this[_0x3728ee(0x4cc,0x50f)][_0x3728ee(0x59b,0x598)];}[_0x294921(0x37,0xa)](){return this['connectionState'];}['onConnectionStateChange'](_0x2ebda7){const _0x2c6761=()=>_0x2ebda7(this['connectionState']);this[_0x4546d1(0x14a,0x10d)]&&(this[_0x4546d1(0x103,0x10d)]['on'](_0x4546d1(0x1d1,0x19a),()=>{this[_0x4d1104(0x547,0x5cf)]=_0x4d1104(0x5da,0x552);function _0x4d1104(_0x3c073b,_0xc92bd2){return _0x46d3(_0x3c073b-0x3bf,_0xc92bd2);}_0x2c6761();}),this[_0x4546d1(0xa9,0x10d)]['on'](_0x4546d1(0x114,0x17b),()=>{function _0xfd843a(_0x12757d,_0x2605bb){return _0x46d3(_0x12757d- -0x3ac,_0x2605bb);}this[_0xfd843a(-0x224,-0x1e6)]=_0xfd843a(-0x1f2,-0x186),_0x2c6761();}),this['socketAdapter']['on'](_0x4546d1(0x164,0x128),()=>{function _0x56b12a(_0x1fa703,_0x33f44e){return _0x46d3(_0x33f44e- -0x1d7,_0x1fa703);}this[_0x56b12a(-0xbf,-0x4f)]=_0x56b12a(-0x1e,-0x62),_0x2c6761();}));function _0x4546d1(_0x57dc30,_0x497bae){return _0x46d3(_0x497bae- -0x85,_0x57dc30);}return()=>{function _0x4e6a6d(_0x595aeb,_0x385e74){return _0x46d3(_0x385e74- -0x37f,_0x595aeb);}this[_0x4e6a6d(-0x1b7,-0x1ed)]&&(this[_0x4e6a6d(-0x171,-0x1ed)][_0x4e6a6d(-0x156,-0x1a3)](_0x4e6a6d(-0x101,-0x160),_0x2c6761),this[_0x4e6a6d(-0x165,-0x1ed)][_0x4e6a6d(-0x1d0,-0x1a3)]('disconnect',_0x2c6761),this['socketAdapter'][_0x4e6a6d(-0x204,-0x1a3)]('connect_error',_0x2c6761));};}['setupHeartbeat'](){if(!this[_0x21bbaf(0x498,0x4e9)][_0x21bbaf(0x534,0x4a9)]||!this[_0x21bbaf(0x53e,0x4e7)])return;function _0x21bbaf(_0x3bbc59,_0x53c663){return _0x46d3(_0x53c663-0x355,_0x3bbc59);}const interval=setInterval(()=>{function _0x122900(_0xacfb5a,_0x5c5ad0){return _0x46d3(_0xacfb5a- -0x20,_0x5c5ad0);}this[_0x122900(0x172,0x16b)]?.[_0x122900(0x1fb,0x20b)]?this[_0x122900(0x172,0x138)][_0x122900(0x219,0x26f)]('heartbeat',{'timestamp':Date[_0x122900(0x232,0x1f0)]()}):clearInterval(interval);},this['options'][_0x21bbaf(0x4e0,0x4a9)]);}[_0x294921(0x28,0x84)](){function _0xa5e03b(_0x5d9589,_0x1aa6a5){return _0x46d3(_0x1aa6a5-0x372,_0x5d9589);}return this[_0xa5e03b(0x4b1,0x4cb)];}}class FunctionsClient{constructor(_0x423a59){this['httpClient']=_0x423a59;}async[_0x294921(-0x77,-0x12)](_0x4bed82,_0x5674fe){function _0x305526(_0x11016d,_0x4998c7){return _0x46d3(_0x4998c7- -0x386,_0x11016d);}try{const _0x423b59=_0x5674fe?.['method']||'POST',headers={'Content-Type':'application/json',..._0x5674fe?.['headers']};let response;const _0x4e155d='/functions/v1/'+_0x4bed82;switch(_0x423b59['toUpperCase']()){case'GET':response=await this['httpClient'][_0x305526(-0xdd,-0x157)](_0x4e155d,{'headers':headers,'params':_0x5674fe?.['body']});break;case'POST':response=await this[_0x305526(-0x22e,-0x1d3)]['post'](_0x4e155d,_0x5674fe?.[_0x305526(-0x17e,-0x1c9)],{'headers':headers});break;case'PUT':response=await this[_0x305526(-0x24e,-0x1d3)]['put'](_0x4e155d,_0x5674fe?.['body'],{'headers':headers});break;case'PATCH':response=await this['httpClient'][_0x305526(-0x16e,-0x1c0)](_0x4e155d,_0x5674fe?.[_0x305526(-0x18b,-0x1c9)],{'headers':headers});break;case'DELETE':response=await this['httpClient'][_0x305526(-0x1f7,-0x202)](_0x4e155d,{'headers':headers,'data':_0x5674fe?.['body']});break;default:throw new EBaaSError(_0x305526(-0x19d,-0x21b)+_0x423b59,0x190);}return{'data':response[_0x305526(-0x1cd,-0x1c5)],'error':null};}catch(_0x207d90){return{'data':null,'error':_0x207d90 instanceof EBaaSError?_0x207d90:new EBaaSError(_0x207d90 instanceof Error?_0x207d90['message']:_0x305526(-0x201,-0x19b),0x0,_0x207d90)};}}async[_0x294921(-0x83,0x8)](){function _0x22dde7(_0x4aa28d,_0x3329e7){return _0x46d3(_0x4aa28d-0x1ed,_0x3329e7);}try{const response=await this[_0x22dde7(0x3a0,0x41e)]['get']('/functions/v1');return{'data':response['data'],'error':null};}catch(_0x1a1f7f){return{'data':null,'error':_0x1a1f7f instanceof EBaaSError?_0x1a1f7f:new EBaaSError(_0x1a1f7f instanceof Error?_0x1a1f7f['message']:_0x22dde7(0x3ec,0x3ab),0x0,_0x1a1f7f)};}}async[_0x294921(-0xa,0x81)](_0x57146d){function _0x359150(_0x47df13,_0x1f678a){return _0x46d3(_0x47df13-0x323,_0x1f678a);}try{const response=await this['httpClient']['get'](_0x359150(0x540,0x511)+_0x57146d+'/info');return{'data':response[_0x359150(0x4e4,0x4a5)],'error':null};}catch(_0x41fd6e){return{'data':null,'error':_0x41fd6e instanceof EBaaSError?_0x41fd6e:new EBaaSError(_0x41fd6e instanceof Error?_0x41fd6e[_0x359150(0x57f,0x5e2)]:_0x359150(0x474,0x43e),0x0,_0x41fd6e)};}}async[_0x294921(-0x33,0x6)](_0x51de24,_0x566572){function _0x110dc3(_0x241df4,_0x4ad443){return _0x46d3(_0x241df4- -0x16b,_0x4ad443);}try{const _0x37051c=new FormData();if(_0x566572['code']instanceof File)_0x37051c[_0x110dc3(0x47,0x13)]('code',_0x566572['code']);else typeof _0x566572['code']==='string'&&_0x37051c['append']('code',new Blob([_0x566572[_0x110dc3(0xb,0x8f)]],{'type':_0x110dc3(0xe4,0x10f)}),_0x110dc3(0x62,0x44));_0x566572['entrypoint']&&_0x37051c[_0x110dc3(0x47,0xcf)]('entrypoint',_0x566572[_0x110dc3(0x73,0xfc)]);_0x566572['env']&&_0x37051c[_0x110dc3(0x47,0x71)](_0x110dc3(0xf5,0x17c),JSON['stringify'](_0x566572[_0x110dc3(0xf5,0x136)]));_0x566572['importMap']&&_0x37051c[_0x110dc3(0x47,0x5a)](_0x110dc3(0xf0,0x138),JSON['stringify'](_0x566572['importMap']));_0x566572['verify']!==undefined&&_0x37051c['append']('verify',String(_0x566572[_0x110dc3(0xc9,0xb4)]));const response=await this[_0x110dc3(0x48,0x96)]['post'](_0x110dc3(0xb2,0x56)+_0x51de24+'/deploy',_0x37051c,{'headers':{'Content-Type':_0x110dc3(0x2b,0x57)}});return{'data':response['data'],'error':null};}catch(_0x3d1f8f){return{'data':null,'error':_0x3d1f8f instanceof EBaaSError?_0x3d1f8f:new EBaaSError(_0x3d1f8f instanceof Error?_0x3d1f8f[_0x110dc3(0xf1,0x10b)]:_0x110dc3(0x75,0x64),0x0,_0x3d1f8f)};}}async[_0x294921(-0x74,-0x2a)](_0x2a49a8){function _0x5c8838(_0x22b811,_0x18014d){return _0x46d3(_0x18014d- -0x18a,_0x22b811);}try{const response=await this['httpClient'][_0x5c8838(-0x81,-0x6)]('/functions/v1/'+_0x2a49a8);return{'data':response['data'],'error':null};}catch(_0x4babc4){return{'data':null,'error':_0x4babc4 instanceof EBaaSError?_0x4babc4:new EBaaSError(_0x4babc4 instanceof Error?_0x4babc4['message']:_0x5c8838(0x31,0xb2),0x0,_0x4babc4)};}}async[_0x294921(0x11,0x10)](_0xca8a7a,_0x57875a){function _0x3addc9(_0x1e8309,_0x7ca6de){return _0x46d3(_0x7ca6de-0x224,_0x1e8309);}try{const response=await this[_0x3addc9(0x423,0x3d7)]['put']('/functions/v1/'+_0xca8a7a+'/env',{'env':_0x57875a});return{'data':response['data'],'error':null};}catch(_0x23d20b){return{'data':null,'error':_0x23d20b instanceof EBaaSError?_0x23d20b:new EBaaSError(_0x23d20b instanceof Error?_0x23d20b[_0x3addc9(0x450,0x480)]:'Failed\x20to\x20update\x20function\x20environment',0x0,_0x23d20b)};}}async[_0x294921(-0x28,0x44)](_0x4f1b58,_0x1e2154){function _0xe5fa59(_0x4a45ec,_0x4c2f2e){return _0x46d3(_0x4a45ec- -0x19e,_0x4c2f2e);}try{const _0x3684eb=new URLSearchParams();_0x1e2154?.[_0xe5fa59(-0x4e,0x1e)]&&_0x3684eb['append'](_0xe5fa59(-0x4e,-0xc),String(_0x1e2154[_0xe5fa59(-0x4e,-0x9b)]));_0x1e2154?.['offset']&&_0x3684eb[_0xe5fa59(0x14,-0x3f)]('offset',String(_0x1e2154[_0xe5fa59(-0x37,0x1f)]));_0x1e2154?.[_0xe5fa59(-0x4c,-0xc0)]&&_0x3684eb['append'](_0xe5fa59(-0x4c,-0x1d),_0x1e2154['level']);const _0x17e229=_0xe5fa59(0x7f,0xab)+_0x4f1b58+_0xe5fa59(0x87,0xb6)+(_0x3684eb[_0xe5fa59(-0x11,-0x9a)]()?'?'+_0x3684eb[_0xe5fa59(-0x11,-0x59)]():''),response=await this[_0xe5fa59(0x15,0x5)]['get'](_0x17e229);return{'data':response['data'],'error':null};}catch(_0x4a0413){return{'data':null,'error':_0x4a0413 instanceof EBaaSError?_0x4a0413:new EBaaSError(_0x4a0413 instanceof Error?_0x4a0413[_0xe5fa59(0xbe,0x133)]:'Failed\x20to\x20get\x20function\x20logs',0x0,_0x4a0413)};}}async[_0x294921(0x87,0x67)](_0x12ff7e,_0x3e2836){function _0x338da5(_0xa9b286,_0x48741c){return _0x46d3(_0xa9b286-0x28b,_0x48741c);}try{const _0x3e4497=new URLSearchParams();_0x3e2836?.[_0x338da5(0x4b1,0x4e2)]&&_0x3e4497['append'](_0x338da5(0x4b1,0x43c),_0x3e2836['period']);const _0x5e7f86='/functions/v1/'+_0x12ff7e+'/metrics'+(_0x3e4497['toString']()?'?'+_0x3e4497['toString']():''),response=await this['httpClient'][_0x338da5(0x4ba,0x46e)](_0x5e7f86);return{'data':response[_0x338da5(0x44c,0x47f)],'error':null};}catch(_0x1fe20e){return{'data':null,'error':_0x1fe20e instanceof EBaaSError?_0x1fe20e:new EBaaSError(_0x1fe20e instanceof Error?_0x1fe20e['message']:_0x338da5(0x470,0x450),0x0,_0x1fe20e)};}}}class EBaaSClient{constructor(_0x359039,_0x4379b9,_0x5ef557){this['options']=_0x5ef557,this[_0x21d965(-0x107,-0x188)]=new HttpClient({'url':_0x359039,'apiKey':_0x4379b9,'timeout':0x7530,'headers':_0x5ef557?.[_0x21d965(-0x18f,-0x180)]?.[_0x21d965(-0x161,-0x1e1)]});function _0x21d965(_0x54bc02,_0x20ed7e){return _0x46d3(_0x20ed7e- -0x33b,_0x54bc02);}this['auth']=new AuthClient(this[_0x21d965(-0xfe,-0x188)],_0x5ef557?.[_0x21d965(-0xf4,-0x14a)]?.['workspaceId']),this['database']=new DatabaseClient(this[_0x21d965(-0x15c,-0x188)],_0x5ef557?.['database']?.[_0x21d965(-0x116,-0x17b)],_0x5ef557?.['rest']?.[_0x21d965(-0x245,-0x1e5)]),this[_0x21d965(-0x1b5,-0x18a)]=new StorageClient(this['httpClient']),this['realtime']=new RealtimeClient(_0x359039,_0x4379b9,_0x5ef557?.['realtime']),this['functions']=new FunctionsClient(this[_0x21d965(-0x116,-0x188)]),this[_0x21d965(-0x9b,-0x119)]();}[_0x294921(0x112,0x87)](_0x235c61){return this['database']['from'](_0x235c61);}[_0x294921(-0x12,-0xb)](_0x255405,_0x5a752c){function _0x30df0a(_0x5b81c3,_0x49a558){return _0x46d3(_0x49a558-0x3b3,_0x5b81c3);}return this[_0x30df0a(0x58d,0x5a4)][_0x30df0a(0x5d1,0x556)](_0x255405,_0x5a752c);}['bucket'](_0x380c28){function _0x5c0d54(_0x55fa4f,_0x333451){return _0x46d3(_0x55fa4f-0x24f,_0x333451);}return this[_0x5c0d54(0x400,0x3de)]['from'](_0x380c28);}[_0x294921(0x66,0x94)](_0x1c5a03){function _0x28122c(_0x12e69d,_0x3395c4){return _0x46d3(_0x12e69d-0x2f5,_0x3395c4);}return this[_0x28122c(0x4a1,0x4ea)][_0x28122c(0x537,0x528)](_0x1c5a03);}[_0x294921(-0x23,-0x12)](_0xbd6f4e,_0x1d3f74){function _0x444f3c(_0x33c233,_0x1ff99a){return _0x46d3(_0x33c233- -0x3b5,_0x1ff99a);}return this['functions'][_0x444f3c(-0x219,-0x1ef)](_0xbd6f4e,_0x1d3f74);}async[_0x294921(0x4d,0x74)](){function _0x346898(_0xdaf922,_0x302491){return _0x46d3(_0x302491- -0x109,_0xdaf922);}if(this['options']?.[_0x346898(0xde,0xe8)]?.[_0x346898(0xc0,0x58)])try{await this['database'][_0x346898(0xf5,0xe5)]();}catch(_0x18e8d1){console['warn']('Failed to initialize custom database detection:',_0x18e8d1);}}async['setWorkspaceId'](_0x220d07){this[_0x18ec09(0x248,0x1f5)][_0x18ec09(0x113,0x139)](_0x220d07);function _0x18ec09(_0x205218,_0x2dc748){return _0x46d3(_0x2dc748- -0x4e,_0x205218);}this[_0x18ec09(0x1f9,0x1a3)]['setWorkspaceId'](_0x220d07),this['options']?.['database']?.[_0x18ec09(0x157,0x113)]&&await this[_0x18ec09(0x191,0x1a3)][_0x18ec09(0x11e,0x1a0)]();}async[_0x294921(0x72,0x48)](_0x229d99){function _0x4d6253(_0x3fb4e9,_0x21b4ec){return _0x46d3(_0x3fb4e9-0x6c,_0x21b4ec);}await this[_0x4d6253(0x25d,0x278)]['configureCustomDatabase'](_0x229d99);}[_0x294921(-0x93,-0x25)](){function _0x248f3e(_0x5dcb7c,_0x397b9a){return _0x46d3(_0x5dcb7c-0x4a,_0x397b9a);}return this[_0x248f3e(0x23b,0x28a)]['getCustomDatabaseStatus']();}}function createClient(_0x493407,_0x2fca66,_0x371adf){return new EBaaSClient(_0x493407,_0x2fca66,_0x371adf);}const version=_0x294921(0xa0,0x7d);export{AuthClient,CustomDatabaseManager,DatabaseClient,EBaaSClient,EBaaSError,FunctionsClient,HttpClient,QueryBuilder,RealtimeChannel,RealtimeClient,StorageBucket,StorageClient,createClient,version};