scimgateway 4.4.0 → 4.4.2

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 CHANGED
@@ -453,7 +453,7 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
453
453
  - Setting environment variable `SEED` will override default password seeding logic.
454
454
  - All configuration can be set based on environment variables. Syntax will then be `"process.env.<ENVIRONMENT>"` where `<ENVIRONMENT>` is the environment variable used. E.g. scimgateway.port could have value "process.env.PORT", then using environment variable PORT.
455
455
  - All configuration can be set based on corresponding JSON-content (dot notation) in external file using plugin name as parent JSON object. Syntax will then be `"process.file.<path>"` where `<path>` is the file used. E.g. endpoint.password could have value "process.file./var/run/vault/secrets.json"
456
- - Indivudual Secrets can be contained in plain text files. Syntax will then be `"process.text.<path>"` where `<path>` is the file which contains raw (`UTF-8`) character value. E.g. endpoint.password could have value "process.text./var/run/vault/endpoint.password". This enables that the config file itself be loaded from a ConfigMap while specific values are mounted either from `secrets.json` style files as mentioned above OR from traditional secrets files mounted in the file system, one value per file.
456
+ - Also, individual secret file may be used for a plain text secret per file. Syntax will then be `"process.text.<path>"` where `<path>` is the file which contains raw (`UTF-8`) character value. E.g. endpoint.password could have value "process.text./var/run/vault/endpoint.password". This enables that the config file itself be loaded from a ConfigMap while specific values are mounted either from `secrets.json` style files as mentioned above OR from traditional secrets files mounted in the file system, one value per file.
457
457
 
458
458
  Example:
459
459
 
@@ -1199,6 +1199,26 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1199
1199
 
1200
1200
  ## Change log
1201
1201
 
1202
+ ### v4.4.2
1203
+
1204
+ [Added]
1205
+
1206
+ - scim-stream subscriber configuration have been changed:
1207
+ old: `"convertRolesToGroups": false`
1208
+ new: `"skipConvertRolesToGroups": false`
1209
+ This means convert roles to groups is default behavior unless skipConvertRolesToGroups=true
1210
+
1211
+ ### v4.4.1
1212
+
1213
+ [Added]
1214
+
1215
+ - scim-stream subscriber using latest api and some additional recovery logic
1216
+ Prerequisite: [SCIM Stream](https://elshaug.xyz/docs/scim-stream) version > v1.0.0
1217
+
1218
+ [Fixed]
1219
+
1220
+ - plugin-loki was missing async await and could cause problems in some stress test use cases
1221
+
1202
1222
  ### v4.4.0
1203
1223
 
1204
1224
  [Added]
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -109,7 +109,7 @@
109
109
  "secret": null
110
110
  },
111
111
  "deleteUserOnLastGroupRoleRemoval": false,
112
- "convertRolesToGroups": false,
112
+ "skipConvertRolesToGroups": false,
113
113
  "generateUserPassword": false,
114
114
  "modifyOnly": false,
115
115
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -116,7 +116,7 @@
116
116
  "secret": null
117
117
  },
118
118
  "deleteUserOnLastGroupRoleRemoval": false,
119
- "convertRolesToGroups": false,
119
+ "skipConvertRolesToGroups": false,
120
120
  "generateUserPassword": false,
121
121
  "modifyOnly": false,
122
122
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -110,7 +110,7 @@
110
110
  "secret": null
111
111
  },
112
112
  "deleteUserOnLastGroupRoleRemoval": false,
113
- "convertRolesToGroups": false,
113
+ "skipConvertRolesToGroups": false,
114
114
  "generateUserPassword": false,
115
115
  "modifyOnly": false,
116
116
  "replaceDomains": []
@@ -239,7 +239,7 @@ scimgateway.createUser = async (baseEntity, userObj, ctx) => {
239
239
  else throw new Error(`${action} error: missing mandatory userName or externalId`)
240
240
 
241
241
  try {
242
- users.insert(userObj)
242
+ await users.insert(userObj)
243
243
  return null
244
244
  } catch (err) {
245
245
  const newErr = new Error(`${action} error: ${err.message}`)
@@ -262,7 +262,7 @@ scimgateway.deleteUser = async (baseEntity, id, ctx) => {
262
262
  const res = users.find({ id: id })
263
263
  if (res.length !== 1) throw new Error(`${action} error: failed for user id=${id}`)
264
264
  const userObj = res[0]
265
- users.remove(userObj)
265
+ await users.remove(userObj)
266
266
  return null
267
267
  }
268
268
 
@@ -367,7 +367,7 @@ scimgateway.modifyUser = async (baseEntity, id, attrObj, ctx) => {
367
367
  }
368
368
  }
369
369
  }
370
- users.update(userObj) // needed for persistence
370
+ await users.update(userObj) // needed for persistence
371
371
  return null
372
372
  }
373
373
 
