(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,t,n){e.exports=n("zUnb")},zUnb:function(e,t,n){"use strict";n.r(t);var i=n("jhN1"),o=n("fXoL"),r=n("tk/3"),c=n("A5z7"),s=n("NFeN"),a=n("kmnG"),l=n("tyNb"),d=n("LRne"),b=n("lJxs"),p=n("5+tZ");const u="/";let h="",g=(()=>{class e{constructor(e,t){this.httpClient=e,this.router=t}get AT(){return h}get profile(){return this.user}init(){const e=localStorage.getItem("AT");e&&(h=e)}validateIds(e){return this.httpClient.request("POST","/api/validateIds",{responseType:"json",body:{ids:e}}).pipe(Object(b.a)(e=>e))}activate(e){return this.httpClient.request("POST","/api/activate",{responseType:"json",body:{ac:e}}).pipe(Object(b.a)(e=>(e&&e.access_token&&(h=e.access_token,localStorage.setItem("AT",e.access_token)),e)))}setpwd(e,t){return this.httpClient.request("POST","/api/setpwd",{responseType:"json",body:{ac:e,password:t}}).pipe(Object(b.a)(e=>(e&&e.access_token&&(h=e.access_token,localStorage.setItem("AT",e.access_token)),e)))}register(e,t){return this.httpClient.request("POST","/api/register",{responseType:"json",body:e}).pipe(Object(b.a)(e=>(e&&e.access_token&&(h=e.access_token,localStorage.setItem("AT",e.access_token)),e)),Object(p.a)(e=>t?this.uploadFile(`/api/register/${e.uuid}/profile`,t):Object(d.a)(e)))}login(e){return this.httpClient.request("POST","/api/login",{responseType:"json",body:e}).pipe(Object(b.a)(e=>(e&&e.access_token&&(h=e.access_token,localStorage.setItem("AT",e.access_token)),e)))}logout(){return this.httpClient.request("POST","/api/logout",{responseType:"json"}).pipe(Object(b.a)(e=>(localStorage.removeItem("AT"),this.user=null,e)))}getProfile(){return this.httpClient.request("GET","/api/profile",{responseType:"json"}).pipe(Object(b.a)(e=>(this.user=e,e&&!0!==e.initiated&&this.router.navigate(["/app/"],{queryParams:{welcome:!0}}),e)))}recover(e){return this.httpClient.request("POST","/api/recover",{responseType:"json",body:{email:e}}).pipe(Object(b.a)(e=>e))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b),o.Wb(l.f))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var m=n("ofXK");const f=function(){return["/app"]};function v(e,t){1&e&&(o.Sb(0,"div",1),o.Sb(1,"h1"),o.zc(2,"Registro exitoso!"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Tu usuario ha sido activado exitosamente"),o.Rb(),o.Sb(5,"div",2),o.Sb(6,"button",3),o.zc(7,"Comienza ya"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(6),o.kc("routerLink",o.lc(1,f)))}const _=function(){return["/login"]};function S(e,t){1&e&&(o.Sb(0,"div",1),o.Sb(1,"h1"),o.zc(2,"Registro fallido"),o.Rb(),o.Sb(3,"p"),o.zc(4,"No ha sido posible activar tu usuario. Intenta nuevamente con la opci\xf3n recuperar contrase\xf1a"),o.Rb(),o.Sb(5,"div",2),o.Sb(6,"a",4),o.zc(7,"Volver"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(6),o.kc("routerLink",o.lc(1,_)))}let C=(()=>{class e{constructor(e,t){this.route=e,this.authService=t,this.success=!0,this.ac=""}ngOnInit(){this.route.queryParams.subscribe(e=>{this.ac=e.ac,this.ac?this.authService.activate(this.ac).subscribe(e=>{},e=>{this.success=!1}):this.success=!1})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(g))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-activate-user"]],decls:2,vars:2,consts:[["class","card2",4,"ngIf"],[1,"card2"],[1,"btn-section"],["type","submit",1,"btn","btn--large","btn--tertiary",3,"routerLink"],[1,"link",3,"routerLink"]],template:function(e,t){1&e&&(o.yc(0,v,8,2,"div",0),o.yc(1,S,8,2,"div",0)),2&e&&(o.kc("ngIf",t.success),o.Bb(1),o.kc("ngIf",!t.success))},directives:[m.l,l.g,l.i],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;top:50%;position:absolute;left:50%;transform:translate(-50%,-50%)}@media (max-width:480px){[_nghost-%COMP%]{width:90%}}.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{background:#fff;border:1px solid #d9d9d9;border-radius:15px;width:500px;min-height:700px;padding:28px 41px}@media (max-width:480px){.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{width:100%;padding:28px 30px}}.card2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:24px}.card2[_ngcontent-%COMP%]{min-height:180px}.forgot-password[_ngcontent-%COMP%]{display:block;margin-bottom:24px}.sign-in-google[_ngcontent-%COMP%]{float:right}.sign-in-google[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:220px}.btn-section[_ngcontent-%COMP%]{width:100%;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;align-content:space-around;justify-content:center;align-items:center}.btn-section[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin-top:16px}.aligned-bottom[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:space-around;justify-content:flex-end}"]}),e})();var x=n("3Pt+");let y=(()=>{class e{constructor(e){this.httpClient=e}selfShare(e,t){const n={};return n.cardId=e.defaultCardId,n.presentationId=e.id,n.selfShare=!0,n.selfShareUuid=t,this.saveShare(n,null,null).pipe(Object(p.a)(e=>{const n=e;n.state="sending";let i=[t];return this.updateShare(Object.assign(Object.assign({},n),{contacts:i,contactsEmails:[]})).pipe(Object(b.a)(e=>n))}))}getShares(){return this.httpClient.request("GET","/api/shares/",{responseType:"json"})}getShare(e){return this.httpClient.request("GET",`/api/shares/${e}`,{responseType:"json"})}getDeals(e,t=-1){return this.httpClient.request("GET",`/api/shares/deals?status=${e||""}&shareId=${t||-1}`,{responseType:"json"})}getReceivedDeals(){return this.httpClient.request("GET",`/api/shares/received_deals?status=${status||""}`,{responseType:"json"})}getDeal(e){return this.httpClient.request("GET",`/api/shares/deals/${e}`,{responseType:"json"})}deal(e,t={}){return this.httpClient.request("POST",`/api/shares/${e}/deal`,{body:t,responseType:"json"})}reject(e){return this.httpClient.request("POST",`/api/shares/${e}/reject`,{responseType:"json"})}getMetrics(){return this.httpClient.request("GET","/api/shares/metrics",{responseType:"json"})}getMessages(e){return this.httpClient.request("GET",`/api/shares/deals/${e}/messages`,{responseType:"json"})}addMessage(e,t){return this.httpClient.post(`/api/shares/deals/${e}/message`,{message:t},{})}updateShare(e){return!e||e&&!e.id?Object(d.a)({}):this.httpClient.patch(`/api/shares/${e.id}`,e,{})}saveShare(e,t,n){const i=e.selfShare?"/api/shares/self-share":"/api/shares/"+(e&&e.id?`/${e.id}/`:""),o={};let r;r=e&&e.id?this.httpClient.put(i,e,o):this.httpClient.post(i,e,o);let c=null;return r.pipe(Object(p.a)(n=>(c=(e=n)&&e.id?e.id:null,t?this.uploadFile(`/api/shares/${c}/contacts`,t).pipe(Object(b.a)(t=>e)):Object(d.a)(e))),Object(p.a)(t=>n?this.uploadFile(`/api/shares/${c}/pdf`,n).pipe(Object(b.a)(t=>e)):Object(d.a)(t)))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function R(e,t){1&e&&o.Ob(0)}let P=(()=>{class e{constructor(){this.contentTemplate=null}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-white-card"]],contentQueries:function(e,t,n){if(1&e&&o.Fb(n,o.M,1),2&e){let e;o.oc(e=o.ac())&&(t.contentTemplate=e.first)}},decls:1,vars:1,consts:[[4,"ngTemplateOutlet"]],template:function(e,t){1&e&&o.yc(0,R,1,0,"ng-container",0),2&e&&o.kc("ngTemplateOutlet",t.contentTemplate)},directives:[m.p],styles:["[_nghost-%COMP%]{background:#fff;border-radius:15px;min-height:100px;padding:24px;display:block;box-shadow:0 2px 0 rgba(0,0,0,.050980392156862744)}[_nghost-%COMP%] h4[_ngcontent-%COMP%]{color:#3a5081}"]}),e})();function k(e,t){1&e&&o.Nb(0,"img",6)}function w(e,t){if(1&e&&o.Nb(0,"img",7),2&e){const e=o.dc(3);o.kc("src",e.contact.profileUri,o.tc)}}function O(e,t){if(1&e&&(o.Sb(0,"div",1),o.Sb(1,"div",2),o.yc(2,k,1,0,"img",3),o.yc(3,w,1,1,"img",4),o.Rb(),o.Sb(4,"div",5),o.Sb(5,"h4"),o.zc(6),o.Rb(),o.Sb(7,"small"),o.zc(8),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(2),o.kc("ngIf",!e.contact.profileUri),o.Bb(1),o.kc("ngIf",e.contact.profileUri),o.Bb(3),o.Ac(e.contact.name+" "+e.contact.lastname),o.Bb(2),o.Ac(e.contact.username)}}function M(e,t){if(1&e&&o.yc(0,O,9,4,"div",0),2&e){const e=o.dc();o.kc("ngIf",e.contact&&e.contact.id)}}let I=(()=>{class e{constructor(){this.contact={}}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-customer-card-simple"]],inputs:{contact:"contact"},decls:2,vars:0,consts:[["class","customer-card-simple",4,"ngIf"],[1,"customer-card-simple"],[1,"customer-card-simple__profile-container"],["src","/assets/images/user-placeholder.png",4,"ngIf"],[3,"src",4,"ngIf"],[1,"customer-card-simple__profile-details"],["src","/assets/images/user-placeholder.png"],[3,"src"]],template:function(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,M,1,1,"ng-template"),o.Rb())},directives:[P,m.l],styles:["[_nghost-%COMP%]{position:relative}[_nghost-%COMP%] app-white-card[_ngcontent-%COMP%]{min-height:50px;padding:12px 24px}[_nghost-%COMP%] .customer-card-simple[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;grid-gap:20px}[_nghost-%COMP%] .customer-card-simple__profile-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden}[_nghost-%COMP%] .customer-card-simple__profile-details[_ngcontent-%COMP%]{color:#3a5081}[_nghost-%COMP%] .customer-card-simple__profile-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;margin-top:0;color:#3a5081}"]}),e})();var B=n("xgIS"),z=n("1G5W");let N=(()=>{class e{constructor(e){this.elementRef=e}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.l))},e.\u0275dir=o.Hb({type:e,selectors:[["","appFreeDraggingHandle",""]]}),e})(),q=(()=>{class e{constructor(e,t){this.elementRef=e,this.document=t,this.subscriptions=[],this.DEFAULT_DRAGGING_BOUNDARY_QUERY="body",this._initialX=0,this._initialY=0,this.initialY=0,this.boundaryQuery=this.DEFAULT_DRAGGING_BOUNDARY_QUERY,this.disableDragging=!1,this.positionChanged=new o.n}set initialXY(e){e&&(!e||void 0!==e.currentX&&void 0!==e.currentY)&&(this._initialX=e.currentX,this._initialY=e.currentY,this.element&&(this.element.style.transform="translate3d("+this._initialX+"px, "+this._initialY+"px, 0)"))}set dimensionsChangedEmitter(e){e.subscribe(()=>{this.disableDragging||(this.minBoundY=this.draggingBoundaryElement.offsetTop,this.maxBoundY=this.minBoundY+this.draggingBoundaryElement.offsetHeight-this.element.offsetHeight)})}ngAfterViewInit(){var e,t;if(this.draggingBoundaryElement=this.document.querySelector(this.boundaryQuery),!this.draggingBoundaryElement)throw new Error("Couldn't find any element with query: "+this.boundaryQuery);this.element=this.elementRef.nativeElement,this.handleElement=(null===(t=null===(e=this.handle)||void 0===e?void 0:e.elementRef)||void 0===t?void 0:t.nativeElement)||this.element,this.initDrag(),this.element&&this.element.style&&(this.element.style.transform="translate3d("+this._initialX+"px, "+this._initialY+"px, 0)")}initDrag(){const e=Object(B.a)(this.handleElement,"mousedown"),t=Object(B.a)(this.document,"mouseup"),n=Object(B.a)(this.document,"mousemove").pipe(Object(z.a)(t));let i,o,r,c=this._initialX?this._initialX:0,s=this._initialY?this._initialY:0;if(this.minBoundX=this.draggingBoundaryElement.offsetLeft,this.minBoundY=this.draggingBoundaryElement.offsetTop,this.maxBoundX=this.minBoundX+this.draggingBoundaryElement.offsetWidth-this.element.offsetWidth,this.maxBoundY=this.minBoundY+this.draggingBoundaryElement.offsetHeight-this.element.offsetHeight,this.element.style.transform="translate3d("+c+"px, "+s+"px, 0)",this.disableDragging)return;const a=e.subscribe(e=>{i=e.clientX-c,o=e.clientY-s,this.element.classList.add("free-dragging"),r=n.subscribe(e=>{e.preventDefault();const t=e.clientY-o;c=Math.max(this.minBoundX,Math.min(e.clientX-i,this.maxBoundX)),s=Math.max(this.minBoundY,Math.min(t,this.maxBoundY)),this.element.style.transform="translate3d("+c+"px, "+s+"px, 0)"})}),l=t.subscribe(()=>{i=c,o=s,this.element.classList.remove("free-dragging"),r&&r.unsubscribe(),this.positionChanged.emit({currentX:c,currentY:s})});this.subscriptions.push.apply(this.subscriptions,[a,r,l])}ngOnDestroy(){this.subscriptions.forEach(e=>null==e?void 0:e.unsubscribe())}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.l),o.Mb(m.d))},e.\u0275dir=o.Hb({type:e,selectors:[["","appFreeDragging",""]],contentQueries:function(e,t,n){if(1&e&&o.Fb(n,N,1),2&e){let e;o.oc(e=o.ac())&&(t.handle=e.first)}},inputs:{initialXY:"initialXY",initialY:"initialY",boundaryQuery:"boundaryQuery",dimensionsChangedEmitter:"dimensionsChangedEmitter",disableDragging:"disableDragging"},outputs:{positionChanged:"positionChanged"}}),e})();const F=["card"],j=["bar"],E=["content"],T=["position"],V=["videoEl"],L=["imageElEditableContainer"],D=["imageElContainer"],$=["logoParentContainer"];function A(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",27),o.Sb(1,"span",28),o.zc(2,"Tama\xf1o del logo:"),o.Rb(),o.Sb(3,"a",29),o.Zb("click",function(){return o.sc(e),o.dc().increaseLogoSize()}),o.zc(4,"+"),o.Rb(),o.Sb(5,"a",30),o.Zb("click",function(){return o.sc(e),o.dc().decreaseLogoSize()}),o.zc(6,"-"),o.Rb(),o.Rb()}}function Z(e,t){if(1&e&&(o.Sb(0,"div",31),o.Sb(1,"video",32,33),o.zc(3," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("src",e.video.previewSource,o.tc)("muted",e.muted)}}function U(e,t){if(1&e&&(o.Sb(0,"div",31),o.Sb(1,"video",32,33),o.zc(3," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("src",e.avatar.videoUri,o.tc)("muted",e.muted)}}function G(e,t){if(1&e&&o.Nb(0,"img",38),2&e){const e=o.dc(2);o.kc("src",e.logo.path,o.tc)}}function Q(e,t){if(1&e&&o.Nb(0,"img",38),2&e){const e=o.dc(2);o.kc("src",e.logo.previewSource,o.tc)}}function Y(e,t){1&e&&o.Nb(0,"img")}function W(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",34,35),o.Zb("positionChanged",function(t){return o.sc(e),o.dc().positionChangedCallback(t)}),o.yc(2,G,1,1,"img",36),o.yc(3,Q,1,1,"img",36),o.yc(4,Y,1,0,"img",37),o.Rb()}if(2&e){const e=o.dc();o.kc("dimensionsChangedEmitter",e.dimensionsChanged)("initialXY",e._logoPosition),o.Bb(2),o.kc("ngIf",e.logo&&e.logo.path),o.Bb(1),o.kc("ngIf",e.logo&&e.logo.previewSource),o.Bb(1),o.kc("ngIf",!e.logo||e.logo&&!e.logo.path&&!e.logo.previewSource)}}function H(e,t){if(1&e&&o.Nb(0,"img",38),2&e){const e=o.dc(2);o.kc("src",e.logo.path,o.tc)}}function X(e,t){if(1&e&&o.Nb(0,"img",38),2&e){const e=o.dc(2);o.kc("src",e.logo.previewSource,o.tc)}}function K(e,t){1&e&&o.Nb(0,"img")}function J(e,t){if(1&e&&(o.Sb(0,"div",39,40),o.yc(2,H,1,1,"img",36),o.yc(3,X,1,1,"img",36),o.yc(4,K,1,0,"img",37),o.Rb()),2&e){const e=o.dc();o.Bb(2),o.kc("ngIf",e.logo&&e.logo.path),o.Bb(1),o.kc("ngIf",e.logo&&e.logo.previewSource),o.Bb(1),o.kc("ngIf",!e.logo||e.logo&&!e.logo.path&&!e.logo.previewSource)}}function ee(e,t){if(1&e&&o.Nb(0,"img",38),2&e){const e=o.dc(2);o.kc("src",e.profile.path,o.tc)}}function te(e,t){1&e&&o.Nb(0,"img",43)}function ne(e,t){if(1&e&&(o.Sb(0,"div",41),o.yc(1,ee,1,1,"img",36),o.yc(2,te,1,0,"img",42),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",e.profile&&e.profile.path),o.Bb(1),o.kc("ngIf",e.profile&&!e.profile.path)}}const ie=function(e){return{color:e}};function oe(e,t){if(1&e&&(o.Sb(0,"div",20),o.Sb(1,"a",21),o.Nb(2,"i",44),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("href",e.profile.website,o.tc)("ngStyle",o.mc(2,ie,e.iconColor))}}function re(e,t){1&e&&o.Nb(0,"i",48)}function ce(e,t){1&e&&o.Nb(0,"i",49)}function se(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",45),o.Zb("click",function(t){return o.sc(e),o.dc().toggleSound(t)}),o.yc(1,re,1,0,"i",46),o.yc(2,ce,1,0,"i",47),o.Rb()}if(2&e){const e=o.dc();o.kc("ngStyle",o.mc(3,ie,e.iconColor)),o.Bb(1),o.kc("ngIf","muted"===e.muted),o.Bb(1),o.kc("ngIf","muted"!==e.muted)}}let ae=(()=>{class e{constructor(e){this.renderer=e,this.muted="muted",this.dimensionsChanged=new o.n,this.dimensionsInitiated=!1,this._logoPosition={currentX:0,currentY:0},this._logoScale=1,this.editable=!1,this.fullFg=!1,this.iconColor="#1E192F",this.bgColor="#ADD8E6",this.fontColor="#ADD8E6",this.barColor="#FFFFFF",this.profile={path:"../../../assets/images/baseball--player.png",name:"Camilo",lastname:"G\xf3mez",position:"Gerente"},this.logoPropertiesChanged=new o.n}set logoScale(e){this._logoScale=e,this.setLogoSize()}set logoPosition(e){this._logoPosition=e}set card(e){this._card=e,e&&(e.avatar&&(this.avatar=e.avatar),this.profile={name:e.name,lastname:e.lnames,position:e.position,phone:e.cellphone,website:e.website,email:e.email,path:"../../../assets/images/baseball--player.png"},this.logo=e&&e.logoPath?{path:u+e.logoPath}:null,this.video=e&&e.videoUri?{previewSource:e.videoUri}:e&&e.videoPath?{previewSource:u+e.videoPath}:null,this.logoScale=e&&e.logoScale?e.logoScale:this.logoScale,this._logoPosition={percWidth:e&&e.logoXPosition?e.logoXPosition:0,percHeight:e&&e.logoYPosition?e.logoYPosition:0},this.barColor=e&&e.barColor?e.barColor:this.barColor,this.fontColor=e&&e.bgColor?e.bgColor:this.bgColor,this.iconColor=e&&e.iconColor?e.iconColor:this.iconColor)}ngOnInit(){}ngAfterViewInit(){this.calc(),this.setLogoSize()}onResize(e){this.calc()}positionChangedCallback(e){var t;if(e.currentX=e.currentX?e.currentX:0,e.currentY=e.currentY?e.currentY:0,this._logoPosition=e,!this.logoParentContainer)return;const n=null===(t=this.logoParentContainer)||void 0===t?void 0:t.nativeElement,i=e.currentY/n.offsetHeight;this._logoPosition.percWidth=e.currentX/n.offsetWidth,this._logoPosition.percHeight=i,this.emitLogoProperties()}calc(){if(this.elementView&&(this.contentWidth=this.elementView.nativeElement.offsetWidth,this.fullFg&&(this.contentWidth=this.contentWidth?this.contentWidth+48:this.contentWidth,this.renderer.setStyle(this.elementView.nativeElement,"margin-left","-24px"),this.renderer.setStyle(this.elementView.nativeElement,"margin-right","-24px"),this.renderer.setStyle(this.elementView.nativeElement,"margin-top","-24px"),this.renderer.setStyle(this.elementView.nativeElement,"width","calc(100% + 48px)")),this.contentWidth&&(this.contentHeight=Math.round(.63*this.contentWidth),this.fontSize=this.contentWidth/16/24,this.renderer.setStyle(this.elementView.nativeElement,"height",`${this.contentHeight}px`))),this.elementBar&&this.fontSize&&this.contentWidth){this.renderer.setStyle(this.elementBar.nativeElement,"width",.94*this.contentWidth+"px"),this.renderer.setStyle(this.elementBar.nativeElement,"margin-left",.03*this.contentWidth+"px"),this.renderer.setStyle(this.elementBar.nativeElement,"margin-right",.03*this.contentWidth+"px");const e=this.elementBar.nativeElement.children[0].children[1];this.renderer.setStyle(e,"font-size",`${this.fontSize}rem`),this.renderer.setStyle(e,"margin-left",`${this.fontSize}rem`),this.renderer.setStyle(e,"margin-right",`${this.fontSize}rem`);let t=0;for(let n of e.children)this.renderer.setStyle(n,"margin-right",t<4?`${this.fontSize}rem`:1.6*this.fontSize+"rem"),t++}if(this.elementContent&&this.elementPosition&&this.fontSize&&this.contentWidth&&(this.renderer.setStyle(this.elementContent.nativeElement,"font-size",`${this.fontSize}rem`),this.renderer.setStyle(this.elementContent.nativeElement,"line-height",`${this.fontSize}rem`),this.renderer.setStyle(this.elementPosition.nativeElement,"font-size",.7*this.fontSize+"rem"),this.renderer.setStyle(this.elementPosition.nativeElement,"line-height",.7*this.fontSize+"rem")),setTimeout(()=>{this.dimensionsChanged.emit(!0)},1e3),this._logoPosition&&(!this._logoPosition||null!==this._logoPosition.percWidth&&null!==this._logoPosition.percHeight))if(this.logoParentContainer&&this.imageEl){const e=this.logoParentContainer.nativeElement,t=e.offsetHeight,n=this._logoPosition.percWidth*e.offsetWidth,i=this._logoPosition.percHeight*t;if(this._logoPosition=Object.assign(Object.assign({},this._logoPosition),{currentX:n,currentY:i}),!this.editable){const o=this.imageEl.nativeElement;this.renderer.setStyle(e,"height",`${t}px`),this.renderer.setStyle(o,"transform",`translate3d(${n}px, ${i}px, 0px`)}}else if(this.imageElEditable){const e=this.imageElEditable.nativeElement,t=this._logoPosition.percWidth*e.offsetWidth,n=this._logoPosition.percHeight*e.offsetHeight;this._logoPosition=Object.assign(Object.assign({},this._logoPosition),{currentX:t,currentY:n})}}toggleSound(e){e.stopPropagation(),this.muted="muted"===this.muted?"":"muted"}increaseLogoSize(){this._logoScale>=1.5||(this._logoScale=this._logoScale+.1,this.setLogoSize(),this.emitLogoProperties())}decreaseLogoSize(){this._logoScale<=.5||(this._logoScale=this._logoScale-.1,this.setLogoSize(),this.emitLogoProperties())}emitLogoProperties(){this.imageElEditable&&this.logoPropertiesChanged.emit({logoScale:this._logoScale,logoPosition:this._logoPosition})}setLogoSize(){this.imageElEditable&&this.renderer.setStyle(this.imageElEditable.nativeElement,"width",30*this._logoScale+"%"),this.imageEl&&this.renderer.setStyle(this.imageEl.nativeElement,"width",30*this._logoScale+"%")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.F))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-pp-card"]],viewQuery:function(e,t){if(1&e&&(o.Dc(F,1),o.Dc(j,1),o.Dc(E,1),o.Dc(T,1),o.Dc(V,1),o.Dc(L,1),o.Dc(D,1),o.Dc($,1)),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first),o.oc(e=o.ac())&&(t.elementBar=e.first),o.oc(e=o.ac())&&(t.elementContent=e.first),o.oc(e=o.ac())&&(t.elementPosition=e.first),o.oc(e=o.ac())&&(t.elementVideo=e.first),o.oc(e=o.ac())&&(t.imageElEditable=e.first),o.oc(e=o.ac())&&(t.imageEl=e.first),o.oc(e=o.ac())&&(t.logoParentContainer=e.first)}},hostBindings:function(e,t){1&e&&o.Zb("resize",function(e){return t.onResize(e)},!1,o.rc)},inputs:{logoScale:"logoScale",logoPosition:"logoPosition",editable:"editable",fullFg:"fullFg",iconColor:"iconColor",bgColor:"bgColor",fontColor:"fontColor",barColor:"barColor",logo:"logo",video:"video",avatar:"avatar",profile:"profile",card:"card"},outputs:{logoPropertiesChanged:"logoPropertiesChanged"},decls:34,vars:31,consts:[["class","logo-icons-controls",4,"ngIf"],[1,"pp-card__container","real"],["card",""],["class","pp-card__video",4,"ngIf"],[1,"pp-card__logo-container"],["logoParentContainer",""],["class","pp-card__logo grabbable","draggable","true","boundaryQuery",".pp-card__logo-container","appFreeDragging","",3,"dimensionsChangedEmitter","initialXY","positionChanged",4,"ngIf"],["class","pp-card__logo",4,"ngIf"],["class","pp-card__profile",4,"ngIf"],[1,"pp-card__content"],["content",""],[1,"pp-card__name"],[1,"pp-card__position"],["position",""],[1,"pp-card__bottom-bar"],["bar",""],[2,"position","relative","width","100%","height","100%"],[1,"pp-card__bottom-barBg"],["barBg",""],[1,"pp-card__bottom-bar_container"],[1,"pp-card__bottom-bar_item"],["target","_blank",3,"href","ngStyle"],["aria-hidden","true",1,"fa","fa-light","fa-phone"],["aria-hidden","true",1,"fa","fa-light","fa-envelope"],["class","pp-card__bottom-bar_item",4,"ngIf"],["aria-hidden","true",1,"fa","fa-light","fa-whatsapp"],["class","pp-card__bottom-bar_item sound muted-icon",3,"ngStyle","click",4,"ngIf"],[1,"logo-icons-controls"],[1,"disable-select"],[1,"btn","btn--tertiary","btn--small","left","disable-select",3,"click"],[1,"btn","btn--secondary","btn--small","disable-select",3,"click"],[1,"pp-card__video"],["width","500","height","350","autoplay","","loop","",3,"src","muted"],["videoEl",""],["draggable","true","boundaryQuery",".pp-card__logo-container","appFreeDragging","",1,"pp-card__logo","grabbable",3,"dimensionsChangedEmitter","initialXY","positionChanged"],["imageElEditableContainer",""],[3,"src",4,"ngIf"],[4,"ngIf"],[3,"src"],[1,"pp-card__logo"],["imageElContainer",""],[1,"pp-card__profile"],["src","/assets/images/baseball--player.png",4,"ngIf"],["src","/assets/images/baseball--player.png"],["aria-hidden","true",1,"fa","fa-light","fa-link"],[1,"pp-card__bottom-bar_item","sound","muted-icon",3,"ngStyle","click"],["class","fa fa-light fa-volume-off","aria-hidden","true",4,"ngIf"],["class","fa fa-light fa-volume-up","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa","fa-light","fa-volume-off"],["aria-hidden","true",1,"fa","fa-light","fa-volume-up"]],template:function(e,t){1&e&&(o.yc(0,A,7,0,"div",0),o.Sb(1,"div",1,2),o.yc(3,Z,4,2,"div",3),o.yc(4,U,4,2,"div",3),o.Sb(5,"div",4,5),o.yc(7,W,5,5,"div",6),o.yc(8,J,5,3,"div",7),o.Rb(),o.yc(9,ne,3,2,"div",8),o.Sb(10,"div",9,10),o.Sb(12,"div",11),o.zc(13),o.Rb(),o.Sb(14,"div",12,13),o.zc(16),o.Rb(),o.Rb(),o.Sb(17,"div",14,15),o.Sb(19,"div",16),o.Nb(20,"div",17,18),o.Sb(22,"div",19),o.Sb(23,"div",20),o.Sb(24,"a",21),o.Nb(25,"i",22),o.Rb(),o.Rb(),o.Sb(26,"div",20),o.Sb(27,"a",21),o.Nb(28,"i",23),o.Rb(),o.Rb(),o.yc(29,oe,3,4,"div",24),o.Sb(30,"div",20),o.Sb(31,"a",21),o.Nb(32,"i",25),o.Rb(),o.Rb(),o.yc(33,se,3,5,"div",26),o.Rb(),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.kc("ngIf",t.editable),o.Bb(1),o.xc("background-color",t.bgColor)("border-color",t.bgColor),o.Bb(2),o.kc("ngIf",t.video&&(t.video.previewSource||t.video.source)),o.Bb(1),o.kc("ngIf",!t.video&&t.avatar&&t.avatar.videoUri),o.Bb(3),o.kc("ngIf",t.editable),o.Bb(1),o.kc("ngIf",!t.editable),o.Bb(1),o.kc("ngIf",!t.video&&!t.avatar),o.Bb(1),o.xc("color",t.fontColor),o.Bb(3),o.Cc("",t.profile.name," ",t.profile.lastname,""),o.Bb(3),o.Ac(t.profile.position),o.Bb(4),o.xc("background-color",t.barColor),o.Bb(4),o.kc("href","tel: "+t.profile.phone,o.tc)("ngStyle",o.mc(25,ie,t.iconColor)),o.Bb(3),o.kc("href","mailto: "+t.profile.email,o.tc)("ngStyle",o.mc(27,ie,t.iconColor)),o.Bb(2),o.kc("ngIf",t.profile.website),o.Bb(2),o.kc("href","https://wa.me/"+t.profile.phone,o.tc)("ngStyle",o.mc(29,ie,t.iconColor)),o.Bb(2),o.kc("ngIf",t.video&&(t.video.previewSource||t.video.source)||t.avatar&&t.avatar.videoUri))},directives:[m.l,m.m,q],styles:[".pp-card[_ngcontent-%COMP%]{min-height:262px}.pp-card__container[_ngcontent-%COMP%]{border-radius:15px;overflow:hidden;margin-bottom:36px}.pp-card__container[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .real[_ngcontent-%COMP%]{width:100%}.real[_ngcontent-%COMP%]{position:relative;box-sizing:border-box;background:#add8e6;border:1px solid #add8e6}.real[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:inherit}.real[_ngcontent-%COMP%] .pp-card__video[_ngcontent-%COMP%]{position:absolute;top:0;left:0;overflow:hidden;height:100%}.real[_ngcontent-%COMP%] .pp-card__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{object-fit:fill;width:100%;height:100%}.real[_ngcontent-%COMP%] .pp-card__logo-container[_ngcontent-%COMP%]{width:60%;height:45%}.real[_ngcontent-%COMP%] .pp-card__logo[_ngcontent-%COMP%]{width:30%;position:absolute;top:8%;left:5%}.real[_ngcontent-%COMP%] .pp-card__profile[_ngcontent-%COMP%]{position:absolute;right:0;width:67%;bottom:-1%}.real[_ngcontent-%COMP%] .pp-card__content[_ngcontent-%COMP%]{position:absolute;left:5%;bottom:35%;font-size:2rem;color:#1e192f}.real[_ngcontent-%COMP%] .pp-card__content[_ngcontent-%COMP%] .pp-card__name[_ngcontent-%COMP%]{font-weight:700;margin-bottom:4px}.real[_ngcontent-%COMP%] .pp-card__content[_ngcontent-%COMP%] .pp-card__position[_ngcontent-%COMP%]{font-size:13px;font-weight:700}.real[_ngcontent-%COMP%] .pp-card__bottom-bar[_ngcontent-%COMP%]{position:absolute;bottom:20px;border-radius:9px;height:20%;font-size:22px}.real[_ngcontent-%COMP%] .pp-card__bottom-barBg[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%;margin:0!important;top:0;left:0;opacity:.6;border-radius:9px}.real[_ngcontent-%COMP%] .pp-card__bottom-bar_container[_ngcontent-%COMP%]{position:absolute;display:flex;flex-direction:row;flex-wrap:nowrap;align-content:space-around;justify-content:flex-start;align-items:center;height:100%;width:100%}.real[_ngcontent-%COMP%] .pp-card__bottom-bar_item[_ngcontent-%COMP%]{margin-right:20px;cursor:pointer;color:#1e192f}.real[_ngcontent-%COMP%] .pp-card__bottom-bar_item.sound[_ngcontent-%COMP%]{position:absolute;right:0;width:32px;margin-right:0}.logoNotEditable[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{position:absolute}.grabbable[_ngcontent-%COMP%]{cursor:move;cursor:grab;cursor:-webkit-grab}.grabbable[_ngcontent-%COMP%]:active{cursor:grabbing;cursor:-webkit-grabbing}.logo-icons-controls[_ngcontent-%COMP%]{margin-bottom:16px}.logo-icons-controls[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{margin-left:8px;margin-right:8px}"]}),e})();const le=["videoContainer"],de=["videoEl"],be=["thumbContainer"];function pe(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",7,8),o.Nb(2,"img",9),o.Sb(3,"div",10),o.Zb("click",function(){return o.sc(e),o.dc(2).play()}),o.Nb(4,"i",11),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(2),o.kc("src",e.thumbPath,o.tc)}}const ue=function(e){return{hidden:e}};function he(e,t){if(1&e&&(o.Sb(0,"div",1),o.yc(1,pe,5,1,"div",2),o.Sb(2,"div",3,4),o.Sb(4,"video",5,6),o.zc(6," Your browser does not support the video tag. "),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",!e.playing),o.Bb(1),o.kc("ngClass",o.mc(3,ue,!e.playing)),o.Bb(2),o.kc("src",e.videoPath,o.tc)}}function ge(e,t){if(1&e&&(o.Sb(0,"div",1),o.Sb(1,"div",12),o.Sb(2,"video",13),o.zc(3," Your browser does not support the video tag. "),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(2),o.kc("src",e.videoPath,o.tc)}}let me=(()=>{class e{constructor(e){this.renderer=e,this.autoplay=!1,this.playing=!1}ngOnInit(){this.thumbPath||(this.playing=!0)}play(){var e;try{this.playing=!0,null===(e=this.videoEl)||void 0===e||e.nativeElement.play()}catch(t){console.error(t)}}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.F))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-video-container"]],viewQuery:function(e,t){if(1&e&&(o.Dc(le,1),o.Dc(de,1),o.Dc(be,1)),2&e){let e;o.oc(e=o.ac())&&(t.videoContainer=e.first),o.oc(e=o.ac())&&(t.videoEl=e.first),o.oc(e=o.ac())&&(t.thumbContainer=e.first)}},inputs:{videoPath:"videoPath",thumbPath:"thumbPath",autoplay:"autoplay"},decls:2,vars:2,consts:[["class","video-container",4,"ngIf"],[1,"video-container"],["class","video-container__thumb",4,"ngIf"],[1,"video-container__video",3,"ngClass"],["videoContainer",""],["width","500","height","350","controls","",3,"src"],["videoEl",""],[1,"video-container__thumb"],["thumbContainer",""],[3,"src"],[1,"video-container__play-icon",3,"click"],[1,"fa","fa-play"],[1,"video-container__video"],["width","500","height","350","controls","","autoplay","",3,"src"]],template:function(e,t){1&e&&(o.yc(0,he,7,5,"div",0),o.yc(1,ge,4,1,"div",0)),2&e&&(o.kc("ngIf",!t.autoplay),o.Bb(1),o.kc("ngIf",t.autoplay))},directives:[m.l,m.j],styles:[".video-container[_ngcontent-%COMP%]{position:relative;width:calc(100% + 48px);margin-left:-24px;margin-right:-24px;margin-top:-24px;border-top-right-radius:16px;overflow:hidden;border-top-left-radius:16px;display:grid}.video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}.video-container__thumb[_ngcontent-%COMP%]{width:100%;position:relative;grid-column:1;grid-row:1}.video-container__thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.video-container__play-icon[_ngcontent-%COMP%]{border-radius:50%;width:30px;height:30px;background-color:#666;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;padding-left:2px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);cursor:pointer}.video-container__play-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}.video-container__video[_ngcontent-%COMP%]{grid-column:1;grid-row:1}.video-container[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{visibility:hidden}"]}),e})();var fe=n("twue");function ve(e,t){if(1&e&&(o.Sb(0,"span"),o.Sb(1,"strong"),o.zc(2,"name:"),o.Rb(),o.zc(3),o.Rb()),2&e){const e=o.dc(3);o.Bb(3),o.Bc(" ",e.share.ename,"")}}function _e(e,t){if(1&e&&(o.Sb(0,"span"),o.Sb(1,"strong"),o.zc(2,"email:"),o.Rb(),o.zc(3),o.Rb()),2&e){const e=o.dc(3);o.Bb(3),o.Bc(" ",e.share.eemail,"")}}function Se(e,t){if(1&e&&(o.Sb(0,"span"),o.Sb(1,"strong"),o.zc(2,"whatsapp:"),o.Rb(),o.zc(3),o.Rb()),2&e){const e=o.dc(3);o.Bb(3),o.Bc(" ",e.share.ewhatsapp,"")}}function Ce(e,t){if(1&e&&(o.Sb(0,"span"),o.Sb(1,"strong"),o.zc(2,"id platpres:"),o.Rb(),o.zc(3),o.Rb()),2&e){const e=o.dc(3);o.Bb(3),o.Bc(" ",e.share.eidplatpres,"")}}function xe(e,t){if(1&e&&(o.Sb(0,"h4"),o.zc(1,"Vamos!! tienes un nuevo negocio exitoso."),o.Rb(),o.Sb(2,"p"),o.zc(3," Estos son los datos de contacto que dej\xf3 tu nuevo cliente. Felicitaciones!! "),o.Rb(),o.Sb(4,"p"),o.yc(5,ve,4,1,"span",10),o.Nb(6,"br"),o.yc(7,_e,4,1,"span",10),o.Nb(8,"br"),o.yc(9,Se,4,1,"span",10),o.Nb(10,"br"),o.yc(11,Ce,4,1,"span",10),o.Rb()),2&e){const e=o.dc(2);o.Bb(5),o.kc("ngIf",e.share.ename),o.Bb(2),o.kc("ngIf",e.share.eemail),o.Bb(2),o.kc("ngIf",e.share.ewhatsapp),o.Bb(2),o.kc("ngIf",e.share.eidplatpres)}}function ye(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,xe,12,4,"ng-template"),o.Rb())}function Re(e,t){if(1&e&&(o.Sb(0,"div",19),o.Nb(1,"img",20),o.Sb(2,"div",21),o.Sb(3,"h4"),o.zc(4),o.Rb(),o.Sb(5,"p"),o.zc(6),o.Rb(),o.Rb(),o.Sb(7,"div",22),o.zc(8),o.ec(9,"timeago"),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.Bb(4),o.Ac(null==e||null==e.user?null:e.user.name),o.Bb(2),o.Ac(null==e?null:e.message),o.Bb(2),o.Bc(" ",o.fc(9,3,null==e?null:e.createdAt)," ")}}function Pe(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",14),o.zc(1),o.ec(2,"timeago"),o.Rb(),o.Sb(3,"h4"),o.zc(4,"Bit\xe1cora del negocio"),o.Rb(),o.Sb(5,"p"),o.zc(6,"Ingresa tu comentario"),o.Rb(),o.Sb(7,"form",15),o.Zb("ngSubmit",function(){return o.sc(e),o.dc().onSubmit()}),o.Nb(8,"input",16),o.Rb(),o.Sb(9,"div",17),o.yc(10,Re,10,5,"div",18),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.Bc(" ",o.fc(2,3,null==e.share||null==e.share.share?null:e.share.share.createdAt)," "),o.Bb(6),o.kc("formGroup",e.messageForm),o.Bb(3),o.kc("ngForOf",e.messages)}}function ke(e,t){if(1&e&&o.Nb(0,"app-pp-card",24),2&e){const e=o.dc(2);o.kc("card",null==e.share||null==e.share.share?null:e.share.share.card)}}function we(e,t){if(1&e&&(o.Sb(0,"h4"),o.zc(1,"Tarjeta enviada"),o.Rb(),o.yc(2,ke,1,1,"app-pp-card",23)),2&e){const e=o.dc();o.Bb(2),o.kc("ngIf",e.share&&e.share.share&&e.share.share.card)}}function Oe(e,t){if(1&e&&(o.Sb(0,"div",26),o.Nb(1,"app-video-container",27),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("thumbPath",e.share.share.presentation.thumbUri)("videoPath",e.share.share.presentation.videoUri)}}function Me(e,t){if(1&e&&(o.Sb(0,"h4"),o.zc(1,"Presentaci\xf3n enviada"),o.Rb(),o.yc(2,Oe,2,2,"div",25)),2&e){const e=o.dc();o.Bb(2),o.kc("ngIf",e.share&&e.share.share&&e.share.share.presentation&&e.share.share.presentation.videoUri)}}function Ie(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"ul"),o.Sb(2,"li"),o.Sb(3,"a",28),o.zc(4),o.Rb(),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(3),o.kc("href",e.share.share.pdfUri,o.tc),o.Bb(1),o.Bc(" ",e.getPdfName()," ")}}function Be(e,t){if(1&e&&(o.Sb(0,"h4"),o.zc(1,"Documentos anexos"),o.Rb(),o.yc(2,Ie,5,2,"div",10)),2&e){const e=o.dc();o.Bb(2),o.kc("ngIf",e.share&&e.share.share&&e.share.share.pdfUri)}}let ze=(()=>{class e{constructor(e,t,n,i){this.route=e,this.location=t,this.sharesService=n,this.authService=i,this.shareId="",this.messages=[],this.messageForm=new x.f({message:new x.c("")})}ngOnInit(){this.authService.getProfile().subscribe(e=>{this.profile=e}),this.routeSub=this.route.params.subscribe(e=>{this.shareId=e.id,this.sharesService.getDeal(parseInt(this.shareId)).subscribe(e=>{this.share=e}),this.sharesService.getMessages(parseInt(this.shareId)).subscribe(e=>{this.messages=e.reverse()})})}back(){this.location.back()}onSubmit(){const e=this.messageForm.value.message;e&&(this.messageForm.reset(),this.sharesService.addMessage(parseInt(this.shareId),e).subscribe(()=>{this.messages=[{user:{name:"Juan Carlos Mateus"},message:e,createdAt:new Date,updatedAt:new Date},...this.messages]}))}getPdfName(){return!this.share||this.share&&!this.share.share?"Ver documento":this.share.share.pdfUri.split("/").pop()}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(m.h),o.Mb(y),o.Mb(g))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-business-detail"]],decls:26,vars:2,consts:[[1,"page-container"],[1,"row"],[1,"back-button"],[3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-left"],[1,"row","cols-1","cols-2-xl"],[1,"row","business-detail"],[1,"row","cols-2","contact-row",2,"width","100%"],[3,"contact"],[1,"business-detail__form"],[4,"ngIf"],[2,"position","relative"],[1,"right-side"],[1,"row","cols-2"],[1,"business-detail__date"],[3,"formGroup","ngSubmit"],["type","text","placeholder","Tu mensaje...","formControlName","message"],[1,"business-comments"],["class","business-comments__record",4,"ngFor","ngForOf"],[1,"business-comments__record"],["_ngcontent-hur-c17","","src","/assets/images/user-placeholder.png"],[1,"bussiness-comments__content"],[1,"business-comments__date"],[3,"card",4,"ngIf"],[3,"card"],["class","preview__video",4,"ngIf"],[1,"preview__video"],[3,"thumbPath","videoPath"],["target","_blank",3,"href"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Bit\xe1cora de negocio"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"div",2),o.Sb(5,"a",3),o.Zb("click",function(){return t.back()}),o.Nb(6,"i",4),o.zc(7," Regresar "),o.Rb(),o.Rb(),o.Rb(),o.Sb(8,"div",5),o.Sb(9,"p"),o.zc(10,"Este es el resultado de tu env\xedo."),o.Rb(),o.Rb(),o.Sb(11,"div",6),o.Sb(12,"div",7),o.Nb(13,"app-customer-card-simple",8),o.Sb(14,"div",9),o.yc(15,ye,2,0,"app-white-card",10),o.Rb(),o.Sb(16,"app-white-card",11),o.yc(17,Pe,11,5,"ng-template"),o.Rb(),o.Sb(18,"div",12),o.Sb(19,"app-white-card"),o.yc(20,we,3,1,"ng-template"),o.Rb(),o.Sb(21,"app-white-card"),o.yc(22,Me,3,1,"ng-template"),o.Rb(),o.Sb(23,"app-white-card"),o.yc(24,Be,3,1,"ng-template"),o.Rb(),o.Rb(),o.Rb(),o.Nb(25,"div",13),o.Rb(),o.Rb()),2&e&&(o.Bb(13),o.kc("contact",t.profile),o.Bb(2),o.kc("ngIf","accepted"===(null==t.share?null:t.share.state)))},directives:[I,m.l,P,x.s,x.k,x.g,x.a,x.j,x.e,m.k,ae,me],pipes:[fe.b],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.buttons-container[_ngcontent-%COMP%]{display:flex;grid-gap:24px}.customer-list[_ngcontent-%COMP%]{position:relative}.customer-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:10px}.customer-list[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin-top:0}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%]{width:300px;position:absolute;right:0;top:24px}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-image:url(https://img.icons8.com/ios-glyphs/344/search--v1.png);background-repeat:no-repeat;background-position:100%;background-size:22px 22px;background-position-x:267px}.back-button[_ngcontent-%COMP%]{line-height:20px;font-weight:700;color:#3a5081;margin-top:32px;cursor:pointer}.back-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-weight:400;margin-right:8px;color:#c4dd4b}.contact-row[_ngcontent-%COMP%]{width:50%}.right-side[_ngcontent-%COMP%]{display:flex;flex-direction:column;grid-gap:20px}h4[_ngcontent-%COMP%]{color:#3a5081;margin-top:0}.preview__video[_ngcontent-%COMP%]{margin:50px 24px 24px}.preview__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%}.business-detail[_ngcontent-%COMP%] .contact-row[_ngcontent-%COMP%]{position:relative}.business-detail__date[_ngcontent-%COMP%]{position:absolute;top:30px;right:15px}.business-comments__record[_ngcontent-%COMP%]{display:flex;grid-gap:20px;position:relative}.business-comments__record[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden;min-width:50px}.business-comments__record[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0}.business-comments__record[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:5px;font-size:14px;padding-right:16px}.business-comments__date[_ngcontent-%COMP%]{font-size:13px;color:#3a5081;position:absolute;right:0;top:4px}"]}),e})(),Ne=(()=>{class e{constructor(e,t){this.httpClient=e,this.authService=t}getContacts(){return this.httpClient.request("GET","/api/contacts/",{responseType:"json"})}setCurrentContact(e){this.contact=e}getCurrentContact(){return this.contact}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b),o.Wb(g))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function qe(e,t){if(1&e&&(o.Sb(0,"div",7),o.Nb(1,"i",8),o.Rb()),2&e){const e=o.dc(2);o.kc("ngClass",e.theme),o.Bb(1),o.kc("ngClass",e.iconClass)}}function Fe(e,t){if(1&e&&(o.Sb(0,"div",9),o.zc(1),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Ac(e.subtitle)}}const je=function(e){return{"btn btn--small btn--secondary":e}};function Ee(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",10),o.Zb("click",function(){return o.sc(e),o.dc(2).seeMoreCb()}),o.zc(1),o.Rb()}if(2&e){const e=o.dc(2);o.kc("ngClass",o.mc(2,je,e.showButton)),o.Bb(1),o.Ac(e.seeMoreTitle)}}const Te=function(e){return{"no-see-more":e}};function Ve(e,t){if(1&e&&(o.Sb(0,"div",0),o.yc(1,qe,2,2,"div",1),o.Sb(2,"div",2),o.Sb(3,"div",3),o.zc(4),o.Rb(),o.Sb(5,"div",4),o.zc(6),o.Rb(),o.yc(7,Fe,2,1,"div",5),o.yc(8,Ee,2,4,"a",6),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",e.theme),o.Bb(1),o.kc("ngClass",o.mc(6,Te,!e.showMore)),o.Bb(2),o.Ac(e.value),o.Bb(2),o.Ac(e.title),o.Bb(1),o.kc("ngIf",e.subtitle),o.Bb(1),o.kc("ngIf",e.showMore)}}let Le=(()=>{class e{constructor(){this.theme="success",this.showMore=!0,this.showButton=!1,this.seeMoreTitle="Ver detalle",this.seeMore=new o.n}get iconClass(){return this.icon?`fa-${this.icon}`:"fa-check"}ngOnInit(){}seeMoreCb(){this.seeMore.emit()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-metric-card"]],inputs:{theme:"theme",icon:"icon",title:"title",subtitle:"subtitle",value:"value",showMore:"showMore",showButton:"showButton",seeMoreTitle:"seeMoreTitle"},outputs:{seeMore:"seeMore"},decls:2,vars:0,consts:[[1,"card__container"],["class","card__circle",3,"ngClass",4,"ngIf"],[1,"card__content",3,"ngClass"],[1,"card__value"],[1,"card__metric"],["class","card__submetric",4,"ngIf"],["class","see-more",3,"ngClass","click",4,"ngIf"],[1,"card__circle",3,"ngClass"],[1,"fa","fa-light",3,"ngClass"],[1,"card__submetric"],[1,"see-more",3,"ngClass","click"]],template:function(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,Ve,9,8,"ng-template"),o.Rb())},directives:[P,m.l,m.j],styles:[".card__container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-content:flex-start;justify-content:flex-start;align-items:flex-start;grid-gap:20px}.card__value[_ngcontent-%COMP%]{font-size:40px;line-height:40px;letter-spacing:.32px;color:#1e192f;font-weight:500;margin-bottom:16px;margin-top:16px}.card__metric[_ngcontent-%COMP%]{margin-bottom:24px}.card__submetric[_ngcontent-%COMP%]{margin-top:-20px;margin-bottom:4px;font-size:smaller}.card__circle[_ngcontent-%COMP%]{display:block;border-radius:60px;width:60px;min-width:60px;height:60px;color:#fafafa;text-align:center;line-height:60px;font-size:20px}.card__circle.success[_ngcontent-%COMP%]{background:#00cb96}.card__circle.action[_ngcontent-%COMP%]{background:#1d83ef}.card__circle.error[_ngcontent-%COMP%]{background:#f50647}.card__content[_ngcontent-%COMP%]{flex-grow:1;height:100%;margin-bottom:24px}.card__content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-weight:600;font-size:16px;text-decoration:none}.see-more[_ngcontent-%COMP%]{cursor:pointer}.no-see-more[_ngcontent-%COMP%]{margin-bottom:0}"]}),e})();function De(e,t){1&e&&(o.Sb(0,"div",5),o.Nb(1,"img",6),o.Rb())}function $e(e,t){if(1&e&&(o.Sb(0,"div",7),o.zc(1),o.ec(2,"slice"),o.ec(3,"uppercase"),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Bc(" ",o.hc(2,1,o.fc(3,5,null==e.contact||null==e.contact.contact?null:e.contact.contact.email),0,1)," ")}}const Ae=function(e){return[e]};function Ze(e,t){if(1&e&&(o.Sb(0,"div",0),o.yc(1,De,2,0,"div",1),o.yc(2,$e,4,7,"div",2),o.Sb(3,"a",3),o.zc(4,"Ver detalle"),o.Rb(),o.Sb(5,"div",4),o.Sb(6,"h4"),o.zc(7,"Negocio"),o.Rb(),o.Sb(8,"small"),o.zc(9),o.Rb(),o.Nb(10,"br"),o.Sb(11,"small"),o.zc(12),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",e.contact.profileUri),o.Bb(1),o.kc("ngIf",!e.contact.profileUri),o.Bb(1),o.kc("routerLink",o.mc(5,Ae,"/app/leads/"+e.contact.id)),o.Bb(6),o.Bc("Correo: ",null==e.contact.contact?null:e.contact.contact.email,""),o.Bb(3),o.Bc("Tel\xe9fono: ",null==e.contact.contact?null:e.contact.contact.phone,"")}}let Ue=(()=>{class e{constructor(){this.contact={}}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-business-card"]],inputs:{contact:"contact"},decls:2,vars:0,consts:[[1,"customer-card"],["class","customer-card__profile-container",4,"ngIf"],["class","customer-card__profile-container__profile customer-card__profile-container__profile--placeholder",4,"ngIf"],[1,"btn","btn--secondary","btn--small","customer-card__select-btn",3,"routerLink"],[1,"customer-card__profile-details"],[1,"customer-card__profile-container"],["src","/assets/images/user-placeholder.png"],[1,"customer-card__profile-container__profile","customer-card__profile-container__profile--placeholder"]],template:function(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,Ze,13,7,"ng-template"),o.Rb())},directives:[P,m.l,l.i],pipes:[m.s,m.t],styles:["[_nghost-%COMP%]{position:relative}[_nghost-%COMP%] .customer-card__select-btn[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px}[_nghost-%COMP%] .customer-card__profile-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden}[_nghost-%COMP%] .customer-card__profile-container__profile[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden;background-size:80%;border:1px solid #fafafa;background-repeat:no-repeat;background-position:50%;display:inline-block;box-shadow:1px 1px 3px}[_nghost-%COMP%] .customer-card__profile-container__profile--placeholder[_ngcontent-%COMP%]{background-color:#3a5081;color:#fff;line-height:50px;width:50px;text-align:center}[_nghost-%COMP%] .customer-card__profile-details[_ngcontent-%COMP%]{color:#3a5081}[_nghost-%COMP%] .customer-card__profile-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:#3a5081}"]}),e})();function Ge(e,t){1&e&&o.Nb(0,"app-business-card",11),2&e&&o.kc("contact",t.$implicit)}let Qe=(()=>{class e{constructor(e,t){this.contactsService=e,this.sharesService=t,this.contacts=[],this.metrics={}}ngOnInit(){this.sharesService.getDeals("accepted").subscribe(e=>{this.contacts=e}),this.sharesService.getMetrics().subscribe(e=>{this.metrics=e})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ne),o.Mb(y))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-business"]],decls:17,vars:2,consts:[[1,"page-container"],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check","title","Negocios exitosos",3,"value"],[1,"row","customer-list"],[1,"headline"],[1,"subtitle"],[1,"search-group"],["for","search"],["type","text","placeholder","Ingrese el criterio de b\xfasqueda"],[1,"row","cols-1","cols-3-xl"],[3,"contact",4,"ngFor","ngForOf"],[3,"contact"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Tus negocios exitosos"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Nb(4,"app-metric-card",2),o.Rb(),o.Sb(5,"div",3),o.Sb(6,"div",4),o.Sb(7,"h3"),o.zc(8,"Negocios exitosos"),o.Rb(),o.Sb(9,"p",5),o.zc(10,"Este es el listado de tus negocios exitosos."),o.Rb(),o.Sb(11,"div",6),o.Sb(12,"label",7),o.zc(13,"B\xfascador"),o.Rb(),o.Nb(14,"input",8),o.Rb(),o.Rb(),o.Sb(15,"div",9),o.yc(16,Ge,1,1,"app-business-card",10),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("value",t.metrics.accepted),o.Bb(12),o.kc("ngForOf",t.contacts))},directives:[Le,m.k,Ue],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.buttons-container[_ngcontent-%COMP%]{display:flex;grid-gap:24px}.customer-list[_ngcontent-%COMP%]{position:relative}.customer-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:10px}.customer-list[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin-top:0}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%]{width:300px;position:absolute;right:0;top:24px}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-image:url(https://img.icons8.com/ios-glyphs/344/search--v1.png);background-repeat:no-repeat;background-position:100%;background-size:22px 22px;background-position-x:267px}"]}),e})();function Ye(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Nb(1,"app-pp-card",7),o.Sb(2,"div",8),o.Sb(3,"a",9),o.Zb("click",function(){return o.sc(e),o.dc(2).$implicit.details=!0}),o.zc(4," Ver detalles "),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2).$implicit;o.Bb(1),o.kc("card",e.share.card)("fullFg",!0)}}function We(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2),o.Nb(3,"br"),o.zc(4),o.Nb(5,"br"),o.zc(6),o.Nb(7,"br"),o.zc(8),o.Nb(9,"br"),o.zc(10),o.Nb(11,"br"),o.zc(12),o.Nb(13,"br"),o.Rb(),o.Sb(14,"a",10),o.Zb("click",function(){return o.sc(e),o.dc(2).$implicit.details=!1}),o.zc(15," Cerrar "),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2).$implicit;o.Bb(2),o.Cc(" Nombre: ",null==e.share.card?null:e.share.card.name," ",null==e.share.card?null:e.share.card.lastname,""),o.Bb(2),o.Bc(" Cargo: ",null==e.share.card?null:e.share.card.position,""),o.Bb(2),o.Bc(" Mail: ",null==e.share.card?null:e.share.card.email,""),o.Bb(2),o.Bc(" Celular: ",null==e.share.card?null:e.share.card.cellphone,""),o.Bb(2),o.Bc(" Whatsapp: ",null==e.share.card?null:e.share.card.cellphone,""),o.Bb(2),o.Bc(" Web: ",null==e.share.card?null:e.share.card.website,"")}}function He(e,t){if(1&e&&(o.yc(0,Ye,5,2,"div",6),o.yc(1,We,16,7,"div",6)),2&e){const e=o.dc().$implicit;o.kc("ngIf",!e.details),o.Bb(1),o.kc("ngIf",!!e.details)}}const Xe=function(e){return{detailed:e}};function Ke(e,t){1&e&&(o.Sb(0,"app-white-card",5),o.yc(1,He,2,2,"ng-template"),o.Rb()),2&e&&o.kc("ngClass",o.mc(1,Xe,!!t.$implicit.details))}function Je(e,t){1&e&&(o.Sb(0,"div",11),o.Sb(1,"div",12),o.Nb(2,"i",13),o.Rb(),o.Rb())}function et(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,Je,3,0,"ng-template"),o.Rb())}let tt=(()=>{class e{constructor(e){this.sharesService=e,this.receivedContacts=[],this.cards=[1,2,3,4,5,6]}ngOnInit(){this.sharesService.getReceivedDeals().subscribe(e=>{this.receivedContacts=e.reduce((e,t)=>(e.find(e=>e.share.card.id===t.share.card.id)||e.push(t),e),[]),this.cards=[];let t=Math.max(0,6-this.receivedContacts.length);for(;t>0;)this.cards.push(t),t--})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(y))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-card-holder"]],decls:8,vars:2,consts:[[1,"description"],[1,"page-container"],[1,"row","cols-1","cols-3-xl"],[3,"ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[3,"ngClass"],[4,"ngIf"],[3,"card","fullFg"],[1,"buttons-container"],[1,"btn","btn--secondary","btn--medium","btn--strong",3,"click"],[1,"btn","btn--secondary","btn--medium","btn--strong","close-btn",3,"click"],[1,"new-container"],["href","#",1,"card__circle"],[1,"fa","fa-light","fa-plus"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Tarjetero"),o.Rb(),o.Sb(2,"div",0),o.zc(3," Estas son las tarjetas que han sido compartidas contigo.\n"),o.Rb(),o.Sb(4,"div",1),o.Sb(5,"div",2),o.yc(6,Ke,2,3,"app-white-card",3),o.yc(7,et,2,0,"app-white-card",4),o.Rb(),o.Rb()),2&e&&(o.Bb(6),o.kc("ngForOf",t.receivedContacts),o.Bb(1),o.kc("ngForOf",t.cards))},directives:[m.k,P,m.j,m.l,ae],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.description[_ngcontent-%COMP%]{margin-top:36px;margin-bottom:36px;font-size:19px;font-weight:400}.close-btn[_ngcontent-%COMP%]{margin-top:50px}.detailed[_ngcontent-%COMP%]{background:#3a5081;color:#fafafa}app-white-card[_ngcontent-%COMP%]{min-height:269px;display:flex;flex-direction:column;justify-content:flex-start;flex-wrap:nowrap}app-white-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{text-align:center}app-white-card[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{width:100%;display:flex}app-white-card[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin:0 auto}.card__circle[_ngcontent-%COMP%]{display:block;border-radius:100px;width:100px;min-width:100px;height:100px;text-align:center;line-height:100px;font-size:32px;color:#fafafa;background:#666;cursor:pointer}.new-container[_ngcontent-%COMP%]{display:flex;align-content:center;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;width:100%;height:100%}"]}),e})();var nt=n("pLZG"),it=n("vkgz");let ot=(()=>{class e{constructor(e,t){this.httpClient=e,this.authService=t}setCurrentCard(e){this.card=e}setMasterCard(e){this.masterCard=e}getCurrentCard(){return this.card}getMasterCard(){return this.masterCard}getAvatars(){return this.httpClient.request("GET","/api/cards/avatars/",{responseType:"json"})}getCards(){return this.httpClient.request("GET","/api/cards/",{responseType:"json"})}deleteCard(e){return this.httpClient.put(`/api/cards/${e.id}`,Object.assign(Object.assign({},e),{state:"deleted"}),{responseType:"json"})}saveCard(e,t,n){const i=`/api/cards/${e&&e.id?e.id:""}`,o={};let r;r=e&&e.id?this.httpClient.put(i,e,o):this.httpClient.post(i,e,o);let c=e&&e.id?e.id:null;return r.pipe(Object(p.a)(n=>(e=n,c&&-1!==c||(c=e&&e.id?e.id:null),t?this.uploadFile(`/api/cards/${c}/logo`,t):Object(d.a)(n))),Object(p.a)(e=>n?this.uploadFile(`/api/cards/${c}/video`,n):Object(d.a)(e)))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b),o.Wb(g))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),rt=(()=>{class e{constructor(e){this.httpClient=e}setCurrentPresentation(e){this.presentation=e}getCurrentPresentation(){return this.presentation}getPresentations(e=!1){return this.httpClient.request("GET",`/api/presentations/?public=${e}`,{responseType:"json"})}getPresentation(e){return this.httpClient.request("GET",`/api/presentations/${e}`,{responseType:"json"})}getPresentationsByVirtualRoom(e){return this.httpClient.request("GET",`/api/presentations/by-virtual-room/${e}`,{responseType:"json"})}deletePresentation(e){return this.httpClient.put(`/api/presentations/${e.id}`,Object.assign(Object.assign({},e),{state:"deleted"}),{responseType:"json"})}savePresentationWithQuestions(e,t,n,i,o,r,c){let s;s=this.savePresentation(e,t,n,i,o);let a=e&&e.id?e.id:-1;for(let l=0;l(e=t,0!==l||a&&-1!==a||(a=e&&e.id?e.id:-1),this.saveQuestion(a,r[l],c[l]))));return s}saveQuestion(e,t,n){const i=t&&t.id?`/api/presentations/questions/${t.id}`:`/api/presentations/${e}/questions`,o={};let r;r=t&&t.id?this.httpClient.put(i,t,o):this.httpClient.post(i,t,o);let c=t&&t.id?t.id:null;return r.pipe(Object(p.a)(e=>(t=e,c=!c&&t&&t.id?t.id:c,n?this.uploadFile(`/api/presentations/questions/${c}/video`,n):Object(d.a)(e))))}savePresentation(e,t,n,i,o){const r=`/api/presentations/${e&&e.id?e.id:""}`,c={};let s;s=e&&e.id?this.httpClient.put(r,e,c):this.httpClient.post(r,e,c);let a=e&&e.id?e.id:null,l=null;return s.pipe(Object(p.a)(n=>(l=n,a||(a=(e=n)&&e.id?e.id:null),t?this.uploadFile(`/api/presentations/${a}/video`,t).pipe(Object(b.a)(e=>l)):Object(d.a)(n))),Object(p.a)(e=>n?this.uploadFile(`/api/presentations/${a}/thumb`,n).pipe(Object(b.a)(e=>l)):Object(d.a)(l)),Object(p.a)(e=>i?this.uploadFile(`/api/presentations/${a}/companyLogo`,i).pipe(Object(b.a)(e=>l)):Object(d.a)(l)),Object(p.a)(e=>o?this.uploadFile(`/api/presentations/${a}/background`,o).pipe(Object(b.a)(e=>l)):Object(d.a)(l)))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function ct(e,t){if(1&e&&(o.Sb(0,"h4",13),o.zc(1),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.Ac(e.title)}}function st(e,t){if(1&e&&(o.Sb(0,"video",14),o.Nb(1,"source",15),o.Nb(2,"source",16),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("src",e.videoSrc,o.tc)}}function at(e,t){if(1&e){const e=o.Tb();o.Sb(0,"button",17),o.Zb("click",function(){return o.sc(e),o.dc().decline()}),o.zc(1),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.Ac(e.btnCancelText)}}const lt=function(e){return{centered:e}};let dt=(()=>{class e{constructor(){this.message="Vas a subir el archivo: Tales.csv. Confirma si deseas continuar.",this.btnOkText="Aceptar",this.btnCancelText="Cancelar",this.centered=!1,this.result=new o.n}ngOnInit(){}decline(){this.result.emit({state:"declined",context:this.context})}accept(){this.result.emit({state:"accepted",context:this.context})}dismiss(){this.result.emit({state:"dismissed",context:this.context})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-confirmation-dialog"]],inputs:{title:"title",message:"message",btnOkText:"btnOkText",btnCancelText:"btnCancelText",videoSrc:"videoSrc",centered:"centered",context:"context"},outputs:{result:"result"},decls:16,vars:9,consts:[[1,"dialog"],[1,"dialog__bg"],[1,"dialog__container"],[1,"dialog__header"],["class","dialog__title",4,"ngIf"],["type","button","aria-label","Close",1,"btn-close","btn","btn--small","btn--primary",3,"click"],["aria-hidden","true"],[1,"dialog__body"],[1,"dialog__video-container"],["width","500","controls","",4,"ngIf"],[1,"dialog__footer"],["type","button",1,"btn","btn--tertiary","btn--small","btn-ok",3,"click"],["type","button","class","btn btn--secondary btn--small",3,"click",4,"ngIf"],[1,"dialog__title"],["width","500","controls",""],["type","video/mp4",3,"src"],["src","movie.ogg","type","video/ogg"],["type","button",1,"btn","btn--secondary","btn--small",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Sb(3,"div",3),o.yc(4,ct,2,1,"h4",4),o.Sb(5,"button",5),o.Zb("click",function(){return t.dismiss()}),o.Sb(6,"span",6),o.zc(7,"\xd7"),o.Rb(),o.Rb(),o.Rb(),o.Sb(8,"div",7),o.zc(9),o.Sb(10,"div",8),o.yc(11,st,3,1,"video",9),o.Rb(),o.Rb(),o.Sb(12,"div",10),o.Sb(13,"button",11),o.Zb("click",function(){return t.accept()}),o.zc(14),o.Rb(),o.yc(15,at,2,1,"button",12),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("ngIf",t.title),o.Bb(5),o.Bc(" ",t.message," "),o.Bb(2),o.kc("ngIf",t.videoSrc),o.Bb(1),o.Db(o.mc(7,lt,t.centered)),o.Bb(2),o.Ac(t.btnOkText),o.Bb(1),o.kc("ngIf",t.btnCancelText))},directives:[m.l],styles:[".dialog[_ngcontent-%COMP%]{right:0;bottom:0}.dialog[_ngcontent-%COMP%], .dialog__bg[_ngcontent-%COMP%]{top:0;left:0;position:fixed}.dialog__bg[_ngcontent-%COMP%]{z-index:10;background-color:#1e192f;width:100%;height:100%;display:flex;align-items:center;justify-content:center;opacity:.5}.dialog__video-container[_ngcontent-%COMP%]{margin-top:24px;display:block;width:500px}.dialog__container[_ngcontent-%COMP%]{z-index:1000;background:#fff;position:fixed;top:50%;right:50%;transform:translate(50%,-50%);min-width:300px;width:auto;border-radius:15px;background-color:#f1f1f1;padding:15px 24px}.dialog__body[_ngcontent-%COMP%]{margin-bottom:24px;color:#3a5081;font-size:13px;margin-right:24px}.btn-ok[_ngcontent-%COMP%]{margin-right:10px}.btn-close[_ngcontent-%COMP%]{padding:5px 8px;position:absolute;top:10px;right:10px}.btn-close[_ngcontent-%COMP%], .btn-close[_ngcontent-%COMP%]:hover{color:#fafafa}.centered[_ngcontent-%COMP%]{text-align:center}@media (max-width:480px){.dialog__video-container[_ngcontent-%COMP%]{margin-top:24px;display:block;width:100%}.dialog__video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:inherit;height:inherit}}"]}),e})();function bt(e,t){1&e&&(o.Sb(0,"p"),o.zc(1,"Bienvenido a Platpres. Has creado tu tarjeta master. Vamos! Hay muchas puertas por abrir y negocios por cerrar."),o.Rb())}function pt(e,t){1&e&&(o.Sb(0,"h4",16),o.zc(1,"Tarjeta master"),o.Rb())}function ut(e,t){if(1&e&&(o.Sb(0,"h4",16),o.zc(1),o.Rb()),2&e){const e=o.dc(2).$implicit;o.Bb(1),o.Ac(null==e?null:e.cardName)}}function ht(e,t){if(1&e){const e=o.Tb();o.Sb(0,"button",8),o.Nb(1,"i",9),o.Rb(),o.Sb(2,"nav",10),o.Sb(3,"ul"),o.Sb(4,"li"),o.Sb(5,"button",11),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).editCard(t)}),o.zc(6," Editar "),o.Rb(),o.Rb(),o.Sb(7,"li"),o.Sb(8,"button",11),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).deleteCard(t)}),o.zc(9," Eliminar "),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Nb(10,"app-pp-card",12),o.yc(11,pt,2,0,"h4",13),o.yc(12,ut,2,1,"h4",13),o.Sb(13,"div",14),o.Sb(14,"a",15),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).shareCard(t,{})}),o.zc(15," Compartir "),o.Rb(),o.Rb()}if(2&e){const e=o.dc(),t=e.$implicit,n=e.index;o.Bb(10),o.kc("card",t)("fullFg",!0),o.Bb(1),o.kc("ngIf",0===n),o.Bb(1),o.kc("ngIf",0!==n)}}function gt(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,ht,16,4,"ng-template"),o.Rb())}function mt(e,t){1&e&&(o.Sb(0,"div",17),o.Sb(1,"div",18),o.Nb(2,"i",19),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("routerLink","/app/wizards/create-card"))}function ft(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,mt,3,1,"ng-template"),o.Rb())}function vt(e,t){if(1&e&&(o.Sb(0,"div",6),o.yc(1,gt,2,0,"app-white-card",7),o.yc(2,ft,2,0,"app-white-card",7),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngForOf",e.cards$),o.Bb(1),o.kc("ngForOf",e.cards)}}function _t(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",23),o.Sb(1,"a",24),o.Zb("click",function(){o.sc(e);const t=o.dc(2).$implicit;return o.dc(2).deletePresentation(t)}),o.Nb(2,"i",25),o.Rb(),o.Rb()}}function St(e,t){if(1&e){const e=o.Tb();o.Sb(0,"button",8),o.Nb(1,"i",9),o.Rb(),o.Sb(2,"nav",10),o.Sb(3,"ul"),o.Sb(4,"li",11),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).editPresentation(t)}),o.Sb(5,"button"),o.zc(6," Editar "),o.Rb(),o.Rb(),o.Sb(7,"li"),o.Sb(8,"button",11),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).deletePresentation(t)}),o.zc(9," Eliminar "),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Nb(10,"app-video-container",20),o.yc(11,_t,3,0,"div",21),o.Sb(12,"div",22),o.Sb(13,"h4"),o.zc(14),o.Rb(),o.Sb(15,"div",14),o.Sb(16,"a",15),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(2).shareCard({},t)}),o.zc(17," Compartir "),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc().$implicit;o.Bb(10),o.kc("thumbPath",null==e?null:e.thumbUri)("videoPath",null==e?null:e.tmpVideoPath),o.Bb(1),o.kc("ngIf",e&&!e.tmpVideoPath),o.Bb(3),o.Ac(e.title)}}function Ct(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,St,18,4,"ng-template"),o.Rb())}function xt(e,t){1&e&&(o.Sb(0,"div",17),o.Sb(1,"div",18),o.Nb(2,"i",19),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("routerLink","/app/wizards/create-presentation"))}function yt(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,xt,3,1,"ng-template"),o.Rb())}function Rt(e,t){if(1&e&&(o.Sb(0,"div",6),o.yc(1,Ct,2,0,"app-white-card",7),o.yc(2,yt,2,0,"app-white-card",7),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngForOf",e.presentations$),o.Bb(1),o.kc("ngForOf",e.presentations)}}function Pt(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",26),o.Zb("result",function(t){return o.sc(e),o.dc().deleteConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("context",e.currentPresentation)("message",e.confirmationMessage)}}const kt=function(e){return{active:e}};let wt=(()=>{class e{constructor(e,t,n,i){this.cardsService=e,this.presentationsService=t,this.router=n,this.route=i,this.cards=[1,2,3,4,5,6],this.presentations=[1,2,3,4,5,6],this.cardsEnabled=!0,this.firstCardCreated=!1,this.confirmingDelete=!1,this.confirmationMessage=""}ngOnInit(){this.init(),this.route.queryParams.pipe(Object(nt.a)(e=>e.t||e.fc)).subscribe(e=>{e&&"2"===e.t&&(this.cardsEnabled=!1),e&&"true"===e.fc&&(this.firstCardCreated=!0)})}init(){this.cards$=void 0,this.presentations$=void 0,this.cardsService.setCurrentCard({}),this.cardsService.getCards().pipe(Object(it.a)(e=>{e.length>0&&(this.cardsService.setMasterCard(e[0]),this.masterCard=e[0])}),Object(b.a)(e=>{let t=Math.max(0,6-e.length);for(this.cards=[];t>0;)this.cards.push(t),t--;return this.masterCard?e.map(e=>{var t,n,i,o;return Object.assign(Object.assign({},e),{name:null===(t=this.masterCard)||void 0===t?void 0:t.name,lnames:null===(n=this.masterCard)||void 0===n?void 0:n.lnames,email:null===(i=this.masterCard)||void 0===i?void 0:i.email,logoPath:null===(o=this.masterCard)||void 0===o?void 0:o.logoPath})}):e})).subscribe(e=>{this.cards$=e,this.getPresentations()})}getPresentations(){this.presentationsService.getPresentations().pipe(Object(b.a)(e=>{let t=Math.max(0,6-e.length);for(this.presentations=[];t>0;)this.presentations.push(t),t--;return e.map(e=>{var t;if(e&&e.videoPath&&(e.tmpVideoPath=u+e.videoPath),e.defaultCardId){const n=null===(t=this.cards$)||void 0===t?void 0:t.find(t=>t.id===e.defaultCardId);e.defaultCard=n}return e})})).subscribe(e=>{this.presentations$=e})}editCard(e){this.cardsService.setCurrentCard(e),this.router.navigate(["/app/wizards/create-card"])}editPresentation(e){this.presentationsService.setCurrentPresentation(e),this.router.navigate(e.extended?["/app/wizards/register-virtual-room"]:["/app/wizards/create-presentation"])}shareCard(e,t){this.cardsService.setCurrentCard(e),this.presentationsService.setCurrentPresentation(t),t&&t.id&&t.defaultCard&&this.cardsService.setCurrentCard(t.defaultCard),this.router.navigate(["/app/wizards/share-card"])}deleteCard(e){this.currentCard=e,this.currentPresentation=void 0,this.confirmationMessage="\xbfEst\xe1s seguro que deseas eliminar esta tarjeta?",this.confirmingDelete=!0}deletePresentation(e){this.currentPresentation=e,this.currentCard=void 0,this.confirmationMessage="\xbfEst\xe1s seguro que deseas eliminar esta presentaci\xf3n?",this.confirmingDelete=!0}deleteConfirmationCallback(e){if(this.confirmingDelete=!1,"accepted"===e.state&&this.currentPresentation){const e=Object.assign({},this.currentPresentation);delete e.tmpVideoPath,this.presentationsService.deletePresentation(e).subscribe(()=>{this.init()})}if("accepted"===e.state&&this.currentCard){const e=Object.assign({},this.currentCard);this.cardsService.deleteCard(e).subscribe(()=>{this.init()})}}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(ot),o.Mb(rt),o.Mb(l.f),o.Mb(l.a))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-cards"]],decls:12,vars:11,consts:[[4,"ngIf"],[1,"page-container"],[1,"tabs-container"],[1,"title",3,"ngClass","click"],["class","row cols-1 cols-3-xl",4,"ngIf"],[3,"context","message","result",4,"ngIf"],[1,"row","cols-1","cols-3-xl"],[4,"ngFor","ngForOf"],[1,"btn","btn--tertiary","btn--small","settings-btn"],[1,"fa","fa-light","fa-ellipsis-v"],[1,"menu"],[3,"click"],[3,"card","fullFg"],["style","margin-top: -10px",4,"ngIf"],[1,"buttons-container"],[1,"btn","btn--tertiary","btn--medium",3,"click"],[2,"margin-top","-10px"],[1,"new-container"],[1,"card__circle",3,"routerLink"],[1,"fa","fa-light","fa-plus"],[3,"thumbPath","videoPath"],["class","preview__video empty-container",4,"ngIf"],[1,"preview__video-content"],[1,"preview__video","empty-container"],[1,"btn","btn--secondary","btn--small","btn-delete",3,"click"],[1,"fa","fa-trash"],[3,"context","message","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1),o.Rb(),o.yc(2,bt,2,0,"p",0),o.Sb(3,"div",1),o.Sb(4,"div",2),o.Sb(5,"div",3),o.Zb("click",function(){return t.cardsEnabled=!t.cardsEnabled}),o.zc(6,"Tarjetas"),o.Rb(),o.Sb(7,"div",3),o.Zb("click",function(){return t.cardsEnabled=!t.cardsEnabled}),o.zc(8,"Presentaciones"),o.Rb(),o.Rb(),o.yc(9,vt,3,2,"div",4),o.yc(10,Rt,3,2,"div",4),o.Rb(),o.yc(11,Pt,1,2,"app-confirmation-dialog",5)),2&e&&(o.Bb(1),o.Bc("Tus ",t.cardsEnabled?"tarjetas":"presentaciones",""),o.Bb(1),o.kc("ngIf",t.firstCardCreated),o.Bb(3),o.kc("ngClass",o.mc(7,kt,t.cardsEnabled)),o.Bb(2),o.kc("ngClass",o.mc(9,kt,!t.cardsEnabled)),o.Bb(2),o.kc("ngIf",t.cardsEnabled),o.Bb(1),o.kc("ngIf",!t.cardsEnabled),o.Bb(1),o.kc("ngIf",t.confirmingDelete))},directives:[m.l,m.j,m.k,P,ae,l.g,me,dt],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] app-pp-card{cursor:pointer}.tabs-container[_ngcontent-%COMP%]{display:flex;grid-gap:16px}.tabs-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{cursor:pointer;margin-bottom:16px}.tabs-container[_ngcontent-%COMP%] .title.active[_ngcontent-%COMP%]{border-bottom:3px solid #3a5081;padding-bottom:6px}.new-container[_ngcontent-%COMP%]{display:flex;align-content:center;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;width:100%;height:100%}.page-container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{grid-auto-rows:1fr}.card__circle[_ngcontent-%COMP%]{display:block;border-radius:100px;width:100px;min-width:100px;height:100px;text-align:center;line-height:100px;font-size:32px;color:#fafafa;background:#666;cursor:pointer}app-white-card[_ngcontent-%COMP%]{position:relative;min-height:269px;display:flex;flex-direction:column;justify-content:flex-start;flex-wrap:nowrap}app-white-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{text-align:center}app-white-card[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{width:100%;display:flex}app-white-card[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin:0 auto}.preview__video[_ngcontent-%COMP%]{position:relative;width:calc(100% + 48px);margin-left:-24px;margin-right:-24px;margin-top:-24px;border-top-right-radius:16px;overflow:hidden;border-top-left-radius:16px}.preview__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}.btn-delete[_ngcontent-%COMP%]{z-index:10;position:absolute;top:10px;right:10px;width:10px;text-align:center}.btn-delete[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#1e192f;padding-left:0}.btn-delete[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:#fafafa}.empty-container[_ngcontent-%COMP%]{height:240px}"]}),e})();let Ot=(()=>{class e{constructor(e,t){this.httpClient=e,this.authService=t}searchCompanies(e,t,n){return t=t.join(","),n=n.join(","),this.httpClient.request("GET","/api/companies/search/",{responseType:"json",params:{searchValue:e,bussinessWith:t,partnerWith:n}})}getMetrics(e){return this.httpClient.request("GET",`/api/companies/${e}/metrics`,{responseType:"json"})}getCompanies(){return this.httpClient.request("GET","/api/companies/",{responseType:"json"})}subscribe(e){return this.httpClient.request("POST",`/api/companies/${e}/subscribe`,{responseType:"json"})}unsubscribe(e){return this.httpClient.request("POST",`/api/companies/${e}/unsubscribe`,{responseType:"json"})}deleteCompany(e){return this.httpClient.put(`/api/companies/${e.id}`,Object.assign(Object.assign({},e),{state:"deleted"}),{responseType:"json"})}savePortrait(e,t){return t?this.uploadFile(`/api/companies/${e.id}/portrait`,t):Object(d.a)(!1)}saveCompany(e,t,n){const i=`/api/companies/${e&&e.id?e.id:""}`,o={};let r;r=e&&e.id?this.httpClient.put(i,e,o):this.httpClient.post(i,e,o);let c=null;return r.pipe(Object(p.a)(n=>(c=(e=n)&&e.id?e.id:null,t?this.uploadFile(`/api/companies/${c}/profile`,t):Object(d.a)(n))),Object(p.a)(e=>n?this.uploadFile(`/api/companies/${c}/portrait`,n):Object(d.a)(e)))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b),o.Wb(g))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const Mt=["file"];function It(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",10),o.Zb("click",function(){o.sc(e);const t=o.dc(2),n=o.pc(5);return t.company?n.click():t.addPortraitImage()}),o.Nb(1,"i",11),o.Rb(),o.Sb(2,"p",12),o.zc(3,"Sube una imagen de perfil para tu empresa"),o.Rb()}}function Bt(e,t){1&e&&(o.Sb(0,"div",9),o.Sb(1,"app-white-card"),o.yc(2,It,4,0,"ng-template"),o.Rb(),o.Rb())}function zt(e,t){}function Nt(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",9),o.Sb(1,"app-white-card"),o.yc(2,zt,0,0,"ng-template"),o.Rb(),o.Sb(3,"button",13),o.Zb("click",function(){return o.sc(e),o.dc(),o.pc(5).click()}),o.Nb(4,"i",14),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.wc("background-image: url('",e.company.portraitUri,"');")}}const qt=function(){return["/app","register-company"]};function Ft(e,t){1&e&&(o.Sb(0,"div"),o.Sb(1,"a",15),o.Sb(2,"span"),o.zc(3,"Inicia el registro de tu empresa"),o.Rb(),o.Nb(4,"i",16),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("routerLink",o.lc(1,qt)))}let jt=(()=>{class e{constructor(e,t){this.companiesService=e,this.router=t,this.acceptedExtensions="image/*"}ngOnInit(){this.getCompany()}getMetrics(){this.company&&this.company.id&&this.companiesService.getMetrics(this.company.id).subscribe(e=>{this.metrics=e})}getCompany(){this.companiesService.getCompanies().subscribe(e=>{e&&e.length&&(this.company=e[0],this.getMetrics())})}addPortraitImage(){this.company||this.router.navigate(["/app/register-company/"])}fileSelected(){if(!this.elementView||!this.company)return;const[e]=this.elementView.nativeElement.files;e&&this.companiesService.savePortrait(this.company,e).subscribe(()=>{this.getCompany()})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ot),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-company"]],viewQuery:function(e,t){if(1&e&&o.Dc(Mt,1),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first)}},decls:14,vars:8,consts:[[1,"page-container"],["class","row profile-container",4,"ngIf"],["type","file","name","filename",2,"display","none",3,"accept","change"],["file",""],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check","title","Clientes conectados con tu empresa",3,"value","showMore"],["theme","error","icon","times","title","Clientes desconectados de tu empresa",3,"value","showMore"],[4,"ngIf"],[1,"row"],[1,"row","profile-container"],[1,"add-profile-btn",3,"click"],[1,"fa","fa-light","fa-plus"],[1,"subtitle"],[1,"btn","btn--tertiary","btn--small","profile__edit-button",3,"click"],[1,"fa","fa-edit"],[1,"btn","btn--tertiary","btn--large","btn-deal",3,"routerLink"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Perfil empresa"),o.Rb(),o.Sb(2,"div",0),o.yc(3,Bt,3,0,"div",1),o.Sb(4,"input",2,3),o.Zb("change",function(){return t.fileSelected()}),o.Rb(),o.yc(6,Nt,5,3,"div",1),o.Sb(7,"div",4),o.Nb(8,"app-metric-card",5),o.Nb(9,"app-metric-card",6),o.Rb(),o.yc(10,Ft,5,2,"div",7),o.Sb(11,"div",8),o.Sb(12,"p"),o.zc(13,"Al registrar tu empresa impides que otras personas puedan crear perfiles o tarjetas de ella. La \xfanica informaci\xf3n p\xfablica ser\xe1 el nombre y la descripci\xf3n de tus actividad comercial. La informaci\xf3n adicional nos permitir\xe1 ayudarte a crecer tu propia red de negocios de acuerdo a las palabras claves que ingreses en clientes y proveedores."),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(3),o.kc("ngIf",!t.company||t.company&&!t.company.portraitUri),o.Bb(1),o.kc("accept",t.acceptedExtensions),o.Bb(2),o.kc("ngIf",t.company&&t.company.portraitUri),o.Bb(2),o.kc("value",t.metrics&&t.metrics.subscribers?t.metrics.subscribers:"0")("showMore",!1),o.Bb(1),o.kc("value",t.metrics&&t.metrics.unsubscribers?t.metrics.unsubscribers:"0")("showMore",!1),o.Bb(1),o.kc("ngIf",!t.company))},directives:[m.l,Le,P,l.i],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.add-profile-btn[_ngcontent-%COMP%]{display:block;border-radius:80px;width:80px;min-width:80px;height:80px;text-align:center;line-height:80px;font-size:32px;color:#fafafa;background:#666;cursor:pointer;margin:60px auto 0}.profile-container[_ngcontent-%COMP%]{min-height:250px;position:relative}.profile-container[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{text-align:center}.profile__edit-button[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.profile__edit-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%] .profile-container>app-white-card{background-size:cover}"]}),e})();var Et=n("2Vo4"),Tt=n("/uUt"),Vt=n("3E0/");let Lt=(()=>{class e{constructor(){this.step=1,this._currentStep$=new Et.a(1),this._stepsInfo$=new Et.a([]),this._stepReplaced$=new Et.a([]),this.currentStep$=this._currentStep$.pipe(Object(Tt.a)(),Object(Vt.a)(0)),this.stepsInfo$=this._stepsInfo$.pipe(Object(Tt.a)(),Object(Vt.a)(0)),this.stepsReplaced$=this._stepReplaced$.pipe(Object(Tt.a)(),Object(Vt.a)(0))}setStepsInfo(e){this.stepsInfo=e,this._stepsInfo$.next(this.stepsInfo)}setStep(e){this.step=e,this.emit()}overwriteStep(e){this._stepReplaced$.next(e),this.step=e}emit(){this._currentStep$.next(this.step)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Dt(e,t){if(1&e&&o.Nb(0,"img",11),2&e){const e=o.dc().$implicit;o.kc("src",e.path,o.tc)}}function $t(e,t){if(1&e&&o.Nb(0,"img",11),2&e){const e=o.dc().$implicit;o.kc("src",e.thumbUri,o.tc)}}function At(e,t){if(1&e&&(o.Sb(0,"p",12),o.zc(1),o.Rb()),2&e){const e=o.dc().$implicit;o.Bb(1),o.Ac(e.title)}}const Zt=function(e){return{selected:e}},Ut=function(e){return{"is-disabled":e}};function Gt(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",2),o.Sb(1,"div",3),o.yc(2,Dt,1,1,"img",4),o.yc(3,$t,1,1,"img",4),o.Nb(4,"div",5),o.Sb(5,"div",6),o.Nb(6,"i",7),o.Rb(),o.Rb(),o.yc(7,At,2,1,"p",8),o.Sb(8,"div",9),o.Sb(9,"a",10),o.Zb("click",function(){o.sc(e);const n=t.index;return o.dc().selectPhoto(n)}),o.zc(10,"Seleccionar"),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=t.$implicit,n=t.index,i=o.dc();o.kc("ngClass",o.mc(5,Zt,i.selectedIdx==n)),o.Bb(2),o.kc("ngIf",e.path&&!e.thumbUri),o.Bb(1),o.kc("ngIf",e.thumbUri),o.Bb(4),o.kc("ngIf",e.title),o.Bb(2),o.kc("ngClass",o.mc(7,Ut,i.selectedIdx===n))}}let Qt=(()=>{class e{constructor(){this.customClasses="",this.selectedPhoto=new o.n}set currentPhoto(e){if(this._currentPhoto=e,this._currentPhoto&&this.photos){let e=this.photos.indexOf(this._currentPhoto);if(-1===e){const t=this.photos.find(e=>e.id===this._currentPhoto.id);e=this.photos.indexOf(t)}this.selectedIdx=e}}ngOnInit(){}selectPhoto(e){this.selectedIdx=e,this.selectedPhoto.emit(this.photos[e])}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-photo-picker"]],inputs:{photos:"photos",customClasses:"customClasses",currentPhoto:"currentPhoto"},outputs:{selectedPhoto:"selectedPhoto"},decls:2,vars:2,consts:[[1,"photo-picker","cols-2","cols-3-md","cols-4-lg","cols-5-xl",3,"ngClass"],["class","photo__container",3,"ngClass",4,"ngFor","ngForOf"],[1,"photo__container",3,"ngClass"],[1,"photo__img-container"],[3,"src",4,"ngIf"],[1,"selected-mask"],[1,"selected-icon"],["aria-hidden","true",1,"fa","fa-light","fa-check"],["class","photo__title",4,"ngIf"],[1,"photo__btn-container"],[1,"btn","btn--tertiary",3,"ngClass","click"],[3,"src"],[1,"photo__title"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.yc(1,Gt,11,9,"div",1),o.Rb()),2&e&&(o.kc("ngClass",t.customClasses),o.Bb(1),o.kc("ngForOf",t.photos))},directives:[m.j,m.k,m.l],styles:[".photo-picker[_ngcontent-%COMP%]{margin-bottom:24px;display:grid;grid-gap:20px;justify-items:center}.photo-picker[_ngcontent-%COMP%] .photo__title[_ngcontent-%COMP%]{font-size:12px;text-align:center}.photo-picker[_ngcontent-%COMP%] .photo__container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:12px;border:1px solid #ccc;border-radius:10px;box-sizing:border-box}.photo-picker[_ngcontent-%COMP%] .photo__container.selected[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%]{position:relative}.photo-picker[_ngcontent-%COMP%] .photo__container.selected[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%] .selected-mask[_ngcontent-%COMP%]{background-color:#00cb96;position:absolute;width:100%;height:100%;top:0;left:0;display:block;opacity:.8}.photo-picker[_ngcontent-%COMP%] .photo__container.selected[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;justify-content:center;text-align:center;color:#fafafa;font-size:24px}.photo-picker[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%]{width:100%;border-radius:10px;margin-bottom:10px;overflow:hidden}.photo-picker[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;display:block}.photo-picker[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%], .photo-picker[_ngcontent-%COMP%] .photo__img-container[_ngcontent-%COMP%] .selected-mask[_ngcontent-%COMP%]{display:none}.photo-picker[_ngcontent-%COMP%] .photo__btn-container[_ngcontent-%COMP%]{width:100%}.photo-picker[_ngcontent-%COMP%] .photo__btn-container[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{text-align:center;display:block}"]}),e})();const Yt=["file"];function Wt(e,t){if(1&e&&(o.Sb(0,"div",7),o.Nb(1,"img",8),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("src",e.previewSource,o.tc)}}function Ht(e,t){if(1&e&&(o.Sb(0,"div",9),o.Sb(1,"video",10),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("src",e.previewSource,o.tc)}}function Xt(e,t){if(1&e&&(o.Sb(0,"p"),o.zc(1),o.Rb()),2&e){o.dc();const e=o.pc(11);o.Bb(1),o.Ac(e.files[0].name)}}function Kt(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",11),o.Zb("click",function(){return o.sc(e),o.dc(),o.pc(11).click()}),o.zc(1,"Examinar"),o.Rb()}}function Jt(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",11),o.Zb("click",function(){return o.sc(e),o.dc().deleteFiles()}),o.zc(1,"Eliminar"),o.Rb()}}let en=(()=>{class e{constructor(e){this.sanitizer=e,this.title="",this.subtitle="",this.acceptedExtensions="image/*",this.maxSize=30,this.previewSource="",this.selectedFiles=new o.n,this.error=new o.n}set currentFile(e){this.previewSource=e&&e.previewSource?e.previewSource:"",this.inputFile=e&&e.files?e.files:null}ngOnInit(){}ngAfterViewInit(){this.elementView&&(this.elementView.nativeElement.files=this.inputFile?this.inputFile.nativeElement.files:null)}ngOnDestroy(){}isImage(){return this.acceptedExtensions.indexOf("image")>-1}isVideo(){return this.acceptedExtensions.indexOf("video")>-1}deleteFiles(){this.elementView&&(this.elementView.nativeElement.value="",this.previewSource="")}fileSelected(){if(!this.elementView)return;const[e]=this.elementView.nativeElement.files;if(e){const t=e.size/1024/1024;if(t>this.maxSize)return void this.error.emit({code:"MAX_SIZE_EXCEEDED",size:t});this.previewSource=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(e)),this.selectedFiles.emit({files:this.elementView,previewSource:this.previewSource})}}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(i.b))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-upload-file"]],viewQuery:function(e,t){if(1&e&&o.Dc(Yt,1),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first)}},inputs:{title:"title",subtitle:"subtitle",acceptedExtensions:["accept","acceptedExtensions"],maxSize:"maxSize",currentFile:"currentFile"},outputs:{selectedFiles:"selectedFiles",error:"error"},decls:12,vars:8,consts:[[1,"upload-file__container"],["class","upload-file__preview",4,"ngIf"],["class","upload-file__preview-video",4,"ngIf"],[4,"ngIf"],["class","btn btn--secondary",3,"click",4,"ngIf"],["type","file","name","filename",2,"display","none",3,"accept","change"],["file",""],[1,"upload-file__preview"],[3,"src"],[1,"upload-file__preview-video"],["width","500","height","350","controls","","autoplay","",3,"src"],[1,"btn","btn--secondary",3,"click"]],template:function(e,t){if(1&e&&(o.Sb(0,"div",0),o.Sb(1,"h4"),o.zc(2),o.Rb(),o.Sb(3,"p"),o.zc(4),o.Rb(),o.yc(5,Wt,2,1,"div",1),o.yc(6,Ht,3,1,"div",2),o.yc(7,Xt,2,1,"p",3),o.yc(8,Kt,2,0,"a",4),o.yc(9,Jt,2,0,"a",4),o.Sb(10,"input",5,6),o.Zb("change",function(){return t.fileSelected()}),o.Rb(),o.Rb()),2&e){const e=o.pc(11);o.Bb(2),o.Ac(t.title),o.Bb(2),o.Ac(t.subtitle),o.Bb(1),o.kc("ngIf",t.previewSource&&t.isImage()),o.Bb(1),o.kc("ngIf",t.previewSource&&t.isVideo()),o.Bb(1),o.kc("ngIf",!t.isImage()&&!t.isVideo()&&e.files&&e.files.length>0),o.Bb(1),o.kc("ngIf",e.files&&0===e.files.length&&!t.previewSource),o.Bb(1),o.kc("ngIf",e.files&&e.files.length>0||t.previewSource),o.Bb(1),o.kc("accept",t.acceptedExtensions)}},directives:[m.l],styles:[".upload-file__preview[_ngcontent-%COMP%]{max-width:20%;overflow:hidden;margin-bottom:20px}.upload-file__preview[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.upload-file__preview-video[_ngcontent-%COMP%]{overflow:hidden;margin-bottom:20px}.upload-file__container[_ngcontent-%COMP%]{background:#eee;border-radius:10px;display:flex;flex-direction:column;align-items:center;padding-bottom:24px;margin-bottom:36px}.upload-file__container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0}.upload-file__container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:0;margin-bottom:24px}"]}),e})();var tn=n("zwmB");function nn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",8),o.Zb("click",function(){o.sc(e);const t=o.dc().index;return o.dc().selectTmpl(t)}),o.zc(1,"Seleccionar"),o.Rb()}}const on=function(e){return{selected:e}};function rn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",2),o.Nb(1,"img",3),o.yc(2,nn,2,0,"a",4),o.Sb(3,"div",5),o.Zb("click",function(){return o.sc(e),o.dc().deselect()}),o.Rb(),o.Sb(4,"div",6),o.Zb("click",function(){return o.sc(e),o.dc().deselect()}),o.Nb(5,"i",7),o.Rb(),o.Rb()}if(2&e){const e=t.index,n=o.dc();o.kc("ngClass",o.mc(2,on,n.selectedIdx===e)),o.Bb(2),o.kc("ngIf",n.selectedIdx!==e)}}let cn=(()=>{class e{constructor(){this.tmpls=["tmpl1"],this.selectedTmpl=new o.n}ngOnInit(){}deselect(){this.selectedIdx=void 0}selectTmpl(e){this.selectedIdx=e,this.selectedTmpl.emit(this.tmpls[e])}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-tmpl-selector"]],outputs:{selectedTmpl:"selectedTmpl"},decls:2,vars:1,consts:[[1,"tmpl-selector__container","cols-2"],["class","tmpl-selector__item",3,"ngClass",4,"ngFor","ngForOf"],[1,"tmpl-selector__item",3,"ngClass"],["src","/assets/images/card-sample.png"],["class","btn btn--secondary btn--small tmpl-selector__item-select-btn",3,"click",4,"ngIf"],[1,"selected-mask",3,"click"],[1,"selected-icon",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-check"],[1,"btn","btn--secondary","btn--small","tmpl-selector__item-select-btn",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.yc(1,rn,6,4,"div",1),o.Rb()),2&e&&(o.Bb(1),o.kc("ngForOf",t.tmpls))},directives:[m.k,m.j,m.l],styles:[".tmpl-selector__container[_ngcontent-%COMP%]{display:grid;grid-gap:20px;margin-bottom:36px}.tmpl-selector__item[_ngcontent-%COMP%]{border-radius:16px;overflow:hidden;position:relative}.tmpl-selector__item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%}.tmpl-selector__item[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%], .tmpl-selector__item[_ngcontent-%COMP%] .selected-mask[_ngcontent-%COMP%]{display:none;cursor:pointer}.tmpl-selector__item.selected[_ngcontent-%COMP%] .selected-mask[_ngcontent-%COMP%]{background-color:#00cb96;position:absolute;width:100%;height:100%;top:0;left:0;display:block;opacity:.8}.tmpl-selector__item.selected[_ngcontent-%COMP%] .selected-icon[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;justify-content:center;text-align:center;color:#fafafa;font-size:24px}.tmpl-selector__item-select-btn[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px}"]}),e})();function sn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Nombre de tarjeta es requerido "),o.Rb())}function an(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,sn,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.cardName&&e.cardName.errors&&e.cardName.errors.required)}}function ln(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Nombre es requerido "),o.Rb())}function dn(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,ln,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.name&&e.name.errors&&e.name.errors.required)}}function bn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Apellidos son requeridos "),o.Rb())}function pn(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,bn,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.lnames&&e.lnames.errors&&e.lnames.errors.required)}}function un(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Cargo es requerido "),o.Rb())}function hn(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,un,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.position&&e.position.errors&&e.position.errors.required)}}function gn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Correo es requerido "),o.Rb())}function mn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Campo debe ser un correo v\xe1lido "),o.Rb())}function fn(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,gn,2,0,"div",3),o.yc(2,mn,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.email&&e.email.errors&&e.email.errors.required),o.Bb(1),o.kc("ngIf",e.email&&e.email.errors&&e.email.errors.email)}}function vn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Celular es requerido "),o.Rb())}function _n(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,vn,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.cellphone&&e.cellphone.errors&&e.cellphone.errors.required)}}function Sn(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," P\xe1gina web v\xe1lida es requerida "),o.Rb())}function Cn(e,t){if(1&e&&(o.Sb(0,"div",24),o.yc(1,Sn,2,0,"div",3),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.website&&e.website.errors)}}function xn(e,t){if(1&e&&(o.Sb(0,"form",8),o.Sb(1,"p"),o.zc(2,"Por favor completa la siguiente informaci\xf3n:"),o.Rb(),o.Sb(3,"label",9),o.zc(4,"Nombre de la tarjeta"),o.Rb(),o.Nb(5,"input",10),o.yc(6,an,2,1,"div",11),o.Sb(7,"label",12),o.zc(8,"Nombre"),o.Rb(),o.Nb(9,"input",13),o.yc(10,dn,2,1,"div",11),o.Sb(11,"label",14),o.zc(12,"Apellidos"),o.Rb(),o.Nb(13,"input",15),o.yc(14,pn,2,1,"div",11),o.Sb(15,"label",16),o.zc(16,"Cargo"),o.Rb(),o.Nb(17,"input",17),o.yc(18,hn,2,1,"div",11),o.Sb(19,"label",18),o.zc(20,"Coreo electr\xf3nico"),o.Rb(),o.Nb(21,"input",19),o.yc(22,fn,3,2,"div",11),o.Sb(23,"label",20),o.zc(24,"Celular"),o.Rb(),o.Nb(25,"input",21),o.yc(26,_n,2,1,"div",11),o.Sb(27,"label",22),o.zc(28,"P\xe1gina web"),o.Rb(),o.Nb(29,"input",23),o.yc(30,Cn,2,1,"div",11),o.Rb()),2&e){const e=o.dc(2);o.kc("formGroup",e.heroForm),o.Bb(6),o.kc("ngIf",(null==e.cardName?null:e.cardName.invalid)&&((null==e.cardName?null:e.cardName.dirty)||(null==e.cardName?null:e.cardName.touched))),o.Bb(4),o.kc("ngIf",(null==e.name?null:e.name.invalid)&&((null==e.name?null:e.name.dirty)||(null==e.name?null:e.name.touched))),o.Bb(4),o.kc("ngIf",(null==e.lnames?null:e.lnames.invalid)&&((null==e.lnames?null:e.lnames.dirty)||(null==e.lnames?null:e.lnames.touched))),o.Bb(4),o.kc("ngIf",(null==e.position?null:e.position.invalid)&&((null==e.position?null:e.position.dirty)||(null==e.position?null:e.position.touched))),o.Bb(4),o.kc("ngIf",(null==e.email?null:e.email.invalid)&&((null==e.email?null:e.email.dirty)||(null==e.email?null:e.email.touched))),o.Bb(4),o.kc("ngIf",(null==e.cellphone?null:e.cellphone.invalid)&&((null==e.cellphone?null:e.cellphone.dirty)||(null==e.cellphone?null:e.cellphone.touched))),o.Bb(4),o.kc("ngIf",(null==e.website?null:e.website.invalid)&&((null==e.website?null:e.website.dirty)||(null==e.website?null:e.website.touched)))}}function yn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-upload-file",29),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(3).videoChanged(t)}),o.Rb()}if(2&e){const e=o.dc(3);o.kc("currentFile",e.uploadedVideo)}}function Rn(e,t){if(1&e&&(o.Sb(0,"div",30),o.Sb(1,"video",31),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("src",e.selectedAvatar.videoUri,o.tc)}}function Pn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form"),o.Sb(1,"p"),o.zc(2,"Por favor elige un \xe1vatar o sube tu video:"),o.Rb(),o.Sb(3,"app-photo-picker",25),o.Zb("selectedPhoto",function(t){return o.sc(e),o.dc(2).avatarChanged(t)}),o.Rb(),o.yc(4,yn,1,1,"app-upload-file",26),o.yc(5,Rn,3,1,"div",27),o.Sb(6,"a",28),o.Zb("click",function(){return o.sc(e),o.dc(2).changeVideo()}),o.zc(7,"Cambiar video"),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(3),o.kc("photos",e.avatars)("currentPhoto",e.selectedAvatar),o.Bb(1),o.kc("ngIf",!e.selectedAvatar),o.Bb(1),o.kc("ngIf",e.selectedAvatar)}}function kn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-upload-file",40),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(3).logoChanged(t)}),o.Rb()}}function wn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",null,32),o.Sb(2,"p"),o.zc(3,"A continuaci\xf3n puedes personalizar con tu logo y tu color:"),o.Rb(),o.yc(4,kn,1,0,"app-upload-file",33),o.Sb(5,"div",34),o.Sb(6,"div",35),o.Sb(7,"h4"),o.zc(8,"Color de la letra"),o.Rb(),o.Sb(9,"div",36),o.Nb(10,"ngx-colors",37),o.zc(11),o.Rb(),o.Sb(12,"h4"),o.zc(13,"Color de los iconos"),o.Rb(),o.Sb(14,"div",36),o.Nb(15,"ngx-colors",37),o.zc(16),o.Rb(),o.Sb(17,"h4"),o.zc(18,"Color de la barra"),o.Rb(),o.Sb(19,"div",36),o.Nb(20,"ngx-colors",37),o.zc(21),o.Rb(),o.Rb(),o.Sb(22,"div",38),o.Sb(23,"h4"),o.zc(24,"Previsualizaci\xf3n"),o.Rb(),o.Sb(25,"app-pp-card",39),o.Zb("logoPropertiesChanged",function(t){return o.sc(e),o.dc(2).logoChangedCallback(t)}),o.Rb(),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(4),o.kc("ngIf",!e._masterCard),o.Bb(6),o.kc("formControl",e.colorBgFormControl),o.Bb(1),o.Bc(" ",e.colorBgFormControl.value," "),o.Bb(4),o.kc("formControl",e.colorFormControl),o.Bb(1),o.Bc(" ",e.colorFormControl.value," "),o.Bb(4),o.kc("formControl",e.colorBarFormControl),o.Bb(1),o.Bc(" ",e.colorBarFormControl.value," "),o.Bb(4),o.kc("iconColor",e.colorFormControl.value)("fontColor",e.colorBgFormControl.value)("barColor",e.colorBarFormControl.value)("logo",e.uploadedLogo)("video",e.uploadedVideo)("avatar",e.selectedAvatar)("profile",e.profile)("editable",!0)("logoScale",e.logoProperties.logoScale)("logoPosition",e.logoProperties.logoPosition)}}function On(e,t){1&e&&(o.Sb(0,"form"),o.Sb(1,"p"),o.zc(2,"A continuaci\xf3n selecciona una de las siguientes plantillas:"),o.Rb(),o.Nb(3,"app-tmpl-selector"),o.Rb())}function Mn(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"p"),o.zc(2,"Revisa y finaliza:"),o.Rb(),o.Nb(3,"app-pp-card",41),o.Rb()),2&e){const e=o.dc(2);o.Bb(3),o.kc("iconColor",e.colorFormControl.value)("fontColor",e.colorBgFormControl.value)("barColor",e.colorBarFormControl.value)("logo",e.uploadedLogo)("video",e.uploadedVideo)("avatar",e.selectedAvatar)("profile",e.profile)("logoScale",e.logoProperties.logoScale)("logoPosition",e.logoProperties.logoPosition)}}function In(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",42),o.Zb("click",function(){return o.sc(e),o.dc(2).previous()}),o.Nb(1,"i",43),o.Sb(2,"span"),o.zc(3,"Anterior"),o.Rb(),o.Rb()}}function Bn(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Siguiente"),o.Rb())}function zn(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Guardar y finalizar"),o.Rb())}function Nn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",44),o.Zb("click",function(){return o.sc(e),o.dc(2).continue()}),o.yc(1,Bn,2,0,"span",3),o.yc(2,zn,2,0,"span",3),o.Nb(3,"i",45),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.step<4),o.Bb(1),o.kc("ngIf",4===e.step)}}function qn(e,t){1&e&&(o.Sb(0,"a",46),o.Sb(1,"div",47),o.Nb(2,"div"),o.Nb(3,"div"),o.Nb(4,"div"),o.Nb(5,"div"),o.Rb(),o.Sb(6,"span"),o.zc(7,"Guardando..."),o.Rb(),o.Rb())}function Fn(e,t){if(1&e&&(o.yc(0,xn,31,8,"form",2),o.yc(1,Pn,8,4,"form",3),o.yc(2,wn,26,17,"form",3),o.yc(3,On,4,0,"form",3),o.yc(4,Mn,4,9,"form",3),o.Sb(5,"div",4),o.yc(6,In,4,0,"a",5),o.yc(7,Nn,4,2,"a",6),o.yc(8,qn,8,0,"a",7),o.Rb()),2&e){const e=o.dc();o.kc("ngIf",1===e.step),o.Bb(1),o.kc("ngIf",2===e.step),o.Bb(1),o.kc("ngIf",3===e.step),o.Bb(1),o.kc("ngIf",14===e.step),o.Bb(1),o.kc("ngIf",4===e.step),o.Bb(2),o.kc("ngIf",!e.saving&&e.step>1),o.Bb(1),o.kc("ngIf",!e.saving),o.Bb(1),o.kc("ngIf",e.saving)}}let jn=(()=>{class e{constructor(e,t,n,i){this.stepService=e,this.cardsService=t,this.fb=n,this.router=i,this.step=1,this.saving=!1,this.avatars=[{id:1,path:"../../../assets/images/avatar-sample.png"},{id:2,path:"../../../assets/images/avatar-sample.png"},{id:3,path:"../../../assets/images/avatar-sample.png"},{id:4,path:"../../../assets/images/avatar-sample.png"},{id:5,path:"../../../assets/images/avatar-sample.png"},{id:6,path:"../../../assets/images/avatar-sample.png"},{id:7,path:"../../../assets/images/avatar-sample.png"},{id:8,path:"../../../assets/images/avatar-sample.png"},{id:9,path:"../../../assets/images/avatar-sample.png"},{id:10,path:"../../../assets/images/avatar-sample.png"}],this.logoProperties={logoScale:1,logoProperties:{currentX:0,currentY:0}},this.heroForm=this.fb.group({cardName:["",x.q.required],name:["",x.q.required],lnames:["",x.q.required],position:["",x.q.required],email:["",[x.q.required,x.q.email]],cellphone:["",x.q.required],website:["",[x.q.required,x.q.pattern("(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?")]]}),this.card={},this.colorFormControl=this.fb.control("#546E7A"),this.colorBgFormControl=this.fb.control("#ADD8E6"),this.colorBarFormControl=this.fb.control("#FFFFFF"),this.steps=["Informaci\xf3n personal","Elige tu avatar","Personaliza","Finalizar"]}set masterCard(e){var t,n,i,o,r,c,s,a;e&&(this._masterCard=e,this.card&&this._masterCard&&this.card.id===this._masterCard.id&&(null===(t=this.heroForm.get("cardName"))||void 0===t||t.setValue("Tarjeta master"),null===(n=this.heroForm.get("cardName"))||void 0===n||n.disable()),null===(i=this.heroForm.get("name"))||void 0===i||i.setValue(null==e?void 0:e.name),null===(o=this.heroForm.get("name"))||void 0===o||o.disable(),null===(r=this.heroForm.get("lnames"))||void 0===r||r.setValue(null==e?void 0:e.lnames),null===(c=this.heroForm.get("lnames"))||void 0===c||c.disable(),null===(s=this.heroForm.get("email"))||void 0===s||s.setValue(null==e?void 0:e.email),null===(a=this.heroForm.get("email"))||void 0===a||a.disable(),this.uploadedLogo=(null==e?void 0:e.logoPath)?{path:u+(null==e?void 0:e.logoPath)}:null)}ngOnInit(){var e,t,n,i,o,r,c,s,a,l,d,b;this.stepService.setStep(this.step),this.stepService.setStepsInfo(this.steps);const p=this.cardsService.getCurrentCard();this.masterCard=this.cardsService.getMasterCard(),p&&(this.card=p,this.card&&this._masterCard&&this.card.id===this._masterCard.id?(null===(e=this.heroForm.get("cardName"))||void 0===e||e.setValue("Tarjeta master"),null===(t=this.heroForm.get("cardName"))||void 0===t||t.disable()):null===(n=this.cardName)||void 0===n||n.setValue(p.cardName),p.avatar&&!p.videoUri&&(this.selectedAvatar=p.avatar),null===(i=this.name)||void 0===i||i.setValue(p.name),null===(o=this.lnames)||void 0===o||o.setValue(p.lnames),null===(r=this.email)||void 0===r||r.setValue(p.email),null===(c=this.position)||void 0===c||c.setValue(p.position),p.cellphone&&(null===(s=this.cellphone)||void 0===s||s.setValue(parseInt(p.cellphone).toString())),null===(a=this.website)||void 0===a||a.setValue(p.website),null===(l=this.colorFormControl)||void 0===l||l.setValue(p.iconColor),null===(d=this.colorBgFormControl)||void 0===d||d.setValue(p.bgColor),null===(b=this.colorBarFormControl)||void 0===b||b.setValue(p.barColor),this.logoProperties={logoScale:p&&p.logoScale?p.logoScale:1,logoPosition:{percWidth:p&&p.logoXPosition?p.logoXPosition:0,percHeight:p&&p.logoYPosition?p.logoYPosition:0}},this.uploadedVideo=p.videoUri?{previewSource:p.videoUri}:p.videoPath?{previewSource:u+p.videoPath}:null,this.uploadedLogo=p.logoPath?{path:u+p.logoPath}:null),this.masterCard||this.cardsService.getCards().subscribe(e=>{var t,n;e.length>0?(this.cardsService.setMasterCard(e[0]),this.masterCard=e[0]):(null===(t=this.heroForm.get("cardName"))||void 0===t||t.setValue("Tarjeta master"),null===(n=this.heroForm.get("cardName"))||void 0===n||n.disable())}),this.stepService.stepsReplaced$.subscribe(e=>{e&&parseInt(e)>0&&e<=this.step&&(this.step=e)}),this.cardsService.getAvatars().subscribe(e=>{this.avatars=e.map(e=>Object.assign(Object.assign({},e),{path:"../../../assets/images/avatar-sample.png"}))})}previous(){1!==this.step&&(this.step=this.step-1,this.stepService.setStep(this.step))}continue(){var e,t,n,i,o,r,c,s,a,l,d,b;if(1===this.step){if(!this.heroForm.valid)return void this.heroForm.markAllAsTouched();this.profile={name:null===(e=this.name)||void 0===e?void 0:e.value,lastname:null===(t=this.lnames)||void 0===t?void 0:t.value,position:null===(n=this.position)||void 0===n?void 0:n.value,website:null===(i=this.website)||void 0===i?void 0:i.value,phone:null===(o=this.cellphone)||void 0===o?void 0:o.value}}else if(4===this.step){this.card.cardName=null===(r=this.cardName)||void 0===r?void 0:r.value,this.card.name=null===(c=this.name)||void 0===c?void 0:c.value,this.card.lnames=null===(s=this.lnames)||void 0===s?void 0:s.value,this.card.email=null===(a=this.email)||void 0===a?void 0:a.value,this.card.position=null===(l=this.position)||void 0===l?void 0:l.value,this.card.cellphone=parseInt(null===(d=this.cellphone)||void 0===d?void 0:d.value).toString(),this.card.website=null===(b=this.website)||void 0===b?void 0:b.value,this.card.iconColor=this.colorFormControl.value,this.card.bgColor=this.colorBgFormControl.value,this.card.barColor=this.colorBarFormControl.value,this.card.logoScale=this.logoProperties.logoScale,this.card.logoXPosition=this.logoProperties.logoPosition.percWidth,this.card.logoYPosition=this.logoProperties.logoPosition.percHeight,this.card.logoScale=this.card.logoScale?this.card.logoScale:1,this.card.logoXPosition=this.card.logoXPosition?this.card.logoXPosition:0,this.card.logoYPosition=this.card.logoYPosition?this.card.logoYPosition:0;const e=this.uploadedLogo&&this.uploadedLogo.files?this.uploadedLogo.files:null,t=this.uploadedVideo&&this.uploadedVideo.files?this.uploadedVideo.files:null;let n=null,i=null;return e&&(n=e.nativeElement&&e.nativeElement.files?e.nativeElement.files[0]:null),t&&(i=t.nativeElement&&t.nativeElement.files?t.nativeElement.files[0]:null),this.selectedAvatar&&this.selectedAvatar.id?(this.card.avatarId=this.selectedAvatar.id,i=null):this.card.avatarId=void 0,delete this.card.avatar,this.saving=!0,void this.cardsService.saveCard(this.card,n,i).subscribe(e=>{this.saving=!1,this.router.navigate(["/app/cards"],{queryParams:{fc:!this._masterCard}})})}this.step=this.step+1,this.stepService.setStep(this.step)}changeVideo(){this.selectedAvatar=null,this.uploadedVideo=null}avatarChanged(e){this.selectedAvatar=e,this.uploadedVideo=null}logoChanged(e){this.uploadedLogo=e}videoChanged(e){this.uploadedVideo=e,this.selectedAvatar=null}logoChangedCallback(e){console.log("changed",e),this.logoProperties=e}get cardName(){return this.heroForm.get("cardName")}get name(){return this.heroForm.get("name")}get lnames(){return this.heroForm.get("lnames")}get position(){return this.heroForm.get("position")}get email(){return this.heroForm.get("email")}get website(){return this.heroForm.get("website")}get cellphone(){return this.heroForm.get("cellphone")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Lt),o.Mb(ot),o.Mb(x.b),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-create-card"]],decls:6,vars:1,consts:[[1,"page-container","page-wizard"],[1,"row","cols-1"],[3,"formGroup",4,"ngIf"],[4,"ngIf"],[1,"buttons-container"],["class","btn btn--secondary btn--large btn-previous",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large button-with-icon",4,"ngIf"],[3,"formGroup"],["for","cardName"],["type","text","id","cardName","name","cardName","placeholder","Ingresa nombre de la tarjeta","formControlName","cardName"],["class","alert alert-danger",4,"ngIf"],["for","names"],["type","text","id","name","name","name","placeholder","Ingresa tu nombre","formControlName","name"],["for","lnames"],["type","text","id","lnames","name","lnames","placeholder","Ingresa tu apellido","formControlName","lnames"],["for","position"],["type","text","id","position","name","position","placeholder","Qu\xe9 cargo ocupas?","formControlName","position"],["for","email"],["type","text","id","email","name","email","placeholder","Ej: user@server.com","formControlName","email"],["for","cellphone"],["type","number","id","cellphone","name","cellphone","placeholder","57 1234567890","formControlName","cellphone"],["for","website"],["type","text","id","website","name","website","placeholder","Ej: https://www.server.com","formControlName","website"],[1,"alert","alert-danger"],[3,"photos","currentPhoto","selectedPhoto"],["title","Sube tu video","subtitle","Sube un video desde tu dispositivo","accept","video/mp4,video/x-m4v,video/*",3,"currentFile","selectedFiles",4,"ngIf"],["class","preview-avatar",4,"ngIf"],[1,"change-video-link",3,"click"],["title","Sube tu video","subtitle","Sube un video desde tu dispositivo","accept","video/mp4,video/x-m4v,video/*",3,"currentFile","selectedFiles"],[1,"preview-avatar"],["width","500","height","350","controls","","autoplay","",3,"src"],["thirdForm",""],["title","Sube tu logo","subtitle","Sube el logo que ir\xe1 en tu tarjeta (Archivos PNG, JPG)",3,"selectedFiles",4,"ngIf"],[1,"color-previewer__container"],[1,"color-picker__container"],[1,"color-picker_block"],["ngx-colors-trigger","",3,"formControl"],[1,"card-preview__container"],[3,"iconColor","fontColor","barColor","logo","video","avatar","profile","editable","logoScale","logoPosition","logoPropertiesChanged"],["title","Sube tu logo","subtitle","Sube el logo que ir\xe1 en tu tarjeta (Archivos PNG, JPG)",3,"selectedFiles"],[3,"iconColor","fontColor","barColor","logo","video","avatar","profile","logoScale","logoPosition"],[1,"btn","btn--secondary","btn--large","btn-previous",3,"click"],["aria-hidden","true",1,"left","fa","fa-light","fa-arrow-left"],[1,"btn","btn--tertiary","btn--large",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--tertiary","btn--large","button-with-icon"],[1,"lds-ring","ring-button"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"app-white-card"),o.yc(5,Fn,9,8,"ng-template"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.Bc("",t.card&&t.card.id?"Editar":"Crear"," tarjeta"))},directives:[P,m.l,x.s,x.k,x.g,x.a,x.j,x.e,x.n,Qt,en,tn.a,tn.c,x.d,ae,cn],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.color-previewer__container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-left:36px;margin-right:36px}[_nghost-%COMP%] .app-color-picker{display:inline;margin-right:10px}.color-previewer__container[_ngcontent-%COMP%]{margin-bottom:24px}.card-preview__container[_ngcontent-%COMP%]{width:50%}.color-picker_block[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center}.color-picker__container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:10px}.alert[_ngcontent-%COMP%]{margin-bottom:24px;margin-top:6px;font-size:13px;color:red}input[_ngcontent-%COMP%] + .alert[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:-20px}.btn-previous[_ngcontent-%COMP%]{margin-right:24px}.preview-avatar[_ngcontent-%COMP%]{text-align:center}.change-video-link[_ngcontent-%COMP%]{cursor:pointer;text-align:center;width:100%;display:block;margin-top:12px;margin-bottom:16px}"]}),e})();function En(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," T\xedtulo es requerido "),o.Rb())}function Tn(e,t){if(1&e&&(o.Sb(0,"div",15),o.yc(1,En,2,0,"div",4),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.title&&e.title.errors&&e.title.errors.required)}}function Vn(e,t){if(1&e&&(o.Sb(0,"form",9),o.Sb(1,"h4"),o.zc(2,"T\xedtulo y descripci\xf3n"),o.Rb(),o.Sb(3,"label",10),o.zc(4,"T\xedtulo del video"),o.Rb(),o.Nb(5,"input",11),o.yc(6,Tn,2,1,"div",12),o.Sb(7,"label",13),o.zc(8,"Descripci\xf3n del video"),o.Rb(),o.Sb(9,"textarea",14),o.zc(10," "),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.kc("formGroup",e.heroForm),o.Bb(6),o.kc("ngIf",(null==e.title?null:e.title.invalid)&&((null==e.title?null:e.title.dirty)||(null==e.title?null:e.title.touched)))}}function Ln(e,t){1&e&&(o.Sb(0,"div",15),o.Sb(1,"div"),o.zc(2," Video es requerido "),o.Rb(),o.Rb())}function Dn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Elige tu video"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Ten en cuenta que el video puede tener una duraci\xf3n m\xe1xima de 3 minutos."),o.Rb(),o.Sb(5,"app-upload-file",16),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoChanged(t)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.yc(6,Ln,3,0,"div",12),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(5),o.kc("currentFile",e.uploadedVideo),o.Bb(1),o.kc("ngIf",!e.uploadedVideo&&e.videoDirty)}}function $n(e,t){1&e&&(o.Sb(0,"div",15),o.Sb(1,"div"),o.zc(2," Thumb es requerido "),o.Rb(),o.Rb())}function An(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Elige la portada de tu video"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Elige una imagen de portada para la presentaci\xf3n que vas subir. Si no tienes una, cr\xe9ala o toma un pantallazo representativo del video."),o.Rb(),o.Sb(5,"app-upload-file",17),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).thumbChanged(t)}),o.Rb(),o.yc(6,$n,3,0,"div",12),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(5),o.kc("currentFile",e.uploadedThumb),o.Bb(1),o.kc("ngIf",!e.uploadedThumb&&e.thumbDirty)}}function Zn(e,t){if(1&e&&(o.Sb(0,"div",22),o.Sb(1,"video",23),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("src",e.uploadedVideo.previewSource,o.tc)}}function Un(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Finalizar"),o.Rb(),o.Sb(3,"p"),o.zc(4,"A continuaci\xf3n puedes revisar tu presentaci\xf3n."),o.Rb(),o.Sb(5,"div",18),o.Sb(6,"div",19),o.Sb(7,"h4"),o.zc(8,"Vista previa"),o.Rb(),o.yc(9,Zn,3,1,"div",20),o.Rb(),o.Sb(10,"div",21),o.Sb(11,"h4"),o.zc(12),o.Rb(),o.Sb(13,"p"),o.zc(14),o.Rb(),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(9),o.kc("ngIf",e.uploadedVideo&&(e.uploadedVideo.previewSource||e.uploadedVideo.source)),o.Bb(3),o.Ac(null==e.title?null:e.title.value),o.Bb(2),o.Ac(null==e.description?null:e.description.value)}}function Gn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",24),o.Zb("click",function(){return o.sc(e),o.dc(2).previous()}),o.Nb(1,"i",25),o.Sb(2,"span"),o.zc(3,"Anterior"),o.Rb(),o.Rb()}}function Qn(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Siguiente"),o.Rb())}function Yn(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Finalizar"),o.Rb())}function Wn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",26),o.Zb("click",function(){return o.sc(e),o.dc(2).continue()}),o.yc(1,Qn,2,0,"span",4),o.yc(2,Yn,2,0,"span",4),o.Nb(3,"i",27),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.step<4),o.Bb(1),o.kc("ngIf",4===e.step)}}function Hn(e,t){1&e&&(o.Sb(0,"a",28),o.Sb(1,"div",29),o.Nb(2,"div"),o.Nb(3,"div"),o.Nb(4,"div"),o.Nb(5,"div"),o.Rb(),o.Sb(6,"span"),o.zc(7,"Guardando..."),o.Rb(),o.Rb())}function Xn(e,t){if(1&e&&(o.yc(0,Vn,11,2,"form",3),o.yc(1,Dn,7,2,"form",4),o.yc(2,An,7,2,"form",4),o.yc(3,Un,15,3,"form",4),o.Sb(4,"div",5),o.yc(5,Gn,4,0,"a",6),o.yc(6,Wn,4,2,"a",7),o.yc(7,Hn,8,0,"a",8),o.Rb()),2&e){const e=o.dc();o.kc("ngIf",1===e.step),o.Bb(1),o.kc("ngIf",2===e.step),o.Bb(1),o.kc("ngIf",3===e.step),o.Bb(1),o.kc("ngIf",4===e.step),o.Bb(2),o.kc("ngIf",!e.saving&&e.step>1),o.Bb(1),o.kc("ngIf",!e.saving),o.Bb(1),o.kc("ngIf",e.saving)}}function Kn(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",30),o.Zb("result",function(t){return o.sc(e),o.dc().errorConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("message",e.errorMessage)}}let Jn=(()=>{class e{constructor(e,t,n,i){this.stepService=e,this.fb=t,this.presentationsService=n,this.router=i,this.saving=!1,this.videoDirty=!1,this.thumbDirty=!1,this.step=1,this.steps=["T\xedtulo y descripci\xf3n","Elige tu video","Elige la vista previa","Finalizar"],this.presentation={},this.heroForm=this.fb.group({title:["",x.q.required],description:[""]}),this.errorMessage="",this.uploadError=!1}ngOnInit(){var e,t;this.stepService.setStep(this.step),this.stepService.setStepsInfo(this.steps);const n=this.presentationsService.getCurrentPresentation();n&&(delete n.questions,delete n.tmpVideoPath,this.presentation=n,null===(e=this.title)||void 0===e||e.setValue(n.title),null===(t=this.description)||void 0===t||t.setValue(n.description),this.uploadedVideo=n.videoUri?{previewSource:n.videoUri}:n.videoPath?{previewSource:u+n.videoPath}:null,this.uploadedThumb=n.thumbUri?{previewSource:n.thumbUri}:n.thumbPath?{previewSource:u+n.thumbPath}:null)}previous(){1!==this.step&&(this.step=this.step-1,this.stepService.setStep(this.step))}continue(){var e,t;if(1===this.step){if(!this.heroForm.valid)return void this.heroForm.markAllAsTouched()}else if(2==this.step){if(this.videoDirty=!0,!this.uploadedVideo)return}else if(3==this.step){if(this.thumbDirty=!0,!this.uploadedThumb)return}else if(4===this.step){this.presentation.title=null===(e=this.title)||void 0===e?void 0:e.value,this.presentation.description=null===(t=this.description)||void 0===t?void 0:t.value;const n=this.uploadedVideo&&this.uploadedVideo.files?this.uploadedVideo.files:null,i=this.uploadedThumb&&this.uploadedThumb.files?this.uploadedThumb.files:null;let o=null,r=null;return n&&(o=n.nativeElement&&n.nativeElement.files?n.nativeElement.files[0]:null),i&&(r=i.nativeElement&&i.nativeElement.files?i.nativeElement.files[0]:null),this.saving=!0,void this.presentationsService.savePresentation(this.presentation,o,r,null,null).subscribe(e=>{this.saving=!1,this.router.navigate(["/app/cards"],{queryParams:{t:"2"}})})}this.step=this.step+1,this.stepService.setStep(this.step)}videoChanged(e){this.uploadedVideo=e}thumbChanged(e){this.uploadedThumb=e}videoUploadError(e){e&&e.code&&(this.errorMessage="El video de presentaci\xf3n que est\xe1s intentado subir excede el peso permitido de 25 megas, por favor aj\xfastalo e intenta nuevamente.",this.uploadError=!0)}errorConfirmationCallback(e){this.uploadError=!1}get title(){return this.heroForm.get("title")}get description(){return this.heroForm.get("description")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Lt),o.Mb(x.b),o.Mb(rt),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-create-presentation"]],decls:7,vars:1,consts:[[1,"page-container","page-wizard"],[1,"row","cols-1"],[3,"message","result",4,"ngIf"],[3,"formGroup",4,"ngIf"],[4,"ngIf"],[1,"buttons-container"],["class","btn btn--secondary btn--large btn-previous",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large button-with-icon",4,"ngIf"],[3,"formGroup"],["for","title"],["type","text","id","title","name","title","placeholder","Escribe un t\xedtulo","formControlName","title"],["class","alert alert-danger",4,"ngIf"],["for","description"],["rows","10","type","text","id","description","name","description","placeholder","Escribe una descripci\xf3n","formControlName","description"],[1,"alert","alert-danger"],["title","Elige el archivo de tu video","subtitle","Carga el video para tu presentaci\xf3n","accept","video/mp4,video/x-m4v,video/*",3,"currentFile","selectedFiles","error"],["title","Elige la portada o vista previa de tu video","subtitle","Carga la imagen para tu presentaci\xf3n",3,"currentFile","selectedFiles"],[1,"preview__container"],[1,"preview__left"],["class","preview__video",4,"ngIf"],[1,"preview__right"],[1,"preview__video"],["width","500","height","350","controls","",3,"src"],[1,"btn","btn--secondary","btn--large","btn-previous",3,"click"],["aria-hidden","true",1,"left","fa","fa-light","fa-arrow-left"],[1,"btn","btn--tertiary","btn--large",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--tertiary","btn--large","button-with-icon"],[1,"lds-ring","ring-button"],[3,"message","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Crea tu presentaci\xf3n"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"app-white-card"),o.yc(5,Xn,8,7,"ng-template"),o.Rb(),o.Rb(),o.Rb(),o.yc(6,Kn,1,1,"app-confirmation-dialog",2)),2&e&&(o.Bb(6),o.kc("ngIf",t.uploadError))},directives:[P,m.l,x.s,x.k,x.g,x.a,x.j,x.e,en,dt],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.color-previewer__container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-left:36px;margin-right:36px}[_nghost-%COMP%] .app-color-picker{display:inline;margin-right:10px}.color-previewer__container[_ngcontent-%COMP%]{margin-bottom:24px}.card-preview__container[_ngcontent-%COMP%]{width:50%}.color-picker_block[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center}.color-picker__container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:10px}.alert[_ngcontent-%COMP%]{margin-bottom:24px;margin-top:6px;font-size:13px;color:red}input[_ngcontent-%COMP%] + .alert[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:-20px}.preview__container[_ngcontent-%COMP%]{display:flex}.preview__left[_ngcontent-%COMP%], .preview__right[_ngcontent-%COMP%]{width:50%}.preview__left[_ngcontent-%COMP%]{padding-right:30px;margin-bottom:24px}.preview__video[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:nowrap;justify-content:center;align-content:center;align-items:center;flex-direction:row}.preview__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{margin-top:-44px;width:90%}h4[_ngcontent-%COMP%]{color:#3a5081}"]}),e})();function ei(e,t){1&e&&(o.Sb(0,"div",5),o.Nb(1,"img",6),o.Rb())}function ti(e,t){if(1&e&&(o.Sb(0,"div",7),o.zc(1),o.ec(2,"slice"),o.ec(3,"uppercase"),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Bc(" ",o.hc(2,1,o.fc(3,5,null==e.contact?null:e.contact.email),0,1)," ")}}function ni(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",8),o.Zb("click",function(){return o.sc(e),o.dc(2).seeDetail()}),o.zc(1,"Ver detalle"),o.Rb()}}function ii(e,t){if(1&e&&(o.Sb(0,"div",0),o.yc(1,ei,2,0,"div",1),o.yc(2,ti,4,7,"div",2),o.yc(3,ni,2,0,"a",3),o.Sb(4,"div",4),o.Sb(5,"h4"),o.zc(6),o.Rb(),o.Sb(7,"small"),o.zc(8),o.Rb(),o.Nb(9,"br"),o.Sb(10,"small"),o.zc(11),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",e.contact.profileUri),o.Bb(1),o.kc("ngIf",!e.contact.profileUri),o.Bb(1),o.kc("ngIf",e.seeMore),o.Bb(3),o.Ac(e.contact.name),o.Bb(2),o.Bc("Correo: ",e.contact.email,""),o.Bb(3),o.Bc("Tel\xe9fono: ",e.contact.phone,"")}}let oi=(()=>{class e{constructor(){this.contact={},this.seeMore=!0,this.result=new o.n}ngOnInit(){}seeDetail(){this.result.emit({contact:this.contact})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-customer-card"]],inputs:{contact:"contact",seeMore:"seeMore"},outputs:{result:"result"},decls:2,vars:0,consts:[[1,"customer-card"],["class","customer-card__profile-container",4,"ngIf"],["class","customer-card__profile-container__profile customer-card__profile-container__profile--placeholder",4,"ngIf"],["class","btn btn--secondary btn--small customer-card__select-btn",3,"click",4,"ngIf"],[1,"customer-card__profile-details"],[1,"customer-card__profile-container"],["src","/assets/images/user-placeholder.png"],[1,"customer-card__profile-container__profile","customer-card__profile-container__profile--placeholder"],[1,"btn","btn--secondary","btn--small","customer-card__select-btn",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,ii,12,6,"ng-template"),o.Rb())},directives:[P,m.l],pipes:[m.s,m.t],styles:["[_nghost-%COMP%]{position:relative}[_nghost-%COMP%] .customer-card__select-btn[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px}[_nghost-%COMP%] .customer-card__profile-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden}[_nghost-%COMP%] .customer-card__profile-container__profile[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden;background-size:80%;border:1px solid #fafafa;background-repeat:no-repeat;background-position:50%;display:inline-block;box-shadow:1px 1px 3px}[_nghost-%COMP%] .customer-card__profile-container__profile--placeholder[_ngcontent-%COMP%]{background-color:#3a5081;color:#fff;line-height:50px;width:50px;text-align:center}[_nghost-%COMP%] .customer-card__profile-details[_ngcontent-%COMP%]{color:#3a5081}[_nghost-%COMP%] .customer-card__profile-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:#3a5081}"]}),e})();function ri(e,t){if(1&e&&o.Nb(0,"app-customer-card",14),2&e){const e=o.dc();o.kc("seeMore",!1)("contact",e.user)}}function ci(e,t){if(1&e&&o.Nb(0,"app-metric-card",15),2&e){const e=o.dc();o.kc("value",null==e.metrics?null:e.metrics.firstDate)("showMore",!1)}}function si(e,t){1&e&&o.Nb(0,"app-business-card",16),2&e&&o.kc("contact",t.$implicit)}function ai(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",17),o.Sb(1,"a",18),o.Zb("click",function(){return o.sc(e),o.dc().loadMoreItems()}),o.zc(2,"Ver m\xe1s"),o.Rb(),o.Rb()}}let li=(()=>{class e{constructor(e,t,n){this.contactsService=e,this.sharesService=t,this.router=n,this.contacts=[],this.metrics={},this.email="",this.maxValue=9}ngOnInit(){this.user=this.contactsService.getCurrentContact(),this.user&&this.user.email?this.email=this.user.email:this.router.navigate(["app","customers"]),this.sharesService.getDeals("sent").subscribe(e=>{this.contacts=e.filter(e=>e.contact&&e.contact.email===this.email);let t="Ninguno",n="N/A";this.contacts.length>0&&(t=this.contacts[0].createdAt?this.contacts[0].createdAt:"N/A",n="sent"===this.contacts[this.contacts.length-1].state?"Enviado":"rejected"===this.contacts[this.contacts.length-1].state?"Descartado":"accepted"===this.contacts[this.contacts.length-1].state?"Aceptado":"Desconocido"),this.metrics={deals:this.contacts.length,presentations:this.contacts.filter(e=>e&&e.share&&e.share.presentationId).length,firstDate:t,lastState:n}})}loadMoreItems(){this.maxValue+=9}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ne),o.Mb(y),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-customer-detail"]],decls:22,vars:17,consts:[[1,"page-container"],[1,"row","cols-1","cols-3-xl"],[3,"seeMore","contact",4,"ngIf"],["theme","","icon","check","title","Primer contacto realizado",3,"value","showMore",4,"ngIf"],["theme","","icon","info-circle","title","N\xfamero de contactos realizados",3,"value","showMore"],["theme","","icon","times","title","Estado \xfaltimo negocio",3,"value","showMore"],["theme","","icon","check","title","Presentaciones enviadas",3,"value","showMore"],["theme","","icon","check","value","0","title","Presentaciones reenviadas",3,"showMore"],["theme","","icon","info-circle","title","Negocios del cliente",3,"value","showMore"],[1,"row","customer-list"],[1,"headline"],[1,"subtitle"],[3,"contact",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[3,"seeMore","contact"],["theme","","icon","check","title","Primer contacto realizado",3,"value","showMore"],[3,"contact"],[1,"row"],[1,"btn","btn--tertiary","btn--medium","see-more-btn",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Detalle del Cliente"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.yc(4,ri,1,2,"app-customer-card",2),o.yc(5,ci,1,2,"app-metric-card",3),o.Nb(6,"app-metric-card",4),o.Nb(7,"app-metric-card",5),o.Rb(),o.Sb(8,"div",1),o.Nb(9,"app-metric-card",6),o.Nb(10,"app-metric-card",7),o.Nb(11,"app-metric-card",8),o.Rb(),o.Sb(12,"div",9),o.Sb(13,"div",10),o.Sb(14,"h3"),o.zc(15,"Listado de negocios"),o.Rb(),o.Sb(16,"p",11),o.zc(17,"Este es el listado de negocios de este cliente."),o.Rb(),o.Rb(),o.Sb(18,"div",1),o.yc(19,si,1,1,"app-business-card",12),o.ec(20,"slice"),o.Rb(),o.yc(21,ai,3,0,"div",13),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("ngIf",t.user),o.Bb(1),o.kc("ngIf",!1),o.Bb(1),o.kc("value",null==t.metrics?null:t.metrics.deals)("showMore",!1),o.Bb(1),o.kc("value",null==t.metrics?null:t.metrics.lastState)("showMore",!1),o.Bb(2),o.kc("value",null==t.metrics?null:t.metrics.presentations)("showMore",!1),o.Bb(1),o.kc("showMore",!1),o.Bb(1),o.kc("value",null==t.metrics?null:t.metrics.deals)("showMore",!1),o.Bb(8),o.kc("ngForOf",o.hc(20,13,t.contacts,0,t.maxValue)),o.Bb(2),o.kc("ngIf",t.contacts.length-t.maxValue>0))},directives:[m.l,Le,m.k,oi,Ue],pipes:[m.s],styles:[".customer-list[_ngcontent-%COMP%]{margin-bottom:180px}.see-more-btn[_ngcontent-%COMP%]{width:120px;text-align:center;margin:0 auto}"]}),e})();var di=n("Kj3r");const bi=["searchInput"];function pi(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-customer-card",14),o.Zb("result",function(t){return o.sc(e),o.dc().seeDetail(t)}),o.Rb()}2&e&&o.kc("contact",t.$implicit)}function ui(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",15),o.Sb(1,"a",16),o.Zb("click",function(){return o.sc(e),o.dc().loadMoreItems()}),o.zc(2,"Ver m\xe1s"),o.Rb(),o.Rb()}}let hi=(()=>{class e{constructor(e,t,n){this.contactsService=e,this.sharesService=t,this.router=n,this.contacts=[],this.filteredContacts=[],this.metrics={},this.maxValue=9,this.searchInitiated=!1}initSearch(){this.searchInput&&!this.searchInitiated&&(this.searchInitiated=!0,Object(B.a)(this.searchInput.nativeElement,"keyup").pipe(Object(nt.a)(Boolean),Object(di.a)(500),Object(Tt.a)()).subscribe(()=>{this.filterContacts()}))}filterContacts(){let e=this.searchInput?this.searchInput.nativeElement.value.toLowerCase():"";this.filteredContacts=this.contacts.filter(t=>{var n,i;const o=!(!t||!t.name)&&(null===(n=t.name)||void 0===n?void 0:n.toLowerCase().indexOf(e))>-1,r=!(!t||!t.email)&&(null===(i=t.email)||void 0===i?void 0:i.toLowerCase().indexOf(e))>-1;return o||r})}ngOnInit(){this.contactsService.getContacts().subscribe(e=>{this.contacts=e.reduce((e,t)=>{const n=e.find(e=>e.email===t.email);return n?n.name=n.name?n.name:t.name:e.push(t),e},[]),this.filteredContacts=this.contacts,this.initSearch()}),this.sharesService.getMetrics().subscribe(e=>{this.metrics=e})}see(e){"success"===e||"failed"===e?this.router.navigate(["app","business"]):"pending"===e&&this.router.navigate(["app","leads"])}seeDetail(e){this.contactsService.setCurrentContact(e.contact),this.router.navigate(["app","customer"])}loadMoreItems(){this.maxValue+=9}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ne),o.Mb(y),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-customers"]],viewQuery:function(e,t){if(1&e&&o.Dc(bi,1),2&e){let e;o.oc(e=o.ac())&&(t.searchInput=e.first)}},decls:21,vars:5,consts:[[1,"page-container"],[1,"row","cols-1","cols-3-xl"],["theme","success","icon","check","title","Negocios exitosos",3,"value","seeMore"],["theme","action","icon","info-circle","title","Negocios pendientes",3,"value","seeMore"],["theme","error","icon","times","title","Negocios fallidos",3,"value","seeMore"],[1,"row","customer-list"],[1,"headline"],[1,"subtitle"],[1,"search-group"],["for","search"],["type","text","placeholder","Ingrese el criterio de b\xfasqueda"],["searchInput",""],[3,"contact","result",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[3,"contact","result"],[1,"row"],[1,"btn","btn--tertiary","btn--medium","see-more-btn",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Clientes contactados"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"app-metric-card",2),o.Zb("seeMore",function(){return t.see("success")}),o.Rb(),o.Sb(5,"app-metric-card",3),o.Zb("seeMore",function(){return t.see("pending")}),o.Rb(),o.Sb(6,"app-metric-card",4),o.Zb("seeMore",function(){return t.see("failed")}),o.Rb(),o.Rb(),o.Sb(7,"div",5),o.Sb(8,"div",6),o.Sb(9,"h3"),o.zc(10,"Listado de clientes"),o.Rb(),o.Sb(11,"p",7),o.zc(12,"Este es el listado de tus clientes contactados."),o.Rb(),o.Sb(13,"div",8),o.Sb(14,"label",9),o.zc(15,"B\xfascador"),o.Rb(),o.Nb(16,"input",10,11),o.Rb(),o.Rb(),o.Sb(18,"div",1),o.yc(19,pi,1,1,"app-customer-card",12),o.Rb(),o.yc(20,ui,3,0,"div",13),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("value",t.metrics.accepted),o.Bb(1),o.kc("value",t.metrics.sent),o.Bb(1),o.kc("value",t.metrics.rejected),o.Bb(13),o.kc("ngForOf",t.filteredContacts),o.Bb(1),o.kc("ngIf",t.contacts.length-t.maxValue>0))},directives:[Le,m.k,m.l,oi],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.buttons-container[_ngcontent-%COMP%]{display:flex;grid-gap:24px}.customer-list[_ngcontent-%COMP%]{position:relative;margin-bottom:180px}.customer-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:10px}.customer-list[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin-top:0}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%]{width:300px;position:absolute;right:0;top:24px}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-image:url(https://img.icons8.com/ios-glyphs/344/search--v1.png);background-repeat:no-repeat;background-position:100%;background-size:22px 22px;background-position-x:267px}.see-more-btn[_ngcontent-%COMP%]{width:120px;text-align:center;margin:0 auto}"]}),e})();function gi(e,t){if(1&e&&o.Nb(0,"img",8),2&e){const e=o.dc(2);o.kc("src",null==e.presentation?null:e.presentation.companyLogoUri,o.tc)}}function mi(e,t){if(1&e&&o.Nb(0,"img",8),2&e){const e=o.dc(2);o.kc("src",null==e.presentation||null==e.presentation.defaultCard?null:e.presentation.defaultCard.logoUri,o.tc)}}function fi(e,t){if(1&e&&(o.Sb(0,"div",6),o.yc(1,gi,1,1,"img",7),o.yc(2,mi,1,1,"img",7),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngIf",null==e.presentation?null:e.presentation.companyLogoUri),o.Bb(1),o.kc("ngIf",!(null!=e.presentation&&e.presentation.companyLogoUri)&&(null==e.presentation?null:e.presentation.defaultCard)&&(null==e.presentation||null==e.presentation.defaultCard?null:e.presentation.defaultCard.logoUri))}}function vi(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h4",9),o.zc(2),o.Rb(),o.Sb(3,"p",10),o.zc(4),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(2),o.Ac(null==e.presentation?null:e.presentation.title),o.Bb(2),o.Ac(null==e.presentation?null:e.presentation.description)}}function _i(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",11),o.Sb(1,"a",12),o.Zb("click",function(){return o.sc(e),o.dc().back()}),o.Nb(2,"i",13),o.zc(3," Regresar "),o.Rb(),o.Rb()}}function Si(e,t){1&e&&(o.Sb(0,"h4"),o.zc(1,"Video presentaci\xf3n enviada"),o.Rb())}function Ci(e,t){if(1&e&&o.Nb(0,"app-video-container",23),2&e){const e=o.dc(3);o.kc("thumbPath",e.presentation.thumbUri)("videoPath",e.presentation.videoUri)}}function xi(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",28),o.Zb("click",function(){o.sc(e);const n=t.index,i=o.dc(4);return i.currentQuestion=i.presentation.questions[n]}),o.zc(1),o.Rb()}if(2&e){const e=t.index;o.Bb(1),o.Bc(" ",e+1," ")}}function yi(e,t){if(1&e&&(o.Sb(0,"div",24),o.Sb(1,"div",25),o.zc(2," Preguntas frecuentes "),o.Rb(),o.Sb(3,"div",26),o.yc(4,xi,2,1,"a",27),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(4),o.kc("ngForOf",e.presentation.questions)}}function Ri(e,t){if(1&e&&(o.Sb(0,"h4"),o.zc(1),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.Ac(e.currentQuestion.title)}}function Pi(e,t){if(1&e&&(o.Sb(0,"div",29),o.Nb(1,"app-video-container",30),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("videoPath",e.currentQuestion.videoUri)}}function ki(e,t){1&e&&(o.Sb(0,"h4"),o.zc(1,"Tarjeta enviada"),o.Rb())}function wi(e,t){if(1&e&&(o.Sb(0,"div",31),o.Nb(1,"app-pp-card",32),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("card",e.presentation.defaultCard)}}function Oi(e,t){1&e&&(o.Sb(0,"p"),o.zc(1,"Haz click en el siguiente bot\xf3n para descargar el documento adjunto:"),o.Rb())}function Mi(e,t){if(1&e&&(o.Sb(0,"a",33),o.Sb(1,"span"),o.zc(2,"Descargar documento"),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.kc("href",e.presentation.pdfUri,o.tc)}}function Ii(e,t){if(1&e&&(o.Sb(0,"div"),o.yc(1,Si,2,0,"h4",2),o.Sb(2,"div",14),o.yc(3,Ci,1,2,"app-video-container",15),o.Rb(),o.yc(4,yi,5,1,"div",16),o.yc(5,Ri,2,1,"h4",2),o.yc(6,Pi,2,1,"div",17),o.Nb(7,"br"),o.yc(8,ki,2,0,"h4",2),o.yc(9,wi,2,1,"div",18),o.Nb(10,"br"),o.yc(11,Oi,2,0,"p",2),o.yc(12,Mi,3,1,"a",19),o.Sb(13,"a",20),o.Sb(14,"span"),o.zc(15,"Hagamos negocio"),o.Rb(),o.Nb(16,"i",21),o.Rb(),o.Sb(17,"a",22),o.Sb(18,"span"),o.zc(19,"Me interesa pr\xf3ximamente"),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",null==e.presentation?null:e.presentation.id),o.Bb(2),o.kc("ngIf",e.presentation&&e.presentation.videoUri),o.Bb(1),o.kc("ngIf",null==e.presentation||null==e.presentation.questions?null:e.presentation.questions.length),o.Bb(1),o.kc("ngIf",e.currentQuestion),o.Bb(1),o.kc("ngIf",e.currentQuestion&&e.currentQuestion.videoUri),o.Bb(2),o.kc("ngIf",e.presentation&&e.presentation.defaultCard),o.Bb(1),o.kc("ngIf",e.presentation&&e.presentation.defaultCard),o.Bb(2),o.kc("ngIf",!1),o.Bb(1),o.kc("ngIf",!!e.presentation.pdfUri)}}function Bi(e,t){if(1&e&&o.yc(0,Ii,20,9,"div",2),2&e){const e=o.dc();o.kc("ngIf",e.presenting)}}let zi=(()=>{class e{constructor(e,t,n,i){this.route=e,this.authService=t,this.presentationService=n,this.fb=i,this.closed=!1,this.shareId="",this.dealDone=!1,this.dealRejected=!1,this.noUserFlag=!1,this.presenting=!0,this.dataSent=!1,this.heroForm=this.fb.group({name:[""],email:[""],whatsapp:[""],idplatpres:[""]})}ngOnInit(){this.routeSub=this.route.params.subscribe(e=>{this.shareId=e.id,this.presentationService.getPresentation(parseInt(this.shareId)).subscribe(e=>{this.presentation=e,this.closed="accepted"===this.deal.state||"rejected"===this.deal.state})})}back(){this.presenting=!0,this.dealDone=!1,this.dealRejected=!1,this.closed=!0}ngOnDestroy(){this.routeSub.unsubscribe()}get name(){return this.heroForm.get("name")}get email(){return this.heroForm.get("email")}get whatsapp(){return this.heroForm.get("whatsapp")}get idplatpres(){return this.heroForm.get("idplatpres")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(g),o.Mb(rt),o.Mb(x.b))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-fake-presentation"]],decls:8,vars:3,consts:[[1,"page-header"],["class","logo-container",4,"ngIf"],[4,"ngIf"],["class","presentation__back-button",4,"ngIf"],[1,"page-container"],[1,"row","cols-1","card-container"],[1,"logo-container"],[3,"src",4,"ngIf"],[3,"src"],[1,"presentation__title"],[1,"presentation__description"],[1,"presentation__back-button"],[3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-left"],[1,"preview__video"],[3,"thumbPath","videoPath",4,"ngIf"],["class","questions__container",4,"ngIf"],["class","question__video",4,"ngIf"],["class","card__container",4,"ngIf"],["class","btn btn--tertiary btn--large btn-deal","target","_blank",3,"href",4,"ngIf"],[1,"btn","btn--tertiary","btn--large","btn-deal"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--secondary","btn--large"],[3,"thumbPath","videoPath"],[1,"questions__container"],[1,"questions__heading"],[1,"questions__buttons"],["class","btn btn--small btn--secondary",3,"click",4,"ngFor","ngForOf"],[1,"btn","btn--small","btn--secondary",3,"click"],[1,"question__video"],[3,"videoPath"],[1,"card__container"],[3,"card"],["target","_blank",1,"btn","btn--tertiary","btn--large","btn-deal",3,"href"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.yc(1,fi,3,2,"div",1),o.yc(2,vi,5,2,"div",2),o.Rb(),o.yc(3,_i,4,0,"div",3),o.Sb(4,"div",4),o.Sb(5,"div",5),o.Sb(6,"app-white-card"),o.yc(7,Bi,1,1,"ng-template"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("ngIf",t.presentation),o.Bb(1),o.kc("ngIf",t.presenting),o.Bb(1),o.kc("ngIf",!t.presenting))},directives:[m.l,P,me,m.k,ae],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow-y:scroll}[_nghost-%COMP%] app-white-card{display:table}[_nghost-%COMP%] app-white-card h4{color:#3a5081;margin-top:0}.register-dialog[_ngcontent-%COMP%]{margin-bottom:24px}.page-container[_ngcontent-%COMP%]{display:table}.card-container[_ngcontent-%COMP%]{overflow:hidden}.preview__video[_ngcontent-%COMP%]{margin:36px 20px 20px;width:50%}.presentation__title[_ngcontent-%COMP%]{margin-bottom:0}.presentation__description[_ngcontent-%COMP%]{max-width:800px}.card__container[_ngcontent-%COMP%]{width:50%}.btn-deal[_ngcontent-%COMP%]{margin-right:10px}.presentation__back-button[_ngcontent-%COMP%]{line-height:20px;font-weight:700;color:#3a5081;margin-bottom:32px;cursor:pointer;margin-top:16px}.presentation__back-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-weight:400;margin-right:8px;color:#c4dd4b}.register-dialog[_ngcontent-%COMP%]{border-radius:15px;background:#1e192f;padding:16px;color:#fafafa}.register-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:16px;color:#c4dd4b}.logo-container[_ngcontent-%COMP%]{width:150px;padding:16px;border-radius:12px;box-shadow:0 2.8px 2.2px rgba(0,0,0,.03),0 6.7px 5.3px rgba(0,0,0,.05),0 12.5px 10px rgba(0,0,0,.06),0 7px 20px rgba(0,0,0,.07),0 41.8px 33.4px rgba(0,0,0,.09),0 100px 80px rgba(0,0,0,.12)}.logo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.questions__container[_ngcontent-%COMP%]{color:#3a5081;background-color:#72eddb;padding:16px;border-radius:8px;width:50%;display:flex;margin-bottom:24px}.questions__heading[_ngcontent-%COMP%]{display:inline-block;width:110px;line-height:23px;height:50px}.questions__buttons[_ngcontent-%COMP%]{display:inline-block;height:50px;margin-left:10px;line-height:50px}.questions__buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin-right:6px}.question__video[_ngcontent-%COMP%]{margin:36px 20px 20px;width:50%}.page-header[_ngcontent-%COMP%]{display:flex;margin-top:36px;margin-bottom:24px;column-gap:24px;align-items:flex-start}.page-header[_ngcontent-%COMP%] .presentation__title[_ngcontent-%COMP%]{margin-top:0}"]}),e})();const Ni=["searchInput"];function qi(e,t){1&e&&o.Nb(0,"div",12)}function Fi(e,t){if(1&e&&(o.Sb(0,"div",13),o.zc(1),o.ec(2,"slice"),o.Rb()),2&e){const e=o.dc().$implicit;o.Bb(1),o.Bc(" ",o.hc(2,1,e.title,0,1)," ")}}const ji=function(e){return["/app","virtual-room",e]};function Ei(e,t){if(1&e&&(o.Sb(0,"div",6),o.yc(1,qi,1,0,"div",7),o.yc(2,Fi,3,5,"div",8),o.Sb(3,"div",9),o.Sb(4,"div",10),o.zc(5),o.Sb(6,"strong"),o.zc(7),o.Rb(),o.zc(8),o.Rb(),o.Sb(9,"div",11),o.zc(10),o.Rb(),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.kc("routerLink",o.mc(7,ji,e.ref)),o.Bb(1),o.kc("ngIf",e.logoUri),o.Bb(1),o.kc("ngIf",!e.logoUri),o.Bb(3),o.Bc(" ",e.prefix,""),o.Bb(2),o.Ac(e.content),o.Bb(1),o.Bc("",e.suffix," "),o.Bb(2),o.Bc(" Id Platpres: ",e.id," ")}}function Ti(e,t){if(1&e&&(o.Sb(0,"div",4),o.yc(1,Ei,11,9,"div",5),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngForOf",e.results)}}let Vi=(()=>{class e{constructor(e){this.companiesService=e,this.searching=!1,this.results=[],this.searchInitiated=!1}ngOnInit(){}ngAfterViewInit(){this.initSearch()}initSearch(){this.searchInput&&!this.searchInitiated&&(this.searchInitiated=!0,Object(B.a)(this.searchInput.nativeElement,"keyup").pipe(Object(nt.a)(Boolean),Object(di.a)(500),Object(Tt.a)()).subscribe(()=>{this.searchCompanies()}))}focusOutCallback(e){setTimeout(()=>{this.searching=!1},300)}focusCallback(){this.results&&this.results.length&&(this.searching=!0)}searchCompanies(){this.searching=!0,this.companiesService.searchCompanies(this.searchInput?this.searchInput.nativeElement.value:"",[],[]).subscribe(e=>{this.results=e.filter(e=>e.ref).map(e=>({logoUri:e.logoUri,id:e.id,ref:e.ref,title:e.name,prefix:e.name,content:"",suffix:""}))})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ot))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-search"]],viewQuery:function(e,t){if(1&e&&o.Dc(Ni,1),2&e){let e;o.oc(e=o.ac())&&(t.searchInput=e.first)}},decls:6,vars:1,consts:[[1,"search-input"],["type","text","placeholder","Ingresa el criterio de b\xfasqueda",3,"focus","focusout"],["searchInput",""],["class","autocomplete-items",4,"ngIf"],[1,"autocomplete-items"],["class","autocomplete-item",3,"routerLink",4,"ngFor","ngForOf"],[1,"autocomplete-item",3,"routerLink"],["class","autocomplete-item__profile","style","background-image: url('/assets/images/platpres_logo.png')",4,"ngIf"],["class","autocomplete-item__profile autocomplete-item__profile--placeholder",4,"ngIf"],[1,"autocomplete-item__info"],[1,"autocomplete-item__title"],[1,"autocomplete-item__subtitle"],[1,"autocomplete-item__profile",2,"background-image","url('/assets/images/platpres_logo.png')"],[1,"autocomplete-item__profile","autocomplete-item__profile--placeholder"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Sb(1,"input",1,2),o.Zb("focus",function(){return t.focusCallback()})("focusout",function(e){return t.focusOutCallback(e)}),o.Rb(),o.Sb(3,"mat-icon"),o.zc(4,"search"),o.Rb(),o.yc(5,Ti,2,1,"div",3),o.Rb()),2&e&&(o.Bb(5),o.kc("ngIf",t.searching))},directives:[s.a,m.l,m.k,l.g],pipes:[m.s],styles:[".search-input[_ngcontent-%COMP%]{position:relative;width:50%}.search-input[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{top:16px;position:absolute;right:11px}.search-input[_ngcontent-%COMP%] .autocomplete-items[_ngcontent-%COMP%]{position:absolute;border:1px solid #d4d4d4;border-top:none;border-bottom:none;z-index:99;top:50px;left:0;right:0;max-height:292px;overflow:scroll}.search-input[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]{padding:10px;cursor:pointer;background-color:#fff;border-bottom:1px solid #d4d4d4;display:flex}.search-input[_ngcontent-%COMP%] .autocomplete-item__info[_ngcontent-%COMP%]{display:inline-block;margin-left:16px;margin-top:4px}.search-input[_ngcontent-%COMP%] .autocomplete-item__subtitle[_ngcontent-%COMP%]{font-size:13px}.search-input[_ngcontent-%COMP%] .autocomplete-item__profile[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden;background-size:80%;border:1px solid #fafafa;background-repeat:no-repeat;background-position:50%;display:inline-block;box-shadow:1px 1px 3px}.search-input[_ngcontent-%COMP%] .autocomplete-item__profile--placeholder[_ngcontent-%COMP%]{background-color:#ccc;line-height:50px;width:50px;text-align:center}.search-input[_ngcontent-%COMP%] .autocomplete-item[_ngcontent-%COMP%]:hover{background-color:#e9e9e9}.autocomplete-active[_ngcontent-%COMP%]{background-color:#1e90ff!important;color:#fff}"]}),e})();function Li(e,t){if(1&e&&o.Nb(0,"app-pp-card",12),2&e){const e=o.dc(2);o.kc("card",e.card)}}function Di(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",7),o.zc(1,"Tu tarjeta master"),o.Rb(),o.yc(2,Li,1,1,"app-pp-card",8),o.Sb(3,"div",9),o.Sb(4,"a",10),o.Zb("click",function(){o.sc(e);const t=o.dc();return t.shareCard(t.card,{})}),o.zc(5," Compartir "),o.Rb(),o.Sb(6,"a",11),o.zc(7," Invitar amigos "),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(2),o.kc("ngIf",e.card&&e.card.id)}}function $i(e,t){if(1&e&&(o.Sb(0,"div",16),o.Sb(1,"div",17),o.zc(2),o.ec(3,"slice"),o.ec(4,"uppercase"),o.Rb(),o.Sb(5,"div",18),o.zc(6),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.Bb(2),o.Bc(" ",o.hc(3,2,o.fc(4,6,e.email),0,1)," "),o.Bb(4),o.Bc(" ",e.name," ")}}function Ai(e,t){1&e&&(o.Sb(0,"div",9),o.Sb(1,"a",19),o.zc(2," Ver m\xe1s clientes "),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("routerLink","/app/customers"))}function Zi(e,t){if(1&e&&(o.Sb(0,"div",7),o.zc(1,"Listado de clientes"),o.Rb(),o.Sb(2,"div",13),o.yc(3,$i,7,8,"div",14),o.ec(4,"slice"),o.Rb(),o.yc(5,Ai,3,1,"div",15)),2&e){const e=o.dc();o.Bb(3),o.kc("ngForOf",o.hc(4,2,e.contacts,0,5)),o.Bb(2),o.kc("ngIf",e.contacts.length>5)}}function Ui(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",20),o.Zb("result",function(t){return o.sc(e),o.dc().welcomeConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("videoSrc",e.welcomeVideoSrc)("centered",!0)}}let Gi=(()=>{class e{constructor(e,t,n,i,o,r){this.sharesService=e,this.cardsService=t,this.contactsService=n,this.route=i,this.presentationsService=o,this.router=r,this.metrics={},this.card={},this.contacts=[],this.welcomeFlag=!1,this.welcomeVideoSrc="https://platpres-digital2.s3.amazonaws.com/public/1/video-instrucciones-platpres.mp4"}ngOnInit(){this.sharesService.getMetrics().subscribe(e=>{this.metrics=e}),this.cardsService.getCards().subscribe(e=>{e&&e.length>0&&(this.card=e[0])}),this.contactsService.getContacts().subscribe(e=>{this.contacts=e.reduce((e,t)=>{const n=e.find(e=>e.email===t.email);return n?n.name=n.name?n.name:t.name:e.push(t),e},[])}),this.route.queryParams.pipe(Object(nt.a)(e=>e.welcome)).subscribe(e=>{console.log(e),e&&"true"===e.welcome&&(this.welcomeFlag=!0)})}welcomeConfirmationCallback(e){this.welcomeFlag=!1,this.router.navigate(["/app/wizards/create-card"])}shareCard(e,t){this.cardsService.setCurrentCard(e),this.presentationsService.setCurrentPresentation(t),this.router.navigate(["/app/wizards/share-card"])}seeMoreAccepted(e){this.router.navigate(["app","business"])}seeMorePending(e){this.router.navigate(["app","leads"])}seeMoreRejected(e){this.router.navigate(["app","leads"])}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(y),o.Mb(ot),o.Mb(Ne),o.Mb(l.a),o.Mb(rt),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-home"]],decls:14,vars:4,consts:[[1,"page-container"],[1,"row","cols-1","cols-3-xl"],["theme","success","icon","check","title","Negocios exitosos",3,"value","seeMore"],["theme","action","icon","info-circle","title","Negocios pendientes",3,"value","seeMore"],["theme","error","icon","times","title","Negocios fallidos",3,"value","seeMore"],[1,"row","cols-1","cols-2-xl"],["title","Bienvenido","message","Te invitamos a crear tu tarjeta master. Haz click en OK para iniciar esta experiencia.","btnOkText","OK","btnCancelText","",3,"videoSrc","centered","result",4,"ngIf"],[1,"title"],[3,"card",4,"ngIf"],[1,"buttons-container"],[1,"btn","btn--tertiary","btn--large",3,"click"],[1,"btn","btn--secondary","btn--large","btn--strong","btn--disabled"],[3,"card"],[1,"customer-list"],["class","customer-card",4,"ngFor","ngForOf"],["class","buttons-container",4,"ngIf"],[1,"customer-card"],[1,"customer-card__profile-container__profile","customer-card__profile-container__profile--placeholder"],[1,"customer-card__name"],[1,"btn","btn--secondary","btn--large","btn--strong",3,"routerLink"],["title","Bienvenido","message","Te invitamos a crear tu tarjeta master. Haz click en OK para iniciar esta experiencia.","btnOkText","OK","btnCancelText","",3,"videoSrc","centered","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Inicio"),o.Rb(),o.Nb(2,"app-search"),o.Sb(3,"div",0),o.Sb(4,"div",1),o.Sb(5,"app-metric-card",2),o.Zb("seeMore",function(e){return t.seeMoreAccepted(e)}),o.Rb(),o.Sb(6,"app-metric-card",3),o.Zb("seeMore",function(e){return t.seeMorePending(e)}),o.Rb(),o.Sb(7,"app-metric-card",4),o.Zb("seeMore",function(e){return t.seeMoreRejected(e)}),o.Rb(),o.Rb(),o.Sb(8,"div",5),o.Sb(9,"app-white-card"),o.yc(10,Di,8,1,"ng-template"),o.Rb(),o.Sb(11,"app-white-card"),o.yc(12,Zi,6,6,"ng-template"),o.Rb(),o.Rb(),o.Rb(),o.yc(13,Ui,1,2,"app-confirmation-dialog",6)),2&e&&(o.Bb(5),o.kc("value",t.metrics.accepted),o.Bb(1),o.kc("value",t.metrics.sent),o.Bb(1),o.kc("value",t.metrics.rejected),o.Bb(6),o.kc("ngIf",t.welcomeFlag))},directives:[Vi,Le,P,m.l,ae,m.k,l.i,dt],pipes:[m.s,m.t],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.buttons-container[_ngcontent-%COMP%]{display:flex;grid-gap:24px}.customer-list[_ngcontent-%COMP%]{height:362px}.customer-card[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:flex-start;justify-content:flex-start;align-items:center;grid-gap:11px;border-top:1px solid #f1f1f1;border-bottom:1px solid #f1f1f1;padding:8px}.customer-card[_ngcontent-%COMP%] + .customer-card[_ngcontent-%COMP%]{border-top:0}.customer-card__select-btn[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px}.customer-card__profile-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden}.customer-card__profile-container__profile[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50px;overflow:hidden;background-size:80%;border:1px solid #fafafa;background-repeat:no-repeat;background-position:50%;display:inline-block;box-shadow:1px 1px 3px}.customer-card__profile-container__profile--placeholder[_ngcontent-%COMP%]{background-color:#3a5081;color:#fff;line-height:50px;width:50px;text-align:center}.customer-card__profile-details[_ngcontent-%COMP%]{color:#3a5081}.customer-card__profile-details[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:0;color:#3a5081}"]}),e})();function Qi(e,t){1&e&&o.Nb(0,"app-business-card",13),2&e&&o.kc("contact",t.$implicit)}function Yi(e,t){if(1&e&&(o.Sb(0,"div",11),o.yc(1,Qi,1,1,"app-business-card",12),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngForOf",e.contacts)}}function Wi(e,t){if(1&e&&o.Nb(0,"app-pp-card",18),2&e){const e=o.dc(2).$implicit;o.kc("card",e.share.card)("fullFg",!0)}}const Hi=function(e){return[e]};function Xi(e,t){if(1&e&&(o.yc(0,Wi,1,2,"app-pp-card",15),o.Sb(1,"div",16),o.Sb(2,"a",17),o.zc(3," Ver detalles "),o.Rb(),o.Rb()),2&e){const e=o.dc().$implicit;o.kc("ngIf",e&&e.share&&e.share.card),o.Bb(2),o.kc("routerLink",o.mc(2,Hi,"/app/presentation/"+e.id))}}function Ki(e,t){1&e&&(o.Sb(0,"app-white-card"),o.yc(1,Xi,4,4,"ng-template"),o.Rb())}function Ji(e,t){if(1&e&&(o.Sb(0,"div",11),o.yc(1,Ki,2,0,"app-white-card",14),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.kc("ngForOf",e.receivedContacts)}}let eo=(()=>{class e{constructor(e,t){this.contactsService=e,this.sharesService=t,this.contacts=[],this.receivedContacts=[],this.metrics={},this.leadsSent=!0,this.sentDetail=""}ngOnInit(){this.sharesService.getDeals("sent").subscribe(e=>{const t=e.filter(e=>e.share&&!e.share.selfShare).length;this.sentDetail=`${t} enviados / ${e.length-t} consultados`,this.contacts=e}),this.sharesService.getReceivedDeals().subscribe(e=>{this.receivedContacts=e}),this.sharesService.getMetrics().subscribe(e=>{this.metrics=e})}see(e){this.leadsSent="sent"===e}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Ne),o.Mb(y))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-leads"]],decls:18,vars:7,consts:[[1,"page-container"],[1,"row","cols-1","cols-2-xl"],["theme","action","icon","info-circle","title","Negocios enviados",3,"value","subtitle","seeMore"],["theme","action","icon","info-circle","title","Negocios recibidos",3,"value","seeMore"],[1,"row","customer-list"],[1,"headline"],[1,"subtitle"],[1,"search-group"],["for","search"],["type","text","placeholder","Ingrese el criterio de b\xfasqueda"],["class","row cols-1 cols-3-xl",4,"ngIf"],[1,"row","cols-1","cols-3-xl"],[3,"contact",4,"ngFor","ngForOf"],[3,"contact"],[4,"ngFor","ngForOf"],[3,"card","fullFg",4,"ngIf"],[1,"buttons-container"],[1,"btn","btn--secondary","btn--small","btn--strong",3,"routerLink"],[3,"card","fullFg"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Tus negocios pendientes"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"app-metric-card",2),o.Zb("seeMore",function(){return t.see("sent")}),o.Rb(),o.Sb(5,"app-metric-card",3),o.Zb("seeMore",function(){return t.see("received")}),o.Rb(),o.Rb(),o.Sb(6,"div",4),o.Sb(7,"div",5),o.Sb(8,"h3"),o.zc(9),o.Rb(),o.Sb(10,"p",6),o.zc(11),o.Rb(),o.Sb(12,"div",7),o.Sb(13,"label",8),o.zc(14,"B\xfascador"),o.Rb(),o.Nb(15,"input",9),o.Rb(),o.Rb(),o.yc(16,Yi,2,1,"div",10),o.yc(17,Ji,2,1,"div",10),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("value",t.metrics.sent)("subtitle",t.sentDetail),o.Bb(1),o.kc("value",(null==t.receivedContacts?null:t.receivedContacts.length)+""),o.Bb(4),o.Bc("Negocios ",t.leadsSent?"enviados":"recibidos",""),o.Bb(2),o.Bc("Este es el listado de tus negocios ",t.leadsSent?"enviados":"recibidos","."),o.Bb(5),o.kc("ngIf",t.leadsSent),o.Bb(1),o.kc("ngIf",!t.leadsSent))},directives:[Le,m.l,m.k,Ue,P,l.i,ae],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.buttons-container[_ngcontent-%COMP%]{display:flex;grid-gap:24px}.customer-list[_ngcontent-%COMP%]{position:relative}.customer-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:10px}.customer-list[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin-top:0}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%]{width:300px;position:absolute;right:0;top:24px}.customer-list[_ngcontent-%COMP%] .search-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-image:url(https://img.icons8.com/ios-glyphs/344/search--v1.png);background-repeat:no-repeat;background-position:100%;background-size:22px 22px;background-position-x:267px}app-white-card[_ngcontent-%COMP%]{padding-bottom:16px}"]}),e})();function to(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Email es requerido "),o.Rb())}function no(e,t){if(1&e&&(o.Sb(0,"div",15),o.yc(1,to,2,0,"div",16),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.email&&e.email.errors&&e.email.errors.required)}}function io(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Password es requerido "),o.Rb())}function oo(e,t){if(1&e&&(o.Sb(0,"div",15),o.yc(1,io,2,0,"div",16),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.required)}}function ro(e,t){if(1&e&&(o.Sb(0,"div",15),o.zc(1),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Bc(" ",e.loginError," ")}}const co=function(){return["/register"]};function so(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",2),o.Sb(1,"h1"),o.zc(2,"Inicia sesi\xf3n"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Escribe tu correo electr\xf3nico y contrase\xf1a."),o.Rb(),o.Sb(5,"form",3),o.Zb("ngSubmit",function(){return o.sc(e),o.dc().login()}),o.Sb(6,"label",4),o.zc(7,"Correo electr\xf3nico"),o.Rb(),o.Nb(8,"input",5),o.yc(9,no,2,1,"div",6),o.Sb(10,"label",7),o.zc(11,"Contrase\xf1a"),o.Rb(),o.Nb(12,"input",8),o.yc(13,oo,2,1,"div",6),o.Sb(14,"div",9),o.Sb(15,"a",10),o.Zb("click",function(){return o.sc(e),o.dc().goToRecover()}),o.zc(16,"\xbfOlvidaste tu contrase\xf1a?"),o.Rb(),o.Sb(17,"a",11),o.zc(18,"A\xfan no tienes cuenta? Reg\xedstrate"),o.Rb(),o.Rb(),o.yc(19,ro,2,1,"div",6),o.Sb(20,"div",12),o.Sb(21,"button",13),o.zc(22," Ingresar "),o.Nb(23,"i",14),o.Rb(),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(5),o.kc("formGroup",e.loginForm),o.Bb(4),o.kc("ngIf",(null==e.email?null:e.email.invalid)&&((null==e.email?null:e.email.dirty)||(null==e.email?null:e.email.touched))),o.Bb(4),o.kc("ngIf",(null==e.password?null:e.password.invalid)&&((null==e.password?null:e.password.dirty)||(null==e.password?null:e.password.touched))),o.Bb(4),o.kc("routerLink",o.lc(5,co)),o.Bb(2),o.kc("ngIf",e.loginError)}}function ao(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Email es requerido "),o.Rb())}function lo(e,t){if(1&e&&(o.Sb(0,"div",15),o.yc(1,ao,2,0,"div",16),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.email2&&e.email2.errors&&e.email2.errors.required)}}function bo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",19),o.Sb(1,"label",20),o.zc(2,"Correo electr\xf3nico"),o.Rb(),o.Nb(3,"input",21),o.yc(4,lo,2,1,"div",6),o.Sb(5,"div",22),o.Sb(6,"button",23),o.Zb("click",function(){return o.sc(e),o.dc(2).recover()}),o.zc(7," Continuar "),o.Nb(8,"i",14),o.Rb(),o.Sb(9,"a",24),o.Zb("click",function(){return o.sc(e),o.dc(2).recoveringPassword=!1}),o.zc(10,"Volver"),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.kc("formGroup",e.recoverForm),o.Bb(4),o.kc("ngIf",(null==e.email2?null:e.email2.invalid)&&((null==e.email2?null:e.email2.dirty)||(null==e.email2?null:e.email2.touched)))}}function po(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2," Se ha enviado un mensaje con instrucciones al correo electronico. Por favor sigue las instrucciones ahi descritas "),o.Rb(),o.Sb(3,"div",22),o.Sb(4,"a",24),o.Zb("click",function(){return o.sc(e),o.dc(2).recoveringPassword=!1}),o.zc(5,"Volver"),o.Rb(),o.Rb(),o.Rb()}}function uo(e,t){if(1&e&&(o.Sb(0,"div",17),o.Sb(1,"h1"),o.zc(2,"Recupera tu contrase\xf1a"),o.Rb(),o.yc(3,bo,11,2,"form",18),o.yc(4,po,6,0,"div",16),o.Rb()),2&e){const e=o.dc();o.Bb(3),o.kc("ngIf",!e.recovered),o.Bb(1),o.kc("ngIf",e.recovered)}}let ho=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.router=t,this.authService=n,this.route=i,this.googleSigninUrl="",this.recoveringPassword=!1,this.recovered=!1,this.loginForm=this.fb.group({email:["",x.q.required],password:["",x.q.required]}),this.loginError="",this.redirectUri="",this.recoverForm=this.fb.group({email2:["",x.q.required]}),this.recoverError=""}ngOnInit(){const e=encodeURI("https://platpres.com/auth/google/redirect"),t=encodeURI("email profile"),n=encodeURI("29048002922-68i5f2n7gl3vgssl3cctf2dvbs7ed1at.apps.googleusercontent.com");this.googleSigninUrl=`https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?response_type=code&redirect_uri=${e}&scope=${t}&client_id=${n}&flowName=GeneralOAuthFlow`,this.route.queryParams.pipe(Object(nt.a)(e=>e.redirectUri)).subscribe(e=>{e&&e.redirectUri&&(this.redirectUri=decodeURI(e.redirectUri))})}goToRecover(){this.recoveringPassword=!0}recover(){var e;this.recoverForm.valid?this.authService.recover(null===(e=this.email2)||void 0===e?void 0:e.value).subscribe(e=>{this.recovered=!0},e=>{this.recoverError="Ha ocurrido un error recuperando su contrase\xf1a."}):this.recoverForm.markAllAsTouched()}login(){var e,t;if(!this.loginForm.valid)return void this.loginForm.markAllAsTouched();const n={username:null===(e=this.email)||void 0===e?void 0:e.value.toString().toLowerCase(),password:null===(t=this.password)||void 0===t?void 0:t.value};this.authService.login(n).subscribe(e=>{this.loginError="",this.router.navigate(this.redirectUri&&"/login"!==this.redirectUri?[this.redirectUri]:["/app"])},e=>{this.loginError=e&&e.error&&11===e.error.errorCode?"Esta cuenta a\xfan no ha sido activada.":"Nombre de usuario o contrase\xf1a es incorrecto."})}get email(){return this.loginForm.get("email")}get password(){return this.loginForm.get("password")}get email2(){return this.recoverForm.get("email2")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(x.b),o.Mb(l.f),o.Mb(g),o.Mb(l.a))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-login"]],decls:2,vars:2,consts:[["class","card",4,"ngIf"],["class","card2",4,"ngIf"],[1,"card"],[3,"formGroup","ngSubmit"],["for","email"],["type","text","id","email","name","email","placeholder","Ej: user@server.com","formControlName","email"],["class","alert alert-danger",4,"ngIf"],["for","password"],["type","password","id","password","name","password","placeholder","Ingresa tu contrase\xf1a","formControlName","password"],[1,"links-section"],[1,"forgot-password",3,"click"],[1,"register",3,"routerLink"],[1,"submit-section"],["type","submit",1,"btn","btn--large","btn--tertiary"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"alert","alert-danger"],[4,"ngIf"],[1,"card2"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],["for","email2"],["type","text","id","email2","name","email2","placeholder","Ej: user@server.com","formControlName","email2"],[1,"btn-section"],[1,"btn","btn--large","btn--tertiary",3,"click"],[1,"link",3,"click"]],template:function(e,t){1&e&&(o.yc(0,so,24,6,"div",0),o.yc(1,uo,5,2,"div",1)),2&e&&(o.kc("ngIf",!t.recoveringPassword),o.Bb(1),o.kc("ngIf",t.recoveringPassword))},directives:[m.l,x.s,x.k,x.g,x.a,x.j,x.e,l.i],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;top:50%;position:absolute;left:50%;transform:translate(-50%,-50%);max-height:100%;overflow:scroll}@media (max-width:480px){[_nghost-%COMP%]{width:90%}}.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{background:#fff;border:1px solid #d9d9d9;border-radius:15px;width:500px;min-height:460px;padding:28px 41px}@media (max-width:480px){.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{width:100%;padding:28px 30px}}.card2[_ngcontent-%COMP%]{min-height:180px}.forgot-password[_ngcontent-%COMP%]{display:block;margin-bottom:24px;cursor:pointer;text-decoration:underline}.sign-in-google[_ngcontent-%COMP%]{float:right}.sign-in-google[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:220px}.links-section[_ngcontent-%COMP%]{flex-direction:row;justify-content:space-between}.btn-section[_ngcontent-%COMP%], .links-section[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}.btn-section[_ngcontent-%COMP%]{width:100%;text-align:center;flex-direction:column;align-content:space-around;justify-content:center;align-items:center}.btn-section[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin-top:16px;cursor:pointer;text-decoration:underline}.submit-section[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;grid-gap:8px}@media (max-width:480px){.submit-section[_ngcontent-%COMP%]{flex-direction:column;margin-bottom:24px}}"]}),e})(),go=(()=>{class e{constructor(e){this.sharesService=e,this.metrics={}}ngOnInit(){this.sharesService.getMetrics().subscribe(e=>{this.metrics=e})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(y))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-metrics"]],decls:13,vars:11,consts:[[1,"page-container"],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check","title","Tarjetas enviadas",3,"value"],["theme","success","icon","info-circle","title","Presentaciones enviadas",3,"value"],["theme","success","icon","check","title","Clientes conectados",3,"value"],["theme","error","icon","times","title","Clientes desconectados",3,"value"],["theme","success","icon","check","title","Negocios exitosos",3,"value"],["theme","action","icon","check","title","Negocios en espera",3,"value"],["theme","success","icon","check","title","Total negocios",3,"value"],["theme","success","icon","check","title","Porcentaje acierto",3,"value"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Tablero"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Nb(4,"app-metric-card",2),o.Nb(5,"app-metric-card",3),o.Nb(6,"app-metric-card",4),o.Nb(7,"app-metric-card",5),o.Nb(8,"app-metric-card",6),o.Nb(9,"app-metric-card",7),o.Nb(10,"app-metric-card",8),o.Nb(11,"app-metric-card",9),o.ec(12,"number"),o.Rb(),o.Rb()),2&e&&(o.Bb(4),o.kc("value",t.metrics.cards),o.Bb(1),o.kc("value",t.metrics.presentations),o.Bb(1),o.kc("value",t.metrics.connected),o.Bb(1),o.kc("value",t.metrics.disconnected),o.Bb(1),o.kc("value",t.metrics.accepted),o.Bb(1),o.kc("value",t.metrics.sent),o.Bb(1),o.kc("value",t.metrics.sent+t.metrics.accepted+t.metrics.rejected),o.Bb(1),o.kc("value",o.gc(12,8,100*t.metrics.accepted/(t.metrics.sent+t.metrics.accepted+t.metrics.rejected?t.metrics.sent+t.metrics.accepted+t.metrics.rejected:1),"1.2")+"%"))},directives:[Le],pipes:[m.e],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}"]}),e})();const mo=["currentQuestionHeader"];function fo(e,t){if(1&e&&o.Nb(0,"img",8),2&e){const e=o.dc();o.kc("src",null==e.share||null==e.share.presentation?null:e.share.presentation.companyLogoUri,o.tc)}}function vo(e,t){if(1&e&&o.Nb(0,"img",8),2&e){const e=o.dc();o.kc("src",null==e.share||null==e.share.card?null:e.share.card.logoUri,o.tc)}}function _o(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h4",9),o.zc(2),o.Rb(),o.Sb(3,"p",10),o.zc(4),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(2),o.Ac(null==e.share||null==e.share.presentation?null:e.share.presentation.title),o.Bb(2),o.Ac(null==e.share||null==e.share.presentation?null:e.share.presentation.description)}}function So(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",11),o.Sb(1,"a",12),o.Zb("click",function(){return o.sc(e),o.dc().back()}),o.Nb(2,"i",13),o.zc(3," Regresar "),o.Rb(),o.Rb()}}function Co(e,t){1&e&&(o.Sb(0,"div",14),o.Sb(1,"div",15),o.zc(2," Haz clic "),o.Sb(3,"a",16),o.zc(4,"aqui"),o.Rb(),o.zc(5," ahora, activa tu tarjetero virtual y reg\xedstrate en Platpres. Vamos !! Hay miles de negocios por cerrar. "),o.Rb(),o.Rb())}function xo(e,t){if(1&e&&(o.Sb(0,"div",27),o.Nb(1,"app-pp-card",28),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("card",null==e.share?null:e.share.card)}}function yo(e,t){1&e&&(o.Sb(0,"h4"),o.zc(1,"Video presentaci\xf3n enviada"),o.Rb())}function Ro(e,t){if(1&e&&o.Nb(0,"app-video-container",29),2&e){const e=o.dc(3);o.kc("autoplay",e.autoplay)("thumbPath",e.share.presentation.thumbUri)("videoPath",e.share.presentation.videoUri)}}function Po(e,t){if(1&e){const e=o.Tb();o.Sb(0,"li"),o.Sb(1,"a",33),o.Zb("click",function(){o.sc(e);const n=t.$implicit;return o.dc(4).setQuestion(n)}),o.zc(2),o.Rb(),o.Rb()}if(2&e){const e=t.$implicit;o.Bb(2),o.Bc(" ",e.title," ")}}function ko(e,t){if(1&e&&(o.Sb(0,"div",30),o.Sb(1,"h5"),o.zc(2,"Preguntas frecuentes"),o.Rb(),o.Sb(3,"ul",31),o.yc(4,Po,3,1,"li",32),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(4),o.kc("ngForOf",e.share.presentation.questions)}}function wo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",38),o.Zb("click",function(){o.sc(e);const n=t.index,i=o.dc(4);return i.currentQuestion=i.share.presentation.questions[n]}),o.zc(1),o.Rb()}if(2&e){const e=t.index;o.Bb(1),o.Bc(" ",e+1," ")}}function Oo(e,t){if(1&e&&(o.Sb(0,"div",34),o.Sb(1,"div",35),o.zc(2," Preguntas frecuentes "),o.Rb(),o.Sb(3,"div",36),o.yc(4,wo,2,1,"a",37),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(4),o.kc("ngForOf",e.share.presentation.questions)}}function Mo(e,t){if(1&e&&(o.Sb(0,"h4",null,39),o.zc(2),o.Rb()),2&e){const e=o.dc(3);o.Bb(2),o.Ac(e.currentQuestion.title)}}function Io(e,t){if(1&e&&(o.Sb(0,"div",40),o.Nb(1,"app-video-container",41),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("videoPath",e.currentQuestion.videoUri)}}function Bo(e,t){1&e&&(o.Sb(0,"p"),o.zc(1,"Haz click en el siguiente bot\xf3n para descargar el documento adjunto:"),o.Rb())}function zo(e,t){if(1&e&&(o.Sb(0,"a",42),o.Sb(1,"span"),o.zc(2,"Descargar documento"),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.kc("href",null==e.share?null:e.share.pdfUri,o.tc)}}function No(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Hagamos negocio"),o.Rb())}function qo(e,t){if(1&e&&(o.Sb(0,"span"),o.zc(1),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.Ac(null==e.share?null:e.share.newDealLabel)}}function Fo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",43),o.Zb("click",function(){return o.sc(e),o.dc(3).close()}),o.yc(1,No,2,0,"span",3),o.yc(2,qo,2,1,"span",3),o.Nb(3,"i",44),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",!(null!=e.share&&e.share.newDealLabel)),o.Bb(1),o.kc("ngIf",null==e.share?null:e.share.newDealLabel)}}function jo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",45),o.Zb("click",function(){return o.sc(e),o.dc(3).reject()}),o.Sb(1,"span"),o.zc(2,"Me interesa pr\xf3ximamente"),o.Rb(),o.Rb()}}function Eo(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h4"),o.zc(2,"Tarjeta enviada"),o.Rb(),o.yc(3,xo,2,1,"div",17),o.Nb(4,"br"),o.yc(5,yo,2,0,"h4",3),o.Sb(6,"div",18),o.Sb(7,"div",19),o.yc(8,Ro,1,3,"app-video-container",20),o.Rb(),o.yc(9,ko,5,1,"div",21),o.Rb(),o.yc(10,Oo,5,1,"div",22),o.yc(11,Mo,3,1,"h4",3),o.yc(12,Io,2,1,"div",23),o.yc(13,Bo,2,0,"p",3),o.yc(14,zo,3,1,"a",24),o.yc(15,Fo,4,2,"a",25),o.yc(16,jo,3,0,"a",26),o.Rb()),2&e){const e=o.dc(2);o.Bb(3),o.kc("ngIf",null==e.share||null==e.share.card?null:e.share.card.id),o.Bb(2),o.kc("ngIf",null==e.share||null==e.share.presentation?null:e.share.presentation.id),o.Bb(3),o.kc("ngIf",e.share&&e.share.presentation&&e.share.presentation.videoUri),o.Bb(1),o.kc("ngIf",e.share&&e.share.presentation&&e.share.presentation.questions&&e.share.presentation.questions.length),o.Bb(1),o.kc("ngIf",null==e.share||null==e.share.presentation||null==e.share.presentation.questions?null:e.share.presentation.questions.length),o.Bb(1),o.kc("ngIf",e.currentQuestion),o.Bb(1),o.kc("ngIf",e.currentQuestion&&e.currentQuestion.videoUri),o.Bb(1),o.kc("ngIf",!(null==e.share||!e.share.pdfUri)),o.Bb(1),o.kc("ngIf",!(null==e.share||!e.share.pdfUri)),o.Bb(1),o.kc("ngIf",!e.closed),o.Bb(1),o.kc("ngIf",!e.closed)}}function To(e,t){1&e&&(o.Sb(0,"p"),o.zc(1," Ingresa tu nombre y medio de contacto para notificar a la empresa. "),o.Rb())}function Vo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",47),o.Sb(1,"label",48),o.zc(2,"Nombre"),o.Rb(),o.Nb(3,"input",49),o.Sb(4,"label",50),o.zc(5,"Correo electr\xf3nico"),o.Rb(),o.Nb(6,"input",51),o.Sb(7,"label",52),o.zc(8,"Whatsapp"),o.Rb(),o.Nb(9,"input",53),o.Sb(10,"label",54),o.zc(11,"ID de Platpres"),o.Rb(),o.Nb(12,"input",55),o.Sb(13,"a",56),o.Zb("click",function(){return o.sc(e),o.dc(3).sendData()}),o.zc(14," Enviar datos "),o.Nb(15,"i",44),o.Rb(),o.Rb()}if(2&e){const e=o.dc(3);o.kc("formGroup",e.heroForm)}}function Lo(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h2"),o.zc(2,"\xa1En hora buena! Tenemos un negocio andando"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Recuerda que puedes hacer clic en los iconos de la tarjeta para contactar."),o.Rb(),o.Sb(5,"div",27),o.Nb(6,"app-pp-card",28),o.Rb(),o.yc(7,To,2,0,"p",3),o.yc(8,Vo,16,1,"form",46),o.Rb()),2&e){const e=o.dc(2);o.Bb(6),o.kc("card",null==e.share?null:e.share.card),o.Bb(1),o.kc("ngIf",!e.dataSent),o.Bb(1),o.kc("ngIf",!e.dataSent)}}function Do(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h2"),o.zc(2,"Gracias por el tiempo dedicado a ver nuestros videos"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Gracias por el tiempo dedicado a ver nuestros videos"),o.Rb(),o.Sb(5,"div",27),o.Nb(6,"app-pp-card",28),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(6),o.kc("card",null==e.share?null:e.share.card)}}function $o(e,t){if(1&e&&(o.yc(0,Eo,17,11,"div",3),o.yc(1,Lo,9,3,"div",3),o.yc(2,Do,7,1,"div",3)),2&e){const e=o.dc();o.kc("ngIf",e.presenting),o.Bb(1),o.kc("ngIf",e.dealDone),o.Bb(1),o.kc("ngIf",e.dealRejected)}}let Ao=(()=>{class e{constructor(e,t,n,i){this.route=e,this.sharesService=t,this.authService=n,this.fb=i,this.closed=!1,this.shareId="",this.dealDone=!1,this.dealRejected=!1,this.noUserFlag=!1,this.presenting=!0,this.dataSent=!1,this.autoplay=!1,this.heroForm=this.fb.group({name:[""],email:[""],whatsapp:[""],idplatpres:[""]})}ngOnInit(){this.authService.getProfile().subscribe(e=>{this.noUserFlag=!1},e=>{this.noUserFlag=!0}),this.routeSub=this.route.params.subscribe(e=>{this.shareId=e.id,this.sharesService.getDeal(parseInt(this.shareId)).subscribe(e=>{this.deal=e,this.share=e.share,this.deal&&(this.closed="accepted"===this.deal.state||"rejected"===this.deal.state)})})}back(){this.presenting=!0,this.dealDone=!1,this.dealRejected=!1,this.closed=!0}close(){this.sharesService.deal(this.deal.id).subscribe(()=>{this.presenting=!1,this.dealDone=!0})}reject(){this.sharesService.reject(this.deal.id).subscribe(()=>{this.presenting=!1,this.dealRejected=!0})}sendData(){var e,t,n,i;this.sharesService.deal(this.deal.id,{name:null===(e=this.name)||void 0===e?void 0:e.value,email:null===(t=this.email)||void 0===t?void 0:t.value,whatsapp:null===(n=this.whatsapp)||void 0===n?void 0:n.value,idplatpres:null===(i=this.idplatpres)||void 0===i?void 0:i.value}).subscribe(()=>{this.presenting=!1,this.dealDone=!0,this.dataSent=!0})}ngOnDestroy(){this.routeSub.unsubscribe()}setQuestion(e){this.currentQuestion=e,this.currentQuestionHeader?this.currentQuestionHeader.nativeElement.scrollIntoView():setTimeout(()=>{this.setQuestion(e)},500)}get name(){return this.heroForm.get("name")}get email(){return this.heroForm.get("email")}get whatsapp(){return this.heroForm.get("whatsapp")}get idplatpres(){return this.heroForm.get("idplatpres")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(y),o.Mb(g),o.Mb(x.b))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-presentation"]],viewQuery:function(e,t){if(1&e&&o.Dc(mo,1),2&e){let e;o.oc(e=o.ac())&&(t.currentQuestionHeader=e.first)}},decls:11,vars:5,consts:[[1,"page-header"],[1,"logo-container"],[3,"src",4,"ngIf"],[4,"ngIf"],["class","presentation__back-button",4,"ngIf"],[1,"page-container"],["class","row cols-1",4,"ngIf"],[1,"row","cols-1","card-container"],[3,"src"],[1,"presentation__title"],[1,"presentation__description"],[1,"presentation__back-button"],[3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-left"],[1,"row","cols-1"],[1,"register-dialog"],["href","/register","target","_blank"],["class","card__container",4,"ngIf"],[1,"row","video-questions-container"],[1,"preview__video"],[3,"autoplay","thumbPath","videoPath",4,"ngIf"],["class","questions_list",4,"ngIf"],["class","questions__container",4,"ngIf"],["class","question__video",4,"ngIf"],["class","btn btn--tertiary btn--large btn-deal","target","_blank",3,"href",4,"ngIf"],["class","btn btn--tertiary btn--large btn-deal",3,"click",4,"ngIf"],["class","btn btn--secondary btn--large",3,"click",4,"ngIf"],[1,"card__container"],[3,"card"],[3,"autoplay","thumbPath","videoPath"],[1,"questions_list"],[1,"questions__title"],[4,"ngFor","ngForOf"],[1,"question__link",3,"click"],[1,"questions__container"],[1,"questions__heading"],[1,"questions__buttons"],["class","btn btn--small btn--secondary",3,"click",4,"ngFor","ngForOf"],[1,"btn","btn--small","btn--secondary",3,"click"],["currentQuestionHeader",""],[1,"question__video"],[3,"videoPath"],["target","_blank",1,"btn","btn--tertiary","btn--large","btn-deal",3,"href"],[1,"btn","btn--tertiary","btn--large","btn-deal",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--secondary","btn--large",3,"click"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],["for","name"],["type","text","id","name","name","name","placeholder","Escribe tu nombre","formControlName","name"],["for","email"],["type","text","id","email","name","email","placeholder","Escribe tu correo","formControlName","email"],["for","whatsapp"],["type","text","id","whatsapp","name","whatsapp","placeholder","Escribe tu n\xfamero","formControlName","whatsapp"],["for","idplatpres"],["type","text","id","idplatpres","name","idplatpres","placeholder","Escribe tu ID","formControlName","idplatpres"],[1,"btn","btn--tertiary","btn--large",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Sb(1,"div",1),o.yc(2,fo,1,1,"img",2),o.yc(3,vo,1,1,"img",2),o.Rb(),o.yc(4,_o,5,2,"div",3),o.Rb(),o.yc(5,So,4,0,"div",4),o.Sb(6,"div",5),o.yc(7,Co,6,0,"div",6),o.Sb(8,"div",7),o.Sb(9,"app-white-card"),o.yc(10,$o,3,3,"ng-template"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(2),o.kc("ngIf",null==t.share||null==t.share.presentation?null:t.share.presentation.companyLogoUri),o.Bb(1),o.kc("ngIf",!(null!=t.share&&null!=t.share.presentation&&t.share.presentation.companyLogoUri)&&(null==t.share||null==t.share.card?null:t.share.card.logoUri)),o.Bb(1),o.kc("ngIf",t.presenting),o.Bb(1),o.kc("ngIf",!t.presenting),o.Bb(2),o.kc("ngIf",t.noUserFlag))},directives:[m.l,P,ae,me,m.k,x.s,x.k,x.g,x.a,x.j,x.e],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow-y:scroll}[_nghost-%COMP%] app-white-card{display:table}[_nghost-%COMP%] app-white-card h4{color:#3a5081;margin-top:0}.register-dialog[_ngcontent-%COMP%]{margin-bottom:24px}.page-container[_ngcontent-%COMP%]{display:table}.card-container[_ngcontent-%COMP%]{overflow:hidden}.preview__video[_ngcontent-%COMP%]{margin:36px 20px 20px;width:50%}@media (max-width:480px){.preview__video[_ngcontent-%COMP%]{width:80%}}.presentation__title[_ngcontent-%COMP%]{margin-bottom:0}.presentation__description[_ngcontent-%COMP%]{max-width:800px}.card__container[_ngcontent-%COMP%]{width:50%}@media (max-width:480px){.card__container[_ngcontent-%COMP%]{width:100%}}.btn-deal[_ngcontent-%COMP%]{margin-right:10px}@media (max-width:480px){.btn-deal[_ngcontent-%COMP%]{margin-bottom:12px}}.presentation__back-button[_ngcontent-%COMP%]{line-height:20px;font-weight:700;color:#3a5081;margin-bottom:32px;cursor:pointer;margin-top:16px}.presentation__back-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-weight:400;margin-right:8px;color:#c4dd4b}.register-dialog[_ngcontent-%COMP%]{border-radius:15px;background:#1e192f;padding:16px;color:#fafafa}.register-dialog[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:16px;color:#c4dd4b}.logo-container[_ngcontent-%COMP%]{width:150px;padding:16px;border-radius:12px;box-shadow:0 2.8px 2.2px rgba(0,0,0,.03),0 6.7px 5.3px rgba(0,0,0,.05),0 12.5px 10px rgba(0,0,0,.06),0 7px 20px rgba(0,0,0,.07),0 41.8px 33.4px rgba(0,0,0,.09),0 100px 80px rgba(0,0,0,.12)}.logo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.questions__container[_ngcontent-%COMP%]{color:#3a5081;background-color:#72eddb;padding:16px;border-radius:8px;width:50%;display:flex;margin-bottom:24px;flex-wrap:wrap}@media (max-width:480px){.questions__container[_ngcontent-%COMP%]{width:90%}}.questions__heading[_ngcontent-%COMP%]{display:inline-block;width:110px;line-height:23px;height:50px}.questions__buttons[_ngcontent-%COMP%]{display:inline-table;height:50px;margin-left:10px;line-height:50px}.questions__buttons[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin-right:6px}.question__video[_ngcontent-%COMP%]{margin:36px 20px 20px;width:50%}.page-header[_ngcontent-%COMP%]{display:flex;margin-top:36px;margin-bottom:24px;column-gap:24px;align-items:flex-start}.page-header[_ngcontent-%COMP%] .presentation__title[_ngcontent-%COMP%]{margin-top:0}.video-questions-container[_ngcontent-%COMP%]{display:flex;grid-gap:48px}@media (max-width:480px){.video-questions-container[_ngcontent-%COMP%]{flex-direction:column}}.video-questions-container[_ngcontent-%COMP%] .questions_list[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-width:40%}@media (max-width:480px){.video-questions-container[_ngcontent-%COMP%] .questions_list[_ngcontent-%COMP%]{max-width:100%}}.video-questions-container[_ngcontent-%COMP%] .questions_list[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin-bottom:8px}.video-questions-container[_ngcontent-%COMP%] .questions_list[_ngcontent-%COMP%] .question__link[_ngcontent-%COMP%]{font-size:16px;cursor:pointer;margin-bottom:12px;display:block}"]}),e})();let Zo=(()=>{class e{constructor(e,t){this.httpClient=e,this.authService=t}searchVirtualRooms(e,t,n){return t=t.join(","),n=n.join(","),this.httpClient.request("GET","/api/virtual-rooms/search/",{responseType:"json",params:{searchValue:e,bussinessWith:t,partnerWith:n}})}getVirtualRooms(){return this.httpClient.request("GET","/api/virtual-rooms/",{responseType:"json"})}getVirtualRoom(e){return this.httpClient.request("GET",`/api/virtual-rooms/${e}`,{responseType:"json"})}deleteVirtualRoom(e){return this.httpClient.put(`/api/virtual-rooms/${e.id}`,Object.assign(Object.assign({},e),{state:"deleted"}),{responseType:"json"})}savePortrait(e,t){return t?this.uploadFile(`/api/virtual-rooms/${e.id}/portrait`,t):Object(d.a)(!1)}saveVirtualRoom(e,t,n){const i=`/api/virtual-rooms/${e&&e.id?e.id:""}`,o={};let r;e&&e.id?(delete e.company,r=this.httpClient.put(i,e,o)):r=this.httpClient.post(i,e,o);let c=null;return r.pipe(Object(p.a)(n=>(c=(e=n)&&e.id?e.id:null,t?this.uploadFile(`/api/virtual-rooms/${c}/profile`,t):Object(d.a)(n))),Object(p.a)(e=>n?this.uploadFile(`/api/virtual-rooms/${c}/portrait`,n):Object(d.a)(e)))}uploadFile(e,t){let n=new FormData;return t&&(n.append("file",t),n.append("name",t.name)),this.httpClient.post(e,n)}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(r.b),o.Wb(g))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const Uo=["file"];function Go(e,t){}function Qo(e,t){if(1&e&&(o.Sb(0,"div",9),o.Sb(1,"app-white-card"),o.yc(2,Go,0,0,"ng-template"),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.wc("background-image: url('",e.virtualRoom.portraitUri,"');")}}function Yo(e,t){if(1&e){const e=o.Tb();o.Sb(0,"button",12),o.Nb(1,"i",13),o.Rb(),o.Sb(2,"nav",14),o.Sb(3,"ul"),o.Sb(4,"li"),o.Sb(5,"button",15),o.Zb("click",function(){o.sc(e);const t=o.dc(2);return t.editPresentation(t.presentations[0])}),o.zc(6," Editar "),o.Rb(),o.Rb(),o.Sb(7,"li"),o.Sb(8,"button",15),o.Zb("click",function(){o.sc(e);const t=o.dc(2);return t.deletePresentation(t.presentations[0])}),o.zc(9," Eliminar "),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Sb(10,"div",16),o.Zb("click",function(){o.sc(e);const t=o.dc(2);return t.createDeal(t.presentations[0])}),o.Nb(11,"i",17),o.Rb()}}function Wo(e,t){if(1&e&&(o.Sb(0,"div",10),o.Sb(1,"h3",11),o.zc(2),o.Rb(),o.Sb(3,"app-white-card"),o.yc(4,Yo,12,0,"ng-template"),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(2),o.Ac(null==e.presentations[0]?null:e.presentations[0].title),o.Bb(1),o.wc("background-image: url('",e.presentations&&e.presentations.length?null==e.presentations[0]?null:e.presentations[0].thumbUri:null,"');")}}function Ho(e,t){1&e&&(o.Sb(0,"div",18),o.Nb(1,"i",19),o.Rb())}function Xo(e,t){1&e&&(o.Sb(0,"div",10),o.Sb(1,"app-white-card"),o.yc(2,Ho,2,0,"ng-template"),o.Rb(),o.Rb())}function Ko(e,t){if(1&e){const e=o.Tb();o.Sb(0,"button",12),o.Nb(1,"i",13),o.Rb(),o.Sb(2,"nav",14),o.Sb(3,"ul"),o.Sb(4,"li"),o.Sb(5,"button",15),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc().editPresentation(t)}),o.zc(6," Editar "),o.Rb(),o.Rb(),o.Sb(7,"li"),o.Sb(8,"button",15),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc().deletePresentation(t)}),o.zc(9," Eliminar "),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Sb(10,"div",16),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc().createDeal(t)}),o.Nb(11,"i",17),o.Rb()}}function Jo(e,t){if(1&e&&(o.Sb(0,"div",20),o.Sb(1,"h4"),o.zc(2),o.Rb(),o.Sb(3,"app-white-card"),o.yc(4,Ko,12,0,"ng-template"),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.Bb(2),o.Ac(null==e?null:e.title),o.Bb(1),o.wc("background-size: cover; background-image: url('",e?null==e?null:e.thumbUri:null,"');")}}function er(e,t){1&e&&(o.Sb(0,"div",21),o.Nb(1,"i",19),o.Rb())}function tr(e,t){1&e&&(o.Sb(0,"div",20),o.Sb(1,"h4"),o.zc(2,"\xa0"),o.Rb(),o.Sb(3,"app-white-card"),o.yc(4,er,2,0,"ng-template"),o.Rb(),o.Rb())}function nr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",22),o.Zb("result",function(t){return o.sc(e),o.dc().deleteConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("context",e.currentPresentation)("message",e.confirmationMessage)}}let ir=(()=>{class e{constructor(e,t,n,i){this.virtualRoomsService=e,this.companiesService=t,this.presentationsService=n,this.router=i,this.virtualRoomExists=!1,this.missingPresentations=[{},{},{},{},{},{}],this.confirmationMessage="",this.confirmingDelete=!1,this.connectedLabel="Clientes conectados con tu empresa",this.disconnectedLabel="Clientes desconectados de tu empresa",this.acceptedExtensions="image/*"}ngOnInit(){this.getVirtualRoom(),this.init()}init(){this.presentationsService.getPresentations(!0).subscribe(e=>{this.presentations=e,this.virtualRoomExists=this.presentations.length>0,this.missingPresentations=[];for(let t=0;t<6-this.presentations.slice(1).length;t++)this.missingPresentations.push({})})}getMetrics(){this.virtualRoom&&this.virtualRoom.company&&this.virtualRoom.company.id&&this.companiesService.getMetrics(this.virtualRoom.company.id).subscribe(e=>{this.metrics=e})}getVirtualRoom(){this.virtualRoomsService.getVirtualRooms().subscribe(e=>{e&&e.length&&(this.virtualRoom=e[0],this.virtualRoom&&(this.virtualRoom.connectedLabel&&(this.connectedLabel=this.virtualRoom.connectedLabel),this.virtualRoom.disconnectedLabel&&(this.disconnectedLabel=this.virtualRoom.disconnectedLabel)),this.getMetrics())})}addPortraitImage(){this.virtualRoom||this.router.navigate(["/app/register-company/"])}fileSelected(){if(!this.elementView||!this.virtualRoom)return;const[e]=this.elementView.nativeElement.files;e&&this.virtualRoomsService.savePortrait(this.virtualRoom,e).subscribe(()=>{this.getVirtualRoom()})}createDeal(e){this.router.navigate([`/app/preview-presentation/${e.id}`])}editPresentation(e){this.presentationsService.setCurrentPresentation(e),this.router.navigate(["/app/wizards/register-virtual-room"])}deletePresentation(e){delete e.questions,this.currentPresentation=e,this.confirmationMessage="\xbfEst\xe1s seguro que deseas eliminar esta presentaci\xf3n?",this.confirmingDelete=!0}deleteConfirmationCallback(e){if(this.confirmingDelete=!1,"accepted"===e.state&&this.currentPresentation){const e=Object.assign({},this.currentPresentation);delete e.tmpVideoPath,this.presentationsService.deletePresentation(e).subscribe(()=>{this.init()})}}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Zo),o.Mb(Ot),o.Mb(rt),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-profile-virtual-room"]],viewQuery:function(e,t){if(1&e&&o.Dc(Uo,1),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first)}},decls:16,vars:15,consts:[[1,"page-container"],["class","row profile-container",4,"ngIf"],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check",3,"value","title","showMore"],["theme","error","icon","times",3,"value","title","showMore"],["class","row videos-container",4,"ngIf"],[1,"row","cols-3","profile-videos"],["class","presentation-other-container",4,"ngFor","ngForOf"],[3,"context","message","result",4,"ngIf"],[1,"row","profile-container"],[1,"row","videos-container"],[1,"main-video-title"],[1,"btn","btn--tertiary","btn--small","settings-btn"],[1,"fa","fa-light","fa-ellipsis-v"],[1,"menu"],[3,"click"],[1,"play-icon",3,"click"],[1,"fa","fa-play"],[1,"add-profile-btn","main-video"],[1,"fa","fa-light","fa-plus"],[1,"presentation-other-container"],[1,"add-profile-btn"],[3,"context","message","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Bienvenido a nuestra sala virtual de negocios"),o.Rb(),o.Sb(2,"p"),o.zc(3,"Encuentra aqu\xed los videos de presentaciones de nuestros productos o servicios."),o.Rb(),o.Sb(4,"div",0),o.yc(5,Qo,3,3,"div",1),o.Sb(6,"div",2),o.Nb(7,"app-metric-card",3),o.Nb(8,"app-metric-card",4),o.Rb(),o.yc(9,Wo,5,4,"div",5),o.yc(10,Xo,3,0,"div",5),o.Sb(11,"div",6),o.yc(12,Jo,5,4,"div",7),o.ec(13,"slice"),o.yc(14,tr,5,0,"div",7),o.Rb(),o.Rb(),o.yc(15,nr,1,2,"app-confirmation-dialog",8)),2&e&&(o.Bb(5),o.kc("ngIf",t.virtualRoom&&t.virtualRoom.portraitUri),o.Bb(2),o.kc("value",t.metrics&&t.metrics.subscribers?t.metrics.subscribers:"0")("title",t.connectedLabel)("showMore",!1),o.Bb(1),o.kc("value",t.metrics&&t.metrics.unsubscribers?t.metrics.unsubscribers:"0")("title",t.disconnectedLabel)("showMore",!1),o.Bb(1),o.kc("ngIf",t.presentations&&t.presentations.length&&t.presentations[0]),o.Bb(1),o.kc("ngIf",!t.presentations||t.presentations&&0===t.presentations.length),o.Bb(2),o.kc("ngForOf",o.gc(13,12,t.presentations,1)),o.Bb(2),o.kc("ngForOf",t.missingPresentations),o.Bb(1),o.kc("ngIf",t.confirmingDelete))},directives:[m.l,Le,m.k,P,dt],pipes:[m.s],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.add-profile-btn[_ngcontent-%COMP%]{margin:60px auto 0}.profile-container[_ngcontent-%COMP%]{min-height:250px}.profile-container[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%] app-video-container .video-container{border-top-right-radius:0;border-top-left-radius:0;margin-top:0}[_nghost-%COMP%] .profile-container>app-white-card, [_nghost-%COMP%] .videos-container>app-white-card{background-size:cover;position:relative;cursor:pointer}[_nghost-%COMP%] .videos-container>app-white-card{min-height:300px}[_nghost-%COMP%] .profile-videos .presentation-other-container>app-white-card{min-height:150px;background-size:cover;position:relative;cursor:pointer}.play-icon[_ngcontent-%COMP%]{border-radius:50%;width:45px;height:45px;background-color:#666;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;padding-left:2px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);cursor:pointer}.play-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}.add-profile-btn[_ngcontent-%COMP%]{display:block;border-radius:80px;width:80px;min-width:80px;height:80px;text-align:center;line-height:80px;font-size:32px;color:#fafafa;background:#666;cursor:pointer;margin:40px auto 0}.add-profile-btn.main-video[_ngcontent-%COMP%]{margin-top:110px}.main-video-title[_ngcontent-%COMP%]{margin-bottom:0;text-align:center}.presentation-other-container[_ngcontent-%COMP%]{position:relative}.presentation-other-container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:6px;text-align:center}"]}),e})();const or=["file"];function rr(e,t){}function cr(e,t){if(1&e&&(o.Sb(0,"div",7),o.Sb(1,"app-white-card"),o.yc(2,rr,0,0,"ng-template"),o.Rb(),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.wc("background-image: url('",e.virtualRoom.portraitUri,"');")}}function sr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",8),o.Sb(1,"app-metric-card",9),o.Zb("seeMore",function(){return o.sc(e),o.dc().connectCallback()}),o.Rb(),o.Sb(2,"app-metric-card",10),o.Zb("seeMore",function(){return o.sc(e),o.dc().disconnectCallback()}),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.kc("value",e.metrics&&e.metrics.subscribers?e.metrics.subscribers:"0")("title",e.connectedLabel)("seeMoreTitle",e.connectLabel)("showButton",!0),o.Bb(1),o.kc("value",e.metrics&&e.metrics.unsubscribers?e.metrics.unsubscribers:"0")("title",e.disconnectedLabel)("seeMoreTitle",e.disconnectLabel)("showButton",!0)}}function ar(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",12),o.Sb(1,"div",13),o.zc(2,"Haz login para ver las propuestas de esta sala virtual"),o.Rb(),o.Sb(3,"a",14),o.Zb("click",function(){return o.sc(e),o.dc(2).createDeal({})}),o.zc(4," Iniciar sesi\xf3n "),o.Rb(),o.Rb()}}function lr(e,t){1&e&&(o.Sb(0,"div",11),o.Sb(1,"app-white-card"),o.yc(2,ar,5,0,"ng-template"),o.Rb(),o.Rb())}function dr(e,t){1&e&&(o.Sb(0,"div",18),o.Nb(1,"i",19),o.Rb())}function br(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",15),o.Sb(1,"h3",16),o.zc(2),o.Rb(),o.Sb(3,"app-white-card",17),o.Zb("click",function(){o.sc(e);const t=o.dc();return t.createDeal(t.presentations[0])}),o.yc(4,dr,2,0,"ng-template"),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(2),o.Ac(null==e.presentations[0]?null:e.presentations[0].title),o.Bb(1),o.wc("background-image: url('",e.presentations&&e.presentations.length?null==e.presentations[0]?null:e.presentations[0].thumbUri:null,"');")}}function pr(e,t){1&e&&(o.Sb(0,"div",18),o.Nb(1,"i",19),o.Rb())}function ur(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",20),o.Sb(1,"h4"),o.zc(2),o.Rb(),o.Sb(3,"app-white-card",17),o.Zb("click",function(){o.sc(e);const n=t.$implicit;return o.dc().createDeal(n)}),o.yc(4,pr,2,0,"ng-template"),o.Rb(),o.Rb()}if(2&e){const e=t.$implicit;o.Bb(2),o.Ac(null==e?null:e.title),o.Bb(1),o.wc("background-size: cover; background-image: url('",e?null==e?null:e.thumbUri:null,"');")}}let hr=(()=>{class e{constructor(e,t,n,i,o,r,c){this.route=e,this.authService=t,this.virtualRoomsService=n,this.sharesService=i,this.presentationsService=o,this.companiesService=r,this.router=c,this.authenticated=!1,this.virtualRoomExists=!1,this.connectedLabel="Clientes conectados con tu empresa",this.disconnectedLabel="Clientes desconectados de tu empresa",this.connectLabel="Conectarme",this.disconnectLabel="Desconectarme",this.acceptedExtensions="image/*"}ngOnInit(){this.authService.getProfile().subscribe(e=>{this.authenticated=!0}),this.routeSub=this.route.params.subscribe(e=>{this.virtualRoomId=e.id,this.virtualRoomId&&(this.getVirtualRoom(),this.presentationsService.getPresentationsByVirtualRoom(this.virtualRoomId).subscribe(e=>{this.presentations=e,this.virtualRoomExists=this.presentations.length>0,this.virtualRoomExists||this.router.navigate(["/app/virtual-room/"]),this.getMetrics()}))})}getMetrics(){this.virtualRoom&&this.virtualRoom.company&&this.virtualRoom.company.id&&this.companiesService.getMetrics(this.virtualRoom.company.id).subscribe(e=>{this.metrics=e})}ngOnDestroy(){this.routeSub.unsubscribe()}connectCallback(){this.virtualRoom&&this.virtualRoom.company&&this.virtualRoom.company.id&&this.companiesService.subscribe(this.virtualRoom.company.id).subscribe(e=>{this.getMetrics()})}disconnectCallback(){this.virtualRoom&&this.virtualRoom.company&&this.virtualRoom.company.id&&this.companiesService.unsubscribe(this.virtualRoom.company.id).subscribe(e=>{this.getMetrics()})}getVirtualRoom(){this.virtualRoomsService.getVirtualRoom(this.virtualRoomId).subscribe(e=>{this.virtualRoom=e,this.virtualRoom&&(this.virtualRoom.connectedLabel&&(this.connectedLabel=this.virtualRoom.connectedLabel),this.virtualRoom.disconnectedLabel&&(this.disconnectedLabel=this.virtualRoom.disconnectedLabel),this.virtualRoom.connectLabel&&(this.connectLabel=this.virtualRoom.connectLabel),this.virtualRoom.disconnectLabel&&(this.disconnectLabel=this.virtualRoom.disconnectLabel)),this.authService.getProfile().subscribe(t=>{t.id===e.userId&&this.router.navigate(["/app","profile-virtual-room"])})})}addPortraitImage(){this.virtualRoom||this.router.navigate(["/app/register-company/"])}fileSelected(){if(!this.elementView||!this.virtualRoom)return;const[e]=this.elementView.nativeElement.files;e&&this.virtualRoomsService.savePortrait(this.virtualRoom,e).subscribe(()=>{this.getVirtualRoom()})}createDeal(e){let t;if(this.authService.user)t=this.authService.user.uuid.slice(8);else{const e=encodeURI(`/app/virtual-room/${this.virtualRoomId}`);this.router.navigateByUrl(`/login?redirectUri=${e}`)}this.sharesService.selfShare(e,t).subscribe(e=>{e&&this.sharesService.getReceivedDeals().subscribe(t=>{const n=t.find(t=>t.shareId===e.id);n&&this.router.navigate([`/app/presentation/${n.id}`])})})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(g),o.Mb(Zo),o.Mb(y),o.Mb(rt),o.Mb(Ot),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-public-virtual-room"]],viewQuery:function(e,t){if(1&e&&o.Dc(or,1),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first)}},decls:12,vars:8,consts:[[1,"page-container"],["class","row profile-container",4,"ngIf"],["class","row cols-1 cols-2-xl",4,"ngIf"],["class","row cols-1 cols-1-xl",4,"ngIf"],["class","row videos-container",4,"ngIf"],[1,"row","cols-3","profile-videos"],["class","presentation-other-container",4,"ngFor","ngForOf"],[1,"row","profile-container"],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check",3,"value","title","seeMoreTitle","showButton","seeMore"],["theme","error","icon","times",3,"value","title","seeMoreTitle","showButton","seeMore"],[1,"row","cols-1","cols-1-xl"],[2,"text-align","center"],[2,"margin-bottom","24px"],[1,"btn","btn--tertiary","btn--large",3,"click"],[1,"row","videos-container"],[1,"main-video-title"],[3,"click"],[1,"play-icon"],[1,"fa","fa-play"],[1,"presentation-other-container"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Bienvenido a nuestra sala virtual de negocios"),o.Rb(),o.Sb(2,"p"),o.zc(3,"Encuentra aqu\xed los videos de presentaciones de nuestros productos o servicios."),o.Rb(),o.Sb(4,"div",0),o.yc(5,cr,3,3,"div",1),o.yc(6,sr,3,8,"div",2),o.yc(7,lr,3,0,"div",3),o.yc(8,br,5,4,"div",4),o.Sb(9,"div",5),o.yc(10,ur,5,4,"div",6),o.ec(11,"slice"),o.Rb(),o.Rb()),2&e&&(o.Bb(5),o.kc("ngIf",t.virtualRoom&&t.virtualRoom.portraitUri),o.Bb(1),o.kc("ngIf",t.authenticated),o.Bb(1),o.kc("ngIf",!t.authenticated),o.Bb(1),o.kc("ngIf",t.presentations&&t.presentations.length&&t.presentations[0]),o.Bb(2),o.kc("ngForOf",o.gc(11,5,t.presentations,1)))},directives:[m.l,m.k,P,Le],pipes:[m.s],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.add-profile-btn[_ngcontent-%COMP%]{display:block;border-radius:80px;width:80px;min-width:80px;height:80px;text-align:center;line-height:80px;font-size:32px;color:#fafafa;background:#666;cursor:pointer;margin:60px auto 0}.profile-container[_ngcontent-%COMP%]{min-height:250px}.profile-container[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{text-align:center}.profile-videos[_ngcontent-%COMP%] app-white-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;background:#000}[_nghost-%COMP%] app-video-container .video-container{border-top-right-radius:0;border-top-left-radius:0;margin-top:0}[_nghost-%COMP%] .profile-container>app-white-card, [_nghost-%COMP%] .videos-container>app-white-card{background-size:cover;position:relative;cursor:pointer}[_nghost-%COMP%] .videos-container>app-white-card{min-height:300px}[_nghost-%COMP%] .profile-videos .presentation-other-container>app-white-card{min-height:150px;background-size:cover;position:relative;cursor:pointer}.play-icon[_ngcontent-%COMP%]{border-radius:50%;width:45px;height:45px;background-color:#666;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;padding-left:2px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);cursor:pointer}.play-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}.main-video-title[_ngcontent-%COMP%]{margin-bottom:0;text-align:center}.presentation-other-container[_ngcontent-%COMP%]{position:relative}.presentation-other-container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:6px;text-align:center}"]}),e})();var gr=n("FtGj");const mr=["searchInput"],fr=["chipInputControl"],vr=function(e){return{active:e}};function _r(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",5),o.Sb(1,"div",6),o.Zb("click",function(){return o.sc(e),o.dc().changeCompanyOption()}),o.zc(2,"Empresas"),o.Rb(),o.Sb(3,"div",6),o.Zb("click",function(){return o.sc(e),o.dc().changeCompanyOption()}),o.zc(4,"Proveedores"),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.kc("ngClass",o.mc(2,vr,e.optionCompany)),o.Bb(2),o.kc("ngClass",o.mc(4,vr,!e.optionCompany))}}function Sr(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Nombre de empresa es requerido "),o.Rb())}function Cr(e,t){if(1&e&&(o.Sb(0,"div",37),o.yc(1,Sr,2,0,"div",8),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.title&&e.title.errors&&e.title.errors.required)}}function xr(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," NIT es requerido "),o.Rb())}function yr(e,t){if(1&e&&(o.Sb(0,"div",37),o.yc(1,xr,2,0,"div",8),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.nit&&e.nit.errors&&e.nit.errors.required)}}function Rr(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Mercado es requerido "),o.Rb())}function Pr(e,t){if(1&e&&(o.Sb(0,"div",37),o.yc(1,Rr,2,0,"div",8),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.market&&e.market.errors&&e.market.errors.required)}}function kr(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Categor\xeda es requerida "),o.Rb())}function wr(e,t){if(1&e&&(o.Sb(0,"div",37),o.yc(1,kr,2,0,"div",8),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.category&&e.category.errors&&e.category.errors.required)}}function Or(e,t){if(1&e){const e=o.Tb();o.Sb(0,"mat-chip",38),o.Zb("removed",function(){o.sc(e);const n=t.$implicit;return o.dc(3).remove(n)}),o.zc(1),o.Sb(2,"button",39),o.Sb(3,"mat-icon"),o.zc(4,"cancel"),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=t.$implicit;o.Bb(1),o.Bc(" ",e.name," ")}}function Mr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"mat-chip",38),o.Zb("removed",function(){o.sc(e);const n=t.$implicit;return o.dc(3).remove2(n)}),o.zc(1),o.Sb(2,"button",39),o.Sb(3,"mat-icon"),o.zc(4,"cancel"),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=t.$implicit;o.Bb(1),o.Bc(" ",e.name," ")}}function Ir(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",14),o.Sb(1,"h4"),o.zc(2,"Nuestra informaci\xf3n para hacer negocios"),o.Rb(),o.Sb(3,"div",15),o.Sb(4,"label",16),o.zc(5,"Nombre de la empresa"),o.Rb(),o.Nb(6,"input",17),o.yc(7,Cr,2,1,"div",18),o.Rb(),o.Sb(8,"div",15),o.Sb(9,"label",19),o.zc(10,"NIT"),o.Rb(),o.Nb(11,"input",20),o.yc(12,yr,2,1,"div",18),o.Rb(),o.Sb(13,"label",21),o.zc(14,"Descripci\xf3n"),o.Rb(),o.Sb(15,"textarea",22),o.zc(16," "),o.Rb(),o.Sb(17,"div",23),o.Sb(18,"label",24),o.zc(19,"Mercado"),o.Rb(),o.Nb(20,"input",25),o.yc(21,Pr,2,1,"div",18),o.Rb(),o.Sb(22,"div",23),o.Sb(23,"label",26),o.zc(24,"Categor\xeda"),o.Rb(),o.Nb(25,"input",27),o.yc(26,wr,2,1,"div",18),o.Rb(),o.Sb(27,"div",28),o.Sb(28,"label",29),o.zc(29,"Hacemos negocios con"),o.Rb(),o.Sb(30,"mat-form-field",30),o.Sb(31,"mat-label"),o.zc(32,"Ingresa hasta 20 palabras claves que identifiquen a tus clientes"),o.Rb(),o.Sb(33,"mat-chip-list",31,32),o.yc(35,Or,5,1,"mat-chip",33),o.Sb(36,"input",34,35),o.Zb("matChipInputTokenEnd",function(t){return o.sc(e),o.dc(2).add(t)}),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Sb(38,"div",28),o.Sb(39,"label",29),o.zc(40,"Nuestros proveedores"),o.Rb(),o.Sb(41,"mat-form-field",30),o.Sb(42,"mat-label"),o.zc(43,"Ingresa hasta 20 palabras claves que identifiquen a tus proveedores"),o.Rb(),o.Sb(44,"mat-chip-list",31,36),o.yc(46,Mr,5,1,"mat-chip",33),o.Sb(47,"input",34,35),o.Zb("matChipInputTokenEnd",function(t){return o.sc(e),o.dc(2).add2(t)}),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.pc(34),t=o.pc(45),n=o.dc(2);o.kc("formGroup",n.heroForm),o.Bb(7),o.kc("ngIf",(null==n.title?null:n.title.invalid)&&((null==n.title?null:n.title.dirty)||(null==n.title?null:n.title.touched))),o.Bb(5),o.kc("ngIf",(null==n.nit?null:n.nit.invalid)&&((null==n.nit?null:n.nit.dirty)||(null==n.nit?null:n.nit.touched))),o.Bb(9),o.kc("ngIf",(null==n.market?null:n.market.invalid)&&((null==n.market?null:n.market.dirty)||(null==n.market?null:n.market.touched))),o.Bb(5),o.kc("ngIf",(null==n.category?null:n.category.invalid)&&((null==n.category?null:n.category.dirty)||(null==n.category?null:n.category.touched))),o.Bb(9),o.kc("ngForOf",n.bussinessWithList),o.Bb(1),o.kc("matChipInputFor",e)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)("matChipInputAddOnBlur",n.addOnBlur),o.Bb(10),o.kc("ngForOf",n.partnerList),o.Bb(1),o.kc("matChipInputFor",t)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)("matChipInputAddOnBlur",n.addOnBlur)}}function Br(e,t){if(1&e&&(o.Sb(0,"div",49),o.Sb(1,"div",50),o.zc(2),o.Rb(),o.Sb(3,"div",51),o.zc(4),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.Bb(2),o.Bc(" ",e.name," "),o.Bb(2),o.Bc(" ",e.id," ")}}function zr(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2),o.Rb(),o.Sb(3,"label"),o.zc(4,"Buscador"),o.Rb(),o.Sb(5,"div",40),o.Nb(6,"input",41,42),o.Sb(8,"mat-icon"),o.zc(9,"search"),o.Rb(),o.Rb(),o.Sb(10,"div",43),o.Sb(11,"div",44),o.Sb(12,"div",45),o.Sb(13,"h4"),o.zc(14,"Nombre"),o.Rb(),o.Rb(),o.Sb(15,"div",46),o.Sb(16,"h4"),o.zc(17,"Id Platpres"),o.Rb(),o.Rb(),o.Rb(),o.Sb(18,"div",47),o.yc(19,Br,5,2,"div",48),o.Rb(),o.Nb(20,"br"),o.Nb(21,"br"),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(2),o.Cc("",e.optionCompany?"Empresas":"Proveedores"," con ",e.optionCompany?"las":"los"," que puedes hacer negocios"),o.Bb(17),o.kc("ngForOf",e.companies)}}function Nr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",52),o.Zb("click",function(){return o.sc(e),o.dc(2).exportCsv()}),o.Sb(1,"span"),o.zc(2,"Exportar CSV"),o.Rb(),o.Rb()}}function qr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",53),o.Zb("click",function(){return o.sc(e),o.dc(2).previous()}),o.Nb(1,"i",54),o.Sb(2,"span"),o.zc(3,"Anterior"),o.Rb(),o.Rb()}}function Fr(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Siguiente"),o.Rb())}function jr(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Guardar y finalizar"),o.Rb())}function Er(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",55),o.Zb("click",function(){return o.sc(e),o.dc(2).continue()}),o.yc(1,Fr,2,0,"span",8),o.yc(2,jr,2,0,"span",8),o.Nb(3,"i",56),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.step<2),o.Bb(1),o.kc("ngIf",2===e.step)}}function Tr(e,t){1&e&&(o.Sb(0,"a",57),o.Sb(1,"div",58),o.Nb(2,"div"),o.Nb(3,"div"),o.Nb(4,"div"),o.Nb(5,"div"),o.Rb(),o.Sb(6,"span"),o.zc(7,"Guardando..."),o.Rb(),o.Rb())}function Vr(e,t){if(1&e&&(o.yc(0,Ir,49,13,"form",7),o.yc(1,zr,22,3,"form",8),o.yc(2,Nr,3,0,"a",9),o.Sb(3,"div",10),o.yc(4,qr,4,0,"a",11),o.yc(5,Er,4,2,"a",12),o.yc(6,Tr,8,0,"a",13),o.Rb()),2&e){const e=o.dc();o.kc("ngIf",1===e.step),o.Bb(1),o.kc("ngIf",2===e.step),o.Bb(1),o.kc("ngIf",2===e.step),o.Bb(2),o.kc("ngIf",!e.saving&&e.step>1),o.Bb(1),o.kc("ngIf",!e.saving),o.Bb(1),o.kc("ngIf",e.saving)}}function Lr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",59),o.Zb("result",function(t){return o.sc(e),o.dc().errorConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("message",e.errorMessage)}}let Dr=(()=>{class e{constructor(e,t,n){this.fb=e,this.companiesservice=t,this.router=n,this.errorDialogDisplayed=!1,this.errorMessage="",this.searchInitiated=!1,this.step=1,this.optionCompany=!0,this.saving=!1,this.heroForm=this.fb.group({title:["",x.q.required],nit:[""],market:["",x.q.required],category:["",x.q.required],description:[""]}),this.companies=[],this.addOnBlur=!0,this.separatorKeysCodes=[gr.g,gr.c],this.bussinessWithList=[],this.partnerList=[]}exportCsv(){const e='"nombre","IdPlatpres"\n'+this.companies.map(e=>`"${e.name}","${e.id}"`).join("\n");this.downloadBlob(e,this.optionCompany?"companias.csv":"proveedores.csv","text/csv")}downloadBlob(e,t,n){var i=new Blob([e],{type:n}),o=URL.createObjectURL(i),r=document.createElement("a");r.href=o,r.setAttribute("download",t),r.click()}add(e){const t=(e.value||"").trim(),n=this.bussinessWithList.find(e=>e.name===t);t&&!n&&this.bussinessWithList.length<20&&this.bussinessWithList.push({name:t}),e.input&&(e.input.value="")}remove(e){const t=this.bussinessWithList.indexOf(e);t>=0&&this.bussinessWithList.splice(t,1)}add2(e){const t=(e.value||"").trim(),n=this.partnerList.find(e=>e.name===t);t&&!n&&this.partnerList.length<20&&this.partnerList.push({name:t}),e.input&&(e.input.value="")}remove2(e){const t=this.partnerList.indexOf(e);t>=0&&this.partnerList.splice(t,1)}ngOnInit(){}initSearch(){this.searchInput&&!this.searchInitiated&&(this.searchInitiated=!0,Object(B.a)(this.searchInput.nativeElement,"keyup").pipe(Object(nt.a)(Boolean),Object(di.a)(500),Object(Tt.a)()).subscribe(()=>{this.searchCompanies()}))}changeCompanyOption(){this.optionCompany=!this.optionCompany,this.searchCompanies()}searchCompanies(){let e=[],t=[];this.optionCompany?e=this.bussinessWithList.map(e=>e.name):t=this.partnerList.map(e=>e.name),this.companiesservice.searchCompanies(this.searchInput?this.searchInput.nativeElement.value:"",e,t).subscribe(e=>{this.companies=e})}ngAfterViewChecked(){this.initSearch()}continue(){var e,t,n,i,o;if(1===this.step){if(!this.heroForm.valid)return void this.heroForm.markAllAsTouched();this.searchCompanies()}else if(2===this.step){this.saving=!0;const r={};return r.name=null===(e=this.title)||void 0===e?void 0:e.value,r.nit=null===(t=this.nit)||void 0===t?void 0:t.value,r.description=null===(n=this.description)||void 0===n?void 0:n.value,r.market=null===(i=this.market)||void 0===i?void 0:i.value,r.category=null===(o=this.category)||void 0===o?void 0:o.value,r.bussinessWith=this.bussinessWithList.map(e=>e.name).join(","),r.partnerWith=this.partnerList.map(e=>e.name).join(","),this.saving=!0,void this.companiesservice.saveCompany(r,null,null).subscribe(e=>{this.saving=!1,this.router.navigate(["/app/company"])},e=>{this.saving=!1,this.errorDialogDisplayed=!0,this.errorMessage="Nit already exists"===e.error.message?"Nit ya se encuentra registrado. Verifique la informaci\xf3n y vuelva a intentarlo.":"Ha ocurrido un error, verifique la informaci\xf3n y vuelva a intentar"})}this.step++}errorConfirmationCallback(e){this.errorDialogDisplayed=!1}previous(){this.step--}get title(){return this.heroForm.get("title")}get nit(){return this.heroForm.get("nit")}get market(){return this.heroForm.get("market")}get category(){return this.heroForm.get("category")}get description(){return this.heroForm.get("description")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(x.b),o.Mb(Ot),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-register-company"]],viewQuery:function(e,t){if(1&e&&(o.Dc(mr,1),o.Dc(fr,1)),2&e){let e;o.oc(e=o.ac())&&(t.searchInput=e.first),o.oc(e=o.ac())&&(t.chipInputControl=e.first)}},decls:9,vars:2,consts:[[1,"page-container","page-wizard"],[1,"tabs-sec-container","row"],["class","tabs-container",4,"ngIf"],[1,"row","cols-1"],[3,"message","result",4,"ngIf"],[1,"tabs-container"],[1,"title",3,"ngClass","click"],[3,"formGroup",4,"ngIf"],[4,"ngIf"],["class","btn btn--secondary btn--large btn-export",3,"click",4,"ngIf"],[1,"buttons-container"],["class","btn btn--secondary btn--large btn-previous",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large button-with-icon",4,"ngIf"],[3,"formGroup"],[1,"form-group"],["for","title"],["type","text","id","title","name","title","placeholder","Ingresa aqu\xed el nombre de tu empresa","formControlName","title"],["class","alert alert-danger",4,"ngIf"],["for","nit"],["type","number","id","nit","name","nit","placeholder","Ingresa aqu\xed el n\xfamero de identificaci\xf3n tributaria","formControlName","nit"],["for","description"],["rows","10","type","text","id","description","name","description","placeholder","Ingresa aqu\xed una breve y vendedora descripci\xf3n del negocio en el que est\xe1 tu empresa","formControlName","description"],[1,"form-group","form-group__full"],["for","market"],["type","text","id","market","name","market","placeholder","Ingresa el tipo de mercado en el que se encuentra tu empresa","formControlName","market"],["for","category"],["type","text","id","category","name","category","placeholder","Ingresa el tipo de Categor\xeda en el que se encuentra tu empresa","formControlName","category"],[1,"form-group__full","pills"],["for","bussiness-with"],["appearance","fill",1,"bussiness-with-list"],["aria-label","Fruit selection"],["chipList",""],[3,"removed",4,"ngFor","ngForOf"],["placeholder","Nueva palabra clave...",3,"matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],["chipInputControl",""],["chipList2",""],[1,"alert","alert-danger"],[3,"removed"],["matChipRemove",""],[1,"search-input"],["type","text","placeholder","Ingresa el criterio de b\xfasqueda"],["searchInput",""],[1,"contacts__container"],[1,"contacts__header"],[1,"contacts__header-name"],[1,"contacts__header-id"],[1,"contacts__list"],["class","contacts__list-item",4,"ngFor","ngForOf"],[1,"contacts__list-item"],[1,"contacts__list-item__name"],[1,"contacts__list-item__id"],[1,"btn","btn--secondary","btn--large","btn-export",3,"click"],[1,"btn","btn--secondary","btn--large","btn-previous",3,"click"],["aria-hidden","true",1,"left","fa","fa-light","fa-arrow-left"],[1,"btn","btn--tertiary","btn--large",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--tertiary","btn--large","button-with-icon"],[1,"lds-ring","ring-button"],[3,"message","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Perfil de empresa"),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.yc(4,_r,5,6,"div",2),o.Rb(),o.Sb(5,"div",3),o.Sb(6,"app-white-card"),o.yc(7,Vr,7,6,"ng-template"),o.Rb(),o.Rb(),o.Rb(),o.yc(8,Lr,1,1,"app-confirmation-dialog",4)),2&e&&(o.Bb(4),o.kc("ngIf",2===t.step),o.Bb(4),o.kc("ngIf",t.errorDialogDisplayed))},directives:[m.l,P,m.j,x.s,x.k,x.g,x.a,x.j,x.e,x.n,a.a,a.d,c.c,m.k,c.b,c.a,c.d,s.a,dt],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.form-group[_ngcontent-%COMP%]{width:calc(50% - 10px);display:inline-grid;margin-right:10px}.form-group__full[_ngcontent-%COMP%]{display:block}.mat-standard-chip[_ngcontent-%COMP%] .mat-chip-remove[_ngcontent-%COMP%]{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip[_ngcontent-%COMP%] .mat-chip-remove.mat-icon[_ngcontent-%COMP%], .mat-standard-chip[_ngcontent-%COMP%] .mat-chip-remove[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px}.bussiness-with-list[_ngcontent-%COMP%]{width:100%}.pills[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:10px}mat-form-field[_ngcontent-%COMP%]{margin-top:10px}.contacts__header[_ngcontent-%COMP%]{display:flex;flex-direction:row}.contacts__header-name[_ngcontent-%COMP%]{width:30%}.contacts__header-email[_ngcontent-%COMP%]{width:40%}.contacts__header-id[_ngcontent-%COMP%]{width:30%}.contacts__list-item[_ngcontent-%COMP%]{display:flex;border:1px solid #eee;padding:20px;border-radius:10px;margin-bottom:2px}.contacts__list-item__name[_ngcontent-%COMP%]{width:30%}.contacts__list-item__email[_ngcontent-%COMP%]{width:40%}.contacts__list-item__id[_ngcontent-%COMP%]{width:30%}.tabs-container[_ngcontent-%COMP%]{display:flex;grid-gap:16px}.tabs-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{cursor:pointer;margin-bottom:16px}.tabs-container[_ngcontent-%COMP%] .title.active[_ngcontent-%COMP%]{border-bottom:3px solid #3a5081;padding-bottom:6px}.btn-export[_ngcontent-%COMP%]{margin-bottom:16px}.search-input[_ngcontent-%COMP%]{position:relative;width:300px}.search-input[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{top:16px;position:absolute;right:11px}"]}),e})();const $r=["container"];function Ar(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Crea tu sala virtual"),o.Rb())}function Zr(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Descripci\xf3n y preguntas"),o.Rb())}function Ur(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Tarjeta"),o.Rb())}function Gr(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Resumen"),o.Rb())}function Qr(e,t){1&e&&(o.Sb(0,"p"),o.zc(1,"Elige un video para cada pregunta frecuente que quieras dejar en tus presentaciones. Recuerda que solucionar todas las dudas de tu cliente cuando busque informaci\xf3n de tu producto, es clave para tener un negocio exitoso y reduces el tiempo de su decisi\xf3n de compra."),o.Rb())}function Yr(e,t){1&e&&(o.Sb(0,"p"),o.zc(1,"Escoge una tarjeta para usar con esta presentaci\xf3n"),o.Rb())}function Wr(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Fondo"),o.Rb(),o.Sb(3,"app-photo-picker",10),o.Zb("selectedPhoto",function(t){return o.sc(e),o.dc(2).roomBgChanged(t)}),o.Rb(),o.Sb(4,"p"),o.zc(5,"O sube tu propio fondo:"),o.Rb(),o.Sb(6,"app-upload-file",11),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).customBackgroundChanged(t)}),o.Rb(),o.Sb(7,"h4"),o.zc(8,"Logo"),o.Rb(),o.Sb(9,"app-upload-file",12),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).logoChanged(t)}),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(3),o.kc("photos",e.rooms)("customClasses","cols-3-xl")("currentPhoto",e.selectedRoom),o.Bb(3),o.kc("currentFile",e.uploadedBackground),o.Bb(3),o.kc("currentFile",e.uploadedLogo)}}function Hr(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," T\xedtulo es requerido "),o.Rb())}function Xr(e,t){if(1&e&&(o.Sb(0,"div",34),o.yc(1,Hr,2,0,"div",0),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("ngIf",e.title&&e.title.errors&&e.title.errors.required)}}function Kr(e,t){1&e&&(o.Sb(0,"div",34),o.Sb(1,"div"),o.zc(2," Video es requerido "),o.Rb(),o.Rb())}function Jr(e,t){1&e&&(o.Sb(0,"div",34),o.Sb(1,"div"),o.zc(2," Thumb es requerido "),o.Rb(),o.Rb())}function ec(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",13),o.Sb(1,"h4"),o.zc(2,"A\xf1ade el t\xedtulo y la descripci\xf3n del video principal"),o.Rb(),o.Sb(3,"label",14),o.zc(4,"T\xedtulo"),o.Rb(),o.Nb(5,"input",15),o.yc(6,Xr,2,1,"div",16),o.Sb(7,"label",17),o.zc(8,"Descripci\xf3n del video"),o.Rb(),o.Sb(9,"textarea",18),o.zc(10," "),o.Rb(),o.Sb(11,"p"),o.zc(12,"Elige si tu video es p\xfablico o privado"),o.Rb(),o.Sb(13,"div",19),o.Sb(14,"label",20),o.zc(15,"P\xfablico"),o.Rb(),o.Nb(16,"input",21),o.Rb(),o.Sb(17,"div",19),o.Sb(18,"label",22),o.zc(19,"Privado"),o.Rb(),o.Nb(20,"input",23),o.Rb(),o.Sb(21,"p"),o.zc(22,"Personaliza la experiencia para conectarse en tu sala virtual"),o.Rb(),o.Sb(23,"label",24),o.zc(24,"Mensaje para conectarse a tu sala:"),o.Rb(),o.Nb(25,"input",25),o.Sb(26,"label",26),o.zc(27,"Mensaje para desconectarse a tu sala:"),o.Rb(),o.Nb(28,"input",27),o.Sb(29,"label",28),o.zc(30,"Mensaje para clientes conectados:"),o.Rb(),o.Nb(31,"input",29),o.Sb(32,"label",30),o.zc(33,"Mensaje para clientes desconectados:"),o.Rb(),o.Nb(34,"input",31),o.Sb(35,"h4"),o.zc(36,"Elige tu video"),o.Rb(),o.Sb(37,"p"),o.zc(38,"Ten en cuenta que el video puede tener una duraci\xf3n m\xe1xima de 4 minutos y un peso m\xe1ximo de 30MB."),o.Rb(),o.Sb(39,"app-upload-file",32),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoChanged(t)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.yc(40,Kr,3,0,"div",16),o.Sb(41,"h4"),o.zc(42,"Elige la portada de tu video"),o.Rb(),o.Sb(43,"p"),o.zc(44,"Elige una imagen de portada para la presentaci\xf3n que vas subir. Si no tienes una, cr\xe9ala o toma un pantallazo representativo del video."),o.Rb(),o.Sb(45,"app-upload-file",33),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).thumbChanged(t)}),o.Rb(),o.yc(46,Jr,3,0,"div",16),o.Rb()}if(2&e){const e=o.dc(2);o.kc("formGroup",e.heroForm),o.Bb(6),o.kc("ngIf",(null==e.title?null:e.title.invalid)&&((null==e.title?null:e.title.dirty)||(null==e.title?null:e.title.touched))),o.Bb(33),o.kc("currentFile",e.uploadedVideo),o.Bb(1),o.kc("ngIf",!e.uploadedVideo&&e.videoDirty),o.Bb(5),o.kc("currentFile",e.uploadedThumb),o.Bb(1),o.kc("ngIf",!e.uploadedThumb&&e.thumbDirty)}}function tc(e,t){if(1&e&&(o.Sb(0,"form",13),o.Sb(1,"label",35),o.zc(2,"Pregunta #1"),o.Rb(),o.Nb(3,"input",36),o.Sb(4,"label",37),o.zc(5,"Pregunta #2"),o.Rb(),o.Nb(6,"input",38),o.Sb(7,"label",39),o.zc(8,"Pregunta #3"),o.Rb(),o.Nb(9,"input",40),o.Sb(10,"label",41),o.zc(11,"Pregunta #4"),o.Rb(),o.Nb(12,"input",42),o.Sb(13,"label",43),o.zc(14,"Pregunta #5"),o.Rb(),o.Nb(15,"input",44),o.Sb(16,"label",45),o.zc(17,"Pregunta #6"),o.Rb(),o.Nb(18,"input",46),o.Sb(19,"label",47),o.zc(20,"Pregunta #7"),o.Rb(),o.Nb(21,"input",48),o.Rb()),2&e){const e=o.dc(2);o.kc("formGroup",e.heroForm2)}}function nc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Preguntas 1"),o.Rb(),o.Sb(3,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,1)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(4,"h4"),o.zc(5,"Preguntas 2"),o.Rb(),o.Sb(6,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,2)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(7,"h4"),o.zc(8,"Preguntas 3"),o.Rb(),o.Sb(9,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,3)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(10,"h4"),o.zc(11,"Preguntas 4"),o.Rb(),o.Sb(12,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,4)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(13,"h4"),o.zc(14,"Preguntas 5"),o.Rb(),o.Sb(15,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,5)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(16,"h4"),o.zc(17,"Preguntas 6"),o.Rb(),o.Sb(18,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,6)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Sb(19,"h4"),o.zc(20,"Preguntas 7"),o.Rb(),o.Sb(21,"app-upload-file",49),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).videoQuestionChanged(t,7)})("error",function(t){return o.sc(e),o.dc(2).videoUploadError(t)}),o.Rb(),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(3),o.kc("currentFile",e.questionVideo1),o.Bb(3),o.kc("currentFile",e.questionVideo2),o.Bb(3),o.kc("currentFile",e.questionVideo3),o.Bb(3),o.kc("currentFile",e.questionVideo4),o.Bb(3),o.kc("currentFile",e.questionVideo5),o.Bb(3),o.kc("currentFile",e.questionVideo6),o.Bb(3),o.kc("currentFile",e.questionVideo7)}}function ic(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",57),o.Zb("click",function(){o.sc(e);const t=o.dc().$implicit;return o.dc(3).defaultCardId=t.id}),o.zc(1,"Seleccionar"),o.Rb()}}function oc(e,t){1&e&&(o.Sb(0,"a",58),o.zc(1,"Seleccionado"),o.Rb())}function rc(e,t){if(1&e&&(o.Sb(0,"div",52),o.Nb(1,"app-pp-card",53),o.Sb(2,"div",54),o.yc(3,ic,2,0,"a",55),o.yc(4,oc,2,0,"a",56),o.Rb(),o.Rb()),2&e){const e=t.$implicit,n=o.dc(3);o.Bb(1),o.kc("card",e),o.Bb(2),o.kc("ngIf",n.defaultCardId!==e.id),o.Bb(1),o.kc("ngIf",n.defaultCardId===e.id)}}function cc(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Tarjetas"),o.Rb(),o.Sb(3,"div",50),o.yc(4,rc,5,3,"div",51),o.ec(5,"async"),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(4),o.kc("ngForOf",o.fc(5,1,e.cards$))}}function sc(e,t){if(1&e&&(o.Sb(0,"div",63),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(1),o.kc("src",e.uploadedVideo.previewSource,o.tc)}}function ac(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo1.previewSource,o.tc)}}const lc=function(e,t){return{"fa-chevron-up":e,"fa-chevron-down":t}};function dc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #1"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(0)}),o.Rb(),o.Rb(),o.yc(6,ac,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc(" ",null==e.question1?null:e.question1.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[0],!e.videoVisible[0])),o.Bb(1),o.kc("ngIf",e.videoVisible[0]&&e.questionVideo1&&(e.questionVideo1.previewSource||e.questionVideo1.source))}}function bc(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo2.previewSource,o.tc)}}function pc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #2"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(1)}),o.Rb(),o.Rb(),o.yc(6,bc,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question2?null:e.question2.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[1],!e.videoVisible[1])),o.Bb(1),o.kc("ngIf",e.videoVisible[1]&&e.questionVideo2&&(e.questionVideo2.previewSource||e.questionVideo2.source))}}function uc(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo3.previewSource,o.tc)}}function hc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #3"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(2)}),o.Rb(),o.Rb(),o.yc(6,uc,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question3?null:e.question3.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[2],!e.videoVisible[2])),o.Bb(1),o.kc("ngIf",e.videoVisible[2]&&e.questionVideo3&&(e.questionVideo3.previewSource||e.questionVideo3.source))}}function gc(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo4.previewSource,o.tc)}}function mc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #4"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(3)}),o.Rb(),o.Rb(),o.yc(6,gc,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question4?null:e.question4.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[3],!e.videoVisible[3])),o.Bb(1),o.kc("ngIf",e.videoVisible[3]&&e.questionVideo4&&(e.questionVideo4.previewSource||e.questionVideo4.source))}}function fc(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo5.previewSource,o.tc)}}function vc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #5"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(4)}),o.Rb(),o.Rb(),o.yc(6,fc,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question5?null:e.question5.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[4],!e.videoVisible[4])),o.Bb(1),o.kc("ngIf",e.videoVisible[4]&&e.questionVideo5&&(e.questionVideo5.previewSource||e.questionVideo5.source))}}function _c(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo6.previewSource,o.tc)}}function Sc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #6"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(5)}),o.Rb(),o.Rb(),o.yc(6,_c,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question6?null:e.question6.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[5],!e.videoVisible[5])),o.Bb(1),o.kc("ngIf",e.videoVisible[5]&&e.questionVideo6&&(e.questionVideo6.previewSource||e.questionVideo6.source))}}function Cc(e,t){if(1&e&&(o.Sb(0,"div",70),o.Sb(1,"video",64),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.questionVideo7.previewSource,o.tc)}}function xc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",65),o.Sb(1,"div",66),o.zc(2,"Pregunta #7"),o.Rb(),o.Sb(3,"div",67),o.zc(4),o.Sb(5,"i",68),o.Zb("click",function(){return o.sc(e),o.dc(3).toggleVideo(6)}),o.Rb(),o.Rb(),o.yc(6,Cc,3,1,"div",69),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(4),o.Bc("",null==e.question7?null:e.question7.value," "),o.Bb(1),o.kc("ngClass",o.nc(3,lc,e.videoVisible[6],!e.videoVisible[6])),o.Bb(1),o.kc("ngIf",e.videoVisible[6]&&e.questionVideo7&&(e.questionVideo7.previewSource||e.questionVideo7.source))}}function yc(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"div",59),o.Sb(2,"h4"),o.zc(3),o.Rb(),o.Sb(4,"p"),o.zc(5),o.Rb(),o.yc(6,sc,3,1,"div",60),o.Sb(7,"div",61),o.yc(8,dc,7,6,"div",62),o.yc(9,pc,7,6,"div",62),o.yc(10,hc,7,6,"div",62),o.yc(11,mc,7,6,"div",62),o.yc(12,vc,7,6,"div",62),o.yc(13,Sc,7,6,"div",62),o.yc(14,xc,7,6,"div",62),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(2);o.Bb(3),o.Ac(null==e.title?null:e.title.value),o.Bb(2),o.Ac(null==e.description?null:e.description.value),o.Bb(1),o.kc("ngIf",e.uploadedVideo&&(e.uploadedVideo.previewSource||e.uploadedVideo.source)),o.Bb(2),o.kc("ngIf",null==e.question1?null:e.question1.value),o.Bb(1),o.kc("ngIf",null==e.question2?null:e.question2.value),o.Bb(1),o.kc("ngIf",null==e.question3?null:e.question3.value),o.Bb(1),o.kc("ngIf",null==e.question4?null:e.question4.value),o.Bb(1),o.kc("ngIf",null==e.question5?null:e.question5.value),o.Bb(1),o.kc("ngIf",null==e.question6?null:e.question6.value),o.Bb(1),o.kc("ngIf",null==e.question7?null:e.question7.value)}}function Rc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",71),o.Zb("click",function(){return o.sc(e),o.dc(2).previous()}),o.Nb(1,"i",72),o.Sb(2,"span"),o.zc(3,"Anterior"),o.Rb(),o.Rb()}}function Pc(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Siguiente"),o.Rb())}function kc(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Guardar y finalizar"),o.Rb())}function wc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",73),o.Zb("click",function(){return o.sc(e),o.dc(2).continue()}),o.yc(1,Pc,2,0,"span",0),o.yc(2,kc,2,0,"span",0),o.Nb(3,"i",74),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.step<6-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===6-e.stepOffset)}}function Oc(e,t){1&e&&(o.Sb(0,"a",75),o.Sb(1,"div",76),o.Nb(2,"div"),o.Nb(3,"div"),o.Nb(4,"div"),o.Nb(5,"div"),o.Rb(),o.Sb(6,"span"),o.zc(7,"Guardando..."),o.Rb(),o.Rb())}function Mc(e,t){if(1&e&&(o.yc(0,Wr,10,5,"form",0),o.yc(1,ec,47,6,"form",5),o.yc(2,tc,22,1,"form",5),o.yc(3,nc,22,7,"form",0),o.yc(4,cc,6,3,"form",0),o.yc(5,yc,15,10,"form",0),o.Sb(6,"div",6),o.yc(7,Rc,4,0,"a",7),o.yc(8,wc,4,2,"a",8),o.yc(9,Oc,8,0,"a",9),o.Rb()),2&e){const e=o.dc();o.kc("ngIf",e.step===1-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===2-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===3-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===4-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===5-e.stepOffset),o.Bb(1),o.kc("ngIf",e.step===6-e.stepOffset),o.Bb(2),o.kc("ngIf",!e.saving&&e.step>1),o.Bb(1),o.kc("ngIf",!e.saving),o.Bb(1),o.kc("ngIf",e.saving)}}function Ic(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",77),o.Zb("result",function(t){return o.sc(e),o.dc().errorConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("message",e.errorMessage)}}let Bc=(()=>{class e{constructor(e,t,n,i,o,r){this.stepService=e,this.presentationsService=t,this.cardsService=n,this.virtualRoomsService=i,this.router=o,this.fb=r,this.presentation={},this.cards=[],this.videoDirty=!1,this.thumbDirty=!1,this.saving=!1,this.step=1,this.stepOffset=0,this.steps=["Sala y logo","Descripci\xf3n","Preguntas","Video preguntas","Tarjeta","Finalizar"],this.rooms=[{id:1,path:"../../../assets/images/fondo1.png"},{id:2,path:"../../../assets/images/fondo2.png"},{id:3,path:"../../../assets/images/fondo3.png"}],this.errorMessage="",this.uploadError=!1,this.videoVisible=[!1,!1,!1,!1,!1,!1,!1],this.heroForm=this.fb.group({title:["",x.q.required],description:[""],public:[""],connectLabel:[""],disconnectLabel:[""],connectedLabel:[""],disconnectedLabel:[""]}),this.heroForm2=this.fb.group({question1:[""],question2:[""],question3:[""],question4:[""],question5:[""],question6:[""],question7:[""]})}getVirtualRoom(){this.virtualRoomsService.getVirtualRooms().subscribe(e=>{e&&e.length&&(this.virtualRoom=e[0])})}setQuestion(e,t){t.title&&this[`question${e}`].setValue(t.title),(t.videoUri||t.videoPath)&&(this[`questionVideo${e}`]=t.videoUri?{previewSource:t.videoUri}:t.videoPath?{previewSource:u+t.videoPath}:null)}ngOnInit(){var e,t,n;this.getVirtualRoom(),this.presentationsService.getPresentations(!0).subscribe(e=>{if(e&&e.length){const t=e[0];this.presentation.companyLogoUri=t.companyLogoUri,this.presentation.companyLogoPath=t.companyLogoPath,this.presentation.backgroundPath=t.backgroundPath,this.presentation.backgroundUri=t.backgroundUri,this.presentation.defaultBackgroundId=t.defaultBackgroundId,this.steps=["Descripci\xf3n","Preguntas","Video preguntas","Tarjeta","Finalizar"],this.stepOffset=1}this.stepService.setStep(this.step),this.stepService.setStepsInfo(this.steps)}),this.cards$=this.cardsService.getCards().pipe(Object(it.a)(e=>{e.length>0&&(this.cardsService.setMasterCard(e[0]),this.masterCard=e[0])}),Object(b.a)(e=>(Math.max(0,6-e.length),this.cards=[],this.masterCard?e.map(e=>{var t,n,i,o;return Object.assign(Object.assign({},e),{name:null===(t=this.masterCard)||void 0===t?void 0:t.name,lnames:null===(n=this.masterCard)||void 0===n?void 0:n.lnames,email:null===(i=this.masterCard)||void 0===i?void 0:i.email,logoPath:null===(o=this.masterCard)||void 0===o?void 0:o.logoPath})}):e)));const i=this.presentationsService.getCurrentPresentation();if(i){if(i.questions&&i.questions.length){this.savedQuestions=Object.assign(i.questions,[]).sort((e,t)=>e.id>t.id?1:e.ide.id===i.defaultBackgroundId):null}}roomBgChanged(e){this.selectedRoom=e}customBackgroundChanged(e){this.uploadedBackground=e}logoChanged(e){this.uploadedLogo=e}thumbChanged(e){this.uploadedThumb=e}previous(){1!==this.step&&(this.step=this.step-1,this.stepService.setStep(this.step))}continue(){var e,t,n,i,o,r,c,s,a,l,b,p,u,h,g;if((null===(e=this.container)||void 0===e?void 0:e.nativeElement)&&(this.container.nativeElement.scrollTop=0),this.step===1-this.stepOffset);else if(this.step===2-this.stepOffset){if(this.videoDirty=!0,this.thumbDirty=!0,!this.heroForm.valid)return void this.heroForm.markAllAsTouched();if(!this.uploadedVideo)return;if(!this.uploadedThumb)return}else if(this.step===6-this.stepOffset){this.presentation.extended=!0,this.presentation.title=null===(t=this.title)||void 0===t?void 0:t.value,this.presentation.description=null===(n=this.description)||void 0===n?void 0:n.value,this.presentation.public="public"===(null===(i=this.public)||void 0===i?void 0:i.value),this.presentation.defaultCardId=this.defaultCardId,this.presentation.defaultBackgroundId=this.selectedRoom?this.selectedRoom.id:null;let e=this.getVideoFromObj(this.uploadedVideo),m=this.getVideoFromObj(this.uploadedThumb),f=this.getVideoFromObj(this.uploadedLogo),v=this.getVideoFromObj(this.uploadedBackground);this.saving=!0;let _=[],S=[];const C=this.savedQuestions&&this.savedQuestions.length>1?this.savedQuestions[1].id:null,x=this.savedQuestions&&this.savedQuestions.length>2?this.savedQuestions[2].id:null,y=this.savedQuestions&&this.savedQuestions.length>3?this.savedQuestions[3].id:null,R=this.savedQuestions&&this.savedQuestions.length>4?this.savedQuestions[4].id:null,P=this.savedQuestions&&this.savedQuestions.length>5?this.savedQuestions[5].id:null,k=this.savedQuestions&&this.savedQuestions.length>6?this.savedQuestions[6].id:null;_.push({title:null===(o=this.question1)||void 0===o?void 0:o.value,id:this.savedQuestions&&this.savedQuestions.length>0?this.savedQuestions[0].id:null}),_.push({title:null===(r=this.question2)||void 0===r?void 0:r.value,id:C}),_.push({title:null===(c=this.question3)||void 0===c?void 0:c.value,id:x}),_.push({title:null===(s=this.question4)||void 0===s?void 0:s.value,id:y}),_.push({title:null===(a=this.question5)||void 0===a?void 0:a.value,id:R}),_.push({title:null===(l=this.question6)||void 0===l?void 0:l.value,id:P}),_.push({title:null===(b=this.question7)||void 0===b?void 0:b.value,id:k}),S.push(this.getVideoFromObj(this.questionVideo1)),S.push(this.getVideoFromObj(this.questionVideo2)),S.push(this.getVideoFromObj(this.questionVideo3)),S.push(this.getVideoFromObj(this.questionVideo4)),S.push(this.getVideoFromObj(this.questionVideo5)),S.push(this.getVideoFromObj(this.questionVideo6)),S.push(this.getVideoFromObj(this.questionVideo7));let w=Object(d.a)(!0);return this.virtualRoom&&(this.virtualRoom.connectLabel=null===(p=this.connectLabel)||void 0===p?void 0:p.value,this.virtualRoom.disconnectLabel=null===(u=this.disconnectLabel)||void 0===u?void 0:u.value,this.virtualRoom.connectedLabel=null===(h=this.connectedLabel)||void 0===h?void 0:h.value,this.virtualRoom.disconnectedLabel=null===(g=this.disconnectedLabel)||void 0===g?void 0:g.value,w=this.virtualRoomsService.saveVirtualRoom(this.virtualRoom,null,null)),void w.subscribe(()=>{this.presentationsService.savePresentationWithQuestions(this.presentation,e,m,f,v,_,S).subscribe(e=>{var t;this.saving=!1,"private"===(null===(t=this.public)||void 0===t?void 0:t.value)?this.router.navigate(["/app/cards"],{queryParams:{t:"2"}}):this.router.navigate(["/app/profile-virtual-room"])})})}this.step=this.step+1,this.stepService.setStep(this.step)}getVideoFromObj(e){const t=e&&e.files?e.files:null;return t&&t.nativeElement&&t.nativeElement.files?t.nativeElement.files[0]:null}videoChanged(e){this.uploadedVideo=e}videoQuestionChanged(e,t){1===t?this.questionVideo1=e:2===t?this.questionVideo2=e:3===t?this.questionVideo3=e:4===t?this.questionVideo4=e:5===t?this.questionVideo5=e:6===t?this.questionVideo6=e:7===t&&(this.questionVideo7=e)}videoUploadError(e){e&&e.code&&(this.errorMessage="El video de presentaci\xf3n que est\xe1s intentado subir excede el peso permitido de 25 megas, por favor aj\xfastalo e intenta nuevamente.",this.uploadError=!0)}errorConfirmationCallback(e){this.uploadError=!1}toggleVideo(e){for(let t=0;t1-t.stepOffset&&t.step<5-t.stepOffset),o.Bb(1),o.kc("ngIf",t.step===5-t.stepOffset),o.Bb(1),o.kc("ngIf",t.step===6-t.stepOffset),o.Bb(1),o.kc("ngIf",t.step===4-t.stepOffset),o.Bb(1),o.kc("ngIf",t.step===5-t.stepOffset),o.Bb(6),o.kc("ngIf",t.uploadError))},directives:[m.l,P,x.s,x.k,Qt,en,x.g,x.a,x.j,x.e,x.o,m.k,ae,m.j,dt],pipes:[m.b],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.preview__container[_ngcontent-%COMP%]{margin-bottom:36px}.questions[_ngcontent-%COMP%]{margin-top:36px}.question__container[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:12px;padding:10px 14px;margin-bottom:2px}.question__title[_ngcontent-%COMP%]{font-size:11px;color:#3a5081}.question__subtitle[_ngcontent-%COMP%]{position:relative}.question__subtitle[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{position:absolute;right:10px;top:-15px}.question__video[_ngcontent-%COMP%]{margin-top:16px}.checkbox__container[_ngcontent-%COMP%]{display:inline-block}.checkbox__container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80px}.cards__container[_ngcontent-%COMP%]{display:grid;grid-gap:20px;margin-bottom:20px}.card__btn[_ngcontent-%COMP%]{width:100%;text-align:center}"]}),e})();class zc{static patternValidator(e,t){return n=>n.value?e.test(n.value)?null:t:null}static passwordMatchValidator(e){if(e&&(!e||e.get("password")&&e.get("confirmPassword"))&&(e.get("password")||{}).value!==(e.get("confirmPassword")||{}).value){const t=e.get("confirmPassword");t&&t.setErrors({NoPassswordMatch:!0})}}}const Nc=function(){return["/login"]};function qc(e,t){1&e&&(o.Sb(0,"div",2),o.Sb(1,"h1"),o.zc(2,"Registro exitoso"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Recuerda verificar tu correo para activar tu cuenta y poder acceder a Platpres."),o.Rb(),o.Sb(5,"div",3),o.Sb(6,"a",4),o.zc(7,"Volver"),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(6),o.kc("routerLink",o.lc(1,Nc)))}function Fc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Nombres son requeridos "),o.Rb())}function jc(e,t){if(1&e&&(o.Sb(0,"div",22),o.yc(1,Fc,2,0,"div",23),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.names&&e.names.errors&&e.names.errors.required)}}function Ec(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Apellidos son requeridos "),o.Rb())}function Tc(e,t){if(1&e&&(o.Sb(0,"div",22),o.yc(1,Ec,2,0,"div",23),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.lnames&&e.lnames.errors&&e.lnames.errors.required)}}function Vc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Nombre empresa es requerido "),o.Rb())}function Lc(e,t){if(1&e&&(o.Sb(0,"div",22),o.yc(1,Vc,2,0,"div",23),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.companyName&&e.companyName.errors&&e.companyName.errors.required)}}function Dc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Email es requerido "),o.Rb())}function $c(e,t){if(1&e&&(o.Sb(0,"div",22),o.yc(1,Dc,2,0,"div",23),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.email&&e.email.errors&&e.email.errors.required)}}function Ac(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a es requerida "),o.Rb())}function Zc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere 8 caracteres "),o.Rb())}function Uc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a debe ser de m\xe1ximo 16 caracteres "),o.Rb())}function Gc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere un n\xfamero "),o.Rb())}function Qc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere una letra en may\xfascula "),o.Rb())}function Yc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere una letra en min\xfascula "),o.Rb())}function Wc(e,t){if(1&e&&(o.Sb(0,"div",22),o.yc(1,Ac,2,0,"div",23),o.yc(2,Zc,2,0,"div",23),o.yc(3,Uc,2,0,"div",23),o.yc(4,Gc,2,0,"div",23),o.yc(5,Qc,2,0,"div",23),o.yc(6,Yc,2,0,"div",23),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.required),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.minlength),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.maxlength),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasNumber),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasCapitalCase),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasSmallCase)}}function Hc(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1as no coinciden "),o.Rb())}function Xc(e,t){if(1&e&&(o.Sb(0,"div",22),o.zc(1),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Bc(" ",e.loginError," ")}}function Kc(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",5),o.Sb(1,"h1"),o.zc(2,"Reg\xedstrate"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Completa tu informaci\xf3n para crear tu usuario."),o.Rb(),o.Sb(5,"form",6),o.Sb(6,"div",7),o.Sb(7,"div",8),o.Sb(8,"label",9),o.zc(9,"Nombres"),o.Rb(),o.Nb(10,"input",10),o.yc(11,jc,2,1,"div",11),o.Rb(),o.Sb(12,"div",8),o.Sb(13,"label",12),o.zc(14,"Apellidos"),o.Rb(),o.Nb(15,"input",13),o.yc(16,Tc,2,1,"div",11),o.Rb(),o.Rb(),o.Sb(17,"label",14),o.zc(18,"Nombre de la empresa"),o.Rb(),o.Nb(19,"input",15),o.yc(20,Lc,2,1,"div",11),o.Sb(21,"label",16),o.zc(22,"Correo electr\xf3nico"),o.Rb(),o.Nb(23,"input",17),o.yc(24,$c,2,1,"div",11),o.Sb(25,"div",7),o.Sb(26,"div",8),o.Sb(27,"label",18),o.zc(28,"Contrase\xf1a"),o.Rb(),o.Nb(29,"input",19),o.yc(30,Wc,7,6,"div",11),o.Rb(),o.Sb(31,"div",8),o.Sb(32,"label",20),o.zc(33,"Repetir Contrase\xf1a"),o.Rb(),o.Nb(34,"input",21),o.Sb(35,"div",22),o.yc(36,Hc,2,0,"div",23),o.Rb(),o.Rb(),o.Rb(),o.Sb(37,"app-upload-file",24),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc().profilePicChanged(t)}),o.Rb(),o.yc(38,Xc,2,1,"div",11),o.Sb(39,"div",3),o.Sb(40,"button",25),o.Zb("click",function(){return o.sc(e),o.dc().submit()}),o.zc(41,"Continuar"),o.Rb(),o.Sb(42,"a",4),o.zc(43,"Volver"),o.Rb(),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(5),o.kc("formGroup",e.loginForm),o.Bb(6),o.kc("ngIf",(null==e.names?null:e.names.invalid)&&((null==e.names?null:e.names.dirty)||(null==e.names?null:e.names.touched))),o.Bb(5),o.kc("ngIf",(null==e.lnames?null:e.lnames.invalid)&&((null==e.lnames?null:e.lnames.dirty)||(null==e.lnames?null:e.lnames.touched))),o.Bb(4),o.kc("ngIf",(null==e.companyName?null:e.companyName.invalid)&&((null==e.companyName?null:e.companyName.dirty)||(null==e.companyName?null:e.companyName.touched))),o.Bb(4),o.kc("ngIf",(null==e.email?null:e.email.invalid)&&((null==e.email?null:e.email.dirty)||(null==e.email?null:e.email.touched))),o.Bb(6),o.kc("ngIf",(null==e.password?null:e.password.invalid)&&((null==e.password?null:e.password.dirty)||(null==e.password?null:e.password.touched))),o.Bb(6),o.kc("ngIf",((null==e.confirmPassword?null:e.confirmPassword.dirty)||(null==e.confirmPassword?null:e.confirmPassword.touched))&&e.confirmPassword&&e.confirmPassword.errors),o.Bb(2),o.kc("ngIf",e.loginError),o.Bb(4),o.kc("routerLink",o.lc(9,Nc))}}let Jc=(()=>{class e{constructor(e,t,n){this.fb=e,this.router=t,this.authService=n,this.registering=!0,this.loginForm=this.fb.group({email:["",[x.q.required,x.q.email]],names:["",x.q.required],lnames:["",x.q.required],companyName:["",x.q.required],password:["",[x.q.required,x.q.minLength(8),x.q.maxLength(16),zc.patternValidator(/\d/,{hasNumber:!0}),zc.patternValidator(/[A-Z]/,{hasCapitalCase:!0}),zc.patternValidator(/[a-z]/,{hasSmallCase:!0})]],confirmPassword:["",[x.q.required]]},{validators:zc.passwordMatchValidator}),this.loginError=""}validatePassword(e){const{value:t}=e.get("password")||{},{value:n}=e.get("password2")||{};return t===n?null:{passwordNotMatch:!0}}ngOnInit(){}submit(){var e,t,n,i,o;if(!this.loginForm.valid)return void this.loginForm.markAllAsTouched();const r={username:null===(e=this.email)||void 0===e?void 0:e.value,name:null===(t=this.names)||void 0===t?void 0:t.value,lastname:null===(n=this.lnames)||void 0===n?void 0:n.value,password:null===(i=this.password)||void 0===i?void 0:i.value,companyname:null===(o=this.companyName)||void 0===o?void 0:o.value},c=this.uploadedProfile&&this.uploadedProfile.files?this.uploadedProfile.files:null;let s=null;c&&(s=c.nativeElement&&c.nativeElement.files?c.nativeElement.files[0]:null),this.authService.register(r,s).subscribe(e=>{this.registering=!1},e=>{this.loginError=e&&e.error&&15===e.error.errorCode?"Usuario ya se encuentra registrado":"Ha ocurrido un error registrando el usuario"})}profilePicChanged(e){this.uploadedProfile=e}get email(){return this.loginForm.get("email")}get names(){return this.loginForm.get("names")}get lnames(){return this.loginForm.get("lnames")}get password(){return this.loginForm.get("password")}get confirmPassword(){return this.loginForm.get("confirmPassword")}get companyName(){return this.loginForm.get("companyName")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(x.b),o.Mb(l.f),o.Mb(g))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-register"]],decls:2,vars:2,consts:[["class","card2",4,"ngIf"],["class","card",4,"ngIf"],[1,"card2"],[1,"btn-section"],[1,"link",3,"routerLink"],[1,"card"],["autocomplete","off",3,"formGroup"],[1,"form-horizontal-group"],[1,"form-group"],["for","names"],["type","text","id","names","name","names","placeholder","Nombres","formControlName","names"],["class","alert alert-danger",4,"ngIf"],["for","lnames"],["type","text","id","lnames","name","lnames","placeholder","Apellidos","formControlName","lnames"],["for","companyName"],["type","text","id","companyName","name","companyName","placeholder","Ej: Nombre de tu empresa","formControlName","companyName"],["for","email"],["type","text","id","email","name","email","placeholder","Ej: user@server.com","formControlName","email"],["for","password"],["type","password","id","password","name","password","placeholder","Contrase\xf1a","formControlName","password","autocomplete","new-password"],["for","confirmPassword"],["type","password","id","confirmPassword","name","confirmPassword","placeholder","Repetir Contrase\xf1a","formControlName","confirmPassword","autocomplete","new-password"],[1,"alert","alert-danger"],[4,"ngIf"],["title","Imagen de perfil","subtitle","Sube una imagen de perfil desde tu dispositivo",3,"selectedFiles"],["type","submit",1,"btn","btn--large","btn--tertiary",3,"click"]],template:function(e,t){1&e&&(o.yc(0,qc,8,2,"div",0),o.yc(1,Kc,44,10,"div",1)),2&e&&(o.kc("ngIf",!t.registering),o.Bb(1),o.kc("ngIf",t.registering))},directives:[m.l,l.i,x.s,x.k,x.g,x.a,x.j,x.e,en],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;top:50%;position:absolute;left:50%;transform:translate(-50%,-50%);max-height:100%;overflow:scroll}@media (max-width:480px){[_nghost-%COMP%]{width:90%}}.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{background:#fff;border:1px solid #d9d9d9;border-radius:15px;width:500px;min-height:700px;padding:28px 41px}@media (max-width:480px){.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{width:100%;padding:28px 30px}}.card2[_ngcontent-%COMP%]{min-height:180px}.forgot-password[_ngcontent-%COMP%]{display:block;margin-bottom:24px}.sign-in-google[_ngcontent-%COMP%]{float:right}.sign-in-google[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:220px}.btn-section[_ngcontent-%COMP%]{width:100%;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;align-content:space-around;justify-content:center;align-items:center}.btn-section[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin-top:16px}.aligned-bottom[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:space-around;justify-content:flex-end}"]}),e})();function es(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a es requerida "),o.Rb())}function ts(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere 8 caracteres "),o.Rb())}function ns(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a debe ser de m\xe1ximo 16 caracteres "),o.Rb())}function is(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere un n\xfamero "),o.Rb())}function os(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere una letra en may\xfascula "),o.Rb())}function rs(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1a requiere una letra en min\xfascula "),o.Rb())}function cs(e,t){if(1&e&&(o.Sb(0,"div",9),o.yc(1,es,2,0,"div",10),o.yc(2,ts,2,0,"div",10),o.yc(3,ns,2,0,"div",10),o.yc(4,is,2,0,"div",10),o.yc(5,os,2,0,"div",10),o.yc(6,rs,2,0,"div",10),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.required),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.minlength),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.maxlength),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasNumber),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasCapitalCase),o.Bb(1),o.kc("ngIf",e.password&&e.password.errors&&e.password.errors.hasSmallCase)}}function ss(e,t){1&e&&(o.Sb(0,"div"),o.zc(1," Contrase\xf1as no coinciden "),o.Rb())}function as(e,t){if(1&e&&(o.Sb(0,"div",9),o.zc(1),o.Rb()),2&e){const e=o.dc(2);o.Bb(1),o.Bc(" ",e.loginError," ")}}function ls(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",2),o.Sb(1,"h1"),o.zc(2,"Recuperar contrase\xf1a"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Especifica tu contrase\xf1a en el siguiente formulario"),o.Rb(),o.Sb(5,"form",3),o.Sb(6,"label",4),o.zc(7,"Contrase\xf1a"),o.Rb(),o.Nb(8,"input",5),o.yc(9,cs,7,6,"div",6),o.Sb(10,"label",7),o.zc(11,"Repetir Contrase\xf1a"),o.Rb(),o.Nb(12,"input",8),o.Sb(13,"div",9),o.yc(14,ss,2,0,"div",10),o.Rb(),o.yc(15,as,2,1,"div",6),o.Sb(16,"button",11),o.Zb("click",function(){return o.sc(e),o.dc().submit()}),o.zc(17,"Continuar "),o.Nb(18,"i",12),o.Rb(),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(5),o.kc("formGroup",e.loginForm),o.Bb(4),o.kc("ngIf",(null==e.password?null:e.password.invalid)&&((null==e.password?null:e.password.dirty)||(null==e.password?null:e.password.touched))),o.Bb(5),o.kc("ngIf",((null==e.confirmPassword?null:e.confirmPassword.dirty)||(null==e.confirmPassword?null:e.confirmPassword.touched))&&e.confirmPassword&&e.confirmPassword.errors),o.Bb(1),o.kc("ngIf",e.loginError)}}const ds=function(){return["/app"]};function bs(e,t){1&e&&(o.Sb(0,"div",13),o.Sb(1,"h1"),o.zc(2,"Recuperar contrase\xf1a"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Se ha cambiado la contrase\xf1a satisfactoriamente"),o.Rb(),o.Sb(5,"div",14),o.Sb(6,"button",15),o.zc(7,"Continuar "),o.Nb(8,"i",12),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(6),o.kc("routerLink",o.lc(1,ds)))}let ps=(()=>{class e{constructor(e,t,n){this.route=e,this.fb=t,this.authService=n,this.recovered=!1,this.loginForm=this.fb.group({password:["",[x.q.required,x.q.minLength(8),x.q.maxLength(16),zc.patternValidator(/\d/,{hasNumber:!0}),zc.patternValidator(/[A-Z]/,{hasCapitalCase:!0}),zc.patternValidator(/[a-z]/,{hasSmallCase:!0})]],confirmPassword:["",[x.q.required]]},{validators:zc.passwordMatchValidator}),this.loginError="",this.success=!0,this.ac=""}ngOnInit(){this.route.queryParams.subscribe(e=>{this.ac=e.ac,this.ac||(this.success=!1)})}submit(){var e;this.loginForm.valid?this.authService.setpwd(this.ac,null===(e=this.password)||void 0===e?void 0:e.value).subscribe(e=>{this.recovered=!0},e=>{this.loginError="Ha ocurrido un error cambiando la contrase\xf1a."}):this.loginForm.markAllAsTouched()}get password(){return this.loginForm.get("password")}get confirmPassword(){return this.loginForm.get("confirmPassword")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(l.a),o.Mb(x.b),o.Mb(g))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-set-pwd"]],decls:2,vars:2,consts:[["class","card",4,"ngIf"],["class","card2",4,"ngIf"],[1,"card"],[3,"formGroup"],["for","password"],["type","password","id","password","name","password","placeholder","Contrase\xf1a","formControlName","password","autocomplete","new-password"],["class","alert alert-danger",4,"ngIf"],["for","confirmPassword"],["type","password","id","confirmPassword","name","confirmPassword","placeholder","Repetir Contrase\xf1a","formControlName","confirmPassword","autocomplete","new-password"],[1,"alert","alert-danger"],[4,"ngIf"],["type","submit",1,"btn","btn--large","btn--tertiary",3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"card2"],[1,"btn-section"],["type","submit",1,"btn","btn--large","btn--tertiary",3,"routerLink"]],template:function(e,t){1&e&&(o.yc(0,ls,19,4,"div",0),o.yc(1,bs,9,2,"div",1)),2&e&&(o.kc("ngIf",!t.recovered),o.Bb(1),o.kc("ngIf",t.recovered))},directives:[m.l,x.s,x.k,x.g,x.a,x.j,x.e,l.g],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;top:50%;position:absolute;left:50%;transform:translate(-50%,-50%)}@media (max-width:480px){[_nghost-%COMP%]{width:90%}}.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{background:#fff;border:1px solid #d9d9d9;border-radius:15px;width:500px;min-height:400px;padding:28px 41px}@media (max-width:480px){.card[_ngcontent-%COMP%], .card2[_ngcontent-%COMP%]{width:100%;padding:28px 30px}}.card2[_ngcontent-%COMP%]{min-height:180px}.forgot-password[_ngcontent-%COMP%]{display:block;margin-bottom:24px}.sign-in-google[_ngcontent-%COMP%]{float:right}.sign-in-google[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:220px}.btn[_ngcontent-%COMP%]{margin-top:24px}"]}),e})();var us=n("mrSG"),hs=n("P6Fj");function gs(e,t){if(1&e&&(o.Sb(0,"option",14),o.zc(1),o.Rb()),2&e){const e=t.$implicit,n=o.dc(4);o.kc("value",e.id)("selected",n.card&&n.card.id===e.id),o.Bb(1),o.Ac(e.cardName?e.cardName:e.name+" "+e.lnames)}}function ms(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2,"A continuaci\xf3n elige una tarjeta."),o.Rb(),o.Sb(3,"label",10),o.zc(4,"Elige una tarjeta:"),o.Rb(),o.Nb(5,"br"),o.Sb(6,"select",11),o.Zb("change",function(t){return o.sc(e),o.dc(3).cardSelectedCb(t)}),o.Sb(7,"option",12),o.zc(8,"Selecciona"),o.Rb(),o.yc(9,gs,2,3,"option",13),o.Rb(),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(9),o.kc("ngForOf",e.cards$)}}function fs(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2,"Elegiste la tarjeta:"),o.Rb(),o.Sb(3,"h4"),o.zc(4,"Datos"),o.Rb(),o.Sb(5,"div",15),o.Sb(6,"div",16),o.zc(7),o.Rb(),o.Sb(8,"div",16),o.zc(9),o.Rb(),o.Sb(10,"div",16),o.zc(11),o.Rb(),o.Sb(12,"div",16),o.zc(13),o.Rb(),o.Sb(14,"div",16),o.zc(15),o.Rb(),o.Sb(16,"div",16),o.zc(17),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(7),o.Bc("Nombre tarjeta: ",e.card.cardName,""),o.Bb(2),o.Cc("Nombre: ",e.card.name," ",e.card.lnames,""),o.Bb(2),o.Bc("Cargo: ",e.card.position,""),o.Bb(2),o.Bc("Correo: ",e.card.email,""),o.Bb(2),o.Bc("Celular: ",e.card.cellphone,""),o.Bb(2),o.Bc("Website: ",e.card.website,"")}}function vs(e,t){if(1&e&&(o.Sb(0,"option",14),o.zc(1),o.Rb()),2&e){const e=t.$implicit,n=o.dc(4);o.kc("value",e.id)("selected",n.presentation&&n.presentation.id===e.id),o.Bb(1),o.Ac(e.title)}}function _s(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2,"A continuaci\xf3n elige una presentaci\xf3n."),o.Rb(),o.Sb(3,"label",17),o.zc(4,"Elige una presentaci\xf3n:"),o.Rb(),o.Nb(5,"br"),o.Sb(6,"select",18),o.Zb("change",function(t){return o.sc(e),o.dc(3).presentationSelectedCb(t)}),o.Sb(7,"option",12),o.zc(8,"Selecciona"),o.Rb(),o.yc(9,vs,2,3,"option",13),o.Rb(),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(9),o.kc("ngForOf",e.presentations$)}}function Ss(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"h4"),o.zc(2),o.Rb(),o.Sb(3,"p"),o.zc(4),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(2),o.Bc(" ",e.presentation.title," "),o.Bb(2),o.Ac(e.presentation.description)}}function Cs(e,t){1&e&&(o.Sb(0,"div",19),o.Sb(1,"div"),o.zc(2," Tarjeta y presentaci\xf3n son requeridos "),o.Rb(),o.Rb())}function xs(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"h4"),o.zc(2,"Tarjeta"),o.Rb(),o.yc(3,ms,10,1,"div",3),o.yc(4,fs,18,7,"div",3),o.Sb(5,"h4"),o.zc(6,"Presentaci\xf3n"),o.Rb(),o.yc(7,_s,10,1,"div",3),o.yc(8,Ss,5,2,"div",3),o.yc(9,Cs,3,0,"div",9),o.Rb()),2&e){const e=o.dc(2);o.Bb(3),o.kc("ngIf",!e.cardSelected),o.Bb(1),o.kc("ngIf",e.card&&e.card.id),o.Bb(3),o.kc("ngIf",!e.presentationSelected),o.Bb(1),o.kc("ngIf",e.presentation&&e.presentation.id&&-1!==e.presentation.id),o.Bb(1),o.kc("ngIf",(!e.presentation.id||!e.card.id)&&e.formDirty)}}function ys(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",22),o.Zb("click",function(){o.sc(e);const t=o.dc(3);return t.selectContact=!t.selectContact}),o.zc(1),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(1),o.Ac(e.selectContact?"Agregar Contacto":"Seleccionar contacto")}}function Rs(e,t){if(1&e&&(o.Sb(0,"option",25),o.zc(1),o.Rb()),2&e){const e=t.$implicit;o.kc("value",e.id),o.Bb(1),o.Ac(e.name)}}function Ps(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"label",17),o.zc(2,"Ingresa el nombre de tu contacto:"),o.Rb(),o.Nb(3,"br"),o.Sb(4,"select",23),o.Zb("change",function(t){return o.sc(e),o.dc(3).contactSelectedCb(t)}),o.Sb(5,"option",12),o.zc(6,"Selecciona"),o.Rb(),o.yc(7,Rs,2,2,"option",24),o.Rb(),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(7),o.kc("ngForOf",e.myContacts)}}function ks(e,t){1&e&&(o.Sb(0,"div"),o.Sb(1,"label",32),o.zc(2,"Ingrese el correo de tu contacto:"),o.Rb(),o.Nb(3,"br"),o.Nb(4,"input",33),o.Rb())}function ws(e,t){1&e&&(o.Sb(0,"div"),o.Sb(1,"label",32),o.zc(2,"Ingrese el ID de Platpres de tu contacto:"),o.Rb(),o.Nb(3,"br"),o.Nb(4,"input",34),o.Rb())}function Os(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"label",26),o.zc(2,"Ingrese el nombre de tu contacto:"),o.Rb(),o.Nb(3,"br"),o.Nb(4,"input",27),o.Nb(5,"br"),o.Sb(6,"label",10),o.zc(7,"Elige una metodo de env\xedo:"),o.Rb(),o.Nb(8,"br"),o.Sb(9,"select",28),o.Zb("change",function(t){return o.sc(e),o.dc(3).methodSelectedCb(t)}),o.Sb(10,"option",29),o.zc(11,"Email"),o.Rb(),o.Sb(12,"option",30),o.zc(13,"ID Platpres"),o.Rb(),o.Rb(),o.Nb(14,"br"),o.yc(15,ks,5,0,"div",3),o.yc(16,ws,5,0,"div",3),o.Nb(17,"br"),o.Sb(18,"button",31),o.Zb("click",function(){return o.sc(e),o.dc(3).addContact()}),o.zc(19,"Agregar"),o.Rb(),o.Nb(20,"br"),o.Nb(21,"br"),o.Rb()}if(2&e){const e=o.dc(3);o.Bb(15),o.kc("ngIf","email"===e.method),o.Bb(1),o.kc("ngIf","platpres"===e.method)}}function Ms(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div"),o.Sb(1,"p"),o.zc(2,"Agrega un listado con tus contactos, mira el "),o.Sb(3,"a",35),o.zc(4,"formato"),o.Rb(),o.zc(5," de muestra"),o.Rb(),o.Sb(6,"app-upload-file",36),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(3).csvChanged(t)}),o.Rb(),o.Rb()}}function Is(e,t){if(1&e&&(o.Sb(0,"div",44),o.Sb(1,"div",45),o.zc(2),o.Rb(),o.Sb(3,"div",46),o.zc(4),o.Rb(),o.Sb(5,"div",47),o.zc(6),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.Bb(2),o.Bc(" ",e.name," "),o.Bb(2),o.Bc(" ",e.email," "),o.Bb(2),o.Bc(" ",e.id," ")}}function Bs(e,t){if(1&e&&(o.Sb(0,"div"),o.Sb(1,"div",37),o.Sb(2,"div",38),o.Sb(3,"div",39),o.Sb(4,"h4"),o.zc(5,"Nombre"),o.Rb(),o.Rb(),o.Sb(6,"div",40),o.Sb(7,"h4"),o.zc(8,"Correo electr\xf3nico"),o.Rb(),o.Rb(),o.Sb(9,"div",41),o.Sb(10,"h4"),o.zc(11,"Id Platpres"),o.Rb(),o.Rb(),o.Rb(),o.Sb(12,"div",42),o.yc(13,Is,7,3,"div",43),o.Rb(),o.Nb(14,"br"),o.Nb(15,"br"),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(13),o.kc("ngForOf",e.contacts)}}function zs(e,t){1&e&&(o.Sb(0,"div",19),o.Sb(1,"div"),o.zc(2," Al menos un contacto es requerido "),o.Rb(),o.Rb())}function Ns(e,t){if(1&e&&(o.Sb(0,"form",20),o.Sb(1,"p"),o.zc(2,"Elige el destinatario para la tarjeta:"),o.Rb(),o.yc(3,ys,2,1,"a",21),o.yc(4,Ps,8,1,"div",3),o.yc(5,Os,22,2,"div",3),o.yc(6,Ms,7,0,"div",3),o.yc(7,Bs,16,1,"div",3),o.yc(8,zs,3,0,"div",9),o.Rb()),2&e){const e=o.dc(2);o.kc("formGroup",e.contactForm),o.Bb(3),o.kc("ngIf",!1),o.Bb(1),o.kc("ngIf",e.selectContact),o.Bb(1),o.kc("ngIf",!e.selectContact),o.Bb(1),o.kc("ngIf",!e.contacts||e.contacts&&!e.contacts.length),o.Bb(1),o.kc("ngIf",e.contacts&&e.contacts.length),o.Bb(1),o.kc("ngIf",e.contacts.length<1&&e.contactsDirty)}}function qs(e,t){if(1&e){const e=o.Tb();o.Sb(0,"form",20),o.Sb(1,"h4"),o.zc(2,"Adjunta un PDF"),o.Rb(),o.Sb(3,"p"),o.zc(4,"Ten en cuenta que este paso es opcional y puedes decidir si quieres usarlo"),o.Rb(),o.Sb(5,"app-upload-file",48),o.Zb("selectedFiles",function(t){return o.sc(e),o.dc(2).pdfChanged(t)}),o.Rb(),o.Sb(6,"h4"),o.zc(7,'Personaliza el bot\xf3n de "Hagamos negocio"'),o.Rb(),o.Sb(8,"p"),o.zc(9,"Ten en cuenta que este campo es opcional y puedes decidir si quieres usarlo"),o.Rb(),o.Sb(10,"label",49),o.zc(11,"Etiqueta:"),o.Rb(),o.Nb(12,"br"),o.Nb(13,"input",50),o.Nb(14,"br"),o.Rb()}if(2&e){const e=o.dc(2);o.kc("formGroup",e.buttonForm),o.Bb(5),o.kc("currentFile",e.uploadedPdf)}}function Fs(e,t){1&e&&(o.Sb(0,"h4"),o.zc(1,"Presentaci\xf3n"),o.Rb())}function js(e,t){if(1&e&&(o.Sb(0,"div",58),o.Sb(1,"video",59),o.zc(2," Your browser does not support the video tag. "),o.Rb(),o.Rb()),2&e){const e=o.dc(4);o.Bb(1),o.kc("src",e.presentation.videoUri,o.tc)}}function Es(e,t){if(1&e&&(o.Sb(0,"div",54),o.Sb(1,"div",55),o.yc(2,js,3,1,"div",56),o.Rb(),o.Sb(3,"div",57),o.Sb(4,"h4"),o.zc(5),o.Rb(),o.Sb(6,"p"),o.zc(7),o.Rb(),o.Rb(),o.Rb()),2&e){const e=o.dc(3);o.Bb(2),o.kc("ngIf",e.presentation&&e.presentation.videoUri),o.Bb(3),o.Ac(null==e.presentation?null:e.presentation.title),o.Bb(2),o.Ac(null==e.presentation?null:e.presentation.description)}}function Ts(e,t){if(1&e&&(o.Sb(0,"form"),o.Sb(1,"p"),o.zc(2,"A continuaci\xf3n puedes revisar la tarjeta final antes de enviarla."),o.Rb(),o.Sb(3,"div",51),o.Nb(4,"app-pp-card",52),o.Rb(),o.yc(5,Fs,2,0,"h4",3),o.yc(6,Es,8,3,"div",53),o.Rb()),2&e){const e=o.dc(2);o.Bb(4),o.kc("card",e.card),o.Bb(1),o.kc("ngIf",e.presentation&&e.presentation.id&&-1!==e.presentation.id),o.Bb(1),o.kc("ngIf",e.presentation&&e.presentation.id&&-1!==e.presentation.id)}}function Vs(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",60),o.Zb("click",function(){return o.sc(e),o.dc(2).previous()}),o.Nb(1,"i",61),o.Sb(2,"span"),o.zc(3,"Anterior"),o.Rb(),o.Rb()}}function Ls(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Siguiente"),o.Rb())}function Ds(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Enviar"),o.Rb())}function $s(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",31),o.Zb("click",function(){return o.sc(e),o.dc(2).continue()}),o.yc(1,Ls,2,0,"span",3),o.yc(2,Ds,2,0,"span",3),o.Nb(3,"i",62),o.Rb()}if(2&e){const e=o.dc(2);o.Bb(1),o.kc("ngIf",e.step<4),o.Bb(1),o.kc("ngIf",4===e.step)}}function As(e,t){1&e&&(o.Sb(0,"a",63),o.Sb(1,"div",64),o.Nb(2,"div"),o.Nb(3,"div"),o.Nb(4,"div"),o.Nb(5,"div"),o.Rb(),o.Sb(6,"span"),o.zc(7,"Enviando..."),o.Rb(),o.Rb())}function Zs(e,t){if(1&e&&(o.yc(0,xs,10,5,"form",3),o.yc(1,Ns,9,7,"form",4),o.yc(2,qs,15,2,"form",4),o.yc(3,Ts,7,3,"form",3),o.Sb(4,"div",5),o.yc(5,Vs,4,0,"a",6),o.yc(6,$s,4,2,"a",7),o.yc(7,As,8,0,"a",8),o.Rb()),2&e){const e=o.dc();o.kc("ngIf",1===e.step),o.Bb(1),o.kc("ngIf",2===e.step),o.Bb(1),o.kc("ngIf",3===e.step),o.Bb(1),o.kc("ngIf",4===e.step),o.Bb(2),o.kc("ngIf",!e.saving&&e.step>1),o.Bb(1),o.kc("ngIf",!e.saving),o.Bb(1),o.kc("ngIf",e.saving&&!e.creditsError)}}function Us(e,t){if(1&e){const e=o.Tb();o.Sb(0,"app-confirmation-dialog",65),o.Zb("result",function(t){return o.sc(e),o.dc().errorConfirmationCallback(t)}),o.Rb()}if(2&e){const e=o.dc();o.kc("message",e.errorMessage)}}let Gs=(()=>{class e{constructor(e,t,n,i,o,r,c,s,a){this.stepService=e,this.cardsService=t,this.presentationsService=n,this.sharesService=i,this.contactsService=o,this.papa=r,this.router=c,this.fb=s,this.auth=a,this.method="email",this.saving=!1,this.step=1,this.steps=["Tarjeta y presentaci\xf3n","Agregar contactos","Adjuntar PDF","Revisi\xf3n final"],this.card={},this.presentation={},this.share={},this.myContacts=[],this.contacts=[],this.contactsDirty=!1,this.formDirty=!1,this.creditsError=!1,this.errorDialogDisplayed=!1,this.errorMessage="",this.noPresentationItem={id:-1,title:"Sin presentaci\xf3n",description:""},this.cardSelected=!1,this.presentationSelected=!1,this.selectContact=!1,this.contactForm=this.fb.group({"new-contact-name":[""],"new-contact-email":[""],"new-contact-id":[""]}),this.buttonForm=this.fb.group({"new-deal-label":[""]})}ngOnInit(){this.contacts=[],this.stepService.setStep(this.step),this.stepService.setStepsInfo(this.steps),this.cardsService.getCards().subscribe(e=>{this.cards$=e});let e={};this.cardsService.getCards().pipe(Object(it.a)(t=>{t.length>0&&(this.cardsService.setMasterCard(t[0]),e=t[0])}),Object(b.a)(t=>(this.cards$=[],e?t.map(t=>Object.assign(Object.assign({},t),{name:null==e?void 0:e.name,lnames:null==e?void 0:e.lnames,email:null==e?void 0:e.email,logoPath:null==e?void 0:e.logoPath})):t))).subscribe(e=>{this.cards$=e,this.presentationsService.getPresentations().pipe(Object(b.a)(e=>e.map(e=>(e&&e.videoPath&&(e.videoPath=u+e.videoPath),e)))).subscribe(e=>{this.presentations$=[this.noPresentationItem,...e]})});const t=this.cardsService.getCurrentCard();t&&t.id&&(this.card=t,this.cardSelected=!0);const n=this.presentationsService.getCurrentPresentation();n&&n.id&&(this.presentation=n,this.presentationSelected=!0),this.contactsService.getContacts().subscribe(e=>{this.myContacts=e})}addContact(){var e,t,n,i,o,r,c;if(!(null===(e=this.newContactName)||void 0===e?void 0:e.value))return;const s={name:null===(t=this.newContactName)||void 0===t?void 0:t.value,email:(null===(n=this.newContactEmail)||void 0===n?void 0:n.value)?null===(i=this.newContactEmail)||void 0===i?void 0:i.value:"noemail",id:null===(o=this.newContactId)||void 0===o?void 0:o.value};this.contacts.push(s),this.newContactName.setValue(null),null===(r=this.newContactEmail)||void 0===r||r.setValue(null),null===(c=this.newContactId)||void 0===c||c.setValue(null)}pdfChanged(e){this.uploadedPdf=e}methodSelectedCb(e){this.method=e.target.value}contactSelectedCb(e){const t=this.myContacts.find(t=>t.id===parseInt(e.target.value));this.contacts.find(e=>e.email===t.email)||this.contacts.push(t)}cardSelectedCb(e){if(!this.cards$)return;const t=e.target.value?parseInt(e.target.value):0,n=this.cards$.find(e=>e.id===t);this.card=n||{}}presentationSelectedCb(e){if(!this.presentations$)return;const t=e.target.value?parseInt(e.target.value):0,n=this.presentations$.find(e=>e.id===t);this.presentation=n||{}}csvChanged(e){this.uploadedCsv=e;const t=new FileReader;t.onload=e=>{this.papa.parse(e.target.result,{complete:e=>{if(e&&e.errors&&0===e.errors.length&&e.data){const t=e.data[0].map((e,t)=>({idx:t,name:e.toLowerCase().trim()})),n=t.find(e=>e.name.indexOf("name")>-1||e.name.indexOf("nombre")>-1),i=t.find(e=>"email"===e.name),o=t.find(e=>"idplatpres"===e.name||"id platpres"===e.name);if(!i&&!o)return;e.data.shift();let r=0;this.contacts=e.data.map(e=>({name:n?e[n.idx]:"Sin nombre",email:i?e[i.idx]:"",id:o?e[o.idx]:""})).filter(e=>{if(i){const t=this.validateEmail(e.email);return t||r++,t}return!0}).filter((e,t)=>t<20);const c=e.data.length-r-this.contacts.length;this.validateIds(this.contacts.map(e=>e.id)).then(e=>{if(this.contacts=this.contacts.filter(t=>!(e.indexOf(t.id)>-1)),r>0||c>0||e.length){this.errorDialogDisplayed=!0;let t=[];r>0&&t.push(`${r} registros por correo no v\xe1lido`),c>0&&t.push(`${c} correos por superar los 20 registros.`),e.length>0&&t.push(`${e.length} registros por IdPlatpres invalido.`),t.length>0&&(this.errorMessage=`Se han descartado: \n${t.join(", ")}`)}})}}})},t.readAsBinaryString(e.files.nativeElement.files[0])}validateIds(e){return Object(us.a)(this,void 0,void 0,function*(){return!e||new Promise(t=>{this.auth.validateIds(e).subscribe(e=>t(e.not_valid))})})}errorConfirmationCallback(e){this.errorDialogDisplayed=!1}validateEmail(e){return String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}previous(){1!==this.step&&(this.step=this.step-1,this.stepService.setStep(this.step))}continue(){var e,t;if(!this.creditsError){if(1===this.step){if(this.formDirty=!0,!this.card.id||!this.presentation.id)return}else if(2===this.step){if(this.contactsDirty=!0,this.contacts.length<1)return}else if(4===this.step){this.share.cardId=this.card.id,this.share.presentationId=-1!==this.presentation.id?this.presentation.id:void 0;const n=this.uploadedCsv&&this.uploadedCsv.files?this.uploadedCsv.files:null,i=this.uploadedPdf&&this.uploadedPdf.files?this.uploadedPdf.files:null;let o=null,r=null;return n&&(o=n.nativeElement&&n.nativeElement.files?n.nativeElement.files[0]:null),i&&(r=i.nativeElement&&i.nativeElement.files?i.nativeElement.files[0]:null),(null===(e=this.newDealLabel)||void 0===e?void 0:e.value)&&(this.share.newDealLabel=null===(t=this.newDealLabel)||void 0===t?void 0:t.value),this.saving=!0,void this.sharesService.saveShare(this.share,o,r).subscribe(e=>{this.share.state="sending",this.share.id=e.id;let t=this.contacts.filter(e=>e.id);t&&t.length&&(t=t.map(e=>e.id));let i=n?[]:this.contacts.filter(e=>!e.id&&e.email);(()=>{this.sharesService.updateShare(Object.assign(Object.assign({},this.share),{contacts:t,contactsEmails:i})).subscribe(()=>{this.saving=!1,!this.share||this.share&&!this.share.id||this.sharesService.getDeals("",this.share&&this.share.id?this.share.id:-1).subscribe(e=>{this.router.navigate(e.length>0?[`/app/leads/${e[0].id}`]:["/app/leads/"])})},e=>{e&&400===e.status&&e.error&&e.error.message&&"No enough credits"===e.error.message&&(this.creditsError=!0,this.errorMessage="No cuentas con suficientes creditos para realizar esta acci\xf3n. Contacta al administrador en info@platpres.com para m\xe1s informaci\xf3n.",this.errorDialogDisplayed=!0)})})()})}this.step=this.step+1,this.stepService.setStep(this.step)}}get newContactName(){return this.contactForm.get("new-contact-name")}get newContactEmail(){return this.contactForm.get("new-contact-email")}get newContactId(){return this.contactForm.get("new-contact-id")}get newDealLabel(){return this.buttonForm.get("new-deal-label")}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Lt),o.Mb(ot),o.Mb(rt),o.Mb(y),o.Mb(Ne),o.Mb(hs.a),o.Mb(l.f),o.Mb(x.b),o.Mb(g))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-share-card"]],decls:7,vars:2,consts:[[1,"page-container","page-wizard"],[1,"row","cols-1"],[3,"message","result",4,"ngIf"],[4,"ngIf"],[3,"formGroup",4,"ngIf"],[1,"buttons-container"],["class","btn btn--secondary btn--large btn-previous",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large",3,"click",4,"ngIf"],["class","btn btn--tertiary btn--large button-with-icon",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["for","card"],["name","card","id","card",3,"change"],["selected",""],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"],[1,"card-info__container"],[1,"card-info__item"],["for","presentation"],["name","presentation","id","presentation",3,"change"],[1,"alert","alert-danger"],[3,"formGroup"],["style","cursor: pointer",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["name","contacts","id","contacts",3,"change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["for","new-contact-name"],["type","text","id","new-contact-name","name","new-contact-name","placeholder","Ingresa nombre","formControlName","new-contact-name",1,"form-control"],["name","method","id","method",3,"change"],["value","email","selected",""],["value","platpres"],[1,"btn","btn--tertiary","btn--large",3,"click"],["for","new-contact-email"],["type","text","id","new-contact-email","name","new-contact-email","placeholder","Ingresa correo","formControlName","new-contact-email",1,"form-control"],["type","text","id","new-contact-id","name","new-contact-id","placeholder","Ingresa Id Platpres","formControlName","new-contact-id",1,"form-control"],["href","https://s3.amazonaws.com/platpres-digital2/public/misc/formato.csv","target","_blank"],["title","Sube un CSV con tus contactos","subtitle","Agrega un listado con tus contactos (Formato CSV)","accept",".csv",3,"selectedFiles"],[1,"contacts__container"],[1,"contacts__header"],[1,"contacts__header-name"],[1,"contacts__header-email"],[1,"contacts__header-id"],[1,"contacts__list"],["class","contacts__list-item",4,"ngFor","ngForOf"],[1,"contacts__list-item"],[1,"contacts__list-item__name"],[1,"contacts__list-item__email"],[1,"contacts__list-item__id"],["title","Adjuntar PDF","subtitle","Carga un documento para adjuntar a este negocio","accept","application/pdf",3,"currentFile","selectedFiles"],["for","new-deal-label"],["type","text","id","new-deal-label","name","new-deal-label","placeholder","Hagamos negocio","formControlName","new-deal-label",1,"form-control"],[1,"card__container"],[3,"card"],["class","preview__container",4,"ngIf"],[1,"preview__container"],[1,"preview__left"],["class","preview__video",4,"ngIf"],[1,"preview__right"],[1,"preview__video"],["width","500","height","350","controls","",3,"src"],[1,"btn","btn--secondary","btn--large","btn-previous",3,"click"],["aria-hidden","true",1,"left","fa","fa-light","fa-arrow-left"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"btn","btn--tertiary","btn--large","button-with-icon"],[1,"lds-ring","ring-button"],[3,"message","result"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1),o.Rb(),o.Sb(2,"div",0),o.Sb(3,"div",1),o.Sb(4,"app-white-card"),o.yc(5,Zs,8,7,"ng-template"),o.Rb(),o.Rb(),o.Rb(),o.yc(6,Us,1,1,"app-confirmation-dialog",2)),2&e&&(o.Bb(1),o.Bc("Comparte tu ",t.cardSelected?"tarjeta":"presentaci\xf3n",""),o.Bb(5),o.kc("ngIf",t.errorDialogDisplayed))},directives:[P,m.l,x.s,x.k,x.m,x.r,m.k,x.g,x.a,x.j,x.e,en,ae,dt],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.color-previewer__container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-left:36px;margin-right:36px}[_nghost-%COMP%] .app-color-picker{display:inline;margin-right:10px}.color-previewer__container[_ngcontent-%COMP%]{margin-bottom:24px}.card-preview__container[_ngcontent-%COMP%]{width:50%}.color-picker_block[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center}.color-picker__container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-bottom:10px}.alert[_ngcontent-%COMP%]{margin-bottom:24px;margin-top:6px;font-size:13px;color:red}input[_ngcontent-%COMP%] + .alert[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:-20px}.card-info__container[_ngcontent-%COMP%]{margin-bottom:24px}.card-info__item[_ngcontent-%COMP%]{margin-bottom:5px}h4[_ngcontent-%COMP%]{color:#3a5081}.card__container[_ngcontent-%COMP%]{width:60%}.contacts__header[_ngcontent-%COMP%]{display:flex;flex-direction:row}.contacts__header-name[_ngcontent-%COMP%]{width:30%}.contacts__header-email[_ngcontent-%COMP%]{width:40%}.contacts__header-id[_ngcontent-%COMP%]{width:30%}.contacts__list-item[_ngcontent-%COMP%]{display:flex;border:1px solid #eee;padding:20px;border-radius:10px;margin-bottom:2px}.contacts__list-item__name[_ngcontent-%COMP%]{width:30%}.contacts__list-item__email[_ngcontent-%COMP%]{width:40%}.contacts__list-item__id[_ngcontent-%COMP%]{width:30%}.preview__container[_ngcontent-%COMP%]{display:flex}.preview__left[_ngcontent-%COMP%], .preview__right[_ngcontent-%COMP%]{width:50%}.preview__left[_ngcontent-%COMP%]{padding-right:30px;margin-bottom:24px}.preview__video[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:nowrap;justify-content:center;align-content:center;align-items:center;flex-direction:row}.preview__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:90%}.form-control[_ngcontent-%COMP%]{width:300px}"]}),e})();const Qs=["file"];function Ys(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",11),o.Zb("click",function(){o.sc(e);const t=o.dc(2),n=o.pc(7);return t.virtualRoomExists?n.click():t.addPortraitImage()}),o.Nb(1,"i",12),o.Rb(),o.Sb(2,"p",13),o.zc(3,"Sube una imagen de perfil para tu empresa"),o.Rb()}}function Ws(e,t){1&e&&(o.Sb(0,"div",10),o.Sb(1,"app-white-card"),o.yc(2,Ys,4,0,"ng-template"),o.Rb(),o.Rb())}function Hs(e,t){}function Xs(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",10),o.Sb(1,"app-white-card"),o.yc(2,Hs,0,0,"ng-template"),o.Rb(),o.Sb(3,"button",14),o.Zb("click",function(){return o.sc(e),o.dc(),o.pc(7).click()}),o.Nb(4,"i",15),o.Rb(),o.Rb()}if(2&e){const e=o.dc();o.Bb(1),o.wc("background-image: url('",e.virtualRoom.portraitUri,"');")}}function Ks(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Crear una sala"),o.Rb())}function Js(e,t){1&e&&(o.Sb(0,"span"),o.zc(1,"Agregar otro video"),o.Rb())}let ea=(()=>{class e{constructor(e,t,n){this.virtualRoomsService=e,this.presentationsService=t,this.router=n,this.virtualRoomExists=!1,this.connectedLabel="Clientes conectados con tu empresa",this.disconnectedLabel="Clientes desconectados de tu empresa",this.acceptedExtensions="image/*"}ngOnInit(){this.getVirtualRoom(),this.presentationsService.getPresentations(!0).subscribe(e=>{this.presentations=e,this.virtualRoomExists=this.presentations.length>0})}getVirtualRoom(){this.virtualRoomsService.getVirtualRooms().subscribe(e=>{e&&e.length?(this.virtualRoom=e[0],this.virtualRoom&&(this.virtualRoom.connectedLabel&&(this.connectedLabel=this.virtualRoom.connectedLabel),this.virtualRoom.disconnectedLabel&&(this.disconnectedLabel=this.virtualRoom.disconnectedLabel))):this.virtualRoomsService.saveVirtualRoom({},null,null).subscribe(()=>{this.getVirtualRoom()})})}addPortraitImage(){this.virtualRoom||this.router.navigate(["/app/wizards/register-virtual-room/"])}addVideo(){this.presentationsService.setCurrentPresentation({}),this.router.navigate(["/app/wizards/register-virtual-room/"])}fileSelected(){if(!this.elementView)return;const[e]=this.elementView.nativeElement.files;e&&(this.virtualRoom?this.virtualRoomsService.savePortrait(this.virtualRoom,e).subscribe(()=>{this.getVirtualRoom()}):this.virtualRoomsService.saveVirtualRoom({},null,e).subscribe(()=>{this.getVirtualRoom()}))}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Zo),o.Mb(rt),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-virtual-room"]],viewQuery:function(e,t){if(1&e&&o.Dc(Qs,1),2&e){let e;o.oc(e=o.ac())&&(t.elementView=e.first)}},decls:17,vars:11,consts:[[1,"page-container"],["class","row profile-container",4,"ngIf"],["type","file","name","filename",2,"display","none",3,"accept","change"],["file",""],[1,"row","cols-1","cols-2-xl"],["theme","success","icon","check",3,"value","title","showMore"],["theme","error","icon","times",3,"value","title","showMore"],[1,"btn","btn--tertiary","btn--large","btn-deal",3,"click"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],[1,"row","profile-container"],[1,"add-profile-btn",3,"click"],[1,"fa","fa-light","fa-plus"],[1,"subtitle"],[1,"btn","btn--tertiary","btn--small","profile__edit-button",3,"click"],[1,"fa","fa-edit"]],template:function(e,t){1&e&&(o.Sb(0,"h3"),o.zc(1,"Crea tu sala virtual de negocios"),o.Rb(),o.Sb(2,"p"),o.zc(3,"Encuentra aqu\xed los videos de presentaciones de nuestros productos o servicios."),o.Rb(),o.Sb(4,"div",0),o.yc(5,Ws,3,0,"div",1),o.Sb(6,"input",2,3),o.Zb("change",function(){return t.fileSelected()}),o.Rb(),o.yc(8,Xs,5,3,"div",1),o.Sb(9,"div",4),o.Nb(10,"app-metric-card",5),o.Nb(11,"app-metric-card",6),o.Rb(),o.Sb(12,"div"),o.Sb(13,"a",7),o.Zb("click",function(){return t.addVideo()}),o.yc(14,Ks,2,0,"span",8),o.yc(15,Js,2,0,"span",8),o.Nb(16,"i",9),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(5),o.kc("ngIf",!t.virtualRoom||t.virtualRoom&&!t.virtualRoom.portraitUri),o.Bb(1),o.kc("accept",t.acceptedExtensions),o.Bb(2),o.kc("ngIf",t.virtualRoom&&t.virtualRoom.portraitUri),o.Bb(2),o.kc("value","0")("title",t.connectedLabel)("showMore",!1),o.Bb(1),o.kc("value","0")("title",t.disconnectedLabel)("showMore",!1),o.Bb(3),o.kc("ngIf",!t.virtualRoomExists),o.Bb(1),o.kc("ngIf",t.virtualRoomExists))},directives:[m.l,Le,P],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.add-profile-btn[_ngcontent-%COMP%]{display:block;border-radius:80px;width:80px;min-width:80px;height:80px;text-align:center;line-height:80px;font-size:32px;color:#fafafa;background:#666;cursor:pointer;margin:60px auto 0}.profile-container[_ngcontent-%COMP%]{min-height:250px;position:relative}.profile-container[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{text-align:center}.profile__edit-button[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.profile__edit-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%] .profile-container>app-white-card{background-size:cover}"]}),e})(),ta=(()=>{class e{constructor(){this.loading=0,this._loading$=new Et.a(!1),this.loading$=this._loading$.pipe(Object(Tt.a)(),Object(Vt.a)(0))}start(){this.loading++,this.emit()}stop(){this.loading>0&&(this.loading--,this.emit())}emit(){this._loading$.next(this.isLoading())}isLoading(){return this.loading>0}get isLoading$(){return this.loading$}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),na=(()=>{class e{constructor(e){this.loadingIndicatorService=e}ngOnInit(){}startFlow(){this.loadingIndicatorService.start(),setTimeout(()=>{this.loadingIndicatorService.stop()},5e3)}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(ta))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-hero"]],decls:17,vars:3,consts:[[1,"hero"],[1,"hero__background"],[1,"hero__bg_video"],[3,"thumbPath","videoPath"],[1,"hero__content"],[1,"hero__description-block"],[1,"btn","btn--large","btn--tertiary",3,"routerLink"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Nb(3,"app-video-container",3),o.Rb(),o.Sb(4,"div",4),o.Sb(5,"h2"),o.zc(6,"Abre m\xe1s puertas. "),o.Nb(7,"br"),o.zc(8," Cierra m\xe1s negocios."),o.Rb(),o.Sb(9,"div",5),o.Sb(10,"h4"),o.zc(11,"Te damos la bienvenida a tu nueva plataforma de presentaci\xf3n de negocios. "),o.Nb(12,"br"),o.zc(13,"Con ella tus negocios deben suceder mas r\xe1pido y alcanzar o superar tu meta de ventas debe costarte menos dinero, tiempo y esfuerzo."),o.Rb(),o.Sb(14,"a",6),o.zc(15,"\xa1Comencemos! "),o.Nb(16,"i",7),o.Rb(),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(3),o.kc("thumbPath","https://s3.amazonaws.com/platpres-digital2/public/misc/welcome-home-thumb.png")("videoPath","https://s3.amazonaws.com/platpres-digital2/public/misc/welcome-home.mp4"),o.Bb(11),o.kc("routerLink","login"))},directives:[me,l.i],styles:["[_nghost-%COMP%]{display:block;min-height:600px}.hero[_ngcontent-%COMP%]{display:flex;align-items:stretch;position:relative;flex-direction:row;justify-content:flex-end;align-items:center}.hero__background[_ngcontent-%COMP%]{display:block;border-radius:10px;background-image:url(hero-image.483f6a6ca7d4147c8799.png);background-repeat:no-repeat;background-size:cover;position:absolute;top:0;left:0;height:100%;width:100%}.hero__content[_ngcontent-%COMP%]{border-radius:10px;background-color:rgba(114,237,219,.92);width:35%;min-height:calc(100% - 40px);position:relative;margin:20px;box-sizing:border-box;padding:80px 32px}.hero__bg_video[_ngcontent-%COMP%]{width:55%;padding-left:32px;display:none;padding-right:12px}.hero__description-block[_ngcontent-%COMP%]{padding-right:30px}@media (min-width:768px){.hero[_ngcontent-%COMP%]{justify-content:space-around}.hero__background[_ngcontent-%COMP%]{background:rgba(0,0,0,.9)}.hero__bg_video[_ngcontent-%COMP%]{display:block}}@media (max-width:768px){.hero__content[_ngcontent-%COMP%]{width:50%;margin:20px}}@media (max-width:480px){.hero[_ngcontent-%COMP%]{vertical-align:bottom;min-height:656px;align-items:end}.hero__content[_ngcontent-%COMP%]{float:none;width:calc(100% - 20px);min-height:60%;top:calc(40% - 10px);margin:10px;padding:28px 21px}}"]}),e})(),ia=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-welcome"]],decls:1,vars:0,template:function(e,t){1&e&&o.Nb(0,"app-hero")},directives:[na],styles:["[_nghost-%COMP%]{height:100%;display:block;overflow:scroll}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{position:relative}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;z-index:2;max-width:1280px;margin:0 auto;padding-top:24px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100%;padding:24px 32px}.bg-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1}.bg-container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{float:left;width:50%;height:100%}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{float:right;width:50%;height:100%}@media (max-width:480px){.container[_ngcontent-%COMP%]{padding-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:0}}"]}),e})(),oa=(()=>{class e{constructor(){this.gridSize=null}get sizeClass(){return"small"===this.gridSize?this.gridSize:""}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-grid"]],inputs:{gridSize:"gridSize"},decls:1,vars:1,consts:[[1,"grid",3,"ngClass"]],template:function(e,t){1&e&&o.Nb(0,"div",0),2&e&&o.kc("ngClass",t.sizeClass)},directives:[m.j],styles:["[_nghost-%COMP%]{height:100%;display:block}.grid[_ngcontent-%COMP%]{background-image:url(green-point.896827dfb72bcecdca1b.png);background-size:30px;height:100%}.grid.small[_ngcontent-%COMP%]{background-size:28px}@media (max-width:480px){.grid[_ngcontent-%COMP%]{background-size:23px}}"]}),e})(),ra=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-logo"]],decls:2,vars:0,consts:[["href","/"],["src","/assets/platpres-logo-optimized.png"]],template:function(e,t){1&e&&(o.Sb(0,"a",0),o.Nb(1,"img",1),o.Rb())},styles:["[_nghost-%COMP%]{display:block}img[_ngcontent-%COMP%]{width:100px}@media (max-width:480px){img[_ngcontent-%COMP%]{width:50px}}"]}),e})(),ca=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-header"]],decls:2,vars:0,consts:[[1,"header"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"app-logo"),o.Rb())},directives:[ra],styles:["[_nghost-%COMP%]{padding-top:24px;box-sizing:border-box}.header[_ngcontent-%COMP%]{padding-left:138px}@media (max-width:768px){.header[_ngcontent-%COMP%]{padding-left:68px}}@media (max-width:480px){.header[_ngcontent-%COMP%]{padding-left:48px}}"]}),e})(),sa=(()=>{class e{constructor(){this.aligned=null}get alignedClass(){return"centered"===this.aligned?this.aligned:""}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-footer"]],inputs:{aligned:"aligned"},decls:3,vars:1,consts:[[3,"ngClass"],[1,"caption"]],template:function(e,t){1&e&&(o.Sb(0,"footer",0),o.Sb(1,"span",1),o.zc(2," Platpres \xa9 2017 Made your card. Share it! "),o.Rb(),o.Rb()),2&e&&o.kc("ngClass",t.alignedClass)},directives:[m.j],styles:["[_nghost-%COMP%]{box-sizing:border-box}footer[_ngcontent-%COMP%]{padding-left:138px;height:50px}.centered[_ngcontent-%COMP%]{text-align:center;padding:0}@media (max-width:768px){footer[_ngcontent-%COMP%]{padding-left:68px}}@media (max-width:480px){footer[_ngcontent-%COMP%]{position:static;display:flex;justify-content:center;padding:0}}"]}),e})(),aa=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-base"]],decls:9,vars:0,consts:[[1,"bg-container"],[1,"left"],[1,"right"],[1,"container"],[1,"content"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Nb(3,"app-grid"),o.Rb(),o.Rb(),o.Sb(4,"div",3),o.Nb(5,"app-header"),o.Sb(6,"div",4),o.Nb(7,"router-outlet"),o.Rb(),o.Nb(8,"app-footer"),o.Rb())},directives:[oa,ca,l.k,sa],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%;position:relative}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;z-index:2;max-width:1280px;margin:0 auto}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-height:calc(100vh - 192.45px);padding:24px 32px;position:relative;box-sizing:border-box}.bg-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1}.bg-container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{float:left;width:50%;height:100%}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{float:right;width:50%;height:100%}@media (max-width:480px){.container[_ngcontent-%COMP%]{padding-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:0}}"]}),e})();const la=function(){return{exact:!0}};let da=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-sidebar"]],decls:51,vars:22,consts:[[1,"sidebar"],["routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],[3,"routerLink"],["src","/assets/images/sidebar-menu-icon.png"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-right"],["routerLinkActive","active",3,"routerLink"]],template:function(e,t){1&e&&(o.Sb(0,"ul",0),o.Sb(1,"li",1),o.Sb(2,"a",2),o.Nb(3,"img",3),o.zc(4," Inicio "),o.Nb(5,"i",4),o.Rb(),o.Rb(),o.Sb(6,"li",5),o.Sb(7,"a",2),o.Nb(8,"img",3),o.zc(9," Tus tarjetas / presentaciones "),o.Nb(10,"i",4),o.Rb(),o.Rb(),o.Sb(11,"li",5),o.Sb(12,"a",2),o.Nb(13,"img",3),o.zc(14," Tarjetero "),o.Nb(15,"i",4),o.Rb(),o.Rb(),o.Sb(16,"li",5),o.Sb(17,"a",2),o.Nb(18,"img",3),o.zc(19," Tus negocios exitosos "),o.Nb(20,"i",4),o.Rb(),o.Rb(),o.Sb(21,"li",5),o.Sb(22,"a",2),o.Nb(23,"img",3),o.zc(24," Tus negocios pendientes "),o.Nb(25,"i",4),o.Rb(),o.Rb(),o.Sb(26,"li",5),o.Sb(27,"a",2),o.Nb(28,"img",3),o.zc(29," Listado de clientes "),o.Nb(30,"i",4),o.Rb(),o.Rb(),o.Sb(31,"li",5),o.Sb(32,"a",2),o.Nb(33,"img",3),o.zc(34," Sala virtual "),o.Nb(35,"i",4),o.Rb(),o.Rb(),o.Sb(36,"li",5),o.Sb(37,"a",2),o.Nb(38,"img",3),o.zc(39," Perfil Sala virtual "),o.Nb(40,"i",4),o.Rb(),o.Rb(),o.Sb(41,"li",5),o.Sb(42,"a",2),o.Nb(43,"img",3),o.zc(44," Perfil empresa "),o.Nb(45,"i",4),o.Rb(),o.Rb(),o.Sb(46,"li",5),o.Sb(47,"a",2),o.Nb(48,"img",3),o.zc(49," Tablero "),o.Nb(50,"i",4),o.Rb(),o.Rb(),o.Rb()),2&e&&(o.Bb(1),o.kc("routerLink","/app")("routerLinkActiveOptions",o.lc(21,la)),o.Bb(1),o.kc("routerLink","/app"),o.Bb(4),o.kc("routerLink","cards"),o.Bb(1),o.kc("routerLink","cards"),o.Bb(4),o.kc("routerLink","card-holder"),o.Bb(1),o.kc("routerLink","card-holder"),o.Bb(4),o.kc("routerLink","business"),o.Bb(1),o.kc("routerLink","business"),o.Bb(4),o.kc("routerLink","leads"),o.Bb(1),o.kc("routerLink","leads"),o.Bb(4),o.kc("routerLink","customers"),o.Bb(1),o.kc("routerLink","customers"),o.Bb(4),o.kc("routerLink","virtual-room"),o.Bb(1),o.kc("routerLink","virtual-room"),o.Bb(4),o.kc("routerLink","profile-virtual-room"),o.Bb(1),o.kc("routerLink","profile-virtual-room"),o.Bb(4),o.kc("routerLink","company"),o.Bb(1),o.kc("routerLink","company"),o.Bb(4),o.kc("routerLink","metrics"),o.Bb(1),o.kc("routerLink","metrics"))},directives:[l.h,l.g,l.i],styles:[".sidebar[_ngcontent-%COMP%]{padding-inline-start:0}.sidebar[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;display:block;height:20px;line-height:20px;font-weight:700;color:#3a5081;padding:10px 0;border-bottom:1px solid #d9d9d9;font-size:14px}.sidebar[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{visibility:visible}.sidebar[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-top:-4px;width:24px;margin-right:12px;vertical-align:middle}.sidebar[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none}.sidebar[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{visibility:hidden;position:absolute;right:30px;line-height:20px}"]}),e})();function ba(e,t){if(1&e&&(o.Sb(0,"div",3),o.zc(1),o.ec(2,"slice"),o.Rb()),2&e){const e=o.dc();o.Bb(1),o.Bc("ID Platpres: ",o.gc(2,1,null==e.profile?null:e.profile.uuid,8),"")}}function pa(e,t){if(1&e){const e=o.Tb();o.Sb(0,"a",4),o.Zb("click",function(){return o.sc(e),o.dc().logout()}),o.zc(1,"Cerrar sesi\xf3n"),o.Rb()}}let ua=(()=>{class e{constructor(e,t){this.authService=e,this.router=t}ngOnInit(){this.authService.profile?this.profile=this.authService.profile:this.authService.getProfile().subscribe(e=>{this.profile=e})}logout(){this.authService.logout().subscribe(e=>{this.router.navigate(["/login"])},e=>{console.error("Error calling logout... err:",e)})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(g),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-user-logged-in"]],decls:3,vars:2,consts:[[1,"user-logged-in-container"],["class","badge badge--small",4,"ngIf"],["class","btn btn--small btn--tertiary",3,"click",4,"ngIf"],[1,"badge","badge--small"],[1,"btn","btn--small","btn--tertiary",3,"click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.yc(1,ba,3,4,"div",1),o.yc(2,pa,2,0,"a",2),o.Rb()),2&e&&(o.Bb(1),o.kc("ngIf",t.profile),o.Bb(1),o.kc("ngIf",t.profile))},directives:[m.l],pipes:[m.s],styles:["[_nghost-%COMP%]{position:absolute;right:24px;top:31px}.user-logged-in-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;column-gap:10px}"]}),e})(),ha=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-internal"]],decls:14,vars:1,consts:[[1,"bg-container"],[1,"left"],[1,"right"],["gridSize","small"],[1,"container"],[1,"btn","btn--secondary","btn--large","panel-btn",3,"routerLink"],["aligned","centered"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Nb(3,"app-grid",3),o.Rb(),o.Rb(),o.Sb(4,"div",4),o.Sb(5,"div",1),o.Nb(6,"app-logo"),o.Nb(7,"app-sidebar"),o.Sb(8,"a",5),o.zc(9,"Panel de administraci\xf3n "),o.Rb(),o.Nb(10,"app-footer",6),o.Rb(),o.Sb(11,"div",2),o.Nb(12,"app-user-logged-in"),o.Nb(13,"router-outlet"),o.Rb(),o.Rb()),2&e&&(o.Bb(8),o.kc("routerLink","/app"))},directives:[oa,ra,da,l.i,sa,ua,l.k],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%;position:relative}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;z-index:2;max-width:1280px;margin:0 auto}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-height:calc(100vh - 192.45px);padding:24px 32px;position:relative;box-sizing:border-box}.bg-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1}.bg-container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{float:left;width:50%;height:100%}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{float:right;width:50%;height:100%}@media (max-width:480px){.container[_ngcontent-%COMP%]{padding-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:0}}[_nghost-%COMP%]{background-color:#f1f1f1}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:18%}.container[_ngcontent-%COMP%]{flex-direction:row;margin-left:0;max-width:unset}.container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{position:relative;width:calc(100% - 288px);padding:7px 24px 24px;display:flex}@media (max-width:768px){.container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:100%}}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{resize:horizontal;overflow:auto;width:288px;max-width:288px;min-width:50px;max-height:100%;background:#fafafa;position:relative;padding:24px}@media (max-width:768px){.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:none}}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] app-footer[_ngcontent-%COMP%]{width:calc(100% - 48px);position:absolute;bottom:0;left:24px}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .panel-btn[_ngcontent-%COMP%]{font-weight:700;width:218px;text-align:center;position:absolute;bottom:80px}"]}),e})(),ga=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-second"]],decls:9,vars:0,consts:[[1,"bg-container"],[1,"left"],[1,"right"],[1,"container"],[1,"content"],["aligned","centered"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Nb(3,"app-grid"),o.Rb(),o.Rb(),o.Sb(4,"div",3),o.Nb(5,"app-header"),o.Sb(6,"div",4),o.Nb(7,"router-outlet"),o.Rb(),o.Nb(8,"app-footer",5),o.Rb())},directives:[oa,ca,l.k,sa],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%;position:relative}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;z-index:2;max-width:1280px;margin:0 auto}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-height:calc(100vh - 192.45px);padding:24px 32px;position:relative;box-sizing:border-box}.bg-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1}.bg-container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{float:left;width:50%;height:100%}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{float:right;width:50%;height:100%}@media (max-width:480px){.container[_ngcontent-%COMP%]{padding-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:0}}[_nghost-%COMP%]{background-color:#f1f1f1}"]}),e})();function ma(e,t){if(1&e&&(o.Sb(0,"span"),o.zc(1),o.Rb()),2&e){const e=o.dc().index;o.Bb(1),o.Ac(e+1)}}function fa(e,t){1&e&&o.Nb(0,"i",14)}const va=function(e,t){return{active:e,done:t}};function _a(e,t){if(1&e){const e=o.Tb();o.Sb(0,"div",5),o.Zb("click",function(){o.sc(e);const n=t.index;return o.dc().emitStep(n)}),o.Sb(1,"div",6),o.Sb(2,"div",7),o.Nb(3,"div",8),o.yc(4,ma,2,1,"span",9),o.yc(5,fa,1,0,"i",10),o.Rb(),o.Sb(6,"div",11),o.Sb(7,"div",12),o.zc(8),o.Rb(),o.Rb(),o.Rb(),o.Nb(9,"div",13),o.Rb()}if(2&e){const e=t.$implicit,n=t.index,i=o.dc();o.kc("ngClass",o.nc(4,va,i.currentStep===n+1,i.currentStep>n+1)),o.Bb(4),o.kc("ngIf",i.currentStep<=n+1),o.Bb(1),o.kc("ngIf",i.currentStep>n+1),o.Bb(3),o.Ac(e)}}let Sa=(()=>{class e{constructor(e,t){this.stepService=e,this.location=t,this.iconClass="fa-check",this.currentStep=1,this.steps=[]}ngOnInit(){this.stepService.currentStep$.subscribe(e=>{this.currentStep=e}),this.stepService.stepsInfo$.subscribe(e=>{this.steps=e})}back(){this.location.back()}emitStep(e){e!==this.currentStep&&this.stepService.overwriteStep(e+1)}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(Lt),o.Mb(m.h))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-steps"]],decls:6,vars:1,consts:[[1,"steps"],[1,"steps__back-button"],[3,"click"],["aria-hidden","true",1,"fa","fa-light","fa-arrow-left"],["class","step",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"step",3,"ngClass","click"],[1,"step__container"],[1,"step__circle"],[1,"step__circle-mask"],[4,"ngIf"],["class","fa fa-light fa-check",4,"ngIf"],[1,"step__content"],[1,"step__value"],[1,"step__divisor"],[1,"fa","fa-light","fa-check"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Sb(1,"div",1),o.Sb(2,"a",2),o.Zb("click",function(){return t.back()}),o.Nb(3,"i",3),o.zc(4," Regresar "),o.Rb(),o.Rb(),o.yc(5,_a,10,7,"div",4),o.Rb()),2&e&&(o.Bb(5),o.kc("ngForOf",t.steps))},directives:[m.k,m.j,m.l],styles:["[_nghost-%COMP%]{display:block;margin-top:32px}.steps__back-button[_ngcontent-%COMP%]{line-height:20px;font-weight:700;color:#3a5081;margin-bottom:32px;cursor:pointer}.steps__back-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-weight:400;margin-right:8px;color:#c4dd4b}.step[_ngcontent-%COMP%]:last-child .step__divisor[_ngcontent-%COMP%]{display:none}.step__divisor[_ngcontent-%COMP%]{height:25px;border-left:2px solid #3a5081;margin-left:27px;margin-top:4px;margin-bottom:4px}.step__container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-content:flex-start;justify-content:flex-start;align-items:flex-start;grid-gap:20px}.step__value[_ngcontent-%COMP%]{font-size:14px;line-height:50px;letter-spacing:.32px;color:#3a5081;font-weight:500}.step.done[_ngcontent-%COMP%]{cursor:pointer}.step.active[_ngcontent-%COMP%] .step__circle[_ngcontent-%COMP%]{background:#3a5081;color:#fafafa}.step.done[_ngcontent-%COMP%] .step__circle[_ngcontent-%COMP%]{background:#00cb96;color:#fafafa;border-color:#00cb96}.step.done[_ngcontent-%COMP%] .step__divisor[_ngcontent-%COMP%]{border-color:#00cb96}.step__circle[_ngcontent-%COMP%]{display:block;border-radius:50px;width:50px;min-width:50px;height:50px;text-align:center;line-height:50px;font-size:20px;border:2px solid #3a5081;color:#3a5081;-webkit-user-select:none;-o-user-select:none;user-select:none}.step__content[_ngcontent-%COMP%]{flex-grow:1;height:100%}.step__content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-weight:600;font-size:16px;text-decoration:none}"]}),e})();const Ca=[{path:"login",component:ga,children:[{path:"",component:ho}]},{path:"register",component:ga,children:[{path:"",component:Jc}]},{path:"activate",component:ga,children:[{path:"",component:C}]},{path:"recover",component:ga,children:[{path:"",component:ps}]},{path:"app/wizards",component:(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-wizard"]],decls:12,vars:0,consts:[[1,"bg-container"],[1,"left"],[1,"right"],["gridSize","small"],[1,"container"],["aligned","centered"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Sb(2,"div",2),o.Nb(3,"app-grid",3),o.Rb(),o.Rb(),o.Sb(4,"div",4),o.Sb(5,"div",1),o.Nb(6,"app-logo"),o.Nb(7,"app-steps"),o.Nb(8,"app-footer",5),o.Rb(),o.Sb(9,"div",2),o.Nb(10,"app-user-logged-in"),o.Nb(11,"router-outlet"),o.Rb(),o.Rb())},directives:[oa,ra,Sa,sa,ua,l.k],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%;position:relative}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;z-index:2;max-width:1280px;margin:0 auto}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{min-height:calc(100vh - 192.45px);padding:24px 32px;position:relative;box-sizing:border-box}.bg-container[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1}.bg-container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{float:left;width:50%;height:100%}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{float:right;width:50%;height:100%}@media (max-width:480px){.container[_ngcontent-%COMP%]{padding-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding-top:0}}[_nghost-%COMP%]{background-color:#f1f1f1}.bg-container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:18%}.container[_ngcontent-%COMP%]{flex-direction:row;margin-left:0;max-width:unset}.container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{position:relative;width:calc(100% - 288px);padding:7px 24px 24px;display:flex}@media (max-width:768px){.container[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:100%}}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{resize:horizontal;overflow:auto;width:288px;max-width:288px;min-width:50px;max-height:100%;background:#fafafa;position:relative;padding:24px}@media (max-width:768px){.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:none}}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] app-footer[_ngcontent-%COMP%]{width:calc(100% - 48px);position:absolute;bottom:0;left:24px}.container[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .panel-btn[_ngcontent-%COMP%]{font-weight:700;width:218px;text-align:center;position:absolute;bottom:80px}"]}),e})(),children:[{path:"create-card",component:jn},{path:"share-card",component:Gs},{path:"create-presentation",component:Jn},{path:"register-virtual-room",component:Bc}]},{path:"app",component:ha,children:[{path:"register-company",component:Dr},{path:"cards",component:wt},{path:"card-holder",component:tt},{path:"business",component:Qe},{path:"business/:id",component:ze},{path:"virtual-room/:id",component:hr},{path:"leads/:id",component:ze},{path:"leads",component:eo},{path:"customers",component:hi},{path:"customer",component:li},{path:"virtual-room",component:ea},{path:"profile-virtual-room",component:ir},{path:"metrics",component:go},{path:"company",component:jt},{path:"presentation/:id",component:Ao},{path:"preview-presentation/:id",component:zi},{path:"",component:Gi}]},{path:"",component:aa,children:[{path:"**",component:ia}]}];let xa=(()=>{class e{}return e.\u0275mod=o.Kb({type:e}),e.\u0275inj=o.Jb({factory:function(t){return new(t||e)},imports:[[l.j.forRoot(Ca)],l.j]}),e})(),ya=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["app-loader"]],decls:2,vars:0,consts:[[1,"loader__bg"],[1,"loader__indicator"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Nb(1,"div",1),o.Rb())},styles:[".loader__bg[_ngcontent-%COMP%]{z-index:10000;background-color:#72eddb;position:fixed;width:100%;height:100%;top:0;left:0;display:flex;align-items:center;justify-content:center}.loader__indicator[_ngcontent-%COMP%]{background-image:url(spinner.84f5576c9f0d9baf626f.svg);width:30px;height:30px;background-repeat:no-repeat;background-size:cover;transform-box:fill-box;animation:spin 1s linear infinite}@keyframes spin{50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}"]}),e})();function Ra(e,t){1&e&&o.Nb(0,"app-loader")}let Pa=(()=>{class e{constructor(e,t){this.loadingIndicatorService=e,this.router=t,this.title="platpres-v2-frontend",this.loading$=this.loadingIndicatorService.isLoading$,this.router.events.pipe(Object(nt.a)(e=>e instanceof l.e||e instanceof l.c||e instanceof l.b||e instanceof l.d),Object(nt.a)(e=>-1===e.url.indexOf("/app")&&-1===e.url.indexOf("register"))).subscribe(e=>{e instanceof l.e?this.loadingIndicatorService.start():setTimeout(()=>{this.loadingIndicatorService.stop()},1e3)})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(ta),o.Mb(l.f))},e.\u0275cmp=o.Gb({type:e,selectors:[["app-root"]],decls:3,vars:3,consts:[[4,"ngIf"]],template:function(e,t){1&e&&(o.Nb(0,"router-outlet"),o.yc(1,Ra,1,0,"app-loader",0),o.ec(2,"async")),2&e&&(o.Bb(1),o.kc("ngIf",o.fc(2,1,t.loading$)))},directives:[l.k,m.l,ya],pipes:[m.b],styles:["[_nghost-%COMP%]{height:100%;display:block}"]}),e})();function ka(e){return()=>(console.log("initWithDependencyFactory - started"),e.init())}var wa=n("z6cu"),Oa=n("JIr8");let Ma=(()=>{class e{constructor(e,t){this.router=e,this.authService=t}handleAuthError(e){if(-1===this.router.url.indexOf("/login")&&-1===this.router.url.indexOf("app/presentation/")&&-1===this.router.url.indexOf("app/virtual-room/")&&(401===e.status||403===e.status)){let t=encodeURI(this.router.url);return this.router.navigateByUrl(`/login?redirectUri=${t}`),Object(d.a)(e.message)}return Object(wa.a)(e)}intercept(e,t){const n=e.clone({headers:e.headers.set("authorization",`Bearer ${this.authService.AT}`)});return t.handle(n).pipe(Object(Oa.a)(e=>this.handleAuthError(e)))}}return e.\u0275fac=function(t){return new(t||e)(o.Wb(l.f),o.Wb(g))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac}),e})();var Ia=n("R1ws");let Ba=(()=>{class e{}return e.\u0275mod=o.Kb({type:e,bootstrap:[Pa]}),e.\u0275inj=o.Jb({factory:function(t){return new(t||e)},providers:[{provide:r.a,useFactory:function(e,t){return new Ma(e,t)},multi:!0,deps:[l.f,g]},{provide:o.d,useFactory:ka,deps:[g],multi:!0}],imports:[[a.c,s.b,c.e,i.a,xa,x.p,tn.b,r.c,fe.a.forRoot(),Ia.b]]}),e})();Object(o.T)(),i.c().bootstrapModule(Ba).catch(e=>console.error(e))},zn8P:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"}},[[0,0,4]]]);