1import{$ as d,$k as k,Cb as p,De as U,Fa as l,Fd as nt,Ga as L,Gb as f,Ge as st,Je as at,Jm as mt,L as v,La as r,Lz as ht,Ma as u,Mm as P,Na as y,Nm as lt,Oa as Q,Pa as q,R as I,Ra as x,Sm as ct,Tb as J,Tm as z,V as B,W as S,Wa as F,Xa as m,_ as Z,_k as M,a as j,aa as g,ab as H,b as $,eb as A,ef as W,ex as ft,fb as N,fc as X,gb as E,gd as O,hd as et,ib as D,jb as R,jc as Y,kb as V,kc as tt,ll as rt,ln as ut,lq as dt,ma as T,mq as gt,n as b,qa as a,ra as h,sc as w,tc as G,wd as ot,xa as _,yd as it,yq as pt}from"./chunk-6DJMQD4I.js";var Dt=["iframeform"];function Ct(o,i){if(o&1&&(r(0,"div",5)(1,"div")(2,"a",6),y(3,"img",7),p(4,"getLocalizedValues"),u()()()),o&2){let t=m();a(),L("text-align","left"),a(),l("href",t.getHTMLAttribute(t.commonData==null||t.commonData.templateSettings==null?null:t.commonData.templateSettings.Elements,"header_goto_url","href"),T),a(),L("height",t.constants.ORGANIZATION_SETTINGS.logoURL?"":"64px")("max-width",t.constants.ORGANIZATION_SETTINGS.logoURL?"":"185px"),H("alt","",t.constants.ORGANIZATION_SETTINGS.name," ",f(4,12,"Logo","Logo",t.commonclassKey,t.registerContextChangeDetectionFlag),""),l("src",t.getSettingsValues(t.commonData.templateSettings==null?null:t.commonData.templateSettings.Details,"header_img_url")?t.getSettingsValues(t.commonData.templateSettings==null?null:t.commonData.templateSettings.Details,"header_img_url"):t.constants.ORGANIZATION_SETTINGS.logoURL,T)("title",t.constants.ORGANIZATION_SETTINGS.name)}}function vt(o,i){if(o&1&&(r(0,"div",14),y(1,"div",15),r(2,"div",17),D(3),p(4,"getLocalizedValues"),u()()),o&2){let t=m(3);a(3),R(f(4,1," Please wait...","PleaseWait",t.serviceClassKey,t.registerContextChangeDetectionFlag))}}function It(o,i){if(o&1&&(r(0,"div",11),_(1,vt,5,6,"div",12),r(2,"div",13)(3,"div",14),y(4,"div",15)(5,"br"),r(6,"div",16),D(7),p(8,"getLocalizedValues"),u()()()()),o&2){let t=m(2);a(),l("ngIf",t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.isFetchingUrlParams),a(6),R(f(8,2," Please wait...","PleaseWait",t.serviceClassKey,t.registerContextChangeDetectionFlag))}}function St(o,i){if(o&1){let t=x();Q(0),r(1,"webstore-forms",18),F("closeDialog",function(){d(t);let e=m(2);return g(e.closeFormDialog())})("onSelectForm",function(e){d(t);let s=m(2);return g(s.onFormSelected(e))})("onSwitchMode",function(e){d(t);let s=m(2);return g(s.switchFormViewMode(e))})("onUpdateForms",function(){d(t);let e=m(2);return g(e.updateForms())}),u(),q()}if(o&2){let t=m(2);a(),l("data",t.data)("userId",t.userId)("commonData",t.commonData)("constants",t.constants)("showCloseButton",!1)("onlyData",t.onlyData)}}function xt(o,i){if(o&1){let t=x();r(0,"div",11)(1,"div",19),F("click",function(){d(t);let e=m(2);return g(e.closeFormDialog())}),r(2,"div",20),D(3),p(4,"getLocalizedValues"),u()()()}if(o&2){let t=m(2);a(3),V(" ",f(4,1,"Unable to Fetch Forms, Please try again...","UnableToFetchForms",t.serviceClassKey,t.registerContextChangeDetectionFlag)," ")}}function Ft(o,i){if(o&1){let t=x();r(0,"div",11)(1,"div",19),F("click",function(){d(t);let e=m(2);return g(e.closeFormDialog())}),r(2,"div",21),D(3),p(4,"getLocalizedValues"),u()()()}if(o&2){let t=m(2);a(3),V(" ",f(4,1," No form is associated with this request.","NoFormsAssociated",t.commonClassKey,t.registerContextChangeDetectionFlag)," ")}}function wt(o,i){if(o&1&&(r(0,"div",8),_(1,It,9,7,"div",9)(2,St,2,6,"ng-container",10)(3,xt,5,6,"div",9)(4,Ft,5,6,"div",9),u()),o&2){let t=m();a(),l("ngIf",t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.isLoading),a(),l("ngIf",!(!(t.commonData==null||t.commonData.forms==null)&&t.commonData.forms.isFetchingUrlParams)&&!(!(t.commonData==null||t.commonData.forms==null)&&t.commonData.forms.isLoading)&&(t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.list.length)>0),a(),l("ngIf",t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.formsLoadFailed),a(),l("ngIf",!t.expiredLink&&!(!(t.commonData==null||t.commonData.forms==null)&&t.commonData.forms.isFetchingUrlParams)&&!(!(t.commonData==null||t.commonData.forms==null)&&t.commonData.forms.isLoading)&&(t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.list)&&(t.commonData==null||t.commonData.forms==null?null:t.commonData.forms.list.length)==0)}}var C=(()=>{let i=class i{constructor(n,e,s,c){this.store=n,this.activatedRoute=e,this.zenDialogService=s,this.actions$=c,this.unsubscribe$=new b,this.isDealsPageFromUrl=!1,this.destroyed$=new b,this.expiredLink=!1,this.registerContextChangeDetectionFlag=!1,this.commonClassKey=W.WebstoreCommon,this.serviceClassKey=W.WebstoreServiceCustomForm,this.setCurrencyValueFormat=rt,this.setRegisterContextChangeDetectionFlag=()=>{this.registerContextChangeDetectionFlag=!0},document.getElementById("loadingImgDiv")&&(document.getElementById("loadingImgDiv").style.display="none"),this.commonData$=this.store.select("webstoreCommonState"),this.commonData$.pipe(v(this.destroyed$)).subscribe(K=>{this.commonData=K})}ngOnInit(){this.actions$.pipe(z(G.SET_CONTEXT_DATA),v(this.unsubscribe$)).subscribe(n=>{this.commonData.guest.isGuestLoggedIn&&this.loadLoyaltyForm()}),U(this.commonClassKey,this.setRegisterContextChangeDetectionFlag),U(this.serviceClassKey,this.setRegisterContextChangeDetectionFlag),this.actions$.pipe(z(G.GET_CUSTOM_URL_PARAMS_SUCCESS),v(this.unsubscribe$)).subscribe(n=>{let{payload:{guest_id:e,is_link_expired:s,user_token:c,requested_for:K}}=n;this.userId=e,!s&&(!this.commonData.guest.isGuestLoggedIn||this.constants.USER_ID&&e&&this.constants.USER_ID.toLowerCase()===e.toLowerCase())?this.initLoyaltyForm(e,c):(this.expiredLink=!0,this.invokeSignIn())}),this.constants=new w().getConstants(),this.store.dispatch(new nt({fetchToken:!this.constants.ORGANIZATION_SETTINGS.protectLoyaltyFormData}))}ngOnChanges(){}ngOnDestroy(){this.destroyed$.next(!0)}goHome(){var n=k(this.commonData.templateSettings.Details,"home_page_url");n.indexOf("http://")===-1&&n.indexOf("https://")===-1&&(n="http://"+n),window.location.href=escape(n)}getHTMLAttribute(n,e,s){if(e==="custom_header"){let c=M(n,e,s)}else return M(n,e,s)}initLoyaltyForm(n,e){if(this.constants=new w().getConstants(),this.userId||(this.userId=n),(!this.commonData.guest.isGuestLoggedIn||this.userId!==this.commonData.guest.Id)&&this.constants.ORGANIZATION_SETTINGS.protectLoyaltyFormData){if(this.zenDialogService.showDialog(this.commonData.dialog.webstoreAuthDialog),this.store.dispatch(new O({fromFormsComponent:!0})),this.commonData.guest.Id&&this.userId!==this.commonData.guest.Id){var s=st("You do not have access to this form, Please use appropriate user credentials","FormAccessFailureMessage",this.commonClassKey[0]);this.store.dispatch(new et({global:s}))}}else this.commonData.guest.isGuestLoggedIn&&this.constants.USER_ID&&this.constants.USER_ID===this.userId?this.loadLoyaltyForm():(new w().setConstants($(j({},this.constants),{WEB_API_TOKEN:e})),window.globalJson.webApiToken=e,this.loadLoyaltyForm())}loadLoyaltyForm(){this.store.dispatch(new ot({UserId:this.userId})),this.store.dispatch(new it({isEditable:!0}))}invokeSignIn(){this.zenDialogService.showDialog(this.commonData.dialog.webstoreAuthDialog),this.store.dispatch(new O({fromFormsComponent:!0}))}getSettingsValues(n,e){return k(n,e)}};i.\u0275fac=function(e){return new(e||i)(h(lt),h(mt),h(ut),h(ct))},i.\u0275cmp=B({type:i,selectors:[["webstore-loyalty-custom-form"]],viewQuery:function(e,s){if(e&1&&(A(pt,5),A(Dt,5)),e&2){let c;N(c=E())&&(s.webstoreAuth=c.first),N(c=E())&&(s.loginframe=c.first)}},inputs:{primarycolor:"primarycolor"},features:[Z],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;",4,"ngIf"],[1,"logo",2,"padding-left","5%"],[1,"navbar-brand",3,"href"],[1,"img-fluid",3,"src","alt","title"],[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"],[1,"text-center","timeslot-loader-message"],[1,"text-center","service-loader-message"],[3,"closeDialog","onSelectForm","onSwitchMode","onUpdateForms","data","userId","commonData","constants","showCloseButton","onlyData"],[1,"soft-double--top","soft--left","fa","fa-times","fa-2x","pointer",3,"click"],["role","alert",1,"error-banner","text-center","timeslot-loader-message"],["role","alert",1,"text-center","timeslot-loader-message"]],template:function(e,s){e&1&&(r(0,"div",0),y(1,"div",1),r(2,"div",2),_(3,Ct,5,17,"div",3),u(),_(4,wt,5,4,"div",4),u()),e&2&&(a(3),l("ngIf",!!s.get
1SettingsValues(s.commonData==null||s.commonData.templateSettings==null?null:s.commonData.templateSettings.Details,"header_img_url")||s.constants.ORGANIZATION_SETTINGS.logoURL),a(),l("ngIf",(s.commonData==null?null:s.commonData.guest.isGuestLoggedIn)&&s.userId==(s.commonData==null||s.commonData.guest==null?null:s.commonData.guest.Id)||!s.constants.ORGANIZATION_SETTINGS.protectLoyaltyFormData))},dependencies:[J,ft,at],encapsulation:2});let o=i;return o})();var bt=[{path:"",pathMatch:"full",component:C},{path:":requestId",pathMatch:"full",component:C}];var yt=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=S({type:i}),i.\u0275inj=I({imports:[P.forChild(bt),P]});let o=i;return o})();var ee=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=S({type:i,bootstrap:[C]}),i.\u0275inj=I({providers:[Y(tt())],imports:[X,ht,yt,dt,gt]});let o=i;return o})();export{ee as WebstoreLoyaltyCustomFormModule};
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.