1import{$ as g,$k as j,Ba as R,Cb as p,Ee as k,Fa as l,Fd as ce,Ga as N,Gb as h,Gd as ue,He as de,Ke as pe,Km as q,L as F,La as a,Ma as d,Mm as ge,Mz as xe,Na as C,Nm as $,Oa as Y,Om as fe,Pa as ee,Qd as B,R as x,Ra as b,Tb as oe,Tm as _e,Um as Z,V as J,W as y,Wa as A,Xa as m,Zc as ae,_ as X,a as Q,aa as f,ab as te,al as K,b as H,eb as E,fb as V,fc as ie,ff as z,fx as Fe,gb as O,gd as M,hd as me,ho as Ce,ib as D,jb as S,jc as se,kc as ne,ma as L,ml as he,mn as ve,mq as Se,n as G,nq as Ie,oc as re,qa as r,qp as De,ra as u,sc as _,tc as U,tl as I,xa as v,xd as P,yd as W,zd as le,zq as we}from"./chunk-B5AFIBST.js";var Ne=["iframeform"];function Ee(i,s){if(i&1&&(a(0,"div",5)(1,"div")(2,"a",6),C(3,"img",7),p(4,"getLocalizedValues"),d()()()),i&2){let e=m();r(),N("text-align","left"),r(),l("href",e.getHTMLAttribute(e.commonData==null||e.commonData.templateSettings==null?null:e.commonData.templateSettings.Elements,"header_goto_url","href"),L),r(),N("height",e.constants.ORGANIZATION_SETTINGS.logoURL?"":"64px")("max-width",e.constants.ORGANIZATION_SETTINGS.logoURL?"":"185px"),te("alt","",e.constants.ORGANIZATION_SETTINGS.name," ",h(4,12,"Logo","Logo",e.commonclassKey,e.registerContextChangeDetectionFlag),""),l("src",e.getSettingsValues(e.commonData.templateSettings==null?null:e.commonData.templateSettings.Details,"header_img_url")?e.getSettingsValues(e.commonData.templateSettings==null?null:e.commonData.templateSettings.Details,"header_img_url"):e.constants.ORGANIZATION_SETTINGS.logoURL,L)("title",e.constants.ORGANIZATION_SETTINGS.name)}}function Ve(i,s){if(i&1&&(a(0,"div",14),C(1,"div",15),a(2,"div",17),D(3),p(4,"getLocalizedValues"),d()()),i&2){let e=m(3);r(3),S(h(4,1,"Please wait...","Wait",e.classKey,e.registerContextChangeDetectionFlag))}}function Oe(i,s){if(i&1&&(a(0,"div",11),v(1,Ve,5,6,"div",12),a(2,"div",13)(3,"div",14),C(4,"div",15)(5,"br"),a(6,"div",16),D(7),p(8,"getLocalizedValues"),d()()()()),i&2){let e=m(2);r(),l("ngIf",e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.isFetchingUrlParams),r(6),S(h(8,2,"Please wait while we fetch forms...","PlsWait",e.classKey,e.registerContextChangeDetectionFlag))}}function Ue(i,s){if(i&1){let e=b();Y(0),a(1,"webstore-forms",18),A("closeDialog",function(){g(e);let t=m(2);return f(t.closeFormDialog())})("onSelectForm",function(t){g(e);let n=m(2);return f(n.onFormSelected(t))})("onSwitchMode",function(t){g(e);let n=m(2);return f(n.switchFormViewMode(t))})("onUpdateForms",function(){g(e);let t=m(2);return f(t.updateForms())}),d(),ee()}if(i&2){let e=m(2);r(),l("data",e.data)("userId",e.userId)("commonData",e.commonData)("constants",e.constants)("showCloseButton",!1)("onlyData",e.onlyData)("showPrintButton",e.showPrintButton)}}function Me(i,s){if(i&1){let e=b();a(0,"div",11)(1,"div",19),p(2,"getLocalizedValues"),A("click",function(){g(e);let t=m(2);return f(t.closeFormDialog())}),a(3,"div",20),D(4),p(5,"getLocalizedValues"),d()()()}if(i&2){let e=m(2);r(),R("aria-label",h(2,2,"Close","Close",e.classKey,e.registerContextChangeDetectionFlag)),r(3),S(h(5,7,"Unable to Fetch Forms, Please try again...","UnableToFetchForms",e.classKey,e.registerContextChangeDetectionFlag))}}function Pe(i,s){if(i&1){let e=b();a(0,"div",11)(1,"div",19),p(2,"getLocalizedValues"),A("click",function(){g(e);let t=m(2);return f(t.closeFormDialog())}),a(3,"div",21),D(4),p(5,"getLocalizedValues"),d()()()}if(i&2){let e=m(2);r(),R("aria-label",h(2,2,"Close","Close",e.classKey,e.registerContextChangeDetectionFlag)),r(3),S(h(5,7,"No forms are associated for this service","NoForms",e.classKey,e.registerContextChangeDetectionFlag))}}function We(i,s){if(i&1&&(a(0,"div",8),v(1,Oe,9,7,"div",9)(2,Ue,2,7,"ng-container",10)(3,Me,6,12,"div",9)(4,Pe,6,12,"div",9),d()),i&2){let e=m();r(),l("ngIf",e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.isLoading),r(),l("ngIf",!(!(e.commonData==null||e.commonData.forms==null)&&e.commonData.forms.isFetchingUrlParams)&&!(!(e.commonData==null||e.commonData.forms==null)&&e.commonData.forms.isLoading)&&(e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.list.length)>0),r(),l("ngIf",e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.formsLoadFailed),r(),l("ngIf",!e.expiredLink&&!(!(e.commonData==null||e.commonData.forms==null)&&e.commonData.forms.isFetchingUrlParams)&&!(!(e.commonData==null||e.commonData.forms==null)&&e.commonData.forms.isLoading)&&(e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.list)&&(e.commonData==null||e.commonData.forms==null?null:e.commonData.forms.list.length)==0)}}var w=(()=>{let s=class s{constructor(o,t,n,c,T,Ae,Te,Ge,Le){this.store=o,this.route=t,this.activatedRoute=n,this.router=c,this.webstoreCommonServices=T,this.constantSetterAndGetterService=Ae,this.zenDialogService=Te,this.domSanitizer=Ge,this.actions$=Le,this.unsubscribe$=new G,this.showGuestForm=!1,this.isDealsPageFromUrl=!1,this.showPrintButton=!1,this.destroyed$=new G,this.expiredLink=!1,this.commonClassKey=z.WebstoreCommon,this.setCurrencyValueFormat=he,this.showSidebarContent=!1,this.classKey=z.WebstoreServiceCustomForm,this.registerContextChangeDetectionFlag=!1,this.setRegisterContextChangeDetectionFlag=()=>{this.registerContextChangeDetectionFlag=!0},document.getElementById("loadingImgDiv")&&(document.getElementById("loadingImgDiv").style.display="none"),this.commonData$=this.store.select("webstoreCommonState"),this.commonData$.pipe(F(this.destroyed$)).subscribe(Re=>{this.commonData=Re})}ngOnInit(){k(this.classKey,this.setRegisterContextChangeDetectionFlag),k(this.commonClassKey,this.setRegisterContextChangeDetectionFlag),this.actions$.pipe(Z(U.SET_CONTEXT_DATA),F(this.unsubscribe$)).subscribe(o=>{this.commonData.guest.isGuestLoggedIn&&this.loadForms()}),this.actions$.pipe(Z(U.GET_CUSTOM_URL_PARAMS_SUCCESS),F(this.unsubscribe$)).subscribe(o=>{let{payload:{guest_id:t,is_link_expired:n,user_token:c,requested_for:T}}
1=o;this.appGroupId=T,this.userId=t,!n&&(!this.commonData.guest.isGuestLoggedIn||this.constants.USER_ID&&t&&this.constants.USER_ID.toLowerCase()===t.toLowerCase())&&!this.isClassType?this.initServiceForm(t,c):(this.expiredLink=!0,this.invokeSignIn())}),this.constants=new _().getConstants(),this.serviceId=I(this.activatedRoute.snapshot.queryParamMap,"ServiceId"),this.onlyData=I(this.activatedRoute.snapshot.queryParamMap,"OnlyData"),this.isClassType=I(this.activatedRoute.snapshot.queryParamMap,"IsClassType"),this.showPrintButton=I(this.activatedRoute.snapshot.queryParamMap,"Print")=="true",this.isClassType==="1"&&this.store.dispatch(new ae("fitnessSales")),this.store.dispatch(new ce({fetchToken:!this.constants.ORGANIZATION_SETTINGS.protectServiceData}))}ngOnChanges(){}initServiceForm(o,t){if(this.constants=new _().getConstants(),this.userId||(this.userId=o),(!this.commonData.guest.isGuestLoggedIn||this.userId.toLowerCase()!==this.commonData.guest.Id.toLowerCase())&&this.constants.ORGANIZATION_SETTINGS.protectServiceData){if(this.zenDialogService.showDialog(this.commonData.dialog.webstoreAuthDialog),this.store.dispatch(new M({fromFormsComponent:!0})),this.commonData.guest.Id&&this.userId.toLowerCase()!==this.commonData.guest.Id.toLowerCase()){var n=de("You do not have access to this form, Please use appropriate user credentials","FormAccessFailureMessage",this.commonClassKey[0]);this.store.dispatch(new me({global:n}))}}else this.commonData.guest.isGuestLoggedIn&&this.constants.USER_ID&&this.constants.USER_ID.toLowerCase()===this.userId.toLowerCase()?this.loadForms():(new _().setConstants(H(Q({},this.constants),{WEB_API_TOKEN:t})),window.globalJson.webApiToken=t,this.loadForms())}completeReset(){}getSettingsValues(o,t){return K(o,t)}invokeSignIn(){this.zenDialogService.showDialog(this.commonData.dialog.webstoreAuthDialog),this.store.dispatch(new M({fromFormsComponent:!0}))}closeAuthDialog(){this.zenDialogService.showDialog(this.commonData.dialog.webstoreAuthDialog)}ngOnDestroy(){this.destroyed$.next(!0)}goHome(){var o=K(this.commonData.templateSettings.Details,"home_page_url");o.indexOf("http://")===-1&&o.indexOf("https://")===-1&&(o="http://"+o),window.location.href=o}getHTMLAttribute(o,t,n){if(t=="custom_header"){let c=j(o,t,n)}else return j(o,t,n)}loadForms(){let o=[],t={AppointmentId:this.appointmentId,ServiceId:this.serviceId,AppointmentGroupId:this.appGroupId};this.isClassType==="1"?(this.store.dispatch(new Ce(this.appGroupId)),this.store.dispatch(new B(this.appGroupId))):(this.store.dispatch(new P({AppointmentGroupId:this.appGroupId,Appointment:t,Appointments:o,reqdForms:0,UserId:this.userId,is_guest_print:this.showPrintButton})),this.store.dispatch(new ue({GuestId:this.userId,RequestType:2,AppointmentGroupId:this.appGroupId}))),this.store.dispatch(new W({isEditable:!0}))}onFormSelected(o){this.store.dispatch(new le(o))}switchFormViewMode(o){this.store.dispatch(new W(o))}updateForms(){this.isClassType==="1"?this.store.dispatch(new B(this.appGroupId)):this.store.dispatch(new P({reqdForms:0}))}closeFormDialog(){}};s.\u0275fac=function(t){return new(t||s)(u(fe),u(q),u(q),u(ge),u(De),u(_),u(ve),u(re),u(_e))},s.\u0275cmp=J({type:s,selectors:[["webstore-service-custom-form"]],viewQuery:function(t,n){if(t&1&&(E(we,5),E(Ne,5)),t&2){let c;V(c=O())&&(n.webstoreAuth=c.first),V(c=O())&&(n.loginframe=c.first)}},inputs:{primarycolor:"primarycolor",service:"service"},features:[X],decls:5,vars:2,consts:[[2,"height","100%","background-color","white"],[1,"col-md-1"],[1,"col-md-10"],["class","logo","style","padding-left: 5%;",4,"ngIf"],["style","height:92vh;background-color: white;","role","main",4,"ngIf"],[1,"logo",2,"padding-left","5%"],[1,"navbar-brand",3,"href"],[1,"img-fluid",3,"src","alt","title"],["role","main",2,"height","92vh","background-color","white"],["class","h-100",4,"ngIf"],[4,"ngIf"],[1,"h-100"],["class","centeralign jumbotron mt-0",4,"ngIf"],[1,"h-100","flex-column--center"],[1,"centeralign","jumbotron","mt-0"],[1,"generic-loader"],["role","alert",1,"text-center","timeslot-loader-message"],["role","alert","aria-live","assertive",1,"text-center","service-loader-message"],[3,"closeDialog","onSelectForm","onSwitchMode","onUpdateForms","data","userId","commonData","constants","showCloseButton","onlyData","showPrintButton"],["role","button","tabindex","0",1,"soft-double--top","soft--left","fa","fa-times","fa-2x","pointer",3,"click"],["role","alert","aria-live","assertive",1,"error-banner","text-center","timeslot-loader-message"],["role","alert","aria-live","assertive",1,"text-center","timeslot-loader-message"]],template:function(t,n){t&1&&(a(0,"div",0),C(1,"div",1),a(2,"div",2),v(3,Ee,5,17,"div",3),d()(),v(4,We,5,4,"div",4)),t&2&&(r(3),l("ngIf",!!n.get
1SettingsValues(n.commonData==null||n.commonData.templateSettings==null?null:n.commonData.templateSettings.Details,"header_img_url")||n.constants.ORGANIZATION_SETTINGS.logoURL),r(),l("ngIf",(n.commonData==null?null:n.commonData.guest.isGuestLoggedIn)&&n.userId==(n.commonData==null||n.commonData.guest==null?null:n.commonData.guest.Id)||!n.constants.ORGANIZATION_SETTINGS.protectServiceData))},dependencies:[oe,Fe,pe],encapsulation:2});let i=s;return i})();var Be=[{path:"",pathMatch:"full",component:w},{path:":requestId",pathMatch:"full",component:w}];var be=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=y({type:s}),s.\u0275inj=x({imports:[$.forChild(Be),$]});let i=s;return i})();var Ct=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=y({type:s,bootstrap:[w]}),s.\u0275inj=x({providers:[se(ne())],imports:[ie,xe,be,Se,Ie]});let i=s;return i})();export{Ct as WebstoreServiceCustomFormModule};
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.