@e-techsolutions/e-baas-sdk 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x496b29(_0x544a00,_0x5b4dcd){return _0xe923(_0x5b4dcd-0x18,_0x544a00);}while(!![]){try{const _0x88f5ff=-parseInt(_0x496b29(0x2cf,0x266))/0x1+parseInt(_0x496b29(0x262,0x240))/0x2+parseInt(_0x496b29(0x274,0x260))/0x3*(parseInt(_0x496b29(0x1a7,0x1ed))/0x4)+-parseInt(_0x496b29(0x258,0x1fb))/0x5*(-parseInt(_0x496b29(0x2a1,0x21c))/0x6)+parseInt(_0x496b29(0x28e,0x25c))/0x7+-parseInt(_0x496b29(0x21a,0x239))/0x8*(-parseInt(_0x496b29(0x227,0x263))/0x9)+-parseInt(_0x496b29(0x2d1,0x27c))/0xa*(parseInt(_0x496b29(0x1bb,0x1bd))/0xb);if(_0x88f5ff===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x4273a5){stringArray['push'](stringArray['shift']());}}}(_0x2a45,0x19f41));function _0x2a45(){const _0x2f2c53=['Cg9ZDgDYzxnqB3j0','zMLSzq','mta4mZaXturIuevm','zxjYB3jLza','B2zM','qxv0AenSAwvUDa','rMfPBgvKihrVigDLDcbIDwnRzxq','zw50CNLWB2LUDa','ChjVzhvJDa','BgLZDa','BgLZDej1y2TLDhm','BgvUz3rO','Bwv0Ag9K','B25Jzq','C3rHDgu','CNbJ','BgvHDMLUzW','yxnJzw5KAw5N','zxzLBNq','y3jLzgvUDgLHBhm','AxnezwXLDgu','yNvJA2v0swq','CgvYAw9K','zgvSzxrLqNvJA2v0','mZbnA1vYwhi','CMvJB25Uzwn0qxr0zw1WDhm','rMfPBgvKihrVihjLBw92zsbMAwXLCW','zgvMyxvSDhm','y29Kzq','BwfRzvjLzG','Cgf0y2G','p29WzxjHDgLVBJ1KzwXLDgu','x2DLDfnVy2TLDa','y2fWDhvYzvn0ywnRvhjHy2u','AgvHCNrIzwf0sw50zxj2ywW','CMvMCMvZAf90B2TLBG','y3vYCMvUDfnLC3nPB24','B2zMC2v0','C2vZC2LVBG','BwfW','zgv0zwn0q3vZDg9Trgf0ywjHC2u','CMvJB25Uzwn0sw50zxj2ywW','CMvZB2X1DgLVBJ1TzxjNzs1KDxbSAwnHDgvZlhjLDhvYBJ1YzxbYzxnLBNrHDgLVBG','z2v0vxnLCG','Ahr0CenSAwvUDa','C2LNBLvW','zM9YrwfJAa','zgvWBg95','CMvHBhrPBwu','zgf0ywjHC2u','DMvYAwz5','x3rYAwDNzxi','p3vWC2vYDd10CNvL','B3jKzxi','lMfZyW','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','uMvHBhrPBwvdAgfUBMvS','Dg9WAwm','C2v0','B25bDxrOu3rHDgvdAgfUz2u','y29TBw9U','z2v0u3rHDgu','l2zPBgvZ','shr0CenSAwvUDa','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','l2z1BMn0Aw9UCY92ms8','zxjYB3i','rMfPBgvKihrVigXPC3qGzNvUy3rPB25Z','C29JA2v0qwrHChrLCG','l2LUzM8','rMfPBgvKihrVignYzwf0zsbZAwDUzwqGvvjm','y29UBMvJDa','C3rVCMfNzq','Aw1WB3j0twfW','rNvUy3rPB24GAw52B2nHDgLVBIbMywLSzwq','ChjLzMvY','vw5RBM93BIbLCNjVCG','BhrL','z2XVyMfS','Aw5PDgLHBgL6zq','yNvJA2v0','AgfUzgXLqxv0AevYCM9Y','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','l3nKAY92ms8','zgf0yq','AgvHCNrIzwf0','B25qB3n0z3jLC0nOyw5Nzxm','zxzLBNrZ','l2XVz3m','l2f1DgGVDJeVC2rRl3nPz25PBG','l2zPBgvZl21VDMu','y29UDgvUDfr5Cgu','DgvZDenVBM5Ly3rPB24','Aw52B2TL','yxbPs2v5','D29YA3nWywnLswq','DMfSDwvZ','DMfSDwu','C29JA2v0lMLVlwnSAwvUDa','y3jLyxrLqNvJA2v0','Bwv0ywrHDge','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSig5LC3rLigfTyMLLBNrLlIbqyxjHihvZyxiGzNvUy2LVBMfSAwrHzgvZigrLihjLywX0Aw1LlcbPBNn0ywXLoIbUCg0GAw5ZDgfSBcbZB2nRzxqUAw8Ty2XPzw50','z2v0q2HHBM5LBhm','rMfPBgvKihrVignVBM5Ly3qGywz0zxiG','AM9PBMLUzW','zgf0yufYCMf5','Bg9N','y29UBMvJDgLVBLn0yxrL','uMvXDwvZDcbMywLSzwq','zxHLy3v0zvf1zxj5','y29UzMLN','C3rHDhvZvgv4Da','nda0nZy3r1n2DNLb','DxnL','zNjVBq','Dw5KzwzPBMvK','BwvZC2fNzq','C2LUz2XL','B3bLCMf0B3i','AgvHzgvYCW','B3b0Aw9UCW','l2zPBgvZlW','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','Dgv4Dc9WBgfPBG','C3rYAw5N','Dg9vChbLCKnHC2u','ChvIBgLJ','u1vcu0nssujfra','q3vZDg9Trgf0ywjHC2vnyw5Hz2vY','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','l3n0B3jHz2uVyNvJA2v0CY8','CMvTB3zLq3vZDg9Trgf0ywjHC2u','u3rVCMfNzunSAwvUDa','l2f1DgGVDJeVDxnLCG','zMLSDgvYCW','AM9PBMvKt25Jzq','AgfUzgXLrxjYB3i','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','DxbSB2fK','C3vIC2nYAxb0Aw9UCW','DxnLCG','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','C2vHCMnO','Bg9HzfnLC3nPB24','l2zPBgvZl2nVChK','zxHLy3v0zq','DgfIBgu','AxndB25Uzwn0zwq','z2v0','BMvX','AM9PBMvK','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','AM9PBG','DxbKyxrLvxnLCG','zgLZy29UBMvJDa','icHtDgf0Dxm6ia','Dg9tDhjPBMC','uMvHy3royxrPDMu','y2XLyxi','l2f1DgGVDJeVCMvMCMvZAa','mZyYmZz5EuHYB0W','BM9Kzq','BgvHDMu','CMvHy3qTBMf0AxzL','DxbZzxj0','A2v5CW','C2v0qxv0AfrVA2vU','C2v0DxbizwfYDgjLyxq','zgv0zwn0zwrdB25MAwC','CMvTB3zLqwXStgLZDgvUzxjZ','y29UBMvJDgvK','CMvTB3zLtgLZDgvUzxi','zw52','C2L6zq','ndmYodvQrwLjyxe','x2PVAw4','Cg9ZDgDYzxnFy2HHBMDLCW','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbSB2DZ','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','y29UBMvJDf9LCNjVCG','Chv0','C3vIC2nYAwjL','Bgv2zwW','Cg9ZDgDYzxnFy2HHBMDLCZO','AgfZ','x3nLDfn0yxrL','C3vIC3rYAw5N','C2v0u2vZC2LVBKLUDgvYBMfS','zgLZy29UBMvJDgvK','DxjS','DxbKyxrLqNvJA2v0','Cg9ZDgDYzxneyxrHyMfZzq','y2XVC2vK','rujHyvndBgLLBNq','C29YDej5','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','ms4WlJa','C2v0u2vZC2LVBG','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','Ec10B3rHBc1JB3vUDa','C3bSAxq','z2v0rgv0zwn0zwrdB25MAwC','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','zw1PDa','C29JA2v0','y29SDw1U','C29JA2v0t3b0Aw9UCW','nNrMtK1xAa','z2v0twf4tgLZDgvUzxjZ','CMvZB2X2zq','y2XPzw50','yNjVywrJyxn0oG','CMv0DxjUpxjLChjLC2vUDgf0Aw9U','y2fJAgvdB250CM9S','C2v0DxbjBNrLCMnLChrVCNm','ChjLC2vUy2u','B3bLCMf0Aw9U','zgv0ywLSCW','C3rYAw5NAwz5','AgfZq3vZDg9Trgf0ywjHC2u','ChjLC2vUy2u6','BgLTAxq','yM9KEq','zgvSzxrL','D2fYBG','sfruucbYzxf1zxn0igzHAwXLza','CMvTB3zLqwXSq2HHBM5LBhm','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','y2HHBM5LBhm','C3rHDhvZ','yNjVD3nLCG','C2nOzw1H','C2vSzwn0','l2rLCgXVEq','Dg9ku09o','y3vYCMvUDfnJAgvTyq','mZa1ndrhrNzdBhu','z2v0v29YA3nWywnLswq','ChjLCgvUzeXPC3rLBMvY','BMfTzq','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','y2HHBM5LBa','rMfPBgvKihrVihvWBg9HzcbMAwXL','mtaWnZa2D2n3qMf0','CMvXDwvZDa','CMvTB3zL','ywrK','x3jLAM9PBG','y2XLyxjtzxnZAw9U','DxbKyxrLrgf0yq','l21LDhjPy3m','BgLRzq','CMvQzwn0','DxbKyxrLt3b0Aw9UCW','C29JA2v0lMLVlwnSAwvUDcbUB3qGyxzHAwXHyMXL','DxbKyxrLrMLSzu1LDgfKyxrH','y29UDgfPBNm','DhjHy2S','uhjLzMvY','rMfPBgvKihrVigXPC3qGzMLSzxm','Dw5ZDwjZy3jPyMu','z2v0u3rHDhvZ','CMf3tgLZDgvUzxjZ','yNjVywrJyxn0','C2v0v29YA3nWywnLswq','BgLZDgvUzxjZ','yxbWzw5K','ChvZAa','yMfZzvvsta','CxvLCNK','Bwf4tgLZDgvUzxjZ','nJG5nJeYv0HNB2z6','DxbKyxrL','Aw5Zzxj0','z2v0u2vZC2LVBG','mtvmDuv5Dgq','CMvZCg9UC2u','Cg9ZDa','mJG4uLjStgf6'];_0x2a45=function(){return _0x2f2c53;};return _0x2a45();}var axios=require('axios');class EBaaSError extends Error{constructor(_0x290047,status=0x0,_0xec9896){super(_0x290047),this['name']='EBaaSError',this['status']=status,this['details']=_0xec9896;function _0x4065cd(_0x48c799,_0x119176){return _0xe923(_0x119176- -0x1c7,_0x48c799);}Error['captureStackTrace']&&Error[_0x4065cd(0x118,0xa6)](this,EBaaSError);}[_0x36b514(0x34b,0x372)](){function _0x47f223(_0x231596,_0x345508){return _0xe923(_0x345508-0x3da,_0x231596);}return{'name':this[_0x47f223(0x64f,0x5fe)],'message':this['message'],'status':this['status'],'details':this[_0x47f223(0x56b,0x5e8)],'stack':this['stack']};}['toString'](){function _0x294ed1(_0xca613d,_0x2cabcc){return _0xe923(_0xca613d-0x33e,_0x2cabcc);}return this['name']+':\x20'+this[_0x294ed1(0x4e7,0x4ac)]+_0x294ed1(0x50e,0x56c)+this['status']+')';}}class HttpClient{constructor(config){this[_0x416a33(-0x177,-0x125)]=config[_0x416a33(-0x1c6,-0x227)];function _0x416a33(_0x44cff6,_0x2ed0cc){return _0xe923(_0x44cff6- -0x3b8,_0x2ed0cc);}this['apiKey']=config['apiKey'],this['client']=axios['create']({'baseURL':this[_0x416a33(-0x177,-0x1f7)],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this['apiKey'],...config['headers']}}),this['setupInterceptors']();}[_0x36b514(0x337,0x3a3)](){function _0xcb5fa(_0x237854,_0x19d8a6){return _0xe923(_0x19d8a6-0x228,_0x237854);}this['client']['interceptors'][_0xcb5fa(0x416,0x451)]['use'](config=>{return config;},_0x355414=>{function _0x1e037e(_0x2782d7,_0x1d2dcc){return _0xe923(_0x2782d7- -0x342,_0x1d2dcc);}return Promise[_0x1e037e(-0x111,-0x11d)](new EBaaSError(_0x1e037e(-0x1a1,-0x148),0x0,_0x355414));}),this[_0xcb5fa(0x3f2,0x42f)]['interceptors']['response'][_0xcb5fa(0x38c,0x3ce)](response=>{return response;},_0x169c1b=>{const status=_0x169c1b['response']?.['status']||0x0,_0x2977ba=_0x169c1b[_0x263f43(-0xcb,-0x138)]?.[_0x263f43(-0x18b,-0x1d1)]?.['message']||_0x169c1b[_0x263f43(-0x16b,-0xe1)]||_0x263f43(-0x7c,-0xc2),_0xab59a6=_0x169c1b[_0x263f43(-0xcb,-0x134)]?.['data']||_0x169c1b;function _0x263f43(_0x52e7ed,_0x511e57){return _0xe923(_0x52e7ed- -0x314,_0x511e57);}return Promise[_0x263f43(-0xe3,-0x109)](new EBaaSError(_0x2977ba,status,_0xab59a6));});}async[_0x36b514(0x2f5,0x26b)](_0x521466,config){function _0x1b22b5(_0x5d90fd,_0x22d53f){return _0xe923(_0x5d90fd- -0x343,_0x22d53f);}try{const response=await this['client'][_0x1b22b5(-0x17a,-0x1d2)](_0x521466,config);return{'data':response['data'],'status':response['status'],'statusText':response[_0x1b22b5(-0x19f,-0x134)],'headers':response[_0x1b22b5(-0x197,-0x13c)]};}catch(_0x38a619){throw this[_0x1b22b5(-0x186,-0x1cd)](_0x38a619);}}async['post'](_0xb51031,data,config){function _0x7af927(_0x5a0a0f,_0x57a54d){return _0xe923(_0x57a54d-0x283,_0x5a0a0f);}try{const response=await this[_0x7af927(0x4a9,0x48a)]['post'](_0xb51031,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x7af927(0x44a,0x42f)]};}catch(_0x5a5170){throw this['handleError'](_0x5a5170);}}async[_0x36b514(0x315,0x333)](_0x42a582,data,config){function _0x1e7c16(_0x46a5d5,_0x2124cd){return _0xe923(_0x46a5d5- -0x102,_0x2124cd);}try{const response=await this[_0x1e7c16(0x105,0x12c)][_0x1e7c16(0xe7,0xfa)](_0x42a582,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x234d95){throw this[_0x1e7c16(0xbb,0x117)](_0x234d95);}}async['patch'](_0x1cc8e8,data,config){function _0xb09ae6(_0x241832,_0x30a9ac){return _0xe923(_0x241832-0x3b6,_0x30a9ac);}try{const response=await this[_0xb09ae6(0x5bd,0x5e4)][_0xb09ae6(0x620,0x60e)](_0x1cc8e8,data,config);return{'data':response[_0xb09ae6(0x53f,0x525)],'status':response[_0xb09ae6(0x5d0,0x56b)],'statusText':response['statusText'],'headers':response['headers']};}catch(_0x14f2c7){throw this['handleError'](_0x14f2c7);}}async['delete'](_0x1c017b,config){function _0x30088d(_0x4ecd85,_0x1b338d){return _0xe923(_0x4ecd85-0x116,_0x1b338d);}try{const response=await this['client'][_0x30088d(0x32a,0x300)](_0x1c017b,config);return{'data':response[_0x30088d(0x29f,0x306)],'status':response[_0x30088d(0x330,0x3a4)],'statusText':response[_0x30088d(0x2ba,0x319)],'headers':response['headers']};}catch(_0x1d09ca){throw this['handleError'](_0x1d09ca);}}['setAuthToken'](_0x8c6dda){function _0x29c43a(_0x363d49,_0x3faf27){return _0xe923(_0x363d49-0x239,_0x3faf27);}this[_0x29c43a(0x440,0x3d5)][_0x29c43a(0x4a0,0x44e)]['headers']['common']['Authorization']='Bearer\x20'+_0x8c6dda;}['removeAuthToken'](){delete this[_0x5a5c52(0x3e9,0x36e)][_0x5a5c52(0x449,0x3e1)]['headers'][_0x5a5c52(0x46a,0x474)]['Authorization'];function _0x5a5c52(_0x206f98,_0x3b4650){return _0xe923(_0x206f98-0x1e2,_0x3b4650);}this['client']['defaults']['headers'][_0x5a5c52(0x46a,0x429)]['Authorization']='Bearer\x20'+this['apiKey'];}[_0x36b514(0x2e9,0x331)](_0x3f25de){function _0x180671(_0x5c01ee,_0x1154af){return _0xe923(_0x1154af-0x88,_0x5c01ee);}if(_0x3f25de instanceof EBaaSError)return _0x3f25de;return new EBaaSError(_0x3f25de[_0x180671(0x2b8,0x231)]||_0x180671(0x256,0x29e),_0x3f25de[_0x180671(0x324,0x2a2)]||0x0,_0x3f25de);}}class AuthClient{constructor(_0x22c1c2,_0x5100f1){this['currentSession']=null,this['httpClient']=_0x22c1c2,this[_0x1e6913(-0x96,-0xab)]=_0x5100f1;function _0x1e6913(_0x3ab32f,_0x129279){return _0xe923(_0x129279- -0x23f,_0x3ab32f);}this[_0x1e6913(0x10,-0x7b)]();}async[_0x36b514(0x3a5,0x3e2)](data){function _0x13d11b(_0xfc9fcf,_0x131021){return _0xe923(_0xfc9fcf-0x21d,_0x131021);}try{const response=await this[_0x13d11b(0x495,0x4bb)][_0x13d11b(0x467,0x4bc)]('/auth/v1/signup',data);return response['data']['session']&&this['setSessionInternal'](response['data']['session']),response['data'];}catch(_0x4b5b7d){throw this[_0x13d11b(0x4ba,0x52e)](_0x4b5b7d);}}async['signIn'](data){function _0x280301(_0x3e4908,_0x3bb55f){return _0xe923(_0x3bb55f-0x139,_0x3e4908);}try{const headers={};this[_0x280301(0x24c,0x2cd)]&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this['httpClient'][_0x280301(0x31e,0x383)](_0x280301(0x31c,0x2c7),data,{'headers':headers});return response[_0x280301(0x2d5,0x2c2)][_0x280301(0x42c,0x3ab)]&&this[_0x280301(0x321,0x329)](response[_0x280301(0x28b,0x2c2)][_0x280301(0x3c2,0x3ab)]),response['data'];}catch(_0x55a0f1){throw this['handleAuthError'](_0x55a0f1);}}async['signOut'](){function _0x2a88f9(_0x440461,_0x3818bf){return _0xe923(_0x3818bf-0x1ba,_0x440461);}try{await this['httpClient'][_0x2a88f9(0x3d9,0x404)]('/auth/v1/signout'),this['clearSession']();}catch(_0x27e542){this[_0x2a88f9(0x38a,0x3e7)]();throw this['handleAuthError'](_0x27e542);}}async[_0x36b514(0x3a3,0x3e6)](){function _0x1c8430(_0x20c724,_0xe8b3ca){return _0xe923(_0x20c724-0x3a,_0xe8b3ca);}if(!this[_0x1c8430(0x2aa,0x23b)]?.['access_token'])return null;try{const response=await this['httpClient']['get'](_0x1c8430(0x1f4,0x183));return response[_0x1c8430(0x1c3,0x1fc)][_0x1c8430(0x1fb,0x24e)];}catch(_0x38d117){if(_0x38d117 instanceof EBaaSError&&_0x38d117['status']===0x191)return this['clearSession'](),null;throw this[_0x1c8430(0x2d7,0x32f)](_0x38d117);}}async['refreshSession'](){if(!this['currentSession']?.[_0xdf463c(0x3f7,0x438)])return null;function _0xdf463c(_0xb3c42a,_0x2b2bcf){return _0xe923(_0x2b2bcf-0x1c9,_0xb3c42a);}try{const response=await this['httpClient'][_0xdf463c(0x398,0x413)](_0xdf463c(0x370,0x39d),{'refresh_token':this['currentSession'][_0xdf463c(0x4b0,0x438)]});if(response[_0xdf463c(0x36e,0x352)][_0xdf463c(0x426,0x43b)])return this['setSession'](response['data'][_0xdf463c(0x3e9,0x43b)]),response['data']['session'];return null;}catch(_0x267050){this[_0xdf463c(0x454,0x3f6)]();throw this[_0xdf463c(0x4d1,0x466)](_0x267050);}}async['resetPassword'](_0x1ad7ac){function _0x2464b8(_0x2b8254,_0x280a75){return _0xe923(_0x2b8254-0x2bb,_0x280a75);}try{await this[_0x2464b8(0x533,0x508)]['post']('/auth/v1/reset-password',{'email':_0x1ad7ac});}catch(_0x14c42c){throw this[_0x2464b8(0x558,0x5c3)](_0x14c42c);}}async[_0x36b514(0x2fa,0x2b6)](data){function _0x2e3116(_0x16b807,_0x2e626c){return _0xe923(_0x16b807- -0x289,_0x2e626c);}try{const response=await this['httpClient']['put']('/auth/v1/user',data);return response[_0x2e3116(-0x100,-0x7b)][_0x2e3116(-0xc8,-0x65)];}catch(_0xdfd56c){throw this['handleAuthError'](_0xdfd56c);}}[_0x36b514(0x373,0x340)](){function _0x1973ec(_0x261488,_0x399df7){return _0xe923(_0x261488-0x309,_0x399df7);}return this[_0x1973ec(0x579,0x569)];}[_0x36b514(0x326,0x2fc)](_0x2f57c3){this[_0x5acf4a(0x573,0x4fb)]=_0x2f57c3;function _0x5acf4a(_0x4d4696,_0x173a76){return _0xe923(_0x4d4696-0x303,_0x173a76);}this['httpClient'][_0x5acf4a(0x4de,0x563)](_0x2f57c3['access_token']),typeof localStorage!=='undefined'&&localStorage['setItem']('ebaas.auth.session',JSON['stringify'](_0x2f57c3));}[_0x36b514(0x3b3,0x40c)](_0x5cf30b){return()=>{};}[_0x36b514(0x369,0x306)](_0x4822ce){function _0x3bc1d3(_0x2293e5,_0x512a01){return _0xe923(_0x2293e5- -0x284,_0x512a01);}this[_0x3bc1d3(-0xf0,-0x145)]=_0x4822ce;}['setSessionInternal'](_0x1ede4b){function _0x342b15(_0x5262e9,_0x18a87c){return _0xe923(_0x5262e9- -0x15e,_0x18a87c);}this['currentSession']=_0x1ede4b,this['httpClient'][_0x342b15(0x7d,0x9c)](_0x1ede4b['access_token']),typeof localStorage!=='undefined'&&localStorage['setItem']('ebaas.auth.session',JSON[_0x342b15(0xb1,0x118)](_0x1ede4b));}['clearSession'](){function _0x4ce73f(_0x167cd2,_0x441f8c){return _0xe923(_0x441f8c-0x91,_0x167cd2);}this[_0x4ce73f(0x35b,0x301)]=null,this['httpClient']['removeAuthToken'](),typeof localStorage!=='undefined'&&localStorage['removeItem']('ebaas.auth.session');}['loadSession'](){function _0x4b4d43(_0x162a53,_0x3db5f9){return _0xe923(_0x3db5f9- -0x116,_0x162a53);}if(typeof localStorage!=='undefined'){const _0x2e0804=localStorage['getItem']('ebaas.auth.session');if(_0x2e0804)try{const _0x2651db=JSON['parse'](_0x2e0804);this[_0x4b4d43(0xb9,0xda)](_0x2651db);}catch(_0x4c2ccf){this[_0x4b4d43(0xdc,0x117)]();}}}[_0x36b514(0x3c9,0x3f3)](_0x626c90){if(_0x626c90 instanceof EBaaSError)return _0x626c90;function _0x59d1df(_0x812348,_0x2db34f){return _0xe923(_0x812348- -0xc0,_0x2db34f);}return new EBaaSError(_0x626c90['message']||'Authentication\x20failed',_0x626c90[_0x59d1df(0x15a,0x1cf)]||0x0,_0x626c90);}}class QueryBuilder{constructor(_0x14d125,_0xcc275e,_0x1b555c,_0x376e54){this[_0x35ad3b(0x30f,0x379)]=_0x14d125,this['table']=_0xcc275e,this[_0x35ad3b(0x2e5,0x31d)]=_0x1b555c;function _0x35ad3b(_0x106890,_0x559230){return _0xe923(_0x559230-0x101,_0x106890);}this[_0x35ad3b(0x26f,0x295)]=_0x376e54,this['query']={'filters':[]};}[_0x36b514(0x349,0x2fc)](_0x5cf9fd='*',_0x1c3d82){this['query'][_0x5b5de2(0x196,0x162)]=_0x5cf9fd;function _0x5b5de2(_0x1f09fe,_0xae4080){return _0xe923(_0xae4080- -0xbb,_0x1f09fe);}return this;}[_0x36b514(0x372,0x317)](data,_0x4ad0e4){function _0x266643(_0x302c9c,_0x2795e7){return _0xe923(_0x2795e7-0x374,_0x302c9c);}return this['executeQuery']('POST',_0x266643(0x4a4,0x4fc)+this[_0x266643(0x4cd,0x53b)]+'?operation=insert',{'data':data,'options':_0x4ad0e4});}[_0x36b514(0x371,0x35f)](data,_0x456cde){this['query'][_0x7d5247(0x2ad,0x2d0)]=data,this[_0x7d5247(0x2c1,0x2b7)][_0x7d5247(0x2b1,0x2a4)]=_0x456cde;function _0x7d5247(_0x128dad,_0x59e2d0){return _0xe923(_0x128dad-0x7f,_0x59e2d0);}return this;}[_0x36b514(0x305,0x335)](data,_0x18731c){function _0x50ca4e(_0x4a4443,_0x2361e2){return _0xe923(_0x4a4443-0x2ab,_0x2361e2);}return this[_0x50ca4e(0x44d,0x3cf)]('POST',_0x50ca4e(0x433,0x3fb)+this['table']+'?operation=upsert',{'data':data,'options':{..._0x18731c,'upsert':!![]}});}['delete'](_0x40a09a){return this['query']['deleteOptions']=_0x40a09a,this['query']['isDelete']=!![],this;}['eq'](_0x52f6e2,_0x41b997){function _0x27ce0f(_0x24a709,_0x47234e){return _0xe923(_0x47234e-0x22d,_0x24a709);}return this['query']['filters'][_0x27ce0f(0x4b8,0x46d)]({'column':_0x52f6e2,'operator':'eq','value':_0x41b997}),this;}[_0x36b514(0x2f6,0x364)](_0x2139cd,_0x5a4f3a){function _0x23e696(_0x2f64cb,_0x5e437a){return _0xe923(_0x2f64cb- -0x303,_0x5e437a);}return this[_0x23e696(-0xc1,-0x116)][_0x23e696(-0x148,-0xe8)][_0x23e696(-0xc3,-0xd3)]({'column':_0x2139cd,'operator':_0x23e696(-0x139,-0x101),'value':_0x5a4f3a}),this;}['gt'](_0x5f1a41,_0x2a2c80){this[_0xd5f793(0x5d9,0x603)][_0xd5f793(0x56a,0x57c)]['push']({'column':_0x5f1a41,'operator':'gt','value':_0x2a2c80});function _0xd5f793(_0x3034ee,_0x562dde){return _0xe923(_0x562dde-0x3c1,_0x3034ee);}return this;}['gte'](_0x3edf20,_0x3b917f){function _0x53c02b(_0x25b1ee,_0x182ed8){return _0xe923(_0x25b1ee-0x253,_0x182ed8);}return this[_0x53c02b(0x495,0x4cf)][_0x53c02b(0x40e,0x483)][_0x53c02b(0x493,0x480)]({'column':_0x3edf20,'operator':'gte','value':_0x3b917f}),this;}['lt'](_0x1f86d6,_0x3b32d3){function _0x57265e(_0x20140d,_0x3a7cea){return _0xe923(_0x3a7cea- -0x39c,_0x20140d);}return this[_0x57265e(-0xf6,-0x15a)]['filters']['push']({'column':_0x1f86d6,'operator':'lt','value':_0x3b32d3}),this;}[_0x36b514(0x3c5,0x3a4)](_0x3a2101,_0x18cf31){function _0x36af83(_0x214426,_0x4cf88f){return _0xe923(_0x4cf88f-0x28d,_0x214426);}return this[_0x36af83(0x46e,0x4cf)]['filters'][_0x36af83(0x4aa,0x4cd)]({'column':_0x3a2101,'operator':_0x36af83(0x57a,0x526),'value':_0x18cf31}),this;}['like'](_0x5a8107,_0x3d3d8e){function _0x4ff736(_0x355121,_0x2139c6){return _0xe923(_0x355121- -0x62,_0x2139c6);}return this[_0x4ff736(0x1e0,0x1c1)]['filters']['push']({'column':_0x5a8107,'operator':_0x4ff736(0x1ce,0x155),'value':_0x3d3d8e}),this;}['ilike'](_0x416975,_0xb4c6cd){function _0x317943(_0x11eeab,_0x4453e4){return _0xe923(_0x11eeab- -0x160,_0x4453e4);}return this['query'][_0x317943(0x5b,-0x2c)]['push']({'column':_0x416975,'operator':'ilike','value':_0xb4c6cd}),this;}['is'](_0x42ca7c,_0x28b37e){function _0x56047e(_0x132b08,_0x27224d){return _0xe923(_0x132b08-0x1ce,_0x27224d);}return this['query'][_0x56047e(0x389,0x3ee)][_0x56047e(0x40e,0x479)]({'column':_0x42ca7c,'operator':'is','value':_0x28b37e}),this;}['in'](_0x2c79e5,_0x2e5926){this[_0x167e81(0x4b3,0x4cf)][_0x167e81(0x446,0x448)]['push']({'column':_0x2c79e5,'operator':'in','value':_0x2e5926});function _0x167e81(_0x4b875e,_0xabe877){return _0xe923(_0xabe877-0x28d,_0x4b875e);}return this;}[_0x36b514(0x361,0x372)](_0x1627c9,_0x50ea2b){function _0x660627(_0x49485e,_0x3bb539){return _0xe923(_0x49485e-0xdb,_0x3bb539);}return this['query'][_0x660627(0x296,0x275)]['push']({'column':_0x1627c9,'operator':_0x660627(0x310,0x36c),'value':_0x50ea2b}),this;}['match'](_0x30f715){function _0x5f53a9(_0x289bbe,_0x368ee4){return _0xe923(_0x289bbe- -0x145,_0x368ee4);}return Object['entries'](_0x30f715)[_0x5f53a9(0x135,0x16a)](([_0x183dac,_0xe2b0b9])=>{this['eq'](_0x183dac,_0xe2b0b9);}),this;}[_0x36b514(0x3ad,0x3ab)](_0x4f9daf,_0x5a6fc5){!this['query'][_0x5e4d8a(0x64e,0x629)]&&(this['query']['order']=[]);this[_0x5e4d8a(0x60f,0x681)][_0x5e4d8a(0x64e,0x5d6)][_0x5e4d8a(0x60d,0x68e)]({'column':_0x4f9daf,'ascending':_0x5a6fc5?.['ascending']!==![]});function _0x5e4d8a(_0xbcc470,_0x2bb343){return _0xe923(_0xbcc470-0x3cd,_0x2bb343);}return this;}[_0x36b514(0x33e,0x36c)](count){this[_0x47bd48(0x20,-0x55)][_0x47bd48(-0x70,-0x85)]=count;function _0x47bd48(_0x2cbe90,_0x407b28){return _0xe923(_0x407b28- -0x297,_0x2cbe90);}return this;}['range'](from,_0x3b86da){return this['query']['range']={'from':from,'to':_0x3b86da},this;}async[_0x36b514(0x2f2,0x2b3)](){function _0x15f9e9(_0x339fca,_0x1e9f1d){return _0xe923(_0x339fca-0x1b2,_0x1e9f1d);}if(this['query']['updateData'])return this['executeQuery']('PATCH','/sdk/v1/'+this['table'],{'data':this['query']['updateData'],'options':this[_0x15f9e9(0x3f4,0x434)][_0x15f9e9(0x3e4,0x36a)],'filters':this['query']['filters']});else return this[_0x15f9e9(0x3f4,0x42f)][_0x15f9e9(0x412,0x49c)]?this['executeQuery']('DELETE',_0x15f9e9(0x33a,0x2eb)+this['table']+_0x15f9e9(0x41d,0x48a),{'options':this[_0x15f9e9(0x3f4,0x46a)]['deleteOptions'],'filters':this['query'][_0x15f9e9(0x36d,0x32c)]}):this[_0x15f9e9(0x354,0x365)]('GET',_0x15f9e9(0x33a,0x398)+this['table']+'?operation=select',{'select':this['query'][_0x15f9e9(0x3cf,0x372)],'filters':this['query']['filters'],'order':this['query']['order'],'limit':this[_0x15f9e9(0x3f4,0x395)][_0x15f9e9(0x3c4,0x44a)],'range':this['query']['range']});}async[_0x36b514(0x2d6,0x2e9)](){this['limit'](0x1);const result=await this['execute']();function _0x49a730(_0x14f1ac,_0x256420){return _0xe923(_0x14f1ac-0x88,_0x256420);}return{'data':result[_0x49a730(0x211,0x23f)]?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x124215,_0x17760b,_0x148558){function _0x1fac90(_0x59ae38,_0x492a98){return _0xe923(_0x492a98-0x1b0,_0x59ae38);}try{let response;const headers={};this[_0x1fac90(0x347,0x344)]&&(headers['x-workspace-id']=this['workspaceId']);if(_0x124215==='GET'){const _0xaffbd=_0x17760b[_0x1fac90(0x3dd,0x3ad)]('?'),_0x40b8af=_0xaffbd[0x0],existingParams=new URLSearchParams(_0xaffbd[0x1]||'');if(_0x148558[_0x1fac90(0x440,0x3cd)])existingParams[_0x1fac90(0x3e5,0x3ef)](_0x1fac90(0x456,0x3cd),_0x148558[_0x1fac90(0x3e2,0x3cd)]);_0x148558[_0x1fac90(0x333,0x36b)]?.['length']&&_0x148558[_0x1fac90(0x383,0x36b)]['forEach'](filter=>{function _0xd0623d(_0x264a40,_0x448951){return _0xe923(_0x264a40-0x2ab,_0x448951);}existingParams['append'](filter[_0xd0623d(0x4ad,0x4a5)],filter['operator']+'.'+filter['value']);});if(_0x148558[_0x1fac90(0x41a,0x431)]?.[_0x1fac90(0x42c,0x407)]){const orderStr=_0x148558['order'][_0x1fac90(0x475,0x423)](_0xd35d5a=>''+_0xd35d5a[_0x1fac90(0x416,0x3b2)]+(_0xd35d5a[_0x1fac90(0x418,0x40d)]?_0x1fac90(0x4ba,0x432):'.desc'))[_0x1fac90(0x319,0x37d)](',');existingParams[_0x1fac90(0x3e4,0x3ef)](_0x1fac90(0x435,0x431),orderStr);}if(_0x148558['limit'])existingParams['append']('limit',_0x148558['limit']['toString']());_0x148558['range']&&(existingParams[_0x1fac90(0x3de,0x3ef)](_0x1fac90(0x395,0x421),_0x148558['range']['from'][_0x1fac90(0x409,0x381)]()),existingParams['append'](_0x1fac90(0x42a,0x3c2),(_0x148558['range']['to']-_0x148558['range']['from']+0x1)['toString']())),response=await this['httpClient'][_0x1fac90(0x335,0x379)](_0x40b8af+'?'+existingParams['toString'](),{'headers':headers});}else{if(_0x124215==='DELETE'){const _0x252211=_0x17760b[_0x1fac90(0x428,0x3ad)]('?'),_0x4766b8=_0x252211[0x0],existingParams=new URLSearchParams(_0x252211[0x1]||'');!existingParams['has'](_0x1fac90(0x434,0x3bd))&&existingParams['append'](_0x1fac90(0x36a,0x3bd),'delete');_0x148558['filters']?.[_0x1fac90(0x454,0x407)]&&_0x148558[_0x1fac90(0x354,0x36b)][_0x1fac90(0x46f,0x42a)](filter=>{function _0x4bb101(_0xf67743,_0x1aa2e6){return _0xe923(_0x1aa2e6-0x339,_0xf67743);}existingParams[_0x4bb101(0x505,0x578)](filter['column'],filter[_0x4bb101(0x4de,0x4e4)]+'.'+filter[_0x4bb101(0x515,0x4cf)]);});const deleteUrl=_0x4766b8+'?'+existingParams['toString']();console[_0x1fac90(0x358,0x34f)]('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console['log']('\uD83D\uDD27 DELETE headers:',headers),console['log']('\uD83D\uDD27 DELETE filtros originais:',_0x148558[_0x1fac90(0x31e,0x36b)]),response=await this[_0x1fac90(0x3d0,0x428)][_0x1fac90(0x43d,0x3c4)](deleteUrl,{'headers':headers});}else{if(_0x124215==='PATCH'){const _0x4797cc=_0x17760b[_0x1fac90(0x42f,0x3ad)]('?'),_0x23ed8f=_0x4797cc[0x0],existingParams=new URLSearchParams(_0x4797cc[0x1]||'');!existingParams[_0x1fac90(0x420,0x39d)]('operation')&&existingParams['append'](_0x1fac90(0x431,0x3bd),_0x1fac90(0x429,0x3f5));_0x148558['filters']?.[_0x1fac90(0x479,0x407)]&&_0x148558[_0x1fac90(0x3c3,0x36b)]['forEach'](filter=>{function _0x5322c1(_0x3684bd,_0x32ef40){return _0xe923(_0x3684bd-0xe0,_0x32ef40);}existingParams[_0x5322c1(0x31f,0x2b4)](filter[_0x5322c1(0x2e2,0x31b)],filter[_0x5322c1(0x28b,0x2a8)]+'.'+filter[_0x5322c1(0x276,0x302)]);});_0x148558[_0x1fac90(0x3dc,0x35d)]?.[_0x1fac90(0x435,0x447)]&&(headers[_0x1fac90(0x445,0x3e7)]=_0x148558[_0x1fac90(0x32a,0x35d)]['prefer']);const updateUrl=_0x23ed8f+'?'+existingParams['toString']();response=await this[_0x1fac90(0x4af,0x428)][_0x1fac90(0x491,0x41a)](updateUrl,_0x148558[_0x1fac90(0x36a,0x339)],{'headers':headers});}else{let _0x2cb0e1=_0x148558['data'];!headers[_0x1fac90(0x3fc,0x3e7)]&&(headers['Prefer']=_0x1fac90(0x408,0x3b9)),_0x148558[_0x1fac90(0x36b,0x35d)]?.['upsert']&&(headers[_0x1fac90(0x42c,0x3e7)]=_0x1fac90(0x44e,0x426)),_0x148558[_0x1fac90(0x339,0x34e)]&&(_0x2cb0e1=_0x148558[_0x1fac90(0x2ce,0x34e)]),response=await this[_0x1fac90(0x3c0,0x428)]['post'](_0x17760b,_0x2cb0e1,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response['headers']?.[_0x1fac90(0x3f4,0x3ac)]?parseInt(response['headers'][_0x1fac90(0x3a3,0x3ac)]):undefined};}catch(_0x2dac9c){return{'data':null,'error':_0x2dac9c instanceof EBaaSError?_0x2dac9c:new EBaaSError(_0x2dac9c instanceof Error?_0x2dac9c[_0x1fac90(0x3d6,0x359)]:'Database\x20operation\x20failed',0x0,_0x2dac9c)};}}}class CustomDatabaseManager{constructor(_0xbb91f8,_0x2973e7){this['httpClient']=_0xbb91f8;function _0x2d4e07(_0x1954ee,_0x146a1d){return _0xe923(_0x1954ee-0x92,_0x146a1d);}this[_0x2d4e07(0x226,0x1f6)]=_0x2973e7;}async[_0x36b514(0x3a0,0x387)](){if(!this['workspaceId'])return{'hasCustomDatabase':![]};try{const response=await this[_0x4d6e99(0x485,0x442)][_0x4d6e99(0x3d6,0x3e7)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this[_0x4d6e99(0x3a1,0x3ec)]}});if(response['status']===0xc8&&response[_0x4d6e99(0x396,0x413)]?.[_0x4d6e99(0x3b0,0x390)]){const config=response['data'][_0x4d6e99(0x3b0,0x391)],_0xd7040c={'host':config['postgresHost'],'port':config[_0x4d6e99(0x459,0x48e)],'database':config[_0x4d6e99(0x401,0x439)],'username':config['postgresUsername'],'password':'','schema':config['postgresSchema'],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0xd7040c},this[_0x4d6e99(0x3ea,0x39a)];}}catch(_0x4eaa73){if(_0x4eaa73?.[_0x4d6e99(0x427,0x40e)]===0x194)return this[_0x4d6e99(0x3ea,0x3e3)]={'hasCustomDatabase':![]},this['detectedConfig'];console[_0x4d6e99(0x422,0x3f5)]('Failed to detect custom database configuration:',_0x4eaa73);}function _0x4d6e99(_0x1da699,_0x484e08){return _0xe923(_0x1da699-0x20d,_0x484e08);}return this[_0x4d6e99(0x3ea,0x3a9)]={'hasCustomDatabase':![]},this[_0x4d6e99(0x3ea,0x43e)];}async['testConnection'](_0x30238a){function _0x1e422f(_0x3afdba,_0x4b22d9){return _0xe923(_0x3afdba-0x348,_0x4b22d9);}try{const response=await this[_0x1e422f(0x5c0,0x5f1)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x30238a,{'headers':this[_0x1e422f(0x4dc,0x462)]?{'X-Workspace-ID':this[_0x1e422f(0x4dc,0x54a)]}:{}});return response['data'];}catch(_0x3217f7){return{'success':![],'message':_0x3217f7?.[_0x1e422f(0x4f1,0x4fb)]||_0x1e422f(0x52f,0x4a9)};}}async[_0x36b514(0x324,0x309)](_0x3f855d){if(!this['workspaceId'])throw new Error('Workspace ID is required to configure custom database');const response=await this['httpClient'][_0x25db6e(0x5b,0x58)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x3f855d},{'headers':{'X-Workspace-ID':this[_0x25db6e(-0xbc,-0x5e)]}});function _0x25db6e(_0x3c43c9,_0x26e2c7){return _0xe923(_0x26e2c7- -0x1f2,_0x3c43c9);}const config=response['data']['config'];return this[_0x25db6e(-0x9a,-0x15)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x3f855d},config;}async['removeCustomDatabase'](){if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');await this[_0x540ddd(0xd6,0x11a)]['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this['workspaceId']}});function _0x540ddd(_0x64fcce,_0xa7ab33){return _0xe923(_0xa7ab33- -0x15e,_0x64fcce);}this['detectedConfig']={'hasCustomDatabase':![]};}[_0x36b514(0x32a,0x33b)](){return this['detectedConfig'];}[_0x36b514(0x33c,0x2f6)](){function _0x28af18(_0x5d45d1,_0x13a31c){return _0xe923(_0x5d45d1-0x168,_0x13a31c);}return this['detectedConfig']?.[_0x28af18(0x378,0x3fe)]??![];}['getCustomCredentials'](){function _0x40bd80(_0x7aa6ec,_0x15ecfd){return _0xe923(_0x15ecfd-0x2b0,_0x7aa6ec);}return this['detectedConfig']?.[_0x40bd80(0x4e2,0x50f)];}['setWorkspaceId'](_0x4f1cc3){function _0x5db98b(_0x480111,_0x335012){return _0xe923(_0x480111-0x3d7,_0x335012);}this[_0x5db98b(0x56b,0x4fa)]=_0x4f1cc3,this[_0x5db98b(0x5b4,0x62a)]=undefined;}[_0x36b514(0x34e,0x351)](){function _0x340f0e(_0x49bdfb,_0x5d3197){return _0xe923(_0x49bdfb-0x213,_0x5d3197);}return this[_0x340f0e(0x3a7,0x3d3)];}['getStatus'](){function _0x4d83c7(_0x5d4c72,_0xd9599b){return _0xe923(_0x5d4c72-0x146,_0xd9599b);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x4d83c7(0x356,0x2e5)](),'configDetails':this[_0x4d83c7(0x323,0x385)]?.[_0x4d83c7(0x3a5,0x396)]?{'host':this[_0x4d83c7(0x323,0x2ee)][_0x4d83c7(0x3a5,0x3b6)]['host'],'port':this['detectedConfig'][_0x4d83c7(0x3a5,0x3e7)]['port'],'database':this['detectedConfig']['credentials'][_0x4d83c7(0x3c3,0x37a)],'schema':this[_0x4d83c7(0x323,0x2e2)][_0x4d83c7(0x3a5,0x3f1)][_0x4d83c7(0x362,0x326)]||_0x4d83c7(0x2f9,0x360),'sslEnabled':this[_0x4d83c7(0x323,0x2c3)][_0x4d83c7(0x3a5,0x428)]['sslEnabled']||![]}:undefined};}}class DatabaseClient{constructor(_0x2c87ab,_0x59e07d){function _0x40a393(_0x5153fa,_0x1ad411){return _0xe923(_0x5153fa-0x398,_0x1ad411);}this['httpClient']=_0x2c87ab,this[_0x40a393(0x61b,0x659)]=new CustomDatabaseManager(_0x2c87ab,_0x59e07d);}['from'](_0x1c9562){function _0x45d1e3(_0x195870,_0x34ab79){return _0xe923(_0x34ab79- -0xec,_0x195870);}return new QueryBuilder(this['httpClient'],_0x1c9562,this[_0x45d1e3(0x1a1,0x134)],this[_0x45d1e3(0x1e0,0x197)]['getWorkspaceId']());}[_0x36b514(0x387,0x33a)](_0x2b7236,_0x4120c0){function _0xd692c0(_0x31716c,_0x15dce6){return _0xe923(_0x15dce6- -0x2e2,_0x31716c);}return this['httpClient'][_0xd692c0(-0x102,-0x98)]('/rpc/'+_0x2b7236,_0x4120c0);}['schema'](_0x69b3ff){const _0x1b40bf=new DatabaseClient(this['httpClient'],this[_0x18426e(0x10f,0x12e)][_0x18426e(0xea,0xcd)]());_0x1b40bf['currentSchema']=_0x69b3ff;function _0x18426e(_0x15a66c,_0x1314f9){return _0xe923(_0x1314f9- -0x155,_0x15a66c);}return _0x1b40bf['customDatabaseManager']=this[_0x18426e(0x19b,0x12e)],_0x1b40bf;}async[_0x36b514(0x3a0,0x349)](){return this['customDatabaseManager']['detectCustomDatabase']();}async['testCustomConnection'](_0x511c53){function _0x148743(_0x1f00fc,_0x377ef0){return _0xe923(_0x377ef0-0x3a0,_0x1f00fc);}return this['customDatabaseManager'][_0x148743(0x53b,0x531)](_0x511c53);}async[_0x36b514(0x324,0x39c)](_0x523e52){function _0x57c730(_0x22e886,_0x575419){return _0xe923(_0x575419-0x17d,_0x22e886);}return this[_0x57c730(0x38a,0x400)]['configureCustomDatabase'](_0x523e52);}async[_0x36b514(0x2e4,0x315)](){return this['customDatabaseManager']['removeCustomDatabase']();}['isUsingCustomDatabase'](){function _0x1b5582(_0x1438c6,_0x2474ea){return _0xe923(_0x2474ea- -0x33f,_0x1438c6);}return this['customDatabaseManager'][_0x1b5582(-0x1b1,-0x12f)]();}['getCustomDatabaseStatus'](){function _0x1cb923(_0x472d59,_0x45d3db){return _0xe923(_0x45d3db-0x2ae,_0x472d59);}return this['customDatabaseManager'][_0x1cb923(0x4fd,0x4e8)]();}[_0x36b514(0x369,0x3f0)](_0x9a6fbf){function _0x310530(_0x533314,_0x25e93a){return _0xe923(_0x25e93a-0x321,_0x533314);}this[_0x310530(0x564,0x5a4)][_0x310530(0x5dd,0x55e)](_0x9a6fbf);}async[_0x36b514(0x3c7,0x40b)](){function _0xce17f(_0x435e8a,_0x220a62){return _0xe923(_0x220a62- -0x1bc,_0x435e8a);}try{await this[_0xce17f(0xee,0xc7)][_0xce17f(0xbf,0xb8)]();}catch(_0x160b5b){console[_0xce17f(0xaa,0x59)]('Failed to initialize custom database detection:',_0x160b5b);}}}class StorageBucket{constructor(_0x5ce212,bucketId){this['httpClient']=_0x5ce212,this['bucketId']=bucketId;}async[_0x36b514(0x2eb,0x2fa)](_0xff46,_0x1f6d08,_0x3a79cc){function _0xa54fac(_0x948908,_0x49aa12){return _0xe923(_0x948908-0x179,_0x49aa12);}try{const _0x2b9bf9=new FormData();if(_0x1f6d08 instanceof File)_0x2b9bf9[_0xa54fac(0x3b8,0x32e)](_0xa54fac(0x3c6,0x42a),_0x1f6d08);else{if(_0x1f6d08 instanceof Blob)_0x2b9bf9[_0xa54fac(0x3b8,0x378)](_0xa54fac(0x3c6,0x43f),_0x1f6d08,_0xff46);else{if(_0x1f6d08 instanceof ArrayBuffer)_0x2b9bf9[_0xa54fac(0x3b8,0x3b4)](_0xa54fac(0x3c6,0x367),new Blob([_0x1f6d08]),_0xff46);else typeof _0x1f6d08===_0xa54fac(0x32a,0x37f)&&_0x2b9bf9[_0xa54fac(0x3b8,0x443)]('file',new Blob([_0x1f6d08],{'type':_0xa54fac(0x329,0x2e6)}),_0xff46);}}_0x2b9bf9[_0xa54fac(0x3b8,0x41e)]('path',_0xff46);_0x3a79cc?.[_0xa54fac(0x383,0x3e1)]&&_0x2b9bf9[_0xa54fac(0x3b8,0x38e)](_0xa54fac(0x383,0x338),_0x3a79cc[_0xa54fac(0x383,0x328)]);_0x3a79cc?.[_0xa54fac(0x309,0x304)]&&_0x2b9bf9['append'](_0xa54fac(0x309,0x30c),_0x3a79cc['contentType']);_0x3a79cc?.[_0xa54fac(0x312,0x2cf)]&&_0x2b9bf9['append'](_0xa54fac(0x312,0x305),JSON[_0xa54fac(0x388,0x38e)](_0x3a79cc[_0xa54fac(0x312,0x356)]));const _0x3d3893='/storage/buckets/'+this['bucketId']+_0xa54fac(0x403,0x3f1)+(_0x3a79cc?.['upsert']?_0xa54fac(0x3f9,0x413):''),response=await this['httpClient'][_0xa54fac(0x3c3,0x381)](_0x3d3893,_0x2b9bf9,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response[_0xa54fac(0x302,0x293)],'error':null};}catch(_0x1dc2c9){return{'data':null,'error':_0x1dc2c9 instanceof EBaaSError?_0x1dc2c9:new EBaaSError(_0x1dc2c9 instanceof Error?_0x1dc2c9[_0xa54fac(0x322,0x344)]:_0xa54fac(0x3a0,0x41b),0x0,_0x1dc2c9)};}}async['download'](_0x9be22f,_0x590f3c){function _0x24acf7(_0x29f2fb,_0x28d821){return _0xe923(_0x29f2fb-0x29a,_0x28d821);}try{const _0x48643d=new URLSearchParams();_0x590f3c?.['transform']&&Object['entries'](_0x590f3c['transform'])['forEach'](([_0x40fabf,_0x4cba04])=>{_0x4cba04!==undefined&&_0x48643d['append'](_0x40fabf,String(_0x4cba04));});const _0x36253c=_0x24acf7(0x451,0x43f)+this['bucketId']+'/files/'+_0x9be22f+(_0x48643d[_0x24acf7(0x46b,0x4c3)]()?'?'+_0x48643d[_0x24acf7(0x46b,0x43d)]():''),response=await this['httpClient']['get'](_0x36253c,{'responseType':'blob'});return{'data':response[_0x24acf7(0x423,0x3fd)],'error':null};}catch(_0x48db1a){return{'data':null,'error':_0x48db1a instanceof EBaaSError?_0x48db1a:new EBaaSError(_0x48db1a instanceof Error?_0x48db1a['message']:'Failed\x20to\x20download\x20file',0x0,_0x48db1a)};}}async[_0x36b514(0x381,0x310)](_0x59b301,_0x5c64e3){function _0x1b58e0(_0x2cc9df,_0x49449f){return _0xe923(_0x2cc9df-0x2bb,_0x49449f);}try{const _0xe7e9b7=new URLSearchParams();_0x59b301&&_0xe7e9b7['append']('prefix',_0x59b301);_0x5c64e3?.['limit']&&_0xe7e9b7['append']('limit',String(_0x5c64e3[_0x1b58e0(0x4cd,0x512)]));_0x5c64e3?.['offset']&&_0xe7e9b7['append'](_0x1b58e0(0x52c,0x51d),String(_0x5c64e3['offset']));_0x5c64e3?.[_0x1b58e0(0x4b2,0x4a0)]&&_0xe7e9b7[_0x1b58e0(0x4fa,0x4b8)]('sortBy',JSON[_0x1b58e0(0x4ca,0x47d)](_0x5c64e3[_0x1b58e0(0x4b2,0x529)]));_0x5c64e3?.[_0x1b58e0(0x47e,0x439)]&&_0xe7e9b7['append'](_0x1b58e0(0x47e,0x42f),_0x5c64e3[_0x1b58e0(0x47e,0x4ae)]);const _0x2a77a4='/storage/buckets/'+this[_0x1b58e0(0x51c,0x49f)]+'/files'+(_0xe7e9b7[_0x1b58e0(0x48c,0x490)]()?'?'+_0xe7e9b7['toString']():''),response=await this['httpClient'][_0x1b58e0(0x484,0x460)](_0x2a77a4);return{'data':response[_0x1b58e0(0x444,0x3db)],'error':null};}catch(_0x642010){return{'data':null,'error':_0x642010 instanceof EBaaSError?_0x642010:new EBaaSError(_0x642010 instanceof Error?_0x642010[_0x1b58e0(0x464,0x46d)]:_0x1b58e0(0x4f3,0x503),0x0,_0x642010)};}}async[_0x36b514(0x356,0x397)](_0xda55d5){function _0x186d3e(_0x4b9155,_0x6ac542){return _0xe923(_0x4b9155-0x83,_0x6ac542);}try{const response=await this['httpClient']['delete'](_0x186d3e(0x23a,0x1e7)+this[_0x186d3e(0x2e4,0x268)]+'/files',{'data':{'paths':_0xda55d5}});return{'data':response[_0x186d3e(0x20c,0x28a)],'error':null};}catch(_0x2ebebb){return{'data':null,'error':_0x2ebebb instanceof EBaaSError?_0x2ebebb:new EBaaSError(_0x2ebebb instanceof Error?_0x2ebebb['message']:_0x186d3e(0x2e9,0x268),0x0,_0x2ebebb)};}}async['move'](fromPath,_0x1846ff){function _0x12a3f6(_0x3b9f53,_0x59ee09){return _0xe923(_0x59ee09-0x330,_0x3b9f53);}try{const response=await this['httpClient']['post'](_0x12a3f6(0x470,0x4e7)+this['bucketId']+_0x12a3f6(0x44d,0x4bf),{'sourceKey':fromPath,'destinationKey':_0x1846ff});return{'data':response['data'],'error':null};}catch(_0x10764c){return{'data':null,'error':_0x10764c instanceof EBaaSError?_0x10764c:new EBaaSError(_0x10764c instanceof Error?_0x10764c[_0x12a3f6(0x4bf,0x4d9)]:'Failed\x20to\x20move\x20file',0x0,_0x10764c)};}}async['copy'](fromPath,_0x323a67){function _0x4b85a6(_0x4321a5,_0x2fb74c){return _0xe923(_0x4321a5- -0x2d1,_0x2fb74c);}try{const response=await this[_0x4b85a6(-0x59,-0xa7)]['post'](_0x4b85a6(-0x11a,-0x18f)+this[_0x4b85a6(-0x70,-0xb5)]+_0x4b85a6(-0x10c,-0xb4),{'sourceKey':fromPath,'destinationKey':_0x323a67});return{'data':response['data'],'error':null};}catch(_0x5d44e6){return{'data':null,'error':_0x5d44e6 instanceof EBaaSError?_0x5d44e6:new EBaaSError(_0x5d44e6 instanceof Error?_0x5d44e6[_0x4b85a6(-0x128,-0x19a)]:'Failed\x20to\x20copy\x20file',0x0,_0x5d44e6)};}}async['createSignedUrl'](_0x3135b2,_0x510e35,_0x28a248){function _0x4d1e45(_0x2741b3,_0xe22a0b){return _0xe923(_0xe22a0b- -0x19d,_0x2741b3);}try{const response=await this['httpClient'][_0x4d1e45(0xff,0xad)]('/storage/buckets/'+this['bucketId']+'/files/'+_0x3135b2+'/sign',{'expiresIn':_0x510e35,..._0x28a248});return{'data':response['data'],'error':null};}catch(_0x58d4d0){return{'data':null,'error':_0x58d4d0 instanceof EBaaSError?_0x58d4d0:new EBaaSError(_0x58d4d0 instanceof Error?_0x58d4d0['message']:_0x4d1e45(0x120,0xf5),0x0,_0x58d4d0)};}}['getPublicUrl'](_0x4c047f,_0x2fcaa1){const _0x4d88af=new URLSearchParams();_0x2fcaa1?.['transform']&&Object['entries'](_0x2fcaa1['transform'])[_0x328720(0x14,0x12)](([_0x186812,_0x183a96])=>{function _0x71ba85(_0x316c40,_0x5f4242){return _0xe923(_0x316c40-0xa2,_0x5f4242);}_0x183a96!==undefined&&_0x4d88af[_0x71ba85(0x2e1,0x351)](_0x186812,String(_0x183a96));});const _0x17c20b=this['httpClient']['baseURL']||'';function _0x328720(_0x3ed65e,_0x387e1c){return _0xe923(_0x387e1c- -0x268,_0x3ed65e);}const _0x32b88e=_0x17c20b+_0x328720(-0x6a,-0xb1)+this['bucketId']+'/files/'+_0x4c047f+(_0x4d88af[_0x328720(-0xdc,-0x97)]()?'?'+_0x4d88af['toString']():'');return{'data':{'publicUrl':_0x32b88e}};}async['getFileInfo'](_0x446a76){function _0xa8b160(_0x15d591,_0x342f50){return _0xe923(_0x342f50-0x129,_0x15d591);}try{const response=await this[_0xa8b160(0x317,0x3a1)]['get'](_0xa8b160(0x349,0x2e0)+this['bucketId']+'/files/'+_0x446a76+'/info');return{'data':response['data'],'error':null};}catch(_0x146424){return{'data':null,'error':_0x146424 instanceof EBaaSError?_0x146424:new EBaaSError(_0x146424 instanceof Error?_0x146424[_0xa8b160(0x2bc,0x2d2)]:_0xa8b160(0x2f7,0x34e),0x0,_0x146424)};}}async[_0x36b514(0x360,0x2f2)](_0x593865,metadata){function _0x59c296(_0x2e0812,_0x3f782d){return _0xe923(_0x2e0812- -0x211,_0x3f782d);}try{const response=await this[_0x59c296(0x67,0xc9)][_0x59c296(-0x28,-0x1e)](_0x59c296(-0x5a,-0x6c)+this[_0x59c296(0x50,0x60)]+_0x59c296(-0x63,0x0)+_0x593865+'/metadata',{'metadata':metadata});return{'data':response[_0x59c296(-0x88,-0x7)],'error':null};}catch(_0x491c2e){return{'data':null,'error':_0x491c2e instanceof EBaaSError?_0x491c2e:new EBaaSError(_0x491c2e instanceof Error?_0x491c2e['message']:_0x59c296(-0x45,-0x2),0x0,_0x491c2e)};}}}class StorageClient{constructor(_0x4c4445){function _0x142959(_0x2639ff,_0x78d580){return _0xe923(_0x2639ff-0xa1,_0x78d580);}this[_0x142959(0x319,0x388)]=_0x4c4445;}[_0x36b514(0x2d3,0x34b)](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async[_0x36b514(0x2c4,0x2d1)](_0xd9d662,_0x249e26){function _0x2c97e0(_0x26a303,_0x505d96){return _0xe923(_0x505d96- -0x6c,_0x26a303);}try{const response=await this[_0x2c97e0(0x293,0x20c)]['post']('/storage/buckets',{'id':_0xd9d662,..._0x249e26});return{'data':response['data'],'error':null};}catch(_0x1a22e7){return{'data':null,'error':_0x1a22e7 instanceof EBaaSError?_0x1a22e7:new EBaaSError(_0x1a22e7 instanceof Error?_0x1a22e7[_0x2c97e0(0x117,0x13d)]:_0x2c97e0(0x20e,0x220),0x0,_0x1a22e7)};}}async['getBucket'](_0x58dbda){function _0x56b6a6(_0x12ff6e,_0x3e0d85){return _0xe923(_0x12ff6e-0x18b,_0x3e0d85);}try{const response=await this[_0x56b6a6(0x403,0x46c)]['get'](_0x56b6a6(0x342,0x324)+_0x58dbda);return{'data':response[_0x56b6a6(0x314,0x349)],'error':null};}catch(_0x2d93b7){return{'data':null,'error':_0x2d93b7 instanceof EBaaSError?_0x2d93b7:new EBaaSError(_0x2d93b7 instanceof Error?_0x2d93b7[_0x56b6a6(0x334,0x2f2)]:_0x56b6a6(0x3dd,0x3ad),0x0,_0x2d93b7)};}}async[_0x36b514(0x382,0x3a5)](){function _0x3144bb(_0x2439db,_0x5a9e21){return _0xe923(_0x5a9e21-0x29f,_0x2439db);}try{const response=await this[_0x3144bb(0x557,0x517)][_0x3144bb(0x413,0x468)]('/storage/buckets');return{'data':response[_0x3144bb(0x40b,0x428)],'error':null};}catch(_0x418fe1){return{'data':null,'error':_0x418fe1 instanceof EBaaSError?_0x418fe1:new EBaaSError(_0x418fe1 instanceof Error?_0x418fe1[_0x3144bb(0x3bd,0x448)]:_0x3144bb(0x41f,0x49e),0x0,_0x418fe1)};}}async[_0x36b514(0x31f,0x299)](_0x5ba0f7,_0x14d7cb){function _0x1e9c75(_0x3a1a9e,_0x177246){return _0xe923(_0x177246-0x264,_0x3a1a9e);}try{const response=await this['httpClient'][_0x1e9c75(0x3ff,0x44d)]('/storage/buckets/'+_0x5ba0f7,_0x14d7cb);return{'data':response[_0x1e9c75(0x479,0x3ed)],'error':null};}catch(_0x233b06){return{'data':null,'error':_0x233b06 instanceof EBaaSError?_0x233b06:new EBaaSError(_0x233b06 instanceof Error?_0x233b06[_0x1e9c75(0x3b1,0x40d)]:_0x1e9c75(0x412,0x41a),0x0,_0x233b06)};}}async[_0x36b514(0x38f,0x368)](_0x4d0dbd){function _0x4de15f(_0x1c1561,_0x16a7f7){return _0xe923(_0x1c1561-0x1e,_0x16a7f7);}try{const response=await this['httpClient'][_0x4de15f(0x232,0x2a4)](_0x4de15f(0x1d5,0x216)+_0x4d0dbd);return{'data':response[_0x4de15f(0x1a7,0x167)],'error':null};}catch(_0xe29323){return{'data':null,'error':_0xe29323 instanceof EBaaSError?_0xe29323:new EBaaSError(_0xe29323 instanceof Error?_0xe29323['message']:'Failed\x20to\x20delete\x20bucket',0x0,_0xe29323)};}}async['getUsage'](){function _0x3399b6(_0x5db662,_0x149186){return _0xe923(_0x149186-0xb4,_0x5db662);}try{const response=await this['httpClient'][_0x3399b6(0x243,0x27d)]('/storage/usage');return{'data':response['data'],'error':null};}catch(_0x4eb2ad){return{'data':null,'error':_0x4eb2ad instanceof EBaaSError?_0x4eb2ad:new EBaaSError(_0x4eb2ad instanceof Error?_0x4eb2ad[_0x3399b6(0x2cc,0x25d)]:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x4eb2ad)};}}}class EventManager{constructor(){function _0x4baad0(_0x3d1b23,_0xff713){return _0xe923(_0xff713- -0x38,_0x3d1b23);}this[_0x4baad0(0x163,0x154)]=new Map(),this['maxListeners']=0xa;}['on'](_0x46fd4f,_0x209e91){function _0x4f59ae(_0x2f81b9,_0x189954){return _0xe923(_0x2f81b9-0x3af,_0x189954);}!this[_0x4f59ae(0x53b,0x57f)]['has'](_0x46fd4f)&&this['events'][_0x4f59ae(0x635,0x605)](_0x46fd4f,new Set()),this['events']['get'](_0x46fd4f)[_0x4f59ae(0x5da,0x64a)](_0x209e91);}['off'](_0x5becb2,_0x4ea3bf){if(!this[_0x2d3d27(0x6a,0x54)][_0x2d3d27(0xcb,0x122)](_0x5becb2))return;function _0x2d3d27(_0x1b4580,_0x23ae74){return _0xe923(_0x1b4580- -0x122,_0x23ae74);}const _0x5bc2e9=this[_0x2d3d27(0x6a,0x46)][_0x2d3d27(0xa7,0x9c)](_0x5becb2);_0x4ea3bf?_0x5bc2e9['delete'](_0x4ea3bf):_0x5bc2e9['clear'](),_0x5bc2e9[_0x2d3d27(0xc0,0x5d)]===0x0&&this['events']['delete'](_0x5becb2);}['emit'](_0xb57c82,..._0x3b1344){if(!this['events']['has'](_0xb57c82))return![];const _0x43d79e=this[_0x205888(0x266,0x2b8)][_0x205888(0x2a3,0x2a0)](_0xb57c82);for(const _0x584894 of _0x43d79e){try{_0x584894(..._0x3b1344);}catch(_0x112530){console['error']('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0xb57c82+'\x22:',_0x112530);}}function _0x205888(_0x5599dd,_0x52cf4b){return _0xe923(_0x5599dd-0xda,_0x52cf4b);}return _0x43d79e['size']>0x0;}['removeAllListeners'](_0x507a98){function _0xa1d737(_0x3db0cd,_0xddc048){return _0xe923(_0x3db0cd- -0x29f,_0xddc048);}_0x507a98?this[_0xa1d737(-0x113,-0x128)][_0xa1d737(-0x8b,-0x2)](_0x507a98):this[_0xa1d737(-0x113,-0x10f)]['clear']();}['listenerCount'](_0x46a6a0){function _0x359561(_0x22995b,_0x1bd48c){return _0xe923(_0x22995b-0x1f2,_0x1bd48c);}return this['events'][_0x359561(0x3bb,0x359)](_0x46a6a0)?.['size']??0x0;}['eventNames'](){function _0x3c09c1(_0x1ea5ef,_0x221fc8){return _0xe923(_0x221fc8-0x149,_0x1ea5ef);}return Array['from'](this[_0x3c09c1(0x2e9,0x2d5)][_0x3c09c1(0x30d,0x323)]());}[_0x36b514(0x36a,0x3cb)](_0x30bd66){function _0x46225e(_0x3a0fdf,_0x4fb7e4){return _0xe923(_0x3a0fdf- -0x13,_0x4fb7e4);}return Array['from'](this[_0x46225e(0x179,0x144)]['get'](_0x30bd66)??[]);}['addListener'](_0x57fd18,_0x433885){this['on'](_0x57fd18,_0x433885);}[_0x36b514(0x30c,0x2a0)](_0x477794,_0x568a81){this['off'](_0x477794,_0x568a81);}[_0x36b514(0x385,0x303)](_0x597db6,_0x5d82d9){const _0x479e4e=(..._0x316684)=>{this[_0x4e65b3(0x46d,0x443)](_0x597db6,_0x479e4e);function _0x4e65b3(_0x5e6f22,_0x4b4b3a){return _0xe923(_0x5e6f22-0x21d,_0x4b4b3a);}_0x5d82d9(..._0x316684);};this['on'](_0x597db6,_0x479e4e);}[_0x36b514(0x34f,0x3d5)](_0x239199,_0x5e6523){this['on'](_0x239199,_0x5e6523);}['prependOnceListener'](_0x1b8dda,_0x524886){const _0x32b404=(..._0x5276a4)=>{this[_0xc28575(-0x4e,-0x14)](_0x1b8dda,_0x32b404);function _0xc28575(_0xeb7b60,_0x5c3ac4){return _0xe923(_0x5c3ac4- -0x264,_0xeb7b60);}_0x524886(..._0x5276a4);};this['on'](_0x1b8dda,_0x32b404);}['setMaxListeners'](_0x1c9886){this[_0xdb374a(0x4ca,0x4f6)]=_0x1c9886;function _0xdb374a(_0x3832e1,_0x23ad1e){return _0xe923(_0x3832e1-0x287,_0x23ad1e);}return this;}[_0x36b514(0x331,0x374)](){function _0x1fad00(_0x1529ac,_0x3f4523){return _0xe923(_0x3f4523- -0x38e,_0x1529ac);}return this[_0x1fad00(-0xdb,-0x14b)];}[_0x36b514(0x367,0x34b)](_0x8f71c0){return this['listeners'](_0x8f71c0);}}class RealtimeChannel extends EventManager{constructor(_0x341dae,_0xe48b04){super();function _0x1c8c62(_0x2eef00,_0x5bf002){return _0xe923(_0x5bf002- -0x27f,_0x2eef00);}this['joinedOnce']=![],this['state']=_0x1c8c62(-0xd6,-0x8a),this['subscriptions']=new Map(),this[_0x1c8c62(0x35,0x6)]=_0x341dae,this[_0x1c8c62(-0x19,-0x7e)]=_0xe48b04;}[_0x36b514(0x316,0x368)](_0x5ace00){!this[_0x247aaa(-0x5a,-0x70)]&&(this[_0x247aaa(-0x9b,-0x70)]=!![],this[_0x247aaa(-0xc4,-0x48)]());function _0x247aaa(_0x3eb02f,_0x12609b){return _0xe923(_0x12609b- -0x22c,_0x3eb02f);}return _0x5ace00&&this['on'](_0x247aaa(0x5d,-0x12),_0x5ace00),this;}[_0x36b514(0x2b7,0x325)](filter,_0x4e8fa2){function _0x15656f(_0x98c9eb,_0x50ce1f){return _0xe923(_0x50ce1f- -0x1bc,_0x98c9eb);}const _0x4a0427='postgres_changes:'+JSON[_0x15656f(0xb8,0x53)](filter);this['on'](_0x4a0427,_0x4e8fa2);const _0x5514b9={'unsubscribe':()=>{this[_0x471c60(-0x103,-0x131)](_0x4a0427,_0x4e8fa2);function _0x471c60(_0x413072,_0x27c87e){return _0xe923(_0x413072- -0x353,_0x27c87e);}this[_0x471c60(-0x193,-0x185)][_0x471c60(-0x13f,-0x118)](_0x4a0427);}};return this['subscriptions']['set'](_0x4a0427,_0x5514b9),this['socket']?.['connected']&&this['state']===_0x15656f(0x29,0xf)&&this['socket']['emit'](_0x15656f(0x7c,0xe2),{'topic':this[_0x15656f(0xa9,0xc9)],'filter':filter,'ref':this['makeRef']()}),_0x5514b9;}['onBroadcast'](filter,_0x5c659b){const _0x2b7a89='broadcast:'+JSON[_0x15af22(0x191,0x182)](filter);this['on'](_0x2b7a89,_0x5c659b);function _0x15af22(_0x40b8c5,_0x128307){return _0xe923(_0x40b8c5- -0x7e,_0x128307);}const _0x530e60={'unsubscribe':()=>{this[_0x537093(0x241,0x249)](_0x2b7a89,_0x5c659b);function _0x537093(_0x3fe5f5,_0x5c7e32){return _0xe923(_0x5c7e32- -0x7,_0x3fe5f5);}this[_0x537093(0x195,0x1b9)]['delete'](_0x2b7a89);}};return this['subscriptions']['set'](_0x2b7a89,_0x530e60),_0x530e60;}['onPresence'](filter,_0x395f56){const _0x230b79='presence:'+JSON['stringify'](filter);this['on'](_0x230b79,_0x395f56);const _0x4a8a08={'unsubscribe':()=>{this['off'](_0x230b79,_0x395f56),this['subscriptions']['delete'](_0x230b79);}};function _0x2bbf77(_0x51112d,_0x24f0c8){return _0xe923(_0x51112d-0x24b,_0x24f0c8);}return this[_0x2bbf77(0x40b,0x3d4)][_0x2bbf77(0x4d1,0x540)](_0x230b79,_0x4a8a08),_0x4a8a08;}['send'](_0x4ce823){return new Promise(_0xd7c9c9=>{function _0x433d69(_0x577973,_0x5546b1){return _0xe923(_0x577973- -0x6d,_0x5546b1);}this[_0x433d69(0x194,0x17d)]?.['connected']&&this['state']===_0x433d69(0x15e,0x1ad)?(this['socket'][_0x433d69(0x193,0x194)](_0x433d69(0x1cf,0x19e),{'topic':this[_0x433d69(0x218,0x292)],'event':_0x4ce823['event'],'payload':_0x4ce823,'ref':this[_0x433d69(0x1fc,0x21c)]()}),_0xd7c9c9('ok')):_0xd7c9c9('error');});}[_0x36b514(0x362,0x31d)](_0xf13dc2){return new Promise(_0x11f3d0=>{function _0x49fefa(_0x50522f,_0x298f7f){return _0xe923(_0x298f7f-0x15e,_0x50522f);}this['socket']?.[_0x49fefa(0x382,0x33d)]&&this[_0x49fefa(0x335,0x3b8)]===_0x49fefa(0x347,0x329)?(this[_0x49fefa(0x312,0x35f)][_0x49fefa(0x3c6,0x35e)]('presence',{'topic':this[_0x49fefa(0x3d6,0x3e3)],'event':'track','payload':_0xf13dc2,'ref':this['makeRef']()}),_0x11f3d0('ok')):_0x11f3d0(_0x49fefa(0x443,0x3ec));});}['untrack'](){return new Promise(_0x7a8ce5=>{function _0x557842(_0x23069c,_0x48da5b){return _0xe923(_0x23069c- -0x9b,_0x48da5b);}this[_0x557842(0x166,0x134)]?.['connected']&&this['state']===_0x557842(0x130,0x1b5)?(this['socket'][_0x557842(0x165,0x142)](_0x557842(0x171,0x1f2),{'topic':this[_0x557842(0x1ea,0x1d0)],'event':'untrack','ref':this[_0x557842(0x1ce,0x157)]()}),_0x7a8ce5('ok')):_0x7a8ce5(_0x557842(0x1f3,0x20f));});}[_0x36b514(0x365,0x3f0)](){return new Promise(_0x5d9978=>{this[_0xfdeebd(0x210,0x1be)]='leaving',this[_0xfdeebd(0x176,0x1e0)][_0xfdeebd(0x230,0x22e)](_0x5a6f51=>{function _0x1e6ae0(_0x773c52,_0x231f61){return _0xe923(_0x773c52-0x3a0,_0x231f61);}_0x5a6f51[_0x1e6ae0(0x5d9,0x62b)]();}),this['subscriptions']['clear']();this['socket']?.['connected']&&this[_0xfdeebd(0x1b7,0x209)][_0xfdeebd(0x1b6,0x1c2)](_0xfdeebd(0x18d,0x1f7),{'topic':this[_0xfdeebd(0x23b,0x212)],'ref':this[_0xfdeebd(0x21f,0x1b3)]()});this['state']='closed',this[_0xfdeebd(0x194,0x1e6)]();function _0xfdeebd(_0x522feb,_0x2e1839){return _0xe923(_0x522feb- -0x4a,_0x2e1839);}_0x5d9978('ok');});}[_0x36b514(0x310,0x293)](){if(this['state']===_0x594a92(0x4e7,0x485))return;this[_0x594a92(0x4e5,0x4db)]=_0x594a92(0x428,0x468);function _0x594a92(_0x43c01,_0x25cb61){return _0xe923(_0x43c01-0x28b,_0x25cb61);}this[_0x594a92(0x48c,0x423)]?.['connected']&&(this['socket'][_0x594a92(0x48b,0x421)]('join',{'topic':this[_0x594a92(0x510,0x526)],'ref':this['makeRef']()}),setTimeout(()=>{function _0x4ecb92(_0x318c8d,_0x5abfbd){return _0xe923(_0x318c8d- -0x279,_0x5abfbd);}this['state']===_0x4ecb92(-0xdc,-0x89)&&(this['state']=_0x4ecb92(-0xae,-0x94),this['emit'](_0x4ecb92(-0x5f,-0xcf),_0x4ecb92(-0xc5,-0xe5)));},0x64));}['_rejoin'](){function _0x2d841b(_0x23ae02,_0x1f3e75){return _0xe923(_0x1f3e75-0x274,_0x23ae02);}this[_0x2d841b(0x46c,0x430)]&&(this[_0x2d841b(0x474,0x458)](),this[_0x2d841b(0x3c1,0x434)][_0x2d841b(0x4c2,0x4ee)]((_0x1c739a,_0x218d2b)=>{function _0x281763(_0x3b3462,_0x1792c5){return _0xe923(_0x1792c5- -0x11f,_0x3b3462);}if(_0x218d2b['startsWith'](_0x281763(0xa0,0xcd))){const filter=JSON['parse'](_0x218d2b['replace']('postgres_changes:',''));this[_0x281763(0xea,0xe2)]?.[_0x281763(0x119,0xe1)]('subscribe_postgres_changes',{'topic':this[_0x281763(0x147,0x166)],'filter':filter,'ref':this[_0x281763(0xef,0x14a)]()});}}));}[_0x36b514(0x3ab,0x3dd)](_0x23256f,_0x277718){function _0x4f4109(_0x51abf4,_0xcd718){return _0xe923(_0xcd718- -0x2ee,_0x51abf4);}if(_0x23256f==='postgres_changes'){const _0x402617=_0x4f4109(-0x164,-0x102)+JSON['stringify'](_0x277718['filter']||{});this[_0x4f4109(-0x10a,-0xee)](_0x402617,_0x277718);}else{if(_0x23256f===_0x4f4109(-0x55,-0xb2)){const _0x4a7a2e=_0x4f4109(-0x82,-0xe6)+JSON[_0x4f4109(-0x11f,-0xdf)]({'event':_0x277718[_0x4f4109(-0xfc,-0x90)]});this[_0x4f4109(-0xe3,-0xee)](_0x4a7a2e,_0x277718);}else{if(_0x23256f==='presence'){const _0x286fab=_0x4f4109(-0x9a,-0xdd)+JSON[_0x4f4109(-0x87,-0xdf)]({'event':_0x277718['event']});this[_0x4f4109(-0xd6,-0xee)](_0x286fab,_0x277718);}}}this['emit'](_0x23256f,_0x277718);}[_0x36b514(0x31a,0x356)](_0x29aa81){this[_0x3ac0fe(-0x120,-0xd9)]=_0x29aa81;function _0x3ac0fe(_0x2b711b,_0x3ffba5){return _0xe923(_0x3ffba5- -0x333,_0x2b711b);}let status;switch(_0x29aa81){case'joined':status=_0x3ac0fe(-0x1f4,-0x17f);break;case _0x3ac0fe(-0x140,-0xe4):status='CHANNEL_ERROR';break;case _0x3ac0fe(-0x155,-0x13e):status='CLOSED';break;default:return;}this['emit'](_0x3ac0fe(-0x106,-0x119),status);}[_0x36b514(0x395,0x330)](){function _0x51eaab(_0x16f294,_0x74cd69){return _0xe923(_0x74cd69- -0xd8,_0x16f294);}return Math['random']()[_0x51eaab(0x123,0xf9)](0x24)[_0x51eaab(0x117,0x117)](0x2,0xf);}[_0x36b514(0x3b5,0x343)](){function _0x30de50(_0x17ad83,_0x2c28eb){return _0xe923(_0x2c28eb- -0x13,_0x17ad83);}return this[_0x30de50(0x26f,0x247)];}}function _0xe923(_0x3b36e8,_0x5ae0ae){const _0x2a4557=_0x2a45();return _0xe923=function(_0xe92310,_0x4686b4){_0xe92310=_0xe92310-0x188;let _0x568701=_0x2a4557[_0xe92310];if(_0xe923['ZFRFny']===undefined){var _0x1569d5=function(_0x290047){const _0xec9896='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x355414='',_0x169c1b='';for(let _0x2977ba=0x0,_0xab59a6,_0x521466,_0x38a619=0x0;_0x521466=_0x290047['charAt'](_0x38a619++);~_0x521466&&(_0xab59a6=_0x2977ba%0x4?_0xab59a6*0x40+_0x521466:_0x521466,_0x2977ba++%0x4)?_0x355414+=String['fromCharCode'](0xff&_0xab59a6>>(-0x2*_0x2977ba&0x6)):0x0){_0x521466=_0xec9896['indexOf'](_0x521466);}for(let _0xb51031=0x0,_0x5a5170=_0x355414['length'];_0xb51031<_0x5a5170;_0xb51031++){_0x169c1b+='%'+('00'+_0x355414['charCodeAt'](_0xb51031)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x169c1b);};_0xe923['WkSneg']=_0x1569d5,_0x3b36e8=arguments,_0xe923['ZFRFny']=!![];}const _0x34d51d=_0x2a4557[0x0],_0x56b172=_0xe92310+_0x34d51d,_0x394c6f=_0x3b36e8[_0x56b172];return!_0x394c6f?(_0x568701=_0xe923['WkSneg'](_0x568701),_0x3b36e8[_0x56b172]=_0x568701):_0x568701=_0x394c6f,_0x568701;},_0xe923(_0x3b36e8,_0x5ae0ae);}function getEnvironment(){function _0x33c04a(_0xfdee1b,_0x1d3849){return _0xe923(_0xfdee1b- -0x385,_0x1d3849);}if(typeof navigator!==_0x33c04a(-0x1dd,-0x1cc)&&navigator[_0x33c04a(-0x131,-0x189)]===_0x33c04a(-0x1b3,-0x12b))return _0x33c04a(-0x1ad,-0x207);if(typeof window!==_0x33c04a(-0x1dd,-0x200)&&typeof document!=='undefined')return'browser';if(typeof global!=='undefined'&&typeof process!==_0x33c04a(-0x1dd,-0x201)&&process['versions']?.[_0x33c04a(-0x1af,-0x172)])return _0x33c04a(-0x1af,-0x238);return'browser';}function isSocketIOAvailable(){function _0x239034(_0x4f2808,_0x53164e){return _0xe923(_0x4f2808- -0x4f,_0x53164e);}try{const _0x3d4494=getEnvironment();switch(_0x3d4494){case'node':return typeof require!==_0x239034(0x159,0x1a8)&&require['resolve']&&!!require['resolve']('socket.io-client');case _0x239034(0x1cc,0x23c):if(typeof globalThis!==_0x239034(0x159,0x1e5)&&'io'in globalThis)return!![];return typeof require!=='undefined'&&require[_0x239034(0x1b7,0x12d)]&&!!require[_0x239034(0x1b7,0x1eb)](_0x239034(0x148,0x15c));case'react-native':try{return typeof require!=='undefined'&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x48388d(_0x73aa49,_0x407fce){return _0xe923(_0x407fce-0x20a,_0x73aa49);}try{if(typeof require!==_0x48388d(0x3d6,0x3b2))return require(_0x48388d(0x40d,0x3a1));if(typeof globalThis!==_0x48388d(0x3a8,0x3b2)&&'io'in globalThis)return{'io':globalThis['io']};throw new Error(_0x48388d(0x411,0x43d));}catch(_0x20d9a3){throw new Error(_0x48388d(0x343,0x3a4));}}class WebSocketAdapter{constructor(){function _0x4ee158(_0x306b05,_0x59553){return _0xe923(_0x306b05-0x143,_0x59553);}this[_0x4ee158(0x344,0x30a)]=null;}async['connect'](_0x271738,_0x5cd836){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:_0x20950a}=getSocketIO();return new Promise((_0x43f769,_0x18bfe2)=>{this[_0x5d4138(0x159,0x165)]=_0x20950a(_0x271738,_0x5cd836);function _0x5d4138(_0x16df0c,_0x5e83da){return _0xe923(_0x16df0c- -0xa8,_0x5e83da);}this[_0x5d4138(0x159,0x12c)]['on'](_0x5d4138(0x1eb,0x1db),()=>_0x43f769()),this['socket']['on'](_0x5d4138(0x140,0x15c),_0x34734a=>_0x18bfe2(_0x34734a));});}[_0x36b514(0x2fb,0x297)](){function _0x591c3a(_0xf8f2fb,_0x1d35ef){return _0xe923(_0xf8f2fb-0x371,_0x1d35ef);}this[_0x591c3a(0x572,0x5be)]&&(this[_0x591c3a(0x572,0x4fe)]['disconnect'](),this['socket']=null);}['emit'](_0x259e6f,data){function _0x2d92f5(_0x18f11a,_0x2e8618){return _0xe923(_0x2e8618- -0x390,_0x18f11a);}this['socket']?.[_0x2d92f5(-0x123,-0x190)](_0x259e6f,data);}['on'](_0x1e2b5d,_0x1826a6){function _0x487f9b(_0x5d17c4,_0x5964e5){return _0xe923(_0x5d17c4- -0x262,_0x5964e5);}this[_0x487f9b(-0x61,-0xe4)]?.['on'](_0x1e2b5d,_0x1826a6);}[_0x36b514(0x37c,0x359)](_0x2cd80f,_0x517230){function _0x1bacdd(_0x29d12f,_0x3814e8){return _0xe923(_0x29d12f- -0x14e,_0x3814e8);}_0x517230?this['socket']?.[_0x1bacdd(0x102,0x101)](_0x2cd80f,_0x517230):this['socket']?.[_0x1bacdd(0x102,0xd0)](_0x2cd80f);}get[_0x36b514(0x30b,0x38b)](){function _0x4878b9(_0x5f1065,_0x30f574){return _0xe923(_0x5f1065-0x144,_0x30f574);}return this[_0x4878b9(0x345,0x39e)]?.[_0x4878b9(0x323,0x323)]??![];}}class ReactNativeSocketAdapter{constructor(){function _0x50057f(_0x2f41dc,_0xf2e04f){return _0xe923(_0xf2e04f-0x2c1,_0x2f41dc);}this[_0x50057f(0x4f8,0x4c2)]=null;}async['connect'](_0x5bc5f4,_0x5bcade){if(!isSocketIOAvailable())throw new Error('Socket.io-client\x20não\x20está\x20disponível.\x20Para\x20React\x20Native,\x20instale:\x20npm\x20install\x20socket.io-client');const {io:_0x443a6e}=getSocketIO();return new Promise((_0x363ede,_0x5589a3)=>{this[_0xf489f4(-0x59,-0xab)]=_0x443a6e(_0x5bc5f4,{..._0x5bcade,'transports':['websocket'],'upgrade':![],'autoConnect':!![]});function _0xf489f4(_0x2193a4,_0x53b5f6){return _0xe923(_0x53b5f6- -0x2ac,_0x2193a4);}this[_0xf489f4(-0x39,-0xab)]['on']('connect',()=>_0x363ede()),this[_0xf489f4(-0xd7,-0xab)]['on']('connect_error',_0x245c18=>_0x5589a3(_0x245c18));});}[_0x36b514(0x2fb,0x2b4)](){this['socket']&&(this['socket']['disconnect'](),this['socket']=null);}[_0x36b514(0x32c,0x361)](_0x1df851,data){function _0x2c15ff(_0x2f522b,_0xf46781){return _0xe923(_0x2f522b- -0x16c,_0xf46781);}this[_0x2c15ff(0x95,0x11b)]?.[_0x2c15ff(0x94,0xba)](_0x1df851,data);}['on'](_0x4ce6ba,_0x686048){this['socket']?.['on'](_0x4ce6ba,_0x686048);}['off'](_0x47f203,_0x2458e1){function _0x174c4f(_0xe23380,_0x3fd856){return _0xe923(_0x3fd856- -0x17d,_0xe23380);}_0x2458e1?this['socket']?.['off'](_0x47f203,_0x2458e1):this[_0x174c4f(0x74,0x84)]?.[_0x174c4f(0xc8,0xd3)](_0x47f203);}get[_0x36b514(0x30b,0x2d4)](){function _0x2753db(_0x3576ac,_0x1247eb){return _0xe923(_0x1247eb- -0x2b4,_0x3576ac);}return this['socket']?.[_0x2753db(-0x112,-0xd5)]??![];}}function createSocketAdapter(){function _0xa10c1d(_0x26885a,_0x251c09){return _0xe923(_0x251c09- -0x178,_0x26885a);}const _0x169004=getEnvironment();switch(_0x169004){case _0xa10c1d(0x78,0x60):return new ReactNativeSocketAdapter();case'browser':case _0xa10c1d(0x32,0x5e):default:return new WebSocketAdapter();}}function _0x36b514(_0x451bec,_0x34ddc8){return _0xe923(_0x451bec-0x12c,_0x34ddc8);}class RealtimeClient{constructor(_0x10f371,_0x498cc9,_0x2bc78d={}){this[_0x3b2919(0x167,0x1a8)]=null,this['channels']=new Map(),this[_0x3b2919(0x148,0x147)]='disconnected',this[_0x3b2919(0x19c,0x20c)]=0x0,this[_0x3b2919(0xd5,0x156)]=0x5;function _0x3b2919(_0x5c3a3e,_0x36ee5c){return _0xe923(_0x36ee5c- -0x59,_0x5c3a3e);}this['url']=_0x10f371,this[_0x3b2919(0x168,0x13a)]=_0x498cc9,this[_0x3b2919(0x13d,0x154)]={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x2bc78d},this[_0x3b2919(0x1f3,0x237)]=createSocketAdapter();}[_0x36b514(0x3bf,0x387)](){return new Promise(async(_0x21d84e,_0xbc1464)=>{if(this['socketAdapter']['connected']){_0x21d84e();return;}function _0x383152(_0x59a3f0,_0x1ea0bb){return _0xe923(_0x1ea0bb- -0x248,_0x59a3f0);}this['connectionState']='connecting';try{await this['socketAdapter']['connect'](this['url'],{'auth':{'apikey':this[_0x383152(-0x70,-0xb5)]},'transports':['websocket'],'reconnection':!![],'reconnectionDelay':this[_0x383152(-0x8b,-0x9b)][_0x383152(0xa8,0x2d)],'reconnectionAttempts':this[_0x383152(-0x84,-0x9b)][_0x383152(-0xd6,-0x99)],...this['options'][_0x383152(-0xa5,-0x45)]}),this['socket']=this['socketAdapter']['socket'],this[_0x383152(-0x2b,0x48)]['on']('connect',()=>{function _0x25dd81(_0x39fd8b,_0x1f8218){return _0xe923(_0x39fd8b-0x2a7,_0x1f8218);}this['connectionState']='connected',this[_0x25dd81(0x50c,0x4e4)]=0x0,this['setupHeartbeat'](),_0x21d84e();}),this[_0x383152(0x54,0x48)]['on']('disconnect',()=>{this[_0x5f34aa(0x3f3,0x3cc)]='disconnected';function _0x5f34aa(_0x2a7116,_0xb384fe){return _0xe923(_0x2a7116-0x253,_0xb384fe);}this['channels'][_0x5f34aa(0x4cd,0x4d5)](channel=>{function _0x4de6d0(_0x3d9671,_0x394731){return _0xe923(_0x3d9671- -0x248,_0x394731);}channel['_setState'](_0x4de6d0(-0x53,-0x4e));});}),this['socketAdapter']['on']('connect_error',_0x2cac56=>{this['connectionState']='error';function _0x1150b6(_0x3f9760,_0x4f5acf){return _0xe923(_0x3f9760- -0x2bc,_0x4f5acf);}this[_0x1150b6(-0x57,-0xd6)]++,this['reconnectAttempts']>=this[_0x1150b6(-0x10d,-0x100)]&&_0xbc1464(new Error(_0x1150b6(-0x120,-0xa4)+this['maxReconnectAttempts']+'\x20attempts:\x20'+_0x2cac56[_0x1150b6(-0x113,-0x145)]));}),this['socketAdapter']['on']('reconnect',()=>{this['connectionState']='connected';function _0x580fdf(_0x409d65,_0x441957){return _0xe923(_0x409d65-0x1d5,_0x441957);}this['reconnectAttempts']=0x0,this[_0x580fdf(0x3ee,0x390)][_0x580fdf(0x44f,0x452)](channel=>{function _0x26f614(_0x24db66,_0x339b7f){return _0xe923(_0x339b7f-0x14d,_0x24db66);}channel[_0x26f614(0x36a,0x379)]();});}),this['socketAdapter']['on'](_0x383152(-0x90,-0x63),_0x3ba1f5=>{function _0xd73d8e(_0x55e383,_0x3470d2){return _0xe923(_0x3470d2-0x2d5,_0x55e383);}const channel=this['channels'][_0xd73d8e(0x487,0x49e)](_0x3ba1f5['topic']);channel&&channel[_0xd73d8e(0x546,0x554)](_0xd73d8e(0x4fd,0x4ba),_0x3ba1f5);}),this[_0x383152(-0x6,0x48)]['on'](_0x383152(-0x91,-0xc),_0x258f59=>{function _0x4ac03b(_0x2f3ce1,_0x5a77f7){return _0xe923(_0x5a77f7-0x139,_0x2f3ce1);}const channel=this['channels'][_0x4ac03b(0x298,0x302)](_0x258f59[_0x4ac03b(0x421,0x3be)]);channel&&channel[_0x4ac03b(0x3e1,0x3b8)](_0x4ac03b(0x35c,0x375),_0x258f59);}),this['socketAdapter']['on']('presence',_0x521f54=>{const channel=this['channels']['get'](_0x521f54['topic']);channel&&channel['_trigger']('presence',_0x521f54);});}catch(_0xeabfe0){this[_0x383152(-0x82,-0xa8)]=_0x383152(0x5e,0x46),_0xbc1464(_0xeabfe0);}});}[_0x36b514(0x2fb,0x31b)](){this[_0xd7ee14(0x214,0x1f4)]&&(this[_0xd7ee14(0x214,0x1c8)]['disconnect'](),this[_0xd7ee14(0x185,0x11c)]=null);function _0xd7ee14(_0x44d6d1,_0x56921d){return _0xe923(_0x44d6d1- -0x7c,_0x56921d);}this['connectionState']='disconnected',this['channels'][_0xd7ee14(0x157,0x1e0)]();}['channel'](_0x2fb12c){if(this[_0x31f218(0x333,0x393)]['has'](_0x2fb12c))return this[_0x31f218(0x381,0x393)][_0x31f218(0x2f8,0x343)](_0x2fb12c);const channel=new RealtimeChannel(_0x2fb12c,this['socket']);this['channels'][_0x31f218(0x3c5,0x400)](_0x2fb12c,channel);function _0x31f218(_0x3519a6,_0x5613e7){return _0xe923(_0x5613e7-0x17a,_0x3519a6);}return this['connectionState']==='connected'&&channel[_0x31f218(0x390,0x35e)](),channel;}['removeChannel'](channel){const _0x2564cd=channel[_0x2333f5(0x171,0x1e5)];function _0x2333f5(_0x897e04,_0x5070fc){return _0xe923(_0x5070fc- -0xa0,_0x897e04);}this['channels']['has'](_0x2564cd)&&(this[_0x2333f5(0x12d,0x179)][_0x2333f5(0x11f,0x174)](_0x2564cd),channel[_0x2333f5(0x14c,0x199)]());}[_0x36b514(0x343,0x314)](){function _0x76bee1(_0x5a2a1e,_0x3807d5){return _0xe923(_0x5a2a1e-0x159,_0x3807d5);}this['channels'][_0x76bee1(0x3d3,0x43d)](channel=>{function _0x26715b(_0x4add61,_0x4a80f2){return _0xe923(_0x4add61- -0x11d,_0x4a80f2);}channel[_0x26715b(0x11c,0xfc)]();}),this['channels'][_0x76bee1(0x32c,0x32f)]();}[_0x36b514(0x2c7,0x2ba)](){function _0x5ba1e5(_0x57e3a5,_0x20c002){return _0xe923(_0x57e3a5-0x123,_0x20c002);}return Array['from'](this[_0x5ba1e5(0x33c,0x33c)][_0x5ba1e5(0x2b8,0x2f1)]());}[_0x36b514(0x2f4,0x2ee)](){function _0x4acceb(_0x2c276d,_0x1dad6b){return _0xe923(_0x1dad6b-0x133,_0x2c276d);}return this['connectionState']===_0x4acceb(0x31a,0x312)&&this['socketAdapter'][_0x4acceb(0x329,0x312)];}['getConnectionState'](){function _0x387f3e(_0x340708,_0x3f21fb){return _0xe923(_0x3f21fb- -0x35a,_0x340708);}return this[_0x387f3e(-0x18e,-0x1ba)];}['onConnectionStateChange'](_0x187355){function _0x346d6c(_0x5aae57,_0x2026d6){return _0xe923(_0x2026d6- -0xc2,_0x5aae57);}const _0x2c8a25=()=>_0x187355(this['connectionState']);return this['socketAdapter']&&(this['socketAdapter']['on']('connect',()=>{this[_0x40ca40(0x4e3,0x533)]='connected';function _0x40ca40(_0xcc3c9e,_0x5277e7){return _0xe923(_0xcc3c9e-0x343,_0x5277e7);}_0x2c8a25();}),this[_0x346d6c(0x1d5,0x1ce)]['on']('disconnect',()=>{this['connectionState']=_0x96ba3b(0x406,0x3b6);function _0x96ba3b(_0xe11d42,_0x4086ff){return _0xe923(_0x4086ff-0x1c5,_0xe11d42);}_0x2c8a25();}),this[_0x346d6c(0x1d0,0x1ce)]['on']('connect_error',()=>{this['connectionState']=_0x4710f5(0x539,0x5b3);function _0x4710f5(_0x57d2ae,_0x1a7db2){return _0xe923(_0x1a7db2-0x325,_0x57d2ae);}_0x2c8a25();})),()=>{function _0x33a0c3(_0x41bc10,_0x44c758){return _0xe923(_0x41bc10- -0x322,_0x44c758);}this[_0x33a0c3(-0x92,-0x10)]&&(this['socketAdapter'][_0x33a0c3(-0xd2,-0xc5)]('connect',_0x2c8a25),this[_0x33a0c3(-0x92,-0xfa)]['off'](_0x33a0c3(-0x153,-0x154),_0x2c8a25),this['socketAdapter'][_0x33a0c3(-0xd2,-0x117)](_0x33a0c3(-0x13a,-0xf1),_0x2c8a25));};}[_0x36b514(0x308,0x36c)](){function _0x213ad0(_0x13a79c,_0xa95a4d){return _0xe923(_0x13a79c- -0x185,_0xa95a4d);}if(!this[_0x213ad0(0x28,0xa9)]['heartbeatInterval']||!this['socketAdapter'])return;const interval=setInterval(()=>{function _0x1b79ce(_0x30e85e,_0xf39123){return _0xe923(_0x30e85e-0x1d4,_0xf39123);}this[_0x1b79ce(0x464,0x4ad)]?.[_0x1b79ce(0x3b3,0x350)]?this[_0x1b79ce(0x464,0x46f)]['emit'](_0x1b79ce(0x35e,0x344),{'timestamp':Date['now']()}):clearInterval(interval);},this['options'][_0x213ad0(0xe9,0xae)]);}[_0x36b514(0x398,0x32e)](){function _0x23e98f(_0x5053fe,_0x47a914){return _0xe923(_0x47a914- -0x323,_0x5053fe);}return this[_0x23e98f(-0x117,-0x122)];}}class FunctionsClient{constructor(_0x110b9f){this['httpClient']=_0x110b9f;}async['invoke'](_0x4ea5fa,_0x8ef268){function _0x3bcdaa(_0x4842ee,_0x17c67b){return _0xe923(_0x17c67b- -0x3b0,_0x4842ee);}try{const _0x476d9a=_0x8ef268?.[_0x3bcdaa(-0x1bd,-0x158)]||'POST',headers={'Content-Type':'application/json',..._0x8ef268?.[_0x3bcdaa(-0x225,-0x204)]};let response;const _0x5d1d70=_0x3bcdaa(-0x109,-0x123)+_0x4ea5fa;switch(_0x476d9a[_0x3bcdaa(-0x17e,-0x1fe)]()){case'GET':response=await this[_0x3bcdaa(-0x12e,-0x138)]['get'](_0x5d1d70,{'headers':headers,'params':_0x8ef268?.[_0x3bcdaa(-0x1f2,-0x19d)]});break;case'POST':response=await this['httpClient'][_0x3bcdaa(-0x16d,-0x166)](_0x5d1d70,_0x8ef268?.[_0x3bcdaa(-0x1a1,-0x19d)],{'headers':headers});break;case'PUT':response=await this['httpClient'][_0x3bcdaa(-0x16e,-0x1c7)](_0x5d1d70,_0x8ef268?.['body'],{'headers':headers});break;case'PATCH':response=await this[_0x3bcdaa(-0xac,-0x138)]['patch'](_0x5d1d70,_0x8ef268?.['body'],{'headers':headers});break;case'DELETE':response=await this[_0x3bcdaa(-0x15d,-0x138)][_0x3bcdaa(-0x124,-0x19c)](_0x5d1d70,{'headers':headers,'data':_0x8ef268?.[_0x3bcdaa(-0x1d9,-0x19d)]});break;default:throw new EBaaSError('Unsupported\x20HTTP\x20method:\x20'+_0x476d9a,0x190);}return{'data':response['data'],'error':null};}catch(_0x104243){return{'data':null,'error':_0x104243 instanceof EBaaSError?_0x104243:new EBaaSError(_0x104243 instanceof Error?_0x104243['message']:_0x3bcdaa(-0x11d,-0x11a),0x0,_0x104243)};}}async[_0x36b514(0x381,0x39b)](){function _0x3d2e5e(_0x3316d3,_0xd62096){return _0xe923(_0x3316d3- -0x3b3,_0xd62096);}try{const response=await this[_0x3d2e5e(-0x13b,-0x102)][_0x3d2e5e(-0x1ea,-0x1d2)]('/functions/v1');return{'data':response[_0x3d2e5e(-0x22a,-0x25b)],'error':null};}catch(_0x3afaa6){return{'data':null,'error':_0x3afaa6 instanceof EBaaSError?_0x3afaa6:new EBaaSError(_0x3afaa6 instanceof Error?_0x3afaa6['message']:_0x3d2e5e(-0x124,-0x172),0x0,_0x3afaa6)};}}async[_0x36b514(0x2f5,0x34e)](_0x5c3559){function _0x54b8ea(_0x299a15,_0xcd1a87){return _0xe923(_0xcd1a87-0x2f4,_0x299a15);}try{const response=await this[_0x54b8ea(0x53e,0x56c)]['get']('/functions/v1/'+_0x5c3559+_0x54b8ea(0x571,0x585));return{'data':response[_0x54b8ea(0x4b4,0x47d)],'error':null};}catch(_0x310e23){return{'data':null,'error':_0x310e23 instanceof EBaaSError?_0x310e23:new EBaaSError(_0x310e23 instanceof Error?_0x310e23['message']:'Failed\x20to\x20get\x20function',0x0,_0x310e23)};}}async[_0x36b514(0x3a7,0x400)](_0x5d6b26,_0x3adf11){function _0x47a002(_0x2f3401,_0xe0a142){return _0xe923(_0xe0a142-0x1ae,_0x2f3401);}try{const _0x526ab9=new FormData();if(_0x3adf11['code']instanceof File)_0x526ab9[_0x47a002(0x41f,0x3ed)]('code',_0x3adf11['code']);else typeof _0x3adf11['code']===_0x47a002(0x323,0x35f)&&_0x526ab9[_0x47a002(0x466,0x3ed)]('code',new Blob([_0x3adf11[_0x47a002(0x45c,0x416)]],{'type':'text/plain'}),'index.ts');_0x3adf11['entrypoint']&&_0x526ab9['append']('entrypoint',_0x3adf11[_0x47a002(0x3dc,0x401)]);_0x3adf11[_0x47a002(0x372,0x38f)]&&_0x526ab9['append'](_0x47a002(0x3ff,0x38f),JSON[_0x47a002(0x351,0x3bd)](_0x3adf11[_0x47a002(0x333,0x38f)]));_0x3adf11[_0x47a002(0x3d2,0x443)]&&_0x526ab9['append'](_0x47a002(0x465,0x443),JSON['stringify'](_0x3adf11[_0x47a002(0x4c7,0x443)]));_0x3adf11['verify']!==undefined&&_0x526ab9['append']('verify',String(_0x3adf11[_0x47a002(0x4aa,0x42c)]));const response=await this[_0x47a002(0x46b,0x426)][_0x47a002(0x384,0x3f8)](_0x47a002(0x438,0x43b)+_0x5d6b26+_0x47a002(0x454,0x3cc),_0x526ab9,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response['data'],'error':null};}catch(_0x394bb9){return{'data':null,'error':_0x394bb9 instanceof EBaaSError?_0x394bb9:new EBaaSError(_0x394bb9 instanceof Error?_0x394bb9[_0x47a002(0x363,0x357)]:'Failed\x20to\x20deploy\x20function',0x0,_0x394bb9)};}}async['delete'](_0x5592fb){function _0x42c87e(_0x4aade2,_0x42750b){return _0xe923(_0x42750b-0x2f,_0x4aade2);}try{const response=await this['httpClient'][_0x42c87e(0x204,0x243)](_0x42c87e(0x2f9,0x2bc)+_0x5592fb);return{'data':response[_0x42c87e(0x160,0x1b8)],'error':null};}catch(_0x31a0af){return{'data':null,'error':_0x31a0af instanceof EBaaSError?_0x31a0af:new EBaaSError(_0x31a0af instanceof Error?_0x31a0af['message']:_0x42c87e(0x1e3,0x247),0x0,_0x31a0af)};}}async['updateEnv'](_0x5317b0,_0x57174d){function _0x5147f3(_0x3a1edb,_0xdcf44c){return _0xe923(_0xdcf44c- -0x265,_0x3a1edb);}try{const response=await this[_0x5147f3(0x1c,0x13)]['put']('/functions/v1/'+_0x5317b0+'/env',{'env':_0x57174d});return{'data':response['data'],'error':null};}catch(_0x4cef77){return{'data':null,'error':_0x4cef77 instanceof EBaaSError?_0x4cef77:new EBaaSError(_0x4cef77 instanceof Error?_0x4cef77['message']:_0x5147f3(-0xf5,-0x6a),0x0,_0x4cef77)};}}async['getLogs'](_0x30e0ed,_0x2ad1c8){function _0x29e9b3(_0x51c215,_0x943bc7){return _0xe923(_0x943bc7- -0x31b,_0x51c215);}try{const _0x3d2942=new URLSearchParams();_0x2ad1c8?.[_0x29e9b3(-0x106,-0x109)]&&_0x3d2942[_0x29e9b3(-0x12c,-0xdc)]('limit',String(_0x2ad1c8[_0x29e9b3(-0xfb,-0x109)]));_0x2ad1c8?.[_0x29e9b3(-0x8a,-0xaa)]&&_0x3d2942['append'](_0x29e9b3(-0x11d,-0xaa),String(_0x2ad1c8[_0x29e9b3(-0xd8,-0xaa)]));_0x2ad1c8?.['level']&&_0x3d2942[_0x29e9b3(-0xf3,-0xdc)]('level',_0x2ad1c8[_0x29e9b3(-0x148,-0x130)]);const _0x38ca27=_0x29e9b3(-0x99,-0x8e)+_0x30e0ed+_0x29e9b3(-0x1e3,-0x18e)+(_0x3d2942[_0x29e9b3(-0xeb,-0x14a)]()?'?'+_0x3d2942[_0x29e9b3(-0x18f,-0x14a)]():''),response=await this['httpClient'][_0x29e9b3(-0x1ba,-0x152)](_0x38ca27);return{'data':response[_0x29e9b3(-0x15a,-0x192)],'error':null};}catch(_0x2e9bfb){return{'data':null,'error':_0x2e9bfb instanceof EBaaSError?_0x2e9bfb:new EBaaSError(_0x2e9bfb instanceof Error?_0x2e9bfb['message']:_0x29e9b3(-0x1b4,-0x135),0x0,_0x2e9bfb)};}}async['getMetrics'](_0x788087,_0xf4cdd4){function _0x2faeb9(_0x1f7501,_0x57ea5c){return _0xe923(_0x57ea5c- -0x1f3,_0x1f7501);}try{const _0x164350=new URLSearchParams();_0xf4cdd4?.[_0x2faeb9(0xc3,0x6f)]&&_0x164350[_0x2faeb9(0xb3,0x4c)]('period',_0xf4cdd4['period']);const _0x46d165=_0x2faeb9(0x44,0x9a)+_0x788087+_0x2faeb9(0xc1,0x3c)+(_0x164350[_0x2faeb9(-0xa9,-0x22)]()?'?'+_0x164350[_0x2faeb9(-0x55,-0x22)]():''),response=await this[_0x2faeb9(0x3d,0x85)]['get'](_0x46d165);return{'data':response[_0x2faeb9(-0xc3,-0x6a)],'error':null};}catch(_0x274e59){return{'data':null,'error':_0x274e59 instanceof EBaaSError?_0x274e59:new EBaaSError(_0x274e59 instanceof Error?_0x274e59['message']:_0x2faeb9(-0x9,-0x31),0x0,_0x274e59)};}}}class EBaaSClient{constructor(_0x3f9fd6,_0x18213c,_0x35fb89){this[_0x3cd155(-0x10a,-0x174)]=_0x35fb89,this[_0x3cd155(-0x78,-0xa9)]=new HttpClient({'url':_0x3f9fd6,'apiKey':_0x18213c,'timeout':0x7530,'headers':_0x35fb89?.[_0x3cd155(-0xf9,-0x87)]?.[_0x3cd155(-0x1eb,-0x175)]}),this['auth']=new AuthClient(this[_0x3cd155(-0x10a,-0xa9)],_0x35fb89?.[_0x3cd155(-0x8b,-0xa4)]?.[_0x3cd155(-0x161,-0x18d)]);function _0x3cd155(_0x2ed95a,_0x4d46b1){return _0xe923(_0x4d46b1- -0x321,_0x2ed95a);}this['database']=new DatabaseClient(this[_0x3cd155(-0x7d,-0xa9)],_0x35fb89?.[_0x3cd155(-0x12e,-0xa4)]?.[_0x3cd155(-0x154,-0x18d)]),this['storage']=new StorageClient(this[_0x3cd155(-0x87,-0xa9)]),this[_0x3cd155(-0xab,-0xa5)]=new RealtimeClient(_0x3f9fd6,_0x18213c,_0x35fb89?.[_0x3cd155(-0xc8,-0xa5)]),this['functions']=new FunctionsClient(this['httpClient']),this['initializeCustomDatabase']();}[_0x36b514(0x2d3,0x2d5)](_0xe8c080){return this['database']['from'](_0xe8c080);}[_0x36b514(0x387,0x32c)](_0x1bc956,_0x194f85){function _0x4644ef(_0x789f83,_0x570b98){return _0xe923(_0x789f83- -0x17b,_0x570b98);}return this['database'][_0x4644ef(0xe0,0x154)](_0x1bc956,_0x194f85);}[_0x36b514(0x3c8,0x3bb)](_0x16d7b9){function _0x50fcad(_0x323d6f,_0x130bfd){return _0xe923(_0x323d6f-0x194,_0x130bfd);}return this[_0x50fcad(0x428,0x3e4)]['from'](_0x16d7b9);}[_0x36b514(0x352,0x383)](_0x445336){return this['realtime']['channel'](_0x445336);}['invoke'](_0x1ec717,_0x96c2df){function _0x44ec31(_0x35f456,_0x93be23){return _0xe923(_0x93be23-0x366,_0x35f456);}return this['functions'][_0x44ec31(0x578,0x4f8)](_0x1ec717,_0x96c2df);}async['initializeCustomDatabase'](){function _0x5870c0(_0xd884e9,_0x5e3999){return _0xe923(_0xd884e9-0x37e,_0x5e3999);}if(this[_0x5870c0(0x52b,0x52a)]?.['database']?.['autoDetectCustomDatabase'])try{await this[_0x5870c0(0x5fb,0x650)][_0x5870c0(0x619,0x69b)]();}catch(_0x55d507){console[_0x5870c0(0x593,0x581)]('Failed to initialize custom database detection:',_0x55d507);}}async['setWorkspaceId'](_0x33ed04){function _0x33a28d(_0x3251a4,_0x90d81f){return _0xe923(_0x90d81f- -0x20c,_0x3251a4);}this['auth']['setWorkspaceId'](_0x33ed04),this['database'][_0x33a28d(0x9c,0x31)](_0x33ed04),this[_0x33a28d(-0x1,-0x5f)]?.[_0x33a28d(0x78,0x71)]?.['autoDetectCustomDatabase']&&await this[_0x33a28d(0xe3,0x71)]['initialize']();}async['configureCustomDatabase'](_0x330091){await this['database']['configureCustomDatabase'](_0x330091);}[_0x36b514(0x2ea,0x296)](){function _0x5be215(_0x59a663,_0xa04b37){return _0xe923(_0x59a663-0x24c,_0xa04b37);}return this[_0x5be215(0x4c9,0x512)][_0x5be215(0x40a,0x3b0)]();}}function createClient(_0x1738fc,_0xa107e,_0x3dffb5){return new EBaaSClient(_0x1738fc,_0xa107e,_0x3dffb5);}const version=_0x36b514(0x325,0x2ae);exports[_0x36b514(0x37d,0x380)]=AuthClient,exports[_0x36b514(0x2e1,0x361)]=CustomDatabaseManager,exports['DatabaseClient']=DatabaseClient,exports[_0x36b514(0x322,0x29a)]=EBaaSClient,exports['EBaaSError']=EBaaSError,exports['FunctionsClient']=FunctionsClient,exports[_0x36b514(0x3b7,0x41d)]=HttpClient,exports['QueryBuilder']=QueryBuilder,exports[_0x36b514(0x3b0,0x429)]=RealtimeChannel,exports['RealtimeClient']=RealtimeClient,exports['StorageBucket']=StorageBucket,exports[_0x36b514(0x2e5,0x274)]=StorageClient,exports['createClient']=createClient,exports['version']=version;
|
|
1
|
+
'use strict';(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x1ce845(_0x2de47c,_0x3b7bc8){return _0x4da2(_0x3b7bc8- -0x183,_0x2de47c);}while(!![]){try{const _0x5214f1=parseInt(_0x1ce845(0x155,0x16e))/0x1+-parseInt(_0x1ce845(0xd,0x84))/0x2*(-parseInt(_0x1ce845(0x74,0x71))/0x3)+-parseInt(_0x1ce845(0xaa,0xa6))/0x4+parseInt(_0x1ce845(0x148,0x13c))/0x5+parseInt(_0x1ce845(0xaf,0xed))/0x6+-parseInt(_0x1ce845(0x47,0x97))/0x7+-parseInt(_0x1ce845(0x15c,0x13d))/0x8;if(_0x5214f1===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x3c5f31){stringArray['push'](stringArray['shift']());}}}(_0x39f8,0x1c638));var axios=require(_0x347d1c(-0x104,-0x161));class EBaaSError extends Error{constructor(_0x10f038,status=0x0,_0x2bdc15){super(_0x10f038),this[_0xc1c899(0x3a5,0x3d3)]=_0xc1c899(0x382,0x3f7),this['status']=status;function _0xc1c899(_0x2c6972,_0x1adc51){return _0x4da2(_0x2c6972-0xbc,_0x1adc51);}this['details']=_0x2bdc15,Error[_0xc1c899(0x395,0x39a)]&&Error[_0xc1c899(0x395,0x3b9)](this,EBaaSError);}[_0x347d1c(-0x44,-0xa8)](){function _0x579ec6(_0x472a60,_0x422bd3){return _0x4da2(_0x422bd3-0x255,_0x472a60);}return{'name':this[_0x579ec6(0x52e,0x53e)],'message':this['message'],'status':this['status'],'details':this['details'],'stack':this['stack']};}[_0x347d1c(-0xfb,-0x110)](){function _0x5b692f(_0x7455a9,_0x55739f){return _0x4da2(_0x55739f- -0x2c5,_0x7455a9);}return this['name']+':\x20'+this[_0x5b692f(0x4a,-0x9)]+'\x20(Status:\x20'+this[_0x5b692f(-0x14a,-0xc1)]+')';}}class HttpClient{constructor(config){this['baseURL']=config['url'],this[_0x560215(0x138,0x196)]=config[_0x560215(0x1fc,0x196)],this[_0x560215(0x22c,0x25a)]=axios[_0x560215(0x1eb,0x223)]({'baseURL':this['baseURL'],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x560215(0x18d,0x196)],...config['headers']}});function _0x560215(_0x47a710,_0x5a2472){return _0x4da2(_0x5a2472- -0x56,_0x47a710);}this[_0x560215(0x20d,0x1f9)]();}['setupInterceptors'](){function _0x4d8a55(_0x3a4b66,_0x34f415){return _0x4da2(_0x34f415- -0x313,_0x3a4b66);}this['client']['interceptors'][_0x4d8a55(0x36,-0x30)][_0x4d8a55(-0xf0,-0xdd)](config=>{return config;},_0x32cfaf=>{function _0x5443fb(_0x2a4600,_0xc89296){return _0x4da2(_0x2a4600- -0x9,_0xc89296);}return Promise['reject'](new EBaaSError(_0x5443fb(0x234,0x249),0x0,_0x32cfaf));}),this['client'][_0x4d8a55(0x5,-0x49)]['response']['use'](response=>{return response;},_0x55abfb=>{const status=_0x55abfb[_0x4f0201(0x486,0x502)]?.['status']||0x0,_0x32fd56=_0x55abfb['response']?.['data']?.['message']||_0x55abfb['message']||'Unknown\x20error';function _0x4f0201(_0x3b4118,_0x129ea7){return _0x4da2(_0x3b4118-0x215,_0x129ea7);}const _0x2c2b64=_0x55abfb['response']?.[_0x4f0201(0x444,0x4ac)]||_0x55abfb;return Promise[_0x4f0201(0x427,0x48a)](new EBaaSError(_0x32fd56,status,_0x2c2b64));});}async['get'](_0x273d4c,config){function _0x751f87(_0x52571f,_0x289f50){return _0x4da2(_0x52571f- -0x4d,_0x289f50);}try{const response=await this['client'][_0x751f87(0x2a1,0x2d6)](_0x273d4c,config);return{'data':response[_0x751f87(0x1e2,0x193)],'status':response['status'],'statusText':response[_0x751f87(0x1d6,0x1d2)],'headers':response['headers']};}catch(_0x1d5089){throw this[_0x751f87(0x1b8,0x1a3)](_0x1d5089);}}async[_0x347d1c(-0x77,-0xac)](_0x302d7d,data,config){function _0x129c50(_0x5c206f,_0xa69451){return _0x4da2(_0xa69451- -0x37a,_0x5c206f);}try{const response=await this[_0x129c50(-0x124,-0xca)]['post'](_0x302d7d,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x129c50(-0x135,-0x180)]};}catch(_0x4a4919){throw this['handleError'](_0x4a4919);}}async['put'](_0x298578,data,config){function _0xdf1677(_0x104f03,_0x694750){return _0x4da2(_0x694750- -0x243,_0x104f03);}try{const response=await this[_0xdf1677(-0xe,0x6d)]['put'](_0x298578,data,config);return{'data':response[_0xdf1677(0x2b,-0x14)],'status':response[_0xdf1677(0x4d,-0x3f)],'statusText':response[_0xdf1677(0x4e,-0x20)],'headers':response[_0xdf1677(-0xb9,-0x49)]};}catch(_0x4f9adc){throw this['handleError'](_0x4f9adc);}}async[_0x347d1c(-0x1af,-0x172)](_0x1a0b0b,data,config){function _0x4192b8(_0x59235c,_0x568144){return _0x4da2(_0x59235c-0x19f,_0x568144);}try{const response=await this['client']['patch'](_0x1a0b0b,data,config);return{'data':response[_0x4192b8(0x3ce,0x435)],'status':response[_0x4192b8(0x3a3,0x3f4)],'statusText':response[_0x4192b8(0x3c2,0x434)],'headers':response[_0x4192b8(0x399,0x3c7)]};}catch(_0x2d78e7){throw this[_0x4192b8(0x3a4,0x345)](_0x2d78e7);}}async[_0x347d1c(-0x121,-0xcc)](_0x14fdd8,config){function _0x47cf99(_0x273e67,_0x440629){return _0x4da2(_0x273e67- -0x248,_0x440629);}try{const response=await this['client'][_0x47cf99(0x66,0xde)](_0x14fdd8,config);return{'data':response[_0x47cf99(-0x19,-0xa3)],'status':response['status'],'statusText':response[_0x47cf99(-0x25,-0x7)],'headers':response['headers']};}catch(_0x4490e3){throw this['handleError'](_0x4490e3);}}[_0x347d1c(-0x1aa,-0x182)](_0x3b4cf2){function _0x523906(_0x175ea1,_0x57822e){return _0x4da2(_0x175ea1-0x387,_0x57822e);}this[_0x523906(0x637,0x6b3)]['defaults'][_0x523906(0x581,0x5da)][_0x523906(0x584,0x60e)]['Authorization']='Bearer\x20'+_0x3b4cf2;}[_0x347d1c(-0x17c,-0x140)](){function _0x2025f7(_0x58dbbb,_0x181825){return _0x4da2(_0x181825-0x57,_0x58dbbb);}delete this['client'][_0x2025f7(0x309,0x2bb)]['headers']['common']['Authorization'],this['client']['defaults'][_0x2025f7(0x252,0x251)]['common']['Authorization']=_0x2025f7(0x23f,0x256)+this[_0x2025f7(0x283,0x243)];}[_0x347d1c(-0x11a,-0x175)](_0x36d121){if(_0x36d121 instanceof EBaaSError)return _0x36d121;function _0x48f40d(_0x4cf509,_0x5ccfcd){return _0x4da2(_0x5ccfcd-0x13f,_0x4cf509);}return new EBaaSError(_0x36d121[_0x48f40d(0x386,0x3fb)]||_0x48f40d(0x37c,0x34c),_0x36d121[_0x48f40d(0x312,0x343)]||0x0,_0x36d121);}}class AuthClient{constructor(_0x13f2d5,_0x17e455){this['currentSession']=null;function _0x506a69(_0x497108,_0x1f7f46){return _0x4da2(_0x1f7f46-0x199,_0x497108);}this[_0x506a69(0x46b,0x439)]=_0x13f2d5,this['workspaceId']=_0x17e455,this['loadSession']();}async['signUp'](data){function _0x21b0fe(_0x2c860f,_0x1b8195){return _0x4da2(_0x1b8195-0x108,_0x2c860f);}try{const response=await this['httpClient']['post']('/auth/v1/signup',data);return response[_0x21b0fe(0x309,0x337)][_0x21b0fe(0x412,0x3a7)]&&this['setSessionInternal'](response[_0x21b0fe(0x2c7,0x337)]['session']),response[_0x21b0fe(0x37a,0x337)];}catch(_0x5161f0){throw this[_0x21b0fe(0x429,0x3f3)](_0x5161f0);}}async['signIn'](data){function _0x549db0(_0x188d7d,_0x15aeb0){return _0x4da2(_0x188d7d-0x24c,_0x15aeb0);}try{const headers={};this['workspaceId']&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this[_0x549db0(0x4ec,0x4c4)]['post']('/auth/v1/sdk/signin',data,{'headers':headers});return response['data'][_0x549db0(0x4eb,0x4f7)]&&this[_0x549db0(0x487,0x480)](response['data'][_0x549db0(0x4eb,0x49a)]),response[_0x549db0(0x47b,0x3fd)];}catch(_0x27a86b){throw this['handleAuthError'](_0x27a86b);}}async['signOut'](){function _0xa0e8e4(_0x397c0e,_0xe9eb4a){return _0x4da2(_0xe9eb4a- -0x19a,_0x397c0e);}try{await this['httpClient'][_0xa0e8e4(0x178,0x134)]('/auth/v1/signout'),this[_0xa0e8e4(0xaf,0x59)]();}catch(_0x5e4a23){this[_0xa0e8e4(-0x16,0x59)]();throw this['handleAuthError'](_0x5e4a23);}}async['getUser'](){if(!this[_0x1801ef(0x2f1,0x2c0)]?.[_0x1801ef(0x2c7,0x2cc)])return null;function _0x1801ef(_0x436155,_0x2196bf){return _0x4da2(_0x2196bf-0x66,_0x436155);}try{const response=await this[_0x1801ef(0x33b,0x306)][_0x1801ef(0x2ef,0x354)]('/auth/v1/user');return response['data'][_0x1801ef(0x26d,0x28a)];}catch(_0x2f86dc){if(_0x2f86dc instanceof EBaaSError&&_0x2f86dc['status']===0x191)return this['clearSession'](),null;throw this['handleAuthError'](_0x2f86dc);}}async['refreshSession'](){if(!this[_0x2f060c(0x483,0x3fe)]?.[_0x2f060c(0x462,0x41f)])return null;function _0x2f060c(_0x24059a,_0x40cc52){return _0x4da2(_0x40cc52-0x1a4,_0x24059a);}try{const response=await this[_0x2f060c(0x488,0x444)][_0x2f060c(0x40c,0x472)]('/auth/v1/refresh',{'refresh_token':this[_0x2f060c(0x3fc,0x3fe)]['refresh_token']});if(response[_0x2f060c(0x44d,0x3d3)]['session'])return this['setSession'](response['data']['session']),response['data']['session'];return null;}catch(_0x3d8f79){this['clearSession']();throw this['handleAuthError'](_0x3d8f79);}}async[_0x347d1c(-0x1e2,-0x164)](_0x41fafa){try{await this['httpClient']['post']('/auth/v1/reset-password',{'email':_0x41fafa});}catch(_0x56046d){throw this['handleAuthError'](_0x56046d);}}async['updateUser'](data){function _0x2c3f79(_0x581cf0,_0x3683f8){return _0x4da2(_0x3683f8-0x30,_0x581cf0);}try{const response=await this[_0x2c3f79(0x2a3,0x2d0)]['put']('/auth/v1/user',data);return response['data']['user'];}catch(_0x281f9a){throw this['handleAuthError'](_0x281f9a);}}[_0x347d1c(-0x18d,-0x12a)](){function _0x4d4900(_0x39a42d,_0xcef37f){return _0x4da2(_0x39a42d- -0x221,_0xcef37f);}return this[_0x4d4900(0x39,-0x6)];}[_0x347d1c(-0xe2,-0x11d)](_0x29b8ef){function _0x19cefb(_0x1bb1aa,_0x193b45){return _0x4da2(_0x193b45-0x323,_0x1bb1aa);}this['currentSession']=_0x29b8ef,this[_0x19cefb(0x5cf,0x5c3)][_0x19cefb(0x57e,0x51b)](_0x29b8ef[_0x19cefb(0x501,0x589)]),typeof localStorage!==_0x19cefb(0x605,0x5f9)&&localStorage[_0x19cefb(0x53f,0x5b0)](_0x19cefb(0x589,0x554),JSON[_0x19cefb(0x554,0x5c1)](_0x29b8ef));}['onAuthStateChange'](_0x3aea52){return()=>{};}[_0x347d1c(-0x39,-0x95)](_0x144442){function _0x19b76c(_0x32a6fe,_0x137d99){return _0x4da2(_0x137d99- -0xe,_0x32a6fe);}this[_0x19b76c(0x258,0x29b)]=_0x144442;}[_0x347d1c(-0x16c,-0x13f)](_0x45251c){function _0x3bee88(_0x4df9b4,_0x4e2f7f){return _0x4da2(_0x4e2f7f-0x2a6,_0x4df9b4);}this['currentSession']=_0x45251c,this['httpClient'][_0x3bee88(0x4fb,0x49e)](_0x45251c[_0x3bee88(0x528,0x50c)]),typeof localStorage!==_0x3bee88(0x58f,0x57c)&&localStorage['setItem'](_0x3bee88(0x543,0x4d7),JSON['stringify'](_0x45251c));}[_0x347d1c(-0x1eb,-0x187)](){this['currentSession']=null;function _0x4e8854(_0x20f2b0,_0x3db7ae){return _0x4da2(_0x3db7ae- -0x2d9,_0x20f2b0);}this[_0x4e8854(-0x29,-0x39)]['removeAuthToken'](),typeof localStorage!==_0x4e8854(-0x57,-0x3)&&localStorage['removeItem'](_0x4e8854(-0xd4,-0xa8));}[_0x347d1c(-0x117,-0x171)](){function _0x1a73d4(_0xb882c8,_0x321617){return _0x4da2(_0xb882c8-0x22c,_0x321617);}if(typeof localStorage!==_0x1a73d4(0x502,0x543)){const _0x1d4207=localStorage[_0x1a73d4(0x43f,0x457)]('ebaas.auth.session');if(_0x1d4207)try{const _0x3d7219=JSON['parse'](_0x1d4207);this[_0x1a73d4(0x467,0x448)](_0x3d7219);}catch(_0x2f307f){this[_0x1a73d4(0x41f,0x3de)]();}}}[_0x347d1c(-0xcc,-0x8f)](_0x6baf90){function _0x20958b(_0x2d9f8a,_0x1e9151){return _0x4da2(_0x1e9151- -0x381,_0x2d9f8a);}if(_0x6baf90 instanceof EBaaSError)return _0x6baf90;return new EBaaSError(_0x6baf90[_0x20958b(-0xa0,-0xc5)]||'Authentication\x20failed',_0x6baf90['status']||0x0,_0x6baf90);}}class QueryBuilder{constructor(_0x5e64eb,_0x1c718c,_0x5c56de,_0x2c6d12){this['httpClient']=_0x5e64eb,this[_0x4eba93(0x2b0,0x2a5)]=_0x1c718c,this[_0x4eba93(0x262,0x251)]=_0x5c56de,this[_0x4eba93(0x28c,0x208)]=_0x2c6d12;function _0x4eba93(_0x1356dc,_0x1271b9){return _0x4da2(_0x1356dc- -0x1d,_0x1271b9);}this['query']={'filters':[]};}[_0x347d1c(-0xc2,-0xe8)](_0x48584a='*',_0x307ac9){return this['query']['select']=_0x48584a,this;}['insert'](data,_0x4b8db6){return this['executeQuery']('POST','/sdk/v1/'+this['table']+'?operation=insert',{'data':data,'options':_0x4b8db6});}[_0x347d1c(-0x111,-0x18f)](data,_0x538343){function _0x57571d(_0x5adeca,_0x227996){return _0x4da2(_0x227996- -0x346,_0x5adeca);}return this[_0x57571d(-0x9d,-0x71)][_0x57571d(-0x12f,-0xe7)]=data,this[_0x57571d(-0xdc,-0x71)][_0x57571d(-0x185,-0x158)]=_0x538343,this;}[_0x347d1c(-0xfc,-0xde)](data,_0x2455a0){function _0x19a1b3(_0x313c14,_0x142b20){return _0x4da2(_0x142b20- -0xd9,_0x313c14);}return this['executeQuery']('POST','/sdk/v1/'+this[_0x19a1b3(0x20f,0x1f4)]+'?operation=upsert',{'data':data,'options':{..._0x2455a0,'upsert':!![]}});}[_0x347d1c(-0xe9,-0xcc)](_0x2d8268){this[_0x13a751(0x27f,0x207)][_0x13a751(0x194,0x1e6)]=_0x2d8268,this['query']['isDelete']=!![];function _0x13a751(_0x54276b,_0x4b0d9d){return _0x4da2(_0x4b0d9d- -0xce,_0x54276b);}return this;}['eq'](_0x369da7,_0x10430e){this[_0x472bd2(0x587,0x5ab)][_0x472bd2(0x529,0x52a)][_0x472bd2(0x4fd,0x567)]({'column':_0x369da7,'operator':'eq','value':_0x10430e});function _0x472bd2(_0x54ad73,_0x38cbc1){return _0x4da2(_0x38cbc1-0x2d6,_0x54ad73);}return this;}[_0x347d1c(-0xd6,-0x8a)](_0x436bc2,_0x90c880){this['query'][_0x22c2f4(-0xb0,-0x131)]['push']({'column':_0x436bc2,'operator':'neq','value':_0x90c880});function _0x22c2f4(_0x4b32c8,_0x36553c){return _0x4da2(_0x36553c- -0x385,_0x4b32c8);}return this;}['gt'](_0x33fcb5,_0x100d35){function _0x135b32(_0x11bd1d,_0x6e0baf){return _0x4da2(_0x6e0baf-0x1d9,_0x11bd1d);}return this['query']['filters'][_0x135b32(0x475,0x46a)]({'column':_0x33fcb5,'operator':'gt','value':_0x100d35}),this;}['gte'](_0x13e68e,_0x4d76a5){this['query'][_0x3590ce(0x162,0x1de)][_0x3590ce(0x281,0x21b)]({'column':_0x13e68e,'operator':_0x3590ce(0x1c9,0x1c9),'value':_0x4d76a5});function _0x3590ce(_0x4c94e5,_0x4c7ac4){return _0x4da2(_0x4c7ac4- -0x76,_0x4c94e5);}return this;}['lt'](_0x128adc,_0x125bf6){this[_0x17281f(0x551,0x50b)][_0x17281f(0x4d0,0x541)]['push']({'column':_0x128adc,'operator':'lt','value':_0x125bf6});function _0x17281f(_0x1195c8,_0x4372b1){return _0x4da2(_0x1195c8-0x27c,_0x4372b1);}return this;}[_0x347d1c(-0x98,-0xe3)](_0x377eaa,_0x162a29){function _0x29c5f8(_0x413741,_0x2b52cc){return _0x4da2(_0x2b52cc-0x2fb,_0x413741);}return this[_0x29c5f8(0x552,0x5d0)]['filters']['push']({'column':_0x377eaa,'operator':'lte','value':_0x162a29}),this;}['like'](_0x2f1905,_0x4e320e){this['query'][_0x509996(-0x56,-0x71)][_0x509996(-0x19,-0x83)]({'column':_0x2f1905,'operator':_0x509996(-0x64,0x1b),'value':_0x4e320e});function _0x509996(_0xc0b8c3,_0x52f239){return _0x4da2(_0xc0b8c3- -0x2aa,_0x52f239);}return this;}[_0x347d1c(-0x178,-0x13c)](_0x45d735,_0x1b6cbf){return this['query']['filters']['push']({'column':_0x45d735,'operator':'ilike','value':_0x1b6cbf}),this;}['is'](_0x58b65f,_0x256537){this[_0x124f13(0x76,0x53)]['filters']['push']({'column':_0x58b65f,'operator':'is','value':_0x256537});function _0x124f13(_0x3600bb,_0x580011){return _0x4da2(_0x3600bb- -0x25f,_0x580011);}return this;}['in'](_0x153d99,_0x394efe){this['query'][_0x1dfd88(0x3c,0x76)]['push']({'column':_0x153d99,'operator':'in','value':_0x394efe});function _0x1dfd88(_0x12091e,_0x358d6e){return _0x4da2(_0x12091e- -0x218,_0x358d6e);}return this;}[_0x347d1c(-0xf9,-0x87)](_0x105275,_0xbedd54){this[_0x56a46a(0x19c,0x174)][_0x56a46a(0x11a,0xf3)]['push']({'column':_0x105275,'operator':'contains','value':_0xbedd54});function _0x56a46a(_0x24e5e3,_0x290930){return _0x4da2(_0x290930- -0x161,_0x24e5e3);}return this;}['match'](_0x4baaed){function _0x48b66d(_0x3747a0,_0x485ed7){return _0x4da2(_0x485ed7-0x74,_0x3747a0);}return Object[_0x48b66d(0x2cc,0x2db)](_0x4baaed)['forEach'](([_0x3fbb88,_0x268bab])=>{this['eq'](_0x3fbb88,_0x268bab);}),this;}['order'](_0x3a5f58,_0x12ba10){function _0xffbc3c(_0x2b1e5f,_0x512cb7){return _0x4da2(_0x512cb7-0x19b,_0x2b1e5f);}return!this[_0xffbc3c(0x4a0,0x470)]['order']&&(this[_0xffbc3c(0x455,0x470)]['order']=[]),this['query']['order']['push']({'column':_0x3a5f58,'ascending':_0x12ba10?.[_0xffbc3c(0x3f3,0x38a)]!==![]}),this;}['limit'](count){function _0x2ec6c0(_0x227bf3,_0x6a8a01){return _0x4da2(_0x6a8a01- -0x1cf,_0x227bf3);}return this[_0x2ec6c0(0x8c,0x106)]['limit']=count,this;}[_0x347d1c(-0x1cb,-0x17c)](from,_0x438054){return this['query']['range']={'from':from,'to':_0x438054},this;}async[_0x347d1c(-0xe2,-0xfc)](){function _0x42e57f(_0x1b8049,_0x2207fb){return _0x4da2(_0x1b8049-0x303,_0x2207fb);}if(this['query'][_0x42e57f(0x562,0x53b)])return this['executeQuery']('PATCH','/sdk/v1/'+this[_0x42e57f(0x5d0,0x5c5)],{'data':this['query']['updateData'],'options':this[_0x42e57f(0x5d8,0x638)][_0x42e57f(0x4f1,0x479)],'filters':this['query']['filters']});else return this['query'][_0x42e57f(0x548,0x4ef)]?this['executeQuery']('DELETE','/sdk/v1/'+this['table']+_0x42e57f(0x556,0x51c),{'options':this['query']['deleteOptions'],'filters':this[_0x42e57f(0x5d8,0x64a)]['filters']}):this[_0x42e57f(0x57a,0x541)]('GET','/sdk/v1/'+this[_0x42e57f(0x5d0,0x5dc)]+'?operation=select',{'select':this['query'][_0x42e57f(0x595,0x5e8)],'filters':this['query'][_0x42e57f(0x557,0x529)],'order':this['query'][_0x42e57f(0x55f,0x5cd)],'limit':this[_0x42e57f(0x5d8,0x602)]['limit'],'range':this['query'][_0x42e57f(0x501,0x566)]});}async['single'](){this['limit'](0x1);function _0x4dfaf5(_0x482014,_0x48a72d){return _0x4da2(_0x482014-0x3e,_0x48a72d);}const result=await this[_0x4dfaf5(0x2bc,0x274)]();return{'data':result['data']?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x48f0e3,_0x4b71b0,_0xee62e2){function _0x19f7cb(_0x34c6c4,_0x257492){return _0x4da2(_0x257492- -0x210,_0x34c6c4);}try{let response;const headers={};this[_0x19f7cb(0x116,0x99)]&&(headers['x-workspace-id']=this[_0x19f7cb(0xa6,0x99)]);if(_0x48f0e3==='GET'){const _0x5d9b4e=_0x4b71b0[_0x19f7cb(-0x2,0x64)]('?'),_0x403577=_0x5d9b4e[0x0],existingParams=new URLSearchParams(_0x5d9b4e[0x1]||'');if(_0xee62e2[_0x19f7cb(0x55,0x82)])existingParams['append']('select',_0xee62e2[_0x19f7cb(0x33,0x82)]);_0xee62e2['filters']?.[_0x19f7cb(0xc5,0x74)]&&_0xee62e2['filters']['forEach'](filter=>{function _0x424189(_0x469a48,_0x3a58a7){return _0x4da2(_0x469a48-0x40,_0x3a58a7);}existingParams['append'](filter[_0x424189(0x301,0x362)],filter[_0x424189(0x24e,0x23d)]+'.'+filter[_0x424189(0x24a,0x2cd)]);});if(_0xee62e2['order']?.[_0x19f7cb(0xe7,0x74)]){const orderStr=_0xee62e2['order']['map'](_0x445c1e=>''+_0x445c1e[_0x19f7cb(0xed,0xb1)]+(_0x445c1e['ascending']?'.asc':_0x19f7cb(0xb1,0x4b)))['join'](',');existingParams['append']('order',orderStr);}if(_0xee62e2[_0x19f7cb(0x134,0xcf)])existingParams[_0x19f7cb(0x19,0x9b)](_0x19f7cb(0xc3,0xcf),_0xee62e2[_0x19f7cb(0x13b,0xcf)]['toString']());_0xee62e2['range']&&(existingParams[_0x19f7cb(0xbb,0x9b)]('offset',_0xee62e2['range'][_0x19f7cb(0xd3,0xef)]['toString']()),existingParams[_0x19f7cb(0x1d,0x9b)]('limit',(_0xee62e2[_0x19f7cb(-0xe,-0x12)]['to']-_0xee62e2['range']['from']+0x1)[_0x19f7cb(0x99,0x5a)]())),response=await this[_0x19f7cb(0xc0,0x90)][_0x19f7cb(0xcf,0xde)](_0x403577+'?'+existingParams[_0x19f7cb(0xd3,0x5a)](),{'headers':headers});}else{if(_0x48f0e3==='DELETE'){const _0x3023eb=_0x4b71b0[_0x19f7cb(0xd3,0x64)]('?'),_0x50b941=_0x3023eb[0x0],existingParams=new URLSearchParams(_0x3023eb[0x1]||'');!existingParams[_0x19f7cb(0xb1,0xd8)]('operation')&&existingParams[_0x19f7cb(0xe0,0x9b)]('operation','delete');_0xee62e2['filters']?.[_0x19f7cb(-0x16,0x74)]&&_0xee62e2['filters'][_0x19f7cb(0x53,0x10)](filter=>{function _0x5b11a1(_0x4c974a,_0x4ae7c8){return _0x4da2(_0x4c974a- -0x47,_0x4ae7c8);}existingParams['append'](filter[_0x5b11a1(0x27a,0x2db)],filter[_0x5b11a1(0x1c7,0x1e0)]+'.'+filter['value']);});const deleteUrl=_0x50b941+'?'+existingParams[_0x19f7cb(0x62,0x5a)]();console['log']('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console[_0x19f7cb(0x92,0x6a)]('\uD83D\uDD27 DELETE headers:',headers),console[_0x19f7cb(0x77,0x6a)]('\uD83D\uDD27 DELETE filtros originais:',_0xee62e2[_0x19f7cb(0x87,0x44)]),response=await this['httpClient'][_0x19f7cb(0x11a,0x9e)](deleteUrl,{'headers':headers});}else{if(_0x48f0e3==='PATCH'){const _0x131e9f=_0x4b71b0['split']('?'),_0x10f53c=_0x131e9f[0x0],existingParams=new URLSearchParams(_0x131e9f[0x1]||'');!existingParams['has'](_0x19f7cb(0xde,0x83))&&existingParams['append'](_0x19f7cb(0x42,0x83),'update');_0xee62e2['filters']?.['length']&&_0xee62e2['filters']['forEach'](filter=>{function _0xe5713a(_0x3697b4,_0x313cc8){return _0x4da2(_0x313cc8-0x3c7,_0x3697b4);}existingParams['append'](filter['column'],filter[_0xe5713a(0x591,0x5d5)]+'.'+filter['value']);});_0xee62e2['options']?.[_0x19f7cb(0xf9,0x9d)]&&(headers[_0x19f7cb(-0x2e,0x39)]=_0xee62e2[_0x19f7cb(0x34,0xb8)]['prefer']);const updateUrl=_0x10f53c+'?'+existingParams['toString']();response=await this[_0x19f7cb(0x2b,0x90)]['patch'](updateUrl,_0xee62e2[_0x19f7cb(-0x2f,0x1f)],{'headers':headers});}else{let _0x5c0183=_0xee62e2[_0x19f7cb(0x9a,0x1f)];!headers['Prefer']&&(headers['Prefer']='return=representation'),_0xee62e2[_0x19f7cb(0x42,0xb8)]?.['upsert']&&(headers['Prefer']='resolution=merge-duplicates,return=representation'),_0xee62e2['dataArray']&&(_0x5c0183=_0xee62e2[_0x19f7cb(0xc4,0xa1)]),response=await this['httpClient'][_0x19f7cb(0x12e,0xbe)](_0x4b71b0,_0x5c0183,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response[_0x19f7cb(-0x2f,-0x16)]?.['x-total-count']?parseInt(response[_0x19f7cb(-0x88,-0x16)]['x-total-count']):undefined};}catch(_0x252d04){return{'data':null,'error':_0x252d04 instanceof EBaaSError?_0x252d04:new EBaaSError(_0x252d04 instanceof Error?_0x252d04['message']:_0x19f7cb(0x7c,0x77),0x0,_0x252d04)};}}}function _0x347d1c(_0x3ae3e3,_0x175749){return _0x4da2(_0x175749- -0x37a,_0x3ae3e3);}class CustomDatabaseManager{constructor(_0x19e708,_0x227194){this[_0xa8ed0a(0x3a4,0x363)]=_0x19e708;function _0xa8ed0a(_0x2a095c,_0x50f902){return _0x4da2(_0x50f902-0xc3,_0x2a095c);}this[_0xa8ed0a(0x340,0x36c)]=_0x227194;}async[_0x347d1c(-0xc6,-0x14c)](){if(!this[_0x229fb8(0x2a0,0x240)])return{'hasCustomDatabase':![]};function _0x229fb8(_0x5edbd0,_0x333b6a){return _0x4da2(_0x333b6a- -0x69,_0x5edbd0);}try{const response=await this[_0x229fb8(0x252,0x237)][_0x229fb8(0x220,0x285)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this['workspaceId']}});if(response['status']===0xc8&&response[_0x229fb8(0x1fd,0x1c6)]?.[_0x229fb8(0x16c,0x1db)]){const config=response['data'][_0x229fb8(0x246,0x1db)],_0xbf5c1e={'host':config[_0x229fb8(0x25a,0x28f)],'port':config['postgresPort'],'database':config['postgresDatabase'],'username':config[_0x229fb8(0x1fc,0x1ee)],'password':'','schema':config[_0x229fb8(0x254,0x1d3)],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0xbf5c1e},this['detectedConfig'];}}catch(_0x6e1bd7){if(_0x6e1bd7?.['status']===0x194)return this[_0x229fb8(0x104,0x184)]={'hasCustomDatabase':![]},this[_0x229fb8(0x1e4,0x184)];console['warn']('Failed to detect custom database configuration:',_0x6e1bd7);}return this['detectedConfig']={'hasCustomDatabase':![]},this[_0x229fb8(0x210,0x184)];}async[_0x347d1c(-0x1cc,-0x14e)](_0x57f679){function _0x5f1d5b(_0x4f769b,_0x22b3d6){return _0x4da2(_0x4f769b-0x197,_0x22b3d6);}try{const response=await this[_0x5f1d5b(0x437,0x3c7)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x57f679,{'headers':this[_0x5f1d5b(0x440,0x4bd)]?{'X-Workspace-ID':this[_0x5f1d5b(0x440,0x3e0)]}:{}});return response['data'];}catch(_0x4aaacf){return{'success':![],'message':_0x4aaacf?.[_0x5f1d5b(0x453,0x3fc)]||_0x5f1d5b(0x3fc,0x3e9)};}}async['configureCustomDatabase'](_0x278f1d){if(!this[_0x481770(-0xda,-0xc6)])throw new Error('Workspace ID is required to configure custom database');const response=await this[_0x481770(-0xaa,-0xcf)][_0x481770(-0x7f,-0xa1)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x278f1d},{'headers':{'X-Workspace-ID':this[_0x481770(-0xea,-0xc6)]}}),config=response[_0x481770(-0x1ab,-0x140)]['config'];function _0x481770(_0x260f43,_0xa5c1bf){return _0x4da2(_0xa5c1bf- -0x36f,_0x260f43);}return this[_0x481770(-0x1d1,-0x182)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x278f1d},config;}async['removeCustomDatabase'](){function _0x11fda6(_0x2efae5,_0x5554d4){return _0x4da2(_0x5554d4-0x15d,_0x2efae5);}if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');await this['httpClient']['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this[_0x11fda6(0x3c1,0x406)]}}),this[_0x11fda6(0x366,0x34a)]={'hasCustomDatabase':![]};}['getDetectedConfig'](){return this['detectedConfig'];}['hasCustomDatabase'](){function _0xd1e9c5(_0x3bace3,_0xc16160){return _0x4da2(_0xc16160- -0x7a,_0x3bace3);}return this[_0xd1e9c5(0x1f3,0x173)]?.[_0xd1e9c5(0x299,0x275)]??![];}[_0x347d1c(-0xf3,-0x8e)](){function _0x4df45b(_0x13d91e,_0x2b4c0f){return _0x4da2(_0x13d91e-0x22c,_0x2b4c0f);}return this[_0x4df45b(0x419,0x3b4)]?.['credentials'];}['setWorkspaceId'](_0x4c375e){this['workspaceId']=_0x4c375e,this['detectedConfig']=undefined;}['getWorkspaceId'](){function _0x525561(_0x3e99d0,_0x49ea06){return _0x4da2(_0x49ea06- -0x21b,_0x3e99d0);}return this[_0x525561(0xe5,0x8e)];}[_0x347d1c(-0xa2,-0xd6)](){function _0x39397b(_0x29e140,_0x2fdde7){return _0x4da2(_0x2fdde7-0x8,_0x29e140);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x39397b(0x365,0x2f7)](),'configDetails':this[_0x39397b(0x27b,0x1f5)]?.[_0x39397b(0x2b6,0x24f)]?{'host':this[_0x39397b(0x1a0,0x1f5)]['credentials'][_0x39397b(0x1d9,0x266)],'port':this[_0x39397b(0x1ec,0x1f5)][_0x39397b(0x2d2,0x24f)][_0x39397b(0x1fa,0x238)],'database':this['detectedConfig'][_0x39397b(0x294,0x24f)][_0x39397b(0x273,0x1f8)],'schema':this[_0x39397b(0x250,0x1f5)]['credentials'][_0x39397b(0x2cd,0x287)]||_0x39397b(0x336,0x2cf),'sslEnabled':this['detectedConfig']['credentials'][_0x39397b(0x334,0x2e5)]||![]}:undefined};}}class DatabaseClient{constructor(_0x4f2eaa,_0x10cad0){function _0x4829c1(_0x4e1ba5,_0x4d54ef){return _0x4da2(_0x4e1ba5-0xe8,_0x4d54ef);}this[_0x4829c1(0x388,0x3bb)]=_0x4f2eaa,this['customDatabaseManager']=new CustomDatabaseManager(_0x4f2eaa,_0x10cad0);}['from'](_0x342e46){return new QueryBuilder(this['httpClient'],_0x342e46,this['currentSchema'],this['customDatabaseManager']['getWorkspaceId']());}['rpc'](_0x97b450,_0x34b1bb){function _0x219980(_0x1747c5,_0x3ac50e){return _0x4da2(_0x1747c5- -0x352,_0x3ac50e);}return this[_0x219980(-0xb2,-0x13a)][_0x219980(-0x84,-0xbd)](_0x219980(-0x150,-0x1af)+_0x97b450,_0x34b1bb);}[_0x347d1c(-0x186,-0xfb)](_0x3847a9){const _0x26a4ad=new DatabaseClient(this['httpClient'],this[_0x1890d6(0x420,0x493)]['getWorkspaceId']());_0x26a4ad[_0x1890d6(0x436,0x400)]=_0x3847a9;function _0x1890d6(_0x4b7aaa,_0x228a88){return _0x4da2(_0x228a88-0x1f0,_0x4b7aaa);}return _0x26a4ad['customDatabaseManager']=this[_0x1890d6(0x413,0x493)],_0x26a4ad;}async[_0x347d1c(-0x12f,-0x14c)](){function _0x330222(_0x4fbc11,_0x2f8075){return _0x4da2(_0x4fbc11- -0x1c,_0x2f8075);}return this[_0x330222(0x287,0x2c7)][_0x330222(0x212,0x22f)]();}async['testCustomConnection'](_0x3e5d5e){function _0x54f228(_0x4f7a06,_0x1bcae9){return _0x4da2(_0x4f7a06- -0x280,_0x1bcae9);}return this[_0x54f228(0x23,0xab)][_0x54f228(-0x54,-0x62)](_0x3e5d5e);}async[_0x347d1c(-0x12b,-0xd5)](_0x5c0ee4){function _0x4e8387(_0x5dae32,_0x360263){return _0x4da2(_0x5dae32- -0x225,_0x360263);}return this['customDatabaseManager'][_0x4e8387(0x80,-0x6)](_0x5c0ee4);}async[_0x347d1c(-0x5d,-0xbf)](){function _0x4a39f9(_0x43eb86,_0x25a4c3){return _0x4da2(_0x25a4c3-0x2c1,_0x43eb86);}return this[_0x4a39f9(0x594,0x564)][_0x4a39f9(0x514,0x57c)]();}['isUsingCustomDatabase'](){function _0x3a5306(_0x1b847e,_0x809808){return _0x4da2(_0x809808-0x3dd,_0x1b847e);}return this[_0x3a5306(0x6f8,0x680)]['hasCustomDatabase']();}[_0x347d1c(-0x58,-0x85)](){function _0x11787f(_0x50be0f,_0x3e1fc0){return _0x4da2(_0x50be0f- -0x2fc,_0x3e1fc0);}return this['customDatabaseManager'][_0x11787f(-0x58,0x23)]();}[_0x347d1c(-0xb1,-0x95)](_0x30ec78){function _0x20edfc(_0x35a8f9,_0x4d468f){return _0x4da2(_0x4d468f-0x21a,_0x35a8f9);}this[_0x20edfc(0x46c,0x4bd)]['setWorkspaceId'](_0x30ec78);}async[_0x347d1c(-0x67,-0x9a)](){function _0x9d945f(_0x1ed1ca,_0x1a962e){return _0x4da2(_0x1ed1ca-0x172,_0x1a962e);}try{await this[_0x9d945f(0x415,0x400)]['detectCustomDatabase']();}catch(_0xe81fbc){console['warn']('Failed to initialize custom database detection:',_0xe81fbc);}}}class StorageBucket{constructor(_0x30c6b0,bucketId){this[_0x3920f(0x117,0xcc)]=_0x30c6b0;function _0x3920f(_0x5bf068,_0x118525){return _0x4da2(_0x5bf068- -0x189,_0x118525);}this['bucketId']=bucketId;}async['upload'](_0x3c7aef,_0x5a2c59,_0x59c9c4){function _0x23e24d(_0x4db8ec,_0x15a634){return _0x4da2(_0x4db8ec-0x3e2,_0x15a634);}try{const _0x383ee4=new FormData();if(_0x5a2c59 instanceof File)_0x383ee4['append'](_0x23e24d(0x63a,0x6b1),_0x5a2c59);else{if(_0x5a2c59 instanceof Blob)_0x383ee4[_0x23e24d(0x68d,0x6c9)](_0x23e24d(0x63a,0x5e2),_0x5a2c59,_0x3c7aef);else{if(_0x5a2c59 instanceof ArrayBuffer)_0x383ee4[_0x23e24d(0x68d,0x6d5)]('file',new Blob([_0x5a2c59]),_0x3c7aef);else typeof _0x5a2c59===_0x23e24d(0x67c,0x62f)&&_0x383ee4['append'](_0x23e24d(0x63a,0x5bb),new Blob([_0x5a2c59],{'type':'text/plain'}),_0x3c7aef);}}_0x383ee4['append']('path',_0x3c7aef);_0x59c9c4?.[_0x23e24d(0x66d,0x68a)]&&_0x383ee4[_0x23e24d(0x68d,0x695)]('cacheControl',_0x59c9c4['cacheControl']);_0x59c9c4?.[_0x23e24d(0x6d6,0x681)]&&_0x383ee4[_0x23e24d(0x68d,0x6f8)]('contentType',_0x59c9c4[_0x23e24d(0x6d6,0x66f)]);_0x59c9c4?.['metadata']&&_0x383ee4['append']('metadata',JSON['stringify'](_0x59c9c4[_0x23e24d(0x64d,0x6d4)]));const _0x178c40='/storage/buckets/'+this['bucketId']+'/files'+(_0x59c9c4?.[_0x23e24d(0x67e,0x6be)]?_0x23e24d(0x6be,0x739):''),response=await this[_0x23e24d(0x682,0x6c1)][_0x23e24d(0x6b0,0x66c)](_0x178c40,_0x383ee4,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response[_0x23e24d(0x611,0x602)],'error':null};}catch(_0x5277e6){return{'data':null,'error':_0x5277e6 instanceof EBaaSError?_0x5277e6:new EBaaSError(_0x5277e6 instanceof Error?_0x5277e6[_0x23e24d(0x69e,0x6a9)]:_0x23e24d(0x5cb,0x5ba),0x0,_0x5277e6)};}}async['download'](_0x3dbca7,_0x150d4d){function _0x237258(_0x23f6e6,_0x5dfd6e){return _0x4da2(_0x23f6e6-0xf1,_0x5dfd6e);}try{const _0x52b88f=new URLSearchParams();_0x150d4d?.['transform']&&Object[_0x237258(0x358,0x2d0)](_0x150d4d['transform'])['forEach'](([_0x5946e5,_0x30e110])=>{_0x30e110!==undefined&&_0x52b88f['append'](_0x5946e5,String(_0x30e110));});const _0x424575=_0x237258(0x3f1,0x475)+this[_0x237258(0x2ea,0x31c)]+_0x237258(0x318,0x2b4)+_0x3dbca7+(_0x52b88f['toString']()?'?'+_0x52b88f['toString']():''),response=await this[_0x237258(0x391,0x37a)][_0x237258(0x3df,0x40e)](_0x424575,{'responseType':_0x237258(0x3b6,0x38a)});return{'data':response['data'],'error':null};}catch(_0x23e4aa){return{'data':null,'error':_0x23e4aa instanceof EBaaSError?_0x23e4aa:new EBaaSError(_0x23e4aa instanceof Error?_0x23e4aa['message']:'Failed\x20to\x20download\x20file',0x0,_0x23e4aa)};}}async['list'](_0x3876b3,_0x3642b8){function _0x3c214e(_0x53313f,_0x16e6cf){return _0x4da2(_0x53313f-0x18a,_0x16e6cf);}try{const _0x3f7bf6=new URLSearchParams();_0x3876b3&&_0x3f7bf6['append'](_0x3c214e(0x410,0x410),_0x3876b3);_0x3642b8?.['limit']&&_0x3f7bf6[_0x3c214e(0x435,0x3e5)](_0x3c214e(0x469,0x4d2),String(_0x3642b8[_0x3c214e(0x469,0x426)]));_0x3642b8?.[_0x3c214e(0x412,0x472)]&&_0x3f7bf6['append'](_0x3c214e(0x412,0x411),String(_0x3642b8[_0x3c214e(0x412,0x39e)]));_0x3642b8?.['sortBy']&&_0x3f7bf6['append'](_0x3c214e(0x40a,0x389),JSON[_0x3c214e(0x428,0x476)](_0x3642b8[_0x3c214e(0x40a,0x451)]));_0x3642b8?.[_0x3c214e(0x3dc,0x432)]&&_0x3f7bf6['append'](_0x3c214e(0x3dc,0x425),_0x3642b8['search']);const _0x3e2cb1='/storage/buckets/'+this['bucketId']+'/files'+(_0x3f7bf6['toString']()?'?'+_0x3f7bf6['toString']():''),response=await this['httpClient'][_0x3c214e(0x478,0x41a)](_0x3e2cb1);return{'data':response['data'],'error':null};}catch(_0x243704){return{'data':null,'error':_0x243704 instanceof EBaaSError?_0x243704:new EBaaSError(_0x243704 instanceof Error?_0x243704['message']:_0x3c214e(0x40b,0x46c),0x0,_0x243704)};}}async[_0x347d1c(-0x143,-0xce)](_0x1750bd){function _0x3d4f8e(_0xeb80be,_0x4c78b4){return _0x4da2(_0x4c78b4-0x202,_0xeb80be);}try{const response=await this[_0x3d4f8e(0x431,0x4a2)][_0x3d4f8e(0x4d0,0x4b0)](_0x3d4f8e(0x47d,0x502)+this['bucketId']+'/files',{'data':{'paths':_0x1750bd}});return{'data':response[_0x3d4f8e(0x461,0x431)],'error':null};}catch(_0x1340e6){return{'data':null,'error':_0x1340e6 instanceof EBaaSError?_0x1340e6:new EBaaSError(_0x1340e6 instanceof Error?_0x1340e6['message']:_0x3d4f8e(0x50c,0x4ce),0x0,_0x1340e6)};}}async[_0x347d1c(-0x74,-0xa0)](fromPath,_0x1ef510){function _0x2cb497(_0x284bd0,_0x1b8bde){return _0x4da2(_0x1b8bde- -0xe0,_0x284bd0);}try{const response=await this[_0x2cb497(0x1f6,0x1c0)]['post'](_0x2cb497(0x2a0,0x220)+this[_0x2cb497(0x12f,0x119)]+'/files/move',{'sourceKey':fromPath,'destinationKey':_0x1ef510});return{'data':response[_0x2cb497(0x1d0,0x14f)],'error':null};}catch(_0x21ec94){return{'data':null,'error':_0x21ec94 instanceof EBaaSError?_0x21ec94:new EBaaSError(_0x21ec94 instanceof Error?_0x21ec94[_0x2cb497(0x1c8,0x1dc)]:'Failed\x20to\x20move\x20file',0x0,_0x21ec94)};}}async[_0x347d1c(-0x125,-0x125)](fromPath,_0x2d8146){function _0x16317a(_0x305a2a,_0x3124fb){return _0x4da2(_0x3124fb- -0x14,_0x305a2a);}try{const response=await this['httpClient'][_0x16317a(0x232,0x2ba)](_0x16317a(0x348,0x2ec)+this['bucketId']+_0x16317a(0x276,0x214),{'sourceKey':fromPath,'destinationKey':_0x2d8146});return{'data':response[_0x16317a(0x243,0x21b)],'error':null};}catch(_0x210295){return{'data':null,'error':_0x210295 instanceof EBaaSError?_0x210295:new EBaaSError(_0x210295 instanceof Error?_0x210295[_0x16317a(0x256,0x2a8)]:_0x16317a(0x1e8,0x217),0x0,_0x210295)};}}async[_0x347d1c(-0xe0,-0x105)](_0xe5b35f,_0xcf9192,_0x2e08b9){function _0x14993e(_0x3ba9f2,_0x269f1a){return _0x4da2(_0x269f1a-0x3c4,_0x3ba9f2);}try{const response=await this[_0x14993e(0x6ab,0x664)]['post']('/storage/buckets/'+this[_0x14993e(0x59c,0x5bd)]+_0x14993e(0x58a,0x5eb)+_0xe5b35f+'/sign',{'expiresIn':_0xcf9192,..._0x2e08b9});return{'data':response[_0x14993e(0x595,0x5f3)],'error':null};}catch(_0x480d4f){return{'data':null,'error':_0x480d4f instanceof EBaaSError?_0x480d4f:new EBaaSError(_0x480d4f instanceof Error?_0x480d4f['message']:'Failed\x20to\x20create\x20signed\x20URL',0x0,_0x480d4f)};}}['getPublicUrl'](_0x513007,_0x5b9104){const _0x4ceeb5=new URLSearchParams();_0x5b9104?.['transform']&&Object[_0x5e5528(0x2c,0x37)](_0x5b9104[_0x5e5528(-0x46,-0x84)])[_0x5e5528(-0x1b,-0x9f)](([_0x18f8eb,_0x18d3f7])=>{function _0x351f55(_0xb6c7ec,_0x379647){return _0x4da2(_0xb6c7ec- -0x34b,_0x379647);}_0x18d3f7!==undefined&&_0x4ceeb5[_0x351f55(-0xa0,-0xba)](_0x18f8eb,String(_0x18d3f7));});function _0x5e5528(_0x20cbea,_0x1173e9){return _0x4da2(_0x20cbea- -0x23b,_0x1173e9);}const _0x5d281e=this['httpClient']['baseURL']||'',_0x37aeb2=_0x5d281e+'/storage/buckets/'+this['bucketId']+'/files/'+_0x513007+(_0x4ceeb5['toString']()?'?'+_0x4ceeb5[_0x5e5528(0x2f,0x5b)]():'');return{'data':{'publicUrl':_0x37aeb2}};}async['getFileInfo'](_0x22a04c){function _0x5e8977(_0x49654e,_0x106c5d){return _0x4da2(_0x106c5d- -0x2b0,_0x49654e);}try{const response=await this[_0x5e8977(-0x2e,-0x10)]['get'](_0x5e8977(0x0,0x50)+this[_0x5e8977(-0xbf,-0xb7)]+'/files/'+_0x22a04c+_0x5e8977(0x34,0x4b));return{'data':response['data'],'error':null};}catch(_0x365878){return{'data':null,'error':_0x365878 instanceof EBaaSError?_0x365878:new EBaaSError(_0x365878 instanceof Error?_0x365878[_0x5e8977(0x2f,0xc)]:_0x5e8977(-0x86,-0xc9),0x0,_0x365878)};}}async['updateFileMetadata'](_0x345b92,metadata){function _0x54d78a(_0x1cf65c,_0x3799dd){return _0x4da2(_0x3799dd-0x34b,_0x1cf65c);}try{const response=await this[_0x54d78a(0x583,0x5eb)]['put']('/storage/buckets/'+this[_0x54d78a(0x569,0x544)]+'/files/'+_0x345b92+_0x54d78a(0x4f3,0x570),{'metadata':metadata});return{'data':response[_0x54d78a(0x5e7,0x57a)],'error':null};}catch(_0x2e335a){return{'data':null,'error':_0x2e335a instanceof EBaaSError?_0x2e335a:new EBaaSError(_0x2e335a instanceof Error?_0x2e335a[_0x54d78a(0x5a5,0x607)]:_0x54d78a(0x5ed,0x5b8),0x0,_0x2e335a)};}}}class StorageClient{constructor(_0x3c500b){this['httpClient']=_0x3c500b;}['from'](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async['createBucket'](_0x3eca50,_0x5ab952){function _0x4e8ed2(_0x15c36b,_0x132cb6){return _0x4da2(_0x132cb6-0x3b4,_0x15c36b);}try{const response=await this[_0x4e8ed2(0x6ba,0x654)]['post']('/storage/buckets',{'id':_0x3eca50,..._0x5ab952});return{'data':response['data'],'error':null};}catch(_0x5c210d){return{'data':null,'error':_0x5c210d instanceof EBaaSError?_0x5c210d:new EBaaSError(_0x5c210d instanceof Error?_0x5c210d['message']:_0x4e8ed2(0x6ba,0x66b),0x0,_0x5c210d)};}}async[_0x347d1c(-0xf0,-0x162)](_0x104ad6){function _0x32dc4d(_0x3565fa,_0x3b88c7){return _0x4da2(_0x3565fa-0x1e6,_0x3b88c7);}try{const response=await this['httpClient']['get']('/storage/buckets/'+_0x104ad6);return{'data':response[_0x32dc4d(0x415,0x41f)],'error':null};}catch(_0x23ada5){return{'data':null,'error':_0x23ada5 instanceof EBaaSError?_0x23ada5:new EBaaSError(_0x23ada5 instanceof Error?_0x23ada5[_0x32dc4d(0x4a2,0x482)]:'Failed\x20to\x20get\x20bucket',0x0,_0x23ada5)};}}async['listBuckets'](){function _0x577e78(_0x27c953,_0x535660){return _0x4da2(_0x535660- -0x1fb,_0x27c953);}try{const response=await this[_0x577e78(0x25,0xa5)]['get']('/storage/buckets');return{'data':response[_0x577e78(0x44,0x34)],'error':null};}catch(_0x43a8f8){return{'data':null,'error':_0x43a8f8 instanceof EBaaSError?_0x43a8f8:new EBaaSError(_0x43a8f8 instanceof Error?_0x43a8f8['message']:_0x577e78(0x104,0xb4),0x0,_0x43a8f8)};}}async[_0x347d1c(-0x139,-0x163)](_0x50b3c7,_0x1fc616){function _0x5c4a2b(_0x1b3add,_0x1f212a){return _0x4da2(_0x1b3add- -0x2cf,_0x1f212a);}try{const response=await this[_0x5c4a2b(-0x2f,0x32)][_0x5c4a2b(-0x52,-0x97)]('/storage/buckets/'+_0x50b3c7,_0x1fc616);return{'data':response['data'],'error':null};}catch(_0x314a2f){return{'data':null,'error':_0x314a2f instanceof EBaaSError?_0x314a2f:new EBaaSError(_0x314a2f instanceof Error?_0x314a2f['message']:_0x5c4a2b(-0xe5,-0xcd),0x0,_0x314a2f)};}}async[_0x347d1c(-0x17e,-0x119)](_0x34a8fa){function _0x22f3bb(_0x2a79c7,_0x3ccc85){return _0x4da2(_0x2a79c7-0x122,_0x3ccc85);}try{const response=await this['httpClient'][_0x22f3bb(0x3d0,0x382)]('/storage/buckets/'+_0x34a8fa);return{'data':response[_0x22f3bb(0x351,0x3c1)],'error':null};}catch(_0x5124ee){return{'data':null,'error':_0x5124ee instanceof EBaaSError?_0x5124ee:new EBaaSError(_0x5124ee instanceof Error?_0x5124ee[_0x22f3bb(0x3de,0x35c)]:_0x22f3bb(0x394,0x314),0x0,_0x5124ee)};}}async['getUsage'](){function _0x2c53c4(_0x3d3b6b,_0x376e7e){return _0x4da2(_0x3d3b6b- -0x24b,_0x376e7e);}try{const response=await this['httpClient'][_0x2c53c4(0xa3,0xda)](_0x2c53c4(-0x12,-0x7f));return{'data':response['data'],'error':null};}catch(_0x61632f){return{'data':null,'error':_0x61632f instanceof EBaaSError?_0x61632f:new EBaaSError(_0x61632f instanceof Error?_0x61632f['message']:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x61632f)};}}}class EventManager{constructor(){function _0x343b20(_0x16a19e,_0x5e39f7){return _0x4da2(_0x5e39f7- -0x1ac,_0x16a19e);}this[_0x343b20(0x87,0x106)]=new Map(),this['maxListeners']=0xa;}['on'](_0x11ec96,_0x3ead64){function _0x4a27ed(_0x42df3b,_0x15fda9){return _0x4da2(_0x42df3b- -0x25d,_0x15fda9);}!this['events'][_0x4a27ed(0x8b,0x92)](_0x11ec96)&&this[_0x4a27ed(0x55,0x1d)][_0x4a27ed(-0x4e,-0x6a)](_0x11ec96,new Set()),this['events'][_0x4a27ed(0x91,0x52)](_0x11ec96)[_0x4a27ed(0x60,0x18)](_0x3ead64);}['off'](_0x2fd905,_0x43c3ad){if(!this['events']['has'](_0x2fd905))return;function _0x2525a0(_0x3da363,_0x41db0a){return _0x4da2(_0x41db0a- -0x4e,_0x3da363);}const _0x4e1090=this['events']['get'](_0x2fd905);_0x43c3ad?_0x4e1090[_0x2525a0(0x252,0x260)](_0x43c3ad):_0x4e1090['clear'](),_0x4e1090['size']===0x0&&this[_0x2525a0(0x1ec,0x264)]['delete'](_0x2fd905);}[_0x347d1c(-0x16d,-0x137)](_0x20b255,..._0x51e88c){function _0x235c3e(_0x31f278,_0x1c06d2){return _0x4da2(_0x31f278- -0x174,_0x1c06d2);}if(!this['events']['has'](_0x20b255))return![];const _0x4afb03=this['events']['get'](_0x20b255);for(const _0x30434a of _0x4afb03){try{_0x30434a(..._0x51e88c);}catch(_0x31f305){console[_0x235c3e(0xd6,0xb2)]('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x20b255+'\x22:',_0x31f305);}}return _0x4afb03['size']>0x0;}['removeAllListeners'](_0x3a4684){function _0x716a1b(_0x1133d2,_0x10f994){return _0x4da2(_0x1133d2-0xf2,_0x10f994);}_0x3a4684?this['events'][_0x716a1b(0x3a0,0x394)](_0x3a4684):this['events']['clear']();}[_0x347d1c(-0x1df,-0x179)](_0x2dc678){function _0x13ad6a(_0x559d9c,_0x378077){return _0x4da2(_0x378077- -0x1d3,_0x559d9c);}return this[_0x13ad6a(0x6f,0xdf)][_0x13ad6a(0xf4,0x11b)](_0x2dc678)?.[_0x13ad6a(-0x17,0x1e)]??0x0;}[_0x347d1c(-0xec,-0x147)](){function _0xff7a51(_0x596d6a,_0x176b8f){return _0x4da2(_0x176b8f-0x3bb,_0x596d6a);}return Array[_0xff7a51(0x6ee,0x6ba)](this[_0xff7a51(0x640,0x66d)]['keys']());}[_0x347d1c(-0xb4,-0xe1)](_0x58a6f1){return Array['from'](this['events']['get'](_0x58a6f1)??[]);}[_0x347d1c(-0x17b,-0x16f)](_0x3382d5,_0x3883d9){this['on'](_0x3382d5,_0x3883d9);}[_0x347d1c(-0xb1,-0x118)](_0x52726f,_0x47f14d){this['off'](_0x52726f,_0x47f14d);}[_0x347d1c(-0x175,-0x111)](_0xd9df66,_0x21ef8d){const _0x3a8c2e=(..._0x1d26e0)=>{this[_0xd70c23(-0x118,-0x16b)](_0xd9df66,_0x3a8c2e);function _0xd70c23(_0x2e4fc8,_0x35c908){return _0x4da2(_0x2e4fc8- -0x3db,_0x35c908);}_0x21ef8d(..._0x1d26e0);};this['on'](_0xd9df66,_0x3a8c2e);}[_0x347d1c(-0x99,-0xe6)](_0x3a3f3a,_0x3ee463){this['on'](_0x3a3f3a,_0x3ee463);}['prependOnceListener'](_0x1172b0,_0x66a718){const _0x209977=(..._0xb7a67c)=>{function _0x163700(_0x5b0411,_0x3cb016){return _0x4da2(_0x3cb016-0x259,_0x5b0411);}this[_0x163700(0x543,0x51c)](_0x1172b0,_0x209977),_0x66a718(..._0xb7a67c);};this['on'](_0x1172b0,_0x209977);}['setMaxListeners'](_0x9c4aeb){function _0x250c19(_0x55d53b,_0x25545b){return _0x4da2(_0x25545b- -0x3d8,_0x55d53b);}return this[_0x250c19(-0x1c1,-0x14f)]=_0x9c4aeb,this;}[_0x347d1c(-0x121,-0xc7)](){return this['maxListeners'];}[_0x347d1c(-0x131,-0xa6)](_0x4c2c48){function _0x354972(_0x495b2a,_0x343118){return _0x4da2(_0x343118- -0x2a5,_0x495b2a);}return this[_0x354972(-0x7f,-0xc)](_0x4c2c48);}}class RealtimeChannel extends EventManager{constructor(_0x575625,_0x54995d){super(),this[_0x1458ea(0x44b,0x3d0)]=![],this['state']='closed',this['subscriptions']=new Map();function _0x1458ea(_0x13872d,_0x38e25){return _0x4da2(_0x13872d-0x259,_0x38e25);}this[_0x1458ea(0x478,0x441)]=_0x575625,this[_0x1458ea(0x483,0x475)]=_0x54995d;}['subscribe'](_0x9e8e5d){!this['joinedOnce']&&(this[_0x5b5dde(-0xb0,-0x119)]=!![],this['_join']());_0x9e8e5d&&this['on'](_0x5b5dde(-0xcd,-0x107),_0x9e8e5d);function _0x5b5dde(_0x2fe749,_0x2aa1dc){return _0x4da2(_0x2aa1dc- -0x30b,_0x2fe749);}return this;}[_0x347d1c(-0xed,-0x98)](filter,_0x17b603){const _0x359dea='postgres_changes:'+JSON['stringify'](filter);function _0x2279e7(_0x1ee0c4,_0x18cfd2){return _0x4da2(_0x18cfd2-0x161,_0x1ee0c4);}this['on'](_0x359dea,_0x17b603);const _0x1f764e={'unsubscribe':()=>{this['off'](_0x359dea,_0x17b603),this['subscriptions']['delete'](_0x359dea);}};return this['subscriptions'][_0x2279e7(0x337,0x370)](_0x359dea,_0x1f764e),this['socket']?.['connected']&&this[_0x2279e7(0x3a9,0x3d9)]==='joined'&&this[_0x2279e7(0x3dc,0x38b)][_0x2279e7(0x3f4,0x3a4)]('subscribe_postgres_changes',{'topic':this['topic'],'filter':filter,'ref':this['makeRef']()}),_0x1f764e;}[_0x347d1c(-0x13f,-0xd8)](filter,_0x4f5efe){const _0x21e4b3='broadcast:'+JSON[_0x14bbc3(0x24,0xa3)](filter);this['on'](_0x21e4b3,_0x4f5efe);function _0x14bbc3(_0x34551e,_0x5d8cfc){return _0x4da2(_0x34551e- -0x27a,_0x5d8cfc);}const _0x1d5c22={'unsubscribe':()=>{this[_0x16b29f(0x4ed,0x4ba)](_0x21e4b3,_0x4f5efe);function _0x16b29f(_0xca1db5,_0xfc5d18){return _0x4da2(_0xfc5d18-0x1f7,_0xca1db5);}this['subscriptions']['delete'](_0x21e4b3);}};return this['subscriptions'][_0x14bbc3(-0x6b,-0xb4)](_0x21e4b3,_0x1d5c22),_0x1d5c22;}['onPresence'](filter,_0x2b337d){const _0x713e2a=_0x531c78(-0x136,-0xe3)+JSON['stringify'](filter);this['on'](_0x713e2a,_0x2b337d);const _0x1e20e2={'unsubscribe':()=>{function _0x1756b6(_0x38db53,_0xea82fb){return _0x4da2(_0xea82fb- -0x1c,_0x38db53);}this[_0x1756b6(0x21b,0x2a7)](_0x713e2a,_0x2b337d),this[_0x1756b6(0x347,0x2de)]['delete'](_0x713e2a);}};this[_0x531c78(-0x9,0x3)]['set'](_0x713e2a,_0x1e20e2);function _0x531c78(_0x2a4c6d,_0x22b2e7){return _0x4da2(_0x22b2e7- -0x2f7,_0x2a4c6d);}return _0x1e20e2;}[_0x347d1c(-0x9c,-0xd2)](_0x5a0151){return new Promise(_0x3aa59e=>{function _0x4e0d0c(_0x22d898,_0x245439){return _0x4da2(_0x22d898- -0x6c,_0x245439);}this[_0x4e0d0c(0x1be,0x229)]?.[_0x4e0d0c(0x1f7,0x1bc)]&&this['state']==='joined'?(this[_0x4e0d0c(0x1be,0x1bb)]['emit'](_0x4e0d0c(0x1b5,0x148),{'topic':this['topic'],'event':_0x5a0151['event'],'payload':_0x5a0151,'ref':this[_0x4e0d0c(0x25f,0x2a6)]()}),_0x3aa59e('ok')):_0x3aa59e('error');});}['track'](_0x48234d){return new Promise(_0x46898e=>{function _0x3bf963(_0x469698,_0x2e42f0){return _0x4da2(_0x2e42f0-0x391,_0x469698);}this[_0x3bf963(0x5cc,0x5bb)]?.['connected']&&this[_0x3bf963(0x61a,0x609)]===_0x3bf963(0x5cb,0x5f1)?(this[_0x3bf963(0x61d,0x5bb)]['emit']('presence',{'topic':this[_0x3bf963(0x57f,0x5b0)],'event':_0x3bf963(0x5dd,0x5dc),'payload':_0x48234d,'ref':this[_0x3bf963(0x64d,0x65c)]()}),_0x46898e('ok')):_0x46898e('error');});}[_0x347d1c(-0x14e,-0x17e)](){return new Promise(_0x2d49d3=>{function _0x200d06(_0x2782f0,_0x926f0f){return _0x4da2(_0x2782f0- -0x2d6,_0x926f0f);}this['socket']?.[_0x200d06(-0x73,-0xf5)]&&this[_0x200d06(-0x5e,-0x24)]==='joined'?(this['socket'][_0x200d06(-0x93,-0xb6)](_0x200d06(-0x9e,-0xcc),{'topic':this[_0x200d06(-0xb7,-0x6d)],'event':_0x200d06(-0xda,-0x132),'ref':this['makeRef']()}),_0x2d49d3('ok')):_0x2d49d3(_0x200d06(-0x8c,-0x2c));});}['unsubscribe'](){return new Promise(_0x254ade=>{this['state']='leaving',this[_0x46fc3f(0x639,0x602)]['forEach'](_0xbaaad7=>{function _0x2dde19(_0x23bd7f,_0x4fd070){return _0x4da2(_0x23bd7f- -0x1c7,_0x4fd070);}_0xbaaad7[_0x2dde19(0xc8,0x147)]();}),this['subscriptions']['clear']();this['socket']?.[_0x46fc3f(0x5a2,0x517)]&&this[_0x46fc3f(0x569,0x520)]['emit']('leave',{'topic':this[_0x46fc3f(0x55e,0x596)],'ref':this[_0x46fc3f(0x60a,0x64c)]()});function _0x46fc3f(_0x2abf83,_0x497a64){return _0x4da2(_0x2abf83-0x33f,_0x497a64);}this[_0x46fc3f(0x5b7,0x587)]='closed',this['removeAllListeners'](),_0x254ade('ok');});}[_0x347d1c(-0x116,-0x146)](){function _0x35963b(_0x51e7a6,_0x36c2ac){return _0x4da2(_0x36c2ac- -0x1a,_0x51e7a6);}if(this['state']==='leaving')return;this[_0x35963b(0x208,0x25e)]='joining',this['socket']?.['connected']&&(this[_0x35963b(0x1db,0x210)]['emit'](_0x35963b(0x201,0x254),{'topic':this[_0x35963b(0x280,0x205)],'ref':this[_0x35963b(0x319,0x2b1)]()}),setTimeout(()=>{function _0x4d003f(_0x51412f,_0xc14288){return _0x4da2(_0xc14288- -0x1c2,_0x51412f);}this[_0x4d003f(0x75,0xb6)]===_0x4d003f(0x1ba,0x134)&&(this['state']=_0x4d003f(0x10d,0x9e),this['emit']('status',_0x4d003f(0xb5,0x34)));},0x64));}['_rejoin'](){function _0x4a6628(_0x54b427,_0x1903b9){return _0x4da2(_0x1903b9-0xe8,_0x54b427);}this[_0x4a6628(0x33c,0x2da)]&&(this[_0x4a6628(0x2e0,0x31c)](),this['subscriptions'][_0x4a6628(0x35b,0x308)]((_0x44e776,_0x51880a)=>{function _0xb5bb0f(_0x1b5313,_0x59ea5a){return _0x4da2(_0x1b5313- -0x24a,_0x59ea5a);}if(_0x51880a['startsWith'](_0xb5bb0f(0x46,0x64))){const filter=JSON[_0xb5bb0f(0x86,0xef)](_0x51880a[_0xb5bb0f(0x22,0x2f)]('postgres_changes:',''));this[_0xb5bb0f(-0x20,0x61)]?.[_0xb5bb0f(-0x7,-0x24)](_0xb5bb0f(-0x2c,-0x12),{'topic':this[_0xb5bb0f(-0x2b,-0x9b)],'filter':filter,'ref':this[_0xb5bb0f(0x81,0x2)]()});}}));}[_0x347d1c(-0xc7,-0x12c)](_0x337068,_0x586b0f){if(_0x337068==='postgres_changes'){const _0x4b9f25=_0x347775(0x4c5,0x43a)+JSON[_0x347775(0x3bd,0x448)](_0x586b0f[_0x347775(0x422,0x3ad)]||{});this[_0x347775(0x382,0x3ed)](_0x4b9f25,_0x586b0f);}else{if(_0x337068===_0x347775(0x354,0x3cb)){const _0x36c21e=_0x347775(0x497,0x434)+JSON[_0x347775(0x417,0x448)]({'event':_0x586b0f[_0x347775(0x524,0x4a3)]});this[_0x347775(0x398,0x3ed)](_0x36c21e,_0x586b0f);}else{if(_0x337068===_0x347775(0x37d,0x3e2)){const _0x483fea=_0x347775(0x3a4,0x3be)+JSON[_0x347775(0x4b6,0x448)]({'event':_0x586b0f[_0x347775(0x41c,0x4a3)]});this['emit'](_0x483fea,_0x586b0f);}}}function _0x347775(_0x22daac,_0x44b85a){return _0x4da2(_0x44b85a-0x1aa,_0x22daac);}this['emit'](_0x337068,_0x586b0f);}[_0x347d1c(-0x190,-0x183)](_0x8acd49){function _0x4e1f07(_0x23c861,_0x51e2cc){return _0x4da2(_0x23c861-0x52,_0x51e2cc);}this[_0x4e1f07(0x2ca,0x2b1)]=_0x8acd49;let status;switch(_0x8acd49){case _0x4e1f07(0x2b2,0x330):status=_0x4e1f07(0x248,0x1e9);break;case'errored':status='CHANNEL_ERROR';break;case _0x4e1f07(0x310,0x29e):status=_0x4e1f07(0x2ce,0x2d7);break;default:return;}this[_0x4e1f07(0x295,0x259)]('status',status);}[_0x347d1c(-0xd5,-0xaf)](){function _0x485b99(_0x3eede2,_0x2934d0){return _0x4da2(_0x2934d0- -0x234,_0x3eede2);}return Math[_0x485b99(0xed,0x76)]()['toString'](0x24)['substring'](0x2,0xf);}['getState'](){return this['state'];}}function getEnvironment(){if(typeof navigator!==_0x1fb6ad(0x357,0x371)&&navigator['product']==='ReactNative')return _0x1fb6ad(0x381,0x342);function _0x1fb6ad(_0x303173,_0x1f28e0){return _0x4da2(_0x1f28e0-0x9b,_0x303173);}if(typeof window!==_0x1fb6ad(0x327,0x371)&&typeof document!==_0x1fb6ad(0x363,0x371))return _0x1fb6ad(0x2bd,0x2bd);if(typeof global!==_0x1fb6ad(0x346,0x371)&&typeof process!==_0x1fb6ad(0x30f,0x371)&&process['versions']?.['node'])return _0x1fb6ad(0x32b,0x399);return _0x1fb6ad(0x329,0x2bd);}function isSocketIOAvailable(){function _0x34966a(_0x80e11f,_0x119c12){return _0x4da2(_0x119c12-0x3ce,_0x80e11f);}try{const _0x24312f=getEnvironment();switch(_0x24312f){case _0x34966a(0x6c3,0x6cc):return typeof require!=='undefined'&&require[_0x34966a(0x643,0x600)]&&!!require['resolve'](_0x34966a(0x628,0x69f));case'browser':if(typeof globalThis!==_0x34966a(0x704,0x6a4)&&'io'in globalThis)return!![];return typeof require!=='undefined'&&require['resolve']&&!!require[_0x34966a(0x5b6,0x600)]('socket.io-client');case _0x34966a(0x621,0x675):try{return typeof require!==_0x34966a(0x6de,0x6a4)&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(){function _0x17a348(_0x3b5efa,_0x79e293){return _0x4da2(_0x3b5efa- -0x3a7,_0x79e293);}try{if(typeof require!==_0x17a348(-0xd1,-0xfb))return require('socket.io-client');if(typeof globalThis!=='undefined'&&'io'in globalThis)return{'io':globalThis['io']};throw new Error('socket.io-client\x20not\x20available');}catch(_0x1435db){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(){this['socket']=null;}async['connect'](_0x20c47c,_0x5cae0e){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:_0x542725}=getSocketIO();return new Promise((_0x7632ed,_0x16986b)=>{function _0x87cae2(_0xa2528c,_0x5ee4b7){return _0x4da2(_0x5ee4b7-0x12b,_0xa2528c);}this['socket']=_0x542725(_0x20c47c,_0x5cae0e),this[_0x87cae2(0x3c6,0x355)]['on']('connect',()=>_0x7632ed()),this[_0x87cae2(0x2d7,0x355)]['on'](_0x87cae2(0x31b,0x36b),_0x543c1c=>_0x16986b(_0x543c1c));});}[_0x347d1c(-0xd7,-0x107)](){function _0x216f8a(_0x22fbc8,_0x4d6032){return _0x4da2(_0x22fbc8- -0x1e9,_0x4d6032);}this['socket']&&(this[_0x216f8a(0x41,0x25)][_0x216f8a(0x8a,0xa3)](),this[_0x216f8a(0x41,0x65)]=null);}[_0x347d1c(-0x127,-0x137)](_0x456a6c,data){function _0x203ff7(_0x3be8ad,_0x177440){return _0x4da2(_0x177440- -0x3ab,_0x3be8ad);}this[_0x203ff7(-0x10d,-0x181)]?.[_0x203ff7(-0x1ef,-0x168)](_0x456a6c,data);}['on'](_0xcb918d,_0x4f6061){this['socket']?.['on'](_0xcb918d,_0x4f6061);}['off'](_0x555322,_0x4e144f){function _0x3de8bb(_0x2c3773,_0xef32ab){return _0x4da2(_0xef32ab- -0x35a,_0x2c3773);}_0x4e144f?this['socket']?.[_0x3de8bb(-0xea,-0x97)](_0x555322,_0x4e144f):this[_0x3de8bb(-0xd2,-0x130)]?.[_0x3de8bb(-0x81,-0x97)](_0x555322);}get['connected'](){function _0x348cfb(_0xa9a690,_0x3ec9b3){return _0x4da2(_0xa9a690-0x27f,_0x3ec9b3);}return this[_0x348cfb(0x4a9,0x429)]?.[_0x348cfb(0x4e2,0x4e5)]??![];}}function _0x4da2(_0x18b879,_0x51ab99){const _0x39f818=_0x39f8();return _0x4da2=function(_0x4da231,_0x1895a4){_0x4da231=_0x4da231-0x1e7;let _0x29ef03=_0x39f818[_0x4da231];if(_0x4da2['LbuxWQ']===undefined){var _0x5e845d=function(_0x10f038){const _0x2bdc15='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x32cfaf='',_0x55abfb='';for(let _0x32fd56=0x0,_0x2c2b64,_0x273d4c,_0x1d5089=0x0;_0x273d4c=_0x10f038['charAt'](_0x1d5089++);~_0x273d4c&&(_0x2c2b64=_0x32fd56%0x4?_0x2c2b64*0x40+_0x273d4c:_0x273d4c,_0x32fd56++%0x4)?_0x32cfaf+=String['fromCharCode'](0xff&_0x2c2b64>>(-0x2*_0x32fd56&0x6)):0x0){_0x273d4c=_0x2bdc15['indexOf'](_0x273d4c);}for(let _0x302d7d=0x0,_0x4a4919=_0x32cfaf['length'];_0x302d7d<_0x4a4919;_0x302d7d++){_0x55abfb+='%'+('00'+_0x32cfaf['charCodeAt'](_0x302d7d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55abfb);};_0x4da2['zRGOqg']=_0x5e845d,_0x18b879=arguments,_0x4da2['LbuxWQ']=!![];}const _0x54efb9=_0x39f818[0x0],_0x142c16=_0x4da231+_0x54efb9,_0x3b3f6e=_0x18b879[_0x142c16];return!_0x3b3f6e?(_0x29ef03=_0x4da2['zRGOqg'](_0x29ef03),_0x18b879[_0x142c16]=_0x29ef03):_0x29ef03=_0x3b3f6e,_0x29ef03;},_0x4da2(_0x18b879,_0x51ab99);}class ReactNativeSocketAdapter{constructor(){function _0x1be7fd(_0x4c6f11,_0x48ba82){return _0x4da2(_0x4c6f11-0x3c0,_0x48ba82);}this[_0x1be7fd(0x5ea,0x5d4)]=null;}async[_0x347d1c(-0x195,-0x124)](_0x3406ce,_0x57fae4){if(!isSocketIOAvailable())throw new Error(_0x2c9850(-0x108,-0x123));const {io:_0x379c9c}=getSocketIO();function _0x2c9850(_0x20486f,_0x41f064){return _0x4da2(_0x41f064- -0x3c0,_0x20486f);}return new Promise((_0x13721e,_0x43e2d8)=>{this[_0x20adf7(-0x9e,-0x35)]=_0x379c9c(_0x3406ce,{..._0x57fae4,'transports':[_0x20adf7(-0x77,-0x98)],'upgrade':![],'autoConnect':!![]});function _0x20adf7(_0x4e0b65,_0x105bfd){return _0x4da2(_0x4e0b65- -0x2c8,_0x105bfd);}this[_0x20adf7(-0x9e,-0x6c)]['on']('connect',()=>_0x13721e()),this['socket']['on'](_0x20adf7(-0x88,-0x4b),_0x33c344=>_0x43e2d8(_0x33c344));});}[_0x347d1c(-0xda,-0x107)](){function _0x499b11(_0xb9633d,_0x302b47){return _0x4da2(_0x302b47- -0x36,_0xb9633d);}this[_0x499b11(0x205,0x1f4)]&&(this['socket'][_0x499b11(0x21f,0x23d)](),this['socket']=null);}['emit'](_0x7783d6,data){function _0x41fba4(_0x308e6c,_0x162707){return _0x4da2(_0x308e6c-0x197,_0x162707);}this['socket']?.[_0x41fba4(0x3da,0x351)](_0x7783d6,data);}['on'](_0xba8034,_0x85495f){function _0x2ac438(_0x1c21c8,_0x1d3bf8){return _0x4da2(_0x1c21c8- -0x94,_0x1d3bf8);}this[_0x2ac438(0x196,0x124)]?.['on'](_0xba8034,_0x85495f);}['off'](_0x43a0ae,_0x4f46a7){function _0x2cc0ce(_0x48ce67,_0x116c6a){return _0x4da2(_0x116c6a- -0x254,_0x48ce67);}_0x4f46a7?this[_0x2cc0ce(0x2b,-0x2a)]?.['off'](_0x43a0ae,_0x4f46a7):this['socket']?.[_0x2cc0ce(0xc5,0x6f)](_0x43a0ae);}get['connected'](){return this['socket']?.['connected']??![];}}function createSocketAdapter(){function _0x369bf2(_0x48d30e,_0x539748){return _0x4da2(_0x48d30e- -0xb2,_0x539748);}const _0x54b72d=getEnvironment();switch(_0x54b72d){case _0x369bf2(0x1f5,0x185):return new ReactNativeSocketAdapter();case'browser':case _0x369bf2(0x24c,0x275):default:return new WebSocketAdapter();}}class RealtimeClient{constructor(_0x5a7264,_0xbfe535,_0x2ff27e={}){this[_0xeb5974(0x456,0x3d1)]=null,this['channels']=new Map(),this['connectionState']=_0xeb5974(0x459,0x401),this[_0xeb5974(0x4a2,0x4df)]=0x0,this['maxReconnectAttempts']=0x5,this[_0xeb5974(0x441,0x3f6)]=_0x5a7264,this['apiKey']=_0xbfe535;function _0xeb5974(_0x308f3c,_0x43cd2b){return _0x4da2(_0x308f3c-0x22c,_0x43cd2b);}this['options']={'heartbeatInterval':0x7530,'reconnectInterval':0x1388,'maxReconnectAttempts':0x5,..._0x2ff27e},this['socketAdapter']=createSocketAdapter();}['connect'](){return new Promise(async(_0x53dc0e,_0x12499f)=>{if(this['socketAdapter'][_0x21ff56(0x2cc,0x2e8)]){_0x53dc0e();return;}function _0x21ff56(_0x563dfc,_0x2b9cfe){return _0x4da2(_0x2b9cfe-0x85,_0x563dfc);}this['connectionState']=_0x21ff56(0x31f,0x2f4);try{await this[_0x21ff56(0x2e2,0x307)]['connect'](this['url'],{'auth':{'apikey':this[_0x21ff56(0x1ee,0x271)]},'transports':['websocket'],'reconnection':!![],'reconnectionDelay':this['options'][_0x21ff56(0x27f,0x2a0)],'reconnectionAttempts':this['options'][_0x21ff56(0x372,0x33e)],...this[_0x21ff56(0x2d1,0x34d)]['socketOptions']}),this['socket']=this['socketAdapter'][_0x21ff56(0x2e0,0x2af)],this['socketAdapter']['on']('connect',()=>{this[_0x1f4be5(0x92,0xe)]=_0x1f4be5(0x41,-0x44),this[_0x1f4be5(0x3d,-0x31)]=0x0,this['setupHeartbeat']();function _0x1f4be5(_0x52eba9,_0x13956f){return _0x4da2(_0x13956f- -0x2a7,_0x52eba9);}_0x53dc0e();}),this[_0x21ff56(0x292,0x307)]['on']('disconnect',()=>{this[_0x59d019(0x1cb,0x1a6)]=_0x59d019(0x17a,0x11e);function _0x59d019(_0x2c6018,_0x4af7db){return _0x4da2(_0x4af7db- -0x10f,_0x2c6018);}this['channels']['forEach'](channel=>{function _0x30eec6(_0x350fbc,_0x16d9bf){return _0x4da2(_0x16d9bf- -0x23f,_0x350fbc);}channel[_0x30eec6(-0x6f,-0x48)](_0x30eec6(-0x9,0x7f));});}),this[_0x21ff56(0x36a,0x307)]['on'](_0x21ff56(0x288,0x2c5),_0x4a9abc=>{this['connectionState']='error';function _0x511b23(_0x11c0f8,_0x446d91){return _0x4da2(_0x11c0f8-0x8f,_0x446d91);}this[_0x511b23(0x305,0x2f6)]++,this['reconnectAttempts']>=this['maxReconnectAttempts']&&_0x12499f(new Error(_0x511b23(0x2f7,0x36d)+this[_0x511b23(0x348,0x2d4)]+_0x511b23(0x349,0x3bc)+_0x4a9abc[_0x511b23(0x34b,0x3b5)]));}),this['socketAdapter']['on']('reconnect',()=>{function _0x4db117(_0xd183dc,_0x57d48e){return _0x4da2(_0xd183dc-0x3dc,_0x57d48e);}this['connectionState']=_0x4db117(0x63f,0x5d0),this[_0x4db117(0x652,0x6c4)]=0x0,this[_0x4db117(0x6c9,0x6f4)]['forEach'](channel=>{function _0x351ff8(_0x498dbb,_0x3674e7){return _0x4da2(_0x498dbb- -0x3b8,_0x3674e7);}channel[_0x351ff8(-0xce,-0x80)]();});}),this['socketAdapter']['on']('postgres_changes',_0x58188a=>{function _0x503f55(_0x152d04,_0x7c7180){return _0x4da2(_0x152d04- -0x169,_0x7c7180);}const channel=this['channels'][_0x503f55(0x185,0x154)](_0x58188a['topic']);channel&&channel[_0x503f55(0xe5,0xa7)](_0x503f55(0x166,0x17f),_0x58188a);}),this['socketAdapter']['on']('broadcast',_0x4aa59f=>{function _0x1bb306(_0x50e082,_0x45206d){return _0x4da2(_0x45206d- -0x393,_0x50e082);}const channel=this[_0x1bb306(-0x123,-0xa6)]['get'](_0x4aa59f[_0x1bb306(-0x13b,-0x174)]);channel&&channel['_trigger'](_0x1bb306(-0x10a,-0x172),_0x4aa59f);}),this['socketAdapter']['on']('presence',_0x3a66bc=>{const channel=this['channels'][_0x2f09ca(-0x60,-0x15)](_0x3a66bc['topic']);function _0x2f09ca(_0x13769d,_0x246a00){return _0x4da2(_0x246a00- -0x303,_0x13769d);}channel&&channel['_trigger']('presence',_0x3a66bc);});}catch(_0x5d2771){this['connectionState']=_0x21ff56(0x26e,0x2cf),_0x12499f(_0x5d2771);}});}[_0x347d1c(-0x175,-0x107)](){this[_0x100fd1(0x506,0x4f1)]&&(this[_0x100fd1(0x506,0x506)]['disconnect'](),this['socket']=null);this[_0x100fd1(0x539,0x50f)]=_0x100fd1(0x4b1,0x499);function _0x100fd1(_0x2af3f8,_0x199687){return _0x4da2(_0x2af3f8-0x284,_0x199687);}this['channels'][_0x100fd1(0x55c,0x52d)]();}['channel'](_0x347533){if(this[_0x451559(-0x85,-0xf0)][_0x451559(-0xf6,-0xf5)](_0x347533))return this['channels'][_0x451559(-0xe1,-0xef)](_0x347533);const channel=new RealtimeChannel(_0x347533,this[_0x451559(-0x1fc,-0x1b3)]);this[_0x451559(-0x64,-0xf0)][_0x451559(-0x241,-0x1ce)](_0x347533,channel);this['connectionState']==='connected'&&channel[_0x451559(-0x156,-0x1a9)]();function _0x451559(_0x44f189,_0x406cdf){return _0x4da2(_0x406cdf- -0x3dd,_0x44f189);}return channel;}[_0x347d1c(-0xa5,-0xd4)](channel){function _0x3d4a46(_0x47d235,_0x11e586){return _0x4da2(_0x11e586- -0x17e,_0x47d235);}const _0x19a667=channel[_0x3d4a46(0x1e,0xa1)];this['channels'][_0x3d4a46(0x1f5,0x16a)](_0x19a667)&&(this['channels']['delete'](_0x19a667),channel['unsubscribe']());}['removeAllChannels'](){this['channels'][_0x302335(0x1f9,0x221)](channel=>{function _0xa283ab(_0x1db6b6,_0x3967c1){return _0x4da2(_0x3967c1- -0x3cc,_0x1db6b6);}channel[_0xa283ab(-0x188,-0x13d)]();});function _0x302335(_0x5dff10,_0x184466){return _0x4da2(_0x5dff10- -0x27,_0x184466);}this['channels']['clear']();}[_0x347d1c(-0x4b,-0x94)](){function _0x462ecc(_0x34cb2a,_0x20cbb5){return _0x4da2(_0x20cbb5-0x78,_0x34cb2a);}return Array[_0x462ecc(0x313,0x377)](this[_0x462ecc(0x354,0x365)][_0x462ecc(0x3b4,0x341)]());}[_0x347d1c(-0x107,-0xe4)](){function _0x3a8db9(_0x163b3f,_0x4615de){return _0x4da2(_0x4615de- -0x98,_0x163b3f);}return this[_0x3a8db9(0x25e,0x21d)]===_0x3a8db9(0x212,0x1cb)&&this[_0x3a8db9(0x199,0x1ea)][_0x3a8db9(0x155,0x1cb)];}['getConnectionState'](){function _0x37b7f6(_0x3b636f,_0x2e1666){return _0x4da2(_0x3b636f- -0x21a,_0x2e1666);}return this[_0x37b7f6(0x9b,0xcc)];}[_0x347d1c(-0x162,-0xec)](_0x1845fd){function _0x2531f0(_0x29d424,_0x1542f2){return _0x4da2(_0x29d424-0x5b,_0x1542f2);}const _0x3c2af1=()=>_0x1845fd(this[_0x2531f0(0x310,0x377)]);return this[_0x2531f0(0x2dd,0x34f)]&&(this[_0x2531f0(0x2dd,0x33b)]['on']('connect',()=>{this['connectionState']=_0x54c348(0x4f0,0x49f);function _0x54c348(_0x582797,_0x24ee71){return _0x4da2(_0x582797-0x28d,_0x24ee71);}_0x3c2af1();}),this[_0x2531f0(0x2dd,0x28c)]['on']('disconnect',()=>{this['connectionState']='disconnected',_0x3c2af1();}),this['socketAdapter']['on']('connect_error',()=>{function _0x32c184(_0x4178bb,_0x202be2){return _0x4da2(_0x202be2-0x152,_0x4178bb);}this['connectionState']=_0x32c184(0x3e9,0x39c),_0x3c2af1();})),()=>{function _0x4ce9e6(_0xf8f7c0,_0x18fa0b){return _0x4da2(_0x18fa0b-0x312,_0xf8f7c0);}this['socketAdapter']&&(this[_0x4ce9e6(0x612,0x594)]['off']('connect',_0x3c2af1),this['socketAdapter'][_0x4ce9e6(0x565,0x5d5)]('disconnect',_0x3c2af1),this['socketAdapter']['off'](_0x4ce9e6(0x4f0,0x552),_0x3c2af1));};}['setupHeartbeat'](){if(!this['options']['heartbeatInterval']||!this[_0x3a8855(0x445,0x3bd)])return;function _0x3a8855(_0x43aea1,_0xfc161e){return _0x4da2(_0xfc161e-0x13b,_0x43aea1);}const interval=setInterval(()=>{function _0x39cfd0(_0x3cbac0,_0xa611e2){return _0x4da2(_0x3cbac0- -0x1fd,_0xa611e2);}this[_0x39cfd0(0x85,0xa7)]?.[_0x39cfd0(0x66,0x73)]?this['socketAdapter']['emit'](_0x39cfd0(0xff,0x13e),{'timestamp':Date['now']()}):clearInterval(interval);},this[_0x3a8855(0x387,0x403)][_0x3a8855(0x406,0x41f)]);}['_getSocket'](){function _0xeb588b(_0x2e9c5a,_0x4a98df){return _0x4da2(_0x4a98df- -0x65,_0x2e9c5a);}return this[_0xeb588b(0x245,0x1c5)];}}class FunctionsClient{constructor(_0x53d1df){function _0x1bda14(_0x2ccc52,_0x4edf16){return _0x4da2(_0x2ccc52- -0x2,_0x4edf16);}this[_0x1bda14(0x29e,0x261)]=_0x53d1df;}async['invoke'](_0x15f978,_0x2043da){function _0x242407(_0x2f55d9,_0x1a38be){return _0x4da2(_0x1a38be-0x22b,_0x2f55d9);}try{const _0x4d3938=_0x2043da?.['method']||'POST',headers={'Content-Type':'application/json',..._0x2043da?.['headers']};let response;const _0x48f0a9='/functions/v1/'+_0x15f978;switch(_0x4d3938[_0x242407(0x4fa,0x528)]()){case'GET':response=await this[_0x242407(0x4ac,0x4cb)]['get'](_0x48f0a9,{'headers':headers,'params':_0x2043da?.[_0x242407(0x447,0x46d)]});break;case'POST':response=await this['httpClient']['post'](_0x48f0a9,_0x2043da?.['body'],{'headers':headers});break;case'PUT':response=await this[_0x242407(0x54f,0x4cb)][_0x242407(0x523,0x4a8)](_0x48f0a9,_0x2043da?.[_0x242407(0x3ec,0x46d)],{'headers':headers});break;case'PATCH':response=await this[_0x242407(0x4ad,0x4cb)]['patch'](_0x48f0a9,_0x2043da?.['body'],{'headers':headers});break;case'DELETE':response=await this[_0x242407(0x448,0x4cb)][_0x242407(0x4f2,0x4d9)](_0x48f0a9,{'headers':headers,'data':_0x2043da?.[_0x242407(0x4dd,0x46d)]});break;default:throw new EBaaSError(_0x242407(0x456,0x448)+_0x4d3938,0x190);}return{'data':response['data'],'error':null};}catch(_0x53beec){return{'data':null,'error':_0x53beec instanceof EBaaSError?_0x53beec:new EBaaSError(_0x53beec instanceof Error?_0x53beec[_0x242407(0x4b7,0x4e7)]:'Function\x20invocation\x20failed',0x0,_0x53beec)};}}async[_0x347d1c(-0xa6,-0x93)](){function _0x5cf1b3(_0x46f25c,_0x111b5b){return _0x4da2(_0x111b5b- -0x11d,_0x46f25c);}try{const response=await this['httpClient'][_0x5cf1b3(0x156,0x1d1)](_0x5cf1b3(0x85,0xff));return{'data':response[_0x5cf1b3(0x184,0x112)],'error':null};}catch(_0x4eab01){return{'data':null,'error':_0x4eab01 instanceof EBaaSError?_0x4eab01:new EBaaSError(_0x4eab01 instanceof Error?_0x4eab01['message']:'Failed\x20to\x20list\x20functions',0x0,_0x4eab01)};}}async['get'](_0x3b4edd){function _0x129e92(_0x2ebca0,_0x435290){return _0x4da2(_0x2ebca0-0x54,_0x435290);}try{const response=await this['httpClient']['get']('/functions/v1/'+_0x3b4edd+'/info');return{'data':response['data'],'error':null};}catch(_0x19737a){return{'data':null,'error':_0x19737a instanceof EBaaSError?_0x19737a:new EBaaSError(_0x19737a instanceof Error?_0x19737a[_0x129e92(0x310,0x320)]:'Failed\x20to\x20get\x20function',0x0,_0x19737a)};}}async['deploy'](_0xf1b82f,_0xb9e01f){function _0x106736(_0xd7988a,_0x456db2){return _0x4da2(_0x456db2-0x57,_0xd7988a);}try{const _0x4b2ad1=new FormData();if(_0xb9e01f['code']instanceof File)_0x4b2ad1['append']('code',_0xb9e01f[_0x106736(0x2fd,0x29f)]);else typeof _0xb9e01f['code']===_0x106736(0x375,0x2f1)&&_0x4b2ad1['append']('code',new Blob([_0xb9e01f['code']],{'type':_0x106736(0x305,0x2da)}),'index.ts');_0xb9e01f[_0x106736(0x3bd,0x335)]&&_0x4b2ad1['append'](_0x106736(0x315,0x335),_0xb9e01f['entrypoint']);_0xb9e01f['env']&&_0x4b2ad1[_0x106736(0x35c,0x302)](_0x106736(0x260,0x2b0),JSON[_0x106736(0x33d,0x2f5)](_0xb9e01f['env']));_0xb9e01f['importMap']&&_0x4b2ad1['append']('importMap',JSON['stringify'](_0xb9e01f['importMap']));_0xb9e01f[_0x106736(0x267,0x28c)]!==undefined&&_0x4b2ad1[_0x106736(0x29e,0x302)](_0x106736(0x248,0x28c),String(_0xb9e01f[_0x106736(0x317,0x28c)]));const response=await this[_0x106736(0x29c,0x2f7)][_0x106736(0x369,0x325)](_0x106736(0x257,0x2a3)+_0xf1b82f+_0x106736(0x374,0x338),_0x4b2ad1,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response['data'],'error':null};}catch(_0x222651){return{'data':null,'error':_0x222651 instanceof EBaaSError?_0x222651:new EBaaSError(_0x222651 instanceof Error?_0x222651['message']:'Failed\x20to\x20deploy\x20function',0x0,_0x222651)};}}async[_0x347d1c(-0x14e,-0xcc)](_0x48cd8a){function _0x332a17(_0x35cda3,_0x4aabc6){return _0x4da2(_0x35cda3- -0x299,_0x4aabc6);}try{const response=await this[_0x332a17(0x7,-0x1d)]['delete'](_0x332a17(-0x4d,-0xc)+_0x48cd8a);return{'data':response['data'],'error':null};}catch(_0x16522b){return{'data':null,'error':_0x16522b instanceof EBaaSError?_0x16522b:new EBaaSError(_0x16522b instanceof Error?_0x16522b['message']:_0x332a17(-0x1,-0x70),0x0,_0x16522b)};}}async[_0x347d1c(-0x63,-0xc2)](_0x1d3ccc,_0x46de65){function _0x11d3bf(_0x4f0ce7,_0x7c56bc){return _0x4da2(_0x4f0ce7- -0x232,_0x7c56bc);}try{const response=await this[_0x11d3bf(0x6e,0xef)][_0x11d3bf(0x4b,0x3f)](_0x11d3bf(0x1a,0x7)+_0x1d3ccc+'/env',{'env':_0x46de65});return{'data':response[_0x11d3bf(-0x3,0x7a)],'error':null};}catch(_0x20c526){return{'data':null,'error':_0x20c526 instanceof EBaaSError?_0x20c526:new EBaaSError(_0x20c526 instanceof Error?_0x20c526[_0x11d3bf(0x8a,0x103)]:_0x11d3bf(0x84,0x2),0x0,_0x20c526)};}}async[_0x347d1c(-0x1bc,-0x17a)](_0x48324f,_0x2f8c86){function _0x1b1745(_0x29ea76,_0x2aef1b){return _0x4da2(_0x2aef1b- -0x1c2,_0x29ea76);}try{const _0x2fa889=new URLSearchParams();_0x2f8c86?.[_0x1b1745(0x142,0x11d)]&&_0x2fa889[_0x1b1745(0x69,0xe9)]('limit',String(_0x2f8c86[_0x1b1745(0x15c,0x11d)]));_0x2f8c86?.[_0x1b1745(0x151,0xc6)]&&_0x2fa889['append']('offset',String(_0x2f8c86[_0x1b1745(0x130,0xc6)]));_0x2f8c86?.[_0x1b1745(0xa1,0x4f)]&&_0x2fa889[_0x1b1745(0x13b,0xe9)](_0x1b1745(0x72,0x4f),_0x2f8c86['level']);const _0x319fac=_0x1b1745(0xdc,0x8a)+_0x48324f+_0x1b1745(0x156,0x115)+(_0x2fa889[_0x1b1745(0x11d,0xa8)]()?'?'+_0x2fa889[_0x1b1745(0x80,0xa8)]():''),response=await this['httpClient'][_0x1b1745(0xba,0x12c)](_0x319fac);return{'data':response['data'],'error':null};}catch(_0x4caa67){return{'data':null,'error':_0x4caa67 instanceof EBaaSError?_0x4caa67:new EBaaSError(_0x4caa67 instanceof Error?_0x4caa67[_0x1b1745(0x118,0xfa)]:'Failed\x20to\x20get\x20function\x20logs',0x0,_0x4caa67)};}}async['getMetrics'](_0x37b59b,_0x450c46){function _0x4b23ed(_0x1f56fc,_0x57916d){return _0x4da2(_0x57916d- -0xde,_0x1f56fc);}try{const _0xe6ffe3=new URLSearchParams();_0x450c46?.['period']&&_0xe6ffe3['append']('period',_0x450c46['period']);const _0x298c9b=_0x4b23ed(0x132,0x16e)+_0x37b59b+'/metrics'+(_0xe6ffe3['toString']()?'?'+_0xe6ffe3['toString']():''),response=await this['httpClient']['get'](_0x298c9b);return{'data':response['data'],'error':null};}catch(_0x5d64b3){return{'data':null,'error':_0x5d64b3 instanceof EBaaSError?_0x5d64b3:new EBaaSError(_0x5d64b3 instanceof Error?_0x5d64b3['message']:_0x4b23ed(0x288,0x1fd),0x0,_0x5d64b3)};}}}class EBaaSClient{constructor(_0x56c27a,_0x3c785d,_0x744a62){this[_0x55885c(0x7c,0x4d)]=_0x744a62,this['httpClient']=new HttpClient({'url':_0x56c27a,'apiKey':_0x3c785d,'timeout':0x7530,'headers':_0x744a62?.[_0x55885c(-0xb,0x50)]?.['headers']}),this[_0x55885c(0xa6,0x21)]=new AuthClient(this['httpClient'],_0x744a62?.[_0x55885c(-0x5c,-0x44)]?.[_0x55885c(0x5d,0x90)]),this['database']=new DatabaseClient(this['httpClient'],_0x744a62?.['database']?.['workspaceId']),this[_0x55885c(-0x15,-0x10)]=new StorageClient(this['httpClient']),this[_0x55885c(-0x64,-0xa6)]=new RealtimeClient(_0x56c27a,_0x3c785d,_0x744a62?.['realtime']);function _0x55885c(_0x3d64e2,_0x304f4d){return _0x4da2(_0x3d64e2- -0x24c,_0x304f4d);}this[_0x55885c(0x4f,0x4b)]=new FunctionsClient(this[_0x55885c(0x54,0x76)]),this['initializeCustomDatabase']();}[_0x347d1c(-0xc9,-0x7b)](_0x4d3d14){function _0x26f5bc(_0x25227a,_0x607d7a){return _0x4da2(_0x25227a- -0x3a1,_0x607d7a);}return this['database'][_0x26f5bc(-0xa2,-0xad)](_0x4d3d14);}[_0x347d1c(-0x10e,-0xd9)](_0x3a1cd7,_0x7b4d05){function _0x3e23bd(_0x17caf3,_0x2aecff){return _0x4da2(_0x2aecff- -0x199,_0x17caf3);}return this[_0x3e23bd(0xa5,0x57)]['rpc'](_0x3a1cd7,_0x7b4d05);}[_0x347d1c(-0xb8,-0xee)](_0x59e019){function _0x53bfca(_0x5b878d,_0xfbb1e6){return _0x4da2(_0xfbb1e6- -0x171,_0x5b878d);}return this[_0x53bfca(0x70,0xc6)]['from'](_0x59e019);}['channel'](_0x3f091e){function _0x3d122a(_0x4780a8,_0x27397f){return _0x4da2(_0x4780a8- -0x3e1,_0x27397f);}return this['realtime'][_0x3d122a(-0x15c,-0x188)](_0x3f091e);}[_0x347d1c(-0x9f,-0xa7)](_0x32c9b1,_0x102842){return this['functions']['invoke'](_0x32c9b1,_0x102842);}async['initializeCustomDatabase'](){function _0x464cb4(_0x3533da,_0x1068dc){return _0x4da2(_0x3533da- -0x2a8,_0x1068dc);}if(this['options']?.['database']?.[_0x464cb4(0x1c,0x8f)])try{await this['database'][_0x464cb4(0x38,0xb8)]();}catch(_0x1b9d9c){console[_0x464cb4(-0x13,-0x77)]('Failed to initialize custom database detection:',_0x1b9d9c);}}async[_0x347d1c(-0x26,-0x95)](_0x5da533){this['auth'][_0x40f72e(0x131,0xa6)](_0x5da533),this[_0x40f72e(0x3c,0x38)][_0x40f72e(0x131,0x16b)](_0x5da533);function _0x40f72e(_0x4a7e1e,_0xe473e4){return _0x4da2(_0x4a7e1e- -0x1b4,_0xe473e4);}this['options']?.[_0x40f72e(0x3c,0x43)]?.['autoDetectCustomDatabase']&&await this[_0x40f72e(0x3c,0xa)][_0x40f72e(0x12c,0x109)]();}async['configureCustomDatabase'](_0x10b461){function _0x41a493(_0x5f1bb2,_0x3985dd){return _0x4da2(_0x5f1bb2- -0x2b0,_0x3985dd);}await this[_0x41a493(-0xc0,-0x7c)]['configureCustomDatabase'](_0x10b461);}['getCustomDatabaseStatus'](){function _0xf9eae5(_0x46ebe6,_0x114287){return _0x4da2(_0x46ebe6- -0x2b6,_0x114287);}return this[_0xf9eae5(-0xc6,-0x7c)]['getCustomDatabaseStatus']();}}function _0x39f8(){const _0x54a09d=['C3rVCMfNzq','ChjLC2vUy2u','l3n0B3jHz2uVDxnHz2u','CMvTB3zLqxv0AfrVA2vU','C2v0u2vZC2LVBKLUDgvYBMfS','Cg9ZDgDYzxnty2HLBwe','uMvXDwvZDcbMywLSzwq','AwXPA2u','z3rL','y29UBMvJDf9LCNjVCG','z2XVyMfS','yM9KEq','zw1PDa','y29UzMLN','AxnezwXLDgu','BgLRzq','y3jLzgvUDgLHBhm','y29Kzq','uhjLzMvY','zxjYB3i','DhjHy2S','l2z1BMn0Aw9UCY92ms8','shr0CenSAwvUDa','x3rYAwDNzxi','C2v0DxbjBNrLCMnLChrVCNm','z2v0u2vZC2LVBG','D2vIC29JA2v0','C2vHCMnO','p29WzxjHDgLVBJ1KzwXLDgu','zMLSDgvYCW','y29WEq','y29UBMvJDa','Cg9ZDgDYzxnvC2vYBMfTzq','zMLSzq','zw52','y3vYCMvUDfnLC3nPB24','lMrLC2m','B3jKzxi','C2v0u2vZC2LVBG','Ag9ZDa','DxbKyxrLrgf0yq','AM9PBMvK','zgvSzxrLqNvJA2v0','CMvTB3zLtgLZDgvUzxi','y29UBMvJDgvK','zgvMyxvSDhm','rMfPBgvKihrVihrLC3qGy29UBMvJDgLVBG','ywnJzxnZx3rVA2vU','zw50CMLLCW','rMfPBgvKihrVignVBM5Ly3qGywz0zxiG','B25Jzq','Dg9tDhjPBMC','Bwv0ywrHDge','CMvWBgfJzq','rMfPBgvKihrVihvWzgf0zsbMAwXLig1LDgfKyxrH','AM9PBG','y29UBMvJDgLUzW','mtaXmde1ngP0u05hCW','CMvZCg9UC2u','rMfPBgvKihrVigrLBgv0zsbIDwnRzxq','zgLZy29UBMvJDa','C3bSAxq','y3jLyxrLu2LNBMvKvxjS','CMvJB25Uzwn0qxr0zw1WDhm','zxHLy3v0zvf1zxj5','C3rHDgu','y3jLyxrL','Bg9N','CMvMCMvZAf90B2TLBG','q0Xpu0ve','Chv0','zxHLy3v0zq','C2nOzw1H','C29YDej5','rMfPBgvKihrVigXPC3qGzMLSzxm','C29JA2v0qwrHChrLCG','Dgv4Dc9WBgfPBG','BgvUz3rO','y2HHBM5LBa','ChjLzML4','rgf0ywjHC2uGB3bLCMf0Aw9UigzHAwXLza','B2zMC2v0','Bwf4tgLZDgvUzxjZ','yNjVywrJyxn0oG','y2fJAgvdB250CM9S','yNvJA2v0','C2v0sxrLBq','B25dB25Uzwn0Aw9Uu3rHDgvdAgfUz2u','Dw5ZDwjZy3jPyMu','Cg9ZDgDYzxnFy2HHBMDLCZO','ChvZAa','C2vSzwn0','B3bLCMf0Aw9U','ChjLCgvUzeXPC3rLBMvY','D2fYBG','AxndB25Uzwn0zwq','BhrL','rMfPBgvKihrVigrLBgv0zsbMDw5JDgLVBG','BgLZDgvUzxjZ','C3rYAw5N','zNvUy3rPB25Z','DxbZzxj0','u29JA2v0lMLVlwnSAwvUDcbUW6nVigvZDmoHigrPC3bVBSoTDMvSlIbqyxjHifjLywn0ie5HDgL2zsWGAw5ZDgfSztOGBNbTigLUC3rHBgWGC29JA2v0lMLVlwnSAwvUDa','C3rYAw5NAwz5','C2vZC2LVBG','Ahr0CenSAwvUDa','CNbJ','B25cCM9HzgnHC3q','y3vZDg9Trgf0ywjHC2vnyw5Hz2vY','z2v0u3rHDhvZ','y29UzMLNDxjLq3vZDg9Trgf0ywjHC2u','CMvTB3zLq2HHBM5LBa','CMvHy3qTBMf0AxzL','C2vUza','D29YA3nWywnLswq','CMfUzg9T','yxbWzw5K','CMvTB3zL','ChjLzMvY','zgvSzxrL','rMfPBgvKihrVigXPC3qGyNvJA2v0CW','y2XPzw50','zgf0yufYCMf5','zxzLBNrZ','z2v0twf4tgLZDgvUzxjZ','zgvSzxrLt3b0Aw9UCW','y29UBMvJDgLVBLn0yxrL','rMfPBgvKihrVihvWzgf0zsbMDw5JDgLVBIbLBNzPCM9UBwvUDa','rMfPBgvKihrVignYzwf0zsbIDwnRzxq','DxbKyxrLrw52','Bwf4uMvJB25Uzwn0qxr0zw1WDhm','igf0DgvTChrZoIa','CMvTB3zLq3vZDg9Trgf0ywjHC2u','BwvZC2fNzq','ywrK','y2XVC2vK','mJqWmti1yKv5BLDz','mtK2nduXmMDhrg1RCW','y29SDw1U','rujHyvndBgLLBNq','B2zM','yxv0B0rLDgvJDen1C3rVBurHDgfIyxnL','yMXVyG','rujHyvnfCNjVCG','ChvIBgLJ','B3b0Aw9UCW','DMfSDwvZ','Aw50zxjJzxb0B3jZ','BwfRzvjLzG','rMfPBgvKihrVihjLBw92zsbMAwXLCW','DgfIBgu','Cg9ZDa','Cg9ZDgDYzxnFy2HHBMDLCW','CgfYC2u','C29JA2v0lMLVlwnSAwvUDa','Dg9ku09o','Aw52B2TL','CMf3tgLZDgvUzxjZ','CxvLCNK','Dw5KzwzPBMvK','l2XVz3m','y2XLyxi','y2fWDhvYzvn0ywnRvhjHy2u','Bw92zq','rMfPBgvKihrVigDLDcbMDw5JDgLVBIbTzxrYAwnZ','p3vWC2vYDd10CNvL','C3nSrw5HyMXLza','zw50CNLWB2LUDa','BgLTAxq','Aw5PDgLHBgL6zq','l2rLCgXVEq','B25qB3n0z3jLC0nOyw5Nzxm','CMvXDwvZDa','AgvHCNrIzwf0sw50zxj2ywW','C2v0v29YA3nWywnLswq','z2v0q2HHBM5LBhm','BgLZDa','AgfZ','BMfTzq','x3jLAM9PBG','AgfUzgXLqxv0AevYCM9Y','z2v0q3vZDg9Tq3jLzgvUDgLHBhm','y2HHBM5LBhm','z2v0','AgfZq3vZDg9Trgf0ywjHC2u','BMvX','mtG2nJm1sKDWAhvP','yxv0Aa','y29UDgfPBNm','y29UDgvUDfr5Cgu','z2v0q3vZDg9Trgf0ywjHC2vtDgf0Dxm','AM9PBMLUzW','u3rVCMfNzunSAwvUDa','Cg9ZDgDYzxniB3n0','zxzLBNq','C3vIC2nYAxb0Aw9UCW','l2LUzM8','AgvHCNrIzwf0','Dg9vChbLCKnHC2u','BM9Kzq','zNjVBq','l3n0B3jHz2uVyNvJA2v0CY8','rMfPBgvKihrVigDLDcbMAwXLigLUzM8','CMvHBhrPBwu','rMfPBgvKihrVihvWBg9HzcbMAwXL','rMfPBgvKihrVihvWzgf0zsbIDwnRzxq','DxbKyxrL','yxbPs2v5','zgv0zwn0zwrdB25MAwC','DxbKyxrLt3b0Aw9UCW','yxnJzw5KAw5N','zgf0ywjHC2u','C2L6zq','AM9PBMvKt25Jzq','y2XLyxjtzxnZAw9U','mZe3ndC1Bvboq2DX','DhjHBNnMB3jT','u1vcu0nssujfra','x3nLDfn0yxrL','C2v0qxv0AfrVA2vU','yNvJA2v0swq','AgvHzgvYCW','ms4XlJG','Dw50CMfJAW','y29TBw9U','CMfUz2u','qMvHCMvYia','z2v0tg9NCW','BgLZDgvUzxjdB3vUDa','l3jWyY8','zMLSDgvY','C3rHDhvZ','AgfUzgXLrxjYB3i','qxv0AenSAwvUDa','mKjwENzjsa','Cgf0y2G','Bg9HzfnLC3nPB24','DMfSDwu','ywrKtgLZDgvUzxi','rNvUy3rPB25Zq2XPzw50','sfruucbYzxf1zxn0igzHAwXLza','B3bLCMf0B3i','C2v0','y3vYCMvUDfnJAgvTyq','Bgv2zwW','CMvQzwn0','z2v0sxrLBq','ChjLC2vUy2u6','DxjS','CMvZzxrqyxnZD29Yza','DxbKyxrLqNvJA2v0','z2v0qNvJA2v0','yxHPB3m','ndK2mtq2CwLWDMPA','CMvJB25Uzwn0sw50zxj2ywW','l2z1BMn0Aw9UCY92mq','vw5ZDxbWB3j0zwqGsfruucbTzxrOB2q6ia','C3vIC2nYAwjLx3bVC3rNCMvZx2nOyw5Nzxm','Dg9WAwm','zM9YrwfJAa','yNjVywrJyxn0','yNjVD3nLCG','C3rHDhvZvgv4Da','DxnLCG','l21LDgfKyxrH','uMvHBhrPBwvdBgLLBNq','l2zPBgvZlW','l2zPBgvZl2nVChK','mZa0ndG4whfSCwTg','C29JA2v0','rMfPBgvKihrVignVChKGzMLSzq','DgvZDenVBM5Ly3rPB24','zgLZy29UBMvJDgvK','zgv0zwn0q3vZDg9Trgf0ywjHC2u','zgf0yq','Cg9YDa','zwjHyxmUyxv0Ac5ZzxnZAw9U','CMvZB2X2zq','zxzLBNroyw1LCW','x2PVAw4','DMvYAwz5','DxnL'];_0x39f8=function(){return _0x54a09d;};return _0x39f8();}function createClient(_0x4a35f7,_0x264c79,_0x2d3309){return new EBaaSClient(_0x4a35f7,_0x264c79,_0x2d3309);}const version=_0x347d1c(-0x1d8,-0x17f);exports[_0x347d1c(-0x18d,-0x174)]=AuthClient,exports['CustomDatabaseManager']=CustomDatabaseManager,exports['DatabaseClient']=DatabaseClient,exports[_0x347d1c(-0x8c,-0xb8)]=EBaaSClient,exports[_0x347d1c(-0x9b,-0xb4)]=EBaaSError,exports[_0x347d1c(-0x1e0,-0x16e)]=FunctionsClient,exports[_0x347d1c(-0x13c,-0x12d)]=HttpClient,exports['QueryBuilder']=QueryBuilder,exports['RealtimeChannel']=RealtimeChannel,exports[_0x347d1c(-0x129,-0x154)]=RealtimeClient,exports['StorageBucket']=StorageBucket,exports[_0x347d1c(-0x81,-0x83)]=StorageClient,exports['createClient']=createClient,exports['version']=version;
|