1import{a as _e}from"./chunk-OEV6Z5SQ.js";import{a as Fe}from"./chunk-RCZJ2IHZ.js";import{a as Ee}from"./chunk-J4LBBLXH.js";import{b as ge,c as g}from"./chunk-X5DGY6DB.js";import{c as xe,d as ye,e as he,f as Te,g as Ce,h as Se}from"./chunk-NRGR3S53.js";import"./chunk-PV3LKO3I.js";import"./chunk-52XBPXFR.js";import{c as ke}from"./chunk-IRUUDLGX.js";import"./chunk-YLPUROS7.js";import"./chunk-YPA54LAK.js";import"./chunk-BTFSSCIJ.js";import"./chunk-W2F6WWIK.js";import"./chunk-L4ZEWT37.js";import{a as be}from"./chunk-RISCHKDK.js";import"./chunk-LXJFCHQ7.js";import"./chunk-6E6BIMAS.js";import"./chunk-4FRM4NZ2.js";import"./chunk-5EHSVCUQ.js";import{Aa as ue,Ba as ve,E as le,G as me,H as se,L as de,_a as fe,d as ie,f as u,h as re,i as oe,p as ne,r as ae,x as ce,y as pe}from"./chunk-WB4ZKX5G.js";import{Ab as W,Cd as te,F as C,k as Y,mb as K,oc as X,qc as Z,vc as ee,wc as N,y as J}from"./chunk-3IFILS7V.js";import{Aa as P,Ac as E,Ad as G,Bb as F,Bc as I,Cc as m,Dc as r,Ea as y,Ec as t,Fc as s,Fd as i,Gd as o,Hd as z,Ib as e,Kd as Q,Oa as D,Pa as L,Pc as V,Vb as v,W as O,Xb as $,Xc as h,Zc as T,_b as R,bd as j,cd as w,d as k,dd as H,ec as _,md as c,nd as d,od as U,pd as b,ta as x,w as M,yc as q}from"./chunk-7U63JCID.js";import{a as A,b as B}from"./chunk-NCEQPEJE.js";var S=class p{constructor(l,n,a){this.http=l;this.occEndpoints=n;this.converter=a}getTicketCategories(){return this.http.get(this.occEndpoints.buildUrl("ticket/ticketcategories"))}getContactChannels(){return this.http.get(this.occEndpoints.buildUrl("ticket/contactchannels"))}getIpAddress(){return this.http.get(this.occEndpoints.buildUrl("ticket/getIpAddress"),{responseType:"text"})}createTicket(l){let n=this.occEndpoints.buildUrl("ticket"),a=new J({"Content-Type":"application/json"});return this.http.post(n,l,{headers:a})}static{this.\u0275fac=function(n){return new(n||p)(y(C),y(be),y(W))}}static{this.\u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})}};var Oe=["privacyPopup"],Pe=p=>({ipAddress:p}),De=(p,l)=>l.code;function Le(p,l){if(p&1&&(r(0,"div",13),s(1,"input",36),r(2,"label",37),c(3),t()()),p&2){let n=l.$implicit;e(),m("id",n.code)("value",n.code),e(),m("for",n.code),e(),d(n.value)}}function $e(p,l){if(p&1&&s(0,"div",49),p&2){let n=T().$implicit;m("innerHTML",n.content,F)}}function Re(p,l){if(p&1&&(r(0,"div",44)(1,"h2",45)(2,"button",46),c(3),t()(),r(4,"div",47)(5,"div",48),_(6,$e,1,1,"ng-template"),t()()()),p&2){let n=l.$implicit;e(3),d(n.title)}}function qe(p,l){if(p&1){let n=V();r(0,"div",38)(1,"h3",39),c(2),i(3,"cxTranslate"),t(),r(4,"button",40),h("click",function(){D(n);let f=T();return L(f.closeModal("Cross click"))}),r(5,"span",41),c(6,"\xD7"),t()()(),r(7,"div",42)(8,"div",43),E(9,Re,7,1,"div",44,q),i(11,"async"),t()()}if(p&2){let n=T();e(2),d(o(3,2,"supportTicket.contactForm.privacyPolicyTitle")),e(6),m("closeOthers",!0),e(),I(o(11,4,n.policiesData$))}}var Ie=class p{constructor(l,n,a,f,Ve,je,we,He,Ue,Ge,ze){this.fb=l;this.http=n;this.occEndpoints=a;this.ticketService=f;this.userAddressService=Ve;this.authService=je;this.userService=we;this.routingService=He;this.globalMessageService=Ue;this.launchDialogService=Ge;this.vcr=ze;this.contactForm=this.createContactForm();this.ipAddress$=this.ticketService.getIpAddress();this.loading$=new k;this.contactChannels$=this.ticketService.getContactChannels();this.ticketCategories$=this.ticketService.getTicketCategories();this.destroy$=new k}ngOnInit(){this.authService.isUserLoggedIn().pipe(x(this.destroy$)).subscribe(l=>{l&&this.userService.getUser(this.loading$).pipe(x(this.destroy$)).subscribe(n=>{this.contactForm.patchValue(B(A({},n),{email:n.displayUid}))})}),this.setProvince()}createContactForm(){return this.fb.group({firstName:["",[u.required,u.maxLength(50),g.nameValidator]],lastName:["",[u.required,u.maxLength(50),g.nameValidator]],age:["",[u.maxLength(3),u.pattern(/^(0|[1-9]\d*)?$/)]],gender:"",companyTitle:"",phoneNumber:["",[u.required,g.phoneNumberValidator]],displayUid:["",[g.emailValidator]],email:["",[u.required]],subject:["Contact"],city:[null,[u.required]],ticketCategory:[null,[u.required]],address:"",orderCode:"",message:["",[u.required]],contactChannel:["PHONE",[u.required]]})}
1submitForm(){if(this.contactForm.invalid){this.contactForm.markAllAsTouched();return}this.ticketService.createTicket(this.contactForm.value).pipe(x(this.destroy$)).subscribe(()=>{this.globalMessageService.add({key:"supportTicket.contactForm.submitSuccess"},N.MSG_TYPE_CONFIRMATION),this.contactForm.markAsUntouched(),this.routingService.go({cxRoute:"home"})},()=>{this.globalMessageService.add({key:"supportTicket.contactForm.submitFailure"},N.MSG_TYPE_ERROR)})}setProvince(){this.userAddressService.loadProvinces(),this.provinces$=this.userAddressService.getProvinces()}openModal(l){this.policiesData$=this.loadPolicies().pipe(M(f=>f.component||[]));let n={content:l,modalDialogClass:"modal-lg"},a=this.launchDialogService.openDialog(ue.STATIC_MODAL,null,this.vcr,n);a&&a.pipe(O(1)).subscribe()}openDialog(){this.openModal(this.privacyPopup)}closeModal(l){this.launchDialogService.closeDialog(l)}loadPolicies(){return this.http.get(this.occEndpoints.buildUrl("cms/components"),{params:{fields:"DEFAULT",currentPage:"0",pageSize:"3",componentIds:"MembershipContractChild1,MembershipContractChild2,MembershipContractChild3"}})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||p)(v(se),v(C),v(K),v(S),v(ke),v(Z),v(Fe),v(X),v(ee),v(ve),v($))}}static{this.\u0275cmp=R({type:p,selectors:[["ozd-contact-form"]],viewQuery:function(n,a){if(n&1&&j(Oe,5),n&2){let f;w(f=H())&&(a.privacyPopup=f.first)}},standalone:!1,decls:132,vars:119,consts:[["privacyPopup",""],[1,"cms-content"],[1,"cms-page"],[1,"row"],[1,"col-md-6"],["focusInvalidInput","",3,"ngSubmit","formGroup"],[1,"form-group"],["type","text","name","firstName","required","","formControlName","firstName",1,"form-control"],["prefix","updateProfileForm.firstName",3,"control"],["type","text","required","","formControlName","lastName",1,"form-control"],["prefix","updateProfileForm.lastName",3,"control"],["type","text","maxlength","3","appNumberOnly","","formControlName","age",1,"form-control"],[3,"control"],[1,"custom-control","custom-radio","custom-control-inline"],["id","femaleRadio","type","radio","formControlName","gender","value","FEMALE",1,"custom-control-input"],["for","femaleRadio",1,"custom-control-label"],["type","radio","id","maleRadio","formControlName","gender","value","MALE",1,"custom-control-input"],["for","maleRadio",1,"custom-control-label"],["type","text","formControlName","companyTitle",1,"form-control"],["type","text","name","phoneNumber","mask","(000) 000 00 00","placeholder","(___) ___ ____","formControlName","phoneNumber","autocomplete","off",1,"form-control",3,"showMaskTyped","dropSpecialCharacters","validation"],["type","text","required","","formControlName","email","appAutofocus","",1,"form-control"],["prefix","updateProfileForm.email",3,"control"],["formControlName","city","bindLabel","name","bindValue","code",3,"searchable","items","placeholder"],["prefix","supportTicket.contactForm.city",3,"control"],["formControlName","ticketCategory","bindLabel","value","bindValue","code",3,"searchable","items","placeholder"],["prefix","supportTicket.contactForm.topic",3,"control"],["type","text","formControlName","address",1,"form-control"],["type","text","formControlName","orderCode",1,"form-control"],["type","text","required","","formControlName","message",1,"form-control"],["type","submit",1,"btn","btn-block","btn-primary","mb-5"],[1,"contact-icon"],[1,"fas","fa-headset"],[1,"text",3,"innerHTML"],[1,"col"],[1,"cms-page-info"],["role","button",1,"text-primary",3,"click"],["type","radio","formControlName","contactChannel",1,"custom-control-input",3,"id","value"],[1,"custom-control-label",3,"for"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["ngbAccordion","",3,"closeOthers"],["ngbAccordionItem",""],["ngbAccordionHeader",""],["ngbAccordionButton",""],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"innerHTML"]],template:function(n,a){n&1&&(r(0,"div",1)(1,"div",2)(2,"h2"),c(3),i(4,"cxTranslate"),t(),r(5,"div",3)(6,"div",4)(7,"form",5),h("ngSubmit",function(){return a.submitForm(
1)}),r(8,"div",6)(9,"label"),c(10),i(11,"cxTranslate"),i(12,"cxTranslate"),t(),s(13,"input",7)(14,"cx-form-errors",8),t(),r(15,"div",6)(16,"label"),c(17),i(18,"cxTranslate"),i(19,"cxTranslate"),t(),s(20,"input",9)(21,"cx-form-errors",10),t(),r(22,"div",6)(23,"label"),c(24),i(25,"cxTranslate"),t(),s(26,"input",11)(27,"cx-form-errors",12),t(),r(28,"div",6)(29,"label"),c(30),i(31,"cxTranslate"),t(),r(32,"div",13),s(33,"input",14),r(34,"label",15),c(35),i(36,"cxTranslate"),t()(),r(37,"div",13),s(38,"input",16),r(39,"label",17),c(40),i(41,"cxTranslate"),t()(),s(42,"cx-form-errors",12),t(),r(43,"div",6)(44,"label"),c(45),i(46,"cxTranslate"),t(),s(47,"input",18)(48,"cx-form-errors",12),t(),r(49,"div",6)(50,"label"),c(51),i(52,"cxTranslate"),i(53,"cxTranslate"),t(),s(54,"input",19)(55,"cx-form-errors",12),t(),r(56,"div",6)(57,"label"),c(58),i(59,"cxTranslate"),i(60,"cxTranslate"),t(),s(61,"input",20)(62,"cx-form-errors",21),t(),r(63,"div",6)(64,"label"),c(65),i(66,"cxTranslate"),i(67,"cxTranslate"),t(),s(68,"ng-select",22),i(69,"async"),i(70,"cxTranslate"),s(71,"cx-form-errors",23),t(),r(72,"div",6)(73,"label"),c(74),i(75,"cxTranslate"),i(76,"cxTranslate"),t(),s(77,"ng-select",24),i(78,"async"),i(79,"cxTranslate"),s(80,"cx-form-errors",25),t(),r(81,"div",6)(82,"label"),c(83),i(84,"cxTranslate"),t(),r(85,"textarea",26),c(86," "),t()(),r(87,"div",6)(88,"label"),c(89),i(90,"cxTranslate"),t(),s(91,"input",27),t(),r(92,"div",6)(93,"label"),c(94),i(95,"cxTranslate"),i(96,"cxTranslate"),t(),r(97,"textarea",28),c(98," "),t(),s(99,"cx-form-errors",12),t(),r(100,"div",6)(101,"label"),c(102),i(103,"cxTranslate"),t(),E(104,Le,4,4,"div",13,De),i(106,"async"),t(),r(107,"button",29),c(108),i(109,"cxTranslate"),t()()(),r(110,"div",4)(111,"div",30),s(112,"i",31)(113,"span",32),i(114,"cxTranslate"),t()(),r(115,"div",33)(116,"div",34)(117,"p",35),h("click",function(){return a.openDialog()}),r(118,"b"),c(119),i(120,"cxTranslate"),t()(),r(121,"p")(122,"b"),c(123),i(124,"async"),i(125,"cxTranslate"),t()(),r(126,"p")(127,"b"),c(128),i(129,"cxTranslate"),t()()()()()()(),_(130,qe,12,6,"ng-template",null,0,Q)),n&2&&(e(3),d(o(4,48,"supportTicket.contactForm.title")),e(4),m("formGroup",a.contactForm),e(3),b("",o(11,50,"supportTicket.contactForm.requiredSymbol")," ",o(12,52,"supportTicket.contactForm.firstName")),e(4),m("control",a.contactForm.get("firstName")),e(3),b("",o(18,54,"supportTicket.contactForm.requiredSymbol")," ",o(19,56,"supportTicket.contactForm.lastName")),e(4),m("control",a.contactForm.get("lastName")),e(3),d(o(25,58,"supportTicket.contactForm.age")),e(3),m("control",a.contactForm.get("age")),e(3),d(o(31,60,"supportTicket.contactForm.gender.title")),e(5),d(o(36,62,"supportTicket.contactForm.gender.female")),e(5),d(o(41,64,"supportTicket.contactForm.gender.male")),e(2),m("control",a.contactForm.get("gender")),e(3),d(o(46,66,"supportTicket.contactForm.companyTitle")),e(3),m("control",a.contactForm.get("companyTitle")),e(3),b("",o(52,68,"supportTicket.contactForm.requiredSymbol")," ",o(53,70,"supportTicket.contactForm.phoneNumber.label")),e(3),m("showMaskTyped",!0)("dropSpecialCharacters",!1)("validation",!1),e(),m("control",a.contactForm.get("phoneNumber")),e(3),b("",o(59,72,"supportTicket.contactForm.requiredSymbol")," ",o(60,74,"supportTicket.contactForm.email")),e(4),m("control",a.contactForm.get("email")),e(3),b("",o(66,76,"supportTicket.contactForm.requiredSymbol")," ",o(67,78,"supportTicket.contactForm.city.label")),e(3),m("searchable",!0)("items",o(69,80,a.provinces$))("placeholder",o(70,82,"supportTicket.contactForm.city.placeholder")),e(3),m("control",a.contactForm.get("city")),e(3),b("",o(75,84,"supportTicket.contactForm.requiredSymbol")," ",o(76,86,"supportTicket.contactForm.topic.label")),e(3),m("searchable",!0)("items",o(78,88,a.ticketCategories$))("placeholder",o(79,90,"supportTicket.contactForm.topic.placeholder")),e(3),m("control",a.contactForm.get("ticketCategory")),e(3),d(o(84,92,"supportTicket.contactForm.address")),e(6),d(o(90,94,"supportTicket.contactForm.orderCode")),e(5),b("",o(95,96,"supportTicket.contactForm.requiredSymbol")," ",o(96,98,"supportTicket.contactForm.message")),e(5),m("control",a.contactForm.get("message")),e(3),d(o(103,100,"supportTicket.contactForm.contactChannel.header")),e(2),I(o(106,102,a.contactChannels$)),e(4),U(" ",o(109,104,"supp
1ortTicket.contactForm.submit")," "),e(5),m("innerHTML",o(114,106,"supportTicket.contactForm.contactInfo"),F),e(6),d(o(120,108,"supportTicket.contactForm.privacyPolicy")),e(4),d(z(125,112,"supportTicket.contactForm.ipAddress",G(117,Pe,o(124,110,a.ipAddress$)))),e(5),d(o(129,115,"supportTicket.contactForm.requiredField")))},dependencies:[ne,ie,ae,re,oe,le,me,pe,ce,fe,_e,Ee,he,Se,Ce,Te,xe,ye,ge,de,Y,te],styles:[".contact-icon[_ngcontent-%COMP%]{display:flex;align-items:center}.contact-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px;padding:10px;background:var(--cx-color-primary);border-radius:50%;color:#fff}.contact-icon[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:16px;margin-left:15px}@media only screen and (max-width:992px){.cms-content[_ngcontent-%COMP%] .cms-page[_ngcontent-%COMP%]{background:#fff;box-shadow:none;background-color:#fff;box-shadow:0 2px 10px #0000001c;padding:5px 30px}}"]})}};export{Ie as ContactFormComponent};
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.