@@ -488,7 +488,7 @@ scimgateway.createGroup = async (baseEntity, groupObj, ctx) => {
488
488
  else groupObj.id = groupObj.displayName
489
489
 
490
490
  try {
491
- groups.insert(groupObj)
491
+ await groups.insert(groupObj)
492
492
  return null
493
493
  } catch (err) {
494
494
  const newErr = new Error(`${action} error: ${err.message}`)
@@ -511,7 +511,7 @@ scimgateway.deleteGroup = async (baseEntity, id, ctx) => {
511
511
  const res = groups.find({ id: id })
512
512
  if (res.length !== 1) throw new Error(`${action} error: failed for id=${id}`)
513
513
  const groupObj = res[0]
514
- groups.remove(groupObj)
514
+ await groups.remove(groupObj)
515
515
  return null
516
516
  }
517
517
 
@@ -562,7 +562,7 @@ scimgateway.modifyGroup = async (baseEntity, id, attrObj, ctx) => {
562
562
  groupObj[key] = attrObj[key]
563
563
  }
564
564
 
565
- groups.update(groupObj)
565
+ await groups.update(groupObj)
566
566
 
567
567
  if (usersNotExist.length > 0) throw new Error(`${action} error: failed for id=${groupObj.id} - includes none existing members: ${usersNotExist.toString()}`)
568
568
  return null
@@ -10,4 +10,4 @@
10
10
  // for details see: https://elshaug.xyz/docs/scim-stream
11
11
  //
12
12
  // ================================================================
13
- 'use strict';const a0_0x32b8a6=a0_0x5a6a;(function(_0x3b1964,_0x4ffd0d){const _0xd63a1b=a0_0x5a6a,_0x5ce8bf=_0x3b1964();while(!![]){try{const _0x18473f=parseInt(_0xd63a1b(0x1f2))/0x1*(parseInt(_0xd63a1b(0x23c))/0x2)+-parseInt(_0xd63a1b(0x27c))/0x3*(parseInt(_0xd63a1b(0x20b))/0x4)+parseInt(_0xd63a1b(0x217))/0x5*(parseInt(_0xd63a1b(0x298))/0x6)+parseInt(_0xd63a1b(0x266))/0x7+parseInt(_0xd63a1b(0x240))/0x8*(-parseInt(_0xd63a1b(0x291))/0x9)+parseInt(_0xd63a1b(0x1ea))/0xa*(parseInt(_0xd63a1b(0x277))/0xb)+parseInt(_0xd63a1b(0x28b))/0xc*(-parseInt(_0xd63a1b(0x29d))/0xd);if(_0x18473f===_0x4ffd0d)break;else _0x5ce8bf['push'](_0x5ce8bf['shift']());}catch(_0x2e9599){_0x5ce8bf['push'](_0x5ce8bf['shift']());}}}(a0_0x30b9,0xb550b));function a0_0x5a6a(_0x5c3813,_0xd0cad1){const _0x30b9b9=a0_0x30b9();return a0_0x5a6a=function(_0x5a6acc,_0x43c16c){_0x5a6acc=_0x5a6acc-0x1d6;let _0x1f535=_0x30b9b9[_0x5a6acc];return _0x1f535;},a0_0x5a6a(_0x5c3813,_0xd0cad1);}const nats=require(a0_0x32b8a6(0x215)),ascii127=require('fold-to-ascii'),fs=require('fs'),utils=require(a0_0x32b8a6(0x25b)),path=require(a0_0x32b8a6(0x22b)),crypto=require(a0_0x32b8a6(0x1f6));function a0_0x30b9(){const _0x4859fe=[']\x20error:\x20missing\x20one\x20or\x20more\x20mandatory\x20configurations\x20e.g.\x20stream.baseUrls,\x20stream.certificate.ca,\x20nats.tenant,\x20nats.subject,\x20nats.secret\x20and\x20nats.jwt','1340QtXxnO',',false','\x20done',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','541104zRwmEW','convertRolesToGroups','deliverNew','\x20handling\x20message:\x20','\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true','set','active','Reconnecting','modifyOnly','StringCodec','roles','tenant','includes','\x20error:\x20missing\x20result','getProcessed','\x20(count=','getServer','\x20error:\x20','subject','stringify','\x20=>\x20subscriber\x20stopped','substring','lowercase',']\x20restarting\x20connection','\x20message\x20json\x20parsing\x20error:\x20','operation','toLowerCase','../lib/utils','from','level','request','unsubscribe','body','display',']\x20handling\x20\x22','error','call','typeId','1435182YbsoCS','SCIM\x20Stream\x20-\x20Autogenerated','servers','logger','join','/approles','prototype','\x20createUser()\x20obj=','##doIncrement','originalUrl','uppercase',']\x20subscriber\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true','usePutSoftSync','isArray','forEach','increment','jetstream','9044893AbiSHj','\x20-\x20','waitOnFirstConnect','User','Resources','54yzaYvZ','string','file','Reconnect','utf-8','maxPingOut','onCreate','\x20message:\x20','getuniquevalue','Application','\x20Create\x20User\x20userName=','\x20-\x20please\x20verify\x20stream.connectionUrls,\x20stream.certificate.ca,\x20nats.secret\x20and\x20nats.subject\x20configuration','\x20role\x20removal\x20error:\x20','\x20result=',']\x20connect\x20error:\x20','1068lqUSZU','exports','name','fsExistsSync',']\x20subscriber[','durable','81YOzQTv','Errors','randomUUID','status','length','modifyGroup','password','84RyFUHg','readFileSync','replaceUsrGrp','jwtAuthenticator','debug','92066IIanhl','detail','message','connect','deliverTo','secret','getAppRoles','\x20roles\x20converted\x20to\x20groups\x20message:\x20','ackNone','\x20getUserId()\x20error:\x20',']\x20closed\x20with\x20error:\x20','queue','consumerOpts','\x20Delete\x20User\x20id=','split','\x20group\x20removal\x20error:\x20','subscribe','replaceDomains','queueGroup','activityOperation','write','data','durable_','false','10JXOtwp','DebugEvents','delete','ack','close','info','baseUrls','deleteUserOnLastGroupRoleRemoval','1565rBXdGE','\x20Replace\x20User\x20id=','value','approles','crypto','indexOf','\x20message:\x20user\x20does\x20not\x20exist','gwName','Operations','replace','elementnumber','/Users/','params','normalize','doIncrement','certificate','generateUserPassword','Subscriber','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','\x20should\x20have\x20syntax:\x20<collector>.<channel>','description','closed','\x20missing\x20user\x20object\x20in\x20message:\x20','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','approles_','280444BFtEvO',']\x20subscriber\x20error:\x20missing\x20certificate\x20configuration','startsWith',']\x20error:\x20subject\x20','userName','type',']\x20subscriber\x20certificate\x20error:\x20','schemas','/certs/','transports','nats','push','417095ilMnBD','pingInterval','authenticator',']\x20error:\x20','foldReplacing','trim','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','getUsers','headers','jwt','pluginName','then','\x20Create\x20userName=','Events','displayName','Disconnect','utf8','\x20=>\x20subscriber\x20not\x20activated','copyObj','_autogenerated.cfg','path','createUser',']\x20client\x20disconnected\x20','toUpperCase','decode','replaceAll','getUsers()\x20getObj=','modifyUser','configDir','\x20Delete\x20User\x20userName=','groups',']\x20connected\x20','true','mkdirSync','Msg-Id','deleteUser'];a0_0x30b9=function(){return _0x4859fe;};return a0_0x30b9();}module[a0_0x32b8a6(0x28c)][a0_0x32b8a6(0x203)]=function(_0x33e808,_0x3e6e69,_0x73c3e0){const _0x4b2276=a0_0x32b8a6,_0x12d9c9=_0x33e808,_0x366236=_0x3e6e69;if(!_0x366236[_0x4b2276(0x201)]||!_0x366236[_0x4b2276(0x201)]['ca']){_0x12d9c9[_0x4b2276(0x269)]['error'](_0x12d9c9['gwName']+'['+_0x12d9c9['pluginName']+_0x4b2276(0x20c));return;}if(!_0x366236[_0x4b2276(0x272)]){_0x12d9c9[_0x4b2276(0x269)][_0x4b2276(0x263)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x4b2276(0x221)]+_0x4b2276(0x271));return;}let _0x3e0f1f='';for(let _0x4ff6f2=0x0;_0x4ff6f2<_0x12d9c9[_0x4b2276(0x269)][_0x4b2276(0x214)]['length'];_0x4ff6f2++){if(_0x12d9c9[_0x4b2276(0x269)]['transports'][_0x4ff6f2][_0x4b2276(0x28d)]===_0x4b2276(0x27e)){_0x3e0f1f=_0x12d9c9['logger'][_0x4b2276(0x214)][_0x4ff6f2][_0x4b2276(0x25d)];break;}}const _0x5e6ada=''+(_0x3e0f1f===_0x4b2276(0x29c)?'\x0a':''),_0x146b1b={};try{_0x146b1b['ca']=[fs[_0x4b2276(0x299)](_0x12d9c9[_0x4b2276(0x233)]+_0x4b2276(0x213)+_0x366236[_0x4b2276(0x201)]['ca'])];}catch(_0x2525b7){_0x12d9c9[_0x4b2276(0x269)]['error'](_0x12d9c9[_0x4b2276(0x1f9)]+'['+_0x12d9c9['pluginName']+_0x4b2276(0x211)+_0x2525b7['message']);return;}const _0x5b61b0={},_0x3be961=new TextEncoder()['encode'](_0x366236['nats']['secret']),_0xdf6ba8=_0x366236[_0x4b2276(0x215)]['jwt'];_0x5b61b0[_0x4b2276(0x219)]=nats[_0x4b2276(0x29b)](_0xdf6ba8,_0x3be961),_0x5b61b0[_0x4b2276(0x268)]=_0x366236['baseUrls'],_0x5b61b0['tls']=_0x146b1b,_0x5b61b0[_0x4b2276(0x279)]=![],_0x5b61b0['reconnect']=!![],_0x5b61b0['reconnectTimeWait']=0x3e8*0xa,_0x5b61b0['maxReconnectAttempts']=-0x1,_0x5b61b0[_0x4b2276(0x218)]=0x2*0x3c*0x3e8,_0x5b61b0[_0x4b2276(0x281)]=0x5,_0x5b61b0[_0x4b2276(0x29c)]=![];let _0x47aacd;this['connect']=async _0x44949=>{const _0x34611e=_0x4b2276;try{_0x47aacd=await nats[_0x34611e(0x2a0)](_0x5b61b0);}catch(_0xd65432){_0x12d9c9[_0x34611e(0x269)][_0x34611e(0x263)](_0x12d9c9[_0x34611e(0x1f9)]+'['+_0x12d9c9['pluginName']+_0x34611e(0x28f)+_0x44949+_0x34611e(0x28a)+_0xd65432['message']+_0x34611e(0x287)),_0x5b61b0[_0x34611e(0x279)]=!![];try{_0x47aacd=await nats[_0x34611e(0x2a0)](_0x5b61b0);}catch(_0x4b42b4){_0x12d9c9[_0x34611e(0x269)][_0x34611e(0x263)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x34611e(0x221)]+']\x20subscriber['+_0x44949+_0x34611e(0x28a)+_0x4b42b4[_0x34611e(0x29f)]);return;}}_0x12d9c9['logger'][_0x34611e(0x1ef)](_0x12d9c9[_0x34611e(0x1f9)]+'['+_0x12d9c9['pluginName']+_0x34611e(0x28f)+_0x44949+_0x34611e(0x236)+(_0x5b61b0['tls']['ca']?'tls':'')+'\x20'+_0x47aacd[_0x34611e(0x250)]()),_0x47aacd[_0x34611e(0x207)]()[_0x34611e(0x222)](_0x2ab7f0=>{const _0x273c4c=_0x34611e;_0x2ab7f0&&_0x12d9c9[_0x273c4c(0x269)][_0x273c4c(0x263)](_0x12d9c9[_0x273c4c(0x1f9)]+'['+_0x12d9c9[_0x273c4c(0x221)]+_0x273c4c(0x28f)+_0x44949+_0x273c4c(0x1dc)+_0x2ab7f0[_0x273c4c(0x29f)]);});},this['subscribe']=async(_0x20f2b8,_0x2f89fd)=>{const _0x1044af=_0x4b2276;if(!_0x2f89fd||!_0x366236[_0x1044af(0x1f0)]||!_0x366236[_0x1044af(0x201)]||!_0x366236[_0x1044af(0x201)]['ca']||!_0x366236[_0x1044af(0x215)]||!_0x366236[_0x1044af(0x215)][_0x1044af(0x24b)]||!_0x366236[_0x1044af(0x215)][_0x1044af(0x1d7)]||!_0x366236[_0x1044af(0x215)][_0x1044af(0x220)]){_0x12d9c9[_0x1044af(0x269)]['error'](_0x12d9c9[_0x1044af(0x1f9)]+'['+_0x12d9c9[_0x1044af(0x221)]+_0x1044af(0x28f)+_0x2f89fd+_0x1044af(0x23b));return;}if(_0x2f89fd[_0x1044af(0x1e0)]('.')['length']<0x2){_0x12d9c9[_0x1044af(0x269)][_0x1044af(0x263)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x1044af(0x221)]+_0x1044af(0x28f)+_0x2f89fd+_0x1044af(0x20e)+_0x2f89fd+_0x1044af(0x205));return;}if(!_0x47aacd){_0x12d9c9[_0x1044af(0x269)][_0x1044af(0x263)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x1044af(0x221)]+_0x1044af(0x28f)+_0x2f89fd+']\x20error:\x20client\x20have\x20not\x20been\x20initialized');return;}const _0x6f0c58=nats[_0x1044af(0x249)](),_0x121e49=_0x47aacd[_0x1044af(0x276)](),_0x4816ac=nats[_0x1044af(0x1de)](),_0x4659dc=('deliver.'+_0x2f89fd+'.'+_0x12d9c9['pluginName'])[_0x1044af(0x230)]('*','_')[_0x1044af(0x230)]('>','_'),_0x1a13e6=(_0x1044af(0x1e8)+_0x2f89fd+'_'+_0x12d9c9[_0x1044af(0x221)])['replaceAll']('*','_')[_0x1044af(0x230)]('>','_')[_0x1044af(0x230)]('.','_');let _0x29db4c;try{_0x4816ac['stream']=_0x366236[_0x1044af(0x215)][_0x1044af(0x24b)],_0x4816ac[_0x1044af(0x290)](_0x1a13e6),_0x4816ac[_0x1044af(0x1d6)](_0x4659dc),_0x366236[_0x1044af(0x1e4)]&&_0x4816ac[_0x1044af(0x1dd)](_0x366236['queueGroup']),_0x4816ac[_0x1044af(0x242)](),_0x4816ac[_0x1044af(0x1da)](),_0x29db4c=await _0x121e49[_0x1044af(0x1e2)](_0x2f89fd,_0x4816ac);}catch(_0x488100){_0x12d9c9[_0x1044af(0x269)][_0x1044af(0x263)](_0x12d9c9[_0x1044af(0x1f9)]+'['+_0x12d9c9[_0x1044af(0x221)]+_0x1044af(0x28f)+_0x2f89fd+_0x1044af(0x21a)+_0x488100[_0x1044af(0x29f)]+_0x1044af(0x228)+_0x5e6ada);return;}const _0x18b866=async()=>{const _0x17b6c6=_0x1044af;try{for await(const _0x1a900c of _0x29db4c){if(!_0x1a900c[_0x17b6c6(0x21f)]||!_0x1a900c[_0x17b6c6(0x21f)]['get'](_0x17b6c6(0x239))){_0x1a900c[_0x17b6c6(0x1ed)]();continue;}const _0x4883c1=_0x12d9c9[_0x17b6c6(0x1f9)]+'['+_0x12d9c9['pluginName']+_0x17b6c6(0x28f)+_0x1a900c[_0x17b6c6(0x252)]+']['+_0x29db4c[_0x17b6c6(0x24e)]()+']['+(_0x1a900c['headers']?_0x1a900c[_0x17b6c6(0x21f)]['get'](_0x17b6c6(0x239)):'')+']';_0x12d9c9[_0x17b6c6(0x269)]['info'](_0x4883c1+_0x17b6c6(0x243)+_0x6f0c58['decode'](_0x1a900c[_0x17b6c6(0x1e7)])),_0x1a900c[_0x17b6c6(0x1ed)]();let _0xd54535;try{let _0x129556=_0x6f0c58[_0x17b6c6(0x22f)](_0x1a900c[_0x17b6c6(0x1e7)]);if(_0x366236[_0x17b6c6(0x1e3)]&&Array[_0x17b6c6(0x273)](_0x366236[_0x17b6c6(0x1e3)]))for(let _0x55d408=0x0;_0x55d408<_0x366236['replaceDomains'][_0x17b6c6(0x295)];_0x55d408++){const _0x1947ea=_0x366236[_0x17b6c6(0x1e3)][_0x55d408];if(!_0x1947ea['from']||!_0x1947ea[_0x17b6c6(0x25c)]['includes']('.')||!_0x1947ea['to']||!_0x1947ea['to']['includes']('.'))continue;const _0x40a817=new RegExp('@'+_0x1947ea[_0x17b6c6(0x25c)]+'\x22','gi');_0x129556=_0x129556['replace'](_0x40a817,'@'+_0x1947ea['to']+'\x22');}_0xd54535=JSON['parse'](_0x129556);}catch(_0x645527){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x258)+_0x645527[_0x17b6c6(0x29f)]+_0x17b6c6(0x283)+_0x6f0c58[_0x17b6c6(0x22f)](_0x1a900c[_0x17b6c6(0x1e7)])),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+'\x20done'+_0x5e6ada);continue;}const _0x5d35a1=_0xd54535['user'];if(!_0x5d35a1){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x208)+JSON[_0x17b6c6(0x253)](_0xd54535)),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}if(!_0x5d35a1[_0x17b6c6(0x20f)]){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x209)+JSON[_0x17b6c6(0x253)](_0xd54535)),_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}delete _0x5d35a1[_0x17b6c6(0x212)];let _0xad1856;_0x5d35a1['id']&&(_0xad1856=_0x5d35a1['id'],delete _0x5d35a1['id']);let _0x5ef708;_0x5d35a1['onCreate']&&(_0x5ef708=utils[_0x17b6c6(0x229)](_0x5d35a1[_0x17b6c6(0x282)]),delete _0x5d35a1[_0x17b6c6(0x282)]);await _0x12b589(_0x5d35a1);const _0x37e300=_0x5d35a1['userName'];let _0x21961e,_0x4fcee7;try{_0x21961e=await _0x4f8251(_0x17b6c6(0x20f),_0x37e300);}catch(_0x7295fa){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x1db)+_0x7295fa[_0x17b6c6(0x29f)]),_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+'\x20done'+_0x5e6ada);continue;}if(_0x366236[_0x17b6c6(0x241)]){let _0x597804=![];if(_0xd54535[_0x17b6c6(0x1fa)]&&Array['isArray'](_0xd54535[_0x17b6c6(0x1fa)]))for(let _0x54c697=0x0;_0x54c697<_0xd54535['Operations'][_0x17b6c6(0x295)];_0x54c697++){const _0x1b947a=_0xd54535[_0x17b6c6(0x1fa)][_0x54c697];_0x1b947a[_0x17b6c6(0x22b)][_0x17b6c6(0x20d)]('roles')&&(_0x1b947a[_0x17b6c6(0x22b)]=_0x17b6c6(0x235),Array[_0x17b6c6(0x273)](_0x1b947a[_0x17b6c6(0x1f4)])?(_0x1b947a[_0x17b6c6(0x1f4)][0x0]['id']=_0x1b947a[_0x17b6c6(0x1f4)][0x0][_0x17b6c6(0x1f4)],_0x1b947a['value'][0x0][_0x17b6c6(0x261)]=_0x1b947a['value'][0x0]['type']+_0x17b6c6(0x278)+_0x1b947a[_0x17b6c6(0x1f4)][0x0][_0x17b6c6(0x1f4)],delete _0x1b947a[_0x17b6c6(0x1f4)][0x0][_0x17b6c6(0x1f4)],delete _0x1b947a[_0x17b6c6(0x1f4)][0x0]['type']):_0x1b947a[_0x17b6c6(0x1f4)]=[{'id':_0x1b947a[_0x17b6c6(0x1f4)],'display':_0x1b947a[_0x17b6c6(0x1f4)]}],delete _0x1b947a[_0x17b6c6(0x265)],_0x597804=!![]);}if(_0x5d35a1[_0x17b6c6(0x24a)]&&Array['isArray'](_0x5d35a1[_0x17b6c6(0x24a)])&&_0x5d35a1['roles'][_0x17b6c6(0x295)]>0x0){if(!_0x5d35a1[_0x17b6c6(0x235)])_0x5d35a1[_0x17b6c6(0x235)]=[];if(!Array[_0x17b6c6(0x273)](_0x5d35a1['groups']))_0x5d35a1['groups']=[];for(let _0x4fc821=0x0;_0x4fc821<_0x5d35a1[_0x17b6c6(0x24a)][_0x17b6c6(0x295)];_0x4fc821++){const _0x4af965={},_0x27c9e6=_0x5d35a1['roles'][_0x4fc821];_0x4af965['value']=_0x27c9e6[_0x17b6c6(0x1f4)],_0x4af965['display']=_0x27c9e6[_0x17b6c6(0x210)]+_0x17b6c6(0x278)+_0x27c9e6[_0x17b6c6(0x261)],_0x5d35a1[_0x17b6c6(0x235)]['push'](_0x4af965);}delete _0x5d35a1[_0x17b6c6(0x24a)],_0x597804=!![];}if(_0x597804)_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x1d9)+JSON['stringify'](_0xd54535));}if(_0x366236[_0x17b6c6(0x1f1)]&&_0xd54535[_0x17b6c6(0x1e5)]===_0x17b6c6(0x232)){if(_0x5d35a1[_0x17b6c6(0x235)]&&Array['isArray'](_0x5d35a1[_0x17b6c6(0x235)])&&_0x5d35a1[_0x17b6c6(0x235)][_0x17b6c6(0x295)]===0x0){if(_0x5d35a1[_0x17b6c6(0x24a)]&&Array['isArray'](_0x5d35a1[_0x17b6c6(0x24a)])&&_0x5d35a1['roles'][_0x17b6c6(0x295)]===0x0){if(_0xd54535[_0x17b6c6(0x1fa)]&&Array[_0x17b6c6(0x273)](_0xd54535['Operations'])&&_0xd54535[_0x17b6c6(0x1fa)][_0x17b6c6(0x295)]>0x0)for(let _0x43fa08=0x0;_0x43fa08<_0xd54535[_0x17b6c6(0x1fa)][_0x17b6c6(0x295)];_0x43fa08++){const _0xe1fe33=_0xd54535[_0x17b6c6(0x1fa)][_0x43fa08];if(_0xe1fe33['op']==='remove'){if(_0xe1fe33[_0x17b6c6(0x22b)]){if(_0xe1fe33[_0x17b6c6(0x22b)][_0x17b6c6(0x20d)](_0x17b6c6(0x24a))&&_0xe1fe33[_0x17b6c6(0x265)])_0xd54535['activityOperation']='deleteUser';else _0xe1fe33['path']===_0x17b6c6(0x235)&&(_0xd54535[_0x17b6c6(0x1e5)]=_0x17b6c6(0x23a));}}}}}}if(!_0x21961e){if(_0xd54535['activityOperation']==='deleteUser'){_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+_0x17b6c6(0x234)+_0x37e300+_0x17b6c6(0x1f8)),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}if(_0x366236['modifyOnly']&&_0x366236[_0x17b6c6(0x248)]===!![]){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x223)+_0x37e300+_0x17b6c6(0x21d)),_0x12d9c9['logger']['debug'](_0x4883c1+'\x20done'+_0x5e6ada);continue;}if(Object[_0x17b6c6(0x26c)]['hasOwnProperty'][_0x17b6c6(0x264)](_0x5d35a1,_0x17b6c6(0x246))){if(typeof _0x5d35a1['active']===_0x17b6c6(0x27d)){const _0x387f88=_0x5d35a1[_0x17b6c6(0x246)][_0x17b6c6(0x25a)]();if(_0x387f88===_0x17b6c6(0x237))_0x5d35a1[_0x17b6c6(0x246)]=!![];else{if(_0x387f88===_0x17b6c6(0x1e9))_0x5d35a1[_0x17b6c6(0x246)]=![];}}if(_0x5d35a1['active']===![]){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x223)+_0x37e300+'\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false'),_0x12d9c9['logger'][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}}_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+_0x17b6c6(0x286)+_0x37e300);const _0x57af0a=utils[_0x17b6c6(0x229)](_0x5d35a1);try{delete _0x57af0a['groups'];!_0x57af0a[_0x17b6c6(0x297)]&&_0x366236[_0x17b6c6(0x202)]&&_0x366236[_0x17b6c6(0x202)]===!![]&&(_0x57af0a[_0x17b6c6(0x297)]=utils['createRandomPassword'](0xf));if(_0x5ef708||_0xad1856){if(_0x5ef708)for(const _0xaf96a in _0x5ef708){_0x57af0a[_0xaf96a]=_0x5ef708[_0xaf96a];}if(_0xad1856)_0x57af0a['id']=_0xad1856;await _0x12b589(_0x57af0a);}await _0x12d9c9[_0x17b6c6(0x22c)](_0x20f2b8,_0x57af0a),_0x5d35a1[_0x17b6c6(0x235)]&&Array[_0x17b6c6(0x273)](_0x5d35a1[_0x17b6c6(0x235)])&&_0x5d35a1[_0x17b6c6(0x235)][_0x17b6c6(0x295)]>0x0&&(_0x4fcee7=await _0x4f8251(_0x17b6c6(0x20f),_0x37e300));}catch(_0xf1d647){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x26d)+JSON[_0x17b6c6(0x253)](_0x57af0a)+_0x17b6c6(0x251)+_0xf1d647['message']+'}'),_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}}if(_0x21961e||_0x4fcee7){if(_0xd54535[_0x17b6c6(0x1e5)]===_0x17b6c6(0x23a)){if(_0x366236[_0x17b6c6(0x248)]&&_0x366236['modifyOnly']===!![]){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x1df)+_0x21961e+_0x17b6c6(0x244)),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+'\x20done'+_0x5e6ada);continue;}_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x1df)+_0x21961e);try{await _0x12d9c9[_0x17b6c6(0x23a)](_0x20f2b8,_0x21961e);}catch(_0x54cf47){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x1df)+_0x21961e+_0x17b6c6(0x251)+_0x54cf47[_0x17b6c6(0x29f)]+'}'),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+'\x20done'+_0x5e6ada);continue;}}else{if(_0x4fcee7)_0x21961e=_0x4fcee7;_0x12d9c9['logger'][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x1f3)+_0x21961e);const _0x3dac42={};_0x3dac42[_0x17b6c6(0x245)]=()=>{},_0x3dac42[_0x17b6c6(0x26f)]=_0x20f2b8?'/'+_0x20f2b8+'/Users/'+_0x21961e:_0x17b6c6(0x1fd)+_0x21961e,_0x3dac42[_0x17b6c6(0x1fe)]={},_0x3dac42['params']['id']=_0x21961e,_0x3dac42[_0x17b6c6(0x25e)]={},_0x3dac42[_0x17b6c6(0x25e)][_0x17b6c6(0x260)]=_0x5d35a1;try{await _0x12d9c9[_0x17b6c6(0x29a)](_0x3dac42);}catch(_0x24cf9e){_0x12d9c9[_0x17b6c6(0x269)]['debug'](_0x4883c1+_0x17b6c6(0x1f3)+_0x21961e+_0x17b6c6(0x251)+_0x24cf9e[_0x17b6c6(0x29f)]),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+'\x20done'+_0x5e6ada);continue;}if(_0x3dac42[_0x17b6c6(0x294)]&&_0x3dac42[_0x17b6c6(0x294)]!==0xc8){if(_0x3dac42[_0x17b6c6(0x260)]){if(_0x3dac42[_0x17b6c6(0x260)][_0x17b6c6(0x29e)]){let _0x56021f=_0x3dac42[_0x17b6c6(0x260)][_0x17b6c6(0x29e)];_0x56021f=_0x56021f['replace'](_0x12d9c9[_0x17b6c6(0x1f9)]+'['+_0x12d9c9[_0x17b6c6(0x221)]+']',''+_0x4883c1),_0x12d9c9['logger'][_0x17b6c6(0x263)](''+_0x56021f);}else{if(_0x3dac42['body']['Errors']&&Array[_0x17b6c6(0x273)](_0x3dac42[_0x17b6c6(0x260)][_0x17b6c6(0x292)])&&_0x3dac42[_0x17b6c6(0x260)][_0x17b6c6(0x292)][_0x17b6c6(0x295)]>0x0){let _0xfc2c23=_0x3dac42['body']['Errors'][0x0][_0x17b6c6(0x206)];_0xfc2c23=_0xfc2c23[_0x17b6c6(0x1fb)](_0x12d9c9[_0x17b6c6(0x1f9)]+'['+_0x12d9c9['pluginName']+']',''+_0x4883c1),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](''+_0xfc2c23);}}}}if(_0x366236[_0x17b6c6(0x272)]){const [_0x412a15,_0x487caf]=_0x12d9c9['convertedScim20']({'Operations':_0xd54535[_0x17b6c6(0x1fa)]});if(_0x487caf){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x1f3)+_0x21961e+'\x20convertedScim20\x20error:\x20'+_0x487caf[_0x17b6c6(0x29f)]),_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);continue;}const _0x1d04ce=[];if(_0x412a15[_0x17b6c6(0x24a)]&&Array[_0x17b6c6(0x273)](_0x412a15[_0x17b6c6(0x24a)]))for(let _0x1b73ab=0x0;_0x1b73ab<_0x412a15[_0x17b6c6(0x24a)]['length'];_0x1b73ab++){_0x412a15['roles'][_0x1b73ab][_0x17b6c6(0x259)]&&_0x412a15[_0x17b6c6(0x24a)][_0x1b73ab]['operation']===_0x17b6c6(0x1ec)&&_0x1d04ce['push'](_0x412a15[_0x17b6c6(0x24a)][_0x1b73ab]);}if(_0x1d04ce[_0x17b6c6(0x295)]>0x0)try{await _0x12d9c9[_0x17b6c6(0x232)](_0x20f2b8,_0x21961e,{'roles':_0x1d04ce});}catch(_0x389ec7){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x4883c1+_0x17b6c6(0x1f3)+_0x21961e+_0x17b6c6(0x288)+_0x389ec7['message']);}const _0x34f67b=[];if(_0x412a15['groups']&&Array[_0x17b6c6(0x273)](_0x412a15[_0x17b6c6(0x235)]))for(let _0x20c76e=0x0;_0x20c76e<_0x412a15[_0x17b6c6(0x235)][_0x17b6c6(0x295)];_0x20c76e++){_0x412a15[_0x17b6c6(0x235)][_0x20c76e][_0x17b6c6(0x259)]&&_0x412a15[_0x17b6c6(0x235)][_0x20c76e][_0x17b6c6(0x259)]===_0x17b6c6(0x1ec)&&_0x34f67b[_0x17b6c6(0x216)](_0x412a15[_0x17b6c6(0x235)][_0x20c76e]);}if(_0x34f67b[_0x17b6c6(0x295)]>0x0)for(let _0x43bb6e=0x0;_0x43bb6e<_0x34f67b[_0x17b6c6(0x295)];_0x43bb6e++){try{await _0x12d9c9[_0x17b6c6(0x296)](_0x20f2b8,_0x34f67b[_0x43bb6e]['id'],{'members':[{'operation':'delete','value':_0x21961e}]});}catch(_0x55df15){_0x12d9c9[_0x17b6c6(0x269)]['error'](_0x4883c1+'\x20Replace\x20User\x20id='+_0x21961e+_0x17b6c6(0x1e1)+_0x55df15[_0x17b6c6(0x29f)]);}}}}}_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x4883c1+_0x17b6c6(0x23e)+_0x5e6ada);}}catch(_0x489146){_0x12d9c9[_0x17b6c6(0x269)]['error'](_0x12d9c9[_0x17b6c6(0x1f9)]+'['+_0x12d9c9[_0x17b6c6(0x221)]+_0x17b6c6(0x28f)+_0x2f89fd+']\x20subscriber\x20stopped\x20error:\x20'+_0x489146[_0x17b6c6(0x29f)]);return;}try{_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x1ef)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x17b6c6(0x221)]+']\x20subscriber['+_0x2f89fd+']\x20restarting\x20subscriber'),_0x47aacd['Status']()===nats['CLOSED']&&(_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x29c)](_0x12d9c9['gwName']+'['+_0x12d9c9[_0x17b6c6(0x221)]+_0x17b6c6(0x28f)+_0x2f89fd+_0x17b6c6(0x257)),await this[_0x17b6c6(0x2a0)]()),_0x29db4c=await _0x121e49[_0x17b6c6(0x1e2)](_0x2f89fd,_0x4816ac),_0x18b866();}catch(_0x1ad63f){_0x12d9c9[_0x17b6c6(0x269)][_0x17b6c6(0x263)](_0x12d9c9[_0x17b6c6(0x1f9)]+'['+_0x12d9c9[_0x17b6c6(0x221)]+']\x20subscriber['+_0x2f89fd+_0x17b6c6(0x21a)+_0x1ad63f[_0x17b6c6(0x29f)]+_0x17b6c6(0x254)+_0x5e6ada);}};_0x18b866();const _0x499b78=async()=>{const _0x2e5421=_0x1044af;let _0x25e7dd=0x0;for await(const _0x5166ec of _0x47aacd[_0x2e5421(0x294)]()){switch(_0x5166ec[_0x2e5421(0x210)]){case nats[_0x2e5421(0x224)][_0x2e5421(0x226)]:_0x12d9c9['logger'][_0x2e5421(0x263)](_0x12d9c9[_0x2e5421(0x1f9)]+'['+_0x12d9c9[_0x2e5421(0x221)]+_0x2e5421(0x28f)+_0x2f89fd+_0x2e5421(0x22d)+_0x5166ec[_0x2e5421(0x1e7)]),_0x25e7dd=0x0;break;case nats[_0x2e5421(0x224)][_0x2e5421(0x27f)]:_0x12d9c9[_0x2e5421(0x269)][_0x2e5421(0x1ef)](_0x12d9c9[_0x2e5421(0x1f9)]+'['+_0x12d9c9[_0x2e5421(0x221)]+_0x2e5421(0x28f)+_0x2f89fd+']\x20client\x20reconnected\x20'+_0x5166ec['data']);try{await _0x29db4c['consumerInfo']();}catch(_0x347aa0){_0x29db4c[_0x2e5421(0x25f)]();}break;case nats['DebugEvents'][_0x2e5421(0x247)]:_0x25e7dd+=0x1;_0x25e7dd%0x1e===0x0&&_0x12d9c9[_0x2e5421(0x269)][_0x2e5421(0x29c)](_0x12d9c9[_0x2e5421(0x1f9)]+'['+_0x12d9c9[_0x2e5421(0x221)]+']\x20subscriber['+_0x2f89fd+_0x2e5421(0x23f)+_0x5166ec['data']+_0x2e5421(0x24f)+_0x25e7dd+')');break;case nats[_0x2e5421(0x1eb)]['StaleConnection']:_0x12d9c9[_0x2e5421(0x269)]['debug'](_0x12d9c9[_0x2e5421(0x1f9)]+'['+_0x12d9c9[_0x2e5421(0x221)]+_0x2e5421(0x28f)+_0x2f89fd+']\x20client\x20has\x20a\x20stale\x20connection\x20'+_0x5166ec['data']);break;}}};_0x499b78();};const _0x4f8251=async(_0x15323a,_0x28fd72)=>{const _0x556b73=_0x4b2276,_0xe430d9={'attribute':_0x15323a,'operator':'eq','value':_0x28fd72,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x546ecd=[_0x15323a];if(_0x15323a!=='id')_0x546ecd[_0x556b73(0x216)]('id');try{const _0x176bfe=await _0x12d9c9[_0x556b73(0x21e)](_0x73c3e0,_0xe430d9,_0x546ecd);if(!_0x176bfe||!_0x176bfe[_0x556b73(0x27b)]||!Array['isArray'](_0x176bfe['Resources']))throw new Error(_0x556b73(0x231)+JSON[_0x556b73(0x253)](_0xe430d9)+_0x556b73(0x24d));if(_0x176bfe[_0x556b73(0x27b)][_0x556b73(0x295)]===0x0)return null;else{if(_0x176bfe['Resources']['length']>0x2)throw new Error(_0x556b73(0x231)+JSON[_0x556b73(0x253)](_0xe430d9)+_0x556b73(0x204));else{const _0x28767b=_0x176bfe[_0x556b73(0x27b)][0x0];if(!_0x28767b['id'])throw new Error(_0x556b73(0x231)+JSON[_0x556b73(0x253)](_0xe430d9)+_0x556b73(0x289)+JSON[_0x556b73(0x253)](_0x28767b)+'\x20error:\x20missing\x20id}');return decodeURIComponent(_0x28767b['id']);}}}catch(_0x96f4a3){throw new Error(_0x556b73(0x231)+JSON['stringify'](_0xe430d9)+'\x20error:\x20'+_0x96f4a3[_0x556b73(0x29f)]+'}');}},_0x3abd0d=_0x5243f4=>{const _0x3fabc0=_0x4b2276;if(!_0x5243f4||typeof _0x5243f4!==_0x3fabc0(0x27d))return[null,null];_0x5243f4=_0x5243f4['trim']();const _0x514559=_0x5243f4[_0x3fabc0(0x1f7)]('(');if(_0x514559<0x1)return[null,null];if(_0x5243f4[_0x3fabc0(0x255)](_0x5243f4[_0x3fabc0(0x295)]-0x1)!==')')return[null,null];if(_0x4c7899(_0x5243f4,'(')!==_0x4c7899(_0x5243f4,')'))return[null,null];const _0x3a20b4=_0x5243f4[_0x3fabc0(0x255)](0x0,_0x514559),_0x3b9e54=_0x5243f4[_0x3fabc0(0x255)](_0x514559+0x1,_0x5243f4[_0x3fabc0(0x295)]-0x1);let _0x17376d=[];const _0x2ded7f=_0x3b9e54['split'](',');let _0x3895dd='';for(let _0xae2398=0x0;_0xae2398<_0x2ded7f[_0x3fabc0(0x295)];_0xae2398++){const _0x3a6889=_0x3895dd?_0x3895dd+','+_0x2ded7f[_0xae2398]:_0x2ded7f[_0xae2398],_0x4da2a0=_0x4c7899(_0x3a6889,'('),_0x2deff5=_0x4c7899(_0x3a6889,')');if(_0x4da2a0===_0x2deff5)_0x17376d['push'](_0x53aef0(_0x3a6889,'\x22')),_0x3895dd='';else{if(_0x3895dd)_0x3895dd+=','+_0x2ded7f[_0xae2398];else _0x3895dd+=_0x2ded7f[_0xae2398];}}if(_0x17376d[_0x3fabc0(0x295)]===0x0)_0x17376d=null;return[_0x3a20b4,_0x17376d];};function _0x4c7899(_0x17da87,_0x5e133c){let _0x3333bb=0x0;for(let _0x263064=0x0;_0x263064<_0x17da87['length'];_0x263064++){_0x17da87['charAt'](_0x263064)===_0x5e133c&&(_0x3333bb+=0x1);}return _0x3333bb;}const _0x53aef0=(_0x13172f,_0x4c6fe0)=>{const _0x5acdb2=_0x4b2276;if(typeof _0x13172f!==_0x5acdb2(0x27d)||typeof _0x4c6fe0!==_0x5acdb2(0x27d))return _0x13172f;if(_0x13172f[_0x5acdb2(0x295)]===0x1)return _0x13172f;if(_0x4c6fe0[_0x5acdb2(0x295)]!==0x1)return _0x13172f;return _0x13172f=_0x13172f[_0x5acdb2(0x21c)](),_0x13172f[_0x5acdb2(0x255)](0x0,0x1)===_0x4c6fe0&&(_0x13172f=_0x13172f[_0x5acdb2(0x255)](0x1)),_0x13172f[_0x5acdb2(0x255)](_0x13172f['length']-0x1)===_0x4c6fe0&&(_0x13172f=_0x13172f[_0x5acdb2(0x255)](0x0,_0x13172f['length']-0x1)),_0x13172f;},_0x3f50c4=async(_0x393d9e,_0x3bd66f,_0x334be4)=>{const _0x175101=_0x4b2276;if(!_0x393d9e||!_0x3bd66f||!_0x334be4)return null;const [_0x25f9cd,_0x408bf1]=_0x3abd0d(_0x334be4);if(!_0x25f9cd||!_0x408bf1){const _0x2f521c=_0x334be4[_0x175101(0x1e0)]('(');if(_0x2f521c['length']>0x1){const _0x4074cc=[_0x175101(0x256),_0x175101(0x270),'firstn',_0x175101(0x1fc),_0x175101(0x26a),'replace','normalize',_0x175101(0x275),_0x175101(0x284)],_0x4dc70c=_0x2f521c[0x0][_0x175101(0x25a)]();if(_0x4074cc[_0x175101(0x24c)](_0x4dc70c))return null;}return _0x334be4;}for(let _0x2b87ad=0x0;_0x2b87ad<_0x408bf1[_0x175101(0x295)];_0x2b87ad++){if(_0x408bf1[_0x2b87ad][_0x175101(0x255)](0x0,0x1)==='['){const _0x20ec2d=_0x408bf1[_0x2b87ad][_0x175101(0x1f7)](']');if(_0x20ec2d<0x0)return null;const _0x7720de=_0x408bf1[_0x2b87ad][_0x175101(0x255)](0x1,_0x20ec2d),_0x335b9b=_0x7720de[_0x175101(0x1e0)]('.');let _0x576e82;for(let _0x193764=0x0;_0x193764<_0x335b9b[_0x175101(0x295)];_0x193764++){if(_0x193764===0x0)_0x576e82=_0x393d9e[_0x335b9b[_0x193764]];else{if(!_0x576e82)return null;_0x576e82=_0x576e82[_0x335b9b[_0x193764]];}}if(!_0x576e82)return null;_0x408bf1[_0x2b87ad]=_0x576e82;}}for(let _0x496e03=0x0;_0x496e03<_0x408bf1[_0x175101(0x295)];_0x496e03++){const [_0x84f90e]=_0x3abd0d(_0x408bf1[_0x496e03]);_0x84f90e&&(_0x408bf1[_0x496e03]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x408bf1[_0x496e03]));}if(_0x408bf1[0x0]===null)return null;switch(_0x25f9cd[_0x175101(0x25a)]()){case'lowercase':{if(_0x408bf1[_0x175101(0x295)]!==0x1)return null;const [_0x17d605]=_0x3abd0d(_0x408bf1[0x0]);if(_0x17d605)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x17d605);if(_0x408bf1[0x0]===null)return null;return _0x408bf1[0x0]['toLowerCase']();}case _0x175101(0x270):{if(_0x408bf1[_0x175101(0x295)]!==0x1)return null;const [_0x1e3357]=_0x3abd0d(_0x408bf1[0x0]);if(_0x1e3357)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x1e3357);if(_0x408bf1[0x0]===null)return null;return _0x408bf1[0x0][_0x175101(0x22e)]();}case'firstn':{if(_0x408bf1[_0x175101(0x295)]!==0x2)return null;const [_0x5b2216]=_0x3abd0d(_0x408bf1[0x0]);if(_0x5b2216)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x5b2216);if(_0x408bf1[0x0]===null)return null;if(isNaN(_0x408bf1[0x1]))return null;return _0x408bf1[0x0][_0x175101(0x255)](0x0,_0x408bf1[0x1]);}case _0x175101(0x1fc):{const [_0x5d6f05]=_0x3abd0d(_0x408bf1[0x0]);if(_0x408bf1[_0x175101(0x295)]<0x2)return null;if(_0x5d6f05)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x5d6f05);if(_0x408bf1[0x0]===null)return null;const _0xbf5c6c=_0x408bf1[0x1];if(isNaN(_0xbf5c6c))return null;let _0x22d39e;if(_0x408bf1[_0x175101(0x295)]===0x3)_0x22d39e=_0x408bf1[0x0][_0x175101(0x1e0)](_0x408bf1[0x2]);else _0x22d39e=_0x22d39e=_0x408bf1[0x0]['split']('\x20');if(_0xbf5c6c<=_0x22d39e[_0x175101(0x295)])return _0x22d39e[_0xbf5c6c-0x1];else return'';}case _0x175101(0x1fb):{const [_0x1b51fa]=_0x3abd0d(_0x408bf1[0x0]);if(_0x1b51fa)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x1b51fa);if(_0x408bf1[0x0]===null)return null;if(_0x408bf1['length']!==0x3)return null;return _0x408bf1[0x0][_0x175101(0x230)](_0x408bf1[0x1],_0x408bf1[0x2]);}case _0x175101(0x1ff):{if(_0x408bf1[_0x175101(0x295)]!==0x1)return null;const [_0x36bd7f]=_0x3abd0d(_0x408bf1[0x0]);if(_0x36bd7f)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x36bd7f);if(_0x408bf1[0x0]===null)return null;return ascii127[_0x175101(0x21b)](_0x408bf1[0x0]);}case'join':{let _0x99dfea='';for(let _0x4a2fbb=0x0;_0x4a2fbb<_0x408bf1[_0x175101(0x295)];_0x4a2fbb++){const [_0x1f0e22]=_0x3abd0d(_0x408bf1[_0x4a2fbb]);if(_0x1f0e22)_0x408bf1[_0x4a2fbb]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x1f0e22);if(_0x408bf1[_0x4a2fbb]===null)return null;_0x99dfea+=_0x408bf1[_0x4a2fbb];}return _0x99dfea;}case _0x175101(0x275):{if(_0x408bf1['length']>0x2)return null;const [_0x14cceb]=_0x3abd0d(_0x408bf1[0x0]);if(_0x14cceb)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x14cceb);if(_0x408bf1[0x0]===null)return null;const _0x2a4caa=parseInt(_0x408bf1[0x0]);if(isNaN(_0x2a4caa))return null;let _0x44bd04=_0x175101(0x26e);_0x44bd04+=','+_0x408bf1[0x0];if(_0x408bf1['length']===0x2&&_0x408bf1[0x1][_0x175101(0x25a)]()===_0x175101(0x237))_0x44bd04+=',true';else _0x44bd04+=_0x175101(0x23d);return _0x44bd04+='##',_0x44bd04;}case'getuniquevalue':{if(_0x408bf1[_0x175101(0x295)]!==0x1)return null;const [_0x3a922d]=_0x3abd0d(_0x408bf1[0x0]);if(_0x3a922d)_0x408bf1[0x0]=await _0x3f50c4(_0x393d9e,_0x3bd66f,_0x3a922d);if(_0x408bf1[0x0]===null)return null;let _0x537552,_0x132734=![],_0x4b11a6='';const _0x3a8a28=_0x408bf1[0x0][_0x175101(0x1e0)]('##');if(_0x3a8a28['length']>0x2)for(let _0x4a18a7=0x0;_0x4a18a7<_0x3a8a28[_0x175101(0x295)];_0x4a18a7++){if(_0x3a8a28[_0x4a18a7][_0x175101(0x20d)](_0x175101(0x200))){const _0x1f5d27=_0x3a8a28[_0x4a18a7]['split'](',');if(_0x1f5d27[_0x175101(0x295)]<0x2)return null;const _0x35bb18=parseInt(_0x1f5d27[0x1]);if(isNaN(_0x35bb18))return null;_0x4b11a6='##'+_0x3a8a28[_0x4a18a7]+'##',_0x537552=_0x1f5d27[0x1],_0x1f5d27[_0x175101(0x295)]>0x2&&(_0x132734=_0x1f5d27[0x2][_0x175101(0x25a)]()==='true');}}let _0x4c5e4c,_0x57fbbc=0x0,_0x56b852=0x0;if(_0x537552){_0x56b852=_0x537552['length'],_0x57fbbc=0xa;for(let _0x947799=0x1;_0x947799<_0x56b852;_0x947799++){_0x57fbbc*=0xa;}_0x57fbbc-=0x1,_0x4c5e4c=parseInt(_0x537552);if(isNaN(_0x4c5e4c))return null;_0x4c5e4c-=0x1;}else _0x4c5e4c=0x0;do{_0x4c5e4c+=0x1;let _0x4be14d=_0x408bf1[0x0];if(_0x537552!==undefined&&_0x4b11a6){let _0x16010a=_0x4c5e4c['toString']();while(_0x16010a[_0x175101(0x295)]<_0x56b852){_0x16010a='0'+_0x16010a;}_0x132734?_0x4be14d=_0x4be14d[_0x175101(0x1fb)](_0x4b11a6,_0x16010a):(_0x4be14d=_0x4be14d[_0x175101(0x1fb)](_0x4b11a6,''),_0x132734=!![],_0x4c5e4c-=0x1);}try{const _0x321965=await _0x4f8251(_0x3bd66f,_0x4be14d);if(!_0x321965)return _0x4be14d;}catch(_0x376b62){return _0x12d9c9[_0x175101(0x269)][_0x175101(0x263)](_0x12d9c9[_0x175101(0x1f9)]+'['+_0x12d9c9[_0x175101(0x221)]+']\x20'+_0x25f9cd+'\x20getUserId()\x20error:\x20'+_0x376b62['message']),null;}}while(_0x4c5e4c<_0x57fbbc);return null;}default:}return null;},_0x12b589=async _0x1a999e=>{const _0x3c59a7=_0x4b2276;for(const _0xf12635 in _0x1a999e){const _0x1f602e=_0x1a999e[_0xf12635],[_0xc9970c,_0x27c379]=_0x3abd0d(_0x1f602e);if(_0xc9970c){const _0x65808b=''+_0xf12635,_0x435f58=_0xc9970c+'('+_0x27c379[_0x3c59a7(0x26a)](',')+')',_0x10f829=await _0x3f50c4(_0x1a999e,_0x65808b,_0x435f58);if(_0x10f829===null)delete _0x1a999e[_0xf12635];else _0x1a999e[_0xf12635]=_0x10f829;}for(const _0x325912 in _0x1f602e){const _0x314e0e=_0x1f602e[_0x325912],[_0x175320,_0xed77f]=_0x3abd0d(_0x314e0e);if(_0x175320){const _0x9f0f03=_0xf12635+'.'+_0x325912,_0x1af5ae=_0x175320+'('+_0xed77f['join'](',')+')',_0x213556=await _0x3f50c4(_0x1a999e,_0x9f0f03,_0x1af5ae);if(_0x213556===null)delete _0x1f602e[_0x325912];else _0x1f602e[_0x325912]=_0x213556;}}}return _0x1a999e;};},module[a0_0x32b8a6(0x28c)][a0_0x32b8a6(0x1d8)]=async(_0x3366eb,_0x17469d,_0x3576aa,_0xcd491d)=>{const _0x698b36=a0_0x32b8a6,_0x253423=_0x698b36(0x1d8),_0x4feb47=_0x3366eb;_0x4feb47['logger'][_0x698b36(0x29c)](_0x4feb47[_0x698b36(0x1f9)]+'['+_0x4feb47[_0x698b36(0x221)]+_0x698b36(0x262)+_0x253423+'\x22');try{if(!fs['existsSync'](_0x4feb47[_0x698b36(0x233)]+'/approles'))fs[_0x698b36(0x238)](_0x4feb47[_0x698b36(0x233)]+_0x698b36(0x26b));}catch(_0x2c655f){}const _0x1f9f8c=path[_0x698b36(0x26a)](''+_0x4feb47[_0x698b36(0x233)],_0x698b36(0x1f5),_0x698b36(0x20a)+_0x4feb47[_0x698b36(0x221)]+_0x698b36(0x22a)),_0x8ba98b={};utils[_0x698b36(0x28e)](_0x1f9f8c)&&fs[_0x698b36(0x299)](_0x1f9f8c,_0x698b36(0x280))['split'](/\r?\n/)[_0x698b36(0x274)](_0x484219=>{const _0x3fca66=_0x698b36,_0x958902=_0x484219[_0x3fca66(0x1e0)]('\x20');_0x958902['length']===0x2&&(_0x8ba98b[_0x958902[0x0]]=_0x958902[0x1]);});const _0x2e99dc=fs['createWriteStream'](_0x1f9f8c,{'flags':'w','encoding':_0x698b36(0x227),'mode':0x1b6,'autoClose':!![]}),_0x212490=[],_0x122c4c=await _0x4feb47['getGroups'](_0x17469d,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x698b36(0x225)]);return _0x122c4c['Resources'][_0x698b36(0x274)](_0x3f515d=>{const _0x38a98c=_0x698b36;if(_0x3f515d['id']){let _0x59e326=crypto[_0x38a98c(0x293)]();if(_0x8ba98b[_0x3f515d['id']])_0x59e326=_0x8ba98b[_0x3f515d['id']];const _0x1950ea={'allowedMemberTypes':[_0x38a98c(0x27a)],'description':_0x38a98c(0x267),'displayName':_0x3f515d[_0x38a98c(0x225)]||_0x3f515d['id'],'id':_0x59e326,'isEnabled':!![],'lang':null,'origin':_0x38a98c(0x285),'value':decodeURIComponent(_0x3f515d['id'])};_0x212490[_0x38a98c(0x216)](_0x1950ea),_0x2e99dc[_0x38a98c(0x1e6)](_0x3f515d['id']+'\x20'+_0x59e326+'\x0a');}}),_0x2e99dc[_0x698b36(0x1ee)](),_0x4feb47[_0x698b36(0x269)]['debug'](_0x4feb47[_0x698b36(0x1f9)]+'['+_0x4feb47[_0x698b36(0x221)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x1f9f8c),{'Resources':[{'appRoles':_0x212490}]};};
13
+ 'use strict';const a0_0x20b93f=a0_0xd87a;(function(_0x2c966a,_0x15f3d8){const _0x12dfc3=a0_0xd87a,_0x587b2f=_0x2c966a();while(!![]){try{const _0x3fb573=parseInt(_0x12dfc3(0x1eb))/0x1*(-parseInt(_0x12dfc3(0x241))/0x2)+parseInt(_0x12dfc3(0x223))/0x3+-parseInt(_0x12dfc3(0x212))/0x4+parseInt(_0x12dfc3(0x1ef))/0x5+parseInt(_0x12dfc3(0x1d7))/0x6+-parseInt(_0x12dfc3(0x249))/0x7*(parseInt(_0x12dfc3(0x1d5))/0x8)+-parseInt(_0x12dfc3(0x296))/0x9;if(_0x3fb573===_0x15f3d8)break;else _0x587b2f['push'](_0x587b2f['shift']());}catch(_0x20fc51){_0x587b2f['push'](_0x587b2f['shift']());}}}(a0_0x3168,0xeb320));function a0_0x3168(){const _0x522ced=['subscribe','6178968ncQJwa','\x20Delete\x20User\x20userName=','filter_subject','\x20Create\x20User\x20userName=','\x20error:\x20missing\x20result','error','info','onCreate','trim','\x20message:\x20','jwtAuthenticator','ConsumerNotFound','pluginName','displayName','getServer','toLowerCase','mkdirSync',',true','delete','startsWith','1553TASALv','\x20message\x20json\x20parsing\x20error:\x20','prototype','convertedScim20','5909495FqtYSN',',false','active',']\x20subscriber[','authenticator',']\x20handling\x20\x22',']\x20closed\x20with\x20error:\x20','getUsers','substring','getUsers()\x20getObj=','\x20Replace\x20User\x20id=','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','from','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','tls',']\x20connect\x20error:\x20','indexOf','false',']\x20client\x20has\x20a\x20stale\x20connection\x20','SIGINT','parse',']\x20subscriber\x20error:\x20missing\x20certificate\x20configuration','crypto','path','\x20message:\x20user\x20does\x20not\x20exist','uppercase','nats',']\x20client\x20disconnected\x20','randomUUID','consume','encode','durable_','join','\x20group\x20removal\x20error:\x20','set','336084jNhsdi','secret','level','replaceAll','connect','jwt','configDir',']\x20error:\x20subject\x20not\x20allowing\x20comma\x20separated\x20multiples','\x20role\x20removal\x20error:\x20','createWriteStream','Events','push','getuniquevalue','approles_','unsubscribe','baseUrls','closed','5567868osKgrD','modifyUser','message','then','/approles','\x20error:\x20missing\x20id}','replaceUsrGrp','certificate','Msg-Id','true','increment','\x20error:\x20','Operations','modifyGroup','subject','reconnectTimeWait','userName','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','\x20count=','\x20Create\x20userName=','password','_info','generateUserPassword','value','replace','getGroups','deliver_group','request','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','\x20result=','654BjPcWY','display','##doIncrement',']\x20client\x20reconnected\x20','maxReconnectAttempts','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false',']\x20error:\x20missing\x20one\x20or\x20more\x20mandatory\x20configurations\x20e.g.\x20stream.baseUrls,\x20stream.certificate.ca,\x20nats.tenant,\x20nats.subject,\x20nats.secret\x20and\x20nats.jwt','\x20should\x20have\x20syntax:\x20<collector>.<channel>','7wRAXbW','gwName','createRandomPassword',']\x20error:\x20','\x20Delete\x20User\x20id=','getProcessed',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','\x20convertedScim20\x20error:\x20',']\x20client\x20error\x20','replaceDomains','Resources','utf8','deleteUser','transports','consumers','\x20handling\x20message:\x20',']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20','config','remove','tenant','approles','description',']\x20subscriber\x20error:\x20configuration\x20scim.usePutSoftSync\x20must\x20be\x20set\x20to\x20true','foldReplacing','lowercase','\x20missing\x20user\x20object\x20in\x20message:\x20','detail','length','firstn','body','isArray',']\x20client\x20consumer\x20error:\x20','usePutSoftSync','pingInterval','fold-to-ascii','consumerInfo','ack','Application','activityOperation','../lib/utils','params','groups','Reconnecting','normalize','name','roles','\x20done','string',']\x20connected\x20','split','fsExistsSync','includes','\x20roles\x20converted\x20to\x20groups\x20message:\x20','\x20getUserId()\x20error:\x20','debug','status','typeId','data','update','createUser','New','Explicit','headers','Error','logger','add','\x20-\x20','StringCodec','queueGroup','toUpperCase',']\x20subscriber\x20certificate\x20error:\x20','exports','charAt','get','hasOwnProperty','Errors',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','13499397BWyXDI','operation','modifyOnly','servers','forEach','Disconnect','doIncrement','User','readFileSync','skipConvertRolesToGroups','type','stringify','waitOnFirstConnect','getAppRoles','write','8100304YXqbQL'];a0_0x3168=function(){return _0x522ced;};return a0_0x3168();}const nats=require(a0_0x20b93f(0x209)),ascii127=require(a0_0x20b93f(0x26b)),fs=require('fs'),utils=require(a0_0x20b93f(0x270)),path=require('path'),crypto=require(a0_0x20b93f(0x205));function a0_0xd87a(_0xde0db0,_0x4614f1){const _0x31689f=a0_0x3168();return a0_0xd87a=function(_0xd87ab8,_0x3be7cd){_0xd87ab8=_0xd87ab8-0x1c9;let _0x3e6d12=_0x31689f[_0xd87ab8];return _0x3e6d12;},a0_0xd87a(_0xde0db0,_0x4614f1);}module[a0_0x20b93f(0x290)]['Subscriber']=function(_0x491c9b,_0x53dbfe,_0x1ee34c,_0x13118a){const _0x461b07=a0_0x20b93f,_0x2d0b29=_0x491c9b,_0xc3dcd4=_0x53dbfe,_0x4a7335=_0x1ee34c,_0x5a7645=_0x13118a;if(!_0xc3dcd4['certificate']||!_0xc3dcd4[_0x461b07(0x22a)]['ca']){_0x2d0b29['logger'][_0x461b07(0x1dc)](_0x2d0b29[_0x461b07(0x24a)]+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x204));return;}if(!_0xc3dcd4[_0x461b07(0x269)]){_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x25f));return;}let _0x2758e0='';for(let _0x2cef03=0x0;_0x2cef03<_0x2d0b29[_0x461b07(0x289)]['transports'][_0x461b07(0x264)];_0x2cef03++){if(_0x2d0b29[_0x461b07(0x289)]['transports'][_0x2cef03][_0x461b07(0x275)]==='file'){_0x2758e0=_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x256)][_0x2cef03][_0x461b07(0x214)];break;}}const _0x2d5297=''+(_0x2758e0===_0x461b07(0x27f)?'\x0a':''),_0x2af603={};try{_0x2af603['ca']=[fs[_0x461b07(0x1ce)](_0x2d0b29[_0x461b07(0x218)]+'/certs/'+_0xc3dcd4['certificate']['ca'])];}catch(_0x49bbd5){_0x2d0b29[_0x461b07(0x289)][_0x461b07(0x1dc)](_0x2d0b29[_0x461b07(0x24a)]+'['+_0x2d0b29[_0x461b07(0x1e3)]+_0x461b07(0x28f)+_0x49bbd5[_0x461b07(0x225)]);return;}const _0x504e71={},_0x50a8dd=new TextEncoder()[_0x461b07(0x20d)](_0xc3dcd4[_0x461b07(0x209)][_0x461b07(0x213)]),_0x138f91=_0xc3dcd4[_0x461b07(0x209)][_0x461b07(0x217)];_0x504e71[_0x461b07(0x1f3)]=nats[_0x461b07(0x1e1)](_0x138f91,_0x50a8dd),_0x504e71[_0x461b07(0x1c9)]=_0xc3dcd4['baseUrls'],_0x504e71[_0x461b07(0x1fd)]=_0x2af603,_0x504e71['waitOnFirstConnect']=![],_0x504e71['reconnect']=!![],_0x504e71[_0x461b07(0x232)]=0x3e8*0xa,_0x504e71[_0x461b07(0x245)]=-0x1,_0x504e71[_0x461b07(0x26a)]=0x2*0x3c*0x3e8,_0x504e71['maxPingOut']=0x5,_0x504e71[_0x461b07(0x27f)]=![];let _0x276714;this[_0x461b07(0x216)]=async()=>{const _0xf6e54c=_0x461b07;try{_0x276714=await nats['connect'](_0x504e71);}catch(_0x5a17e5){_0x2d0b29['logger']['error'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+_0xf6e54c(0x1f2)+_0x4a7335+']['+_0x5a7645+_0xf6e54c(0x1fe)+_0x5a17e5[_0xf6e54c(0x225)]+'\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration'),_0x504e71[_0xf6e54c(0x1d2)]=!![];try{_0x276714=await nats['connect'](_0x504e71);}catch(_0x21c0fa){_0x2d0b29[_0xf6e54c(0x289)]['error'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+']\x20connect\x20error:\x20'+_0x21c0fa[_0xf6e54c(0x225)]);return;}}_0x2d0b29['logger']['info'](_0x2d0b29[_0xf6e54c(0x24a)]+'['+_0x2d0b29[_0xf6e54c(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0xf6e54c(0x279)+(_0x504e71[_0xf6e54c(0x1fd)]['ca']?'tls':'')+'\x20'+_0x276714[_0xf6e54c(0x1e5)]()),_0x276714[_0xf6e54c(0x222)]()[_0xf6e54c(0x226)](_0x54e036=>{const _0x1ff8de=_0xf6e54c;_0x54e036&&_0x2d0b29[_0x1ff8de(0x289)][_0x1ff8de(0x1dc)](_0x2d0b29[_0x1ff8de(0x24a)]+'['+_0x2d0b29['pluginName']+_0x1ff8de(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x1ff8de(0x1f5)+_0x54e036['message']);});},this[_0x461b07(0x1d6)]=async()=>{const _0x43d7eb=_0x461b07;if(!_0x5a7645||!_0xc3dcd4[_0x43d7eb(0x221)]||!_0xc3dcd4[_0x43d7eb(0x22a)]||!_0xc3dcd4[_0x43d7eb(0x22a)]['ca']||!_0xc3dcd4[_0x43d7eb(0x209)]||!_0xc3dcd4[_0x43d7eb(0x209)][_0x43d7eb(0x25c)]||!_0xc3dcd4[_0x43d7eb(0x209)][_0x43d7eb(0x213)]||!_0xc3dcd4['nats'][_0x43d7eb(0x217)]){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x247));return;}if(_0x5a7645[_0x43d7eb(0x27a)]('.')[_0x43d7eb(0x264)]<0x2){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29[_0x43d7eb(0x24a)]+'['+_0x2d0b29['pluginName']+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+']\x20error:\x20subject\x20'+_0x5a7645+_0x43d7eb(0x248));return;}if(_0x5a7645[_0x43d7eb(0x27c)](',')){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x219));return;}if(!_0x276714){_0x2d0b29[_0x43d7eb(0x289)][_0x43d7eb(0x1dc)](_0x2d0b29[_0x43d7eb(0x24a)]+'['+_0x2d0b29[_0x43d7eb(0x1e3)]+_0x43d7eb(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x43d7eb(0x295));return;}const _0x5637ab=async(_0x555590,_0x2a63c5)=>{const _0x5e7c91=_0x43d7eb;try{_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dd)](_0x555590+_0x5e7c91(0x258)+_0x2a63c5);let _0x3b7d8c;try{if(_0xc3dcd4[_0x5e7c91(0x252)]&&Array[_0x5e7c91(0x267)](_0xc3dcd4['replaceDomains']))for(let _0x241f77=0x0;_0x241f77<_0xc3dcd4['replaceDomains'][_0x5e7c91(0x264)];_0x241f77++){const _0x2c8509=_0xc3dcd4[_0x5e7c91(0x252)][_0x241f77];if(!_0x2c8509[_0x5e7c91(0x1fb)]||!_0x2c8509['from'][_0x5e7c91(0x27c)]('.')||!_0x2c8509['to']||!_0x2c8509['to']['includes']('.'))continue;const _0x3a2873=new RegExp('@'+_0x2c8509['from']+'\x22','gi');_0x2a63c5=_0x2a63c5[_0x5e7c91(0x23b)](_0x3a2873,'@'+_0x2c8509['to']+'\x22');}_0x3b7d8c=JSON[_0x5e7c91(0x203)](_0x2a63c5);}catch(_0x127352){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1ec)+_0x127352[_0x5e7c91(0x225)]+_0x5e7c91(0x1e0)+_0x2a63c5),_0x2d0b29[_0x5e7c91(0x289)]['debug'](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}const _0x3a4a23=_0x3b7d8c['user'];if(!_0x3a4a23){_0x2d0b29[_0x5e7c91(0x289)]['error'](_0x555590+_0x5e7c91(0x262)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c)),_0x2d0b29['logger']['debug'](_0x555590+'\x20done'+_0x2d5297);return;}if(!_0x3a4a23['userName']){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1fc)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}delete _0x3a4a23['schemas'];let _0x509d16;_0x3a4a23['id']&&(_0x509d16=_0x3a4a23['id'],delete _0x3a4a23['id']);let _0x330090;_0x3a4a23[_0x5e7c91(0x1de)]&&(_0x330090=utils['copyObj'](_0x3a4a23[_0x5e7c91(0x1de)]),delete _0x3a4a23[_0x5e7c91(0x1de)]);await _0x32f9e0(_0x3a4a23);const _0x4b2517=_0x3a4a23['userName'];let _0x5804ad,_0x2856f2;try{_0x5804ad=await _0x593801(_0x5e7c91(0x233),_0x4b2517);}catch(_0x14ad2f){_0x2d0b29['logger']['error'](_0x555590+_0x5e7c91(0x27e)+_0x14ad2f[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(!_0xc3dcd4[_0x5e7c91(0x1cf)]){let _0x2d90b8=![];if(_0x3b7d8c[_0x5e7c91(0x22f)]&&Array['isArray'](_0x3b7d8c['Operations']))for(let _0x2870d3=0x0;_0x2870d3<_0x3b7d8c[_0x5e7c91(0x22f)]['length'];_0x2870d3++){const _0x4b4edd=_0x3b7d8c[_0x5e7c91(0x22f)][_0x2870d3];_0x4b4edd['path'][_0x5e7c91(0x1ea)](_0x5e7c91(0x276))&&(_0x4b4edd[_0x5e7c91(0x206)]=_0x5e7c91(0x272),Array[_0x5e7c91(0x267)](_0x4b4edd[_0x5e7c91(0x23a)])?(_0x4b4edd['value'][0x0]['id']=_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x23a)],_0x4b4edd['value'][0x0][_0x5e7c91(0x242)]=_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x1d0)]+_0x5e7c91(0x28b)+_0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x23a)],delete _0x4b4edd['value'][0x0][_0x5e7c91(0x23a)],delete _0x4b4edd[_0x5e7c91(0x23a)][0x0][_0x5e7c91(0x1d0)]):_0x4b4edd[_0x5e7c91(0x23a)]=[{'id':_0x4b4edd[_0x5e7c91(0x23a)],'display':_0x4b4edd[_0x5e7c91(0x23a)]}],delete _0x4b4edd[_0x5e7c91(0x281)],_0x2d90b8=!![]);}if(_0x3a4a23['roles']&&Array[_0x5e7c91(0x267)](_0x3a4a23['roles'])&&_0x3a4a23[_0x5e7c91(0x276)][_0x5e7c91(0x264)]>0x0){if(!_0x3a4a23[_0x5e7c91(0x272)])_0x3a4a23[_0x5e7c91(0x272)]=[];if(!Array['isArray'](_0x3a4a23['groups']))_0x3a4a23[_0x5e7c91(0x272)]=[];for(let _0x1b9190=0x0;_0x1b9190<_0x3a4a23[_0x5e7c91(0x276)][_0x5e7c91(0x264)];_0x1b9190++){const _0xa54747={},_0x51380c=_0x3a4a23[_0x5e7c91(0x276)][_0x1b9190];_0xa54747[_0x5e7c91(0x23a)]=_0x51380c[_0x5e7c91(0x23a)],_0xa54747[_0x5e7c91(0x242)]=_0x51380c[_0x5e7c91(0x1d0)]+'\x20-\x20'+_0x51380c['display'],_0x3a4a23['groups'][_0x5e7c91(0x21d)](_0xa54747);}delete _0x3a4a23[_0x5e7c91(0x276)],_0x2d90b8=!![];}if(_0x2d90b8)_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x27d)+JSON[_0x5e7c91(0x1d1)](_0x3b7d8c));}if(_0xc3dcd4['deleteUserOnLastGroupRoleRemoval']&&_0x3b7d8c['activityOperation']===_0x5e7c91(0x224)){if(_0x3a4a23[_0x5e7c91(0x272)]&&Array['isArray'](_0x3a4a23['groups'])&&_0x3a4a23[_0x5e7c91(0x272)][_0x5e7c91(0x264)]===0x0){if(_0x3a4a23[_0x5e7c91(0x276)]&&Array[_0x5e7c91(0x267)](_0x3a4a23[_0x5e7c91(0x276)])&&_0x3a4a23['roles'][_0x5e7c91(0x264)]===0x0){if(_0x3b7d8c[_0x5e7c91(0x22f)]&&Array[_0x5e7c91(0x267)](_0x3b7d8c['Operations'])&&_0x3b7d8c['Operations'][_0x5e7c91(0x264)]>0x0)for(let _0x3e14cc=0x0;_0x3e14cc<_0x3b7d8c['Operations'][_0x5e7c91(0x264)];_0x3e14cc++){const _0x5c128c=_0x3b7d8c[_0x5e7c91(0x22f)][_0x3e14cc];if(_0x5c128c['op']===_0x5e7c91(0x25b)){if(_0x5c128c[_0x5e7c91(0x206)]){if(_0x5c128c[_0x5e7c91(0x206)][_0x5e7c91(0x1ea)](_0x5e7c91(0x276))&&_0x5c128c['typeId'])_0x3b7d8c[_0x5e7c91(0x26f)]=_0x5e7c91(0x255);else _0x5c128c[_0x5e7c91(0x206)]===_0x5e7c91(0x272)&&(_0x3b7d8c['activityOperation']=_0x5e7c91(0x255));}}}}}}if(!_0x5804ad){if(_0x3b7d8c['activityOperation']===_0x5e7c91(0x255)){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1d8)+_0x4b2517+_0x5e7c91(0x207)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(_0xc3dcd4[_0x5e7c91(0x298)]&&_0xc3dcd4['modifyOnly']===!![]){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20Create\x20userName='+_0x4b2517+_0x5e7c91(0x23f)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20done'+_0x2d5297);return;}if(Object[_0x5e7c91(0x1ed)][_0x5e7c91(0x293)]['call'](_0x3a4a23,_0x5e7c91(0x1f1))){if(typeof _0x3a4a23[_0x5e7c91(0x1f1)]==='string'){const _0x8fc482=_0x3a4a23[_0x5e7c91(0x1f1)][_0x5e7c91(0x1e6)]();if(_0x8fc482===_0x5e7c91(0x22c))_0x3a4a23[_0x5e7c91(0x1f1)]=!![];else{if(_0x8fc482===_0x5e7c91(0x200))_0x3a4a23['active']=![];}}if(_0x3a4a23[_0x5e7c91(0x1f1)]===![]){_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x236)+_0x4b2517+_0x5e7c91(0x246)),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1da)+_0x4b2517);const _0x4eb6bb=utils['copyObj'](_0x3a4a23);try{delete _0x4eb6bb[_0x5e7c91(0x272)];!_0x4eb6bb[_0x5e7c91(0x237)]&&_0xc3dcd4[_0x5e7c91(0x239)]&&_0xc3dcd4[_0x5e7c91(0x239)]===!![]&&(_0x4eb6bb['password']=utils[_0x5e7c91(0x24b)](0xf));if(_0x330090||_0x509d16){if(_0x330090)for(const _0x3a5604 in _0x330090){_0x4eb6bb[_0x3a5604]=_0x330090[_0x3a5604];}if(_0x509d16)_0x4eb6bb['id']=_0x509d16;await _0x32f9e0(_0x4eb6bb);}await _0x2d0b29[_0x5e7c91(0x284)](_0x4a7335,_0x4eb6bb),_0x3a4a23[_0x5e7c91(0x272)]&&Array[_0x5e7c91(0x267)](_0x3a4a23['groups'])&&_0x3a4a23['groups']['length']>0x0&&(_0x2856f2=await _0x593801(_0x5e7c91(0x233),_0x4b2517));}catch(_0x4da87b){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+'\x20createUser()\x20obj='+JSON[_0x5e7c91(0x1d1)](_0x4eb6bb)+_0x5e7c91(0x22e)+_0x4da87b[_0x5e7c91(0x225)]+'}'),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}if(_0x5804ad||_0x2856f2){if(_0x3b7d8c['activityOperation']===_0x5e7c91(0x255)){if(_0xc3dcd4['modifyOnly']&&_0xc3dcd4['modifyOnly']===!![]){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad+'\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true'),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+'\x20done'+_0x2d5297);return;}_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad);try{await _0x2d0b29[_0x5e7c91(0x255)](_0x4a7335,_0x5804ad);}catch(_0x5695fb){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x24d)+_0x5804ad+_0x5e7c91(0x22e)+_0x5695fb[_0x5e7c91(0x225)]+'}'),_0x2d0b29['logger'][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}}else{if(_0x2856f2)_0x5804ad=_0x2856f2;_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad);const _0xdc6421={};_0xdc6421[_0x5e7c91(0x211)]=()=>{},_0xdc6421['originalUrl']=_0x4a7335?'/'+_0x4a7335+'/Users/'+_0x5804ad:'/Users/'+_0x5804ad,_0xdc6421[_0x5e7c91(0x271)]={},_0xdc6421[_0x5e7c91(0x271)]['id']=_0x5804ad,_0xdc6421['request']={},_0xdc6421[_0x5e7c91(0x23e)][_0x5e7c91(0x266)]=_0x3a4a23;try{await _0x2d0b29[_0x5e7c91(0x229)](_0xdc6421);}catch(_0x2c4762){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+'\x20error:\x20'+_0x2c4762[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}if(_0xdc6421[_0x5e7c91(0x280)]&&_0xdc6421['status']!==0xc8){if(_0xdc6421[_0x5e7c91(0x266)]){if(_0xdc6421[_0x5e7c91(0x266)][_0x5e7c91(0x263)]){let _0x59b389=_0xdc6421[_0x5e7c91(0x266)]['detail'];_0x59b389=_0x59b389[_0x5e7c91(0x23b)](_0x2d0b29[_0x5e7c91(0x24a)]+'['+_0x2d0b29[_0x5e7c91(0x1e3)]+']',''+_0x555590),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](''+_0x59b389);}else{if(_0xdc6421['body'][_0x5e7c91(0x294)]&&Array['isArray'](_0xdc6421[_0x5e7c91(0x266)][_0x5e7c91(0x294)])&&_0xdc6421['body'][_0x5e7c91(0x294)][_0x5e7c91(0x264)]>0x0){let _0x4222fc=_0xdc6421['body']['Errors'][0x0][_0x5e7c91(0x25e)];_0x4222fc=_0x4222fc[_0x5e7c91(0x23b)](_0x2d0b29[_0x5e7c91(0x24a)]+'['+_0x2d0b29['pluginName']+']',''+_0x555590),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](''+_0x4222fc);}}}}if(_0xc3dcd4['usePutSoftSync']){const [_0x14ec2e,_0x441fa5]=_0x2d0b29[_0x5e7c91(0x1ee)]({'Operations':_0x3b7d8c['Operations']});if(_0x441fa5){_0x2d0b29['logger'][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+_0x5e7c91(0x250)+_0x441fa5[_0x5e7c91(0x225)]),_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);return;}const _0x1320d1=[];if(_0x14ec2e[_0x5e7c91(0x276)]&&Array[_0x5e7c91(0x267)](_0x14ec2e['roles']))for(let _0x5d6cea=0x0;_0x5d6cea<_0x14ec2e['roles'][_0x5e7c91(0x264)];_0x5d6cea++){_0x14ec2e['roles'][_0x5d6cea]['operation']&&_0x14ec2e[_0x5e7c91(0x276)][_0x5d6cea]['operation']===_0x5e7c91(0x1e9)&&_0x1320d1[_0x5e7c91(0x21d)](_0x14ec2e[_0x5e7c91(0x276)][_0x5d6cea]);}if(_0x1320d1[_0x5e7c91(0x264)]>0x0)try{await _0x2d0b29['modifyUser'](_0x4a7335,_0x5804ad,{'roles':_0x1320d1});}catch(_0x44e999){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+'\x20Replace\x20User\x20id='+_0x5804ad+_0x5e7c91(0x21a)+_0x44e999[_0x5e7c91(0x225)]);}const _0x574f68=[];if(_0x14ec2e[_0x5e7c91(0x272)]&&Array[_0x5e7c91(0x267)](_0x14ec2e[_0x5e7c91(0x272)]))for(let _0x359e17=0x0;_0x359e17<_0x14ec2e[_0x5e7c91(0x272)]['length'];_0x359e17++){_0x14ec2e[_0x5e7c91(0x272)][_0x359e17][_0x5e7c91(0x297)]&&_0x14ec2e['groups'][_0x359e17][_0x5e7c91(0x297)]===_0x5e7c91(0x1e9)&&_0x574f68[_0x5e7c91(0x21d)](_0x14ec2e[_0x5e7c91(0x272)][_0x359e17]);}if(_0x574f68[_0x5e7c91(0x264)]>0x0)for(let _0x2f063a=0x0;_0x2f063a<_0x574f68['length'];_0x2f063a++){try{await _0x2d0b29[_0x5e7c91(0x230)](_0x4a7335,_0x574f68[_0x2f063a]['id'],{'members':[{'operation':_0x5e7c91(0x1e9),'value':_0x5804ad}]});}catch(_0x53883f){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x555590+_0x5e7c91(0x1f9)+_0x5804ad+_0x5e7c91(0x210)+_0x53883f[_0x5e7c91(0x225)]);}}}}}_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x27f)](_0x555590+_0x5e7c91(0x277)+_0x2d5297);}catch(_0x162a1b){_0x2d0b29[_0x5e7c91(0x289)][_0x5e7c91(0x1dc)](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x5e7c91(0x1e3)]+_0x5e7c91(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x5e7c91(0x24c)+_0x162a1b['message']+'\x20=>\x20subscriber\x20not\x20activated'+_0x2d5297);}},_0x1d5e97=nats[_0x43d7eb(0x28c)](),_0x59553c=_0x276714['jetstream'](),_0x1eb9d5=(_0x43d7eb(0x20e)+_0x2d0b29[_0x43d7eb(0x1e3)]+'_'+_0x4a7335)[_0x43d7eb(0x215)]('*','#')['replaceAll']('>','##')['replaceAll']('.','_');let _0x40eaf5;const _0x59bfa0=async()=>{const _0x2b89da=_0x43d7eb;try{const _0x2bafe7=''+_0xc3dcd4[_0x2b89da(0x209)][_0x2b89da(0x25c)],_0x5180f2=await _0x276714['jetstreamManager'](),_0x32f581=async()=>{const _0x899af=_0x2b89da;let _0x5f45ca;try{_0x5f45ca=await _0x59553c[_0x899af(0x257)][_0x899af(0x292)](_0x2bafe7,_0x1eb9d5);}catch(_0xf0fbc4){await _0x5180f2[_0x899af(0x257)][_0x899af(0x28a)](_0x2bafe7,{'durable_name':_0x1eb9d5,'ack_policy':nats['AckPolicy'][_0x899af(0x286)],'deliver_policy':nats['DeliverPolicy'][_0x899af(0x285)],'deliver_group':_0xc3dcd4?.[_0x899af(0x209)]?.[_0x899af(0x28d)]||null,'filter_subject':_0x5a7645}),_0x5f45ca=await _0x59553c[_0x899af(0x257)]['get'](_0x2bafe7,_0x1eb9d5);}(_0x5a7645!==_0x5f45ca?.['_info']?.[_0x899af(0x25a)]?.[_0x899af(0x1d9)]||_0xc3dcd4?.[_0x899af(0x209)]?.[_0x899af(0x28d)]!==_0x5f45ca?.[_0x899af(0x238)]?.['config']?.[_0x899af(0x23d)])&&(await _0x5180f2[_0x899af(0x257)][_0x899af(0x283)](_0x2bafe7,_0x1eb9d5,{'deliver_group':_0xc3dcd4?.[_0x899af(0x209)]?.['queueGroup']||null,'filter_subject':_0x5a7645}),_0x5f45ca=await _0x59553c['consumers']['get'](_0x2bafe7,_0x1eb9d5)),_0x40eaf5=await _0x5f45ca[_0x899af(0x20c)]({'max_messages':0x64});};await _0x32f581();const _0x415dc1=async()=>{const _0x45f757=_0x2b89da;for await(const _0x575e51 of await _0x40eaf5['status']()){switch(_0x575e51[_0x45f757(0x1d0)]){case nats['ConsumerEvents'][_0x45f757(0x1e2)]:if(_0x575e51[_0x45f757(0x282)]===0x1)_0x2d0b29[_0x45f757(0x289)]['info'](_0x2d0b29[_0x45f757(0x24a)]+'['+_0x2d0b29[_0x45f757(0x1e3)]+_0x45f757(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x45f757(0x259)+_0x575e51[_0x45f757(0x1d0)]),_0x32f581();else _0x575e51[_0x45f757(0x282)]%0xa===0x0&&_0x2d0b29[_0x45f757(0x289)]['error'](_0x2d0b29['gwName']+'['+_0x2d0b29[_0x45f757(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x45f757(0x268)+_0x575e51[_0x45f757(0x1d0)]+_0x45f757(0x235)+_0x575e51[_0x45f757(0x282)]);break;}}};_0x415dc1();for await(const _0x46b3e3 of _0x40eaf5){if(!_0x46b3e3[_0x2b89da(0x287)]||!_0x46b3e3[_0x2b89da(0x287)]['get'](_0x2b89da(0x22b))){_0x46b3e3['ack']();continue;}const _0x245ba8=_0x2d0b29[_0x2b89da(0x24a)]+'['+_0x2d0b29['pluginName']+']\x20subscriber['+_0x4a7335+']['+_0x46b3e3[_0x2b89da(0x231)]+']['+_0x40eaf5[_0x2b89da(0x24e)]()+']['+(_0x46b3e3[_0x2b89da(0x287)]?_0x46b3e3[_0x2b89da(0x287)]['get'](_0x2b89da(0x22b)):'')+']',_0x1dbe1b=_0x1d5e97['decode'](_0x46b3e3[_0x2b89da(0x282)]);await _0x5637ab(_0x245ba8,_0x1dbe1b),_0x46b3e3[_0x2b89da(0x26d)]();}}catch(_0x4afe87){_0x2d0b29['logger']['error'](_0x2d0b29[_0x2b89da(0x24a)]+'['+_0x2d0b29['pluginName']+_0x2b89da(0x1f2)+_0x4a7335+']['+_0x5a7645+']\x20subscriber\x20stopped\x20error:\x20'+_0x4afe87[_0x2b89da(0x225)]);}};_0x59bfa0();const _0x5a50e8=async()=>{const _0x53eda2=_0x43d7eb;let _0x7531bc=0x0;for await(const _0x2bc5ca of _0x276714[_0x53eda2(0x280)]()){switch(_0x2bc5ca[_0x53eda2(0x1d0)]){case nats[_0x53eda2(0x21c)][_0x53eda2(0x1cb)]:_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x1dc)](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29[_0x53eda2(0x1e3)]+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x20a)+_0x2bc5ca['data']+_0x53eda2(0x234)),_0x7531bc=0x0;break;case nats['Events']['Reconnect']:_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x1dd)](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29['pluginName']+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x244)+_0x2bc5ca['data']);try{if(_0x40eaf5[_0x53eda2(0x26c)])await _0x40eaf5['consumerInfo']();}catch(_0x4a0cb8){if(_0x40eaf5[_0x53eda2(0x220)])_0x40eaf5['unsubscribe']();}break;case nats[_0x53eda2(0x21c)][_0x53eda2(0x288)]:_0x2d0b29['logger']['error'](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29[_0x53eda2(0x1e3)]+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x251)+_0x2bc5ca['data']);break;case nats['DebugEvents'][_0x53eda2(0x273)]:_0x7531bc+=0x1;_0x7531bc%0x1e===0x0&&_0x2d0b29[_0x53eda2(0x289)][_0x53eda2(0x27f)](_0x2d0b29['gwName']+'['+_0x2d0b29['pluginName']+']\x20subscriber['+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x24f)+_0x2bc5ca[_0x53eda2(0x282)]+'\x20(count='+_0x7531bc+')');break;case nats['DebugEvents']['StaleConnection']:_0x2d0b29[_0x53eda2(0x289)]['debug'](_0x2d0b29[_0x53eda2(0x24a)]+'['+_0x2d0b29['pluginName']+_0x53eda2(0x1f2)+_0x4a7335+']['+_0x5a7645+_0x53eda2(0x201)+_0x2bc5ca['data']);break;}}};_0x5a50e8(),process['on']('SIGTERM',async()=>{_0x276714&&await _0x276714['drain']();}),process['on'](_0x43d7eb(0x202),async()=>{_0x276714&&await _0x276714['drain']();});};const _0x593801=async(_0x382d36,_0x2d3277)=>{const _0x27ab3f=_0x461b07,_0x99938f={'attribute':_0x382d36,'operator':'eq','value':_0x2d3277,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x15b0d7=[_0x382d36];if(_0x382d36!=='id')_0x15b0d7[_0x27ab3f(0x21d)]('id');try{const _0x786c1c=await _0x2d0b29[_0x27ab3f(0x1f6)](_0x4a7335,_0x99938f,_0x15b0d7);if(!_0x786c1c||!_0x786c1c[_0x27ab3f(0x253)]||!Array['isArray'](_0x786c1c['Resources']))throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x1db));if(_0x786c1c[_0x27ab3f(0x253)][_0x27ab3f(0x264)]===0x0)return null;else{if(_0x786c1c[_0x27ab3f(0x253)][_0x27ab3f(0x264)]>0x2)throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x1fa));else{const _0x165373=_0x786c1c[_0x27ab3f(0x253)][0x0];if(!_0x165373['id'])throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+_0x27ab3f(0x240)+JSON[_0x27ab3f(0x1d1)](_0x165373)+_0x27ab3f(0x228));return decodeURIComponent(_0x165373['id']);}}}catch(_0x5da8eb){throw new Error(_0x27ab3f(0x1f8)+JSON[_0x27ab3f(0x1d1)](_0x99938f)+'\x20error:\x20'+_0x5da8eb[_0x27ab3f(0x225)]+'}');}},_0x5a0b97=_0xfbfd24=>{const _0x2b1962=_0x461b07;if(!_0xfbfd24||typeof _0xfbfd24!==_0x2b1962(0x278))return[null,null];_0xfbfd24=_0xfbfd24[_0x2b1962(0x1df)]();const _0x5d863d=_0xfbfd24[_0x2b1962(0x1ff)]('(');if(_0x5d863d<0x1)return[null,null];if(_0xfbfd24['substring'](_0xfbfd24[_0x2b1962(0x264)]-0x1)!==')')return[null,null];if(_0x100ffa(_0xfbfd24,'(')!==_0x100ffa(_0xfbfd24,')'))return[null,null];const _0x335b3f=_0xfbfd24[_0x2b1962(0x1f7)](0x0,_0x5d863d),_0x5b0aab=_0xfbfd24[_0x2b1962(0x1f7)](_0x5d863d+0x1,_0xfbfd24[_0x2b1962(0x264)]-0x1);let _0x367d59=[];const _0x3899ff=_0x5b0aab[_0x2b1962(0x27a)](',');let _0x3b692c='';for(let _0x4096b9=0x0;_0x4096b9<_0x3899ff[_0x2b1962(0x264)];_0x4096b9++){const _0x5a59cc=_0x3b692c?_0x3b692c+','+_0x3899ff[_0x4096b9]:_0x3899ff[_0x4096b9],_0x4c2b1d=_0x100ffa(_0x5a59cc,'('),_0x12ee6b=_0x100ffa(_0x5a59cc,')');if(_0x4c2b1d===_0x12ee6b)_0x367d59['push'](_0x5bfb85(_0x5a59cc,'\x22')),_0x3b692c='';else{if(_0x3b692c)_0x3b692c+=','+_0x3899ff[_0x4096b9];else _0x3b692c+=_0x3899ff[_0x4096b9];}}if(_0x367d59[_0x2b1962(0x264)]===0x0)_0x367d59=null;return[_0x335b3f,_0x367d59];};function _0x100ffa(_0x271210,_0xdfe5bb){const _0x1f8b05=_0x461b07;let _0x30a213=0x0;for(let _0x302246=0x0;_0x302246<_0x271210[_0x1f8b05(0x264)];_0x302246++){_0x271210[_0x1f8b05(0x291)](_0x302246)===_0xdfe5bb&&(_0x30a213+=0x1);}return _0x30a213;}const _0x5bfb85=(_0x151f43,_0x20fdb6)=>{const _0x215f04=_0x461b07;if(typeof _0x151f43!=='string'||typeof _0x20fdb6!==_0x215f04(0x278))return _0x151f43;if(_0x151f43[_0x215f04(0x264)]===0x1)return _0x151f43;if(_0x20fdb6[_0x215f04(0x264)]!==0x1)return _0x151f43;return _0x151f43=_0x151f43[_0x215f04(0x1df)](),_0x151f43[_0x215f04(0x1f7)](0x0,0x1)===_0x20fdb6&&(_0x151f43=_0x151f43[_0x215f04(0x1f7)](0x1)),_0x151f43[_0x215f04(0x1f7)](_0x151f43['length']-0x1)===_0x20fdb6&&(_0x151f43=_0x151f43[_0x215f04(0x1f7)](0x0,_0x151f43['length']-0x1)),_0x151f43;},_0x41a21b=async(_0x45ab7a,_0x1d2460,_0x5b0890)=>{const _0x52907c=_0x461b07;if(!_0x45ab7a||!_0x1d2460||!_0x5b0890)return null;const [_0x41fadf,_0x3f6db3]=_0x5a0b97(_0x5b0890);if(!_0x41fadf||!_0x3f6db3){const _0x4e9001=_0x5b0890['split']('(');if(_0x4e9001['length']>0x1){const _0x40f640=[_0x52907c(0x261),'uppercase',_0x52907c(0x265),'elementnumber',_0x52907c(0x20f),_0x52907c(0x23b),_0x52907c(0x274),_0x52907c(0x22d),_0x52907c(0x21e)],_0x55b90a=_0x4e9001[0x0][_0x52907c(0x1e6)]();if(_0x40f640[_0x52907c(0x27c)](_0x55b90a))return null;}return _0x5b0890;}for(let _0x3f83a3=0x0;_0x3f83a3<_0x3f6db3['length'];_0x3f83a3++){if(_0x3f6db3[_0x3f83a3][_0x52907c(0x1f7)](0x0,0x1)==='['){const _0x3e578a=_0x3f6db3[_0x3f83a3][_0x52907c(0x1ff)](']');if(_0x3e578a<0x0)return null;const _0x4926bf=_0x3f6db3[_0x3f83a3][_0x52907c(0x1f7)](0x1,_0x3e578a),_0x32032d=_0x4926bf[_0x52907c(0x27a)]('.');let _0x29a30c;for(let _0x1882cc=0x0;_0x1882cc<_0x32032d[_0x52907c(0x264)];_0x1882cc++){if(_0x1882cc===0x0)_0x29a30c=_0x45ab7a[_0x32032d[_0x1882cc]];else{if(!_0x29a30c)return null;_0x29a30c=_0x29a30c[_0x32032d[_0x1882cc]];}}if(!_0x29a30c)return null;_0x3f6db3[_0x3f83a3]=_0x29a30c;}}for(let _0x1779b0=0x0;_0x1779b0<_0x3f6db3['length'];_0x1779b0++){const [_0x312d40]=_0x5a0b97(_0x3f6db3[_0x1779b0]);_0x312d40&&(_0x3f6db3[_0x1779b0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3f6db3[_0x1779b0]));}if(_0x3f6db3[0x0]===null)return null;switch(_0x41fadf[_0x52907c(0x1e6)]()){case _0x52907c(0x261):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x1c8bed]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x1c8bed)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x1c8bed);if(_0x3f6db3[0x0]===null)return null;return _0x3f6db3[0x0][_0x52907c(0x1e6)]();}case _0x52907c(0x208):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x2b59c1]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x2b59c1)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2b59c1);if(_0x3f6db3[0x0]===null)return null;return _0x3f6db3[0x0][_0x52907c(0x28e)]();}case _0x52907c(0x265):{if(_0x3f6db3[_0x52907c(0x264)]!==0x2)return null;const [_0x20d91c]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x20d91c)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x20d91c);if(_0x3f6db3[0x0]===null)return null;if(isNaN(_0x3f6db3[0x1]))return null;return _0x3f6db3[0x0][_0x52907c(0x1f7)](0x0,_0x3f6db3[0x1]);}case'elementnumber':{const [_0x2964d9]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3f6db3[_0x52907c(0x264)]<0x2)return null;if(_0x2964d9)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2964d9);if(_0x3f6db3[0x0]===null)return null;const _0x278ede=_0x3f6db3[0x1];if(isNaN(_0x278ede))return null;let _0x58c155;if(_0x3f6db3[_0x52907c(0x264)]===0x3)_0x58c155=_0x3f6db3[0x0][_0x52907c(0x27a)](_0x3f6db3[0x2]);else _0x58c155=_0x58c155=_0x3f6db3[0x0]['split']('\x20');if(_0x278ede<=_0x58c155[_0x52907c(0x264)])return _0x58c155[_0x278ede-0x1];else return'';}case _0x52907c(0x23b):{const [_0xe9c5db]=_0x5a0b97(_0x3f6db3[0x0]);if(_0xe9c5db)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0xe9c5db);if(_0x3f6db3[0x0]===null)return null;if(_0x3f6db3[_0x52907c(0x264)]!==0x3)return null;return _0x3f6db3[0x0][_0x52907c(0x215)](_0x3f6db3[0x1],_0x3f6db3[0x2]);}case _0x52907c(0x274):{if(_0x3f6db3[_0x52907c(0x264)]!==0x1)return null;const [_0x2cb869]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x2cb869)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x2cb869);if(_0x3f6db3[0x0]===null)return null;return ascii127[_0x52907c(0x260)](_0x3f6db3[0x0]);}case _0x52907c(0x20f):{let _0xe9561f='';for(let _0x5d2ba0=0x0;_0x5d2ba0<_0x3f6db3['length'];_0x5d2ba0++){const [_0x588017]=_0x5a0b97(_0x3f6db3[_0x5d2ba0]);if(_0x588017)_0x3f6db3[_0x5d2ba0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x588017);if(_0x3f6db3[_0x5d2ba0]===null)return null;_0xe9561f+=_0x3f6db3[_0x5d2ba0];}return _0xe9561f;}case _0x52907c(0x22d):{if(_0x3f6db3['length']>0x2)return null;const [_0x3b8de9]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3b8de9)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3b8de9);if(_0x3f6db3[0x0]===null)return null;const _0x1df101=parseInt(_0x3f6db3[0x0]);if(isNaN(_0x1df101))return null;let _0x4c3bc2=_0x52907c(0x243);_0x4c3bc2+=','+_0x3f6db3[0x0];if(_0x3f6db3[_0x52907c(0x264)]===0x2&&_0x3f6db3[0x1][_0x52907c(0x1e6)]()==='true')_0x4c3bc2+=_0x52907c(0x1e8);else _0x4c3bc2+=_0x52907c(0x1f0);return _0x4c3bc2+='##',_0x4c3bc2;}case'getuniquevalue':{if(_0x3f6db3['length']!==0x1)return null;const [_0x3f5c8e]=_0x5a0b97(_0x3f6db3[0x0]);if(_0x3f5c8e)_0x3f6db3[0x0]=await _0x41a21b(_0x45ab7a,_0x1d2460,_0x3f5c8e);if(_0x3f6db3[0x0]===null)return null;let _0x4a466b,_0x2a03aa=![],_0x2c24e7='';const _0x33ae9e=_0x3f6db3[0x0]['split']('##');if(_0x33ae9e[_0x52907c(0x264)]>0x2)for(let _0x10bf63=0x0;_0x10bf63<_0x33ae9e['length'];_0x10bf63++){if(_0x33ae9e[_0x10bf63][_0x52907c(0x1ea)](_0x52907c(0x1cc))){const _0x57b1b6=_0x33ae9e[_0x10bf63][_0x52907c(0x27a)](',');if(_0x57b1b6[_0x52907c(0x264)]<0x2)return null;const _0x5f1985=parseInt(_0x57b1b6[0x1]);if(isNaN(_0x5f1985))return null;_0x2c24e7='##'+_0x33ae9e[_0x10bf63]+'##',_0x4a466b=_0x57b1b6[0x1],_0x57b1b6[_0x52907c(0x264)]>0x2&&(_0x2a03aa=_0x57b1b6[0x2]['toLowerCase']()==='true');}}let _0x31ede8,_0x4125dc=0x0,_0x283e64=0x0;if(_0x4a466b){_0x283e64=_0x4a466b['length'],_0x4125dc=0xa;for(let _0x5cdade=0x1;_0x5cdade<_0x283e64;_0x5cdade++){_0x4125dc*=0xa;}_0x4125dc-=0x1,_0x31ede8=parseInt(_0x4a466b);if(isNaN(_0x31ede8))return null;_0x31ede8-=0x1;}else _0x31ede8=0x0;do{_0x31ede8+=0x1;let _0x12ce62=_0x3f6db3[0x0];if(_0x4a466b!==undefined&&_0x2c24e7){let _0x3d0cd8=_0x31ede8['toString']();while(_0x3d0cd8[_0x52907c(0x264)]<_0x283e64){_0x3d0cd8='0'+_0x3d0cd8;}_0x2a03aa?_0x12ce62=_0x12ce62[_0x52907c(0x23b)](_0x2c24e7,_0x3d0cd8):(_0x12ce62=_0x12ce62[_0x52907c(0x23b)](_0x2c24e7,''),_0x2a03aa=!![],_0x31ede8-=0x1);}try{const _0x56e7fb=await _0x593801(_0x1d2460,_0x12ce62);if(!_0x56e7fb)return _0x12ce62;}catch(_0x5163ae){return _0x2d0b29[_0x52907c(0x289)][_0x52907c(0x1dc)](_0x2d0b29[_0x52907c(0x24a)]+'['+_0x2d0b29['pluginName']+']\x20'+_0x41fadf+_0x52907c(0x27e)+_0x5163ae['message']),null;}}while(_0x31ede8<_0x4125dc);return null;}default:}return null;},_0x32f9e0=async _0x3528d2=>{const _0x3c76b8=_0x461b07;for(const _0x193735 in _0x3528d2){const _0x98e83c=_0x3528d2[_0x193735],[_0x591d5d,_0x49b98c]=_0x5a0b97(_0x98e83c);if(_0x591d5d){const _0x5a282b=''+_0x193735,_0x1d805c=_0x591d5d+'('+_0x49b98c[_0x3c76b8(0x20f)](',')+')',_0x30cb79=await _0x41a21b(_0x3528d2,_0x5a282b,_0x1d805c);if(_0x30cb79===null)delete _0x3528d2[_0x193735];else _0x3528d2[_0x193735]=_0x30cb79;}for(const _0x47da91 in _0x98e83c){const _0x2c5d4f=_0x98e83c[_0x47da91],[_0x3c08ea,_0x3f9fdc]=_0x5a0b97(_0x2c5d4f);if(_0x3c08ea){const _0x2be80e=_0x193735+'.'+_0x47da91,_0x25475d=_0x3c08ea+'('+_0x3f9fdc[_0x3c76b8(0x20f)](',')+')',_0x7953f1=await _0x41a21b(_0x3528d2,_0x2be80e,_0x25475d);if(_0x7953f1===null)delete _0x98e83c[_0x47da91];else _0x98e83c[_0x47da91]=_0x7953f1;}}}return _0x3528d2;};},module[a0_0x20b93f(0x290)][a0_0x20b93f(0x1d3)]=async(_0x5c6853,_0x2f5c49,_0x26adbe,_0x42a22a)=>{const _0x4f4f1f=a0_0x20b93f,_0x51f644=_0x4f4f1f(0x1d3),_0x178a2f=_0x5c6853;_0x178a2f[_0x4f4f1f(0x289)][_0x4f4f1f(0x27f)](_0x178a2f[_0x4f4f1f(0x24a)]+'['+_0x178a2f[_0x4f4f1f(0x1e3)]+_0x4f4f1f(0x1f4)+_0x51f644+'\x22');try{if(!fs['existsSync'](_0x178a2f['configDir']+'/approles'))fs[_0x4f4f1f(0x1e7)](_0x178a2f[_0x4f4f1f(0x218)]+_0x4f4f1f(0x227));}catch(_0x24c2ec){}const _0x4573d8=path['join'](''+_0x178a2f['configDir'],_0x4f4f1f(0x25d),_0x4f4f1f(0x21f)+_0x178a2f[_0x4f4f1f(0x1e3)]+'_autogenerated.cfg'),_0x548cfb={};utils[_0x4f4f1f(0x27b)](_0x4573d8)&&fs[_0x4f4f1f(0x1ce)](_0x4573d8,'utf-8')['split'](/\r?\n/)[_0x4f4f1f(0x1ca)](_0x5e2e97=>{const _0x2abe45=_0x4f4f1f,_0x26d292=_0x5e2e97['split']('\x20');_0x26d292[_0x2abe45(0x264)]===0x2&&(_0x548cfb[_0x26d292[0x0]]=_0x26d292[0x1]);});const _0x346ae4=fs[_0x4f4f1f(0x21b)](_0x4573d8,{'flags':'w','encoding':_0x4f4f1f(0x254),'mode':0x1b6,'autoClose':!![]}),_0xe65087=[],_0x39b1ae=await _0x178a2f[_0x4f4f1f(0x23c)](_0x2f5c49,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x4f4f1f(0x1e4)]);return _0x39b1ae[_0x4f4f1f(0x253)][_0x4f4f1f(0x1ca)](_0x21fa7b=>{const _0x47e197=_0x4f4f1f;if(_0x21fa7b['id']){let _0x438aac=crypto[_0x47e197(0x20b)]();if(_0x548cfb[_0x21fa7b['id']])_0x438aac=_0x548cfb[_0x21fa7b['id']];const _0x308738={'allowedMemberTypes':[_0x47e197(0x1cd)],'description':'SCIM\x20Stream\x20-\x20Autogenerated','displayName':_0x21fa7b[_0x47e197(0x1e4)]||_0x21fa7b['id'],'id':_0x438aac,'isEnabled':!![],'lang':null,'origin':_0x47e197(0x26e),'value':decodeURIComponent(_0x21fa7b['id'])};_0xe65087[_0x47e197(0x21d)](_0x308738),_0x346ae4[_0x47e197(0x1d4)](_0x21fa7b['id']+'\x20'+_0x438aac+'\x0a');}}),_0x346ae4['close'](),_0x178a2f['logger']['debug'](_0x178a2f[_0x4f4f1f(0x24a)]+'['+_0x178a2f[_0x4f4f1f(0x1e3)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x4573d8),{'Resources':[{'appRoles':_0xe65087}]};};
@@ -1781,7 +1781,7 @@ const ScimGateway = function () {
1781
1781
  }) // delete
