1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[12084],{12084:(it,p,o)=>{o.r(p),o.d(p,{UserPassesModule:()=>ot});var d=o(72200),h=o(49189),m=o(38132),t=o(73664),C=o(30720),v=o(69915),f=o(60152),P=o(26742),_=o(25615),u=o(84412),T=o(18530),b=o(84572),y=o(23294),U=o(25558),x=o(96354),$=o(31943),D=o(88141),S=o(99437),j=o(7673),F=o(56977),r=o(2615),I=o(82966),G=o(15449),M=o(69415),V=o(85340),B=o(10957),N=o(68018);const R=["segmentContent"],X=()=>["Opps!","A\xfan no has adquirido pases"],A=()=>["Opps!","module.store.no_passes_available"],g=(s,l)=>l.id;function H(s,l){1&s&&t.nrm(0,"app-skeleton-block")}function z(s,l){if(1&s){const e=t.RV6();t.j41(0,"app-list-item",11)(1,"app-clupik-button",12),t.bIt("click",function(){const i=r.eBV(e).$implicit,a=t.XpG(4);return r.Njj(a.goToPass(i.product.id))}),t.k0s()()}if(2&s){const e=l.$implicit,n=t.XpG(4);t.Y8G("isCustom","INA"!==e.product.state)("image",n.getPassimage(e.product.id))("mainTitle",e.product.title)("subtitle",e.product.description)("hasBorder",!0)("hasHover","INA"!==e.product.state)("isCollapsed",!1)}}function E(s,l){if(1&s&&t.Z7z(0,z,2,7,"app-list-item",11,g),2&s){const e=t.XpG(2);t.Dyx(e.data)}}function k(s,l){1&s&&t.nrm(0,"app-empty-space",10),2&s&&t.Y8G("textArray",t.lJ4(2,X))("noButton",!0)}function L(s,l){if(1&s&&t.nVh(0,E,2,0)(1,k,1,3,"app-empty-space",10),2&s){const e=t.XpG();t.vxM(e.data.length>0?0:1)}}function O(s,l){1&s&&t.nrm(0,"app-skeleton-block")}function Y(s,l){if(1&s){const e=t.RV6();t.j41(0,"app-list-item",13),t.bIt("listAction",function(){const i=r.eBV(e).$implicit,a=t.XpG(4);return r.Njj(a.goToPass(i.product.id))}),t.nrm(1,"app-clupik-state-tag",14),t.j41(2,"app-clupik-button",15),t.bIt("click",function(){const i=r.eBV(e).$implicit,a=t.XpG(4);return r.Njj(a.goToPass(i.product.id))}),t.k0s()()}if(2&s){const e=l.$implicit,n=t.XpG(4);t.Y8G("isCustom",!0)("image",n.getPassimage(e.product.id))("mainTitle",e.product.title)("subtitle",e.product.description)("hasBorder",!0)("hasHover",!0)("isCollapsed",!1),t.R7$(),t.Y8G("state","info")("value",n.getPassPrice(null==e.product?null:e.product.minPrice))("icon",null)("centered",!0)("isDisabled",!1)}}function J(s,l){if(1&s&&t.Z7z(0,Y,3,12,"app-list-item",11,g),2&s){const e=t.XpG(2);t.Dyx(e.data)}}function Q(s,l){1&s&&t.nrm(0,"app-empty-space",10),2&s&&t.Y8G("textArray",t.lJ4(2,A))("noButton",!0)}function Z(s,l){if(1&s&&t.nVh(0,J,2,0)(1,Q,1,3,"app-empty-space",10),2&s){const e=t.XpG();t.vxM(e.data.length>0?0:1)}}function K(s,l){if(1&s){const e=t.RV6();t.j41(0,"div",1)(1,"ion-segment",2),t.bIt("ionChange",function(i){r.eBV(e);const a=t.XpG();return r.Njj(a.segmentChanged(i))}),t.j41(2,"ion-segment-button",3)(3,"ion-label"),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"ion-segment-button",4)(7,"ion-label"),t.EFF(8),t.nI1(9,"translate"),t.k0s()()(),t.j41(10,"div",5,0),t.bIt("scroll",function(i){r.eBV(e);const a=t.XpG();return r.Njj(a.onScroll(i))}),t.j41(12,"ion-segment-view")(13,"ion-segment-content",6)(14,"div",7),t.nVh(15,H,1,0,"app-skeleton-block")(16,L,2,1),t.k0s()(),t.j41(17,"ion-segment-content",8)(18,"div",9),t.nVh(19,O,1,0,"app-skeleton-block")(20,Z,2,1),t.k0s()()()()()}if(2&s){const e=t.XpG();t.R7$(4),t.JRh(t.bMT(5,6,"global.common.adquired")),t.R7$(4),t.JRh(t.bMT(9,8,"global.common.available")),t.R7$(2),t.Aen("--segment-distance:"+e.segmentDistanceToTop+"px;"),t.R7$(5),t.vxM(e.isLoading?15:16),t.R7$(4),t.vxM(e.isLoading?19:20)}}function W(s,l){1&s&&(t.j41(0,"div",1),t.nrm(1,"app-skeleton-block"),t.k0s())}const w=[{path:"",component:(()=>{class s{globalVars;_appService;_clubsService;_apiStore;_imagesService;segmentContent;paginator$=new u.t(1);type$=new u.t("purchased");destroy$=new T.B;searchForm$;loading=!0;limit=10;segmentDistanceToTop=0;isLoading=!1;hasMoreData=!0;searchConfig={search:(e,n)=>this._apiStore.getUserPasses(e,this.limit,n),mapeo:e=>e};constructor(e,n,i,a,c){this.globalVars=e,this._appService=n,this._clubsService=i,this._apiStore=a,this._imagesService=c}ngAfterViewInit(){this.globalVars.navbarTop.title="global.navigation.contents",this.setupDataStream()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setupDataStream(){this.searchForm$=(0,b.z)([this.type$,this.paginator$]).pipe((0,y.F)((e,n)=>e[0]===n[0]&&e[1]===n[1]),(0,U.n)(([e,n])=>(this.isLoading=!0,this.searchConfig.search(e,n).pipe((0,x.T)(i=>({isFirstPage:1===n,data:i.data||[]})),(0,$.S)((i,a)=>{const c=a.isFirstPage?a.data:[...i.data,...a.data];return this.hasMoreData=a.data.length===this.limit,this.isLoading=!1,{loading:!1,data:c.map(at=>this.searchConfig.mapeo(at))}},{loading:!1,data:[]}),(0,D.M)(()=>{requestAnimationFrame(()=>this.calculateContainerHeight())}),(0,S.W)(i=>(console.error("Error loading passes:",i),this.isLoading=!1,this.hasMoreData=!1,(0,j.of)({loading:!1,data:[]})))))),(0,F.Q)(this.destroy$))}onScroll(e){const n=e.target;n.scrollHeight-n.scrollTop-n.clientHeight<200&&!this.isLoading&&this.hasMoreData&&this.paginator$.next(this.paginator$.value+1)}onResize(){this.calculateContainerHeight()}calculateContainerHeight(){if(this.segmentContent){const e=this._clubsService.getDocumentPropertyValue("--main-nav-top").split("px")[0]||60,n=this._clubsService.getDocumentPropertyValue("--admin-nav-top").split("px")[0]||60,a=document.querySelector(".segment-content").getBoundingClientRect(),c=window.scrollY+a.top+parseInt(String(e))+parseInt(String(n));this.segmentDistanceToTop=c}}segmentChanged(e){this.paginator$.next(1),this.type$.next(e.detail.value)}goToPass(e){this.globalVars.clupikNavigate("/store/product/"+e)}status={PAID:"success",PENDING:"default",NOTPAID:"danger",ERRORPAID:"danger",VOIDED:"danger",PENDINGCONFIRM:"default",REFUND:"info",REFUNDED:"info"};getChip(e){return e?{label:"module.accounting."+e?.transaction?.paymentStatus,class:this.status[e?.transaction?.paymentStatus]}:{label:"",class:"default"}}getPassPrice(e){return this.globalVars.getFormattedStringMoney(e)}getPassimage(e){return this._imagesService.getUrlProductImageThumbnail(e)}static \u0275fac=function(n){return new(n||s)(t.rXU(_.Y),t.rXU(v.d),t.rXU(f.X),t.rXU(C.d),t.rXU(P.M))};static \u0275cmp=t.VBU({type:s,selectors:[["app-user-passes"]],viewQuery:function(n,i){if
1(1&n&&t.GBs(R,5,t.aKT),2&n){let a;t.mGM(a=t.lsd())&&(i.segmentContent=a.first)}},hostBindings:function(n,i){1&n&&t.bIt("resize",function(){return i.onResize()},t.tSv)},standalone:!1,decls:3,vars:3,consts:[["segmentContent",""],[1,"dashboard","public-dashboard","white"],["value","purchased","mode","ios",3,"ionChange"],["value","purchased","content-id","purchased"],["value","available","content-id","available"],[1,"segment-content",3,"scroll"],["id","purchased"],[1,"purchased"],["id","available"],[1,"available"],["size","sm","svgImage","file-searching",3,"textArray","noButton"],["imageType","club","mainTitleClass","h5","subtitleClass","md",3,"isCustom","image","mainTitle","subtitle","hasBorder","hasHover","isCollapsed"],["type","button","config","outlined","size","sm","label","global.common.show_detail",3,"click"],["imageType","club","mainTitleClass","h5","subtitleClass","md",3,"listAction","isCustom","image","mainTitle","subtitle","hasBorder","hasHover","isCollapsed"],["size","sm",3,"state","value","icon","centered","isDisabled"],["type","button","config","outlined","size","sm","label","module.store.buy",3,"click"]],template:function(n,i){if(1&n&&(t.nVh(0,K,21,10,"div",1),t.nI1(1,"async"),t.vZN(2,W,2,0,"div",1)),2&n){let a;t.vxM((a=t.bMT(1,1,i.searchForm$))?0:2,a)}},dependencies:[I.K,G.P,M.p,V.U,B.F,d.Jj,N.D9],styles:[".segment-content[_ngcontent-%COMP%]{padding-top:24px}"]})}return s})()}];let q=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=r.G2t({imports:[m.iI.forChild(w),m.iI]})}return s})();var tt=o(66124),et=o(7030),st=o(21867),nt=o(37808);let ot=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=t.$C({type:s});static \u0275inj=r.G2t({imports:[d.MD,h.G,tt.M,et.g,st.v,nt.c,q]})}return s})()}}]);
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.