4697a145a88c891a3d896d863b09dde6226ab634
[motion-next.git] / server / config / config.service.js
1 const a837_0x281c=['replace','string','true','defineProperties','number','env','undefined','exports','reduce','production','./env_definitions','lodash','boolean'];(function(_0x1b1dcb,_0x281cc1){const _0x235001=function(_0x3e7569){while(--_0x3e7569){_0x1b1dcb['push'](_0x1b1dcb['shift']());}};_0x235001(++_0x281cc1);}(a837_0x281c,0xc3));const a837_0x2350=function(_0x1b1dcb,_0x281cc1){_0x1b1dcb=_0x1b1dcb-0x0;let _0x235001=a837_0x281c[_0x1b1dcb];return _0x235001;};const _0x516f1b=a837_0x2350,{camelCase}=require(_0x516f1b('0xb')),{validKeys}=require(_0x516f1b('0xa')),VALID_KEYS=validKeys;function toBoolean(_0x3e7569,_0x43cad2=![]){const _0x27f28f=_0x516f1b;return typeof _0x3e7569===_0x27f28f('0x6')?_0x43cad2:Boolean(typeof _0x3e7569===_0x27f28f('0x1')?_0x3e7569['toLowerCase']()===_0x27f28f('0x2'):_0x3e7569);}function toNumber(_0x58f5f6,_0x476335=null){const _0x22c678=_0x516f1b,_0x46f9c5=typeof _0x58f5f6===_0x22c678('0x6')||_0x58f5f6===null?NaN:Number(_0x58f5f6);return isNaN(_0x46f9c5)?_0x476335:_0x46f9c5;}function toString(_0x5c4b18,_0x460673=''){const _0x500a64=_0x516f1b;return typeof _0x5c4b18===_0x500a64('0x6')||_0x5c4b18===null?_0x460673:String(_0x5c4b18);}function getPropertiesConfiguration(){const _0x1ca463=_0x516f1b,_0x3fcc3d={'enumerable':!![],'configurable':![],'writable':![]};return VALID_KEYS[_0x1ca463('0x8')]((_0x1b6f82,{env:_0x168f13,type:_0x45a096,defaultValue:_0x1ec955})=>{const _0x401074=_0x1ca463;let _0x4965da=null;const _0x39d582=process[_0x401074('0x5')][_0x168f13];switch(_0x45a096){case _0x401074('0xc'):_0x4965da=toBoolean(_0x39d582,_0x1ec955);break;case _0x401074('0x4'):_0x4965da=toNumber(_0x39d582,_0x1ec955);break;case _0x401074('0x1'):_0x4965da=toString(_0x39d582,_0x1ec955);break;default:break;}if(_0x168f13==='NODE_ENV')_0x1b6f82={..._0x1b6f82,'isProduction':{'value':_0x4965da===_0x401074('0x9'),..._0x3fcc3d},'environment':{'value':_0x4965da,..._0x3fcc3d}};else{const _0x298249=camelCase(_0x168f13[_0x401074('0x0')](/^XC_/,''));_0x1b6f82={..._0x1b6f82,[_0x298249]:{'value':_0x4965da,..._0x3fcc3d}};}return _0x1b6f82;},{});}let configService=null;function getConfigService(){const _0x4d25db=_0x516f1b;if(configService===null){configService={};const _0x435c7a=getPropertiesConfiguration();Object[_0x4d25db('0x3')](configService,_0x435c7a);}return configService;}module[_0x516f1b('0x7')]={'getConfigService':getConfigService};