1782
1782
 
1783
1783
  // ==========================================
1784
- // GET Application Roles from on groups
1784
+ // GET Application Roles based on groups
1785
1785
  // ==========================================
1786
1786
  //
1787
1787
  // GET = /AppRoles
@@ -1862,16 +1862,16 @@ const ScimGateway = function () {
1862
1862
  cfgSub.baseUrls = config.stream.baseUrls
1863
1863
  cfgSub.certificate = config.stream.certificate
1864
1864
  cfgSub.usePutSoftSync = config.scim.usePutSoftSync
1865
- const sub = new Subscriber(this, cfgSub, baseEntity)
1865
+ const sub = new Subscriber(this, cfgSub, baseEntity, subject)
1866
1866
  if (!sub || !sub.connect) {
1867
- logger.error(`${gwName}[${pluginName}] subscriber[${subject}] not started, initialization failed`)
1867
+ logger.error(`${gwName}[${pluginName}] subscriber[${baseEntity}][${subject}] not started, initialization failed`)
1868
1868
  return
1869
1869
  }
1870
1870
  try {
1871
- await sub.connect(subject)
1872
- sub.subscribe(baseEntity, subject)
1871
+ await sub.connect()
1872
+ sub.subscribe()
1873
1873
  } catch (err) {
1874
- logger.error(`${gwName}[${pluginName}] subscriber nats.tenant=${cfgSub.nats.tenant} connect error: ${err.message}`)
1874
+ logger.error(`${gwName}[${pluginName}] subscriber[${baseEntity}][${subject}] nats.tenant=${cfgSub.nats.tenant} connect error: ${err.message}`)
1875
1875
  }
1876
1876
  }
1877
1877
  if (config.stream.subscriber.entity && Object.keys(config.stream.subscriber.entity.length > 0)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "description": "Using SCIM protocol as a gateway for user provisioning to other endpoints",
5
5
  "author": "Jarle Elshaug <jarle.elshaug@gmail.com> (https://elshaug.xyz)",
6
6
  "homepage": "https://elshaug.xyz",