@sava-info-systems/api-maker-with-extensions 1.19.2 → 1.19.4

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.
Files changed (116) hide show
  1. package/dist/1025.ad3d7fe2972421a7.js +1 -0
  2. package/dist/1097.f7edc9a254293cbe.js +1 -0
  3. package/dist/148.3d1172921fc38628.js +1 -0
  4. package/dist/1558.d77067ef3989dc57.js +1 -0
  5. package/dist/{1351.48e08341fba9b889.js → 1617.cd35a3a268fd8f90.js} +1 -1
  6. package/dist/1678.2c6fe869dc9df280.js +1 -0
  7. package/dist/1754.616b92791d39dab1.js +1 -0
  8. package/dist/1928.a299b3986d670379.js +1 -0
  9. package/dist/1957.cafa315c70f23efe.js +1 -0
  10. package/dist/2140.82e389d21656cd83.js +1 -0
  11. package/dist/2295.b066a00a7c4c4d9c.js +1 -0
  12. package/dist/238.6207cf874f0ff82a.js +1 -0
  13. package/dist/2473.6a522dcf87dfb922.js +1 -0
  14. package/dist/2714.1ed8bfd73f5693eb.js +1 -0
  15. package/dist/{3611.9577d58af5f1f4aa.js → 2735.880b4c038ef3207e.js} +1 -1
  16. package/dist/2908.c7cbde300e1840a4.js +1 -0
  17. package/dist/3081.e470a8aeed4a7745.js +1 -0
  18. package/dist/3139.7a6ebcaa6a5f38f6.js +1 -0
  19. package/dist/3450.68d8d179c9496764.js +1 -0
  20. package/dist/4110.1747a68dfaacbbd8.js +1 -0
  21. package/dist/4186.601304798e909236.js +1 -0
  22. package/dist/4211.b7a72c8db8263edf.js +1 -0
  23. package/dist/4575.987834c6e73af961.js +1 -0
  24. package/dist/4842.f89ded9e1e9f1110.js +1 -0
  25. package/dist/485.b333cf63f954b75c.js +1 -0
  26. package/dist/4895.95e42b567a89ce84.js +1 -0
  27. package/dist/5249.52aa732ef6a173c5.js +1 -0
  28. package/dist/5334.8ed5b236a6948681.js +1 -0
  29. package/dist/5421.e729ed3585afa9af.js +1 -0
  30. package/dist/5679.53292305f1448567.js +1 -0
  31. package/dist/5761.c363fe26244e8787.js +1 -0
  32. package/dist/5765.e70cd773673bfe27.js +1 -0
  33. package/dist/6236.b81e95926f7fcd60.js +1 -0
  34. package/dist/6393.1323e8b7d2cdae70.js +1 -0
  35. package/dist/6401.02e5b3cb94d0322a.js +1 -0
  36. package/dist/{8970.8eece52bbc1c316c.js → 6925.d59cabb0e343d24c.js} +1 -1
  37. package/dist/7368.4c04430d3efc5947.js +1 -0
  38. package/dist/{2442.adbc5b49349bb569.js → 7436.7e4876b9e90efde6.js} +1 -1
  39. package/dist/7470.9195bddaee5202e0.js +1 -0
  40. package/dist/7649.870e05f3aa978078.js +1 -0
  41. package/dist/7975.dbe6e674c50ab553.js +1 -0
  42. package/dist/7977.35ebfb6f4c9503b4.js +1 -0
  43. package/dist/7987.37367b65a76d5083.js +1 -0
  44. package/dist/8125.58e1a7a385797896.js +1 -0
  45. package/dist/8266.d665463de8b8d75a.js +1 -0
  46. package/dist/8296.32f107844a1381b6.js +1 -0
  47. package/dist/{3732.b5ac36f1448e215c.js → 8374.11d430ef2432bfba.js} +1 -1
  48. package/dist/{6589.b9c83295e466e464.js → 8682.5bde1163690a18dc.js} +1 -1
  49. package/dist/8841.6cb824dd9d5ad8f8.js +1 -0
  50. package/dist/885.e3d53b62c51f8311.js +1 -0
  51. package/dist/{9785.35cc7f0c3778344e.js → 891.333c6913b8246e3c.js} +1 -1
  52. package/dist/913.7d41933171ab9fbe.js +1 -0
  53. package/dist/9243.c223cdbc4cd84cb8.js +1 -0
  54. package/dist/9575.0a35a4da70f9e6e5.js +1 -0
  55. package/dist/9939.218315684234eb18.js +1 -0
  56. package/dist/common.442040891fd4ef29.js +1 -0
  57. package/dist/index.html +1 -1
  58. package/dist/main.9630ecd9c9613e82.js +1 -0
  59. package/dist/polyfills.93062920aa87d580.js +1 -0
  60. package/dist/runtime.21919a870e05d69b.js +1 -0
  61. package/main.js +1 -1
  62. package/package.json +4 -4
  63. package/sandbox/sandbox.js +1 -1
  64. package/src/tools/local-client.js +1 -1
  65. package/dist/1417.5caf023140e7c67f.js +0 -1
  66. package/dist/1468.d42293f7d802a787.js +0 -1
  67. package/dist/1959.a22fe393419f10c5.js +0 -1
  68. package/dist/2162.3c94f3d66c6312d5.js +0 -1
  69. package/dist/2818.71176f4848a9419f.js +0 -1
  70. package/dist/3488.ada60be2dbcd9845.js +0 -1
  71. package/dist/3545.b5585792e9fe1447.js +0 -1
  72. package/dist/3605.3c6cdf2a08c47301.js +0 -1
  73. package/dist/3621.412300a009ea6346.js +0 -1
  74. package/dist/379.d3e61f3350a595dc.js +0 -1
  75. package/dist/3929.9ac933e926943db2.js +0 -1
  76. package/dist/4092.71b0eccc0cb429f0.js +0 -1
  77. package/dist/4124.a8329e77343e7087.js +0 -1
  78. package/dist/4316.542be541e58dff84.js +0 -1
  79. package/dist/4344.d8f42d425eaec852.js +0 -1
  80. package/dist/4689.e827720779e0cf34.js +0 -1
  81. package/dist/4709.262c34f60b50ebc9.js +0 -1
  82. package/dist/4774.a4368f3ce2e778da.js +0 -1
  83. package/dist/4880.70ca405524206be7.js +0 -1
  84. package/dist/5011.ed9a6465223f760d.js +0 -1
  85. package/dist/5090.c8bf74c35b0a5d26.js +0 -1
  86. package/dist/5140.581ccd2699e2a8a8.js +0 -1
  87. package/dist/5362.912e053f78479e90.js +0 -1
  88. package/dist/5442.186b40719e7c1da9.js +0 -1
  89. package/dist/5455.a1d0d507419e3c59.js +0 -1
  90. package/dist/5729.f0ee236ba6579a94.js +0 -1
  91. package/dist/5826.44efead20568788a.js +0 -1
  92. package/dist/6053.67f38f7b35484475.js +0 -1
  93. package/dist/6220.b6c29e6e3e717880.js +0 -1
  94. package/dist/6415.a48241737e134178.js +0 -1
  95. package/dist/6679.c5073d3a60b67e2e.js +0 -1
  96. package/dist/6828.36c6805f2b3c6f38.js +0 -1
  97. package/dist/6866.4dd76a41246a20be.js +0 -1
  98. package/dist/6882.fe03a3df377ca119.js +0 -1
  99. package/dist/7014.5db4db60cc21782e.js +0 -1
  100. package/dist/7152.dab3cc50472f703f.js +0 -1
  101. package/dist/7367.ba1e63db0f9b97f4.js +0 -1
  102. package/dist/7374.ebfe1004d1773912.js +0 -1
  103. package/dist/7597.177f15771dcdea42.js +0 -1
  104. package/dist/7759.2b4ed39a62323abd.js +0 -1
  105. package/dist/807.dba59148bbbbe7fb.js +0 -1
  106. package/dist/8219.2c97945d465ab185.js +0 -1
  107. package/dist/8447.8caa67c3eb5d2b55.js +0 -1
  108. package/dist/9036.876c1f0c1ce4e82b.js +0 -1
  109. package/dist/9347.4e7d02eee86c5778.js +0 -1
  110. package/dist/9429.9299aa0abda3dc76.js +0 -1
  111. package/dist/9882.a94c746b42e5fc0e.js +0 -1
  112. package/dist/9957.47ed0e74bdfeddd5.js +0 -1
  113. package/dist/common.d4eb1616e93e21e1.js +0 -1
  114. package/dist/main.1da32156380b46d5.js +0 -1
  115. package/dist/polyfills.9cbb1c8222a6b6c3.js +0 -1
  116. package/dist/runtime.212fca73d6a42b3a.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1678,6925,8374,8682,1617],{7747:(U,E,o)=>{o.d(E,{o:()=>H});var d=o(5861),t=o(95),u=o(3157),g=o(328),v=o(6990),x=o(7848),h=o(1162),n=o(4946),M=o(9961),A=o(3429),O=o(7240),s=o(5852),w=o(1429),R=o(2915),b=o(115),F=o(7414),N=o(6814),L=o(2660),y=o(7680),P=o(3965);function K(m,C){1&m&&(n.TgZ(0,"span"),n._UZ(1,"i",29),n._uU(2," Add Instance"),n.qZA())}function Z(m,C){1&m&&(n.TgZ(0,"span"),n._UZ(1,"i",30),n._uU(2," View Instance"),n.qZA())}function B(m,C){1&m&&(n.TgZ(0,"span"),n._UZ(1,"i",31),n._uU(2," Edit Instance"),n.qZA())}function J(m,C){if(1&m&&(n.TgZ(0,"div")(1,"div",10)(2,"label",11),n._uU(3,"Username"),n.qZA(),n.TgZ(4,"div",12),n._UZ(5,"p-dropdown",32),n.qZA()(),n.TgZ(6,"div",10)(7,"label",11),n._uU(8,"Password"),n.qZA(),n.TgZ(9,"div",12),n._UZ(10,"p-dropdown",33),n.qZA()(),n.TgZ(11,"div",10)(12,"label",11),n._uU(13,"Privilege"),n.qZA(),n.TgZ(14,"div",12),n._UZ(15,"p-dropdown",34),n.qZA()()()),2&m){const a=n.oxw();n.xp6(5),n.Q6J("options",a.connectionStringSecrets)("filter",!0),n.xp6(5),n.Q6J("options",a.connectionStringSecrets)("filter",!0),n.xp6(5),n.Q6J("options",a.privileges)("filter",!0)}}function W(m,C){if(1&m){const a=n.EpF();n.TgZ(0,"a",35),n.NdJ("click",function(){n.CHM(a);const l=n.oxw();return n.KtG(l.openSecret())}),n._UZ(1,"i",36),n._uU(2," Open Secret "),n.qZA()}}function Y(m,C){1&m&&n._UZ(0,"i",37)}function G(m,C){1&m&&n._UZ(0,"i",38)}function Q(m,C){1&m&&(n.TgZ(0,"span"),n._uU(1,"Save Instance"),n.qZA())}function k(m,C){1&m&&(n.TgZ(0,"span"),n._uU(1,"Update Instance"),n.qZA())}function V(m,C){if(1&m){const a=n.EpF();n.TgZ(0,"button",39),n.NdJ("click",function(){n.CHM(a);const l=n.oxw();return n.KtG(l.save())}),n._UZ(1,"i",40),n.YNc(2,Q,2,0,"span",4),n.YNc(3,k,2,0,"span",4),n.qZA()}if(2&m){const a=n.oxw();n.Q6J("disabled",a.form.invalid||a.loading.form),n.xp6(2),n.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),n.xp6(1),n.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT)}}function z(m,C){1&m&&n._UZ(0,"p-progressSpinner",41)}let H=(()=>{class m{fb;ns;instanceS;generalS;authCS;dataProviderS;eventCenterS;secretS;constantsS;data;loading={form:!1};EFormMode=g.D;EInstanceType=x.d;IInstanceProps=h.Il;form;subscriptions=[];instanceTypes=[];privileges=[];connectionStringSecrets=[];instanceTested;isFromMarkTested;constructor(a,_,l,f,D,S,j,X,q){this.fb=a,this.ns=_,this.instanceS=l,this.generalS=f,this.authCS=D,this.dataProviderS=S,this.eventCenterS=j,this.secretS=X,this.constantsS=q}ngOnInit(){var a=this;return(0,d.Z)(function*(){a.instanceTypes=a.dataProviderS.getInstanceTypes(),a.privileges=a.dataProviderS.getListOfOraclePrivilege(),a.createForm(),a.subscriptions.push(a.data.eventChannel.subscribe(function(){var _=(0,d.Z)(function*(l){if(l)if(a.form.enable(),yield a.loadConnectionStringFromSecret(),l.action===u.F.OPEN_FORM_IN_EDIT_MODE){const f=yield a.instanceS.getById(a.data.formData._id).toPromise();a.form.reset(),a.form.patchValue(f.data),a.instanceTested=!1,a.isFromMarkTested=!1}else if(l.action===u.F.OPEN_FORM_IN_VIEW_MODE){const f=yield a.instanceS.getById(a.data.formData._id).toPromise();a.form.reset(),a.form.patchValue(f.data),a.form.disable(),a.instanceTested=!1,a.isFromMarkTested=!1}else l.action===u.F.OPEN_FORM_IN_ADD_MODE&&(a.form.reset(),a.setDefaultValuesInForm(),a.instanceTested=!1,a.isFromMarkTested=!1)});return function(l){return _.apply(this,arguments)}}())),a.subscriptions.push(a.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(function(){var _=(0,d.Z)(function*(l){l&&l.action===u.F.UPDATED&&(a.eventCenterS.headerC.secManFormC.hideModal(),yield a.loadConnectionStringFromSecret())});return function(l){return _.apply(this,arguments)}}()))})()}showModal(){$("#idInstancesForm").modal("show")}hideModal(){$("#idInstancesForm").modal("hide")}createForm(){this.form=this.fb.group({type:[null,[t.kI.required]],name:[null,[t.kI.required]],connectionString:[null,[t.kI.required]],username:[null,[]],password:[null,[]],privilege:[null,[]],maxPoolConnections:[null,[t.kI.required]]}),this.manageValidations()}manageValidations(){this.form.valueChanges.subscribe(()=>{this.instanceTested=!1,this.isFromMarkTested=!1});const a=this.form.get(h.Il.type),_=this.form.get(h.Il.username),l=this.form.get(h.Il.password),f=this.form.get(h.Il.privilege);a.valueChanges.subscribe(function(){var D=(0,d.Z)(function*(S){S&&(S===x.d.ORACLE_DB?(_.setValidators([t.kI.required]),l.setValidators([t.kI.required]),f.setValidators([t.kI.required])):(_.setValidators([]),l.setValidators([]),f.setValidators([])),_.updateValueAndValidity(),l.updateValueAndValidity(),f.updateValueAndValidity())});return function(S){return D.apply(this,arguments)}}())}setDefaultValuesInForm(){this.loading.form=!1,this.form.get(h.Il.type).setValue(this.instanceTypes[0].value),this.form.get(h.Il.maxPoolConnections).setValue(1e4),this.form.get(h.Il.connectionString).setValue(this.connectionStringSecrets[0])}testInstance(a){var _=this;return(0,d.Z)(function*(){_.loading.form=!0;const l=f=>{_.instanceTested=!1,_.isFromMarkTested=!1,_.ns.showError(v.get(f,"errors[0].message","Unable to connect to the instance.")),_.loading.form=!1};try{const f=_.form.value;f.user=_.authCS.gUser._id,f.isFromSaveInstance=a,_.data.mode===g.D.EDIT&&(f._id=_.data.formData._id);const D=yield _.instanceS.testInstance(f).toPromise();D.success&&D.data?_.instanceTested=!0:l(D),_.loading.form=!1}catch(f){l(f.error)}})()}markInstanceTested(){this.instanceTested=!0,this.isFromMarkTested=!0}save(){var a=this;return(0,d.Z)(function*(){if(!a.isFromMarkTested&&(yield a.testInstance(!0),!a.instanceTested))return;const _=a.form.getRawValue();_.user=a.authCS.getUserId(),_.type===x.d.MONGO_DB&&(_.maxPoolConnections=1e4);try{let l;if(a.loading.form=!0,a.data.mode===g.D.ADD)l=yield a.instanceS.post(_).toPromise();else if(a.data.mode===g.D.EDIT){const f=v.merge({},a.data.formData,_);l=yield a.instanceS.put(a.data.formData._id,f,{select:h.iH._id}).toPromise()}a.ns.showSuccess(`Instance ${a.data.mode===g.D.ADD?"added":"edited"} successfully.`),a.data.eventChannel.emit({action:a.data.mode===g.D.ADD?u.F.SAVED:u.F.UPDATED}),a.loading.form=!1}catch(l){a.loading.form=!1,a.ns.showErrorFromResponse(l.error||l,"Unable to save instance.")}})()}loadConnectionStringFromSecret(){var a=this;return(0,d.Z)(function*(){try{const _=(yield a.instanceS.getConnectionStringSecret().toPromise())?.data;a.connectionStringSecrets=_}catch(_){a.ns.showErrorFromResponse(_.error||_,"Unable to load connection string.")}})()}openSecret(){var a=this;return(0,d.Z)(function*(){a.eventCenterS.headerC.dataSecretForm.formData=yield a.getDefaultSecret(),a.eventCenterS.headerC.dataSecretForm.mode=g.D.EDIT,a.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),a.eventCenterS.headerC.secManFormC.showModal()})()}getDefaultSecret(){var a=this;return(0,d.Z)(function*(){const _={find:{user:a.authCS.getUserId(),active:!0,isDefault:!0}};return(yield a.secretS.query(_).toPromise()).data?.[0]})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(_){return new(_||m)(n.Y36(t.qu),n.Y36(M.W),n.Y36(A.E),n.Y36(O.b),n.Y36(s.D),n.Y36(w.B),n.Y36(R.u),n.Y36(b.e),n.Y36(F.L))};static \u0275cmp=n.Xpm({type:m,selectors:[["app-w-instances-form"]],inputs:{data:"data"},decls:48,vars:17,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idInstancesForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",2,"z-index","1049"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],[1,"card","flex","justify-content-center"],["formControlName","type","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide instance name",1,"form-control","form-control-sm"],["formControlName","connectionString","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-2","p-0"],["class","d-block mt-2 text-info","href","javascript:","sava-no-dbl-click","",3,"click",4,"ngIf"],[1,"form-group","row",3,"hidden"],["formControlName","maxPoolConnections","min","1","name","maxPoolConnections","spellcheck","false","type","number",1,"form-control","form-control-sm"],[1,"modal-footer","d-block"],["type","button",1,"btn","btn-sm","btn-secondary","float-left",3,"disabled","click"],["class","fas fa-check fa-fw text-success",4,"ngIf"],["class","fas fa-question fa-fw text-warning",4,"ngIf"],["class","btn btn-primary btn-sm float-right ml-2","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary","float-right",3,"disabled"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","username","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","password","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","privilege","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["href","javascript:","sava-no-dbl-click","",1,"d-block","mt-2","text-info",3,"click"],[1,"fas","fa-key","text-danger","fa-fw","mr-1"],[1,"fas","fa-check","fa-fw","text-success"],[1,"fas","fa-question","fa-fw","text-warning"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm","float-right","ml-2",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(_,l){1&_&&(n.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),n.YNc(4,K,3,0,"span",4),n.YNc(5,Z,3,0,"span",4),n.YNc(6,B,3,0,"span",4),n.TgZ(7,"button",5)(8,"span",6),n._UZ(9,"i",7),n.qZA()()(),n.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),n._uU(14,"Database Type"),n.qZA(),n.TgZ(15,"div",12)(16,"div",13),n._UZ(17,"p-dropdown",14),n.qZA()()(),n.TgZ(18,"div",10)(19,"label",11),n._uU(20,"Instance Name"),n.qZA(),n.TgZ(21,"div",12),n._UZ(22,"input",15),n.qZA()(),n.YNc(23,J,16,6,"div",4),n.TgZ(24,"div")(25,"div",10)(26,"label",11),n._uU(27,"Connection String"),n.qZA(),n.TgZ(28,"div",12),n._UZ(29,"p-dropdown",16),n.qZA(),n.TgZ(30,"div",17),n.YNc(31,W,3,0,"a",18),n.qZA()()(),n.TgZ(32,"div",19)(33,"label",11),n._uU(34,"Max Pool Connections"),n.qZA(),n.TgZ(35,"div",12),n._UZ(36,"input",20),n.qZA()()()(),n.TgZ(37,"div",21)(38,"div")(39,"button",22),n.NdJ("click",function(){return l.testInstance()}),n.YNc(40,Y,1,0,"i",23),n.YNc(41,G,1,0,"i",24),n._uU(42," Test Instance "),n.qZA(),n.YNc(43,V,4,3,"button",25),n.TgZ(44,"button",26),n._UZ(45,"i",27),n._uU(46," Close"),n.qZA()()(),n.YNc(47,z,1,0,"p-progressSpinner",28),n.qZA()()()),2&_&&(n.xp6(4),n.Q6J("ngIf",l.data.mode===l.EFormMode.ADD),n.xp6(1),n.Q6J("ngIf",l.data.mode===l.EFormMode.VIEW),n.xp6(1),n.Q6J("ngIf",l.data.mode===l.EFormMode.EDIT),n.xp6(5),n.Q6J("formGroup",l.form),n.xp6(6),n.Q6J("options",l.instanceTypes)("filter",!0),n.xp6(6),n.Q6J("ngIf",l.form.get("type").value===l.EInstanceType.ORACLE_DB),n.xp6(6),n.Q6J("options",l.connectionStringSecrets)("filter",!0),n.xp6(2),n.Q6J("ngIf",l.data.mode!==l.EFormMode.VIEW),n.xp6(1),n.Q6J("hidden",l.form.get("type").value===l.EInstanceType.MONGO_DB),n.xp6(7),n.Q6J("disabled",l.form.invalid||l.loading.form),n.xp6(1),n.Q6J("ngIf",l.instanceTested),n.xp6(1),n.Q6J("ngIf",!l.instanceTested),n.xp6(2),n.Q6J("ngIf",l.data.mode!==l.EFormMode.VIEW),n.xp6(1),n.Q6J("disabled",l.loading.form),n.xp6(3),n.Q6J("ngIf",l.loading.form))},dependencies:[t._Y,t.Fj,t.wV,t.JJ,t.JL,t.qQ,t.sg,t.u,N.O5,L.y,y.G,P.Lt],encapsulation:2})}return m})()},3885:(U,E,o)=>{o.d(E,{f:()=>ct});var d=o(5861),t=o(4946),u=o(3157),g=o(328),v=o(6212),T=o(6990),h=o(1162),n=o(6925),M=o(7848),A=o(3429),O=o(3366),s=o(7240),w=o(9961),R=o(2189),b=o(5852),F=o(7414),N=o(7664),L=o(2915),y=o(5219),P=o(95),K=o(6814),Z=o(5431),B=o(7680),J=o(3259),W=o(5609),Y=o(8057),G=o(7747);const Q=["instancesFormC"];function k(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",20),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.edit())}),t._UZ(1,"i",21),t.qZA()}}function V(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",22),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.clone())}),t._UZ(1,"i",23),t.qZA()}}function z(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.active())}),t._UZ(1,"i",25),t.qZA()}}function H(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",26),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.inactiveDialog())}),t._UZ(1,"i",27),t.qZA()}}function m(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",28),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.removePermanentDialog())}),t._UZ(1,"i",29),t.qZA()}}function C(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span")(1,"a",9),t._UZ(2,"img",10),t.qZA(),t.TgZ(3,"span",11)(4,"p-inputSwitch",12),t.NdJ("ngModelChange",function(r){t.CHM(e);const I=t.oxw();return t.KtG(I.showAll=r)})("onChange",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.showAllChanges())}),t.qZA()(),t.TgZ(5,"span",13),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.add())}),t._UZ(6,"i",14),t.qZA(),t.YNc(7,k,2,0,"span",15),t.YNc(8,V,2,0,"span",16),t.YNc(9,z,2,0,"span",17),t.YNc(10,H,2,0,"span",18),t.YNc(11,m,2,0,"span",19),t.qZA()}if(2&i){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.showAll),t.xp6(3),t.Q6J("ngIf",e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",e.selectedRows.length&&!1===e.selectedRows[0].active),t.xp6(1),t.Q6J("ngIf",e.selectedRows.length&&!0===e.selectedRows[0].active),t.xp6(1),t.Q6J("ngIf",e.selectedRows.length&&!1===e.selectedRows[0].active)}}function a(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",30)(1,"label",31)(2,"p-checkbox",32),t.NdJ("ngModelChange",function(r){t.CHM(e);const I=t.oxw();return t.KtG(I.eventCenterS.group.apisRegex.allInstances=r)}),t.qZA()()()}if(2&i){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.group.apisRegex.allInstances)("binary",!0)}}function _(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"span",30)(1,"label",31)(2,"p-checkbox",32),t.NdJ("ngModelChange",function(r){t.CHM(e);const I=t.oxw();return t.KtG(I.eventCenterS.filterInLog.apisRegex.allInstances=r)}),t.qZA()()()}if(2&i){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.filterInLog.apisRegex.allInstances)("binary",!0)}}function l(i,p){if(1&i&&(t.TgZ(0,"div")(1,"div",33),t._uU(2),t.qZA()()),2&i){const e=t.oxw();t.xp6(2),t.Oqu(e.constantsS.group.allInstancesPermitted)}}function f(i,p){1&i&&(t.TgZ(0,"th",43),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function D(i,p){1&i&&t._UZ(0,"th",41)}function S(i,p){1&i&&(t.TgZ(0,"th",44),t._uU(1,"Pre"),t.qZA())}function j(i,p){1&i&&(t.TgZ(0,"th",44),t._uU(1,"Post"),t.qZA())}function X(i,p){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,f,2,0,"th",39),t.YNc(2,D,1,0,"th",40),t._UZ(3,"th",41),t.TgZ(4,"th"),t._uU(5,"Instance Name"),t.qZA(),t.YNc(6,S,2,0,"th",42),t.YNc(7,j,2,0,"th",42),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showCheckbox),t.xp6(1),t.Q6J("ngIf",e.showAll),t.xp6(4),t.Q6J("ngIf",e.showHooksCount),t.xp6(1),t.Q6J("ngIf",e.showHooksCount)}}function q(i,p){if(1&i&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",49),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function tt(i,p){1&i&&t._UZ(0,"i",52)}function et(i,p){1&i&&t._UZ(0,"i",53)}function nt(i,p){if(1&i&&(t.TgZ(0,"td"),t.YNc(1,tt,1,0,"i",50),t.YNc(2,et,1,0,"i",51),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.active),t.xp6(1),t.Q6J("ngIf",!e.active)}}function st(i,p){if(1&i&&(t.TgZ(0,"td",54),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.preHookCount||"")}}function at(i,p){if(1&i&&(t.TgZ(0,"td",54),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.postHookCount||"")}}function ot(i,p){if(1&i&&(t.TgZ(0,"tr",45),t.YNc(1,q,2,2,"td",3),t.YNc(2,nt,3,2,"td",3),t.TgZ(3,"td"),t._UZ(4,"img",46),t.qZA(),t.TgZ(5,"td",47),t._uU(6),t.qZA(),t.YNc(7,st,2,1,"td",48),t.YNc(8,at,2,1,"td",48),t.qZA()),2&i){const e=p.$implicit,c=t.oxw(2);t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",c.showCheckbox),t.xp6(1),t.Q6J("ngIf",c.showAll),t.xp6(2),t.Akn("MONGO_DB"==e.type?"width:0.5rem":"width:1rem"),t.s9C("src",c.getInstanceIconUrl(e.type),t.LSH),t.s9C("alt",e.type),t.xp6(2),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",c.showHooksCount),t.xp6(1),t.Q6J("ngIf",c.showHooksCount)}}function it(i,p){1&i&&t._UZ(0,"p-progressSpinner",55)}function rt(i,p){if(1&i){const e=t.EpF();t.TgZ(0,"div",34)(1,"p-table",35),t.NdJ("selectionChange",function(r){t.CHM(e);const I=t.oxw();return t.KtG(I.selectedRows=r)})("selectionChange",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.instanceSelected())})("dblclick",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.dblClickInstance())}),t.YNc(2,X,8,4,"ng-template",36),t.YNc(3,ot,9,10,"ng-template",37),t.qZA(),t.YNc(4,it,1,0,"p-progressSpinner",38),t.qZA()}if(2&i){const e=t.oxw();t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.xp6(3),t.Q6J("ngIf",e.loading.grid)}}let ct=(()=>{class i{instanceS;instanceHooksS;generalS;notificationS;navigationCS;authCS;constantsS;router;cd;eventCenterS;confirmationService;isReadOnly=!1;showCheckbox=!0;showHooksCount=!1;isDependentOnGroup=!1;isFilterLogTable=!1;metaKeySelection=!0;instancesFormC;loading={grid:!1};subscriptions=[];data={mode:g.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;gridKey=h.iH._id;selectedRows=[];instanceIdsSkipSubscription=!1;EInstanceType=M.d;constructor(e,c,r,I,lt,_t,dt,mt,ft,pt,ut){this.instanceS=e,this.instanceHooksS=c,this.generalS=r,this.notificationS=I,this.navigationCS=lt,this.authCS=_t,this.constantsS=dt,this.router=mt,this.cd=ft,this.eventCenterS=pt,this.confirmationService=ut}ngOnInit(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.instance.selectedInstances.next([]),!e.isDependentOnGroup&&!e.isFilterLogTable&&(yield e.loadGridData()),e.isDependentOnGroup&&e.subscriptions.push(e.eventCenterS.group.selectedGroups.subscribe(function(){var c=(0,d.Z)(function*(r){r.length&&(yield e.loadGridData())});return function(r){return c.apply(this,arguments)}}())),e.isFilterLogTable&&e.subscriptions.push(e.eventCenterS.filterInLog.refreshGrid.subscribe((0,d.Z)(function*(){e.instanceIdsSkipSubscription||e.loadGridData()}))),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var c=(0,d.Z)(function*(r){(r.action===u.F.SAVED||r.action===u.F.UPDATED)&&(e.instancesFormC.hideModal(),e.loadGridData())});return function(r){return c.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Instances")})()}loadGridData(){var e=this;return(0,d.Z)(function*(){if(e.resetGridAndUrl(),e.isDependentOnGroup&&(!e.eventCenterS.group.selectedGroups.value||!e.eventCenterS.group.selectedGroups.value.length))return;e.loading.grid=!0;const c={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,type:1},sort:{name:1}};e.showAll&&delete c.find.active;try{const r=yield e.instanceS.query(c).toPromise();r.success?(e.selectedRows=[],e.rows=r.data,e.rowsMap=T.keyBy(e.rows,h.iH._id)):e.resetGridAndUrl(),e.showHooksCount&&(yield e.instanceS.setHooksCountInInstanceArr(e.rows));const I=e.navigationCS.getQueryParam(v.p.instance);I&&(e.selectedRows=e.getObjectsFromIdArray(I.split(",")),e.eventCenterS.instance.selectedInstances.next(e.selectedRows)),e.isDependentOnGroup&&(e.selectedRows=e.getObjectsFromIdArray(e.eventCenterS.group.instanceIds.value)),e.isFilterLogTable&&(e.selectedRows=e.getObjectsFromIdArray(e.eventCenterS.filterInLog.instanceIds.value))}catch(r){console.log(r)}e.loading.grid=!1,e.cd.detectChanges()})()}getObjectsFromIdArray(e){const c=[];for(const r of e)this.rowsMap[r]&&c.push(this.rowsMap[r]);return c}resetGridAndUrl(){var e=this;return(0,d.Z)(function*(){e.rows=[],e.rowsMap={},e.selectedRows=[],e.eventCenterS.instance.selectedInstances.next([])})()}showAllChanges(){var e=this;return(0,d.Z)(function*(){yield e.resetSelectedRows(),yield e.loadGridData()})()}add(){this.data.formData=void 0,this.data.mode=g.D.ADD,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_ADD_MODE}),this.instancesFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.VIEW,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_VIEW_MODE}),this.instancesFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=g.D.EDIT,this.data.eventChannel.emit({action:u.F.OPEN_FORM_IN_EDIT_MODE}),this.instancesFormC.showModal()}clone(){var e=this;return(0,d.Z)(function*(){try{if(!e.selectedRows[0])return;const c=(yield e.instanceS.getById(e.selectedRows[0]._id).toPromise()).data;delete c._id,c.name=`${c.name}-clone`,(yield e.instanceS.post(c).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.instance.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.instance.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.instance.cloneError)}})()}inactiveDialog(){var e=this;return(0,d.Z)(function*(){var c;e.confirmationService.confirm({message:e.constantsS.instance.inactiveConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(c=(0,d.Z)(function*(){yield e.inactive()}),function(){return c.apply(this,arguments)})})})()}removePermanentDialog(){var e=this;return(0,d.Z)(function*(){var c;e.confirmationService.confirm({message:e.constantsS.instance.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(c=(0,d.Z)(function*(){yield e.removePermanent()}),function(){return c.apply(this,arguments)})})})()}active(){var e=this;return(0,d.Z)(function*(){e.loading.grid=!0;const c=yield e.instanceS.makeActive(e.selectedRows[0]._id).toPromise();e.loading.grid=!1,c.success?(e.notificationS.showSuccess(e.constantsS.instance.active),e.loadGridData()):e.notificationS.showErrorFromResponse(c,e.constantsS.instance.activeError)})()}inactive(){var e=this;return(0,d.Z)(function*(){e.loading.grid=!0;try{yield e.instanceS.softDelete(e.selectedRows[0]._id).toPromise(),e.notificationS.showSuccess(e.constantsS.instance.inactive),yield e.resetSelectedRows(),e.loadGridData()}catch(c){const r=c?.error?.errors?.[0]?.message;e.notificationS.showError(r||e.constantsS.instance.inactiveError)}e.loading.grid=!1})()}removePermanent(){var e=this;return(0,d.Z)(function*(){e.loading.grid=!0;const c=yield e.instanceS.permanentDelete(e.selectedRows[0]._id).toPromise();e.loading.grid=!1,c.success?(e.notificationS.showSuccess(e.constantsS.instance.removePermanent),yield e.resetSelectedRows(),e.loadGridData()):e.notificationS.showErrorFromResponse(c,e.constantsS.instance.removePermanentError)})()}resetSelectedRows(){var e=this;return(0,d.Z)(function*(){e.selectedRows.length=0,e.eventCenterS.instance.selectedInstances.next([]),yield e.navigationCS.setQueryParam(v.p.instance,null)})()}instanceSelected(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.instance.selectedInstances.next(e.selectedRows),e.isDependentOnGroup||e.isFilterLogTable?e.setInstanceIds():(yield e.navigationCS.setQueryParam(v.p.instance,T.map(e.selectedRows,"_id").join(",")||null),yield e.generalS.resetUrlParams([v.p.database,v.p.collection,v.p.collection_api]))})()}dblClickInstance(){this.selectedRows.length&&!this.isDependentOnGroup&&!this.isFilterLogTable&&this.edit()}setInstanceIds(){this.instanceIdsSkipSubscription=!0,this.eventCenterS.filterInLog.instanceIds.next(T.map(this.selectedRows,"_id")),this.eventCenterS.group.instanceIds.next(T.map(this.selectedRows,"_id")),this.instanceIdsSkipSubscription=!1}getInstanceIconUrl(e){return e===M.d.SQL_SERVER_DB?"./assets/images/svg/Microsoft_SQL_Server_DB_No_Logo.svg":e===M.d.ORACLE_DB?"./assets/images/svg/Oracle_DB_No_Logo.svg":`./assets/images/svg/${e}.svg`}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=n.Yp;static \u0275fac=function(c){return new(c||i)(t.Y36(A.E),t.Y36(O.Q),t.Y36(s.b),t.Y36(w.W),t.Y36(R.S),t.Y36(b.D),t.Y36(F.L),t.Y36(N.F0),t.Y36(t.sBO),t.Y36(L.u),t.Y36(y.YP))};static \u0275cmp=t.Xpm({type:i,selectors:[["app-w-instances"]],viewQuery:function(c,r){if(1&c&&t.Gf(Q,5),2&c){let I;t.iGM(I=t.CRH())&&(r.instancesFormC=I.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],showCheckbox:"showCheckbox",showHooksCount:"showHooksCount",isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isFilterLogTable:["IsFilterLogTable","isFilterLogTable"],metaKeySelection:"metaKeySelection"},decls:13,vars:6,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],[4,"ngIf"],["class","float-right cursor-pointer","pTooltip","All Instances",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["instancesFormC",""],["href","https://docs.apimaker.dev/v1/docs/pages/instance-database-collection-apis-page.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3",2,"font-size","25px"],[1,"float-right","position-relative"],["styleClass","ml-3 mt-2px","tooltipPosition","right","pTooltip","Show All",3,"ngModel","ngModelChange","onChange"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Make Active",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Make Inactive",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanently Delete",3,"click",4,"ngIf"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["pTooltip","Make Active",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","text-success","fa-fw"],["pTooltip","Make Inactive",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw"],["pTooltip","Permanently Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","align-middle","text-danger"],["pTooltip","All Instances",1,"float-right","cursor-pointer"],[1,"mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped instance-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","40px"],["class","text-center","style","width: 40px;",4,"ngIf"],[2,"width","45px"],[1,"text-center",2,"width","40px"],[3,"pSelectableRow"],[3,"src","alt"],[1,"word-break-all"],["class","text-center",4,"ngIf"],[3,"value","pSelectableRow"],["class","fas fa-circle fa-fw align-middle text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-muted text-v-small",4,"ngIf"],[1,"fas","fa-circle","fa-fw","align-middle","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","align-middle","text-muted","text-v-small"],[1,"text-center"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(c,r){1&c&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Instances"),t.qZA(),t.YNc(5,C,12,6,"span",3),t.YNc(6,a,3,2,"span",4),t.YNc(7,_,3,2,"span",4),t.qZA(),t.TgZ(8,"div",5),t.YNc(9,l,3,1,"div",3),t.YNc(10,rt,5,7,"div",6),t.qZA()(),t._UZ(11,"app-w-instances-form",7,8)),2&c&&(t.xp6(5),t.Q6J("ngIf",!r.isReadOnly),t.xp6(1),t.Q6J("ngIf",r.isDependentOnGroup),t.xp6(1),t.Q6J("ngIf",r.isFilterLogTable),t.xp6(2),t.Q6J("ngIf",r.eventCenterS.group.apisRegex.allInstances||r.eventCenterS.filterInLog.apisRegex.allInstances),t.xp6(1),t.Q6J("ngIf",!(r.eventCenterS.group.apisRegex.allInstances||r.eventCenterS.filterInLog.apisRegex.allInstances)),t.xp6(1),t.Q6J("data",r.data))},dependencies:[P.JJ,P.On,K.O5,Z.iA,y.jx,Z.Ei,Z.UA,Z.Mo,B.G,J.u,W.Ql,Y.XZ,G.o]})}return i})()},1678:(U,E,o)=>{o.r(E),o.d(E,{DashboardM:()=>h});var d=o(7664),t=o(7017),v=(o(3885),o(7747),o(4946));const T=[{path:"root",loadChildren:()=>o.e(891).then(o.bind(o,891)).then(n=>n.DashRootM)},{path:"redis-dashboard",loadChildren:()=>o.e(4110).then(o.bind(o,4110)).then(n=>n.RedisDashboardM)},{path:"summary-dashboard",loadChildren:()=>Promise.all([o.e(9575),o.e(7977)]).then(o.bind(o,7977)).then(n=>n.DashSummaryM)},{path:"developer",loadChildren:()=>o.e(3450).then(o.bind(o,3450)).then(n=>n.DashDevM)},{path:"welcome",loadChildren:()=>o.e(5334).then(o.bind(o,5334)).then(n=>n.AmWelcomeM)},{path:"ext-licenses",loadChildren:()=>o.e(7436).then(o.bind(o,7436)).then(n=>n.ExtLicensesM)}];let h=(()=>{class n{static \u0275fac=function(O){return new(O||n)};static \u0275mod=v.oAB({type:n});static \u0275inj=v.cJS({imports:[d.Bz.forChild(T),t.u]})}return n})()},6925:(U,E,o)=>{o.d(E,{Eg:()=>T,Yp:()=>u,ZF:()=>x,vT:()=>t});var t=function(s){return s.FORM_DATA="FORM_DATA",s.JSON="JSON",s.TEXT="TEXT",s}(t||{}),u=function(s){return s.GET="GET",s.POST="POST",s.PUT="PUT",s.DELETE="DELETE",s}(u||{}),T=function(s){return s.CONTENT_TYPE="content-type",s.ACCEPT_ENCODING="accept-encoding",s.NO_COMPRESSION_STD="x-no-compression",s.AUTHORIZATION_AM="x-am-authorization",s.AUTHORIZATION_AM_USER="x-am-user-authorization",s.AUTHORIZATION_AWS="x-aws-authorization",s.AUTHORIZATION_GOOGLE="x-google-authorization",s.AUTHORIZATION_AZURE="x-azure-authorization",s.RUN_IN_SANDBOX="x-am-run-in-sandbox",s.ORIGIN="origin",s.AUTHORIZATION="authorization",s.META="x-am-meta",s.SECRET="x-am-secret",s.CONTENT_TYPE_RESPONSE="x-am-content-type-response",s.CACHE_CONTROL="x-am-cache-control",s.CODE_HASH="x-am-code-hash",s.SANDBOX_TIMEOUT="x-am-sandbox-timeout",s.GET_ENCRYPTED_DATA="x-am-get-encrypted-data",s.ENCRYPTED_PAYLOAD="x-am-encrypted-payload",s.RESPONSE_CASE="x-am-response-case",s.RESPONSE_OBJECT_TYPE="x-am-response-object-type",s.AM_I18N="x-am-internationalization",s.DATA_SOURCE="x-am-data-source",s.TEST_HOOK="x-am-test-hook",s.TEST_EVENT="x-am-test-event",s.INTER_COMM="x-am-inter-comm",s.SEND_ONLY_OBJECTS="x-am-send-only-objects-in-stream",s.AM_REQUEST_ID="x-am-request-id",s.AM_STORE_TOKEN="x-am-store-token",s.AM_WS_Client_ID="x-am-ws-client-id",s.RUN_IN_DEBUGGER="x-am-run-in-debugger",s}(T||{}),x=function(s){return s.DB_MASTER_NAME="db-master-name",s.ADMIN_PATH="admin-path",s}(x||{})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1754],{1754:(ft,g,a)=>{a.r(g),a.d(g,{VulnerabilityM:()=>lt});var m=a(7664),f=a(4480),C=a(7017),A=a(3726),t=a(4946),r=a(5861),U=a(6990),Z=a(3157),w=a(328),d=a(6212),v=a(1162),q=a(5085),S=a(921),V=a(7240),h=a(9961),I=a(2189),O=a(5852),T=a(7414),L=a(2915),J=a(3835),Y=a(3429),y=a(5219),D=a(1429),b=a(95),c=a(6814),u=a(5431),P=a(7680),Q=a(707),N=a(3259),R=a(3965);function E(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.compress())}),t._UZ(1,"i",12),t.qZA()}}function F(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.expand())}),t._UZ(1,"i",13),t.qZA()}}function M(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"span",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.print())}),t._UZ(1,"i",14),t.qZA()}}const K=function(i){return{"text-danger font-weight-bold":i}},G=function(i){return{"text-warning font-weight-bold":i}};function H(i,s){if(1&i&&(t.TgZ(0,"div",15)(1,"div",16)(2,"div",17)(3,"table",18)(4,"tr")(5,"th",19),t._uU(6,"Vulnerability Summary"),t.qZA()(),t.TgZ(7,"tr")(8,"td",20),t._uU(9,"Critical"),t.qZA(),t.TgZ(10,"td",21),t._uU(11),t.qZA()(),t.TgZ(12,"tr")(13,"td",22),t._uU(14,"High"),t.qZA(),t.TgZ(15,"td",21),t._uU(16),t.qZA()(),t.TgZ(17,"tr")(18,"td",22),t._uU(19,"Moderate"),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.qZA()(),t.TgZ(22,"tr")(23,"td",22),t._uU(24,"Info"),t.qZA(),t.TgZ(25,"td"),t._uU(26),t.qZA()(),t.TgZ(27,"tr")(28,"td",22),t._uU(29,"Low"),t.qZA(),t.TgZ(30,"td"),t._uU(31),t.qZA()(),t.TgZ(32,"tr")(33,"td",22),t._uU(34,"Total"),t.qZA(),t.TgZ(35,"td"),t._uU(36),t.qZA()()()(),t.TgZ(37,"div",17)(38,"table",18)(39,"tr")(40,"th",19),t._uU(41,"Dependency Summary"),t.qZA()(),t.TgZ(42,"tr")(43,"td",20),t._uU(44,"Prod"),t.qZA(),t.TgZ(45,"td"),t._uU(46),t.qZA()(),t.TgZ(47,"tr")(48,"td",22),t._uU(49,"Dev"),t.qZA(),t.TgZ(50,"td"),t._uU(51),t.qZA()(),t.TgZ(52,"tr")(53,"td",22),t._uU(54,"Optional"),t.qZA(),t.TgZ(55,"td"),t._uU(56),t.qZA()(),t.TgZ(57,"tr")(58,"td",22),t._uU(59,"Peer"),t.qZA(),t.TgZ(60,"td"),t._uU(61),t.qZA()(),t.TgZ(62,"tr")(63,"td",22),t._uU(64,"Peer Optional"),t.qZA(),t.TgZ(65,"td"),t._uU(66),t.qZA()(),t.TgZ(67,"tr")(68,"td",22),t._uU(69,"Total"),t.qZA(),t.TgZ(70,"td"),t._uU(71),t.qZA()()()()()()),2&i){const e=t.oxw();t.xp6(10),t.Q6J("ngClass",t.VKq(14,K,e.metadata.vulnerabilities.critical)),t.xp6(1),t.hij(" ",e.metadata.vulnerabilities.critical||""," "),t.xp6(4),t.Q6J("ngClass",t.VKq(16,G,e.metadata.vulnerabilities.high)),t.xp6(1),t.hij(" ",e.metadata.vulnerabilities.high||""," "),t.xp6(5),t.Oqu(e.metadata.vulnerabilities.moderate||""),t.xp6(5),t.Oqu(e.metadata.vulnerabilities.info||""),t.xp6(5),t.Oqu(e.metadata.vulnerabilities.low||""),t.xp6(5),t.Oqu(e.metadata.vulnerabilities.total||""),t.xp6(10),t.Oqu(e.metadata.dependencies.prod||""),t.xp6(5),t.Oqu(e.metadata.dependencies.dev||""),t.xp6(5),t.Oqu(e.metadata.dependencies.optional||""),t.xp6(5),t.Oqu(e.metadata.dependencies.peer||""),t.xp6(5),t.Oqu(e.metadata.dependencies.peerOptional||""),t.xp6(5),t.Oqu(e.metadata.dependencies.total||"")}}function B(i,s){1&i&&(t.TgZ(0,"tr"),t._UZ(1,"th",23)(2,"th",24),t.TgZ(3,"th",25),t._uU(4,"Direct"),t.qZA(),t.TgZ(5,"th",26),t._uU(6,"Severity"),t.qZA(),t.TgZ(7,"th",27),t._uU(8,"Version"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Package Name"),t.qZA(),t.TgZ(11,"th",27),t._uU(12,"Fix"),t.qZA()())}function $(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"button",33),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().$implicit;return t.KtG(n.expanded=!n.expanded)}),t.qZA()}if(2&i){const e=t.oxw().$implicit;t.Q6J("pRowToggler",e)("icon",e.expanded?"pi pi-chevron-down":"pi pi-chevron-right")}}function j(i,s){1&i&&t._UZ(0,"i",34)}function W(i,s){if(1&i&&(t.TgZ(0,"span")(1,"span",35),t._uU(2),t.qZA(),t.TgZ(3,"span"),t._uU(4," \u2192 "),t.qZA()()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("pTooltip",e.currentVersion+" = Current version"),t.xp6(1),t.Oqu(e.currentVersion)}}function X(i,s){if(1&i&&(t.TgZ(0,"span"),t.YNc(1,W,5,2,"span",32),t.TgZ(2,"span",35),t._uU(3),t.qZA()()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.currentVersion),t.xp6(1),t.Q6J("pTooltip",e.fixAvailable.version+" = Update to version"),t.xp6(1),t.Oqu(e.fixAvailable.version)}}function k(i,s){if(1&i&&(t.TgZ(0,"a",47),t._UZ(1,"i",48),t.qZA()),2&i){const e=t.oxw().$implicit;t.Q6J("href",e.url,t.LSH)}}const z=function(){return[]};function tt(i,s){if(1&i&&(t.TgZ(0,"tr")(1,"th",45),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td",30),t.YNc(12,k,2,1,"a",46),t.qZA()()),2&i){const e=s.$implicit,l=s.index;t.xp6(2),t.Oqu(l+1),t.xp6(2),t.Oqu(e.severity),t.xp6(2),t.Oqu(e.range),t.xp6(2),t.Oqu((e.cwe||t.DdM(6,z)).join(",")),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.url)}}function et(i,s){if(1&i&&(t.TgZ(0,"tr")(1,"td",36)(2,"table",37)(3,"thead")(4,"tr",38)(5,"th",39),t._uU(6,"#"),t.qZA(),t.TgZ(7,"th",40),t._uU(8,"Severity"),t.qZA(),t.TgZ(9,"th",41),t._uU(10,"Range"),t.qZA(),t.TgZ(11,"th",41),t._uU(12,"CWE"),t.qZA(),t.TgZ(13,"th",42),t._uU(14,"Title"),t.qZA(),t._UZ(15,"th",43),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,tt,13,7,"tr",44),t.qZA()()()()),2&i){const e=t.oxw().$implicit;t.xp6(17),t.Q6J("ngForOf",e.via)}}function it(i,s){if(1&i&&(t.TgZ(0,"tr",28)(1,"td"),t.YNc(2,$,1,2,"button",29),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",30),t.YNc(6,j,1,0,"i",31),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td"),t.YNc(14,X,4,3,"span",32),t.qZA()(),t.YNc(15,et,18,1,"tr",32)),2&i){const e=s.$implicit,l=s.rowIndex;t.Q6J("pSelectableRow",e),t.xp6(2),t.Q6J("ngIf",null==e.via?null:e.via.length),t.xp6(2),t.Oqu(l+1),t.xp6(2),t.Q6J("ngIf",e.isDirect),t.xp6(2),t.Oqu(e.severity),t.xp6(2),t.Oqu(e.range),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Q6J("ngIf",e.fixAvailable),t.xp6(1),t.Q6J("ngIf",e.expanded)}}function nt(i,s){1&i&&t._UZ(0,"p-progressSpinner",49)}let x=(()=>{class i{generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;dataProviderService;cd;showCheckbox=!1;loading={grid:!1};subscriptions=[];data={mode:w.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];metadata;rowsMap={};showAll=!1;EUserType=S.d;gridKey=v.iH._id;EAPICategory=q.R;selectedRows=[];vulnerabilityCategories;model={vulnerabilitiesType:null};constructor(e,l,n,o,p,st,rt,ot,pt,dt,ct,ut,gt,mt){this.generalS=e,this.notificationS=l,this.navigationCS=n,this.authCS=o,this.constantsS=p,this.eventCenterS=st,this.router=rt,this.userS=ot,this.instanceS=pt,this.ns=dt,this.cs=ct,this.confirmationService=ut,this.dataProviderService=gt,this.cd=mt}ngOnInit(){var e=this;return(0,r.Z)(function*(){e.vulnerabilityCategories=e.dataProviderService.getVulnerabilityCategories(),e.model.vulnerabilitiesType=e.vulnerabilityCategories[0],e.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var l=(0,r.Z)(function*(n){(n.action===Z.F.SAVED||n.action===Z.F.UPDATED)&&(yield e.loadGridData())});return function(n){return l.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Vulnerabilities Report")})()}typeChanged(){var e=this;return(0,r.Z)(function*(){yield e.loadGridData()})()}loadGridData(){var e=this;return(0,r.Z)(function*(){e.loading.grid=!0;try{const l=yield e.instanceS.getVulnerabilities({type:e.model.vulnerabilitiesType.name});if(l){e.selectedRows=[];const n=l.data;e.rows=n.list||[];for(const o of e.rows)o._id=e.generalS.getRandomString(8);e.metadata=n.metadata,e.rowsMap=U.keyBy(e.rows,v.iH._id)}}catch(l){e.ns.showErrorFromResponse(l.error||l,"Unable to load vulnerabilities.")}e.loading.grid=!1,e.cd.detectChanges()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0)}resetThisUrl(){var e=this;return(0,r.Z)(function*(){e.eventCenterS.vulnerabilities.selectedVulnerability.next(void 0),yield e.navigationCS.setQueryParam(d.p.am_vulnerability,null)})()}itemSelected(){var e=this;return(0,r.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,r.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(d.p.am_vulnerability,""),void e.eventCenterS.vulnerabilities.selectedVulnerability.next(null);const l=e.selectedRows[0];l?(yield e.navigationCS.setQueryParam(d.p.am_vulnerability,l._id),e.eventCenterS.vulnerabilities.selectedVulnerability.next(l)):yield e.resetThisUrl()})()}print(){window.print()}expand(){for(const e of this.rows)e.via?.length&&(e.expanded=!0)}compress(){for(const e of this.rows)e.via?.length&&(e.expanded=!1)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(l){return new(l||i)(t.Y36(V.b),t.Y36(h.W),t.Y36(I.S),t.Y36(O.D),t.Y36(T.L),t.Y36(L.u),t.Y36(m.F0),t.Y36(J.K),t.Y36(Y.E),t.Y36(h.W),t.Y36(T.L),t.Y36(y.YP),t.Y36(D.B),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:i,selectors:[["app-vulnerability-list"]],inputs:{showCheckbox:"showCheckbox"},decls:16,vars:14,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/vulnerability.svg","alt","Vulnerabilities",1,"fa-fw","mr-1"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","p-input-filled width-300 p-input-small-dropdown ml-4",3,"options","ngModel","filter","onChange"],["class","float-right cursor-pointer ml-3 d-print-none",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","p-2",4,"ngIf"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 336px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"float-right","cursor-pointer","ml-3","d-print-none",3,"click"],["pTooltip","Collapse all rows","tooltipPosition","left",1,"fas","fa-compress-alt","fa-fw"],["pTooltip","Expand all rows","tooltipPosition","left",1,"fas","fa-expand-alt","fa-fw"],["pTooltip","Print report","tooltipPosition","left",1,"fas","fa-print","fa-fw"],[1,"p-2"],[1,"row"],[1,"col-6"],[1,"table","table-bordered","table-sm","mb-0"],["colspan","2",1,"text-center","bg-dark"],[1,"text-right",2,"width","50%"],[3,"ngClass"],[1,"text-right"],[2,"width","45px"],[2,"width","55px"],[2,"width","70px"],[2,"width","90px"],[2,"width","170px"],[3,"pSelectableRow"],["type","button","pButton","","pRipple","","class","p-button-text p-button-rounded p-button-plain mr-2",3,"pRowToggler","icon","click",4,"ngIf"],[1,"text-center"],["pTooltip","Direct dependency","class","far fa-solid fa-dot-circle fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[4,"ngIf"],["type","button","pButton","","pRipple","",1,"p-button-text","p-button-rounded","p-button-plain","mr-2",3,"pRowToggler","icon","click"],["pTooltip","Direct dependency",1,"far","fa-solid","fa-dot-circle","fa-fw","align-middle","text-success","text-v-small","pr-1"],["tooltipPosition","left",3,"pTooltip"],["colspan","7",1,"pl-5"],[1,"table","table-bordered","table-hover","table-sm"],[1,"bg-dark"],["scope","col",1,"text-center",2,"width","50px"],["scope","col",2,"width","90px"],["scope","col",2,"width","170px"],["scope","col"],["scope","col",2,"width","70px"],[4,"ngFor","ngForOf"],["scope","row",1,"text-center","px-0"],["class","btn btn-xsm-custom d-print-none","target","_blank","pTooltip","View details","tooltipPosition","left",3,"href",4,"ngIf"],["target","_blank","pTooltip","View details","tooltipPosition","left",1,"btn","btn-xsm-custom","d-print-none",3,"href"],[1,"fas","fa-external-link-alt","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(l,n){1&l&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Vulnerabilities"),t.qZA(),t.TgZ(5,"span")(6,"p-dropdown",3),t.NdJ("onChange",function(p){return n.model.vulnerabilitiesType=p.value,n.typeChanged()}),t.qZA()(),t.YNc(7,E,2,0,"span",4),t.YNc(8,F,2,0,"span",4),t.YNc(9,M,2,0,"span",4),t.qZA(),t.TgZ(10,"div",5),t.YNc(11,H,72,18,"div",6),t.TgZ(12,"p-table",7),t.NdJ("selectionChange",function(p){return n.selectedRows=p})("selectionChange",function(){return n.itemSelected()}),t.YNc(13,B,13,0,"ng-template",8),t.YNc(14,it,16,9,"ng-template",9),t.qZA(),t.YNc(15,nt,1,0,"p-progressSpinner",10),t.qZA()()),2&l&&(t.xp6(6),t.Q6J("options",n.vulnerabilityCategories)("ngModel",n.model.vulnerabilitiesType)("filter",!0),t.xp6(1),t.Q6J("ngIf",n.rows.length),t.xp6(1),t.Q6J("ngIf",n.rows.length),t.xp6(1),t.Q6J("ngIf",n.rows.length),t.xp6(2),t.Q6J("ngIf",null==n.metadata||null==n.metadata.vulnerabilities?null:n.metadata.vulnerabilities.total),t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),t.xp6(3),t.Q6J("ngIf",n.loading.grid))},dependencies:[b.JJ,b.On,c.mk,c.sg,c.O5,u.iA,y.jx,u.Ei,u.jB,P.G,Q.Hq,N.u,R.Lt,f.H],encapsulation:2,changeDetection:0})}return i})();const at=[{path:"layout",component:(()=>{class i{constructor(){}ngOnInit(){}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=t.Xpm({type:i,selectors:[["app-vulnerability-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(l,n){1&l&&(t.TgZ(0,"div",0),t._UZ(1,"app-vulnerability-list"),t.qZA())},dependencies:[x],encapsulation:2})}return i})(),canActivate:[A.P]}];let lt=(()=>{class i{static \u0275fac=function(l){return new(l||i)};static \u0275mod=t.oAB({type:i});static \u0275inj=t.cJS({imports:[m.Bz.forChild(at),C.u,f.T]})}return i})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1928],{1928:(gt,d,o)=>{o.r(d),o.d(d,{TpApiM:()=>it});var h=o(7664),T=o(7017),A=o(3726),t=o(4946),c=o(5219),I=o(5043),C=o(8651),r=o(5861),x=o(7672),l=o(1162),E=o(553),m=o(5085),_=o(9394),y=o(1601),P=o(8883),O=o(5561),g=o(9961),M=o(5852),Z=o(2915),N=o(2304),F=o(3429),G=o(7414),D=o(7240),B=o(1252),Y=o(2559),J=o(6814),H=o(756),U=o(7680),f=o(4844),b=o(3259),R=o(5025);const L=["monacoEditorModalC"];function V(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"span",12),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.save())}),t._UZ(1,"i",13),t.qZA()}}function Q(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"span",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.removePermanentDialog())}),t._UZ(1,"i",15),t.qZA()}}function w(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"a",16),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.viewError())}),t._uU(1,"View error"),t.qZA()}}function K(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div")(1,"div",24)(2,"app-monaco-editor",27),t.NdJ("editorGenerated",function(n){t.CHM(e);const s=t.oxw(2);return t.KtG(s.editorGeneratedBasicInfo(n))}),t.qZA()()()}if(2&a){const e=t.oxw(2);t.xp6(2),t.Q6J("isSchemaEditor",!0)("editorOptions",e.editorOptionsBasicInfo)}}function j(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div",28)(1,"button",29),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.save())}),t._UZ(2,"i",30),t._uU(3," Add Third Party API Settings "),t.qZA()()}}function z(a,p){1&a&&t._UZ(0,"p-progressSpinner",31)}function W(a,p){if(1&a){const e=t.EpF();t.TgZ(0,"div",17)(1,"div",18)(2,"p-tabView",19),t.NdJ("activeIndexChange",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.activeIndex=n)})("activeIndexChange",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.tabSelected())}),t.TgZ(3,"p-tabPanel",20),t.YNc(4,K,3,2,"div",21),t.qZA(),t.TgZ(5,"p-tabPanel",22),t.YNc(6,j,4,0,"div",23),t.TgZ(7,"div",24)(8,"app-monaco-editor",25),t.NdJ("editorGenerated",function(n){t.CHM(e);const s=t.oxw();return t.KtG(s.editorGenerated(n))}),t.qZA()()()()(),t.YNc(9,z,1,0,"p-progressSpinner",26),t.qZA()}if(2&a){const e=t.oxw();t.xp6(2),t.Q6J("activeIndex",e.activeIndex),t.xp6(2),t.Q6J("ngIf",null==e.data.selectedTreeItem?null:e.data.selectedTreeItem.apiName),t.xp6(2),t.Q6J("ngIf",!e.tpApiSetting._id),t.xp6(2),t.Q6J("hidden",!e.tpApiSetting._id)("isSchemaEditor",!0)("editorOptions",e.editorOptionsTpApiSetting),t.xp6(1),t.Q6J("ngIf",e.loading.form)}}let S=(()=>{class a{groupS;navigationS;ns;authCS;eventCenterS;monacoS;instanceS;constantsS;generalCS;tpApiSettingsS;tpInstalledApisS;notificationS;confirmationService;cd;loading={form:!1};subscriptions=[];data={};EAPIAccessType=x.di;editorTpApiSettingCode;editorOptionsTpApiSetting={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};monacoDecorations=[];tab;BE_HOST_PORT=E.N.BE_HOST_PORT;tpApiSetting={};saveMode;editorTpApiSettingBasicInfo;editorOptionsBasicInfo={readOnly:!1,language:"typescript",contextmenu:!0};tpInstallApi={};selectedTabTitle="Basic Info";treeItemApiId;activeIndex=0;viewDockerfileModelC;constructor(e,i,n,s,nt,ot,at,st,rt,pt,dt,ct,lt,mt){this.groupS=e,this.navigationS=i,this.ns=n,this.authCS=s,this.eventCenterS=nt,this.monacoS=ot,this.instanceS=at,this.constantsS=st,this.generalCS=rt,this.tpApiSettingsS=pt,this.tpInstalledApisS=dt,this.notificationS=ct,this.confirmationService=lt,this.cd=mt}ngOnInit(){this.monacoS.loadSchemaEditorSettings(this.BE_HOST_PORT,this.authCS.getUserId(),null).then(),this.subscriptions.push(this.eventCenterS.tpApiSettings.apiSelected.subscribe(e=>{e&&(this.saveMode=e.apiName?"TABLE":"COLLECTION",this.setDataInForm(this.data.selectedTreeItem=e),this.cd.detectChanges())}))}editorGenerated(e){var i=this;return(0,r.Z)(function*(){i.editorTpApiSettingCode=e,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(e,n=>{i.tpApiSetting._id&&i.save()})})()}setDataInForm(e){var i=this;return(0,r.Z)(function*(){i.loading.form=!0,i.lastError=void 0;const n=i.authCS.getUserId();if(i.tpApiSetting=(yield i.tpApiSettingsS.getApiSettings(n,e.bundleName,e.apiVersion,e.apiName))||{},e.apiName){i.treeItemApiId=e._id;const s=`${e.guid}:${i.authCS.gUser._id}`;i.tpInstallApi=(yield i.tpInstalledApisS.getById(s).toPromise()).data,i.cd.detectChanges()}i.setDataInFormCommonCode(),i.loading.form=!1})()}setDataInFormCommonCode(){var e=this;return(0,r.Z)(function*(){if(e.tpApiSetting._id)e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",e.tpApiSetting.thirdPartyApiSettingsCode);else if(!e.tpApiSetting._id)if("COLLECTION"===e.saveMode){const i=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,m.R.THIRD_PARTY_API_VERSION_SETTINGS_JSON).toPromise();e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",i.data)}else if("TABLE"===e.saveMode){const i=yield e.instanceS.getDefaultContent(e.BE_HOST_PORT,m.R.THIRD_PARTY_API_SETTINGS_JSON).toPromise();e.generalCS.setValueInEditor(e,"editorTpApiSettingCode",i.data)}e.tpInstallApi?.apiJsonStr&&e.generalCS.setValueInEditor(e,"editorTpApiSettingBasicInfo",e.tpInstallApi?.apiJsonStr),e.cd.detectChanges()})()}save(){var e=this;return(0,r.Z)(function*(){if("Basic Info"===e.selectedTabTitle)try{const i={};i.apiJsonStr=e.editorTpApiSettingBasicInfo.getValue(),yield e.tpInstalledApisS.put(e.treeItemApiId,i,{select:l.iH._id}).toPromise(),e.notificationS.showSuccess("Basic Info saved successfully."),e.eventCenterS.filterInLog.refreshGrid.next(Math.random())}catch(i){e.notificationS.showErrorMessageFromErrorObject(i)}else{let i={};const n=e.eventCenterS.tpApiSettings.apiSelected.value;if(!n||!n.bundleName||!n.apiVersion)return;i.bundleName=n.bundleName,i.apiVersion=n.apiVersion,i.apiName=n.apiName||_.pj.__THIRD_PARTY_API_SETTINGS__,i.user=e.authCS.getUserId(),i.thirdPartyApiSettingsCode=e.editorTpApiSettingCode.getValue(),i=Object.assign({},e.tpApiSetting||{},i);try{let s;e.loading.form=!0,e.lastError=void 0,e.monacoS.clearEditorDecorations(e.editorTpApiSettingCode,e.monacoDecorations),e.tpApiSetting._id?e.tpApiSetting._id&&(s=yield e.tpApiSettingsS.replace(e.tpApiSetting._id,i,{select:l.iH._id}).toPromise()):(s=yield e.tpApiSettingsS.post(i).toPromise(),e.tpApiSetting=s.data),e.ns.showSuccess(e.constantsS.tpApiSettings.addOrUpdateSuccess),e.eventCenterS.filterInLog.refreshGrid.next(Math.random()),e.loading.form=!1}catch(s){e.loading.form=!1,e.ns.showErrorFromResponse(s.error||s,"Unable to save third party API."),e.lastError=s.error,e.tab=e.tab||{},e.tab.axiosResponse={data:s.error},e.monacoS.highlightErrorInMonacoEditor(e.editorTpApiSettingCode,e.tab,"MainSandbox.ts",e.monacoDecorations)}}})()}removePermanentDialog(){var e=this;return(0,r.Z)(function*(){var i;e.confirmationService.confirm({message:e.constantsS.tpApiSettings.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield e.removePermanent()}),function(){return i.apply(this,arguments)})})})()}removePermanent(){var e=this;return(0,r.Z)(function*(){e.loading.form=!0;const i=yield e.tpApiSettingsS.permanentDelete(e.tpApiSetting._id).toPromise();e.loading.form=!1,i?(e.ns.showSuccess(e.constantsS.tpApiSettings.removePermanent),e.tpApiSetting={},e.cd.detectChanges(),e.eventCenterS.filterInLog.refreshGrid.next(Math.random())):e.ns.showErrorFromResponse(i,e.constantsS.tpApiSettings.removePermanentError)})()}viewError(){this.viewDockerfileModelC.showModal(this.generalCS.stringify(this.lastError),y.d.json)}tabSelected(){0===this.activeIndex?this.selectedTabTitle="Basic Info":1===this.activeIndex&&(this.selectedTabTitle="API Settings")}editorGeneratedBasicInfo(e){var i=this;return(0,r.Z)(function*(){i.editorTpApiSettingBasicInfo=e,i.monacoS.addSaveCodeKeyBinding(e,n=>{"Basic Info"===i.selectedTabTitle&&i.save()})})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(t.Y36(P.e),t.Y36(O.X),t.Y36(g.W),t.Y36(M.D),t.Y36(Z.u),t.Y36(N.b),t.Y36(F.E),t.Y36(G.L),t.Y36(D.b),t.Y36(B.G),t.Y36(Y.d),t.Y36(g.W),t.Y36(c.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-w-tp-api-form"]],viewQuery:function(i,n){if(1&i&&t.Gf(L,5),2&i){let s;t.iGM(s=t.CRH())&&(n.viewDockerfileModelC=s.first)}},decls:14,vars:7,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-cog","fa-fw","text-danger","mr-1"],["href","https://docs.apimaker.dev/v1/docs/settings/thirdPartyApiSettings.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","pTooltip","Save",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Delete API Settings",3,"click",4,"ngIf"],["href","javascript:;","class","text-danger float-right",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","position-relative border-top h-100",4,"ngIf"],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],["pTooltip","Save",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-save","fa-fw","text-success"],["pTooltip","Delete API Settings",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["href","javascript:;",1,"text-danger","float-right",3,"click"],[1,"position-relative","border-top","h-100"],[1,"modal-body","overflow-auto"],[3,"activeIndex","activeIndexChange"],["header","Basic Info"],[4,"ngIf"],["header","API Settings"],["class","p-1 text-center",4,"ngIf"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 124px)"],[3,"hidden","isSchemaEditor","editorOptions","editorGenerated"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[1,"p-1","text-center"],["type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-plus","text-success","fa-fw","align-middle","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Third Party API Settings"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,V,2,0,"span",5),t.YNc(8,Q,2,0,"span",6),t.YNc(9,w,2,0,"a",7),t.qZA(),t.TgZ(10,"div",8),t.YNc(11,W,10,7,"div",9),t.qZA()(),t._UZ(12,"app-monaco-editor-modal",10,11)),2&i&&(t.xp6(7),t.Q6J("ngIf",n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion&&(null==n.data.selectedTreeItem?null:n.data.selectedTreeItem.apiName)),t.xp6(1),t.Q6J("ngIf","API Settings"===n.selectedTabTitle&&n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion&&n.tpApiSetting._id),t.xp6(1),t.Q6J("ngIf",n.lastError),t.xp6(2),t.Q6J("ngIf",n.data.selectedTreeItem&&n.data.selectedTreeItem.bundleName&&n.data.selectedTreeItem.apiVersion),t.xp6(1),t.Q6J("modalId","idMonacoEditorModalInTpAPISettings")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[J.O5,H.O,U.G,f.xf,f.x4,b.u,R.A],encapsulation:2})}return a})();function X(a,p){1&a&&t._UZ(0,"app-w-supported-tp-api",3),2&a&&t.Q6J("IsDependentOnGroup",!1)("isLPM",!1)}function $(a,p){1&a&&t._UZ(0,"app-w-tp-api-form",4)}const u=function(){return[40,60]};let v=(()=>{class a{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=t.Xpm({type:a,selectors:[["app-tp-api-layout"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100",3,"IsDependentOnGroup","isLPM"],[1,"w-100"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,X,1,2,"ng-template",2),t.YNc(3,$,1,0,"ng-template",2),t.qZA()()),2&i&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,u))("minSizes",t.DdM(3,u)))},dependencies:[c.jx,I.q,C.A,S],encapsulation:2})}return a})();var k=o(6401),q=o(7705),tt=o(4950);const et=[{path:"tp-layout",component:v,canActivate:[A.P]}];let it=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=t.oAB({type:a});static \u0275inj=t.cJS({imports:[h.Bz.forChild(et),T.u,k.GroupM,q.L,tt.A]})}return a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1957],{1957:(y,i,e)=>{e.r(i),e.d(i,{NotesM:()=>m});var d=e(7664),p=e(7017),l=e(3726),t=e(4946),h=e(553),C=e(5405),v=e(6750),f=e(621);const u=["notesGridId"];const g=[{path:"main",component:(()=>{class n{eventCenterCS;detectChanges=new t.vpe;notesListC;loading={form:!1,response:!1};BE_HOST_PORT=h.N.BE_HOST_PORT;constructor(a){this.eventCenterCS=a}ngOnInit(){this.eventCenterCS.hideShowNotesIcon=!0}ngOnDestroy(){this.eventCenterCS.hideShowNotesIcon=!1}static \u0275fac=function(o){return new(o||n)(t.Y36(C.M))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-notes-layout"]],viewQuery:function(o,s){if(1&o&&t.Gf(u,7),2&o){let r;t.iGM(r=t.CRH())&&(s.notesListC=r.first)}},inputs:{detectChanges:"detectChanges"},decls:7,vars:10,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"],[1,"row","m-0",2,"height","calc(100vh - 52px)"],[1,"col-3","p-0"],[1,"w-100",3,"projectType","hostAndPort"],["notesGridId",""],[1,"col-9","p-0"],[1,"w-100",3,"data","loading","projectType","hostAndPort","isPageHeight","detectChanges"]],template:function(o,s){1&o&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"app-notes-list",3,4),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"app-notes-form",6),t.qZA()()()),2&o&&(t.xp6(3),t.Q6J("projectType","AM")("hostAndPort",s.BE_HOST_PORT),t.xp6(2),t.Udp("display",s.eventCenterCS.addEditNotes?"block":"none"),t.xp6(1),t.Q6J("data",s.notesListC.data)("loading",s.loading)("projectType","AM")("hostAndPort",s.BE_HOST_PORT)("isPageHeight",!0)("detectChanges",s.detectChanges))},dependencies:[v.o,f.X],encapsulation:2})}return n})(),canActivate:[l.P]}];let m=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[d.Bz.forChild(g),p.u]})}return n})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2140],{2140:(l,i,n)=>{n.r(i),n.d(i,{MonitoringM:()=>m});var r=n(7664),s=n(7017),e=n(3726),o=n(4946);const u=[{path:"main",component:(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=o.Xpm({type:t,selectors:[["app-monitoring-c"]],decls:2,vars:0,template:function(a,f){1&a&&(o.TgZ(0,"h1"),o._uU(1,"Monitoring"),o.qZA())},encapsulation:2})}return t})(),canActivate:[e.P]}];let m=(()=>{class t{static \u0275fac=function(a){return new(a||t)};static \u0275mod=o.oAB({type:t});static \u0275inj=o.cJS({imports:[r.Bz.forChild(u),s.u]})}return t})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2295],{2295:(ne,g,n)=>{n.r(g),n.d(g,{DevAccM:()=>se});var D=n(7664),P=n(7017),e=n(4946),c=n(5861),d=n(3157),m=n(328),f=n(6212),x=n(6990),C=n(921),u=n(1162),U=n(3835),Z=n(7240),_=n(9961),M=n(2189),y=n(204),S=n(5852),N=n(2915),T=n(5219),w=n(6814),A=n(5431),b=n(7680),Y=n(3259),i=n(95),O=n(553),R=n(2660);function k(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Add Developer User"),e.qZA())}function J(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," View Developer User"),e.qZA())}function Q(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," Edit Developer User"),e.qZA())}function V(o,l){1&o&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",27),e.qZA()())}function G(o,l){1&o&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function q(o,l){1&o&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function W(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.save())}),e._UZ(1,"i",29),e.YNc(2,G,2,0,"span",4),e.YNc(3,q,2,0,"span",4),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function K(o,l){1&o&&e._UZ(0,"p-progressSpinner",30)}let F=(()=>{class o{fb;ns;userS;generalS;constantsCS;authCS;cd;data;loading={form:!1};EFormMode=m.D;form;subscriptions=[];constructor(t,a,s,r,p,h,v){this.fb=t,this.ns=a,this.userS=s,this.generalS=r,this.constantsCS=p,this.authCS=h,this.cd=v}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,c.Z)(function*(s){if(s){if(t.form.enable(),s.action===d.F.OPEN_FORM_IN_EDIT_MODE){const r=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(r.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(s.action===d.F.OPEN_FORM_IN_VIEW_MODE){const r=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(r.data),t.form.disable()}else s.action===d.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("password").setValidators([i.kI.required,i.kI.minLength(4),i.kI.maxLength(40)]),t.form.get("password").updateValueAndValidity());t.cd.detectChanges()}});return function(s){return a.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[i.kI.required]],email:[null,[i.kI.required,i.kI.email]],apiPath:[null,[i.kI.required,i.kI.minLength(3),i.kI.maxLength(45),i.kI.pattern("[a-zA-Z0-9_]*$")]],password:[null,[]]})}showModal(){$("#idAMDevUsersForm").modal("show")}hideModal(){$("#idAMDevUsersForm").modal("hide")}save(){var t=this;return(0,c.Z)(function*(){const a=t.form.getRawValue();a.user=t.authCS.getUserId(),a.userType=C.d.DEVELOPER,a.password=t.generalS.getEncryptedString(a.password,O.N.crypto.passCommunication);try{let s;t.loading.form=!0,t.data.mode===m.D.ADD?s=yield t.userS.post(a).toPromise():t.data.mode===m.D.EDIT&&(t.data.formData._id&&(t.form.get("password").value||delete a.password),s=yield t.userS.put(t.data.formData._id,a,{select:u.iH._id}).toPromise()),t.ns.showSuccess(t.data.mode===m.D.ADD?t.constantsCS.user.addSuccess:t.constantsCS.user.editSuccess),t.data.eventChannel.emit({action:t.data.mode===m.D.ADD?d.F.SAVED:d.F.UPDATED}),t.loading.form=!1}catch(s){t.loading.form=!1,t.ns.showErrorFromResponse(s.error||s,"Unable to save dev user.")}t.cd.detectChanges()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||o)(e.Y36(i.qu),e.Y36(_.W),e.Y36(U.K),e.Y36(Z.b),e.Y36(y.s),e.Y36(S.D),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-w-dev-user-form"]],inputs:{data:"data"},decls:39,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMDevUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],[1,"form-group","row",2,"margin-bottom","0 !important"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide API path",1,"form-control","text-lowercase","form-control-sm"],[1,"col-form-label","col-form-label-sm","text-info","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,k,3,0,"span",4),e.YNc(5,J,3,0,"span",4),e.YNc(6,Q,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.YNc(22,V,5,0,"div",15),e.TgZ(23,"div",16)(24,"label",11),e._uU(25,"API Path"),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",17),e.qZA()(),e.TgZ(28,"div",10),e._UZ(29,"label",11),e.TgZ(30,"div",12)(31,"label",18),e._uU(32,"[a-z,_] (Ex: user_path)"),e.qZA()()()()(),e.TgZ(33,"div",19)(34,"button",20),e._UZ(35,"i",21),e._uU(36," Close"),e.qZA(),e.YNc(37,W,4,3,"button",22),e.qZA(),e.YNc(38,K,1,0,"p-progressSpinner",23),e.qZA()()()),2&a&&(e.xp6(4),e.Q6J("ngIf",s.data.mode===s.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",s.form),e.xp6(11),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW),e.xp6(15),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.loading.form))},dependencies:[i._Y,i.Fj,i.JJ,i.JL,i.sg,i.u,w.O5,R.y,b.G],encapsulation:2,changeDetection:0})}return o})();const L=["devUserFormC"];function H(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.edit())}),e._UZ(1,"i",17),e.qZA()}}function B(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.removePermanentDialog())}),e._UZ(1,"i",19),e.qZA()}}function z(o,l){1&o&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Email"),e.qZA()())}function j(o,l){if(1&o&&(e.TgZ(0,"tr",20)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA()()),2&o){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.email)}}function X(o,l){1&o&&e._UZ(0,"p-progressSpinner",21)}let E=(()=>{class o{userS;generalS;notificationS;navigationCS;constantsCS;authCS;eventCenterS;confirmationService;router;loading={grid:!1};subscriptions=[];data={mode:m.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=u.iH._id;devUserFormC;constructor(t,a,s,r,p,h,v,ae,oe){this.userS=t,this.generalS=a,this.notificationS=s,this.navigationCS=r,this.constantsCS=p,this.authCS=h,this.eventCenterS=v,this.confirmationService=ae,this.router=oe}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===d.F.SAVED||t.action===d.F.UPDATED)&&(this.devUserFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - Developer Users")}loadGridData(){var t=this;this.loading.grid=!0;const a={find:{active:!0,userType:C.d.DEVELOPER,user:this.authCS.getUserId()},select:{name:1,email:1,apiPath:1,active:1,userType:1},sort:{name:1}};this.showAll&&delete a.find.active,this.subscriptions.push(this.userS.query(a).subscribe(function(){var s=(0,c.Z)(function*(r){r.success&&(t.selectedRows=[],t.rows=r.data,t.rowsMap=x.keyBy(t.rows,u.iH._id));const p=t.navigationCS.getQueryParam(f.p.user);t.rowsMap[p]&&(t.eventCenterS.user.selectedUsers.next([t.rowsMap[p]]),yield t.fillData()),t.loading.grid=!1});return function(r){return s.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=m.D.ADD,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_ADD_MODE}),this.devUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=m.D.VIEW,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_VIEW_MODE}),this.devUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=m.D.EDIT,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_EDIT_MODE}),this.devUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,c.Z)(function*(){var a;t.confirmationService.confirm({message:t.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,c.Z)(function*(){yield t.removePermanent()}),function(){return a.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,c.Z)(function*(){t.loading.grid=!0;const a=yield t.userS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,a.success?(t.notificationS.showSuccess(t.constantsCS.user.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(a,t.constantsCS.user.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.user.selectedUsers.next([])}resetDependents(){var t=this;return(0,c.Z)(function*(){t.eventCenterS.user.selectedUsers.next([]),yield t.navigationCS.setQueryParam(f.p.user,null)})()}devUserSelected(){var t=this;return(0,c.Z)(function*(){t.resetDependents().then(),t.fillData().then()})()}fillData(){var t=this;return(0,c.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(f.p.user,""),void t.eventCenterS.user.selectedUsers.next([]);const a=(yield t.userS.getById(t.selectedRows[0]._id).toPromise()).data;a._id?(yield t.navigationCS.setQueryParam(f.p.user,a._id),t.eventCenterS.user.selectedUsers.next([a])):t.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickDevUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(a){return new(a||o)(e.Y36(U.K),e.Y36(Z.b),e.Y36(_.W),e.Y36(M.S),e.Y36(y.s),e.Y36(S.D),e.Y36(N.u),e.Y36(T.YP),e.Y36(D.F0))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-w-dev-users"]],viewQuery:function(a,s){if(1&a&&e.Gf(L,5),2&a){let r;e.iGM(r=e.CRH())&&(s.devUserFormC=r.first)}},decls:18,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/dev.svg","alt","Dev Accounts",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/dev-accounts/dev-accounts.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["devUserFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Developer Users"),e.qZA(),e.TgZ(5,"a",3),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return s.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,H,2,0,"span",7),e.YNc(10,B,2,0,"span",8),e.qZA(),e.TgZ(11,"div",9)(12,"p-table",10),e.NdJ("selectionChange",function(p){return s.selectedRows=p})("selectionChange",function(){return s.devUserSelected()})("dblclick",function(){return s.dblClickDevUsers()}),e.YNc(13,z,5,0,"ng-template",11),e.YNc(14,j,5,3,"ng-template",12),e.qZA(),e.YNc(15,X,1,0,"p-progressSpinner",13),e.qZA()(),e._UZ(16,"app-w-dev-user-form",14,15)),2&a&&(e.xp6(9),e.Q6J("ngIf",s.selectedRows.length),e.xp6(1),e.Q6J("ngIf",s.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",s.selectedRows)("dataKey",s.gridKey)("scrollable",!0)("value",s.rows),e.xp6(3),e.Q6J("ngIf",s.loading.grid),e.xp6(1),e.Q6J("data",s.data))},dependencies:[w.O5,A.iA,T.jx,A.Ei,b.G,Y.u,F],encapsulation:2})}return o})();const te=[{path:"",component:(()=>{class o{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=e.Xpm({type:o,selectors:[["app-dev-acc-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0),e._UZ(1,"app-w-dev-users"),e.qZA())},dependencies:[E],encapsulation:2})}return o})(),canActivate:[n(3726).P]}];let se=(()=>{class o{static \u0275fac=function(a){return new(a||o)};static \u0275mod=e.oAB({type:o});static \u0275inj=e.cJS({imports:[D.Bz.forChild(te),P.u]})}return o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[238],{238:(Z,d,a)=>{a.r(d),a.d(d,{CodeComparatorModelM:()=>y});var c=a(7664),m=a(7017),i=a(5861),t=a(4946),p=a(6814),l=a(756),f=a(7680);const u=["editorSchemaNative"];function C(e,A){1&e&&t._UZ(0,"p-progressSpinner",7)}const g=[{path:"",component:(()=>{class e{cd;loading={form:!1};editorOptionsAnalysis={readOnly:!1,language:"typescript",contextmenu:!1};rows=[];rowsMap={};editorSchemaNative;editorAnalysis;constructor(o){this.cd=o}ngOnInit(){var o=this;return(0,i.Z)(function*(){setTimeout((0,i.Z)(function*(){yield o.compareData()}),500)})()}compareData(){var o=this;return(0,i.Z)(function*(){o.loading.form=!0,o.editorSchemaNative.initDiffEditor("","","typescript",!0,!1),o.loading.form=!1,o.cd.detectChanges()})()}static \u0275fac=function(r){return new(r||e)(t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-code-comparator-model"]],viewQuery:function(r,n){if(1&r&&t.Gf(u,5),2&r){let s;t.iGM(s=t.CRH())&&(n.editorSchemaNative=s.first)}},decls:9,vars:2,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/comparator.svg","alt","Code Comparator",1,"fa-fw","mr-1"],[1,"full-body","p-0","overflow-hidden"],[3,"editorOptions","editorGenerated"],["editorSchemaNative",""],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,n){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Code Comparator"),t.qZA()(),t.TgZ(5,"div",3)(6,"app-monaco-editor",4,5),t.NdJ("editorGenerated",function(M){return n.editorAnalysis=M}),t.qZA(),t.YNc(8,C,1,0,"p-progressSpinner",6),t.qZA()()),2&r&&(t.xp6(6),t.Q6J("editorOptions",n.editorOptionsAnalysis),t.xp6(2),t.Q6J("ngIf",n.loading.form))},dependencies:[p.O5,l.O,f.G],encapsulation:2})}return e})(),canActivate:[a(3726).P]}];let y=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=t.oAB({type:e});static \u0275inj=t.cJS({imports:[c.Bz.forChild(g),m.u]})}return e})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2473],{2473:(De,P,n)=>{n.r(P),n.d(P,{ApiUserM:()=>Te});var Y=n(7664),G=n(7017),J=n(3726),e=n(4946),_=n(5219),k=n(5043),l=n(5861),p=n(3157),d=n(328),U=n(6212),S=n(6990),f=n(1162),C=n(5312),A=n(7240),Z=n(9961),O=n(2189),w=n(5852),y=n(7414),b=n(2915),T=n(6814),g=n(5431),x=n(7680),D=n(3259),m=n(95),Q=n(7672),F=n(553),L=n(9394),q=n(3429),V=n(115),K=n(2660),H=n(3965),W=n(8057);function B(r,i){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Add API User"),e.qZA())}function j(r,i){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," View API User"),e.qZA())}function z(r,i){1&r&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," Edit API User"),e.qZA())}function X(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"a",30),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.openSecret())}),e._UZ(1,"i",31),e._uU(2," Open Secret "),e.qZA()}}function ee(r,i){if(1&r&&(e.TgZ(0,"div")(1,"div",10)(2,"label",11),e._uU(3,"Password Path"),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"p-dropdown",27),e.qZA(),e.TgZ(6,"div",28),e.YNc(7,X,3,0,"a",29),e.qZA()()()),2&r){const t=e.oxw();e.xp6(5),e.Q6J("options",t.connectionStringSecrets)("filter",!0),e.xp6(2),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW)}}function te(r,i){1&r&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",32),e.qZA()())}function se(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Swagger Token"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",33),e.qZA(),e.TgZ(5,"div",34)(6,"button",35),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.generateRandomStringForSwaggerURLPart())}),e._UZ(7,"i",36),e.qZA()()()}}function ae(r,i){if(1&r&&(e.TgZ(0,"div",10),e._UZ(1,"label",11),e.TgZ(2,"div",12)(3,"a",37),e._uU(4,"View Swagger JSON"),e.qZA()()()),2&r){const t=e.oxw();e.xp6(3),e.cQ8("href","",t.environment.BE_HOST_PORT+t.EApiPaths.API+t.EApiPaths.SITES+t.EModelApiPaths.INSTANCE,"/",t.authCS.gUser.apiPath,"/get-swagger-docs/",t.form.getRawValue().swaggerURLRandomPart,"",e.LSH)}}function re(r,i){1&r&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function ne(r,i){1&r&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function ie(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.save())}),e._UZ(1,"i",39),e.YNc(2,re,2,0,"span",4),e.YNc(3,ne,2,0,"span",4),e.qZA()}if(2&r){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function oe(r,i){1&r&&e._UZ(0,"p-progressSpinner",40)}let I=(()=>{class r{fb;ns;apiUserS;generalS;instanceS;eventCenterS;secretS;constantsS;authCS;data;loading={form:!1};EFormMode=d.D;form;subscriptions=[];environment=F.N;connectionStringSecrets=[];constructor(t,a,s,o,c,u,h,v,xe){this.fb=t,this.ns=a,this.apiUserS=s,this.generalS=o,this.instanceS=c,this.eventCenterS=u,this.secretS=h,this.constantsS=v,this.authCS=xe}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,l.Z)(function*(s){if(s)if(t.form.enable(),yield t.loadConnectionStringFromSecret(),s.action===p.F.OPEN_FORM_IN_EDIT_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(s.action===p.F.OPEN_FORM_IN_VIEW_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.disable()}else s.action===p.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("enablePasswordPath").setValue(!0))});return function(s){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(function(){var a=(0,l.Z)(function*(s){s&&s.action===p.F.UPDATED&&(t.eventCenterS.headerC.secManFormC.hideModal(),yield t.loadConnectionStringFromSecret())});return function(s){return a.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[m.kI.required]],username:[null,[m.kI.required]],password:[null,[]],enablePasswordPath:[!1,[]],apiUserPasswordPath:[null,[]],swaggerURLRandomPart:[null,[]],enableSwaggerDocs:[!1,[]]})}showModal(){$("#idApiUsersForm").modal("show")}hideModal(){$("#idApiUsersForm").modal("hide")}openSecret(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.headerC.dataSecretForm.formData=yield t.getDefaultSecret(),t.eventCenterS.headerC.dataSecretForm.mode=d.D.EDIT,t.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),t.eventCenterS.headerC.secManFormC.showModal(),t.eventCenterS.headerC.secManFormC.zIndex=1051})()}loadConnectionStringFromSecret(){var t=this;return(0,l.Z)(function*(){try{const a=(yield t.instanceS.getConnectionStringSecret().toPromise())?.data;t.connectionStringSecrets=a}catch(a){t.ns.showErrorFromResponse(a.error||a,"Unable to load connection string.")}})()}getDefaultSecret(){var t=this;return(0,l.Z)(function*(){const a={find:{user:t.authCS.getUserId(),active:!0,isDefault:!0}};return(yield t.secretS.query(a).toPromise()).data?.[0]})()}save(){var t=this;return(0,l.Z)(function*(){const a=t.form.getRawValue();a.user=t.authCS.getUserId();try{let s;if(t.loading.form=!0,t.data.mode===d.D.ADD){if(!a.password&&!a.apiUserPasswordPath)return t.loading.form=!1,t.ns.showError(t.constantsS.apiUser.passwordError);t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.post(a).toPromise()}else t.data.mode===d.D.EDIT&&(a.password||delete a.password,t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.put(t.data.formData._id,a,{select:f.iH._id}).toPromise());t.ns.showSuccess(t.data.mode===d.D.ADD?t.constantsS.apiUser.addSuccess:t.constantsS.apiUser.editSuccess),t.data.eventChannel.emit({action:t.data.mode===d.D.ADD?p.F.SAVED:p.F.UPDATED}),t.loading.form=!1}catch(s){t.loading.form=!1,t.ns.showErrorFromResponse(s.error||s,"Unable to save user info.")}})()}processDataBeforeSaveOrUpdate(t){t.password&&(t.password=this.generalS.getEncryptedString(t.password,F.N.crypto.passCommunication))}generateRandomStringForSwaggerURLPart(){this.form.patchValue({swaggerURLRandomPart:this.generalS.getRandomStringWithCapitals(32)})}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EApiPaths=Q.k$;EModelApiPaths=L.k4;static \u0275fac=function(a){return new(a||r)(e.Y36(m.qu),e.Y36(Z.W),e.Y36(C.q),e.Y36(A.b),e.Y36(q.E),e.Y36(b.u),e.Y36(V.e),e.Y36(y.L),e.Y36(w.D))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-w-api-user-form"]],inputs:{data:"data"},decls:42,vars:12,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idApiUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","username","name","username","spellcheck","false","type","text","placeholder","Please provide username",1,"form-control","form-control-sm"],[1,"align-middle","mb-0","pt-1"],["formControlName","enablePasswordPath","label","Enable Password From Secret Path",3,"binary"],["class","form-group row",4,"ngIf"],["formControlName","enableSwaggerDocs","label","Enable Swagger Docs",3,"binary"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["formControlName","apiUserPasswordPath","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-2","p-0"],["class","d-block mt-2 text-info","href","javascript:","sava-no-dbl-click","",3,"click",4,"ngIf"],["href","javascript:","sava-no-dbl-click","",1,"d-block","mt-2","text-info",3,"click"],[1,"fas","fa-key","text-danger","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["formControlName","swaggerURLRandomPart","name","swaggerURLRandomPart","spellcheck","false","type","text","placeholder","Please generate random URL",1,"form-control","form-control-sm"],[1,"col-2","pl-0"],["pTooltip","Generate random swagger token","type","button",1,"btn","btn-sm","btn-outline-info",3,"click"],[1,"fas","fa-star-of-life","text-info","fa-fw"],["target","_blank",3,"href"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,B,3,0,"span",4),e.YNc(5,j,3,0,"span",4),e.YNc(6,z,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Username"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.TgZ(22,"div",10),e._UZ(23,"label",11),e.TgZ(24,"div",12)(25,"label",15),e._UZ(26,"p-checkbox",16),e.qZA()()(),e.YNc(27,ee,8,3,"div",4),e.YNc(28,te,5,0,"div",17),e.TgZ(29,"div",10),e._UZ(30,"label",11),e.TgZ(31,"div",12)(32,"label",15),e._UZ(33,"p-checkbox",18),e.qZA()()(),e.YNc(34,se,8,0,"div",17),e.YNc(35,ae,5,3,"div",17),e.qZA()(),e.TgZ(36,"div",19)(37,"button",20),e._UZ(38,"i",21),e._uU(39," Close"),e.qZA(),e.YNc(40,ie,4,3,"button",22),e.qZA(),e.YNc(41,oe,1,0,"p-progressSpinner",23),e.qZA()()()),2&a&&(e.xp6(4),e.Q6J("ngIf",s.data.mode===s.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.data.mode===s.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",s.form),e.xp6(15),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",!0===s.form.get("enablePasswordPath").value),e.xp6(1),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW&&!s.form.get("enablePasswordPath").value),e.xp6(5),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",s.form.getRawValue().enableSwaggerDocs),e.xp6(1),e.Q6J("ngIf",s.form.getRawValue().enableSwaggerDocs&&s.form.getRawValue().swaggerURLRandomPart),e.xp6(5),e.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",s.loading.form))},dependencies:[m._Y,m.Fj,m.JJ,m.JL,m.sg,m.u,T.O5,K.y,x.G,D.u,H.Lt,W.XZ],encapsulation:2})}return r})();const le=["apiUserFormC"];function ce(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.edit())}),e._UZ(1,"i",18),e.qZA()}}function pe(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.removePermanentDialog())}),e._UZ(1,"i",20),e.qZA()}}function de(r,i){1&r&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Username"),e.qZA()())}function me(r,i){if(1&r&&(e.TgZ(0,"tr",21)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA()()),2&r){const t=i.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.username)}}function ue(r,i){1&r&&e._UZ(0,"p-progressSpinner",22)}let E=(()=>{class r{apiUserS;generalS;notificationS;navigationCS;authCS;constantsS;confirmationService;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:d.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=f.iH._id;apiUserFormC;constructor(t,a,s,o,c,u,h,v){this.apiUserS=t,this.generalS=a,this.notificationS=s,this.navigationCS=o,this.authCS=c,this.constantsS=u,this.confirmationService=h,this.eventCenterS=v}ngOnInit(){this.eventCenterS.apiUser.selectedApiUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===p.F.SAVED||t.action===p.F.UPDATED)&&(this.apiUserFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - API Users")}loadGridData(){var t=this;this.loading.grid=!0;const a={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,username:1,active:1},sort:{name:1}};this.showAll&&delete a.find.active,this.subscriptions.push(this.apiUserS.query(a).subscribe(function(){var s=(0,l.Z)(function*(o){if(o.success&&(t.selectedRows=[],t.rows=o.data,t.rowsMap=S.keyBy(t.rows,f.iH._id),t.rows[0]?._id)){const c=(yield t.apiUserS.getById(t.rows[0]._id).toPromise()).data;c._id&&(yield t.navigationCS.setQueryParam(U.p.api_user,c._id),t.eventCenterS.apiUser.selectedApiUsers.next([c]),t.selectedRows=[c],yield t.fillData())}t.generalS.setNewTitle("API Maker - API Users"),t.loading.grid=!1});return function(o){return s.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE}),this.apiUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.VIEW,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_VIEW_MODE}),this.apiUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.apiUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,l.Z)(function*(){var a;t.confirmationService.confirm({message:t.constantsS.apiUser.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,l.Z)(function*(){yield t.removePermanent()}),function(){return a.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,l.Z)(function*(){t.loading.grid=!0;const a=yield t.apiUserS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,a.success?(t.notificationS.showSuccess(t.constantsS.apiUser.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(a,t.constantsS.apiUser.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.apiUser.selectedApiUsers.next([])}resetDependents(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.apiUser.selectedApiUsers.next([]),yield t.navigationCS.setQueryParam(U.p.api_user,null)})()}apiUserSelected(){var t=this;return(0,l.Z)(function*(){yield t.resetDependents(),yield t.fillData()})()}fillData(){var t=this;return(0,l.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(U.p.api_user,""),void t.eventCenterS.apiUser.selectedApiUsers.next([]);const a=(yield t.apiUserS.getById(t.selectedRows[0]._id).toPromise()).data;a._id?(yield t.navigationCS.setQueryParam(U.p.api_user,a._id),t.eventCenterS.apiUser.selectedApiUsers.next([a])):t.resetDependents().then()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(a){return new(a||r)(e.Y36(C.q),e.Y36(A.b),e.Y36(Z.W),e.Y36(O.S),e.Y36(w.D),e.Y36(y.L),e.Y36(_.YP),e.Y36(b.u))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-w-api-users"]],viewQuery:function(a,s){if(1&a&&e.Gf(le,5),2&a){let o;e.iGM(o=e.CRH())&&(s.apiUserFormC=o.first)}},decls:19,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/api-user.svg","alt","API Group Permissions",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-user-permission.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["apiUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," API Users"),e.qZA(),e.TgZ(5,"div",3)(6,"a",4),e._UZ(7,"img",5),e.qZA()(),e.TgZ(8,"span",6),e.NdJ("click",function(){return s.add()}),e._UZ(9,"i",7),e.qZA(),e.YNc(10,ce,2,0,"span",8),e.YNc(11,pe,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(c){return s.selectedRows=c})("dblclick",function(){return s.dblClickUsers()})("selectionChange",function(){return s.apiUserSelected()}),e.YNc(14,de,5,0,"ng-template",12),e.YNc(15,me,5,3,"ng-template",13),e.qZA(),e.YNc(16,ue,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(17,"app-w-api-user-form",15,16)),2&a&&(e.xp6(10),e.Q6J("ngIf",s.selectedRows.length),e.xp6(1),e.Q6J("ngIf",s.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",s.selectedRows)("dataKey",s.gridKey)("scrollable",!0)("value",s.rows),e.xp6(3),e.Q6J("ngIf",s.loading.grid),e.xp6(1),e.Q6J("data",s.data))},dependencies:[T.O5,g.iA,_.jx,g.Ei,x.G,D.u,I],encapsulation:2})}return r})();var fe=n(3620),ge=n(8883),he=n(5561);function ve(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.saveUserPermissions())}),e._UZ(1,"i",11),e._uU(2," Save"),e.qZA()}}function _e(r,i){1&r&&(e.TgZ(0,"tr"),e._UZ(1,"th",15),e.TgZ(2,"th"),e._uU(3,"Name"),e.qZA()())}function Ue(r,i){if(1&r&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",18),e.qZA()),2&r){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function Se(r,i){if(1&r&&(e.TgZ(0,"tr",16),e.YNc(1,Ue,2,2,"td",17),e.TgZ(2,"td"),e._uU(3),e.qZA()()),2&r){const t=i.$implicit,a=e.oxw(2);e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",a.showCheckbox),e.xp6(2),e.Oqu(t.name)}}function Ce(r,i){if(1&r){const t=e.EpF();e.TgZ(0,"p-table",12),e.NdJ("selectionChange",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.selectedRows=s)})("selectionChange",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.apiGroupSelected())}),e.YNc(1,_e,4,0,"ng-template",13),e.YNc(2,Se,4,3,"ng-template",14),e.qZA()}if(2&r){const t=e.oxw();e.Q6J("selectionMode","multiple")("metaKeySelection",!1)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows)}}function Ae(r,i){1&r&&e._UZ(0,"p-progressSpinner",19)}let N=(()=>{class r{groupS;generalS;notificationS;navigationS;authCS;apiUserS;constantsS;eventCenterS;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={eventChannel:new e.vpe};rows=[];rowsMap={};selectedRows=[];gridKey=f.IF.name;constructor(t,a,s,o,c,u,h,v){this.groupS=t,this.generalS=a,this.notificationS=s,this.navigationS=o,this.authCS=c,this.apiUserS=u,this.constantsS=h,this.eventCenterS=v}ngOnInit(){var t=this;this.eventCenterS.apiUser.selectedGroups.next([]),this.subscriptions.push(this.eventCenterS.apiUser.selectedApiUsers.pipe((0,fe.b)(10)).subscribe(function(){var a=(0,l.Z)(function*(s){s.length?yield t.loadGridData():t.resetList()});return function(s){return a.apply(this,arguments)}}()))}loadGridData(){var t=this;return(0,l.Z)(function*(){t.loading.grid=!0;const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1},sort:{name:1}},s=yield t.groupS.query(a).toPromise();if(s.success){t.selectedRows=[],t.rows=s.data,t.rowsMap=S.keyBy(t.rows,"name");const o=t.eventCenterS.apiUser.selectedApiUsers.value[0].groupNames||[],c=[];for(const u of o)t.rowsMap[u]&&c.push(t.rowsMap[u]);t.selectedRows=c,t.eventCenterS.apiUser.selectedGroups.next(S.map(t.selectedRows,"_id"))}t.loading.grid=!1})()}resetList(){var t=this;return(0,l.Z)(function*(){t.rows=[],t.rowsMap={},t.selectedRows.length=0,t.eventCenterS.apiUser.selectedGroups.next([])})()}apiGroupSelected(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.apiUser.selectedGroups.next(S.map(t.selectedRows,t.gridKey))})()}saveUserPermissions(){var t=this;return(0,l.Z)(function*(){const a=JSON.parse(JSON.stringify(t.eventCenterS.apiUser.selectedApiUsers.value[0]));a.user=t.authCS.getUserId(),a.groupNames=t.eventCenterS.apiUser.selectedGroups.value||[],t.loading.grid=!0;const s=yield t.apiUserS.put(a._id,a,{select:f.iH._id}).toPromise();s&&s.success&&t.notificationS.showSuccess("User updated successfully."),t.loading.grid=!1})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||r)(e.Y36(ge.e),e.Y36(A.b),e.Y36(Z.W),e.Y36(he.X),e.Y36(w.D),e.Y36(C.q),e.Y36(y.L),e.Y36(b.u))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-w-api-group-list"]],inputs:{showCheckbox:"showCheckbox"},decls:12,vars:3,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/api-group.svg","alt","API Group Permissions",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-group-permission.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","pTooltip","Save",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["pTooltip","Save",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-save","fa-fw","text-success"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],[2,"width","40px"],[3,"pSelectableRow"],[4,"ngIf"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Groups"),e.qZA(),e.TgZ(5,"div",3)(6,"a",4),e._UZ(7,"img",5),e.qZA()(),e.YNc(8,ve,3,0,"span",6),e.qZA(),e.TgZ(9,"div",7),e.YNc(10,Ce,3,6,"p-table",8),e.YNc(11,Ae,1,0,"p-progressSpinner",9),e.qZA()()),2&a&&(e.xp6(8),e.Q6J("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.xp6(2),e.Q6J("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.xp6(1),e.Q6J("ngIf",s.loading.grid))},dependencies:[T.O5,g.iA,_.jx,g.Ei,g.UA,x.G,D.u],encapsulation:2})}return r})();function Ze(r,i){1&r&&(e.TgZ(0,"div",3),e._UZ(1,"app-w-api-users"),e.qZA())}function we(r,i){1&r&&(e.TgZ(0,"div",4),e._UZ(1,"app-w-api-group-list"),e.qZA())}const ye=function(){return{height:"calc(100% - 100px);"}},M=function(){return[50,50]};const be=[{path:"layout",component:(()=>{class r{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=e.Xpm({type:r,selectors:[["app-api-user-layout"]],decls:4,vars:7,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body border-0 shadow-sm mb-5","orientation","horizontal",3,"panelSizes","minSizes"],["pTemplate",""],[1,"col","flex","align-items-center","justify-content-center","pl-0","pr-1"],[1,"col","flex","align-items-center","justify-content-center","pl-1","pr-0"]],template:function(a,s){1&a&&(e.TgZ(0,"div",0)(1,"p-splitter",1),e.YNc(2,Ze,2,0,"ng-template",2),e.YNc(3,we,2,0,"ng-template",2),e.qZA()()),2&a&&(e.xp6(1),e.Akn(e.DdM(4,ye)),e.Q6J("panelSizes",e.DdM(5,M))("minSizes",e.DdM(6,M)))},dependencies:[_.jx,k.q,E,N],encapsulation:2})}return r})(),canActivate:[J.P]}];let Te=(()=>{class r{static \u0275fac=function(a){return new(a||r)};static \u0275mod=e.oAB({type:r});static \u0275inj=e.cJS({imports:[Y.Bz.forChild(be),G.u]})}return r})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2714],{5050:(mt,v,i)=>{i.r(v),i.d(v,{I18nM:()=>lt});var b=i(7664),N=i(7017),t=i(4946),l=i(5861),c=i(3157),d=i(328),p=i(6212),x=i(6990),u=i(1162),I=i(7240),C=i(9961),A=i(2189),_=i(5852),S=i(6233),y=i(7414),D=i(5219),P=i(2915),Z=i(6814),E=i(5431),T=i(7680),O=i(3259),f=i(95),U=i(553),R=i(1601),Y=i(2304),J=i(2660),Q=i(756),W=i(5025);const k=["monacoEditorModalC"];function G(a,r){1&a&&(t.TgZ(0,"span"),t._UZ(1,"i",28),t._uU(2," Add Internationalization"),t.qZA())}function V(a,r){1&a&&(t.TgZ(0,"span"),t._UZ(1,"i",29),t._uU(2," View Internationalization"),t.qZA())}function H(a,r){1&a&&(t.TgZ(0,"span"),t._UZ(1,"i",30),t._uU(2," Edit Internationalization"),t.qZA())}function B(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.viewError())}),t._uU(1,"View error"),t.qZA()}}function K(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function z(a,r){1&a&&(t.TgZ(0,"span"),t._uU(1,"Update"),t.qZA())}function j(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"button",32),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.save())}),t._UZ(1,"i",33),t.YNc(2,K,2,0,"span",4),t.YNc(3,z,2,0,"span",4),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("disabled",e.form.invalid),t.xp6(2),t.Q6J("ngIf",e.data.mode===e.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",e.data.mode===e.EFormMode.EDIT)}}function L(a,r){1&a&&t._UZ(0,"p-progressSpinner",34)}let w=(()=>{class a{fb;ns;generalCS;constantsS;authCS;i18nS;monacoS;data;loading={form:!1};EFormMode=d.D;form;subscriptions=[];editorI18N;editorOptionsI18N={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};BE_HOST_PORT=U.N.BE_HOST_PORT;monacoDecorations=[];tab;viewDockerfileModelC;constructor(e,o,n,s,m,h,g){this.fb=e,this.ns=o,this.generalCS=n,this.constantsS=s,this.authCS=m,this.i18nS=h,this.monacoS=g}ngOnInit(){var e=this;return(0,l.Z)(function*(){e.createForm(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var o=(0,l.Z)(function*(n){if(n)if(e.form.enable(),n.action===c.F.OPEN_FORM_IN_EDIT_MODE){const s=yield e.i18nS.getById(e.data.formData._id).toPromise();e.form.reset(),e.form.patchValue(s.data),e.generalCS.setValueInEditor(e,"editorI18N",s.data.keysCode||"")}else if(n.action===c.F.OPEN_FORM_IN_VIEW_MODE){const s=yield e.i18nS.getById(e.data.formData._id).toPromise();e.form.reset(),e.form.patchValue(s.data),e.generalCS.setValueInEditor(e,"editorI18N",s.data.keysCode||""),e.form.disable()}else if(n.action===c.F.OPEN_FORM_IN_ADD_MODE){e.form.reset();const s=(yield e.i18nS.getSampleI18nText().toPromise()).data;s&&e.generalCS.setValueInEditor(e,"editorI18N",s)}});return function(n){return o.apply(this,arguments)}}()))})()}createForm(){this.form=this.fb.group({name:[null,[f.kI.required]]})}showModal(){this.lastError=void 0,$("#idI18NForm").modal("show")}hideModal(){$("#idI18NForm").modal("hide")}save(){var e=this;return(0,l.Z)(function*(){const o=e.form.getRawValue();o.user=e.authCS.getUserId(),o.keysCode=e.editorI18N.getValue();try{let n;e.loading.form=!0,e.lastError=void 0,e.monacoS.clearEditorDecorations(e.editorI18N,e.monacoDecorations),e.data.mode===d.D.ADD?n=yield e.i18nS.post(o).toPromise():e.data.mode===d.D.EDIT&&(n=yield e.i18nS.put(e.data.formData._id,o,{select:u.iH._id}).toPromise()),e.ns.showSuccess(e.data.mode===d.D.ADD?e.constantsS.i18n.addSuccess:e.constantsS.i18n.editSuccess),e.data.eventChannel.emit({action:e.data.mode===d.D.ADD?c.F.SAVED:c.F.UPDATED}),e.loading.form=!1}catch(n){e.loading.form=!1,e.ns.showErrorFromResponse(n.error||n,"Unable to save internationalization."),e.lastError=n.error,e.tab=e.tab||{},e.tab.axiosResponse={data:n.error},e.monacoS.highlightErrorInMonacoEditor(e.editorI18N,e.tab,"MainSandbox.ts",e.monacoDecorations)}})()}editorGenerated(e){var o=this;return(0,l.Z)(function*(){o.editorI18N=e,yield o.monacoS.loadSchemaEditorSettings(o.BE_HOST_PORT,o.authCS.getUserId(),null),o.monacoS.addSaveCodeKeyBinding(e,n=>{o.form.valid&&o.save()})})()}viewError(){this.viewDockerfileModelC.showModal(this.generalCS.stringify(this.lastError),R.d.json)}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||a)(t.Y36(f.qu),t.Y36(C.W),t.Y36(I.b),t.Y36(y.L),t.Y36(_.D),t.Y36(S.q),t.Y36(Y.b))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-i18n-form"]],viewQuery:function(o,n){if(1&o&&t.Gf(k,5),2&o){let s;t.iGM(s=t.CRH())&&(n.viewDockerfileModelC=s.first)}},inputs:{data:"data"},decls:33,vars:12,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idI18NForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-xl"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["href","https://docs.apimaker.dev/v1/docs/i18/i18.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-8"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["formControlName","name","name","name","spellcheck","false","placeholder","Please provide name","type","text",1,"form-control","form-control-sm"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 220px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,G,3,0,"span",4),t.YNc(5,V,3,0,"span",4),t.YNc(6,H,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"a",9),t._UZ(12,"img",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t._uU(19,"Name"),t.qZA(),t.TgZ(20,"div",14),t._UZ(21,"input",17),t.qZA()()()(),t.TgZ(22,"div",18)(23,"app-monaco-editor",19),t.NdJ("editorGenerated",function(m){return n.editorGenerated(m)}),t.qZA()()()(),t.TgZ(24,"div",20),t.YNc(25,B,2,0,"a",21),t.TgZ(26,"button",22),t._UZ(27,"i",23),t._uU(28," Close"),t.qZA(),t.YNc(29,j,4,3,"button",24),t.qZA(),t.YNc(30,L,1,0,"p-progressSpinner",25),t.qZA()()(),t._UZ(31,"app-monaco-editor-modal",26,27)),2&o&&(t.xp6(4),t.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),t.xp6(8),t.Q6J("formGroup",n.form),t.xp6(9),t.Q6J("isSchemaEditor",!0)("editorOptions",n.editorOptionsI18N),t.xp6(2),t.Q6J("ngIf",n.lastError),t.xp6(4),t.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",n.loading.form),t.xp6(1),t.Q6J("modalId","idMonacoEditorModalInI18n")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[f._Y,f.Fj,f.JJ,f.JL,f.sg,f.u,Z.O5,J.y,Q.O,T.G,W.A],encapsulation:2})}return a})();const q=["i18nFormC"];function X(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"span",17),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.edit())}),t._UZ(1,"i",18),t.qZA()}}function tt(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.clone())}),t._UZ(1,"i",20),t.qZA()}}function et(a,r){if(1&a){const e=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.removePermanentDialog())}),t._UZ(1,"i",22),t.qZA()}}function nt(a,r){1&a&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Name"),t.qZA()())}function ot(a,r){if(1&a&&(t.TgZ(0,"tr",23)(1,"td"),t._uU(2),t.qZA()()),2&a){const e=r.$implicit;t.Q6J("pSelectableRow",e),t.xp6(2),t.Oqu(e.name)}}function at(a,r){1&a&&t._UZ(0,"p-progressSpinner",24)}let F=(()=>{class a{generalS;notificationS;navigationCS;authCS;i18nS;constantsS;cd;confirmationService;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:d.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=u.iH._id;i18nFormC;constructor(e,o,n,s,m,h,g,ct,dt){this.generalS=e,this.notificationS=o,this.navigationCS=n,this.authCS=s,this.i18nS=m,this.constantsS=h,this.cd=g,this.confirmationService=ct,this.eventCenterS=dt}ngOnInit(){this.eventCenterS.i18n.selectedI18n.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(e=>{(e.action===c.F.SAVED||e.action===c.F.UPDATED)&&(this.i18nFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - Internationalization")}loadGridData(){var e=this;this.loading.grid=!0;const o={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1},sort:{name:1}};this.showAll&&delete o.find.active,this.subscriptions.push(this.i18nS.query(o).subscribe(function(){var n=(0,l.Z)(function*(s){s.success&&(e.selectedRows=[],e.rows=s.data,e.rowsMap=x.keyBy(e.rows,u.iH._id));const m=e.navigationCS.getQueryParam(p.p.am_i18n);e.rowsMap[m]&&(yield e.fillData()),e.loading.grid=!1,e.cd.detectChanges()});return function(s){return n.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=d.D.ADD,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_ADD_MODE}),this.i18nFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.VIEW,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_VIEW_MODE}),this.i18nFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=d.D.EDIT,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_EDIT_MODE}),this.i18nFormC.showModal()}clone(){var e=this;return(0,l.Z)(function*(){try{if(!e.selectedRows[0])return;const o=(yield e.i18nS.getById(e.selectedRows[0]._id).toPromise()).data;delete o._id,o.name=`${o.name}-clone`,(yield e.i18nS.post(o).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.logProfile.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.logProfile.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.logProfile.cloneError)}})()}removePermanentDialog(){var e=this;return(0,l.Z)(function*(){var o;e.confirmationService.confirm({message:e.constantsS.i18n.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,l.Z)(function*(){yield e.removePermanent()}),function(){return o.apply(this,arguments)})})})()}removePermanent(){var e=this;return(0,l.Z)(function*(){e.loading.grid=!0;const o=yield e.i18nS.permanentDelete(e.selectedRows[0]._id).toPromise();e.loading.grid=!1,o.success?(e.notificationS.showSuccess(e.constantsS.i18n.removePermanent),e.resetSelectedRows(),e.loadGridData()):e.notificationS.showErrorFromResponse(o,e.constantsS.i18n.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.i18n.selectedI18n.next([])}resetDependents(){var e=this;return(0,l.Z)(function*(){e.eventCenterS.i18n.selectedI18n.next([]),yield e.navigationCS.setQueryParam(p.p.am_i18n,null)})()}i18NSelected(){var e=this;return(0,l.Z)(function*(){e.resetDependents().then(),e.fillData().then()})()}fillData(){var e=this;return(0,l.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(p.p.am_i18n,""),void e.eventCenterS.i18n.selectedI18n.next([]);const o=(yield e.i18nS.getById(e.selectedRows[0]._id).toPromise()).data;o._id?(yield e.navigationCS.setQueryParam(p.p.am_i18n,o._id),e.eventCenterS.i18n.selectedI18n.next([o])):e.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickI18N(){this.selectedRows.length&&this.edit()}static \u0275fac=function(o){return new(o||a)(t.Y36(I.b),t.Y36(C.W),t.Y36(A.S),t.Y36(_.D),t.Y36(S.q),t.Y36(y.L),t.Y36(t.sBO),t.Y36(D.YP),t.Y36(P.u))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-i18n-w"]],viewQuery:function(o,n){if(1&o&&t.Gf(q,5),2&o){let s;t.iGM(s=t.CRH())&&(n.i18nFormC=s.first)}},decls:19,vars:11,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/i18n.svg","alt","Internationalization",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/i18/i18.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["i18nFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Internationalization"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.TgZ(7,"span",5),t.NdJ("click",function(){return n.add()}),t._UZ(8,"i",6),t.qZA(),t.YNc(9,X,2,0,"span",7),t.YNc(10,tt,2,0,"span",8),t.YNc(11,et,2,0,"span",9),t.qZA(),t.TgZ(12,"div",10)(13,"p-table",11),t.NdJ("selectionChange",function(m){return n.selectedRows=m})("selectionChange",function(){return n.i18NSelected()})("dblclick",function(){return n.dblClickI18N()}),t.YNc(14,nt,3,0,"ng-template",12),t.YNc(15,ot,3,2,"ng-template",13),t.qZA(),t.YNc(16,at,1,0,"p-progressSpinner",14),t.qZA()(),t._UZ(17,"app-i18n-form",15,16)),2&o&&(t.xp6(9),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),t.xp6(3),t.Q6J("ngIf",n.loading.grid),t.xp6(1),t.Q6J("data",n.data))},dependencies:[Z.O5,E.iA,D.jx,E.Ei,T.G,O.u,w],encapsulation:2})}return a})(),M=(()=>{class a{constructor(){}ngOnInit(){}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=t.Xpm({type:a,selectors:[["app-I18N-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(o,n){1&o&&(t.TgZ(0,"div",0),t._UZ(1,"app-i18n-w"),t.qZA())},dependencies:[F],encapsulation:2})}return a})();var it=i(3726),st=i(4950);const rt=[{path:"main",component:M,canActivate:[it.P]}];let lt=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=t.oAB({type:a});static \u0275inj=t.cJS({imports:[b.Bz.forChild(rt),N.u,st.A]})}return a})()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3611],{3611:(N,d,s)=>{s.r(d),s.d(d,{NativeProcessLogsM:()=>R});var g=s(7060),v=s(1709),p=s(2173),a=s(467),e=s(540),f=s(6268),m=s(6708),c=s(4341),u=s(177),h=s(3478),S=s(6914),L=s(7515),b=s(8542),C=s(8150);function O(o,T){1&o&&e.nrm(0,"p-progressSpinner",15)}const P=[{path:"",component:(()=>{class o{instanceS;ns;servers=[];selectedServer=null;loading={grid:!1};editor;editorOptionsLogs={readOnly:!1,language:"plaintext",contextmenu:!1};constructor(t,r){this.instanceS=t,this.ns=r}ngOnInit(){var t=this;return(0,a.A)(function*(){yield t.loadAllServers(),t.selectedServer=t.servers[0]._id})()}clearAllLogs(){var t=this;return(0,a.A)(function*(){try{yield t.instanceS.clearServerLogs(null).toPromise(),t.getLogsOfOneServer().then(),t.ns.showSuccess("All native process log files are cleared from all servers.")}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to clear server logs.")}})()}clearLogsOfOneServer(){var t=this;return(0,a.A)(function*(){try{yield t.instanceS.clearServerLogs(t.selectedServer).toPromise(),t.getLogsOfOneServer().then(),t.ns.showSuccess(`Native process log file is cleared from ${t.selectedServer}.`)}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to clear server logs.")}})()}getLogsOfOneServer(){var t=this;return(0,a.A)(function*(){t.loading.grid=!0;try{const r=(yield t.instanceS.getAllNativeProcessLogs(t.selectedServer).toPromise()).data;t.editor.setValue(r[0].nativeProcessLogsText)}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to load logs.")}t.loading.grid=!1})()}loadAllServers(){var t=this;return(0,a.A)(function*(){t.loading.grid=!0,t.servers=[];try{t.servers=(yield t.instanceS.getAllConnectedServers().toPromise()).data}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to load server list.")}t.loading.grid=!1})()}editorGenerated(t){this.editor=t}static \u0275fac=function(r){return new(r||o)(e.rXU(f.J),e.rXU(m.m))};static \u0275cmp=e.VBU({type:o,selectors:[["app-native-process-logs"]],decls:18,vars:8,consts:[["id","about",1,"p-2"],[1,"row","m-0"],[1,"col-4","p-0"],["optionLabel","name","optionValue","_id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","ngModelChange"],["pTooltip","Clear native process logs of this server.","sava-no-dbl-click","","type","button",1,"btn","btn-sm","ml-2",3,"disabled","click"],[1,"far","fa-trash-alt","text-warning","fa-fw"],["pTooltip","Reload logs.","sava-no-dbl-click","","type","button",1,"btn","btn-sm","ml-2",3,"disabled","click"],[1,"fas","fa-sync-alt","text-success","fa-fw"],[1,"col-4","text-right","p-0"],["pTooltip","Clear native process logs of all server.","sava-no-dbl-click","","type","button",1,"btn","btn-outline-light","btn-sm",3,"disabled","click"],[1,"far","fa-trash-alt","text-warning","fa-fw","mr-1"],[1,"pl-2","pr-2","pb-2","pt-0"],[1,"card-body","p-0","overflow-hidden",2,"height","calc(100vh - 115px)"],[3,"editorOptions","editorGenerated"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,n){1&r&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"p-dropdown",3),e.bIt("ngModelChange",function(l){return n.selectedServer=l})("ngModelChange",function(){return n.getLogsOfOneServer()}),e.k0s()(),e.j41(4,"div",2)(5,"button",4),e.bIt("click",function(){return n.clearLogsOfOneServer()}),e.nrm(6,"i",5),e.k0s(),e.j41(7,"button",6),e.bIt("click",function(){return n.getLogsOfOneServer()}),e.nrm(8,"i",7),e.k0s()(),e.j41(9,"div",8)(10,"button",9),e.bIt("click",function(){return n.clearAllLogs()}),e.nrm(11,"i",10),e.j41(12,"span"),e.EFF(13,"Clear All Server Logs"),e.k0s()()()()(),e.j41(14,"section",11)(15,"div",12)(16,"app-monaco-editor",13),e.bIt("editorGenerated",function(l){return n.editorGenerated(l)}),e.k0s()(),e.DNE(17,O,1,0,"p-progressSpinner",14),e.k0s()),2&r&&(e.R7$(3),e.Y8G("options",n.servers)("ngModel",n.selectedServer)("filter",!0),e.R7$(2),e.Y8G("disabled",n.loading.grid),e.R7$(2),e.Y8G("disabled",n.loading.grid),e.R7$(3),e.Y8G("disabled",n.loading.grid),e.R7$(6),e.Y8G("editorOptions",n.editorOptionsLogs),e.R7$(1),e.Y8G("ngIf",n.loading.grid))},dependencies:[c.BC,c.vS,u.bT,h.U,S.A,L.p,b.m,C.ms],styles:["table[_ngcontent-%COMP%]{background-color:#3f3f3f}td[_ngcontent-%COMP%]{border-color:#4b4a4a!important;padding:10px}"]})}return o})(),canActivate:[p.Z]}];let R=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e.$C({type:o});static \u0275inj=e.G2t({imports:[g.iI.forChild(P),v.u]})}return o})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2735],{2735:(P,d,o)=>{o.r(d),o.d(d,{NativeProcessLogsM:()=>T});var g=o(7664),p=o(7017),v=o(3726),a=o(5861),e=o(4946),f=o(3429),m=o(9961),c=o(95),u=o(6814),h=o(2660),S=o(756),L=o(7680),O=o(3259),C=o(3965);function b(s,Z){1&s&&e._UZ(0,"p-progressSpinner",15)}const N=[{path:"",component:(()=>{class s{instanceS;ns;servers=[];selectedServer=null;loading={grid:!1};editor;editorOptionsLogs={readOnly:!1,language:"plaintext",contextmenu:!1};constructor(t,r){this.instanceS=t,this.ns=r}ngOnInit(){var t=this;return(0,a.Z)(function*(){yield t.loadAllServers(),t.selectedServer=t.servers[0]._id})()}clearAllLogs(){var t=this;return(0,a.Z)(function*(){try{yield t.instanceS.clearServerLogs(null).toPromise(),t.getLogsOfOneServer().then(),t.ns.showSuccess("All native process log files are cleared from all servers.")}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to clear server logs.")}})()}clearLogsOfOneServer(){var t=this;return(0,a.Z)(function*(){try{yield t.instanceS.clearServerLogs(t.selectedServer).toPromise(),t.getLogsOfOneServer().then(),t.ns.showSuccess(`Native process log file is cleared from ${t.selectedServer}.`)}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to clear server logs.")}})()}getLogsOfOneServer(){var t=this;return(0,a.Z)(function*(){t.loading.grid=!0;try{const r=(yield t.instanceS.getAllNativeProcessLogs(t.selectedServer).toPromise()).data;t.editor.setValue(r[0].nativeProcessLogsText)}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to load logs.")}t.loading.grid=!1})()}loadAllServers(){var t=this;return(0,a.Z)(function*(){t.loading.grid=!0,t.servers=[];try{t.servers=(yield t.instanceS.getAllConnectedServers().toPromise()).data}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to load server list.")}t.loading.grid=!1})()}editorGenerated(t){this.editor=t}static \u0275fac=function(r){return new(r||s)(e.Y36(f.E),e.Y36(m.W))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-native-process-logs"]],decls:18,vars:8,consts:[["id","about",1,"p-2"],[1,"row","m-0"],[1,"col-4","p-0"],["optionLabel","name","optionValue","_id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","ngModelChange"],["pTooltip","Clear native process logs of this server.","sava-no-dbl-click","","type","button",1,"btn","btn-sm","ml-2",3,"disabled","click"],[1,"far","fa-trash-alt","text-warning","fa-fw"],["pTooltip","Reload logs.","sava-no-dbl-click","","type","button",1,"btn","btn-sm","ml-2",3,"disabled","click"],[1,"fas","fa-sync-alt","text-success","fa-fw"],[1,"col-4","text-right","p-0"],["pTooltip","Clear native process logs of all server.","sava-no-dbl-click","","type","button",1,"btn","btn-outline-light","btn-sm",3,"disabled","click"],[1,"far","fa-trash-alt","text-warning","fa-fw","mr-1"],[1,"pl-2","pr-2","pb-2","pt-0"],[1,"card-body","p-0","overflow-hidden",2,"height","calc(100vh - 115px)"],[3,"editorOptions","editorGenerated"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,n){1&r&&(e.TgZ(0,"section",0)(1,"div",1)(2,"div",2)(3,"p-dropdown",3),e.NdJ("ngModelChange",function(l){return n.selectedServer=l})("ngModelChange",function(){return n.getLogsOfOneServer()}),e.qZA()(),e.TgZ(4,"div",2)(5,"button",4),e.NdJ("click",function(){return n.clearLogsOfOneServer()}),e._UZ(6,"i",5),e.qZA(),e.TgZ(7,"button",6),e.NdJ("click",function(){return n.getLogsOfOneServer()}),e._UZ(8,"i",7),e.qZA()(),e.TgZ(9,"div",8)(10,"button",9),e.NdJ("click",function(){return n.clearAllLogs()}),e._UZ(11,"i",10),e.TgZ(12,"span"),e._uU(13,"Clear All Server Logs"),e.qZA()()()()(),e.TgZ(14,"section",11)(15,"div",12)(16,"app-monaco-editor",13),e.NdJ("editorGenerated",function(l){return n.editorGenerated(l)}),e.qZA()(),e.YNc(17,b,1,0,"p-progressSpinner",14),e.qZA()),2&r&&(e.xp6(3),e.Q6J("options",n.servers)("ngModel",n.selectedServer)("filter",!0),e.xp6(2),e.Q6J("disabled",n.loading.grid),e.xp6(2),e.Q6J("disabled",n.loading.grid),e.xp6(3),e.Q6J("disabled",n.loading.grid),e.xp6(6),e.Q6J("editorOptions",n.editorOptionsLogs),e.xp6(1),e.Q6J("ngIf",n.loading.grid))},dependencies:[c.JJ,c.On,u.O5,h.y,S.O,L.G,O.u,C.Lt],styles:["table[_ngcontent-%COMP%]{background-color:#3f3f3f}td[_ngcontent-%COMP%]{border-color:#4b4a4a!important;padding:10px}"]})}return s})(),canActivate:[v.P]}];let T=(()=>{class s{static \u0275fac=function(r){return new(r||s)};static \u0275mod=e.oAB({type:s});static \u0275inj=e.cJS({imports:[g.Bz.forChild(N),p.u]})}return s})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2908],{2908:(u,s,t)=>{t.r(s),t.d(s,{RootSettingsM:()=>d});var a=t(7664),l=t(7017),o=t(4946);const e=[{path:"deployment-settings",loadChildren:()=>t.e(4575).then(t.bind(t,4575)).then(n=>n.DeploymentSettingsM)}];let d=(()=>{class n{static \u0275fac=function(h){return new(h||n)};static \u0275mod=o.oAB({type:n});static \u0275inj=o.cJS({imports:[a.Bz.forChild(e),l.u]})}return n})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3081],{3081:(Jt,C,l)=>{l.r(C),l.d(C,{DeployApiMakerM:()=>Mt});var Q=l(7664),c=l(6814),_=l(9862),e=l(4946),p=l(5219),g=l(707),x=l(2076),T=l(3983),f=l(7778),I=l(4713),b=l(2332);let y=(()=>{class i extends I.s{pathId;ngOnInit(){this.pathId="url(#"+(0,b.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["UploadIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1),e.qZA(),e.TgZ(3,"defs")(4,"clipPath",2),e._UZ(5,"rect",3),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(3),e.Q6J("id",s.pathId))},encapsulation:2})}return i})();var d=l(6825),F=l(2591);let w=(()=>{class i extends I.s{pathId;ngOnInit(){this.pathId="url(#"+(0,b.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["ExclamationTriangleIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1)(3,"path",2)(4,"path",3),e.qZA(),e.TgZ(5,"defs")(6,"clipPath",4),e._UZ(7,"rect",5),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(5),e.Q6J("id",s.pathId))},encapsulation:2})}return i})(),U=(()=>{class i extends I.s{pathId;ngOnInit(){this.pathId="url(#"+(0,b.Th)()+")"}static \u0275fac=function(){let t;return function(s){return(t||(t=e.n5z(i)))(s||i)}}();static \u0275cmp=e.Xpm({type:i,selectors:[["InfoCircleIcon"]],standalone:!0,features:[e.qOj,e.jDz],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,s){1&n&&(e.O4$(),e.TgZ(0,"svg",0)(1,"g"),e._UZ(2,"path",1),e.qZA(),e.TgZ(3,"defs")(4,"clipPath",2),e._UZ(5,"rect",3),e.qZA()()()),2&n&&(e.Tol(s.getClassNames()),e.uIk("aria-label",s.ariaLabel)("aria-hidden",s.ariaHidden)("role",s.role),e.xp6(1),e.uIk("clip-path",s.pathId),e.xp6(3),e.Q6J("id",s.pathId))},encapsulation:2})}return i})();var k=l(8468),m=l(4480),A=l(5592),E=l(4352),N=l(671);function D(i,a){if(1&i&&e._UZ(0,"span"),2&i){const t=e.oxw().$implicit;e.Tol("p-message-icon pi "+t.icon),e.uIk("data-pc-section","icon")}}function B(i,a){1&i&&e._UZ(0,"CheckIcon"),2&i&&e.uIk("data-pc-section","icon")}function P(i,a){1&i&&e._UZ(0,"InfoCircleIcon"),2&i&&e.uIk("data-pc-section","icon")}function z(i,a){1&i&&e._UZ(0,"TimesCircleIcon"),2&i&&e.uIk("data-pc-section","icon")}function H(i,a){1&i&&e._UZ(0,"ExclamationTriangleIcon"),2&i&&e.uIk("data-pc-section","icon")}function R(i,a){if(1&i&&(e.TgZ(0,"span",10),e.ynx(1),e.YNc(2,B,1,1,"CheckIcon",11),e.YNc(3,P,1,1,"InfoCircleIcon",11),e.YNc(4,z,1,1,"TimesCircleIcon",11),e.YNc(5,H,1,1,"ExclamationTriangleIcon",11),e.BQk(),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Q6J("ngIf","success"===t.severity),e.xp6(1),e.Q6J("ngIf","info"===t.severity),e.xp6(1),e.Q6J("ngIf","error"===t.severity),e.xp6(1),e.Q6J("ngIf","warn"===t.severity)}}function V(i,a){if(1&i&&e._UZ(0,"span",14),2&i){const t=e.oxw(2).$implicit;e.Q6J("innerHTML",t.summary,e.oJD),e.uIk("data-pc-section","summary")}}function q(i,a){if(1&i&&e._UZ(0,"span",15),2&i){const t=e.oxw(2).$implicit;e.Q6J("innerHTML",t.detail,e.oJD),e.uIk("data-pc-section","detail")}}function G(i,a){if(1&i&&(e.ynx(0),e.YNc(1,V,1,2,"span",12),e.YNc(2,q,1,2,"span",13),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",t.summary),e.xp6(1),e.Q6J("ngIf",t.detail)}}function j(i,a){if(1&i&&(e.TgZ(0,"span",18),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.uIk("data-pc-section","summary"),e.xp6(1),e.Oqu(t.summary)}}function K(i,a){if(1&i&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.uIk("data-pc-section","detail"),e.xp6(1),e.Oqu(t.detail)}}function $(i,a){if(1&i&&(e.YNc(0,j,2,2,"span",16),e.YNc(1,K,2,2,"span",17)),2&i){const t=e.oxw().$implicit;e.Q6J("ngIf",t.summary),e.xp6(1),e.Q6J("ngIf",t.detail)}}function W(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("click",function(){e.CHM(t);const s=e.oxw().index,o=e.oxw(2);return e.KtG(o.removeMessage(s))}),e._UZ(1,"TimesIcon",21),e.qZA()}2&i&&(e.uIk("aria-label","Close")("data-pc-section","closebutton"),e.xp6(1),e.Q6J("styleClass","p-message-close-icon"),e.uIk("data-pc-section","closeicon"))}const X=function(i,a){return{showTransitionParams:i,hideTransitionParams:a}},ee=function(i){return{value:"visible",params:i}};function te(i,a){if(1&i&&(e.TgZ(0,"div",4)(1,"div",5),e.YNc(2,D,1,3,"span",6),e.YNc(3,R,6,4,"span",7),e.YNc(4,G,3,2,"ng-container",1),e.YNc(5,$,2,2,"ng-template",null,8,e.W1O),e.YNc(7,W,2,4,"button",9),e.qZA()()),2&i){const t=a.$implicit,n=e.MAs(6),s=e.oxw(2);e.Tol("p-message p-message-"+t.severity),e.Q6J("@messageAnimation",e.VKq(12,ee,e.WLB(9,X,s.showTransitionOptions,s.hideTransitionOptions))),e.xp6(1),e.uIk("data-pc-section","wrapper"),e.xp6(1),e.Q6J("ngIf",t.icon),e.xp6(1),e.Q6J("ngIf",!t.icon),e.xp6(1),e.Q6J("ngIf",!s.escape)("ngIfElse",n),e.xp6(3),e.Q6J("ngIf",s.closable)}}function ie(i,a){if(1&i&&(e.ynx(0),e.YNc(1,te,8,14,"div",3),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.messages)}}function ne(i,a){1&i&&e.GkF(0)}function se(i,a){if(1&i&&(e.TgZ(0,"div",22)(1,"div",5),e.YNc(2,ne,1,0,"ng-container",23),e.qZA()()),2&i){const t=e.oxw();e.Q6J("ngClass","p-message p-message-"+t.severity),e.xp6(2),e.Q6J("ngTemplateOutlet",t.contentTemplate)}}let ae=(()=>{class i{messageService;el;cd;set value(t){this.messages=t,this.startMessageLifes(this.messages)}closable=!0;style;styleClass;enableService=!0;key;escape=!0;severity;showTransitionOptions="300ms ease-out";hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)";valueChange=new e.vpe;templates;messages;messageSubscription;clearSubscription;timerSubscriptions=[];contentTemplate;constructor(t,n,s){this.messageService=t,this.el=n,this.cd=s}ngAfterContentInit(){this.templates?.forEach(t=>{t.getType(),this.contentTemplate=t.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t){Array.isArray(t)||(t=[t]);const n=t.filter(s=>this.key===s.key);this.messages=this.messages?[...this.messages,...n]:[...n],this.startMessageLifes(n),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let t=this.el.nativeElement.parentElement;return!(!t||!t.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(t){this.messages=this.messages?.filter((n,s)=>s!==t),this.valueChange.emit(this.messages)}get icon(){const t=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(t){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(t=>t.unsubscribe())}startMessageLifes(t){t?.forEach(n=>n.life&&this.startMessageLife(n))}startMessageLife(t){const n=function O(i=0,a,t=E.P){let n=-1;return null!=a&&((0,N.K)(a)?t=a:n=a),new A.y(s=>{let o=function Y(i){return i instanceof Date&&!isNaN(i)}(i)?+i-t.now():i;o<0&&(o=0);let r=0;return t.schedule(function(){s.closed||(s.next(r++),0<=n?this.schedule(void 0,n):s.complete())},o)})}(t.life).subscribe(()=>{this.messages=this.messages?.filter(s=>s!==t),this.timerSubscriptions=this.timerSubscriptions?.filter(s=>s!==n),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(n)}static \u0275fac=function(n){return new(n||i)(e.Y36(p.ez,8),e.Y36(e.SBq),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["p-messages"]],contentQueries:function(n,s,o){if(1&n&&e.Suo(o,p.jx,4),2&n){let r;e.iGM(r=e.CRH())&&(s.templates=r)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:8,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"class",4,"ngIf"],["class","p-message-icon",4,"ngIf"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-message-icon"],[4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[3,"styleClass"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(n,s){if(1&n&&(e.TgZ(0,"div",0),e.YNc(1,ie,2,1,"ng-container",1),e.YNc(2,se,3,2,"ng-template",null,2,e.W1O),e.qZA()),2&n){const o=e.MAs(3);e.Tol(s.styleClass),e.Q6J("ngStyle",s.style),e.uIk("aria-atomic",!0)("aria-live","assertive")("data-pc-name","message"),e.xp6(1),e.Q6J("ngIf",!s.contentTemplate)("ngIfElse",o)}},dependencies:function(){return[c.mk,c.sg,c.O5,c.tP,c.PC,m.H,F.n,U,k.x,w,f.q]},styles:["@layer primeng{.p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center;flex:none}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}}\n"],encapsulation:2,data:{animation:[(0,d.X$)("messageAnimation",[(0,d.eR)(":enter",[(0,d.oB)({opacity:0,transform:"translateY(-25%)"}),(0,d.jt)("{{showTransitionParams}}")]),(0,d.eR)(":leave",[(0,d.jt)("{{hideTransitionParams}}",(0,d.oB)({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return i})(),M=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[c.ez,m.T,F.n,U,k.x,w,f.q]})}return i})();function oe(i,a){if(1&i&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.Udp("display",null!=t.value&&0!==t.value?"flex":"none"),e.uIk("data-pc-section","label"),e.xp6(1),e.AsE("",t.value,"",t.unit,"")}}function le(i,a){if(1&i&&(e.TgZ(0,"div",3),e.YNc(1,oe,2,5,"div",4),e.qZA()),2&i){const t=e.oxw();e.Udp("width",t.value+"%")("background",t.color),e.uIk("data-pc-section","value"),e.xp6(1),e.Q6J("ngIf",t.showValue)}}function re(i,a){if(1&i&&(e.TgZ(0,"div",6),e._UZ(1,"div",7),e.qZA()),2&i){const t=e.oxw();e.uIk("data-pc-section","container"),e.xp6(1),e.Udp("background",t.color),e.uIk("data-pc-section","value")}}const ce=function(i,a){return{"p-progressbar p-component":!0,"p-progressbar-determinate":i,"p-progressbar-indeterminate":a}};let S=(()=>{class i{value;showValue=!0;styleClass;style;unit="%";mode="determinate";color;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=e.Xpm({type:i,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",styleClass:"styleClass",style:"style",unit:"unit",mode:"mode",color:"color"},decls:3,vars:14,consts:[["role","progressbar",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,le,2,6,"div",1),e.YNc(2,re,2,4,"div",2),e.qZA()),2&n&&(e.Tol(s.styleClass),e.Q6J("ngStyle",s.style)("ngClass",e.WLB(11,ce,"determinate"===s.mode,"indeterminate"===s.mode)),e.uIk("aria-valuemin",0)("aria-valuenow",s.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root"),e.xp6(1),e.Q6J("ngIf","determinate"===s.mode),e.xp6(1),e.Q6J("ngIf","indeterminate"===s.mode))},dependencies:[c.mk,c.O5,c.PC],styles:['@layer primeng{.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0})}return i})(),Z=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[c.ez]})}return i})();var pe=l(6593);const de=["advancedfileinput"],ue=["basicfileinput"],_e=["content"];function ge(i,a){if(1&i&&e._UZ(0,"span",18),2&i){const t=e.oxw(2);e.Tol(t.chooseIcon),e.Q6J("ngClass","p-button-icon p-button-icon-left"),e.uIk("aria-label",!0)("data-pc-section","chooseicon")}}function fe(i,a){1&i&&e._UZ(0,"PlusIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left"),e.uIk("aria-label",!0)("data-pc-section","chooseicon"))}function me(i,a){}function he(i,a){1&i&&e.YNc(0,me,0,0,"ng-template")}function ve(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,he,1,0,null,11),e.qZA()),2&i){const t=e.oxw(3);e.uIk("aria-label",!0)("data-pc-section","chooseicon"),e.xp6(1),e.Q6J("ngTemplateOutlet",t.chooseIconTemplate)}}function xe(i,a){if(1&i&&(e.ynx(0),e.YNc(1,fe,1,3,"PlusIcon",19),e.YNc(2,ve,2,3,"span",20),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.chooseIconTemplate),e.xp6(1),e.Q6J("ngIf",t.chooseIconTemplate)}}function Ie(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.uploadIcon),e.uIk("aria-hidden",!0)}}function be(i,a){1&i&&e._UZ(0,"UploadIcon",21),2&i&&e.Q6J("styleClass","p-button-icon p-button-icon-left")}function Ce(i,a){}function Te(i,a){1&i&&e.YNc(0,Ce,0,0,"ng-template")}function ye(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,Te,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",t.uploadIconTemplate)}}function Fe(i,a){if(1&i&&(e.ynx(0),e.YNc(1,be,1,1,"UploadIcon",19),e.YNc(2,ye,2,2,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.uploadIconTemplate),e.xp6(1),e.Q6J("ngIf",t.uploadIconTemplate)}}function we(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"p-button",23),e.NdJ("onClick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.upload())}),e.YNc(1,Ie,1,2,"span",24),e.YNc(2,Fe,3,2,"ng-container",8),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("label",t.uploadButtonLabel)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass",t.uploadStyleClass),e.xp6(1),e.Q6J("ngIf",t.uploadIcon),e.xp6(1),e.Q6J("ngIf",!t.uploadIcon)}}function Ue(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.cancelIcon)}}function ke(i,a){1&i&&e._UZ(0,"TimesIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left"),e.uIk("aria-hidden",!0))}function Me(i,a){}function Se(i,a){1&i&&e.YNc(0,Me,0,0,"ng-template")}function Ze(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,Se,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",t.cancelIconTemplate)}}function Je(i,a){if(1&i&&(e.ynx(0),e.YNc(1,ke,1,2,"TimesIcon",19),e.YNc(2,Ze,2,2,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.cancelIconTemplate),e.xp6(1),e.Q6J("ngIf",t.cancelIconTemplate)}}function Le(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"p-button",23),e.NdJ("onClick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clear())}),e.YNc(1,Ue,1,1,"span",24),e.YNc(2,Je,3,2,"ng-container",8),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("label",t.cancelButtonLabel)("disabled",!t.hasFiles()||t.uploading)("styleClass",t.cancelStyleClass),e.xp6(1),e.Q6J("ngIf",t.cancelIcon),e.xp6(1),e.Q6J("ngIf",!t.cancelIcon)}}function Qe(i,a){1&i&&e.GkF(0)}function Ae(i,a){if(1&i&&e._UZ(0,"p-progressBar",26),2&i){const t=e.oxw(2);e.Q6J("value",t.progress)("showValue",!1)}}function Ee(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"img",33),e.NdJ("error",function(s){e.CHM(t);const o=e.oxw(5);return e.KtG(o.imageError(s))}),e.qZA()}if(2&i){const t=e.oxw().$implicit,n=e.oxw(4);e.Q6J("src",t.objectURL,e.LSH)("width",n.previewWidth)}}function Ne(i,a){1&i&&e._UZ(0,"TimesIcon")}function Ye(i,a){}function Oe(i,a){1&i&&e.YNc(0,Ye,0,0,"ng-template")}function De(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",29)(1,"div"),e.YNc(2,Ee,1,2,"img",30),e.qZA(),e.TgZ(3,"div",31),e._uU(4),e.qZA(),e.TgZ(5,"div"),e._uU(6),e.qZA(),e.TgZ(7,"div")(8,"button",32),e.NdJ("click",function(s){const r=e.CHM(t).index,u=e.oxw(4);return e.KtG(u.remove(s,r))}),e.YNc(9,Ne,1,0,"TimesIcon",8),e.YNc(10,Oe,1,0,null,11),e.qZA()()()}if(2&i){const t=a.$implicit,n=e.oxw(4);e.xp6(2),e.Q6J("ngIf",n.isImage(t)),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(n.formatSize(t.size)),e.xp6(2),e.Tol(n.removeStyleClass),e.Q6J("disabled",n.uploading),e.xp6(1),e.Q6J("ngIf",!n.cancelIconTemplate),e.xp6(1),e.Q6J("ngTemplateOutlet",n.cancelIconTemplate)}}function Be(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,De,11,8,"div",28),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.files)}}function Pe(i,a){}function ze(i,a){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Pe,0,0,"ng-template",34),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.files)("ngForTemplate",t.fileTemplate)}}function He(i,a){if(1&i&&(e.TgZ(0,"div",27),e.YNc(1,Be,2,1,"div",8),e.YNc(2,ze,2,2,"div",8),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!t.fileTemplate),e.xp6(1),e.Q6J("ngIf",t.fileTemplate)}}function Re(i,a){1&i&&e.GkF(0)}const Ve=function(i,a){return{"p-focus":i,"p-disabled":a}},qe=function(i){return{$implicit:i}};function Ge(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",2)(1,"div",3)(2,"span",4),e.NdJ("focus",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onFocus())})("blur",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onBlur())})("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.choose())})("keydown.enter",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.choose())}),e.TgZ(3,"input",5,6),e.NdJ("change",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.onFileSelect(s))}),e.qZA(),e.YNc(5,ge,1,5,"span",7),e.YNc(6,xe,3,2,"ng-container",8),e.TgZ(7,"span",9),e._uU(8),e.qZA()(),e.YNc(9,we,3,5,"p-button",10),e.YNc(10,Le,3,5,"p-button",10),e.YNc(11,Qe,1,0,"ng-container",11),e.qZA(),e.TgZ(12,"div",12,13),e.NdJ("dragenter",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.onDragEnter(s))})("dragleave",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.onDragLeave(s))})("drop",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.onDrop(s))}),e.YNc(14,Ae,1,2,"p-progressBar",14),e._UZ(15,"p-messages",15),e.YNc(16,He,3,2,"div",16),e.YNc(17,Re,1,0,"ng-container",17),e.qZA()()}if(2&i){const t=e.oxw();e.Tol(t.styleClass),e.Q6J("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),e.uIk("data-pc-name","fileupload")("data-pc-section","root"),e.xp6(1),e.uIk("data-pc-section","buttonbar"),e.xp6(1),e.Tol(t.chooseStyleClass),e.Q6J("ngClass",e.WLB(30,Ve,t.focus,t.disabled||t.isChooseDisabled())),e.uIk("data-pc-section","choosebutton"),e.xp6(1),e.Q6J("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),e.uIk("title","")("data-pc-section","input"),e.xp6(2),e.Q6J("ngIf",t.chooseIcon),e.xp6(1),e.Q6J("ngIf",!t.chooseIcon),e.xp6(1),e.uIk("data-pc-section","choosebuttonlabel"),e.xp6(1),e.Oqu(t.chooseButtonLabel),e.xp6(1),e.Q6J("ngIf",!t.auto&&t.showUploadButton),e.xp6(1),e.Q6J("ngIf",!t.auto&&t.showCancelButton),e.xp6(1),e.Q6J("ngTemplateOutlet",t.toolbarTemplate),e.xp6(1),e.uIk("data-pc-section","content"),e.xp6(2),e.Q6J("ngIf",t.hasFiles()),e.xp6(1),e.Q6J("value",t.msgs)("enableService",!1),e.xp6(1),e.Q6J("ngIf",t.hasFiles()),e.xp6(1),e.Q6J("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",e.VKq(33,qe,t.files))}}function je(i,a){if(1&i&&e._UZ(0,"span",25),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.uploadIcon)}}function Ke(i,a){1&i&&e._UZ(0,"UploadIcon",21),2&i&&e.Q6J("styleClass","p-button-icon p-button-icon-left")}function $e(i,a){}function We(i,a){1&i&&e.YNc(0,$e,0,0,"ng-template")}function Xe(i,a){if(1&i&&(e.TgZ(0,"span",22),e.YNc(1,We,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngTemplateOutlet",t.uploadIconTemplate)}}function et(i,a){if(1&i&&(e.ynx(0),e.YNc(1,Ke,1,1,"UploadIcon",19),e.YNc(2,Xe,2,1,"span",20),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.uploadIconTemplate),e.xp6(1),e.Q6J("ngIf",t.uploadIconTemplate)}}function tt(i,a){if(1&i&&(e.ynx(0),e.YNc(1,je,1,1,"span",24),e.YNc(2,et,3,2,"ng-container",8),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.uploadIcon),e.xp6(1),e.Q6J("ngIf",!t.uploadIcon)}}function it(i,a){if(1&i&&e._UZ(0,"span",42),2&i){const t=e.oxw(3);e.Q6J("ngClass",t.chooseIcon)}}function nt(i,a){1&i&&e._UZ(0,"PlusIcon",21),2&i&&(e.Q6J("styleClass","p-button-icon p-button-icon-left pi"),e.uIk("aria-hidden",!0)("data-pc-section","uploadicon"))}function st(i,a){}function at(i,a){1&i&&e.YNc(0,st,0,0,"ng-template")}function ot(i,a){if(1&i&&(e.TgZ(0,"span",44),e.YNc(1,at,1,0,null,11),e.qZA()),2&i){const t=e.oxw(4);e.uIk("aria-hidden",!0)("data-pc-section","uploadicon"),e.xp6(1),e.Q6J("ngTemplateOutlet",t.chooseIconTemplate)}}function lt(i,a){if(1&i&&(e.ynx(0),e.YNc(1,nt,1,3,"PlusIcon",19),e.YNc(2,ot,2,3,"span",43),e.BQk()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!t.chooseIconTemplate),e.xp6(1),e.Q6J("ngIf",t.chooseIconTemplate)}}function rt(i,a){if(1&i&&(e.YNc(0,it,1,1,"span",41),e.YNc(1,lt,3,2,"ng-container",8)),2&i){const t=e.oxw(2);e.Q6J("ngIf",t.chooseIcon),e.xp6(1),e.Q6J("ngIf",!t.chooseIcon)}}function ct(i,a){if(1&i&&(e.TgZ(0,"span",9),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.uIk("data-pc-section","label"),e.xp6(1),e.Oqu(t.basicButtonLabel)}}function pt(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"input",45,46),e.NdJ("change",function(s){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onFileSelect(s))})("focus",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.onFocus())})("blur",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.onBlur())}),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled),e.uIk("data-pc-section","input")}}const dt=function(i,a,t,n){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":i,"p-fileupload-choose-selected":a,"p-focus":t,"p-disabled":n}};function ut(i,a){if(1&i){const t=e.EpF();e.TgZ(0,"div",35),e._UZ(1,"p-messages",15),e.TgZ(2,"span",36),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onBasicUploaderClick())})("keydown",function(s){e.CHM(t);const o=e.oxw();return e.KtG(o.onBasicKeydown(s))}),e.YNc(3,tt,3,2,"ng-container",37),e.YNc(4,rt,2,2,"ng-template",null,38,e.W1O),e.YNc(6,ct,2,2,"span",39),e.YNc(7,pt,2,4,"input",40),e.qZA()()}if(2&i){const t=e.MAs(5),n=e.oxw();e.uIk("data-pc-name","fileupload"),e.xp6(1),e.Q6J("value",n.msgs)("enableService",!1),e.xp6(1),e.Tol(n.styleClass),e.Q6J("ngClass",e.l5B(12,dt,!n.basicButtonLabel,n.hasFiles(),n.focus,n.disabled))("ngStyle",n.style),e.uIk("data-pc-section","choosebutton"),e.xp6(1),e.Q6J("ngIf",n.hasFiles()&&!n.auto)("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",n.basicButtonLabel),e.xp6(1),e.Q6J("ngIf",!n.hasFiles())}}let _t=(()=>{class i{document;platformId;renderer;el;sanitizer;zone;http;cd;config;name;url;method="post";multiple;accept;disabled;auto;withCredentials;maxFileSize;invalidFileSizeMessageSummary="{0}: Invalid file size, ";invalidFileSizeMessageDetail="maximum upload size is {0}.";invalidFileTypeMessageSummary="{0}: Invalid file type, ";invalidFileTypeMessageDetail="allowed file types: {0}.";invalidFileLimitMessageDetail="limit is {0} at most.";invalidFileLimitMessageSummary="Maximum number of files exceeded, ";style;styleClass;previewWidth=50;chooseLabel;uploadLabel;cancelLabel;chooseIcon;uploadIcon;cancelIcon;showUploadButton=!0;showCancelButton=!0;mode="advanced";headers;customUpload;fileLimit;uploadStyleClass;cancelStyleClass;removeStyleClass;chooseStyleClass;onBeforeUpload=new e.vpe;onSend=new e.vpe;onUpload=new e.vpe;onError=new e.vpe;onClear=new e.vpe;onRemove=new e.vpe;onSelect=new e.vpe;onProgress=new e.vpe;uploadHandler=new e.vpe;onImageError=new e.vpe;templates;advancedFileInput;basicFileInput;content;set files(t){this._files=[];for(let n=0;n<t.length;n++){let s=t[n];this.validate(s)&&(this.isImage(s)&&(s.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(t[n]))),this._files.push(t[n]))}}get files(){return this._files}get basicButtonLabel(){return this.auto||!this.hasFiles()?this.chooseLabel:this.uploadLabel??this.files[0].name}_files=[];progress=0;dragHighlight;msgs;fileTemplate;contentTemplate;toolbarTemplate;chooseIconTemplate;uploadIconTemplate;cancelIconTemplate;uploadedFileCount=0;focus;uploading;duplicateIEEvent;translationSubscription;dragOverListener;constructor(t,n,s,o,r,u,v,St,Zt){this.document=t,this.platformId=n,this.renderer=s,this.el=o,this.sanitizer=r,this.zone=u,this.http=v,this.cd=St,this.config=Zt}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"file":default:this.fileTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"toolbar":this.toolbarTemplate=t.template;break;case"chooseicon":this.chooseIconTemplate=t.template;break;case"uploadicon":this.uploadIconTemplate=t.template;break;case"cancelicon":this.cancelIconTemplate=t.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){(0,c.NF)(this.platformId)&&"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}getTranslation(t){return this.config.getTranslation(t)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(t){if("drop"!==t.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let n=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let s=0;s<n.length;s++){let o=n[s];this.isFileSelected(o)||this.validate(o)&&(this.isImage(o)&&(o.objectURL=this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(n[s]))),this.files.push(n[s]))}this.onSelect.emit({originalEvent:t,files:n,currentFiles:this.files}),this.fileLimit&&this.checkFileLimit(),this.hasFiles()&&this.auto&&("advanced"!==this.mode||!this.isFileLimitExceeded())&&this.upload(),"drop"!==t.type&&this.isIE11()?this.clearIEInput():this.clearInputElement()}isFileSelected(t){for(let n of this.files)if(n.name+n.type+n.size===t.name+t.type+t.size)return!0;return!1}isIE11(){if((0,c.NF)(this.platformId))return!!this.document.defaultView.MSInputMethodContext&&!!this.document.documentMode}validate(t){return this.msgs=this.msgs||[],this.accept&&!this.isFileTypeValid(t)?(this.msgs.push({severity:"error",summary:this.invalidFileTypeMessageSummary.replace("{0}",t.name),detail:this.invalidFileTypeMessageDetail.replace("{0}",this.accept)}),!1):!(this.maxFileSize&&t.size>this.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",t.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(t){let n=this.accept?.split(",").map(s=>s.trim());for(let s of n)if(this.isWildcard(s)?this.getTypeClass(t.type)===this.getTypeClass(s):t.type==s||this.getFileExtension(t).toLowerCase()===s.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return-1!==t.indexOf("*")}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let n=0;n<this.files.length;n++)t.append(this.name,this.files[n],this.files[n].name);this.http.request(this.method,this.url,{body:t,headers:this.headers,reportProgress:!0,observe:"events",withCredentials:this.withCredentials}).subscribe(n=>{switch(n.type){case _.dt.Sent:this.onSend.emit({originalEvent:n,formData:t});break;case _.dt.Response:this.uploading=!1,this.progress=0,n.status>=200&&n.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:n,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case _.dt.UploadProgress:n.loaded&&(this.progress=Math.round(100*n.loaded/n.total)),this.onProgress.emit({originalEvent:n,progress:this.progress})}this.cd.markForCheck()},n=>{this.uploading=!1,this.onError.emit({files:this.files,error:n})})}}clear(){this.files=[],this.uploadedFileCount=0,this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(t,n){this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[n]}),this.files.splice(n,1),this.checkFileLimit()}isFileLimitExceeded(){const n=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=n&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit<n}isChooseDisabled(){return this.auto?this.fileLimit&&this.fileLimit<=this.files.length:this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount}checkFileLimit(){this.msgs??=[],this.isFileLimitExceeded()&&this.msgs.push({severity:"error",summary:this.invalidFileLimitMessageSummary.replace("{0}",this.fileLimit.toString()),detail:this.invalidFileLimitMessageDetail.replace("{0}",this.fileLimit.toString())})}clearInputElement(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.advancedFileInput.nativeElement.value=""),this.basicFileInput&&this.basicFileInput.nativeElement&&(this.basicFileInput.nativeElement.value="")}clearIEInput(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.duplicateIEEvent=!0,this.advancedFileInput.nativeElement.value="")}hasFiles(){return this.files&&this.files.length>0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(x.p.addClass(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||x.p.removeClass(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){x.p.removeClass(this.content?.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let n=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||n&&1===n.length)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){const o=this.getTranslation(p.ws.FILE_SIZE_TYPES);if(0===t)return`0 ${o[0]}`;const r=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,r)).toFixed(3)} ${o[r]}`}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput?.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault()}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(p.ws.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(p.ws.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(p.ws.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||i)(e.Y36(c.K0),e.Y36(e.Lbi),e.Y36(e.Qsj),e.Y36(e.SBq),e.Y36(pe.H7),e.Y36(e.R0b),e.Y36(_.eN),e.Y36(e.sBO),e.Y36(p.b4))};static \u0275cmp=e.Xpm({type:i,selectors:[["p-fileUpload"]],contentQueries:function(n,s,o){if(1&n&&e.Suo(o,p.jx,4),2&n){let r;e.iGM(r=e.CRH())&&(s.templates=r)}},viewQuery:function(n,s){if(1&n&&(e.Gf(de,5),e.Gf(ue,5),e.Gf(_e,5)),2&n){let o;e.iGM(o=e.CRH())&&(s.advancedFileInput=o.first),e.iGM(o=e.CRH())&&(s.basicFileInput=o.first),e.iGM(o=e.CRH())&&(s.content=o.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass","class",4,"ngIf"],[4,"ngIf"],[1,"p-button-label"],["type","button",3,"label","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[3,"styleClass",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon","p-button-icon-left"],["type","button",3,"label","disabled","styleClass","onClick"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],[3,"value","showValue"],[1,"p-fileupload-files"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","pButton","",1,"p-button-icon-only",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","click","keydown"],[4,"ngIf","ngIfElse"],["chooseSection",""],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-icon p-button-icon-left pi",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(n,s){1&n&&(e.YNc(0,Ge,18,35,"div",0),e.YNc(1,ut,8,17,"div",1)),2&n&&(e.Q6J("ngIf","advanced"===s.mode),e.xp6(1),e.Q6J("ngIf","basic"===s.mode))},dependencies:function(){return[c.mk,c.sg,c.O5,c.tP,c.PC,g.Hq,g.zx,S,ae,m.H,T.p,y,f.q]},styles:["@layer primeng{.p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}}\n"],encapsulation:2,changeDetection:0})}return i})(),gt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[c.ez,_.JF,p.m8,g.hJ,Z,M,m.T,T.p,y,f.q,p.m8,g.hJ,Z,M]})}return i})();var ft=l(7017),mt=l(3726),h=l(5861),J=l(553),ht=l(3429),vt=l(9961),xt=l(7240),It=l(1344),bt=l(4795),L=l(95),Ct=l(2660),Tt=l(7680),yt=l(3965);function Ft(i,a){1&i&&e._UZ(0,"p-progressSpinner",18)}function wt(i,a){if(1&i&&(e.TgZ(0,"div",19)(1,"span",20)(2,"span",21),e._uU(3,"Installing..."),e.qZA(),e._UZ(4,"p-progressBar",22),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Q6J("value",t.progressValue)}}const Ut=function(){return{width:"200px"}},kt=[{path:"",component:(()=>{class i{instanceS;ns;generalS;feStoreCS;authS;loading={grid:!1};uploadedFiles=[];tarFile;uploadTarURL;version="";versions=[];selectedVersion;STORE_BE_HOST_PORT=J.N.STORE_BE_HOST_PORT;progressValue=0;intervalRef;constructor(t,n,s,o,r){this.instanceS=t,this.ns=n,this.generalS=s,this.feStoreCS=o,this.authS=r}ngOnInit(){this.version=J.N.VERSION,this.uploadTarURL=this.instanceS.deployAPIMakerURLString(),this.loadAPIMakerVersions().then(),this.generalS.setNewTitle("API Maker - Deploy"),this.startIncrementInterval()}startIncrementInterval(){this.intervalRef=setInterval(()=>{this.progressValue++},2500)}onUploadSuccess(){var t=this;return(0,h.Z)(function*(){t.ns.showSuccess("Your API Maker bundle uploaded successfully. System will restart"),yield t.instanceS.restartAPICallAndUILoadingAndReloadPage(),t.loading.grid=!1})()}onBeforeUpload(){this.loading.grid=!0,this.progressValue=0}onUploadError(){this.loading.grid=!1,this.ns.showError("File upload failed!")}tarFileSelected(t){var n=this;return(0,h.Z)(function*(){n.tarFile=t.currentFiles[0],n.ns.showInfo("Click on upload button to start deployment.")})()}loadAPIMakerVersions(){var t=this;return(0,h.Z)(function*(){let n="@sava-info-systems/api-maker";t.authS.backendSettings?.extensions&&(n="@sava-info-systems/api-maker-with-extensions");try{const s=yield t.feStoreCS.getNpmPackageVersions(t.STORE_BE_HOST_PORT,n);s.success?t.versions=s.data.map(o=>({name:o})).reverse():t.ns.showError(s.message)}catch(s){t.ns.showErrorFromResponse(s.error||s,"Unable to get list of API Maker versions.")}})()}deployAPIMakerVersionFromNPM(){var t=this;return(0,h.Z)(function*(){if(!t.selectedVersion)return void t.ns.showError("Please selection version to deploy");const n=t.selectedVersion.name;t.loading.grid=!0,t.progressValue=0;let s=`https://registry.npmjs.org/@sava-info-systems/api-maker/-/api-maker-${n}.tgz`;t.authS.backendSettings?.extensions&&(s=`https://registry.npmjs.org/@sava-info-systems/api-maker-with-extensions/-/api-maker-with-extensions-${n}.tgz`);try{const o=yield t.instanceS.deployAPIMakerAPICall({tarPath:s});let r;if(o.success){const u=o.data;for(const v of u)if(v.error){r=v.error.message;break}r?t.ns.showError(r):(t.ns.showSuccess("Your API Maker bundle uploaded successfully. System will restart"),yield t.instanceS.restartAPICallAndUILoadingAndReloadPage())}}catch(o){t.ns.showErrorFromResponse(o.error||o,"Unable to install API Maker version "+n)}t.loading.grid=!1})()}ngOnDestroy(){clearInterval(this.intervalRef)}static \u0275fac=function(n){return new(n||i)(e.Y36(ht.E),e.Y36(vt.W),e.Y36(xt.b),e.Y36(It.e),e.Y36(bt.e))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-deploy-api-maker"]],decls:23,vars:11,consts:[["id","about",1,"mt-3"],[1,"container"],[1,"row"],[1,"col-lg-8","mx-auto"],[1,"text-center","mb-3","mt-3"],["src","/assets/images/icons/api-maker-deployment.svg","alt","Deploy API Maker icon",1,"fa-fw","mr-1"],[1,"text-muted","text-center"],[1,"mt-3"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"row","m-0",2,"position","relative","padding","60px 0"],[1,"col-6","p-0","text-center"],["name","files","chooseIcon","pi pi-upload","accept",".tgz,.gz,.tar.gz","maxFileSize","100000000","chooseLabel","Select API Maker .tgz file",1,"d-inline-block",3,"id","url","multiple","onBeforeUpload","onUpload","onError","onSelect"],[2,"margin-top","28px"],["appendTo","body","optionLabel","name","filterBy","name","placeholder","Select a version",3,"options","ngModel","ngModelChange"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-upload","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s",4,"ngIf"],["class","text-center mt-5",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","0","animationDuration",".5s"],[1,"text-center","mt-5"],[2,"display","inline-block","width","70%"],[1,"d-inline-block","mb-1"],["color","#057d05",3,"value"]],template:function(n,s){1&n&&(e.TgZ(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),e._UZ(5,"img",5),e._uU(6," Deploy API Maker"),e.qZA(),e.TgZ(7,"div",6)(8,"span"),e._uU(9),e.qZA()()()()()(),e.TgZ(10,"section",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"p-fileUpload",11),e.NdJ("onBeforeUpload",function(){return s.onBeforeUpload()})("onUpload",function(){return s.onUploadSuccess()})("onError",function(){return s.onUploadError()})("onSelect",function(r){return s.tarFileSelected(r)}),e.qZA()(),e.TgZ(15,"div",10)(16,"div",12)(17,"p-dropdown",13),e.NdJ("ngModelChange",function(r){return s.selectedVersion=r}),e.qZA(),e.TgZ(18,"button",14),e.NdJ("click",function(){return s.deployAPIMakerVersionFromNPM()}),e._UZ(19,"i",15),e._uU(20," Deploy From NPM "),e.qZA()()(),e.YNc(21,Ft,1,0,"p-progressSpinner",16),e.qZA(),e.YNc(22,wt,5,1,"div",17),e.qZA()()),2&n&&(e.xp6(9),e.hij("Current Version : ",s.version,""),e.xp6(5),e.Q6J("id","id_api_maker_deploy_file_upload")("url",s.uploadTarURL)("multiple",!1),e.xp6(3),e.Akn(e.DdM(10,Ut)),e.Q6J("options",s.versions)("ngModel",s.selectedVersion),e.xp6(4),e.Q6J("ngIf",s.loading.grid),e.xp6(1),e.Q6J("ngIf",s.loading.grid))},dependencies:[L.JJ,L.On,c.O5,Ct.y,Tt.G,yt.Lt,_t,S]})}return i})(),canActivate:[mt.P]}];let Mt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.oAB({type:i});static \u0275inj=e.cJS({imports:[Q.Bz.forChild(kt),ft.u,gt]})}return i})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3139],{3139:(m,o,n)=>{n.r(o),n.d(o,{UtilityM:()=>M});var l=n(7664),d=n(7017),h=n(4946);const s=[{path:"monitoring",loadChildren:()=>n.e(2140).then(n.bind(n,2140)).then(t=>t.MonitoringM)},{path:"log-table",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(1025),n.e(5765),n.e(4186),n.e(885),n.e(7470),n.e(9243),n.e(7975),n.e(6236),n.e(5249),n.e(8125),n.e(1558),n.e(8592),n.e(8296)]).then(n.bind(n,8296)).then(t=>t.LogTableM)},{path:"sandbox-settings",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(885),n.e(7470),n.e(7975),n.e(6236),n.e(5249),n.e(8592),n.e(7368)]).then(n.bind(n,7368)).then(t=>t.SandboxSettingsM)},{path:"app-store",loadChildren:()=>n.e(913).then(n.bind(n,913)).then(t=>t.AppStoreM)},{path:"notes",loadChildren:()=>n.e(1957).then(n.bind(n,1957)).then(t=>t.NotesM)},{path:"utility-classes",loadChildren:()=>n.e(7649).then(n.bind(n,7649)).then(t=>t.UtilityClassesM)},{path:"internationalization",loadChildren:()=>n.e(2714).then(n.bind(n,5050)).then(t=>t.I18nM)},{path:"log-profile",loadChildren:()=>Promise.all([n.e(1678),n.e(4211),n.e(7987),n.e(1025),n.e(5765),n.e(4186),n.e(885),n.e(9243),n.e(8125),n.e(1558),n.e(8592),n.e(148)]).then(n.bind(n,148)).then(t=>t.LogProfileM)},{path:"native-process-logs",loadChildren:()=>n.e(2735).then(n.bind(n,2735)).then(t=>t.NativeProcessLogsM)},{path:"system-migration",loadChildren:()=>Promise.all([n.e(7975),n.e(8266)]).then(n.bind(n,8266)).then(t=>t.DatabasesMigrationM)},{path:"code-finder",loadChildren:()=>n.e(7470).then(n.bind(n,7470)).then(t=>t.CodeFinderM)},{path:"auto-increment",loadChildren:()=>n.e(5761).then(n.bind(n,5761)).then(t=>t.AutoIncrementM)},{path:"ts-gen-interfaces",loadChildren:()=>n.e(485).then(n.bind(n,485)).then(t=>t.TsGenInterfacesM)},{path:"deploy-api-maker",loadChildren:()=>n.e(3081).then(n.bind(n,3081)).then(t=>t.DeployApiMakerM)},{path:"code-comparator-model",loadChildren:()=>n.e(238).then(n.bind(n,238)).then(t=>t.CodeComparatorModelM)}];let M=(()=>{class t{static \u0275fac=function(C){return new(C||t)};static \u0275mod=h.oAB({type:t});static \u0275inj=h.cJS({imports:[l.Bz.forChild(s),d.u]})}return t})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3450],{3450:(m,c,a)=>{a.r(c),a.d(c,{DashDevM:()=>v});var e=a(7664),r=a(7017),s=a(4946),d=a(3885);let i=(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=s.Xpm({type:t,selectors:[["app-dash-dev"]],decls:4,vars:1,consts:[[1,"pt-1"],[1,"row","ml-0","mr-0"],[1,"col-6","pl-1","pr-1","full-body"],[3,"showCheckbox"]],template:function(n,f){1&n&&(s.TgZ(0,"div",0)(1,"div",1)(2,"div",2),s._UZ(3,"app-w-instances",3),s.qZA()()()),2&n&&(s.xp6(3),s.Q6J("showCheckbox",!1))},dependencies:[d.f],encapsulation:2})}return t})();var l=a(1678);const h=[{path:"",component:i,canActivate:[a(3726).P]}];let v=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=s.oAB({type:t});static \u0275inj=s.cJS({imports:[e.Bz.forChild(h),r.u,l.DashboardM]})}return t})()}}]);