PageSourceSearch

https://portal.privacypillar.com/default-src_app_privacy_dsar_dsarform_dsarform_module_ts.0510300b371d1e95.js

js privacypillar.com collected 2026-09-24 09:08:19 UTC 487,147 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkprivacypillar_sfo3=self.webpackChunkprivacypillar_sfo3||[]).push([["default-src_app_privacy_dsar_dsarform_dsarform_module_ts"],{44658:(He,ne,u)=>{u.r(ne),u.d(ne,{DsarformModule:()=>Lp});var c=u(24006),I=u(51692),e=u(94650),B=u(53977),G=u(43265),oe=u(8929),Q=u(591),se=u(30567),_=u(3940),q=u(92340),Ce=u(72986),re=u(80013),le=u(75778),te=u(68078),ve=u(43840),ye=u(42701),Te=u(80306),we=u(2542),Ze=u(84490),Fe=u(45978),T=u(65023),S=u(22273),m=u(21613),f=u(96070),Z=u(32250),U=u(65719),Ge=u(52977),Ye=u(84322),Pe=u(22868),Ke=u(44246),ze=u(34945),We=u(56967),Ve=u(4941);const $e=JSON.parse('[{"id":1,"enname":"Edit field","name":"Feld bearbeiten"},{"id":2,"enname":"Cancel","name":"Absagen"},{"id":3,"enname":"Save and close","name":"Speichern und Schlie\xdfen"},{"id":4,"enname":"Display Type","name":"Anzeigetyp"},{"id":5,"enname":"Required","name":"Pflichtfeld"},{"id":6,"enname":"Add control","name":"Kontrolle hinzuf\xfcgen"},{"id":7,"enname":"Custom Fields","name":"Benutzerdefinierte Felder"},{"id":8,"enname":"Add new","name":"Neue hinzuf\xfcgen"},{"id":9,"enname":"Select field type control is mandatory","name":"Die Auswahl des Feldtyps ist obligatorisch"},{"id":10,"enname":"Select Field Type","name":"W\xe4hlen Sie Feldtyp aus"}]'),Xe=JSON.parse('[{"id":1,"enname":"Edit field","name":"Modifier le champ"},{"id":2,"enname":"Cancel","name":"Annuler"},{"id":3,"enname":"Save and close","name":"Sauver et fermer"},{"id":4,"enname":"Display Type","name":"Type d\'affichage"},{"id":5,"enname":"Required","name":"Obligatoire"},{"id":6,"enname":"Add control","name":"Ajouter un contr\xf4le"},{"id":7,"enname":"Custom Fields","name":"Les champs personnalis\xe9s"},{"id":8,"enname":"Add new","name":"Ajouter nouveau"}]'),et=JSON.parse('[{"id":1,"enname":"Edit field","name":"Modifier le champ"},{"id":2,"enname":"Cancel","name":"Annuler"},{"id":3,"enname":"Save and close","name":"Brazil Sauver et fermer"},{"id":4,"enname":"Display Type","name":"Brazil Type d\'affichage"},{"id":5,"enname":"Required","name":"Brazil Obligatoire"},{"id":6,"enname":"Add control","name":"Brazil Ajouter un contr\xf4le"},{"id":7,"enname":"Custom Fields","name":"Brazil Les champs personnalis\xe9s"},{"id":8,"enname":"Add new","name":"Brazil Ajouter nouveau"}]'),tt=JSON.parse('[{"id":1,"enname":"Edit field","name":"\u062a\u062d\u0631\u064a\u0631 \u0627\u0644\u0645\u062c\u0627\u0644"},{"id":2,"enname":"Cancel","name":"\u064a\u0644\u063a\u064a"},{"id":3,"enname":"Save and close","name":"\u0627\u062d\u0641\u0638\u0647\u0627 \u0648\u0623\u063a\u0644\u0642\u0647\u0627"},{"id":4,"enname":"Display Type","name":"\u0646\u0648\u0639 \u0627\u0644\u0639\u0631\u0636"},{"id":5,"enname":"Required","name":"\u0645\u0637\u0644\u0648\u0628"},{"id":6,"enname":"Add control","name":"\u0623\u0636\u0641 \u0627\u0644\u0633\u064a\u0637\u0631\u0629"},{"id":7,"enname":"Custom Fields","name":"\u0627\u0644\u062d\u0642\u0648\u0644 \u0627\u0644\u0645\u062e\u0635\u0635\u0629"},{"id":8,"enname":"Add new","name":"\u0627\u0636\u0641 \u062c\u062f\u064a\u062f"}]'),it=JSON.parse('[{"id":1,"enname":"Edit field","name":"Modifica campo"},{"id":2,"enname":"Cancel","name":"Annulla"},{"id":3,"enname":"Save and close","name":"Salva e chiudi"},{"id":4,"enname":"Display Type","name":"Tipo di visualizzazione"},{"id":5,"enname":"Required","name":"Necessario"},{"id":6,"enname":"Add control","name":"Aggiungi controllo"},{"id":7,"enname":"Custom Fields","name":"Campi personalizzati"},{"id":8,"enname":"Add new","name":"Aggiungere nuova"}]'),nt=JSON.parse('[{"id":1,"enname":"Edit field","name":"\u092b\u093c\u0940\u0932\u094d\u0921 \u0938\u0902\u092a\u093e\u0926\u093f\u0924 \u0915\u0930\u0947\u0902"},{"id":2,"enname":"Cancel","name":"\u0930\u0926\u094d\u0926 \u0915\u0930\u0947\u0902"},{"id":3,"enname":"Save and close","name":"\u0938\u0939\u0947\u091c\u0947\u0902 \u0914\u0930 \u092c\u0902\u0926 \u0915\u0930\u0947\u0902"},{"id":4,"enname":"Display Type","name":"\u0921\u093f\u0938\u094d\u092a\u094d\u0932\u0947 \u092a\u094d\u0930\u0915\u093e\u0930"},{"id":5,"enname":"Required","name":"\u0906\u0935\u0936\u094d\u092f\u0915"},{"id":6,"enname":"Add control","name":"\u0928\u093f\u092f\u0902\u0924\u094d\u0930\u0923 \u091c\u094b\u0921\u093c\u0947\u0902"},{"id":7,"enname":"Custom Fields","name":"\u0915\u0938\u094d\u091f\u092e \u092b\u0940\u0932\u094d\u0921\u094d\u0938"},{"id":8,"enname":"Add new","name":"\u0928\u092f\u093e \u091c\u094b\u0921\u093c\u0947\u0902"}]'),ot=JSON.parse('[{"id":1,"enname":"Edit field","name":"\u7f16\u8f91\u5b57\u6bb5"},{"id":2,"enname":"Cancel","name":"\u53d6\u6d88"},{"id":3,"enname":"Save and close","name":"\u4fdd\u5b58\u5e76\u5173\u95ed"},{"id":4,"enname":"Display Type","name":"\u663e\u793a\u7c7b\u578b"},{"id":5,"enname":"Required","name":"\u5fc5\u9700\u7684"},{"id":6,"enname":"Add control","name":"\u6dfb\u52a0\u63a7\u4ef6"},{"id":7,"enname":"Custom Fields","name":"\u81ea\u5b9a\u4e49\u5b57\u6bb5"},{"id":8,"enname":"Add new","name":"\u6dfb\u65b0"},{"id":9,"enname":"Select field type control is mandatory","name":"\u9009\u62e9\u5b57\u6bb5\u7c7b\u578b\u63a7\u5236\u662f\u5f3a\u5236\u6027\u7684"},{"id":10,"enname":"Select Field Type","name":"\u9009\u62e9\u5b57\u6bb5\u7c7b\u578b"}]');var M=u(43074),st=u(87911),rt=u(5481),ke=u(64491),lt=u(7904),at=u(81536),ct=u(67075),k=u(37407),De=u(11481),ae=u(20388),dt=u(59922),h=u(36895),D=u(73566),Le=u(62976),Ie=u(59245),Me=u(22096),pt=u(32320),O=u(4358),ut=u(14239),Oe=u(10137),L=u(12553),Ne=u(22833),mt=u(99856),R=u(2854),ce=u(96923),_t=u(42111),Je=u(155),gt=u(14039),N=u(38611),J=u(98473);function ht(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"This Field is required"),e.qZA())}function ft(o,r){if(1&o&&(e.TgZ(0,"div",21),e.YNc(1,ht,2,0,"div",22),e.qZA()),2&o){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.f.path.errors.required)}}function bt(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"This Field is required"),e.qZA())}function xt(o,r){if(1&o&&(e.TgZ(0,"div",21),e.YNc(1,bt,2,0,"div",22),e.qZA()),2&o){const i=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",i.get("value_1").errors.required)}}function Ct(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",33),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit,t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",i.indexCount)("selected",i.indexCount==t.get("value_2").value),e.xp6(1),e.hij("form.",i.controllabel,"")}}function vt(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"This Field is required"),e.qZA())}function yt(o,r){if(1&o&&(e.TgZ(0,"div",21),e.YNc(1,vt,2,0,"div",22),e.qZA()),2&o){const i=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",i.get("value_2").errors.required)}}function Tt(o,r){if(1&o){const i=e.EpF();e.ynx(0,23),e.TgZ(1,"div",24)(2,"div",25)(3,"div",8)(4,"label",26),e._uU(5,"Key"),e.qZA(),e._UZ(6,"input",27),e.YNc(7,xt,2,1,"div",11),e.qZA()(),e.TgZ(8,"div",28)(9,"div",8)(10,"label",26),e._uU(11,"Value"),e.qZA(),e.TgZ(12,"select",29),e.YNc(13,Ct,3,3,"ng-container",30),e.qZA(),e.YNc(14,yt,2,1,"div",11),e.qZA()(),e.TgZ(15,"div",31)(16,"button",32),e.NdJ("click",function(){const s=e.CHM(i).index,l=e.oxw();return e.KtG(l.removeSkill(s))}),e._uU(17,"Remove"),e.qZA()()(),e.BQk()}if(2&o){const i=r.$implicit,t=r.index,n=e.oxw();e.xp6(1),e.Q6J("formGroupName",t),e.xp6(3),e.MGl("for","exampleInputField",t,""),e.xp6(2),e.MGl("id","exampleInputField",t,""),e.xp6(1),e.Q6J("ngIf",n.submitted&&i.get("value_1").errors),e.xp6(3),e.MGl("for","exampleInputValue",t,""),e.xp6(2),e.MGl("id","exampleInputValue",t,""),e.xp6(1),e.Q6J("ngForOf",n.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",n.submitted&&i.get("value_2").errors)}}function wt(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",34)(1,"div",6)(2,"div",35)(3,"h5"),e._UZ(4,"i",36),e.TgZ(5,"span",37),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",38),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",39),e._uU(9," Back to connection list"),e.qZA()()()()}}const Zt=function(o){return{display:o}};let Ft=(()=>{const r=class{constructor(t,n,s,l,a){this.formBuilder=t,this.cd=n,this.loading=s,this.activatedRouters=l,this.systemIntegrationService=a,this.backHome=new e.vpe,this.submitted=!1,this.isOpen=!1,this.orgID=null,this.pageStep=1,this.updateData=[],this.isUpdate=!1}ngOnInit(){this.activatedRouters.queryParams.subscribe(t=>{this.orgID=t.oid}),this.httpQueryBuilderForm=this.formBuilder.group({path:[""],queryParams:this.formBuilder.array([])}),this.onGetSavedData()}onGetSavedData(){this.systemIntegrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>
1{if(200===t.status)if(t.response.length>0){let n;this.updateData=t.response,this.isUpdate=!0;for(const s of this.updateData)s.hasOwnProperty("value_2")&&(n=s.value_2+"_Index",s.value_2=n);this.fillSavedData()}else this.addSkills()})}fillSavedData(){for(const t of this.updateData)"path"===t.field?this.httpQueryBuilderForm.patchValue({path:t.value_1}):this.skills.push(this.fillSaved(t.field,t.value_1,t.value_2))}fillSaved(t,n,s){return this.formBuilder.group({field:["queryParam"],value_1:[n,c.kI.required],value_2:[s,c.kI.required],system_name:[this.systemName]})}ngAfterViewInit(){}get f(){return this.httpQueryBuilderForm.controls}get skills(){return this.httpQueryBuilderForm.get("queryParams")}newSkill(){return this.formBuilder.group({field:["queryParam"],value_1:["",c.kI.required],value_2:["",c.kI.required],system_name:[this.systemName]})}addSkills(){this.skills.push(this.newSkill())}removeSkill(t){1!==this.httpQueryBuilderForm.controls.queryParams.controls.length&&this.skills.removeAt(t)}onSubmit(){if(this.submitted=!0,this.httpQueryBuilderForm.invali
1d)return;if(this.isUpdate)return this.onUpdate(),!1;let t=[...this.httpQueryBuilderForm.value.queryParams];t.forEach(n=>{let s=this.formObject.request_form[0].find(l=>l.indexCount==n.value_2||l.controllabel==n.value_2+"_Index"||l.controllabel==n.value_2||l.indexCount==n.value_2+"_Index"||l.indexCount==n.value_2);if(s.indexCount&&s.control){let l=s.indexCount.toLowerCase().includes("_Index")||s.indexCount.toLowerCase().includes("_index")?s.indexCount.slice(0,s.indexCount.length-6):s.indexCount;n.value_2=l,n.value_3=s.control}}),t.push({field:"path",value_1:this.httpQueryBuilderForm.value.path,system_name:this.systemName}),this.loading.start(),this.systemIntegrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onUpdate(){let t=[...this.httpQueryBuilderForm.value.queryParams];t.forEach(n=>{let s=this.formObject.request_form[0].find(l=>l.indexCount==n.value_2||l.controllabel==n.value_2+"_Index"||l.controllabel==n.value_2||l.indexCount==n.value_2+"_Index"||l.indexCount==n.value_2||n.value_2?.slice(0,n.value_2.length-6)==l.indexCount);if(s.indexCount&&s.control){let l=s.indexCount.toLowerCase().includes("_Index")||s.indexCount.toLowerCase().includes("_index")?s.indexCount.slice(0,s.indexCount.length-6):s.indexCount;n.value_2=l,n.value_3=s.control}}),t.push({field:"path",value_1:this.httpQueryBuilderForm.value.path,system_name:this.systemName}),this.loading.start(),this.systemIntegrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(c.QS),e.Y36(e.sBO),e.Y36(k.LA),e.Y36(I.gz),e.Y36(D._))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-http-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},decls:31,vars:7,consts:[["appTheme","",1,"card"],[1,"card-header"],[3,"ngStyle","ngSubmit"],[1,"card-body",3,"formGroup"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"col-md-6","p-0"],[1,"form-group"],["for","exampleFormControlInput1"],["type","email","formControlName","path","id","exampleFormControlInput1","placeholder","response.data",1,"form-control"],["class","text-danger",4,"ngIf"],["formArrayName","queryParams",4,"ngFor","ngForOf"],[1,"col-md-7"],[1,"text-center","float-right"],["type","button",1,"btn","btn-link","mr-3",3,"click"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","submit","label","Save"],["class","card-body",4,"ngIf"],[1,"text-danger"],[4,"ngIf"],["formArrayName","queryParams"],[1,"row",3,"formGroupName"],[1,"col-md-3"],[3,"for"],["type","email","formControlName","value_1","placeholder","Key",1,"form-control",3,"id"],[1,"col-md-4"],["formControlName","value_2",1,"form-control",3,"id"],[4,"ngFor","ngForOf"],[1,"col-md-2"],["type","button",1,"btn","btn-link","text-danger",3,"click"],[3,"value","selected"],[1,"card-body"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5"),e._uU(3,"Rest API Configuration"),e.qZA()(),e.TgZ(4,"form",2),e.NdJ("ngSubmit",function(){return s.onSubmit()}),e.TgZ(5,"div",3)(6,"a",4),e.NdJ("click",function(){return s.backHome.emit(!0)}),e._UZ(7,"i",5),e._uU(8," GoBack"),e.qZA(),e.TgZ(9,"h5"),e._uU(10,"API Response Path"),e.qZA(),e.TgZ(11,"div",6)(12,"div",7)(13,"div",8)(14,"label",9),e._uU(15,"Path"),e.qZA(),e._UZ(16,"input",10),e.YNc(17,ft,2,1,"div",11),e.qZA()()(),e.TgZ(18,"h5"),e._uU(19,"Configure Query Params"),e.qZA(),e.YNc(20,Tt,18,8,"ng-container",12),e.TgZ(21,"div",6)(22,"div",13)(23,"div",14)(24,"button",15),e.NdJ("click",function(){return s.addSkills()}),e._uU(25,"Add More"),e.qZA()()()(),e.TgZ(26,"div",16)(27,"div",17)(28,"button",18),e.NdJ("click",function(){return s.onConnectionListPage()}),e.qZA(),e._UZ(29,"button",19),e.qZA()()()(),e.YNc(30,wt,10,0,"div",20),e.qZA()),2&n&&(e.xp6(4),e.Q6J("ngStyle",e.VKq(5,Zt,1===s.pageStep?"block":"none")),e.xp6(1),e.Q6J("formGroup",s.httpQueryBuilderForm),e.xp6(12),e.Q6J("ngIf",s.submitted&&s.f.path.errors),e.xp6(3),e.Q6J("ngForOf",s.httpQueryBuilderForm.controls.queryParams.controls),e.xp6(10),e.Q6J("ngIf",2===s.pageStep))},dependencies:[c._Y,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.JL,c.sg,c.u,c.x0,c.CE,h.sg,h.O5,h.PC,L.mh,c.F,N.Hq,J.H,R.E]}),o})();var Qe=u(1637);function v(o,r,i,t){var l,n=arguments.length,s=n<3?r:null===t?t=Object.getOwnPropertyDescriptor(r,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,r,i,t);else for(var a=o.length-1;a>=0;a--)(l=o[a])&&(s=(n<3?l(s):n>3?l(r,i,s):l(r,i))||s);return n>3&&s&&Object.defineProperty(r,i,s),s}function C(o,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(o,r)}var pe=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryOperator",""]]}),o}(),ue=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryField",""]]}),o}(),me=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryEntity",""]]}),o}(),_e=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","querySwitchGroup",""]]}),o}(),ge=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryButtonGroup",""]]}),o}(),Re=function(){function o(r){this.template=r}return Object.defineProperty(o.prototype,"queryInputType",{get:function(){return this._type},set:function(r){r&&(this._type=r)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:e.Rgc}]},v([(0,e.IIB)(),C("design:type",String),C("design:paramtypes",[String])],o.prototype,"queryInputType",null),(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryInput",""]],inputs:{queryInputType:"queryInputType"}}),o}(),he=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryRemoveButton",""]]}),o}(),fe=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryEmptyWarning",""]]}),o}(),be=function(){function o(r){this.template=r}return o.ctorParameters=function(){return[{type:e.Rgc}]},(o=v([C("design:paramtypes",[e.Rgc])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.Rgc))},o.\u0275dir=e.lG2({type:o,selectors:[["","queryArrowIcon",""]]}),o}(),St=["treeContainer"];function At(o,r){if(1&o&&e._UZ(0,"i",0),2&o){var i=e.oxw();e.Q6J("ngClass",i.getClassNames("arrowIcon"))}}function qt(o,r){1&o&&e.GkF(0)}function kt(o,r){if(1&o&&(e.ynx(0),e.YNc(1,qt,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",t.getArrowIconContext())}}function Dt(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"a",9),e.NdJ("click",function(){e.CHM(i);var l=e.oxw();return e.KtG(l.toggleCollapse())}),e.YNc(1,kt,2,2,"ng-container",3),e.qZA()}if(2&o){var t=e.oxw(),n=e.MAs(2);e.Q6J("ngClass",t.getClassNames("arrowIconButton",t.data.collapsed?"collapsed":null)),e.xp6(1),e.Q6J("ngIf",t.getArrowIconTemplate())("ngIfElse",n)}}function Lt(o,r){1&o&&e.GkF(0)}function Mt(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"div",0),e.YNc(2,Lt,1,0,"ng-container",10),e.qZA(),e.BQk()),2&o){var i=r.ngIf,t=e.oxw();e.xp6(1),e.Q6J("ngClass",t.getClassNames("buttonGroup","rightAlign")),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",t.getButtonGroupContext())}}function Ot(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"button",11),e.NdJ("click",function(){e.CHM(i);var s=e.oxw(2);return e.KtG(s.addRuleSet())}),e._UZ(1,"i",0),e._uU(2," Ruleset "),e.qZA()}if(2&o){var t=e.oxw(2);e.Q6J("ngClass",t.getClassNames("button"))("disabled",t.disabled),e.xp6(1),e.Q6J("ngClass",t.getClassNames("addIcon"))}}function Nt(o,r){if(1&o){var i=e.EpF();e.ynx(0),e.TgZ(1,"button",11),e.NdJ("click",function(){e.CHM(i);var s=e.oxw(2);return e.KtG(s.removeRuleSet())}),e._UZ(2,"i",0),e.qZA(),e.BQk()}if(2&o){var t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",t.getClassNames("button","removeButton"))("disabled",t.disabled),e.xp6(1),e.Q6J("ngClass",t.getClassNames("removeIcon"))}}function Jt(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"button",11),e.NdJ("click",function(){e.CHM(i);var s=e.oxw();return e.KtG(s.addRule())}),e._UZ(2,"i",0),e._uU(3," Rule "),e.qZA(),e.YNc(4,Ot,3,3,"button",12),e.YNc(5,Nt,3,3,"ng-container",13),e.qZA()}if(2&o){var t=e.oxw();e.Q6J("ngClass",t.getClassNames("buttonGroup","rightAlign")),e.xp6(1),e.Q6J("ngClass",t.getClassNames("button"))("disabled",t.disabled),e.xp6(1),e.Q6J("ngClass",t.getClassNames("addIcon")),e.xp6(2),e.Q6J("ngIf",t.allowRuleset),e.xp6(1),e.Q6J("ngIf",!!t.parentValue&&t.allowRuleset)}}
1function Qt(o,r){1&o&&e.GkF(0)}function Ut(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Qt,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",t.getSwitchGroupContext())}}function Bt(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"div",0)(2,"input",14,15),e.NdJ("ngModelChange",function(s){e.CHM(i);var l=e.oxw(2);return e.KtG(l.data.condition=s)}),e.qZA(),e.TgZ(4,"label",9),e.NdJ("click",function(){e.CHM(i);var s=e.MAs(3),l=e.oxw(2);return e.KtG(l.changeCondition(s.value))}),e._uU(5,"AND"),e.qZA()(),e.TgZ(6,"div",0)(7,"input",16,17),e.NdJ("ngModelChange",function(s){e.CHM(i);var l=e.oxw(2);return e.KtG(l.data.condition=s)}),e.qZA(),e.TgZ(9,"label",9),e.NdJ("click",function(){e.CHM(i);var s=e.MAs(8),l=e.oxw(2);return e.KtG(l.changeCondition(s.value))}),e._uU(10,"OR"),e.qZA()()()}if(2&o){var t=e.oxw(2);e.Q6J("ngClass",t.getClassNames("switchGroup","transition")),e.xp6(1),e.Q6J("ngClass",t.getClassNames("switchControl")),e.xp6(1),e.Q6J("ngClass",t.getClassNames("switchRadio"))("ngModel",t.data.condition)("disabled",t.disabled),e.xp6(2),e.Q6J("ngClass",t.getClassNames("switchLabel")),e.xp6(2),e.Q6J("ngClass",t.getClassNames("switchControl")),e.xp6(1),e.Q6J("ngClass",t.getClassNames("switchRadio"))("ngModel",t.data.condition)("disabled",t.disabled),e.xp6(2),e.Q6J("ngClass",t.getClassNames("switchLabel"))}}function Rt(o,r){if(1&o&&e.YNc(0,Bt,11,11,"div",8),2&o){var i=e.oxw();e.Q6J("ngIf",i.data)}}function Et(o,r){1&o&&e.GkF(0)}function jt(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"div",0),e.YNc(2,Et,1,0,"ng-container",10),e.qZA(),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(3).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngClass",n.getClassNames("buttonGroup","rightAlign")),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",n.getRemoveButtonContext(t))}}function Ht(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"button",11),e.NdJ("click",function(){e.CHM(i);var s=e.oxw(3).$implicit,l=e.oxw(2);return e.KtG(l.removeRule(s,l.data))}),e._UZ(2,"i",0),e.qZA()()}if(2&o){var t=e.oxw(5);e.Q6J("ngClass",t.getClassNames("removeButtonSize","rightAlign")),e.xp6(1),e.Q6J("ngClass",t.getClassNames("button","removeButton"))("disabled",t.disabled),e.xp6(1),e.Q6J("ngClass",t.getClassNames("removeIcon"))}}function Gt(o,r){1&o&&e.GkF(0)}function Yt(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Gt,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(4).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",n.getEntityContext(t))}}function Pt(o,r){if(1&o&&(e.TgZ(0,"div",27),e.YNc(1,Yt,2,2,"ng-container",3),e.qZA()),2&o){e.oxw();var i=e.MAs(6),t=e.oxw(4);e.xp6(1),e.Q6J("ngIf",t.getEntityTemplate())("ngIfElse",i)}}function Kt(o,r){if(1&o&&(e.TgZ(0,"option",30),e._uU(1),e.qZA()),2&o){var i=r.$implicit;e.Q6J("ngValue",i.value),e.xp6(1),e.hij(" ",i.name," ")}}function zt(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"select",28),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(3).$implicit;return e.KtG(a.entity=l)})("ngModelChange",function(l){e.CHM(i);var a=e.oxw(3),d=a.$implicit,p=a.index,b=e.oxw(2);return e.KtG(b.changeEntity(l,d,p,b.data))}),e.YNc(2,Kt,2,2,"option",29),e.qZA()()}if(2&o){var t=e.oxw(3).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("entityControlSize")),e.xp6(1),e.Q6J("ngClass",n.getClassNames("entityControl"))("ngModel",t.entity)("disabled",n.disabled),e.xp6(1),e.Q6J("ngForOf",n.entities)}}function Wt(o,r){1&o&&e.GkF(0)}function Vt(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Wt,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(3).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",n.getFieldContext(t))}}function $t(o,r){if(1&o&&(e.TgZ(0,"option",30),e._uU(1),e.qZA()),2&o){var i=r.$implicit;e.Q6J("ngValue",i.value),e.xp6(1),e.hij(" ",i.name," ")}}function Xt(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"select",28),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(3).$implicit;return e.KtG(a.field=l)})("ngModelChange",function(l){e.CHM(i);var a=e.oxw(3).$implicit,d=e.oxw(2);return e.KtG(d.changeField(l,a))}),e.YNc(2,$t,2,2,"option",29),e.qZA()()}if(2&o){var t=e.oxw(3).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("fieldControlSize")),e.xp6(1),e.Q6J("ngClass",n.getClassNames("fieldControl"))("ngModel",t.field)("disabled",n.disabled),e.xp6(1),e.Q6J("ngForOf",n.getFields(t.entity))}}function ei(o,r){1&o&&e.GkF(0)}function ti(o,r){if(1&o&&(e.ynx(0),e.YNc(1,ei,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(3).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",n.getOperatorContext(t))}}function ii(o,r){if(1&o&&(e.TgZ(0,"option",30),e._uU(1),e.qZA()),2&o){var i=r.$implicit;e.Q6J("ngValue",i),e.xp6(1),e.hij(" ",i," ")}}function ni(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"div",0)(1,"select",28),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(3).$implicit;return e.KtG(a.operator=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(3).$implicit,a=e.oxw(2);return e.KtG(a.changeOperator(l))}),e.YNc(2,ii,2,2,"option",29),e.qZA()()}if(2&o){var t=e.oxw(3).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("operatorControlSize")),e.xp6(1),e.Q6J("ngClass",n.getClassNames("operatorControl"))("ngModel",t.operator)("disabled",n.disabled),e.xp6(1),e.Q6J("ngForOf",n.getOperators(t.field))}}function oi(o,r){1&o&&e.GkF(0)}function si(o,r){if(1&o&&(e.ynx(0),e.YNc(1,oi,1,0,"ng-container",10),e.BQk()),2&o){var i=r.ngIf,t=e.oxw(3).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",n.getInputContext(t))}}function ri(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"input",39),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled)}}function li(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"input",40),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled)}}function ai(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"input",41),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled)}}function ci(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"input",42),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled)}}function di(o,r){if(1&o&&(e.TgZ(0,"option",30),e._uU(1),e.qZA()),2&o){var i=r.$implicit;e.Q6J("ngValue",i.value),e.xp6(1),e.hij(" ",i.name," ")}}function pi(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"select",28),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.YNc(1,di,2,2,"option",29),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled),e.xp6(1),e.Q6J("ngForOf",n.getOptions(t.field))}}function ui(o,r){if(1&o&&(e.TgZ(0,"option",30),e._uU(1),e.qZA()),2&o){var i=r.$implicit;e.Q6J("ngValue",i.value),e.xp6(1),e.hij(" ",i.name," ")}}function mi(o,r){if(1&o){var i=e.EpF();e.ynx(0),e.TgZ(1,"select",43),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.YNc(2,ui,2,2,"option",29),e.qZA(),e.BQk()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled),e.xp6(1),e.Q6J("ngForOf",n.getOptions(t.field))}}function _i(o,r){if(1&o){var i=e.EpF();e.TgZ(0,"input",44),e.NdJ("ngModelChange",function(l){e.CHM(i);var a=e.oxw(4).$implicit;return e.KtG(a.value=l)})("ngModelChange",function(){e.CHM(i);var l=e.oxw(6);return e.KtG(l.changeInput())}),e.qZA()}if(2&o){var t=e.oxw(4).$implicit,n=e.oxw(2);e.Q6J("ngClass",n.getClassNames("inputControl"))("ngModel",t.value)("disabled",n.disabled)}}function gi(o,r){if(1&o&&(e.TgZ(0,"div",31),e.YNc(1,ri,1,3,"input",32),e.YNc(2,li,1,3,"input",33),e.YNc(3,ai,1,3,"input",34),e.YNc(4,ci,1,3,"input",35),e.YNc(5,pi,2,4,"select",36),e.YNc(6,mi,3,4,"ng-container",37),e.YNc(7,_i,1,3,"input",38),e.qZA()),2&o){var i=e.oxw(3).$implicit,t=e.oxw(2);e.Q6J("ngClass",t.getClassNames("inputControlSize"))("ngSwitch",t.getInputType(i.field,i.operator)),e.xp6(1),e.Q6J("ngSwitchCase","string"),e.xp6(1),e.Q6J("ngSwitchCase","number"),e.xp6(1),e.Q6J("ngSwitchCase","date"),e.xp6(1),e.Q6J("ngSwitchCase","time"),e.xp6(1),e.Q6J("ngSwitchCase","category"),e.xp6(1),e.Q6J("ngSwitchCase","multiselect"),e.xp6(1),e.Q6J("ngSwitchCase","boolean")}}function hi(o,r){if(1&o&&(e.ynx(0),e.YNc(1,jt,3,3,"ng-container",3),e.YNc(2,Ht,3,4,"ng-template",null,21,e.W1O),e.YNc(4,Pt,2,2,"div",22),e.YNc(5,zt,3,5,"ng-template",null,23,e.W1O),e.YNc(7,Vt,2,2,"ng-container",3),e.YNc(8,Xt,3,5,"ng-template",null,24,e.W1O),e.YNc(10,ti,2,2,"ng-container",3),e.YNc(11,ni,3,5,"ng-template",null,25,e.W1O),e.YNc(13,si,2,2,"ng-container",3),e.YNc(14,gi,8,9,"ng-template",null,26,e.W1O),e.BQk()),2&o){var i=e.MAs(3),t=e.MAs(9),n=e.MAs(12),s=e.MAs(15),l=e.oxw(2).$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",a.getRemoveButtonTemplate())("ngIfElse",i),e.xp6(3),e.Q6J("ngIf",(null==a.entities?null:a.entities.length)>0),e.xp6(3),e.Q6J("ngIf",a.getFieldTemplate())("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",a.getOperatorTemplate())("ngIfElse",n),e.xp6(3),e.Q6J("ngIf",a.findTemplateForRule(l))("ngIfElse",s)}}function fi(o,r){if(1&o&&e._UZ(0,"query-builder",45),2&o){var i=e.oxw(2).$implicit,t=e.oxw(2);e.Q6J("data",i)("disabled",t.disabled)("parentTouchedCallback",t.parentTouchedCallback||t.onTouchedCallback)("parentChangeCallback",t.parentChangeCallback||t.onChangeCallback)("parentInputTemplates",t.parentInputTemplates||t.inputTemplates)("parentOperatorTemplate",t.parentOperatorTemplate||t.operatorTemplate)("parentFieldTemplate",t.parentFieldTemplate||t.fieldTemplate)("parentEntityTemplate",t.parentEntityTemplate||t.entityTemplate)("parentSwitchGroupTemplate",t.parentSwitchGroupTemplate||t.switchGroupTemplate)("parentButtonGroupTemplate",t.parentButtonGroupTemplate||t.buttonGroupTemplate)("parentRemoveButtonTemplate",t.parentRemoveButtonTemplate||t.removeButtonTemplate)("parentEmptyWarningTemplate",t.parentEmptyWarningTemplate||t.emptyWarningTemplate)("parentArrowIconTemplate",t.parentArrowIconTemplate||t.arrowIconTemplate)("parentValue",t.data)("classNames",t.classNames)("config",t.config)("allowRuleset",t.allowRuleset)("allowCollapse",t.allowCollapse)("emptyMessage",t.emptyMessage)("operatorMap",t.operatorMap)}}function bi(o,r){1&o&&e.GkF(0)}function xi(o,r){if(1&o&&(e.ynx(0),e.YNc(1,bi,1,0,"ng-container",10),e.BQk()),2&o){var i=e.oxw().ngIf,t=e.oxw(4);e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",t.getEmptyWarningContext())}}function Ci(o,r){if(1&o&&(e.ynx(0),e.YNc(1,xi,2,2,"ng-container",13),e.BQk()),2&o){var i=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",i.invalid)}}function vi(o,r){if(1&o&&(e.TgZ(0,"p",0),e._uU(1),e.qZA()),2&o){var i=e.oxw(5);e.Q6J("ngClass",i.getClassNames("emptyWarning")),e.xp6(1),e.hij(" ",i.emptyMessage," ")}}function yi(o,r){if(1&o&&e.YNc(0,vi,2,2,"p",8),2&o){var i=e.oxw().ngIf;e.Q6J("ngIf",i.invalid)}}function Ti(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"li",0),e.YNc(2,hi,16,9,"ng-container",13),e.YNc(3,fi,1,20,"query-builder",19),e.YNc(4,Ci,2,1,"ng-container",3),e.YNc(5,yi,1,1,"ng-template",null,20,e.W1O),e.qZA(),e.BQk()),2&o){var i=r.ngIf,t=e.MAs(6),n=e.oxw(3);e.xp6(1),e.Q6J("ngClass",n.getQueryItemClassName(i)),e.xp6(1),e.Q6J("ngIf",!i.ruleset),e.xp6(1),e.Q6J("ngIf",i.ruleset),e.xp6(1),e.Q6J("ngIf",n.getEmptyWarningTemplate())("ngIfElse",t)}}var wi=function(o,r){return{ruleset:o,invalid:r}};function Zi(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Ti,7,5,"ng-container",13),e.BQk()),2&o){var i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.WLB(1,wi,!!i.rules,!t.config.allowEmptyRulesets&&i.rules&&0===i.rules.length))}}function Fi(o,r){if(1&o&&(e.TgZ(0,"ul",0),e.YNc(1,Zi,2,4,"ng-container",18),e.qZA()),2&o){var i=e.oxw();e.Q6J("ngClass",i.getClassNames("tree")),e.xp6(1),e.Q6J("ngForOf",i.data.rules)}}var Ii={provide:c.JU,useExisting:(0,e.Gpc)(function(){return xe}),multi:!0},Si={provide:c.Cf,useExisting:(0,e.Gpc)(function(){return xe}),multi:!0},xe=function(){function o(r){var i=this;this.changeDetectorRef=r,this.defaultClassNames={arrowIconButton:"q-arrow-icon-button",arrowIcon:"q-icon q-arrow-icon",removeIcon:"q-icon q-remove-icon",addIcon:"q-icon q-add-icon",button:"q-button",buttonGroup:"q-button-group",removeButton:"q-remove-button",switchGroup:"q-switch-group",switchLabel:"q-switch-label",switchRadio:"q-switch-radio",rightAlign:"q-right-align",transition:"q-transition",collapsed:"q-collapsed",treeContainer:"q-tree-container",tree:"q-tree",row:"q-row",connector:"q-connector",rule:"q-rule",ruleSet:"q-ruleset",invalidRuleSet:"q-invalid-ruleset",emptyWarning:"q-empty-warning",fieldControl:"q-field-control",fieldControlSize:"q-control-size",entityControl:"q-entity-control",entityControlSize:"q-control-size",operatorControl:"q-operator-control",operatorControlSize:"q-control-size",inputControl:"q-input-control",inputControlSize:"q-control-size"},this.defaultOperatorMap={string:["=","!=","contains","like"],number:["=","!=",">",">=","<","<="],time:["=","!=",">",">=","<","<="],date:["=","!=",">",">=","<","<="],category:["=","!=","in","not in"],boolean:["="]},this.data={condition:"and",rules:[]},this.allowRuleset=!0,this.allowCollapse=!1,this.emptyMessage="A ruleset cannot be empty. Please add a rule or remove it all together.",this.config={fields:{}},this.persistValueOnFieldChange=!1,this.defaultTemplateTypes=["string","number","time","date","category","boolean","multiselect"],this.defaultPersistValueTypes=["string","number","time","date","boolean"],this.defaultEmptyList=[],this.inputContextCache=new Map,this.operatorContextCache=new Map,this.fieldContextCache=new Map,this.entityContextCache=new Map,this.removeButtonContextCache=new Map,this.getDisabledState=function(){return i.disabled}}return o.prototype.ngOnInit=function(){},o.prototype.ngOnChanges=function(r){var i=this.config,t=typeof i;if("object"!==t)throw new Error("Expected 'config' must be a valid object, got "+t+" instead.");this.fields=Object.keys(i.fields).map(function(n){var s=i.fields[n];return s.value=s.value||n,s}),this.entities=i.entities?Object.keys(i.entities).map(function(n){var s=i.entities[n];return s.value=s.value||n,s}):null,this.operatorsCache={}},o.prototype.validate=function(r){var i={},t=[],n=!1;return!this.config.allowEmptyRulesets&&this.checkEmptyRuleInRuleset(this.data)&&(i.empty="Empty rulesets are not allowed.",n=!0),this.validateRulesInRuleset(this.data,t),t.length&&(i.rules=t,n=!0),n?i:null},Object.defineProperty(o.prototype,"value",{get:function(){return this.data},set:function(r){this.data=r||{condition:"and",rules:[]},this.handleDataChange()},enumerable:!0,configurable:!0}),o.prototype.writeValue=function(r){this.value=r},o.prototype.registerOnChange=function(r){var i=this;this.onChangeCallback=function(){return r(i.data)}},o.prototype.registerOnTouched=function(r){var i=this;this.onTouchedCallback=function(){return r(i.data)}},o.prototype.setDisabledState=function(r){this.disabled=r,this.changeDetectorRef.detectChanges()},o.prototype.findTemplateForRule=function(r){var i=this.getInputType(r.field,r.operator);if(i){var t=this.findQueryInput(i);return t?t.template:(-1===this.defaultTemplateTypes.indexOf(i)&&console.warn("Could not find template for field with type: "+i),null)}},o.prototype.findQueryInput=function(r){return(this.parentInputTemplates||this.inputTemplates).find(function(t){retur
1n t.queryInputType===r})},o.prototype.getOperators=function(r){if(this.operatorsCache[r])return this.operatorsCache[r];var i=this.defaultEmptyList,t=this.config.fields[r];if(this.config.getOperators)return this.config.getOperators(r,t);var n=t.type;return t&&t.operators?i=t.operators:n?(0===(i=this.operatorMap&&this.operatorMap[n]||this.defaultOperatorMap[n]||this.defaultEmptyList).length&&console.warn("No operators found for field '"+r+"' with type "+t.type+". Please define an 'operators' property on the field or use the 'operatorMap' binding to fix this."),t.nullable&&(i=i.concat(["is null","is not null"]))):console.warn("No 'type' property found on field: '"+r+"'"),this.operatorsCache[r]=i,i},o.prototype.getFields=function(r){return this.entities&&r?this.fields.filter(function(i){return i&&i.entity===r}):this.fields},o.prototype.getInputType=function(r,i){if(this.config.getInputType)return this.config.getInputType(r,i);if(!this.config.fields[r])throw new Error("No configuration for field '"+r+"' could be found! Please add it to config.fields.");var t=this.config.fields[r].type;switch(i){case"is null":case"is not null":return null;case"in":case"not in":return"category"===t||"boolean"===t?"multiselect":t;default:return t}},o.prototype.getOptions=function(r){return this.config.getOptions?this.config.getOptions(r):this.config.fields[r].options||this.defaultEmptyList},o.prototype.getClassNames=function(){for(var r=this,i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var n=this.classNames?this.classNames:this.defaultClassNames,s=i.map(function(l){return n[l]||r.defaultClassNames[l]}).filter(function(l){return!!l});return s.length?s.join(" "):null},o.prototype.getDefaultField=function(r){if(r){if(void 0!==r.defaultField)return this.getDefaultValue(r.defaultField);var i=this.fields.filter(function(t){return t&&t.entity===r.value});return i&&i.length?i[0]:(console.warn("No fields found for entity '"+r.name+"'. A 'defaultOperator' is also not specified on the field config. Operator value will default to null."),null)}return null},o.prototype.getDefaultOperator=function(r){if(r&&void 0!==r.defaultOperator)return this.getDefaultValue(r.defaultOperator);var i=this.getOperators(r.value);return i&&i.length?i[0]:(console.warn("No operators found for field '"+r.value+"'. A 'defaultOperator' is also not specified on the field config. Operator value will default to null."),null)},o.prototype.addRule=function(r){if(!this.disabled){if(r=r||this.data,this.config.addRule)this.config.addRule(r);else{var i=this.fields[0];r.rules=r.rules.concat([{field:i.value,operator:this.getDefaultOperator(i),value:this.getDefaultValue(i.defaultValue),entity:i.entity}])}this.handleTouched(),this.handleDataChange()}},o.prototype.removeRule=function(r,i){this.disabled||(i=i||this.data,this.config.removeRule?this.config.removeRule(r,i):i.rules=i.rules.filter(function(t){return t!==r}),this.inputContextCache.delete(r),this.operatorContextCache.delete(r),this.fieldContextCache.delete(r),this.entityContextCache.delete(r),this.removeButtonContextCache.delete(r),this.handleTouched(),this.handleDataChange())},o.prototype.addRuleSet=function(r){this.disabled||(r=r||this.data,this.config.addRuleSet?this.config.addRuleSet(r):r.rules=r.rules.concat([{condition:"and",rules:[]}]),this.handleTouched(),this.handleDataChange())},o.prototype.removeRuleSet=function(r,i){this.disabled||(r=r||this.data,i=i||this.parentValue,this.config.removeRuleSet?this.config.removeRuleSet(r,i):i.rules=i.rules.filter(function(t){return t!==r}),this.handleTouched(),this.handleDataChange())},o.prototype.transitionEnd=function(r){this.treeContainer.nativeElement.style.maxHeight=null},o.prototype.toggleCollapse=function(){var r=this;this.computedTreeContainerHeight(),setTimeout(function(){r.data.collapsed=!r.data.collapsed},100)},o.prototype.computedTreeContainerHeight=function(){var r=this.treeContainer.nativeElement;r&&r.firstElementChild&&(r.style.maxHeight=r.firstElementChild.clientHeight+8+"px")},o.prototype.changeCondition=function(r){this.disabled||(this.data.condition=r,this.handleTouched(),this.handleDataChange())},o.prototype.changeOperator=function(r){this.disabled||(r.value=this.config.coerceValueForOperator?this.config.coerceValueForOperator(r.operator,r.value,r):this.coerceValueForOperator(r.operator,r.value,r),this.handleTouched(),this.handleDataChange())},o.prototype.coerceValueForOperator=function(r,i,t){return"multiselect"!==this.getInputType(t.field,r)||Array.isArray(i)?i:[i]},o.prototype.changeInput=function(){this.disabled||(this.handleTouched(),this.handleDataChange())},o.prototype.changeField=function(r,i){if(!this.disabled){var t=this.inputContextCache.get(i),s=this.config.fields[r],l=this.calculateFieldChangeValue(t&&t.field,s,i.value);void 0!==l?i.value=l:delete i.value,i.operator=this.getDefaultOperator(s),this.inputContextCache.delete(i),this.operatorContextCache.delete(i),this.fieldContextCache.delete(i),this.entityContextCache.delete(i),this.getInputContext(i),this.getFieldContext(i),this.getOperatorContext(i),this.getEntityContext(i),this.handleTouched(),this.handleDataChange()}},o.prototype.changeEntity=function(r,i,t,n){if(!this.disabled){var s=t,l=n,a=this.entities.find(function(p){return p.value===r}),d=this.getDefaultField(a);l||(s=(l=this.data).rules.findIndex(function(p){return p===i})),i.field=d.value,l.rules[s]=i,d?this.changeField(d.value,i):(this.handleTouched(),this.handleDataChange())}},o.prototype.getDefaultValue=function(r){return"function"==typeof r?r():r},o.prototype.getOperatorTemplate=function(){var r=this.parentOperatorTemplate||this.operatorTemplate;return r?r.template:null},o.prototype.getFieldTemplate=function(){var r=this.parentFieldTemplate||this.fieldTemplate;return r?r.template:null},o.prototype.getEntityTemplate=function(){var r=this.parentEntityTemplate||this.entityTemplate;return r?r.template:null},o.prototype.getArrowIconTemplate=function(){var r=this.parentArrowIconTemplate||this.arrowIconTemplate;return r?r.template:null},o.prototype.getButtonGroupTemplate=function(){var r=this.parentButtonGroupTemplate||this.buttonGroupTemplate;return r?r.template:null},o.prototype.getSwitchGroupTemplate=function(){var r=this.parentSwitchGroupTemplate||this.switchGroupTemplate;return r?r.template:null},o.prototype.getRemoveButtonTemplate=function(){var r=this.parentRemoveButtonTemplate||this.removeButtonTemplate;return r?r.template:null},o.prototype.getEmptyWarningTemplate=function(){var r=this.parentEmptyWarningTemplate||this.emptyWarningTemplate;return r?r.template:null},o.prototype.getQueryItemClassName=function(r){var i=this.getClassNames("row","connector","transition");return i+=" "+this.getClassNames(r.ruleset?"ruleSet":"rule"),r.invalid&&(i+=" "+this.getClassNames("invalidRuleSet")),i},o.prototype.getButtonGroupContext=function(){return this.buttonGroupContext||(this.buttonGroupContext={addRule:this.addRule.bind(this),addRuleSet:this.allowRuleset&&this.addRuleSet.bind(this),removeRuleSet:this.allowRuleset&&this.parentValue&&this.removeRuleSet.bind(this),getDisabledState:this.getDisabledState,$implicit:this.data}),this.buttonGroupContext},o.prototype.getRemoveButtonContext=function(r){return this.removeButtonContextCache.has(r)||this.removeButtonContextCache.set(r,{removeRule:this.removeRule.bind(this),getDisabledState:this.getDisabledState,$implicit:r}),this.removeButtonContextCache.get(r)},o.prototype.getFieldContext=function(r){return this.fieldContextCache.has(r)||this.fieldContextCache.set(r,{onChange:this.changeField.bind(this),getFields:this.getFields.bind(this),getDisabledState:this.getDisabledState,fields:this.fields,$implicit:r}),this.fieldContextCache.get(r)},o.prototype.getEntityContext=function(r){return this.entityContextCache.has(r)||this.entityContextCache.set(r,{onChange:this.changeEntity.bind(this),getDisabledState:this.getDisabledState,entities:this.entities,$implicit:r}),this.entityContextCache.get(r)},o.prototype.getSwitchGroupContext=function(){return{onChange:this.changeCondition.bind(this),getDisabledState:this.getDisabledState,$implicit:this.data}},o.prototype.getArrowIconContext=function(){return{getDisabledState:this.getDisabledState,$implicit:this.data}},o.prototype.getEmptyWarningContext=function(){return{getDisabledState:this.getDisabledState,message:this.emptyMessage,$implicit:this.data}},o.prototype.getOperatorContext=function(r){return this.operatorContextCache.has(r)||this.operatorContextCache.set(r,{onChange:this.changeOperator.bind(this),getDisabledState:this.getDisabledState,operators:this.getOperators(r.field),$implicit:r}),this.operatorContextCache.get(r)},o.prototype.getInputContext=function(r){return this.inputContextCache.has(r)||this.inputContextCache.set(r,{onChange:this.changeInput.bind(this),getDisabledState:this.getDisabledState,options:this.getOptions(r.field),field:this.config.fields[r.field],$implicit:r}),this.inputContextCache.get(r)},o.prototype.calculateFieldChangeValue=function(r,i,t){return null!=this.config.calculateFieldChangeValue?this.config.calculateFieldChangeValue(r,i,t):this.persistValueOnFieldChange&&null!=r&&null!=i&&r.type===i.type&&-1!==this.defaultPersistValueTypes.indexOf(r.type)?t:i&&void 0!==i.defaultValue?this.getDefaultValue(i.defaultValue):void 0},o.prototype.checkEmptyRuleInRuleset=function(r){var i=this;return!r||!r.rules||0===r.rules.length||r.rules.some(function(t){return!!t.rules&&i.checkEmptyRuleInRuleset(t)})},o.prototype.validateRulesInRuleset=function(r,i){var t=this;r&&r.rules&&r.rules.length>
10&&r.rules.forEach(function(n){if(n.rules)return t.validateRulesInRuleset(n,i);if(n.field){var s=t.config.fields[n.field];if(s&&s.validator&&s.validator.apply){var l=s.validator(n,r);null!=l&&i.push(l)}}})},o.prototype.handleDataChange=function(){this.changeDetectorRef.markForCheck(),this.onChangeCallback&&this.onChangeCallback(),this.parentChangeCallback&&this.parentChangeCallback()},o.prototype.handleTouched=function(){this.onTouchedCallback&&this.onTouchedCallback(),this.parentTouchedCallback&&this.parentTouchedCallback()},o.ctorParameters=function(){return[{type:e.sBO}]},v([(0,e.IIB)(),C("design:type",Boolean)],o.prototype,"disabled",void 0),v([(0,e.IIB)(),C("design:type",Object)],o.prototype,"data",void 0),v([(0,e.IIB)(),C("design:type",Boolean)],o.prototype,"allowRuleset",void 0),v([(0,e.IIB)(),C("design:type",Boolean)],o.prototype,"allowCollapse",void 0),v([(0,e.IIB)(),C("design:type",String)],o.prototype,"emptyMessage",void 0),v([(0,e.IIB)(),C("design:type",Object)],o.prototype,"classNames",void 0),v([(0,e.IIB)(),C("design:type",Object)],o.prototype,"operatorMap",void 0),v([(0,e.IIB)(),C("design:type",Object)],o.prototype,"parentValue",void 0),v([(0,e.IIB)(),C("design:type",Object)],o.prototype,"config",void 0),v([(0,e.IIB)(),C("design:type",be)],o.prototype,"parentArrowIconTemplate",void 0),v([(0,e.IIB)(),C("design:type",e.n_E)],o.prototype,"parentInputTemplates",void 0),v([(0,e.IIB)(),C("design:type",pe)],o.prototype,"parentOperatorTemplate",void 0),v([(0,e.IIB)(),C("design:type",ue)],o.prototype,"parentFieldTemplate",void 0),v([(0,e.IIB)(),C("design:type",me)],o.prototype,"parentEntityTemplate",void 0),v([(0,e.IIB)(),C("design:type",_e)],o.prototype,"parentSwitchGroupTemplate",void 0),v([(0,e.IIB)(),C("design:type",ge)],o.prototype,"parentButtonGroupTemplate",void 0),v([(0,e.IIB)(),C("design:type",he)],o.prototype,"parentRemoveButtonTemplate",void 0),v([(0,e.IIB)(),C("design:type",fe)],o.prototype,"parentEmptyWarningTemplate",void 0),v([(0,e.IIB)(),C("design:type",Function)],o.prototype,"parentChangeCallback",void 0),v([(0,e.IIB)(),C("design:type",Function)],o.prototype,"parentTouchedCallback",void 0),v([(0,e.IIB)(),C("design:type",Boolean)],o.prototype,"persistValueOnFieldChange",void 0),v([(0,e.i9L)("treeContainer",{static:!0}),C("design:type",e.SBq)],o.prototype,"treeContainer",void 0),v([(0,e.aQ5)(ge),C("design:type",ge)],o.prototype,"buttonGroupTemplate",void 0),v([(0,e.aQ5)(_e),C("design:type",_e)],o.prototype,"switchGroupTemplate",void 0),v([(0,e.aQ5)(ue),C("design:type",ue)],o.prototype,"fieldTemplate",void 0),v([(0,e.aQ5)(me),C("design:type",me)],o.prototype,"entityTemplate",void 0),v([(0,e.aQ5)(pe),C("design:type",pe)],o.prototype,"operatorTemplate",void 0),v([(0,e.aQ5)(he),C("design:type",he)],o.prototype,"removeButtonTemplate",void 0),v([(0,e.aQ5)(fe),C("design:type",fe)],o.prototype,"emptyWarningTemplate",void 0),v([(0,e.AcB)(Re),C("design:type",e.n_E)],o.prototype,"inputTemplates",void 0),v([(0,e.aQ5)(be),C("design:type",be)],o.prototype,"arrowIconTemplate",void 0),v([(0,e.IIB)(),C("design:type",Object),C("design:paramtypes",[Object])],o.prototype,"value",null),(o=v([C("design:paramtypes",[e.sBO])],o)).\u0275fac=function(i){return new(i||o)(e.Y36(e.sBO))},o.\u0275cmp=e.Xpm({type:o,selectors:[["query-builder"]],contentQueries:function(i,t,n){var s;1&i&&(e.Suo(n,ge,5),e.Suo(n,_e,5),e.Suo(n,ue,5),e.Suo(n,me,5),e.Suo(n,pe,5),e.Suo(n,he,5),e.Suo(n,fe,5),e.Suo(n,be,5),e.Suo(n,Re,4)),2&i&&(e.iGM(s=e.CRH())&&(t.buttonGroupTemplate=s.first),e.iGM(s=e.CRH())&&(t.switchGroupTemplate=s.first),e.iGM(s=e.CRH())&&(t.fieldTemplate=s.first),e.iGM(s=e.CRH())&&(t.entityTemplate=s.first),e.iGM(s=e.CRH())&&(t.operatorTemplate=s.first),e.iGM(s=e.CRH())&&(t.removeButtonTemplate=s.first),e.iGM(s=e.CRH())&&(t.emptyWarningTemplate=s.first),e.iGM(s=e.CRH())&&(t.arrowIconTemplate=s.first),e.iGM(s=e.CRH())&&(t.inputTemplates=s))},viewQuery:function(i,t){var n;1&i&&e.Gf(St,7),2&i&&e.iGM(n=e.CRH())&&(t.treeContainer=n.first)},inputs:{data:"data",allowRuleset:"allowRuleset",allowCollapse:"allowCollapse",emptyMessage:"emptyMessage",config:"config",persistValueOnFieldChange:"persistValueOnFieldChange",value:"value",disabled:"disabled",classNames:"classNames",operatorMap:"operatorMap",parentValue:"parentValue",parentArrowIconTemplate:"parentArrowIconTemplate",parentInputTemplates:"parentInputTemplates",parentOperatorTemplate:"parentOperatorTemplate",parentFieldTemplate:"parentFieldTemplate",parentEntityTemplate:"parentEntityTemplate",parentSwitchGroupTemplate:"parentSwitchGroupTemplate",parentButtonGroupTemplate:"parentButtonGroupTemplate",parentRemoveButtonTemplate:"parentRemoveButtonTemplate",parentEmptyWarningTemplate:"parentEmptyWarningTemplate",parentChangeCallback:"parentChangeCallback",parentTouchedCallback:"parentTouchedCallback"}
1,features:[e._Bn([Ii,Si]),e.TTD],decls:13,vars:8,consts:[[3,"ngClass"],["defaultArrowIcon",""],[3,"ngClass","click",4,"ngIf"],[4,"ngIf","ngIfElse"],["defaultButtonGroup",""],["defaultSwitchGroup",""],[3,"ngClass","transitionend"],["treeContainer",""],[3,"ngClass",4,"ngIf"],[3,"ngClass","click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"ngClass","disabled","click"],["type","button",3,"ngClass","disabled","click",4,"ngIf"],[4,"ngIf"],["type","radio","value","and",3,"ngClass","ngModel","disabled","ngModelChange"],["andOption",""],["type","radio","value","or",3,"ngClass","ngModel","disabled","ngModelChange"],["orOption",""],[4,"ngFor","ngForOf"],[3,"data","disabled","parentTouchedCallback","parentChangeCallback","parentInputTemplates","parentOperatorTemplate","parentFieldTemplate","parentEntityTemplate","parentSwitchGroupTemplate","parentButtonGroupTemplate","parentRemoveButtonTemplate","parentEmptyWarningTemplate","parentArrowIconTemplate","parentValue","classNames","config","allowRuleset","allowCollapse","emptyMessage","operatorMap",4,"ngIf"],["defaultEmptyWarning",""],["defaultRemoveButton",""],["class","q-inline-block-display",4,"ngIf"],["defaultEntity",""],["defaultField",""],["defaultOperator",""],["defaultInput",""],[1,"q-inline-block-display"],[3,"ngClass","ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[3,"ngClass","ngSwitch"],["type","text",3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],["type","number",3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],["type","date",3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],["type","time",3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],[3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],[4,"ngSwitchCase"],["type","checkbox",3,"ngClass","ngModel","disabled","ngModelChange",4,"ngSwitchCase"],["type","text",3,"ngClass","ngModel","disabled","ngModelChange"],["type","number",3,"ngClass","ngModel","disabled","ngModelChange"],["type","date",3,"ngClass","ngModel","disabled","ngModelChange"],["type","time",3,"ngClass","ngModel","disabled","ngModelChange"],["multiple","",3,"ngClass","ngModel","disabled","ngModelChange"],["type","checkbox",3,"ngClass","ngModel","disabled","ngModelChange"],[3,"data","disabled","parentTouchedCallback","parentChangeCallback","parentInputTemplates","parentOperatorTemplate","parentFieldTemplate","parentEntityTemplate","parentSwitchGroupTemplate","parentButtonGroupTemplate","parentRemoveButtonTemplate","parentEmptyWarningTemplate","parentArrowIconTemplate","parentValue","classNames","config","allowRuleset","allowCollapse","emptyMessage","operatorMap"]],template:function(i,t){if(1&i&&(e.TgZ(0,"div",0),e.YNc(1,At,1,1,"ng-template",null,1,e.W1O),e.YNc(3,Dt,2,3,"a",2),e.YNc(4,Mt,3,3,"ng-container",3),e.YNc(5,Jt,6,6,"ng-template",null,4,e.W1O),e.YNc(7,Ut,2,2,"ng-container",3),e.YNc(8,Rt,1,1,"ng-template",null,5,e.W1O),e.qZA(),e.TgZ(10,"div",6,7),e.NdJ("transitionend",function(a){return t.transitionEnd(a)}),e.YNc(12,Fi,2,2,"ul",8),e.qZA()),2&i){var n=e.MAs(6),s=e.MAs(9);e.Q6J("ngClass",t.getClassNames("switchRow")),e.xp6(3),e.Q6J("ngIf",t.allowCollapse),e.xp6(1),e.Q6J("ngIf",t.getButtonGroupTemplate())("ngIfElse",n),e.xp6(3),e.Q6J("ngIf",t.getSwitchGroupTemplate())("ngIfElse",s),e.xp6(3),e.Q6J("ngClass",t.getClassNames("treeContainer",t.data.collapsed?"collapsed":null)),e.xp6(2),e.Q6J("ngIf",t.data&&t.data.rules)}},dependencies:[h.mk,h.sg,h.O5,h.tP,h.RF,h.n9,c.YN,c.Kr,c.Fj,c.wV,c.Wl,c.EJ,c.K7,c._,c.JJ,c.On,o],styles:["@charset \"UTF-8\";[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   .q-icon[_ngcontent-%COMP%]{font-style:normal;font-size:12px}[_nghost-%COMP%]   .q-remove-icon[_ngcontent-%COMP%]::before{content:'\u274c'}[_nghost-%COMP%]   .q-arrow-icon-button[_ngcontent-%COMP%]{float:left;margin:4px 6px 4px 0;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transition:transform .25s linear;transition:transform .25s linear;cursor:pointer}[_nghost-%COMP%]   .q-arrow-icon-button.q-collapsed[_ngcontent-%COMP%]{-webkit-transform:rotate(0);transform:rotate(0)}[_nghost-%COMP%]   .q-arrow-icon[_ngcontent-%COMP%]::before{content:'\u25b6'}[_nghost-%COMP%]   .q-add-icon[_ngcontent-%COMP%]{color:#555}[_nghost-%COMP%]   .q-add-icon[_ngcontent-%COMP%]::before{content:'\u2795'}[_nghost-%COMP%]   .q-remove-button[_ngcontent-%COMP%]{color:#b3415d;width:31px}[_nghost-%COMP%]   .q-button-group[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-switch-group[_ngcontent-%COMP%]{font-family:\"Lucida Grande\",Tahoma,Verdana,sans-serif;overflow:hidden}[_nghost-%COMP%]   .q-right-align[_ngcontent-%COMP%]{float:right}[_nghost-%COMP%]   .q-button[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;background-color:#fff}[_nghost-%COMP%]   .q-button[_ngcontent-%COMP%]:disabled{display:none}[_nghost-%COMP%]   .q-control-size[_ngcontent-%COMP%]{display:inline-block;vertical-align:top;padding-right:10px}[_nghost-%COMP%]   .q-entity-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-field-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-input-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-operator-control[_ngcontent-%COMP%]{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto}[_nghost-%COMP%]   .q-entity-control[_ngcontent-%COMP%]:disabled, [_nghost-%COMP%]   .q-field-control[_ngcontent-%COMP%]:disabled, [_nghost-%COMP%]   .q-input-control[_ngcontent-%COMP%]:disabled, [_nghost-%COMP%]   .q-operator-control[_ngcontent-%COMP%]:disabled{border-color:transparent}[_nghost-%COMP%]   .q-entity-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-field-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-input-control[_ngcontent-%COMP%]:not([type=checkbox]), [_nghost-%COMP%]   .q-operator-control[_ngcontent-%COMP%]{min-height:32px;-webkit-appearance:none}[_nghost-%COMP%]   .q-button[_ngcontent-%COMP%], [_nghost-%COMP%]   .q-switch-label[_ngcontent-%COMP%]{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:400;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}[_nghost-%COMP%]   .q-button[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]   .q-switch-label[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:#f0f0f0}[_nghost-%COMP%]   .q-switch-label[_ngcontent-%COMP%]{background-color:#e4e4e4;padding:0 8px}[_nghost-%COMP%]   .q-switch-radio[_ngcontent-%COMP%]{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}[_nghost-%COMP%]   .q-switch-radio[_ngcontent-%COMP%]:checked + .q-switch-label[_ngcontent-%COMP%]{border:1px solid #619ed7;background:#fff;color:#3176b3}[_nghost-%COMP%]   .q-switch-radio[_ngcontent-%COMP%]:disabled + .q-switch-label[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .q-switch-radio[_ngcontent-%COMP%]:checked:disabled + .q-switch-label[_ngcontent-%COMP%]{display:initial;color:initial;cursor:default;border-color:transparent}[_nghost-%COMP%]   .q-invalid-ruleset[_ngcontent-%COMP%]{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}[_nghost-%COMP%]   .q-empty-warning[_ngcontent-%COMP%]{color:#8d252e;text-align:center}[_nghost-%COMP%]   .q-ruleset[_ngcontent-%COMP%]{border:1px solid #ccc}[_nghost-%COMP%]   .q-rule[_ngcontent-%COMP%]{border:1px solid #ccc;background:#fff}[_nghost-%COMP%]   .q-transition[_ngcontent-%COMP%]{-webkit-transition:.1s ease-in-out;transition:.1s ease-in-out}[_nghost-%COMP%]   .q-tree-container[_ngcontent-%COMP%]{width:100%;overflow:hidden;-webkit-transition:max-height .25s ease-in;transition:max-height .25s ease-in}[_nghost-%COMP%]   .q-tree-container.q-collapsed[_ngcontent-%COMP%]{max-height:0!important}[_nghost-%COMP%]   .q-tree[_ngcontent-%COMP%]{list-style:none;margin:4px 0 2px}[_nghost-%COMP%]   .q-row[_ngcontent-%COMP%]{padding:6px 8px;margin-top:6px}[_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]::before{top:-5px;border-width:0 0 2px 2px}[_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]::after{border-width:0 0 0 2px;top:50%}[_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]::after, [_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]::before{content:'';left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}[_nghost-%COMP%]   .q-connector[_ngcontent-%COMP%]:last-child::after{content:none}[_nghost-%COMP%]   .q-inline-block-display[_ngcontent-%COMP%]{display:inline-block;vertical-align:top}"]}),o}(),Ai=function(){function o(){}return o.\u0275fac=function(i){return new(i||o)}
1,o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[h.ez,c.u5]}),o}(),qi=u(15861);function ki(o,r){if(1&o&&(e.TgZ(0,"option",18),e._uU(1),e.qZA()),2&o){const i=r.$implicit,t=e.oxw(2);e.Q6J("value",i[t.tableListKey]),e.xp6(1),e.Oqu(i[t.tableListKey])}}function Di(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",13)(1,"select",14,15),e.NdJ("change",function(){e.CHM(i);const n=e.MAs(2),s=e.oxw();return s.sqlSelectField=[],e.KtG(s.onSelectTable(n.value))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.tableNameText=n)}),e.TgZ(3,"option",16),e._uU(4,"--Select Table---"),e.qZA(),e.YNc(5,ki,2,2,"option",17),e.qZA()()}if(2&o){const i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.tableNameText),e.xp6(4),e.Q6J("ngForOf",i.tableList)}}const Li=function(){return{width:"100%",height:"30px"}};function Mi(o,r){1&o&&(e.ynx(0),e.TgZ(1,"div",4),e._UZ(2,"ngx-skeleton-loader",19),e.qZA(),e.BQk()),2&o&&(e.xp6(2),e.Q6J("theme",e.DdM(1,Li)))}const Oi=function(o){return{"p-button-text":o}};function Ni(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",21)(1,"button",22),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectField(s[l.tableColumnsListKey]))}),e.TgZ(2,"span",23),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Oi,!t.sqlSelectField.includes(i[t.tableColumnsListKey]))),e.xp6(2),e.hij(" ",i[t.tableColumnsListKey],"")}}function Ji(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Ni,4,4,"div",20),e.BQk()),2&o){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.tableColumnsList)}}const Qi=function(){return{width:"130px",height:"30px"}};function Ui(o,r){1&o&&(e.TgZ(0,"div",21),e._UZ(1,"ngx-skeleton-loader",19),e.qZA()),2&o&&(e.xp6(1),e.Q6J("theme",e.DdM(1,Qi)))}function Bi(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Ui,2,2,"div",20),e.BQk()),2&o){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.skLoadingArray)}}function Ri(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",24)(2,"h5",4),e._uU(3,"SQL WHERE Clause"),e.qZA(),e.TgZ(4,"query-builder",25),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.query=n)}),e.qZA()(),e.TgZ(5,"div",26)(6,"div",27)(7,"button",28),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.TgZ(8,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onUpdateSqlBuilder())}),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(4),e.Q6J("ngModel",i.query)("allowRuleset",!1)("config",i.config)}}function Ei(o,r){if(1&o&&(e.TgZ(0,"alert",30),e._UZ(1,"span",31),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType)("dismissible",i.dismissible),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const ji=function(o){return{hide:o}};let Hi=(()=>{const r=class{constructor(t,n,s,l,a){this.modalService=t,this.loading=n,this.cd=s,this.systemIntegrationService=l,this.activatedRoutes=a,this.credList=[],this.dismissible=!0,this.isOpen=!1,this.step=[1],this.isTesting=!1,this.tableListKey="",this.tableList=[],this.skLoadingArray=[1,2,3,4,5,6,1,2,3,4],this.tableNameText="",this.backHome=new e.vpe,this.sqlSelectField=[],this.tableColumnsListKey="",this.tableColumnsList=[],this.sqlPageStep=1,this.query={condition:"and",rules:[]},this.skLoading={one:!0,two:!1},this.systemList=[],this.config={fields:{}},this.tableName=null,this.orgID=null,this.whereCluase=null}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onFindTables(),this.onFillEditContent()}onFillEditContent(){var t=this;const n=[];for(const s of this.formObject.request_form[0])n.push({name:"Form."+s.controllabel,value:s.controlId});for(const s of this.updateData)"table"===s.field&&(0,qi.Z)(function*(){t.tableNameText=s.value_1,yield t.onSelectTable(s.value_1)})(),"select"===s.field&&(this.sqlSelectField=JSON.parse(s.value_1)),"where"===s.field&&(this.whereCluase=JSON.parse(s.value_1))}onFindTables(){this.skLoading.one=!0,this.systemIntegrationService.GetSqlTables(this.constructor.name,this.connectionId,_.e.systemIntegrationModule).subscribe(t=>{this.loading.stop(),this.skLoading.one=!1,200===t.status&&(this.tableList=t.response,this.tableListKey=t.columns[0])},t=>{this.skLoading.one=!1,this.loading.stop(),this.isOpen=!0,this.alertMsg=t,this.alertType="danger"})}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onSelectTable(t){return t?new Promise((n,s)=>{this.tableName=t;const l={table:t};this.cd.detectChanges(),this.step.push(2),this.skLoading.two=!0,this.systemIntegrationService.GetSqlTableColumns(this.constructor.name,this.connectionId,l,_.e.systemIntegrationModule).subscribe(a=>{this.skLoading.two=!1,200===a.status&&(this.tableColumnsList=a.response,this.tableColumnsListKey=a.columns[0],this.onCreateSqlBuilder(),n(!0))},a=>{this.skLoading.two=!1,this.tableColumnsList=[],this.isOpen=!0,this.alertMsg="Unable to get columns",this.alertType="danger",s(!0)})}):(this.step=[1],this.sqlPageStep=1,!1)}onCreateSqlBuilder(){const t=[];for(const a of this.formObject.request_form[0])t.push({name:"Form."+a.controllabel,value:a.indexCount});const n={};for(const a of this.tableColumnsList)n[a[this.tableColumnsListKey]]={name:a[this.tableColumnsListKey],type:"category",operators:["=","<=",">"],options:t};this.query={condition:this.whereCluase.condition,rules:this.whereCluase.rules},this.config={fields:n}}onSelectField(t){const n=[...this.sqlSelectField];if(n.includes(t)){const s=this.sqlSelectField.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.sqlSelectField=n}
1onUpdateSqlBuilder(){for(let n=0;n<this.query.rules.length;n++)this.query.rules[n].value.includes("_Index")&&(this.query.rules[n].value=this.query.rules[n].value.slice(0,this.query.rules[n].value.length-6)),this.query.rules[n].value.includes("_index")&&(this.query.rules[n].value=this.query.rules[n].value.slice(0,this.query.rules[n].value.length-6));const t=[{field:"select",value_1:JSON.stringify(this.sqlSelectField),system_name:this.systemName},{field:"where",value_1:JSON.stringify(this.query),system_name:this.systemName},{field:"table",value_1:this.tableName,system_name:this.systemName}];this.loading.start(),this.systemIntegrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.sqlPageStep=2,this.isOpen=!0,this.alertMsg="Record Updated",this.alertType="info",this.backHome.emit(!0))},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(ae.tT),e.Y36(k.LA),e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-update-sql-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",updateData:"updateData"},outputs:{backHome:"backHome"},features:[e.TTD],decls:20,vars:9,consts:[["appTheme","",1,"card"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"mb-2"],[1,"row"],[1,"col-md-6"],["class","form-group",4,"ngIf"],[4,"ngIf"],["appTheme","",1,"card-body"],[1,"mb-3"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type","dismissible",4,"ngIf"],[1,"form-group"],["id","exampleFormControlSelect1",1,"form-control","w-75",3,"ngModel","change","ngModelChange"],["tableName",""],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"theme"],["class","col-md-2 mb-2",4,"ngFor","ngForOf"],[1,"col-md-2","mb-2"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"mt-4","card-body"],[3,"ngModel","allowRuleset","config","ngModelChange"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],["dismissOnTimeout","5000",3,"type","dismissible"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"a",2),e.NdJ("click",function(){return s.backHome.emit(!0)}),e._UZ(3,"i",3),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"h5",4),e._uU(6,"Select Table"),e.qZA(),e.TgZ(7,"div",5)(8,"div",6),e.YNc(9,Di,6,2,"div",7),e.YNc(10,Mi,3,2,"ng-container",8),e.qZA()()(),e.TgZ(11,"div",9)(12,"h5",10),e._uU(13,"Choose Table Columns"),e.qZA(),e.TgZ(14,"div",5),e.YNc(15,Ji,2,1,"ng-container",8),e.YNc(16,Bi,2,1,"ng-container",8),e.qZA()(),e.YNc(17,Ri,9,3,"ng-container",8),e.TgZ(18,"div",11),e.YNc(19,Ei,2,3,"alert",12),e.qZA()()),2&n&&(e.xp6(9),e.Q6J("ngIf",!s.skLoading.one),e.xp6(1),e.Q6J("ngIf",s.skLoading.one),e.xp6(5),e.Q6J("ngIf",!s.skLoading.two),e.xp6(1),e.Q6J("ngIf",s.skLoading.two),e.xp6(1),e.Q6J("ngIf",s.sqlSelectField.length>0),e.xp6(1),e.Q6J("ngClass",e.VKq(7,ji,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,Qe.xr,O.wx,L.mh,xe,N.Hq,J.H,R.E],styles:[".alert-info[_ngcontent-%COMP%]{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-success[_ngcontent-%COMP%]{background-color:#10b759;border-color:#10b759;color:#fff}.alert-danger[_ngcontent-%COMP%]{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.flotingdiv[_ngcontent-%COMP%]{position:fixed;bottom:0;top:84%;right:0;overflow-x:hidden;overflow-y:auto}.cursorpointer[_ngcontent-%COMP%]{cursor:pointer}.colorblue[_ngcontent-%COMP%]{color:#00f}.hide[_ngcontent-%COMP%]{display:none}"]}),o})();function Gi(o,r){if(1&o&&(e.TgZ(0,"option",17),e._uU(1),e.qZA()),2&o){const i=r.$implicit,t=e.oxw(4);e.Q6J("value",i[t.tableListKey]),e.xp6(1),e.Oqu(i[t.tableListKey])}}function Yi(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",12)(1,"select",13,14),e.NdJ("change",function(){e.CHM(i);const n=e.MAs(2),s=e.oxw(3);return e.KtG(s.onSelectTable(n.value))}),e.TgZ(3,"option",15),e._uU(4,"--Select Table---"),e.qZA(),e.YNc(5,Gi,2,2,"option",16),e.qZA()()}if(2&o){const i=e.oxw(3);e.xp6(5),e.Q6J("ngForOf",i.tableList)}}const Pi=function(){return{width:"100%",height:"30px"}};function Ki(o,r){1&o&&(e.ynx(0),e.TgZ(1,"div",8),e._UZ(2,"ngx-skeleton-loader",18),e.qZA(),e.BQk()),2&o&&(e.xp6(2),e.Q6J("theme",e.DdM(1,Pi
1)))}function zi(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"h5",8),e._uU(6,"Select Table"),e.qZA(),e.TgZ(7,"div",9)(8,"div",10),e.YNc(9,Yi,6,1,"div",11),e.YNc(10,Ki,3,2,"ng-container",0),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw(2);e.xp6(9),e.Q6J("ngIf",!i.skLoading.one),e.xp6(1),e.Q6J("ngIf",i.skLoading.one)}}const Wi=function(o){return{"p-button-text":o}};function Vi(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",23)(1,"button",24),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(5);return e.KtG(l.onSelectField(s[l.tableColumnsListKey]))}),e.TgZ(2,"span",25),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(5);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Wi,!t.sqlSelectField.includes(i[t.tableColumnsListKey]))),e.xp6(2),e.hij(" ",i[t.tableColumnsListKey],"")}}function $i(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Vi,4,4,"div",22),e.BQk()),2&o){const i=e.oxw(4);e.xp6(1),e.Q6J("ngForOf",i.tableColumnsList)}}const Xi=function(){return{width:"130px",height:"30px"}};function en(o,r){1&o&&(e.TgZ(0,"div",23),e._UZ(1,"ngx-skeleton-loader",18),e.qZA()),2&o&&(e.xp6(1),e.Q6J("theme",e.DdM(1,Xi)))}function tn(o,r){if(1&o&&(e.ynx(0),e.YNc(1,en,2,2,"div",22),e.BQk()),2&o){const i=e.oxw(4);e.xp6(1),e.Q6J("ngForOf",i.skLoadingArray)}}function nn(o,r){if(1&o&&(e.TgZ(0,"div",20)(1,"h5",21),e._uU(2,"Choose Table Columns"),e.qZA(),e.TgZ(3,"div",9),e.YNc(4,$i,2,1,"ng-container",0),e.YNc(5,tn,2,1,"ng-container",0),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(4),e.Q6J("ngIf",!i.skLoading.two),e.xp6(1),e.Q6J("ngIf",i.skLoading.two)}}function on(o,r){if(1&o&&(e.ynx(0),e.YNc(1,nn,6,2,"div",19),e.BQk()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.step.includes(2)&&1===i.sqlPageStep)}}function sn(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",26)(2,"h5",8),e._uU(3,"SQL WHERE Clause"),e.qZA(),e.TgZ(4,"query-builder",27),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.query=n)}),e.qZA()(),e.TgZ(5,"div",28)(6,"div",29)(7,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onConnectionListPage())}),e.qZA(),e.TgZ(8,"button",31),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSaveSqlBuilder())}),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngModel",i.query)("allowRuleset",!1)("config",i.config)}}function rn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",9)(2,"div",32)(3,"h5"),e._UZ(4,"i",33),e.TgZ(5,"span",34),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",35),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",36),e._uU(9," Back to connection list"),e.qZA()()()()}}function ln(o,r){if(1&o&&(e.TgZ(0,"alert",37),e._UZ(1,"span",38),e.qZA()),2&o){const i=e.oxw(2);e.Q6J("type",i.alertType)("dismissible",i.dismissible),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const an=function(o){return{hide:o}};function cn(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"div",1),e.YNc(2,zi,11,2,"ng-container",0),e.YNc(3,on,2,1,"ng-container",0),e.YNc(4,sn,9,3,"ng-container",0),e.YNc(5,rn,10,0,"div",2),e.qZA(),e.TgZ(6,"div",3),e.YNc(7,ln,2,3,"alert",4),e.qZA(),e.BQk()),2&o){const i=e.oxw();e.xp6(2),e.Q6J("ngIf",i.step.includes(1)&&1===i.sqlPageStep),e.xp6(1),e.Q6J("ngIf",i.step.includes(2)&&1===i.sqlPageStep),e.xp6(1),e.Q6J("ngIf",i.sqlSelectField.length>0&&1===i.sqlPageStep),e.xp6(1),e.Q6J("ngIf",2===i.sqlPageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(6,an,!i.isOpen)),e.xp6(1),e.Q6J("ngIf",i.isOpen)}}function dn(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"app-update-sql-query-builder",39),e.NdJ("backHome",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e.qZA(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(1),e.Q6J("formObject",i.formObject)("formID",i.formID)("updateData",i.updateData)("connectionId",i.connectionId)("systemName",i.systemName)}}let pn=(()=>{const r=class{constructor(t,n,s,l,a){this.modalService=t,this.loading=n,this.cd=s,this.systemIntegrationService=l,this.activatedRoutes=a,this.credList=[],this.dismissible=!0,this.isOpen=!1,this.step=[1],this.isTesting=!1,this.tableListKey="",this.tableList=[],this.skLoadingArray=[1,2,3,4,5,6,1,2,3,4],this.backHome=new e.vpe,this.updateData=null,this.sqlSelectField=[],this.tableColumnsListKey="",this.tableColumnsList=[],this.sqlPageStep=1,this.query={condition:"and",rules:[]},this.skLoading={one:!0,two:!1},this.systemList=[],this.config={fields:{}},this.tableName=null,this.orgID=null,this.isUpdate=!1}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onFindTables(),this.onGetSavedData()}onGetSavedData(){this.systemIntegrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>
1{if(200===t.status&&t.response.length>0){this.updateData=t.response,this.isUpdate=!0;for(const s of this.updateData)if("select"!==s.field&&"table"!==s.field&&s.hasOwnProperty("value_1")){let l=JSON.parse(s.value_1);for(let a=0;a<l.rules.length;a++)l.rules[a].value=l.rules[a].value+"_Index",s.value_1=JSON.stringify(l)}}})}onFindTables(){this.skLoading.one=!0,this.systemIntegrationService.GetSqlTables(this.constructor.name,this.connectionId,_.e.systemIntegrationModule).subscribe(t=>{this.loading.stop(),this.skLoading.one=!1,200===t.status&&(this.tableList=t.response,this.tableListKey=t.columns[0])},t=>{this.skLoading.one=!1,this.loading.stop(),this.isOpen=!0,this.alertMsg=t,this.alertType="danger"})}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onSelectTable(t){if(this.tableName=t,!t)return this.step=[1],this.sqlPageStep=1,!1;const n={table:t};this.cd.detectChanges(),this.step.push(2),this.skLoading.two=!0,this.systemIntegrationService.GetSqlTableColumns(this.constructor.name,this.connectionId,n,_.e.systemIntegrationModule).subscribe(s=>{this.skLoading.two=!1,200===s.status&&(this.sqlSelectField=[],this.tableColumnsList=s.response,this.tableColumnsListKey=s.columns[0],this.onCreateSqlBuilder())},s=>{this.isOpen=!0,this.alertMsg="Unable to get columns",this.alertType="danger",this.step=[1],this.sqlPageStep=1,this.skLoading.two=!1})}onCreateSqlBuilder(){const t=[];for(const n of this.formObject.request_form[0])t.push({name:"Form."+n.controllabel,value:n.indexCount});
1this.query.rules.push({field:this.tableColumnsList[0][this.tableColumnsListKey],operators:["=","<=",">"],value:""});for(const n of this.tableColumnsList)this.config.fields[n[this.tableColumnsListKey]]={name:n[this.tableColumnsListKey],type:"category",operators:["=","<=",">"],options:t}}onSelectField(t){const n=[...this.sqlSelectField];if(n.includes(t)){const s=this.sqlSelectField.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.sqlSelectField=n}onSaveSqlBuilder(){for(let n=0;n<this.query.rules.length;n++)this.query.rules[n].value.includes("_Index")&&(this.query.rules[n].value=this.query.rules[n].value.slice(0,this.query.rules[n].value.length-6)),this.query.rules[n].value.includes("_index")&&(this.query.rules[n].value=this.query.rules[n].value.slice(0,this.query.rules[n].value.length-6));const t=[{field:"select",value_1:JSON.stringify(this.sqlSelectField),system_name:this.systemName},{field:"where",value_1:JSON.stringify(this.query),system_name:this.systemName},{field:"table",value_1:this.tableName,system_name:this.systemName}];this.loading.start(),this.systemIntegrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.sqlPageStep=2,this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info")},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(ae.tT),e.Y36(k.LA),e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-sql-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:2,vars:2,consts:[[4,"ngIf"],["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type","dismissible",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"mb-2"],[1,"row"],[1,"col-md-6"],["class","form-group",4,"ngIf"],[1,"form-group"],["id","exampleFormControlSelect1",1,"form-control","w-75",3,"change"],["tableName",""],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"theme"],["class","card-body","appTheme","",4,"ngIf"],["appTheme","",1,"card-body"],[1,"mb-3"],["class","col-md-2 mb-2",4,"ngFor","ngForOf"],[1,"col-md-2","mb-2"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"mt-4","card-body"],[3,"ngModel","allowRuleset","config","ngModelChange"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type","dismissible"],[3,"innerHTML"],[3,"formObject","formID","updateData","connectionId","systemName","backHome"]],template:function(n,s){1&n&&(e.YNc(0,cn,8,8,"ng-container",0),e.YNc(1,dn,2,5,"ng-container",0)),2&n&&(e.Q6J("ngIf",!s.isUpdate),e.xp6(1),e.Q6J("ngIf",s.isUpdate))},dependencies:[c.YN,c.Kr,c.JJ,c.On,h.mk,h.sg,h.O5,Qe.xr,O.wx,L.mh,xe,N.Hq,J.H,R.E,Hi],styles:[".back-to-list-btn[_ngcontent-%COMP%]{border-bottom:2px solid;padding-bottom:7px;cursor:pointer}.spinner-border[_ngcontent-%COMP%]{width:18px;height:18px}.table-list[_ngcontent-%COMP%]{max-height:400px;overflow:scroll}.alert-info[_ngcontent-%COMP%]{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-success[_ngcontent-%COMP%]{background-color:#10b759;border-color:#10b759;color:#fff}.alert-danger[_ngcontent-%COMP%]{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.flotingdiv[_ngcontent-%COMP%]{position:fixed;bottom:0;top:84%;right:0;overflow-x:hidden;overflow-y:auto}.cursorpointer[_ngcontent-%COMP%]{cursor:pointer}.colorblue[_ngcontent-%COMP%]{color:#00f}.hide[_ngcontent-%COMP%]{display:none}.text-over[_ngcontent-%COMP%]{white-space:nowrap;width:130px;overflow:hidden;text-overflow:ellipsis}"]}),o})();function un(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function mn(o,r){if(1&o&&(e.ynx(0),e.YNc(1,un,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function _n(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}const gn=function(o){return{"p-button-text":o}};function hn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",24)(1,"button",25),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",26),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,gn,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function fn(o,r){1&o&&(e.TgZ(0,"div",27)(1,"p",28),e._uU(2," Choose minimum 1 column "),e.qZA()())}function bn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function xn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Cn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(2,"i",6),e._uU(3," GoBack"),e.qZA(),e.TgZ(4,"div",7)(5,"div",8)(6,"label",9),e._uU(7,"Email Address"),e.qZA(),e.TgZ(8,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(9,mn,2,1,"ng-container",11),e.qZA(),e.YNc(10,_n,2,0,"p",12),e.qZA()(),e.TgZ(11,"div",7)(12,"div",13)(13,"h5"),e._uU(14,"Choose Columns"),e.qZA()(),e.YNc(15,hn,4,4,"div",14),e.YNc(16,fn,3,0,"div",15),e.qZA(),e.TgZ(17,"div",16)(18,"div",17)(19,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(20,bn,1,0,"button",19),e.YNc(21,xn,1,0,"button",20),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(
15),e.Q6J("ngForOf",i.mailChimpColumns),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function vn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",7)(2,"div",31)(3,"h5"),e._UZ(4,"i",32),e.TgZ(5,"span",33),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",34),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",35),e._uU(9," Back to connection list"),e.qZA()()()()}}function yn(o,r){if(1&o&&(e.TgZ(0,"alert",36),e._UZ(1,"span",37),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Tn=function(o){return{hide:o}};let wn=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.mailChimpColumns=["consents_to_one_to_one_messaging","contact_id","email_address","email_client","email_type","full_name","id","ip_opt","ip_signup","language","last_changed","list_id","member_rating","source","status","tags_count","timestamp_opt","timestamp_signup","unique_email_id","vip","web_id"],this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-mailchimp-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised","w-100",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,Cn,22,7,"div",1),e.YNc(2,vn,10,0,"div",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,yn,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Tn,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Zn(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function Fn(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Zn,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function In(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}const Sn=function(o){return{"p-button-text":o}};function An(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",24)(1,"button",25),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",26),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Sn,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function qn(o,r){1&o&&(e.TgZ(0,"div",27)(1,"p",28),e._uU(2," Choose minimum 1 column "),e.qZA()())}function kn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Dn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Ln(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(2,"i",6),e._uU(3," GoBack"),e.qZA(),e.TgZ(4,"div",7)(5,"div",8)(6,"label",9),e._uU(7,"Email Address"),e.qZA(),e.TgZ(8,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(9,Fn,2,1,"ng-container",11),e.qZA(),e.YNc(10,In,2,0,"p",12),e.qZA()(),e.TgZ(11,"div",7)(12,"div",13)(13,"h5"),e._uU(14,"Choose Columns"),e.qZA()(),e.YNc(15,An,4,4,"div",14),e.YNc(16,qn,3,0,"div",15),e.qZA(),e.TgZ(17,"div",16)(18,"div",17)(19,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(20,kn,1,0,"button",19),e.YNc(21,Dn,1,0,"button",20),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(5),e.Q6J("ngForOf",i.activeCampaignColumns),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function Mn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",7)(2,"div",31)(3,"h5"),e._UZ(4,"i",32),e.TgZ(5,"span",33),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",34),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",35),e._uU(9," Back to connection list"),e.qZA()()()()}}function On(o,r){if(1&o&&(e.TgZ(0,"alert",36),e._UZ(1,"span",37),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Nn=function(o){return{hide:o}};let Jn=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.activeCampaignColumns=["adate","anonymized","bounced_date","bounced_hard","bounced_
1soft","cdate","created_by","created_timestamp","created_utc_timestamp","deleted","deleted_at","edate","email","email_domain","email_empty","email_local","firstName","gravatar","hash","id","ip","lastName","mpp_tracking","organization","orgid","orgname","phone","rating_tstamp","scoreValues","segmentio_id","sentcnt","socialdata_lastcheck","ua","udate","updated_by","updated_timestamp","updated_utc_timestamp"],this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-active-campaign"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised","w-100",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,Ln,22,7,"div",1),e.YNc(2,Mn,10,0,"div",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,On,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Nn,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Qn(o,r){if(1&o&&(e.TgZ(0,"option",19),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function Un(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Qn,2,2,"option",18),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function Bn(o,r){1&o&&(e.TgZ(0,"p",20),e._uU(1,"Email is Required"),e.qZA())}function Rn(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function En(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",22),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function jn(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",4)(2,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",6),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",7)(6,"div",8)(7,"label",9),e._uU(8,"
1Email Address"),e.qZA(),e.TgZ(9,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,Un,2,1,"ng-container",11),e.qZA(),e.YNc(11,Bn,2,0,"p",12),e.qZA()(),e.TgZ(12,"div",13)(13,"div",14)(14,"button",15),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(15,Rn,1,0,"button",16),e.YNc(16,En,1,0,"button",17),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function Hn(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",4)(2,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",6),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",7)(6,"div",23)(7,"h5"),e._UZ(8,"i",24),e.TgZ(9,"span",25),e._uU(10," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(11,"button",26),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(12,"i",27),e._uU(13," Back to connection list"),e.qZA()()()(),e.BQk()}}function Gn(o,r){if(1&o&&(e.TgZ(0,"alert",28),e._UZ(1,"span",29),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Yn=function(o){return{hide:o}};let Pn=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.isUpdate=!1,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1)}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-send-in-blue"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],[4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,jn,17,5,"ng-container",1),e.YNc(2,Hn,14,0,"ng-container",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,Gn,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Yn,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Kn(o,r){if(1&o&&(e.TgZ(0,"option",23),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function zn(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Kn,2,2,"option",22),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function Wn(o,r){1&o&&(e.TgZ(0,"p",24),e._uU(1,"Email is Required"),e.qZA())}const Vn=function(o){return{"p-button-text":o}};function $n(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",25)(1,"button",26),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",27),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Vn,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function Xn(o,r){1&o&&(e.TgZ(0,"div",28)(1,"p",29),e._uU(2," Choose minimum 1 column "),e.qZA()())}function eo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function to(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",31),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function io(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,zn,2,1,"ng-container",12),e.qZA(),e.YNc(11,Wn,2,0,"p",13),e.qZA()(),e.TgZ(12,"div",8)(13,"div",14)(14,"h5"),e._uU(15,"Choose Columns"),e.qZA()(),e.YNc(16,$n,4,4,"div",15),e.YNc(17,Xn,3,0,"div",16),e.qZA(),e.TgZ(18,"div",17)(19,"div",18)(20,"button",19),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(21,eo,1,0,"button",20),e.YNc(22,to,1,0,"button",21),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(5),e.Q6J("ngForOf",i.sendGrid),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function no(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",32)(3,"h5"),e._UZ(4,"i",33),e.TgZ(5,"span",34),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",35),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",36),e._uU(9," Back to connection list"),e.qZA()()()()}}function oo(o,r){if(1&o&&(e.TgZ(0,"alert",37),e._UZ(1,"span",38),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const so=function(o){return{hide:o}};let ro=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.sendGrid=["address_line_1","address_line_2","alternate_emails","city","country","created_at","email","facebook","first_name","
1id","last_name","line","list_ids","phone_number","postal_code","segment_ids","state_province_region","unique_name","updated_at"],this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-send-grid"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,io,23,7,"ng-container",1),e.YNc(2,no,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,oo,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,so,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function lo(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function ao(o,r){if(1&o&&(e.ynx(0),e.YNc(1,lo,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function co(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}const po=function(o){return{"p-button-text":o}};function uo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",24)(1,"button",25),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",26),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,po,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function mo(o,r){1&o&&(e.TgZ(0,"div",27)(1,"p",28),e._uU(2," Choose minimum 1 column "),e.qZA()())}function _o(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function go(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function ho(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(2,"i",6),e._uU(3," GoBack"),e.qZA(),e.TgZ(4,"div",7)(5,"div",8)(6,"label",9),e._uU(7,"Email Address"),e.qZA(),e.TgZ(8,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(9,ao,2,1,"ng-container",11),e.qZA(),e.YNc(10,co,2,0,"p",12),e.qZA()(),e.TgZ(11,"div",7)(12,"div",13)(13,"h5"),e._uU(14,"Choose Columns"),e.qZA()(),e.YNc(15,uo,4,4,"div",14),e.YNc(16,mo,3,0,"div",15),e.qZA(),e.TgZ(17,"div",16)(18,"div",17)(19,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(20,_o,1,0,"button",19),e.YNc(21,go,1,0,"button",20),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(
15),e.Q6J("ngForOf",i.sendGrid),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function fo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",7)(2,"div",31)(3,"h5"),e._UZ(4,"i",32),e.TgZ(5,"span",33),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",34),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",35),e._uU(9," Back to connection list"),e.qZA()()()()}}function bo(o,r){if(1&o&&(e.TgZ(0,"alert",36),e._UZ(1,"span",37),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const xo=function(o){return{hide:o}};let Co=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.sendGrid=["ID","Name","Mobile","Email","CreatedOn","UpdatedOn","UnsubscribedOn","UnsubscribedFromID","SubscribeType","SubscribeMethod","CustomFields","RemovedOn"],this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-moosend"]],inputs:{formObject:"formObject",connectionData:"connectionData",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},decls:5,vars:6,consts:[["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,ho,22,7,"div",1),e.YNc(2,fo,10,0,"div",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,bo,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,xo,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function vo(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function yo(o,r){if(1&o&&(e.ynx(0),e.YNc(1,vo,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function To(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}const wo=function(o){return{"p-button-text":o}};function Zo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",24)(1,"button",25),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",26),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,wo,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function Fo(o,r){1&o&&(e.TgZ(0,"div",27)(1,"p",28),e._uU(2," Choose minimum 1 column "),e.qZA()())}function Io(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function So(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Ao(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(2,"i",6),e._uU(3," GoBack"),e.qZA(),e.TgZ(4,"div",7)(5,"div",8)(6,"label",9),e._uU(7,"Email Address"),e.qZA(),e.TgZ(8,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(9,yo,2,1,"ng-container",11),e.qZA(),e.YNc(10,To,2,0,"p",12),e.qZA()(),e.TgZ(11,"div",7)(12,"div",13)(13,"h5"),e._uU(14,"Choose Columns"),e.qZA()(),e.YNc(15,Zo,4,4,"div",14),e.YNc(16,Fo,3,0,"div",15),e.qZA(),e.TgZ(17,"div",16)(18,"div",17)(19,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(20,Io,1,0,"button",19),e.YNc(21,So,1,0,"button",20),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(5),e.Q6J("ngForOf",i.sendGrid),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function qo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",7)(2,"div",31)(3,"h5"),e._UZ(4,"i",32),e.TgZ(5,"span",33),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",34),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",35),e._uU(9," Back to connection list"),e.qZA()()()()}}function ko(o,r){if(1&o&&(e.TgZ(0,"alert",36),e._UZ(1,"span",37),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Do=function(o){return{hide:o}};let Lo=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.sendGrid=["createdate","email","firstname","hs_object_id","lastmodifieddate","lastname"],this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>
1{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-hubspot-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,Ao,22,7,"div",1),e.YNc(2,qo,10,0,"div",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,ko,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Do,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Mo(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function Oo(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Mo,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function No(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}const Jo=function(o){return{"p-button-text":o}};function Qo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",24)(1,"button",25),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",26),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Jo,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function Uo(o,r){1&o&&(e.TgZ(0,"div",27)(1,"p",28),e._uU(2," Choose minimum 1 column "),e.qZA()())}function Bo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Ro(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Eo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"a",5),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(2,"i",6),e._uU(3," GoBack"),e.qZA(),e.TgZ(4,"div",7)(5,"div",8)(6,"label",9),e._uU(7,"Email Address"),e.qZA(),e.TgZ(8,"select",10),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(9,Oo,2,1,"ng-container",11),e.qZA(),e.YNc(10,No,2,0,"p",12),e.qZA()(),e.TgZ(11,"div",7)(12,"div",13)(13,"h5"),e._uU(14,"Choose Columns"),e.qZA()(),e.YNc(15,Qo,4,4,"div",14),e.YNc(16,Uo,3,0,"div",15),e.qZA(),e.TgZ(17,"div",16)(18,"div",17)(19,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(20,Bo,1,0,"button",19),e.YNc(21,Ro,1,0,"button",20),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(
15),e.Q6J("ngForOf",i.shopifyresponcecolumns),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function jo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",7)(2,"div",31)(3,"h5"),e._UZ(4,"i",32),e.TgZ(5,"span",33),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",34),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",35),e._uU(9," Back to connection list"),e.qZA()()()()}}function Ho(o,r){if(1&o&&(e.TgZ(0,"alert",36),e._UZ(1,"span",37),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Go=function(o){return{hide:o}};let Yo=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.shopifyresponcecolumns=["id","email","accepts_marketing","created_at","updated_at","first_name","last_name","orders_count","state","total_spent","last_order_id","note","verified_email","multipass_identifier","tax_exempt","tags","last_order_name","currency","phone","addresses","accepts_marketing_updated_at","marketing_opt_in_level","tax_exemptions","admin_graphql_api_id","default_address"],this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.backHome=new e.vpe,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData()}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-shopify-query-builder"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised","w-100",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,Eo,22,7,"div",1),e.YNc(2,jo,10,0,"div",1),e.qZA(),e.TgZ(3,"div",2),e.YNc(4,Ho,2,2,"alert",3),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Go,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Po(o,r){if(1&o&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function Ko(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Po,2,2,"option",25),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function zo(o,r){1&o&&(e.TgZ(0,"p",27),e._uU(1,"Email is Required"),e.qZA())}function Wo(o,r){1&o&&(e.TgZ(0,"p",27),e._uU(1,"Object is Required"),e.qZA())}function Vo(o,r){1&o&&(e.TgZ(0,"div",28)(1,"div",29)(2,"span",30),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"div",31)(5,"span",30),e._uU(6,"Loading..."),e.qZA()(),e.TgZ(7,"div",32)(8,"span",30),e._uU(9,"Loading..."),e.qZA()(),e.TgZ(10,"div",33)(11,"span",30),e._uU(12,"Loading..."),e.qZA()()())}const $o=function(o){return{"p-button-text":o}};function Xo(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",37)(1,"button",38),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",39),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.VKq(2,$o,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function es(o,r){1&o&&(e.TgZ(0,"div",40)(1,"p",41),e._uU(2," Choose minimum 1 column "),e.qZA()())}function ts(o,r){if(1&o&&(e.TgZ(0,"div",40)(1,"p",41),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(2),e.hij("Unable to populate columns. Please make sure you have atleast one record in Salesforce ",i.sales_object,"")}}function is(o,r){if(1&o&&(e.TgZ(0,"div",8)(1,"div",34)(2,"h5"),e._uU(3,"Choose Columns"),e.qZA()(),e.YNc(4,Xo,4,4,"div",35),e.YNc(5,es,3,0,"div",36),e.YNc(6,ts,3,1,"div",36),e.qZA()),2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.SalesForce),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&(null==i.SalesForce?null:i.SalesForce.length)>0),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&0==(null==i.SalesForce?null:i.SalesForce.length))}}function ns(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",42),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function os(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function ss(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"
1Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,Ko,2,1,"ng-container",12),e.qZA(),e.YNc(11,zo,2,0,"p",13),e.qZA(),e.TgZ(12,"div",9)(13,"label",14),e._uU(14,"Object"),e.qZA(),e.TgZ(15,"select",15),e.NdJ("change",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onGetcolumnsList())})("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.sales_object=n)}),e.ynx(16),e.TgZ(17,"option",16),e._uU(18,"Lead"),e.qZA(),e.TgZ(19,"option",17),e._uU(20,"Contact"),e.qZA(),e.BQk(),e.qZA(),e.YNc(21,Wo,2,0,"p",13),e.qZA()(),e.YNc(22,Vo,13,0,"div",18),e.YNc(23,is,7,3,"div",19),e.TgZ(24,"div",20)(25,"div",21)(26,"button",22),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(27,ns,1,0,"button",23),e.YNc(28,os,1,0,"button",24),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(4),e.Q6J("ngModel",i.sales_object),e.xp6(6),e.Q6J("ngIf",""===i.sales_object),e.xp6(1),e.Q6J("ngIf",i.iscolLoading),e.xp6(1),e.Q6J("ngIf",!i.iscolLoading),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function rs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",44)(3,"h5"),e._UZ(4,"i",45),e.TgZ(5,"span",46),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",47),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",48),e._uU(9," Back to connection list"),e.qZA()()()()}}function ls(o,r){if(1&o&&(e.TgZ(0,"alert",49),e._UZ(1,"span",50),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const as=function(o){return{hide:o}};let cs=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.SalesForce=[],this.backHome=new e.vpe,this.emailAddress="",this.sales_object="Lead",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.dummycolumnsList=[],this.iscolLoading=!0,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData(),setTimeout(()=>{this.onGetcolumnsList()},1200)}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&"object"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"object"===n.field&&(this.sales_object=n.value_1,this.objectname=n.value_1),"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onGetcolumnsList(){this.iscolLoading=!0,this.loading.start(),this.integrationService.GetsalesforceColumn(this.constructor.name,_.e.systemIntegrationModule,{cred_name:this.data.cred_name,description:this.data.description,connector_type:this.data.connector_type,integration_cred:this.data.integration_cred},this.systemName,this.sales_object).subscribe(n=>{if(200===n.status){if(this.iscolLoading=!1,this.loading.stop(),this.SalesForce=[],this.dummycolumnsList=[],this.columnsList=[],this.isUpdate=!0,n.response.records.length>0){let s=[];
1Object.keys(n.response.records[0]).forEach(function(l){(null==n.response.records[0][l]||"object"!=typeof n.response.records[0][l])&&s.push(l)}),s.toString();for(const l of s)this.SalesForce.push(l)}this.objectname===this.sales_object?this.onGetSavedData():(this.dummycolumnsList=[],this.columnsList=[])}},n=>{this.loading.stop(),this.iscolLoading=!1,this.isOpen=!0,this.alertMsg=n.error_description||n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){if(this.dummycolumnsList=[...this.columnsList],this.dummycolumnsList.includes(t)){const n=this.columnsList.indexOf(t);n>-1&&this.dummycolumnsList.splice(n,1)}else this.dummycolumnsList.push(t);this.columnsList=this.dummycolumnsList}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-salesforce"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",data:"data"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[[1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-6"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],["for","exampleFormControlSelect2"],["id","exampleFormControlSelect2",1,"form-control",3,"ngModel","change","ngModelChange"],["value","Lead"],["value","Contact"],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-grow","text-primary",2,"width","3rem","height","3rem"],[1,"sr-only"],["role","status",1,"spinner-grow","text-secondary",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-success",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-danger",2,"width","3rem","height","3rem"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,ss,29,9,"ng-container",1),e.YNc(2,rs,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,ls,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,as,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H]}),o})();function ds(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function ps(o,r){if(1&o&&(e.ynx(0),e.YNc(1,ds,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function us(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}function ms(o,r){1&o&&(e.TgZ(0,"div",24)(1,"div",25)(2,"span",26),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"div",27)(5,"span",26),e._uU(6,"Loading..."),e.qZA()(),e.TgZ(7,"div",28)(8,"span",26),e._uU(9,"Loading..."),e.qZA()(),e.TgZ(10,"div",29)(11,"span",26),e._uU(12,"Loading..."),e.qZA()()())}const _s=function(o){return{"p-button-text":o}};function gs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",33)(1,"button",34),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",35),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.VKq(2,_s,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function hs(o,r){1&o&&(e.TgZ(0,"div",36)(1,"p",37),e._uU(2," Choose minimum 1 column "),e.qZA()())}function fs(o,r){1&o&&(e.TgZ(0,"div",36)(1,"p",37),e._uU(2,"Unable to populate columns. Please make sure you have atleast one record 
1in Accelo"),e.qZA()())}function bs(o,r){if(1&o&&(e.TgZ(0,"div",8)(1,"div",30)(2,"h5"),e._uU(3,"Choose Columns"),e.qZA()(),e.YNc(4,gs,4,4,"div",31),e.YNc(5,hs,3,0,"div",32),e.YNc(6,fs,3,0,"div",32),e.qZA()),2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.acceloList),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length&&(null==i.acceloList?null:i.acceloList.length)>0),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&0==(null==i.acceloList?null:i.acceloList.length))}}function xs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Cs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function vs(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,ps,2,1,"ng-container",12),e.qZA(),e.YNc(11,us,2,0,"p",13),e.qZA()(),e.YNc(12,ms,13,0,"div",14),e.YNc(13,bs,7,3,"div",15),e.TgZ(14,"div",16)(15,"div",17)(16,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(17,xs,1,0,"button",19),e.YNc(18,Cs,1,0,"button",20),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(1),e.Q6J("ngIf",i.iscolLoading),e.xp6(1),e.Q6J("ngIf",!i.iscolLoading),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function ys(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",40)(3,"h5"),e._UZ(4,"i",41),e.TgZ(5,"span",42),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",43),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",44),e._uU(9," Back to connection list"),e.qZA()()()()}}function Ts(o,r){if(1&o&&(e.TgZ(0,"alert",45),e._UZ(1,"span",46),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const ws=function(o){return{hide:o}};let Zs=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.iscolLoading=!0,this.acceloList=[],this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData(),setTimeout(()=>{this.onGetcolumnsList()},1200)}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}onGetcolumnsList(){this.iscolLoading=!0,this.loading.start(),this.integrationService.GetacceloColumn(this.constructor.name,_.e.systemIntegrationModule,{cred_name:this.data.cred_name,description:this.data.description,connector_type:this.data.connector_type,integration_cred:this.data.integration_cred},this.systemName).subscribe(n=>{if(200===n.status&&(this.iscolLoading=!1,this.loading.stop(),this.acceloList=[],200===n.status)){let s=[];Object.keys(n.response).forEach(function(l){(null==n.response[l]||"object"!=typeof n.response[l])&&s.push(l)}),s.toString();for(const l of s)this.acceloList.push(l)}},n=>{this.loading.stop(),this.iscolLoading=!1,this.isOpen=!0,this.alertMsg=n.error_description||n||n.response,this.alertType="danger"})}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-accelo"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",data:"data"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-grow","text-primary",2,"width","3rem","height","3rem"],[1,"sr-only"],["role","status",1,"spinner-grow","text-secondary",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-success",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-danger",2,"width","3rem","height","3rem"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,vs,19,7,"ng-container",1),e.YNc(2,ys,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,Ts,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,ws,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Fs(o,r){if(1&o&&(e.TgZ(0,"option",22),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function Is(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Fs,2,2,"option",21),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function Ss(o,r){1&o&&(e.TgZ(0,"p",23),e._uU(1,"Email is Required"),e.qZA())}function As(o,r){1&o&&(e.TgZ(0,"div",24)(1,"div",25)(2,"span",26),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"div",27)(5,"span",26),e._uU(6,"Loading..."),e.qZA()(),e.TgZ(7,"div",28)(8,"span",26),e._uU(9,"Loading..."),e.qZA()(),e.TgZ(10,"div",29)(11,"span",26),e._uU(12,"Loading..."),e.qZA()()())}const qs=function(o){return{"p-button-text":o}};function ks(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",33)(1,"button",34),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",35),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.VKq(2,qs,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function Ds(o,r){1&o&&(e.TgZ(0,"div",36)(1,"p",37),e._uU(2," Choose minimum 1 column "),e.qZA()())}function Ls(o,r){1&o&&(e.TgZ(0,"div",36)(1,"p",37),e._uU(2,"Unable to populate columns. Please make sure you have atleast one record in Omnisend"),e.qZA()())}function Ms(o,r){if(1&o&&(e.TgZ(0,"div",8)(1,"div",30)(2,"h5"),e._uU(3,"Choose Columns"),e.qZA()(),e.YNc(4,ks,4,4,"div",31),e.YNc(5,Ds,3,0,"div",32),e.YNc(6,Ls,3,0,"div",32),e.qZA()),2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.omnisendList),e.xp6(1),e.Q6J("ngIf",0===i.columnsList.length&&(null==i.omnisendList?null:i.omnisendList.length)>0),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&0==(null==i.omnisendList?null:i.omnisendList.length))}}function Os(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Ns(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Js(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"
1Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,Is,2,1,"ng-container",12),e.qZA(),e.YNc(11,Ss,2,0,"p",13),e.qZA()(),e.YNc(12,As,13,0,"div",14),e.YNc(13,Ms,7,3,"div",15),e.TgZ(14,"div",16)(15,"div",17)(16,"button",18),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(17,Os,1,0,"button",19),e.YNc(18,Ns,1,0,"button",20),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(1),e.Q6J("ngIf",i.iscolLoading),e.xp6(1),e.Q6J("ngIf",!i.iscolLoading),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function Qs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",40)(3,"h5"),e._UZ(4,"i",41),e.TgZ(5,"span",42),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",43),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",44),e._uU(9," Back to connection list"),e.qZA()()()()}}function Us(o,r){if(1&o&&(e.TgZ(0,"alert",45),e._UZ(1,"span",46),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Bs=function(o){return{hide:o}};let Rs=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.backHome=new e.vpe,this.emailAddress="",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.iscolLoading=!0,this.omnisendList=[],this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData(),setTimeout(()=>{this.onGetcolumnsList()},1200)}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){const n=[...this.columnsList];if(n.includes(t)){const s=this.columnsList.indexOf(t);s>-1&&n.splice(s,1)}else n.push(t);this.columnsList=n}onGetcolumnsList(){this.iscolLoading=!0,this.loading.start(),this.integrationService.GetacceloColumn(this.constructor.name,_.e.systemIntegrationModule,{cred_name:this.data.cred_name,description:this.data.description,connector_type:this.data.connector_type,integration_cred:this.data.integration_cred},this.systemName).subscribe(n=>{if(200===n.status&&(this.iscolLoading=!1,this.loading.stop(),this.omnisendList=[],200===n.status)){let s=[];Object.keys(n.response).forEach(function(l){(null==n.response[l]||"object"!=typeof n.response[l])&&s.push(l)}),s.toString();for(const l of s)this.omnisendList.push(l)}},n=>{this.loading.stop(),this.iscolLoading=!1,this.isOpen=!0,this.alertMsg=n.error_description||n||n.response,this.alertType="danger"})}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-omnisend"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",data:"data"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[["appTheme","",1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;
1",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-5"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-grow","text-primary",2,"width","3rem","height","3rem"],[1,"sr-only"],["role","status",1,"spinner-grow","text-secondary",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-success",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-danger",2,"width","3rem","height","3rem"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,Js,19,7,"ng-container",1),e.YNc(2,Qs,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,Us,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Bs,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H,R.E]}),o})();function Es(o,r){if(1&o&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function js(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Es,2,2,"option",25),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function Hs(o,r){1&o&&(e.TgZ(0,"p",27),e._uU(1,"Email is Required"),e.qZA())}function Gs(o,r){1&o&&(e.TgZ(0,"p",27),e._uU(1,"Object is Required"),e.qZA())}function Ys(o,r){1&o&&(e.TgZ(0,"div",28)(1,"div",29)(2,"span",30),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"div",31)(5,"span",30),e._uU(6,"Loading..."),e.qZA()(),e.TgZ(7,"div",32)(8,"span",30),e._uU(9,"Loading..."),e.qZA()(),e.TgZ(10,"div",33)(11,"span",30),e._uU(12,"Loading..."),e.qZA()()())}const Ps=function(o){return{"p-button-text":o}};function Ks(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",37)(1,"button",38),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",39),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Ps,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function zs(o,r){1&o&&(e.TgZ(0,"div",40)(1,"p",41),e._uU(2," Choose minimum 1 column "),e.qZA()())}function Ws(o,r){if(1&o&&(e.TgZ(0,"div",40)(1,"p",41),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(2),e.hij("Unable to populate columns. Please make sure you have atleast one record in Zendesk ",i.sales_object,"")}}function Vs(o,r){if(1&o&&(e.TgZ(0,"div",8)(1,"div",34)(2,"h5"),e._uU(3,"Choose Columns"),e.qZA()(),e.YNc(4,Ks,4,4,"div",35),e.YNc(5,zs,3,0,"div",36),e.YNc(6,Ws,3,1,"div",36),e.qZA()),2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.zendesk),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&(null==i.zendesk?null:i.zendesk.length)>0),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&0==(null==i.zendesk?null:i.zendesk.length))}}function $s(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",42),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function Xs(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function er(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"
1Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,js,2,1,"ng-container",12),e.qZA(),e.YNc(11,Hs,2,0,"p",13),e.qZA(),e.TgZ(12,"div",9)(13,"label",14),e._uU(14,"Object"),e.qZA(),e.TgZ(15,"select",15),e.NdJ("change",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onGetcolumnsList())})("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.sales_object=n)}),e.ynx(16),e.TgZ(17,"option",16),e._uU(18,"Leads"),e.qZA(),e.TgZ(19,"option",17),e._uU(20,"Contacts"),e.qZA(),e.BQk(),e.qZA(),e.YNc(21,Gs,2,0,"p",13),e.qZA()(),e.YNc(22,Ys,13,0,"div",18),e.YNc(23,Vs,7,3,"div",19),e.TgZ(24,"div",20)(25,"div",21)(26,"button",22),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(27,$s,1,0,"button",23),e.YNc(28,Xs,1,0,"button",24),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(4),e.Q6J("ngModel",i.sales_object),e.xp6(6),e.Q6J("ngIf",""===i.sales_object),e.xp6(1),e.Q6J("ngIf",i.iscolLoading),e.xp6(1),e.Q6J("ngIf",!i.iscolLoading),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function tr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",44)(3,"h5"),e._UZ(4,"i",45),e.TgZ(5,"span",46),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",47),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",48),e._uU(9," Back to connection list"),e.qZA()()()()}}function ir(o,r){if(1&o&&(e.TgZ(0,"alert",49),e._UZ(1,"span",50),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const nr=function(o){return{hide:o}};let or=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.zendesk=[],this.backHome=new e.vpe,this.emailAddress="",this.sales_object="leads",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.dummycolumnsList=[],this.iscolLoading=!0,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData(),setTimeout(()=>{this.onGetcolumnsList()},1200)}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&"object"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"object"===n.field&&(this.sales_object=n.value_1,this.objectname=n.value_1),"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onGetcolumnsList(){this.iscolLoading=!0,this.loading.start(),this.integrationService.GetsalesforceColumn(this.constructor.name,_.e.systemIntegrationModule,{cred_name:this.data.cred_name,description:this.data.description,connector_type:this.data.connector_type,integration_cred:this.data.integration_cred},this.systemName,this.sales_object).subscribe(n=>{if(200===n.status){if(this.iscolLoading=!1,this.loading.stop(),this.zendesk=[],this.dummycolumnsList=[],this.columnsList=[],this.isUpdate=!0,n.response.length>0){let s=[];
1Object.keys(n.response[0].data).forEach(function(l){(null==n.response[0].data[l]||"object"!=typeof n.response[0].data[l])&&s.push(l)}),s.toString();for(const l of s)this.zendesk.push(l)}this.objectname===this.sales_object?this.onGetSavedData():(this.dummycolumnsList=[],this.columnsList=[])}},n=>{this.loading.stop(),this.iscolLoading=!1,this.isOpen=!0,this.alertMsg=n.error_description||n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){if(this.dummycolumnsList=[...this.columnsList],this.dummycolumnsList.includes(t)){const n=this.columnsList.indexOf(t);n>-1&&this.dummycolumnsList.splice(n,1)}else this.dummycolumnsList.push(t);this.columnsList=this.dummycolumnsList}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-zendesk-sell"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",data:"data"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[[1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-6"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],["for","exampleFormControlSelect2"],["id","exampleFormControlSelect2",1,"form-control",3,"ngModel","change","ngModelChange"],["value","leads"],["value","contacts"],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-grow","text-primary",2,"width","3rem","height","3rem"],[1,"sr-only"],["role","status",1,"spinner-grow","text-secondary",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-success",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-danger",2,"width","3rem","height","3rem"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,er,29,9,"ng-container",1),e.YNc(2,tr,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,ir,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,nr,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H]}),o})();function sr(o,r){if(1&o&&(e.TgZ(0,"option",25),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit;e.Q6J("value",i.indexCount),e.xp6(1),e.hij("form.",i.controllabel,"")}}function rr(o,r){if(1&o&&(e.ynx(0),e.YNc(1,sr,2,2,"option",24),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","email"===i.controlId)}}function lr(o,r){1&o&&(e.TgZ(0,"p",26),e._uU(1,"Email is Required"),e.qZA())}function ar(o,r){1&o&&(e.TgZ(0,"p",26),e._uU(1,"Object is Required"),e.qZA())}function cr(o,r){1&o&&(e.TgZ(0,"div",27)(1,"div",28)(2,"span",29),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"div",30)(5,"span",29),e._uU(6,"Loading..."),e.qZA()(),e.TgZ(7,"div",31)(8,"span",29),e._uU(9,"Loading..."),e.qZA()(),e.TgZ(10,"div",32)(11,"span",29),e._uU(12,"Loading..."),e.qZA()()())}const dr=function(o){return{"p-button-text":o}};function pr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",36)(1,"button",37),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectColumn(s))}),e.TgZ(2,"span",38),e._uU(3),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.VKq(2,dr,!t.columnsList.includes(i))),e.xp6(2),e.hij(" ",i.replaceAll("_"," "),"")}}function ur(o,r){1&o&&(e.TgZ(0,"div",39)(1,"p",40),e._uU(2," Choose minimum 1 column "),e.qZA()())}function mr(o,r){if(1&o&&(e.TgZ(0,"div",39)(1,"p",40),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(2),e.hij("Unable to populate columns. Please make sure you have atleast one record 
1in Zendesk Support ",i.sales_object,"")}}function _r(o,r){if(1&o&&(e.TgZ(0,"div",8)(1,"div",33)(2,"h5"),e._uU(3,"Choose Columns"),e.qZA()(),e.YNc(4,pr,4,4,"div",34),e.YNc(5,ur,3,0,"div",35),e.YNc(6,mr,3,1,"div",35),e.qZA()),2&o){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.zendesk),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&(null==i.zendesk?null:i.zendesk.length)>0),e.xp6(1),e.Q6J("ngIf",0===(null==i.columnsList?null:i.columnsList.length)&&0==(null==i.zendesk?null:i.zendesk.length))}}function gr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",41),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function hr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",42),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmit())}),e.qZA()}}function fr(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",5)(2,"a",6),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.backHome.emit(!0))}),e._UZ(3,"i",7),e._uU(4," GoBack"),e.qZA(),e.TgZ(5,"div",8)(6,"div",9)(7,"label",10),e._uU(8,"Email Address"),e.qZA(),e.TgZ(9,"select",11),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.emailAddress=n)}),e.YNc(10,rr,2,1,"ng-container",12),e.qZA(),e.YNc(11,lr,2,0,"p",13),e.qZA(),e.TgZ(12,"div",9)(13,"label",14),e._uU(14,"Object"),e.qZA(),e.TgZ(15,"select",15),e.NdJ("change",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onGetcolumnsList())})("ngModelChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.sales_object=n)}),e.ynx(16),e.TgZ(17,"option",16),e._uU(18,"Users"),e.qZA(),e.BQk(),e.qZA(),e.YNc(19,ar,2,0,"p",13),e.qZA()(),e.YNc(20,cr,13,0,"div",17),e.YNc(21,_r,7,3,"div",18),e.TgZ(22,"div",19)(23,"div",20)(24,"button",21),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e.qZA(),e.YNc(25,gr,1,0,"button",22),e.YNc(26,hr,1,0,"button",23),e.qZA()()(),e.BQk()}if(2&o){const i=e.oxw();e.xp6(9),e.Q6J("ngModel",i.emailAddress),e.xp6(1),e.Q6J("ngForOf",i.formObject.request_form[0]),e.xp6(1),e.Q6J("ngIf",""===i.emailAddress),e.xp6(4),e.Q6J("ngModel",i.sales_object),e.xp6(4),e.Q6J("ngIf",""===i.sales_object),e.xp6(1),e.Q6J("ngIf",i.iscolLoading),e.xp6(1),e.Q6J("ngIf",!i.iscolLoading),e.xp6(4),e.Q6J("ngIf",!i.isUpdate),e.xp6(1),e.Q6J("ngIf",i.isUpdate)}}function br(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",5)(1,"div",8)(2,"div",43)(3,"h5"),e._UZ(4,"i",44),e.TgZ(5,"span",45),e._uU(6," The Connection Configuration Successfully Saved "),e.qZA()(),e.TgZ(7,"button",46),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onConnectionListPage())}),e._UZ(8,"i",47),e._uU(9," Back to connection list"),e.qZA()()()()}}function xr(o,r){if(1&o&&(e.TgZ(0,"alert",48),e._UZ(1,"span",49),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Cr=function(o){return{hide:o}};let vr=(()=>{const r=class{constructor(t,n,s,l){this.cd=t,this.integrationService=n,this.activatedRoutes=s,this.loading=l,this.zendesk=[],this.backHome=new e.vpe,this.emailAddress="",this.sales_object="users",this.pageStep=1,this.orgID=null,this.isOpen=!1,this.columnsList=[],this.isUpdate=!1,this.dummycolumnsList=[],this.iscolLoading=!0,this.updateData=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSavedData(),setTimeout(()=>{this.onGetcolumnsList()},1200)}onGetSavedData(){this.integrationService.GetQueryBuilderData(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.connectionId,this.formID).subscribe(t=>{if(200===t.status&&t.response.length>0){let n;this.isUpdate=!0,this.updateData=t.response;for(const s of this.updateData)"columns"!==s.field&&"object"!==s.field&&s.hasOwnProperty("value_1")&&!s.value_1.includes("_Index")&&(n=s.value_1+"_Index",s.value_1=n);this.onSetSaveValue(this.updateData)}})}onSetSaveValue(t){for(const n of t)"object"===n.field&&(this.sales_object=n.value_1,this.objectname=n.value_1),"email"===n.field&&(this.emailAddress=n.value_1),"columns"===n.field&&(this.columnsList=JSON.parse(n.value_1))}ngOnChanges(t){this.formObject=t.formObject.currentValue,this.cd.detectChanges()}onUpdate(){(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];this.loading.start(),this.integrationService.updateQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Update",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onGetcolumnsList(){this.iscolLoading=!0,this.loading.start(),this.integrationService.GetsalesforceColumn(this.constructor.name,_.e.systemIntegrationModule,{cred_name:this.data.cred_name,description:this.data.description,connector_type:this.data.connector_type,integration_cred:this.data.integration_cred},this.systemName,this.sales_object).subscribe(n=>{if(200===n.status){if(this.iscolLoading=!1,this.loading.stop(),this.zendesk=[],this.dummycolumnsList=[],this.columnsList=[],this.isUpdate=!0,n.response.length>0){let s=[];
1Object.keys(n.response[0]).forEach(function(l){(null==n.response[0][l]||"object"!=typeof n.response[0][l])&&s.push(l)}),s.toString();for(const l of s)this.zendesk.push(l)}this.objectname===this.sales_object?this.onGetSavedData():(this.dummycolumnsList=[],this.columnsList=[])}},n=>{this.loading.stop(),this.iscolLoading=!1,this.isOpen=!0,this.alertMsg=n.error_description||n,this.alertType="danger"})}onSubmit(){if(!this.emailAddress||0===this.columnsList.length)return!1;(this.emailAddress.includes("_Index")||this.emailAddress.includes("_index"))&&(this.emailAddress=this.emailAddress.slice(0,this.emailAddress.length-6));const t=[{field:"columns",system_name:this.systemName,value_1:JSON.stringify(this.columnsList)},{field:"email",value_1:this.emailAddress,system_name:this.systemName},{field:"object",value_1:this.sales_object,system_name:this.systemName}];if(this.isUpdate)return this.onUpdate(),!1;this.loading.start(),this.integrationService.saveQueryBuilder(this.constructor.name,_.e.systemIntegrationModule,t,this.orgID,this.connectionId,this.formID).subscribe(n=>{this.loading.stop(),201===n.status&&(this.isOpen=!0,this.alertMsg="Record Saved",this.alertType="info",this.pageStep=2)},n=>{this.loading.stop(),this.isOpen=!0,this.alertMsg=n,this.alertType="danger"})}onConnectionListPage(){this.backHome.emit(!0)}onSelectColumn(t){if(this.dummycolumnsList=[...this.columnsList],this.dummycolumnsList.includes(t)){const n=this.columnsList.indexOf(t);n>-1&&this.dummycolumnsList.splice(n,1)}else this.dummycolumnsList.push(t);this.columnsList=this.dummycolumnsList}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(e.sBO),e.Y36(D._),e.Y36(I.gz),e.Y36(k.LA))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-zendesk-support"]],inputs:{formObject:"formObject",formID:"formID",connectionId:"connectionId",systemName:"systemName",data:"data"},outputs:{backHome:"backHome"},features:[e.TTD],decls:5,vars:6,consts:[[1,"card"],[4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type",4,"ngIf"],[1,"card-body"],["href","javascript:;",1,"back-to-list-btn","mb-2",3,"click"],[1,"fas","fa-chevron-left"],[1,"row"],[1,"form-group","col-md-6"],["for","exampleFormControlSelect1"],["id","exampleFormControlSelect1",1,"form-control",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["class","mt-3 text-danger",4,"ngIf"],["for","exampleFormControlSelect2"],["id","exampleFormControlSelect2",1,"form-control",3,"ngModel","change","ngModelChange"],["value","users"],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mt-4","mb-5","margin-auto"],[1,"text-center","margin-auto"],["pButton","","pRipple","","type","button","label","Cancel",1,"p-button-secondary","mr-3",3,"click"],["pButton","","pRipple","","type","button","label","Save",3,"click",4,"ngIf"],["pButton","","pRipple","","type","button","label","Update",3,"click",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value"],[1,"mt-3","text-danger"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-grow","text-primary",2,"width","3rem","height","3rem"],[1,"sr-only"],["role","status",1,"spinner-grow","text-secondary",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-success",2,"width","3rem","height","3rem"],["role","status",1,"spinner-grow","text-danger",2,"width","3rem","height","3rem"],[1,"col-md-12","mb-3"],["class","col-md-2 mb-3",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[1,"col-md-2","mb-3"],["pButton","","pRipple","","type","button",1,"p-button-raised",3,"ngClass","click"],[1,"text-over"],[1,"col-md-12"],[1,"text-danger","tx-bold"],["pButton","","pRipple","","type","button","label","Save",3,"click"],["pButton","","pRipple","","type","button","label","Update",3,"click"],[1,"col-md-12","mt-5","text-center","mb-5"],[1,"fas","fa-check-circle","tx-success","mr-2",2,"font-size","40px"],[2,"vertical-align","super"],["type","button",1,"btn","btn-link",3,"click"],[1,"fas","fa-chevron-left","mr-2"],["dismissOnTimeout","5000",3,"type"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,fr,27,9,"ng-container",1),e.YNc(2,br,10,0,"div",2),e.qZA(),e.TgZ(3,"div",3),e.YNc(4,xr,2,2,"alert",4),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",1===s.pageStep),e.xp6(1),e.Q6J("ngIf",2===s.pageStep),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Cr,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c.YN,c.Kr,c.EJ,c.JJ,c.On,h.mk,h.sg,h.O5,O.wx,L.mh,N.Hq,J.H]}),o})();const yr=["mailChimpConnection"],Tr=["salesforceConnection"],wr=["zendeskConnection"],Zr=["zendeskSupportConnection"];function Fr(o,r){1&o&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"ID"),e.qZA(),e.TgZ(3,"th",20),e._uU(4,"Connection Name "),e._UZ(5,"p-sortIcon",21),e.qZA(),e.TgZ(6,"th",22),e._uU(7,"Description "),e._UZ(8,"p-sortIcon",23),e.qZA(),e.TgZ(9,"th",24),e._uU(10,"Connector Type "),e._UZ(11,"p-sortIcon",25),e.qZA(),e.TgZ(12,"th",26),e._uU(13,"System Name "),e._UZ(14,"p-sortIcon",27),e.qZA(),e.TgZ(15,"th",28),e._uU(16,"Created "),e._UZ(17,"p-sortIcon",29),e.qZA(),e.TgZ(18,"th"),e._uU(19,"Configured"),e.qZA(),e.TgZ(20,"th"),e._uU(21,"Test Connection"),e.qZA()())}function Ir(o,r){1&o&&(e.TgZ(0,"h4",36),e._UZ(1,"i",37),e.qZA())}function Sr(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"div",38),e._uU(2," Testing... "),e.qZA())}function Ar(o,r){1&o&&(e._UZ(0,"i",39),e._uU(1," Test "))}function qr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"tr",30)(1,"td",31),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onSelectConnection(s))}),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e.YNc(15,Ir,2,0,"h4",32),e.qZA(),e.TgZ(16,"td")(17,"button",33),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(2);return e.KtG(l.onTestConnection(s,s.system_id))}),e.YNc(18,Sr,3,0,"span",34),e.YNc(19,Ar,2,0,"ng-template",null,35,e.W1O),e.qZA()()()}if(2&o){const i=r.$implicit,t=e.MAs(20),n=e.oxw(2);e.xp6(2),e.Oqu(i.id),e.xp6(2),e.Oqu(i.cred_name),e.xp6(2),e.Oqu(i.description),e.xp6(2),e.Oqu(i.connector_type),e.xp6(2),e.Oqu(n.onFindSystemName(i.system_id)),e.xp6(2),e.Oqu(e.l
1cZ(13,9,i.created_at)),e.xp6(3),e.Q6J("ngIf",n.configuredConnectionID.includes(i.id)),e.xp6(3),e.Q6J("ngIf",n.isTesting&&n.currentScanId===i.id)("ngIfElse",t)}}const kr=function(){return{width:"100%"}};function Dr(o,r){1&o&&(e.TgZ(0,"td"),e._UZ(1,"div",41)(2,"p-skeleton",42),e.qZA()),2&o&&(e.xp6(2),e.Q6J("ngStyle",e.DdM(1,kr)))}function Lr(o,r){if(1&o&&(e.TgZ(0,"tr",30),e.YNc(1,Dr,3,2,"td",40),e.qZA()),2&o){const i=r.columns;e.xp6(1),e.Q6J("ngForOf",i)}}function Mr(o,r){1&o&&(e.TgZ(0,"tr")(1,"td",43)(2,"div",44),e._UZ(3,"i",45),e._uU(4," No Connection Available "),e.qZA()()())}const Or=function(){return[10,20,30]};function Nr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",10)(1,"div",11)(2,"h4",12),e._uU(3,"Choose Connection"),e.qZA(),e.TgZ(4,"button",13),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(),s=e.MAs(17);return e.KtG(n.openModal(s))}),e._UZ(5,"i",14),e._uU(6," Create Connection"),e.qZA()(),e.TgZ(7,"div")(8,"p-table",15),e.NdJ("onLazyLoad",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.loadSystemIntegrationData(n))}),e._uU(9,"> "),e.YNc(10,Fr,22,0,"ng-template",16),e.YNc(11,qr,21,11,"ng-template",17),e.YNc(12,Lr,2,1,"ng-template",18),e.YNc(13,Mr,5,0,"ng-template",19),e.qZA()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("value",i.credList)("lazy",!0)("responsive",!0)("loading",i.loadingcredlist)("totalRecords",i.credCount)("resizableColumns",!0)("rowsPerPageOptions",e.DdM(11,Or))("filterDelay",0)("paginator",!0)("rows",10)("showCurrentPageReport",!0)}}function Jr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-sql-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Qr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-sql-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Ur(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-mailchimp-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Br(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-http-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Rr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-active-campaign",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Er(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-send-in-blue",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function jr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-send-grid",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Hr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-moosend",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Gr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-hubspot-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Yr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-shopify-query-builder",46),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Pr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-salesforce",47),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("data",i.data)("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Kr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-accelo",47),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("data",i.data)("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function zr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-omnisend",47),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("data",i.data)("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Wr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-zendesk-sell",47),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("data",i.data)("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function Vr(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"app-zendesk-support",47),e.NdJ("backHome",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onHome(n))}),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("data",i.data)("formObject",i.formObject)("formID",i.formID)("connectionId",i.connectionID)("systemName",i.systemName)}}function $r(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",60),e.qZA())}function Xr(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",61),e.qZA())}function el(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",62),e.qZA())}function tl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",63),e.qZA())}function il(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",64),e.qZA())}function nl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",65),e.qZA())}function ol(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",66),e.qZA())}function sl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",67),e.qZA())}function rl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",68),e.qZA())}function ll(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",69),e.qZA())}function al(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",70),e.qZA())}function cl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",71),e.qZA())}function dl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",72),e.qZA())}function pl(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",73),e.qZA())}function ul(o,r){1&o&&(e.TgZ(0,"span"),e._UZ(1,"img",74),e.qZA())}function ml(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",58)(2,"a",59),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(3);return e.KtG(l.onSelectSystem(s,2))}),e.YNc(3,$r,2,0,"span",54),e.YNc(4,Xr,2,0,"span",54),e.YNc(5,el,2,0,"span",54),e.YNc(6,tl,2,0,"span",54),e.YNc(7,il,2,0,"span",54),e.YNc(8,nl,2,0,"span",54),e.YNc(9,ol,2,0,"span",54),e.YNc(10,sl,2,0,"span",54),e.YNc(11,rl,2,0,"span",54),e.YNc(12,ll,2,0,"span",54),e.YNc(13,al,2,0,"span",54),e.YNc(14,cl,2,0,"span",54),e.YNc(15,dl,2,0,"span",54),e.YNc(16,pl,2,0,"span",54),e.YNc(17,ul,2,0,"span",54),e.qZA()(),e.BQk()}if(2&o){const i=r.$implicit;e.xp6(3),e.Q6J("ngIf","mysql"===i.name),e.xp6(1),e.Q6J("ngIf","mailchimp"===i.name),e.xp6(1),e.Q6J("ngIf","postgresql"===i.name),e.xp6(1),e.Q6J("ngIf","http"===i.name),e.xp6(1),e.Q6J("ngIf","activecampaign"===i.name),e.xp6(1),e.Q6J("ngIf","sendinblue"===i.name),e.xp6(1),e.Q6J("ngIf","sendgrid"===i.name),e.xp6(1),e.Q6J("ngIf","moosend"===i.name),e.xp6(1),e.Q6J("ngIf","hubspot"===i.name),e.xp6(1),e.Q6J("ngIf","shopify"===i.name),e.xp6(1),e.Q6J("ngIf","salesforce"===i.name),e.xp6(1),e.Q6J("ngIf","accelo"===i.name),e.xp6(1),e.Q6J("ngIf","omnisend"===i.name),e.xp6(1),e.Q6J("ngIf","zendesk"===i.name),e.xp6(1),e.Q6J("ngIf","zendesk_supp
1ort"===i.name)}}function _l(o,r){if(1&o&&(e.TgZ(0,"div",55)(1,"div",56)(2,"div",57),e.YNc(3,ml,18,15,"ng-container",40),e.qZA()()()),2&o){const i=e.oxw(2);e.xp6(3),e.Q6J("ngForOf",i.systemList)}}function gl(o,r){if(1&o){const i=e.EpF();e.ynx(0),e.TgZ(1,"h6")(2,"span",75),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.step=1)}),e._UZ(3,"i",76),e._uU(4," Back To System "),e.qZA()(),e.TgZ(5,"app-mysql-form",77),e.NdJ("refreshConnectionList",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onRefreshList())})("close",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.modalRef.hide())}),e.qZA(),e.BQk()}if(2&o){const i=e.oxw(2);e.xp6(5),e.Q6J("systemID",i.currentSystem.id)("systemName",i.currentSystem.name)}}function hl(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",48)(1,"h4",49),e._uU(2,"Create Connection"),e.qZA(),e.TgZ(3,"button",50),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.modalRef.hide())}),e.TgZ(4,"span",51),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",52),e.YNc(7,_l,4,1,"div",53),e.YNc(8,gl,6,2,"ng-container",54),e.qZA()}if(2&o){const i=e.oxw();e.xp6(7),e.Q6J("ngIf",1===i.step),e.xp6(1),e.Q6J("ngIf",2===i.step)}}function fl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email Address is Required"),e.qZA())}function bl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email must be a valid email address"),e.qZA())}function xl(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,fl,2,0,"div",54),e.YNc(2,bl,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.f.email.errors.required),e.xp6(1),e.Q6J("ngIf",i.f.email.errors.email)}}const $=function(o){return{"is-invalid":o}};function Cl(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",48)(1,"h4",49),e._uU(2,"Test Connection"),e.qZA(),e.TgZ(3,"button",50),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestEmailForm())}),e.TgZ(4,"span",51),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",52)(7,"form",78),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onTestMailChimp())}),e.TgZ(8,"div",79)(9,"label",80),e._uU(10,"Email address"),e.qZA(),e._UZ(11,"input",81),e.YNc(12,xl,3,2,"div",82),e._UZ(13,"div",83),e.qZA(),e.TgZ(14,"div",84)(15,"button",85),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestEmailForm())}),e._uU(16,"Cancel"),e.qZA(),e.TgZ(17,"button",86),e._uU(18,"Submit"),e.qZA()()()()}if(2&o){const i=e.oxw();e.xp6(7),e.Q6J("formGroup",i.mailChimpForm),e.xp6(4),e.Q6J("ngClass",e.VKq(4,$,i.submitted&&i.f.email.errors)),e.xp6(1),e.Q6J("ngIf",i.submitted&&i.f.email.errors),e.xp6(1),e.Q6J("innerHTML",i.errorMessage,e.oJD)}}function vl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email Address is Required"),e.qZA())}function yl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email must be a valid email address"),e.qZA())}function Tl(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,vl,2,0,"div",54),e.YNc(2,yl,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.email.errors.required),e.xp6(1),e.Q6J("ngIf",i.t.email.errors.email)}}function wl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Object is Required"),e.qZA())}function Zl(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,wl,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.sales_object.errors.required)}}function Fl(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",48)(1,"h4",49),e._uU(2,"Test Connection"),e.qZA(),e.TgZ(3,"button",50),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e.TgZ(4,"span",51),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",52)(7,"form",78),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onTestMailSalesforce())}),e.TgZ(8,"div",79)(9,"label",80),e._uU(10,"Email address"),e.qZA(),e._UZ(11,"input",81),e.YNc(12,Tl,3,2,"div",82),e.qZA(),e.TgZ(13,"div",79)(14,"label",80),e._uU(15,"Object"),e.qZA(),e.TgZ(16,"select",88),e.ynx(17),e.TgZ(18,"option",89),e._uU(19,"Lead"),e.qZA(),e.TgZ(20,"option",90),e._uU(21,"Contact"),e.qZA(),e.BQk(),e.qZA(),e.YNc(22,Zl,2,1,"div",82),e._UZ(23,"div",83),e.qZA(),e.TgZ(24,"div",84)(25,"button",85),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e._uU(26,"Cancel"),e.qZA(),e.TgZ(27,"button",86),e._uU(28,"Submit"),e.qZA()()()()}if(2&o){const i=e.oxw();e.xp6(7),e.Q6J("formGroup",i.SalesForceForm),e.xp6(4),e.Q6J("ngClass",e.VKq(6,$,i.submitted&&i.t.email.errors)),e.xp6(1),e.Q6J("ngIf",i.submitted&&i.t.email.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(8,$,i.submitted&&i.t.sales_object.errors)),e.xp6(6),e.Q6J("ngIf",i.submitted&&i.t.sales_object.errors),e.xp6(1),e.Q6J("innerHTML",i.errorMessage,e.oJD)}}function Il(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email Address is Required"),e.qZA())}function Sl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email must be a valid email address"),e.qZA())}function Al(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,Il,2,0,"div",54),e.YNc(2,Sl,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.email.errors.required),e.xp6(1),e.Q6J("ngIf",i.t.email.errors.email)}}function ql(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Object is Required"),e.qZA())}function kl(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,ql,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.sales_object.errors.required)}}function Dl(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",48)(1,"h4",49),e._uU(2,"Test Connection"),e.qZA(),e.TgZ(3,"button",50),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e.TgZ(4,"span",51),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",52)(7,"form",78),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onTestMailSalesforce())}),e.TgZ(8,"div",79)(9,"label",80),e._uU(10,"Email address"),e.qZA(),e._UZ(11,"input",81),e.YNc(12,Al,3,2,"div",82),e.qZA(),e.TgZ(13,"div",79)(14,"label",80),e._uU(15,"Object"),e.qZA(),e.TgZ(16,"select",88),e.ynx(17),e.TgZ(18,"option",91),e._uU(19,"Users"),e.qZA(),e.BQk(),e.qZA(),e.YNc(20,kl,2,1,"div",82),e._UZ(21,"div",83),e.qZA(),e.TgZ(22,"div",92)(23,"button",85),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e._uU(24,"Cancel"),e.qZA(),e.TgZ(25,"button",86),e._uU(26,"Submit"),e.qZA()()()()}if(2&o){const i=e.oxw();e.xp6(7),e.Q6J("formGroup",i.SalesForceForm),e.xp6(4),e.Q6J("ngClass",e.VKq(6,$,i.submitted&&i.t.email.errors)),e.xp6(1),e.Q6J("ngIf",i.submitted&&i.t.email.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(8,$,i.submitted&&i.t.sales_object.errors)),e.xp6(4),e.Q6J("ngIf",i.submitted&&i.t.sales_object.errors),e.xp6(1),e.Q6J("innerHTML",i.errorMessage,e.oJD)}}function Ll(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email Address is Required"),e.qZA())}function Ml(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Email must be a valid email address"),e.qZA())}function Ol(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,Ll,2,0,"div",54),e.YNc(2,Ml,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.email.errors.required),e.xp6(1),e.Q6J("ngIf",i.t.email.errors.email)}}function Nl(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Object is Required"),e.qZA())}function Jl(o,r){if(1&o&&(e.TgZ(0,"div",87),e.YNc(1,Nl,2,0,"div",54),e.qZA()),2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.t.sales_object.errors.required)}}function Ql(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",48)(1,"h4",49),e._uU(2,"Test Connection"),e.qZA(),e.TgZ(3,"button",50),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e.TgZ(4,"span",51),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",52)(7,"form",78),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onTestMailSalesforce())}),e.TgZ(8,"div",79)(9,"label",80),e._uU(10,"Email address"),e.qZA(),e._UZ(11,"input",81),e.YNc(12,Ol,3,2,"div",82),e.qZA(),e.TgZ(13,"div",79)(14,"label",80),e._uU(15,"Object"),e.qZA(),e.TgZ(16,"select",88),e.ynx(17),e.TgZ(18,"option",93),e._uU(19,"Leads"),e.qZA(),e.TgZ(20,"option",94),e._uU(21,"Contacts"),e.qZA(),e.BQk(),e.qZA(),e.YNc(22,Jl,2,1,"div",82),e._UZ(23,"div",83),e.qZA(),e.TgZ(24,"div",92)(25,"button",85),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onResetTestSalesforceForm())}),e._uU(26,"Cancel"),e.qZA(),e.TgZ(27,"button",86),e._uU(28,"Submit"),e.qZA()()()()}if(2&o){const i=e.oxw();e.xp6(7),e.Q6J("formGroup",i.SalesForceForm),e.xp6(4),e.Q6J("ngClass",e.VKq(6,$,i.submitted&&i.t.email.errors)),e.xp6(1),e.Q6J("ngIf",i.submitted&&i.t.email.errors),e.xp6(4),e.Q6J("ngClass",e.VKq(8,$,i.submitted&&i.t.sales_object.errors)),e.xp6(6),e.Q6J("ngIf",i.submitted&&i.t.sales_object.errors),e.xp6(1),e.Q6J("innerHTML",i.errorMessage,e.oJD)}}
1function Ul(o,r){if(1&o&&(e.TgZ(0,"alert",95),e._UZ(1,"span",96),e.qZA()),2&o){const i=e.oxw();e.Q6J("type",i.alertType)("dismissible",i.dismissible),e.xp6(1),e.Q6J("innerHTML",i.alertMsg,e.oJD)}}const Bl=function(o){return{hide:o}};let Rl=(()=>{const r=class{constructor(t,n,s,l,a,d){this.systemIntegrationService=t,this.loading=n,this.formBuilder=s,this.modalService=l,this.activatedRoutes=a,this.cd=d,this.eventRows=10,this.credList=[],this.firstone=1,this.currentScanId=null,this.dismissible=!0,this.isOpen=!1,this.step=1,this.isTesting=!1,this.connectionID=null,this.tableListKey="",this.errorMessage="",this.tableList=[],this.systemName="",this.currentSystem={id:null,name:null},this.query={condition:"and",rules:[]},this.systemList=[],this.config={fields:{}},this.orgID=null,this.mailChimpData={},this.SalesForcedata={},this.credCount=0,this.skLoading=!1,this.skLoadingArray=[1,2,3,4,5,6,7,8,9],this.submitted=!1,this.configuredConnectionID=[],this.loadingcredlist=!1,this.data=[]}ngOnInit(){this.activatedRoutes.queryParams.subscribe(t=>{this.orgID=t.oid}),this.onGetSystemList(),this.onGetCredList(),this.onGetConnectionID(),this.mailChimpForm=this.formBuilder.group({email:["",c.kI.required]}),this.SalesForceForm=this.formBuilder.group({email:["",c.kI.required],sales_object:["",c.kI.required]})}ngOnChanges(t){}get f(){return this.mailChimpForm.controls}get t(){return this.SalesForceForm.controls}onGetSystemList(){this.systemIntegrationService.GetSystemList(this.constructor.name,_.e.systemIntegrationModule).subscribe(t=>{this.systemList=t.response},t=>{})}onGetConnectionID(){this.skLoading=!0,this.systemIntegrationService.GetConnectionID(this.constructor.name,_.e.systemIntegrationModule,this.orgID,this.formID).subscribe(n=>{if(this.skLoading=!1,200===n.status){const s=[...this.configuredConnectionID];for(const l of n.response)s.push(l.connection_id);this.configuredConnectionID=s}},n=>{this.isOpen=!0,this.alertMsg=n,this.alertType="error",this.skLoading=!1})}onGetCredList(){const t={limit:this.eventRows,page:this.firstone};this.skLoading=!0,this.loadingcredlist=!0,this.systemIntegrationService.GetCredListByCompany(this.constructor.name,_.e.systemIntegrationModule,t).subscribe(n=>{this.skLoading=!1,this.credList=(0,te.cn)(this.lazyEvents,n.response),this.loadingcredlist=!1,this.credCount=n.count,this.cd.detectChanges()},n=>{this.isOpen=!0,this.alertMsg=n,this.alertType="error",this.skLoading=!1,this.loadingcredlist=!1})}openModal(t){this.modalRef=this.modalService.show(t,{class:"modal-lg",ignoreBackdropClick:!0})}loadSystemIntegrationData(t){this.lazyEvents=t,this.eventRows=t.rows,this.firstone=0===t.first?1:t.first/t.rows+1,this.onGetCredList()}onTestConnectionSql(t,n){this.currentScanId=t.id;const s=[];for(const d of t.integration_cred)s.push({key:d.key,secret_1:d.secret_1});const l={cred_name:t.cred_name,description:t.description,connector_type:t.connector_type,integration_cred:s};this.loading.start();const a={system:this.onFindSystemName(t.system_id)};this.isTesting=!0,this.isOpen=!1,this.alertMsg="",this.alertType="",this.systemIntegrationService.TestSystemIntegration(this.constructor.name,_.e.systemIntegrationModule,t.system_id,l,a).subscribe(d=>{this.step=2,this.connectionID=t.id,this.systemName=n,this.isTesting=!1,this.isOpen=!0,this.alertMsg=d.message,this.alertType="success",this.loading.stop()},d=>{this.isTesting=!1,this.isOpen=!0,this.alertMsg=d,this.alertType="danger",this.loading.stop()})}onTestConnection(t,n){if("mailchimp"===this.onFindSystemName(n)||"activecampaign"===this.onFindSystemName(n)||"sendinblue"===this.onFindSystemName(n)||"moosend"===this.onFindSystemName(n)||"hubspot"===this.onFindSystemName(n)||"sendgrid"===this.onFindSystemName(n)||"accelo"===this.onFindSystemName(n)||"omnisend"===this.onFindSystemName(n))return this.mailChimpData=t,this.mailChimpForm.reset(),this.openModal(this.mailChimpConnection),!1;if("salesforce"===this.onFindSystemName(n))return this.SalesForcedata=t,this.SalesForceForm.reset(),this.openModal(this.salesforceConnection),!1;if("zendesk"===this.onFindSystemName(n))return this.SalesForcedata=t,this.SalesForceForm.reset(),this.openModal(this.zendeskConnection),!1;
1if("zendesk_support"===this.onFindSystemName(n))return this.SalesForcedata=t,this.SalesForceForm.reset(),this.openModal(this.zendeskSupportConnection),!1;this.currentScanId=t.id;const s=[];for(const d of t.integration_cred)s.push({key:d.key,secret_1:d.secret_1});const l={cred_name:t.cred_name,description:t.description,connector_type:t.connector_type,integration_cred:s};this.loading.start();const a={system:this.onFindSystemName(t.system_id)};this.isTesting=!0,this.isOpen=!1,this.alertMsg="",this.alertType="",this.systemIntegrationService.TestSystemIntegration(this.constructor.name,_.e.systemIntegrationModule,t.system_id,l,a).subscribe(d=>{this.isTesting=!1,this.isOpen=!0,this.alertMsg=d.message,this.alertType="success",this.loading.stop()},d=>{this.isTesting=!1,this.isOpen=!0,this.alertMsg=d,this.alertType="danger",this.loading.stop()})}onRefreshList(){this.modalRef.hide(),this.onGetCredList()}onFindSystemName(t){let n="";for(const s of this.systemList)s.id===t&&(n=s.name);return n}onSelectConnection(t){const n=this.onFindSystemName(t.system_id);this.data=t,"mysql"===n||"postgresql"===n||"postgres"===n?this.onTestConnectionSql(t,n):(this.step=2,this.systemName=n,this.connectionID=t.id)}onHome(t){this.systemName="",this.onGetConnectionID()}onSelectSystem(t,n){this.currentSystem={id:t.id,name:t.name},this.step=n}onTestMailChimp(){if(this.submitted=!0,this.mailChimpForm.invalid)return;const t={...this.mailChimpData};this.currentScanId=t.id;const n=[];for(const a of t.integration_cred)n.push({key:a.key,secret_1:a.secret_1});const s={cred_name:t.cred_name,description:t.description,connector_type:t.connector_type,integration_cred:n};this.loading.start();const l={system:this.onFindSystemName(t.system_id),email:this.mailChimpForm.value.email};this.isTesting=!0,this.isOpen=!1,this.alertMsg="",this.alertType="",this.systemIntegrationService.TestSystemIntegration(this.constructor.name,_.e.systemIntegrationModule,t.system_id,s,l).subscribe(a=>{this.isTesting=!1,this.isOpen=!0,this.alertMsg=a.message,this.alertType="success",this.errorMessage="",this.loading.stop(),this.modalRef.hide(),this.mailChimpForm.reset()},a=>{this.isTesting=!1,this.errorMessage=a,this.loading.stop()})}onTestMailSalesforce(){if(this.submitted=!0,this.SalesForceForm.invali
1d)return;const t={...this.SalesForcedata};this.currentScanId=t.id;const n=[];for(const a of t.integration_cred)n.push({key:a.key,secret_1:a.secret_1});const s={cred_name:t.cred_name,description:t.description,connector_type:t.connector_type,integration_cred:n};this.loading.start();const l={system:this.onFindSystemName(t.system_id),email:this.SalesForceForm.value.email,object:this.SalesForceForm.value.sales_object};this.isTesting=!0,this.isOpen=!1,this.alertMsg="",this.alertType="",this.systemIntegrationService.TestSystemIntegration(this.constructor.name,_.e.systemIntegrationModule,t.system_id,s,l).subscribe(a=>{this.isTesting=!1,this.isOpen=!0,this.alertMsg=a.message,this.alertType="success",this.errorMessage="",this.loading.stop(),this.modalRef.hide(),this.SalesForceForm.reset()},a=>{this.isTesting=!1,this.errorMessage=a.error_description||a[0].message||a,this.loading.stop()})}onResetTestEmailForm(){this.modalRef.hide(),this.errorMessage="",this.mailChimpForm.reset()}onResetTestSalesforceForm(){this.modalRef.hide(),this.errorMessage="",this.SalesForceForm.reset()}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(D._),e.Y36(k.LA),e.Y36(c.QS),e.Y36(ae.tT),e.Y36(I.gz),e.Y36(e.sBO))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-dsar-system"]],viewQuery:function(n,s){if(1&n&&(e.Gf(yr,7),e.Gf(Tr,7),e.Gf(wr,7),e.Gf(Zr,7)),2&n){let l;e.iGM(l=e.CRH())&&(s.mailChimpConnection=l.first),e.iGM(l=e.CRH())&&(s.salesforceConnection=l.first),e.iGM(l=e.CRH())&&(s.zendeskConnection=l.first),e.iGM(l=e.CRH())&&(s.zendeskSupportConnection=l.first)}},inputs:{formObject:"formObject",formID:"formID"},features:[e.TTD],decls:28,vars:20,consts:[["class","card","appTheme","",4,"ngIf"],[3,"formObject","formID","connectionId","systemName","backHome",4,"ngIf"],[3,"data","formObject","formID","connectionId","systemName","backHome",4,"ngIf"],["createConnection",""],["mailChimpConnection",""],["salesforceConnection",""],["zendeskSupportConnection",""],["zendeskConnection",""],[1,"col-sm-5","mr-0","float-right","flotingdiv",3,"ngClass"],["dismissOnTimeout","5000",3,"type","dismissible",4,"ngIf"],["appTheme","",1,"card"],[1,"card-header"],[1,"float-left","pt-2"],[1,"btn","btn-primary","float-right",3,"click"],[1,"fas","fa-plus"],["columnResizeMode","expand","currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries",1,"system-integration-table",3,"value","lazy","responsive","loading","totalRecords","resizableColumns","rowsPerPageOptions","filterDelay","paginator","rows","showCurrentPageReport","onLazyLoad"],["pTemplate","header"],["pTemplate","body"],["pTemplate","loadingbody"],["pTemplate","emptymessage"],["pSortableColumn","cred_name"],["field","cred_name"],["pSortableColumn","description"],["field","description"],["pSortableColumn","connector_type"],["field","connector_type"],["pSortableColumn","system_id"],["field","system_id"],["pSortableColumn","created_at"],["field","created_at"],[2,"height","40px"],[3,"click"],["class","text-success",4,"ngIf"],["type","button",1,"btn","btn-secondary","btn-sm",3,"click"],[4,"ngIf","ngIfElse"],["test",""],[1,"text-success"],[1,"fas","fa-check"],[1,"spinner-border"],[1,"fas","fa-play","pr-2"],[4,"ngFor","ngForOf"],[1,"loading-text"],[3,"ngStyle"],["colspan","8"],[1,"alert-info","alert","text-center","mt-1","mb-1"],[1,"fas","fa-plug","pr-2"],[3,"formObject","formID","connectionId","systemName","backHome"],[3,"data","formObject","formID","connectionId","systemName","backHome"],[1,"modal-header"],[1,"modal-title","text-center","margin-auto"],["type","button","aria-label","Close",1,"close","pull-right","ml-0",3,"click"],["aria-hidden","true"],["appTheme","",1,"modal-body"],["class","step-1",4,"ngIf"],[4,"ngIf"],[1,"step-1"],[1,"list-group"],[1,"row"],[1,"col-md-4","mb-3","text-center"],["href","javascript:;",1,"list-group-item","list-group-item-action",3,"click"],["src","assets/imgs/db/mysql.png","alt","mysql",2,"width","90px"],["src","assets/imgs/db/mailchimp.png","alt","mailchimp",2,"width","180px"],["src","assets/imgs/db/postgresql.svg","alt","postgresql",2,"width","210px","height","47px"],["src","assets/imgs/db/http.png","alt","http",2,"width","210px","height","47px"],["src","assets/imgs/db/ActiveCampaign_logo.svg.png","alt","http",2,"width","210px","height","47px"],["src","assets/imgs/db/send-in-blue.svg","alt","send-in-blue",2,"width","210px","height","47px"],["src","assets/imgs/db/sendgrid.png","alt","sendgrid",2,"width","210px","height","47px"],["src","assets/imgs/db/moosend-1.png","alt","moosend",2,"width","210px","height","47px"],["src","assets/imgs/db/hubspot.png","alt","hubspot",2,"width","210px","height","47px"],["src","assets/imgs/db/shopify.png","alt","shopify",2,"width","210px","height","47px"],["src","assets/imgs/db/salesforce.png","alt","salesforce",2,"width","210px","height","47px"],["src","assets/imgs/db/Accelologo.png","alt","accelo",2,"width","100px","height","47px"],["src","assets/imgs/db/omnisend.png","alt","omnisend",2,"width","210px","height","47px"],["src","assets/imgs/db/zendesk-sell.png","alt","zendesk",2,"width","180px","height","47px"],["src","assets/imgs/db/Zendesk-Logo.png","alt","zendesk_supp
1ort",2,"width","210px","height","47px"],[1,"back-to-list-btn-left",3,"click"],[1,"fas","fa-chevron-left"],[3,"systemID","systemName","refreshConnectionList","close"],[3,"formGroup","ngSubmit"],[1,"form-group"],["for","exampleInputEmail1"],["type","email","formControlName","email","id","exampleInputEmail1","aria-describedby","emailHelp","placeholder","Enter email",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],[1,"text-danger","pl-1","pt-1",3,"innerHTML"],[1,"text-center"],["type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"ml-2","btn","btn-primary"],[1,"invalid-feedback"],["id","exampleFormControlSelect2","formControlName","sales_object",1,"form-control",3,"ngClass"],["value","Lead"],["value","Contact"],["value","users"],["appTheme","",1,"text-center"],["value","leads"],["value","contacts"],["dismissOnTimeout","5000",3,"type","dismissible"],[3,"innerHTML"]],template:function(n,s){1&n&&(e.YNc(0,Nr,14,12,"div",0),e.YNc(1,Jr,1,4,"app-sql-query-builder",1),e.YNc(2,Qr,1,4,"app-sql-query-builder",1),e.YNc(3,Ur,1,4,"app-mailchimp-query-builder",1),e.YNc(4,Br,1,4,"app-http-query-builder",1),e.YNc(5,Rr,1,4,"app-active-campaign",1),e.YNc(6,Er,1,4,"app-send-in-blue",1),e.YNc(7,jr,1,4,"app-send-grid",1),e.YNc(8,Hr,1,4,"app-moosend",1),e.YNc(9,Gr,1,4,"app-hubspot-query-builder",1),e.YNc(10,Yr,1,4,"app-shopify-query-builder",1),e.YNc(11,Pr,1,5,"app-salesforce",2),e.YNc(12,Kr,1,5,"app-accelo",2),e.YNc(13,zr,1,5,"app-omnisend",2),e.YNc(14,Wr,1,5,"app-zendesk-sell",2),e.YNc(15,Vr,1,5,"app-zendesk-support",2),e.YNc(16,hl,9,2,"ng-template",null,3,e.W1O),e.YNc(18,Cl,19,6,"ng-template",null,4,e.W1O),e.YNc(20,Fl,29,10,"ng-template",null,5,e.W1O),e.YNc(22,Dl,27,10,"ng-template",null,6,e.W1O),e.YNc(24,Ql,29,10,"ng-template",null,7,e.W1O),e.TgZ(26,"div",8),e.YNc(27,Ul,2,3,"alert",9),e.qZA()),2&n&&(e.Q6J("ngIf",""===s.systemName),e.xp6(1),e.Q6J("ngIf","mysql"===s.systemName),e.xp6(1),e.Q6J("ngIf","postgres"===s.systemName||"postgresql"===s.systemName),e.xp6(1),e.Q6J("ngIf","mailchimp"===s.systemName),e.xp6(1),e.Q6J("ngIf","http"===s.systemName),e.xp6(1),e.Q6J("ngIf","activecampaign"===s.systemName),e.xp6(1),e.Q6J("ngIf","sendinblue"===s.systemName),e.xp6(1),e.Q6J("ngIf","sendgrid"===s.systemName),e.xp6(1),e.Q6J("ngIf","moosend"===s.systemName),e.xp6(1),e.Q6J("ngIf","hubspot"===s.systemName),e.xp6(1),e.Q6J("ngIf","shopify"===s.systemName),e.xp6(1),e.Q6J("ngIf","salesforce"===s.systemName),e.xp6(1),e.Q6J("ngIf","accelo"===s.systemName),e.xp6(1),e.Q6J("ngIf","omnisend"===s.systemName),e.xp6(1),e.Q6J("ngIf","zendesk"===s.systemName),e.xp6(1),e.Q6J("ngIf","zendesk_support"===s.systemName),e.xp6(11),e.Q6J("ngClass",e.VKq(18,Bl,!s.isOpen)),e.xp6(1),e.Q6J("ngIf",s.isOpen))},dependencies:[c._Y,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.JL,c.sg,c.u,h.mk,h.sg,h.O5,h.PC,O.wx,L.mh,ce.iA,_t.jx,ce.lQ,ce.fz,Je.O,gt.c,Ft,R.E,pn,wn,Jn,Pn,ro,Co,Lo,Yo,cs,Zs,Rs,or,vr,h.uU],styles:[".spinner-border{width:18px;height:18px}.back-to-list-btn-left{border-bottom:2px solid;padding-bottom:7px;cursor:pointer}.system-integration-table>.p-datatable .p-paginator-bottom>.p-inputwrapper-filled{position:absolute!important;left:0!important}.system-integration-table>.p-datatable .p-paginator-bottom>.p-paginator-current{position:absolute!important;right:0!important}.system-integration-table .p-datatable-wrapper>table>.p-datatable-thead>tr>th{font-size:13px;font-weight:500;padding:8px 0;color:#333;text-align:left}.system-integration-table .p-datatable-wrapper>table>.p-datatable-thead>tr>th:hover{background-color:#f8f9fa}.system-integration-table .p-datatable-wrapper>table>.p-datatable-thead>tr>th:first-child{width:120px;padding-left:10px}.system-integration-table .p-datatable-wrapper>table>.p-datatable-tbody>tr>td:nth-child(2),.system-integration-table .p-datatable-wrapper>table>.p-datatable-tbody>tr>td:nth-child(3){overflow:hidden;text-overflow:ellipsis;padding-right:5px}.system-integration-table .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}.system-integration-table .p-datatable .p-sortable-column:not(.p-highlight):hover{background-color:#f8f9fa}.system-integration-table .p-datatable .p-datatable-tbody>tr>td{padding:2px 0;text-align:left;font-size:13px}.system-integration-table .p-datatable .p-datatable-tbody>tr>td:first-child{font-size:13px;padding:2px 5px;text-align:left;margin-right:10px}\n"],encapsulation:2}),o})();var El=u(26028);const jl=["editor"],Hl=["azEmbedCode"],Gl=["shareLinkCode"],Yl=["shortShareLinkCode"],Pl=["nav"],Kl=["confirmEdit"],zl=["registerForm"],Wl=["customFields"],Vl=["confirmSaveAlert"],$l=["basicForm"],Xl=["settingsForm"],ea=["languageBtnListScroller"],ta=["customDropDown"],ia=["defaultLanguageAlertModal"],na=["showRelationAlertModal"],oa=["showIdentifierAlertModal"],sa=["deleteField"],ra=function(o,r){return[o,r]};function la(o,r){if(1&o&&(e.TgZ(0,"button",35),e._UZ(1,"i",36),e.qZA()),2&o){const i=e.oxw(2);e.Q6J("disabled",i.isLiveForm)("ngClass",e.WLB(2,ra,"Publish"===i.show
1FormStatus()?"liveform-published":"liveform-draft",i.isWebFormPublished&&!i.isEditingPublishedForm||5===i.active?"shiftliveformbtn":""))}}function aa(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"ul",37)(1,"button",38),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.previewCCPAForm("longUrl"))}),e._uU(2,"Long Url"),e.qZA(),e.TgZ(3,"button",38),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.previewCCPAForm("shortUrl"))}),e._uU(4,"Short Url"),e.qZA()()}}function ca(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Form name is required "),e.qZA())}function da(o,r){if(1&o&&(e.TgZ(0,"div",64),e.YNc(1,ca,2,0,"div",55),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("ngIf",i.stepFormOne.formname.errors.required)}}function pa(o,r){if(1&o&&(e.TgZ(0,"span",65),e._uU(1,"check_circle"),e.qZA()),2&o){const i=e.oxw(3);e.Q6J("ngClass",i.crid?"edit-notify-icons":"notify-icons")}}function ua(o,r){if(1&o&&(e.TgZ(0,"span",66),e._uU(1,"error"),e.qZA()),2&o){const i=e.oxw(3);e.Q6J("ngClass",i.crid?"edit-notify-icons":"notify-icons")}}function ma(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"i",69),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.enableIdentifier())}),e.qZA()}2&o&&e.Q6J("adaptivePosition",!0)}const _a=function(o){return{disableBtn:o}};function ga(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",70),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.updateIdentifier())}),e._UZ(1,"i",71),e.qZA()}if(2&o){const i=e.oxw(4);e.Q6J("ngClass",e.VKq(2,_a,i.disableSaveIdentifier))("adaptivePosition",!0)}}function ha(o,r){if(1&o&&(e.TgZ(0,"span"),e.YNc(1,ma,1,1,"i",67),e.YNc(2,ga,2,4,"button",68),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("ngIf",i.identifierActions),e.xp6(1),e.Q6J("ngIf",!i.identifierActions)}}function fa(o,r){if(1&o&&(e.TgZ(0,"div",72),e._uU(1),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Oqu(i.patternIdentifierErr)}}function ba(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"li",5),e.NdJ("click",function(){const s=e.CHM(i).$implicit,l=e.oxw(4);return e.KtG(l.chooseRecommended(s))}),e._uU(1),e.qZA()}if(2&o){const i=r.$implicit;e.xp6(1),e.hij(" ",i," ")}}function xa(o,r){if(1&o&&(e.TgZ(0,"div",72),e._uU(1),e.TgZ(2,"ul",73),e.YNc(3,ba,2,1,"li",74),e.qZA()()),2&o){const i=e.oxw(3);e.xp6(1),e.AsE(" ",i.identifierExists," ",i.recommendedIdentifierErr," "),e.xp6(2),e.Q6J("ngForOf",i.recommendedIdentifers)}}const z=function(o){return{"is-invalid":o}};function Ca(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"form",39)(1,"div",40)(2,"div",41)(3,"div",42)(4,"label",43),e._uU(5,"Name"),e._UZ(6,"i",44),e.qZA(),e.TgZ(7,"input",45),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onInputChange(n))}),e.qZA(),e.YNc(8,da,2,1,"div",46),e.qZA(),e.TgZ(9,"div",47)(10,"label",48),e._uU(11,"Identifier"),e._UZ(12,"i",49),e.qZA(),e.TgZ(13,"div",50)(14,"span",51),e._uU(15),e.qZA(),e.TgZ(16,"input",52),e.NdJ("keyup",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.checkValidation(n))})("keyup",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.checkIdenfierValue(n))}),e.qZA(),e.YNc(17,pa,2,1,"span",53),e.YNc(18,ua,2,1,"span",54),e.YNc(19,ha,3,2,"span",55),e.qZA(),e.YNc(20,fa,2,1,"div",56),e.YNc(21,xa,4,3,"div",56),e.qZA(),e.TgZ(22,"div",42)(23,"label",57),e._uU(24,"Organization"),e.qZA(),e._UZ(25,"input",58),e.qZA(),e.TgZ(26,"div",42)(27,"label",59),e._uU(28,"Property"),e.qZA(),e._UZ(29,"input",60),e.qZA(),e.TgZ(30,"div",42)(31,"app-customdropdown",61),e.NdJ("onClickValue",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onClickMultilangCheckBox(n))})("onClickSendStatus",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onClickCustomDPReceivedStatus(n))})("click",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onClickCustomDropDown(n))})("onClickValueDefaultValue",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onClickRadioBtn(n))}),e.qZA()()()(),e.TgZ(32,"div",62),e._UZ(33,"div",63),e.qZA()()}if(2&o){const i=e.oxw(2);e.Q6J("formGroup",i.basicForm),e.xp6(7),e.Q6J("ngClass",e.VKq(17,z,i.basicFormSubmitted&&i.stepFormOne.formname.errors)),e.xp6(1),e.Q6J("ngIf",i.basicFormSubmitted&&i.stepFormOne.formname.errors),e.xp6(6),e.Q6J("title",i.appUrl),e.xp6(1),e.Oqu(i.appUrl),e.xp6(2),e.Q6J("ngIf",i.showResponseIcon&&""===i.identifierExists),e.xp6(1),e.Q6J("ngIf",!i.showResponseIcon&&""!==i.identifierExists),e.xp6(1),e.Q6J("ngIf",i.crid),e.xp6(1),e.Q6J("ngIf",""!==i.patternIdentifierErr),e.xp6(1),e.Q6J("ngIf",""!==i.identifierExists),e.xp6(10),e.Q6J("ctrlplaceholder","Languages")("listName","dsarformlanguages")("issessionstargerequired",!0)("isclickondocument",i.isclickOndocument)("defaultList",i.laguagelist)("selectedList",i.langlist)("isradiobtnrequiredfordefaultfield",!0)}}function va(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",135)(1,"h4"),e._uU(2),e.qZA(),e.TgZ(3,"div",136)(4,"p"),e._uU(5,"Do you want to edit language for custom controls?"),e.qZA(),e.TgZ(6,"div",137)(7,"button",138),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.onClickNotoAddMultilanguage())}),e._uU(8,"*No I'll do it later"),e.qZA(),e.TgZ(9,"button",139),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4),s=e.MAs(21);return e.KtG(n.openmodal(s))}),e._uU(10," Yes"),e.qZA()(),e.TgZ(11,"span",140),e._uU(12,"*Need to edit controls separately according to selected language"),e.qZA()()()}if(2&o){const i=e.oxw(4);e.xp6(2),e.hij(" ",i.generaltext.customfields,"")}}function ya(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",152),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2).$implicit,s=e.oxw(5);return e.KtG(s.onClickDelete(n))}),e._UZ(1,"i",153),e.qZA()}}function Ta(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",144)(1,"div",145),e._UZ(2,"i",146),e.TgZ(3,"span",147),e._uU(4),e.qZA()(),e.TgZ(5,"div",148)(6,"button",149),e.NdJ("click",function(){e.CHM(i);const n=e.oxw().$implicit,s=e.oxw(5);return e.KtG(s.editSelectedRow(n))}),e.TgZ(7,"div"),e._UZ(8,"i",150),e.qZA()(),e.YNc(9,ya,2,0,"button",151),e.qZA()()}if(2&o){const i=e.oxw().$implicit,t=e.oxw(5);e.xp6(4),e.hij(" ",i.controllabel," "),e.xp6(5),e.Q6J("ngIf",!t.canHaveDelete(null==i.controlId?null:i.controlId.toLowerCase())||"requestdetails"==(null==i.controlId?null:i.controlId.toLowerCase()))}}function wa(o,r){if(1&o&&(e.TgZ(0,"div",142),e.YNc(1,Ta,10,2,"div",143),e.qZA()),2&o){const i=r.$implicit,t=e.oxw(5);e.xp6(1),e.Q6J("ngIf",!(t.isContainPreferedLanguage(i)||t.isContainFavicon(i)||t.isContainHeaderLogo(i)||t.isContainWelcomeText(i)||t.isContainFileUpload(i)||t.isContainCaptchaControl(i)||t.isContainFooterText(i)))}}function Za(o,r){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,wa,2,1,"div",141),e.qZA()),2&o){const i=e.oxw(4);
1e.xp6(1),e.Q6J("ngForOf",i.webFormControlList)}}function Fa(o,r){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,va,13,1,"div",86),e.YNc(2,Za,2,1,"div",55),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!i.isEditingList&&i.isSaveandCloseClicked),e.xp6(1),e.Q6J("ngIf",!i.isSaveandCloseClicked&&!i.isEditingList&&null!=i.webFormControlList&&i.webFormControlList.length>0)}}function Ia(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",135)(1,"button",154),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.addingFormControl())}),e._uU(2),e.qZA()()}if(2&o){const i=e.oxw(3);e.xp6(2),e.hij(" ",i.generaltext.addnew,"")}}function Sa(o,r){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(4);e.xp6(1),e.Oqu(i.generaltext.edittext)}}function Aa(o,r){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(4);e.xp6(1),e.hij(" ",i.generaltext.customfields,"")}}function qa(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",163)(1,"button",164),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.cancelAddingFormControl("cancel"))}),e._uU(2),e.qZA(),e.TgZ(3,"button",165),e.NdJ("click",function(){e.CHM(i),e.oxw();const n=e.MAs(2),s=e.oxw(3);return e.KtG(s.addCustomFields(n))}),e._uU(4),e.qZA()()}if(2&o){const i=e.oxw(4);e.xp6(2),e.Oqu(i.generaltext.canceltext),e.xp6(2),e.Oqu(i.generaltext.saveandclose)}}function ka(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",175),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("value",i.control),e.xp6(1),e.hij(" ",i.display," ")}}function Da(o,r){if(1&o&&(e.TgZ(0,"span",176),e._uU(1),e.qZA()),2&o){const i=e.oxw(5);e.xp6(1),e.Oqu(i.generaltext.selectfieldmsg)}}function La(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"div",166)(2,"div",167)(3,"label"),e._uU(4),e.qZA()(),e.TgZ(5,"div",168)(6,"select",169,170),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.onChangeEvent(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.selectOptionControl=n)}),e.TgZ(8,"option",171),e._uU(9,"select field"),e.qZA(),e.YNc(10,ka,3,2,"ng-container",172),e.qZA(),e.TgZ(11,"button",173),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.addFormField())}),e._uU(12),e.qZA(),e.YNc(13,Da,2,1,"span",174),e.qZA()()()}if(2&o){const i=e.MAs(7),t=e.oxw(4);e.xp6(4),e.Oqu(t.generaltext.selectfieldtype),e.xp6(2),e.Q6J("ngModel",t.selectOptionControl),e.xp6(4),e.Q6J("ngForOf",t.controlOption),e.xp6(2),e.Oqu(t.showFormOption?"Cancel":"Add"),e.xp6(1),e.Q6J("ngIf",null==i.errors?null:i.errors.required)}}function Ma(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",175),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("value",i.control),e.xp6(1),e.hij(" ",i.display,"")}}function Oa(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"div",84)(2,"label"),e._uU(3),e.TgZ(4,"select",177),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.updateControlType(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.changeControlType=n)}),e.TgZ(5,"option",178),e._uU(6,"select option"),e.qZA(),e.YNc(7,Ma,3,2,"ng-container",172),e.qZA()()()()}if(2&o){const i=e.oxw(4);e.xp6(3),e.hij(" ",i.generaltext.displaytype," "),e.xp6(1),e.Q6J("ngModel",i.changeControlType),e.xp6(3),e.Q6J("ngForOf",i.editableControlOption)}}function Na(o,r){1&o&&(e.TgZ(0,"span",176),e._uU(1,"Name of control is mandatory"),e.qZA())}function Ja(o,r){1&o&&(e.TgZ(0,"div",185),e._uU(1,"This form field cannot be modified as it is integrated with a connection under system tab"),e.qZA())}function Qa(o,r){1&o&&(e.TgZ(0,"div")(1,"span",192),e._uU(2," Add value "),e.qZA()())}function Ua(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",193),e.NdJ("click",function(){e.CHM(i);const n=e.oxw().index,s=e.oxw(6);return e.KtG(s.deleteSubjectOption(n))}),e.TgZ(1,"span",194),e._UZ(2,"i",195),e.qZA()()}}function Ba(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",197),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(8);return e.KtG(n.addCustomReqestSubjectType())}),e.TgZ(1,"span",198),e._UZ(2,"i",199),e.qZA()()}}function Ra(o,r){if(1&o&&(e.TgZ(0,"span"),e.YNc(1,Ba,3,0,"button",196),e.qZA()),2&o){const i=e.oxw(7);e.xp6(1),e.Q6J("ngIf",i.isSubjectType&&!i.isRequestType)}}const ie=function(){return{standalone:!0}}
1,Ae=function(o){return{"invalid-txtbox":o}};function Ea(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"li",142)(1,"div",75)(2,"div",145),e._UZ(3,"i",187),e.qZA(),e.TgZ(4,"div",188)(5,"div",189)(6,"input",190,170),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit;return e.KtG(l.name=n)}),e.qZA(),e.YNc(8,Qa,3,0,"div",55),e.qZA(),e.YNc(9,Ua,3,0,"button",191),e.YNc(10,Ra,2,1,"span",55),e.qZA()()()}if(2&o){const i=r.$implicit,t=r.last,n=e.MAs(7),s=e.oxw(6);e.xp6(6),e.s9C("name",i.name),e.s9C("tooltip",null!=i&&i.active?"":"The default Subject type can be removed, but it cannot be edited."),e.Q6J("ngModel",i.name)("disabled",!(null!=i&&i.active))("ngModelOptions",e.DdM(9,ie))("ngClass",e.VKq(10,Ae,(null==n.errors?null:n.errors.required)&&!(n.dirty||n.touched))),e.xp6(2),e.Q6J("ngIf",(null==n.errors?null:n.errors.required)&&!(n.dirty||n.touched)),e.xp6(1),e.Q6J("ngIf",1!==s.sideMenuSubjectTypeOptions.length),e.xp6(1),e.Q6J("ngIf",t)}}function ja(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",186)(1,"ul",83),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(5);return e.KtG(s.dragDropOptionSubjectType(n))}),e.YNc(2,Ea,11,12,"li",141),e.qZA()()}if(2&o){const i=e.oxw(5);e.xp6(1),e.Q6J("cdkDropListData",i.sideMenuSubjectTypeOptions),e.xp6(1),e.Q6J("ngForOf",i.sideMenuSubjectTypeOptions)}}function Ha(o,r){1&o&&(e.TgZ(0,"div")(1,"span",192),e._uU(2," Add value "),e.qZA()())}function Ga(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",202),e.NdJ("click",function(){e.CHM(i);const n=e.oxw().index,s=e.oxw(6);return e.KtG(s.deleteRequestOption(n))}),e.TgZ(1,"span",203),e._UZ(2,"i",195),e.qZA()()}}function Ya(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",197),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(8);return e.KtG(n.addCustomReqestSubjectType())}),e.TgZ(1,"span",198),e._UZ(2,"i",199),e.qZA()()}}function Pa(o,r){if(1&o&&(e.TgZ(0,"span"),e.YNc(1,Ya,3,0,"button",196),e.qZA()),2&o){const i=e.oxw(7);e.xp6(1),e.Q6J("ngIf",!1===i.isSubjectType&&!0===i.isRequestType)}}function Ka(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"li",142)(1,"div",75)(2,"div",188)(3,"div",145),e._UZ(4,"i",200),e.qZA(),e.TgZ(5,"div",189)(6,"input",190,170),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit;return e.KtG(l.name=n)}),e.qZA(),e.YNc(8,Ha,3,0,"div",55),e.qZA(),e.YNc(9,Ga,3,0,"button",201),e.YNc(10,Pa,2,1,"span",55),e.qZA()()()}if(2&o){const i=r.$implicit,t=r.last,n=e.MAs(7),s=e.oxw(6);e.xp6(6),e.s9C("name",i.name),e.s9C("tooltip",null!=i&&i.active?"":"The default Request type can be removed, but it cannot be edited."),e.Q6J("ngModel",i.name)("disabled",!(null!=i&&i.active))("ngModelOptions",e.DdM(9,ie))("ngClass",e.VKq(10,Ae,(null==n.errors?null:n.errors.required)&&!(n.dirty||n.touched))),e.xp6(2),e.Q6J("ngIf",(null==n.errors?null:n.errors.required)&&!(n.dirty||n.touched)),e.xp6(1),e.Q6J("ngIf",1!==s.sideMenuRequestTypeOptions.length),e.xp6(1),e.Q6J("ngIf",t)}}function za(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",186)(1,"ul",83),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(5);return e.KtG(s.dragDropOptionRequestType(n))}),e.YNc(2,Ka,11,12,"li",141),e.qZA()()}if(2&o){const i=e.oxw(5);e.xp6(1),e.Q6J("cdkDropListData",i.sideMenuRequestTypeOptions),e.xp6(1),e.Q6J("ngForOf",i.sideMenuRequestTypeOptions)}}function Wa(o,r){1&o&&(e.TgZ(0,"div")(1,"span",185),e._uU(2," Add value "),e.qZA()())}function Va(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",193),e.NdJ("click",function(){e.CHM(i);const n=e.oxw().index,s=e.oxw(6);return e.KtG(s.deleteSelectOption(n))}),e.TgZ(1,"span",203),e._UZ(2,"i",195),e.qZA()()}}function $a(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",210),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(7);return e.KtG(n.addOptions())}),e._UZ(1,"i",199),e.qZA()}}function Xa(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"li",142)(1,"div",205)(2,"div",168)(3,"div",145),e._UZ(4,"i",200),e.qZA(),e.TgZ(5,"div",206)(6,"input",207,208),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit;return e.KtG(l.name=n)}),e.qZA(),e.YNc(8,Wa,3,0,"div",55),e.qZA(),e.YNc(9,Va,3,0,"button",191),e.YNc(10,$a,2,0,"button",209),e.qZA()()()}if(2&o){const i=r.$implicit,t=r.index,n=r.last,s=e.MAs(7),l=e.oxw(6);e.xp6(6),e.s9C("name",i.name),e.Q6J("ngModel",i.name)("ngModelOptions",e.DdM(7,ie))("ngClass",e.VKq(8,Ae,!n&&!s.valid&&""!==l.selectOptions[t].name&&""!==(null==s.errors?null:s.errors.required))),e.xp6(2),e.Q6J("ngIf",!n&&!s.valid&&""!==l.selectOptions[t].name&&""!==(null==s.errors?null:s.errors.required)),e.xp6(1),e.Q6J("ngIf",1!==l.selectOptions.length),e.xp6(1),e.Q6J("ngIf",n)}}function ec(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",204)(1,"ul",83),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(5);return e.KtG(s.dragDropCustomOption(n))}),e.YNc(2,Xa,11,10,"li",141),e.qZA()()}if(2&o){const i=e.oxw(5);e.xp6(1),e.Q6J("cdkDropListData",i.selectOptions),e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function tc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",179)(1,"label",180),e._uU(2),e.YNc(3,Na,2,0,"span",174),e.TgZ(4,"input",181,170),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.onLabelChange(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(4);return e.KtG(s.lblText=n)}),e.qZA()(),e.YNc(6,Ja,2,0,"div",182),e.YNc(7,ja,3,2,"div",183),e.YNc(8,za,3,2,"div",183),e.YNc(9,ec,3,2,"div",184),e.qZA()}if(2&o){const i=e.MAs(5),t=e.oxw(4);e.xp6(2),e.hij(" ",t.generaltext.addcontrol," "),e.xp6(1),e.Q6J("ngIf",null==i.errors?null:i.errors.required),e.xp6(1),e.Q6J("disabled",t.disableLabel)("ngModel",t.lblText),e.xp6(2),e.Q6J("ngIf",t.disableLabel),e.xp6(1),e.Q6J("ngIf",t.isSubjectType&&!t.isRequestType),e.xp6(1),e.Q6J("ngIf",0==t.isSubjectType&&1==t.isRequestType),e.xp6(1),e.Q6J("ngIf",t.selectedControlType)}}function ic(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",155)(1,"form",156,157),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.MAs(2);return e.KtG(n.form.valid)}),e.TgZ(3,"div",75)(4,"div",84)(5,"h5"),e.YNc(6,Sa,2,1,"span",55),e.YNc(7,Aa,2,1,"span",55),e.YNc(8,qa,5,2,"div",158),e.qZA()(),e.YNc(9,La,14,5,"div",55),e.YNc(10,Oa,8,3,"div",55),e.qZA(),e.TgZ(11,"div",159)(12,"input",160),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.onCheckboxChange(n))}),e.qZA(),e.TgZ(13,"label",161),e._uU(14),e.qZA()(),e.YNc(15,tc,10,8,"div",162),e.qZA()()}if(2&o){const i=e.oxw(3);e.xp6(6),e.Q6J("ngIf",i.isAddingFormControl&&i.isEditingList&&!i.isSaveandCloseClicked),e.xp6(1),e.Q6J("ngIf",i.isAddingFormControl&&!i.isEditingList),e.xp6(1),e.Q6J("ngIf",!i.isSaveandCloseClicked||i.isEditingList),e.xp6(1),e.Q6J("ngIf",!i.isEditingList&&!i.isSaveandCloseClicked),e.xp6(1),e.Q6J("ngIf",i.isEditingList&&i.editSelectionType),e.xp6(2),e.Q6J("checked",i.isRequiredField),e.xp6(2),e.hij(" ",i.generaltext.required," "),e.xp6(1),e.Q6J("ngIf",i.showFormOption)}}function nc(o,r){if(1&o&&(e.ynx(0),e._UZ(1,"img",211),e.BQk()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("src",i.headerlogoBase64,e.LSH)("height",i.logoHeight)("width",i.logoWidth)}}function oc(o,r){1&o&&e._UZ(0,"img",212)}function sc(o,r){if(1&o&&(e.ynx(0),e._UZ(1,"img",213),e.BQk()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("src",i.headerfaviconBase64,e.LSH)("height",i.logoHeight)("width",i.logoWidth)}}function rc(o,r){1&o&&e._UZ(0,"img",212)}function lc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"span",214)(1,"button",215),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3),s=e.MAs(15);return e.KtG(n.editQuillEditorDataPopup(s,"welcomeText"))}),e._UZ(2,"i",216),e.qZA()()}}function ac(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"span",217)(1,"button",215),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3),s=e.MAs(15);return e.KtG(n.editQuillEditorDataPopup(s,"footerText"))}),e._UZ(2,"i",216),e.qZA()()}}function cc(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",220),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit,t=e.oxw(4);e.xp6(1),e.Q6J("value",i.keyvalue)("selected",i.keyvalue==t.languageSelected),e.xp6(1),e.hij(" ",i.label," ")}}function dc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"select",218,170),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.onPreferedLanguageChangeEvent(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.languageSelected=n)}),e.TgZ(2,"option",171),e._uU(3,"select field"),e.qZA(),e.YNc(4,cc,3,3,"ng-container",219),e.qZA()}if(2&o){const i=e.oxw(3);e.Q6J("ngModel",i.languageSelected),e.xp6(4),e.Q6J("ngForOf",i.langlist)("ngForTrackBy",i.trackById)}}function pc(o,r){if(1&o&&e._UZ(0,"img",221),2&o){const i=e.oxw(3);e.Q6J("src",i.transform(i.headerlogoBase64),e.LSH)}}function uc(o,r){if(1&o&&(e.TgZ(0,"h3",222),e._uU(1),e.qZA()),2&o){const i=e.oxw(3);e.Udp("color",i.headerTextColor),e.Q6J("ngStyle",i.headerStyle()),e.xp6(1),e.Oqu(i.formName)}}function mc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function _c(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function gc(o,r){if(1&o&&(e.TgZ(0,"option",175),e._uU(1),e.qZA()),2&o){const i=r.$implicit;e.Q6J("value",i.request_type_id),e.xp6(1),e.hij(" ",i.name," ")}}function hc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"select",234),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2).$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.YNc(2,gc,2,2,"option",235),e.qZA(),e._UZ(3,"input",236),e.qZA()}if(2&o){const i=e.oxw(2),t=i.$implicit,n=i.index,s=e.oxw(4);e.xp6(1),e.s9C("name",t.controllabel),e.Q6J("ngModel",s.requestObject[t.controllabel]),e.xp6(1),e.Q6J("ngForOf",t.selectOptions),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1)}}function fc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",239)(1,"input",240,241),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(7);return e.KtG(a.requestObject[l.request_type_id]=n)}),e.qZA(),e.TgZ(3,"label",242),e._uU(4),e.qZA(),e._UZ(5,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.oxw(3),n=t.$implicit,s=t.index,l=e.oxw(4);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.s9C("id",i.name),e.Q6J("value",i.request_type_id)("ngModel",l.requestObject[i.request_type_id]),e.xp6(2),e.s9C("for",i.name),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function bc(o,r){if(1&o&&(e.TgZ(0,"div",237),e.YNc(1,fc,6,8,"div",238),e.qZA()),2&o){const i=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function xc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",239)(1,"input",243,241),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(7);return e.KtG(a.requestObject[l.request_type_id]=n)}),e.qZA(),e.TgZ(3,"label",242),e._uU(4),e.qZA(),e._UZ(5,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.oxw(3),n=t.$implicit,s=t.index,l=e.oxw(4);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.s9C("id",i.name),e.Q6J("value",i.request_type_id)("ngModel",l.requestObject[i.request_type_id]),e.xp6(2),e.s9C("for",i.name),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function Cc(o,r){if(1&o&&(e.TgZ(0,"div",237),e.YNc(1,xc,6,8,"div",238),e.qZA()),2&o){const i=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}const E=function(o){return{hidelabel:o}};function vc(o,r){if(1&o&&(e.TgZ(0,"div",84)(1,"label"),e.YNc(2,mc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,_c,3,1,"span",55),e.qZA(),e.YNc(6,hc,4,5,"div",55),e.YNc(7,bc,2,1,"div",233),e.YNc(8,Cc,2,1,"div",233),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(4);e.xp6(2),e.Q6J("ngIf",i.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(7,E,i.controlId==t.selectedControlId&&t.isEditingList)),e.xp6(1),e.Oqu(i.controllabel),e.xp6(1),e.Q6J("ngIf",i.controlId==t.selectedControlId&&t.isEditingList),e.xp6(1),e.Q6J("ngIf","select"===i.control&&"requesttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","radio"===i.control&&"requesttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","checkbox"===i.control&&"requesttype"===i.controlId)}}function yc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Tc(o,r){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&o){const i=e.oxw(2).$implicit;e.xp6(1),e.hij(" ",i.controllabel," ")}}function wc(o,r){if(1&o&&(e.TgZ(0,"option",175),e._uU(1),e.qZA()),2&o){const i=r.$implicit;e.Q6J("value",i.subject_type_id),e.xp6(1),e.hij(" ",i.name," ")}}function Zc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div")(1,"select",234),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2).$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.YNc(2,wc,2,2,"option",235),e.qZA(),e._UZ(3,"input",236),e.qZA()}if(2&o){const i=e.oxw(2),t=i.$implicit,n=i.index,s=e.oxw(4);e.xp6(1),e.s9C("name",t.controllabel),e.Q6J("ngModel",s.requestObject[t.controllabel]),e.xp6(1),e.Q6J("ngForOf",t.selectOptions),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1)}}function Fc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",239)(1,"input",246,247),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(7);return e.KtG(a.requestObject[l.subject_type_id]=n)}),e.qZA(),e.TgZ(3,"label",242),e._uU(4),e.qZA(),e._UZ(5,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.oxw(3),n=t.$implicit,s=t.index,l=e.oxw(4);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.s9C("id",i.name),e.Q6J("value",i.subject_type_id)("ngModel",l.requestObject[i.subject_type_id]),e.xp6(2),e.s9C("for",i.name),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function Ic(o,r){if(1&o&&(e.TgZ(0,"div",245),e.YNc(1,Fc,6,8,"div",238),e.qZA()),2&o){const i=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function Sc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",239)(1,"input",248),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(7);return e.KtG(a.requestObject[l.subject_type_id]=n)}),e.qZA(),e.TgZ(2,"label",242),e._uU(3),e.qZA(),e._UZ(4,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.oxw(3),n=t.$implicit,s=t.index,l=e.oxw(4);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.s9C("id",i.name),e.s9C("name",n.controllabel),e.Q6J("value",i.subject_type_id)("ngModel",l.requestObject[i.subject_type_id]),e.xp6(1),e.s9C("for",i.name),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function Ac(o,r){if(1&o&&(e.TgZ(0,"div",245),e.YNc(1,Sc,5,9,"div",238),e.qZA()),2&o){const i=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function qc(o,r){if(1&o&&(e.TgZ(0,"div",84)(1,"label"),e.YNc(2,yc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Tc,2,1,"span",55),e.qZA(),e.YNc(6,Zc,4,5,"div",55),e.YNc(7,Ic,2,1,"div",244),e.YNc(8,Ac,2,1,"div",244),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(4);e.xp6(2),e.Q6J("ngIf",i.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(7,E,i.controlId==t.selectedControlId&&t.isEditingList)),e.xp6(1),e.hij("",i.controllabel," "),e.xp6(1),e.Q6J("ngIf",i.controlId==t.selectedControlId&&t.isEditingList),e.xp6(1),e.Q6J("ngIf","select"==i.control&&"subjecttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","radio"==i.control&&"subjecttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","checkbox"==i.control&&"subjecttype"===i.controlId)}}function kc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Dc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function Lc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,kc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Dc,3,1,"span",55),e.qZA(),e.TgZ(6,"input",249),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw().$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.qZA(),e._UZ(7,"input",236),e.qZA()}if(2&o){const i=e.oxw(),t=i.$implicit,n=i.index,s=e.oxw(4);e.xp6(2),e.Q6J("ngIf",t.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(8,E,t.controlId==s.selectedControlId&&s.isEditingList)),e.xp6(1),e.hij("",t.controllabel," "),e.xp6(1),e.Q6J("ngIf",t.controlId==s.selectedControlId&&s.isEditingList),e.xp6(1),e.s9C("name",t.controllabel),e.Q6J("ngModel",s.requestObject[t.controllabel]),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1)}}function Mc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Oc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function Nc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,Mc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Oc,3,1,"span",55),e.qZA(),e.TgZ(6,"textarea",249),e.NdJ("ngModelChange",func
1tion(n){e.CHM(i);const s=e.oxw().$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.qZA(),e._UZ(7,"input",236),e.qZA()}if(2&o){const i=e.oxw(),t=i.$implicit,n=i.index,s=e.oxw(4);e.xp6(2),e.Q6J("ngIf",t.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(8,E,t.controlId==s.selectedControlId&&s.isEditingList)),e.xp6(1),e.hij("",t.controllabel," "),e.xp6(1),e.Q6J("ngIf",t.controlId==s.selectedControlId&&s.isEditingList),e.xp6(1),e.s9C("name",t.controllabel),e.Q6J("ngModel",s.requestObject[t.controllabel]),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1)}}function Jc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Qc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit,t=e.oxw(4);e.xp6(2),e.Oqu(t.lblText&&t.isEditingList?t.lblText:i.controllabel)}}function Uc(o,r){if(1&o&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&o){const i=e.oxw(3).$implicit;e.xp6(1),e.hij("",i.controllabel," is required")}}function Bc(o,r){if(1&o&&(e.TgZ(0,"div",64),e.YNc(1,Uc,2,1,"div",55),e.qZA()),2&o){e.oxw();const i=e.MAs(7);e.xp6(1),e.Q6J("ngIf",i.errors.required)}}function Rc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,Jc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Qc,3,1,"span",55),e.qZA(),e.TgZ(6,"input",250,251),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw().$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.qZA(),e._UZ(8,"input",236),e.YNc(9,Bc,2,1,"div",46),e.qZA()}if(2&o){const i=e.MAs(7),t=e.oxw(),n=t.$implicit,s=t.index;e.oxw();const l=e.MAs(2),a=e.oxw(3);e.xp6(2),e.Q6J("ngIf",n.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(9,E,n.controlId==a.selectedControlId&&a.isEditingList)),e.xp6(1),e.hij("",n.controllabel," "),e.xp6(1),e.Q6J("ngIf",n.controlId==a.selectedControlId&&a.isEditingList),e.xp6(1),e.s9C("name",n.controllabel),e.Q6J("ngModel",a.requestObject[n.controllabel]),e.xp6(2),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1),e.xp6(1),e.Q6J("ngIf",l.submitted&&i.invalid)}}function Ec(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function jc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function Hc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",239)(1,"input",254,255),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(6);return e.KtG(a.requestObject[l.id]=n)}),e.qZA(),e.TgZ(3,"label",242),e._uU(4),e.qZA(),e._UZ(5,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.MAs(2),n=e.oxw(2),s=n.$implicit,l=n.index;e.oxw();const a=e.MAs(2),d=e.oxw(3);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.s9C("id",i.id),e.s9C("name",i.keylabel),e.Q6J("value",i.name)("ngModel",d.requestObject[i.id])("ngClass",e.VKq(11,z,a.submitted&&t.invalid))("required",s.requiredfield?"required":null),e.xp6(2),e.s9C("for",i.id),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",s.indexCount),e.Q6J("ngModel",l+1)}}function Gc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"div",252),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(5);return e.KtG(s.dragDropCustomOption(n))}),e.TgZ(2,"label",253),e.YNc(3,Ec,2,0,"span",182),e.TgZ(4,"span",232),e._uU(5),e.qZA(),e.YNc(6,jc,3,1,"span",55),e.qZA(),e.YNc(7,Hc,6,13,"div",238),e.qZA()()}if(2&o){const i=e.oxw().$implicit,t=e.oxw(4);e.xp6(1),e.Q6J("cdkDropListData",i.selectOptions),e.xp6(2),e.Q6J("ngIf",i.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(6,E,i.controlId==t.selectedControlId&&t.isEditingList)),e.xp6(1),e.hij("",i.controllabel," "),e.xp6(1),e.Q6J("ngIf",i.controlId==t.selectedControlId&&t.isEditingList),e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function Yc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Pc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function Kc(o,r){if(1&o&&(e.TgZ(0,"option",175),e._uU(1),e.qZA()),2&o){const i=r.$implicit;e.Q6J("value",i.id),e.xp6(1),e.hij(" ",i.name," ")}}function zc(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,Yc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Pc,3,1,"span",55),e.qZA(),e.TgZ(6,"select",234),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2).$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)}),e.YNc(7,Kc,2,2,"option",235),e.qZA(),e._UZ(8,"input",236),e.qZA()}if(2&o){const i=e.oxw(2),t=i.$implicit,n=i.index,s=e.oxw(4);e.xp6(2),e.Q6J("ngIf",t.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(9,E,t.controlId==s.selectedControlId&&s.isEditingList)),e.xp6(1),e.hij("",t.controllabel," "),e.xp6(1),e.Q6J("ngIf",t.controlId==s.selectedControlId&&s.isEditingList),e.xp6(1),e.s9C("name",t.controllabel),e.Q6J("ngModel",s.requestObject[t.controllabel]),e.xp6(1),e.Q6J("ngForOf",t.selectOptions),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1)}}function Wc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function Vc(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function $c(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,Wc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,Vc,3,1,"span",55),e.qZA(),e.TgZ(6,"input",256,257),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2).$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)})("keyup",function(){e.CHM(i);const n=e.oxw(6);return e.KtG(n.loadCountryList())})("typeaheadOnSelect",function(n){e.CHM(i);const s=e.oxw(6);return e.KtG(s.onSelectCountry(n))}),e.qZA(),e._UZ(8,"input",236),e.qZA()}if(2&o){const i=e.MAs(7),t=e.oxw(2),n=t.$implicit,s=t.index;e.oxw();const l=e.MAs(2),a=e.oxw(3);e.xp6(2),e.Q6J("ngIf",n.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(14,E,n.controlId==a.selectedControlId&&a.isEditingList)),e.xp6(1),e.hij("",n.controllabel," "),e.xp6(1),e.Q6J("ngIf",n.controlId==a.selectedControlId&&a.isEditingList),e.xp6(1),e.s9C("name",n.controllabel),e.MGl("autocomplete","new-",n.controllabel,""),e.Q6J("ngModel",a.requestObject[n.controllabel])("typeahead",a.countryList)("typeaheadMinLength",0)("typeaheadSingleWords",a.typeaheadSingleWords)("typeaheadScrollable",!0)("ngClass",e.VKq(16,z,l.submitted&&i.errors)),e.xp6(2),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function Xc(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function ed(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(3).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function td(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",84)(1,"label"),e.YNc(2,Xc,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,ed,3,1,"span",55),e.qZA(),e.TgZ(6,"input",258,259),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2).$implicit,l=e.oxw(4);return e.KtG(l.requestObject[s.controllabel]=n)})("typeaheadOnSelect",function(n){e.CHM(i);const s=e.oxw(6);return e.KtG(s.onSelectState(n))}),e.qZA(),e._UZ(8,"input",236),e.qZA()}if(2&o){const i=e.MAs(7),t=e.oxw(2),n=t.$implicit,s=t.index;e.oxw();const l=e.MAs(2),a=e.oxw(3);e.xp6(2),e.Q6J("ngIf",n.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(14,E,n.controlId==a.selectedControlId&&a.isEditingList)),e.xp6(1),e.hij("",n.controllabel," "),e.xp6(1),e.Q6J("ngIf",n.controlId==a.selectedControlId&&a.isEditingList),e.xp6(1),e.s9C("name",n.controllabel),e.MGl("autocomplete","new-",n.controllabel,""),e.Q6J("ngModel",a.requestObject[n.controllabel])("typeahead",a.filteredStateList)("typeaheadScrollable",!0)("typeaheadSingleWords",a.typeaheadSingleWords)("typeaheadMinLength",0)("ngClass",e.VKq(16,z,l.submitted&&i.errors)),e.xp6(2),e.s9C("name",n.indexCount),e.Q6J("ngModel",s+1)}}function id(o,r){if(1&o&&(e.YNc(0,zc,9,11,"div",228),e.YNc(1,$c,9,18,"div",228),e.YNc(2,td,9,18,"div",228)),2&o){const i=e.oxw().$implicit;e.Q6J("ngIf","select"==i.control&&"preferedlanguages"!==i.controlId&&"state"!==i.controlId&&"country"!==i.controlId&&"subjecttype"!==i.controlId&&"requesttype"!==i.controlId),e.xp6(1),e.Q6J("ngIf","select"==i.control&&"country"==i.controlId),e.xp6(1),e.Q6J("ngIf","select"==i.control&&"state"==i.controlId)}}
1function nd(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function od(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function sd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",262)(1,"input",263,264),e.NdJ("ngModelChange",function(n){const l=e.CHM(i).$implicit,a=e.oxw(6);return e.KtG(a.requestObject[l.id]=n)}),e.qZA(),e.TgZ(3,"label",242),e._uU(4),e.qZA(),e._UZ(5,"input",236),e.qZA()}if(2&o){const i=r.$implicit,t=e.MAs(2),n=e.oxw(2),s=n.$implicit,l=n.index;e.oxw();const a=e.MAs(2),d=e.oxw(3);e.xp6(1),e.s9C("id",i.name),e.s9C("name",i.name),e.Q6J("ngModelOptions",e.DdM(11,ie))("value",i.id)("ngClass",e.VKq(12,z,a.submitted&&t.invalid))("required",s.requiredfield?"required":null)("ngModel",d.requestObject[i.id]),e.xp6(2),e.s9C("for",i.name),e.xp6(1),e.Oqu(i.name),e.xp6(1),e.s9C("name",s.indexCount),e.Q6J("ngModel",l+1)}}function rd(o,r){if(1&o&&(e.TgZ(0,"div",84)(1,"label",260),e.YNc(2,nd,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,od,3,1,"span",55),e.qZA(),e.YNc(6,sd,6,14,"div",261),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(4);e.xp6(2),e.Q6J("ngIf",i.requiredfield),e.xp6(1),e.Q6J("ngClass",e.VKq(5,E,i.controlId==t.selectedControlId&&t.isEditingList)),e.xp6(1),e.hij("",i.controllabel," "),e.xp6(1),e.Q6J("ngIf",i.controlId==t.selectedControlId&&t.isEditingList),e.xp6(1),e.Q6J("ngForOf",i.selectOptions)}}function ld(o,r){1&o&&(e.TgZ(0,"span",185),e._uU(1,"*"),e.qZA())}function ad(o,r){if(1&o&&(e.TgZ(0,"span")(1,"span"),e._uU(2),e.qZA()()),2&o){const i=e.oxw(2).$implicit;e.xp6(2),e.Oqu(i.controllabel)}}function cd(o,r){1&o&&(e.TgZ(0,"div",270),e._uU(1," File size should not exceed 10 MB "),e.qZA())}function dd(o,r){1&o&&(e.TgZ(0,"div",270),e._uU(1," Only pdf, jpg, txt, doc, docx file area allowed. "),e.qZA())}const qe=function(o,r){return{displaynone:o,"":r}};function pd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",265)(1,"label",260),e.YNc(2,ld,2,0,"span",182),e.TgZ(3,"span",232),e._uU(4),e.qZA(),e.YNc(5,ad,3,1,"span",55),e.qZA(),e.TgZ(6,"div",94)(7,"div",266)(8,"input",267),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(5);return e.KtG(s.uploadFile(n))}),e.qZA(),e.TgZ(9,"label",268),e._uU(10),e.qZA(),e._UZ(11,"input",236),e.qZA()(),e.YNc(12,cd,2,0,"div",269),e.YNc(13,dd,2,0,"div",269),e.qZA()}if(2&o){const i=e.oxw(),t=i.$implicit,n=i.index,s=e.oxw(4);e.Q6J("ngClass",e.WLB(10,qe,!t.requiredfield,t.requiredfield||s.isFileUploadRequired)),e.xp6(2),e.Q6J("ngIf",t.ismandatory),e.xp6(1),e.Q6J("ngClass",e.VKq(13,E,t.controlId==s.selectedControlId&&s.isEditingList)),e.xp6(1),e.hij("",t.controllabel," "),e.xp6(1),e.Q6J("ngIf",t.controlId==s.selectedControlId&&s.isEditingList),e.xp6(5),e.Oqu(s.uploadFilename?s.uploadFilename:"Choose file"),e.xp6(1),e.s9C("name",t.indexCount),e.Q6J("ngModel",n+1),e.xp6(1),e.Q6J("ngIf",s.showFilesizeerror),e.xp6(1),e.Q6J("ngIf",s.showFileExtnerror)}}function ud(o,r){if(1&o&&e._UZ(0,"img",282),2&o){const i=e.oxw(7);e.Q6J("src",i.imageToShow,e.LSH)}}function md(o,r){1&o&&(e.TgZ(0,"span"),e._uU(1,"No Image Found"),e.qZA())}function _d(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",272)(1,"label"),e._uU(2,"Captcha"),e.qZA(),e.TgZ(3,"div",273)(4,"button",274),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(6);return e.KtG(n.loadCaptcha())}),e._UZ(5,"img",275),e.qZA(),e.TgZ(6,"div",276),e._UZ(7,"span",277),e.YNc(8,ud,1,1,"img",278),e.YNc(9,md,2,0,"ng-template",null,279,e.W1O),e.qZA()(),e.TgZ(11,"div",280)(12,"input",281),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(6);return e.KtG(s.captchacode=n)}),e.qZA()()()}if(2&o){const i=e.MAs(10),t=e.oxw(2),n=t.$implicit,s=t.index,l=e.oxw(4);e.Q6J("ngClass",e.WLB(6,qe,!n.requiredfield,n.requiredfield||l.isCaptchaVerificationRequired)),e.xp6(7),e.Q6J("ngClass",e.WLB(9,qe,!l.isImageLoading,l.isImageLoading)),e.xp6(1),e.Q6J("ngIf",!l.isImageLoading)("ngIfElse",i),e.xp6(4),e.MGl("autocomplete","new-",s,""),e.Q6J("ngModel",l.captchacode)}}function gd(o,r){if(1&o&&(e.TgZ(0,"div",84),e.YNc(1,_d,13,12,"div",271),e.qZA()),2&o){const i=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",i.requiredfield&&"captchacontrol"==i.controlId)}}function hd(o,r){if(1&o&&(e.TgZ(0,"div",227),e.YNc(1,vc,9,9,"div",228),e.YNc(2,qc,9,9,"div",228),e.YNc(3,Lc,8,10,"div",229),e.YNc(4,Nc,8,10,"div",228),e.YNc(5,Rc,10,11,"div",228),e.YNc(6,Gc,8,8,"div",228),e.YNc(7,id,3,3,"ng-template",null,230,e.W1O),e.YNc(9,rd,7,7,"div",228),e.YNc(10,pd,14,15,"div",231),e.YNc(11,gd,2,1,"div",228),e.qZA()),2&o){const i=r.$implicit,t=e.MAs(8),n=e.oxw(4);e.Q6J("cdkDragDisabled",!0),e.xp6(1),e.Q6J("ngIf","requesttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","subjecttype"===i.controlId),e.xp6(1),e.Q6J("ngIf","textbox"===i.control)("ngIfElse",t),e.xp6(1),e.Q6J("ngIf","textarea"===i.control),e.xp6(1),e.Q6J("ngIf","datepicker"===i.control),e.xp6(1),e.Q6J("ngIf","radio"===i.control&&"requesttype"!==i.controlId&&"subjecttype"!==i.controlId),e.xp6(3),e.Q6J("ngIf","checkbox"==i.control&&"subjecttype"!==i.controlId&&"requesttype"!==i.controlId),e.xp6(1),e.Q6J("ngIf",i.requiredfield&&"fileupload"==i.controlId),e.xp6(1),e.Q6J("ngIf",n.webForm
1ControlList.length-1)}}function fd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",223),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.drop(n))}),e.TgZ(1,"form",156,224),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.MAs(2),s=e.oxw(3);return e.KtG(s.register(n))}),e.YNc(3,hd,12,11,"div",225),e.qZA(),e.TgZ(4,"div",226),e._UZ(5,"div",133),e.ALo(6,"safe"),e.qZA()()}if(2&o){const i=e.oxw(3);e.Q6J("cdkDropListData",i.webFormControlList),e.xp6(3),e.Q6J("ngForOf",i.webFormControlList),e.xp6(2),e.Q6J("ngStyle",i.footerStyle())("innerHTML",i.editorDataFooter?e.xi3(6,4,i.editorDataFooter,"html"):i.footerText,e.oJD)}}const j=function(o,r){return{hide:o,show:r}},bd=function(o,r){return{"img-container":o,"":r}};function xd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",75)(1,"div",76)(2,"accordion",77)(3,"accordion-group",78),e.NdJ("isOpenChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.accordionChangeStatus(n,"first"))}),e.TgZ(4,"button",79)(5,"div",80),e._uU(6,"Form Fields"),e.qZA(),e.TgZ(7,"span",81),e._UZ(8,"i",82),e.qZA()(),e.TgZ(9,"div",83),e.NdJ("cdkDropListDropped",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.drop(n))}),e.YNc(10,Fa,3,2,"div",55),e.TgZ(11,"div",75)(12,"div",84)(13,"div",85),e.YNc(14,Ia,3,1,"div",86),e.qZA()(),e.YNc(15,ic,16,8,"div",87),e.qZA()()(),e.TgZ(16,"accordion-group",78),e.NdJ("isOpenChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.accordionChangeStatus(n,"second"))}),e.TgZ(17,"button",88)(18,"div",80),e._uU(19,"Form Styling"),e.qZA(),e.TgZ(20,"span",89),e._UZ(21,"i",82),e.qZA()(),e.TgZ(22,"div",90)(23,"div",75)(24,"div",91)(25,"form",39)(26,"div")(27,"label",92),e._uU(28," Header logo"),e.qZA(),e.TgZ(29,"div",93)(30,"p"),e._uU(31,"File Format PNG, JPG or JPEG, Max Size 1MB"),e.qZA(),e.TgZ(32,"div",94)(33,"label",95),e._uU(34," Upload "),e.qZA(),e.TgZ(35,"input",96),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.fileChangeEvent(n))}),e.qZA()()(),e.TgZ(36,"div",97),e.YNc(37,nc,2,3,"ng-container",98),e.YNc(38,oc,1,0,"ng-template",null,99,e.W1O),e.qZA(),e.TgZ(40,"div",100)(41,"div")(42,"span"),e._UZ(43,"i-feather",101),e.qZA(),e.TgZ(44,"span",102),e._uU(45),e.qZA()(),e.TgZ(46,"span",103),e._uU(47),e.qZA(),e.TgZ(48,"button",104),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.deleteSelectedLogo())}),e._UZ(49,"i-feather",105),e.qZA()()()()(),e.TgZ(50,"div",91)(51,"form",39)(52,"div")(53,"label",92),e._uU(54," Header Favicon"),e.qZA(),e.TgZ(55,"div",93)(56,"p"),e._uU(57,"File Format PNG, JPG or JPEG, Max Size 1MB"),e.qZA(),e.TgZ(58,"div",94)(59,"label",95),e._uU(60," Upload "),e.qZA(),e.TgZ(61,"input",106),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.faviconChangeEvent(n))}),e.qZA()()(),e.TgZ(62,"div",107),e.YNc(63,sc,2,3,"ng-container",98),e.YNc(64,rc,1,0,"ng-template",null,99,e.W1O),e.qZA(),e.TgZ(66,"div",100)(67,"div")(68,"span"),e._UZ(69,"i-feather",101),e.qZA(),e.TgZ(70,"span",102),e._uU(71),e.qZA()(),e.TgZ(72,"span",103),e._uU(73),e.qZA(),e.TgZ(74,"button",104),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.deleteSelectedFavicon())}),e._UZ(75,"i-feather",105),e.qZA()()()()(),e.TgZ(76,"div",108)(77,"div",109)(78,"div",110)(79,"label",111),e._uU(80,"Header Color"),e.qZA()(),e.TgZ(81,"div",112)(82,"input",113),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.headerColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"headerColor"))}),e.qZA(),e.TgZ(83,"input",114),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"headerColor"))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.headerColor=n)}),e.qZA()()()(),e.TgZ(84,"div",108)(85,"div",109)(86,"div",110)(87,"label",111),e._uU(88,"Header Text Color"),e.qZA()(),e.TgZ(89,"div",112)(90,"input",113),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.headerTextColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"headerTextColor"))}),e.qZA(),e.TgZ(91,"input",114),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"headerTextColor"))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.headerTextColor=n)}),e.qZA()()()(),e.TgZ(92,"div",108)(93,"div",115)(94,"div",116)(95,"label",111),e._uU(96,"Header Font Size "),e.qZA()(),e.TgZ(97,"div",117)(98,"input",118),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeFontSize(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.headerFontSize=n)}),e.qZA()()()(),e.TgZ(99,"div",108)(100,"div",109)(101,"div",110)(102,"label",111),e._uU(103,"Welcome Text Color"),e.qZA()(),e.TgZ(104,"div",112)(105,"input",119),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.welcomeTextColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"welcomeTextColor"))}),e.qZA(),e.TgZ(106,"input",114),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.welcomeTextColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"welcomeTextColor"))}),e.qZA()()()(),e.TgZ(107,"div",108)(108,"div",115)(109,"div",116)(110,"label",111),e._uU(111,"Welc
1ome Font Size "),e.qZA()(),e.TgZ(112,"div",117)(113,"input",120),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeFontSize(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.welcomeFontSize=n)}),e.qZA()()()(),e.TgZ(114,"div",108)(115,"div",109)(116,"div",110)(117,"label",111),e._uU(118,"Footer Color"),e.qZA()(),e.TgZ(119,"div",112)(120,"input",113),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.footerBackgroundColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"footerBackgroundColor"))}),e.qZA(),e.TgZ(121,"input",114),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"footerBackgroundColor"))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.footerBackgroundColor=n)}),e.qZA()()()(),e.TgZ(122,"div",108)(123,"div",109)(124,"div",110)(125,"label",111),e._uU(126,"Footer Text Color"),e.qZA()(),e.TgZ(127,"div",112)(128,"input",113),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.footerTextColor=n)})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"footerTextColor"))}),e.qZA(),e.TgZ(129,"input",114),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onColorSelection(n,"footerTextColor"))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.footerTextColor=n)}),e.qZA()()()(),e.TgZ(130,"div",108)(131,"div",115)(132,"div",116)(133,"label",111),e._uU(134,"Footer Text Size"),e.qZA()(),e.TgZ(135,"div",117)(136,"input",120),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeFontSize(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.footerFontSize=n)}),e.qZA()()()()()()(),e.TgZ(137,"accordion-group",78),e.NdJ("isOpenChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.accordionChangeStatus(n,"third"))}),e.TgZ(138,"button",79)(139,"div",80),e._uU(140,"Form Text"),e.qZA(),e.TgZ(141,"span",121),e._UZ(142,"i",82),e.qZA()(),e.TgZ(143,"div",122)(144,"div",123)(145,"h6"),e._uU(146,"Welcome Text "),e.YNc(147,lc,3,0,"span",124),e.qZA()(),e.TgZ(148,"div",123)(149,"h6"),e._uU(150,"Footer Text "),e.YNc(151,ac,3,0,"span",125),e.qZA()()()()()(),e.TgZ(152,"div",126),e.YNc(153,dc,5,3,"select",127),e.TgZ(154,"div",128)(155,"div",129),e.YNc(156,pc,1,1,"img",130),e.YNc(157,uc,2,4,"h3",131),e.qZA(),e.TgZ(158,"div",132),e._UZ(159,"div",133),e.ALo(160,"safe"),e.qZA()(),e.YNc(161,fd,7,7,"div",134),e.qZA()()}if(2&o){const i=e.MAs(39),t=e.oxw(2);e.xp6(2),e.Q6J("isAnimated",!0),e.xp6(1),e.Q6J("isOpen",t.accordionStatus.isFirstopen),e.xp6(2),e.Q6J("ngClass",t.accordionStatus.isFirstopen?"template-blue":"light-black"),e.xp6(3),e.Q6J("ngClass",t.accordionStatus.isFirstopen?"rotateicon":"resumeiconstate"),e.xp6(1),e.Q6J("cdkDropListData",t.webFormControlList),e.xp6(1),e.Q6J("ngIf",!t.isAddingFormControl),e.xp6(4),e.Q6J("ngIf",!t.isAddingFormControl&&!t.isSaveandCloseClicked),e.xp6(1),e.Q6J("ngIf",t.isAddingFormControl),e.xp6(1),e.Q6J("isOpen",t.accordionStatus.isSecondopen),e.xp6(2),e.Q6J("ngClass",t.accordionStatus.isSecondopen?"template-blue":"light-black"),e.xp6(3),e.Q6J("ngClass",t.accordionStatus.isSecondopen?"rotateicon":"resumeiconstate"),e.xp6(4),e.Q6J("formGroup",t.headerLogoForm),e.xp6(4),e.Q6J("ngClass",e.WLB(57,j,t.headerlogoBase64,!t.headerlogoBase64)),e.xp6(7),e.Q6J("ngClass",e.WLB(60,j,!t.headerlogoBase64,t.headerlogoBase64)),e.xp6(1),e.Q6J("ngIf",t.headerlogoBase64)("ngIfElse",i),e.xp6(3),e.Q6J("ngClass",e.WLB(63,j,!t.headerlogoBase64,t.headerlogoBase64)),e.xp6(5),e.hij(" File Name: ",t.logoFilename,""),e.xp6(2),e.hij("File size: ",t.logoFilesize,""),e.xp6(4),e.Q6J("formGroup",t.faviconForm),e.xp6(4),e.Q6J("ngClass",e.WLB(66,j,t.headerfaviconBase64,!t.headerfaviconBase64)),e.xp6(7),e.Q6J("ngClass",e.WLB(69,j,!t.headerfaviconBase64,t.headerfaviconBase64)),e.xp6(1),e.Q6J("ngIf",t.headerfaviconBase64)("ngIfElse",i),e.xp6(3),e.Q6J("ngClass",e.WLB(72,j,!t.headerfaviconBase64,t.headerfaviconBase64)),e.xp6(
15),e.hij(" File Name: ",t.faviconFilename?t.faviconFilename:"",""),e.xp6(2),e.hij("File size: ",t.faviconFilesize?t.faviconFilesize:"",""),e.xp6(9),e.Q6J("ngModel",t.headerColor),e.xp6(1),e.Q6J("ngModel",t.headerColor),e.xp6(7),e.Q6J("ngModel",t.headerTextColor),e.xp6(1),e.Q6J("ngModel",t.headerTextColor),e.xp6(7),e.Q6J("ngModel",t.headerFontSize),e.xp6(7),e.Q6J("ngModel",t.welcomeTextColor),e.xp6(1),e.Q6J("ngModel",t.welcomeTextColor),e.xp6(7),e.Q6J("ngModel",t.welcomeFontSize),e.xp6(7),e.Q6J("ngModel",t.footerBackgroundColor),e.xp6(1),e.Q6J("ngModel",t.footerBackgroundColor),e.xp6(7),e.Q6J("ngModel",t.footerTextColor),e.xp6(1),e.Q6J("ngModel",t.footerTextColor),e.xp6(7),e.Q6J("ngModel",t.footerFontSize),e.xp6(1),e.Q6J("isOpen",t.accordionStatus.isThirdopen),e.xp6(2),e.Q6J("ngClass",t.accordionStatus.isThirdopen?"template-blue":"light-black"),e.xp6(3),e.Q6J("ngClass",t.accordionStatus.isThirdopen?"rotateicon":"resumeiconstate"),e.xp6(5),e.Q6J("ngIf",t.refreshSpan),e.xp6(4),e.Q6J("ngIf",t.refreshSpan),e.xp6(2),e.Q6J("ngIf",void 0!==t.langlist&&t.langlist.length>0),e.xp6(2),e.Udp("background-color",t.headerColor),e.Q6J("ngClass",e.WLB(75,bd,t.headerlogoBase64,!t.headerlogoBase64)),e.xp6(1),e.Q6J("ngIf",t.headerlogoBase64),e.xp6(1),e.Q6J("ngIf",!t.headerlogoBase64),e.xp6(2),e.Q6J("ngStyle",t.welcomeStyle())("innerHTML",t.editorDataWelcome?e.xi3(160,54,t.editorDataWelcome,"html"):t.welcomeText,e.oJD),e.xp6(2),e.Q6J("ngIf",null!=t.webFormControlList&&t.webFormControlList.length>0)}}function Cd(o,r){if(1&o&&(e.TgZ(0,"option",220),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(3);e.Q6J("value",i.approver_id)("selected",i.approver_id===t.selectedApproverID),e.xp6(1),e.hij(" ",i.user_name," ")}}function vd(o,r){if(1&o&&(e.ynx(0),e.YNc(1,Cd,2,3,"option",315),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf"," "!==i.user_name&&i.email_verified)}}function yd(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Default approver is required"),e.qZA())}function Td(o,r){if(1&o&&(e.TgZ(0,"div",64),e.YNc(1,yd,2,0,"div",55),e.qZA()),2&o){e.oxw();const i=e.MAs(8);e.xp6(1),e.Q6J("ngIf",null==i.errors?null:i.errors.required)}}function wd(o,r){if(1&o&&(e.TgZ(0,"option",220),e._uU(1),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(3);e.Q6J("value",i.id)("selected",i.id===t.workflow),e.xp6(1),e.hij(" ",i.workflow_name," ")}}function Zd(o,r){if(1&o&&(e.ynx(0),e.YNc(1,wd,2,3,"option",315),e.BQk()),2&o){const i=r.$implicit;e.xp6(1),e.Q6J("ngIf","active"==i.workflow_status)}}function Fd(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Workflow is required"),e.qZA())}function Id(o,r){if(1&o&&(e.TgZ(0,"div",64),e.YNc(1,Fd,2,0,"div",55),e.qZA()),2&o){e.oxw();const i=e.MAs(16);e.xp6(1),e.Q6J("ngIf",null==i.errors?null:i.errors.required)}}function Sd(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",220),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit,t=e.oxw(3);e.xp6(1),e.Q6J("value",i.id)("selected",i.id===t.emailsender),e.xp6(1),e.AsE(" ",i.from_name," - ",i.from_email," ")}}function Ad(o,r){if(1&o&&(e.ynx(0),e.TgZ(1,"option",220),e._uU(2),e.qZA(),e.BQk()),2&o){const i=r.$implicit,t=e.oxw(4);e.xp6(1),e.Q6J("value",i.id)("selected",i.id===t.emailsender),e.xp6(1),e.AsE(" ",i.sender_name," - ",i.sender_email," ")}}function qd(o,r){if(1&o&&(e.TgZ(0,"optgroup",316),e.YNc(1,Ad,3,4,"ng-container",172),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",i.emailSmtpSenderList)}}function kd(o,r){1&o&&(e.TgZ(0,"div"),e._uU(1,"Default days is required"),e.qZA())}function Dd(o,r){if(1&o&&(e.TgZ(0,"div",317),e.YNc(1,kd,2,0,"div",55),e.qZA()),2&o){e.oxw();const i=e.MAs(37),t=e.oxw(2);e.Q6J("ngClass",null!=i.errors&&i.errors.required||!t.errorMsgdaysleft?"p-1":""),e.xp6(1),e.Q6J("ngIf",null==i.errors?null:i.errors.required)}}function Ld(o,r){if(1&o&&(e.TgZ(0,"div",318),e._uU(1),e.qZA()),2&o){const i=e.oxw(3);e.xp6(1),e.Oqu(i.errorMsgdaysleft)}}function Md(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",285)(1,"div",319)(2,"div",320)(3,"p-radioButton",321),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.prePostEmail=n)})("onClick",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.updateButtonAction())}),e.qZA(),e.TgZ(4,"label",322),e._uU(5,"Pre Email Verification"),e.qZA()(),e.TgZ(6,"div",320)(7,"p-radioButton",323),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.prePostEmail=n)})("onClick",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.updateButtonAction())}),e.qZA(),e.TgZ(8,"label",324),e._uU(9,"Post Email Verification"),e.qZA()()()()}if(2&o){const i=e.oxw(3);e.xp6(3),e.Q6J("value",!0)("ngModel",i.prePostEmail),e.xp6(4),e.Q6J("value",!1)("ngModel",i.prePostEmail)}}const Od=function(o,r){return{show:o,hide:r}};function Nd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",283)(1,"form",null,284)(3,"div",285)(4,"label",286),e._uU(5," Default Approver"),e._UZ(6,"i",44),e.qZA(),e.TgZ(7,"select",287,288),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeControlValue(n))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.selectedApproverID=n)}),e.YNc(9,vd,2,1,"ng-container",172),e.qZA(),e.YNc(10,Td,2,1,"div",46),e.qZA(),e.TgZ(11,"div",285)(12,"label",289),e._uU(13," Select Workflow"),e._UZ(14,"i",44),e.qZA(),e.TgZ(15,"select",290,291),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.workflow=n)})("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeControlValue(n))}),e.ALo(17,"async"),e.ALo(18,"async"),e.YNc(19,Zd,2,1,"ng-container",172),e.qZA(),e.YNc(20,Id,2,1,"div",46),e.qZA(),e.TgZ(21,"div",285)(22,"label",292),e._uU(23," Send Email as"),e.qZA(),e.TgZ(24,"select",293,294),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.emailsender=n)})("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeControlValue(n))}),e.TgZ(26,"optgroup",295)(27,"option",296),e._uU(28),e.qZA()(),e.TgZ(29,"optgroup",297),e.YNc(30,Sd,3,4,"ng-container",172),e.qZA(),e.YNc(31,qd,2,1,"optgroup",298),e.qZA()(),e.TgZ(32,"div",285)(33,"label",299),e._uU(34,"Default days to respond"),e._UZ(35,"i",44),e.qZA(),e.TgZ(36,"input",300,301),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.daysleft=n)})("input",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onChangeDaysLeft(n,s.daysleft))}),e.qZA(),e.YNc(38,Dd,2,2,"div",302),e.YNc(39,Ld,2,1,"div",303),e.qZA(),e.TgZ(40,"div",285)(41,"label",304)(42,"span"),e._uU(43,"Allow attachment"),e.qZA()(),e.TgZ(44,"label",305)(45,"input",306),e.NdJ("click",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.allowFileupload(n))}),e.qZA(),e._UZ(46,"span",307),e.qZA(),e.TgZ(47,"div",308)(48,"span"),e._uU(49,"Allow user to attach file through portal"),e.qZA()(),e.TgZ(50,"div",309)(
151,"label",304)(52,"span"),e._uU(53," Required Attachment "),e.qZA()(),e.TgZ(54,"label",310)(55,"input",160),e.NdJ("change",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.onCheckboxChangeUpload(n))}),e.qZA(),e._UZ(56,"span",307),e.qZA(),e.TgZ(57,"div",311)(58,"span"),e._uU(59," User must attach file"),e.qZA()()()(),e.TgZ(60,"div",285)(61,"label",304)(62,"span"),e._uU(63,"Email Verification"),e.qZA()(),e.TgZ(64,"label",312)(65,"input",306),e.NdJ("click",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.allowEmailVerification(n))}),e.qZA(),e._UZ(66,"span",307),e.qZA(),e.TgZ(67,"div",308),e._uU(68," Requires user to verify their email address "),e.qZA()(),e.YNc(69,Md,10,4,"div",313),e.TgZ(70,"div",285)(71,"label",304)(72,"span"),e._uU(73,"Captcha Verification"),e.qZA()(),e.TgZ(74,"label",314)(75,"input",306),e.NdJ("click",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.allowCaptchaVerification(n))}),e.qZA(),e._UZ(76,"span",307),e.qZA(),e.TgZ(77,"div",308)(78,"span"),e._uU(79,"Require CAPTCHA Validation"),e.qZA()()()()()}if(2&o){const i=e.MAs(8),t=e.MAs(16),n=e.MAs(37),s=e.oxw(2);e.xp6(7),e.Q6J("ngModel",s.selectedApproverID)("ngClass",e.VKq(29,z,i.invalid&&(null==i.errors?null:i.errors.required)&&s.isdraftsubmitted)),e.xp6(2),e.Q6J("ngForOf",s.ApproverList),e.xp6(1),e.Q6J("ngIf",i.invalid),e.xp6(5),e.Q6J("disabled",e.lcZ(17,25,s.isSelectWorkFlowDisabled))("tooltip",!0===e.lcZ(18,27,s.isSelectWorkFlowDisabled)?"Workflow cannot be altered after a request is submitted via this webform.":"")("ngModel",s.workflow)("ngClass",e.VKq(31,z,t.invalid&&(null==t.errors?null:t.errors.required)&&s.isdraftsubmitted)),e.xp6(4),e.Q6J("ngForOf",s.workFlowList),e.xp6(1),e.Q6J("ngIf",t.invalid&&s.isdraftsubmitted),e.xp6(4),e.Q6J("ngModel",s.emailsender),e.xp6(3),e.Q6J("selected",""==s.emailSenderList||0==s.emailSenderList.length||"00000000-0000-0000-0000-000000000000"==s.emailsender),e.xp6(1),e.Oqu(s.noReplyEmailId),e.xp6(2),e.Q6J("ngForOf",s.emailSenderList),e.xp6(1),e.Q6J("ngIf",s.emailSmtpSenderList.length>0),e.xp6(5),e.Q6J("ngModel",s.daysleft)("ngClass",e.VKq(33,z,n.invalid||n.invalid&&(null==n.errors?null:n.errors.required)&&s.isdraftsubmitted)),e.xp6(2),e.Q6J("ngIf",n.invalid&&s.isdraftsubmitted||n.invalid),e.xp6(1),e.Q6J("ngIf",!(null!=n.errors&&n.errors.required)&&s.errorMsgdaysleft),e.xp6(6),e.Q6J("checked",s.isFileUploadRequired),e.xp6(5),e.Q6J("ngClass",e.WLB(35,Od,s.isFileuploadRequiredFieldVisible||!s.isFileuploadRequiredFieldVisible&&s.isFileUploadRequired,!s.isFileuploadRequiredFieldVisible||s.isFileuploadRequiredFieldVisible&&s.isFileUploadRequired)),e.xp6(
15),e.Q6J("checked",s.isFileuploadRequiredField),e.xp6(10),e.Q6J("checked",s.isEmailVerificationRequired),e.xp6(4),e.Q6J("ngIf",s.isEmailVerificationRequired),e.xp6(6),e.Q6J("checked",s.isCaptchaVerificationRequired)}}function Jd(o,r){if(1&o&&e._UZ(0,"app-dsar-system",325),2&o){const i=e.oxw(2);e.Q6J("formObject",i.formObject)("formID",i.crid)}}function Qd(o,r){1&o&&(e.TgZ(0,"div",337),e._uU(1,"Integrate options will be available once the webform is published. "),e.qZA())}function Ud(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",338)(1,"p",339)(2,"span",340)(3,"span",341),e._UZ(4,"i",342),e.qZA(),e._uU(5,"Add script"),e.qZA(),e.TgZ(6,"button",343),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.copyToClipBoard("embedcode"))}),e._uU(7,"Copy"),e.qZA()(),e.TgZ(8,"div",344,345)(10,"pre",346)(11,"code"),e._uU(12,"  "),e.TgZ(13,"span",347),e._uU(14,"<style>"),e.qZA(),e._uU(15,"\n        "),e.TgZ(16,"span",348),e._uU(17),e.qZA(),e._uU(18,"\n            "),e.TgZ(19,"span",349),e._uU(20,"max"),e.qZA(),e.TgZ(21,"span",350),e._uU(22,"-"),e.qZA(),e.TgZ(23,"span",349),e._uU(24,"width"),e.qZA(),e.TgZ(25,"span",350),e._uU(26,":"),e.qZA(),e._uU(27," "),e.TgZ(28,"span",351),e._uU(29,"100%"),e.qZA(),e.TgZ(30,"span",350),e._uU(31,";"),e.qZA(),e.TgZ(32,"span",349),e._uU(33,"\n            height"),e.qZA(),e.TgZ(34,"span",350),e._uU(35,":"),e.qZA(),e._uU(36," "),e.TgZ(37,"span",351),e._uU(38,"800px"),e.qZA(),e.TgZ(39,"span",350),e._uU(40,";"),e.qZA(),e.TgZ(41,"span",349),e._uU(42,"\n            border"),e.qZA(),e.TgZ(43,"span",350),e._uU(44,":"),e.qZA(),e._uU(45," "),e.TgZ(46,"span",351),e._uU(47,"1px"),e.qZA(),e.TgZ(48,"span",349),e._uU(49," solid "),e.qZA(),e.TgZ(50,"span",352),e._uU(51,"#c0c2c7;"),e.qZA(),e.TgZ(52,"span",349),e._uU(53,"\n            margin"),e.qZA(),e.TgZ(54,"span",350),e._uU(55,":"),e.qZA(),e._uU(56," "),e.TgZ(57,"span",353),e._uU(58,"auto"),e.qZA(),e.TgZ(59,"span",350),e._uU(60,";"),e.qZA(),e.TgZ(61,"span",349),e._uU(62,"\n            text-align"),e.qZA(),e.TgZ(63,"span",350),e._uU(64,":"),e.qZA(),e._uU(65," "),e.TgZ(66,"span",351),e._uU(67,"center"),e.qZA(),e.TgZ(68,"span",350),e._uU(69,";"),e.qZA(),e._uU(70,"\n        "),e.TgZ(71,"span",348),e._uU(72),e.qZA(),e._uU(73,"\n\n        "),e.TgZ(74,"span",348),e._uU(75),e.qZA(),e._uU(76,"\n            "),e.TgZ(77,"span",349),e._uU(78,"min"),e.qZA(),e.TgZ(79,"span",350),e._uU(80,"-"),e.qZA(),e.TgZ(81,"span",349),e._uU(82,"width"),e.qZA(),e.TgZ(83,"span",350),e._uU(84,":"),e.qZA(),e._uU(85," "),e.TgZ(86,"span",351),e._uU(87,"450px"),e.qZA(),e.TgZ(88,"span",350),e._uU(89,";"),e.qZA(),e.TgZ(90,"span",349),e._uU(91,"\n            height"),e.qZA(),e.TgZ(92,"span",350),e._uU(93,":"),e.qZA(),e._uU(94," "),e.TgZ(95,"span",351),e._uU(96,"800px"),e.qZA(),e.TgZ(97,"span",350),e._uU(98,";"),e.qZA(),e.TgZ(99,"span",349),e._uU(100,"\n            border"),e.qZA(),e.TgZ(101,"span",350),e._uU(102,":"),e.qZA(),e._uU(103," "),e.TgZ(104,"span",351),e._uU(105,"1px"),e.qZA(),e.TgZ(106,"span",349),e._uU(107," solid "),e.qZA(),e.TgZ(108,"span",352),e._uU(109,"#c0c2c7;"),e.qZA(),e.TgZ(110,"span",349),e._uU(111,"\n            margin"),e.qZA(),e.TgZ(112,"span",350),e._uU(113,":"),e.qZA(),e._uU(114," "),e.TgZ(115,"span",353),e._uU(116,"0 auto"),e.qZA(),e.TgZ(117,"span",350),e._uU(118,";"),e.qZA(),e._uU(119,"\n             "),e.TgZ(120,"span",348),e._uU(121),e.qZA(),e._uU(122,"\n  "),e.TgZ(123,"span",347),e._uU(124,"</style>"),e.qZA(),e._uU(125,"\n"),e.qZA()(),e.TgZ(126,"pre",354)(127,"code")(128,"span",355),e._uU(129,'<div class="az-form-wrapper">'),e.qZA(),e._uU(130,"\n    "),e.TgZ(131,"span",355),e._uU(132,"<iframe"),e.qZA(),e._uU(133," "),e.TgZ(134,"span",356),e._uU(135,"src="),e.qZA(),e.TgZ(136,"span",357),e._uU(137),e.qZA(),e.TgZ(138,"span",355),e._uU(139,">"),e.qZA(),e._uU(140,"\n    "),e.TgZ(141,"span",355),e._uU(142,"</iframe>"),e.qZA(),e._uU(143,"\n"),e.TgZ(144,"span",355),e._uU(145,"</div>"),e.qZA(),e._uU(146,"\n"),e.qZA(),e._uU(147,"\n"),e.qZA()()()}if(2&o){const i=e.oxw(4);e.Q6J("ngClass",e.WLB(6,j,!i.isWebFormPublished,i.isWebFormPublished)),e.xp6(17),e.Oqu(".az-form-wrapper {"),e.xp6(55),e.Oqu("}"),e.xp6(3),e.Oqu(".az-form-wrapper iframe {"),e.xp6(46),e.Oqu("}"),e.xp6(16),e.hij('"',i.scriptcode,'"')}}function Bd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",338)(1,"p",339)(2,"span",340)(3,"span",341),e._UZ(4,"i",342),e.qZA(),e._uU(5,"Add script"),e.qZA(),e.TgZ(6,"button",343),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(4);return e.KtG(n.copyToClipBoard("embedcode"))}),e._uU(7,"Copy"),e.qZA()(),e.TgZ(8,"div",344,345)(10,"pre",346),e._uU(11,"                  "),e.TgZ(12,"code"),e._uU(13,"  "),e.TgZ(14,"span",347),e._uU(15,"<style>"),e.qZA(),e._uU(16,"\n                          "),e.TgZ(17,"span",348),e._uU(18),e.qZA(),e._uU(19,"\n                              "),e.TgZ(20,"span",349),e._uU(21,"max"),e.qZA(),e.TgZ(22,"span",350),e._uU(23,"-"),e.qZA(),e.TgZ(24,"span",349),e._uU(25,"width"),e.qZA(),e.TgZ(26,"span",350),e._uU(27,":"),e.qZA(),e._uU(28," "),e.TgZ(29,"span",351),e._uU(30,"100%"),e.qZA(),e.TgZ(31,"span",350),e._uU(32,";"),e.qZA(),e.TgZ(33,"span",349),e._uU(34,"\n                              height"),e.qZA(),e.TgZ(35,"span",350),e._uU(36,":"),e.qZA(),e._uU(37," "),e.TgZ(38,"span",351),e._uU(39,"800px"),e.qZA(),e.TgZ(40,"span",350),e._uU(41,";"),e.qZA(),e.TgZ(42,"span",349),e._uU(43,"\n                              border"),e.qZA(),e.TgZ(44,"span",350),e._uU(45,":"),e.qZA(),e._uU(46," "),e.TgZ(47,"span",351),e._uU(48,"1px"),e.qZA(),e.TgZ(49,"span",349),e._uU(50," solid "),e.qZA(),e.TgZ(51,"span",352),e._uU(52,"#c0c2c7;"),e.qZA(),e.TgZ(53,"span",349),e._uU(54,"\n                              margin"),e.qZA(),e.TgZ(55,"span",350),e._uU(56,":"),e.qZA(),e._uU(57," "),e.TgZ(58,"span",353),e._uU(59,"auto"),e.qZA(),e.TgZ(60,"span",350),e._uU(61,";"),e.qZA(),e.TgZ(62,"span",349),e._uU(63,"\n                              text-align"),e.qZA(),e.TgZ(64,"span",350),e._uU(65,":"),e.qZA(),e._uU(66," "),e.TgZ(67,"span",351),e._uU(68,"center"),e.qZA(),e.TgZ(69,"span",350),e._uU(70,";"),e.qZA(),e._uU(71,"\n                          "),e.TgZ(72,"span",348),e._uU(73),e.qZA(),e._uU(74,"\n\n                          "),e.TgZ(75,"span",348),e._uU(76),e.qZA(),e._uU(77,"\n                              "),e.TgZ(78,"span",349),e._uU(79,"min"),e.qZA(),e.TgZ(80,"span",350),e._uU(81,"-"),e.qZA(),e.TgZ(82,"span",349),e._uU(83,"width"),e.qZA(),e.TgZ(84,"span",350),e._uU(85,":"),e.qZA(),e._uU(86," "),e.TgZ(87,"span",351),e._uU(88,"450px"),e.qZA(),e.TgZ(89,"span",350),e._uU(90,";"),e.qZA(),e.TgZ(91,"span",349),e._uU(92,"\n                              height"),e.qZA(),e.TgZ(93,"span",350),e._uU(94,":"),e.qZA(),e._uU(95," "),e.TgZ(96,"span",351),e._uU(97,"800px"),e.qZA(),e.TgZ(98,"span",350),e._uU(99,";"),e.qZA(),e.TgZ(100,"span",349),e._uU(101,"\n                              border"),e.qZA(),e.TgZ(102,"span",350),e._uU(103,":"),e.qZA(),e._uU(104," "),e.TgZ(105,"span",351),e._uU(106,"1px"),e.qZA(),e.TgZ(107,"span",349),e._uU(108," solid "),e.qZA(),e.TgZ(109,"span",352),e._uU(110,"#c0c2c7;"),e.qZA(),e.TgZ(111,"span",349),e._uU(112,"\n                              margin"),e.qZA(),e.TgZ(113,"span",350),e._uU(114,":"),e.qZA(),e._uU(115," "),e.TgZ(116,"span",353),e._uU(117,"0 auto"),e.qZA(),e.TgZ(118,"span",350),e._uU(119,";"),e.qZA(),e._uU(120,"\n                               "),e.TgZ(121,"span",348),e._uU(122),e.qZA(),e._uU(123,"\n                    "),e.TgZ(124,"span",347),e._uU(125,"</style>"),e.qZA(),e._uU(126,"\n                  "),e.qZA()(),e.TgZ(127,"pre",354),e._uU(128,"                  "),e.TgZ(129,"code")(130,"span",355),e._uU(131,'<div class="az-form-wrapper">'),e.qZA(),e._uU(132,"\n                      "),e.TgZ(133,"span",355),e._uU(134,"<iframe"),e.qZA(),e._uU(135," "),e.TgZ(136,"span",356),e._uU(137,"src="),e.qZA(),e.TgZ(138,"span",357),e._uU(139),e.qZA(),e.TgZ(140,"span",355),e._uU(141,">"),e.qZA(),e._uU(142,"\n                      "),e.TgZ(143,"span",355),e._uU(144,"</iframe>"),e.qZA(),e._uU(145,"\n                  "),e.TgZ(146,"span",355),e._uU(147,"</div>"),e.qZA(),e._uU(148,"\n                  "),e.qZA(),e._uU(149,"\n                  "),e.qZA()()()}if(2&o){const i=e.oxw(4);e.Q6J("ngClass",e.WLB(6,j,!i.isWebFormPublished,i.isWebFormPublished)),e.xp6(18),e.Oqu(".az-form-wrapper {"),e.xp6(55),e.Oqu("}"),e.xp6(3),e.Oqu(".az-form-wrapper iframe {"),e.xp6(46),e.Oqu("}"),e.xp6(17),e.hij('"',i.shortendUrl,'"')}}function Rd(o,r){if(1&o){const i=e.EpF();e.YNc(0,Qd,2,0,"div",330),e.TgZ(1,"div",331)(2,"p-radioButton",332),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.selectedLinkType=n)})("onClick",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.showUrlType("longUrl"))}),e.qZA(),e.TgZ(3,"label",333),e._uU(4,"Full Link"),e.qZA(),e.TgZ(5,"p-radioButton",334),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(3);return e.KtG(s.selectedLinkType=n)})("onClick",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.showUrlType("shortUrl"))}),e.qZA(),e.TgZ(6,"label",335),e._uU(7,"Shortened Link"),e.qZA()(),e.YNc(8,Ud,148,9,"div",336),e.YNc(9,Bd,150,9,"div",336)}if(2&o){const i=e.oxw(3);e.Q6J("ngIf",!i.isWebFormPublished),e.xp6(2),e.Q6J("ngModel",i.selectedLinkType),e.xp6(3),e.Q6J("ngModel",i.selectedLinkType),e.xp6(3),e.Q6J("ngIf","longUrl"===i.selectedLinkType),e.xp6(1),e.Q6J("ngIf","shortUrl"===i.selectedLinkType)}}function Ed(o,r){1&o&&(e.TgZ(0,"div",337),e._uU(1,"Integrate options will be available once the webform is published. "),e.qZA())}
1function jd(o,r){if(1&o){const i=e.EpF();e.YNc(0,Ed,2,0,"div",330),e.TgZ(1,"div",338)(2,"p",339)(3,"span",340)(4,"span",341),e._UZ(5,"i",342),e.qZA(),e._uU(6," Web Form - Long URL"),e.qZA(),e.TgZ(7,"button",343),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.copyToClipBoard("sharelink"))}),e._uU(8,"Copy"),e.qZA()(),e.TgZ(9,"div",358,359)(11,"pre",354)(12,"code")(13,"span",357),e._uU(14),e.qZA()()()()(),e.TgZ(15,"div",338)(16,"p",339)(17,"span",340)(18,"span",341),e._UZ(19,"i",342),e.qZA(),e._uU(20," Web Form - Short URL"),e.qZA(),e.TgZ(21,"button",343),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3);return e.KtG(n.copyToClipBoard("shortSharelink"))}),e._uU(22,"Copy"),e.qZA()(),e.TgZ(23,"div",358,360)(25,"pre",354)(26,"code")(27,"span",357),e._uU(28),e.qZA()()()()()}if(2&o){const i=e.oxw(3);e.Q6J("ngIf",!i.isWebFormPublished),e.xp6(1),e.Q6J("ngClass",e.WLB(5,j,!i.isWebFormPublished,i.isWebFormPublished)),e.xp6(13),e.hij('"',i.scriptcode,'"'),e.xp6(1),e.Q6J("ngClass",e.WLB(8,j,!i.isWebFormPublished,i.isWebFormPublished)),e.xp6(13),e.hij('"',i.shortendUrl,'"')}}function Hd(o,r){if(1&o&&(e.TgZ(0,"div",326)(1,"ul",327,27)(3,"li",328)(4,"a",29),e._uU(5,"Embed Code"),e.qZA(),e.YNc(6,Rd,10,5,"ng-template",30),e.qZA(),e.TgZ(7,"li",328)(8,"a",29),e._uU(9,"Share Link"),e.qZA(),e.YNc(10,jd,29,11,"ng-template",30),e.qZA()()(),e._UZ(11,"div",329)),2&o){const i=e.MAs(2),t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.WLB(2,j,!t.isWebFormPublished,t.isWebFormPublished)),e.xp6(10),e.Q6J("ngbNavOutlet",i)}}function Gd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",361),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.togglePublish())}),e._uU(1),e.qZA()}if(2&o){const i=e.oxw(2);e.Q6J("ngClass",!i.isWebFormPublished||i.isEditingPublishedForm||i.isResetlinkEnable?"btn-blue":"btn-yellow")("disabled",i.isFormFieldsEmpty||!i.isDirty&&i.isWebFormPublished&&!i.isEditingPublishedForm&&!i.isResetlinkEnable||null==i.daysleft||i.daysleft<0||0==i.daysleft||i.daysleft>90),e.xp6(1),e.hij(" ",!i.isWebFormPublished||i.isEditingPublishedForm||i.isResetlinkEnable?" Publish":"Save","")}}const Yd=function(o,r){return{"min-width-75":o,"":r}};function Pd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",18)(1,"div",19)(2,"h3",20)(3,"span",21),e._uU(4),e.qZA(),e.TgZ(5,"div",22)(6,"div",23),e.YNc(7,la,2,5,"button",24),e.YNc(8,aa,5,0,"ul",25),e.qZA()()()(),e.TgZ(9,"ul",26,27),e.NdJ("navChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.onNavChange(n))})("activeIdChange",function(n){e.CHM(i);const s=e.oxw();return e.KtG(s.active=n)}),e.TgZ(11,"li",28)(12,"a",29),e._uU(13,"1 Basic"),e.qZA(),e.YNc(14,Ca,34,19,"ng-template",30),e.qZA(),e.TgZ(15,"li",28)(16,"a",29),e._uU(17,"2 Form"),e.qZA(),e.YNc(18,xd,162,78,"ng-template",30),e.qZA(),e.TgZ(19,"li",28)(20,"a",29),e._uU(21,"3 Settings"),e.qZA(),e.YNc(22,Nd,80,38,"ng-template",30),e.qZA(),e.TgZ(23,"li",28)(24,"a",29),e._uU(25,"4 System"),e.qZA(),e.YNc(26,Jd,1,2,"ng-template",30),e.qZA(),e.TgZ(27,"li",28)(28,"a",29),e._uU(29,"5 Integrate"),e.qZA(),e.YNc(30,Hd,12,5,"ng-template",30),e.qZA(),e.TgZ(31,"li")(32,"div",31)(33,"button",32),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.addUpdateDSARForm("save"))}),e._uU(34," Save"),e.qZA(),e.YNc(35,Gd,2,3,"button",33),e.qZA()()(),e._UZ(36,"div",34),e.qZA()}if(2&o){const i=e.MAs(10),t=e.oxw();e.xp6(3),e.Q6J("ngClass","Publish"===t.showFormStatus()?"badge-primary":"badge-secondary"),e.xp6(1),e.Oqu("Publish"===t.showFormStatus()?"Active":"Draft"),e.xp6(3),e.Q6J("ngIf",null!==t.crid),e.xp6(2),e.Q6J("activeId",t.active),e.xp6(2),e.Q6J("ngbNavItem",1)("destroyOnHide",!1),e.xp6(4),e.Q6J("ngbNavItem",2)("destroyOnHide",!1),e.xp6(4),e.Q6J("ngbNavItem",3)("destroyOnHide",!1),e.xp6(4),e.Q6J("ngbNavItem",4)("destroyOnHide",!0),e.xp6(4),e.Q6J("ngbNavItem",5)("destroyOnHide",!1),e.xp6(5),e.Q6J("ngClass",e.WLB(19,Yd,t.isWebFormPublished&&t.isDraftWebForm,null!==t.crid)),e.xp6(1),e.Q6J("ngClass",t.isWebFormPublished&&!t.isEditingPublishedForm||5===t.active?"hide":"")("disabled",t.isFormFieldsEmpty||!t.isDirty&&!t.isDraftWebForm&&2!==t.active||!t.isDirty&&t.isDraftWebForm||null==t.daysleft||t.daysleft<0||0==t.daysleft||t.daysleft>90),e.xp6(2),e.Q6J("ngIf",null!==t.crid),e.xp6(1),e.Q6J("ngbNavOutlet",i)}}
1function Kd(o,r){1&o&&(e.TgZ(0,"h4",369),e._uU(1,"Welcome Text"),e.qZA())}function zd(o,r){1&o&&(e.TgZ(0,"h4",369),e._uU(1,"Footer Text"),e.qZA())}function Wd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",370)(1,"form",371),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmitQuillEditorData())}),e.TgZ(2,"quill-editor",372),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.editorDataWelcome=n)}),e.qZA(),e.TgZ(3,"button",373),e._uU(4,"Save"),e.qZA(),e.TgZ(5,"button",374),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onCloseWelcomeTextEditor())}),e._uU(6,"Close"),e.qZA()()()}if(2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("formGroup",i.quillEditorText),e.xp6(1),e.Q6J("modules",i.quillConfig)("ngModel",i.editorDataWelcome)}}function Vd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",370)(1,"form",371),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onSubmitQuillEditorData())}),e.TgZ(2,"quill-editor",372),e.NdJ("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2);return e.KtG(s.editorDataFooter=n)}),e.qZA(),e.TgZ(3,"button",373),e._uU(4,"Save"),e.qZA(),e.TgZ(5,"button",374),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(2);return e.KtG(n.onCloseFooterTextEditor())}),e._uU(6,"Close"),e.qZA()()()}if(2&o){const i=e.oxw(2);e.xp6(1),e.Q6J("formGroup",i.quillEditorText),e.xp6(1),e.Q6J("modules",i.quillConfig)("ngModel",i.editorDataFooter)}}function $d(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",362),e.YNc(1,Kd,2,0,"h4",363),e.YNc(2,zd,2,0,"ng-template",null,364,e.W1O),e.TgZ(4,"button",365),e.NdJ("click",function(){const s=e.CHM(i).$implicit;return e.KtG(s.dismiss("Close Clicked"))}),e.TgZ(5,"span",366),e._uU(6,"\xd7"),e.qZA()()(),e.YNc(7,Wd,7,3,"div",367),e.YNc(8,Vd,7,3,"ng-template",null,368,e.W1O)}if(2&o){const i=e.MAs(3),t=e.MAs(9),n=e.oxw();e.xp6(1),e.Q6J("ngIf",n.isWelcomeEditor)("ngIfElse",i),e.xp6(6),e.Q6J("ngIf",n.isWelcomeEditor)("ngIfElse",t)}}function Xd(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"Do you want to save published form."),e.qZA(),e.TgZ(3,"button",376),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.confirmForEditing())}),e._uU(4,"Yes"),e.qZA(),e.TgZ(5,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.closeModal())}),e._uU(6,"No"),e.qZA()()}}function ep(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"Do you want to save your changes?"),e.qZA(),e.TgZ(3,"button",376),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.addUpdateDSARForm("nav"))}),e._uU(4,"Yes"),e.qZA(),e.TgZ(5,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.resetWebform())}),e._uU(6,"No"),e.qZA()()}}function tp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",390),e.NdJ("click",function(){e.CHM(i);const n=e.oxw().$implicit,s=e.oxw(2);return e.KtG(s.onClickLanguageTab(n))}),e._uU(1),e.qZA()}if(2&o){const i=e.oxw().$implicit,t=e.oxw(2);e.Q6J("ngClass",i.keyvalue==t.currentLangDivLang?"btn-primary":"btn-secondary "),e.xp6(1),e.Oqu(i.label)}}function ip(o,r){if(1&o&&(e.TgZ(0,"li"),e.YNc(1,tp,2,2,"button",389),e.qZA()),2&o){const i=r.$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.keyvalue!==t.languageSelected)}}function np(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"button",165),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3),s=n.$implicit,l=n.index,a=e.oxw(2);return e.KtG(a.onClickSaveByLang(s.keyvalue,l))}),e._uU(1,"Save"),e.qZA()}}function op(o,r){1&o&&(e.TgZ(0,"span",176),e._uU(1,"Name of control is mandatory"),e.qZA())}function sp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"li")(1,"div",346)(2,"div",398)(3,"div")(4,"input",399,208),e.NdJ("ngModelChange",function(n){const s=e.CHM(i),l=s.$implicit,a=s.index,d=e.oxw(3).$implicit,p=e.oxw(2);return e.KtG(p.selfNgModel[l.name+d.keyvalue+a]=n)})("input",function(n){const l=e.CHM(i).index,a=e.oxw(5);return e.KtG(a.onEntertext(n,l))}),e.qZA(),e.YNc(6,op,2,0,"span",174),e.qZA(),e.TgZ(7,"button",400),e.NdJ("click",function(){e.CHM(i);const n=e.oxw(3),s=n.$implicit,l=n.index,a=e.oxw(2);return e.KtG(a.onClickSaveByLang(s.keyvalue,l))}),e._uU(8),e.qZA()()()()}if(2&o){const i=r.$implicit,t=r.index,n=r.last,s=e.oxw(3).$implicit,l=e.oxw(2);e.xp6(2),e.Q6J("ngClass",n?"lastcontrol":""),e.xp6(2),e.hYB("placeholder","type ",i.name," in ",s.label,""),e.Q6J("ngModel",l.selfNgModel[i.name+s.keyvalue+t])("ngModelOptions",e.DdM(8,ie)),e.xp6(2),e.Q6J("ngIf",l.isvali
1dcustomfield&&l.ispopupFormSubmitted&&""==l.selfNgModel[i.name+s.keyvalue+t]),e.xp6(1),e.Q6J("ngClass",n?"show-submit-btn":"hide-submit-btn"),e.xp6(1),e.hij("Save in ",s.label,"")}}function rp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",392)(1,"div",393)(2,"label",180),e._uU(3),e.TgZ(4,"input",394,170),e.NdJ("input",function(n){e.CHM(i);const s=e.oxw(2).index,l=e.oxw(2);return e.KtG(l.onEnterTitletext(n,s))})("ngModelChange",function(n){e.CHM(i);const s=e.oxw(2),l=s.$implicit,a=s.index,d=e.oxw(2);return e.KtG(d.selfNgModel["lblTextLang"+l.keyvalue+a]=n)}),e.qZA()(),e.YNc(6,np,2,0,"button",395),e.qZA(),e.TgZ(7,"div",396)(8,"ul",397),e.YNc(9,sp,9,9,"li",219),e.qZA()()()}if(2&o){const i=e.oxw(2),t=i.$implicit,n=i.index,s=e.oxw(2);e.xp6(3),e.AsE(" ",s.generaltext.addcontrol," in ",t.label," "),e.xp6(1),e.hYB("placeholder","type  ",s.lblText?s.lblText:s.formControlLabel," in ",t.label,""),e.Q6J("ngModel",s.selfNgModel["lblTextLang"+t.keyvalue+n]),e.xp6(2),e.Q6J("ngIf","radio"!==s.selectedFormOption&&"select"!==s.selectedFormOption&&"checkbox"!==s.selectedFormOption),e.xp6(3),e.Q6J("ngForOf",s.selectOptions)("ngForTrackBy",s.trackBySelectOption)}}function lp(o,r){if(1&o&&(e.TgZ(0,"div"),e.YNc(1,rp,10,8,"div",391),e.qZA()),2&o){const i=e.oxw().$implicit,t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.keyvalue!==t.languageSelected)}}function ap(o,r){if(1&o&&(e.ynx(0),e.YNc(1,lp,2,1,"div",55),e.BQk()),2&o){const i=r.index,t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.currentLangDivIndex==i)}}const Ee=function(o){return{hidebtns:o}},cp=function(o){return{transform:o}};function dp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",362)(1,"h5",369),e._uU(2,"Translate controls with preferred languages"),e.qZA(),e.TgZ(3,"button",365),e.NdJ("click",function(){const s=e.CHM(i).$implicit;return e.oxw().cancelAddingFormControl("cancel"),e.KtG(s.dismiss("Close Clicked"))}),e.TgZ(4,"span",366),e._uU(5,"\xd7"),e.qZA()()(),e.TgZ(6,"div",378)(7,"div",379)(8,"button",380),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onPreviousSearchPosition())}),e._UZ(9,"i",381),e.qZA(),e.TgZ(10,"div",382)(11,"ul",383,384),e.YNc(13,ip,2,1,"li",172),e.qZA()(),e.TgZ(14,"button",385),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onNextSearchPosition())}),e._UZ(15,"i",386),e.qZA()(),e.TgZ(16,"div",387)(17,"form",156,157),e.NdJ("ngSubmit",function(){e.CHM(i);const n=e.MAs(18);return e.KtG(n.form.valid)}),e.TgZ(19,"div",388),e.YNc(20,ap,2,1,"ng-container",172),e.qZA()()()()}if(2&o){const i=e.oxw();e.xp6(8),e.Q6J("ngClass",e.VKq(5,Ee,0==i.translateX||i.langlist.length<=8)),e.xp6(3),e.Q6J("ngStyle",e.VKq(7,cp,"translateX("+i.translateX+"px)")),e.xp6(2),e.Q6J("ngForOf",i.langlist),e.xp6(1),e.Q6J("ngClass",e.VKq(9,Ee,i.translateX<=-300||i.langlist.length<=8)),e.xp6(6),e.Q6J("ngForOf",i.langlist)}}function pp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"This form field cannot be modified as it is integrated with a connection under system tab"),e.qZA(),e.TgZ(3,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.closeRelationAlertModal())}),e._uU(4,"OK"),e.qZA()()}}function up(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"Updating the identifier will change the URL of this Web Form, would you like to proceed?"),e.qZA(),e.TgZ(3,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.updateIdentifierInfo())}),e._uU(4,"Yes"),e.qZA(),e.TgZ(5,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.closeShowIdentifierInfo())}),e._uU(6,"No"),e.qZA()()}}function mp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"You cannot remove default language! Please select other language as default one and then remove."),e.qZA(),e.TgZ(3,"button",377),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.closeAlertModal())}),e._uU(4,"OK"),e.qZA()()}}function _p(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"div",375)(1,"p"),e._uU(2,"Are you sure you want to delete this Field? "),e.qZA(),e.TgZ(3,"button",173),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.deleteSelectedItem())}),e._uU(4,"YES"),e.qZA(),e.TgZ(5,"button",401),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.modalRef.hide())}),e._uU(6,"NO"),e.qZA()()}}function gp(o,r){if(1&o){const i=e.EpF();e.TgZ(0,"alert",402),e.NdJ("onClosed",function(){e.CHM(i);const n=e.oxw();return e.KtG(n.onClosed(n.alertType))}),e._uU(1),e.qZA()}if(2&o){const i=e.oxw();e.Q6J("type",i.alertType)("dismissible",i.dismissible),e.xp6(1),e.Oqu(i.alertMsg)}}let hp=new st.d,fp=(()=>{const r=class{constructor(t,n,s,l,a,d,p,b,x,y,g,w,F,H,W,Y,X,K,P){this.fb=t,this.ccpaRequestService=n,this.organizationService=s,this.dsarFormService=l,this.ccpaFormConfigService=a,this.workFlowService=d,this.router=p,this.activatedRoute=b,this.loadingbar=x,this.modalService=y,this.cd=g,this.sanitizer=w,this.bsmodalService=F,this.dataService=H,this.cdRef=W,this.titleService=Y,this.userService=X,this.location=K,this.systemIntegrationService=P,this.navDirective=null,this.selectedlanguagelist=[],this.ln=ve.qg,this.editedLangList=[],this.portal=q.N.portalPrefix,this.noReplyEmailId=q.N.replyEmail,this.isEditingLangList=!1,this.subjectTypeDE=ye,this.requestTypeDE=Te,this.subjectTypeFR=we,this.requestTypeFR=Ze,this.subjectTypeBR=Fe,this.requestTypeBR=T,this.subjectTypeAR=S,this.requestTypeAR=m,this.subjectTypeIT=f,this.requestTypeIT=Z,this.subjectTypeHI=U,this.requestTypeHI=Ge,this.subjectTypeZH=Ye,this.requestTypeZH=Pe,this.subjectTypeJA=We,this.requestTypeJA=Ve,this.generalTextDE=$e,this.generalTextFR=Xe,this.generalTextBR=et,this.generalTextAR=tt,this.generalTextIT=it,this.generalTextHI=nt,this.generalTextZH=ot,this.subjectTypeES=Ke,this.requestTypeES=ze,this.requestObject={},this.firstField=!0,this.firstFieldName="First Item name",this.show
1FormOption=!1,this.isEditingList=!1,this.isAddingFormControl=!1,this.webFormControlList=[],this.requestType=[],this.subjectType=[],this.requestTypeEN=[],this.subjectTypeEN=[],this.loading=!1,this.blured=!1,this.focused=!1,this.sideMenuRequestTypeOptions=[],this.sideMenuSubjectTypeOptions=[],this.filteredStateList=[],this.refreshSpan=!0,this.controlOption=[{id:1,control:"textbox",display:"Textbox"},{id:2,control:"select",display:"Select"},{id:3,control:"radio",display:"Radio"},{id:4,control:"checkbox",display:"Checkbox"},{id:5,control:"textarea",display:"Textarea"},{id:6,control:"datepicker",display:"Datepicker"}],this.editableControlOption=[{id:1,control:"select",display:"Select"},{id:2,control:"radio",display:"Radio"},{id:3,control:"checkbox",display:"Checkbox"}],this.quillConfig={toolbar:{container:[["bold","italic","underline","strike"],[{header:1},{header:2}],["link"],[{align:[]}],[{size:["small",!1,"large","huge"]}]]}},this.active=1,this.ApproverList=[],this.emailSenderList=[],this.emailSmtpSenderList=[],this.reqURLObj={},this.dismissible=!0,this.isOpen=!1,this.showFilesizeerror=!1,this.showFileExtnerror=!1,this.isFileUploadRequired=!1,this.isEmailVerificationRequired=!1,this.isCaptchaVerificationRequired=!1,this.isDraftWebForm=!1,this.isRequiredField=!1,this.isFileuploadRequiredField=!1,this.isFileuploadRequiredFieldVisible=!1,this.isLogoLoaded=!1,this.isCodeCopied=!1,this.isdraftsubmitted=!1,this.isResetlinkEnable=!1,this.isEditingPublishedForm=!1,this.multiselect=!1,this.accordionStatus={isFirstopen:!1,isSecondopen:!1,isThirdopen:!1,isFourthopen:!1},this.isclickOndocument=!1,this.isClickedOnModal=!1,this.defaultlanguage="",this.isshowlanguagediv=!1,this.selectedDropdownValues=[],this.typeaheadSingleWords=!0,this.issessionstargerequired=!1,this.generaltext={edittext:"Edit field",canceltext:"Cancel",saveandclose:"Save and close",required:"Required",addcontrol:"Add control",displaytype:"Display Type",customfields:"Custom Fields",addnew:"Add new",selectfieldtype:"Select Field Type",selectfieldmsg:"Select field type control is mandatory"},this.formArray=[],this.dsarFormbyCrid=[],this.subjectRequestType=[],this.isLanguagechangedbyUser=!1,this.isSaveandCloseClicked=!1,this.isCancelBtnClicked=!1,this.isLanguageAddRemovedbyUser=!1,this.isvalidcustomfield=!1,this.isvalidcustomTitleboolean=!1,this.ispopupFormSubmitted=!1,this.showSelectedLangDiv=!1,this.translateX=0,this.scrollLimit=0,this.rightArrowStatus=!1,this.langlist=[],this.isDeletingcustomCtrl=!1,this.copyWebFormControlListCRID=[],this.copyWebFormControlListLOCAL=[],this.backUpWebFormControlListLOCAL=[],this.backUpWebFormControlListDB=[],this.languageChosenCRID=[],this.skeletonLoading=!0,this.isLangAddedRecently=!1,this.isAddingNewControls=!1,this.isReadonly=!0,this.isOldENForm=!1,this.copyWebFormControlListCRIDREADONLY=[],this.isControlsDragged=!1,this.activePage=1,this.numofRecords=10,this.formList=[],this.isFormFieldsEmpty=!1,this.isFormSavedByNavType=!1,this.systemConnectionData=[],this.usedFormDataArr=[],this.disableLabel=!1,this.showUrlText=!0,this.generatedURL="",this.protocolList=["http://","https://"],this.selectedProtocol="",this.identifierExists="",this.recommendedIdentifers=[],this.selectedLinkType="longUrl",this.appUrl="",this.previousIdentifierValue="",this.recommendedIdentifierErr="",this.identifierActions=!0,this.showResponseIcon=!1,this.disableSaveIdentifier=!1,this.patternIdentifierErr="",this.identifierDebouncer$=new oe.xQ,this.isLiveForm=!1,this.isSelectWorkFlowDisabled=new Q.X(!1),this.count=0,this.activatedRoute.queryParamMap.subscribe(V=>{let ee=V.get("oid"),A=V.get("pid");null!=this.queryOID&&(this.queryOID!=ee||this.queryPID!=A)&&(this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigateByUrl(this.router.url)),this.queryOID=ee,this.queryPID=A}),this.titleService.setTitle("DSAR Web Form - "+q.N.portalPrefix)}ngOnInit(){if(this.appUrl="localhost"===window.location.hostname?"http://localhost:4500/dsar/form/":q.N.privacyportalUrl,this.dsarFormService.isFormCreatedFromWizard&&(this.dsarFormService.isFormCreatedFromWizard=!1,this.organizationService.isOrganizationUpdated.next(!0)),this.onGetPropsAndOrgId(),this.generalTextArray=[["EN",this.generaltext],["FR",this.generalTextFR],["BR",this.generalTextBR],["DE",this.generalTextDE],["AR",this.generalTextAR],["IT",this.generalTextIT],["HI",this.generalTextHI],["ZH",this.generalTextZH]],this.activatedRoute.paramMap.subscribe(t=>{this.crid=t.get("id")}),this.loadCurrentProperty(),null!==this.crid&&this.getCCPAFormList(),this.selectedProtocol=this.protocolList[0],this.getCCPAdefaultConfigById(),this.basicForm=this.fb.group({formname:["",[c.kI.required]],formidentifier:["",[c.kI.required]],currentOrganization:[{value:"",disabled:!0}],selectedProperty:[{value:"",disabled:!0}]}),null==this.crid||""===this.crid?this.basicForm.controls.formidentifier.enable():this.basicForm.controls.formidentifier.disable(),this.quillEditorText=this.fb.group({editor:new c.p4(null)}),this.isWelcomeEditor=!1,this.loadDefaultApprover(),this.loadCountryList(),this.loadStateList(
1),this.loadWorkFlowList(),this.loadCaptcha(),this.getWebFormScriptLink(),this.loadEmailSenderList(),this.loadEmailSmtpSenderList(),this.basicForm.controls.formname.setValue(this.formName),this.basicForm.controls.currentOrganization.setValue(this.currentOrganization),this.basicForm.controls.selectedProperty.setValue(this.selectedProperty),this.setupIdentifierDebouncer(),this.headerLogoForm=this.fb.group({headerlogo:[""]}),this.faviconForm=this.fb.group({titlefavicon:[""]}),this.loadOrgProperty(),this.laguagelist=[{label:"English (US)",keyvalue:"EN"},{label:"German (Germany)",keyvalue:"DE"},{label:"Hindi (India)",keyvalue:"HI"},{label:"Italian (Italy)",keyvalue:"IT"},{label:"Portuguese (Brazil)",keyvalue:"BR"},{label:"Chinese (China)",keyvalue:"ZH"},{label:"Arabic (Egypt)",keyvalue:"AR"},{label:"French (France)",keyvalue:"FR"},{label:"Japanese (Japan)",keyvalue:"JA"},{label:"Spanish (Spain)",keyvalue:"ES"}],this.dataService.isUserSwitchProperty?(this.dataService.isUserSwitchProperty=!1,this.navigateToWebForm()):this.getCombinedData(),this.ccpaFormConfigService.isDSARFormCreated){this.ccpaFormConfigService.isDSARFormCreated=!1,this.active=4;let t=this.ccpaFormConfigService.getStoreFormDataAfterAdding();this.crid=t.crid,this.webFormControlList=t.request_form,this.getDSARFormByCRID(this.crid,"dataview")}}get stepFormOne(){return this.basicForm.controls}get formLogo(){return this.headerLogoForm.controls}get faviconLogo(){return this.faviconForm.controls}canHaveDelete(t){return["subjecttype","requesttype","first_name","last_name","email","country","state","city"].includes(t)}loadCurrentProperty(){if(null!==this.organizationService.getCurrentOrgWithProperty()&&void 0!==this.organizationService.getCurrentOrgWithProperty()){this.selectedProperty=this.organizationService.getCurrentOrgWithProperty().property_name,this.currentOrganization=this.organizationService.getCurrentOrgWithProperty().organization_name,this.orgId=this.organizationService.getCurrentOrgWithProperty().organization_id,this.propId=this.organizationService.getCurrentOrgWithProperty().property_id,this.currentManagedOrgID=this.organizationService.getCurrentOrgWithProperty().organization_id;const t={organization_id:this.organizationService.getCurrentOrgWithProperty().organization_id,organization_name:this.organizationService.getCurrentOrgWithProperty().organization_name,property_id:this.organizationService.getCurrentOrgWithProperty().property_id,property_name:this.organizationService.getCurrentOrgWithProperty().property_name,user_id:this.organizationService.getCurrentOrgWithProperty().user_id};this.orgDetails=t,this.currentOrgID=t.organization_id,this.currentOrganization=t.organization_name}}onGetPropsAndOrgId(){null!==this.queryOID&&null!==this.queryPID&&void 0!==this.queryOID&&void 0!==this.queryPID?this.currentManagedOrgID=this.queryOID:this.getOIDPIDFromURL()}CreateUpdateDSARForm(t){if(null!==t){this.editFormBeforePublish();const n=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;this.ccpaFormConfigService.currentFormData.subscribe(s=>{if(s){if(this.propId=""!==this.propId?this.propId:s.PID,this.orgId=""!==this.orgId?this.orgId:s.OID,null!=s.request_form?(this.langlist=this.getSelectedLanguageList(s.request_form),this.languageChosenCRID=[...this.langlist]):null!=s.response&&(this.langlist=this.getSelectedLanguageList(s.response.request_form),this.languageChosenCRID=[...this.langlist]),this.formName=void 0!==s.response&&s.response.form_name||s.form_name||s.web_form_name,this.daysleft=void 0!==s.response&&s.response.settings.days_left||s.days_left||30,this.emailsender=void 0!==s.response&&s.response.mail_sender||s.mail_sender||"","draft"===s.form_status&&(this.isDraftWebForm=!0,this.isEditingPublishedForm=!0),n.test(s.approver)?(this.selectedApproverID=s.approver||s.response.approver,this.workflow=s.workflow):(this.selectedApproverID=s.approver_id||s.response.approver,this.workflow=void 0!==s.workflow_id?s.workflow_id:s.response.workflow),void 0!==s&&void 0!==s.request_form){if(this.selectedwebFormControlList=this.rearrangeFormSequence(s.request_form),this.webForm
1ControlList=this.selectedwebFormControlList,this.langlist=this.getSelectedLanguageList(s.request_form),this.languageChosenCRID=[...this.langlist],null!=this.langlist&&Array.isArray(this.langlist)){const a=this.langlist.findIndex(d=>void 0!==d&&void 0!==d.defaultlanguage);this.languageSelected=-1!==a?this.langlist[a].defaultlanguage:""}}else if(void 0!==s&&void 0!==s.response&&void 0!==s.response.request_form){if(this.selectedwebFormControlList=this.rearrangeFormSequence(s.response.request_form),this.webFormControlList=this.selectedwebFormControlList,this.langlist=this.webFormControlList[this.webFormControlList.length-1].preferlanguages,null!=this.langlist){const a=this.langlist.findIndex(d=>void 0!==d.defaultlanguage);this.languageSelected=-1!==a?this.langlist[a].defaultlanguage:""}}else this.selectedwebFormControlList=this.rearrangeFormSequence(this.dsarFormService.getRecentFormControlList()),void 0!==this.selectedwebFormControlList&&0!==this.selectedwebFormControlList.length&&(this.webFormControlList=this.selectedwebFormControlList);
1void 0!==this.webFormControlList&&this.webFormControlList.length>0&&(this.webFormControlList.filter(a=>{"footertext"===a.controlId?(this.footerText=a.footerText,this.footerTextColor=a.footerTextColor,this.footerBackgroundColor=void 0!==a.footerBackgroundColor?a.footerBackgroundColor:"#f0b323",this.footerFontSize=a.footerFontSize):"welcometext"===a.controlId?(this.welcomeText=a.welcomeText,this.welcomeTextColor=a.welcomeTextColor,this.welcomeFontSize=a.welcomeFontSize):"headerlogo"===a.controlId?(this.headerlogoBase64=a.logoURL,this.headerColor=a.headerColor,this.headerTextColor=a.headerTextColor||"#333333",this.headerFontSize=a.headerFontSize||M.V.HEADER_FONT_SIZE):"fileupload"===a.controlId?(this.isFileUploadRequired=a.requiredfield,this.isFileuploadRequiredField=a.ismandatory):"favicon"===a.controlId&&(this.headerfaviconBase64=a.faviconURL)}),this.ccpaFormConfigService.setFormControlList(this.webFormControlList),this.closeModal())}},s=>{console.log(s)})}else{this.radioBtnType=!0,this.subjectTyperadioBtn=!0;let n=this.getCurrentLanguage();this.webFormControlList=this.getWebformByLangFromLocal(n),void 0!==this.webForm
1ControlList?this.webFormControlList.filter(s=>{"footertext"===s.controlId?(this.footerText=s.footerText,this.footerTextColor=s.footerTextColor,this.footerBackgroundColor=void 0!==s.footerBackgroundColor?s.footerBackgroundColor:"#f0b323",this.footerFontSize=s.footerFontSize):"welcometext"===s.controlId?(this.welcomeText=s.welcomeText,this.welcomeTextColor=s.welcomeTextColor,this.welcomeFontSize=s.welcomeFontSize):"headerlogo"===s.controlId?(this.headerlogoBase64=s.logoURL,this.headerColor=s.headerColor,this.headerTextColor=s.headerTextColor||"#333333",this.headerFontSize=s.headerFontSize||M.V.HEADER_FONT_SIZE):"subjecttype"===s.controlId||"requesttype"===s.controlId?this.lblText=s.controllabel:"fileupload"===s.controlId?(this.isFileUploadRequired=s.requiredfield,this.isFileuploadRequiredField=s.ismandatory):"favicon"===s.controlId&&(this.headerfaviconBase64=s.faviconURL)}):this.createNewForm(),this.selectOptions=[{id:(new Date).valueOf(),value:" "}],this.daysleft=30,this.organizationService.getOrganization.subscribe(s=>this.currentOrgID=s)}}getCCPAdefaultConfigById(){let t,n;this.ccpaRequestService.clearCacheRequestSubjectType(),this.ccpaRequestService.getCCPAdefaultRequestSubjectType(this.constructor.name,_.e.dsarWebFormModule).subscribe(s=>{void 0!==s&&(t=s.request_type,n=s.subject_type,this.requestTypeEN=t,this.subjectTypeEN=n,this.requestType=t,this.subjectType=n,(""==this.defaultlanguage||"en-UK"==this.defaultlanguage||"en-US"==this.defaultlanguage||"en-GB"==this.defaultlanguage)&&(this.langSpecificSubjectType=n,this.langSpecificRequestType=t),null!=this.crid?this.loadWebControl():this.createNewForm(),this.daysleft=null!=this.daysleft?this.daysleft:30,this.loading=!1)},s=>{this.alertMsg=s,this.isOpen=!0,this.alertType="danger"})}loadWebControl(){let t,n,s;void 0!==this.selectedlanguagelist&&this.selectedlanguagelist.length>0&&(t=this.selectedlanguagelist.findIndex(l=>l.defaultlanguage===this.defaultlanguagesetbyuser),n=this.selectedlanguagelist[t].defaultlanguage),this.crid&&!this.isLanguagechangedbyUser?this.getDSARFormByCRID(this.crid,"dataview"):(this.isEditingPublishedForm=!1,void 0!==this.languageSelected&&(s=n??this.languageSelected),this.dsarFormService.getFormControlList(s),this.webFormControlList=this.dsarFormService.getRecentFormControlList(),null!=this.webForm
1ControlList&&(this.webFormControlList.filter(l=>{"preferedlanguages"===l.controlId&&(l.preferlanguages=this.selectedlanguagelist),"footer_text_Index"===l.indexCount&&(this.editorDataFooter=l.footerText),"welcome_text_Index"===l.indexCount&&(this.editorDataWelcome=l.welcomeText),-1===s.indexOf("en")?"requesttype"===l.controlId?void 0!==this.requestType&&0!==this.requestType.length&&(l.selectOptions=this.requestType):"subjecttype"===l.controlId&&void 0!==this.subjectType&&0!==this.subjectType.length&&(l.selectOptions=this.subjectType):"requesttype"===l.controlId?void 0!==this.requestType&&0!==this.requestType.length&&(this.sideMenuRequestTypeOptions=this.requestType,l.selectOptions=this.requestType):"subjecttype"===l.controlId&&(this.sideMenuSubjectTypeOptions=this.subjectType,void 0!==this.subjectType&&0!==this.subjectType.length&&(l.selectOptions=this.subjectType))}),this.dsarFormService.setFormControlList(this.webFormControlList),this.webFormControlList=this.dsarFormService.getRecentFormControlList()))}changeLanguageForSubjectRequestType(t,n,s,l,a){let d;if(l==a)for(let p=0;p<n.length;p++)d=t.findIndex(b=>b[s]==n[p][s]),-1!==d&&(t[d].name=n[p].name);return t}loadControlTextByLanguage(t,n,s){if(this.generaltext={edittext:"Edit field",canceltext:"Cancel",saveandclose:"Save and close",required:"Required",addcontrol:"Add control",displaytype:"Display Type",customfields:"Custom Fields",addnew:"Add new",selectfieldtype:"Select Field Type",selectfieldmsg:"Select field type control is mandatory"},(void 0===t||t!=n)&&-1===t.indexOf(n))return this.generaltext={edittext:"Edit field",canceltext:"Cancel",saveandclose:"Save and close",required:"Required",addcontrol:"Add control",displaytype:"Display Type",customfields:"Custom Fields",addnew:"Add new",selectfieldtype:"Select Field Type",selectfieldmsg:"Select field type control is mandatory"};for(let l=0;l<s.length;l++)this.generaltext.edittext==s[l].enname?this.generaltext.edittext=s[l].name:this.generaltext.canceltext==s[l].enname?this.generaltext.canceltext=s[l].name:this.generaltext.saveandclose==s[l].enname?this.generaltext.saveandclose=s[l].name:this.generaltext.required==s[l].enname?this.generaltext.required=s[l].name:this.generaltext.addcontrol==s[l].enname?this.generaltext.addcontrol=s[l].name:this.generaltext.displaytype==s[l].enname?this.generaltext.displaytype=s[l].name:this.generaltext.customfields==s[l].enname?this.generaltext.customfields=s[l].name:this.generaltext.addnew==s[l].enname?this.generaltext.addnew=s[l].name:this.generaltext.selectfieldtype==s[l].enname?this.generaltext.selectfieldtype=s[l].name:this.generaltext.selectfieldmsg==s[l].enname&&(this.generaltext.selectfieldmsg=s[l].name)}loadSubjectRequestTypeForSideNav(t){return this.webFormControlList.filter(n=>{n.controlId===t&&("subjecttype"===t?(n.selectOptions=this.subjectType,this.sideMenuSubjectTypeOptions=this.selectedControlObj.selectOptions):(n.selectOptions=this.requestType,this.sideMenuRequestTypeOptions=this.selectedControlObj.selectOptions))}),0!==this.sideMenuRequestTypeOptions.length&&this.isRequestType?this.sideMenuRequestTypeOptions:this.sideMenuSubjectTypeOptions}trackByIndex(t,n){return t}register(t){this.setHeaderStyle()}drop(t){let n=this.getCurrentLanguage();this.isControlsDragged=!0;
1for(let s of this.langlist)this.webFormControlList=null==this.crid?this.getWebformByLangFromLocal(s.keyvalue):this.getWebformByLangFromDB(s.keyvalue),t.previousContainer===t.container?(this.copyWebFormControlListCRIDREADONLY=this.webFormControlList,(0,B.bA)(this.webFormControlList,t.previousIndex,t.currentIndex),this.crid?(this.ccpaFormConfigService.setFormControlList(this.webFormControlList,s.keyvalue),this.isDirty=!0):(this.dsarFormService.setFormControlList(this.webFormControlList,s.keyvalue),this.isDirty=!0)):(0,B.EA)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex);this.webFormControlList=null==this.crid?this.getWebformByLangFromLocal(n):this.getWebformByLangFromDB(n)}dragDropOptionRequestType(t){if(this.getCurrentLanguage(),t.previousContainer===t.container)if((0,B.bA)(this.sideMenuRequestTypeOptions,t.previousIndex,t.currentIndex),this.crid)for(let s of this.langlist)this.ccpaFormConfigService.setFormControlList(this.webFormControlList,s.keyvalue);else for(let s of this.langlist)this.dsarFormService.setFormControlList(this.webForm
1ControlList,s.keyvalue);else(0,B.EA)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}dragDropOptionSubjectType(t){if(this.getCurrentLanguage(),t.previousContainer===t.container)if((0,B.bA)(this.sideMenuSubjectTypeOptions,t.previousIndex,t.currentIndex),this.crid)for(let s of this.langlist)this.ccpaFormConfigService.setFormControlList(this.webFormControlList,s.keyvalue);else for(let s of this.langlist)this.dsarFormService.setFormControlList(this.webFormControlList,s.keyvalue);else(0,B.EA)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}dragDropCustomOption(t){if(this.getCurrentLanguage(),t.previousContainer===t.container)if((0,B.bA)(this.selectOptions,t.previousIndex,t.currentIndex),this.crid)for(let s of this.langlist)this.ccpaFormConfigService.setFormControlList(this.webFormControlList,s.keyvalue);else for(let s of this.langlist)this.dsarFormService.setFormControlList(this.webFormControlList,s.keyvalue);else(0,B.EA)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}onEditCloseItems(){this.isEditItems=!this.isEditItems}addFormField(){this.showFormOption=!this.showFormOption,this.isEditingList?"country"===this.existingControl.controlId||"state"===this.existingControl.controlId||"textbox"===this.existingControl.control||"textarea"===this.existingControl.control?(this.selectedControlType=!1,this.isSubjectType=!1,this.isRequestType=!1):"subjecttype"===this.existingControl.controlId?(this.isSubjectType=!0,this.isRequestType=!1,this.sideMenuSubjectTypeOptions=this.selectedControlObj.selectOptions):"requesttype"===this.existingControl.controlId?(this.isRequestType=!0,this.isSubjectType=!1,this.sideMenuRequestTypeOptions=this.selectedControlObj.selectOptions):this.selectedControlType=!0:"radio"===this.selectedFormOption?(this.selectedControlType=!0,this.selectedControlType?(this.selectOptions=[],this.addOptions(),this.addOptions(!0)):this.selectOptions=[]):"select"===this.selectedFormOption||"checkbox"===this.selectedFormOption?(this.selectedControlType=!0,this.selectedControlType?(this.selectOptions=[],this.addOptions(!0)):this.selectOptions=[]):"radio"===this.selectedFormOption?(this.selectedControlType=!0,this.selectOptions=[],this.addOptions(),this.addOptions(!0)):(this.selectedControlType=!1,this.isSubjectType=!1,this.isRequestType=!1)}isCustomOptionEmpty(t){return void 0!==this.selectOptions&&this.selectOptions.length>0&&!this.isItExistingFields(t)&&this.selectOptions.filter(n=>void 0===n.name||""===n.name).length>0}isItExistingFields(t){return void 0!==t.form.value&&void 0!==t.form.value.lblText&&""!==t.form.value.lblText}isSideMenuRequestTypeOptionEmpty(){if(void 0!==this.sideMenuRequestTypeOptions)return this.sideMenuRequestTypeOptions.filter(t=>void 0===t.name||""===t.name).length>0}isSideMenuSubjectTypeOptionEmpty(){if(void 0!==this.sideMenuSubjectTypeOptions)return this.sideMenuSubjectTypeOptions.filter(t=>void 0===t.name||""===t.name).length>0}compareConnectionFormData(){this.usedFormDataArr=[],this.ccpaFormConfigService.getSystemMapData(this.crid,this.constructor.name,_.e.systemIntegrationModule).subscribe(t=>{t.response.forEach(n=>{this.webFormControlList.forEach(s=>{n.value_2+"_Index"==s.indexCount&&this.usedFormDataArr.push(s)})})})}editSelectedRow(t){this.disableLabel=!1,null!=this.crid&&(this.loadingbar.start(),this.ccpaFormConfigService.getSystemMapData(this.crid,this.constructor.name,_.e.systemIntegrationModule).subscribe(s=>{s.response.forEach(l=>{l.value_2+"_Index"==t.indexCount&&(this.disableLabel=!0);try{JSON.parse(l.value_1);let d=JSON.parse(l.value_1);if("where"==l.field)for(const p of d.rules)p.value=p.value+"_Index",p.value==t.indexCount&&(this.disableLabel=!0)}catch{l.value_1+"_Index"==t.indexCount&&(this.disableLabel=!0)}})}),this.loadingbar.stop()),this.isSaveandCloseClicked=!1;let n=this.getCurrentLanguage();this.crid&&(this.copyWebFormControlListCRID=this.getWebformByLangFromDB(n),this.currentcontrolIndex=this.getWebformByLangFromDB(n).findIndex(s=>s.controlId==t.controlId)),this.ccpaFormConfigService.storeDataBeforeEdit(t),this.selectedControlObj=t,this.lblText=t.controllabel,this.isEditingList=!0,this.isAddingFormControl=!0,this.show
1FormOption=!1,this.selectedControlId=t.controlId,this.existingControl=t,this.isRequiredField=""!==t.requiredfield&&t.requiredfield,this.changeControlType=t.control,this.inputOrSelectOption="textbox"===t.control||"textarea"===t.control,"select"===t.control&&"state"!==t.controlId&&"country"!==t.controlId||"checkbox"===t.control||"radio"===t.control?(this.editSelectionType=!0,"checkbox"===t.control?(this.selectOptionControl=this.editableControlOption[2].control,this.changeControlType=this.editableControlOption[2].control):"radio"===t.control&&(this.selectOptionControl=this.editableControlOption[1].control,this.changeControlType=this.editableControlOption[1].control),this.selectOptions=t.selectOptions):this.editSelectionType=!1,this.addFormField()}onClickDelete(t){this.openModal(this.deleteField),this.seletedDeleteField=t,this.backUpAfterSaveAndCloseBtnClick()}switchLanguages(t,n,s){switch(t){case"FR":this.langSpecificSubjectType=this.changeLanguageForSubjectRequestType(this.subjectTypeEN,this.subjectTypeFR,"subject_type_id",this.languageSelected,"FR"),this.langSpecificRequestType=this.changeLanguageForSubjectRequestType(this.requestTypeEN,this.requestTypeFR,"request_type_id",this.languageSelected,"FR"),this.dsarFormService.getFormControlList(t,this.subjectTypeFR,this.requestTypeFR,n);break;case"DE":this.dsarFormService.getFormControlList(t,this.subjectTypeDE,this.requestTypeDE,n);break;case"BR":this.dsarFormService.getFormControlList(t,this.subjectTypeBR,this.requestTypeBR,n);break;case"IT":this.dsarFormService.getFormControlList(t,this.subjectTypeIT,this.requestTypeIT,n);break;case"AR":this.dsarFormService.getFormControlList(t,this.subjectTypeAR,this.requestTypeAR,n);break;case"HI":this.dsarFormService.getFormControlList(t,this.subjectTypeHI,this.requestTypeHI,n);break;case"ZH":this.dsarFormService.getFormControlList(t,this.subjectTypeZH,this.requestTypeZH,n);break;case"ES":this.dsarFormService.getFormControlList(t,this.subjectTypeES,this.requestTypeES,n);break;case"JA":this.dsarFormService.getFormControlList(t,this.subjectTypeJA,this.requestTypeJA,n);break;default:this.dsarFormService.getFormControlList(t,this.langSpecificSubjectType,this.langSpecificRequestType,n)}}deleteSelectedItem(){let t=this.seletedDeleteField,n=this.getCurrentLanguage();
1return this.crid?(this.webFormControlList=this.getWebformByLangFromDB(n),this.copyWebFormControlListCRID=[...this.webFormControlList],this.isDeletingcustomCtrl=!0,this.ccpaFormConfigService.storeDataBeforeEdit(t),this.deletedwebformcontrols=this.ccpaFormConfigService.deleteControl(t),this.webFormControlList=this.getWebformByLangFromDB(n),this.isDirty=!0,this.modalRef.hide(),this.webFormControlList):(this.webFormControlList=this.getWebformByLangFromLocal(n),this.copyWebFormControlListLOCAL=[...this.webFormControlList],this.dsarFormService.storeDataBeforeEdit(t),this.deletedwebformcontrols=this.dsarFormService.deleteControl(t,n),this.webFormControlList=this.getWebformByLangFromLocal(n),this.isDirty=!0,this.modalRef.hide(),this.webFormControlList)}retrieveDeletedControls(){if(this.getCurrentLanguage(),this.crid){this.webFormControlList=[...this.copyWebFormControlListCRID];for(let n=0;n<this.backUpWebFormControlListDB.length;n++)this.ccpaFormConfigService.setFormControlList(this.backUpWebFormControlListDB[n].bkpform,this.backUpWebFormControlListDB[n].bkplang)}else for(let n=0;n<this.backUpWebFormControlListLOCAL.length;n++)this.dsarFormService.setFormControlList(this.backUpWebFormControlListLOCAL[n].bkpform,this.backUpWebFormControlListLOCAL[n].bkplang)}backToOriginalPositionOfControls(){}isSelected(t){return this.selectedRow===t}saveCurrentItem(t){return!this.isSelected(t)}addOptions(t){let s,n={};void 0!==this.lblText&&(s=this.lblText.split(" ").join("_").toLowerCase()),n={id:t?(new Date).valueOf()+1:(new Date).valueOf(),keylabel:s},this.selectOptions.push(n),this.isDirty=!0}addCustomReqestSubjectType(){this.isDirty=!0;let t={},n={};this.lblText.split(" ").join("_"),this.isSubjectType?(t={subject_type_id:this.generateUUID(),active:!0,created_at:(new Date).toJSON(),updated_at:(new Date).toJSON()},this.sideMenuSubjectTypeOptions.push(t)):(n={request_type_id:this.generateUUID(),active:!0,created_at:(new Date).toJSON(),updated_at:(new Date).toJSON()},this.sideMenuRequestTypeOptions.push(n))}generateUUID(){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let l=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===s?l:3&l|8).toString(16)})}deleteSelectOption(t){this.isDirty=!0,this.selectOptions.splice(t,1)}deleteSubjectOption(t){this.isDirty=!0,this.sideMenuSubjectTypeOptions.splice(t,1)}deleteRequestOption(t){this.isDirty=!0,this.sideMenuRequestTypeOptions.splice(t,1)}cancelForm(){this.showFormOption=!0}addCustomFields(t,n){return!(this.isCustomOptionEmpty(t)||this.isSideMenuRequestTypeOptionEmpty()||this.isSideMenuSubjectTypeOptionEmpty())&&(null==t.value.lblText&&1==this.disableLabel?(this.changeControlTypes(),this.hideControlsAfterSave(),this.backUpAfterSaveAndCloseBtnClick(),!1):void 0!==t.value.lblText&&""!=t.value.lblText&&void(void 0!==t.value.lblText&&(this.trimLabel=t.value.lblText.split(" ").join("_").toLowerCase(),this.formControlLabel=t.value.lblText,this.changeControlTypes(),this.hideControlsAfterSave(),this.backUpAfterSaveAndCloseBtnClick())))}changeControlTypes(){let t=this.getCurrentLanguage("editing");
1if(this.webFormControlList=this.crid?this.getWebformByLangFromDB(t):this.getWebformByLangFromLocal(t),this.trimLabel=this.lblText.split(" ").join("_").toLowerCase(),-1!==this.webFormControlList.findIndex(s=>s.controllabel===this.lblText)&&null===this.changeControlType&&this.isEditingList)return this.alertMsg="Label already exist!",this.isOpen=!0,this.alertType="danger",!1;if(this.isEditingList){if(this.isSaveandCloseClicked=!1,"requesttype"===this.selectedControlId||"subjecttype"===this.selectedControlId){let a;const d=this.webFormControlList.findIndex(x=>x.controlId===this.existingControl.controlId);let p;"radio"===this.changeControlType?p="radio":"checkbox"===this.changeControlType&&(p="checkbox"),a={controllabel:this.lblText,indexCount:this.existingControl.indexCount,control:void 0!==p?p:this.changeControlType,controlId:this.selectedControlId,selectOptions:this.existingControl.selectOptions,requiredfield:this.isRequiredField,customField:!0},this.addUpdateFormControls(d,a,t)}else if("textbox"===this.existingControl.control||"textarea"===this.existingControl.control||"state"===this.existingControl.controlId||"country"===this.existingControl.controlId){let a;
1const d=this.webFormControlList.findIndex(b=>b.controlId===this.existingControl.controlId);let p;"radio"===this.changeControlType?p="radio":"checkbox"===this.changeControlType&&(p="checkbox"),a={controllabel:this.formControlLabel||this.lblText,controlId:this.existingControl.controlId,indexCount:this.existingControl.indexCount,control:p||this.existingControl.control,selectOptions:this.existingControl.selectOptions,requiredfield:this.isRequiredField,customField:!0},this.addUpdateFormControls(d,a,t)}else if(this.existingControl){if(this.crid){let b;this.webFormControlList=this.getWebformByLangFromDB(t);const x=this.webFormControlList.findIndex(y=>y.controlId===this.existingControl.controlId);b={controllabel:this.formControlLabel||this.lblText,controlId:this.existingControl.controlId,indexCount:this.existingControl.indexCount,control:this.existingControl.control,selectOptions:this.existingControl.selectOptions,requiredfield:this.isRequiredField,customField:!0},void 0!==x&&(this.addUpdateFormControls(x,b,t),this.webFormControlList=this.getWebformByLangFromDB(t))}else this.webFormControlList=this.getWebformByLangFromLocal(t);let a;
1const d=this.webFormControlList.findIndex(b=>b.controlId===this.existingControl.controlId);let p;if(void 0!==this.selectOptions&&this.selectOptions.forEach(b=>{b.keylabel=this.trimLabel}),p="radio"===this.changeControlType?"radio":"checkbox"===this.changeControlType?"checkbox":this.changeControlType,-1!==d){let b;a={controllabel:this.lblText,indexCount:this.trimLabel+"_Index",control:""!==p?p:this.existingControl.control,controlId:this.existingControl.controlId,selectOptions:this.existingControl.selectOptions,requiredfield:this.isRequiredField,customField:!0},void 0!==this.selectOptions&&(b=this.selectOptions.length),this.crid?(this.ccpaFormConfigService.updateControl(this.webFormControlList[d],d,a,t),this.webFormControlList=this.getWebformByLangFromDB(t),this.isSaveandCloseClicked&&this.cancelAddingFormControl("submit")):(this.dsarFormService.updateControl(this.webFormControlList[d],d,a,t),this.webFormControlList=this.getWebformByLangFromLocal(this.defaultlanguage),this.isSaveandCloseClicked&&this.cancelAddingFormControl("submit"))}else this.cancelAddingFormControl("submit")}}
1else if(this.crid){const s=this.webFormControlList.length+1;let l;this.selectOptions.forEach(d=>{d.keylabel=this.trimLabel}),"radio"===this.selectOptionControl?l="radio":"checkbox"===this.selectOptionControl&&(l="checkbox");const a={control:l||this.selectedFormOption,controllabel:this.formControlLabel||this.lblText,controlId:"CustomInput"+s,indexCount:this.trimLabel+"_Index",selectOptions:this.selectOptions,requiredfield:this.isRequiredField,customField:!0};this.customWebControlCrid=a;for(let d of this.langlist)this.ccpaFormConfigService.addControl(a,d.keyvalue),this.updateCaptchaPosition(d.keyvalue);this.webFormControlList=this.getWebformByLangFromDB(t),this.cancelAddingFormControl("submit")}else{let l;this.selectOptions.forEach(d=>{d.keylabel=this.trimLabel}),"radio"===this.selectedFormOption?l="radio":"checkbox"===this.selectedFormOption&&(l="checkbox");const a={control:l||this.selectedFormOption,controllabel:this.formControlLabel||this.lblText,controlId:"CustomInput"+(this.webFormControlList.length+1),indexCount:this.trimLabel+"_Index",selectOptions:this.selectOptions,requiredfield:this.isRequiredField,customField:!0};this.customWebControlLocal=a;for(let d of this.langlist)this.dsarFormService.addControl(a,d.keyvalue),this.updateCaptchaPosition(d.keyvalue);this.webFormControlList=this.getWebformByLangFromLocal(t),this.lblText="",this.cancelAddingFormControl("submit"),this.hideControlsAfterSave()}}showRelationError(){return this.openModal(this.showRelationAlertModal),!1}onSubmitHeaderLogo(){const t={control:"img",controllabel:"Header Logo",controlId:"headerlogo",logoURL:this.headerlogoBase64,headerColor:this.headerColor,headerTextColor:this.headerTextColor||"#333333",headerFontSize:this.headerFontSize||M.V.HEADER_FONT_SIZE+"px"};if(this.crid){this.webFormControlList=this.ccpaFormConfigService.getFormControlList();
1const n=this.webFormControlList.findIndex(s=>"headerlogo"===s.controlId);this.ccpaFormConfigService.updateControl(this.webFormControlList[n],n,t),this.webFormControlList=this.ccpaFormConfigService.getFormControlList()}else{this.webFormControlList=this.dsarFormService.getFormControlList(this.defaultlanguage);const n=this.webFormControlList.findIndex(s=>"headerlogo"===s.controlId);this.dsarFormService.updateControl(this.webFormControlList[n],n,t),this.webFormControlList=this.dsarFormService.getFormControlList(this.defaultlanguage)}this.setHeaderStyle()}onSubmitQuillEditorData(){let t=this.getCurrentLanguage();if(this.isWelcomeEditor){this.getEditorFontSize();const n={control:"text",controllabel:"Welcome Text",controlId:"welcometext",indexCount:"welcome_text_Index",welcomeText:this.editorDataWelcome,welcomeFontSize:this.welcomeFontSize||"13px",welcomeTextColor:this.welcomeTextColor||"#000",preferControlOrder:""};if(this.crid){this.webFormControlList=this.getWebformByLangFromDB(t);const s=this.webFormControlList.findIndex(l=>"welcometext"===l.controlId);
1this.ccpaFormConfigService.updateControl(this.webFormControlList[s],s,n,t),this.webFormControlList=this.getWebformByLangFromDB(t)}else{this.webFormControlList=this.getWebformByLangFromLocal(t);const s=this.webFormControlList.findIndex(l=>"welcometext"===l.controlId);this.dsarFormService.updateControl(this.webFormControlList[s],s,n,t),this.webFormControlList=this.getWebformByLangFromLocal(t)}this.modalService.dismissAll("Data Saved!")}else{this.getEditorFontSize();const n={control:"text",controllabel:"Footer Text",controlId:"footertext",indexCount:"footer_text_Index",footerText:this.editorDataFooter,footerTextColor:this.footerTextColor||"#000",footerBackgroundColor:void 0!==this.footerBackgroundColor?this.footerBackgroundColor:"#f0b323",footerFontSize:this.footerFontSize||"13px",preferControlOrder:""};if(this.crid){this.webFormControlList=this.getWebformByLangFromDB(t);const s=this.webFormControlList.findIndex(l=>"footertext"===l.controlId);this.ccpaFormConfigService.updateControl(this.webFormControlList[s],s,n,t),this.webFormControlList=this.getWebformByLangFromDB(t)}else{this.webFormControlList=this.getWebformByLangFromLocal(t);
1const s=this.webFormControlList.findIndex(l=>"footertext"===l.controlId);this.dsarFormService.updateControl(this.webFormControlList[s],s,n,t),this.webFormControlList=this.getWebformByLangFromLocal(t)}this.modalService.dismissAll("Data Saved!")}}onChangeEvent(t){this.selectOptions=[],this.selectedFormOption=t.currentTarget.value,"button"===this.selectedFormOption?(this.showFormOption=!0,this.selectedControlType=!0,0===this.selectOptions.length&&this.addOptions()):this.showFormOption=!1}onPreferedLanguageChangeEvent(t){this.skeletonLoading=!1,this.isSaveandCloseClicked&&this.cancelAddingFormControl("cancel"),this.defaultlanguage=t.currentTarget.value,this.isLanguagechangedbyUser=!0;let n=t.currentTarget.value.includes("en")?"EN":t.currentTarget.value;return this.lblText="",this.isAddingFormControl=!1,this.isEditingList=!1,this.inputOrSelectOption=!1,this.showFormOption=!1,this.editSelectionType=!1,this.isSubjectType=!1,this.isRequestType=!1,this.selectedControlType=!1,this.changeControlType=null,this.isRequiredField=!1,this.multiselect=!1,-1==t.currentTarget.value.indexOf("en")&&null==this.crid?(void 0!==this.webForm
1ControlList&&(this.webFormControlList=[]),this.webFormControlList=this.getWebformByLangFromLocal(n),null!=this.webFormControlList&&this.webFormControlList.filter(s=>{"preferedlanguages"===s.controlId&&(s.preferlanguages=this.selectedlanguagelist),"footer_text_Index"===s.indexCount&&(this.editorDataFooter=s.footerText),"welcome_text_Index"===s.indexCount&&(this.editorDataWelcome=s.welcomeText)})):null==this.crid&&null!==this.dsarFormService.getRecentFormControlList()&&void 0!==this.dsarFormService.getRecentFormControlList()?(this.webFormControlList=this.getWebformByLangFromLocal(n),void 0!==this.webFormControlList&&this.webFormControlList.filter(s=>{"preferedlanguages"===s.controlId&&(s.preferlanguages=this.selectedlanguagelist),"footer_text_Index"===s.indexCount&&(this.editorDataFooter=s.footerText),"welcome_text_Index"===s.indexCount&&(this.editorDataWelcome=s.welcomeText)}),this.webFormControlList=this.getWebformByLangFromLocal(n)):null!==this.crid&&null!=this.webFormControlList&&(this.webFormControlList=this.getWebformByLangFromDB(n),null!=this.webForm
1ControlList?this.webFormControlList.filter(s=>{"preferedlanguages"===s.controlId&&(s.preferlanguages=this.selectedlanguagelist),"footer_text_Index"===s.indexCount&&(this.editorDataFooter=s.footerText),"welcome_text_Index"===s.indexCount&&(this.editorDataWelcome=s.welcomeText)}):(this.webFormControlList=this.getWebformByLangFromLocal(n),this.ccpaFormConfigService.updateControlListByLanguage(this.webFormControlList,n))),this.webFormControlList}updateControlType(t){this.changeControlType=t.currentTarget.value,this.isDirty=!0,"requesttype"===this.selectedControlId?(this.updatedControl=this.changeControlType,"select"===this.changeControlType?(this.isRequestTypeSelected=!0,this.checkboxBtnType=!1,this.radioBtnType=!1):"radio"===this.changeControlType?(this.isRequestTypeSelected=!1,this.radioBtnType=!0,this.checkboxBtnType=!1):"checkbox"===this.changeControlType&&(this.isRequestTypeSelected=!1,this.radioBtnType=!1,this.checkboxBtnType=!0),this.changeControlTypes()):"subjecttype"===this.selectedControlId?(this.updatedControl=this.changeControlType,"select"===this.changeControlType?(this.isSubjectTypeSelected=!0,this.subjectTypecheckboxBtnType=!1,this.subjectTyperadioBtn=!1):"radio"===this.changeControlType?(this.isSubjectTypeSelected=!1,this.subjectTyperadioBtn=!0,this.subjectTypecheckboxBtnType=!1):"checkbox"===this.changeControlType&&(this.isSubjectTypeSelected=!1,this.subjectTyperadioBtn=!1,this.subjectTypecheckboxBtnType=!0),this.changeControlTypes()):("subjecttype"!==this.selectedControlId||"requesttype"!==this.selectedControlId)&&(this.updatedControl=this.changeControlType,"radio"===this.changeControlType?(this.isRequestTypeSelected=!1,this.radioBtnType=!0,this.checkboxBtnType=!1):"checkbox"===this.changeControlType&&(this.isRequestTypeSelected=!1,this.radioBtnType=!1,this.checkboxBtnType=!0),this.changeControlTypes())}addingFormControl(){let t;this.isAddingNewControls=!0,this.disableLabel=!1,t=""!==this.languageSelected&&void 0!==this.languageSelected?this.languageSelected:this.getCurrentLanguage(),this.webFormControlList=this.crid?this.getWebformByLangFromDB(t):this.getWebformByLangFromLocal(t),this.multiselect=!1,this.selectedFormOption=null,this.selectOptionControl="",this.changeControlType=null,this.isAddingFormControl=!this.isAddingFormControl,this.selectOptions=[],void 0!==this.selectedControlObj&&(this.selectedControlObj.control="",this.selectedControlObj.controlId="",this.selectedControlObj.controllabel="",this.selectedControlObj.indexCount="",this.selectedControlObj.ismandatory=!1,this.selectedControlObj.preferControlOrder=0,this.selectedControlObj.selectOptions="",this.selectedControlObj.requiredfield=!1),this.lblText=""}isCustomControlWithRadioBtn(t){return!(void 0===t||void 0===t.controlId||!t.controlId.startsWith("Custom"))}isContainHeaderLogo(t){return!(null==t||void 0===t.control||!t.control.startsWith("img"))}isContainFavicon(t){return!(null==t||void 0===t.control||!t.control.startsWith("favicon"))}isContainWelcomeText(t){return null!=t&&"welcometext"===t.controlId}isContainFooterText(t){return null!=t&&"footertext"===t.controlId}isContainFileUpload(t){return null!=t&&"fileupload"===t.controlId}isContainCaptchaControl(t){return null!=t&&"captchacontrol"===t.controlId}
1isCaptchaControlRequired(){return this.crid?(this.webFormControlList=this.ccpaFormConfigService.getFormControlList(),this.webFormControlList.findIndex(t=>"captchacontrol"===t.controlId)):(this.webFormControlList=this.dsarFormService.getFormControlList(this.defaultlanguage),this.webFormControlList.some(t=>"captchacontrol"===t.controlId))}isContainPreferedLanguage(t){return null!=t&&t.length>0&&null!=t[0]||null!=t&&t.length>0&&null==t[0]?!(void 0===t[0].controlId||!t[0].controlId.startsWith("preferedlanguages")):!(null==t||!t.controlId.startsWith("preferedlanguages"))}cancelAddingFormControl(t){this.isCancelBtnClicked="cancel"===t;let n=this.getCurrentLanguage("editing");"cancel"===t&&null===this.crid&&!this.isSaveandCloseClicked&&(this.isDirty=!1,this.retrieveDeletedControls()),"cancel"===t&&null===this.crid?(!this.isDirty&&null!=this.copyWebFormControlListLOCAL&&this.copyWebFormControlListLOCAL.length>0&&this.retrieveDeletedControls(),this.webFormControlList=this.getWebformByLangFromLocal(n),this.isSaveandCloseClicked=!1):"cancel"===t&&null!==this.crid?(void 0!==this.copyWebFormControlListCRID&&this.copyWebFormControlListCRID.length>0&&this.ccpaFormConfigService.setFormControlList(this.copyWebFormControlListCRID,n),this.webFormControlList=this.getWebformByLangFromDB(n),this.isDirty=!1,this.isAddingFormControl=!1,this.isSaveandCloseClicked=!1):"submit"!==t||null===this.crid||this.isEditingList||void 0===this.langlist||1!=this.langlist.length?"submit"!==t||null===this.crid||this.isEditingList?"submit"===t&&null!==this.crid?(this.webForm
1ControlList=this.getWebformByLangFromDB(n),this.isDirty=!0,this.isAddingFormControl=!1,this.isSaveandCloseClicked=!1):"submit"!==t||null!=this.crid||this.isEditingList||void 0===this.langlist||1!=this.langlist.length?"submit"!==t||null!=this.crid||this.isEditingList?"submit"===t&&null==this.crid&&this.isEditingList?(this.hideControlsAfterSave(),this.webFormControlList=this.getWebformByLangFromLocal(n)):"submit"===t&&null==this.crid&&(this.isSaveandCloseClicked=!0,this.isDirty=!0,this.webFormControlList=this.getWebformByLangFromLocal(n)):(this.isAddingFormControl=!0,this.isSaveandCloseClicked=!0,this.webFormControlList=this.getWebformByLangFromLocal(n),this.isDirty=!0):(this.isAddingFormControl=!1,this.isSaveandCloseClicked=!1,this.webFormControlList=this.getWebformByLangFromLocal(n),this.isDirty=!0):(this.isAddingFormControl=!0,this.isSaveandCloseClicked=!0,this.webFormControlList=this.getWebformByLangFromDB(n),this.isDirty=!0):(this.isAddingFormControl=!1,this.isSaveandCloseClicked=!1,this.webFormControlList=this.getWebformByLangFromDB(n),this.isDirty=!0),this.lblText="","submit"===t?(this.isEditingList=!1,this.editSelectionType=!1,this.showFormOption=!1,this.isAddingFormControl=!1):this.hideControlsAfterSave(),this.inputOrSelectOption=!1,this.isSubjectType=!1,this.isRequestType=!1,this.selectedControlType=!1,this.changeControlType=null,this.isRequiredField=!1,this.multiselect=!1}saveAsDraftCCPAFormConfiguration(t){let n=this.getCurrentLanguage();this.formSaveMethod=t,void 0!==this.customFormFields&&this.addCustomFields(this.customFormFields),this.isWebFormPublished&&!this.isEditingPublishedForm?this.navDirective.select(3):(this.isdraftsubmitted=!1,this.setHeaderStyle(),this.crid?(this.webForm
1ControlList=this.getWebformByLangFromDB(n),this.webFormControlList.filter(s=>{"fileupload"===s.controlId?(this.isFileUploadRequired=s.requiredfield,this.isFileuploadRequiredField=s.ismandatory):"footertext"===s.controlId?(this.footerText=s.footerText,this.footerTextColor=s.footerTextColor,this.footerFontSize=s.footerFontSize,this.footerBackgroundColor=void 0!==s.footerBackgroundColor?s.footerBackgroundColor:"#f0b323",this.editorDataFooter=this.footerText):"welcometext"===s.controlId?(this.welcomeText=s.welcomeText,this.welcomeTextColor=s.welcomeTextColor,this.welcomeFontSize=s.welcomeFontSize,this.editorDataWelcome=this.welcomeText):"headerlogo"===s.controlId?(this.headerlogoBase64=s.logoURL,this.headerTextColor=s.headerTextColor||"#333333",this.headerFontSize=s.headerFontSize||M.V.HEADER_FONT_SIZE,this.headerColor=s.headerColor):"favicon"===s.controlId&&(this.headerfaviconBase64=s.faviconURL)})):(this.webFormControlList=this.getWebformByLangFromLocal(n),this.webFormControlList.filter(s=>{"footertext"===s.controlId?(s.footerTextColor=this.footerTextColor,s.footerBackgroundColor=this.footerBackgroundColor,s.footerFontSize=this.footerFontSize):"welcometext"===s.controlId&&(s.welcomeTextColor=this.welcomeTextColor,s.welcomeFontSize=this.welcomeFontSize)}
1),this.dsarFormService.setFormControlList(this.webFormControlList,n),this.updateWebcontrolIndex(this.registerForm.value,this.webFormControlList)),this.isWebFormPublished=!1,2===this.active&&"nav"!==t?(this.isDraftWebForm=!1,this.active=this.isEditingPublishedForm?2:3):2===this.active&&"save"!==t?(this.isDraftWebForm=!1,this.isEditingPublishedForm||this.isFormSavedByNavType?(this.isFormSavedByNavType=!1,this.active=2):this.active=3,this.isDirty&&this.openModal(this.confirmSaveAlert)):this.isDirty&&this.openModal(this.confirmSaveAlert))}addUpdateDSARForm(t){this.closeModal(),this.recommendedIdentifers=[],this.recommendedIdentifierErr="",this.identifierExists="",this.formSaveMethod=t;let a,n=this.getCurrentLanguage();if(null==this.crid)for(let d of this.langlist){let p=this.getWebformByLangFromLocal(d.keyvalue);this.backUpWebFormControlListLOCAL.push({bkplang:d.keyvalue,bkpform:p})}else for(let d of this.langlist){let p=this.getWebformByLangFromDB(d.keyvalue);this.backUpWebFormControlListDB.push({bkplang:d.keyvalue,bkpform:p})}if(this.isDirty=!1,this.languageSelected=void 0,this.languageSelected=n,this.updateCommonStyleForAllLanguages(),void 0===this.basicForm.controls.formname.value)return this.basicFormSubmitted=!0,this.alertMsg="Please complete step 1 Basic",this.isOpen=!0,this.alertType="danger",this.navDirective.select(1),this.isDirty=!1,this.closeModal(),!1;if(1===this.active&&"nav"!==t&&void 0===this.basicForm.controls.formname.value)return this.basicFormSubmitted=!0,this.isDirty=!1,this.alertMsg="Please complete step 1 Basic and save",this.isOpen=!0,this.alertType="danger",this.closeModal(),this.navDirective.select(1),!1;if(2===this.active&&"nav"!==t&&this.isDirty)this.saveAsDraftCCPAFormConfiguration(t);else if(2===this.active&&2==this.nextId&&"nav"==t&&this.isDirty&&null==this.crid)this.langlist=[...this.langlist];else{if(3===this.active&&"nav"!==t&&void 0===this.settingsForm.controls.workflow.value&&void 0===this.settingsForm.controls.selectedApproverID.value&&void 0===this.settingsForm.controls.emailsender.value)return this.isdraftsubmitted=!0,this.isDirty=!1,this.alertMsg=`Please complete step ${void 0===this.formName?"1 Basic, 2 Form & 3 Settings":"2 Form & 3 Settings"} and save`,this.isOpen=!0,this.alertType="danger",this.closeModal(),this.navDirective.select(void 0===this.basicForm.controls.formname.value?1:3),!1;4===this.nextId&&void 0===this.settingsForm.controls.workflow.value&&void 0===this.settingsForm.controls.selectedApproverID.value&&void 0===this.settingsForm.controls.emailsender.value?(this.isdraftsubmitted=!0,this.isDirty=!1,this.alertMsg=`Please complete step ${void 0===this.formName?"1 Basic, 2 Form & 3 Settings":"2 Form & 3 Settings"} and save`,this.isOpen=!0,this.alertType="danger",this.closeModal(),this.navDirective.select(void 0===this.formName?1:3)):(2===this.nextId||4===this.nextId||2==this.active||4==this.active)&&void 0!==this.settingsForm.controls.workflow.value&&void 0!==this.settingsForm.controls.selectedApproverID.value&&void 0!==this.settingsForm.controls.emailsender.value&&null!=this.basicForm.controls.formname.value&&(this.isdraftsubmitted=!0,this.isDirty=!1,this.isFormFieldsEmpty=!1,2===this.nextId||2==this.active||4==this.active?(this.isFormSavedByNavType=!0,this.saveAsDraftCCPAFormConfiguration(t)):this.navDirective.select(3))}if(this.formName=this.basicForm.controls.formname.value,this.crid&&this.isEditingLangList&&(this.webForm
1ControlList=this.getWebformByLangFromLocal(n)),this.crid&&!this.isEditingLangList?this.webFormControlList=this.getWebformByLangFromDB(n):(this.webFormControlList=this.getWebformByLangFromLocal(n),null==this.webFormControlList&&(this.webFormControlList=this.getWebformByLangFromDB(n)),void 0!==this.webFormControlList&&this.webFormControlList.filter(d=>{"preferedlanguages"===d.controlId&&(this.selectedlanguagelist=d.preferlanguages),"welcome_text_Index"===d.indexCount&&(this.welcomeText=d.welcomeText,this.welcomeTextColor=d.welcomeTextColor,this.welcomeFontSize=d.welcomeFontSize,this.editorDataWelcome=d.welcomeText),"footer_text_Index"===d.indexCount&&(this.footerText=d.footerText,this.footerTextColor=d.footerTextColor,this.footerFontSize=d.footerFontSize,this.footerBackgroundColor=void 0!==d.footerBackgroundColor?d.footerBackgroundColor:"#f0b323",this.editorDataFooter=d.footerText),"headerlogo"===d.controlId&&(this.headerlogoBase64=d.logoURL,this.headerColor=d.headerColor,this.headerTextColor=d.headerTextColor||"#333333",this.headerFontSize=d.headerFontSize||M.V.HEADER_FONT_SIZE)})),45!==this.daysleft&&this.daysleft>=91)return this.errorMsgdaysleft=`should not be greater than ${M.V.DEFAULT_DAYS}`,!1;if(a=null==this.crid||this.isEditingLangList?null!=this.crid&&this.isEditingLangList?this.ccpaFormConfigService.getFormControlList():this.dsarFormService.getRecentFormControlList():this.ccpaFormConfigService.getFormControlList(),this.formObject={form_name:this.basicForm.controls.formname.value,form_identifier:this.basicForm.controls.formidentifier.value,form_status:"draft",settings:{approver:this.defaultapprover===this.selectedApproverID?this.defaultapprover:this.selectedApproverID,workflow:this.workflow,days_left:void 0!==this.daysleft&&0===Number(this.daysleft)?M.V.DEFAULT_DAYS:Number(this.daysleft),email_verified:this.isEmailVerificationRequired||!1,pre_mail_verification:this.prePostEmail||!1,captcha:this.isCaptchaVerificationRequired||!1,mail_sender:null!==this.emailsender&&"00000000-0000-0000-0000-000000000000"!==this.emailsender&&this.emailsender!==this.noReplyEmailId?this.emailsender:""},request_form:a},void 0!==this.orgId&&void 0!==this.propId&&null!==this.crid)this.loadingbar.start(),this.isDirty=!1,this.ccpaFormConfigService.updateCCPAForm(this.orgId,this.propId,this.crid,this.formObject,this.constructor.name,_.e.dsarWebFormModule).subscribe(d=>{this.isDraftWebForm=!0,this.isWebFormPublished=!1,this.showFormStatus(),this.alertMsg=d.response,this.isOpen=!0,this.alertType="success",this.loadingbar.stop(),this.closeModal(),this.isDirty=!1,setTimeout(()=>{this.getDSARFormByCRID(this.crid,"dataupdated"),this.licenseAvailabilityForFormAndRequestPerOrg(this.orgId)},0)},d=>{this.loadingbar.stop(),this.alertMsg=d?.error?.error,this.isOpen=!0,this.alertType="danger"}),"save"!==this.formSaveMethod&&(this.modalRef.hide(),this.isDirty=!1),this.isDirty=!1,void 0!==this.settingsFormchangeSubscription?(this.settingsFormchangeSubscription.unsubscribe(),this.closeModal()):void 0!==this.customFormchangeSubscription?(this.customFormchangeSubscription.unsubscribe(),this.closeModal()):void 0!==this.basicFormSubscription&&(this.basicFormSubscription.unsubscribe(),this.closeModal());else{if("save"!==this.formSaveMethod&&this.isDirty&&4!==this.nextId){void 0!==this.modalRef&&this.modalRef.hide();let x=this.getCurrentLanguage();this.languageSelected=x,this.isStepCovered=!1}else"save"!==this.formSaveMethod&&!this.isDirty&&this.modalRef.hide();const d=void 0!==this.settingsForm.controls.workflow.value&&void 0!==this.settingsForm.controls.selectedApproverID.value;let p=3===this.activeId&&2===this.nextId||2===this.active||4===this.nextId||4===this.active,b=4===this.nextId||4===this.active;3===this.activeId&&4===this.nextId||3===this.active&&d||p&&d?(this.loadingbar.start(),this.ccpaFormConfigService.storeFormDataWhileAdding(this.formObject),this.ccpaFormConfigService.createCCPAForm(this.orgId,this.propId,this.formObject,this.constructor.name,_.e.dsarWebFormModule).subscribe(x=>{this.navDirective.select(p&&!b?2:4),this.loadingbar.stop(),this.crid=x.id,this.formObject.crid=this.crid,this.ccpaFormConfigService.isDSARF
1ormCreated=!0,this.ccpaFormConfigService.storeFormDataWhileAdding(this.formObject),this.alertMsg=x.response,this.basicForm.controls.formidentifier.disable(),this.isOpen=!0,this.alertType="success",this.isDirty=!1,"save"!==this.formSaveMethod?(this.modalRef.hide(),this.isDirty=!1):this.isDirty=!1,this.getDSARFormByCRID(this.crid,"dataupdated"),this.organizationService.isOrganizationUpdated.next(!0)},x=>{this.loadingbar.stop(),this.alertMsg=x?.error?.error,this.isOpen=!0,this.alertType="danger"}),this.isDirty=!1,void 0!==this.settingsFormchangeSubscription&&this.settingsFormchangeSubscription.unsubscribe()):(this.isDirty=!1,"save"!==this.formSaveMethod?(this.modalRef.hide(),this.isDirty=!1):(this.isDirty=!1,1===this.active?this.navDirective.select(2):2===this.active?(this.isFormFieldsEmpty=null==this.basicForm.controls.formname.value&&null==this.workflow&&null==this.selectedApproverID,this.navDirective.select(3)):3===this.active&&this.navDirective.select(3)))}}onNavChange(t){if(null==this.daysleft||this.daysleft>90||this.daysleft<=0)return this.isDirty=!1,!1;let n=this.getCurrentLanguage("viewonly");if(this.crid)this.langlist=void 0!==this.langlist&&this.langlist.length>0?[...this.langlist]:this.languageChosenCRID;else if(void 0!==this.langlist&&this.langlist.length>0){this.langlist=[...this.langlist];for(let s=0;s<this.langlist.length;s++)if(void 0!==this.langlist[s].defaultlanguage){const l=this.langlist.findIndex(a=>a.keyvalue==this.langlist[s].defaultlanguage);-1!==l&&(this.languageSelected=this.langlist[l].defaultlanguage)}}else this.langlist=[...this.selectedlanguagelist];this.languageSelected=n,1===t.nextId&&this.isDirty&&this.openModal(this.confirmSaveAlert),2===t.nextId?(this.activeId=t.activeId,this.nextId=t.nextId,this.formSaveMethod="nav",this.basicFormSubmitted=!0,this.formName=this.basicForm.controls.formname.value,void 0===this.formName||""===this.formName?(t.preventDefault(),this.alertMsg="Please complete step 1 Basic",this.isOpen=!0,this.alertType="danger",this.navDirective.select(1),this.isDirty=!1):this.isDirty?this.openModal(this.confirmSaveAlert):(this.navDirective.select(2),this.dsarFormService.updatePreferLanguageList(this.langlist),null!==this.crid?(this.webForm
1ControlList=[],this.webFormControlList=this.getWebformByLangFromDB(n),void 0!==this.webFormControlList&&this.webFormControlList.filter(s=>{"fileupload"===s.controlId?(this.isFileUploadRequired=s.requiredfield,this.isFileuploadRequiredField=s.ismandatory):"footertext"===s.controlId?(this.footerText=s.footerText,this.footerTextColor=s.footerTextColor,this.footerFontSize=s.footerFontSize,this.footerBackgroundColor=void 0!==s.footerBackgroundColor?s.footerBackgroundColor:"#f0b323",this.editorDataFooter=this.footerText):"welcometext"===s.controlId?(this.welcomeText=s.welcomeText,this.welcomeTextColor=s.welcomeTextColor,this.welcomeFontSize=s.welcomeFontSize,this.editorDataWelcome=this.welcomeText):"headerlogo"===s.controlId?(this.headerlogoBase64=s.logoURL,this.headerColor=s.headerColor,this.headerTextColor=s.headerTextColor||"#333333",this.headerFontSize=s.headerFontSize||M.V.HEADER_FONT_SIZE):"favicon"===s.controlId&&(this.headerfaviconBase64=s.faviconURL)})):(this.webFormControlList=this.getWebformByLangFromLocal(n),this.webFormControlList.filter(s=>{"fileupload"===s.controlId?(this.isFileUploadRequired=s.requiredfield,this.isFileuploadRequiredField=s.ismandatory):"footertext"===s.controlId?(this.footerText=s.footerText,this.footerTextColor=s.footerTextColor,this.footerFontSize=s.footerFontSize,this.footerBackgroundColor=void 0!==s.footerBackgroundColor?s.footerBackgroundColor:"#f0b323",this.editorDataFooter=this.footerText):"welcometext"===s.controlId?(this.welcomeText=s.welcomeText,this.welcomeTextColor=s.welcomeTextColor,this.welcomeFontSize=s.welcomeFontSize,this.editorDataWelcome=this.welcomeText):"headerlogo"===s.controlId?(this.headerlogoBase64=s.logoURL,this.headerColor=s.headerColor,this.headerTextColor=s.headerTextColor||"#333333",this.headerFontSize=s.headerFontSize||M.V.HEADER_FONT_SIZE):"favicon"===s.controlId&&(this.headerfaviconBase64=s.faviconURL)})))):3===t.nextId?(null!==this.crid&&this.ccpaFormConfigService.getNumberOfRequestByFormId(this.crid,_.e.dsarWebFormModule,this.constructor.name).subscribe(l=>{this.isSelectWorkFlowDisabled.next(Boolean(l.count))}),this.activeId=t.activeId,this.nextId=t.nextId,this.formSaveMethod="nav",this.basicFormSubmitted=!0,null!=this.basicForm.controls.formname.value||null!=this.workflow&&""!=this.selectedApproverID&&null!=this.selectedApproverID&&null!=this.daysleft||(this.isFormFieldsEmpty=!0),void 0!==this.basicForm.controls.formname.value&&this.isDirty?this.saveAsDraftCCPAFormConfiguration("nav"):void 0===this.basicForm.controls.formname.value||void 0===this.workflow&&void 0===this.selectedApproverID&&null===this.daysleft?(this.isdraftsubmitted=!0,this.basicFormSubmitted=!0,this.isDirty=!1,t.preventDefault(),this.alertMsg="Please complete step "+(void 0===this.formName?"1 Basic, 2 Form & 3 Settings":"2 Form & 3 Settings"),this.isOpen=!0,this.alertType="danger",this.navDirective.select(void 0===this.basicForm.controls.formname.value?1:3)):this.isdraftsubmitted&&this.basicFormSubmitted&&this.navDirective.select(3)):4===t.nextId?(this.formSaveMethod="nav",this.saveAsDraftCCPAFormConfiguration("nav"),this.activeId=t.activeId,this.nextId=t.nextId,this.isdraftsubmitted=!0,this.basicFormSubmitted=!0,this.isResetlinkEnable=!1,null==this.workflow||null==this.selectedApproverID?(this.isdraftsubmitted=!0,this.isDirty=!1,t.preventDefault(),this.alertMsg="Please complete step "+(void 0===this.formName?"1 Basic, 2 Form & 3 Settings":"2 Form & 3 Settings"),this.isOpen=!0,this.alertType="danger",this.navDirective.select(3)):(this.isStepCovered=!0,this.navDirective.select(3))):5===t.nextId&&this.isDirty?this.openModal(this.confirmSaveAlert):5===t.nextId?this.getWebFormScriptLink():this.navDirective.select(this.activeId)}onChangeDaysLeft(t,n){if(Number(t.target.value)<=0)return this.isDirty=!1,this.errorMsgdaysleft="Should be greater than 0",!1;Number(t.target.value)<=Number(M.V.DEFAULT_DAYS)?(this.errorMsgdaysleft="",this.isDirty=!0,void 0!==this.settingsForm&&this.settingsForm.control.get("daysleft").setValue(t.target.value)):(this.isDirty=!1,this.errorMsgdaysleft=`Should not be greater than ${M.
1V.DEFAULT_DAYS}`)}onChangeControlValue(t){this.isDirty=!0,this.isFormFieldsEmpty=null==this.workflow&&null==this.selectedApproverID&&null==this.emailsender}finalPublishDSARForm(){if(this.daysleft>=91)return this.errorMsgdaysleft=`should not be greater than ${M.V.DEFAULT_DAYS}`,!1;void 0!==this.crid&&(this.loadingbar.start(),this.ccpaFormConfigService.publishDSARForm(this.orgId,this.propId,this.crid,this.constructor.name,_.e.dsarWebFormModule).subscribe(t=>{this.isWebFormPublished=!0,this.isDraftWebForm=!1,this.showFormStatus(),this.alertMsg=t.response,this.isOpen=!0,this.alertType="success",this.getDSARFormByCRID(this.crid,"dataupdated"),this.navDirective.select(5),this.getWebFormScriptLink(),this.licenseAvailabilityForFormAndRequestPerOrg(this.orgId),this.loadingbar.stop(),this.isDirty&&(this.isDirty=!1)},t=>{this.alertMsg=t,this.isOpen=!0,this.alertType="danger"}))}updateWebcontrolIndex(t,n){const s=[];return Object.keys(t).filter(l=>{l.includes("Index")&&s.push(l)}),n.forEach(l=>s.forEach(a=>{l.indexCount===a&&(l.preferControlOrder=t[a])})),n}createNewForm(){if(this.dsarFormService.removeControls(),0!==this.subjectType.length&&0!==this.requestType.length&&(hp.loadWebControls(this.defaultlanguage,this.subjectType,this.requestType),null!==this.dsarFormService.getRecentFormControlList()&&void 0!==this.dsarFormService.getRecentFormControlList())){const t=this.dsarFormService.getRecentFormControlList().findIndex(n=>"EN"==n[0].languageselected);this.webFormControlList=this.dsarFormService.getRecentFormControlList()[t],void 0!==this.webForm
1ControlList&&(this.webFormControlList.filter(n=>{"footertext"===n.controlId?(this.footerText=n.footerText,this.footerTextColor=n.footerTextColor,this.footerBackgroundColor=void 0!==n.footerBackgroundColor?n.footerBackgroundColor:"#f0b323",this.footerFontSize=n.footerFontSize):"welcometext"===n.controlId?(this.welcomeText=n.welcomeText,this.welcomeTextColor=n.welcomeTextColor,this.welcomeFontSize=n.welcomeFontSize):"headerlogo"===n.controlId?(this.headerlogoBase64=n.logoURL,this.headerColor=n.headerColor,this.headerTextColor=n.headerTextColor||"#333333",this.headerFontSize=n.headerFontSize||M.V.HEADER_FONT_SIZE):"subjecttype"===n.controlId||"requesttype"===n.controlId?this.lblText=n.controllabel:"fileupload"===n.controlId?(this.isFileUploadRequired=n.requiredfield,this.isFileuploadRequiredField=n.ismandatory):"favicon"===n.controlId&&(this.headerfaviconBase64=n.faviconURL)}),void 0!==this.webFormControlList[0].preferlanguages&&void 0!==this.webFormControlList[0].preferlanguages[0]&&(this.langlist=this.webFormControlList[0].preferlanguages))}}addUpdateFormControls(t,n,s){if(this.crid){const a=this.getWebformByLangFromDB(s).findIndex(d=>d.indexCount===this.existingControl.indexCount);
1this.ccpaFormConfigService.updateControl(this.webFormControlList[a],t,n,s),this.webFormControlList=this.getWebformByLangFromDB(s),this.changeDisplayTypesofControls(t,n,s),this.isDirty=!0}else this.webFormControlList=this.getWebformByLangFromLocal(s),this.copyWebFormControlListLOCAL=[...this.webFormControlList],this.dsarFormService.updateControl(this.webFormControlList[t],t,n,s),this.webFormControlList=this.getWebformByLangFromLocal(s),this.changeDisplayTypesofControls(t,n,s),this.isSaveandCloseClicked&&this.isEditingList?(this.isAddingFormControl=!1,this.showFormOption=!1,this.isSubjectType=!1,this.selectedControlType=!1,this.isEditingList=!1):(this.showFormOption=!0,this.isEditingList=!0,this.isAddingFormControl=!0)}rearrangeFormSequence(t){if(null!=t)return t.sort((n,s)=>{if(void 0!==n.preferControlOrder&&void 0!==s.preferControlOrder)return n.preferControlOrder-s.preferControlOrder}),t}priviewPublishedForm(){this.canDeactivate()?this.router.navigate(["/editwebforms",{crid:this.crid}]):this.openModal(this.confirmSaveAlert)}editQuillEditorDataPopup(t,n){let s=this.getCurrentLanguage();if("welcomeText"===n)if(this.isWelcomeEditor=!0,this.isDirty=!0,this.crid){if(this.webForm
1ControlList=this.getWebformByLangFromDB(s),null!==this.webFormControlList){const l=this.webFormControlList.filter(a=>"welcome_text_Index"===a.indexCount);this.editorDataWelcome=l[0].welcomeText}}else{this.webFormControlList=this.getWebformByLangFromLocal(s);const l=this.webFormControlList.filter(a=>"welcome_text_Index"===a.indexCount);this.editorDataWelcome=l[0].welcomeText}else if(this.isWelcomeEditor=!1,this.isDirty=!0,this.crid){if(this.webFormControlList=this.getWebformByLangFromDB(s),null!==this.webFormControlList){const l=this.webFormControlList.filter(a=>"footer_text_Index"===a.indexCount);this.editorDataFooter=l[0].footerText}}else if(this.webFormControlList=this.getWebformByLangFromLocal(s),void 0!==this.webFormControlList){const l=this.webFormControlList.filter(a=>"footer_text_Index"===a.indexCount);this.editorDataFooter=l[0].footerText}this.modalService.open(t,{ariaLabelledBy:"modal-basic-title"}).result.then(l=>{},l=>{}),this.refreshSpan=!1,setTimeout(()=>{this.refreshSpan=!0},1e3)}onCloseWelcomeTextEditor(){this.modalService.dismissAll();let t=this.getCurrentLanguage();
1if(this.crid){if(this.webFormControlList=this.getWebformByLangFromDB(t),null!==this.webFormControlList){const n=this.webFormControlList.filter(s=>"welcome_text_Index"===s.indexCount);this.editorDataWelcome=n[0].welcomeText}}else{this.webFormControlList=this.getWebformByLangFromLocal(t);const n=this.webFormControlList.filter(s=>"welcome_text_Index"===s.indexCount);this.editorDataWelcome=n[0].welcomeText}}onCloseFooterTextEditor(){this.modalService.dismissAll();let t=this.getCurrentLanguage();if(this.crid){if(this.webFormControlList=this.getWebformByLangFromDB(t),null!==this.webFormControlList){const n=this.webFormControlList.filter(s=>"footer_text_Index"===s.indexCount);this.editorDataFooter=n[0].footerText}}else{this.webFormControlList=this.getWebformByLangFromLocal(t);const n=this.webFormControlList.filter(s=>"footer_text_Index"===s.indexCount);this.editorDataFooter=n[0].footerText}}welcomeStyle(){return{color:this.welcomeTextColor,"font-size":this.welcomeFontSize+"px"}}footerStyle(){return{color:this.footerTextColor,background:void 0!==this.footerBackgroundColor?this.footerBackgroundColor:"#f0b323",padding:"5px","font-size":this.footerFontSize+"px"}}headerStyle(){return{color:this.headerTextColor||"#333333",background:void 0!==this.headerColor?this.headerColor:"#f0b323","font-size":this.headerFontSize+"px"}}setHeaderStyle(){let t=this.getCurrentLanguage();const n={control:"img",controllabel:"Header Logo",controlId:"headerlogo",indexCount:"header_logo_Index",headerColor:this.headerColor,headerTextColor:this.headerTextColor||"#333333",headerFontSize:this.headerFontSize+"px",logoURL:this.headerlogoBase64},s={control:"favicon",controllabel:"favicon",controlId:"favicon",indexCount:"favicon_Index",faviconURL:this.headerfaviconBase64};
1if(this.crid){if(this.webFormControlList=this.getWebformByLangFromDB(t),void 0!==this.webFormControlList&&this.webFormControlList.length>0){const l=this.webFormControlList.findIndex(d=>"headerlogo"===d.controlId);for(let d of this.langlist)this.ccpaFormConfigService.updateControl(this.webFormControlList[l],l,n,d.keyvalue);this.webFormControlList=this.getWebformByLangFromDB(t);const a=this.webFormControlList.findIndex(d=>"favicon"===d.controlId);for(let d of this.langlist)this.ccpaFormConfigService.updateControl(this.webFormControlList[a],a,s,d.keyvalue);this.webFormControlList=this.getWebformByLangFromDB(t)}}else{this.webFormControlList=this.getWebformByLangFromLocal(t);const l=this.webFormControlList.findIndex(d=>"headerlogo"===d.controlId);for(let d of this.langlist)this.dsarFormService.updateControl(this.webFormControlList[l],l,n,d.keyvalue);this.webFormControlList=this.getWebformByLangFromLocal(t);const a=this.webFormControlList.findIndex(d=>"favicon"===d.controlId);for(let d of this.langlist)this.dsarFormService.updateControl(this.webForm
1ControlList[a],a,s,d.keyvalue);this.webFormControlList=this.getWebformByLangFromLocal(t)}this.updateCommonStyleForAllLanguages()}updateCommonStyleForAllLanguages(){let t=[{controlId:"welcometext",propertyname:"welcomeFontSize",updatedvalue:this.welcomeFontSize||"13px"},{controlId:"welcometext",propertyname:"welcomeTextColor",updatedvalue:this.welcomeTextColor||"#000"},{controlId:"headerlogo",propertyname:"headerFontSize",updatedvalue:this.headerFontSize||M.V.HEADER_FONT_SIZE+"px"},{controlId:"headerlogo",propertyname:"headerTextColor",updatedvalue:this.headerTextColor||"#333333"},{controlId:"headerlogo",propertyname:"headerColor",updatedvalue:this.headerColor||"#3968fa"},{controlId:"footertext",propertyname:"footerFontSize",updatedvalue:this.footerFontSize||"13px"},{controlId:"footertext",propertyname:"footerTextColor",updatedvalue:this.footerTextColor||"#000"},{controlId:"footertext",propertyname:"footerBackgroundColor",updatedvalue:this.footerBackgroundColor||"#f0b323"}];this.crid?this.ccpaFormConfigService.updateCommonStyleForAllForm(t):this.dsarFormService.updateCommonStyleForAllForm(t)}loadDefaultApprover(){this.orgId&&setTimeout(()=>{this.organizationService.getOrgTeamMembers(this.orgId,this.constructor.name,_.e.companyModule).subscribe(t=>{this.ApproverList=t.response.filter(s=>-1==s.role_name.indexOf("View")&&s.email_verified);const n=this.ApproverList.filter(s=>s.approver_id===this.selectedApproverID);n.length>0&&(this.defaultapprover=n[0].approver_id)})})}loadWorkFlowList(){this.workFlowService.getWorkflow(this.constructor.name,_.e.workFlowModule,this.currentManagedOrgID).subscribe(t=>{this.workFlowList=t.response;const n=this.workFlowList.filter(s=>s.id===this.workflow);n.length>0&&(this.selectedWorkflowID=n[0].id,this.workflow=this.selectedWorkflowID)},t=>{this.alertMsg=t,this.isOpen=!0,this.alertType="danger"})}loadEmailSenderList(){this.organizationService.GetSendersForWebform(this.constructor.name,_.e.consentSolutionModule,this.currentManagedOrgID).subscribe(t=>{this.emailSenderList=t.response},t=>{console.log(t)})}loadEmailSmtpSenderList(){this.organizationService.getSmtpList(this.constructor.name,_.e.consentSolutionModule,this.currentManagedOrgID).subscribe(t=>{this.emailSmtpSenderList=t.response})}loadCountryList(){this.ccpaFormConfigService.getCountryList().subscribe(t=>{this.countryList=t.response})}loadStateList(){this.ccpaFormConfigService.getStateListLocal().subscribe(t=>this.stateList=t)}onSelectCountry(t){if(this.requestObject.country=t.item.name,this.requestObject.short_country=t.item.sortname,this.filteredStateList=[],""===t.item.id)return!1;this.ccpaFormConfigService.getStateList(t.item.id).subscribe(l=>{this.filteredStateList=l.response})}onSelectState(t){if(""===t.item.id)return!1;{const s="short_state";this.requestObject.state=t.item.name,this.requestObject[s]=t.item.sortname||""}}showPreviewUrlType(t){("longUrl"===t||"shortUrl"===t)&&this.previewCCPAForm(t)}previewCCPAForm(t){if(void 0!==this.formName&&void 0!==this.currentOrganization&&void 0!==this.selectedProperty)if(this.formName.replace(/ /g,"_").toLowerCase(),this.currentOrganization.replace(/ /g,"_").toLowerCase(),this.selectedProperty.replace(/ /g,"_").toLowerCase(),this.orgId&&this.propId){if("longUrl"===t){const d=!this.isWebFormPublished||this.isEditingPublishedForm||this.isResetlinkEnable?"draft":"publish";"localhost"===window.location.hostname?window.open(`http://localhost:4500/dsar/form?orgid=${this.orgId}&propid=${this.propId}&formid=${this.crid}&formstatus=${d}`):window.open(q.N.privacyportalUrl+`?orgid=${this.orgId}&propid=${this.propId}&formid=${this.crid}&formstatus=${d}`)}else if("shortUrl"===t){const d=!this.isWebFormPublished||this.isEditingPublishedForm||this.isResetlinkEnable?"draft":"publish";"publish"===d?"localhost"===window.location.hostname?window.open("http://localhost:4500/dsar/form/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)):window.open(q.N.privacyportalUrl+"/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)):"localhost"===window.location.hostname?window.open("http://localhost:4500/dsar/form/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)+"?status="+d):window.open(q.N.privacyportalUrl+"/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)+"?status="+d)}}else this.alertMsg="Organization or Property not found!",this.isOpen=!0,this.alertType="danger"}getWebFormScriptLink(){this.orgId&&this.propId&&void 0!==this.formName&&void 0!==this.currentOrganization&&void 0!==this.selectedProperty&&(this.formName.replace(/ /g,"_").toLowerCase(),this.currentOrganization.replace(/ /g,"_").toLowerCase(),this.selectedProperty.replace(/ /g,"_").toLowerCase(),"localhost"===window.location.hostname?(this.shortendUrl="http://localhost:4500/dsar/form/"+encodeURIComponent(this.basicForm.controls.formidentifier.value),this.scriptcode="http://localhost:4500/dsar/form?orgid="+this.orgId+"&propid="+this.propId+"&formid="+this.crid):(this.shortendUrl=q.N.privacyportalUrl+"/"+encodeURIComponent(this.basicForm.controls.formidentifier.value),this.scriptcode=q.N.privacyportalUrl+"?orgid="+this.orgId+"&propid="+this.propId+"&formid="+this.crid))}onClosed(t){this.alertMsg=!t,this.isOpen=!1}
1onPrevious(t){2===t&&(this.webFormControlList=this.crid?this.ccpaFormConfigService.getFormControlList():this.dsarFormService.getRecentFormControlList()),this.navDirective.select(t)}getWorkflowWithApproverID(){const t=this.ccpaFormConfigService.getCurrentSelectedFormData();if(null===t)return!1;t.approver?(this.defaultapprover=t.approver,this.selectedApproverID=t.approver,this.workflow=t.workflow,this.isEmailVerificationRequired=t.email_verified,this.prePostEmail=t.pre_mail_verification,this.daysleft=t.days_left):void 0!==t.approver_id&&(this.defaultapprover=t.approver_id,this.selectedApproverID=t.approver_id,this.workflow=t.workflow_id,this.daysleft=t.days_left),null!=t.request_form&&(t.request_form[0][1].filter(n=>{"fileupload"===n.controlId?(this.isFileUploadRequired=n.requiredfield,this.isFileuploadRequiredField=n.ismandatory):"footertext"===n.controlId?(this.footerText=n.footerText,this.footerTextColor=n.footerTextColor,this.footerBackgroundColor=n.footerBackgroundColor,this.footerFontSize=n.footerFontSize):"welcometext"===n.controlId?(this.welcomeText=n.welcomeText,this.welcomeTextColor=n.welcomeTextColor,this.welcomeFontSize=n.welcomeFontSize):"headerlogo"===n.controlId?(this.headerlogoBase64=n.logoURL,this.headerColor=n.headerColor,this.headerTextColor=n.headerTextColor||"#333333",this.headerFontSize=n.headerFontSize||M.V.HEADER_FONT_SIZE):"favicon"===n.controlId&&(this.headerfaviconBase64=n.faviconURL)}),"draft"===t.form_status&&(this.isDraftWebForm=!0,this.isWebFormPublished=!1,this.isEditingPublishedForm=!0),this.pageLoadFormObj={form_name:t.form_name,form_status:t.form_status},this.pageLoadFormSettingsObj={settings:{approver:this.selectedApproverID,workflow:this.workflow,days_left:Number(this.daysleft),email_verified:this.isEmailVerificationRequired||!1,pre_mail_verification:this.prePostEmail||!1,captcha:this.isCaptchaVerificationRequired||!1,mail_sender:this.emailsender}},this.pageLoadFormControls={request_form:t.request_form[0][1]})}uploadFile(t){const n=["pdf","txt","jpeg","jpg","png","doc","docx","csv","xls"];if(t.target.files[0].size/Math.pow(1024,2)>10.5)return this.showFilesizeerror=!0,!1;{const l=t.target.files[0].name.split(".").pop();n.some(a=>a==l)?(this.showFilesizeerror=!1,this.showFileExtnerror=!1,this.uploadFilename=t.target.files[0].name):this.showFileExtnerror=!0}}allowFileupload(t){let n=this.getCurrentLanguage();if(this.isDirty=!0,this.isFileUploadRequired=t.target.checked,this.isFileuploadRequiredFieldVisible=!!this.isFileUploadRequired,this.crid){for(let s=0;s<this.langlist.length;
1s++)if(this.webFormControlList=this.getWebformByLangFromDB(this.langlist[s].keyvalue),void 0!==this.webFormControlList&&this.webFormControlList.length>0){const l=this.webFormControlList.findIndex(a=>"fileupload"===a.controlId);if(-1!==l){const a=this.webFormControlList[l];a.requiredfield=t.target.checked,a.ismandatory=!1,a.preferControlOrder=this.webFormControlList.length-1,this.ccpaFormConfigService.updateControl(this.webFormControlList[l],l,a,this.langlist[s].keyvalue),this.webFormControlList=this.ccpaFormConfigService.getFormControlList(),this.rearrangeFormSequence(this.webFormControlList)}}}else for(let s=0;s<this.langlist.length;s++)if(this.webFormControlList=this.getWebformByLangFromLocal(this.langlist[s].keyvalue),void 0!==this.webFormControlList&&this.webFormControlList.length>0){const l=this.webFormControlList.findIndex(d=>"fileupload"===d.controlId),a=this.webFormControlList[l];a.requiredfield=t.target.checked,a.ismandatory=!1,a.preferControlOrder=this.webFormControlList.length-1,this.dsarFormService.updateControl(this.webForm
1ControlList[l],l,a,this.langlist[s].keyvalue),this.webFormControlList=this.getWebformByLangFromLocal(n),this.rearrangeFormSequence(this.webFormControlList)}}allowEmailVerification(t){this.isDirty=!0,this.isEmailVerificationRequired=t.target.checked,!1===this.isEmailVerificationRequired&&(this.prePostEmail=!1)}disablePrePostEmailVerification(t,n){console.log(t.target.value,n)}updateButtonAction(){this.isDirty=!0}allowCaptchaVerification(t){let n=this.getCurrentLanguage();if(this.isDirty=!0,this.isCaptchaVerificationRequired=t.target.checked,this.crid){if(this.webFormControlList=this.getWebformByLangFromDB(n),void 0!==this.webFormControlList&&this.webFormControlList.length>0)for(let s=0;s<this.webFormControlList.length;s++){const l=this.webFormControlList.findIndex(a=>"captchacontrol"===a.controlId);if(-1!==l){const a=this.webFormControlList[l];a.requiredfield=t.target.checked,a.preferControlOrder=this.webFormControlList.length-1,this.ccpaFormConfigService.updateControlForAllLanguages(l,a)}}}else for(let s=0;s<this.langlist.length;
1s++)if(this.webFormControlList=this.getWebformByLangFromLocal(this.langlist[s].keyvalue),void 0!==this.webFormControlList&&this.webFormControlList.length>0){const l=this.webFormControlList.findIndex(d=>"captchacontrol"===d.controlId),a=this.webFormControlList[l];a.requiredfield=t.target.checked,a.ismandatory=!1,a.preferControlOrder=this.webFormControlList.length-1,this.dsarFormService.updateControl(this.webFormControlList[l],l,a,this.langlist[s].keyvalue),this.webFormControlList=this.getWebformByLangFromLocal(n),this.rearrangeFormSequence(this.webFormControlList)}}loadCaptcha(){"localhost"===window.location.hostname&&(this.imgUrl=q.N.privacyPortal+"api/v1/captcha/image"),"develop-cmp.adzpier-staging.com"===window.location.hostname||"pp.develop-cmp.adzpier-staging.com"===window.location.hostname?this.imgUrl=q.N.apiUrl+"/captcha/image":("cmp.adzpier-staging.com"===window.location.hostname||"pp.cmp.adzpier-staging.com"===window.location.hostname||"qa-cmp.adzpier-staging.com"===window.location.hostname||"pp.qa-cmp.adzpier-staging.com"===window.location.hostname||"portal.adzapier.com"===window.location.hostname||"portal.privacypillar.com"===window.location.hostname)&&(this.imgUrl=q.N.privacyPortal+"api/v1/captcha/image"),this.ccpaFormConfigService.getCaptcha(this.constructor.name,_.e.dsarWebFormModule).subscribe(t=>{this.captchaid=t.id,this.imageToShow="data:image/png;base64,"+t.captcha})}onCheckboxChange(t){let n=this.getCurrentLanguage();if(this.isRequiredField=t.target.checked,void 0!==this.selectedControlObj)if(this.selectedControlObj.requiredfield=t.target.checked,this.crid){if(this.webForm
1ControlList=this.getWebformByLangFromDB(n),void 0!==this.webFormControlList&&this.webFormControlList.length>0)for(let s=0;s<this.webFormControlList.length;s++){const l=this.webFormControlList.findIndex(a=>a.indexCount===this.selectedControlObj.indexCount);if(-1!==l){const a=this.webFormControlList[l];a.requiredfield=this.isRequiredField,this.ccpaFormConfigService.updateControlForAllLanguagestwo(l,a)}}this.webFormControlList=this.getWebformByLangFromDB(n)}else{if(this.webFormControlList=this.getWebformByLangFromLocal(n),void 0!==this.webFormControlList&&this.webFormControlList.length>0)for(let s=0;s<this.webFormControlList.length;s++){const l=this.webFormControlList.findIndex(a=>a.indexCount===this.selectedControlObj.indexCount);-1!==l&&(this.webFormControlList[l].requiredfield=this.isRequiredField,this.dsarFormService.updateControlListByLanguage(this.webFormControlList,n))}this.webFormControlList=this.getWebformByLangFromLocal(n)}}onCheckboxChangeUpload(t){if(this.getCurrentLanguage(),this.isFileuploadRequiredField=t.target.checked,this.isDirty=!0,this.crid){if(this.webForm
1ControlList=this.ccpaFormConfigService.getFormControlList(),void 0!==this.webFormControlList&&this.webFormControlList.length>0)for(let s=0;s<this.webFormControlList.length;s++){const l=this.webFormControlList[s].findIndex(d=>"fileupload"===d.controlId),a=this.webFormControlList[s][l];this.webFormControlList[s][l]?.hasOwnProperty("controlId")&&(a.ismandatory=!!this.isFileuploadRequiredField,a.preferControlOrder=this.webFormControlList.length-1,this.ccpaFormConfigService.updateControlForAllLanguagesForFileUpload(l,a))}this.webFormControlList=this.ccpaFormConfigService.getFormControlList(),this.rearrangeFormSequence(this.webFormControlList)}else{if(this.webFormControlList=this.dsarFormService.getRecentFormControlList(),void 0!==this.webFormControlList&&this.webFormControlList.length>0)for(let s=0;s<this.webFormControlList.length;s++){const l=this.webFormControlList[s].findIndex(b=>"fileupload"===b.controlId),a=this.webFormControlList[s].findIndex(b=>"preferedlanguages"===b.controlId),d=this.webFormControlList[s][l];let p;
1-1!==a&&(p=this.webFormControlList[s][a].languageselected),d.ismandatory=!!this.isFileuploadRequiredField,d.preferControlOrder=this.webFormControlList[s].length-1,this.dsarFormService.updateControl(this.webFormControlList[s][l],l,d,p)}this.webFormControlList=this.dsarFormService.getRecentFormControlList(),this.rearrangeFormSequence(this.webFormControlList)}}copyToClipBoard(t){let n=null;n=document.createElement("textarea"),n.style.height="0px",n.style.left="-100px",n.style.opacity="0",n.style.position="fixed",n.style.top="-100px",n.style.width="0px",document.body.appendChild(n),"embedcode"===t?(n.value=this.azEmbedCode.nativeElement.innerText.trim(),n.select(),document.execCommand("copy"),this.isCodeCopied=!this.isCodeCopied):"shortSharelink"===t?(n.value=this.shortShareLinkCode.nativeElement.innerText.trim().split('"').join(""),n.select(),document.execCommand("copy"),this.isCodeCopied=!this.isCodeCopied):(n.value=this.shareLinkCode.nativeElement.innerText.trim().split('"').join(""),n.select(),document.execCommand("copy"),this.isCodeCopied=!this.isCodeCopied),n&&n.parentNode&&n.parentNode.removeChild(n)}updateCaptchaPosition(t){if(this.crid){this.webFormControlList=this.getWebformByLangFromDB(t);
1const n=this.webFormControlList.findIndex(p=>"fileupload"===p.controlId),s=this.webFormControlList.splice(n,1);this.webFormControlList=this.webFormControlList.concat(s);const l=this.webFormControlList.findIndex(p=>"captchacontrol"===p.controlId),d=this.webFormControlList.splice(l,1);this.webFormControlList=this.webFormControlList.concat(d),this.ccpaFormConfigService.updateControlListByLanguage(this.webFormControlList,t),this.webFormControlList=this.getWebformByLangFromDB(t),this.rearrangeFormSequence(this.webFormControlList)}else{this.webFormControlList=this.getWebformByLangFromLocal(t);const n=this.webFormControlList.findIndex(p=>"fileupload"===p.controlId),s=this.webFormControlList.splice(n,1);this.webFormControlList=this.webFormControlList.concat(s);const l=this.webFormControlList.findIndex(p=>"captchacontrol"===p.controlId),d=this.webFormControlList.splice(l,1);this.webFormControlList=this.webFormControlList.concat(d),this.dsarFormService.setFormControlList(this.webFormControlList,t),this.webFormControlList=this.getWebformByLangFromLocal(t),this.rearrangeFormSequence(this.webForm
1ControlList)}}showFormStatus(){return this.isWebFormPublished&&!this.isDraftWebForm?"Publish":"Draft"}transform(t){return this.sanitizer.bypassSecurityTrustResourceUrl(t)}fileChangeEvent(t){if(this.imageError=null,t.target.files&&t.target.files[0]){this.isDirty=!0;const n=1e6,s=["image/png","jpg","png","image/jpeg"],l=15200,a=25600;this.logoFilename=t.target.files[0].name;const d=t.target.files[0].name.split(".").pop();if(this.logoFilesize=this.formatBytes(t.target.files[0].size),t.target.files[0].size>n)return this.alertMsg="Maxium 1 MB size is allowed!",this.isOpen=!0,this.alertType="danger",this.headerLogoForm.reset(),this.isDirty=!1,!1;if(!s.some(p=>p===d))return this.imageError="Only JPG or PNG Images are allowed",this.alertMsg=this.imageError,this.isOpen=!0,this.alertType="danger",this.headerLogoForm.reset(),this.isDirty=!1,!1;{const p=new FileReader;p.onload=b=>{const x=new Image;x.src=b.target.result,x.onload=y=>{const g=y.currentTarget.height,w=y.currentTarget.width;if(this.logoHeight=g/2,this.logoWidth=w/2,g>l&&w>a)return this.imageError="Maximum dimension allowed "+l+"*"+a+"px",this.alertMsg=this.imageError,this.isOpen=!0,this.alertType="danger",this.isDirty=!1,!1;this.headerlogoBase64=b.target.result,this.isImageSaved=!0,this.setHeaderStyle()},this.cdRef.markForCheck()},p.readAsDataURL(t.target.files[0])}}}faviconChangeEvent(t){if(this.imageError=null,t.target.files&&t.target.files[0]){this.isDirty=!0;const s=["image/png","jpg","png","image/jpeg"],l=32,a=32;this.faviconFilename=t.target.files[0].name;const d=t.target.files[0].name.split(".").pop();if(this.faviconFilesize=this.formatBytes(t.target.files[0].size),!s.some(p=>p===d))return this.imageError="Only JPG or PNG Images are allowed",this.alertMsg=this.imageError,this.isOpen=!0,this.alertType="danger",this.isDirty=!1,this.faviconForm.reset(),!1;{const p=new FileReader;p.onload=b=>{const x=new Image;x.src=b.target.result,x.onload=y=>{const g=y.currentTarget.height,w=y.currentTarget.width;if(this.logoHeight=g,this.logoWidth=w,g>l&&w>a)return this.imageError="Maximum dimension allowed "+l+"*"+a+" px for favicon",this.alertMsg=this.imageError,this.isOpen=!0,this.alertType="danger",this.isDirty=!1,this.faviconForm.reset(),!1;this.headerfaviconBase64=b.target.result,this.isImageSaved=!0,this.setHeaderStyle()},this.cdRef.markForCheck()},p.readAsDataURL(t.target.files[0])}}}formatBytes(t,n=2){if(0===t)return"0 Bytes";const l=n<0?0:n,d=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,d)).toFixed(l))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d]}deleteSelectedLogo(){this.headerlogoBase64="",this.logoFilesize="",this.logoWidth=0,this.logoHeight=0,this.logoFilename="",this.isDirty=!0,this.setHeaderStyle(),this.headerLogoForm.reset()}deleteSelectedFavicon(){this.headerfaviconBase64="",this.faviconFilesize="",this.logoWidth=0,this.logoHeight=0,this.faviconFilename="",this.isDirty=!0,this.setHeaderStyle(),this.faviconForm.reset()}getDSARFormByCRID(t,n){if(this.isDirty=!1,this.orgId&&this.propId)return this.ccpaFormConfigService.getCCPAFormConfigByID(this.orgId,this.propId,t,n,this.constructor.name,_.e.dsarWebFormModule).subscribe(s=>{if(s){let l;this.formObject=s.response,null!=s.response.request_form&&(this.langlist=this.getSelectedLanguageList(s.response.request_form)),l=s.response.request_form,null!==l&&Array.isArray(l[0])?this.isOldENForm=l[0].some(p=>"preferedlanguages"==p.controlId):null!==l?this.isOldENForm=l.some(p=>"preferedlanguages"==p.controlId):(this.alertMsg="Error in webform!",this.isOpen=!0,this.alertType="danger",setTimeout(()=>{this.navigateToWebForm()},2e3)),this.isOldENForm||null!==l&&(l.unshift({control:"",languageselected:"EN",controllabel:"Preferred languages",controlId:"preferedlanguages",indexCount:"preferedlanguages_Index",preferlanguages:this.langlist}),this.ccpaFormConfigService.setFormControlList(l,"EN")),void 0!==this.langlist&&1==this.langlist.length&&(this.langlist=[{defaultlanguage:this.langlist[0].keyvalue,label:this.langlist[0].label,keyvalue:this.langlist[0].keyvalue}],this.languageChosenCRID=[...this.langlist]),void 0!==this.langlist&&this.langlist.length>0||(this.langlist=[{defaultlanguage:"EN",label:"English (US)",keyvalue:"EN"}]),this.languageChosenCRID=[...this.langlist],this.ccpaFormConfigService.removeCurrentSelectedFormData();const a="request_form";let d=this.getCurrentLanguage();this.languageSelected=d,null!=s.response[a]&&void 0!==s.response[a][0]&&void 0!==s.response[a][0].languageselected&&d==s.response[a][0].languageselected?(this.ccpaFormConfigService.setFormControl
1List(s.response[a],d),this.webFormControlList=this.getWebformByLangFromDB(s.response[a][0].languageselected)):(this.ccpaFormConfigService.setFormControlList(s.response[a]),this.webFormControlList=this.getWebformByLangFromDB(d)),this.isCaptchaVerificationRequired=s.response.captcha,this.isResetlinkEnable&&this.isWebFormPublished&&this.isEditingPublishedForm?""!==this.basicForm.controls.formname.value&&this.basicForm.controls.formname.setValue(this.basicForm.controls.formname.value):(this.formName=s.response.form_name,this.basicForm.controls.formname.setValue(s.response.form_name),this.previousIdentifierValue=s.response.form_identifier,this.basicForm.controls.formidentifier.setValue(s.response.form_identifier),this.generatedURL="http://localhost:4500/dsar/form/"+encodeURIComponent(s.response.form_identifier)+"?status=publish"),this.pageLoadFormObj={form_name:s.response.form_name,form_status:s.response.form_status},this.selectedApproverID=s.response.settings.approver,this.workflow=s.response.settings.workflow,this.isEmailVerificationRequired=s.response.email_verified||s.response.settings.email_verified||!1,this.prePostEmail=s.response.pre_mail_verification||s.response.settings.pre_mail_verification||!1,this.daysleft=s.response.settings.days_left,this.emailsender="00000000-0000-0000-0000-000000000000"!==s.response.mail_sender?s.response.mail_sender:"",void 0!==this.webForm
1ControlList&&this.webFormControlList.filter(p=>{"fileupload"===p.controlId?(this.isFileUploadRequired=p.requiredfield,this.isFileuploadRequiredField=p.ismandatory):"footertext"===p.controlId?(this.footerText=p.footerText,this.footerTextColor=p.footerTextColor,this.footerFontSize=p.footerFontSize,this.footerBackgroundColor=void 0!==p.footerBackgroundColor?p.footerBackgroundColor:"#f0b323",this.editorDataFooter=this.footerText):"welcometext"===p.controlId?(this.welcomeText=p.welcomeText,this.welcomeTextColor=p.welcomeTextColor,this.welcomeFontSize=p.welcomeFontSize,this.editorDataWelcome=this.welcomeText):"headerlogo"===p.controlId?(this.headerlogoBase64=p.logoURL,this.headerColor=p.headerColor,this.headerTextColor=p.headerTextColor||"#333333",this.headerFontSize=p.headerFontSize||M.V.HEADER_FONT_SIZE):"subjecttype"===p.controlId?(this.sideMenuSubjectTypeOptions=p.selectOptions,this.lblText=p.controllabel):"requesttype"===p.controlId?(this.sideMenuRequestTypeOptions=p.selectOptions,this.lblText=p.controllabel):"favicon"===p.controlId&&(this.headerfaviconBase64=p.faviconURL)}),"publish"===s.response.form_status?this.isResetlinkEnable||(this.isWebFormPublished=!0,this.isDraftWebForm=!1,this.isEditingPublishedForm=!1):(this.isWebFormPublished=!1,this.isDraftWebForm=!0,this.isEditingPublishedForm=!0),this.showFormStatus(),this.pageLoadFormSettingsObj={settings:{approver:s.response.settings.approver,workflow:s.response.settings.workflow,days_left:s.response.settings.days_left,email_verified:this.isEmailVerificationRequired||!1,pre_mail_verification:this.prePostEmail||!1,captcha:this.isCaptchaVerificationRequired||!1,mail_sender:s.response.mail_sender}}}},s=>{this.alertMsg=s,this.isOpen=!0,this.alertType="danger"})}getDSARFormByCRIDwithSubjectRequestType(t,n){let s=this.ccpaFormConfigService.getCCPAFormConfigByID(this.orgId,this.propId,t,n,this.constructor.name,_.e.dsarWebFormModule),l=this.ccpaRequestService.getCCPAdefaultRequestSubjectType(this.constructor.name,_.e.dsarWebFormModule);return(0,se.D)([s,l])}getCombinedData(){null!==this.crid&&this.getDSARFormByCRIDwithSubjectRequestType(this.crid,"dataview").subscribe(t=>{this.subjectRequestType=t[1].request_type,this.dsarFormbyCrid=t[0]})}editFormAfterPublish(){this.isEditingPublishedForm=!this.isEditingPublishedForm,this.isWebFormPublished=!1,this.isDraftWebForm=!0,this.pageLoadFormObj={form_name:this.formName,form_status:this.showFormStatus().toLowerCase()}}editFormBeforePublish(){this.isEditingPublishedForm=!1,this.isWebFormPublished=!1,this.isDraftWebForm=!0}togglePublish(){if(!this.isWebFormPublished)return this.finalPublishDSARForm();this.confirmForEditing(),this.addUpdateDSARForm("save")}openModal(t){this.modalSubscription=this.bsmodalService.onHide.subscribe(n=>{this.isModalOpen=!!n,this.modalSubscription.unsubscribe()}),this.modalRef=this.bsmodalService.show(t,{class:"",keyboard:!1,backdrop:!0,ignoreBackdropClick:!0})}confirmForEditing(){this.editFormAfterPublish()}decline(){this.modalRef.hide()}closeModal(){this.isDirty=!1,void 0!==this.modalRef&&this.modalRef.hide()}resetWebform(){if(this.isEditingPublishedForm=!this.isEditingPublishedForm,this.isdraftsubmitted=!1,this.basicFormSubmitted=!1,null!==this.crid&&this.settingsForm.form.dirty)this.retrieveDeletedControls(),this.isDirty=!0,this.settingsForm.form.markAsPristine(),this.getDSARFormByCRID(this.crid,"dataupdated");else if(null!==this.crid&&void 0!==this.deletedwebformcontrols&&this.deletedwebformcontrols.length>0)this.retrieveDeletedControls(),this.isDirty=!0,this.settingsForm.form.markAsPristine(),this.navDirective.select(this.activeId);else if(null==this.crid&&void 0!==this.deletedwebformcontrols&&this.deletedwebformcontrols.length>0)this.retrieveDeletedControls(),this.isDirty=!0,this.settingsForm.form.markAsPristine(),this.navDirective.select(this.activeId);else if(null==this.crid&&void 0!==this.selectOptions&&this.selectOptions.length>0){for(const t of this.selectedlanguagelist)this.switchLanguages(t.keyvalue,this.selectedlanguagelist,!0);this.isDirty=!1,this.settingsForm.form.markAsPristine(),this.navDirective.select(this.activeId)}else null==this.crid&&null==this.selectOptions&&null==this.deletedwebformcontrols?(this.retrieveDeletedControls(),this.isDirty=!1,this.settingsForm.form.markAsPristine(),this.navDirective.select(this.activeId)):null==this.crid&&this.settingsForm.form.dirty&&(this.isDirty=!0,this.settingsForm.form.markAsPristine(),this.navDirective.select(this.activeId));this.modalRef.hide(),null!==this.crid&&this.getDSARFormByCRID(this.crid,"dataupdated"),null==this.crid&&(this.isDirty=!0,this.navDirective.select(this.activeId))}disableEditPublishBtn(){return!(!this.isWebFormPublished&&this.isEditingPublishedForm&&!this.isResetlinkEnable)&&(!!(this.isWebFormPublished&&this.isEditingPublishedForm&&this.isResetlinkEnable)||void 0)}isEditorDisabled(){return this.isWebFormPublished&&!this.isEditingPublishedForm?{height:"200px","background-color":"#f5f6fa",cursor:"not-allowed"}:{height:"200px","background-color":"#ffffff"}}onColorSelection(t,n){"headerColor"===n?(this.headerColor=t,this.isDirty=!0):"headerTextColor"===n?(this.headerTextColor=t,this.isDirty=!0):"welcomeTextColor"===n?(this.welcomeTextColor=t,this.isDirty=!0):"footerTextColor"===n?(this.footerTextColor=t,this.isDirty=!0):"footerBackgroun
1dColor"===n&&(this.footerBackgroundColor=t,this.isDirty=!0),this.setHeaderStyle()}onColorHexChange(t){this.headerColor=t,this.isDirty=!0}getEditorFontSize(){const t=[{"ql-size-huge":"40"},{"ql-size-large":"24"},{"ql-size-small":"12"},{"ql-align-center":"13"},{"ql-align-right":"13"},{"<p>":"13"},{"<p>":"14"},{"<h1>":"40"},{"<h1>":"28"},{"<h2>":"24"}];for(const n in t){if(void 0===this.quillEditorText.get("editor")||null===this.quillEditorText.get("editor").value||-1===this.quillEditorText.get("editor").value.indexOf(Object.keys(t[n])))return!0;if(this.isWelcomeEditor){if("ql-size-huge"!==Object.keys(t[n])[0]&&"ql-size-large"!==Object.keys(t[n])[0])return this.welcomeFontSize=Object.values(t[n])[0]}else if("ql-size-huge"!==Object.keys(t[n])[0]&&"ql-size-large"!==Object.keys(t[n])[0])return this.footerFontSize=Object.values(t[n])[0]}}onLabelChange(t){if(void 0!==this.webFormControlList&&-1!==this.webFormControlList.findIndex(s=>{})&&null===this.changeControlType)return this.alertMsg="Label already exist!",this.isOpen=!0,this.alertType="danger",!1}accordionChangeStatus(t,n){"first"===n?(this.isDirty=!1,this.accordionStatus.isFirstopen=t):"second"===n?(this.isDirty=!1,this.accordionStatus.isSecondopen=t):"third"===n&&(this.isDirty=!1,this.accordionStatus.isThirdopen=t)}licenseAvailabilityForFormAndRequestPerOrg(t){this.dataService.checkLicenseAvailabilityPerOrganization(t).pipe((0,Ce.q)(1)).subscribe(n=>{let s={...n[0].response,...n[1].response,...n[2].response};this.dataService.setAvailableLicenseForFormAndRequestPerOrg(s)},n=>{console.log(n)})}navigateToWebForm(){this.dsarFormService.removeControls(),this.ccpaFormConfigService.removeControls(),this.ccpaFormConfigService.removeStoredDataBeforeEdit(),this.ccpaFormConfigService.removeStoredFormDataBeforeSavingToDB(),sessionStorage.removeItem("customdp_dsarformlanguages"),this.ccpaFormConfigService.isDSARFormCreated=!1,this.router.navigate(["/privacy/dsar/webforms"],{queryParams:{oid:this.queryOID,pid:this.queryPID},queryParamsHandling:"merge",skipLocationChange:!1})}canDeactivate(){return this.isDirty}ngAfterContentChecked(){this.cd.detectChanges()}ngAfterViewChecked(){let t=this.rightClickStatus();if(t!==this.rightArrowStatus&&(this.rightArrowStatus=t,this.cdRef.detectChanges()),void 0!==this.languageBtnListScroller&&null!==this.languageBtnListScroller.nativeElement.querySelector("li").offsetWidth){const s=this.languageBtnListScroller.nativeElement.parentElement.offsetWidth,l=this.languageBtnListScroller.nativeElement.querySelector("li").offsetWidth;this.scrollLimit=-(l*this.languageBtnListScroller.nativeElement.childElementCount-s)}void 0!==this.customFormFields&&(this.customFormchangeSubscription=this.customFormFields.valueChanges.subscribe(n=>{void 0!==this.customFormFields&&this.customFormFields.form.dirty&&(this.isDirty=!0)})),void 0!==this.basicForm&&(this.basicFormSubscription=this.basicForm.valueChanges.subscribe(n=>{this.isDirty=n.formname!==this.formName})),this.userService.isClickOnSearchModal&&(this.userService.isClickOnSearchModal=!1),this.isclickOndocument=this.userService.isUserClickOutsideCustomDropDown}getUpdatedFormList(){return this.dsarFormService.selectedlang=this.defaultlanguage,this.dsarFormService.getRecentFormControlList()}ngOnDestroy(){this.webFormControlList=[],this.selectedwebFormControlList=[],void 0!==this.customFormchangeSubscription&&this.customFormchangeSubscription.unsubscribe(),void 0!==this.settingsFormchangeSubscription&&this.settingsFormchangeSubscription.unsubscribe(),void 0!==this.basicFormSubscription&&this.basicFormSubscription.unsubscribe()}loadOrgProperty(){this.organizationService.getOrganizationWithProperty(this.constructor.name,_.e.companyModule).subscribe(t=>{this.orgPropertyMenu=t.response;const n=this.orgPropertyMenu.findIndex(s=>s.id==this.queryOID);if(-1!==n){const s=this.orgPropertyMenu[n],l=void 0!==s&&s.property.filter(a=>a.property_id===this.queryPID);l&&(this.selectedProperty=l[0].property_name,this.basicForm.controls.selectedProperty.setValue(this.selectedProperty),this.basicForm.controls.currentOrganization.setValue(this.currentOrganization))}})}onChangeFontSize(t){return this.isDirty=!0,parseInt(t.target.value)>20&&this.welcomeFontSize>20?(this.welcomeFontSize=20,!1):parseInt(t.target.value)>20&&this.footerFontSize>20?(this.footerFontSize=20,!1):parseInt(t.target.value)>40&&this.headerFontSize>40?(this.headerFontSize=40,!1):void 0}getOIDPIDFromURL(){if(-1!==this.location.path().indexOf("oid")){let t=(0,te.Dq)(this.location.path());null!=t&&(this.currentManagedOrgID=t[0])}else if(void 0!==this.userService.currentProductRoute&&-1!==this.userService.currentProductRoute.indexOf("oid")){let t=(0,te.Dq)(this.userService.currentProductRoute);null!=t&&(this.currentManagedOrgID=t[0])}else null!==this.organizationService.getCurrentOrgWithProperty()&&void 0!==this.organizationService.getCurrentOrgWithProperty()&&(this.currentManagedOrgID=this.organizationService.getCurrentOrgWithProperty().organization_id)}isCheckboxchecked(t){return-1!==this.selectedlanguagelist.findIndex(s=>s.value===t.value)}onClickDropDownValuechkbox(t){if(this.selectedlanguagelist.some(s=>s.value===t.value)){const s=this.selectedlanguagelist.findIndex(l=>l.key===t.key);this.selectedlanguagelist.splice(s,1),this.defaultlanguage="EN"}else this.selectedlanguagelist.push(t)}onClickDefaultLanguageRadiobtn(t){this.loadWebControl(),this.CreateUpdateDSARForm(this.crid),this.isshowlanguagediv=!1}onClickCustomDropDown(t){t.stopPropagation(),this.isClickedOnModal=!1,this.isclickOndocument=!0,this.userService.isClickOnSearchModal=this.isClickedOnModal}onClickCustomDPReceivedStatus(t){this.customDpReceivedStatus=t}onClickMultilangCheckBox(t){if(null==t)return this.openModal(this.defaultLanguageAlertModal),!1;if(void 0!==t.dropdownlist&&t.dropdownlist.length>0&&null==t.uncheckedlist&&(this.langAddedRecently=t.dropdownlist[t.dropdownlist.length-1]),void 0!==t.uncheckedlist&&t.uncheckedlist.length>0){if(this.langlist.some(g=>g.defaultlanguage===t.uncheckedlist[t.uncheckedlist.length-1].keyvalue))return this.openModal(this.defaultLanguageAlertModal),!1;this.langRemovedRecently=t.uncheckedlist[t.uncheckedlist.length-1];const y=this.langlist.findIndex(g=>g.keyvalue==this.langRemovedRecently.keyvalue);this.langlist.splice(y,1)}
1if(void 0!==this.langAddedRecently){if(this.isDirty=!0,this.isRecentlyAddedLanguageExistInList(this.langAddedRecently))null==this.crid?(this.langlist=[...t.dropdownlist],this.dsarFormService.updatePreferelanguageListForAllForm(this.langlist)):(this.langlist=[...t.dropdownlist],this.ccpaFormConfigService.updatePreferelanguageListForAllForm(this.langlist));else if(this.langlist=[...t.dropdownlist],this.switchLanguages(this.langAddedRecently.keyvalue,t.dropdownlist),null!==this.crid){let x=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue);this.ccpaFormConfigService.setFormControlList(x,this.langAddedRecently.keyvalue),this.ccpaFormConfigService.updatePreferelanguageListForAllForm(this.langlist),this.updateCommonStyleForAllLanguages()}else this.dsarFormService.updatePreferelanguageListForAllForm(this.langlist),this.updateCommonStyleForAllLanguages();this.langlist=[...t.dropdownlist]}void 0!==this.langRemovedRecently&&(this.isDirty=!0,null==this.crid?(this.dsarFormService.deleteFormControlListyByLang(this.langRemovedRecently.keyvalue),this.dsarFormService.updatePreferelanguageListForAllForm(t.dropdownlist)):(this.ccpaFormConfigService.deleteFormControlListyByLang(this.langRemovedRecently.keyvalue),this.ccpaFormConfigService.updatePreferelanguageListForAllForm(t.dropdownlist)),this.langlist=[...t.dropdownlist]),void 0!==t.dropdownlist&&t.dropdownlist.length>0?(this.langlist=[...t.dropdownlist],this.editedLangList=[...t.dropdownlist]):(this.langlist=[{defaultlanguage:"EN",label:"English (US)",keyvalue:"EN"}],this.editedLangList=[...this.langlist]),this.isEditingLangList=!0;let l,s=this.getCurrentLanguage("viewonly");l=null==this.crid?this.getWebformByLangFromLocal(s):this.getWebformByLangFromDB(this.langlist[0].keyvalue||s),this.isLanguageAddRemovedbyUser=!0;if(void 0!==this.languageChosenCRID&&this.languageChosenCRID.length>0&&(this.selectedlanguagelist=[...this.languageChosenCRID]),2==this.nextId&&1==this.activeId||null!==this.crid){let x=this.getListCustomControlIndexes(l),y=[],g=[];if(void 0!==this.langAddedRecently){if(this.isDirty=!0,null==this.crid?g=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue):(g=this.getWebformByLangFromDB(this.langAddedRecently.keyvalue),(null==g||void 0!==g[0]&&null==g[0].languageselected)&&(g=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue))),void 0!==x&&0!==x.length)for(const w of x)if(void 0!==w){void 0!==g[w.replacewithindex]&&y.push(g[w.replacewithindex]);const F=g.findIndex(H=>H.controlId==w.replaceobj.controlId);-1!==F&&F==w.replacewithindex?(g[w.replacewithindex].ismandatory=w.replaceobj.ismandatory,g[w.replacewithindex].requiredfield=w.replaceobj.requiredfield,g[w.replacewithindex].preferControlOrder=w.replaceobj.preferControlOrder):-1!==w.replaceobj.controlId.indexOf("Custom")&&(g[w.replacewithindex]=w.replaceobj)}if(void 0!==y&&y.length>0)for(let w of y)if(void 0!==w){const F=g.findIndex(H=>H.controlId==w.controlId);-1!==F?g[F]=w:g[g.length]=w}null==this.crid?this.dsarFormService.setFormControlList(g,this.langAddedRecently.keyvalue):this.ccpaFormConfigService.setFormControlList(g,this.langAddedRecently.keyvalue)}if(null==this.crid){let w=[],F=[],H=[],W=[];if(null==this.crid){w=this.getWebformByLangFromLocal(this.langlist[0].keyvalue),F=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue),H=[...F],W=this.getListOfControlsPlacementOrder(w);for(const Y of W){let X=F.findIndex(K=>void 0!==K&&K.controlId===Y.referencobj.controlId);H[Y.referenceorderindex]=F[X]}this.dsarFormService.setFormControlListWithPlacementOrder(H,this.langAddedRecently.keyvalue)}if(g=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue),void 0!==g){this.dsarFormService.setFormControlList(g,this.langAddedRecently.keyvalue);let Y=l.findIndex(A=>"subjecttype"===A.controlId),X=g.findIndex(A=>"subjecttype"===A.controlId);this.dsarFormService.changeControls(X,{requiredfield:l[Y].requiredfield,control:l[Y].control,controlId:l[Y].controlId},this.langAddedRecently.keyvalue);let P=l.findIndex(A=>"requesttype"===A.controlId),V=g.findIndex(A=>"requesttype"===A.controlId);this.dsarFormService.changeControls(V,{requiredfield:l[P].requiredfield,control:l[P].control,controlId:l[P].controlId},this.langAddedRecently.keyvalue),g=this.getWebformByLangFromLocal(this.langAddedRecently.keyvalue),this.isDirty=!0}}else{if(void 0!==g&&g.length>0&&void 0!==this.langAddedRecently){this.ccpaFormConfigService.updateControl
1ListByLanguage(g,this.langAddedRecently.keyvalue),g=this.getWebformByLangFromDB(this.langAddedRecently.keyvalue);let w=l.findIndex(A=>"subjecttype"===A.controlId),F=g.findIndex(A=>"subjecttype"===A.controlId);this.ccpaFormConfigService.changeControls(F,{requiredfield:l[w]?.requiredfield,control:l[w].control,controlId:l[w].controlId},this.langAddedRecently.keyvalue);let W=l.findIndex(A=>"requesttype"===A.controlId),Y=g.findIndex(A=>"requesttype"===A.controlId);this.ccpaFormConfigService.changeControls(Y,{requiredfield:l[W].requiredfield,control:l[W].control,controlId:l[W].controlId},this.langAddedRecently.keyvalue),this.isDirty=!0;let K=[],P=[],V=[],ee=[];if(null!==this.crid){K=this.getWebformByLangFromDB(this.langlist[0].keyvalue),P=this.getWebformByLangFromDB(this.langAddedRecently.keyvalue),V=[...P],ee=this.getListOfControlsPlacementOrder(K);for(const A of ee){let Mp=P.findIndex(je=>void 0!==je&&je.controlId===A.referencobj.controlId);V[A.referenceorderindex]=P[Mp]}this.ccpaFormConfigService.setFormControlListWithPlacementOrder(V,this.langAddedRecently.keyvalue)}}this.langlist=[...t.dropdownlist],this.languageChosenCRID=[...this.selectedlanguagelist]}}else for(let x=0;x<this.langlist.length;x++)if(void 0!==this.langlist[x].defaultlanguage){const y=this.langlist.findIndex(g=>g.keyvalue==this.langlist[x].defaultlanguage);-1!==y&&(this.languageSelected=this.langlist[y].defaultlanguage)}}get languageListbyUser(){return this.selectedlanguagelist}set languageListbyUser(t){this.selectedlanguagelist=t}onClickRadioBtn(t){if(this.isEditingLangList=!0,this.defaultlanguagesetbyuser=t.defaultvalue,this.langlist=t.dropdownlist,this.editedLangList=[...t.dropdownlist],void 0!==this.langlist&&this.langlist.length>0){this.langlist.forEach(s=>{void 0!==s.defaultlanguage&&delete s.defaultlanguage});const n=this.langlist.findIndex(s=>s.keyvalue===t.defaultvalue);-1!==n&&(this.langlist[n].defaultlanguage=t.defaultvalue)}this.crid?(this.copyWebFormControlListCRID=this.ccpaFormConfigService.getFormControlList(),this.ccpaFormConfigService.updatePreferelanguageListForAllForm(this.langlist),this.isDirty=!0):(this.copyWebFormControlListLOCAL=this.ccpaFormConfigService.getFormControlList(),this.dsarFormService.updatePreferelanguageListForAllForm(this.langlist),this.isDirty=!0)}getWebformByLangFromDB(t){let n,s;if(this.getCurrentLanguage(),null!==this.ccpaFormConfigService.getFormControlList()&&void 0!==this.ccpaFormConfigService.getFormControlList()){const a=this.ccpaFormConfigService.getFormControlList().findIndex(d=>void 0!==d[0]&&d[0].languageselected==t);return s=this.ccpaFormConfigService.getFormControlList().some(d=>null!=d.controlId&&"preferedlanguages"==d.controlId||void 0!==d[0]&&"preferedlanguages"==d[0].controlId),-1!==a?n=this.ccpaFormConfigService.getFormControlList()[a]:void 0!==this.ccpaFormConfigService.getFormControlList()&&"EN"==t&&s?this.ccpaFormConfigService.getFormControlList():n=this.getWebformByLangFromLocal(t)}}getWebformByLangFromLocal(t){let s=""!==t&&null!=t&&"en-GB"!==t&&"en-US"!==t&&"en-UK"!==t?t:"EN";if(null!==this.dsarFormService.getRecentFormControlList()&&void 0!==this.dsarFormService.getRecentFormControlList()){const l=this.dsarFormService.getRecentFormControlList().findIndex(a=>void 0!==a.languageselected&&a.languageselected==s||void 0!==a[0]&&null!==a[0].languageselected&&a[0].languageselected==s);if(-1!==l)return this.dsarFormService.getRecentFormControlList()[l];{this.switchLanguages(s,this.langlist);const a=this.dsarFormService.getRecentFormControlList().findIndex(d=>void 0!==d.languageselected&&d.languageselected==s||null!==d[0].languageselected&&d[0].languageselected==s);return this.dsarFormService.getRecentFormControlList()[a]}}}getSelectedLanguageOfForm(t){return t[0].languageselected}openmodal(t){for(let n=0;n<this.langlist.length;n++)this.selfNgModel["lblTextLang"+this.langlist[n].keyvalue+n]=[];this.onClickLanguageTab(this.langlist[0]),this.modalService.open(t,{ariaLabelledBy:"modal-basic-title",size:"xl",backdrop:"static"}).result.then(n=>{},n=>{})}onClickNotoAddMultilanguage(){this.isSaveandCloseClicked=!1,this.isDirty=!0,this.hideControlsAfterSave()}onClickSaveByLang(t,n){let l=this.getCurrentLanguage();if(this.getIndexOfCurrentSelectedLanguage(l),this.ispopupFormSubmitted=!0,!this.isvalidcustomTitleboolean&&!this.isvalidcustomfield)return!1;let d=this.getCurrentLanguage();const p=[];if(this.selectOptions.length>0)for(const[g,w]of this.selectOptions.entries()){let F={name:"",ke
1ylabel:"",id:0,language:""};if(F.name=this.selfNgModel[this.selectOptions[g].name+t+g],F.keylabel=this.selectOptions[g].keylabel,F.id=this.selectOptions[g].id,F.language=t,void 0!==F&&(""==F.name||null==F.name))return this.customfieldvalidationIndex=g,this.customfieldvalidationvalue="",this.isvalidcustomfield=!1,!1;this.customfieldvalidationIndex=g,this.isvalidcustomfield=!0,p.push(F)}let x,y,b=this.getCustomControlIndex(l);if(null!=b&&-1!==b){null!==this.crid?(y=this.getWebformByLangFromDB(t),y[b].controllabel=this.selfNgModel["lblTextLang"+t+n],y[b].selectOptions=void 0!==p&&p.length>0?p:[],this.ccpaFormConfigService.updateControlListByLanguage(y,t)):(x=this.getWebformByLangFromLocal(t),x[b].controllabel=this.selfNgModel["lblTextLang"+t+n],x[b].selectOptions=p,this.dsarFormService.updateControlListByLanguage(x,t)),null!==this.crid?y=this.getWebformByLangFromDB(t):x=this.getWebformByLangFromLocal(t);let g=n+1;void 0!==this.langlist[g]&&this.langlist[g].keyvalue==d?(g++,void 0!==this.langlist[g]?this.onClickLanguageTab(this.langlist[g]):(this.currentLangDivIndex=0,this.cancelAddingFormControl("submit"),this.modalService.dismissAll())):void 0!==this.langlist[g]?this.onClickLanguageTab(this.langlist[g]):(this.currentLangDivIndex=0,this.cancelAddingFormControl("submit"),this.modalService.dismissAll())}this.isAddingFormControl=!1,this.isSaveandCloseClicked=!1}getIndex(t){let n=0==t?0:1==t?1:t-1;return n<0||0==n?0:n}getDefaultLanguage(t){let n;for(let s=0;s<t.length;s++)void 0!==t[s].defaultlanguage&&(n=t[s].defaultlanguage);return n}getCurrentLanguage(t){let n,s=this.getDefaultLanguage(this.langlist||this.languageChosenCRID),l=void 0!==this.langlist?this.langlist:this.languageChosenCRID;return null!=s&&null==this.languageSelected||null!=s&&null==this.activeId&&null==this.nextId&&void 0!==this.languageSelected&&"viewonly"==t||null!=s&&1==this.activeId&&2==this.nextId&&void 0!==this.languageSelected&&"viewonly"==t?s:null!=s&&void 0!==this.languageSelected?"save"==this.formSaveMethod?s:this.languageSelected:n=void 0!==l&&l.length>0?l[0].keyvalue:"EN"}trackById(t,n){return n.keyvalue}trackBySelectOption(t){return t.id}onEntertext(t,n){""==t.target.value?(this.customfieldvalidationIndex=n,this.isvalidcustomfield=!1,this.customfieldvalidationvalue=""):(this.customfieldvalidationvalue=t.target.value,this.customfieldvalidationIndex=n,this.isvalidcustomfield=!0)}onEnterTitletext(t,n){""==t.target.value?(this.customTitleValidationIndex=n,this.isvalidcustomTitleboolean=!1):this.isvalidcustomTitleboolean=!0}getCustomControlIndex(t){let n;return void 0!==this.customWebControlCrid&&void 0!==this.customWebControlCrid.indexCount&&(n=this.customWebControlCrid),null!==this.crid?this.getWebformByLangFromDB(t).findIndex(a=>-1!==a.indexCount.indexOf(this.customWebControlCrid.indexCount)):this.getWebformByLangFromLocal(t).findIndex(a=>-1!==a.indexCount.indexOf(this.customWebControlLocal.indexCount))}closePreferedLanguageAlerDiv(){this.isSaveandCloseClicked=!1}onClickLanguageTab(t){for(let n=0;n<this.langlist.length;n++)this.langlist[n].keyvalue==t.keyvalue&&(this.showSelectedLangDiv=!0,this.currentLangDivIndex=n,this.currentLangDivLang=t.keyvalue)}onPreviousSearchPosition(){this.translateX+=150}onNextSearchPosition(){this.translateX-=150}leftClickStatus(){if(this.translateX>=0)return!0}rightClickStatus(){return this.translateX<=this.scrollLimit}get selfNgModel(){return this}getListCustomControlIndexes(t){return t.reduce((s,l,a)=>((void 0!==l.controlId&&-1!==l.controlId.indexOf("Custom")||void 0!==l.controlId&&"fileupload"==l.controlId||void 0!==l.controlId&&"captchacontrol"==l.controlId)&&s.push({replacewithindex:a,replaceobj:l}),s),[])}getListOfControlsPlacementOrder(t){return t.reduce((s,l,a)=>(void 0!==l.controlId&&s.push({referenceorderindex:a,referencobj:l}),s),[])}getSelectedLanguageList(t){let n;if(null!=t&&void 0!==t[0]&&Array.isArray(t[0])){if(null===t[t.length-1]||void 0===t[t.length-1][0].preferlanguages){let s=[];for(let l=0;l<t.length;l++)if(null!=t[l]&&void 0!==t[l][0].languageselected&&void 0!==this.laguagelist){const a=this.laguagelist.findIndex(d=>d.keyvalue==t[l][0].languageselected);-1!==a?s.push(this.laguagelist[a]):s.splice(a,1)}return s}if(void 0!==t[t.length-1][0].preferlanguages)return n=t[t.length-1][0].preferlanguages,void 0!==n&&n.length==t.length?n:n=this.getLanguagesFromForm(t)}else{if(null==t||void 0===t[0]||!Array.isArray(t))return{defaultlanguage:"EN",label:"English (US)",keyvalue:"EN"};if(void 0!==t[0].preferlanguages)return t[0].preferlanguages}}getLanguagesFromForm(t){let n=[],s=!1;for(let l=0;l<t.length;l++)if(null!=t[l]&&void 0!==t[l][0].languageselected&&void 0!==t[l][0].preferlanguages&&Array.isArray(t[l][0].preferlanguages)
1){const a=t[l][0].preferlanguages.findIndex(d=>d.keyvalue==t[l][0].languageselected);-1!==a?n.push(t[l][0].preferlanguages[a]):n.splice(a,1)}return s=n.filter(l=>Object.keys(l).some(a=>"defaultlanguage"==a)),s||(n[0].defaultlanguage=n[0].keyvalue),n}isRecentlyAddedLanguageExistInList(t){return void 0!==t&&(void 0!==this.langlist&&this.langlist.length>0?(this.isLangAddedRecently=this.langlist.some(n=>n.keyvalue==t.keyvalue),this.isLangAddedRecently):void 0)}getIndexOfCurrentSelectedLanguage(t){if(void 0!==this.langlist&&this.langlist.length>0)return this.langlist.findIndex(s=>s.keyvalue==t)}changeDisplayTypesofControls(t,n,s,l){if(null==this.crid)for(let a of this.langlist)this.dsarFormService.changeControls(t,n,a.keyvalue,l);else for(let a of this.langlist)a.keyvalue!==s&&this.ccpaFormConfigService.changeControls(t,n,a.keyvalue,l)}hideControlsAfterSave(){this.showFormOption=!1,this.isSubjectType=!1,this.isEditingList=!1,this.isAddingFormControl=!1,this.selectedControlType=!1,this.showFormOption=!1}toggleReadonly(){this.isReadonly=!this.isReadonly}backUpAfterSaveAndCloseBtnClick(){if(null==this.crid)for(let t of this.langlist){let n=this.getWebformByLangFromLocal(t.keyvalue);this.backUpWebFormControlListLOCAL.push({bkplang:t.keyvalue,bkpform:n})}else for(let t of this.langlist){let n=this.getWebformByLangFromDB(t.keyvalue);this.backUpWebFormControlListDB.push({bkplang:t.keyvalue,bkpform:n})}}closeAlertModal(){void 0!==this.modalRef&&this.modalRef.hide()}closeRelationAlertModal(){this.modalRef.hide()}getCCPAFormList(){void 0!==this.queryOID&&this.queryPID&&this.ccpaFormConfigService.getCCPAFormList(this.queryOID,this.queryPID,this.constructor.name,_.e.dsarWebFormModule,"?limit="+(this.numofRecords?this.numofRecords:10)+"&page="+this.activePage).subscribe(s=>{if(null==s)return this.formList.length=0;this.formList=s.response,this.totalRecordsAvailable=s.count,this.formList.filter(l=>l.crid===this.crid).length>0||this.navigateToWebForm()},s=>{this.alertMsg=s,this.isOpen=!0,this.alertType="danger"})}onInputChange(t){1==this.active&&(null==t||""==t)&&(this.isFormFieldsEmpty=!0),1==this.active&&null!==t&&""!==t&&(this.isFormFieldsEmpty=!1),3==this.active&&""==this.selectedApproverID&&null==this.selectedApproverID&&(this.isFormFieldsEmpty=!0)}updateProtocol(t){this.basicForm.controls.selectedProtocol.patchValue(t.target.value),this.generatedURL="localhost"===window.location.hostname?"http://localhost:4500/dsar/form/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)+"?status=publish":q.N.privacyportalUrl+"/"+encodeURIComponent(this.basicForm.controls.formidentifier.value)}showUrlType(t){this.selectedLinkType=t}checkIdenfierValue(t){this.identifierValue=t.target.value,this.identifierDebouncer$.next(t.target.value)}setupIdentifierDebouncer(){this.identifierDebouncer$.pipe((0,re.b)(1e3),(0,le.x)()).subscribe(t=>{this.isValid?""===this.identifierValue?(this.identifierExists="Identifiers should not be empty!",this.disableSaveIdentifier=!0):(this.disableSaveIdentifier=!1,this.loadingbar.start(),this.isDirty=!1,this.ccpaFormConfigService.checkIdentifier(this.constructor.name,_.e.ccpaDsarModule,this.identifierValue).subscribe({next:n=>{200===n.status&&(this.showUrlText=!0,this.showResponseIcon=!0,this.basicForm.controls.formidentifier.setValue(this.identifierValue),this.generatedURL="localhost"===window.location.hostname?"http://localhost:4500/dsar/form/"+encodeURIComponent(this.identifierValue)+"?status=publish":q.N.privacyportalUrl+"/"+encodeURIComponent(this.identifierValue)+"?status=publish",this.identifierExists="",this.loadingbar.stop())},error:n=>{409===n.status&&(this.identifierExists=n.error.error.message,this.recommendedIdentifers=n.error.error.recommendation,this.recommendedIdentifierErr="Alternately, you might select one of the following identifiers.",this.showResponseIcon=!1,this.disableSaveIdentifier=!0),this.loadingbar.stop()}})):this.disableSaveIdentifier=!0})}changeIdentifier(){this.isValid?""===this.identifierValue?(this.identifierExists="Identifiers should not be empty!",this.disableSaveIdentifier=!0):this.identifierDebouncer$.pipe((0,re.b)(1e3),(0,le.x)()).subscribe(t=>{this.disableSaveIdentifier=!1,this.loadingbar.start(),this.isDirty=!1,this.ccpaFormConfigService.checkIdentifier(this.constructor.name,_.e.ccpaDsarModule,this.identifierValue).subscribe(n=>{200===n.status?(this.showUrlText=!0,this.showResponseIcon=!0,this.basicForm.controls.formidentifier.setValue(this.identifierValue),this.generatedURL="localhost"===window.location.hostname?"http://localhost:4500/dsar/form/"+encodeURIComponent(this.identifierValue)+"?status=publish":q.N.privacyportalUrl+"/"+encodeURIComponent(this.identifierValue)+"?status=publish",this.identifierExists=""):(this.identifierExists=n.response,this.recommendedIdentifers=n.recommendation,this.recommendedIdentifierErr="Alternately, you might select one of the following identifiers.",this.showResponseIcon=!1,this.disableSaveIdentifier=!0),this.loadingbar.stop()},n=>{this.identifierExists=n?.error?.error||n,this.loadingbar.stop()})}):this.disableSaveIdentifier=!0}checkValidation(t){this.isValid=/^[a-zA-Z0-9]*$/gim.test(t.target.value),this.isValid?(this.patternIdentifierErr="",this.disableSaveIdentifier=!1):(this.patternIdentifierErr="Allows only alphabets and numeric",this.showResponseIcon=!1,this.disableSaveIdentifier=!0)}enableIdentifier(){this.showIdentifierInfo(),this.isLiveForm=!0}updateIdentifier(){this.identifierActions=!0,this.addUpdateDSARForm("save"),this.basicForm.controls.formidentifier.disable(),this.isLiveForm=!1}showIdentifierInfo(){return this.openModal(this.showIdentifierAlertModal),!1}updateIdentifierInfo(){this.identifierActions=!1,this.basicForm.controls.formidentifier.enable(),this.modalRef.hide()}closeShowIdentifierInfo(){this.identifierActions=!0,this.basicForm.controls.formidentifier.disable(),this.isDirty=!1,this.basicForm.controls.formidentifier.setValue(this.previousIdentifierValue),this.modalRef.hide(),this.isLiveForm=!1}chooseRecommended(t){this.basicForm.controls.formidentifier.setValue(t),this.checkIdenfierValue({target:{value:t}}),this.isDirty=!0,this.disableSaveIdentifier=!1}};let o=r;return r.\u0275fac=function(n){return new(n||r)(e.Y36(c.QS),e.Y36(rt.k),e.Y36(ke.Mn),e.Y36(lt.i
1),e.Y36(at.y),e.Y36(ct.z),e.Y36(I.F0),e.Y36(I.gz),e.Y36(k.LA),e.Y36(G.FF),e.Y36(e.sBO),e.Y36(De.H7),e.Y36(ae.tT),e.Y36(dt.D),e.Y36(e.sBO),e.Y36(De.Dx),e.Y36(ke.KD),e.Y36(h.Ye),e.Y36(D._))},r.\u0275cmp=e.Xpm({type:r,selectors:[["app-dsarform"]],viewQuery:function(n,s){if(1&n&&(e.Gf(jl,7),e.Gf(Hl,5),e.Gf(Gl,5),e.Gf(Yl,5),e.Gf(Pl,5),e.Gf(G.Pz,5),e.Gf(Kl,5),e.Gf(zl,5),e.Gf(Wl,5),e.Gf(Vl,5),e.Gf($l,5),e.Gf(Xl,5),e.Gf(ea,5,e.SBq),e.Gf(ta,5,e.SBq),e.Gf(ia,5),e.Gf(na,5),e.Gf(oa,5),e.Gf(sa,5)),2&n){let l;e.iGM(l=e.CRH())&&(s.editor=l.first),e.iGM(l=e.CRH())&&(s.azEmbedCode=l.first),e.iGM(l=e.CRH())&&(s.shareLinkCode=l.first),e.iGM(l=e.CRH())&&(s.shortShareLinkCode=l.first),e.iGM(l=e.CRH())&&(s.navTab=l.first),e.iGM(l=e.CRH())&&(s.navDirective=l.first),e.iGM(l=e.CRH())&&(s.confirmModal=l.first),e.iGM(l=e.CRH())&&(s.registerForm=l.first),e.iGM(l=e.CRH())&&(s.customFormFields=l.first),e.iGM(l=e.CRH())&&(s.confirmSaveAlert=l.first),e.iGM(l=e.CRH())&&(s.basicDetailForm=l.first),e.iGM(l=e.CRH())&&(s.settingsForm=l.first),e.iGM(l=e.CRH())&&(s.languageBtnListScroller=l.first),e.iGM(l=e.CRH())&&(s.customDropdownMenu=l.first),e.iGM(l=e.CRH())&&(s.defaultLanguageAlertModal=l.first),e.iGM(l=e.CRH())&&(s.showRelationAlertModal=l.first),e.iGM(l=e.CRH())&&(s.showIdentifierAlertModal=l.first),e.iGM(l=e.CRH())&&(s.deleteField=l.first)}},decls:32,vars:3,consts:[["appTheme",""],[1,"mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb","breadcrumb-style1","mg-b-0"],[1,"breadcrumb-item"],[3,"click"],["aria-current","page",1,"breadcrumb-item","active"],["class","shadowdiv",4,"ngIf"],["quillEditorModal",""],["confirmEdit",""],["confirmSaveAlert",""],["addControlsWithPreferedLanguagesModal",""],["showRelationAlertModal",""],["showIdentifierAlertModal",""],["defaultLanguageAlertModal",""],["deleteField",""],[1,"col-sm-5","mr-0","float-right","flotingdiv"],["dismissOnTimeout","5000",3,"type","dismissible","onClosed",4,"ngIf"],[1,"shadowdiv"],[1,"webformheading","p-3"],[1,"tx-14","mb-0","tx-spacing-1","tx-color-02","tx-semibold"],[1,"badge","tx-11",3,"ngClass"],[1,"url-actions"],["dropdown","",1,"btn-group"],["tooltip","See the live form in action","class","btn dropdown-toggle","type","button","id","liveActionMenuButton","dropdownToggle","","aria-controls","dropdown-basic","placement","left","containerClass","live-form-tooltip",3,"disabled","ngClass",4,"ngIf"],["class","dropdown-menu","id","liveActionMenuButton","aria-labelledby","liveActionMenuButton","role","menu","aria-labelledby","button-basic",4,"dropdownMenu"],["ngbNav","",1,"nav-tabs",3,"activeId","navChange","activeIdChange"],["nav","ngbNav"],[3,"ngbNavItem","destroyOnHide"],["ngbNavLink",""],["ngbNavContent",""],[1,"button-wrapper",3,"ngClass"],[1,"btn","btn-sm","pd-x-15","savebtn","btn-uppercase","lineheight-22","btn-yellow",2,"text-transform","none","font-size","12px","font-weight","normal",3,"ngClass","disabled","click"],["type","button","type","button","class","btn btn-sm pd-x-15 lineheight-22 savebtn btn-uppercase ml-2 mr-1","style","text-transform: none;font-size: 12px; font-weight: normal;",3,"ngClass","disabled","click",4,"ngIf"],[3,"ngbNavOutlet"],["tooltip","See the live form in action","type","button","id","liveActionMenuButton","dropdownToggle","","aria-controls","dropdown-basic","placement","left","containerClass","live-form-tooltip",1,"btn","dropdown-toggle",3,"disabled","ngClass"],[1,"fab","fa-wpforms"],["id","liveActionMenuButton","aria-labelledby","liveActionMenuButton","role","menu","aria-labelledby","button-basic",1,"dropdown-menu"],[1,"btn","dropdown-item",3,"click"],[3,"formGroup"],["id","step-1",1,"p-10","mt-2","tab-pane","step-content",2,"display","block"],[1,"col-6","align-items-center","justify-content-between","margin-auto"],[1,"form-group","mb-2"],["for","formname",1,"tx-10","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["aria-hidden","true",1,"tx-8","fa","fa-asterisk","tx-danger","ml-1",2,"vertical-align","super"],["type","text","formControlName","formname","name","formname","placeholder","Enter web form name",1,"form-control",3,"ngClass","ngModelChange"],["class","invali
1d-feedback",4,"ngIf"],[1,"input-group","mb-3","d-flex","flex-column","url-input"],["for","identifier",1,"tx-10","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["aria-hidden","true",1,"tx-8","tx-danger","ml-1",2,"vertical-align","super"],[1,"d-flex","align-items-center"],["id","inputGroup-sizing-default",1,"input-group-text",3,"title"],["type","text","formControlName","formidentifier","name","identifier","placeholder","Enter Identifier Name",1,"form-control",3,"keyup"],["class","material-icons notify-icons success-icon",3,"ngClass",4,"ngIf"],["class","material-icons notify-icons error-icon",3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","identifier-error",4,"ngIf"],["for","currentOrganization",1,"tx-10","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["type","text","formControlName","currentOrganization","name","currentOrganization",1,"form-control"],["for","selectedProperty",1,"tx-10","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["type","text","formControlName","selectedProperty","name","selectedProperty",1,"form-control"],[3,"ctrlplaceholder","listName","issessionstargerequired","isclickondocument","defaultList","selectedList","isradiobtnrequiredfordefaultfield","onClickValue","onClickSendStatus","click","onClickValueDefaultValue"],[1,"btn-toolbar","sw-toolbar","sw-toolbar-bottom","justify-content-end"],["role","group",1,"btn-group","mr-2","mb-2","sw-btn-group"],[1,"invalid-feedback"],[1,"material-icons","notify-icons","success-icon",3,"ngClass"],[1,"material-icons","notify-icons","error-icon",3,"ngClass"],["class","btn btn-secondary action-icons fa fa-edit","tooltip","Edit Identifier","placement","bottom",3,"adaptivePosition","click",4,"ngIf"],["class","btn btn-secondary action-icons","tooltip","Save Identifier","placement","bottom",3,"ngClass","adaptivePosition","click",4,"ngIf"],["tooltip","Edit Identifier","placement","bottom",1,"btn","btn-secondary","action-icons","fa","fa-edit",3,"adaptivePosition","click"],["tooltip","Save Identifier","placement","bottom",1,"btn","btn-secondary","action-icons",3,"ngClass","adaptivePosition","click"],[1,"fa","fa-save"],[1,"identifier-error"],[1,"recommended-items"],[3,"click",4,"ngFor","ngForOf"],[1,"row"],[1,"col-sm-4","form-field-section","bordermargin"],["closeOthers","1",3,"isAnimated"],[3,"isOpen","isOpenChange"],["accordion-heading","","type","button",1,"btn","btn-link","btn-block","clearfix"],[1,"pull-left","float-left",3,"ngClass"],["tooltip","Click here to view the form fields",1,"float-right","pull-right"],[1,"fas","fa-chevron-right",3,"ngClass"],["cdkDropList","",1,"formfield-list",3,"cdkDropListData","cdkDropListDropped"],[1,"col-sm-12"],[1,"d-flex","justify-content-between"],["class","p-2",4,"ngIf"],["class","col-sm-11 custom-controls",4,"ngIf"],["type","button","accordion-heading","",1,"btn","btn-link","btn-block","clearfix"],["tooltip","Click here to customize the style of the web form.",1,"float-right","pull-right"],[1,"d-flex","align-items-center","justify-content-between"],[1,"col-sm-12","mb-2"],["for","taskresponse",1,"tx-11","tx-medium","tx-spacing-1","mg-b-5"],[1,"upload-wrapper",3,"ngClass"],[1,"input-group"],["for","file-upload",1,"custom-file-upload","btn","btn-primary"],["type","file","formControlName","headerlogo","id","headerlogo",1,"custom-file-input",3,"change"],[1,"img-space",3,"ngClass"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"filedetails",3,"ngClass"],["name","image",1,"feathericon"],[1,"ml-1"],[1,"ml-4"],[1,"logodelete",3,"click"],["name","trash-2",1,"feathericon"],["type","file","formControlName","titlefavicon","id","titlefavicon",1,"custom-file-input",3,"change"],[1,"favicon-img-space",3,"ngClass"],[1,"col-sm-12","mb-1"],[1,"formgroup","d-flex","justify-content"],[1,"col-md-5","p-0"],[1,"col-form-label-sm","tx-11","tx-medium","tx-spacing-1"],[1,"col-md-6","d-flex","color-controlwrapper"],["type","color",3,"ngModel","ngModelChange"],["type","text",1,"form-control","form-control-sm","ml-1",3,"ngModel","ngModelChange"],[1,"formgroup","row","justify-content"],[1,"col-md-5"],[1,"col-sm-3"],["type","number","min","13","max","40",1,"form-control","form-control-sm","h-75",3,"ngModel","input","ngModelChange"],["type","color",1,"form-control",3,"ngModel","ngModelChange"],["type","number","min","13","max","20",1,"form-control","form-control-sm","h-75",3,"ngModel","input","ngModelChange"],["tooltip"," Click here to edit the form text.",1,"float-right","pull-right"],[1,"editorwrapper"],[1,"pd-5"],["style","float: right;","tooltip","Edit welcome text",4,"ngIf"],["style","float: right;","tooltip","Edit footer text",4,"ngIf"],[1,"col-sm-8"],["class","form-control selectwidth mb-1","name","languageSelected","required","",3,"ngModel","change","ngModelChange",4,"ngIf"],[1,"headerwrapper"],[1,"logocontainer","pd-10",3,"ngClass"],["class","img-responsive logowidth","width","150px",3,"src",4,"ngIf"],["class","txt-capitalize m-0",3,"ngStyle","color",4,"ngIf"],[1,"quilleditor-wrapper","py-2"],[1,"quilleditor",3,"ngStyle","innerHTML"],["cdkDropList","","class","dsarcontrols-list",3,"cdkDropListData","cdkDropListDropped",4,"ngIf"],[1,"p-2"],[1,"preferedlang-div"],[1,"preferedlang-btn-wrapper"],[1,"btn","btn-xs","btn-secondary","mr-2",3,"click"],[1,"btn","btn-xs","btn-yellow",3,"click"],[2,"font-style","
1italic","font-size","11px","color","#666"],["cdkDrag","",4,"ngFor","ngForOf"],["cdkDrag",""],["class","example-box",4,"ngIf"],[1,"example-box"],[1,"icon-label-wrapper","mr-2"],["aria-hidden","true","tooltip","Drag to move",1,"fa","fa-bars"],[1,"control-label"],[1,"displayflex"],["title","Edit the Form field",1,"btn","btn-sm","btn-outline-primary","editbtn",3,"click"],[1,"fa","fa-pen"],["class","btn btn-sm btn-outline-primary editbtn",3,"click",4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","editbtn",3,"click"],["aria-hidden","true",1,"fa","fa-trash"],["tooltip","Add a new field",1,"btn","btn-xs","btn-primary",3,"click"],[1,"col-sm-11","custom-controls"],[3,"ngSubmit"],["customFields","ngForm"],["class","btndisplay-flex",4,"ngIf"],[1,"form-check","required-check","mt-2"],["name","changeControlType","type","checkbox","id","gridCheck1",1,"form-check-input",3,"checked","change"],["for","gridCheck1",1,"form-check-label"],["id","selectControl","class","controls-with-options",4,"ngIf"],[1,"btndisplay-flex"],["type","button",1,"btn","btn-sm","btn-outline-secondary","mr-2",3,"click"],["type","submit",1,"btn","btn-sm","btn-primary",3,"click"],[1,"form-inline","custom-controls"],[1,"col-md-12"],[1,"col-md-12","form-group","pr-0"],["name","selectOptionControl","required","",1,"form-control","selectwidth",3,"ngModel","change","ngModelChange"],["ngModel","ngModel"],["selected","","disabled","","value",""],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-primary","ml-2",3,"click"],["style","color:red;font-size:11px",4,"ngIf"],[3,"value"],[2,"color","red","font-size","11px"],["name","changeControlType",1,"form-control",3,"ngModel","change","ngModelChange"],["disabled","","selected","","value",""],["id","selectControl",1,"controls-with-options"],[1,"flexwith-column"],["type","text","name","lblText","placeholder","Add label text","required","",1,"form-control",3,"disabled","ngModel","input","ngModelChange"],["class","color-red",4,"ngIf"],["class","list-wrapper",4,"ngIf"],["class","addoption",4,"ngIf"],[1,"color-red"],[1,"list-wrapper"],["aria-hidden","true","tooltip","Drag to move","placement","right",1,"fa","fa-bars"],[1,"form-inline"],[1,"control-wrapper","form-group","pl-3"],["type","text","required","",1,"form-control","mb-1",3,"ngModel","name","disabled","tooltip","ngModelOptions","ngClass","ngModelChange"],["type","button","class","btn btn-sm btn-danger ml-2",3,"click",4,"ngIf"],[1,"red"],["type","button",1,"btn","btn-sm","btn-danger","ml-2",3,"click"],["tooltip","Remove choice",2,"font-size","13px"],["aria-hidden","true",1,"fa","fa-minus"],["class","btn btn-xs btn-primary",3,"click",4,"ngIf"],[1,"btn","btn-xs","btn-primary",3,"click"],["tooltip","Add choice"],["aria-hidden","true",1,"fa","fa-plus"],["aria-hidden","true",1,"fa","fa-bars"],["type","button","class","btn btn-sm btn-danger ml-2","tooltip","Remove choice",3,"click",4,"ngIf"],["type","button","tooltip","Remove choice",1,"btn","btn-sm","btn-danger","ml-2",3,"click"],[2,"font-size","13px"],[1,"addoption"],[1,"row","form-inline"],[1,"dispalyflex-column"],["type","text","required","",1,"form-control","mb-1",3,"ngModel","name","ngModelOptions","ngClass","ngModelChange"],["customControl","ngModel"],["type","button","class","btn btn-xs btn-primary add-icon",3,"click",4,"ngIf"],["type","button",1,"btn","btn-xs","btn-primary","add-icon",3,"click"],[1,"uploaded-logo-width",3,"src","height","width"],["src","assets/imgs/no_image.png",1,"img-responsive"],[1,"uploaded-favicon-width",3,"src","height","width"],["tooltip","Edit welcome text",2,"float","right"],["type","button","data-toggle","modal",1,"btn","btn-sm","btn-default","p-0","mr-1",3,"click"],[1,"fa","fa-edit"],["tooltip","Edit footer text",2,"float","right"],["name","languageSelected","required","",1,"form-control","selectwidth","mb-1",3,"ngModel","change","ngModelChange"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","selected"],["width","150px",1,"img-responsive","logowidth",3,"src"],[1,"txt-capitalize","m-0",3,"ngStyle"],["cdkDropList","",1,"dsarcontrols-list",3,"cdkDropListData","cdkDropListDropped"],["registerForm","ngForm"],["class","dsarform-box curs
1orpointer","cdkDragBoundary",".dsarform-box","cdkDrag","",3,"cdkDragDisabled",4,"ngFor","ngForOf"],[1,"quilleditor-wrapper","p-0","mt-3","border-top"],["cdkDragBoundary",".dsarform-box","cdkDrag","",1,"dsarform-box","cursorpointer",3,"cdkDragDisabled"],["class","col-sm-12",4,"ngIf"],["class","col-sm-12",4,"ngIf","ngIfElse"],["selectOption",""],["class","col-sm-12",3,"ngClass",4,"ngIf"],[3,"ngClass"],["class","form-group",4,"ngIf"],[1,"form-control",3,"name","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["type","hidden",3,"name","ngModel"],[1,"form-group"],["class","form-check-inline","cdkDrag","",3,"cdkDragDisabled",4,"ngFor","ngForOf"],["cdkDrag","",1,"form-check-inline",3,"cdkDragDisabled"],["type","radio","name","requesttype",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],["requestype","ngModel"],[3,"for"],["type","checkbox","name","requestype",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],["class","form-group mb-0",4,"ngIf"],[1,"form-group","mb-0"],["type","radio","name","subjecttype",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],["subjecttype","ngModel"],["type","checkbox",1,"form-check-input",3,"id","name","value","ngModel","ngModelChange"],["type","text",1,"form-control",3,"name","ngModel","ngModelChange"],["type","date",1,"form-control",3,"name","ngModel","ngModelChange"],["datePicker","ngModel"],["cdkDropList","",3,"cdkDropListData","cdkDropListDropped"],[1,"heading"],["type","radio",1,"form-check-input",3,"id","name","value","ngModel","ngClass","required","ngModelChange"],["customRadio","ngModel"],["type","text","typeaheadOptionField","name",1,"form-control",3,"ngModel","name","autocomplete","typeahead","typeaheadMinLength","typeaheadSingleWords","typeaheadScrollable","ngClass","ngModelChange","keyup","typeaheadOnSelect"],["country","ngModel"],["type","text","typeaheadOptionField","name",1,"form-control",3,"ngModel","name","autocomplete","typeahead","typeaheadScrollable","typeaheadSingleWords","typeaheadMinLength","ngClass","ngModelChange","typeaheadOnSelect"],["state","ngModel"],[1,"form-check-label"],["class","form-check-inline",4,"ngFor","ngForOf"],[1,"form-check-inline"],["type","checkbox",1,"form-check-input",3,"ngModelOptions","id","name","value","ngClass","required","ngModel","ngModelChange"],["customChkbox","ngModel"],[1,"col-sm-12",3,"ngClass"],[1,"custom-file"],["type","file","id","uploaddocument",1,"custom-file-input",3,"change"],["for","inputGroupFile01",1,"custom-file-label"],["class","color-red tx-12 mt-2",4,"ngIf"],[1,"color-red","tx-12","mt-2"],["class","col-sm-12 margin-padding-zero",3,"ngClass",4,"ngIf"],[1,"col-sm-12","margin-padding-zero",3,"ngClass"],[1,"form-group","flex-align-item","mb-0"],["title","Refresh captcha","type","button",1,"btn","btn-xs","btn-primary","mb-2","mr-1",3,"click"],["src","../../assets/imgs/refresh.svg","width","20","height","20"],[1,"align-form"],[1,"spinner-border","spinner-border-sm","mr-1",3,"ngClass"],["alt","captcha image",3,"src",4,"ngIf","ngIfElse"],["noImageFound",""],[1,"col-sm-12","margin-padding-zero"],["placeholder","Enter above captcha code","name","captchacode",1,"form-control",3,"autocomplete","ngModel","ngModelChange"],["alt","captcha image",3,"src"],[1,"col-5","margin-auto"],["settingsForm","ngForm"],[1,"form-group","mg-b-5"],["for","defaultapprover",1,"tx-11","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["name","user","name","selectedApproverID","required","",1,"form-control",3,"ngModel","ngClass","input","ngModelChange"],["userselect","ngModel"],["for","workflow",1,"tx-11","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["name","workflow","required","",1,"form-control",3,"disabled","tooltip","ngModel","ngClass","ngModelChange","input"],["workflowselect","ngModel"],["for","emailsender",1,"tx-11","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["name","emailsender",1,"form-control",3,"ngModel","ngModelChange","input"],["sender","ngModel"],["label","Default"],["value","",3,"selected"],["label","Send Grid"],["label","SMTP",4,"ngIf"],["for","daysleft",1,"tx-11","tx-medium","tx-spacing-1","mg-b-5","tx-color-03"],["type","number","min","1","max","90","name","daysleft","required","",1,"form-control",3,"ngModel","ngClass","ngModelChange","input"],["daysleftinput","ngModel"],["class","red",3,"ngClass",4,"ngIf"],["class","red p-1",4,"ngIf"],[1,"form-check-label","pt-1","tx-11","tx-medium","tx-spacing-1","tx-color-03"],["for","fileupload",1,"switchchkbox","float-right","mt-n3","form-check-label","tx-10","tx-uppercase","tx-medium","tx-spacing-1","tx-color-03"],["type","checkbox",1,"form-check-input",3,"checked","click"],[1,"slider","round"],[1,"tx-10","tx-spacing-1","tx-color-03"],[1,"form-check","required-check",3,"ngClass"],["for","gridCheck1",1,"switchchkbox","float-right","mt-n3","form-check-label","tx-10","tx-uppercase","tx-medium","tx-spacing-1","tx-color-03"],[1,"ml-3","pl-1","tx-10","tx-spacing-1","tx-color-03"],["for","emailverification",1,"switchchkbox","float-right","mt-n3","form-check-label","tx-10","tx-uppercase","tx-medium","tx-spacing-1","tx-color-03"],["class","form-group mg-b-5",4,"ngIf"],["for","captcha",1,"switchchkbox","float-right","mt-n3","form-check-label","tx-10","tx-uppercase","tx-medium","tx-spacing-1","tx-color-03"],[3,"value","selected",4,"ngIf"],["label","SMTP"],[1,"red",3,"ngClass"],[1,"red","p-1"],[1,"flex","flex-wrap","gap-3","pre-email-verification"],[1,"d-flex","align-items-center","mb-2","pt-1","tx-11","tx-medium","tx-spacing-1","tx-color-03"],["name","prePostEmailVerification","inputId","preEmailVerification",3,"value","ngModel","ngModelChange","onClick"],["for","preEmailVerification",1,"ml-2","mb-0"],["name","prePostEmailVerification","inputId","postEmailVerification",3,"value","ngModel","ngModelChange","onClick"],["for","postEmailVerification",1,"ml-2","mb-0"],[3,"formObject","formID"],[1,"publishwrapper"],["ngbNav","",1,"nav-tabs",3,"ngClass"],["ngbNavItem",""],[1,"publish-content","mb-3",3,"ngbNavOutlet"],["class","mb-2 txt-center",4,"ngIf"],[1,"select-url-radio"],["name","selectLinkType","value","longUrl","inputId","selectLongType",3,"ngModel","ngModelChange","onClick"],["for","selectLongType",1,"full-link","ml-2","mb-0"],["name","selectLinkType","value","shortUrl","inputId","selectShortType",3,"ngModel","ngModelChange","onClick"],["for","selectShortType",1,"ml-2","mb-0"],["class","code-link-wrapper",3,"ngClass",4,"ngIf"],[1,"mb-2","txt-center"],[1,"code-link-wrapper",3,"ngClass"],[1,"script-title"],[1,"font-weight-bold"],[1,"fontsize22","mr-1"],[1,"far","fa-file-code"],[1,"btn","btn-xs","btn-primary","float-right",3,"click"],[1,"publishbg"],["azEmbedCode",""],[1,"mb-0"],[1,"tag"],[2,"color","blueviolet"],[1,"pln"],[1,"pun"],[1,"lit"],[1,"com"],[1,"kwd"],[1,"publish"],[1,"bluecolor"],[1,"greencolor"],[1,"redcolor"],[1,"sharelinkbg"],["shareLinkCode",""],["shortShareLinkCode",""],["type","button","type","button",1,"btn","btn-sm","pd-x-15","lineheight-22","savebtn","btn-uppercase","ml-2","mr-1",2,"text-transform","none","font-size","12px","font-weight","normal",3,"ngClass","disabled","click"],[1,"modal-header"],["class","modal-title","id","modal-basic-title",4,"ngIf","ngIfElse"],["footerHeading",""],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body","appTheme","",4,"ngIf","ngIfElse"],["footerContent",""],["id","modal-basic-title",1,"modal-title"],["appTheme","",1,"modal-body"],[3,"formGroup","ngSubmit"],["formControlName","editor",3,"modules","ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","float-right","mt-2"],["type","button",1,"btn","btn-outline-dark","float-right","mt-2","mr-2",3,"click"],["appTheme","",1,"modal-body","text-center"],["type","button",1,"btn","btn-sm","btn-uppercase","btn-primary","mr-2",3,"click"],["type","button",1,"btn","btn-sm","btn-outline-secondary","btn-uppercase","mr-2",3,"click"],["appTheme","",1,"modal-body",2,"display","flex","flex-direction","column"],[2,"display","flex","overflow-x","hidden","margin","0px 12px"],[1,"arrowbtn","leftarrow",3,"ngClass","click"],[1,"fa","fa-angle-left"],[1,"lang-btn-wrapper"],[1,"language-btn-l
1ist",3,"ngStyle"],["languageBtnListScroller",""],[1,"arrowbtn","rightarrow",3,"ngClass","click"],[1,"fa","fa-angle-right"],[1,"pop-custom-controls","m-0"],[2,"display","flex","flex-direction","row","flex-wrap","wrap"],["class","btn btn-sm mr-1",3,"ngClass","click",4,"ngIf"],[1,"btn","btn-sm","mr-1",3,"ngClass","click"],["id","selectControl","class","pop-controls-with-options",4,"ngIf"],["id","selectControl",1,"pop-controls-with-options"],[2,"margin","0 0 10px 0"],["type","text","name","selfNgModel['lblTextLang'+countIndex]",1,"form-control",3,"ngModel","placeholder","input","ngModelChange"],["type","submit","class","btn btn-sm btn-primary",3,"click",4,"ngIf"],[1,"addoption-popup"],[1,"formfield-list"],[1,"form-group","pr-0","mb-0","controlsby-lang",3,"ngClass"],["type","text","name","selfNgModelitem.name+langcount.keyvalue+i]",1,"form-control","mb-1",3,"ngModel","ngModelOptions","placeholder","ngModelChange","input"],["type","button",1,"btn","btn-sm","btn-yellow",3,"ngClass","click"],["type","button",1,"btn","btn-default",3,"click"],["dismissOnTimeout","5000",3,"type","dismissible","onClosed"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"nav",2)(3,"ol",3)(4,"li",4),e._uU(5,"Privacy"),e.qZA(),e.TgZ(6,"li",4),e._uU(7,"Privacy Rights"),e.qZA(),e.TgZ(8,"li",4)(9,"a",5),e.NdJ("click",function(){return s.navigateToWebForm()}),e._uU(10,"Web forms"),e.qZA()(),e.TgZ(11,"li",6),e._uU(12),e.qZA()()()(),e.YNc(13,Pd,37,22,"div",7),e.qZA(),e.YNc(14,$d,10,4,"ng-template",null,8,e.W1O),e.YNc(16,Xd,7,0,"ng-template",null,9,e.W1O),e.YNc(18,ep,7,0,"ng-template",null,10,e.W1O),e.YNc(20,dp,21,11,"ng-template",null,11,e.W1O),e.YNc(22,pp,5,0,"ng-template",null,12,e.W1O),e.YNc(24,up,7,0,"ng-template",null,13,e.W1O),e.YNc(26,mp,5,0,"ng-template",null,14,e.W1O),e.YNc(28,_p,7,0,"ng-template",null,15,e.W1O),e.TgZ(30,"div",16),e.YNc(31,gp,2,3,"alert",17),e.qZA()),2&n&&(e.xp6(12),e.Oqu(s.formName),e.xp6(1),e.Q6J("ngIf",s.webFormControlList),e.xp6(18),e.Q6J("ngIf",s.isOpen))},dependencies:[c._Y,c.YN,c.Kr,c.Fj,c.wV,c.Wl,c.EJ,c._,c.JJ,c.JL,c.Q7,c.Zs,c.qQ,c.Fd,c.On,c.F,c.sg,c.u,Le.g6,G.uN,G.Pz,G.nv,G.Vx,G.tO,h.mk,h.sg,h.O5,h.PC,Ie.Hz,Ie.Mq,Ie.TO,B.Wj,B.Zt,Me.u,pt.i9,O.wx,ut.Bp,Oe.Zf,Oe.U_,L.mh,Ne.EU,mt.X,R.E,Rl,h.Ov,El.y],styles:["@charset \"UTF-8\";.display-list-of-numbers{height:25px;width:25%;border:1px solid dodgerblue;display:block;align-items:center;justify-content:center}.pop{height:50px;margin-left:20px;border:1px solid saddlebrown;display:flex;justify-content:center;align-items:center}.pre-email-verification .p-radiobutton,.pre-email-verification .p-radiobutton .p-radiobutton-box{width:14px;height:14px}.pre-email-verification .p-radiobutton .p-radiobutton-box .p-radiobutton-icon{width:8px;height:8px}.cdk-drag{margin:10px}.form-group .cdk-drag{margin:5px!important}.col-sm-12 .cdk-drag{margin:0 5px}.formfield-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1);margin:10px}.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.example-boundary{border:1px solid #000}.container .row>form{width:100%}.collapse .card-body{padding:5px 2px}.drag-list{background:#f1f1f1;padding:3px 4px;margin:10px 0;border:1px solid #ccc;cursor:move;display:flex;flex-direction:row;justify-content:space-between}.drag-list span{padding:5px 3px 0}.drag-list span.control-label{width:100%;text-align:left}.drag-list:focus{background:rgb(126,15,15)}.card>div:first-child{font-size:14px;font-weight:700}#selectControl{margin-top:10px;margin-right:20px}#selectControl label{font-weight:700}.addoption{position:relative}.addoption-popup{list-style-type:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:flex-end;flex-direction:column;align-items:flex-start}.addoption-popup ul{list-style-type:none;margin:0;padding:0;width:100%}.addoption-popup ul li{margin:0 0 8px;padding:0}.add-icon{font-size:11px;line-height:0;border-radius:60px;width:18px;height:18px;margin-left:5px;padding:0 0 1px}.addoption ul{list-style-type:none;margin:0;padding:0}.addoption ul li{margin:0 0 8px;padding:0}
1.custom-controls{margin:5px auto;padding-left:3px}.custom-controls h5{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.custom-controls h5 button{cursor:pointer;text-decoration:none!important}.custom-controls h5 button:hover{text-decoration:underline}.custom-controls label{display:inline}.smallbtn{padding:7px 10px}.editbtn{display:flex;width:auto;justify-content:space-between;padding:4px 6px;line-height:0px;font-size:11px;align-items:center;margin:0 5px 0 0}.editbtn .fa{font-size:14px}.rotateEditicon{transform:rotate(130deg)}.demo-btn-group .btn{margin:5px 0}.form-check-label{display:inherit}.displayflex{display:flex}.example-container{max-width:100%;margin:0 25px 25px 0;display:inline-block;vertical-align:top}.formfield-list{max-width:100%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}.dsarcontrols-list{max-width:100%;border:solid 1px #ccc;border-top:0;min-height:60px;display:block;background:white;border-radius:0;overflow:hidden;margin-bottom:10px;text-align:left}.example-box{padding:8px 10px;border:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px}.dsarform-box{color:#000000de;display:flex;flex-direction:column;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:white;font-size:14px;width:50%;margin:3px auto 0!important}.dsarform-box div>label{font-weight:700;margin:0;display:flex}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;background-color:#add8e6;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag .cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.dsarcontrols-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.borderzero{border:0}.example-box label{margin-bottom:0}.example-box h3{font-size:14px;font-weight:700}.example-box label{font-weight:700}.loader-spinner{color:#000;font-size:14px;display:flex;margin-bottom:10px}.loader-spinner span{font-size:13px;font-weight:700;margin-left:10px}.loader-spinner .spinner-border{width:1.5rem!important;height:1.5rem!important}.dsar-formwrapper{border:1px solid #ccc;border-radius:3px;box-shadow:1px 1px 2px #d0d0d0}.dsar-formwrapper>ul.nav-tabs>li>a{border-bottom-width:1px;background-color:#fff;border:0;border-radius:0;border-bottom:2px solid green}.dsar-formwrapper>ul.nav-tabs>li a.nav-link.active{background-color:#fff;z-index:5;color:#0168fa;border-bottom:2px solid #0168fa}.shadowdiv{border:1px solid rgba(72,94,144,.16);border-radius:4px;box-shadow:0 .1rem .2rem #ccc}.shadowdiv>.nav-tabs .nav-link.active{background-color:#fff!important;z-index:5;color:#0168fa!important;border:0px;border-bottom:2px solid blue!important}.shadowdiv>.nav-tabs .nav-link{background-color:transparent!important;border-color:transparent!important;border-bottom:2px solid #5cb85c!important}.shadowdiv ul.nav-tabs.nav{position:relative;background:#fff;justify-content:center;border-bottom:0;border-radius:4px 4px 0 0}.dsar-formwrapper>ul.nav-tabs>li a.nav-item{margin-bottom:0;width:115px}.shadowdiv ul.nav-tabs.nav>li:last-child>a.btn-sm{padding:5px 10px!important;margin:5px 5px 0 0!important}.shadowdiv .tab-content{padding:5px 5px 30px;background:#fff;text-align:left}.displayblock{display:block}.accordion>.card .card-header{padding:0!important;border-bottom:0px!important}.form-tl{font-size:15px}.logowidth{width:80px;height:auto}.headerwrapper{border:1px solid #ccc;text-align:center;border-radius:0;border-bottom:0px}.logocontainer{border-radius:0;background-color:#3968fa;color:#fff}.img-container{height:auto!important}#cdk-drop-list-0 .dsarform-box:first-child,#cdk-drop-list-0 .dsarform-box:nth-child(2){display:none}.quilleditor-wrapper{display:block;padding:0 20px}.quilleditor-wrapper>.quilleditor .ql-align-right{text-align:right!important}.quilleditor-wrapper>.quilleditor .ql-align-center{text-align:center!important}.quilleditor p{text-align:left;width:50%;margin:10px auto}.quilleditor p .ql-size-large{font-size:24px}.quilleditor p .ql-size-huge{font-size:2.5em}.quilleditor p span.ql-size-small{font-size:.75em}.border-top{border-top:1px solid #ccc}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none}input[type=color]{-webkit-appearance:none;border:none;width:24px;padding:0;outline:none;border-radius:5px;margin:0;height:24px}.form-field-section .card{padding:0;border-radius:5px;margin:0 -15px -1px -5px;border:0}.bordermargin{border-right:1px solid #ccc!important;margin-top:0!important}.rotateicon{transform:rotate(90deg);transition:transform .1s ease-in-out}.resumeiconstate{transform:rotate(0);transition:transform .1s ease-in-out}.form-field-section .card .card-header{padding:5px!important;border-bottom:1px solid #ccc;border-top:1px solid #ccc;border-radius:0}.formtab-one{border-radius:0;background-color:brown}.panel-heading.card-header.panel-enabled :last-child{border-bottom:0!important}.icon-label-wrapper span{margin:0 10px}.controls-with-options{display:flex;flex-direction:column}.pop-controls-with-options{display:flex;flex-direction:column;align-content:flex-start;flex-wrap:wrap}.list-wrapper{display:flex;flex-direction:row;align-items:flex-end}.list-wrapper .btn-primary{border-radius:70px;padding:3px 4px;height:18px;line-height:0;font-size:10px;margin:0 0 0 5px}.list-wrapper .control-wrapper{display:flex;flex-direction:column;align-items:baseline}.control-wrapper .form-control.is-invalid{padding-right:10px!important}.controls-with-options>.list-wrapper ul{margin:0;padding:0 20px 0 0}.controls-with-options ul li{list-style-type:none;text-align:right;display:flex}.controls-with-options .btn-link{border-radius:20px;font-size:11px;border:1px solid #3968fa;width:20px;height:20px;padding:0}.shadow{box-shadow:0 1px 3px #0000004d}.card-body .align-items-center{margin:5px}.editorwrapper{border-bottom:1px solid #ccc;margin:0 -2px;padding:8px 15px}.editorwrapper>div>h6{font-weight:700}.form-inline .btn-danger,.addoption .btn-danger{border-radius:10px;height:18px;padding:0 3px}.list-wrapper .btn-link{margin-bottom:10px!important}.dispalyflex-column{display:flex;flex-direction:column}.dispalyflex-column .form-control.is-invalid{padding-right:0!important}.red{color:red;font-size:12px}.previewbtn{position:absolute}span.previewbtn a{color:#0168fa!important}.previewbtn .btn-outline-primary:hover{background-color:#007bff;color:#fff!important}.alert-success{background-color:#5cb85c;border-color:#4cae4c;color:#fff;padding:12px 32px 12px 12px!important}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.flotingdiv{position:fixed;bottom:40px;right:10px;overflow-x:hidden;overflow-y:auto;z-index:0}.form-check{padding-left:0!important}.txt-capitalize{text-transform:capitalize}.flex-align-item{display:flex;align-items:center}.align-form{display:flex;flex-direction:row;align-items:center}.displaynone{display:none}.center-div{margin:10px auto}.form-check-input{margin:0}.pad-right-20{padding:0 0 0 20px}.color-red{color:red}.collapse-btn{width:100%;text-align:left;display:flex;justify-content:space-between;padding:12px!important}::ng-deep .form-control .is-invalid{padding-right:0!important;border:1px solid #f00}.invalid-txtbox{border:1px solid #f00}.container .shadowdiv .nav-tabs{border-bottom:1px solid #cdd4e0!important}.form-tl{font-size:14px;color:#0168fa;font-weight:400!important}.draftspan{position:absolute;right:610px;border:1px solid #ccc;border-radius:20px;padding:6px 12px 3px;background:#e6e6e6;top:11px;color:#666;font-weight:700;text-transform:uppercase;font-size:12px}.margin-padding-zero{margin:0!important;padding:0!important}.required-check input[type=checkbox]{margin:2px 0}.required-check label{margin-left:20px}.publishbg{background-color:#f7f7f7;margin:0 0 30px 20px;border:1px solid #dfdfe8;overflow-y:auto;height:300px;text-align:left}.sharelinkbg{background-color:#fbfbff;margin:0 0 30px 20px;border:1px solid #dfdfe8}.publish{margin:0;width:100%;white-space:pre-wrap;max-height:18rem;overflow-y:auto;padding:0 10px 0 20px}.bluecolor{color:#4f9fcf}.greencolor{color:green}.redcolor{color:red}.script-title{display:flex;flex-direction:row;justify-content:space-between;border:1px solid #ccc;border-bottom-width:0;margin-bottom:0;margin-left:20px;padding:10px!important}.fontsize22{font-size:22px}.publishwrapper{margin:20px 0 10px 25px;text-align:center}.active .publishwrapper ul.nav-tabs{border:0!important;display:inline-flex}.publishwrapper ul>li.nav-item .nav-tabs .nav-link{background:#fff!important}.publishwrapper ul>li.nav-item>a.nav-link{background:#fff!important;color:#09f!important;border-bottom-width:1px;border-radius:5px;height:32px}.publishwrapper ul>li.nav-item a.active{background:#09f!important;color:#fff!important}.publishwrapper ul>li.nav-item>a.nav-link:focus{border:1px solid #ccc!important}.publishwrapper ul .nav-tabs .nav-link{border-radius:5px}.publishwrapper ul .nav-tabs .nav-link:hover{border:1px solid #09f}.code-link-wrapper{width:50%;margin:0 auto}.shadowdiv>.nav-tabs .nav-link.active{height:50px}.shadowdiv>.nav-tabs .nav-link{height:50px}.publishbtn{position:absolute;right:100px;top:-43px}.savebtn{right:7px;top:0}.hide{display:none}.show{display:inherit}.hidelabel{display:none}.showlable{display:flex}ul li>.button-wrapper{width:auto;display:flex;min-width:auto;top:-49px;height:35px;justify-content:center;right:14px;position:absolute;flex-direction:row}.min-width-170{min-width:170px!important}.min-width-75{min-width:75px}.right195{right:195px}.image-wrap{padding:10px;border:solid 1px #e0e0e0;display:inline-block}.img-space{border:solid 1px #737373;border-radius:8px;background-image:linear-gradient(45deg,#8a8a8a 25%,transparent 25%),linear-gradient(-45deg,#8a8a8a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#8a8a8a 75%),linear-gradient(-45deg,transparent 75%,#8a8a8a 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px;height:auto;width:100%;padding:10px}.img-space img{display:block;margin:auto;cursor:pointer}.favicon-img-space{border:solid 1px #737373;border-radius:8px;background:#f1f1f1;height:auto;width:100%;padding:10px}.favicon-img-space img{display:block;margin:auto;cursor:pointer}.fileInputProfileWrap{width:100%;height:auto}.fileInputProfile{position:absolute;height:100%;width:100%;z-index:99;opacity:0}
1.fileInputProfile[disabled]+.img-space{pointer-events:none;cursor:not-allowed!important}.input-group .custom-file .custom-file-input{position:relative;z-index:2;width:100%;top:0;height:auto!important;left:110px;margin:0;opacity:0}.input-group input[type=file]{opacity:0;position:absolute;cursor:pointer}.input-group .custom-file-upload{margin:0 auto}.filedetails{border:1px solid #ccc;margin:5px 0;border-radius:10px;padding:10px;color:#666;flex-direction:column;text-transform:uppercase;font-size:10px;font-weight:500;position:relative}.margin-left26{margin-left:26px}.logodelete{background:transparent;position:absolute;right:10px;color:red;border:0;outline:0;top:16px}.logodelete:focus{outline:0;border:0}.upload-wrapper{border:1px solid #ccc;border-radius:10px;padding:10px}.upload-wrapper p{text-align:center;font-size:12px;text-transform:capitalize}.feathericon{width:18px;height:18px}.uploaded-logo-width{width:150px;height:auto}.uploaded-favicon-width{width:auto;height:auto}.color-controlwrapper input[type=color]{width:36px;height:30px;min-width:30px;cursor:pointer}.color-controlwrapper .form-control-sm{height:30px!important}.reset-link,.cancel-link{right:0;border-radius:20px;padding:6px 12px 3px;top:3px;font-weight:700;text-transform:uppercase;font-size:12px}.reset-link:hover{text-decoration:none}.cancel-link:hover{text-decoration:underline}.justify-content{justify-content:flex-start}.disabled{cursor:not-allowed;background-color:#ccc}.ql-container .ql-snow .ql-disabled{background-color:#ccc}.control-box .form-check-inline:not(:first-child){display:inline-block;position:relative}.form-check-inline input[type=radio]{margin:3px 5px 0 0}.form-check-inline input[type=checkbox]{margin:3px}.dsarform-box .form-check-inline input[type=radio],.dsarform-box .form-check-inline input[type=checkbox]{margin:0 5px 0 0;opacity:1;display:block}.dsarform-box .form-check-inline label{display:inline-block;padding:0;font-family:inherit;font-size:13px;border-radius:4px;font-weight:400!important}.dsarform-box .form-check-inline label:hover{color:#0168fa;border-color:#0168fa;cursor:pointer}.dsarform-box .form-check-inline input[type=radio]:focus+label,.dsarform-box .form-check-inline input[type=checkbox]:focus+label{color:#0168fa}.dsarform-box .form-check-inline input[type=radio]:checked+label,.dsarform-box .form-check-inline input[type=checkbox]:checked+label{color:#0168fa}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e\")}.custom-control-label:before{position:absolute;top:.15625rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:\"\";background-color:#fff;border:#97a3b9 solid 1px}.light-black{color:#596882;font-weight:500;font-size:14px}.template-blue{color:#0168fa;font-weight:500;font-size:14px}.webformheading{background-color:#fff;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;position:relative;height:65px;padding:15px!important}.webformheading h3{color:#596882;font-size:14px;margin:10px 0 0}.webformheading h3 span{padding:3px 5px 2px;text-transform:uppercase;position:relative;bottom:17px}.margin-auto{margin:0 auto;text-align:left}.feather-24{width:20px;height:20px}.lineheight-22{line-height:22px}.txt-center{text-align:center!important}.txt-gray{color:#7987a1!important}.txt-gray:hover{color:#fff!important}.switchchkbox{position:relative;display:inline-block;width:42px;height:22px}.switchchkbox input{opacity:0;width:40px;z-index:1200;height:20px;left:5px;top:1px}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:2px;background-color:#fff;transition:.4s}.switchchkbox input:checked+.slider{background-color:var(--side-nav-org)}.switchchkbox input:focus+.slider{box-shadow:0 0 1px var(--side-nav-org)}.switchchkbox input:checked+.slider:before{transform:translate(18px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}.tab-pane select{background:url(down-arrow.268f09fa8fa3d951.svg) no-repeat;background-position:97% 50%;appearance:none}
1.custom-controls select{background:url(down-arrow.268f09fa8fa3d951.svg) no-repeat;background-position:90% 50%;appearance:none}.selectwidth{width:40%!important}h1,h2,h3,h4,h5,h6{color:inherit}.liveform-draft{text-transform:none;font-size:12px;border:0;background:none;position:relative;bottom:10px;right:140px;display:flex;align-items:center}a .btn-outline-secondary .liveform-draft:active{background:none!important}.liveform-published{text-transform:none;font-size:12px;position:absolute;top:16px;border:0;right:87px;background:none}.liveform-draft>i,.liveform-published>i{font-size:36px;color:#000}.shiftliveformbtn{right:98px!important}a>.btn-outline-secondary>.liveform-draft{background:none}a .btn .btn-sm .pd-x-15 .txt-gray .lineheight-22 .btn-outline-secondary .btn-uppercase.mg-l-5 .liveform-published{background:none}a>.btn-outline-secondary>.liveform-draft:active,a>.btn-outline-secondary>.liveform-draft:hover{background:none}a>.btn-outline-secondary>.liveform-published:active,a>.btn-outline-secondary>.liveform-published:hover{background:none}a .liveform-published .btn-outline-secondary:not(:disabled):not(.disabled):active{background:none!important}a.liveform-draft:hover{background:none}.btn-yellow{background:#FBC02D;border:0;color:#000}.btn-yellow:hover{background:#fab710!important;color:#000}.btn-blue{border:0;color:#fff;background:#2196F3}.btn-blue:hover{color:#fff;background:#0d89ec!important}.cursorpointer{cursor:pointer}.languagedpwraper{top:34px;position:absolute;width:200px;background:#fff;right:0;border:1px solid #ccc;border-radius:3px}.languagedpwraper ul,.languagedpwraper ul li{margin:0;padding:0;list-style-type:none}.pop-custom-controls{margin:5px auto;padding-left:3px;width:260px}.btndisplay-flex{display:flex;margin-right:-10px;flex-wrap:nowrap;align-items:center;justify-content:center}.addoption-popup .formfield-list>li>div>
1.col-md-12 .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0;justify-content:flex-start;flex-wrap:nowrap}.flexwith-column{display:flex!important;flex-direction:column!important}.lastcontrol{display:flex;flex-direction:column!important}.preferedlang-div{display:flex;flex-wrap:wrap;justify-content:center;color:#333;font-style:italic}.preferedlang-div p{margin-bottom:0}.preferedlang-btn-wrapper{display:flex;flex-wrap:nowrap;justify-content:space-around}.hide-submit-btn{display:none}.show-submit-btn{display:block}.controlsby-lang,.justify-content-end{justify-content:flex-end}.error-blue-border{border:1px solid #00f}.error-border{border:1px solid #000}.error-purple-border{border:1px solid purple}.error-yellow-border{border:1px solid rgb(213,128,0)}.active-lang-tab{background-color:#3968fa}.language-btn-list{display:flex;margin:0;padding:0;list-style-type:none}ul.language-btn-list>li>div>a{color:#596882;font-weight:500;display:inline-flex;padding:0;margin:10px 0;cursor:pointer;flex-direction:column;align-items:center}ul.language-btn-list>li>div>a:after{display:inline-block;content:\"\\2192\";font-size:33px;margin:0 10px;line-height:33px;font-weight:400;color:#ccc;position:relative;left:100px;right:auto;top:-85px}ul.language-btn-list>li:last-child>div>a:after{content:\"\"!important}.col-md-12 .form-group .pr-0 .controlsby-lang{justify-content:flex-end;display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:flex-end;margin-bottom:0;flex-wrap:nowrap;flex-direction:column}.lang-btn-wrapper{flex-grow:1;width:100%;min-width:1600px;margin:0 auto}.lang-btn-wrapper ul{margin:0;padding:0;transition:all .3s ease-in-out;display:inline-flex;align-items:stretch}.lang-btn-wrapper ul li{display:inline;margin:0 3px;flex:auto}.lang-btn-wrapper ul li:last-child{margin-left:0!important}.arrowbtn{height:30px;background:none;font-size:24px;border:0;outline:none;margin:2px 0 0;position:absolute;width:30px}.leftarrow{left:0;top:15px;outline:none!important}.rightarrow{right:0;top:15px;outline:none!important}.hidebtns{visibility:hidden}.margin-left-18{margin-left:18px!important}.btn-yellow:disabled{opacity:.65}@media (min-width: 767px) and (max-width: 1024px){.draftspan{right:180px}.reset-link{right:250px}}@media (max-width: 1024px){.publishwrapper{width:36%!important}.publishwrapper .nav-tabs{width:75%!important}}@media (max-width: 768px){.publishwrapper .nav-tabs{width:100%!important}.nav-tabs .nav-link{padding:0 15px}}.webformheading h3{display:flex;align-items:center;justify-content:space-between}.url-actions{width:6%;position:relative;bottom:31px}.url-actions .dropdown-toggle:after{display:none}.url-actions ul{left:-124px!important;top:53px!important}.url-actions .liveform-draft{top:14px}.url-actions .shiftliveformbtn{right:55px!important}.select-url-radio{margin-bottom:16px;display:flex;justify-content:center}.select-url-radio label.full-link{margin-right:16px}.live-action-menu{position:absolute!important;top:160px;right:111px}.live-action-menu .mat-menu-content{border:1px solid rgba(195,195,195,.8);padding:0!important}.live-action-menu .mat-menu-content button{background-color:#fff}.identifier-error{color:red}ul.recommended-items{display:flex}.recommended-items li{color:#00f;cursor:pointer;min-width:70px}.url-input i{margin-left:2px;color:#fff;cursor:pointer}.url-input .input-group-text{max-width:320px}.notify-icons{position:absolute;right:5px}.edit-notify-icons{position:absolute;right:58px}.error-icon{color:red}.success-icon{color:green}
1.live-form-tooltip{min-width:200px;width:100%;display:flex!important;align-items:center;justify-content:center;text-align:center!important}.action-icons.disableBtn{pointer-events:none;opacity:.5}\n"],encapsulation:2}),o})();var bp=u(85493),xp=u(19688),Cp=u(31456);const vp=[{path:"",component:fp,canDeactivate:[xp.c],canActivate:[bp.a1,Cp.p]}];let yp=(()=>{const r=class{};let o=r;return r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[I.Bz.forChild(vp),I.Bz]}),o})();var Tp=u(19119),wp=u(67195),Zp=u(9485),Fp=u(28255),Ip=u(94772),Sp=u(79723),Ap=u(43549),qp=u(23501),kp=u(55466),Dp=u(91742);let Lp=(()=>{const r=class{};let o=r;return r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=e.oAB({type:r}),r.\u0275inj=e.cJS({imports:[c.u5,c.UX,yp,Le.fi.forRoot(),G.IJ,Tp.J,Me.p.pick(wp.kEt),ce.U$,Ai,Je.m,Zp.SystemIntegrationModule,N.hJ,J.T,Ne.cc,Ip.$9,Sp.EV,Fp.Tx,Ap.H,qp.O.forRoot({themes:[kp.W,Dp.$],active:q.N.theme})]}),o})()},79723:(He,ne,u)=>{u.d(ne,{EV:()=>Fe,FN:()=>Ze});var c=u(94650),I=u(36895),e=u(98606),B=u(42111),G=u(43898),oe=u(98473),Q=u(37340);const se=["container"],_=function(T,S,m,f){return{"pi-info-circle":T,"pi-exclamation-triangle":S,"pi-times-circle":m,"pi-check":f}};function q(T,S){if(1&T&&(c.ynx(0),c._UZ(1,"span",6),c.TgZ(2,"div",7)(3,"div",8),c._uU(4),c.qZA(),c.TgZ(5,"div",9),c._uU(6),c.qZA()(),c.BQk()),2&T){const m=c.oxw();c.xp6(1),c.Tol("p-toast-message-icon pi"+(m.message.icon?" "+m.message.icon:"")),c.Q6J("ngClass",c.l5B(5,_,"info"==m.message.severity,"warn"==m.message.severity,"error"==m.message.severity,"success"==m.message.severity)),c.xp6(3),c.Oqu(m.message.summary),c.xp6(2),c.Oqu(m.message.detail)}}function Ce(T,S){1&T&&c.GkF(0)}function re(T,S){if(1&T){const m=c.EpF();c.TgZ(0,"button",10),c.NdJ("click",function(Z){c.CHM(m);const U=c.oxw();return c.KtG(U.onCloseIconClick(Z))})("keydown.enter",function(Z){c.CHM(m);const U=c.oxw();return c.KtG(U.onCloseIconClick(Z))}),c._UZ(1,"span",11),c.qZA()}}const le=function(T){return[T,"p-toast-message"]},te=function(T,S,m,f){return{showTransformParams:T,hideTransformParams:S,showTransitionParams:m,hideTransitionParams:f}},ve=function(T){return{value:"visible",params:T}},ye=function(T){return{$implicit:T}};function Te(T,S){if(1&T){const m=c.EpF();c.TgZ(0,"p-toastItem",3),c.NdJ("onClose",function(Z){c.CHM(m);const U=c.oxw();return c.KtG(U.onMessageClose(Z))})("@toastAnimation.start",function(Z){c.CHM(m);const U=c.oxw();return c.KtG(U.onAnimationStart(Z))}),c.qZA()}if(2&T){const m=S.$implicit,f=S.index,Z=c.oxw();c.Q6J("message",m)("index",f)("template",Z.template)("@toastAnimation",void 0)("showTransformOptions",Z.showTransformOptions)("hideTransformOptions",Z.hideTransformOptions)("showTransitionOptions",Z.showTransitionOptions)("hideTransitionOptions",Z.hideTransitionOptions)}}let we=(()=>{class T{constructor(m){this.zone=m,this.onClose=new c.vpe}ngAfterViewInit(){this.initTimeout()}initTimeout(){this.message.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick(m){this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),m.preventDefault()}ngOnDestroy(){this.clearTimeout()}}return T.\u0275fac=function(m){return new(m||T)(c.Y36(c.R0b))},T.\u0275cmp=c.Xpm({type:T,selectors:[["p-toastItem"]],viewQuery:function(m,f){if(1&m&&c.Gf(se,5),2&m){let Z;c.iGM(Z=c.CRH())&&(f.containerViewChild=Z.first)}},inputs:{message:"message",index:"index",template:"template",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},decls:6,vars:21,consts:[[3,"ngClass","mouseenter","mouseleave"],["container",""],["role","alert","aria-live","assertive","aria-atomic","true",1,"p-toast-message-content",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","class","p-toast-icon-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],[3,"ngClass"],[1,"p-toast-message-text"],[1,"p-toast-summary"],[1,"p-toast-detail"],["type","button","pRipple","",1,"p-toast-icon-close","p-link",3,"click","keydown.enter"],[1,"p-toast-icon-close-icon","pi","pi-times"]],template:function(m,f){1&m&&(c.TgZ(0,"div",0,1),c.NdJ("mouseenter",function(){return f.onMouseEnter()})("mouseleave",function(){return f.onMouseLeave()}),c.TgZ(2,"div",2),c.YNc(3,q,7,10,"ng-container",3),c.YNc(4,Ce,1,0,"ng-container",4),c.YNc(5,re,2,0,"button",5),c.qZA()()),2&m&&(c.Tol(f.message.styleClass),c.Q6J("ngClass",c.VKq(10,le,"p-toast-message-"+f.message.severity)
1)("@messageState",c.VKq(17,ve,c.l5B(12,te,f.showTransformOptions,f.hideTransformOptions,f.showTransitionOptions,f.hideTransitionOptions))),c.uIk("id",f.message.id),c.xp6(2),c.Q6J("ngClass",f.message.contentStyleClass),c.xp6(1),c.Q6J("ngIf",!f.template),c.xp6(1),c.Q6J("ngTemplateOutlet",f.template)("ngTemplateOutletContext",c.VKq(19,ye,f.message)),c.xp6(1),c.Q6J("ngIf",!1!==f.message.closable))},dependencies:[I.mk,I.O5,I.tP,oe.H],encapsulation:2,data:{animation:[(0,Q.X$)("messageState",[(0,Q.SB)("visible",(0,Q.oB)({transform:"translateY(0)",opacity:1})),(0,Q.eR)("void => *",[(0,Q.oB)({transform:"{{showTransformParams}}",opacity:0}),(0,Q.jt)("{{showTransitionParams}}")]),(0,Q.eR)("* => void",[(0,Q.jt)("{{hideTransitionParams}}",(0,Q.oB)({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0}),T})(),Ze=(()=>{class T{constructor(m,f){this.messageService=m,this.cd=f,this.autoZIndex=!0,this.baseZIndex=0,this.position="top-right",this.preventOpenDuplicates=!1,this.preventDuplicates=!1,this.showTransformOptions="translateY(100%)",this.hideTransformOptions="translateY(-100%)",this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="250ms ease-in",this.onClose=new c.vpe,this.id=(0,G.Th)()}ngOnInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(m=>{if(m)if(m instanceof Array){const f=m.filter(Z=>this.canAdd(Z));this.add(f)}else this.canAdd(m)&&this.add([m])}),this.clearSubscription=this.messageService.clearObserver.subscribe(m=>{m?this.key===m&&(this.messages=null):this.messages=null,this.cd.markForCheck()}),this.breakpoints&&this.createStyle()}add(m){this.messages=this.messages?[...this.messages,...m]:[...m],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...m]:[...m]),this.cd.markForCheck()}canAdd(m){let f=this.key===m.key;return f&&this.preventOpenDuplicates&&(f=!this.containsMessage(this.messages,m)),f&&this.preventDuplicates&&(f=!this.containsMessage(this.messagesArchieve,m)),f}containsMessage(m,f){return!!m&&null!=m.find(Z=>Z.summary===f.summary&&Z.detail==f.detail&&Z.severity===f.severity)}
1ngAfterContentInit(){this.templates.forEach(m=>{m.getType(),this.template=m.template})}onMessageClose(m){this.messages.splice(m.index,1),this.onClose.emit({message:m.message}),this.cd.detectChanges()}onAnimationStart(m){"void"===m.fromState&&this.autoZIndex&&(this.containerViewChild.nativeElement.style.zIndex=String(this.baseZIndex+ ++e.p.zindex),this.containerViewChild.nativeElement.setAttribute(this.id,""))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let m="";for(let f in this.breakpoints){let Z="";for(let U in this.breakpoints[f])Z+=U+":"+this.breakpoints[f][U]+" !important;";m+=`\n                    @media screen and (max-width: ${f}) {\n                        .p-toast[${this.id}] {\n                           ${Z}\n                        }\n                    }\n                `}this.styleElement.innerHTML=m}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}}return T.\u0275fac=function(m){return new(m||T)(c.Y36(B.ez),c.Y36(c.sBO))},T.\u0275cmp=c.Xpm({type:T,selectors:[["p-toast"]],contentQueries:function(m,f,Z){if(1&m&&c.Suo(Z,B.jx,4),2&m){let U;c.iGM(U=c.CRH())&&(f.templates=U)}},viewQuery:function(m,f){if(1&m&&c.Gf(se,5),2&m){let Z;c.iGM(Z=c.CRH())&&(f.containerViewChild=Z.first)}},inputs:{autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",position:"position",preventOpenDuplicates:"preventOpenDuplicates",preventDuplicates:"preventDuplicates",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",key:"key",style:"style",styleClass:"styleClass",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},decls:3,vars:5,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose"]],template:function(m,f){1&m&&(c.TgZ(0,"div",0,1),c.YNc(2,Te,1,8,"p-toastItem",2),c.qZA()),2&m&&(c.Tol(f.styleClass),c.Q6J("ngClass","p-toast p-component p-toast-"+f.position)("ngStyle",f.style),c.xp6(2),c.Q6J("ngForOf",f.messages))},dependencies:[I.mk,I.sg,I.PC,we],styles:[".p-toast{position:fixed;width:25rem}.p-toast-message{overflow:hidden}.p-toast-message-content{align-items:flex-start;display:flex}.p-toast-message-text{flex:1 1 auto}.p-toast-top-right{right:20px;top:20px}.p-toast-top-left{left:20px;top:20px}.p-toast-bottom-left{bottom:20px;left:20px}.p-toast-bottom-right{bottom:20px;right:20px}.p-toast-top-center{left:50%;top:20px;transform:translateX(-50%)}.p-toast-bottom-center{bottom:20px;left:50%;transform:translateX(-50%)}.p-toast-center{left:50%;min-width:20vw;top:50%;transform:translate(-50%,-50%)}.p-toast-icon-close{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-toast-icon-close.p-link{cursor:pointer}"],encapsulation:2,data:{animation:[(0,Q.X$)("toastAnimation",[(0,Q.eR)(":enter, :leave",[(0,Q.IO)("@*",(0,Q.pV)())])])]},changeDetection:0}),T})(),Fe=(()=>{class T{}return T.\u0275fac=function(m){return new(m||T)},T.\u0275mod=c.oAB({type:T}),T.\u0275inj=c.cJS({imports:[I.ez,oe.T,B.m8]}),T})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.