@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.
- package/dist/1025.ad3d7fe2972421a7.js +1 -0
- package/dist/1097.f7edc9a254293cbe.js +1 -0
- package/dist/148.3d1172921fc38628.js +1 -0
- package/dist/1558.d77067ef3989dc57.js +1 -0
- package/dist/{1351.48e08341fba9b889.js → 1617.cd35a3a268fd8f90.js} +1 -1
- package/dist/1678.2c6fe869dc9df280.js +1 -0
- package/dist/1754.616b92791d39dab1.js +1 -0
- package/dist/1928.a299b3986d670379.js +1 -0
- package/dist/1957.cafa315c70f23efe.js +1 -0
- package/dist/2140.82e389d21656cd83.js +1 -0
- package/dist/2295.b066a00a7c4c4d9c.js +1 -0
- package/dist/238.6207cf874f0ff82a.js +1 -0
- package/dist/2473.6a522dcf87dfb922.js +1 -0
- package/dist/2714.1ed8bfd73f5693eb.js +1 -0
- package/dist/{3611.9577d58af5f1f4aa.js → 2735.880b4c038ef3207e.js} +1 -1
- package/dist/2908.c7cbde300e1840a4.js +1 -0
- package/dist/3081.e470a8aeed4a7745.js +1 -0
- package/dist/3139.7a6ebcaa6a5f38f6.js +1 -0
- package/dist/3450.68d8d179c9496764.js +1 -0
- package/dist/4110.1747a68dfaacbbd8.js +1 -0
- package/dist/4186.601304798e909236.js +1 -0
- package/dist/4211.b7a72c8db8263edf.js +1 -0
- package/dist/4575.987834c6e73af961.js +1 -0
- package/dist/4842.f89ded9e1e9f1110.js +1 -0
- package/dist/485.b333cf63f954b75c.js +1 -0
- package/dist/4895.95e42b567a89ce84.js +1 -0
- package/dist/5249.52aa732ef6a173c5.js +1 -0
- package/dist/5334.8ed5b236a6948681.js +1 -0
- package/dist/5421.e729ed3585afa9af.js +1 -0
- package/dist/5679.53292305f1448567.js +1 -0
- package/dist/5761.c363fe26244e8787.js +1 -0
- package/dist/5765.e70cd773673bfe27.js +1 -0
- package/dist/6236.b81e95926f7fcd60.js +1 -0
- package/dist/6393.1323e8b7d2cdae70.js +1 -0
- package/dist/6401.02e5b3cb94d0322a.js +1 -0
- package/dist/{8970.8eece52bbc1c316c.js → 6925.d59cabb0e343d24c.js} +1 -1
- package/dist/7368.4c04430d3efc5947.js +1 -0
- package/dist/{2442.adbc5b49349bb569.js → 7436.7e4876b9e90efde6.js} +1 -1
- package/dist/7470.9195bddaee5202e0.js +1 -0
- package/dist/7649.870e05f3aa978078.js +1 -0
- package/dist/7975.dbe6e674c50ab553.js +1 -0
- package/dist/7977.35ebfb6f4c9503b4.js +1 -0
- package/dist/7987.37367b65a76d5083.js +1 -0
- package/dist/8125.58e1a7a385797896.js +1 -0
- package/dist/8266.d665463de8b8d75a.js +1 -0
- package/dist/8296.32f107844a1381b6.js +1 -0
- package/dist/{3732.b5ac36f1448e215c.js → 8374.11d430ef2432bfba.js} +1 -1
- package/dist/{6589.b9c83295e466e464.js → 8682.5bde1163690a18dc.js} +1 -1
- package/dist/8841.6cb824dd9d5ad8f8.js +1 -0
- package/dist/885.e3d53b62c51f8311.js +1 -0
- package/dist/{9785.35cc7f0c3778344e.js → 891.333c6913b8246e3c.js} +1 -1
- package/dist/913.7d41933171ab9fbe.js +1 -0
- package/dist/9243.c223cdbc4cd84cb8.js +1 -0
- package/dist/9575.0a35a4da70f9e6e5.js +1 -0
- package/dist/9939.218315684234eb18.js +1 -0
- package/dist/common.442040891fd4ef29.js +1 -0
- package/dist/index.html +1 -1
- package/dist/main.9630ecd9c9613e82.js +1 -0
- package/dist/polyfills.93062920aa87d580.js +1 -0
- package/dist/runtime.21919a870e05d69b.js +1 -0
- package/main.js +1 -1
- package/package.json +4 -4
- package/sandbox/sandbox.js +1 -1
- package/src/tools/local-client.js +1 -1
- package/dist/1417.5caf023140e7c67f.js +0 -1
- package/dist/1468.d42293f7d802a787.js +0 -1
- package/dist/1959.a22fe393419f10c5.js +0 -1
- package/dist/2162.3c94f3d66c6312d5.js +0 -1
- package/dist/2818.71176f4848a9419f.js +0 -1
- package/dist/3488.ada60be2dbcd9845.js +0 -1
- package/dist/3545.b5585792e9fe1447.js +0 -1
- package/dist/3605.3c6cdf2a08c47301.js +0 -1
- package/dist/3621.412300a009ea6346.js +0 -1
- package/dist/379.d3e61f3350a595dc.js +0 -1
- package/dist/3929.9ac933e926943db2.js +0 -1
- package/dist/4092.71b0eccc0cb429f0.js +0 -1
- package/dist/4124.a8329e77343e7087.js +0 -1
- package/dist/4316.542be541e58dff84.js +0 -1
- package/dist/4344.d8f42d425eaec852.js +0 -1
- package/dist/4689.e827720779e0cf34.js +0 -1
- package/dist/4709.262c34f60b50ebc9.js +0 -1
- package/dist/4774.a4368f3ce2e778da.js +0 -1
- package/dist/4880.70ca405524206be7.js +0 -1
- package/dist/5011.ed9a6465223f760d.js +0 -1
- package/dist/5090.c8bf74c35b0a5d26.js +0 -1
- package/dist/5140.581ccd2699e2a8a8.js +0 -1
- package/dist/5362.912e053f78479e90.js +0 -1
- package/dist/5442.186b40719e7c1da9.js +0 -1
- package/dist/5455.a1d0d507419e3c59.js +0 -1
- package/dist/5729.f0ee236ba6579a94.js +0 -1
- package/dist/5826.44efead20568788a.js +0 -1
- package/dist/6053.67f38f7b35484475.js +0 -1
- package/dist/6220.b6c29e6e3e717880.js +0 -1
- package/dist/6415.a48241737e134178.js +0 -1
- package/dist/6679.c5073d3a60b67e2e.js +0 -1
- package/dist/6828.36c6805f2b3c6f38.js +0 -1
- package/dist/6866.4dd76a41246a20be.js +0 -1
- package/dist/6882.fe03a3df377ca119.js +0 -1
- package/dist/7014.5db4db60cc21782e.js +0 -1
- package/dist/7152.dab3cc50472f703f.js +0 -1
- package/dist/7367.ba1e63db0f9b97f4.js +0 -1
- package/dist/7374.ebfe1004d1773912.js +0 -1
- package/dist/7597.177f15771dcdea42.js +0 -1
- package/dist/7759.2b4ed39a62323abd.js +0 -1
- package/dist/807.dba59148bbbbe7fb.js +0 -1
- package/dist/8219.2c97945d465ab185.js +0 -1
- package/dist/8447.8caa67c3eb5d2b55.js +0 -1
- package/dist/9036.876c1f0c1ce4e82b.js +0 -1
- package/dist/9347.4e7d02eee86c5778.js +0 -1
- package/dist/9429.9299aa0abda3dc76.js +0 -1
- package/dist/9882.a94c746b42e5fc0e.js +0 -1
- package/dist/9957.47ed0e74bdfeddd5.js +0 -1
- package/dist/common.d4eb1616e93e21e1.js +0 -1
- package/dist/main.1da32156380b46d5.js +0 -1
- package/dist/polyfills.9cbb1c8222a6b6c3.js +0 -1
- package/dist/runtime.212fca73d6a42b3a.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2818,6589,8970,1351,3732],{9117:(F,T,o)=>{o.d(T,{k:()=>Q});var d=o(467),t=o(4341),u=o(8727),h=o(5046),v=o(7376),S=o(2461),g=o(6645),n=o(540),O=o(6708),A=o(6268),M=o(6129),s=o(7237),b=o(5938),N=o(3966),G=o(5203),k=o(1987),U=o(177),w=o(3478),P=o(7515),x=o(8150);function B(m,C){1&m&&(n.j41(0,"span"),n.nrm(1,"i",29),n.EFF(2," Add Instance"),n.k0s())}function y(m,C){1&m&&(n.j41(0,"span"),n.nrm(1,"i",30),n.EFF(2," View Instance"),n.k0s())}function j(m,C){1&m&&(n.j41(0,"span"),n.nrm(1,"i",31),n.EFF(2," Edit Instance"),n.k0s())}function L(m,C){if(1&m&&(n.j41(0,"div")(1,"div",10)(2,"label",11),n.EFF(3,"Username"),n.k0s(),n.j41(4,"div",12),n.nrm(5,"p-dropdown",32),n.k0s()(),n.j41(6,"div",10)(7,"label",11),n.EFF(8,"Password"),n.k0s(),n.j41(9,"div",12),n.nrm(10,"p-dropdown",33),n.k0s()(),n.j41(11,"div",10)(12,"label",11),n.EFF(13,"Privilege"),n.k0s(),n.j41(14,"div",12),n.nrm(15,"p-dropdown",34),n.k0s()()()),2&m){const a=n.XpG();n.R7$(5),n.Y8G("options",a.connectionStringSecrets)("filter",!0),n.R7$(5),n.Y8G("options",a.connectionStringSecrets)("filter",!0),n.R7$(5),n.Y8G("options",a.privileges)("filter",!0)}}function K(m,C){if(1&m){const a=n.RV6();n.j41(0,"a",35),n.bIt("click",function(){n.eBV(a);const l=n.XpG();return n.Njj(l.openSecret())}),n.nrm(1,"i",36),n.EFF(2," Open Secret "),n.k0s()}}function X(m,C){1&m&&n.nrm(0,"i",37)}function V(m,C){1&m&&n.nrm(0,"i",38)}function W(m,C){1&m&&(n.j41(0,"span"),n.EFF(1,"Save Instance"),n.k0s())}function Y(m,C){1&m&&(n.j41(0,"span"),n.EFF(1,"Update Instance"),n.k0s())}function z(m,C){if(1&m){const a=n.RV6();n.j41(0,"button",39),n.bIt("click",function(){n.eBV(a);const l=n.XpG();return n.Njj(l.save())}),n.nrm(1,"i",40),n.DNE(2,W,2,0,"span",4),n.DNE(3,Y,2,0,"span",4),n.k0s()}if(2&m){const a=n.XpG();n.Y8G("disabled",a.form.invalid||a.loading.form),n.R7$(2),n.Y8G("ngIf",a.data.mode===a.EFormMode.ADD),n.R7$(1),n.Y8G("ngIf",a.data.mode===a.EFormMode.EDIT)}}function J(m,C){1&m&&n.nrm(0,"p-progressSpinner",41)}let Q=(()=>{class m{fb;ns;instanceS;generalS;authCS;dataProviderS;eventCenterS;secretS;constantsS;data;loading={form:!1};EFormMode=h.X;EInstanceType=S.N;IInstanceProps=g.Nl;form;subscriptions=[];instanceTypes=[];privileges=[];connectionStringSecrets=[];instanceTested;isFromMarkTested;constructor(a,_,l,f,D,R,Z,H,q){this.fb=a,this.ns=_,this.instanceS=l,this.generalS=f,this.authCS=D,this.dataProviderS=R,this.eventCenterS=Z,this.secretS=H,this.constantsS=q}ngOnInit(){var a=this;return(0,d.A)(function*(){a.instanceTypes=a.dataProviderS.getInstanceTypes(),a.privileges=a.dataProviderS.getListOfOraclePrivilege(),a.createForm(),a.subscriptions.push(a.data.eventChannel.subscribe(function(){var _=(0,d.A)(function*(l){if(l)if(a.form.enable(),yield a.loadConnectionStringFromSecret(),l.action===u.K.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.K.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.K.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.A)(function*(l){l&&l.action===u.K.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.k0.required]],name:[null,[t.k0.required]],connectionString:[null,[t.k0.required]],username:[null,[]],password:[null,[]],privilege:[null,[]],maxPoolConnections:[null,[t.k0.required]]}),this.manageValidations()}manageValidations(){this.form.valueChanges.subscribe(()=>{this.instanceTested=!1,this.isFromMarkTested=!1});const a=this.form.get(g.Nl.type),_=this.form.get(g.Nl.username),l=this.form.get(g.Nl.password),f=this.form.get(g.Nl.privilege);a.valueChanges.subscribe(function(){var D=(0,d.A)(function*(R){R&&(R===S.N.ORACLE_DB?(_.setValidators([t.k0.required]),l.setValidators([t.k0.required]),f.setValidators([t.k0.required])):(_.setValidators([]),l.setValidators([]),f.setValidators([])),_.updateValueAndValidity(),l.updateValueAndValidity(),f.updateValueAndValidity())});return function(R){return D.apply(this,arguments)}}())}setDefaultValuesInForm(){this.loading.form=!1,this.form.get(g.Nl.type).setValue(this.instanceTypes[0].value),this.form.get(g.Nl.maxPoolConnections).setValue(1e4),this.form.get(g.Nl.connectionString).setValue(this.connectionStringSecrets[0])}testInstance(a){var _=this;return(0,d.A)(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===h.X.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.A)(function*(){if(!a.isFromMarkTested&&(yield a.testInstance(!0),!a.instanceTested))return;const _=a.form.getRawValue();_.user=a.authCS.getUserId(),_.type===S.N.MONGO_DB&&(_.maxPoolConnections=1e4);try{let l;if(a.loading.form=!0,a.data.mode===h.X.ADD)l=yield a.instanceS.post(_).toPromise();else if(a.data.mode===h.X.EDIT){const f=v.merge({},a.data.formData,_);l=yield a.instanceS.put(a.data.formData._id,f,{select:g.GX._id}).toPromise()}a.ns.showSuccess(`Instance ${a.data.mode===h.X.ADD?"added":"edited"} successfully.`),a.data.eventChannel.emit({action:a.data.mode===h.X.ADD?u.K.SAVED:u.K.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.A)(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.A)(function*(){a.eventCenterS.headerC.dataSecretForm.formData=yield a.getDefaultSecret(),a.eventCenterS.headerC.dataSecretForm.mode=h.X.EDIT,a.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:u.K.OPEN_FORM_IN_EDIT_MODE}),a.eventCenterS.headerC.secManFormC.showModal()})()}getDefaultSecret(){var a=this;return(0,d.A)(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.rXU(t.ok),n.rXU(O.m),n.rXU(A.J),n.rXU(M.f),n.rXU(s.l),n.rXU(b.n),n.rXU(N.d),n.rXU(G.S),n.rXU(k.X))};static \u0275cmp=n.VBU({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.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),n.DNE(4,B,3,0,"span",4),n.DNE(5,y,3,0,"span",4),n.DNE(6,j,3,0,"span",4),n.j41(7,"button",5)(8,"span",6),n.nrm(9,"i",7),n.k0s()()(),n.j41(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),n.EFF(14,"Database Type"),n.k0s(),n.j41(15,"div",12)(16,"div",13),n.nrm(17,"p-dropdown",14),n.k0s()()(),n.j41(18,"div",10)(19,"label",11),n.EFF(20,"Instance Name"),n.k0s(),n.j41(21,"div",12),n.nrm(22,"input",15),n.k0s()(),n.DNE(23,L,16,6,"div",4),n.j41(24,"div")(25,"div",10)(26,"label",11),n.EFF(27,"Connection String"),n.k0s(),n.j41(28,"div",12),n.nrm(29,"p-dropdown",16),n.k0s(),n.j41(30,"div",17),n.DNE(31,K,3,0,"a",18),n.k0s()()(),n.j41(32,"div",19)(33,"label",11),n.EFF(34,"Max Pool Connections"),n.k0s(),n.j41(35,"div",12),n.nrm(36,"input",20),n.k0s()()()(),n.j41(37,"div",21)(38,"div")(39,"button",22),n.bIt("click",function(){return l.testInstance()}),n.DNE(40,X,1,0,"i",23),n.DNE(41,V,1,0,"i",24),n.EFF(42," Test Instance "),n.k0s(),n.DNE(43,z,4,3,"button",25),n.j41(44,"button",26),n.nrm(45,"i",27),n.EFF(46," Close"),n.k0s()()(),n.DNE(47,J,1,0,"p-progressSpinner",28),n.k0s()()()),2&_&&(n.R7$(4),n.Y8G("ngIf",l.data.mode===l.EFormMode.ADD),n.R7$(1),n.Y8G("ngIf",l.data.mode===l.EFormMode.VIEW),n.R7$(1),n.Y8G("ngIf",l.data.mode===l.EFormMode.EDIT),n.R7$(5),n.Y8G("formGroup",l.form),n.R7$(6),n.Y8G("options",l.instanceTypes)("filter",!0),n.R7$(6),n.Y8G("ngIf",l.form.get("type").value===l.EInstanceType.ORACLE_DB),n.R7$(6),n.Y8G("options",l.connectionStringSecrets)("filter",!0),n.R7$(2),n.Y8G("ngIf",l.data.mode!==l.EFormMode.VIEW),n.R7$(1),n.Y8G("hidden",l.form.get("type").value===l.EInstanceType.MONGO_DB),n.R7$(7),n.Y8G("disabled",l.form.invalid||l.loading.form),n.R7$(1),n.Y8G("ngIf",l.instanceTested),n.R7$(1),n.Y8G("ngIf",!l.instanceTested),n.R7$(2),n.Y8G("ngIf",l.data.mode!==l.EFormMode.VIEW),n.R7$(1),n.Y8G("disabled",l.loading.form),n.R7$(3),n.Y8G("ngIf",l.loading.form))},dependencies:[t.qT,t.me,t.Q0,t.BC,t.cb,t.VZ,t.j4,t.JD,U.bT,w.U,P.p,x.ms],encapsulation:2})}return m})()},4218:(F,T,o)=>{o.d(T,{_:()=>ct});var d=o(467),t=o(540),u=o(8727),h=o(5046),v=o(7326),E=o(7376),g=o(6645),n=o(6589),O=o(2461),A=o(6268),M=o(7058),s=o(6129),b=o(6708),N=o(7337),G=o(7237),k=o(1987),U=o(7060),w=o(3966),P=o(5779),x=o(4341),B=o(177),y=o(7645),j=o(7515),L=o(8542),K=o(1631),X=o(5430),V=o(9117);const W=["instancesFormC"];function Y(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",20),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.edit())}),t.nrm(1,"i",21),t.k0s()}}function z(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",22),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.clone())}),t.nrm(1,"i",23),t.k0s()}}function J(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",24),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.active())}),t.nrm(1,"i",25),t.k0s()}}function Q(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",26),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.inactiveDialog())}),t.nrm(1,"i",27),t.k0s()}}function m(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",28),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.removePermanentDialog())}),t.nrm(1,"i",29),t.k0s()}}function C(i,p){if(1&i){const e=t.RV6();t.j41(0,"span")(1,"a",9),t.nrm(2,"img",10),t.k0s(),t.j41(3,"span",11)(4,"p-inputSwitch",12),t.bIt("ngModelChange",function(r){t.eBV(e);const I=t.XpG();return t.Njj(I.showAll=r)})("onChange",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.showAllChanges())}),t.k0s()(),t.j41(5,"span",13),t.bIt("click",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.add())}),t.nrm(6,"i",14),t.k0s(),t.DNE(7,Y,2,0,"span",15),t.DNE(8,z,2,0,"span",16),t.DNE(9,J,2,0,"span",17),t.DNE(10,Q,2,0,"span",18),t.DNE(11,m,2,0,"span",19),t.k0s()}if(2&i){const e=t.XpG();t.R7$(4),t.Y8G("ngModel",e.showAll),t.R7$(3),t.Y8G("ngIf",e.selectedRows.length),t.R7$(1),t.Y8G("ngIf",e.selectedRows.length),t.R7$(1),t.Y8G("ngIf",e.selectedRows.length&&!1===e.selectedRows[0].active),t.R7$(1),t.Y8G("ngIf",e.selectedRows.length&&!0===e.selectedRows[0].active),t.R7$(1),t.Y8G("ngIf",e.selectedRows.length&&!1===e.selectedRows[0].active)}}function a(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",30)(1,"label",31)(2,"p-checkbox",32),t.bIt("ngModelChange",function(r){t.eBV(e);const I=t.XpG();return t.Njj(I.eventCenterS.group.apisRegex.allInstances=r)}),t.k0s()()()}if(2&i){const e=t.XpG();t.R7$(2),t.Y8G("ngModel",e.eventCenterS.group.apisRegex.allInstances)("binary",!0)}}function _(i,p){if(1&i){const e=t.RV6();t.j41(0,"span",30)(1,"label",31)(2,"p-checkbox",32),t.bIt("ngModelChange",function(r){t.eBV(e);const I=t.XpG();return t.Njj(I.eventCenterS.filterInLog.apisRegex.allInstances=r)}),t.k0s()()()}if(2&i){const e=t.XpG();t.R7$(2),t.Y8G("ngModel",e.eventCenterS.filterInLog.apisRegex.allInstances)("binary",!0)}}function l(i,p){if(1&i&&(t.j41(0,"div")(1,"div",33),t.EFF(2),t.k0s()()),2&i){const e=t.XpG();t.R7$(2),t.JRh(e.constantsS.group.allInstancesPermitted)}}function f(i,p){1&i&&(t.j41(0,"th",43),t.nrm(1,"p-tableHeaderCheckbox"),t.k0s())}function D(i,p){1&i&&t.nrm(0,"th",41)}function R(i,p){1&i&&(t.j41(0,"th",44),t.EFF(1,"Pre"),t.k0s())}function Z(i,p){1&i&&(t.j41(0,"th",44),t.EFF(1,"Post"),t.k0s())}function H(i,p){if(1&i&&(t.j41(0,"tr"),t.DNE(1,f,2,0,"th",39),t.DNE(2,D,1,0,"th",40),t.nrm(3,"th",41),t.j41(4,"th"),t.EFF(5,"Instance Name"),t.k0s(),t.DNE(6,R,2,0,"th",42),t.DNE(7,Z,2,0,"th",42),t.k0s()),2&i){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf",e.showCheckbox),t.R7$(1),t.Y8G("ngIf",e.showAll),t.R7$(4),t.Y8G("ngIf",e.showHooksCount),t.R7$(1),t.Y8G("ngIf",e.showHooksCount)}}function q(i,p){if(1&i&&(t.j41(0,"td"),t.nrm(1,"p-tableCheckbox",49),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("value",e)("pSelectableRow",e)}}function tt(i,p){1&i&&t.nrm(0,"i",52)}function et(i,p){1&i&&t.nrm(0,"i",53)}function nt(i,p){if(1&i&&(t.j41(0,"td"),t.DNE(1,tt,1,0,"i",50),t.DNE(2,et,1,0,"i",51),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("ngIf",e.active),t.R7$(1),t.Y8G("ngIf",!e.active)}}function st(i,p){if(1&i&&(t.j41(0,"td",54),t.EFF(1),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(1),t.JRh(e.preHookCount||"")}}function at(i,p){if(1&i&&(t.j41(0,"td",54),t.EFF(1),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(1),t.JRh(e.postHookCount||"")}}function ot(i,p){if(1&i&&(t.j41(0,"tr",45),t.DNE(1,q,2,2,"td",3),t.DNE(2,nt,3,2,"td",3),t.j41(3,"td"),t.nrm(4,"img",46),t.k0s(),t.j41(5,"td",47),t.EFF(6),t.k0s(),t.DNE(7,st,2,1,"td",48),t.DNE(8,at,2,1,"td",48),t.k0s()),2&i){const e=p.$implicit,c=t.XpG(2);t.Y8G("pSelectableRow",e),t.R7$(1),t.Y8G("ngIf",c.showCheckbox),t.R7$(1),t.Y8G("ngIf",c.showAll),t.R7$(2),t.Aen("MONGO_DB"==e.type?"width:0.5rem":"width:1rem"),t.FS9("src",c.getInstanceIconUrl(e.type),t.B4B),t.FS9("alt",e.type),t.R7$(2),t.JRh(e.name),t.R7$(1),t.Y8G("ngIf",c.showHooksCount),t.R7$(1),t.Y8G("ngIf",c.showHooksCount)}}function it(i,p){1&i&&t.nrm(0,"p-progressSpinner",55)}function rt(i,p){if(1&i){const e=t.RV6();t.j41(0,"div",34)(1,"p-table",35),t.bIt("selectionChange",function(r){t.eBV(e);const I=t.XpG();return t.Njj(I.selectedRows=r)})("selectionChange",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.instanceSelected())})("dblclick",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.dblClickInstance())}),t.DNE(2,H,8,4,"ng-template",36),t.DNE(3,ot,9,10,"ng-template",37),t.k0s(),t.DNE(4,it,1,0,"p-progressSpinner",38),t.k0s()}if(2&i){const e=t.XpG();t.R7$(1),t.Y8G("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.R7$(3),t.Y8G("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:h.X.ADD,eventChannel:new t.bkB,formData:void 0};rows=[];rowsMap={};showAll=!1;gridKey=g.GX._id;selectedRows=[];instanceIdsSkipSubscription=!1;EInstanceType=O.N;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.A)(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.A)(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.A)(function*(){e.instanceIdsSkipSubscription||e.loadGridData()}))),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var c=(0,d.A)(function*(r){(r.action===u.K.SAVED||r.action===u.K.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.A)(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=E.keyBy(e.rows,g.GX._id)):e.resetGridAndUrl(),e.showHooksCount&&(yield e.instanceS.setHooksCountInInstanceArr(e.rows));const I=e.navigationCS.getQueryParam(v.F.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.A)(function*(){e.rows=[],e.rowsMap={},e.selectedRows=[],e.eventCenterS.instance.selectedInstances.next([])})()}showAllChanges(){var e=this;return(0,d.A)(function*(){yield e.resetSelectedRows(),yield e.loadGridData()})()}add(){this.data.formData=void 0,this.data.mode=h.X.ADD,this.data.eventChannel.emit({action:u.K.OPEN_FORM_IN_ADD_MODE}),this.instancesFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=h.X.VIEW,this.data.eventChannel.emit({action:u.K.OPEN_FORM_IN_VIEW_MODE}),this.instancesFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=h.X.EDIT,this.data.eventChannel.emit({action:u.K.OPEN_FORM_IN_EDIT_MODE}),this.instancesFormC.showModal()}clone(){var e=this;return(0,d.A)(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.A)(function*(){var c;e.confirmationService.confirm({message:e.constantsS.instance.inactiveConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(c=(0,d.A)(function*(){yield e.inactive()}),function(){return c.apply(this,arguments)})})})()}removePermanentDialog(){var e=this;return(0,d.A)(function*(){var c;e.confirmationService.confirm({message:e.constantsS.instance.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(c=(0,d.A)(function*(){yield e.removePermanent()}),function(){return c.apply(this,arguments)})})})()}active(){var e=this;return(0,d.A)(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.A)(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.A)(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.A)(function*(){e.selectedRows.length=0,e.eventCenterS.instance.selectedInstances.next([]),yield e.navigationCS.setQueryParam(v.F.instance,null)})()}instanceSelected(){var e=this;return(0,d.A)(function*(){e.eventCenterS.instance.selectedInstances.next(e.selectedRows),e.isDependentOnGroup||e.isFilterLogTable?e.setInstanceIds():(yield e.navigationCS.setQueryParam(v.F.instance,E.map(e.selectedRows,"_id").join(",")||null),yield e.generalS.resetUrlParams([v.F.database,v.F.collection,v.F.collection_api]))})()}dblClickInstance(){this.selectedRows.length&&!this.isDependentOnGroup&&!this.isFilterLogTable&&this.edit()}setInstanceIds(){this.instanceIdsSkipSubscription=!0,this.eventCenterS.filterInLog.instanceIds.next(E.map(this.selectedRows,"_id")),this.eventCenterS.group.instanceIds.next(E.map(this.selectedRows,"_id")),this.instanceIdsSkipSubscription=!1}getInstanceIconUrl(e){return e===O.N.SQL_SERVER_DB?"./assets/images/svg/Microsoft_SQL_Server_DB_No_Logo.svg":e===O.N.ORACLE_DB?"./assets/images/svg/Oracle_DB_No_Logo.svg":`./assets/images/svg/${e}.svg`}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=n.mO;static \u0275fac=function(c){return new(c||i)(t.rXU(A.J),t.rXU(M.X),t.rXU(s.f),t.rXU(b.m),t.rXU(N.$),t.rXU(G.l),t.rXU(k.X),t.rXU(U.Ix),t.rXU(t.gRc),t.rXU(w.d),t.rXU(P.td))};static \u0275cmp=t.VBU({type:i,selectors:[["app-w-instances"]],viewQuery:function(c,r){if(1&c&&t.GBs(W,5),2&c){let I;t.mGM(I=t.lsd())&&(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.j41(0,"div",0)(1,"div",1)(2,"span"),t.nrm(3,"i",2),t.EFF(4," Instances"),t.k0s(),t.DNE(5,C,12,6,"span",3),t.DNE(6,a,3,2,"span",4),t.DNE(7,_,3,2,"span",4),t.k0s(),t.j41(8,"div",5),t.DNE(9,l,3,1,"div",3),t.DNE(10,rt,5,7,"div",6),t.k0s()(),t.nrm(11,"app-w-instances-form",7,8)),2&c&&(t.R7$(5),t.Y8G("ngIf",!r.isReadOnly),t.R7$(1),t.Y8G("ngIf",r.isDependentOnGroup),t.R7$(1),t.Y8G("ngIf",r.isFilterLogTable),t.R7$(2),t.Y8G("ngIf",r.eventCenterS.group.apisRegex.allInstances||r.eventCenterS.filterInLog.apisRegex.allInstances),t.R7$(1),t.Y8G("ngIf",!(r.eventCenterS.group.apisRegex.allInstances||r.eventCenterS.filterInLog.apisRegex.allInstances)),t.R7$(1),t.Y8G("data",r.data))},dependencies:[x.BC,x.vS,B.bT,y.XI,P.Ei,y.d5,y.S9,y.nA,j.p,L.m,K.HW,X.Sc,V.k]})}return i})()},2818:(F,T,o)=>{o.r(T),o.d(T,{DashboardM:()=>g});var d=o(7060),t=o(1709),v=(o(4218),o(9117),o(540));const E=[{path:"root",loadChildren:()=>o.e(9785).then(o.bind(o,9785)).then(n=>n.DashRootM)},{path:"redis-dashboard",loadChildren:()=>o.e(2162).then(o.bind(o,2162)).then(n=>n.RedisDashboardM)},{path:"summary-dashboard",loadChildren:()=>Promise.all([o.e(3929),o.e(3605)]).then(o.bind(o,3605)).then(n=>n.DashSummaryM)},{path:"developer",loadChildren:()=>o.e(9429).then(o.bind(o,9429)).then(n=>n.DashDevM)},{path:"welcome",loadChildren:()=>o.e(4880).then(o.bind(o,4880)).then(n=>n.AmWelcomeM)},{path:"ext-licenses",loadChildren:()=>o.e(2442).then(o.bind(o,2442)).then(n=>n.ExtLicensesM)}];let g=(()=>{class n{static \u0275fac=function(M){return new(M||n)};static \u0275mod=v.$C({type:n});static \u0275inj=v.G2t({imports:[d.iI.forChild(E),t.u]})}return n})()},6589:(F,T,o)=>{o.d(T,{Zm:()=>t,kK:()=>S,mO:()=>u,v$:()=>E});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||{}),E=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}(E||{}),S=function(s){return s.DB_MASTER_NAME="db-master-name",s.ADMIN_PATH="admin-path",s}(S||{})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3488],{3534:(D,C,a)=>{a.d(C,{r:()=>ne});var m=a(467),c=a(8727),_=a(5046),E=a(7376),f=a(4388),u=a(6645),v=a(9773),O=a(5312),M=a(5632),F=a(9239),p=a(8677),g=a(2133),e=a(540),S=a(6708),P=a(123),h=a(6129),R=a(6268),A=a(1987),b=a(7237),B=a(3864),U=a(3966),y=a(177),j=a(3478),L=a(8026),K=a(4098),W=a(6914),G=a(7515),I=a(4945),V=a(8542),X=a(4466);const x=["QuillEditorC"],N=["insertCodeModalC"],k=["monacoEditorModalC"];function H(s,l){if(1&s&&e.nrm(0,"span",31),2&s){const t=e.XpG();e.Y8G("innerHTML",t.userNoteHtml,e.npT)}}function Y(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",32),e.EFF(2," Add Custom API"),e.k0s())}function w(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",33),e.EFF(2," View Custom API"),e.k0s())}function Q(s,l){if(1&s&&(e.j41(0,"span"),e.nrm(1,"i",34),e.EFF(2," Edit Custom API "),e.j41(3,"span",35),e.EFF(4),e.k0s()()),2&s){const t=e.XpG();e.R7$(4),e.JRh((null==t.updateObj?null:t.updateObj.name)||"")}}function J(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",36)(1,"app-monaco-editor",37),e.bIt("editorGenerated",function(o){e.eBV(t);const i=e.XpG();return e.Njj(i.editorGeneratedBasicInfo(o))}),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function Z(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",36)(1,"app-monaco-editor",37),e.bIt("editorGenerated",function(o){e.eBV(t);const i=e.XpG();return e.Njj(i.editorGenerated(o))}),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function z(s,l){if(1&s){const t=e.RV6();e.j41(0,"a",38),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.viewError())}),e.EFF(1,"View error"),e.k0s()}}function q(s,l){1&s&&(e.j41(0,"span"),e.EFF(1,"Save"),e.k0s())}function ee(s,l){1&s&&(e.j41(0,"span"),e.EFF(1,"Update"),e.k0s())}function te(s,l){if(1&s){const t=e.RV6();e.j41(0,"button",39),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.save())}),e.nrm(1,"i",40),e.DNE(2,q,2,0,"span",5),e.DNE(3,ee,2,0,"span",5),e.k0s()}if(2&s){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.data.mode===t.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",t.data.mode===t.EFormMode.EDIT)}}function oe(s,l){1&s&&e.nrm(0,"p-progressSpinner",41)}let ne=(()=>{class s{ns;functionS;generalS;instanceS;constantsS;authCS;monacoS;eventCenterS;generalCS;data;loading={form:!1};EFormMode=_.X;subscriptions=[];EAPIAccessType=v.MW;editorFunctions;editorFunctionsBasicInfo;editorOptionsSchema={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};updateObj;QuillEditorC;userNoteHtml='\n <span class="font-weight-bold text-success">Note:</span><br/>\n <span>Name might be used in code,<br/> so consider changing in code also.</span>\n ';BE_HOST_PORT=O.c.BE_HOST_PORT;DOCS_HOST_PORT=O.c.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;insertCodeModalC;viewDockerfileModelC;constructor(t,n,o,i,r,d,ae,se,ie){this.ns=t,this.functionS=n,this.generalS=o,this.instanceS=i,this.constantsS=r,this.authCS=d,this.monacoS=ae,this.eventCenterS=se,this.generalCS=ie}ngOnInit(){var t=this;this.subscriptions.push(this.data.eventChannel.subscribe(function(){var n=(0,m.A)(function*(o){if(o)if(o.action===c.K.OPEN_FORM_IN_EDIT_MODE||o.action===c.K.OPEN_FORM_IN_VIEW_MODE){const i=`${t.data.formData.guid}:${t.data.formData.user}`,r=yield t.functionS.getById(i).toPromise();t.updateObj=r.data,t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",r.data?.functionBasicInfo||""),t.generalCS.setValueInEditor(t,"editorFunctions",r.data?.functionCode||""),t.generalCS.setValueInEditor(t,"QuillEditorC",r.data?.apiDocs||"");const d={};t.updateObj.separateSandboxSettings?.enableSeparateSandboxForThis&&(d.enableSeparateSandboxForThis=t.updateObj.separateSandboxSettings.enableSeparateSandboxForThis,d.allowAllPackagesOfAdmin=t.updateObj.separateSandboxSettings?.packages?.allowAllPackagesOfAdmin??!1),yield t.monacoS.loadTypesInMonaco(t.BE_HOST_PORT,t.authCS.getUserId(),d)}else if(o.action===c.K.OPEN_FORM_IN_ADD_MODE){const i=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,M.O.CUSTOM_API_JSON).toPromise(),r=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,M.O.CUSTOM_APIS).toPromise();t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",i.data),t.generalCS.setValueInEditor(t,"editorFunctions",r.data),setTimeout(()=>{t.QuillEditorC.quill.setContents([{insert:"### API "},{insert:"Documentation",attributes:{bold:!0}},{insert:"\n"}])},1e3),t.updateObj={}}});return function(o){return n.apply(this,arguments)}}()))}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idFunctionForm").modal("show")},100)}hideModal(){$("#idFunctionForm").modal("hide")}save(){var t=this;return(0,m.A)(function*(){let o;o=t.data.formData&&t.data.formData._id?yield t.functionS.queryOne({find:{guid:t.data.formData.guid,user:t.authCS.gUser._id}}):{};const i=E.find(o.versions||[],{isActive:!0});i&&(i.apiCodeStr=t.editorFunctions.getValue());let r=Object.assign({},o,{});r.user=t.authCS.getUserId(),r.functionCode=t.editorFunctions.getValue(),r.functionBasicInfo=t.editorFunctionsBasicInfo.getValue(),r.apiDocs=t.QuillEditorC.getValue();for(const d of r?.versions||[])d.version=d.version.toString();r=Object.assign({},t.updateObj||{},r);try{let d;t.loading.form=!0,t.lastError=void 0,t.data.mode===_.X.ADD?d=yield t.functionS.post(r).toPromise():t.data.mode===_.X.EDIT&&(d=yield t.functionS.replace(r._id,r,{select:u.GX._id}).toPromise()),t.ns.showSuccess(t.data.mode===_.X.ADD?t.constantsS.functions.addSuccess:t.constantsS.functions.editSuccess),t.data.eventChannel.emit({action:t.data.mode===_.X.ADD?c.K.SAVED:c.K.UPDATED}),t.eventCenterS.customApiSavedAndUpdate.next(!0),t.loading.form=!1}catch(d){t.ns.showErrorMessageFromErrorObject(d),t.loading.form=!1,t.lastError=d.error}})()}selectedTabTitle;tabSelected(t){this.selectedTabTitle=(t.originalEvent.originalTarget||t.originalEvent.currentTarget).text}setMessageReceiver(){this.generalCS.messageReceivedFor=void 0===this.selectedTabTitle||"Basic Info"===this.selectedTabTitle?f.r.Settings:f.r.All}showInsertCodeModel(){this.setMessageReceiver(),this.insertCodeModalC.showModal(p.Z.FunManFormC)}editorGenerated(t){var n=this;return(0,m.A)(function*(){n.editorFunctions=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(p.Z.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===g.R.TEXT_COPIED&&"Code"===n.selectedTabTitle&&o.componentName===p.Z.FunManFormC&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}editorGeneratedBasicInfo(t){var n=this;return(0,m.A)(function*(){n.editorFunctionsBasicInfo=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(p.Z.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===g.R.TEXT_COPIED&&o.componentName===p.Z.FunManFormC&&(void 0===n.selectedTabTitle||"Basic Info"===n.selectedTabTitle)&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),F.L.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.customApiSavedAndUpdate.next(!1)}static \u0275fac=function(n){return new(n||s)(e.rXU(S.m),e.rXU(P.a),e.rXU(h.f),e.rXU(R.J),e.rXU(A.X),e.rXU(b.l),e.rXU(B.e),e.rXU(U.d),e.rXU(h.f))};static \u0275cmp=e.VBU({type:s,selectors:[["app-w-fun-man-form"]],viewQuery:function(n,o){if(1&n&&(e.GBs(x,5),e.GBs(N,5),e.GBs(k,5)),2&n){let i;e.mGM(i=e.lsd())&&(o.QuillEditorC=i.first),e.mGM(i=e.lsd())&&(o.insertCodeModalC=i.first),e.mGM(i=e.lsd())&&(o.viewDockerfileModelC=i.first)}},inputs:{data:"data"},decls:37,vars:14,consts:[["template",""],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFunctionForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[3,"onChange"],["header","Basic Info"],["class","overflow-hidden","style","height: calc(100vh - 188px);",4,"ngIf"],["header","Code"],["header","Docs"],["QuillEditorC",""],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[3,"innerHTML"],[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"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"overflow-hidden",2,"height","calc(100vh - 188px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,o){1&n&&(e.DNE(0,H,1,1,"ng-template",null,0,e.C5r),e.j41(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),e.DNE(6,Y,3,0,"span",5),e.DNE(7,w,3,0,"span",5),e.DNE(8,Q,5,1,"span",5),e.j41(9,"div",6)(10,"button",7),e.bIt("click",function(){return o.hideModal()}),e.j41(11,"span",8),e.nrm(12,"i",9),e.k0s()(),e.j41(13,"span",10),e.bIt("click",function(){return o.showInsertCodeModel()}),e.nrm(14,"i",11),e.k0s(),e.j41(15,"a",12),e.nrm(16,"img",13),e.k0s()()(),e.j41(17,"div",14)(18,"p-tabView",15),e.bIt("onChange",function(r){return o.tabSelected(r)}),e.j41(19,"p-tabPanel",16),e.DNE(20,J,2,2,"div",17),e.k0s(),e.j41(21,"p-tabPanel",18),e.DNE(22,Z,2,2,"div",17),e.k0s(),e.j41(23,"p-tabPanel",19),e.nrm(24,"app-quill-editor",null,20),e.k0s()()(),e.j41(26,"div",21),e.DNE(27,z,2,0,"a",22),e.j41(28,"button",23),e.bIt("click",function(){return o.hideModal()}),e.nrm(29,"i",24),e.EFF(30," Close"),e.k0s(),e.DNE(31,te,4,2,"button",25),e.k0s(),e.DNE(32,oe,1,0,"p-progressSpinner",26),e.k0s()()(),e.nrm(33,"app-insert-code-modal",27,28)(35,"app-monaco-editor-modal",29,30)),2&n&&(e.R7$(6),e.Y8G("ngIf",o.data.mode===o.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.EDIT),e.R7$(12),e.Y8G("ngIf",o.shouldLoadMonacoEditor),e.R7$(2),e.Y8G("ngIf",o.shouldLoadMonacoEditor),e.R7$(5),e.Y8G("ngIf",o.lastError),e.R7$(4),e.Y8G("ngIf",o.data.mode!==o.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",o.loading.form),e.R7$(1),e.Y8G("frameId","idInsertCodeCusApi")("modalId","idInsertCodeCusApiForm")("docsHostPort",o.DOCS_HOST_PORT),e.R7$(2),e.Y8G("modalId","idMonacoEditorModalInCustomApi")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[y.bT,j.U,L.k,K.V,W.A,G.p,I.JQ,I.Kp,V.m,X.J],encapsulation:2})}return s})()},3488:(D,C,a)=>{a.d(C,{d:()=>f});var m=a(1709),c=a(2508),E=(a(3534),a(540));let f=(()=>{class u{static \u0275fac=function(M){return new(M||u)};static \u0275mod=E.$C({type:u});static \u0275inj=E.G2t({imports:[m.u,c.v]})}return u})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3545],{9473:(L,E,a)=>{"use strict";a.d(E,{r:()=>T});var T=function(g){return g.DRAFT="DRAFT",g.PENDING_APPROVAL="PENDING_APPROVAL",g.PUBLISHED="PUBLISHED",g.DEPRECATED="DEPRECATED",g.BLOCKED="BLOCKED",g}(T||{})},3545:(L,E,a)=>{"use strict";a.r(E),a.d(E,{AppStoreM:()=>Kt});var T=a(7060),g=a(1709),u=a(467),b=a(5312),G=function(i){return i.DRAFT="DRAFT",i.PENDING_APPROVAL="PENDING_APPROVAL",i.PUBLISHED="PUBLISHED",i.BLOCKED="BLOCKED",i}(G||{}),e=a(540),V=a(6129),A=a(6268),x=a(1987),M=a(6810),F=a(364),r=a(7237),d=a(9819),m=a(6708),v=a(3966),c=a(4341),h=a(177),D=a(7515),k=a(8542),_=a(5779),I=a(1880),y=a(1141),O=a(1455),ee=a(2242),N=a(9335),P=a(563),j=a(9071),S=a(4420),z=a(2816),H=a(8757),K=a(1512),Z=a(2423);const te=["container"],ie=["in"],ne=["multiIn"],oe=["multiContainer"],le=["ddBtn"],se=["items"],ae=["scroller"],pe=["overlay"],re=function(i,s){return{"p-autocomplete-dd-input":i,"p-disabled":s}};function ce(i,s){if(1&i){const t=e.RV6();e.j41(0,"input",11,12),e.bIt("click",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputClick(o))})("input",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInput(o))})("keydown",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onKeydown(o))})("keyup",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onKeyup(o))})("focus",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputFocus(o))})("blur",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputBlur(o))})("change",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputChange(o))})("paste",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputPaste(o))}),e.k0s()}if(2&i){const t=e.XpG();e.HbH(t.inputStyleClass),e.Y8G("autofocus",t.autofocus)("ngStyle",t.inputStyle)("autocomplete",t.autocomplete)("ngClass",e.l_i(20,re,t.dropdown,t.disabled))("value",t.inputFieldValue)("readonly",t.readonly)("disabled",t.disabled),e.BMQ("type",t.type)("id",t.inputId)("required",t.required)("name",t.name)("placeholder",t.placeholder)("size",t.size)("maxlength",t.maxlength)("tabindex",t.tabindex)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledBy)("aria-required",t.required)}}function ue(i,s){if(1&i){const t=e.RV6();e.j41(0,"TimesIcon",15),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clear())}),e.k0s()}2&i&&e.Y8G("styleClass","p-autocomplete-clear-icon")}function de(i,s){}function me(i,s){1&i&&e.DNE(0,de,0,0,"ng-template")}function he(i,s){if(1&i){const t=e.RV6();e.j41(0,"span",16),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clear())}),e.DNE(1,me,1,0,null,8),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngTemplateOutlet",t.clearIconTemplate)}}function _e(i,s){if(1&i&&(e.qex(0),e.DNE(1,ue,1,1,"TimesIcon",13),e.DNE(2,he,2,1,"span",14),e.bVm()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.clearIconTemplate),e.R7$(1),e.Y8G("ngIf",t.clearIconTemplate)}}function ge(i,s){1&i&&e.eu8(0)}function fe(i,s){if(1&i&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(1),e.JRh(n.resolveFieldData(t))}}function ve(i,s){1&i&&e.nrm(0,"TimesCircleIcon",31),2&i&&e.Y8G("styleClass","p-autocomplete-token-icon")}function Ce(i,s){}function Ie(i,s){1&i&&e.DNE(0,Ce,0,0,"ng-template")}function be(i,s){if(1&i&&(e.j41(0,"span",32),e.DNE(1,Ie,1,0,null,8),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.Y8G("ngTemplateOutlet",t.removeIconTemplate)}}const B=function(i){return{$implicit:i}};function ye(i,s){if(1&i){const t=e.RV6();e.j41(0,"li",23,24),e.DNE(2,ge,1,0,"ng-container",25),e.DNE(3,fe,2,1,"span",26),e.j41(4,"span",27),e.bIt("click",function(){e.eBV(t);const o=e.sdS(1),l=e.XpG(2);return e.Njj(l.removeItem(o))}),e.DNE(5,ve,1,1,"TimesCircleIcon",28),e.DNE(6,be,2,1,"span",29),e.k0s()()}if(2&i){const t=s.$implicit,n=e.XpG(2);e.R7$(2),e.Y8G("ngTemplateOutlet",n.selectedItemTemplate)("ngTemplateOutletContext",e.eq3(5,B,t)),e.R7$(1),e.Y8G("ngIf",!n.selectedItemTemplate),e.R7$(2),e.Y8G("ngIf",!n.removeIconTemplate),e.R7$(1),e.Y8G("ngIf",n.removeIconTemplate)}}const Te=function(i,s){return{"p-disabled":i,"p-focus":s}};function Se(i,s){if(1&i){const t=e.RV6();e.j41(0,"ul",17,18),e.bIt("click",function(){e.eBV(t);const o=e.sdS(5);return e.Njj(o.focus())}),e.DNE(2,ye,7,7,"li",19),e.j41(3,"li",20)(4,"input",21,22),e.bIt("input",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInput(o))})("click",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputClick(o))})("keydown",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onKeydown(o))})("keyup",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onKeyup(o))})("focus",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputFocus(o))})("blur",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputBlur(o))})("change",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputChange(o))})("paste",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onInputPaste(o))}),e.k0s()()()}if(2&i){const t=e.XpG();e.Y8G("ngClass",e.l_i(20,Te,t.disabled,t.focus)),e.R7$(2),e.Y8G("ngForOf",t.value),e.R7$(2),e.HbH(t.inputStyleClass),e.Y8G("autofocus",t.autofocus)("disabled",t.disabled)("readonly",t.readonly)("autocomplete",t.autocomplete)("ngStyle",t.inputStyle),e.BMQ("type",t.type)("id",t.inputId)("placeholder",t.value&&t.value.length?null:t.placeholder)("tabindex",t.tabindex)("maxlength",t.maxlength)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledBy)("aria-required",t.required)("aria-controls",t.listId)("aria-expanded",t.overlayVisible)("aria-activedescendant","p-highlighted-option")}}function Ee(i,s){1&i&&e.nrm(0,"SpinnerIcon",35),2&i&&e.Y8G("styleClass","p-autocomplete-loader")("spin",!0)}function Ae(i,s){}function xe(i,s){1&i&&e.DNE(0,Ae,0,0,"ng-template")}function ke(i,s){if(1&i&&(e.j41(0,"span",36),e.DNE(1,xe,1,0,null,8),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngTemplateOutlet",t.loadingIconTemplate)}}function Ge(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ee,1,2,"SpinnerIcon",33),e.DNE(2,ke,2,1,"span",34),e.bVm()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.loadingIconTemplate),e.R7$(1),e.Y8G("ngIf",t.loadingIconTemplate)}}function De(i,s){if(1&i&&e.nrm(0,"span",40),2&i){const t=e.XpG(2);e.Y8G("ngClass",t.dropdownIcon)}}function Oe(i,s){1&i&&e.nrm(0,"ChevronDownIcon")}function we(i,s){}function Ve(i,s){1&i&&e.DNE(0,we,0,0,"ng-template")}function Me(i,s){if(1&i&&(e.qex(0),e.DNE(1,Oe,1,0,"ChevronDownIcon",3),e.DNE(2,Ve,1,0,null,8),e.bVm()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",!t.dropdownIconTemplate),e.R7$(1),e.Y8G("ngTemplateOutlet",t.dropdownIconTemplate)}}function Be(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",37,38),e.bIt("click",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.handleDropdownClick(o))}),e.DNE(2,De,1,1,"span",39),e.DNE(3,Me,3,2,"ng-container",3),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("disabled",t.disabled),e.BMQ("aria-label",t.dropdownAriaLabel)("tabindex",t.tabindex),e.R7$(2),e.Y8G("ngIf",t.dropdownIcon),e.R7$(1),e.Y8G("ngIf",!t.dropdownIcon)}}function Re(i,s){1&i&&e.eu8(0)}function Le(i,s){1&i&&e.eu8(0)}const J=function(i,s){return{$implicit:i,options:s}};function Fe(i,s){if(1&i&&e.DNE(0,Le,1,0,"ng-container",25),2&i){const t=s.$implicit,n=s.options;e.XpG(2);const o=e.sdS(14);e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.l_i(2,J,t,n))}}function Ne(i,s){1&i&&e.eu8(0)}const je=function(i){return{options:i}};function $e(i,s){if(1&i&&e.DNE(0,Ne,1,0,"ng-container",25),2&i){const t=s.options,n=e.XpG(3);e.Y8G("ngTemplateOutlet",n.loaderTemplate)("ngTemplateOutletContext",e.eq3(2,je,t))}}function Xe(i,s){1&i&&(e.qex(0),e.DNE(1,$e,1,4,"ng-template",44),e.bVm())}const R=function(i){return{height:i}};function Ye(i,s){if(1&i){const t=e.RV6();e.j41(0,"p-scroller",41,42),e.bIt("onLazyLoad",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.onLazyLoad.emit(o))}),e.DNE(2,Fe,1,5,"ng-template",43),e.DNE(3,Xe,2,0,"ng-container",3),e.k0s()}if(2&i){const t=e.XpG();e.Aen(e.eq3(8,R,t.scrollHeight)),e.Y8G("items",t.suggestions)("itemSize",t.virtualScrollItemSize||t._itemSize)("autoSize",!0)("lazy",t.lazy)("options",t.virtualScrollOptions),e.R7$(3),e.Y8G("ngIf",t.loaderTemplate)}}function Ue(i,s){1&i&&e.eu8(0)}const Pe=function(){return{}};function ze(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ue,1,0,"ng-container",25),e.bVm()),2&i){const t=e.XpG(),n=e.sdS(14);e.R7$(1),e.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",e.l_i(3,J,t.suggestions,e.lJ4(2,Pe)))}}function He(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(1),e.JRh(n.getOptionGroupLabel(t)||"empty")}}function Ke(i,s){1&i&&e.eu8(0)}function Ze(i,s){1&i&&e.eu8(0)}function Je(i,s){if(1&i&&(e.j41(0,"li",50),e.DNE(1,He,2,1,"span",3),e.DNE(2,Ke,1,0,"ng-container",25),e.k0s(),e.DNE(3,Ze,1,0,"ng-container",25)),2&i){const t=s.$implicit,n=e.XpG(2).options,o=e.sdS(5),l=e.XpG();e.Y8G("ngStyle",e.eq3(6,R,n.itemSize+"px")),e.R7$(1),e.Y8G("ngIf",!l.groupTemplate),e.R7$(1),e.Y8G("ngTemplateOutlet",l.groupTemplate)("ngTemplateOutletContext",e.eq3(8,B,t)),e.R7$(1),e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(10,B,l.getOptionGroupChildren(t)))}}function Qe(i,s){if(1&i&&(e.qex(0),e.DNE(1,Je,4,12,"ng-template",49),e.bVm()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngForOf",t)}}function We(i,s){1&i&&e.eu8(0)}function qe(i,s){if(1&i&&(e.qex(0),e.DNE(1,We,1,0,"ng-container",25),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.sdS(5);e.R7$(1),e.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",e.eq3(2,B,t))}}function et(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(1),e.JRh(n.resolveFieldData(t))}}function tt(i,s){1&i&&e.eu8(0)}const it=function(i){return{"p-highlight":i}},nt=function(i,s){return{$implicit:i,index:s}};function ot(i,s){if(1&i){const t=e.RV6();e.j41(0,"li",52),e.bIt("click",function(){const l=e.eBV(t).$implicit,p=e.XpG(3);return e.Njj(p.selectItem(l))}),e.DNE(1,et,2,1,"span",3),e.DNE(2,tt,1,0,"ng-container",25),e.k0s()}if(2&i){const t=s.$implicit,n=s.index,o=e.XpG(2).options,l=e.XpG();e.Y8G("ngStyle",e.eq3(6,R,o.itemSize+"px"))("ngClass",e.eq3(8,it,t===l.highlightOption))("id",l.highlightOption==t?"p-highlighted-option":""),e.R7$(1),e.Y8G("ngIf",!l.itemTemplate),e.R7$(1),e.Y8G("ngTemplateOutlet",l.itemTemplate)("ngTemplateOutletContext",e.l_i(10,nt,t,o.getOptions?o.getOptions(n):n))}}function lt(i,s){1&i&&e.DNE(0,ot,3,13,"li",51),2&i&&e.Y8G("ngForOf",s.$implicit)}function st(i,s){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.emptyMessageLabel," ")}}function at(i,s){1&i&&e.eu8(0,null,55)}function pt(i,s){if(1&i&&(e.j41(0,"li",53),e.DNE(1,st,2,1,"ng-container",54),e.DNE(2,at,2,0,"ng-container",8),e.k0s()),2&i){const t=e.XpG().options,n=e.XpG();e.Y8G("ngStyle",e.eq3(4,R,t.itemSize+"px")),e.R7$(1),e.Y8G("ngIf",!n.emptyTemplate)("ngIfElse",n.empty),e.R7$(1),e.Y8G("ngTemplateOutlet",n.emptyTemplate)}}function rt(i,s){if(1&i&&(e.j41(0,"ul",45,46),e.DNE(2,Qe,2,1,"ng-container",3),e.DNE(3,qe,2,4,"ng-container",3),e.DNE(4,lt,1,1,"ng-template",null,47,e.C5r),e.DNE(6,pt,3,6,"li",48),e.k0s()),2&i){const t=s.options,n=e.XpG();e.Aen(t.contentStyle),e.Y8G("ngClass",t.contentStyleClass),e.BMQ("id",n.listId),e.R7$(2),e.Y8G("ngIf",n.group),e.R7$(1),e.Y8G("ngIf",!n.group),e.R7$(3),e.Y8G("ngIf",n.noResults&&n.showEmptyMessage)}}function ct(i,s){1&i&&e.eu8(0)}const ut=function(i,s){return{"p-autocomplete p-component":!0,"p-autocomplete-dd":i,"p-autocomplete-multiple":s}},dt=function(){return["p-autocomplete-panel p-component"]},mt={provide:c.kq,useExisting:(0,e.Rfq)(()=>Q),multi:!0};let Q=(()=>{class i{document;el;renderer;cd;differs;config;overlayService;zone;minLength=1;delay=300;style;panelStyle;styleClass;panelStyleClass;inputStyle;inputId;inputStyleClass;placeholder;readonly;disabled;scrollHeight="200px";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;maxlength;name;required;size;appendTo;autoHighlight;forceSelection;type="text";_autoZIndex;get autoZIndex(){return this._autoZIndex}set autoZIndex(t){this._autoZIndex=t,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(t){this._baseZIndex=t,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}ariaLabel;dropdownAriaLabel;ariaLabelledBy;dropdownIcon;unique=!0;group;completeOnFocus=!1;showClear=!1;field;dropdown;showEmptyMessage;dropdownMode="blank";multiple;tabindex;dataKey;emptyMessage;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";autofocus;autocomplete="off";optionGroupChildren;optionGroupLabel;overlayOptions;get suggestions(){return this._suggestions}set suggestions(t){this._suggestions=t,this.handleSuggestionsChange()}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}completeMethod=new e.bkB;onSelect=new e.bkB;onUnselect=new e.bkB;onFocus=new e.bkB;onBlur=new e.bkB;onDropdownClick=new e.bkB;onClear=new e.bkB;onKeyUp=new e.bkB;onShow=new e.bkB;onHide=new e.bkB;onLazyLoad=new e.bkB;containerEL;inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;templates;_itemSize;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;value;_suggestions;onModelChange=()=>{};onModelTouched=()=>{};timeout;overlayVisible=!1;suggestionsUpdated;highlightOption;highlightOptionChanged;focus=!1;filled;inputClick;inputKeyDown;noResults;differ;inputFieldValue=null;loading;scrollHandler;documentResizeListener;forceSelectionUpdateModelTimeout;listId;itemClicked;inputValue=null;isSearching=!1;constructor(t,n,o,l,p,C,f,w){this.document=t,this.el=n,this.renderer=o,this.cd=l,this.differs=p,this.config=C,this.overlayService=f,this.zone=w,this.differ=p.find([]).create(void 0),this.listId=(0,S._Y)()+"_list"}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1}),this.highlightOptionChanged&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{if(this.overlayViewChild&&this.itemsWrapper){let t=O.D.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");t&&O.D.scrollInView(this.itemsWrapper,t)}},1),this.highlightOptionChanged=!1})}handleSuggestionsChange(){null!=this._suggestions&&this.loading&&(this.highlightOption=null,this._suggestions.length?(this.noResults=!1,this.show(),this.suggestionsUpdated=!0,this.autoHighlight&&(this.highlightOption=this._suggestions[0])):(this.noResults=!0,this.showEmptyMessage?(this.show(),this.suggestionsUpdated=!0):this.hide()),this.loading=!1,this.isSearching=!1)}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"selectedItem":this.selectedItemTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"loader":this.loaderTemplate=t.template;break;case"removetokenicon":this.removeIconTemplate=t.template;break;case"loadingicon":this.loadingIconTemplate=t.template;break;case"clearicon":this.clearIconTemplate=t.template;break;case"dropdownicon":this.dropdownIconTemplate=t.template}})}writeValue(t){this.value=t,this.filled=!(!this.value||!this.value.length),this.updateInputField(),this.cd.markForCheck()}getOptionGroupChildren(t){return this.optionGroupChildren?S.BF.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?S.BF.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onInput(t){if(!this.inputKeyDown&&O.D.isIE())return;this.timeout&&clearTimeout(this.timeout);let n=t.target.value;this.inputValue=n,!this.multiple&&!this.forceSelection&&this.onModelChange(n),0===n.length&&!this.multiple&&(this.value=null,this.hide(),this.onClear.emit(t),this.onModelChange(n)),n.length>=this.minLength?this.timeout=setTimeout(()=>{this.search(t,n)},this.delay):this.hide(),this.updateFilledState(),this.inputKeyDown=!1}onInputClick(t){this.inputClick=!0}search(t,n){this.isSearching||(this.isSearching=!0,this.loading=!0,this.completeMethod.emit({originalEvent:t,query:n}),setTimeout(()=>{this.isSearching=!1},100))}selectItem(t,n=!0){this.forceSelectionUpdateModelTimeout&&(clearTimeout(this.forceSelectionUpdateModelTimeout),this.forceSelectionUpdateModelTimeout=null),this.multiple?(this.multiInputEl.nativeElement.value="",this.value=this.value||[],(!this.isSelected(t)||!this.unique)&&(this.value=[...this.value,t],this.onModelChange(this.value))):(this.inputEL.nativeElement.value=this.resolveFieldData(t),this.value=t,this.onModelChange(this.value)),this.onSelect.emit(t),this.updateFilledState(),n&&(this.itemClicked=!0,this.focusInput()),this.hide()}show(t){(this.multiInputEl||this.inputEL)&&!this.overlayVisible&&(this.multiple?this.multiInputEl?.nativeElement.ownerDocument.activeElement==this.multiInputEl?.nativeElement:this.inputEL?.nativeElement.ownerDocument.activeElement==this.inputEL?.nativeElement)&&(this.overlayVisible=!0),this.onShow.emit(t),this.cd.markForCheck()}clear(){this.value=null,this.inputValue=null,this.multiple?this.multiInputEl.nativeElement.value="":(this.inputValue=null,this.inputEL.nativeElement.value=""),this.updateFilledState(),this.onModelChange(this.value),this.onClear.emit()}onOverlayAnimationStart(t){"visible"===t.toState&&(this.itemsWrapper=O.D.findSingle(this.overlayViewChild.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement))}resolveFieldData(t){let n=this.field?S.BF.resolveFieldData(t,this.field):t;return void 0!==n?n:""}hide(t){this.overlayVisible=!1,this.onHide.emit(t),this.cd.markForCheck()}handleDropdownClick(t){if(this.overlayVisible)this.hide(t);else{this.focusInput();let n=this.multiple?this.multiInputEl.nativeElement.value:this.inputEL.nativeElement.value;"blank"===this.dropdownMode?(this.onDropdownClick.emit({originalEvent:t,query:""}),this.search(t,"")):"current"===this.dropdownMode&&(this.onDropdownClick.emit({originalEvent:t,query:n}),this.search(t,n))}}focusInput(){this.multiple?this.multiInputEl.nativeElement.focus():this.inputEL?.nativeElement.focus()}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(_.Yj.EMPTY_MESSAGE)}removeItem(t){let n=O.D.index(t),o=this.value[n];this.value=this.value.filter((l,p)=>p!=n),this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(o)}onKeydown(t){if(this.overlayVisible)switch(t.which){case 40:if(this.group){let o=this.findOptionGroupIndex(this.highlightOption,this.suggestions);if(-1!==o){let l=o.itemIndex+1;l<this.getOptionGroupChildren(this.suggestions[o.groupIndex]).length?(this.highlightOption=this.getOptionGroupChildren(this.suggestions[o.groupIndex])[l],this.highlightOptionChanged=!0):this.suggestions[o.groupIndex+1]&&(this.highlightOption=this.getOptionGroupChildren(this.suggestions[o.groupIndex+1])[0],this.highlightOptionChanged=!0)}else this.highlightOption=this.getOptionGroupChildren(this.suggestions[0])[0]}else{let o=this.findOptionIndex(this.highlightOption,this.suggestions);if(-1!=o){var n=o+1;n!=this.suggestions.length&&(this.highlightOption=this.suggestions[n],this.highlightOptionChanged=!0)}else this.highlightOption=this.suggestions[0]}t.preventDefault();break;case 38:if(this.group){let o=this.findOptionGroupIndex(this.highlightOption,this.suggestions);if(-1!==o){let l=o.itemIndex-1;if(l>=0)this.highlightOption=this.getOptionGroupChildren(this.suggestions[o.groupIndex])[l],this.highlightOptionChanged=!0;else if(l<0){let p=this.suggestions[o.groupIndex-1];p&&(this.highlightOption=this.getOptionGroupChildren(p)[this.getOptionGroupChildren(p).length-1],this.highlightOptionChanged=!0)}}}else{let o=this.findOptionIndex(this.highlightOption,this.suggestions);o>0&&(this.highlightOption=this.suggestions[o-1],this.highlightOptionChanged=!0)}t.preventDefault();break;case 13:this.highlightOption&&(this.selectItem(this.highlightOption),this.hide()),t.preventDefault();break;case 27:this.hide(),t.preventDefault();break;case 9:this.highlightOption&&this.selectItem(this.highlightOption),this.hide()}else 40===t.which&&this.suggestions?this.search(t,t.target.value):t.ctrlKey&&"z"===t.key&&!this.multiple?(this.inputEL.nativeElement.value=this.resolveFieldData(null),this.value="",this.onModelChange(this.value)):t.ctrlKey&&"z"===t.key&&this.multiple&&(this.value.pop(),this.onModelChange(this.value),this.updateFilledState());if(this.multiple&&8===t.which&&this.value&&this.value.length&&!this.multiInputEl?.nativeElement.value){this.value=[...this.value];const o=this.value.pop();this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(o)}this.inputKeyDown=!0}onKeyup(t){this.onKeyUp.emit(t)}onInputFocus(t){!this.itemClicked&&this.completeOnFocus&&this.search(t,this.multiple?this.multiInputEl?.nativeElement.value:this.inputEL?.nativeElement.value),this.focus=!0,this.onFocus.emit(t),this.itemClicked=!1}onInputBlur(t){this.focus=!1,this.onModelTouched(),this.onBlur.emit(t)}onInputChange(t){if(this.forceSelection){let n=!1,l=t.target.value.trim();if(this.suggestions){let p=[...this.suggestions];if(this.group){let C=this.suggestions.filter(f=>f[this.optionGroupChildren]).flatMap(f=>f[this.optionGroupChildren]);p=p.concat(C)}for(let C of p){let f=this.field?S.BF.resolveFieldData(C,this.field):C;if(f&&l.toLowerCase()===f.toLowerCase().trim()){n=!0,this.forceSelectionUpdateModelTimeout=setTimeout(()=>{this.selectItem(C,!1)},250);break}}}n||(this.multiple?this.multiInputEl.nativeElement.value="":(this.value=null,this.inputEL.nativeElement.value=""),this.onClear.emit(t),this.onModelChange(this.value),this.updateFilledState())}}onInputPaste(t){this.onKeydown(t)}isSelected(t){let n=!1;if(this.value&&this.value.length)for(let o=0;o<this.value.length;o++)if(S.BF.equals(this.value[o],t,this.dataKey)){n=!0;break}return n}findOptionIndex(t,n){let o=-1;if(n)for(let l=0;l<n.length;l++)if(S.BF.equals(t,n[l])){o=l;break}return o}findOptionGroupIndex(t,n){let o,l;if(n)for(let p=0;p<n.length&&(o=p,l=this.findOptionIndex(t,this.getOptionGroupChildren(n[p])),-1===l);p++);return-1!==l?{groupIndex:o,itemIndex:l}:-1}updateFilledState(){this.filled=this.multiple?this.value&&this.value.length||this.multiInputEl&&this.multiInputEl.nativeElement&&""!=this.multiInputEl.nativeElement.value:this.inputFieldValue&&""!=this.inputFieldValue||this.inputEL&&this.inputEL.nativeElement&&""!=this.inputEL.nativeElement.value}updateInputField(){let t=this.resolveFieldData(this.value);this.inputFieldValue=t,this.inputEL&&this.inputEL.nativeElement&&(this.inputEL.nativeElement.value=t),this.updateFilledState()}ngOnDestroy(){this.forceSelectionUpdateModelTimeout&&(clearTimeout(this.forceSelectionUpdateModelTimeout),this.forceSelectionUpdateModelTimeout=null),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(n){return new(n||i)(e.rXU(h.qQ),e.rXU(e.aKT),e.rXU(e.sFG),e.rXU(e.gRc),e.rXU(e._q3),e.rXU(_.r1),e.rXU(_.si),e.rXU(e.SKi))};static \u0275cmp=e.VBU({type:i,selectors:[["p-autoComplete"]],contentQueries:function(n,o,l){if(1&n&&e.wni(l,_.Ei,4),2&n){let p;e.mGM(p=e.lsd())&&(o.templates=p)}},viewQuery:function(n,o){if(1&n&&(e.GBs(te,5),e.GBs(ie,5),e.GBs(ne,5),e.GBs(oe,5),e.GBs(le,5),e.GBs(se,5),e.GBs(ae,5),e.GBs(pe,5)),2&n){let l;e.mGM(l=e.lsd())&&(o.containerEL=l.first),e.mGM(l=e.lsd())&&(o.inputEL=l.first),e.mGM(l=e.lsd())&&(o.multiInputEl=l.first),e.mGM(l=e.lsd())&&(o.multiContainerEL=l.first),e.mGM(l=e.lsd())&&(o.dropdownButton=l.first),e.mGM(l=e.lsd())&&(o.itemsViewChild=l.first),e.mGM(l=e.lsd())&&(o.scroller=l.first),e.mGM(l=e.lsd())&&(o.overlayViewChild=l.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,o){2&n&&e.AVh("p-inputwrapper-filled",o.filled)("p-inputwrapper-focus",o.focus&&!o.disabled||o.autofocus||o.overlayVisible)("p-autocomplete-clearable",o.showClear&&!o.disabled)},inputs:{minLength:"minLength",delay:"delay",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:"readonly",disabled:"disabled",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",maxlength:"maxlength",name:"name",required:"required",size:"size",appendTo:"appendTo",autoHighlight:"autoHighlight",forceSelection:"forceSelection",type:"type",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:"unique",group:"group",completeOnFocus:"completeOnFocus",showClear:"showClear",field:"field",dropdown:"dropdown",showEmptyMessage:"showEmptyMessage",dropdownMode:"dropdownMode",multiple:"multiple",tabindex:"tabindex",dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:"autofocus",autocomplete:"autocomplete",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",overlayOptions:"overlayOptions",suggestions:"suggestions",itemSize:"itemSize"},outputs:{completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect",onFocus:"onFocus",onBlur:"onBlur",onDropdownClick:"onDropdownClick",onClear:"onClear",onKeyUp:"onKeyUp",onShow:"onShow",onHide:"onHide",onLazyLoad:"onLazyLoad"},features:[e.Jv_([mt])],decls:16,vars:31,consts:[[3,"ngClass","ngStyle"],["container",""],["pAutoFocus","","class","p-autocomplete-input p-inputtext p-component","aria-autocomplete","list","role","searchbox",3,"autofocus","ngStyle","class","autocomplete","ngClass","value","readonly","disabled","click","input","keydown","keyup","focus","blur","change","paste",4,"ngIf"],[4,"ngIf"],["class","p-autocomplete-multiple-container p-component p-inputtext",3,"ngClass","click",4,"ngIf"],["type","button","pButton","","class","p-autocomplete-dropdown p-button-icon-only","pRipple","",3,"disabled","click",4,"ngIf"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onShow","onHide"],["overlay",""],[4,"ngTemplateOutlet"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["pAutoFocus","","aria-autocomplete","list","role","searchbox",1,"p-autocomplete-input","p-inputtext","p-component",3,"autofocus","ngStyle","autocomplete","ngClass","value","readonly","disabled","click","input","keydown","keyup","focus","blur","change","paste"],["in",""],[3,"styleClass","click",4,"ngIf"],["class","p-autocomplete-clear-icon",3,"click",4,"ngIf"],[3,"styleClass","click"],[1,"p-autocomplete-clear-icon",3,"click"],[1,"p-autocomplete-multiple-container","p-component","p-inputtext",3,"ngClass","click"],["multiContainer",""],["class","p-autocomplete-token",4,"ngFor","ngForOf"],[1,"p-autocomplete-input-token"],["pAutoFocus","","aria-autocomplete","list","role","searchbox","aria-haspopup","true",3,"autofocus","disabled","readonly","autocomplete","ngStyle","input","click","keydown","keyup","focus","blur","change","paste"],["multiIn",""],[1,"p-autocomplete-token"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-autocomplete-token-label",4,"ngIf"],[1,"p-autocomplete-token-icon",3,"click"],[3,"styleClass",4,"ngIf"],["class","p-autocomplete-token-icon",4,"ngIf"],[1,"p-autocomplete-token-label"],[3,"styleClass"],[1,"p-autocomplete-token-icon"],[3,"styleClass","spin",4,"ngIf"],["class","p-autocomplete-loader pi-spin ",4,"ngIf"],[3,"styleClass","spin"],[1,"p-autocomplete-loader","pi-spin"],["type","button","pButton","","pRipple","",1,"p-autocomplete-dropdown","p-button-icon-only",3,"disabled","click"],["ddBtn",""],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"items","itemSize","autoSize","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","content"],["pTemplate","loader"],["role","listbox",1,"p-autocomplete-items",3,"ngClass"],["items",""],["itemslist",""],["class","p-autocomplete-empty-message",3,"ngStyle",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"p-autocomplete-item-group",3,"ngStyle"],["role","option","class","p-autocomplete-item","pRipple","",3,"ngStyle","ngClass","id","click",4,"ngFor","ngForOf"],["role","option","pRipple","",1,"p-autocomplete-item",3,"ngStyle","ngClass","id","click"],[1,"p-autocomplete-empty-message",3,"ngStyle"],[4,"ngIf","ngIfElse"],["empty",""]],template:function(n,o){1&n&&(e.j41(0,"span",0,1),e.DNE(2,ce,2,23,"input",2),e.DNE(3,_e,3,2,"ng-container",3),e.DNE(4,Se,6,23,"ul",4),e.DNE(5,Ge,3,2,"ng-container",3),e.DNE(6,Be,4,5,"button",5),e.j41(7,"p-overlay",6,7),e.bIt("visibleChange",function(p){return o.overlayVisible=p})("onAnimationStart",function(p){return o.onOverlayAnimationStart(p)})("onShow",function(p){return o.show(p)})("onHide",function(p){return o.hide(p)}),e.j41(9,"div",0),e.DNE(10,Re,1,0,"ng-container",8),e.DNE(11,Ye,4,10,"p-scroller",9),e.DNE(12,ze,2,6,"ng-container",3),e.DNE(13,rt,7,7,"ng-template",null,10,e.C5r),e.DNE(15,ct,1,0,"ng-container",8),e.k0s()()()),2&n&&(e.HbH(o.styleClass),e.Y8G("ngClass",e.l_i(27,ut,o.dropdown,o.multiple))("ngStyle",o.style),e.R7$(2),e.Y8G("ngIf",!o.multiple),e.R7$(1),e.Y8G("ngIf",o.filled&&!o.disabled&&o.showClear&&!o.loading),e.R7$(1),e.Y8G("ngIf",o.multiple),e.R7$(1),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngIf",o.dropdown),e.R7$(1),e.Y8G("visible",o.overlayVisible)("options",o.overlayOptions)("target","@parent")("appendTo",o.appendTo)("autoZIndex",o.autoZIndex)("baseZIndex",o.baseZIndex)("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions),e.R7$(2),e.HbH(o.panelStyleClass),e.xc7("max-height",o.virtualScroll?"auto":o.scrollHeight),e.Y8G("ngClass",e.lJ4(30,dt))("ngStyle",o.panelStyle),e.R7$(1),e.Y8G("ngTemplateOutlet",o.headerTemplate),e.R7$(1),e.Y8G("ngIf",o.virtualScroll),e.R7$(1),e.Y8G("ngIf",!o.virtualScroll),e.R7$(3),e.Y8G("ngTemplateOutlet",o.footerTemplate))},dependencies:function(){return[h.YU,h.Sq,h.bT,h.T3,h.B3,N.hJ,_.Ei,y._f,P.n,j.H,I.q,z.I,H.N,K.A,Z.D]},styles:["@layer primeng{.p-autocomplete{display:inline-flex;position:relative}.p-autocomplete-loader{position:absolute;top:50%;margin-top:-.5rem}.p-autocomplete-dd .p-autocomplete-input{flex:1 1 auto;width:1%}.p-autocomplete-dd .p-autocomplete-input,.p-autocomplete-dd .p-autocomplete-multiple-container{border-top-right-radius:0;border-bottom-right-radius:0}.p-autocomplete-dd .p-autocomplete-dropdown{border-top-left-radius:0;border-bottom-left-radius:0}.p-autocomplete-panel{overflow:auto}.p-autocomplete-items{margin:0;padding:0;list-style-type:none}.p-autocomplete-item{cursor:pointer;white-space:nowrap;position:relative;overflow:hidden}.p-autocomplete-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-autocomplete-token{width:-moz-fit-content;width:fit-content;cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-autocomplete-token-icon{display:flex;cursor:pointer}.p-autocomplete-input-token{flex:1 1 auto;display:inline-flex}.p-autocomplete-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-autocomplete{display:flex}.p-fluid .p-autocomplete-dd .p-autocomplete-input{width:1%}.p-autocomplete-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-autocomplete-clearable{position:relative}}\n"],encapsulation:2,changeDetection:0})}return i})(),ht=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[h.MD,N.z_,ee.u,y.tm,_.Gg,P.Z,j.h,I.u,z.I,H.N,K.A,Z.D,N.z_,_.Gg,j.h,I.u]})}return i})();var _t=a(3599),gt=a(9473),ft=a(9239),vt=a(2396),Ct=a(334),It=a(8150),bt=a(4466);const yt=["monacoEditorModalC"];function Tt(i,s){1&i&&e.nrm(0,"i",37)}function St(i,s){1&i&&e.nrm(0,"i",38)}function Et(i,s){if(1&i&&(e.j41(0,"div",34)(1,"span"),e.EFF(2),e.k0s(),e.DNE(3,Tt,1,0,"i",35),e.DNE(4,St,1,0,"i",36),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(2),e.JRh(t.apiVersion),e.R7$(1),e.Y8G("ngIf",n.tpApiVersionIdMap&&n.tpApiVersionIdMap[t.bundleName]&&n.tpApiVersionIdMap[t.bundleName][t.apiVersion]),e.R7$(1),e.Y8G("ngIf",t.dockerFile)}}function At(i,s){1&i&&e.DNE(0,Et,5,3,"div",33),2&i&&e.Y8G("ngIf",s.$implicit)}function xt(i,s){1&i&&e.nrm(0,"i",37)}function kt(i,s){1&i&&e.nrm(0,"i",38)}function Gt(i,s){if(1&i&&(e.j41(0,"div",34)(1,"span"),e.EFF(2),e.k0s(),e.DNE(3,xt,1,0,"i",35),e.DNE(4,kt,1,0,"i",36),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(2),e.JRh(t.apiVersion),e.R7$(1),e.Y8G("ngIf",n.tpApiVersionIdMap&&n.tpApiVersionIdMap[t.bundleName]&&n.tpApiVersionIdMap[t.bundleName][t.apiVersion]),e.R7$(1),e.Y8G("ngIf",t.dockerFile)}}function Dt(i,s){1&i&&e.DNE(0,Gt,5,3,"div",33),2&i&&e.Y8G("ngIf",s.$implicit)}function Ot(i,s){if(1&i){const t=e.RV6();e.j41(0,"span",39),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.viewDockerfile())}),e.nrm(1,"i",40),e.EFF(2," View dockerfile"),e.k0s()}}function wt(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",41),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.uninstallSchema())}),e.EFF(1,"Uninstall API Version "),e.k0s()}}function Vt(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",42),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.installVersionAndSchemaHandler("install"))}),e.EFF(1,"Install API Version"),e.k0s()}}function Mt(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",43),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.installVersionAndSchemaHandler("uninstall"))}),e.EFF(1,"Uninstall Library "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.loading.form)}}function Bt(i,s){1&i&&e.nrm(0,"p-progressSpinner",44)}function Rt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",5)(1,"div",6)(2,"span"),e.nrm(3,"i",7),e.EFF(4," API Bundle Details"),e.k0s(),e.j41(5,"button",8)(6,"span",9),e.nrm(7,"i",10),e.k0s()()(),e.j41(8,"div",11)(9,"div",12),e.nrm(10,"img",13),e.k0s(),e.j41(11,"div",14)(12,"h6",15),e.EFF(13),e.k0s(),e.j41(14,"div",16),e.EFF(15),e.k0s(),e.j41(16,"div",17)(17,"div",18)(18,"span",19),e.EFF(19,"API Version"),e.k0s(),e.j41(20,"p-dropdown",20),e.bIt("onChange",function(o){e.eBV(t);const l=e.XpG();return e.Njj(l.selectedApiVersion=o.value)}),e.DNE(21,At,1,1,"ng-template",21),e.DNE(22,Dt,1,1,"ng-template",22),e.k0s(),e.j41(23,"div",23),e.DNE(24,Ot,3,0,"span",24),e.k0s()(),e.j41(25,"div",25)(26,"span",19),e.EFF(27,"Operation"),e.k0s(),e.DNE(28,wt,2,0,"button",26),e.DNE(29,Vt,2,0,"ng-template",null,27,e.C5r),e.k0s()()()(),e.j41(31,"div",28),e.DNE(32,Mt,2,1,"button",29),e.j41(33,"button",30),e.nrm(34,"i",31),e.EFF(35," Close"),e.k0s()(),e.DNE(36,Bt,1,0,"p-progressSpinner",32),e.k0s()}if(2&i){const t=e.sdS(30),n=e.XpG();e.R7$(10),e.FS9("src",n.apiBundle.iconUrl,e.B4B),e.FS9("alt",n.apiBundle.name),e.R7$(3),e.JRh(n.apiBundle.label),e.R7$(2),e.JRh(n.apiBundle.description),e.R7$(5),e.Y8G("options",n.apiVersions)("ngModel",n.selectedApiVersion)("filter",!0),e.R7$(4),e.Y8G("ngIf",null==n.selectedApiVersion?null:n.selectedApiVersion.dockerFile),e.R7$(4),e.Y8G("ngIf",n.tpApiVersionIdMap&&n.tpApiVersionIdMap[null==n.selectedApiVersion?null:n.selectedApiVersion.bundleName]&&n.tpApiVersionIdMap[null==n.selectedApiVersion?null:n.selectedApiVersion.bundleName][null==n.selectedApiVersion?null:n.selectedApiVersion.apiVersion])("ngIfElse",t),e.R7$(4),e.Y8G("ngIf",n.tpApiVersionIdMap[n.apiBundle._id]),e.R7$(4),e.Y8G("ngIf",n.loading.form)}}let W=(()=>{class i{fb;ns;confirmationService;userS;generalS;cs;eventCenterCS;authCS;storeApisCS;cd;tpStoreApiVersionS;STORE_BE_HOST_PORT_SITES=b.c.STORE_BE_HOST_PORT_SITES;apiBundle;tpApiVersionIdMap;tpApiBundleIdMap;change=new e.bkB;loading={form:!1};subscriptions=[];selectedApiVersion;apiVersions=[];editorOptionsMonacoEditorModal={readOnly:!0,language:"dockerfile",contextmenu:!0};monacoEditorModalC;constructor(t,n,o,l,p,C,f,w,X,Y,U){this.fb=t,this.ns=n,this.confirmationService=o,this.userS=l,this.generalS=p,this.cs=C,this.eventCenterCS=f,this.authCS=w,this.storeApisCS=X,this.cd=Y,this.tpStoreApiVersionS=U}ngOnInit(){}init(){var t=this;return(0,u.A)(function*(){if(!t.apiBundle)return;t.apiVersions=[],t.selectedApiVersion=void 0;const n={find:{bundleName:t.apiBundle.name,active:!0,apiVersionState:gt.r.PUBLISHED},select:{bundleName:1,apiVersion:1,dependencies:1,secretKeys:1,dockerFile:1}};t.apiVersions=(yield t.storeApisCS.storeAPIVersion(t.STORE_BE_HOST_PORT_SITES,n)).data,t.apiVersions.length&&(t.selectedApiVersion=t.apiVersions[0]),t.sortAPIVersions(),t.cd.detectChanges()})()}showLibraryModal(t){this.apiBundle=t,this.init(),this.loading.form=!1,$("#idLibDetailModal").modal("show"),this.cd.detectChanges()}hideLibraryModal(){$("#idLibDetailModal").modal("hide")}sortAPIVersions(){this.apiVersions.sort((t,n)=>_t(n.apiVersion,t.apiVersion))}installVersionAndSchemaHandler(t){var n=this;return(0,u.A)(function*(){var o;n.selectedApiVersion.dockerFile?n.confirmationService.confirm({message:n.cs.appStore.dockerfileInstallConfirmation,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,u.A)(function*(){yield n.installOrUninstallAPIVersion(t)}),function(){return o.apply(this,arguments)})}):yield n.installOrUninstallAPIVersion(t)})()}installOrUninstallAPIVersion(t){var n=this;return(0,u.A)(function*(){try{n.loading.form=!0;let o=null;"install"===t&&(o={apiBundleName:n.apiBundle.name,apiBundleLabel:n.apiBundle.label,storeApiVersion:n.selectedApiVersion.apiVersion,dependencies:n.selectedApiVersion.dependencies,secretKeys:n.selectedApiVersion.secretKeys,user:n.authCS.getUserId(),active:!0}),yield n.tpStoreApiVersionS.installApisFromStore(o,t).toPromise(),n.loading.form=!1,t.toString().toUpperCase(),n.ns.showSuccess("APIs installed successfully."),n.change.emit(Math.random())}catch(o){n.loading.form=!1,n.cd.detectChanges(),n.ns.showErrorFromResponse(o.error||o,"Unable to API bundle install.")}})()}uninstallSchema(){var t=this;return(0,u.A)(function*(){t.loading.form=!0,yield t.tpStoreApiVersionS.uninstallSchemaApis(t.selectedApiVersion).toPromise(),t.ns.showSuccess("APIs uninstalled successfully."),t.change.emit(Math.random()),t.loading.form=!1})()}viewDockerfile(){this.monacoEditorModalC.showModal(this.selectedApiVersion.dockerFile,ft.L.dockerfile)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(n){return new(n||i)(e.rXU(c.ok),e.rXU(m.m),e.rXU(_.td),e.rXU(vt.N),e.rXU(V.f),e.rXU(x.X),e.rXU(Ct.u),e.rXU(r.l),e.rXU(M.n),e.rXU(e.gRc),e.rXU(d.V))};static \u0275cmp=e.VBU({type:i,selectors:[["app-lib-details-modal"]],viewQuery:function(n,o){if(1&n&&e.GBs(yt,5),2&n){let l;e.mGM(l=e.lsd())&&(o.monacoEditorModalC=l.first)}},inputs:{tpApiVersionIdMap:"tpApiVersionIdMap",tpApiBundleIdMap:"tpApiBundleIdMap"},outputs:{change:"change"},decls:5,vars:4,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLibDetailModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],["class","modal-content",4,"ngIf"],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-cube","text-info","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto","pt-3"],[1,"pl-4","pr-4","pt-2","text-center",2,"height","125px"],[1,"card-img-top","mt-3",2,"height","70%","width","auto",3,"src","alt"],[1,"p-2"],[1,"card-title","mb-3","text-overflow-ellipsis"],[1,"small","line-height-1","mt-2","block-desc"],[1,"row","mt-2","mb-4"],[1,"col-6","pr-0"],[1,"bold","small"],["filterBy","schemaVersion","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],["pTemplate","item"],["pTemplate","selectedItem"],[1,"text-right"],["class","small text-info cursor-pointer",3,"click",4,"ngIf"],[1,"col-6"],["class","btn btn-sm btn-warning btn-block","type","button",3,"click",4,"ngIf","ngIfElse"],["install",""],[1,"modal-footer","d-block"],["class","btn btn-sm btn-danger","type","button",3,"disabled","click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary","float-right"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["class","text-nowrap w-100",4,"ngIf"],[1,"text-nowrap","w-100"],["class","fas fa-check fa-fw float-right text-success pt-1 ml-2",4,"ngIf"],["class","fab fa-docker fa-fw float-right text-info pt-1",4,"ngIf"],[1,"fas","fa-check","fa-fw","float-right","text-success","pt-1","ml-2"],[1,"fab","fa-docker","fa-fw","float-right","text-info","pt-1"],[1,"small","text-info","cursor-pointer",3,"click"],[1,"fab","fa-docker"],["type","button",1,"btn","btn-sm","btn-warning","btn-block",3,"click"],["type","button",1,"btn","btn-sm","btn-success","btn-block",3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"disabled","click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,Rt,37,12,"div",2),e.k0s()(),e.nrm(3,"app-monaco-editor-modal",3,4)),2&n&&(e.R7$(2),e.Y8G("ngIf",o.apiBundle),e.R7$(1),e.Y8G("modalId","idViewDockerfileModel")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","View dockerfile"))},dependencies:[c.BC,c.vS,h.bT,_.Ei,D.p,It.ms,bt.J],encapsulation:2,changeDetection:0})}return i})();var Lt=a(8722);const Ft=["libDetailModalC"];function Nt(i,s){1&i&&(e.j41(0,"span",26),e.EFF(1,"Installed"),e.k0s())}function jt(i,s){1&i&&(e.j41(0,"span",27),e.EFF(1,"Install"),e.k0s())}function $t(i,s){if(1&i&&(e.j41(0,"div",23),e.DNE(1,Nt,2,0,"span",24),e.DNE(2,jt,2,0,"span",25),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngIf",n.tpApiBundleIdMap[t.name]),e.R7$(1),e.Y8G("ngIf",!n.tpApiBundleIdMap[t.name])}}function Xt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",14),e.bIt("click",function(){const l=e.eBV(t).$implicit,p=e.XpG();return e.Njj(p.libraryClick(l))}),e.j41(1,"div",15),e.nrm(2,"img",16),e.k0s(),e.j41(3,"div",17)(4,"h6",18),e.EFF(5),e.k0s(),e.j41(6,"div",19)(7,"span",20),e.EFF(8),e.nI1(9,"moment"),e.k0s()(),e.j41(10,"div",21),e.EFF(11),e.k0s(),e.DNE(12,$t,3,2,"div",22),e.k0s()()}if(2&i){const t=s.$implicit,n=e.XpG();e.R7$(2),e.FS9("src",t.iconUrl,e.B4B),e.FS9("alt",t.label),e.R7$(3),e.JRh(t.label),e.R7$(2),e.Y8G("pTooltip","Last published on."),e.R7$(1),e.JRh(e.i5U(9,7,t.lastPublished,n.cs.DATE_FORMAT_USER)),e.R7$(3),e.JRh(t.description),e.R7$(1),e.Y8G("ngIf",n.tpApiBundleIdMap)}}function Yt(i,s){1&i&&e.nrm(0,"p-progressSpinner",28)}const Ut=function(){return{"padding-top":"5px","padding-bottom":"5px","padding-left":"5px",width:"1000px"}};let q=(()=>{class i{generalS;instanceS;cs;storeApisCS;feStoreCS;authCS;tpStoreApiVersionS;notificationS;eventCenterS;constantsS;cd;searchText="";autoCompleteData=[];virtual={itemHeight:28};apiBundles=[];selectedLib;tpApiVersionIdMap={};tpApiBundleIdMap={};loading={apiPackages:!1};STORE_BE_HOST_PORT_SITES=b.c.STORE_BE_HOST_PORT_SITES;STORE_IMAGE_DOMAIN=b.c.STORE_IMAGE_DOMAIN;LICENSE_KEY=b.c.LICENSE_KEY;passStoreCommunication=b.c.crypto.passStoreCommunication;libDetailModalC;constructor(t,n,o,l,p,C,f,w,X,Y,U){this.generalS=t,this.instanceS=n,this.cs=o,this.storeApisCS=l,this.feStoreCS=p,this.authCS=C,this.tpStoreApiVersionS=f,this.notificationS=w,this.eventCenterS=X,this.constantsS=Y,this.cd=U}ngOnInit(){this.loadAutoComplete(),this.findAPIBundles(),this.loadDependenciesAndSchemas(),this.generalS.setNewTitle("API Maker Store")}findAPIBundles(){var t=this;return(0,u.A)(function*(){t.searchText=t.searchText.trim(),t.loading.apiPackages=!0,setTimeout((0,u.A)(function*(){t.apiBundles=(yield t.storeApisCS.findAPIBundles(t.STORE_BE_HOST_PORT_SITES,{name:{$regex:`.*(${t.searchText}).*`,$options:"i"},apiBundleState:G.PUBLISHED}).toPromise()).data,yield t.feStoreCS.setDefaultLibIcon(t.STORE_IMAGE_DOMAIN,t.apiBundles),t.loading.apiPackages=!1,t.cd.detectChanges()})),t.cd.detectChanges()})()}loadAutoComplete(){var t=this;return(0,u.A)(function*(){t.autoCompleteData=(yield t.storeApisCS.distinct_field(t.STORE_BE_HOST_PORT_SITES,{},"name","asc",t.LICENSE_KEY,t.passStoreCommunication).toPromise()).data,t.cd.detectChanges()})()}loadDependenciesAndSchemas(){var t=this;return(0,u.A)(function*(){const{tpApiVersionIdMap:n,tpApiBundleIdMap:o}=(yield t.instanceS.getInstalledPackagesAndSchemas().toPromise()).data;t.tpApiVersionIdMap=n,t.tpApiBundleIdMap=o,t.cd.detectChanges()})()}versionChanged(){var t=this;return(0,u.A)(function*(){yield t.loadDependenciesAndSchemas()})()}libraryClick(t){var n=this;return(0,u.A)(function*(){n.selectedLib=t,n.libDetailModalC.showLibraryModal(n.selectedLib)})()}static \u0275fac=function(n){return new(n||i)(e.rXU(V.f),e.rXU(A.J),e.rXU(x.X),e.rXU(M.n),e.rXU(F.N),e.rXU(r.l),e.rXU(d.V),e.rXU(m.m),e.rXU(v.d),e.rXU(x.X),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:i,selectors:[["app-app-store-layout"]],viewQuery:function(n,o){if(1&n&&e.GBs(Ft,5),2&n){let l;e.mGM(l=e.lsd())&&(o.libDetailModalC=l.first)}},decls:18,vars:9,consts:[[1,"p-1"],[1,"container","mt-3"],[1,"row"],[1,"col-12"],[1,"text-center","mb-3"],[1,"input-group","input-group-lg","mb-3","shadow-sm"],["inputStyleClass","form-control","placeholder","Search Package",3,"ngModel","suggestions","ngModelChange","keyup.enter"],[1,"input-group-append"],["type","button","id","button-addon2",1,"btn","btn-primary",3,"click"],[1,"d-flex","flex-wrap","justify-content-center","overflow-auto",2,"height","calc(100vh - 206px)","align-content","flex-start"],["class","card shadow-sm d-inline-block m-2 cursor-pointer","style","width: 14rem; height: 280px; overflow: hidden;",3,"click",4,"ngFor","ngForOf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"tpApiVersionIdMap","tpApiBundleIdMap","change"],["libDetailModalC",""],[1,"card","shadow-sm","d-inline-block","m-2","cursor-pointer",2,"width","14rem","height","280px","overflow","hidden",3,"click"],[1,"pl-4","pr-4","pt-2","text-center",2,"height","125px"],[1,"card-img-top","mt-3",2,"height","70%","width","auto",3,"src","alt"],[1,"pl-2","pr-2","pb-2"],[1,"card-title","mb-2","line-height-1-plain","block-desc-2-lines","text-center",2,"color","#D27E00"],[1,"mb-1","text-right"],[1,"small","text-warning","italic",3,"pTooltip"],[1,"small","line-height-1","block-desc-4-lines","text-center"],["class","text-right",4,"ngIf"],[1,"text-right"],["class","text-muted pr-1 italic small",4,"ngIf"],["class","text-info pr-1 small",4,"ngIf"],[1,"text-muted","pr-1","italic","small"],[1,"text-info","pr-1","small"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div",3)(5,"h2",4),e.EFF(6,"API Maker Store"),e.k0s()(),e.j41(7,"div",3)(8,"div",5)(9,"p-autoComplete",6),e.bIt("ngModelChange",function(p){return o.searchText=p})("keyup.enter",function(){return o.findAPIBundles()}),e.k0s(),e.j41(10,"div",7)(11,"button",8),e.bIt("click",function(){return o.findAPIBundles()}),e.EFF(12,"Search"),e.k0s()()()()()()(),e.j41(13,"div",9),e.DNE(14,Xt,13,10,"div",10),e.DNE(15,Yt,1,0,"p-progressSpinner",11),e.k0s()(),e.j41(16,"app-lib-details-modal",12,13),e.bIt("change",function(){return o.versionChanged()}),e.k0s()),2&n&&(e.R7$(9),e.Aen(e.lJ4(8,Ut)),e.Y8G("ngModel",o.searchText)("suggestions",o.autoCompleteData),e.R7$(5),e.Y8G("ngForOf",o.apiBundles),e.R7$(1),e.Y8G("ngIf",o.loading.apiPackages),e.R7$(1),e.Y8G("tpApiVersionIdMap",o.tpApiVersionIdMap)("tpApiBundleIdMap",o.tpApiBundleIdMap))},dependencies:[c.BC,c.vS,h.Sq,h.bT,D.p,k.m,Q,W,Lt.x],styles:[".block-desc-2-lines[_ngcontent-%COMP%]{height:30px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.block-desc-4-lines[_ngcontent-%COMP%]{height:60px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0})}return i})();var Pt=a(2173),zt=a(2508);const Ht=[{path:"main",component:q,canActivate:[Pt.Z]}];let Kt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=e.$C({type:i});static \u0275inj=e.G2t({imports:[T.iI.forChild(Ht),g.u,zt.v,ht]})}return i})()},3599:function(L,E){var a,g;void 0!==(g="function"==typeof(a=function(){var u=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function G(r){var d=r.replace(/^v/,"").replace(/\+.*$/,""),m=function b(r,d){return-1===r.indexOf(d)?r.length:r.indexOf(d)}(d,"-"),v=d.substring(0,m).split(".");return v.push(d.substring(m+1)),v}function e(r){return isNaN(Number(r))?r:Number(r)}function V(r){if("string"!=typeof r)throw new TypeError("Invalid argument expected string");if(!u.test(r))throw new Error("Invalid argument not valid semver ('"+r+"' received)")}function A(r,d){[r,d].forEach(V);for(var m=G(r),v=G(d),c=0;c<Math.max(m.length-1,v.length-1);c++){var h=parseInt(m[c]||0,10),D=parseInt(v[c]||0,10);if(h>D)return 1;if(D>h)return-1}var k=m[m.length-1],_=v[v.length-1];if(k&&_){var I=k.split(".").map(e),y=_.split(".").map(e);for(c=0;c<Math.max(I.length,y.length);c++){if(void 0===I[c]||"string"==typeof y[c]&&"number"==typeof I[c])return-1;if(void 0===y[c]||"string"==typeof I[c]&&"number"==typeof y[c]||I[c]>y[c])return 1;if(y[c]>I[c])return-1}}else if(k||_)return k?-1:1;return 0}var x=[">",">=","=","<","<="],M={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return A.validate=function(r){return"string"==typeof r&&u.test(r)},A.compare=function(r,d,m){!function F(r){if("string"!=typeof r)throw new TypeError("Invalid operator type, expected string but got "+typeof r);if(-1===x.indexOf(r))throw new TypeError("Invalid operator, expected one of "+x.join("|"))}(m);var v=A(r,d);return M[m].indexOf(v)>-1},A})?a.apply(E,[]):a)&&(L.exports=g)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3605],{3605:(A,r,s)=>{s.r(r),s.d(r,{DashSummaryM:()=>x});var e=s(7060),c=s(1709),h=s(2173),l=s(2818),m=s(467),t=s(540),v=s(6708),f=s(6268),g=s(1820),S=s(2348),u=s(7237),p=s(1987),C=s(3966),i=s(6129),y=s(5883);let U=(()=>{class a{ns;instanceS;adminDashboardsS;logProfileS;authCS;constantsS;eventCenterS;generalCS;cd;generalS;loading={grid:!1};subscriptions=[];constructor(o,n,d,M,P,j,F,O,T,V){this.ns=o,this.instanceS=n,this.adminDashboardsS=d,this.logProfileS=M,this.authCS=P,this.constantsS=j,this.eventCenterS=F,this.generalCS=O,this.cd=T,this.generalS=V}ngOnInit(){var o=this;return(0,m.A)(function*(){o.generalS.setNewTitle("Server Nodes Dashboard")})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(n){return new(n||a)(t.rXU(v.m),t.rXU(f.J),t.rXU(g.M),t.rXU(S.l),t.rXU(u.l),t.rXU(p.X),t.rXU(C.d),t.rXU(i.f),t.rXU(t.gRc),t.rXU(i.f))};static \u0275cmp=t.VBU({type:a,selectors:[["app-dash-summary"]],decls:13,vars:0,consts:[[1,"pt-1","main-container",2,"overflow","inherit"],[1,"row","ml-0","mr-0","mb-3"],[1,"col-12","pl-1","pr-1"],[1,"card"],[1,"card-header"],[1,"fas","fa-info-circle","text-info","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/dashboard/node-dashboard.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],[1,"card-body","p-0","h-100","overflow-hidden","pt-2"]],template:function(n,d){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"span"),t.nrm(6,"i",5),t.EFF(7," List of all connected nodes"),t.k0s(),t.j41(8,"div",6)(9,"a",7),t.nrm(10,"img",8),t.k0s()()(),t.j41(11,"div",9),t.nrm(12,"app-dash-root-nodes"),t.k0s()()()()())},dependencies:[y.V],styles:[".main-container[_ngcontent-%COMP%]{height:calc(100vh - 48px);overflow:auto}#chart[_ngcontent-%COMP%]{max-width:650px;margin:35px auto}"]})}return a})();var X=s(3929);const D=[{path:"",component:U,canActivate:[h.Z]}];let x=(()=>{class a{static \u0275fac=function(n){return new(n||a)};static \u0275mod=t.$C({type:a});static \u0275inj=t.G2t({imports:[e.iI.forChild(D),c.u,l.DashboardM,X.V]})}return a})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3621],{4568:(D,T,a)=>{a.d(T,{m:()=>C});var c=a(540),_=a(284);let C=(()=>{class n{hideCodeFinderModel=new c.bkB;loading={form:!1,response:!1};constructor(){}ngOnInit(){}showModal(){$("#idCodeFinder").modal("show")}hideModal(){$("#idCodeFinder").modal("hide")}hideModalEvent(){this.hideCodeFinderModel.emit(!0)}ngOnDestroy(){}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=c.VBU({type:n,selectors:[["app-code-finder-modal"]],outputs:{hideCodeFinderModel:"hideCodeFinderModel"},decls:8,vars:1,consts:[["id","idCodeFinder","role","dialog","data-backdrop","static","data-keyboard","false",1,"pt-1","pl-1","pr-1","overflow-auto","modal","parent-notes-modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content","border-0"],["aria-label","Close","type","button",1,"close","position-absolute",2,"top","0.25rem","right","0.5rem","z-index","1",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close","m-1"],[1,"modal-body","p-0"],[3,"modalId"]],template:function(r,y){1&r&&(c.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),c.bIt("click",function(){return y.hideModalEvent()}),c.j41(4,"span",4),c.nrm(5,"i",5),c.k0s()(),c.j41(6,"div",6),c.nrm(7,"app-code-finder-w",7),c.k0s()()()()),2&r&&(c.R7$(7),c.Y8G("modalId","idCodeFinder"))},dependencies:[_.y],encapsulation:2,changeDetection:0})}return n})()},4182:(D,T,a)=>{a.d(T,{K:()=>Ne});var c=a(467),_=a(7376),n=a(9420),E=a(6645),f=a(5312),r=a(5632),y=a(9239),R=a(8677),b=a(2133),e=a(540),P=a(6129),u=a(1987),g=a(3864),A=a(7237),I=a(123),j=a(7668),v=a(1914),l=a(3851),h=a(9818),d=a(6170),S=a(3906),p=a(6687),m=a(7058),N=a(6556),k=a(8013),G=a(7012),B=a(2712),L=a(6708),H=a(3966),K=a(364),X=a(1011),Y=a(5203),W=a(9368),J=a(1592),x=a(2547),V=a(2556),w=a(9992),U=a(177),z=a(3478),Z=a(4098),Q=a(6914),q=a(8542),ee=a(4466);const oe=["insertCodeModalC"],te=["monacoEditorModalC"];function se(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s(),e.j41(9,"span",15),e.EFF(10),e.k0s(),e.j41(11,"span",16),e.EFF(12),e.k0s(),e.j41(13,"span",17),e.EFF(14),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.apiId," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function ie(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",16),e.EFF(6),e.k0s(),e.j41(7,"span",17),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function ae(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",16),e.EFF(8),e.k0s(),e.j41(9,"span",17),e.EFF(10),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function ne(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s(),e.j41(9,"span",16),e.EFF(10),e.k0s(),e.j41(11,"span",17),e.EFF(12),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function re(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",15),e.EFF(4),e.k0s(),e.j41(5,"span",16),e.EFF(6),e.k0s(),e.j41(7,"span",17),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.apiId," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function de(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",15),e.EFF(4),e.k0s(),e.j41(5,"span",16),e.EFF(6),e.k0s(),e.j41(7,"span",17),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.apiId," \u2192 "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.hookType)}}function ce(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function pe(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function _e(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function le(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",19),e.EFF(4),e.k0s(),e.j41(5,"span",20),e.EFF(6),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name),e.R7$(2),e.JRh(o.codeObj.versionUI?"("+o.codeObj.versionUI+")":"")}}function Oe(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",21),e.EFF(4),e.k0s(),e.j41(5,"span",22),e.EFF(6),e.k0s(),e.j41(7,"span",20),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.eventName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.eventListenersName),e.R7$(2),e.JRh(o.codeObj.versionUI?"("+o.codeObj.versionUI+")":"")}}function Ce(i,O){if(1&i&&(e.j41(0,"span",16),e.EFF(1),e.k0s()),2&i){const o=e.XpG(2);e.R7$(1),e.SpI(" \u2192 ",o.codeObj.name,"")}}function Ee(i,O){if(1&i&&(e.j41(0,"span",17),e.EFF(1),e.k0s()),2&i){const o=e.XpG(2);e.R7$(1),e.JRh(o.codeObj.hookType)}}function me(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",23),e.EFF(4),e.k0s(),e.j41(5,"span",20),e.EFF(6),e.k0s(),e.DNE(7,Ce,2,1,"span",24),e.DNE(8,Ee,2,1,"span",25),e.k0s()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.customApiName),e.R7$(2),e.JRh(o.codeObj.versionUI?"("+o.codeObj.versionUI+")":""),e.R7$(1),e.Y8G("ngIf",o.codeObj.hookType),e.R7$(1),e.Y8G("ngIf",o.codeObj.hookType)}}function Se(i,O){if(1&i&&(e.j41(0,"span",16),e.EFF(1),e.k0s()),2&i){const o=e.XpG(2);e.R7$(1),e.SpI(" \u2192 ",o.codeObj.name,"")}}function he(i,O){if(1&i&&(e.j41(0,"span",17),e.EFF(1),e.k0s()),2&i){const o=e.XpG(2);e.R7$(1),e.JRh(o.codeObj.hookType)}}function ue(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",26),e.EFF(4),e.k0s(),e.j41(5,"span",27),e.EFF(6),e.k0s(),e.j41(7,"span",28),e.EFF(8),e.k0s(),e.j41(9,"span",20),e.EFF(10),e.k0s(),e.DNE(11,Se,2,1,"span",24),e.DNE(12,he,2,1,"span",25),e.k0s()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.bundleName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.apiVersion),e.R7$(2),e.SpI("",o.codeObj.apiName," \u2192 "),e.R7$(2),e.JRh(o.codeObj.versionUI?"("+o.codeObj.versionUI+")":""),e.R7$(1),e.Y8G("ngIf",o.codeObj.hookType),e.R7$(1),e.Y8G("ngIf",o.codeObj.hookType)}}function ge(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",29),e.EFF(4),e.k0s(),e.j41(5,"span",20),e.EFF(6),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.utilityClassName),e.R7$(2),e.JRh(o.codeObj.versionUI?"("+o.codeObj.versionUI+")":"")}}function Ie(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function fe(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",30),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function je(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",31),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function Te(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s(),e.j41(9,"span",15),e.EFF(10),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.apiId," ")}}function ye(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",26),e.EFF(4),e.k0s(),e.j41(5,"span",27),e.EFF(6),e.k0s(),e.j41(7,"span",28),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.bundleName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.apiVersion," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.name," ")}}function Re(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," ")}}function be(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," ")}}function Pe(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",12),e.EFF(4),e.k0s(),e.j41(5,"span",13),e.EFF(6),e.k0s(),e.j41(7,"span",14),e.EFF(8),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.SpI("",o.codeObj.instanceName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.databaseName," \u2192 "),e.R7$(2),e.SpI("",o.codeObj.collectionName," ")}}function Fe(i,O){if(1&i&&(e.j41(0,"span")(1,"span",11),e.EFF(2),e.k0s(),e.j41(3,"span",30),e.EFF(4),e.k0s()()),2&i){const o=e.XpG();e.R7$(1),e.Y8G("pTooltip",o.codeObj.tooltip),e.R7$(1),e.SpI("",o.codeObj.prefix," : "),e.R7$(2),e.JRh(o.codeObj.name)}}function Ae(i,O){1&i&&(e.j41(0,"span",41),e.nrm(1,"i",42),e.k0s())}function Me(i,O){if(1&i&&(e.j41(0,"span",43),e.EFF(1),e.k0s()),2&i){const o=e.XpG(2);e.Y8G("pTooltip",o.matchFound+" match found in this file."),e.R7$(1),e.JRh(o.matchFound)}}function De(i,O){if(1&i){const o=e.RV6();e.j41(0,"a",44),e.bIt("click",function(){e.eBV(o);const s=e.XpG(2);return e.Njj(s.viewError())}),e.EFF(1,"View error"),e.k0s()}}const ve=function(){return{"margin-right":"30px"}};function Ue(i,O){if(1&i){const o=e.RV6();e.j41(0,"span")(1,"span",32),e.bIt("click",function(){e.eBV(o);const s=e.XpG();return e.Njj(s.saveData())}),e.nrm(2,"i",33),e.EFF(3,"Save "),e.k0s(),e.j41(4,"span",34),e.bIt("click",function(){e.eBV(o);const s=e.XpG();return e.Njj(s.toggleResponseTab())}),e.nrm(5,"i",35),e.k0s(),e.j41(6,"span",36),e.bIt("click",function(){e.eBV(o);const s=e.XpG();return e.Njj(s.reloadTypes())}),e.nrm(7,"i",37),e.k0s(),e.DNE(8,Ae,2,0,"span",38),e.DNE(9,Me,2,2,"span",39),e.DNE(10,De,2,0,"a",40),e.k0s()}if(2&i){const o=e.XpG();e.R7$(1),e.Y8G("ngStyle",o.modalId?e.lJ4(4,ve):""),e.R7$(7),e.Y8G("ngIf",o.showLoadingTypes),e.R7$(1),e.Y8G("ngIf",o.matchFound),e.R7$(1),e.Y8G("ngIf",o.lastError)}}let Ne=(()=>{class i{generalCS;constantsS;monacoS;authCS;functionS;schedulerS;dbMigrationS;webSocketEventsS;processInitializersS;tpInstalledApisS;instanceApiSettingsS;instanceApiHooksS;instanceHooksS;databaseHooksS;collectionHooksS;systemApiSettingsS;amEventS;ns;eventCenterS;feStoreCS;i18nS;secretS;tpApiSettingsS;schemaS;dbMastersS;uiMakerUtilsS;constantsCS;cd;modalId;DOCS_HOST_PORT=f.c.DOCS_HOST_PORT;loading={grid:!1};subscriptions=[];editorCodeFinder;editorOptionsEditorCodeFinder={readOnly:!1,language:y.L.typescript,contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};gridKey=E.GX._id;BE_HOST_PORT=f.c.BE_HOST_PORT;EAPICategory=r.O;codeObj={};monacoDecorations=[];tab;insertCodeModalC;viewDockerfileModelC;lastCodeFinderObject={};matchFound=0;constructor(o,t,s,F,M,ke,$e,Ge,Be,Le,He,Ke,Xe,Ye,We,Je,xe,Ve,we,ze,Ze,Qe,qe,eo,oo,to,so,io){this.generalCS=o,this.constantsS=t,this.monacoS=s,this.authCS=F,this.functionS=M,this.schedulerS=ke,this.dbMigrationS=$e,this.webSocketEventsS=Ge,this.processInitializersS=Be,this.tpInstalledApisS=Le,this.instanceApiSettingsS=He,this.instanceApiHooksS=Ke,this.instanceHooksS=Xe,this.databaseHooksS=Ye,this.collectionHooksS=We,this.systemApiSettingsS=Je,this.amEventS=xe,this.ns=Ve,this.eventCenterS=we,this.feStoreCS=ze,this.i18nS=Ze,this.secretS=Qe,this.tpApiSettingsS=qe,this.schemaS=eo,this.dbMastersS=oo,this.uiMakerUtilsS=to,this.constantsCS=so,this.cd=io}ngOnInit(){this.subscriptions.push(this.eventCenterS.codeFinderResult.subscribe(o=>{if(o.length){this.codeObj=o[0],_.isEmpty(this.lastCodeFinderObject)||this.getBackupOfMonacoEditor(this.lastCodeFinderObject),this.lastCodeFinderObject=this.codeObj,this.generalCS.setValueInEditor(this,"editorCodeFinder",this.codeObj?.apiCodeStr),this.restoreBackupOfMonacoEditor(this.lastCodeFinderObject);const t=this.editorCodeFinder.getModel().findMatches(o[0].searchKeyWord,!0,!1,!1,null,!0);this.lastCodeFinderObject.cursorPosition={lineNumber:t[0]?.range?.startLineNumber,column:t[0]?.range?.startColumn},this?.lastCodeFinderObject?.cursorPosition?.lineNumber&&this.editorCodeFinder.setPosition(this?.lastCodeFinderObject?.cursorPosition),t[0]?.range?.startLineNumber&&this.editorCodeFinder.revealLineInCenter(t[0]?.range?.startLineNumber),t[0]?.range&&this.editorCodeFinder.revealRange(t[0].range,1),this.editorCodeFinder.deltaDecorations(this.monacoDecorations,[]),this.monacoDecorations=[];for(const s of t){const F=[{range:new monaco.Range(s?.range?.startLineNumber,s?.range?.startColumn,s?.range?.endLineNumber,s?.range?.endColumn),options:{inlineClassName:"highlightMatchedWord"}}];if(this.editorCodeFinder){const M=this.editorCodeFinder.deltaDecorations([],F);this.monacoDecorations.push(...M)}}this.matchFound=this.monacoDecorations.length,this.editorCodeFinder.focus()}else this.resetCodeObj();this.lastError=void 0,this.cd.detectChanges()}))}getBackupOfMonacoEditor(o){o.viewState=this.editorCodeFinder.saveViewState()}restoreBackupOfMonacoEditor(o){o.viewState&&this.editorCodeFinder.restoreViewState(o.viewState),o.cursorPosition?.lineNumber?this.editorCodeFinder.setPosition(o.cursorPosition):(o.cursorPosition={lineNumber:1,column:1},this.editorCodeFinder.setPosition(o.cursorPosition),this.editorCodeFinder.setScrollTop(0),this.editorCodeFinder.setScrollLeft(0)),this.editorCodeFinder.focus()}editorGenerated(o){var t=this;return(0,c.A)(function*(){t.editorCodeFinder=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,s=>{t.codeObj&&t.saveData()}),t.editorCodeFinder.onDidChangeCursorPosition(s=>{t.lastCodeFinderObject&&1!==s.position.lineNumber&&1!==s.position.column&&(t.lastCodeFinderObject.cursorPosition=s.position)}),t.monacoS.addInsertCodeKeyBinding(o,s=>{(t.codeObj.apiCategory===r.O.INSTANCES||t.codeObj.apiCategory===r.O.THIRD_PARTY_APIS||t.codeObj.apiCategory===r.O.CUSTOM_APIS||t.codeObj.apiCategory===r.O.SYSTEM_APIS||t.codeObj.apiCategory===r.O.EVENTS||t.codeObj.apiCategory===r.O.SCHEDULERS||t.codeObj.apiCategory===r.O.UTILITY_CLASS||t.codeObj.apiCategory===r.O.MIGRATION_SCRIPT||t.codeObj.apiCategory===r.O.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE||t.codeObj.apiCategory===r.O.PROCESS_INITIALIZER||t.codeObj.apiCategory===r.O.INSTANCE_API_HOOKS_JSON||t.codeObj.apiCategory!==r.O.I18N_JSON&&t.codeObj.apiCategory!==r.O.SECRET_JSON&&t.codeObj.apiCategory!==r.O.INSTANCE_API_SETTINGS_JSON&&t.codeObj.apiCategory!==r.O.THIRD_PARTY_API_SETTINGS_JSON&&t.codeObj.apiCategory!==r.O.SCHEMA_JSON&&t.codeObj.apiCategory!==r.O.SYSTEM_API_SETTINGS_JSON)&&t.insertCodeModalC.showModal(R.Z.CodeFinderResultC)}),t.subscriptions.push(t.generalCS.messageReceived.subscribe(s=>{s.type&&s.type===b.R.TEXT_COPIED&&s.componentName===R.Z.CodeFinderResultC&&(t.monacoS.insertAtCursor(o,s.selectedText),t.insertCodeModalC.hideModal())})),t.monacoS.addToggleCodeKeyBinding(o,s=>{t.toggleResponseTab(),t.layout.cd.detectChanges(),t.cd.detectChanges()})})()}layout;saveData(){var o=this;return(0,c.A)(function*(){o.monacoS.clearEditorDecorations(o.editorCodeFinder,o.monacoDecorations),yield o.customApisUpdateData(),yield o.schedulerApisUpdateData(),yield o.dbMigrationUpdateData(),yield o.webSocketNotificationUpdateData(),yield o.processInitializerUpdateData(),yield o.amEventsUpdateData(),yield o.tpApisUpdateData(),yield o.instanceApisSettingUpdateData(),yield o.instanceApisHooksUpdateData(),yield o.instanceHooksUpdateData(),yield o.databaseHooksUpdateData(),yield o.collectionHooksUpdateData(),yield o.sysApisSettingUpdateData(),yield o.utilityClassesUpdateData(),yield o.i18nUpdateData(),yield o.secretsUpdateData(),yield o.tpApiSettingUpdateData(),yield o.schemaUpdateData(),yield o.dbMasterUpdateData(),yield o.dbMasterUpdateJSUtilsData(),yield o.uiMakerUtilityUpdateData(),o.cd.detectChanges()})()}customApisUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.CUSTOM_APIS)try{const t=(yield o.functionS.getById(o.codeObj._id).toPromise()).data;o.setEditorValueInCodeOrHook(t.versions),yield o.functionS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.functions.editSuccess)}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}if(o.codeObj.apiCategory===r.O.CUSTOM_API_JSON)try{const t=(yield o.functionS.getById(o.codeObj._id).toPromise()).data,s={_id:t._id,functionBasicInfo:o.editorCodeFinder.getValue()};yield o.functionS.put(t._id,s,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.functions.editSuccess)}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}})()}schedulerApisUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.SCHEDULERS)try{const t=(yield o.schedulerS.getById(o.codeObj._id).toPromise()).data;o.setEditorValueInCodeOrHook(t.versions),yield o.schedulerS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.schedulers.editSuccess)}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}})()}dbMigrationUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.MIGRATION_SCRIPT)try{const t=(yield o.dbMigrationS.getById(o.codeObj._id).toPromise()).data;t.dbMigrationScriptCode=o.editorCodeFinder.getValue(),yield o.dbMigrationS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.dbMigration.editSuccess)}catch(t){o.catchErrorCommon(t)}})()}webSocketNotificationUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE)try{const t=(yield o.webSocketEventsS.getById(o.codeObj._id).toPromise()).data;o.getVersionObject(t.versions,o.codeObj.version).apiCodeStr=o.editorCodeFinder.getValue(),yield o.webSocketEventsS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.webSocketEvents.editSuccess)}catch(t){o.catchErrorCommon(t)}})()}processInitializerUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.PROCESS_INITIALIZER)try{const t=(yield o.processInitializersS.getById(o.codeObj._id).toPromise()).data;t.processInitializerCode=o.editorCodeFinder.getValue(),yield o.processInitializersS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.processInitializer.editSuccess)}catch(t){o.catchErrorCommon(t)}})()}amEventsUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.EVENTS)try{const t=(yield o.amEventS.getById(o.codeObj._id).toPromise()).data;for(const s of t.eventListeners)s._id===o.codeObj.eventListenersId&&s.name===o.codeObj.eventListenersName&&o.setEditorValueInCodeOrHook(s.versions);yield o.amEventS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.amEventListeners.editSuccess)}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}})()}tpApisUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.THIRD_PARTY_APIS)try{const t=(yield o.tpInstalledApisS.getById(o.codeObj._id).toPromise()).data;o.setEditorValueInCodeOrHook(t.versions),yield o.tpInstalledApisS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}})()}instanceApisSettingUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.INSTANCE_API_SETTINGS_JSON)try{const t=(yield o.instanceApiSettingsS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.INSTANCE_API_SETTINGS_JSON&&(t.instanceApiSettingCode=o.editorCodeFinder.getValue()),yield o.instanceApiSettingsS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}instanceApisHooksUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.INSTANCE_API_HOOKS_JSON)try{const t=(yield o.instanceApiHooksS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.INSTANCE_API_HOOKS_JSON&&o.codeObj.hookType&&o.prePostHooksCodeCommon(t),yield o.instanceApiHooksS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}instanceHooksUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.INSTANCE_HOOKS)try{const t=(yield o.instanceApiHooksS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.INSTANCE_HOOKS&&o.codeObj.hookType&&o.prePostHooksCodeCommon(t),yield o.instanceHooksS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}databaseHooksUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.DATABASE_HOOKS)try{const t=(yield o.databaseHooksS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.DATABASE_HOOKS&&o.codeObj.hookType&&o.prePostHooksCodeCommon(t),yield o.databaseHooksS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}collectionHooksUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.COLLECTION_HOOKS)try{const t=(yield o.collectionHooksS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.COLLECTION_HOOKS&&o.codeObj.hookType&&o.prePostHooksCodeCommon(t),yield o.collectionHooksS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}sysApisSettingUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.SYSTEM_APIS||o.codeObj.apiCategory===r.O.SYSTEM_API_SETTINGS_JSON)try{const t=(yield o.systemApiSettingsS.getById(o.codeObj._id).toPromise()).data;o.codeObj.apiCategory===r.O.SYSTEM_API_SETTINGS_JSON&&(t.sysApiSettingCode=o.editorCodeFinder.getValue()),o.codeObj.apiCategory===r.O.SYSTEM_APIS&&o.codeObj.hookType&&o.prePostHooksCodeCommon(t),yield o.systemApiSettingsS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Changes saved.")}catch(t){o.catchErrorCommon(t)}})()}utilityClassesUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.UTILITY_CLASS)try{const t=(yield o.feStoreCS.getByIdUtilityClasses(o.BE_HOST_PORT,o.codeObj._id).toPromise()).data;o.setEditorValueInCodeOrHook(t.versions),yield o.feStoreCS.putUtilityClasses(o.BE_HOST_PORT,t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsCS.utilityClassesS.editSuccess)}catch(t){o.ns.showErrorMessageFromErrorObject(t),o.lastError=t.error}})()}i18nUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.I18N_JSON)try{const t=(yield o.i18nS.getById(o.codeObj._id).toPromise()).data;t.keysCode=o.editorCodeFinder.getValue(),yield o.i18nS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.i18n.editSuccess)}catch(t){o.catchErrorCommon(t)}})()}secretsUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.SECRET_JSON)try{const t=(yield o.secretS.getById(o.codeObj._id).toPromise()).data;t.keysCode=o.editorCodeFinder.getValue(),t.keysCode=o.generalCS.getEncryptedString(t.keysCode,f.c.crypto.passCommunication),yield o.secretS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsCS.secret.editSuccess)}catch(t){o.catchErrorCommon(t)}})()}tpApiSettingUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.THIRD_PARTY_API_SETTINGS_JSON)try{const t=(yield o.tpApiSettingsS.getById(o.codeObj._id).toPromise()).data;t.thirdPartyApiSettingsCode=o.editorCodeFinder.getValue(),yield o.tpApiSettingsS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess(o.constantsS.tpApiSettings.addOrUpdateSuccess)}catch(t){o.catchErrorCommon(t)}})()}schemaUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.SCHEMA_JSON)try{const t=(yield o.schemaS.getById(o.codeObj._id).toPromise()).data;t.propertiesCode=o.editorCodeFinder.getValue(),yield o.schemaS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("Schema updated successfully.")}catch(t){o.catchErrorCommon(t)}})()}dbMasterUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.DB_MASTERS_JSON)try{const t=(yield o.dbMastersS.getById(o.codeObj._id).toPromise()).data;t.dbMasterConfigCode=o.editorCodeFinder.getValue(),o.codeObj[n.$X.dbMasterConfigCode]=t.dbMasterConfigCode,yield o.dbMastersS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("DB Master updated successfully.")}catch(t){o.catchErrorCommon(t)}})()}dbMasterUpdateJSUtilsData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.DB_MASTERS_JS_UTILS)try{const t=(yield o.dbMastersS.getById(o.codeObj._id).toPromise()).data;t.pageUtilsCode=o.editorCodeFinder.getValue(),o.codeObj[n.$X.pageUtilsCode]=t.pageUtilsCode,yield o.dbMastersS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("DB Master utils updated successfully.")}catch(t){o.catchErrorCommon(t)}})()}uiMakerUtilityUpdateData(){var o=this;return(0,c.A)(function*(){if(o.codeObj.apiCategory===r.O.UI_MAKER_UTILITY_CLASS)try{const t=(yield o.uiMakerUtilsS.getById(o.codeObj._id).toPromise()).data;t.utilsCode=o.editorCodeFinder.getValue(),o.codeObj[n.hJ.utilsCode]=t.utilsCode,yield o.uiMakerUtilsS.put(t._id,t,{select:E.GX._id}).toPromise(),o.ns.showSuccess("UI Maker utility updated successfully.")}catch(t){o.catchErrorCommon(t)}})()}setEditorValueInCodeOrHook(o){const t=this.getVersionObject(o,this.codeObj.version);this.codeObj.hookType?(this.codeObj.apiCategory===r.O.CUSTOM_APIS||this.codeObj.apiCategory===r.O.THIRD_PARTY_APIS||this.codeObj.apiCategory===r.O.SCHEDULERS||this.codeObj.apiCategory===r.O.UTILITY_CLASS||this.codeObj.apiCategory===r.O.EVENTS)&&this.prePostHooksCodeCommon(t):t.apiCodeStr=this.editorCodeFinder.getValue()}getVersionObject(o,t){for(const s of o)if(s.version===t)return s}prePostHooksCodeCommon(o){for(const t of o.preHooks)t.name===this.codeObj.name&&t._id===this.codeObj.preHookId&&"Pre Hook"===this.codeObj.hookType&&(t.hookCode=this.editorCodeFinder.getValue());for(const t of o.postHooks)t.name===this.codeObj.name&&t._id===this.codeObj.postHookId&&"Post Hook"===this.codeObj.hookType&&(t.hookCode=this.editorCodeFinder.getValue())}resetCodeObj(){this.codeObj={},this.editorCodeFinder.setValue("")}catchErrorCommon(o){this.ns.showErrorMessageFromErrorObject(o),this.lastError=o.error,this.tab=this.tab||{},this.tab.axiosResponse={data:o.error},this.monacoS.highlightErrorInMonacoEditor(this.editorCodeFinder,this.tab,"MainSandbox.ts",this.monacoDecorations)}viewError(){this.viewDockerfileModelC.showModal(this.generalCS.stringify(this.lastError),y.L.json)}isResponseCollapsed=!1;showLoadingTypes;toggleResponseTab(){this.isResponseCollapsed=!this.isResponseCollapsed,this.layout.isResponseCollapsed=!this.layout.isResponseCollapsed}reloadTypes(){var o=this;return(0,c.A)(function*(){yield o.removeExistingAndLoadFreshTypesInMonacoEditor()})()}removeExistingAndLoadFreshTypesInMonacoEditor(){var o=this;return(0,c.A)(function*(){try{o.showLoadingTypes=!0,yield o.monacoS.loadTypesInMonaco(o.BE_HOST_PORT,o.authCS.getUserId(),null),o.showLoadingTypes=!1}catch{}o.cd.detectChanges()})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(t){return new(t||i)(e.rXU(P.f),e.rXU(u.X),e.rXU(g.e),e.rXU(A.l),e.rXU(I.a),e.rXU(j.t),e.rXU(v.S),e.rXU(l.g),e.rXU(h.o),e.rXU(d.h),e.rXU(S.S),e.rXU(p.f),e.rXU(m.X),e.rXU(N.P),e.rXU(k.E),e.rXU(G.O),e.rXU(B.I),e.rXU(L.m),e.rXU(H.d),e.rXU(K.N),e.rXU(X.i),e.rXU(Y.S),e.rXU(W.d),e.rXU(J.B),e.rXU(x.x),e.rXU(V.V),e.rXU(w.s),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:i,selectors:[["app-code-finder-result"]],viewQuery:function(t,s){if(1&t&&(e.GBs(oe,5),e.GBs(te,5)),2&t){let F;e.mGM(F=e.lsd())&&(s.insertCodeModalC=F.first),e.mGM(F=e.lsd())&&(s.viewDockerfileModelC=F.first)}},inputs:{modalId:"modalId"},decls:34,vars:32,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header","font-weight-normal"],[2,"font-size","small"],[1,"fas","fa-list-alt","text-yellow","fa-fw","mr-1"],[4,"ngIf"],[1,"overflow-hidden","h-100"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],["tooltipPosition","top",3,"pTooltip"],["pTooltip","Instances","tooltipPosition","top",1,"pl-1"],["pTooltip","Databases","tooltipPosition","top",1,"pl-1"],["pTooltip","Collections","tooltipPosition","top",1,"pl-1"],["pTooltip","API","tooltipPosition","top",1,"pl-1"],["pTooltip","Hook Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Hook Type","tooltipPosition","top",1,"pl-1","small","text-secondary"],["pTooltip","Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Schedulers Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Version","tooltipPosition","top",1,"pl-1","small","text-secondary"],["pTooltip","Event Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Listener Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Custom API Name","tooltipPosition","top",1,"pl-1"],["class","pl-1","pTooltip","Hook Name","tooltipPosition","top",4,"ngIf"],["class","pl-1 small text-secondary","pTooltip","Hook Type","tooltipPosition","top",4,"ngIf"],["pTooltip","Library","tooltipPosition","top",1,"pl-1"],["pTooltip","API Versions","tooltipPosition","top",1,"pl-1"],["pTooltip","API Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Utility Class Name","tooltipPosition","top",1,"pl-1"],["pTooltip","Secret Name","tooltipPosition","top",1,"pl-1"],["pTooltip","System Api Name","tooltipPosition","top",1,"pl-1"],[1,"float-right","cursor-pointer","mr-2",3,"ngStyle","click"],[1,"fas","fa-save","text-success","fa-fw"],["pTooltip","Toggle response panel","tooltipPosition","left",1,"float-right","cursor-pointer","mr-2",3,"click"],[1,"fas","fa-window-maximize","text-warning","fa-fw","fa-rotate-90"],["sava-no-dbl-click","","pTooltip","Reload types","tooltipPosition","left",1,"float-right","cursor-pointer","mr-2",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],["class","d-inline-block text-danger float-right mr-2",4,"ngIf"],["class","mr-2 font-weight-bold float-right matchCircle",3,"pTooltip",4,"ngIf"],["href","javascript:;","class","text-danger float-right mr-2",3,"click",4,"ngIf"],[1,"d-inline-block","text-danger","float-right","mr-2"],["pTooltip","Loading types...","tooltipPosition","left",1,"fas","fa-spinner","fa-fw","fa-spin","fa-lg"],[1,"mr-2","font-weight-bold","float-right","matchCircle",3,"pTooltip"],["href","javascript:;",1,"text-danger","float-right","mr-2",3,"click"]],template:function(t,s){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"span",2),e.nrm(3,"i",3),e.DNE(4,se,15,8,"span",4),e.DNE(5,ie,9,5,"span",4),e.DNE(6,ae,11,6,"span",4),e.DNE(7,ne,13,7,"span",4),e.DNE(8,re,9,5,"span",4),e.DNE(9,de,9,5,"span",4),e.DNE(10,ce,5,3,"span",4),e.DNE(11,pe,5,3,"span",4),e.DNE(12,_e,5,3,"span",4),e.DNE(13,le,7,4,"span",4),e.DNE(14,Oe,9,5,"span",4),e.DNE(15,me,9,6,"span",4),e.DNE(16,ue,13,8,"span",4),e.DNE(17,ge,7,4,"span",4),e.DNE(18,Ie,5,3,"span",4),e.DNE(19,fe,5,3,"span",4),e.DNE(20,je,5,3,"span",4),e.DNE(21,Te,11,6,"span",4),e.DNE(22,ye,9,5,"span",4),e.DNE(23,Re,9,5,"span",4),e.DNE(24,be,9,5,"span",4),e.DNE(25,Pe,9,5,"span",4),e.DNE(26,Fe,5,3,"span",4),e.k0s(),e.DNE(27,Ue,11,5,"span",4),e.k0s(),e.j41(28,"div",5)(29,"app-monaco-editor",6),e.bIt("editorGenerated",function(M){return s.editorGenerated(M)}),e.k0s()()(),e.nrm(30,"app-insert-code-modal",7,8)(32,"app-monaco-editor-modal",9,10)),2&t&&(e.R7$(4),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.INSTANCE_API_HOOKS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.INSTANCE_HOOKS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.DATABASE_HOOKS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.COLLECTION_HOOKS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SYSTEM_APIS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SYSTEM_API_HOOKS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.MIGRATION_SCRIPT),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.PROCESS_INITIALIZER),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SCHEDULERS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.EVENTS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.CUSTOM_APIS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.THIRD_PARTY_APIS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.UTILITY_CLASS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.I18N_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SECRET_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SYSTEM_API_SETTINGS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.INSTANCE_API_SETTINGS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.THIRD_PARTY_API_SETTINGS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.SCHEMA_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.DB_MASTERS_JSON),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.DB_MASTERS_JS_UTILS),e.R7$(1),e.Y8G("ngIf",s.codeObj&&s.codeObj.apiCategory===s.EAPICategory.UI_MAKER_UTILITY_CLASS),e.R7$(1),e.Y8G("ngIf",s.codeObj.apiCategory),e.R7$(2),e.Y8G("isSchemaEditor",!0)("editorOptions",s.editorOptionsEditorCodeFinder),e.R7$(1),e.Y8G("frameId","idInsertCodeFinder")("modalId","idInsertCodeFinderForm")("docsHostPort",s.DOCS_HOST_PORT),e.R7$(2),e.Y8G("modalId","idMonacoEditorModalInCodeFinder")("editorOptionsMonacoEditorModal",s.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[U.bT,U.B3,z.U,Z.V,Q.A,q.m,ee.J],styles:[".from-modal[_ngcontent-%COMP%]{height:calc(100vh - 117px)}.from-page[_ngcontent-%COMP%]{height:calc(100vh - 87px)}.matchCircle[_ngcontent-%COMP%]{background-color:#ff0;border-radius:10px;padding:0 6px;color:#000}"],changeDetection:0})}return i})()},924:(D,T,a)=>{a.d(T,{n:()=>I});var c=a(467),_=a(6645),C=a(5632),n=a(540),E=a(6268),f=a(7237),r=a(6708),y=a(3966),R=a(6129),b=a(4341),e=a(177),P=a(7515),u=a(8542);function g(j,v){if(1&j&&(n.j41(0,"span",23),n.EFF(1),n.k0s()),2&j){const l=n.XpG();n.R7$(1),n.SpI("Total Items: ",l.searchArrays.length,"")}}function A(j,v){1&j&&n.nrm(0,"p-progressSpinner",24)}let I=(()=>{class j{instanceS;authCS;ns;eventCenterS;cd;generalS;loading={grid:!1};subscriptions=[];searchArrays=[];gridKey=_.GX._id;searchText="";isCaseSensitive=!1;constructor(l,h,d,S,p,m){this.instanceS=l,this.authCS=h,this.ns=d,this.eventCenterS=S,this.cd=p,this.generalS=m}ngOnInit(){this.generalS.setNewTitle("API Maker - Code Finder")}codeSearch(){var l=this;return(0,c.A)(function*(){try{l.loading.grid=!0;const h={text:l.searchText.trim(),user:l.authCS.getUserId(),isCaseSensitive:l.isCaseSensitive};if(h.text){const d=yield l.instanceS.codeFinderData(h);if(d.success)if(l.searchArrays=d.data,l.searchArrays.length)l.showDataInUI();else{const S=[];S.push('<div class="bold text-warning cursor-pointer pt-3 text-center">\n <span class="pl-2">No match found</span>\n </div>'),$("[name='codeBlock']").html(S.join("")),l.eventCenterS.codeFinderResult.next([])}}l.loading.grid=!1,l.cd.detectChanges()}catch(h){l.ns.showErrorFromResponse(h.error||h,"Unable to code search.")}})()}showDataInUI(){const l=[],h=[];for(const d of this.searchArrays){const S=this.searchArrays.indexOf(d);let p="",m="";d.apiCategory===C.O.SCHEDULERS?(p="SCH",m="Scheduler"):d.apiCategory===C.O.MIGRATION_SCRIPT?(p="DB-MS",m="Database Migration Script"):d.apiCategory===C.O.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE?(p="WSN",m="WebSocket User Can Connect"):d.apiCategory===C.O.PROCESS_INITIALIZER?(p="PI",m="Process Initializer"):d.apiCategory===C.O.EVENTS?(p="EV",m="Event"):d.apiCategory===C.O.CUSTOM_APIS?(p="CA",m="Custom APIs"):d.apiCategory===C.O.THIRD_PARTY_APIS?(p="TP",m="Third Party APIs"):d.apiCategory===C.O.THIRD_PARTY_API_SETTINGS_JSON?(p="TP-S",m="Third Party API Settings"):d.apiCategory===C.O.INSTANCE_API_SETTINGS_JSON?(p="INS-J",m="Instance APIs Settings"):d.apiCategory===C.O.INSTANCE_API_HOOKS_JSON?(p="INS-API-Hook",m="Instance APIs Hooks"):d.apiCategory===C.O.INSTANCE_HOOKS?(p="INS-Hook",m="Instance Hooks"):d.apiCategory===C.O.DATABASE_HOOKS?(p="DB-Hook",m="Database Hooks"):d.apiCategory===C.O.COLLECTION_HOOKS?(p="COL-Hook",m="Collection Hooks"):d.apiCategory===C.O.SYSTEM_API_SETTINGS_JSON?(p="SYS-J",m="System API Settings"):d.apiCategory===C.O.SYSTEM_API_HOOKS_JSON?(p="SYS-Hook",m="System API Hooks"):d.apiCategory===C.O.UTILITY_CLASS?(p="UTIL",m="Utility Classes"):d.apiCategory===C.O.I18N_JSON?(p="I18N",m="Internationalization Settings"):d.apiCategory===C.O.SECRET_JSON?(p="SEC",m="Secret"):d.apiCategory===C.O.SCHEMA_JSON?(p="SC",m="Schema"):d.apiCategory===C.O.DB_MASTERS_JSON?(p="DMC",m="DB Master Config"):d.apiCategory===C.O.DB_MASTERS_JS_UTILS?(p="DMU",m="DB Master Utils"):d.apiCategory===C.O.UI_MAKER_UTILITY_CLASS?(p="UMU",m="UI Maker Utils"):(p=d.categoryName,m=d.categoryName),d.prefix=p,d.tooltip=m,d.versionUI="-1"===d?.version?"Original":d?.version?d.version:"",l.push('<div class="bold cursor-pointer pt-1">'),l.push('<i class="fas fa-times fa-fw text-danger float-right pt-1 nameRemoveSearchResultBlock"></i>'),l.push(`<span class="pl-2 font-weight-bold" title="${m}">${p} :</span>`),d.name&&l.push(`<span class="pl-2">${d.name}</span>`),d.versionUI&&l.push(`<span class="pl-2 small text-secondary">${"("+d.versionUI+")"}</span>`),d.hookType&&l.push(`<span class="pl-2 small">${"["+d.hookType+"]"}</span>`),l.push(`<pre class="h-100 language-javascript m-1 cursor-pointer"><code name="namePrismCss" id="idCodeFinder_${S}" class="language-javascript"></code></pre>`),l.push("</div>"),h.push({i:S,code:d.apiCode})}$("[name='codeBlock']").html(l.join(""));for(const d of h)$(`#idCodeFinder_${d.i}`).text(d.code),Prism.highlightElement(document.getElementById(`idCodeFinder_${d.i}`));this.cd.detectChanges(),$("pre.language-javascript").on("click",d=>{$("pre.bg-primary").removeClass("bg-primary"),$(d.currentTarget.className+=" bg-primary");const S=$(d.currentTarget.childNodes).attr("id").split("_")[1];this.searchArrays[S].searchKeyWord=this.searchText.trim(),this.eventCenterS.codeFinderResult.next([this.searchArrays[S]])}),$("i.nameRemoveSearchResultBlock").on("click",d=>{const S=Number($(d.currentTarget).parent().find("code[name=namePrismCss]").attr("id").split("_")[1]);this.searchArrays.splice(S,1),this.showDataInUI()})}clear(){this.searchText="",this.eventCenterS.codeFinderResult.next([]),$("[name='codeBlock']").empty(),this.searchArrays=[]}static \u0275fac=function(h){return new(h||j)(n.rXU(E.J),n.rXU(f.l),n.rXU(r.m),n.rXU(y.d),n.rXU(n.gRc),n.rXU(R.f))};static \u0275cmp=n.VBU({type:j,selectors:[["app-code-finder-search"]],decls:26,vars:4,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header","font-weight-normal"],["src","/assets/images/icons/finder.svg","alt","Code Finder",1,"fa-fw","mr-1"],["class","pl-3 text-info",4,"ngIf"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/features/code-finder.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],[1,"pt-1","pl-1","pr-1"],[1,"input-group","input-group-sm","mb-1"],["name","searchText","id","code_search","placeholder","Enter To Search",1,"form-control","form-control-sm",3,"ngModel","ngModelChange","keyup.enter"],[1,"input-group-append"],["type","button","pTooltip","Clear","tooltipPosition","bottom",1,"btn","btn-outline-warning",3,"click"],[1,"fas","fa-ban","fa-fw"],["type","button","data-toggle","dropdown","pTooltip","Case Sensitive","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-info"],[1,"fas","fa-ellipsis-v"],[1,"dropdown-menu","pl-4"],["type","checkbox","name","idIsCaseSensitive","id","idIsCaseSensitive",1,"p-checkbox",2,"vertical-align","middle!important",3,"ngModel","ngModelChange"],["for","idIsCaseSensitive",1,"pt-1","pl-2"],[1,"card-body","p-0","h-100","overflow-auto"],[1,"position-relative","h-100"],[1,"overflow-auto"],["name","codeBlock"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"pl-3","text-info"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(h,d){1&h&&(n.j41(0,"div",0)(1,"div",1)(2,"span"),n.nrm(3,"img",2),n.EFF(4," Search"),n.k0s(),n.DNE(5,g,2,1,"span",3),n.j41(6,"div",4)(7,"a",5),n.nrm(8,"img",6),n.k0s()()(),n.j41(9,"div",7)(10,"div",8)(11,"input",9),n.bIt("ngModelChange",function(p){return d.searchText=p})("keyup.enter",function(){return d.codeSearch()}),n.k0s(),n.j41(12,"div",10)(13,"button",11),n.bIt("click",function(){return d.clear()}),n.nrm(14,"i",12),n.k0s(),n.j41(15,"button",13),n.nrm(16,"i",14),n.k0s(),n.j41(17,"div",15)(18,"input",16),n.bIt("ngModelChange",function(p){return d.isCaseSensitive=p}),n.k0s(),n.j41(19,"label",17),n.EFF(20,"Case Sensitive"),n.k0s()()()()(),n.j41(21,"div",18)(22,"div",19)(23,"div",20),n.nrm(24,"div",21),n.DNE(25,A,1,0,"p-progressSpinner",22),n.k0s()()()()),2&h&&(n.R7$(5),n.Y8G("ngIf",d.searchArrays.length),n.R7$(6),n.Y8G("ngModel",d.searchText),n.R7$(7),n.Y8G("ngModel",d.isCaseSensitive),n.R7$(7),n.Y8G("ngIf",d.loading.grid))},dependencies:[b.me,b.Zm,b.BC,b.vS,e.bT,P.p,u.m],encapsulation:2,changeDetection:0})}return j})()},284:(D,T,a)=>{a.d(T,{y:()=>b});var c=a(6645),_=a(540),C=a(6129),n=a(177),E=a(924),f=a(4182);const r=["codeFinderResult"],y=function(e,P){return{"col-4":e,"d-none":P}},R=function(e,P){return{"col-8":e,"col-12":P}};let b=(()=>{class e{cd;generalS;modalId="idDefaultCodeFinderId";loading={grid:!1};subscriptions=[];gridKey=c.GX._id;codeFinderResult;constructor(u,g){this.cd=u,this.generalS=g}ngOnInit(){setTimeout(()=>{this.codeFinderResult.layout=this},1e3)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(g){return new(g||e)(_.rXU(_.gRc),_.rXU(C.f))};static \u0275cmp=_.VBU({type:e,selectors:[["app-code-finder-w"]],viewQuery:function(g,A){if(1&g&&_.GBs(r,5),2&g){let I;_.mGM(I=_.lsd())&&(A.codeFinderResult=I.first)}},inputs:{modalId:"modalId"},decls:7,vars:9,consts:[[1,"pt-1","pl-1","pr-1"],[1,"row","m-0","overflow-hidden","code-finder-height"],[1,"p-0","h-100",3,"ngClass"],[1,"w-100"],[1,"w-100",3,"modalId"],["codeFinderResult",""]],template:function(g,A){if(1&g&&(_.j41(0,"div",0)(1,"div",1)(2,"div",2),_.nrm(3,"app-code-finder-search",3),_.k0s(),_.j41(4,"div",2),_.nrm(5,"app-code-finder-result",4,5),_.k0s()()()),2&g){const I=_.sdS(6);_.R7$(2),_.Y8G("ngClass",_.l_i(3,y,!I.isResponseCollapsed,I.isResponseCollapsed)),_.R7$(2),_.Y8G("ngClass",_.l_i(6,R,!I.isResponseCollapsed,I.isResponseCollapsed)),_.R7$(1),_.Y8G("modalId",A.modalId)}},dependencies:[n.YU,E.n,f.K],encapsulation:2,changeDetection:0})}return e})()},3621:(D,T,a)=>{a.r(T),a.d(T,{CodeFinderM:()=>P});var c=a(7060),_=a(1709),C=a(2173),n=a(284),y=(a(4568),a(924),a(4182),a(2508)),R=a(540);const b=[{path:"finder",component:n.y,canActivate:[C.Z]}];let P=(()=>{class u{static \u0275fac=function(I){return new(I||u)};static \u0275mod=R.$C({type:u});static \u0275inj=R.G2t({imports:[c.iI.forChild(b),_.u,y.v]})}return u})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[379],{379:(he,S,s)=>{s.r(S),s.d(S,{SandboxSettingsM:()=>fe});var D=s(7060),y=s(2173),E=s(1709),A=s(2393),d=s(467),e=s(540),u=s(7376),b=s(8727),c=s(5046),j=s(6645),v=s(5312),T=s(3295),h=s(7237),x=s(2396),w=s(334),k=s(6708),g=s(5779),C=s(1987),F=s(3864),R=s(9819),M=s(6268),G=s(364),N=s(6129),m=s(4341),_=s(177),P=s(5182),X=s(368),V=s(6914),f=s(7645),B=s(7515),O=s(4945),I=s(8542),U=s(3478);function L(a,r){1&a&&(e.j41(0,"tr")(1,"th"),e.EFF(2,"Name"),e.k0s(),e.j41(3,"th",28),e.EFF(4,"Action"),e.k0s()())}function Y(a,r){if(1&a){const t=e.RV6();e.j41(0,"div",31)(1,"button",32),e.bIt("click",function(n){e.eBV(t);const o=e.XpG().$implicit,l=e.XpG();return e.Njj(l.editAllowedOrigin(n,o))}),e.nrm(2,"i",33),e.k0s(),e.j41(3,"button",34),e.bIt("click",function(n){e.eBV(t);const o=e.XpG().$implicit,l=e.XpG();return e.Njj(l.removeAllowedOrigin(n,o))}),e.nrm(4,"i",35),e.k0s()()}}function K(a,r){if(1&a&&(e.j41(0,"tr",29)(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.DNE(4,Y,5,0,"div",30),e.k0s()()),2&a){const t=r.$implicit;e.Y8G("pSelectableRow",t),e.R7$(2),e.JRh(t.name),e.R7$(2),e.Y8G("ngIf",!t.isReadOnly)}}function J(a,r){if(1&a){const t=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.save())}),e.nrm(1,"i",37),e.j41(2,"span"),e.EFF(3,"Save"),e.k0s()()}}let H=(()=>{class a{authCS;userS;eventCenterCS;notificationS;cs;confirmationService;modalId="idAllowedOriginModal";subscriptions=[];allowedOriginsGridData=[];saveSettings=new e.bkB;gridKeyAllowedOrigins="name";allowedOriginModel={domainName:"",domainNameBak:""};exampleOrigin=location.origin;allowedOriginData={mode:c.X.ADD};EFormMode=c.X;selectedRowsUI=[];constructor(t,i,n,o,l,p){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.cs=l,this.confirmationService=p}ngOnInit(){}save(){var t=this;return(0,d.A)(function*(){if(t.allowedOriginData.mode===c.X.ADD)t.allowedOriginsGridData.push({name:t.allowedOriginModel.domainName});else{const i=t.allowedOriginsGridData.findIndex(n=>n.name===t.allowedOriginModel.domainNameBak);t.allowedOriginsGridData[i].name=t.allowedOriginModel.domainName}t.allowedOriginsGridData=u.uniqBy(t.allowedOriginsGridData,"name"),t.saveSettings.emit(),t.hideAllowedOriginModal()})()}showAllowedOriginModal(){$("#idAllowedOriginModal").modal("show")}hideAllowedOriginModal(){$("#idAllowedOriginModal").modal("hide")}addAllowedOrigin(){var t=this;return(0,d.A)(function*(){t.allowedOriginModel.domainNameBak=t.allowedOriginModel.domainName="",t.allowedOriginData.mode=c.X.ADD,t.showAllowedOriginModal()})()}editAllowedOrigin(t,i){var n=this;return(0,d.A)(function*(){n.allowedOriginModel.domainNameBak=n.allowedOriginModel.domainName=i.name,n.allowedOriginData.mode=c.X.EDIT,n.showAllowedOriginModal()})()}doubleClick(){this.editAllowedOrigin(null,this.selectedRowsUI[0]).then()}removeAllowedOrigin(t,i){var n=this;return(0,d.A)(function*(){var o;n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentAllowedOriginConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,d.A)(function*(){yield n.removeAO(t,i)}),function(){return o.apply(this,arguments)})})})()}removeAO(t,i){var n=this;return(0,d.A)(function*(){const o=n.allowedOriginsGridData.findIndex(l=>l.name===i.name);n.allowedOriginsGridData.splice(o,1),n.saveSettings.emit()})()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.rXU(h.l),e.rXU(x.N),e.rXU(w.u),e.rXU(k.m),e.rXU(C.X),e.rXU(g.td))};static \u0275cmp=e.VBU({type:a,selectors:[["allowed-origin-c"]],inputs:{allowedOriginsGridData:["allowedOrigins","allowedOriginsGridData"]},outputs:{saveSettings:"saveSettings"},decls:37,vars:10,consts:[[1,"card","shadow-sm","mt-2","mr-1","mb-5",2,"height","384px"],[1,"card-header"],[1,"fas","fa-link","text-yellow","fa-fw","mr-1"],["pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","350px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["aria-hidden","true","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","mt-3","mb-0"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["name","name","spellcheck","false","type","text","placeholder","Please provide domain name",1,"form-control","form-control-sm",3,"ngModel","blur","ngModelChange"],[1,"form-group","row"],[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,"click",4,"ngIf"],[2,"width","100px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"text-center"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"span"),e.nrm(3,"i",2),e.EFF(4," Allowed Origins"),e.k0s(),e.j41(5,"span",3),e.bIt("click",function(){return n.addAllowedOrigin()}),e.nrm(6,"i",4),e.k0s()(),e.j41(7,"div",5)(8,"p-table",6),e.bIt("selectionChange",function(l){return n.selectedRowsUI=l})("dblclick",function(){return n.doubleClick()}),e.DNE(9,L,5,0,"ng-template",7),e.DNE(10,K,5,3,"ng-template",8),e.k0s()()(),e.j41(11,"div",9)(12,"div",10)(13,"div",11)(14,"div",12)(15,"span"),e.nrm(16,"i",13),e.EFF(17," Allowed Origins"),e.k0s(),e.j41(18,"button",14)(19,"span",15),e.nrm(20,"i",16),e.k0s()()(),e.j41(21,"div",17)(22,"div",18)(23,"label",19),e.EFF(24,"Domain name"),e.k0s(),e.j41(25,"div",20)(26,"input",21),e.bIt("blur",function(){return n.allowedOriginModel.domainName=n.allowedOriginModel.domainName.toLowerCase()})("ngModelChange",function(l){return n.allowedOriginModel.domainName=l}),e.k0s()()(),e.j41(27,"div",22),e.nrm(28,"label",19),e.j41(29,"div",20)(30,"label",23),e.EFF(31),e.k0s()()()(),e.j41(32,"div",24)(33,"button",25),e.nrm(34,"i",26),e.EFF(35," Close"),e.k0s(),e.DNE(36,J,4,0,"button",27),e.k0s()()()()),2&i&&(e.R7$(8),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRowsUI)("dataKey",n.gridKeyAllowedOrigins)("scrollable",!0)("value",n.allowedOriginsGridData),e.R7$(3),e.FS9("id",n.modalId),e.R7$(15),e.Y8G("ngModel",n.allowedOriginModel.domainName),e.R7$(5),e.SpI("(Ex: ",n.exampleOrigin,")"),e.R7$(5),e.Y8G("ngIf",n.allowedOriginData.mode!==n.EFormMode.VIEW))},dependencies:[m.me,m.BC,m.vS,_.bT,U.U,f.XI,g.Ei,f.d5,I.m],encapsulation:2})}return a})();const Q=["addNpmLibC"],W=["allowedOriginC"],z=["SandboxSettingsPkgVersionsModalC"];function Z(a,r){1&a&&(e.j41(0,"tr"),e.nrm(1,"th",49)(2,"th",50),e.j41(3,"th",51),e.EFF(4,"Version"),e.k0s(),e.j41(5,"th"),e.EFF(6,"Name"),e.k0s(),e.j41(7,"th",52),e.EFF(8,"Sub Dependencies"),e.k0s(),e.j41(9,"th",53),e.EFF(10,"Third Party API"),e.k0s(),e.j41(11,"th",54),e.EFF(12,"Default"),e.k0s(),e.j41(13,"th",55),e.EFF(14,"Action"),e.k0s()())}function q(a,r){1&a&&e.nrm(0,"i",64)}function ee(a,r){1&a&&e.nrm(0,"i",65)}function te(a,r){if(1&a&&(e.j41(0,"div",67),e.EFF(1),e.k0s()),2&a){const t=r.$implicit;e.R7$(1),e.Lme("",t.name," @",t.version,"")}}function ne(a,r){if(1&a&&(e.j41(0,"div"),e.DNE(1,te,2,2,"div",66),e.k0s()),2&a){const t=r.$implicit;e.R7$(1),e.Y8G("ngForOf",t.dependencies)}}function ie(a,r){1&a&&e.nrm(0,"i",68)}function ae(a,r){1&a&&e.nrm(0,"i",68)}function oe(a,r){if(1&a){const t=e.RV6();e.j41(0,"div",61)(1,"button",69),e.bIt("click",function(n){e.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return e.Njj(l.editData(n,o))}),e.nrm(2,"i",70),e.k0s(),e.j41(3,"button",71),e.bIt("click",function(n){e.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return e.Njj(l.removePermanentDialog(n,o))}),e.nrm(4,"i",72),e.k0s()()}}function se(a,r){if(1&a&&(e.j41(0,"tr",56)(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.DNE(4,q,1,0,"i",57),e.DNE(5,ee,1,0,"i",58),e.k0s(),e.j41(6,"td"),e.EFF(7),e.k0s(),e.j41(8,"td"),e.EFF(9),e.k0s(),e.j41(10,"td")(11,"div",59),e.DNE(12,ne,2,1,"div",60),e.k0s()(),e.j41(13,"td",61),e.DNE(14,ie,1,0,"i",62),e.k0s(),e.j41(15,"td",61),e.DNE(16,ae,1,0,"i",62),e.k0s(),e.j41(17,"td"),e.DNE(18,oe,5,0,"div",63),e.k0s()()),2&a){const t=r.$implicit,i=r.rowIndex;e.Y8G("pSelectableRow",t),e.R7$(2),e.JRh(i+1),e.R7$(2),e.Y8G("ngIf",t.active),e.R7$(1),e.Y8G("ngIf",!t.active),e.R7$(2),e.JRh(t.version),e.R7$(2),e.JRh(t.name),e.R7$(3),e.Y8G("ngForOf",t.subDependencies),e.R7$(2),e.Y8G("ngIf",t.isThirdPartyApi),e.R7$(2),e.Y8G("ngIf",t.isDefault),e.R7$(2),e.Y8G("ngIf",!t.isReadOnly)}}function re(a,r){1&a&&(e.j41(0,"tr"),e.nrm(1,"th",49),e.j41(2,"th",51),e.EFF(3,"Version"),e.k0s(),e.j41(4,"th"),e.EFF(5,"Name"),e.k0s(),e.j41(6,"th",73),e.EFF(7,"Third Party API"),e.k0s(),e.j41(8,"th",51),e.EFF(9,"Default"),e.k0s()())}function le(a,r){1&a&&e.nrm(0,"i",68)}function de(a,r){1&a&&e.nrm(0,"i",68)}function ce(a,r){if(1&a&&(e.j41(0,"tr",56)(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.k0s(),e.j41(7,"td"),e.DNE(8,le,1,0,"i",62),e.k0s(),e.j41(9,"td"),e.DNE(10,de,1,0,"i",62),e.k0s()()),2&a){const t=r.$implicit,i=r.rowIndex;e.Y8G("pSelectableRow",t),e.R7$(2),e.JRh(i+1),e.R7$(2),e.JRh(t.version),e.R7$(2),e.JRh(t.name),e.R7$(2),e.Y8G("ngIf",t.isThirdPartyApi),e.R7$(2),e.Y8G("ngIf",t.isDefault)}}function me(a,r){1&a&&e.nrm(0,"p-progressSpinner",74)}function pe(a,r){if(1&a){const t=e.RV6();e.j41(0,"div",5)(1,"div",6)(2,"button",7),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.loadGridData())}),e.nrm(3,"i",8),e.EFF(4," Refresh "),e.k0s(),e.j41(5,"button",9),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.saveSettings(n.EFormMode.EDIT))}),e.nrm(6,"i",10),e.EFF(7," Save "),e.k0s()(),e.j41(8,"div",11)(9,"div",12)(10,"span"),e.nrm(11,"i",13),e.EFF(12," Settings"),e.k0s()(),e.j41(13,"div",14)(14,"div",15)(15,"div",16)(16,"label",17),e.EFF(17,"Sandbox Count"),e.k0s(),e.j41(18,"input",18),e.bIt("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.settings.sandbox.sandboxCountOverrideAdmin=n)}),e.k0s(),e.j41(19,"div",19)(20,"span",20)(21,"span"),e.EFF(22,"1 CPU core will have one process and one process will have these many sandbox."),e.k0s(),e.nrm(23,"br"),e.j41(24,"span"),e.EFF(25,"Ideally it should be 1-2."),e.k0s()()()(),e.j41(26,"div",21)(27,"label",17),e.EFF(28,"Automatic Sandbox Restart In Seconds"),e.k0s(),e.j41(29,"input",22),e.bIt("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.settings.sandbox.automaticSandboxRestartInSeconds=n)}),e.k0s(),e.j41(30,"div",19)(31,"span",20)(32,"span",23),e.EFF(33,"All sandbox will be restarted automatically after these many seconds across all servers, without failing any request."),e.k0s(),e.nrm(34,"br"),e.k0s()()()()()(),e.j41(35,"div",11)(36,"div",12)(37,"span"),e.nrm(38,"i",24),e.EFF(39," Sandbox Dependencies"),e.k0s(),e.j41(40,"div",25)(41,"a",26),e.nrm(42,"img",27),e.k0s()(),e.j41(43,"span",28),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.showLibraryModel())}),e.nrm(44,"i",29),e.k0s()(),e.j41(45,"div",30)(46,"p-tabView",31)(47,"p-tabPanel",32)(48,"p-table",33),e.bIt("selectionChange",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.selectedRowsUI=n)})("dblclick",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.summaryTableDoubleClick())}),e.DNE(49,Z,15,0,"ng-template",34),e.DNE(50,se,19,10,"ng-template",35),e.k0s()(),e.j41(51,"p-tabPanel",36)(52,"p-table",37),e.bIt("selectionChange",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.selectedRowsPackageJson=n)}),e.DNE(53,re,10,0,"ng-template",34),e.DNE(54,ce,11,6,"ng-template",35),e.k0s()()(),e.DNE(55,me,1,0,"p-progressSpinner",38),e.k0s()(),e.j41(56,"div",11)(57,"div",12)(58,"span"),e.nrm(59,"i",39),e.EFF(60," Docker File"),e.k0s(),e.j41(61,"span",40),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.resetDockerfileToDefault())}),e.nrm(62,"i",41),e.k0s(),e.j41(63,"span",42),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.showDockerImageBuildLogs())}),e.nrm(64,"i",43),e.k0s()(),e.j41(65,"div",44)(66,"app-monaco-editor",45),e.bIt("editorGenerated",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.editorGenerated(n))}),e.k0s()()(),e.j41(67,"allowed-origin-c",46,47),e.bIt("saveSettings",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.saveSettings(n.EFormMode.EDIT))}),e.k0s(),e.j41(69,"div",48),e.EFF(70,"\xa0"),e.k0s()()}if(2&a){const t=e.XpG();e.R7$(18),e.Y8G("ngModel",t.settings.sandbox.sandboxCountOverrideAdmin),e.R7$(11),e.Y8G("ngModel",t.settings.sandbox.automaticSandboxRestartInSeconds),e.R7$(19),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsUI)("dataKey",t.gridKey)("scrollable",!0)("value",t.packageSummary),e.R7$(4),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRowsPackageJson)("dataKey",t.gridKey)("scrollable",!0)("value",t.finalPackageJson),e.R7$(3),e.Y8G("ngIf",t.loading.form),e.R7$(11),e.Y8G("editorOptions",t.editorOptionsDocker),e.R7$(1),e.Y8G("allowedOrigins",t.settings.allowedOrigins)}}const ge=[{path:"main",component:(()=>{class a{authCS;userS;eventCenterCS;notificationS;confirmationService;cs;monacoS;tpStoreApiVersionS;instanceS;feStoreCS;generalCS;STORE_BE_HOST_PORT=v.c.STORE_BE_HOST_PORT;BE_HOST_PORT=v.c.BE_HOST_PORT;subscriptions=[];data={mode:c.X.ADD,eventChannel:new e.bkB,formData:void 0};packageSummary=[];selectedRowsUI=[];gridKey="rowId";counter;EFormMode=c.X;finalPackageJson=[];selectedRowsPackageJson=[];showAll=!1;loading={form:!1};settings;tpNpmPackageAndVersion={};tpApiVersionIdMap;tpApiBundleIdMap;editorDocker;editorOptionsDocker={readOnly:!1,language:"dockerfile",contextmenu:!0};addNpmLibC;allowedOriginC;SandboxSettingsPkgVersionsModalC;constructor(t,i,n,o,l,p,ue,_e,Se,be,ve){this.authCS=t,this.userS=i,this.eventCenterCS=n,this.notificationS=o,this.confirmationService=l,this.cs=p,this.monacoS=ue,this.tpStoreApiVersionS=_e,this.instanceS=Se,this.feStoreCS=be,this.generalCS=ve}ngOnInit(){var t=this;return(0,d.A)(function*(){t.subscriptions.push(t.eventCenterCS.sandboxDep.subscribe(i=>{if(t.data.mode===c.X.ADD){for(const n of t.packageSummary)if(n.name===i.name&&n.isDefault)return void t.notificationS.showError("You can not override default package.");t.packageSummary.unshift(i),t.rowIdSet(),t.notificationS.showSuccess(t.cs.amUserSandboxDepSetting.addSuccess),t.addNpmLibC.hideModal()}})),yield t.loadGridData(),t.generalCS.setNewTitle("API Maker - Sandbox Settings")})()}loadGridData(){var t=this;return(0,d.A)(function*(){const i=yield t.userS.getAdminSettings(t.authCS.getUserId()).toPromise();t.settings=i.data||{},t.packageSummary=t.settings.sandbox.dependenciesUI.nodeJS,t.finalPackageJson=t.settings.sandbox.dependencies.nodeJS;const n=t.settings.allowedOrigins||[];t.settings.sandbox&&(t.settings.sandbox.automaticSandboxRestartInSeconds=t.settings.sandbox.automaticSandboxRestartInSeconds||null),n.sort(),t.settings.allowedOrigins=u.map(n,o=>({name:o})),t.rowIdSet();for(const o of t.finalPackageJson)o.rowId=(t.counter++).toString();t.generalCS.setValueInEditor(t,"editorDocker",t.settings.dockerFile||"")})()}editorGenerated(t){var i=this;return(0,d.A)(function*(){i.editorDocker=t,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(t,n=>{i.saveSettings()})})()}rowIdSet(){this.counter=1;for(const t of this.packageSummary)t.rowId=(this.counter++).toString()}showLibraryModel(){this.data.formData=void 0,this.data.mode=c.X.ADD,this.data.eventChannel.emit({action:b.K.OPEN_FORM_IN_ADD_MODE}),this.addNpmLibC.showModal()}saveSettings(t){var i=this;return(0,d.A)(function*(){try{const n=i.authCS.getUserId();if(i?.settings?.sandbox?.sandboxCountOverrideAdmin>5)return void i.notificationS.showError("More than 5 sandbox are not allowed.");const o={settings:{sandbox:{sandboxCountOverrideAdmin:i.settings.sandbox.sandboxCountOverrideAdmin,automaticSandboxRestartInSeconds:i.settings.sandbox.automaticSandboxRestartInSeconds||null,dependencies:{nodeJS:i.packageSummary.filter(p=>!p.isReadOnly&&!p.isThirdPartyApi&&!p.isDefault)}},dockerFile:i.editorDocker.getValue(),allowedOrigins:u.map(i.allowedOriginC.allowedOriginsGridData,"name").sort()}};(yield i.userS.put(n,o,{select:j.GX._id}).toPromise())&&(t===c.X.EDIT?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.editSuccess):"DELETE"===t?i.notificationS.showSuccess(i.cs.amUserSandboxDepSetting.removePermanent):t||i.notificationS.showSuccess("Success")),i.loadGridData().then()}catch(n){i.loading.form=!1,i.notificationS.showErrorFromResponse(n.error||n,"Unable to save settings.")}})()}removePermanentDialog(t,i){var n=this;return(0,d.A)(function*(){var o;t.stopPropagation(),t.preventDefault(),n.confirmationService.confirm({message:n.cs.amUserSandboxDepSetting.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,d.A)(function*(){yield n.removePermanent(i)}),function(){return o.apply(this,arguments)})})})()}removePermanent(t){var i=this;return(0,d.A)(function*(){i.packageSummary.splice(i.packageSummary.indexOf(t),1),i.saveSettings("DELETE").then()})()}loadDependenciesAndSchemas(){var t=this;return(0,d.A)(function*(){const{tpNpmPackageAndVersion:i,tpApiBundleIdMap:n,tpApiVersionIdMap:o}=(yield t.instanceS.getInstalledPackagesAndSchemas().toPromise()).data;t.tpNpmPackageAndVersion=i,t.tpApiBundleIdMap=n,t.tpApiVersionIdMap=o})()}commonPackageAddRemoveTasks(){var t=this;return(0,d.A)(function*(){yield t.loadDependenciesAndSchemas()})()}editData(t,i){var n=this;return(0,d.A)(function*(){t?.stopPropagation(),t?.preventDefault(),n.data.formData=i,n.data.mode=c.X.EDIT,n.data.eventChannel.emit({action:b.K.OPEN_FORM_IN_EDIT_MODE}),yield n.SandboxSettingsPkgVersionsModalC.showPkgVersions(i.name)})()}hideNpmLibModel(){this.addNpmLibC.hideModal()}resetDockerfileToDefault(){var t=this;return(0,d.A)(function*(){try{const i=yield t.feStoreCS.geDefaultDockerfile(t.BE_HOST_PORT);t.editorDocker.setValue(i.data)}catch(i){t.notificationS.showErrorFromResponse(i.error||i,"Unable to reset docker file.")}})()}showDockerImageBuildLogs(){var t=this;return(0,d.A)(function*(){const i=t.eventCenterCS.headerC,n=i.systemLogsModelC.systemLogsListC.filterOptions.find(o=>o.value===T.h.DOCKER_IMAGE_BUILD_LOGS);i.showSystemLogsModal(n)})()}summaryTableDoubleClick(){var t=this;setTimeout((0,d.A)(function*(){if(t.selectedRowsUI[0]){let i;for(const n of t.packageSummary)n[t.gridKey]===t.selectedRowsUI[0].rowId&&(i=n);i&&!i.isReadOnly&&(yield t.editData(null,i))}}),100)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(i){return new(i||a)(e.rXU(h.l),e.rXU(x.N),e.rXU(w.u),e.rXU(k.m),e.rXU(g.td),e.rXU(C.X),e.rXU(F.e),e.rXU(R.V),e.rXU(M.J),e.rXU(G.N),e.rXU(N.f))};static \u0275cmp=e.VBU({type:a,selectors:[["app-sandbox-settings-c"]],viewQuery:function(i,n){if(1&i&&(e.GBs(Q,5),e.GBs(W,5),e.GBs(z,5)),2&i){let o;e.mGM(o=e.lsd())&&(n.addNpmLibC=o.first),e.mGM(o=e.lsd())&&(n.allowedOriginC=o.first),e.mGM(o=e.lsd())&&(n.SandboxSettingsPkgVersionsModalC=o.first)}},decls:6,vars:9,consts:[["class","pt-1 pl-5 pr-5 full-body overflow-auto",4,"ngIf"],[3,"data","pkgVersionModal","modalId","hostAndPort"],["addNpmLibC",""],[3,"modalId","hostAndPort","data","dependencies","saveUpdateSandboxDep","hideLibraryModelEventEmitter","installed"],["pkgVersionsModalC","","SandboxSettingsPkgVersionsModalC",""],[1,"pt-1","pl-5","pr-5","full-body","overflow-auto"],[1,"cursor-pointer","text-right","mr-1"],[1,"btn","btn-primary","btn-sm","mt-1","mr-1",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw","cursor-pointer"],[1,"btn","btn-success","btn-sm","mt-1",3,"click"],[1,"fas","fa-save","fa-fw","cursor-pointer"],[1,"card","shadow-sm","mt-2","mr-1"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-3","overflow-hidden"],[1,"container"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["name","Setting","type","number","placeholder","Please provide value",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"col-6","pr-0"],[1,"small","text-info"],[1,"row","mt-3"],["name","automaticSandboxRestartInSeconds","type","number","placeholder","Automatic sandbox restart in seconds",1,"col-2","form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2","d-inline-block"],[1,"fas","fa-box","text-warning","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/settings/sandboxSettings.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","mr-1",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-2","overflow-hidden"],[1,"w-100"],["header","Summary"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["header","Final package.json"],["styleClass","p-datatable-striped","scrollHeight","400px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fab","fa-docker","fa-fw","mr-1","text-info"],["tooltipPosition","left","pTooltip","Reset dockerfile to default",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-undo","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","View logs of docker image build",1,"float-right","cursor-pointer","ml-2",3,"click"],[1,"fas","fa-water","text-info","fa-fw"],[1,"card-body","p-1","overflow-hidden",2,"height","400px"],[3,"editorOptions","editorGenerated"],[3,"allowedOrigins","saveSettings"],["allowedOriginC",""],[1,"mb-5"],[2,"width","55px"],[2,"width","40px"],[2,"width","100px"],[2,"width","200px"],[1,"text-center",2,"width","150px"],[1,"text-center",2,"width","100px"],[1,"text-center",2,"width","130px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],[1,"small"],[4,"ngFor","ngForOf"],[1,"text-center"],["class","fas fa-check fa-fw text-success pt-1",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],["class","pl-3",4,"ngFor","ngForOf"],[1,"pl-3"],[1,"fas","fa-check","fa-fw","text-success","pt-1"],["pTooltip","Edit","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Permanent Delete","tooltipPosition","left",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","fa-fw","cursor-pointer","text-danger"],[2,"width","150px"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){if(1&i&&(e.DNE(0,pe,71,17,"div",0),e.nrm(1,"find-npm-package",1,2),e.j41(3,"app-sandbox-settings-pkg-versions-modal",3,4),e.bIt("saveUpdateSandboxDep",function(l){return n.saveSettings(l)})("hideLibraryModelEventEmitter",function(){return n.hideNpmLibModel()})("installed",function(){return n.commonPackageAddRemoveTasks()}),e.k0s()),2&i){const o=e.sdS(4);e.Y8G("ngIf",n.settings),e.R7$(1),e.Y8G("data",n.data)("pkgVersionModal",o)("modalId","idAddNpmSandboxSettings")("hostAndPort",n.STORE_BE_HOST_PORT),e.R7$(2),e.Y8G("modalId","idAddNpmSandboxSettingsEdit")("hostAndPort",n.STORE_BE_HOST_PORT)("data",n.data)("dependencies",n.tpNpmPackageAndVersion)}},dependencies:[m.me,m.Q0,m.BC,m.vS,_.Sq,_.bT,P.m,X.y,V.A,f.XI,g.Ei,f.d5,B.p,O.JQ,O.Kp,I.m,H],encapsulation:2})}return a})(),canActivate:[y.Z]}];let fe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.$C({type:a});static \u0275inj=e.G2t({imports:[D.iI.forChild(ge),E.u,A.ApiTestingM]})}return a})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3929],{5883:(R,F,n)=>{n.d(F,{V:()=>A});var c=n(467),l=n(6645),d=n(2461),t=n(540),f=n(6268),p=n(6708),E=n(6129),r=n(177),g=n(7515),m=n(4945);function u(a,s){1&a&&t.nrm(0,"i",35)}function h(a,s){1&a&&t.nrm(0,"i",50)}function k(a,s){1&a&&t.nrm(0,"i",51)}function j(a,s){1&a&&t.nrm(0,"i",35)}function b(a,s){1&a&&t.nrm(0,"i",50)}function I(a,s){1&a&&t.nrm(0,"i",51)}function D(a,s){1&a&&t.nrm(0,"i",35)}function P(a,s){1&a&&t.nrm(0,"i",50)}function v(a,s){1&a&&t.nrm(0,"i",51)}function $(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.EFF(2,"Process Logs Path"),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s()()),2&a){const e=t.XpG().$implicit;t.R7$(4),t.JRh(e.usefulEnv.logFilePath)}}function C(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.EFF(2,"Logs Cleanup Interval"),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s()()),2&a){const e=t.XpG().$implicit;t.R7$(4),t.JRh(e.usefulEnv.logs__logRemoveSchedulerInterval)}}function N(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.EFF(2,"Max Logs Count To Keep In Log DB"),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s()()),2&a){const e=t.XpG().$implicit;t.R7$(4),t.JRh(e.usefulEnv.logs__maxLogsCount.toLocaleString("en-IN"))}}function T(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.EFF(2,"Redis Value Expires In"),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s()()),2&a){const e=t.XpG().$implicit;t.R7$(4),t.SpI("",e.usefulEnv.redisExternal__redisValueExpireInSeconds.toLocaleString("en-IN")," Seconds")}}function S(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.EFF(2,"Max Chars To Cache In Redis"),t.k0s(),t.j41(3,"td"),t.EFF(4),t.k0s()()),2&a){const e=t.XpG().$implicit;t.R7$(4),t.JRh(e.usefulEnv.redisExternal__maxCharsResToCache.toLocaleString("en-IN"))}}function x(a,s){if(1&a&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&a){const e=t.XpG().$implicit;t.R7$(1),t.SpI(" \u2192 ",e.databaseName,"")}}const M=function(a){return{"text-danger font-weight-bold":a}},O=function(a){return{"text-success font-weight-bold":a}};function w(a,s){if(1&a&&(t.j41(0,"tr")(1,"td"),t.nrm(2,"img",52),t.EFF(3),t.k0s(),t.j41(4,"td"),t.EFF(5),t.DNE(6,x,2,1,"span",45),t.k0s(),t.j41(7,"td",53),t.EFF(8),t.k0s(),t.j41(9,"td",54),t.EFF(10),t.k0s(),t.j41(11,"td",54),t.EFF(12),t.k0s()()),2&a){const e=s.$implicit,o=t.XpG(3);t.R7$(2),t.Aen("MONGO_DB"==e.type?"width:0.5rem; margin-right: 6px;":"width:1rem"),t.FS9("src",o.getInstanceIconUrl(e.type),t.B4B),t.FS9("alt",e.type),t.R7$(1),t.SpI(" ",e.type," "),t.R7$(2),t.JRh(e.instanceName),t.R7$(1),t.Y8G("ngIf",e.databaseName),t.R7$(2),t.JRh(e.cMax),t.R7$(1),t.Y8G("ngClass",t.eq3(12,M,e.cMax===e.cShared)),t.R7$(1),t.JRh(e.cShared),t.R7$(1),t.Y8G("ngClass",t.eq3(14,O,e.cAvailable>0)),t.R7$(1),t.JRh(e.cAvailable)}}function y(a,s){if(1&a&&(t.j41(0,"p-tabPanel",10)(1,"div",1)(2,"div",11)(3,"div",12)(4,"table",13)(5,"tr",14)(6,"td",15),t.nrm(7,"i",16),t.EFF(8," Worker Information"),t.k0s()(),t.j41(9,"tr")(10,"td",17),t.nrm(11,"i",18),t.EFF(12," Is Master"),t.k0s(),t.j41(13,"td"),t.EFF(14),t.k0s()(),t.j41(15,"tr")(16,"td"),t.nrm(17,"i",19),t.EFF(18," Unique Id"),t.k0s(),t.j41(19,"td"),t.EFF(20),t.k0s()(),t.j41(21,"tr")(22,"td"),t.nrm(23,"i",20),t.EFF(24," Total Workers"),t.k0s(),t.j41(25,"td"),t.EFF(26),t.k0s()(),t.j41(27,"tr")(28,"td"),t.nrm(29,"i",21),t.EFF(30," Host + Port"),t.k0s(),t.j41(31,"td"),t.EFF(32),t.k0s()()(),t.j41(33,"table",13)(34,"tr",14)(35,"td",22),t.DNE(36,u,1,0,"i",23),t.DNE(37,h,1,0,"i",24),t.DNE(38,k,1,0,"i",25),t.j41(39,"span"),t.EFF(40,"OS Memory Information"),t.k0s()()(),t.j41(41,"tr")(42,"td",17),t.nrm(43,"i",26),t.EFF(44," Total Memory"),t.k0s(),t.j41(45,"td"),t.EFF(46),t.k0s()(),t.j41(47,"tr")(48,"td"),t.nrm(49,"i",27),t.EFF(50," Free Memory"),t.k0s(),t.j41(51,"td",28),t.EFF(52),t.k0s()()(),t.j41(53,"table",29)(54,"tr",14)(55,"td",22),t.nrm(56,"i",30),t.EFF(57," Process Memory Information"),t.k0s()(),t.j41(58,"tr")(59,"td",17),t.nrm(60,"i",31),t.EFF(61," Total Use (RSS)"),t.k0s(),t.j41(62,"td",28),t.EFF(63),t.k0s()(),t.j41(64,"tr")(65,"td"),t.nrm(66,"i",32),t.EFF(67," External"),t.k0s(),t.j41(68,"td"),t.EFF(69),t.k0s()(),t.j41(70,"tr")(71,"td"),t.nrm(72,"i",33),t.EFF(73," Heap Total"),t.k0s(),t.j41(74,"td"),t.EFF(75),t.k0s()(),t.j41(76,"tr")(77,"td"),t.nrm(78,"i",34),t.EFF(79," Heap Used"),t.k0s(),t.j41(80,"td"),t.EFF(81),t.k0s()()()(),t.j41(82,"div",12)(83,"table",13)(84,"tr",14)(85,"td",22),t.DNE(86,j,1,0,"i",23),t.DNE(87,b,1,0,"i",24),t.DNE(88,I,1,0,"i",25),t.EFF(89," Platform Information "),t.k0s()(),t.j41(90,"tr")(91,"td",17),t.nrm(92,"i",35),t.EFF(93," Platform"),t.k0s(),t.j41(94,"td"),t.DNE(95,D,1,0,"i",23),t.DNE(96,P,1,0,"i",24),t.DNE(97,v,1,0,"i",25),t.j41(98,"span"),t.EFF(99),t.k0s()()(),t.j41(100,"tr")(101,"td"),t.nrm(102,"i",36),t.EFF(103," Host Name"),t.k0s(),t.j41(104,"td"),t.EFF(105),t.k0s()(),t.j41(106,"tr")(107,"td"),t.nrm(108,"i",37),t.EFF(109," Home Directory"),t.k0s(),t.j41(110,"td"),t.EFF(111),t.k0s()(),t.j41(112,"tr")(113,"td"),t.nrm(114,"i",38),t.EFF(115," Temp Directory"),t.k0s(),t.j41(116,"td"),t.EFF(117),t.k0s()(),t.j41(118,"tr")(119,"td"),t.nrm(120,"i",39),t.EFF(121," CPU Count"),t.k0s(),t.j41(122,"td"),t.EFF(123),t.k0s()(),t.j41(124,"tr")(125,"td"),t.nrm(126,"i",39),t.EFF(127," CPU Info"),t.k0s(),t.j41(128,"td",40),t.EFF(129),t.k0s()(),t.j41(130,"tr")(131,"td"),t.nrm(132,"i",41),t.EFF(133," Up Time"),t.k0s(),t.j41(134,"td"),t.EFF(135),t.k0s()(),t.j41(136,"tr")(137,"td"),t.nrm(138,"i",42),t.EFF(139," Node.js Version"),t.k0s(),t.j41(140,"td",40),t.EFF(141),t.k0s()(),t.j41(142,"tr")(143,"td"),t.nrm(144,"i",42),t.EFF(145," Node Options"),t.k0s(),t.j41(146,"td"),t.EFF(147),t.k0s()()()()(),t.j41(148,"div",43)(149,"table",29)(150,"tr",14)(151,"td",44),t.nrm(152,"i",39),t.EFF(153," Some Important Environment Variables"),t.k0s()(),t.j41(154,"tr")(155,"td",17),t.EFF(156,"Max Memory Limit Of Sandbox Node.js Process"),t.k0s(),t.j41(157,"td"),t.EFF(158),t.k0s()(),t.j41(159,"tr")(160,"td"),t.EFF(161,"Env File Path"),t.k0s(),t.j41(162,"td"),t.EFF(163),t.k0s()(),t.DNE(164,$,5,1,"tr",45),t.j41(165,"tr")(166,"td"),t.EFF(167,"Oracle Client Path"),t.k0s(),t.j41(168,"td"),t.EFF(169),t.k0s()(),t.j41(170,"tr")(171,"td"),t.EFF(172,"Logging enabled"),t.k0s(),t.j41(173,"td"),t.EFF(174),t.k0s()(),t.DNE(175,C,5,1,"tr",45),t.DNE(176,N,5,1,"tr",45),t.DNE(177,T,5,1,"tr",45),t.DNE(178,S,5,1,"tr",45),t.j41(179,"tr")(180,"td"),t.EFF(181,"JWT Expires In"),t.k0s(),t.j41(182,"td"),t.EFF(183),t.k0s()(),t.j41(184,"tr")(185,"td"),t.EFF(186,"JWT Issuer"),t.k0s(),t.j41(187,"td"),t.EFF(188),t.k0s()(),t.j41(189,"tr")(190,"td"),t.EFF(191,"Encrypted Data Valid Till Sent By FE"),t.k0s(),t.j41(192,"td"),t.EFF(193),t.k0s()(),t.j41(194,"tr")(195,"td"),t.EFF(196,"Refresh Token Is Valid Till"),t.k0s(),t.j41(197,"td"),t.EFF(198),t.k0s()(),t.j41(199,"tr")(200,"td"),t.EFF(201,"Response Compress If Larger Than These Many Bytes"),t.k0s(),t.j41(202,"td"),t.EFF(203),t.k0s()(),t.j41(204,"tr")(205,"td"),t.EFF(206,"Maximum Body Size Allowed To Accept"),t.k0s(),t.j41(207,"td"),t.EFF(208),t.k0s()(),t.j41(209,"tr")(210,"td"),t.EFF(211,"Cron Time Zone"),t.k0s(),t.j41(212,"td"),t.EFF(213),t.k0s()(),t.j41(214,"tr")(215,"td"),t.EFF(216,"Store URL"),t.k0s(),t.j41(217,"td"),t.EFF(218),t.k0s()(),t.j41(219,"tr")(220,"td"),t.EFF(221,"Maximum Test Users For UI"),t.k0s(),t.j41(222,"td"),t.EFF(223),t.k0s()(),t.j41(224,"tr")(225,"td"),t.EFF(226,"Uploaded File Cleaning Scheduler Cron"),t.k0s(),t.j41(227,"td"),t.EFF(228),t.k0s()(),t.j41(229,"tr")(230,"td"),t.EFF(231,"Uploaded File Remove Older Than This Time"),t.k0s(),t.j41(232,"td"),t.EFF(233),t.k0s()(),t.j41(234,"tr")(235,"td"),t.EFF(236,"Maximum characters allowed in console.log"),t.k0s(),t.j41(237,"td"),t.EFF(238),t.k0s()()()(),t.j41(239,"div",43)(240,"table",29)(241,"tr",14)(242,"td",44),t.nrm(243,"i",46),t.EFF(244," DB Connections"),t.k0s()(),t.j41(245,"tr")(246,"td",47),t.EFF(247," Type"),t.k0s(),t.j41(248,"td"),t.EFF(249," Name"),t.k0s(),t.j41(250,"td",48),t.EFF(251," Max"),t.k0s(),t.j41(252,"td",48),t.EFF(253," Shared"),t.k0s(),t.j41(254,"td",48),t.EFF(255," Available"),t.k0s()(),t.DNE(256,w,13,16,"tr",49),t.k0s()()()()),2&a){const e=s.$implicit;t.FS9("header","Worker - "+e.workerId),t.R7$(14),t.JRh(e.isMaster),t.R7$(6),t.JRh(e.uniqueProcessId),t.R7$(6),t.JRh(e.totalWorkers),t.R7$(6),t.JRh(e.beHostPort),t.R7$(4),t.Y8G("ngIf","linux"===e.platform),t.R7$(1),t.Y8G("ngIf","darwin"===e.platform),t.R7$(1),t.Y8G("ngIf","win32"===e.platform),t.R7$(8),t.JRh(e.totalMemory),t.R7$(6),t.JRh(e.freeMemory),t.R7$(11),t.JRh(e.memory.rss),t.R7$(6),t.JRh(e.memory.externalUsage),t.R7$(6),t.JRh(e.memory.heapTotal),t.R7$(6),t.JRh(e.memory.heapUsed),t.R7$(5),t.Y8G("ngIf","linux"===e.platform),t.R7$(1),t.Y8G("ngIf","darwin"===e.platform),t.R7$(1),t.Y8G("ngIf","win32"===e.platform),t.R7$(7),t.Y8G("ngIf","linux"===e.platform),t.R7$(1),t.Y8G("ngIf","darwin"===e.platform),t.R7$(1),t.Y8G("ngIf","win32"===e.platform),t.R7$(2),t.JRh(e.platform),t.R7$(6),t.JRh(e.hostName),t.R7$(6),t.JRh(e.homeDir),t.R7$(6),t.JRh(e.tempDir),t.R7$(6),t.JRh(e.countCPUs),t.R7$(6),t.JRh(e.cpuModel),t.R7$(6),t.JRh(e.upTime),t.R7$(6),t.JRh(e.nodeVersion),t.R7$(6),t.JRh(e.nodeOptions),t.R7$(11),t.SpI("",e.usefulEnv.sandbox__sandboxMaxOldSpaceMB," MB"),t.R7$(5),t.JRh(e.usefulEnv.envPath),t.R7$(1),t.Y8G("ngIf",e.usefulEnv.logs__enable),t.R7$(5),t.JRh(e.usefulEnv.oracleClientPath),t.R7$(5),t.JRh(e.usefulEnv.logs__enable),t.R7$(1),t.Y8G("ngIf",e.usefulEnv.logs__enable),t.R7$(1),t.Y8G("ngIf",e.usefulEnv.logs__enable),t.R7$(1),t.Y8G("ngIf",e.usefulEnv.externalResiProvided),t.R7$(1),t.Y8G("ngIf",e.usefulEnv.externalResiProvided),t.R7$(5),t.SpI("",e.usefulEnv.jwtOptions__expiresIn.toLocaleString("en-IN")," Seconds"),t.R7$(5),t.JRh(e.usefulEnv.jwtOptions__issuer),t.R7$(5),t.SpI("",e.usefulEnv.feTransferDataValidityInSecondsDefault.toLocaleString("en-IN")," Seconds"),t.R7$(5),t.SpI("",e.usefulEnv.refreshTokenValidForS," Seconds"),t.R7$(5),t.JRh(e.usefulEnv.compressThreshold.toLocaleString("en-IN")),t.R7$(5),t.SpI("",e.usefulEnv.bodyLimit.toLocaleString("en-IN")," Byte"),t.R7$(5),t.JRh(e.usefulEnv.cron_job_time_zone),t.R7$(5),t.JRh(e.usefulEnv.store_url),t.R7$(5),t.JRh(e.usefulEnv.maximum_test_user_count.toLocaleString("en-IN")),t.R7$(5),t.JRh(e.usefulEnv.uploadedFileCleaningSchedulerCron),t.R7$(5),t.SpI("",e.usefulEnv.uploadedFileRemoveOlderThanThisTimeInSeconds.toLocaleString("en-IN")," Seconds"),t.R7$(5),t.SpI("",e.usefulEnv.redisInternal__maxCharsToStoreInConsoleLogs.toLocaleString("en-IN")," Characters"),t.R7$(18),t.Y8G("ngForOf",e.dbConnections)}}function L(a,s){if(1&a&&(t.j41(0,"p-tabPanel",10)(1,"p-tabView"),t.DNE(2,y,257,51,"p-tabPanel",8),t.k0s()()),2&a){const e=s.$implicit;t.FS9("header",e.name),t.R7$(2),t.Y8G("ngForOf",e.value)}}function J(a,s){1&a&&t.nrm(0,"p-progressSpinner",55)}let A=(()=>{class a{instanceS;ns;generalS;iDetailedSystemInfoObject;groupHost;groupHostArr=[];loading={grid:!1};constructor(e,o,i){this.instanceS=e,this.ns=o,this.generalS=i}ngOnInit(){this.getOriginal(),this.generalS.setNewTitle("API Maker - Nodes Dashboard")}getOriginal(){var e=this;return(0,c.A)(function*(){e.loading.grid=!0;try{e.iDetailedSystemInfoObject=(yield e.instanceS.getFullSystemInfo().toPromise()).data,e.groupHost=_.groupBy(e.iDetailedSystemInfoObject,l.qb.hostName);for(const o in e.groupHost){const i={name:o,value:e.groupHost[o]||[]};e.groupHostArr.push(i),i.value=_.orderBy(i.value||[],[U=>U.workerId],[l.Ne.asc])}e.groupHostArr=_.orderBy(e.groupHostArr,[o=>(o.name||"").toLowerCase()],[l.Ne.asc])}catch(o){console.log(o),e.ns.showErrorFromResponse(o.error||o,"Unable to load server information.")}e.loading.grid=!1})()}getInstanceIconUrl(e){return e===d.N.SQL_SERVER_DB?"./assets/images/svg/Microsoft_SQL_Server_DB_No_Logo.svg":e===d.N.ORACLE_DB?"./assets/images/svg/Oracle_DB_No_Logo.svg":`./assets/images/svg/${e}.svg`}static \u0275fac=function(o){return new(o||a)(t.rXU(f.J),t.rXU(p.m),t.rXU(E.f))};static \u0275cmp=t.VBU({type:a,selectors:[["app-dash-root-nodes"]],decls:12,vars:2,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/nodes.svg","alt","Server Nodes Dashboard",1,"fa-fw","mr-1"],[1,"mt-3"],[1,"card-body","p-0","h-100","overflow-hidden"],[3,"header",4,"ngFor","ngForOf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"header"],[1,"row","mt-3"],[1,"col-lg-6","mx-auto"],[1,"table","table-hover","table-striped","table-bordered","table-sm",2,"background-color","#3F3F3F"],[1,"bg-gradient"],["colspan","2",1,"text-center","fw-bold","border",2,"background-color","#272727"],[1,"fas","fa-cubes","fa-fw"],[2,"width","40%"],[1,"fas","fa-star","fa-fw"],[1,"fas","fa-fingerprint","fa-fw"],[1,"fas","fa-hands","fa-fw"],[1,"fas","fa-network-wired","fa-fw"],["colspan","2",1,"text-center","fw-bold",2,"background-color","#272727"],["class","fab fa-linux fa-fw",4,"ngIf"],["class","fab fa-apple fa-fw",4,"ngIf"],["class","fab fa-windows fa-fw",4,"ngIf"],[1,"fas","fa-square","fa-fw"],[1,"far","fa-square","fa-fw"],[1,"text-info","fw-bold"],[1,"table","table-hover","table-striped","table-bordered","mt-3","table-sm",2,"background-color","#3F3F3F"],[1,"fas","fa-memory","fa-fw"],[1,"fas","fa-rss","fa-fw"],[1,"fas","fa-outdent","fa-fw"],[1,"far","fa-circle","fa-fw"],[1,"fas","fa-circle-notch","fa-fw"],[1,"fab","fa-linux","fa-fw"],[1,"far","fa-user","fa-fw"],[1,"fas","fa-home","fa-fw"],[1,"fas","fa-folder","fa-fw"],[1,"fas","fa-microchip","fa-fw"],[1,"text-success"],[1,"fas","fa-hourglass-start","fa-fw"],[1,"fab","fa-node-js","fa-fw"],[1,"pb-3"],["colspan","5",1,"text-center","fw-bold",2,"background-color","#272727"],[4,"ngIf"],[1,"fas","fa-database","fa-fw"],[2,"width","250px"],[1,"text-center",2,"width","70px"],[4,"ngFor","ngForOf"],[1,"fab","fa-apple","fa-fw"],[1,"fab","fa-windows","fa-fw"],[3,"src","alt"],[1,"text-center"],[1,"text-center",3,"ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,i){1&o&&(t.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),t.nrm(5,"img",5),t.EFF(6," Server Nodes Dashboard"),t.k0s()()()()(),t.j41(7,"section",6)(8,"div",7)(9,"p-tabView"),t.DNE(10,L,3,2,"p-tabPanel",8),t.k0s()(),t.DNE(11,J,1,0,"p-progressSpinner",9),t.k0s()),2&o&&(t.R7$(10),t.Y8G("ngForOf",i.groupHostArr),t.R7$(1),t.Y8G("ngIf",i.loading.grid))},dependencies:[r.YU,r.Sq,r.bT,g.p,m.JQ,m.Kp],styles:["table[_ngcontent-%COMP%]{background-color:#3f3f3f}td[_ngcontent-%COMP%]{border-color:#4b4a4a!important;padding:10px}"]})}return a})()},3929:(R,F,n)=>{n.d(F,{V:()=>E});var c=n(7060),l=n(1709),d=n(2173),t=n(5883),f=n(540);const p=[{path:"",component:t.V,canActivate:[d.Z]}];let E=(()=>{class r{static \u0275fac=function(u){return new(u||r)};static \u0275mod=f.$C({type:r});static \u0275inj=f.G2t({imports:[c.iI.forChild(p),l.u]})}return r})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[4092],{4092:(M,s,n)=>{n.r(s),n.d(s,{AccountsM:()=>l});var d=n(7060),h=n(1709),a=n(540);const o=[{path:"admin-users",loadChildren:()=>n.e(6866).then(n.bind(n,6866)).then(t=>t.AdminUserM)},{path:"dev-accounts",loadChildren:()=>n.e(5140).then(n.bind(n,5140)).then(t=>t.DevAccM)},{path:"secret-management",loadChildren:()=>n.e(1417).then(n.bind(n,1417)).then(t=>t.SecretManagementM)}];let l=(()=>{class t{static \u0275fac=function(m){return new(m||t)};static \u0275mod=a.$C({type:t});static \u0275inj=a.G2t({imports:[d.iI.forChild(o),h.u]})}return t})()}}]);
|