@mediquo/elements 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/chunks/{appointment-card-skeleton-hglMW7x6.js → appointment-card-skeleton-oskPONot.js} +1 -1
  2. package/dist/chunks/custom-element-D2ziPxYE.js +1 -0
  3. package/dist/chunks/{documentation-view-geQU8ttU.js → documentation-view-DOUzUXRv.js} +1 -1
  4. package/dist/chunks/{index-Bx8TWBsk.js → index-BfAhWf7z.js} +1 -1
  5. package/dist/chunks/{index-CvDnN2NR.js → index-Ca-l41nB.js} +1 -1
  6. package/dist/chunks/{index-BBUiLb3Y.js → index-OqE4_NWC.js} +1 -1
  7. package/dist/chunks/{index-BJcdB5MT.js → index-ShXzd7UZ.js} +1 -1
  8. package/dist/chunks/{index-CGnPsMVQ.js → index-m6lXVNW0.js} +1 -1
  9. package/dist/chunks/{mq-layout-CGcdxGMQ.js → mq-layout-BndHxkbb.js} +1 -1
  10. package/dist/chunks/{price-DIhNpS8n.js → price-z5_8TnBB.js} +1 -1
  11. package/dist/chunks/{professional-overview-CfjgnTw4.js → professional-overview-C4H_znIJ.js} +1 -1
  12. package/dist/env.js +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/mq-apple-pay-checkout.js +1 -1
  15. package/dist/mq-appointment-checkout.js +1 -1
  16. package/dist/mq-appointment-documentation.js +1 -1
  17. package/dist/mq-chat-room.js +1 -1
  18. package/dist/mq-checkout.js +1 -1
  19. package/dist/mq-dashboard.d.ts +1 -1
  20. package/dist/mq-dashboard.js +1 -1
  21. package/dist/mq-documents.d.ts +42 -1
  22. package/dist/mq-documents.js +1 -1
  23. package/dist/mq-google-pay-checkout.js +1 -1
  24. package/dist/mq-immediate-videocall-checkout.js +1 -1
  25. package/dist/mq-my-appointments.js +1 -1
  26. package/dist/mq-payment-poller.js +1 -1
  27. package/dist/mq-professional-presence-sync.js +1 -1
  28. package/dist/mq-query-client-provider.js +1 -1
  29. package/dist/mq-schedule-success.js +1 -1
  30. package/dist/mq-schedule.d.ts +1 -1
  31. package/dist/mq-schedule.js +1 -1
  32. package/dist/mq-session-provider.js +1 -1
  33. package/dist/mq-socket-provider.js +1 -1
  34. package/dist/mq-support-chat.d.ts +1 -1
  35. package/dist/mq-support-chat.js +1 -1
  36. package/dist/mq-terms-and-conditions.js +1 -1
  37. package/dist/mq-theme-provider.js +1 -1
  38. package/dist/mq-unread-count-sync.js +1 -1
  39. package/dist/mq-videocall.js +1 -1
  40. package/dist/react/mq-apple-pay-checkout.js +1 -1
  41. package/dist/react/mq-appointment-checkout.js +1 -1
  42. package/dist/react/mq-appointment-documentation.js +1 -1
  43. package/dist/react/mq-chat-room.js +1 -1
  44. package/dist/react/mq-checkout.js +1 -1
  45. package/dist/react/mq-dashboard.js +1 -1
  46. package/dist/react/mq-documents-page.d.ts +32 -0
  47. package/dist/react/mq-documents-page.js +2 -0
  48. package/dist/react/mq-documents.d.ts +2 -0
  49. package/dist/react/mq-documents.js +1 -1
  50. package/dist/react/mq-google-pay-checkout.js +1 -1
  51. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  52. package/dist/react/mq-my-appointments.js +1 -1
  53. package/dist/react/mq-payment-poller.js +1 -1
  54. package/dist/react/mq-professional-presence-sync.js +1 -1
  55. package/dist/react/mq-query-client-provider.js +1 -1
  56. package/dist/react/mq-schedule-success.js +1 -1
  57. package/dist/react/mq-schedule.js +1 -1
  58. package/dist/react/mq-session-provider.js +1 -1
  59. package/dist/react/mq-socket-provider.js +1 -1
  60. package/dist/react/mq-support-chat.js +1 -1
  61. package/dist/react/mq-terms-and-conditions.js +1 -1
  62. package/dist/react/mq-theme-provider.js +1 -1
  63. package/dist/react/mq-toast-container.js +1 -1
  64. package/dist/react/mq-unread-count-sync.js +1 -1
  65. package/dist/react/mq-videocall.js +1 -1
  66. package/dist/toast.js +1 -1
  67. package/dist/ui/back-link.js +1 -1
  68. package/dist/ui/mq-avatar.js +1 -1
  69. package/dist/ui/mq-button.js +1 -1
  70. package/dist/ui/mq-calendar.js +1 -1
  71. package/dist/ui/mq-callout.js +1 -1
  72. package/dist/ui/mq-card.js +1 -1
  73. package/dist/ui/mq-checkbox.js +1 -1
  74. package/dist/ui/mq-clamped-text.js +1 -1
  75. package/dist/ui/mq-dialog.js +1 -1
  76. package/dist/ui/mq-floating-bubble.js +1 -1
  77. package/dist/ui/mq-input.js +1 -1
  78. package/dist/ui/mq-rating.js +1 -1
  79. package/dist/ui/mq-select.js +1 -1
  80. package/dist/ui/mq-skeleton.js +1 -1
  81. package/dist/ui/mq-tabs.js +1 -1
  82. package/dist/ui/mq-text-button.js +1 -1
  83. package/dist/ui/mq-textarea.js +1 -1
  84. package/dist/ui/mq-time-slot-picker.js +1 -1
  85. package/dist/ui/mq-toast.js +1 -1
  86. package/dist/ui/mq-unread-badge.js +1 -1
  87. package/package.json +1 -1
  88. package/dist/chunks/custom-element-DA9Fxvxd.js +0 -1
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{c as i}from"./consume-CovVqBjI.js";import{m as a,s as o}from"./runtime-Bg1WXVCx.js";import{l as n}from"./localized-decorator-BlOuLhym.js";import{Q as s}from"./query-controller-BlO1Ax65.js";import{g as p}from"./get-organization-setup-query-BMbuRi6v.js";import{g as r,a as l}from"./i18n-formats-DYS91YEa.js";import{g as c,c as d}from"./refund-cancel-policy-BQDnePq9.js";import{g as h}from"./chunk-GZF3YFSX-DM-GTqxg.js";import{a as m,i as u,x as g,E as v}from"./lit-element-DiWJYFwC.js";import{n as f}from"./property-scuRaFcM.js";import{r as y}from"./state-LQivXIgA.js";import{getLocale as b}from"../i18n.js";import{a as $,A as C,i as x}from"./api-chat-client-1Vz6ZOwp.js";import{h as q,f as w}from"./price-DIhNpS8n.js";import"../ui/mq-card.js";import"./professional-overview-CfjgnTw4.js";import{l as k}from"./chunk-S5RWG6G2-DPesx3Od.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import{Q as j}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{M as S}from"./mutation-controller-CR2qcqhH.js";import"../ui/mq-button.js";import"../ui/mq-dialog.js";import{t as R,j as D,k as I,l as M,n as O,o as E,p as z}from"./telemetry-client-BLJVs9me.js";import{e as A}from"./class-map-Co76I6aw.js";import{MqAppointmentRescheduleEvent as U,MqAppointmentBookEvent as _,MqAppointmentJoinVideocallEvent as H,MqAppointmentViewDocumentationEvent as N}from"../events.js";import{messageBubbleIcon as T}from"../ui/icons/message-bubble-icon.js";import{videoIcon as B}from"../ui/icons/video-icon.js";import"../ui/mq-unread-badge.js";import{toast as P}from"../ui/mq-toast.js";function Q(t,e){return{queryKey:["appointments",e],queryFn:()=>t.appointments.getAppointments(e)}}let V=class CancelAppointmentConfirmationDialog extends m{constructor(){super(...arguments),this.open=!1,this.cancelAppointmentMutation=new S(this,{mutationFn:async t=>$.appointments.cancelAppointment(t),onSuccess:()=>{this.queryClientContext?.invalidateQueries(),this.dispatchEvent(new CustomEvent("success",{bubbles:!0,composed:!0}))}}),this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleDismissClick=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleConfirmClick=()=>{this.cancelAppointmentMutation.run({id:this.appointmentId})}}static{this.styles=u`:host{display:contents}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.subheading-payable{font-size:var(--text-base);line-height:22px}.price-rows{display:flex;flex-direction:column;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);color:var(--color-card-foreground);width:100%;margin-bottom:var(--sp-4)}.price-row{display:flex;align-items:center;justify-content:space-between;min-height:34px;gap:var(--sp-2)}.price-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-4);justify-content:flex-end;flex-wrap:wrap}`}render(){const t=b(),e=this.price,i=q(e),o=this.cancelAppointmentMutation.isPending;if(i){const i=w(e,t),n=`-${i}`;return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${a("Confirmar cancelación")}</h2><p slot="subheading" class="subheading-payable">${a("¿Seguro que quieres cancelar esta cita? Se te devolverá el importe pagado en un plazo de 5-10 días hábiles.")}</p><div><div class="price-rows"><div class="price-row"><span>${a("Importe pagado")}</span> <span>${i}</span></div><div class="price-row"><span>${a("Importe a devolver")}</span> <span>${n}</span></div></div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${a("Volver")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${a("Confirmar")}</mq-button></div></div></mq-dialog>`}return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${a("Confirmar cancelación")}</h2><p slot="subheading">${a("¿Seguro que quieres cancelar esta cita?")}</p><div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${a("Cancelar")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${a("Confirmar")}</mq-button></div></div></mq-dialog>`}};t([f({type:Boolean,reflect:!0})],V.prototype,"open",void 0),t([i({context:j,subscribe:!0})],V.prototype,"queryClientContext",void 0),t([f({type:String})],V.prototype,"appointmentId",void 0),t([f({type:Object})],V.prototype,"price",void 0),V=t([n(),e("cancel-appointment-confirmation-dialog")],V);let F=class AppointmentActionUnavailableDialog extends m{constructor(){super(...arguments),this.open=!1,this.heading="",this.message="",this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=u`:host{display:contents}mq-dialog::part(dialog){max-width:343px;min-width:0}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.actions{display:flex;margin-top:var(--sp-4)}`}render(){return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${this.heading}</h2><p slot="subheading">${this.message}</p><div class="actions"><mq-button variant="primary" fullwidth @click="${this.handleClose}">${a("Volver")}</mq-button></div></mq-dialog>`}};t([f({type:Boolean,reflect:!0})],F.prototype,"open",void 0),t([f({type:String})],F.prototype,"heading",void 0),t([f({type:String})],F.prototype,"message",void 0),F=t([n(),e("appointment-action-unavailable-dialog")],F);let L=class AppointmentCardActions extends m{constructor(){super(...arguments),this.variant="next",this.isVideocall=!1,this.hasChatSupport=!1,this.unreadCount=0,this.isModifyUnavailable=!1,this.isCancelUnavailable=!1,this.hasNoSlots=!1,this.modifyUnavailableMessage="",this.cancelUnavailableMessage="",this.repeatTarget=null,this.professionalHash="",this.openDialog=null,this.handleModifyClick=()=>{this.isModifyUnavailable?this.openDialog="modify":(R.track(D(this.patientHash,this.appointmentId)),this.dispatchEvent(new U({appointmentId:this.appointmentId})))},this.handleCancelClick=()=>{this.isCancelUnavailable?this.openDialog="cancel":(R.track(I(this.patientHash,this.appointmentId)),this.dispatchEvent(new CustomEvent("request-cancel",{bubbles:!0,composed:!0})))},this.handleRepeatClick=()=>{this.hasNoSlots?this.openDialog="repeat-no-slots":this.repeatTarget?(R.track(M(this.patientHash,this.appointmentId)),this.dispatchEvent(new _({specialty:this.repeatTarget.specialty,service:this.repeatTarget.service,professional:this.professionalHash}))):this.openDialog="repeat-error"},this.handleDialogClose=()=>{this.openDialog=null}}static{this.styles=u`:host{display:contents}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}get patientHash(){return this.loginToken.patient.hash}renderChatButton(){return g`<mq-button variant="primary" fullwidth noPadding @click="${()=>{this.dispatchEvent(new CustomEvent("toggle-chat",{bubbles:!0,composed:!0}))}}">${T({size:24})} ${a("Chat")} ${this.unreadCount>0?g`<mq-unread-badge></mq-unread-badge>`:v}</mq-button>`}renderNextActions(){return g`${this.isVideocall?g`<mq-button variant="outline" fullwidth noPadding @click="${()=>{R.track(O(this.patientHash,this.appointmentId)),this.dispatchEvent(new H({appointmentId:this.appointmentId}))}}">${B({size:24})} ${a("Ir a videollamada")}</mq-button>`:v}<div class="actions-secondary">${this.hasChatSupport?this.renderChatButton():v}<mq-button variant="outline" fullwidth noPadding @click="${this.handleModifyClick}">${a("Modificar")}</mq-button><mq-button variant="outline-negative" fullwidth noPadding @click="${this.handleCancelClick}">${a("Cancelar")}</mq-button></div>`}renderHistoryActions(){return g`${this.hasChatSupport?this.renderChatButton():v}<mq-button variant="outline" fullwidth noPadding @click="${()=>{R.track(E(this.patientHash,this.appointmentId)),this.dispatchEvent(new N({appointmentId:this.appointmentId}))}}">${a("Documentos")}</mq-button><mq-button variant="outline" fullwidth noPadding @click="${this.handleRepeatClick}">${a("Repetir")}</mq-button>`}render(){return g`<div class="${A({actions:!0,next:"next"===this.variant})}">${"next"===this.variant?this.renderNextActions():this.renderHistoryActions()}</div><appointment-action-unavailable-dialog .open="${"modify"===this.openDialog}" .heading="${a("Modificar cita")}" .message="${this.modifyUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"cancel"===this.openDialog}" .heading="${a("Anular cita")}" .message="${this.cancelUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-no-slots"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Este profesional no tiene horarios disponibles")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-error"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Lo sentimos, no hemos podido repetir tu cita. Por favor, contacta con soporte.")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog>`}};function G(t){const{action:e,refundPolicySeconds:i}=t,n=null!=i&&i<3600,s=Math.ceil((i??0)/60),p=Math.ceil((i??0)/3600);return a(0===(n?s:p)?"modify"===e?"Esta cita ya ha pasado, por lo que no se puede modificar.":"Esta cita ya ha pasado, por lo que no se puede anular.":"modify"===e?n?o`Lo sentimos, como faltan menos de ${s} minutos para tu cita no podemos modificarla.`:o`Lo sentimos, como faltan menos de ${p} horas para tu cita no podemos modificarla.`:n?o`Lo sentimos, como faltan menos de ${s} minutos para tu cita no podemos anularla.`:o`Lo sentimos, como faltan menos de ${p} horas para tu cita no podemos anularla.`)}t([i({context:k})],L.prototype,"loginToken",void 0),t([f({type:String})],L.prototype,"variant",void 0),t([f({type:String})],L.prototype,"appointmentId",void 0),t([f({type:Boolean})],L.prototype,"isVideocall",void 0),t([f({type:Boolean})],L.prototype,"hasChatSupport",void 0),t([f({type:Number})],L.prototype,"unreadCount",void 0),t([f({type:Boolean})],L.prototype,"isModifyUnavailable",void 0),t([f({type:Boolean})],L.prototype,"isCancelUnavailable",void 0),t([f({type:Boolean})],L.prototype,"hasNoSlots",void 0),t([f({type:String})],L.prototype,"modifyUnavailableMessage",void 0),t([f({type:String})],L.prototype,"cancelUnavailableMessage",void 0),t([f({type:Object})],L.prototype,"repeatTarget",void 0),t([f({type:String})],L.prototype,"professionalHash",void 0),t([y()],L.prototype,"openDialog",void 0),L=t([n(),e("appointment-card-actions")],L);let X=class AppointmentCard extends m{constructor(){super(...arguments),this.variant="next",this.detailsVariant="wide",this.isChatOpen=!1,this.isCancelDialogOpen=!1,this.unreadQuery=new s(this,()=>h($,{roomId:this.appointmentResource?.room?.id})),this.getOrganizationSpecialtiesQuery=new s(this,()=>r($,{enabled:!!this.appointmentResource?.speciality?.id})),this.getOrganizationSetupQuery=new s(this,()=>p($)),this.getScheduleServicesQuery=new s(this,()=>c($))}static{this.styles=u`:host{display:flex}.card{width:100%;padding:var(--sp-6);display:flex;flex-direction:column;gap:var(--sp-4);justify-content:space-between}.card-top-content{display:flex;flex-direction:column;gap:var(--sp-6)}.see-details{color:var(--color-primary-link-default);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.see-details:hover{text-decoration:underline}.chevron-down{width:16px;height:16px;transition:transform .2s ease}.appointment-details{display:flex;flex-direction:column;gap:12px}.clock-icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.clock-icon-wrapper svg{width:100%;height:100%}.appointment-type{display:flex;align-items:center;gap:12px;font-size:18px;color:#2c3e50}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}render(){const t=this.appointmentResource.appointment.channel===C.videocall,e=this.appointmentResource.appointment.channel===C.phonecall,i=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,o=(t||e)&&i,n=b(),s=x(this.appointmentResource.appointment.expires_at),p=0===this.appointmentResource.slots.length,r=this.getOrganizationSetupQuery.result?.data?.appointments?.seconds_before_start_to_refund_on_cancel,c=d({startsAtIso:this.appointmentResource.appointment.starts_at,refundPolicySeconds:r}),h=s||p||!c,m=s||!c,u=G({action:"modify",refundPolicySeconds:r}),f=G({action:"cancel",refundPolicySeconds:r}),y=this.getOrganizationSpecialtiesQuery.result?.data?.find(t=>Number(t.id)===Number(this.appointmentResource.speciality.id)),$=l(y?.code??"",n,y?.name??this.appointmentResource.speciality.name),q=this.getScheduleServicesQuery.result?.data?.find(t=>t.id===this.appointmentResource.appointment.service_id)?.code,w=y?.code&&q?{specialty:y.code,service:q}:null;return g`<mq-card class="card" roundness="md"><div class="card-top-content"><professional-overview .specialtyName="${$??""}" .collegiateNumber="${this.appointmentResource.professional.collegiate_number??void 0}" .description="${this.appointmentResource.professional.description??""}" .languages="${this.appointmentResource.professional.languages}" .avatar="${this.appointmentResource.professional.avatar??""}" .name="${this.appointmentResource.professional.name}"></professional-overview><appointment-details .startsAt="${this.appointmentResource.appointment.starts_at}" .duration="${this.appointmentResource.appointment.duration}" .channel="${this.appointmentResource.appointment.channel}" .timezone="${this.loginToken?.patient?.timezone}" variant="${this.detailsVariant}"></appointment-details></div><appointment-card-actions .variant="${this.variant}" .appointmentId="${this.appointmentResource.appointment.id??""}" .isVideocall="${t}" .hasChatSupport="${o}" .unreadCount="${this.unreadQuery.result?.data?.unread_count??0}" .isModifyUnavailable="${h}" .isCancelUnavailable="${m}" .hasNoSlots="${p}" .modifyUnavailableMessage="${u}" .cancelUnavailableMessage="${f}" .repeatTarget="${w}" .professionalHash="${this.appointmentResource.professional.hash}" @toggle-chat="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&R.track(z(this.loginToken.patient.hash,this.appointmentResource.appointment.id??""))}}" @request-cancel="${()=>{this.isCancelDialogOpen=!0}}"></appointment-card-actions><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?g`<mq-chat-room slot="content" .consultationId="${this.appointmentResource.appointment.id}" consultation-type="appointment" token="${this.loginToken.access_token}" .roomId="${this.appointmentResource.room.id}" .professionalHash="${this.appointmentResource.professional.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}" ?readonly="${s}"></mq-chat-room>`:v}</mq-floating-bubble><cancel-appointment-confirmation-dialog .appointmentId="${this.appointmentResource.appointment.id}" .price="${this.appointmentResource.price??void 0}" .open="${this.isCancelDialogOpen}" @cancel="${()=>{this.isCancelDialogOpen=!1}}" @success="${()=>{this.isCancelDialogOpen=!1,P.success(a("Consulta anulada correctamente")),this.dispatchEvent(new CustomEvent("appointment-cancel-confirmed",{bubbles:!0,composed:!0,detail:{id:this.appointmentResource.appointment.id}}))}}"></cancel-appointment-confirmation-dialog></mq-card>`}};t([f({type:Object})],X.prototype,"appointmentResource",void 0),t([f({type:Number})],X.prototype,"specialtyId",void 0),t([f({type:String})],X.prototype,"variant",void 0),t([f({type:String})],X.prototype,"detailsVariant",void 0),t([i({context:k})],X.prototype,"loginToken",void 0),t([y()],X.prototype,"isChatOpen",void 0),t([y()],X.prototype,"isCancelDialogOpen",void 0),X=t([n(),e("appointment-card")],X);let Z=class AppointmentCardSkeleton extends m{static{this.styles=u`div{border-radius:var(--border-radius-md);background:color-mix(in srgb,var(--color-neutrals-background-disabled) 50%,#fff 50%);height:337px;width:100%}`}render(){return g`<div></div>`}};Z=t([e("appointment-card-skeleton")],Z);export{Q as g};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{c as i}from"./consume-CovVqBjI.js";import{m as a,s as o}from"./runtime-Bg1WXVCx.js";import{l as n}from"./localized-decorator-BlOuLhym.js";import{Q as s}from"./query-controller-BlO1Ax65.js";import{g as p}from"./get-organization-setup-query-BMbuRi6v.js";import{g as r,a as l}from"./i18n-formats-DYS91YEa.js";import{g as c,c as d}from"./refund-cancel-policy-BQDnePq9.js";import{g as h}from"./chunk-GZF3YFSX-DM-GTqxg.js";import{a as m,i as u,x as g,E as v}from"./lit-element-DiWJYFwC.js";import{n as f}from"./property-scuRaFcM.js";import{r as y}from"./state-LQivXIgA.js";import{getLocale as b}from"../i18n.js";import{a as $,A as C,i as x}from"./api-chat-client-1Vz6ZOwp.js";import{h as q,f as w}from"./price-z5_8TnBB.js";import"../ui/mq-card.js";import"./professional-overview-C4H_znIJ.js";import{l as k}from"./chunk-S5RWG6G2-DPesx3Od.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import{Q as j}from"./chunk-RCFIJTXZ-C6Ir0-sM.js";import{M as S}from"./mutation-controller-CR2qcqhH.js";import"../ui/mq-button.js";import"../ui/mq-dialog.js";import{t as R,j as D,k as I,l as M,n as O,o as E,p as z}from"./telemetry-client-BLJVs9me.js";import{e as A}from"./class-map-Co76I6aw.js";import{MqAppointmentRescheduleEvent as U,MqAppointmentBookEvent as _,MqAppointmentJoinVideocallEvent as H,MqAppointmentViewDocumentationEvent as N}from"../events.js";import{messageBubbleIcon as T}from"../ui/icons/message-bubble-icon.js";import{videoIcon as B}from"../ui/icons/video-icon.js";import"../ui/mq-unread-badge.js";import{toast as P}from"../ui/mq-toast.js";function Q(t,e){return{queryKey:["appointments",e],queryFn:()=>t.appointments.getAppointments(e)}}let V=class CancelAppointmentConfirmationDialog extends m{constructor(){super(...arguments),this.open=!1,this.cancelAppointmentMutation=new S(this,{mutationFn:async t=>$.appointments.cancelAppointment(t),onSuccess:()=>{this.queryClientContext?.invalidateQueries(),this.dispatchEvent(new CustomEvent("success",{bubbles:!0,composed:!0}))}}),this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleDismissClick=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleConfirmClick=()=>{this.cancelAppointmentMutation.run({id:this.appointmentId})}}static{this.styles=u`:host{display:contents}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.subheading-payable{font-size:var(--text-base);line-height:22px}.price-rows{display:flex;flex-direction:column;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);color:var(--color-card-foreground);width:100%;margin-bottom:var(--sp-4)}.price-row{display:flex;align-items:center;justify-content:space-between;min-height:34px;gap:var(--sp-2)}.price-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-4);justify-content:flex-end;flex-wrap:wrap}`}render(){const t=b(),e=this.price,i=q(e),o=this.cancelAppointmentMutation.isPending;if(i){const i=w(e,t),n=`-${i}`;return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${a("Confirmar cancelación")}</h2><p slot="subheading" class="subheading-payable">${a("¿Seguro que quieres cancelar esta cita? Se te devolverá el importe pagado en un plazo de 5-10 días hábiles.")}</p><div><div class="price-rows"><div class="price-row"><span>${a("Importe pagado")}</span> <span>${i}</span></div><div class="price-row"><span>${a("Importe a devolver")}</span> <span>${n}</span></div></div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${a("Volver")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${a("Confirmar")}</mq-button></div></div></mq-dialog>`}return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${a("Confirmar cancelación")}</h2><p slot="subheading">${a("¿Seguro que quieres cancelar esta cita?")}</p><div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${a("Cancelar")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${a("Confirmar")}</mq-button></div></div></mq-dialog>`}};t([f({type:Boolean,reflect:!0})],V.prototype,"open",void 0),t([i({context:j,subscribe:!0})],V.prototype,"queryClientContext",void 0),t([f({type:String})],V.prototype,"appointmentId",void 0),t([f({type:Object})],V.prototype,"price",void 0),V=t([n(),e("cancel-appointment-confirmation-dialog")],V);let F=class AppointmentActionUnavailableDialog extends m{constructor(){super(...arguments),this.open=!1,this.heading="",this.message="",this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=u`:host{display:contents}mq-dialog::part(dialog){max-width:343px;min-width:0}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.actions{display:flex;margin-top:var(--sp-4)}`}render(){return g`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${this.heading}</h2><p slot="subheading">${this.message}</p><div class="actions"><mq-button variant="primary" fullwidth @click="${this.handleClose}">${a("Volver")}</mq-button></div></mq-dialog>`}};t([f({type:Boolean,reflect:!0})],F.prototype,"open",void 0),t([f({type:String})],F.prototype,"heading",void 0),t([f({type:String})],F.prototype,"message",void 0),F=t([n(),e("appointment-action-unavailable-dialog")],F);let L=class AppointmentCardActions extends m{constructor(){super(...arguments),this.variant="next",this.isVideocall=!1,this.hasChatSupport=!1,this.unreadCount=0,this.isModifyUnavailable=!1,this.isCancelUnavailable=!1,this.hasNoSlots=!1,this.modifyUnavailableMessage="",this.cancelUnavailableMessage="",this.repeatTarget=null,this.professionalHash="",this.openDialog=null,this.handleModifyClick=()=>{this.isModifyUnavailable?this.openDialog="modify":(R.track(D(this.patientHash,this.appointmentId)),this.dispatchEvent(new U({appointmentId:this.appointmentId})))},this.handleCancelClick=()=>{this.isCancelUnavailable?this.openDialog="cancel":(R.track(I(this.patientHash,this.appointmentId)),this.dispatchEvent(new CustomEvent("request-cancel",{bubbles:!0,composed:!0})))},this.handleRepeatClick=()=>{this.hasNoSlots?this.openDialog="repeat-no-slots":this.repeatTarget?(R.track(M(this.patientHash,this.appointmentId)),this.dispatchEvent(new _({specialty:this.repeatTarget.specialty,service:this.repeatTarget.service,professional:this.professionalHash}))):this.openDialog="repeat-error"},this.handleDialogClose=()=>{this.openDialog=null}}static{this.styles=u`:host{display:contents}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}get patientHash(){return this.loginToken.patient.hash}renderChatButton(){return g`<mq-button variant="primary" fullwidth noPadding @click="${()=>{this.dispatchEvent(new CustomEvent("toggle-chat",{bubbles:!0,composed:!0}))}}">${T({size:24})} ${a("Chat")} ${this.unreadCount>0?g`<mq-unread-badge></mq-unread-badge>`:v}</mq-button>`}renderNextActions(){return g`${this.isVideocall?g`<mq-button variant="outline" fullwidth noPadding @click="${()=>{R.track(O(this.patientHash,this.appointmentId)),this.dispatchEvent(new H({appointmentId:this.appointmentId}))}}">${B({size:24})} ${a("Ir a videollamada")}</mq-button>`:v}<div class="actions-secondary">${this.hasChatSupport?this.renderChatButton():v}<mq-button variant="outline" fullwidth noPadding @click="${this.handleModifyClick}">${a("Modificar")}</mq-button><mq-button variant="outline-negative" fullwidth noPadding @click="${this.handleCancelClick}">${a("Cancelar")}</mq-button></div>`}renderHistoryActions(){return g`${this.hasChatSupport?this.renderChatButton():v}<mq-button variant="outline" fullwidth noPadding @click="${()=>{R.track(E(this.patientHash,this.appointmentId)),this.dispatchEvent(new N({appointmentId:this.appointmentId}))}}">${a("Documentos")}</mq-button><mq-button variant="outline" fullwidth noPadding @click="${this.handleRepeatClick}">${a("Repetir")}</mq-button>`}render(){return g`<div class="${A({actions:!0,next:"next"===this.variant})}">${"next"===this.variant?this.renderNextActions():this.renderHistoryActions()}</div><appointment-action-unavailable-dialog .open="${"modify"===this.openDialog}" .heading="${a("Modificar cita")}" .message="${this.modifyUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"cancel"===this.openDialog}" .heading="${a("Anular cita")}" .message="${this.cancelUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-no-slots"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Este profesional no tiene horarios disponibles")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-error"===this.openDialog}" .heading="${a("Repetir cita")}" .message="${a("Lo sentimos, no hemos podido repetir tu cita. Por favor, contacta con soporte.")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog>`}};function G(t){const{action:e,refundPolicySeconds:i}=t,n=null!=i&&i<3600,s=Math.ceil((i??0)/60),p=Math.ceil((i??0)/3600);return a(0===(n?s:p)?"modify"===e?"Esta cita ya ha pasado, por lo que no se puede modificar.":"Esta cita ya ha pasado, por lo que no se puede anular.":"modify"===e?n?o`Lo sentimos, como faltan menos de ${s} minutos para tu cita no podemos modificarla.`:o`Lo sentimos, como faltan menos de ${p} horas para tu cita no podemos modificarla.`:n?o`Lo sentimos, como faltan menos de ${s} minutos para tu cita no podemos anularla.`:o`Lo sentimos, como faltan menos de ${p} horas para tu cita no podemos anularla.`)}t([i({context:k})],L.prototype,"loginToken",void 0),t([f({type:String})],L.prototype,"variant",void 0),t([f({type:String})],L.prototype,"appointmentId",void 0),t([f({type:Boolean})],L.prototype,"isVideocall",void 0),t([f({type:Boolean})],L.prototype,"hasChatSupport",void 0),t([f({type:Number})],L.prototype,"unreadCount",void 0),t([f({type:Boolean})],L.prototype,"isModifyUnavailable",void 0),t([f({type:Boolean})],L.prototype,"isCancelUnavailable",void 0),t([f({type:Boolean})],L.prototype,"hasNoSlots",void 0),t([f({type:String})],L.prototype,"modifyUnavailableMessage",void 0),t([f({type:String})],L.prototype,"cancelUnavailableMessage",void 0),t([f({type:Object})],L.prototype,"repeatTarget",void 0),t([f({type:String})],L.prototype,"professionalHash",void 0),t([y()],L.prototype,"openDialog",void 0),L=t([n(),e("appointment-card-actions")],L);let X=class AppointmentCard extends m{constructor(){super(...arguments),this.variant="next",this.detailsVariant="wide",this.isChatOpen=!1,this.isCancelDialogOpen=!1,this.unreadQuery=new s(this,()=>h($,{roomId:this.appointmentResource?.room?.id})),this.getOrganizationSpecialtiesQuery=new s(this,()=>r($,{enabled:!!this.appointmentResource?.speciality?.id})),this.getOrganizationSetupQuery=new s(this,()=>p($)),this.getScheduleServicesQuery=new s(this,()=>c($))}static{this.styles=u`:host{display:flex}.card{width:100%;padding:var(--sp-6);display:flex;flex-direction:column;gap:var(--sp-4);justify-content:space-between}.card-top-content{display:flex;flex-direction:column;gap:var(--sp-6)}.see-details{color:var(--color-primary-link-default);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.see-details:hover{text-decoration:underline}.chevron-down{width:16px;height:16px;transition:transform .2s ease}.appointment-details{display:flex;flex-direction:column;gap:12px}.clock-icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.clock-icon-wrapper svg{width:100%;height:100%}.appointment-type{display:flex;align-items:center;gap:12px;font-size:18px;color:#2c3e50}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}render(){const t=this.appointmentResource.appointment.channel===C.videocall,e=this.appointmentResource.appointment.channel===C.phonecall,i=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,o=(t||e)&&i,n=b(),s=x(this.appointmentResource.appointment.expires_at),p=0===this.appointmentResource.slots.length,r=this.getOrganizationSetupQuery.result?.data?.appointments?.seconds_before_start_to_refund_on_cancel,c=d({startsAtIso:this.appointmentResource.appointment.starts_at,refundPolicySeconds:r}),h=s||p||!c,m=s||!c,u=G({action:"modify",refundPolicySeconds:r}),f=G({action:"cancel",refundPolicySeconds:r}),y=this.getOrganizationSpecialtiesQuery.result?.data?.find(t=>Number(t.id)===Number(this.appointmentResource.speciality.id)),$=l(y?.code??"",n,y?.name??this.appointmentResource.speciality.name),q=this.getScheduleServicesQuery.result?.data?.find(t=>t.id===this.appointmentResource.appointment.service_id)?.code,w=y?.code&&q?{specialty:y.code,service:q}:null;return g`<mq-card class="card" roundness="md"><div class="card-top-content"><professional-overview .specialtyName="${$??""}" .collegiateNumber="${this.appointmentResource.professional.collegiate_number??void 0}" .description="${this.appointmentResource.professional.description??""}" .languages="${this.appointmentResource.professional.languages}" .avatar="${this.appointmentResource.professional.avatar??""}" .name="${this.appointmentResource.professional.name}"></professional-overview><appointment-details .startsAt="${this.appointmentResource.appointment.starts_at}" .duration="${this.appointmentResource.appointment.duration}" .channel="${this.appointmentResource.appointment.channel}" .timezone="${this.loginToken?.patient?.timezone}" variant="${this.detailsVariant}"></appointment-details></div><appointment-card-actions .variant="${this.variant}" .appointmentId="${this.appointmentResource.appointment.id??""}" .isVideocall="${t}" .hasChatSupport="${o}" .unreadCount="${this.unreadQuery.result?.data?.unread_count??0}" .isModifyUnavailable="${h}" .isCancelUnavailable="${m}" .hasNoSlots="${p}" .modifyUnavailableMessage="${u}" .cancelUnavailableMessage="${f}" .repeatTarget="${w}" .professionalHash="${this.appointmentResource.professional.hash}" @toggle-chat="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&R.track(z(this.loginToken.patient.hash,this.appointmentResource.appointment.id??""))}}" @request-cancel="${()=>{this.isCancelDialogOpen=!0}}"></appointment-card-actions><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?g`<mq-chat-room slot="content" .consultationId="${this.appointmentResource.appointment.id}" consultation-type="appointment" token="${this.loginToken.access_token}" .roomId="${this.appointmentResource.room.id}" .professionalHash="${this.appointmentResource.professional.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}" ?readonly="${s}"></mq-chat-room>`:v}</mq-floating-bubble><cancel-appointment-confirmation-dialog .appointmentId="${this.appointmentResource.appointment.id}" .price="${this.appointmentResource.price??void 0}" .open="${this.isCancelDialogOpen}" @cancel="${()=>{this.isCancelDialogOpen=!1}}" @success="${()=>{this.isCancelDialogOpen=!1,P.success(a("Consulta anulada correctamente")),this.dispatchEvent(new CustomEvent("appointment-cancel-confirmed",{bubbles:!0,composed:!0,detail:{id:this.appointmentResource.appointment.id}}))}}"></cancel-appointment-confirmation-dialog></mq-card>`}};t([f({type:Object})],X.prototype,"appointmentResource",void 0),t([f({type:Number})],X.prototype,"specialtyId",void 0),t([f({type:String})],X.prototype,"variant",void 0),t([f({type:String})],X.prototype,"detailsVariant",void 0),t([i({context:k})],X.prototype,"loginToken",void 0),t([y()],X.prototype,"isChatOpen",void 0),t([y()],X.prototype,"isCancelDialogOpen",void 0),X=t([n(),e("appointment-card")],X);let Z=class AppointmentCardSkeleton extends m{static{this.styles=u`div{border-radius:var(--border-radius-md);background:color-mix(in srgb,var(--color-neutrals-background-disabled) 50%,#fff 50%);height:337px;width:100%}`}render(){return g`<div></div>`}};Z=t([e("appointment-card-skeleton")],Z);export{Q as g};
@@ -0,0 +1 @@
1
+ function e(e,t,r,n){for(var o,s=arguments.length,c=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n,i=e.length-1;i>=0;i--)(o=e[i])&&(c=(s<3?o(c):s>3?o(t,r,c):o(t,r))||c);return s>3&&c&&Object.defineProperty(t,r,c),c}"function"==typeof SuppressedError&&SuppressedError;const t=e=>(t,r)=>{const n=()=>{void 0===customElements.get(e)&&customElements.define(e,t)};void 0!==r?r.addInitializer(n):n()};export{e as _,t as c};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{h as a,s as n}from"./task-Bj8p7kJX.js";import{a as s,C as r,b as l,i as d}from"./api-chat-client-1Vz6ZOwp.js";import{t as c,d as m,a as p,b as h,c as u}from"./telemetry-client-BLJVs9me.js";import{a as f,i as g,E as v,x as y}from"./lit-element-DiWJYFwC.js";import{n as b}from"./property-scuRaFcM.js";import{getLocale as x}from"../i18n.js";import{calendarIcon as $}from"../ui/icons/calendar-icon.js";import{clockIcon as k}from"../ui/icons/clock-icon.js";import{r as w}from"./state-LQivXIgA.js";import{infoCircleOutineIcon as z}from"../ui/icons/info-circle-outine-icon.js";import"../ui/mq-button.js";import{l as q}from"./chunk-S5RWG6G2-DPesx3Od.js";import{messageBubbleIcon as j}from"../ui/icons/message-bubble-icon.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import"../ui/mq-card.js";import"../ui/mq-unread-badge.js";import{c as _}from"./consume-CovVqBjI.js";import{Q as C}from"./query-controller-BlO1Ax65.js";import{g as O}from"./chunk-GZF3YFSX-DM-GTqxg.js";import"../ui/back-link.js";import"./index-Bx8TWBsk.js";import{M as S}from"./mutation-controller-CR2qcqhH.js";import{g as T}from"./get-organization-setup-query-BMbuRi6v.js";import{g as I,a as D}from"./i18n-formats-DYS91YEa.js";import{MqViewAppointmentsEvent as Q}from"../events.js";let E=class ChatCta extends f{constructor(){super(...arguments),this.text=i("Utiliza el chat para enviar el motivo de consulta, documentos o imágenes"),this.readonly=!1,this.isChatOpen=!1,this.unreadQuery=new C(this,()=>O(s,{roomId:this.roomId}))}static{this.styles=[g`.chat-cta{padding:var(--sp-6) var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-4)}.cta-message{display:inline-flex;align-items:center;justify-content:center;gap:var(--sp-4);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default)}.cta-message svg{flex-shrink:0}mq-button svg{flex-shrink:0}mq-chat-room{height:100%}@media (min-width:768px){.chat-cta{padding:var(--sp-6)}mq-button{max-width:323px;margin:0 auto}}`]}render(){return y`<mq-card class="chat-cta" roundness="md"><div class="cta-message">${z({size:24})} <span>${this.text}</span></div><mq-button variant="primary" size="md" fullwidth @click="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&this.onOpenChat?.()}}">${j({size:24})} ${i("Chatea con el profesional")} ${(this.unreadQuery.result?.data?.unread_count??0)>0?y`<mq-unread-badge></mq-unread-badge>`:v}</mq-button></mq-card><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?y`<mq-chat-room slot="content" .consultationId="${this.consultationId}" .consultationType="${r.appointment}" token="${this.loginToken.access_token}" .roomId="${this.roomId}" .professionalHash="${this.professionalHash}" ?readonly="${this.readonly}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room>`:v}</mq-floating-bubble>`}};t([b({type:Number})],E.prototype,"roomId",void 0),t([b({type:String})],E.prototype,"professionalHash",void 0),t([b({type:String})],E.prototype,"text",void 0),t([b({type:String})],E.prototype,"consultationId",void 0),t([b({type:Boolean,reflect:!0})],E.prototype,"readonly",void 0),t([b({attribute:!1})],E.prototype,"onOpenChat",void 0),t([_({context:q})],E.prototype,"loginToken",void 0),t([w()],E.prototype,"isChatOpen",void 0),E=t([o(),e("chat-cta")],E);let F=class PageLayout extends f{constructor(){super(...arguments),this.yCentered=!1,this.background="solid"}static{this.styles=g`:host([background=transparent]){background-color:transparent}:host([background=solid]){background-color:var(--color-background)}:host([y-centered]) div{display:grid;place-items:center}div{width:100%;max-width:1000px;padding:var(--mq-layout-padding,0);margin:0 auto;box-sizing:border-box}:host([y-centered]) div{height:100%}main{width:100%}`}render(){return y`<div><main><slot></slot></main></div>`}};t([b({type:Boolean,attribute:"y-centered"})],F.prototype,"yCentered",void 0),t([b({type:String})],F.prototype,"background",void 0),F=t([e("page-layout")],F);const B=g`.title{margin:var(--size-3) 0;font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold)}.description{font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-card>:not(:first-child){margin-top:var(--size-4)}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-1)}.professional-speciality{font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);color:var(--color-neutrals-text-default)}.description-list-item dt{display:inline-flex}.description-list-item dd{margin:0;font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-semibold)}.description-list-item dd::first-letter{text-transform:uppercase}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card-empty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal)}.documents-card-title{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-4)}.documents-list{margin-bottom:var(--size-4)}.documents-list>:not(:first-child){margin-top:var(--size-2)}.finished-consultation-footer{display:flex;flex-direction:column;gap:var(--size-5)}.document-item-skeleton{height:57px;width:100%;background-color:var(--color-muted);animation:skeleton-pulse 1.5s infinite}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}@media (min-width:768px){.description-list{flex-direction:row}mq-button{display:block;max-width:323px;margin:0 auto}}`;let G=class DocumentationView extends f{constructor(){super(...arguments),this.canReconnect=!1,this._sharedocumentsTask=new a(this,{task:async([t])=>await s.flash.getSharedDocuments({appointment_id:t}),args:()=>[this.appointment.id]}),this.getOrganizationSpecialtiesQuery=new C(this,()=>I(s)),this.getOrganizationSetupQuery=new C(this,()=>T(s)),this._reconnectMutation=new S(this,{mutationFn:t=>s.appointments.reconnectAppointment(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("reconnect",{bubbles:!0,composed:!0}))}})}static{this.styles=B}firstUpdated(){c.track(m(this.loginToken.patient.hash,this.appointment.id??""))}render(){const t=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,e=x(),o=e.replace("_","-"),a=this.loginToken.patient.timezone,s=a?{timeZone:a}:{},r=new Intl.DateTimeFormat(o,{dateStyle:"full",...s}),m=new Intl.DateTimeFormat(o,{hour:"2-digit",minute:"2-digit",...s}),f=new Date(this.appointment.start_date),g=p(f,this.appointment.duration),b=a?l(a,f):"";return y`<back-link @mq-back="${t=>{t.stopPropagation(),this.dispatchEvent(new Q({tab:"history"}))}}">${i("Salir")}</back-link><h1 class="title">${i("Consulta finalizada")}</h1><p class="description">${i("Si tu médico ha generado alguna documentación podrás verla y descargarla aquí, desde la sección de documentación, tu correo o el chat.")}</p><mq-card class="professional-card" roundness="md"><div><h2 class="professional-name">${this.appointment.from.name}</h2><p class="professional-speciality">${this.appointment.from.speciality}</p></div><dl class="description-list"><div class="description-list-item"><dt>${$()}</dt><dd>${r.format(f)}</dd></div><div class="description-list-item"><dt>${k()}</dt><dd>${m.format(f)} - ${m.format(g)}${b?` (${b})`:""}</dd></div></dl></mq-card><mq-card class="documents-card" roundness="md"><h2 class="documents-card-title">${i("Documentación")}</h2><div class="documents-list">${this._sharedocumentsTask?.render({pending:()=>y`<div class="document-item-skeleton"></div>`,complete:()=>0===this._sharedocumentsTask?.value?.length?y`<p class="documents-card-empty">${i("El médico está terminando de gestionar tu consulta. Actualiza en unos minutos para ver si tienes documentación.")}</p>`:this._sharedocumentsTask?.value?.map(t=>y`<patient-document .kind="${t.document_type}" .filename="${t.name}" .specialty="${(()=>{const i=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>e.id===t.professional.speciality_id);return D(i?.code??"",e,i?.name)})()}" .description="${t.name}" .date="${t.created_at}" .downloadUrl="${t.url}"></patient-document>`)})}</div><mq-button variant="outline" size="md" fullwidth @click="${()=>{c.track(h(this.loginToken.patient.hash,this.appointment.id??"")),this._sharedocumentsTask?.run()}}" .disabled="${this._sharedocumentsTask?.status===n.PENDING}">${i("Actualizar")}</mq-button></mq-card><div class="finished-consultation-footer">${this.canReconnect?y`<mq-button variant="primary" size="md" fullwidth ?disabled="${this._reconnectMutation.isPending}" @click="${()=>this._reconnectMutation.run({appointmentId:this.appointment.id})}">${i("Volver a la sala de espera")}</mq-button>`:v} ${t?y`<chat-cta .consultationId="${this.appointment.id}" .roomId="${Number(this.appointment.room_id)}" .professionalHash="${this.appointment.from.hash}" .text="${i("Puedes chatear con tu profesional hasta 48 horas finalizada tu cita")}" ?readonly="${d(this.appointment.expires_at)}" .onOpenChat="${()=>{c.track(u(this.loginToken.patient.hash,this.appointment.id??""))}}"></chat-cta>`:v}</div>`}};t([b({type:Object})],G.prototype,"appointment",void 0),t([b({type:String})],G.prototype,"token",void 0),t([b({type:Boolean,attribute:"can-reconnect"})],G.prototype,"canReconnect",void 0),t([_({context:q})],G.prototype,"loginToken",void 0),G=t([o(),e("documentation-view")],G);
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{h as a,s as n}from"./task-Bj8p7kJX.js";import{a as s,C as r,b as l,i as d}from"./api-chat-client-1Vz6ZOwp.js";import{t as c,d as m,a as p,b as h,c as u}from"./telemetry-client-BLJVs9me.js";import{a as f,i as g,E as v,x as y}from"./lit-element-DiWJYFwC.js";import{n as b}from"./property-scuRaFcM.js";import{getLocale as x}from"../i18n.js";import{calendarIcon as $}from"../ui/icons/calendar-icon.js";import{clockIcon as k}from"../ui/icons/clock-icon.js";import{r as w}from"./state-LQivXIgA.js";import{infoCircleOutineIcon as z}from"../ui/icons/info-circle-outine-icon.js";import"../ui/mq-button.js";import{l as q}from"./chunk-S5RWG6G2-DPesx3Od.js";import{messageBubbleIcon as j}from"../ui/icons/message-bubble-icon.js";import"../mq-chat-room.js";import"../ui/mq-floating-bubble.js";import"../ui/mq-card.js";import"../ui/mq-unread-badge.js";import{c as _}from"./consume-CovVqBjI.js";import{Q as C}from"./query-controller-BlO1Ax65.js";import{g as O}from"./chunk-GZF3YFSX-DM-GTqxg.js";import"../ui/back-link.js";import"./index-BfAhWf7z.js";import{M as S}from"./mutation-controller-CR2qcqhH.js";import{g as T}from"./get-organization-setup-query-BMbuRi6v.js";import{g as I,a as D}from"./i18n-formats-DYS91YEa.js";import{MqViewAppointmentsEvent as Q}from"../events.js";let E=class ChatCta extends f{constructor(){super(...arguments),this.text=i("Utiliza el chat para enviar el motivo de consulta, documentos o imágenes"),this.readonly=!1,this.isChatOpen=!1,this.unreadQuery=new C(this,()=>O(s,{roomId:this.roomId}))}static{this.styles=[g`.chat-cta{padding:var(--sp-6) var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-4)}.cta-message{display:inline-flex;align-items:center;justify-content:center;gap:var(--sp-4);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default)}.cta-message svg{flex-shrink:0}mq-button svg{flex-shrink:0}mq-chat-room{height:100%}@media (min-width:768px){.chat-cta{padding:var(--sp-6)}mq-button{max-width:323px;margin:0 auto}}`]}render(){return y`<mq-card class="chat-cta" roundness="md"><div class="cta-message">${z({size:24})} <span>${this.text}</span></div><mq-button variant="primary" size="md" fullwidth @click="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&this.onOpenChat?.()}}">${j({size:24})} ${i("Chatea con el profesional")} ${(this.unreadQuery.result?.data?.unread_count??0)>0?y`<mq-unread-badge></mq-unread-badge>`:v}</mq-button></mq-card><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?y`<mq-chat-room slot="content" .consultationId="${this.consultationId}" .consultationType="${r.appointment}" token="${this.loginToken.access_token}" .roomId="${this.roomId}" .professionalHash="${this.professionalHash}" ?readonly="${this.readonly}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room>`:v}</mq-floating-bubble>`}};t([b({type:Number})],E.prototype,"roomId",void 0),t([b({type:String})],E.prototype,"professionalHash",void 0),t([b({type:String})],E.prototype,"text",void 0),t([b({type:String})],E.prototype,"consultationId",void 0),t([b({type:Boolean,reflect:!0})],E.prototype,"readonly",void 0),t([b({attribute:!1})],E.prototype,"onOpenChat",void 0),t([_({context:q})],E.prototype,"loginToken",void 0),t([w()],E.prototype,"isChatOpen",void 0),E=t([o(),e("chat-cta")],E);let F=class PageLayout extends f{constructor(){super(...arguments),this.yCentered=!1,this.background="solid"}static{this.styles=g`:host([background=transparent]){background-color:transparent}:host([background=solid]){background-color:var(--color-background)}:host([y-centered]) div{display:grid;place-items:center}div{width:100%;max-width:1000px;padding:var(--mq-layout-padding,0);margin:0 auto;box-sizing:border-box}:host([y-centered]) div{height:100%}main{width:100%}`}render(){return y`<div><main><slot></slot></main></div>`}};t([b({type:Boolean,attribute:"y-centered"})],F.prototype,"yCentered",void 0),t([b({type:String})],F.prototype,"background",void 0),F=t([e("page-layout")],F);const B=g`.title{margin:var(--size-3) 0;font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold)}.description{font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-card>:not(:first-child){margin-top:var(--size-4)}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-1)}.professional-speciality{font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal);margin:0}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);color:var(--color-neutrals-text-default)}.description-list-item dt{display:inline-flex}.description-list-item dd{margin:0;font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-semibold)}.description-list-item dd::first-letter{text-transform:uppercase}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card-empty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-normal)}.documents-card-title{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);color:var(--color-neutrals-text-default);font-weight:var(--font-weight-bold);margin:0;margin-bottom:var(--size-4)}.documents-list{margin-bottom:var(--size-4)}.documents-list>:not(:first-child){margin-top:var(--size-2)}.finished-consultation-footer{display:flex;flex-direction:column;gap:var(--size-5)}.document-item-skeleton{height:57px;width:100%;background-color:var(--color-muted);animation:skeleton-pulse 1.5s infinite}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}@media (min-width:768px){.description-list{flex-direction:row}mq-button{display:block;max-width:323px;margin:0 auto}}`;let G=class DocumentationView extends f{constructor(){super(...arguments),this.canReconnect=!1,this._sharedocumentsTask=new a(this,{task:async([t])=>await s.flash.getSharedDocuments({appointment_id:t}),args:()=>[this.appointment.id]}),this.getOrganizationSpecialtiesQuery=new C(this,()=>I(s)),this.getOrganizationSetupQuery=new C(this,()=>T(s)),this._reconnectMutation=new S(this,{mutationFn:t=>s.appointments.reconnectAppointment(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("reconnect",{bubbles:!0,composed:!0}))}})}static{this.styles=B}firstUpdated(){c.track(m(this.loginToken.patient.hash,this.appointment.id??""))}render(){const t=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,e=x(),o=e.replace("_","-"),a=this.loginToken.patient.timezone,s=a?{timeZone:a}:{},r=new Intl.DateTimeFormat(o,{dateStyle:"full",...s}),m=new Intl.DateTimeFormat(o,{hour:"2-digit",minute:"2-digit",...s}),f=new Date(this.appointment.start_date),g=p(f,this.appointment.duration),b=a?l(a,f):"";return y`<back-link @mq-back="${t=>{t.stopPropagation(),this.dispatchEvent(new Q({tab:"history"}))}}">${i("Salir")}</back-link><h1 class="title">${i("Consulta finalizada")}</h1><p class="description">${i("Si tu médico ha generado alguna documentación podrás verla y descargarla aquí, desde la sección de documentación, tu correo o el chat.")}</p><mq-card class="professional-card" roundness="md"><div><h2 class="professional-name">${this.appointment.from.name}</h2><p class="professional-speciality">${this.appointment.from.speciality}</p></div><dl class="description-list"><div class="description-list-item"><dt>${$()}</dt><dd>${r.format(f)}</dd></div><div class="description-list-item"><dt>${k()}</dt><dd>${m.format(f)} - ${m.format(g)}${b?` (${b})`:""}</dd></div></dl></mq-card><mq-card class="documents-card" roundness="md"><h2 class="documents-card-title">${i("Documentación")}</h2><div class="documents-list">${this._sharedocumentsTask?.render({pending:()=>y`<div class="document-item-skeleton"></div>`,complete:()=>0===this._sharedocumentsTask?.value?.length?y`<p class="documents-card-empty">${i("El médico está terminando de gestionar tu consulta. Actualiza en unos minutos para ver si tienes documentación.")}</p>`:this._sharedocumentsTask?.value?.map(t=>y`<patient-document .kind="${t.document_type}" .filename="${t.name}" .specialty="${(()=>{const i=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>e.id===t.professional.speciality_id);return D(i?.code??"",e,i?.name)})()}" .description="${t.name}" .date="${t.created_at}" .downloadUrl="${t.url}"></patient-document>`)})}</div><mq-button variant="outline" size="md" fullwidth @click="${()=>{c.track(h(this.loginToken.patient.hash,this.appointment.id??"")),this._sharedocumentsTask?.run()}}" .disabled="${this._sharedocumentsTask?.status===n.PENDING}">${i("Actualizar")}</mq-button></mq-card><div class="finished-consultation-footer">${this.canReconnect?y`<mq-button variant="primary" size="md" fullwidth ?disabled="${this._reconnectMutation.isPending}" @click="${()=>this._reconnectMutation.run({appointmentId:this.appointment.id})}">${i("Volver a la sala de espera")}</mq-button>`:v} ${t?y`<chat-cta .consultationId="${this.appointment.id}" .roomId="${Number(this.appointment.room_id)}" .professionalHash="${this.appointment.from.hash}" .text="${i("Puedes chatear con tu profesional hasta 48 horas finalizada tu cita")}" ?readonly="${d(this.appointment.expires_at)}" .onOpenChat="${()=>{c.track(u(this.loginToken.patient.hash,this.appointment.id??""))}}"></chat-cta>`:v}</div>`}};t([b({type:Object})],G.prototype,"appointment",void 0),t([b({type:String})],G.prototype,"token",void 0),t([b({type:Boolean,attribute:"can-reconnect"})],G.prototype,"canReconnect",void 0),t([_({context:q})],G.prototype,"loginToken",void 0),G=t([o(),e("documentation-view")],G);
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{i as o,a as i,x as r}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";import{r as a}from"./state-LQivXIgA.js";import{downloadIcon as s}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as l}from"./runtime-Bg1WXVCx.js";import{l as d}from"./localized-decorator-BlOuLhym.js";import{a as p,D as c}from"./api-chat-client-1Vz6ZOwp.js";import{DownloadFileEvent as m}from"../events.js";import{getLocale as f}from"../i18n.js";const h=o`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let u=class PatientDocument extends i{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=h}getFormatter(){const t=f().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await p.flash.downloadDocument({url:this.downloadUrl}),e=await async function(t){return new Promise((e,o)=>{const i=new FileReader;i.onloadend=()=>e(i.result),i.onerror=o,i.readAsDataURL(t)})}(t);this.dispatchEvent(new m({url:e,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case c.prescription:return l("Receta");case c.report:return l("Informe");case c.diagnosticTestPrescription:return l("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return r`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${s({size:24})}</mq-button>`}};t([n({type:String})],u.prototype,"kind",void 0),t([n({type:String})],u.prototype,"filename",void 0),t([n({type:String})],u.prototype,"specialty",void 0),t([n({type:String})],u.prototype,"description",void 0),t([n({type:String})],u.prototype,"date",void 0),t([n({type:String})],u.prototype,"downloadUrl",void 0),t([a()],u.prototype,"isDownloading",void 0),u=t([d(),e("patient-document")],u);
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{i as o,a as i,x as r}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";import{r as a}from"./state-LQivXIgA.js";import{downloadIcon as s}from"../ui/icons/download-icon.js";import"../ui/mq-button.js";import{m as l}from"./runtime-Bg1WXVCx.js";import{l as d}from"./localized-decorator-BlOuLhym.js";import{a as p,D as c}from"./api-chat-client-1Vz6ZOwp.js";import{DownloadFileEvent as m}from"../events.js";import{getLocale as f}from"../i18n.js";const h=o`:host{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-4);width:100%}.left{display:flex;flex-direction:column;gap:var(--sp-1);flex:1;min-width:0}.tag{border-radius:var(--border-radius-sm);display:inline-flex;align-items:center;justify-content:center;padding:var(--sp-0_5) var(--sp-2);background-color:#e5e5e5;width:fit-content}.tag-label{font-family:var(--font-body);font-size:11px;font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-transform:uppercase;letter-spacing:3px;line-height:normal}.title{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description{font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);line-height:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let u=class PatientDocument extends i{constructor(){super(...arguments),this.isDownloading=!1}static{this.styles=h}getFormatter(){const t=f().replace("_","-");return new Intl.DateTimeFormat(t,{year:"numeric",month:"numeric",day:"numeric"})}async _handleDownload(){this.isDownloading=!0;const t=await p.flash.downloadDocument({url:this.downloadUrl}),e=await async function(t){return new Promise((e,o)=>{const i=new FileReader;i.onloadend=()=>e(i.result),i.onerror=o,i.readAsDataURL(t)})}(t);this.dispatchEvent(new m({url:e,filename:`${this.filename}.pdf`})),this.isDownloading=!1}formatKind(t){switch(t){case c.prescription:return l("Receta");case c.report:return l("Informe");case c.diagnosticTestPrescription:return l("Prescripción")}}render(){const t=this.getFormatter().format(new Date(this.date));return r`<div class="left"><div class="tag"><span class="tag-label">${this.formatKind(this.kind)}</span></div><div class="title">${t} - ${this.specialty}</div><div class="description">${this.description}</div></div><mq-button variant="ghost" size="icon-lg" @click="${this._handleDownload}" ?disabled="${this.isDownloading}">${s({size:24})}</mq-button>`}};t([n({type:String})],u.prototype,"kind",void 0),t([n({type:String})],u.prototype,"filename",void 0),t([n({type:String})],u.prototype,"specialty",void 0),t([n({type:String})],u.prototype,"description",void 0),t([n({type:String})],u.prototype,"date",void 0),t([n({type:String})],u.prototype,"downloadUrl",void 0),t([a()],u.prototype,"isDownloading",void 0),u=t([d(),e("patient-document")],u);
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as a}from"./runtime-Bg1WXVCx.js";import{l as r}from"./localized-decorator-BlOuLhym.js";import{i as n,a as s,x as o}from"./lit-element-DiWJYFwC.js";import{n as i}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as d}from"./class-map-Co76I6aw.js";import{chevronLeftIcon as c}from"../ui/icons/chevron-left-icon.js";import{chevronRightIcon as v}from"../ui/icons/chevron-right-icon.js";import{spinnerIcon as h}from"../ui/icons/spinner-icon.js";import{t as u,c as p,n as g,g as m,p as y,a as b,s as f}from"./parseISO-Dj3qSTG8.js";import{i as D}from"./isSameDay-CuhZMy1T.js";import{i as k}from"./isBefore-CPpTogxo.js";function w(t,e,a){const r=u(t,a?.in);if(isNaN(e))return p(t,NaN);if(!e)return r;const n=r.getDate(),s=p(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);return n>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function M(t,e){const a=u(t,e?.in),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function x(t,e){const{start:a,end:r}=function(t,e){const[a,r]=g(t,e.start,e.end);return{start:a,end:r}}(e?.in,t);let n=+a>+r;const s=n?+a:+r,o=n?r:a;o.setHours(0,0,0,0);const i=[];for(;+o<=s;)i.push(p(a,o)),o.setDate(o.getDate()+1),o.setHours(0,0,0,0);return n?i.reverse():i}function S(t,e){const a=u(t,e?.in);return a.setDate(1),a.setHours(0,0,0,0),a}function j(t,e){const a=m(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,n=u(t,e?.in),s=n.getDay(),o=6+(s<r?-7:0)-(s-r);return n.setDate(n.getDate()+o),n.setHours(23,59,59,999),n}function E(t,e){return+u(t)>+u(e)}function $(t,e){return D(p(t,t),function(t){return p(t,Date.now())}(t))}const N=n`:host{display:block;font-family:var(--font-body)}.calendar{background:var(--color-card);border-radius:var(--border-radius-lg);user-select:none}.calendar-header{display:flex;align-items:center;justify-content:space-between;background:var(--color-primary-background-extraWeak);padding:var(--sp-4);border-radius:var(--border-radius-lg) var(--border-radius-lg) 0 0}.calendar-header-title{font-family:var(--font-titles);font-size:var(--text-lg);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest)}.calendar-body{position:relative;transition:opacity .2s}.calendar-body.loading{opacity:.4;pointer-events:none}.calendar-nav{display:flex;gap:var(--sp-2)}.calendar-nav-button{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border:none;background:0 0;border-radius:var(--border-radius-md);cursor:pointer;transition:background-color .2s;color:var(--color-gray-darkest);padding:0}.calendar-nav-button:hover{background:var(--color-background-primary-light)}.calendar-nav-button:disabled{opacity:.3;cursor:not-allowed}.calendar-weekdays{display:grid;grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:var(--sp-4) var(--sp-4) var(--sp-2) var(--sp-4)}.calendar-weekday{text-align:center;font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest);padding:var(--sp-2)}.calendar-days{display:grid;gap:var(--sp-1);grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:0 var(--sp-4) var(--sp-4) var(--sp-4)}.calendar-day{width:var(--sp-11);height:var(--sp-11);display:flex;align-items:center;justify-content:center;border:none;background:0 0;border-radius:var(--border-radius-full);cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-gray-darkest);transition:all .2s;padding:0;position:relative}.calendar-day:hover:not(:disabled):not(.other-month){background:var(--color-gray-lighter)}.calendar-day.other-month{color:var(--color-gray-medium);background:0 0}.calendar-day:disabled{color:var(--color-gray-medium);background:0 0;cursor:not-allowed}.calendar-day.available:not(.selected){background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-semibold)}.calendar-day.available:hover:not(:disabled):not(.selected){background:var(--color-primary-dark)}.calendar-day.selected{background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.calendar-day.selected:hover:not(:disabled){background:var(--color-primary-dark)}.calendar-day-empty{width:var(--sp-11);height:var(--sp-11)}.calendar-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:10}@media (min-width:640px){.calendar-weekdays{gap:var(--sp-2)}.calendar-days{gap:var(--sp-2)}}@media (min-width:768px){.calendar-weekdays{gap:var(--sp-3)}.calendar-days{gap:var(--sp-3)}}@media (min-width:1024px){.calendar-weekdays{gap:var(--sp-4)}.calendar-days{gap:var(--sp-4)}}`;class DateSelectEvent extends Event{static{this.eventName="date-select"}constructor(t){super(DateSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class PrevMonthEvent extends Event{static{this.eventName="prev-month"}constructor(t){super(PrevMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class NextMonthEvent extends Event{static{this.eventName="next-month"}constructor(t){super(NextMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let C=class MqCalendar extends s{constructor(){super(...arguments),this.locale="es-ES",this.isLoading=!1,this.handlePrevMonth=()=>{const t=this.getCurrentMonthDate(),e=w(t,-1,a);var a;this.dispatchEvent(new PrevMonthEvent({currentMonth:e.toISOString()}))},this.handleNextMonth=()=>{const t=w(this.getCurrentMonthDate(),1);this.dispatchEvent(new NextMonthEvent({currentMonth:t.toISOString()}))},this.handleDayClick=t=>{t.isDisabled||(this.selectedDate=t.date,this.value=t.date.toISOString(),this.dispatchEvent(new DateSelectEvent({date:t.date.toISOString()})),this.requestUpdate())}}static{this.styles=[N]}connectedCallback(){super.connectedCallback(),this.value&&(this.selectedDate=y(this.value))}getMonthYear(){const t=this.getCurrentMonthDate();return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}getCurrentMonthDate(){return this.currentMonth?y(this.currentMonth):new Date}getWeekdays(){const t=b(new Date(2024,0,1),{weekStartsOn:1}),e=x({start:t,end:j(t,{weekStartsOn:1})}),a=new Intl.DateTimeFormat(this.locale,{weekday:"narrow"});return e.map(t=>a.format(t).toUpperCase())}getDaysInMonth(){const t=this.getCurrentMonthDate(),e=S(t),a=M(t);return x({start:b(e,{weekStartsOn:1}),end:j(a,{weekStartsOn:1})}).map(e=>{const a=function(t,e,a){const[r,n]=g(a?.in,t,e);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t);return this.createCalendarDay(e,a)})}createCalendarDay(t,e){const a=f(t),r=$(a),n=this.isDateAvailable(a);return{date:a,isCurrentMonth:e,isToday:r,isDisabled:this.isDateDisabled(a,n),isSelected:!!this.selectedDate&&D(a,this.selectedDate),isAvailable:n}}isDateAvailable(t){if(!this.availableDays||0===this.availableDays.length)return!1;const e=f(t);return this.availableDays.some(t=>{const a=f(y(t));return D(e,a)})}isDateDisabled(t,e){const a=f(t);if(this.availableDays&&this.availableDays.length>0)return!e;if(this.minDate){const t=f(y(this.minDate));if(k(a,t))return!0}if(this.maxDate){if(E(a,f(y(this.maxDate))))return!0}return!1}render(){const t=this.getDaysInMonth(),e=this.getWeekdays();return o`<div class="calendar"><div class="calendar-header"><button class="calendar-nav-button" @click="${this.handlePrevMonth}" aria-label="${a("Mes anterior")}">${c({size:24})}</button><div class="calendar-header-title">${this.getMonthYear()}</div><button class="calendar-nav-button" @click="${this.handleNextMonth}" aria-label="${a("Mes siguiente")}">${v({size:24})}</button></div><div class="calendar-body ${this.isLoading?"loading":""}"><div class="calendar-weekdays">${e.map(t=>o`<div class="calendar-weekday">${t}</div>`)}</div><div class="calendar-days">${t.map(t=>t.isCurrentMonth?o`<button class="${d({"calendar-day":!0,"other-month":!t.isCurrentMonth,today:t.isToday,selected:t.isSelected,available:t.isAvailable})}" ?disabled="${t.isDisabled||this.isLoading}" @click="${()=>this.handleDayClick(t)}" aria-label="${t.date.toLocaleDateString(this.locale)}">${t.date.getDate()}</button>`:o`<div class="calendar-day-empty"></div>`)}</div>${this.isLoading?o`<div class="calendar-spinner">${h({size:40,color:"var(--color-primary)"})}</div>`:""}</div></div>`}};t([i({type:String})],C.prototype,"locale",void 0),t([i({type:String,attribute:"min-date"})],C.prototype,"minDate",void 0),t([i({type:String,attribute:"max-date"})],C.prototype,"maxDate",void 0),t([i({type:String})],C.prototype,"value",void 0),t([i({type:Boolean,attribute:"is-loading"})],C.prototype,"isLoading",void 0),t([i({type:String,attribute:"current-month"})],C.prototype,"currentMonth",void 0),t([i({type:Array,attribute:"available-days"})],C.prototype,"availableDays",void 0),t([l()],C.prototype,"selectedDate",void 0),C=t([r(),e("mq-calendar")],C);export{DateSelectEvent as D,C as M,NextMonthEvent as N,PrevMonthEvent as P,M as e,E as i,S as s};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as a}from"./runtime-Bg1WXVCx.js";import{l as r}from"./localized-decorator-BlOuLhym.js";import{i as n,a as s,x as o}from"./lit-element-DiWJYFwC.js";import{n as i}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as d}from"./class-map-Co76I6aw.js";import{chevronLeftIcon as c}from"../ui/icons/chevron-left-icon.js";import{chevronRightIcon as v}from"../ui/icons/chevron-right-icon.js";import{spinnerIcon as h}from"../ui/icons/spinner-icon.js";import{t as u,c as p,n as g,g as m,p as y,a as b,s as f}from"./parseISO-Dj3qSTG8.js";import{i as D}from"./isSameDay-CuhZMy1T.js";import{i as k}from"./isBefore-CPpTogxo.js";function w(t,e,a){const r=u(t,a?.in);if(isNaN(e))return p(t,NaN);if(!e)return r;const n=r.getDate(),s=p(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);return n>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function M(t,e){const a=u(t,e?.in),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function x(t,e){const{start:a,end:r}=function(t,e){const[a,r]=g(t,e.start,e.end);return{start:a,end:r}}(e?.in,t);let n=+a>+r;const s=n?+a:+r,o=n?r:a;o.setHours(0,0,0,0);const i=[];for(;+o<=s;)i.push(p(a,o)),o.setDate(o.getDate()+1),o.setHours(0,0,0,0);return n?i.reverse():i}function S(t,e){const a=u(t,e?.in);return a.setDate(1),a.setHours(0,0,0,0),a}function j(t,e){const a=m(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,n=u(t,e?.in),s=n.getDay(),o=6+(s<r?-7:0)-(s-r);return n.setDate(n.getDate()+o),n.setHours(23,59,59,999),n}function E(t,e){return+u(t)>+u(e)}function $(t,e){return D(p(t,t),function(t){return p(t,Date.now())}(t))}const N=n`:host{display:block;font-family:var(--font-body)}.calendar{background:var(--color-card);border-radius:var(--border-radius-lg);user-select:none}.calendar-header{display:flex;align-items:center;justify-content:space-between;background:var(--color-primary-background-extraWeak);padding:var(--sp-4);border-radius:var(--border-radius-lg) var(--border-radius-lg) 0 0}.calendar-header-title{font-family:var(--font-titles);font-size:var(--text-lg);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest)}.calendar-body{position:relative;transition:opacity .2s}.calendar-body.loading{opacity:.4;pointer-events:none}.calendar-nav{display:flex;gap:var(--sp-2)}.calendar-nav-button{display:flex;align-items:center;justify-content:center;width:var(--size-8);height:var(--size-8);border:none;background:0 0;border-radius:var(--border-radius-md);cursor:pointer;transition:background-color .2s;color:var(--color-gray-darkest);padding:0}.calendar-nav-button:hover{background:var(--color-background-primary-light)}.calendar-nav-button:disabled{opacity:.3;cursor:not-allowed}.calendar-weekdays{display:grid;grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:var(--sp-4) var(--sp-4) var(--sp-2) var(--sp-4)}.calendar-weekday{text-align:center;font-size:var(--text-sm);font-weight:var(--font-weight-bold);color:var(--color-gray-darkest);padding:var(--sp-2)}.calendar-days{display:grid;gap:var(--sp-1);grid-template-columns:repeat(7,var(--sp-11));justify-content:space-between;padding:0 var(--sp-4) var(--sp-4) var(--sp-4)}.calendar-day{width:var(--sp-11);height:var(--sp-11);display:flex;align-items:center;justify-content:center;border:none;background:0 0;border-radius:var(--border-radius-full);cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-gray-darkest);transition:all .2s;padding:0;position:relative}.calendar-day:hover:not(:disabled):not(.other-month){background:var(--color-gray-lighter)}.calendar-day.other-month{color:var(--color-gray-medium);background:0 0}.calendar-day:disabled{color:var(--color-gray-medium);background:0 0;cursor:not-allowed}.calendar-day.available:not(.selected){background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-semibold)}.calendar-day.available:hover:not(:disabled):not(.selected){background:var(--color-primary-dark)}.calendar-day.selected{background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.calendar-day.selected:hover:not(:disabled){background:var(--color-primary-dark)}.calendar-day-empty{width:var(--sp-11);height:var(--sp-11)}.calendar-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:10}@media (min-width:640px){.calendar-weekdays{gap:var(--sp-2)}.calendar-days{gap:var(--sp-2)}}@media (min-width:768px){.calendar-weekdays{gap:var(--sp-3)}.calendar-days{gap:var(--sp-3)}}@media (min-width:1024px){.calendar-weekdays{gap:var(--sp-4)}.calendar-days{gap:var(--sp-4)}}`;class DateSelectEvent extends Event{static{this.eventName="date-select"}constructor(t){super(DateSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class PrevMonthEvent extends Event{static{this.eventName="prev-month"}constructor(t){super(PrevMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class NextMonthEvent extends Event{static{this.eventName="next-month"}constructor(t){super(NextMonthEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let C=class MqCalendar extends s{constructor(){super(...arguments),this.locale="es-ES",this.isLoading=!1,this.handlePrevMonth=()=>{const t=this.getCurrentMonthDate(),e=w(t,-1,a);var a;this.dispatchEvent(new PrevMonthEvent({currentMonth:e.toISOString()}))},this.handleNextMonth=()=>{const t=w(this.getCurrentMonthDate(),1);this.dispatchEvent(new NextMonthEvent({currentMonth:t.toISOString()}))},this.handleDayClick=t=>{t.isDisabled||(this.selectedDate=t.date,this.value=t.date.toISOString(),this.dispatchEvent(new DateSelectEvent({date:t.date.toISOString()})),this.requestUpdate())}}static{this.styles=[N]}connectedCallback(){super.connectedCallback(),this.value&&(this.selectedDate=y(this.value))}getMonthYear(){const t=this.getCurrentMonthDate();return new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(t)}getCurrentMonthDate(){return this.currentMonth?y(this.currentMonth):new Date}getWeekdays(){const t=b(new Date(2024,0,1),{weekStartsOn:1}),e=x({start:t,end:j(t,{weekStartsOn:1})}),a=new Intl.DateTimeFormat(this.locale,{weekday:"narrow"});return e.map(t=>a.format(t).toUpperCase())}getDaysInMonth(){const t=this.getCurrentMonthDate(),e=S(t),a=M(t);return x({start:b(e,{weekStartsOn:1}),end:j(a,{weekStartsOn:1})}).map(e=>{const a=function(t,e,a){const[r,n]=g(a?.in,t,e);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t);return this.createCalendarDay(e,a)})}createCalendarDay(t,e){const a=f(t),r=$(a),n=this.isDateAvailable(a);return{date:a,isCurrentMonth:e,isToday:r,isDisabled:this.isDateDisabled(a,n),isSelected:!!this.selectedDate&&D(a,this.selectedDate),isAvailable:n}}isDateAvailable(t){if(!this.availableDays||0===this.availableDays.length)return!1;const e=f(t);return this.availableDays.some(t=>{const a=f(y(t));return D(e,a)})}isDateDisabled(t,e){const a=f(t);if(this.availableDays&&this.availableDays.length>0)return!e;if(this.minDate){const t=f(y(this.minDate));if(k(a,t))return!0}if(this.maxDate){if(E(a,f(y(this.maxDate))))return!0}return!1}render(){const t=this.getDaysInMonth(),e=this.getWeekdays();return o`<div class="calendar"><div class="calendar-header"><button class="calendar-nav-button" @click="${this.handlePrevMonth}" aria-label="${a("Mes anterior")}">${c({size:24})}</button><div class="calendar-header-title">${this.getMonthYear()}</div><button class="calendar-nav-button" @click="${this.handleNextMonth}" aria-label="${a("Mes siguiente")}">${v({size:24})}</button></div><div class="calendar-body ${this.isLoading?"loading":""}"><div class="calendar-weekdays">${e.map(t=>o`<div class="calendar-weekday">${t}</div>`)}</div><div class="calendar-days">${t.map(t=>t.isCurrentMonth?o`<button class="${d({"calendar-day":!0,"other-month":!t.isCurrentMonth,today:t.isToday,selected:t.isSelected,available:t.isAvailable})}" ?disabled="${t.isDisabled||this.isLoading}" @click="${()=>this.handleDayClick(t)}" aria-label="${t.date.toLocaleDateString(this.locale)}">${t.date.getDate()}</button>`:o`<div class="calendar-day-empty"></div>`)}</div>${this.isLoading?o`<div class="calendar-spinner">${h({size:40,color:"var(--color-primary)"})}</div>`:""}</div></div>`}};t([i({type:String})],C.prototype,"locale",void 0),t([i({type:String,attribute:"min-date"})],C.prototype,"minDate",void 0),t([i({type:String,attribute:"max-date"})],C.prototype,"maxDate",void 0),t([i({type:String})],C.prototype,"value",void 0),t([i({type:Boolean,attribute:"is-loading"})],C.prototype,"isLoading",void 0),t([i({type:String,attribute:"current-month"})],C.prototype,"currentMonth",void 0),t([i({type:Array,attribute:"available-days"})],C.prototype,"availableDays",void 0),t([l()],C.prototype,"selectedDate",void 0),C=t([r(),e("mq-calendar")],C);export{DateSelectEvent as D,C as M,NextMonthEvent as N,PrevMonthEvent as P,M as e,E as i,S as s};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as a}from"./property-scuRaFcM.js";import{r as s}from"./state-LQivXIgA.js";import"../ui/mq-checkbox.js";import"../ui/mq-button.js";import{M as r}from"./mutation-controller-CR2qcqhH.js";import{setEnv as l}from"../env.js";import{a as h}from"./api-chat-client-1Vz6ZOwp.js";const c=i`.page-header{box-sizing:border-box;width:100%;display:none}.page-title{font-family:var(--font-body);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.page-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.page-subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-subtle)}.page-subtitle ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-section{box-sizing:border-box;width:100%;display:flex;flex-direction:column;gap:var(--sp-6);background-color:var(--color-neutrals-background-weak);padding:var(--sp-6);border-radius:var(--border-radius-md)}.terms-title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.terms-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-description{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.terms-description ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.checkbox-container{display:flex;gap:var(--sp-3);align-items:flex-start;cursor:pointer}.checkbox-label{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);flex:1}@media (min-width:768px){.page-header{display:block;margin-bottom:var(--sp-10)}.page-title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}.page-title ::slotted(*){font-size:inherit;line-height:inherit}.page-subtitle{font-size:var(--text-base);line-height:var(--text-base--line-height)}.page-subtitle ::slotted(*){font-size:inherit;line-height:inherit}.terms-title{font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}.terms-title ::slotted(*){font-size:inherit;line-height:inherit}.terms-description{font-size:var(--text-base);line-height:var(--text-base--line-height)}.terms-description ::slotted(*){font-size:inherit;line-height:inherit}.checkbox-label{font-size:var(--text-base);line-height:var(--text-base--line-height)}}`;let d=class MqTermsAndConditions extends o{constructor(){super(...arguments),this.disabled=!1,this.hasCommercialCommunications=!1,this._accepted=!1,this.acceptLegalConsentMutation=new r(this,{mutationFn:async t=>h.profile.acceptLegalConsent(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("continue"))}})}static{this.styles=c}willUpdate(t){t.has("env")&&this.env&&l(this.env),t.has("apiKey")&&this.apiKey&&h.setApiKey(this.apiKey),t.has("token")&&this.token&&h.setAuthToken(this.token)}handleCheckboxChange(t){this._accepted=t.detail.checked}handleContinue(){this._accepted&&!this.disabled&&this.acceptLegalConsentMutation.run({terms_accepted:!0,privacy_accepted:!0,commercial_accepted:this.hasCommercialCommunications})}render(){const t=!this._accepted||this.disabled;return n`<div class="page-header"><div class="page-title"><slot name="page-title"></slot></div><div class="page-subtitle"><slot name="page-subtitle"></slot></div></div><div class="terms-section"><div><div class="terms-title"><slot name="terms-title"></slot></div><div class="terms-description"><slot name="terms-description"></slot></div></div><div class="checkbox-container"><mq-checkbox id="terms-checkbox" @change="${this.handleCheckboxChange}" ?disabled="${this.disabled}"></mq-checkbox><label class="checkbox-label" for="terms-checkbox"><slot name="checkbox-label"></slot></label></div><mq-button variant="primary" size="md" fullwidth ?disabled="${this.acceptLegalConsentMutation.isPending||t}" @click="${this.handleContinue}"><slot name="button-text"></slot></mq-button></div>`}};t([a({type:Boolean})],d.prototype,"disabled",void 0),t([a({type:Boolean})],d.prototype,"hasCommercialCommunications",void 0),t([a({type:String,attribute:"api-key"})],d.prototype,"apiKey",void 0),t([a({type:String,attribute:"token"})],d.prototype,"token",void 0),t([a({type:String,attribute:"env"})],d.prototype,"env",void 0),t([s()],d.prototype,"_accepted",void 0),d=t([e("mq-terms-and-conditions")],d);export{d as M};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as a}from"./property-scuRaFcM.js";import{r as s}from"./state-LQivXIgA.js";import"../ui/mq-checkbox.js";import"../ui/mq-button.js";import{M as r}from"./mutation-controller-CR2qcqhH.js";import{setEnv as l}from"../env.js";import{a as h}from"./api-chat-client-1Vz6ZOwp.js";const c=i`.page-header{box-sizing:border-box;width:100%;display:none}.page-title{font-family:var(--font-body);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.page-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.page-subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-subtle)}.page-subtitle ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-section{box-sizing:border-box;width:100%;display:flex;flex-direction:column;gap:var(--sp-6);background-color:var(--color-neutrals-background-weak);padding:var(--sp-6);border-radius:var(--border-radius-md)}.terms-title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default)}.terms-title ::slotted(*){margin:0;margin-bottom:var(--sp-2);font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.terms-description{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.terms-description ::slotted(*){margin:0;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}.checkbox-container{display:flex;gap:var(--sp-3);align-items:flex-start;cursor:pointer}.checkbox-label{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);flex:1}@media (min-width:768px){.page-header{display:block;margin-bottom:var(--sp-10)}.page-title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}.page-title ::slotted(*){font-size:inherit;line-height:inherit}.page-subtitle{font-size:var(--text-base);line-height:var(--text-base--line-height)}.page-subtitle ::slotted(*){font-size:inherit;line-height:inherit}.terms-title{font-size:var(--text-2xl);line-height:var(--text-2xl--line-height)}.terms-title ::slotted(*){font-size:inherit;line-height:inherit}.terms-description{font-size:var(--text-base);line-height:var(--text-base--line-height)}.terms-description ::slotted(*){font-size:inherit;line-height:inherit}.checkbox-label{font-size:var(--text-base);line-height:var(--text-base--line-height)}}`;let d=class MqTermsAndConditions extends o{constructor(){super(...arguments),this.disabled=!1,this.hasCommercialCommunications=!1,this._accepted=!1,this.acceptLegalConsentMutation=new r(this,{mutationFn:async t=>h.profile.acceptLegalConsent(t),onSuccess:()=>{this.dispatchEvent(new CustomEvent("continue"))}})}static{this.styles=c}willUpdate(t){t.has("env")&&this.env&&l(this.env),t.has("apiKey")&&this.apiKey&&h.setApiKey(this.apiKey),t.has("token")&&this.token&&h.setAuthToken(this.token)}handleCheckboxChange(t){this._accepted=t.detail.checked}handleContinue(){this._accepted&&!this.disabled&&this.acceptLegalConsentMutation.run({terms_accepted:!0,privacy_accepted:!0,commercial_accepted:this.hasCommercialCommunications})}render(){const t=!this._accepted||this.disabled;return n`<div class="page-header"><div class="page-title"><slot name="page-title"></slot></div><div class="page-subtitle"><slot name="page-subtitle"></slot></div></div><div class="terms-section"><div><div class="terms-title"><slot name="terms-title"></slot></div><div class="terms-description"><slot name="terms-description"></slot></div></div><div class="checkbox-container"><mq-checkbox id="terms-checkbox" @change="${this.handleCheckboxChange}" ?disabled="${this.disabled}"></mq-checkbox><label class="checkbox-label" for="terms-checkbox"><slot name="checkbox-label"></slot></label></div><mq-button variant="primary" size="md" fullwidth ?disabled="${this.acceptLegalConsentMutation.isPending||t}" @click="${this.handleContinue}"><slot name="button-text"></slot></mq-button></div>`}};t([a({type:Boolean})],d.prototype,"disabled",void 0),t([a({type:Boolean})],d.prototype,"hasCommercialCommunications",void 0),t([a({type:String,attribute:"api-key"})],d.prototype,"apiKey",void 0),t([a({type:String,attribute:"token"})],d.prototype,"token",void 0),t([a({type:String,attribute:"env"})],d.prototype,"env",void 0),t([s()],d.prototype,"_accepted",void 0),d=t([e("mq-terms-and-conditions")],d);export{d as M};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{E as s,i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as r}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as a}from"./class-map-Co76I6aw.js";import{i as d,t as c,e as p}from"./directive-2EDmOukv.js";import{o as v}from"./style-map-CIdqdn7C.js";import"../ui/mq-text-button.js";const u=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),u(t,e);return!0},m=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},x=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),g(e)}};function $(t){void 0!==this._$AN?(m(this),this._$AM=t,x(this)):this._$AM=t}function b(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)u(i[t],!1),m(i[t]);else null!=i&&(u(i,!1),m(i));else u(this,t)}const g=t=>{t.type==c.CHILD&&(t._$AP??=b,t._$AQ??=$)};class f extends d{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),x(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(u(this,t),m(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class h{}const _=new WeakMap,A=p(class extends f{render(t){return s}update(t,[e]){const i=e!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),s}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=_.get(e);void 0===s&&(s=new WeakMap,_.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?_.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),y=i`:host{display:flex;flex-direction:column;gap:var(--sp-1)}.text{margin:0}.text.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.toggle{align-self:flex-start}`;let w=class MqClampedText extends o{constructor(){super(...arguments),this.lines=2,this.expandLabel="",this.collapseLabel="",this.expanded=!1,this.overflowing=!1,this.textRef=new h,this.measure=()=>{const t=this.textRef.value;if(!t||this.expanded)return;const e=t.scrollHeight-t.clientHeight>1;e!==this.overflowing&&(this.overflowing=e)}}static{this.styles=y}updated(){const t=this.textRef.value;t&&!this.resizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.measure()),this.resizeObserver.observe(t)),this.measure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}render(){return n`<div ${A(this.textRef)} class="text ${a({"is-clamped":!this.expanded})}" style="${v({"-webkit-line-clamp":this.expanded?"":String(this.lines)})}"><slot @slotchange="${this.measure}"></slot></div>${this.expanded||this.overflowing?n`<mq-text-button class="toggle" type="button" size="sm" fontWeight="normal" underlined @click="${()=>{this.expanded=!this.expanded}}">${this.expanded?this.collapseLabel:this.expandLabel}</mq-text-button>`:s}`}};t([r({type:Number})],w.prototype,"lines",void 0),t([r({type:String,attribute:"expand-label"})],w.prototype,"expandLabel",void 0),t([r({type:String,attribute:"collapse-label"})],w.prototype,"collapseLabel",void 0),t([l()],w.prototype,"expanded",void 0),t([l()],w.prototype,"overflowing",void 0),w=t([e("mq-clamped-text")],w);export{w as M,f};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{E as s,i,a as o,x as n}from"./lit-element-DiWJYFwC.js";import{n as r}from"./property-scuRaFcM.js";import{r as l}from"./state-LQivXIgA.js";import{e as a}from"./class-map-Co76I6aw.js";import{i as d,t as c,e as p}from"./directive-2EDmOukv.js";import{o as v}from"./style-map-CIdqdn7C.js";import"../ui/mq-text-button.js";const u=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),u(t,e);return!0},m=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},x=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),g(e)}};function $(t){void 0!==this._$AN?(m(this),this._$AM=t,x(this)):this._$AM=t}function b(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)u(i[t],!1),m(i[t]);else null!=i&&(u(i,!1),m(i));else u(this,t)}const g=t=>{t.type==c.CHILD&&(t._$AP??=b,t._$AQ??=$)};class f extends d{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),x(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(u(this,t),m(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class h{}const _=new WeakMap,A=p(class extends f{render(t){return s}update(t,[e]){const i=e!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),s}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=_.get(e);void 0===s&&(s=new WeakMap,_.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?_.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),y=i`:host{display:flex;flex-direction:column;gap:var(--sp-1)}.text{margin:0}.text.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.toggle{align-self:flex-start}`;let w=class MqClampedText extends o{constructor(){super(...arguments),this.lines=2,this.expandLabel="",this.collapseLabel="",this.expanded=!1,this.overflowing=!1,this.textRef=new h,this.measure=()=>{const t=this.textRef.value;if(!t||this.expanded)return;const e=t.scrollHeight-t.clientHeight>1;e!==this.overflowing&&(this.overflowing=e)}}static{this.styles=y}updated(){const t=this.textRef.value;t&&!this.resizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.measure()),this.resizeObserver.observe(t)),this.measure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}render(){return n`<div ${A(this.textRef)} class="text ${a({"is-clamped":!this.expanded})}" style="${v({"-webkit-line-clamp":this.expanded?"":String(this.lines)})}"><slot @slotchange="${this.measure}"></slot></div>${this.expanded||this.overflowing?n`<mq-text-button class="toggle" type="button" size="sm" fontWeight="normal" underlined @click="${()=>{this.expanded=!this.expanded}}">${this.expanded?this.collapseLabel:this.expandLabel}</mq-text-button>`:s}`}};t([r({type:Number})],w.prototype,"lines",void 0),t([r({type:String,attribute:"expand-label"})],w.prototype,"expandLabel",void 0),t([r({type:String,attribute:"collapse-label"})],w.prototype,"collapseLabel",void 0),t([l()],w.prototype,"expanded",void 0),t([l()],w.prototype,"overflowing",void 0),w=t([e("mq-clamped-text")],w);export{w as M,f};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{x as a,i,a as r}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{e as o}from"./class-map-Co76I6aw.js";import{t as n,c as l,p as d,s as c}from"./parseISO-Dj3qSTG8.js";import{f as h}from"./format-CRFiCNHw.js";import"../ui/mq-skeleton.js";import{m}from"./runtime-Bg1WXVCx.js";import{l as v}from"./localized-decorator-BlOuLhym.js";import{i as p}from"./isSameDay-CuhZMy1T.js";function u(t,e,a){const i=n(t,a?.in);return isNaN(e)?l(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function g(t,e){const a=d(t);if(e)try{const t=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(a),i=e=>t.find(t=>t.type===e)?.value??"";return{dateKey:`${i("year")}-${i("month")}-${i("day")}`,label:`${i("hour")}:${i("minute")}`}}catch{}return{dateKey:h(c(a),"yyyy-MM-dd"),label:h(a,"HH:mm")}}const y=i`:host{display:block;font-family:var(--font-body)}.time-slot-picker{display:flex;flex-direction:column;gap:var(--sp-4);border-radius:var(--border-radius-lg);transition:opacity .2s}.time-slot-picker.is-loading{opacity:.6}.picker-content{display:flex;flex-direction:column;gap:var(--sp-4)}.columns-wrapper{position:relative;display:flex;flex-direction:column;gap:var(--sp-4);flex:1;min-width:0}.grid-container{display:grid;grid-template-columns:repeat(var(--visible-days,4),1fr);gap:var(--sp-2);position:relative}.dates-header{position:sticky;top:0;display:contents;z-index:10;padding-bottom:var(--sp-2)}.nav-button{position:absolute;top:var(--sp-9);transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:var(--size-6);height:var(--size-6);border:none;cursor:pointer;transition:background-color .2s;background:var(--color-primary);color:var(--color-white);border-radius:var(--border-radius-full);padding:0;z-index:20}.nav-button-prev{left:0;transform:translate(-50%,-50%)}.nav-button-next{right:0;transform:translate(50%,-50%)}.nav-button:hover:not(:disabled){background:var(--color-primary-dark)}.nav-button:disabled{background:var(--color-neutrals-background-disabled);color:var(--color-neutrals-text-medium);cursor:not-allowed}.date-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--sp-2) var(--sp-3);border:1px solid var(--color-neutrals-border-disabled);background:var(--color-white);border-radius:var(--border-radius-lg);transition:all .2s;min-width:var(--sp-16);height:var(--sp-18);flex:1}.date-weekday{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.date-day{font-size:var(--text-xl);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.date-month{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.time-slots-container{display:contents}.time-slots-column{display:flex;flex-direction:column;gap:var(--sp-2)}.time-slot{padding:var(--sp-2) var(--sp-1);border:1px solid var(--color-border);background:var(--color-muted);border-radius:var(--border-radius-md);cursor:pointer;transition:all .2s;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-align:center;min-width:var(--sp-16);height:var(--sp-11)}.time-slot:hover{background:var(--color-primary-light)}.time-slot.selected{border-color:var(--color-primary);background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.empty-state{display:flex;align-items:center;justify-content:center;padding:var(--sp-12) var(--sp-6);text-align:center;grid-column:1/-1;font-size:var(--text-sm);color:var(--color-neutrals-text-weak)}`;class WindowChangeEvent extends Event{static{this.eventName="window-change"}constructor(t){super(WindowChangeEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class SlotSelectEvent extends Event{static{this.eventName="slot-select"}constructor(t){super(SlotSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let f=class MqTimeSlotPicker extends r{constructor(){super(...arguments),this.locale="es-ES",this.slots=[],this.visibleDays=4,this.isLoading=!1,this.handlePrevious=()=>{if(!this.canGoPrevious)return;const t=u(this.getStartDate(),-this.visibleDays),e=c(new Date),a=t<e?e:t,i=this.formatDate(a);this.dispatchEvent(new WindowChangeEvent({windowStartDate:i}))},this.handleNext=()=>{const t=u(this.getStartDate(),this.visibleDays),e=this.formatDate(t);this.dispatchEvent(new WindowChangeEvent({windowStartDate:e}))},this.handleTimeSlotSelect=(t,e)=>{const a=this.formatDate(t.date);this.selectedDate=a,this.selectedSlotKey=e.key,this.dispatchEvent(new SlotSelectEvent({slot:{key:e.key,date:e.date}}))}}static{this.styles=[y]}getStartDate(){return this.windowStartDate?c(d(this.windowStartDate)):c(new Date)}get slotsByDate(){const t=new Map;for(const e of this.slots){const{dateKey:a,label:i}=g(e.date,this.timezone);t.has(a)||t.set(a,[]),t.get(a)?.push({key:e.key,label:i,date:e.date})}for(const e of t.values())e.sort((t,e)=>{const a=d(t.date),i=d(e.date);return a.getTime()-i.getTime()});return t}get visibleDaysList(){const t=this.getStartDate(),e=[],a=this.slotsByDate;for(let i=0;i<this.visibleDays;i++){const r=u(t,i),s=this.formatDate(r),o=a.get(s)||[];e.push({date:r,slots:o})}return e}get canGoPrevious(){return this.getStartDate()>c(new Date)}formatDate(t){return h(t,"yyyy-MM-dd")}formatDayHeader(t){return{weekday:new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(t),day:new Intl.DateTimeFormat(this.locale,{day:"numeric"}).format(t),month:new Intl.DateTimeFormat(this.locale,{month:"short"}).format(t)}}isDateSelected(t){if(!this.selectedDate)return!1;const e=d(this.selectedDate);return p(t,e)}isTimeSlotSelected(t,e){return this.isDateSelected(t.date)&&this.selectedSlotKey===e.key}get hasSlots(){return this.slots.length>0}renderSkeletonSlots(){return a`${Array.from({length:this.visibleDays}).map((t,e)=>{const i=[2,3,4,3],r=i[e%i.length]??3;return a`<div class="time-slots-column">${Array.from({length:r}).map(()=>a`<mq-skeleton width="100%" height="40px" border-radius="md"></mq-skeleton>`)}</div>`})}`}renderEmptyState(){return a`<div class="empty-state">${m("No hay horarios disponibles")}</div>`}render(){const t=this.canGoPrevious,e=!this.isLoading&&!this.hasSlots;return a`<div class="${o({"time-slot-picker":!0,"is-loading":this.isLoading})}" style="--visible-days:${this.visibleDays}"><div class="picker-content"><div class="columns-wrapper">${t?a`<button class="nav-button nav-button-prev" @click="${this.handlePrevious}" ?disabled="${this.isLoading}" aria-label="${m("Fechas anteriores")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_1791)"><path d="M8.05454 11.9155L2.72136 6.29527C2.69487 6.26742 2.67385 6.23433 2.65951 6.19791C2.64517 6.16149 2.63779 6.12245 2.63779 6.08302C2.63779 6.04359 2.64517 6.00454 2.65951 5.96812C2.67385 5.9317 2.69487 5.89862 2.72136 5.87077L8.2124 0.0844726L8.61523 0.508968L3.32539 6.08302L8.45738 11.491L8.05454 11.9155Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_1791"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(11.2402 0.0844727) rotate(90)"/></clipPath></defs></svg>`}</button>`:null} ${a`<button class="nav-button nav-button-next" @click="${this.handleNext}" ?disabled="${this.isLoading}" aria-label="${m("Fechas siguientes")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_474)"><path d="M3.94546 0.0845423L9.27864 5.70473C9.30513 5.73258 9.32615 5.76566 9.34049 5.80209C9.35483 5.83851 9.36221 5.87755 9.36221 5.91698C9.36221 5.95641 9.35483 5.99546 9.34049 6.03188C9.32615 6.0683 9.30513 6.10138 9.27864 6.12923L3.7876 11.9155L3.38477 11.491L8.67461 5.91698L3.54262 0.509039L3.94546 0.0845423Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_474"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(0.759766 11.9155) rotate(-90)"/></clipPath></defs></svg>`}</button>`}<div class="grid-container"><div class="dates-header">${this.visibleDaysList.map(t=>{const{weekday:e,day:i,month:r}=this.formatDayHeader(t.date);return a`<div class="date-card"><div class="date-weekday">${e}</div><div class="date-day">${i}</div><div class="date-month">${r}</div></div>`})}</div><div class="time-slots-container">${e?this.renderEmptyState():this.isLoading?this.renderSkeletonSlots():this.visibleDaysList.map(t=>{const e=this.isDateSelected(t.date);return a`<div class="${o({"time-slots-column":!0,active:e})}">${t.slots.map(e=>{const i=this.isTimeSlotSelected(t,e);return a`<button class="${o({"time-slot":!0,selected:i})}" @click="${()=>this.handleTimeSlotSelect(t,e)}">${e.label}</button>`})}</div>`})}</div></div></div></div></div>`}};t([s({type:String})],f.prototype,"locale",void 0),t([s({type:String})],f.prototype,"timezone",void 0),t([s({type:Array})],f.prototype,"slots",void 0),t([s({type:String,attribute:"selected-date"})],f.prototype,"selectedDate",void 0),t([s({type:String,attribute:"selected-slot-key"})],f.prototype,"selectedSlotKey",void 0),t([s({type:String,attribute:"window-start-date"})],f.prototype,"windowStartDate",void 0),t([s({type:Number,attribute:"visible-days"})],f.prototype,"visibleDays",void 0),t([s({type:Boolean,attribute:"is-loading"})],f.prototype,"isLoading",void 0),f=t([v(),e("mq-time-slot-picker")],f);export{f as M,SlotSelectEvent as S,WindowChangeEvent as W,u as a};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{x as a,i,a as r}from"./lit-element-DiWJYFwC.js";import{n as s}from"./property-scuRaFcM.js";import{e as o}from"./class-map-Co76I6aw.js";import{t as n,c as l,p as d,s as c}from"./parseISO-Dj3qSTG8.js";import{f as h}from"./format-CRFiCNHw.js";import"../ui/mq-skeleton.js";import{m}from"./runtime-Bg1WXVCx.js";import{l as v}from"./localized-decorator-BlOuLhym.js";import{i as p}from"./isSameDay-CuhZMy1T.js";function u(t,e,a){const i=n(t,a?.in);return isNaN(e)?l(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function g(t,e){const a=d(t);if(e)try{const t=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(a),i=e=>t.find(t=>t.type===e)?.value??"";return{dateKey:`${i("year")}-${i("month")}-${i("day")}`,label:`${i("hour")}:${i("minute")}`}}catch{}return{dateKey:h(c(a),"yyyy-MM-dd"),label:h(a,"HH:mm")}}const y=i`:host{display:block;font-family:var(--font-body)}.time-slot-picker{display:flex;flex-direction:column;gap:var(--sp-4);border-radius:var(--border-radius-lg);transition:opacity .2s}.time-slot-picker.is-loading{opacity:.6}.picker-content{display:flex;flex-direction:column;gap:var(--sp-4)}.columns-wrapper{position:relative;display:flex;flex-direction:column;gap:var(--sp-4);flex:1;min-width:0}.grid-container{display:grid;grid-template-columns:repeat(var(--visible-days,4),1fr);gap:var(--sp-2);position:relative}.dates-header{position:sticky;top:0;display:contents;z-index:10;padding-bottom:var(--sp-2)}.nav-button{position:absolute;top:var(--sp-9);transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:var(--size-6);height:var(--size-6);border:none;cursor:pointer;transition:background-color .2s;background:var(--color-primary);color:var(--color-white);border-radius:var(--border-radius-full);padding:0;z-index:20}.nav-button-prev{left:0;transform:translate(-50%,-50%)}.nav-button-next{right:0;transform:translate(50%,-50%)}.nav-button:hover:not(:disabled){background:var(--color-primary-dark)}.nav-button:disabled{background:var(--color-neutrals-background-disabled);color:var(--color-neutrals-text-medium);cursor:not-allowed}.date-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--sp-2) var(--sp-3);border:1px solid var(--color-neutrals-border-disabled);background:var(--color-white);border-radius:var(--border-radius-lg);transition:all .2s;min-width:var(--sp-16);height:var(--sp-18);flex:1}.date-weekday{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.date-day{font-size:var(--text-xl);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}.date-month{font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);text-transform:capitalize}.time-slots-container{display:contents}.time-slots-column{display:flex;flex-direction:column;gap:var(--sp-2)}.time-slot{padding:var(--sp-2) var(--sp-1);border:1px solid var(--color-border);background:var(--color-muted);border-radius:var(--border-radius-md);cursor:pointer;transition:all .2s;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);color:var(--color-neutrals-text-default);text-align:center;min-width:var(--sp-16);height:var(--sp-11)}.time-slot:hover{background:var(--color-primary-light)}.time-slot.selected{border-color:var(--color-primary);background:var(--color-primary);color:var(--color-white);font-weight:var(--font-weight-bold)}.empty-state{display:flex;align-items:center;justify-content:center;padding:var(--sp-12) var(--sp-6);text-align:center;grid-column:1/-1;font-size:var(--text-sm);color:var(--color-neutrals-text-weak)}`;class WindowChangeEvent extends Event{static{this.eventName="window-change"}constructor(t){super(WindowChangeEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class SlotSelectEvent extends Event{static{this.eventName="slot-select"}constructor(t){super(SlotSelectEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let f=class MqTimeSlotPicker extends r{constructor(){super(...arguments),this.locale="es-ES",this.slots=[],this.visibleDays=4,this.isLoading=!1,this.handlePrevious=()=>{if(!this.canGoPrevious)return;const t=u(this.getStartDate(),-this.visibleDays),e=c(new Date),a=t<e?e:t,i=this.formatDate(a);this.dispatchEvent(new WindowChangeEvent({windowStartDate:i}))},this.handleNext=()=>{const t=u(this.getStartDate(),this.visibleDays),e=this.formatDate(t);this.dispatchEvent(new WindowChangeEvent({windowStartDate:e}))},this.handleTimeSlotSelect=(t,e)=>{const a=this.formatDate(t.date);this.selectedDate=a,this.selectedSlotKey=e.key,this.dispatchEvent(new SlotSelectEvent({slot:{key:e.key,date:e.date}}))}}static{this.styles=[y]}getStartDate(){return this.windowStartDate?c(d(this.windowStartDate)):c(new Date)}get slotsByDate(){const t=new Map;for(const e of this.slots){const{dateKey:a,label:i}=g(e.date,this.timezone);t.has(a)||t.set(a,[]),t.get(a)?.push({key:e.key,label:i,date:e.date})}for(const e of t.values())e.sort((t,e)=>{const a=d(t.date),i=d(e.date);return a.getTime()-i.getTime()});return t}get visibleDaysList(){const t=this.getStartDate(),e=[],a=this.slotsByDate;for(let i=0;i<this.visibleDays;i++){const r=u(t,i),s=this.formatDate(r),o=a.get(s)||[];e.push({date:r,slots:o})}return e}get canGoPrevious(){return this.getStartDate()>c(new Date)}formatDate(t){return h(t,"yyyy-MM-dd")}formatDayHeader(t){return{weekday:new Intl.DateTimeFormat(this.locale,{weekday:"short"}).format(t),day:new Intl.DateTimeFormat(this.locale,{day:"numeric"}).format(t),month:new Intl.DateTimeFormat(this.locale,{month:"short"}).format(t)}}isDateSelected(t){if(!this.selectedDate)return!1;const e=d(this.selectedDate);return p(t,e)}isTimeSlotSelected(t,e){return this.isDateSelected(t.date)&&this.selectedSlotKey===e.key}get hasSlots(){return this.slots.length>0}renderSkeletonSlots(){return a`${Array.from({length:this.visibleDays}).map((t,e)=>{const i=[2,3,4,3],r=i[e%i.length]??3;return a`<div class="time-slots-column">${Array.from({length:r}).map(()=>a`<mq-skeleton width="100%" height="40px" border-radius="md"></mq-skeleton>`)}</div>`})}`}renderEmptyState(){return a`<div class="empty-state">${m("No hay horarios disponibles")}</div>`}render(){const t=this.canGoPrevious,e=!this.isLoading&&!this.hasSlots;return a`<div class="${o({"time-slot-picker":!0,"is-loading":this.isLoading})}" style="--visible-days:${this.visibleDays}"><div class="picker-content"><div class="columns-wrapper">${t?a`<button class="nav-button nav-button-prev" @click="${this.handlePrevious}" ?disabled="${this.isLoading}" aria-label="${m("Fechas anteriores")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_1791)"><path d="M8.05454 11.9155L2.72136 6.29527C2.69487 6.26742 2.67385 6.23433 2.65951 6.19791C2.64517 6.16149 2.63779 6.12245 2.63779 6.08302C2.63779 6.04359 2.64517 6.00454 2.65951 5.96812C2.67385 5.9317 2.69487 5.89862 2.72136 5.87077L8.2124 0.0844726L8.61523 0.508968L3.32539 6.08302L8.45738 11.491L8.05454 11.9155Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_1791"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(11.2402 0.0844727) rotate(90)"/></clipPath></defs></svg>`}</button>`:null} ${a`<button class="nav-button nav-button-next" @click="${this.handleNext}" ?disabled="${this.isLoading}" aria-label="${m("Fechas siguientes")}">${a`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1510_474)"><path d="M3.94546 0.0845423L9.27864 5.70473C9.30513 5.73258 9.32615 5.76566 9.34049 5.80209C9.35483 5.83851 9.36221 5.87755 9.36221 5.91698C9.36221 5.95641 9.35483 5.99546 9.34049 6.03188C9.32615 6.0683 9.30513 6.10138 9.27864 6.12923L3.7876 11.9155L3.38477 11.491L8.67461 5.91698L3.54262 0.509039L3.94546 0.0845423Z" fill="currentColor"/></g><defs><clipPath id="clip0_1510_474"><rect width="11.831" height="11.2273" fill="currentColor" transform="translate(0.759766 11.9155) rotate(-90)"/></clipPath></defs></svg>`}</button>`}<div class="grid-container"><div class="dates-header">${this.visibleDaysList.map(t=>{const{weekday:e,day:i,month:r}=this.formatDayHeader(t.date);return a`<div class="date-card"><div class="date-weekday">${e}</div><div class="date-day">${i}</div><div class="date-month">${r}</div></div>`})}</div><div class="time-slots-container">${e?this.renderEmptyState():this.isLoading?this.renderSkeletonSlots():this.visibleDaysList.map(t=>{const e=this.isDateSelected(t.date);return a`<div class="${o({"time-slots-column":!0,active:e})}">${t.slots.map(e=>{const i=this.isTimeSlotSelected(t,e);return a`<button class="${o({"time-slot":!0,selected:i})}" @click="${()=>this.handleTimeSlotSelect(t,e)}">${e.label}</button>`})}</div>`})}</div></div></div></div></div>`}};t([s({type:String})],f.prototype,"locale",void 0),t([s({type:String})],f.prototype,"timezone",void 0),t([s({type:Array})],f.prototype,"slots",void 0),t([s({type:String,attribute:"selected-date"})],f.prototype,"selectedDate",void 0),t([s({type:String,attribute:"selected-slot-key"})],f.prototype,"selectedSlotKey",void 0),t([s({type:String,attribute:"window-start-date"})],f.prototype,"windowStartDate",void 0),t([s({type:Number,attribute:"visible-days"})],f.prototype,"visibleDays",void 0),t([s({type:Boolean,attribute:"is-loading"})],f.prototype,"isLoading",void 0),f=t([v(),e("mq-time-slot-picker")],f);export{f as M,SlotSelectEvent as S,WindowChangeEvent as W,u as a};
@@ -1 +1 @@
1
- import{_ as t,t as o}from"./custom-element-DA9Fxvxd.js";import{m as C}from"./runtime-Bg1WXVCx.js";import{l as a}from"./localized-decorator-BlOuLhym.js";import{a as r,i as e,x as i}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";let d=class MQLayout extends r{constructor(){super(...arguments),this.background="default",this.variant="default",this.showMediquoBranding=!0}static{this.styles=e`:host{--content-max-width:560px;display:flex;flex-direction:column;height:100%;width:100%;max-width:var(--content-max-width);margin:0 auto;background-color:var(--color-background)}:host([background=solid]){background-color:var(--color-background)}:host([background=transparent]){background-color:transparent}:host([variant=wide]){--content-max-width:1000px}.content{flex:1;padding:var(--mq-layout-padding,0)}footer{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);padding-top:var(--sp-10);padding-bottom:var(--sp-3);padding-inline:var(--mq-layout-padding,0);margin-bottom:var(--sp-3);text-align:center}.branding{display:flex;justify-content:center;align-items:center;gap:var(--size-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:normal;font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}`}render(){return this.showMediquoBranding?i`<div class="content"><slot></slot></div><footer><div class="branding">${C("Servicio y plataforma prestados por")} ${i`<svg width="82" height="16" viewBox="0 0 82 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M52.4506 8.97739V10.5665C52.4506 11.1054 52.0077 11.5477 51.4682 11.5477C50.9288 11.5477 50.486 11.1054 50.486 10.5665V8.97739H48.8531C48.3276 8.97739 47.8984 8.54894 47.8984 8.02383C47.8984 7.49893 48.3276 7.07053 48.8531 7.07053H50.486V5.48128C50.486 4.94243 50.9288 4.5002 51.4682 4.5002C52.0077 4.5002 52.4506 4.94243 52.4506 5.48128V7.07053H54.0836C54.609 7.07053 55.0379 7.49893 55.0379 8.02383C55.0379 8.54894 54.609 8.97739 54.0836 8.97739H52.4506ZM56.8563 5.46693C56.055 3.75203 54.5229 2.55033 52.6531 2.16979C52.3272 2.10809 51.9339 2.06818 51.5273 2.05679C48.7327 2.10005 46.4191 3.93204 45.7665 6.6209C45.397 8.13705 45.6843 9.78156 46.555 11.134C47.4258 12.4867 48.8053 13.431 50.3396 13.7243C51.7168 13.9883 53.0199 13.8046 54.2312 13.1767L54.2853 13.1506C54.554 13.0306 54.8304 12.9977 55.1481 13.0559L55.2243 13.0728C55.8277 13.2312 56.4308 13.389 57.0345 13.5467C56.8787 12.9784 56.7231 12.4168 56.5656 11.86L56.5512 11.8035C56.4673 11.4258 56.5163 11.0837 56.7011 10.7579C57.5947 9.11014 57.6548 7.17549 56.8563 5.46693ZM59.2901 15.5846C59.0891 15.8486 58.7811 16 58.4446 16C58.2872 16 58.1621 15.967 58.0617 15.9405L57.0944 15.6878C56.3739 15.4997 55.6553 15.312 54.936 15.1233C53.8594 15.6379 52.7204 15.8988 51.5464 15.8988C51.0243 15.8988 50.4877 15.8466 49.9521 15.7439C47.8668 15.3452 45.9973 14.0703 44.823 12.2461C43.6488 10.4223 43.2634 8.19505 43.7656 6.13553C44.6446 2.51324 47.7615 0.0472629 51.5211 0.000260881L51.5409 0L51.5605 0.000391321C52.0913 0.0140876 52.5926 0.0651767 53.0508 0.152094C55.5798 0.666768 57.6424 2.28597 58.7224 4.59729C59.7655 6.82947 59.7232 9.34593 58.6144 11.5401C58.8921 12.5275 59.1643 13.5268 59.4414 14.5471C59.4869 14.7106 59.6124 15.1611 59.2901 15.5846ZM79.7577 8.77869C79.7577 7.05748 78.5162 5.63246 76.7557 5.63246C74.9582 5.63246 73.8092 7.03887 73.8092 8.7416V8.77869C73.8092 10.4814 75.0508 11.9064 76.7927 11.9064C78.6089 11.9064 79.7577 10.4999 79.7577 8.81573V8.77869ZM76.7557 13.868C73.7722 13.868 71.5669 11.5915 71.5669 8.81573V8.77869C71.5669 5.98404 73.7907 3.67068 76.7927 3.67068C79.7949 3.67068 82 5.94717 82 8.7416V8.77869C82 11.5545 79.7764 13.868 76.7557 13.868ZM68.7934 13.7387C68.1816 13.7387 67.6628 13.2571 67.6628 12.6281V12.1285C67.0328 13.0538 66.1247 13.8495 64.6051 13.8495C62.4 13.8495 61.1213 12.3691 61.1213 10.0925V4.89208C61.1213 4.2631 61.6216 3.76329 62.2331 3.76329C62.8633 3.76329 63.3637 4.2631 63.3637 4.89208V9.42637C63.3637 10.944 64.1233 11.7951 65.4575 11.7951C66.7547 11.7951 67.6628 10.9071 67.6628 9.38919V4.89208C67.6628 4.2631 68.1631 3.76329 68.7934 3.76329C69.4048 3.76329 69.9236 4.2631 69.9236 4.89208V12.6281C69.9236 13.2386 69.4233 13.7387 68.7934 13.7387ZM40.4153 3.76329C41.0454 3.76329 41.5457 4.2631 41.5457 4.89208V12.6281C41.5457 13.2571 41.0454 13.7387 40.4153 13.7387C39.8038 13.7387 39.3034 13.2571 39.3034 12.6281V4.89208C39.3034 4.2631 39.7852 3.76329 40.4153 3.76329ZM40.4153 2.4678C39.6925 2.4678 39.1368 2.02361 39.1368 1.35732V1.2464C39.1368 0.580156 39.6925 0.154442 40.4153 0.154442C41.1379 0.154442 41.694 0.580156 41.694 1.2464V1.35732C41.694 2.02361 41.1379 2.4678 40.4153 2.4678ZM34.7693 8.7416C34.7693 6.85382 33.435 5.6139 31.9339 5.6139C30.3961 5.6139 29.1173 6.79821 29.1173 8.7416V8.77869C29.1173 10.6665 30.4145 11.9064 31.9339 11.9064C33.435 11.9064 34.7693 10.6476 34.7693 8.77869V8.7416ZM35.8627 13.7387C35.2325 13.7387 34.7321 13.2571 34.7321 12.6281V12.0172C34.0095 13.0353 32.9903 13.8495 31.3966 13.8495C29.0988 13.8495 26.8566 12.0172 26.8566 8.77869V8.7416C26.8566 5.50298 29.0616 3.67068 31.3966 3.67068C33.0088 3.67068 34.028 4.4665 34.7321 5.39189V1.15383C34.7321 0.524632 35.2325 0.0434802 35.8439 0.0434802C36.4742 0.0434802 36.9745 0.524632 36.9745 1.15383V12.6281C36.9745 13.2571 36.4742 13.7387 35.8627 13.7387ZM21.0065 5.50298C19.6353 5.50298 18.6718 6.55763 18.4678 8.07548H23.4897C23.3416 6.63203 22.4892 5.50298 21.0065 5.50298ZM24.6203 9.55589H18.4864C18.7272 11.1477 19.8578 12.0357 21.3032 12.0357C22.2482 12.0357 22.9895 11.7028 23.6196 11.1846C23.7863 11.0548 23.9346 10.981 24.194 10.981C24.6945 10.981 25.0836 11.3698 25.0836 11.8879C25.0836 12.1654 24.9539 12.406 24.787 12.5727C23.8975 13.3683 22.7858 13.868 21.2662 13.868C18.4308 13.868 16.244 11.8136 16.244 8.79712V8.76021C16.244 5.96556 18.227 3.67068 21.0253 3.67068C24.1384 3.67068 25.6765 6.22475 25.6765 8.48246C25.6765 9.1117 25.1948 9.55589 24.6203 9.55589ZM13.7686 13.7387C13.1387 13.7387 12.6382 13.2571 12.6382 12.6281V8.09396C12.6382 6.53915 11.9155 5.70655 10.6555 5.70655C9.43232 5.70655 8.56142 6.55763 8.56142 8.13083V12.6281C8.56142 13.2571 8.06108 13.7387 7.44958 13.7387C6.81941 13.7387 6.3192 13.2571 6.3192 12.6281V8.07548C6.3192 6.55763 5.57796 5.70655 4.33625 5.70655C3.09479 5.70655 2.24235 6.63203 2.24235 8.13083V12.6281C2.24235 13.2571 1.74205 13.7387 1.1118 13.7387C0.500341 13.7387 0 13.2571 0 12.6281V4.89208C0 4.2631 0.481844 3.76329 1.1118 3.76329C1.74205 3.76329 2.24235 4.2631 2.24235 4.89208V5.35475C2.87235 4.48511 3.72475 3.67068 5.22586 3.67068C6.63431 3.67068 7.63481 4.35545 8.15378 5.39189C8.93198 4.35545 9.96987 3.67068 11.4522 3.67068C13.5833 3.67068 14.8804 5.02183 14.8804 7.40919V12.6281C14.8804 13.2571 14.3988 13.7387 13.7686 13.7387Z" fill="#0A0A22"/></svg>`}</div></footer>`:i`<div class="content"><slot></slot></div>`}};t([n({type:String})],d.prototype,"background",void 0),t([n()],d.prototype,"variant",void 0),t([n({type:Boolean,attribute:"show-mediquo-branding"})],d.prototype,"showMediquoBranding",void 0),d=t([a(),o("mq-layout")],d);
1
+ import{_ as t,c as o}from"./custom-element-D2ziPxYE.js";import{m as C}from"./runtime-Bg1WXVCx.js";import{l as a}from"./localized-decorator-BlOuLhym.js";import{a as r,i as e,x as i}from"./lit-element-DiWJYFwC.js";import{n}from"./property-scuRaFcM.js";let d=class MQLayout extends r{constructor(){super(...arguments),this.background="default",this.variant="default",this.showMediquoBranding=!0}static{this.styles=e`:host{--content-max-width:560px;display:flex;flex-direction:column;height:100%;width:100%;max-width:var(--content-max-width);margin:0 auto;background-color:var(--color-background)}:host([background=solid]){background-color:var(--color-background)}:host([background=transparent]){background-color:transparent}:host([variant=wide]){--content-max-width:1000px}.content{flex:1;padding:var(--mq-layout-padding,0)}footer{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);padding-top:var(--sp-10);padding-bottom:var(--sp-3);padding-inline:var(--mq-layout-padding,0);margin-bottom:var(--sp-3);text-align:center}.branding{display:flex;justify-content:center;align-items:center;gap:var(--size-2);font-family:var(--font-body);font-size:var(--text-sm);line-height:normal;font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default)}`}render(){return this.showMediquoBranding?i`<div class="content"><slot></slot></div><footer><div class="branding">${C("Servicio y plataforma prestados por")} ${i`<svg width="82" height="16" viewBox="0 0 82 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M52.4506 8.97739V10.5665C52.4506 11.1054 52.0077 11.5477 51.4682 11.5477C50.9288 11.5477 50.486 11.1054 50.486 10.5665V8.97739H48.8531C48.3276 8.97739 47.8984 8.54894 47.8984 8.02383C47.8984 7.49893 48.3276 7.07053 48.8531 7.07053H50.486V5.48128C50.486 4.94243 50.9288 4.5002 51.4682 4.5002C52.0077 4.5002 52.4506 4.94243 52.4506 5.48128V7.07053H54.0836C54.609 7.07053 55.0379 7.49893 55.0379 8.02383C55.0379 8.54894 54.609 8.97739 54.0836 8.97739H52.4506ZM56.8563 5.46693C56.055 3.75203 54.5229 2.55033 52.6531 2.16979C52.3272 2.10809 51.9339 2.06818 51.5273 2.05679C48.7327 2.10005 46.4191 3.93204 45.7665 6.6209C45.397 8.13705 45.6843 9.78156 46.555 11.134C47.4258 12.4867 48.8053 13.431 50.3396 13.7243C51.7168 13.9883 53.0199 13.8046 54.2312 13.1767L54.2853 13.1506C54.554 13.0306 54.8304 12.9977 55.1481 13.0559L55.2243 13.0728C55.8277 13.2312 56.4308 13.389 57.0345 13.5467C56.8787 12.9784 56.7231 12.4168 56.5656 11.86L56.5512 11.8035C56.4673 11.4258 56.5163 11.0837 56.7011 10.7579C57.5947 9.11014 57.6548 7.17549 56.8563 5.46693ZM59.2901 15.5846C59.0891 15.8486 58.7811 16 58.4446 16C58.2872 16 58.1621 15.967 58.0617 15.9405L57.0944 15.6878C56.3739 15.4997 55.6553 15.312 54.936 15.1233C53.8594 15.6379 52.7204 15.8988 51.5464 15.8988C51.0243 15.8988 50.4877 15.8466 49.9521 15.7439C47.8668 15.3452 45.9973 14.0703 44.823 12.2461C43.6488 10.4223 43.2634 8.19505 43.7656 6.13553C44.6446 2.51324 47.7615 0.0472629 51.5211 0.000260881L51.5409 0L51.5605 0.000391321C52.0913 0.0140876 52.5926 0.0651767 53.0508 0.152094C55.5798 0.666768 57.6424 2.28597 58.7224 4.59729C59.7655 6.82947 59.7232 9.34593 58.6144 11.5401C58.8921 12.5275 59.1643 13.5268 59.4414 14.5471C59.4869 14.7106 59.6124 15.1611 59.2901 15.5846ZM79.7577 8.77869C79.7577 7.05748 78.5162 5.63246 76.7557 5.63246C74.9582 5.63246 73.8092 7.03887 73.8092 8.7416V8.77869C73.8092 10.4814 75.0508 11.9064 76.7927 11.9064C78.6089 11.9064 79.7577 10.4999 79.7577 8.81573V8.77869ZM76.7557 13.868C73.7722 13.868 71.5669 11.5915 71.5669 8.81573V8.77869C71.5669 5.98404 73.7907 3.67068 76.7927 3.67068C79.7949 3.67068 82 5.94717 82 8.7416V8.77869C82 11.5545 79.7764 13.868 76.7557 13.868ZM68.7934 13.7387C68.1816 13.7387 67.6628 13.2571 67.6628 12.6281V12.1285C67.0328 13.0538 66.1247 13.8495 64.6051 13.8495C62.4 13.8495 61.1213 12.3691 61.1213 10.0925V4.89208C61.1213 4.2631 61.6216 3.76329 62.2331 3.76329C62.8633 3.76329 63.3637 4.2631 63.3637 4.89208V9.42637C63.3637 10.944 64.1233 11.7951 65.4575 11.7951C66.7547 11.7951 67.6628 10.9071 67.6628 9.38919V4.89208C67.6628 4.2631 68.1631 3.76329 68.7934 3.76329C69.4048 3.76329 69.9236 4.2631 69.9236 4.89208V12.6281C69.9236 13.2386 69.4233 13.7387 68.7934 13.7387ZM40.4153 3.76329C41.0454 3.76329 41.5457 4.2631 41.5457 4.89208V12.6281C41.5457 13.2571 41.0454 13.7387 40.4153 13.7387C39.8038 13.7387 39.3034 13.2571 39.3034 12.6281V4.89208C39.3034 4.2631 39.7852 3.76329 40.4153 3.76329ZM40.4153 2.4678C39.6925 2.4678 39.1368 2.02361 39.1368 1.35732V1.2464C39.1368 0.580156 39.6925 0.154442 40.4153 0.154442C41.1379 0.154442 41.694 0.580156 41.694 1.2464V1.35732C41.694 2.02361 41.1379 2.4678 40.4153 2.4678ZM34.7693 8.7416C34.7693 6.85382 33.435 5.6139 31.9339 5.6139C30.3961 5.6139 29.1173 6.79821 29.1173 8.7416V8.77869C29.1173 10.6665 30.4145 11.9064 31.9339 11.9064C33.435 11.9064 34.7693 10.6476 34.7693 8.77869V8.7416ZM35.8627 13.7387C35.2325 13.7387 34.7321 13.2571 34.7321 12.6281V12.0172C34.0095 13.0353 32.9903 13.8495 31.3966 13.8495C29.0988 13.8495 26.8566 12.0172 26.8566 8.77869V8.7416C26.8566 5.50298 29.0616 3.67068 31.3966 3.67068C33.0088 3.67068 34.028 4.4665 34.7321 5.39189V1.15383C34.7321 0.524632 35.2325 0.0434802 35.8439 0.0434802C36.4742 0.0434802 36.9745 0.524632 36.9745 1.15383V12.6281C36.9745 13.2571 36.4742 13.7387 35.8627 13.7387ZM21.0065 5.50298C19.6353 5.50298 18.6718 6.55763 18.4678 8.07548H23.4897C23.3416 6.63203 22.4892 5.50298 21.0065 5.50298ZM24.6203 9.55589H18.4864C18.7272 11.1477 19.8578 12.0357 21.3032 12.0357C22.2482 12.0357 22.9895 11.7028 23.6196 11.1846C23.7863 11.0548 23.9346 10.981 24.194 10.981C24.6945 10.981 25.0836 11.3698 25.0836 11.8879C25.0836 12.1654 24.9539 12.406 24.787 12.5727C23.8975 13.3683 22.7858 13.868 21.2662 13.868C18.4308 13.868 16.244 11.8136 16.244 8.79712V8.76021C16.244 5.96556 18.227 3.67068 21.0253 3.67068C24.1384 3.67068 25.6765 6.22475 25.6765 8.48246C25.6765 9.1117 25.1948 9.55589 24.6203 9.55589ZM13.7686 13.7387C13.1387 13.7387 12.6382 13.2571 12.6382 12.6281V8.09396C12.6382 6.53915 11.9155 5.70655 10.6555 5.70655C9.43232 5.70655 8.56142 6.55763 8.56142 8.13083V12.6281C8.56142 13.2571 8.06108 13.7387 7.44958 13.7387C6.81941 13.7387 6.3192 13.2571 6.3192 12.6281V8.07548C6.3192 6.55763 5.57796 5.70655 4.33625 5.70655C3.09479 5.70655 2.24235 6.63203 2.24235 8.13083V12.6281C2.24235 13.2571 1.74205 13.7387 1.1118 13.7387C0.500341 13.7387 0 13.2571 0 12.6281V4.89208C0 4.2631 0.481844 3.76329 1.1118 3.76329C1.74205 3.76329 2.24235 4.2631 2.24235 4.89208V5.35475C2.87235 4.48511 3.72475 3.67068 5.22586 3.67068C6.63431 3.67068 7.63481 4.35545 8.15378 5.39189C8.93198 4.35545 9.96987 3.67068 11.4522 3.67068C13.5833 3.67068 14.8804 5.02183 14.8804 7.40919V12.6281C14.8804 13.2571 14.3988 13.7387 13.7686 13.7387Z" fill="#0A0A22"/></svg>`}</div></footer>`:i`<div class="content"><slot></slot></div>`}};t([n({type:String})],d.prototype,"background",void 0),t([n()],d.prototype,"variant",void 0),t([n({type:Boolean,attribute:"show-mediquo-branding"})],d.prototype,"showMediquoBranding",void 0),d=t([a(),o("mq-layout")],d);
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{b as n}from"./api-chat-client-1Vz6ZOwp.js";import{a as r}from"./telemetry-client-BLJVs9me.js";import{i as a,a as s,E as l,x as m}from"./lit-element-DiWJYFwC.js";import{n as p}from"./property-scuRaFcM.js";import{e as c}from"./class-map-Co76I6aw.js";import{getLocale as h}from"../i18n.js";import{briefcaseIcon as d}from"../ui/icons/briefcase-icon.js";import{calendarIcon as u}from"../ui/icons/calendar-icon.js";import{clockIcon as f}from"../ui/icons/clock-icon.js";import{messageBubbleIcon as v}from"../ui/icons/message-bubble-icon.js";import{phoneIcon as w}from"../ui/icons/phone-icon.js";const y=a`.appointment-details{display:flex;flex-direction:column;gap:var(--sp-3)}.detail-row{display:inline-flex;width:fit-content;align-items:center;gap:var(--sp-2);color:var(--color-neutrals-text-default);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.detail-row svg{flex-shrink:0}.detail-row span::first-letter{text-transform:uppercase}.detail-row.full-width{width:100%}:host([strike-through]) .detail-row span{text-decoration:line-through}@media (min-width:768px){.appointment-details.wide{flex-direction:row;flex-wrap:wrap}}`;let g=class AppointmentDetails extends s{constructor(){super(...arguments),this.channel=void 0,this.variant="default",this.strikeThrough=!1,this.timezone=void 0,this._appointmentChannelToLabel=t=>{switch(t){case"videocall":return i("Videoconsulta");case"chat":return i("Chat");case"phonecall":return i("Consulta telefónica");default:return""}},this._appointmentChannelToIcon=t=>{switch(t){case"videocall":return d({size:24});case"chat":return v({size:24});case"phonecall":return w({size:24});default:return l}}}static{this.styles=y}render(){const t=h().replace("_","-"),e=new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",...this.timezone?{timeZone:this.timezone}:{}}),i=new Intl.DateTimeFormat(t,{timeStyle:"short",...this.timezone?{timeZone:this.timezone}:{}}),o=new Date(this.startsAt),a=r(o,this.duration),s=e.format(o),p=i.format(o),d=i.format(a),v=this.timezone?n(this.timezone,o):"";return m`<div class="${c({"appointment-details":!0,wide:"wide"===this.variant})}"><div class="detail-row">${u({size:24})} <span>${s}</span></div><div class="detail-row">${f({size:24})} <span>${p} - ${d}${v?` (${v})`:""}</span></div>${this.channel?m`<div class="detail-row full-width">${this._appointmentChannelToIcon(this.channel)} <span>${this._appointmentChannelToLabel(this.channel)}</span></div>`:l}</div>`}};function x(t){return t/100}function z(t,e){const i=e.replaceAll("_","-");return new Intl.NumberFormat(i,{style:"currency",currency:t.currency}).format(x(t.amount))}function j(t){return null!=t&&t.amount>0}t([p({type:String})],g.prototype,"startsAt",void 0),t([p({type:Number})],g.prototype,"duration",void 0),t([p({type:String})],g.prototype,"channel",void 0),t([p({type:String})],g.prototype,"variant",void 0),t([p({type:Boolean,attribute:"strike-through"})],g.prototype,"strikeThrough",void 0),t([p({type:String})],g.prototype,"timezone",void 0),g=t([o(),e("appointment-details")],g);export{g as A,x as c,z as f,j as h};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{b as n}from"./api-chat-client-1Vz6ZOwp.js";import{a as r}from"./telemetry-client-BLJVs9me.js";import{i as a,a as s,E as l,x as m}from"./lit-element-DiWJYFwC.js";import{n as p}from"./property-scuRaFcM.js";import{e as c}from"./class-map-Co76I6aw.js";import{getLocale as h}from"../i18n.js";import{briefcaseIcon as d}from"../ui/icons/briefcase-icon.js";import{calendarIcon as u}from"../ui/icons/calendar-icon.js";import{clockIcon as f}from"../ui/icons/clock-icon.js";import{messageBubbleIcon as v}from"../ui/icons/message-bubble-icon.js";import{phoneIcon as w}from"../ui/icons/phone-icon.js";const y=a`.appointment-details{display:flex;flex-direction:column;gap:var(--sp-3)}.detail-row{display:inline-flex;width:fit-content;align-items:center;gap:var(--sp-2);color:var(--color-neutrals-text-default);font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.detail-row svg{flex-shrink:0}.detail-row span::first-letter{text-transform:uppercase}.detail-row.full-width{width:100%}:host([strike-through]) .detail-row span{text-decoration:line-through}@media (min-width:768px){.appointment-details.wide{flex-direction:row;flex-wrap:wrap}}`;let g=class AppointmentDetails extends s{constructor(){super(...arguments),this.channel=void 0,this.variant="default",this.strikeThrough=!1,this.timezone=void 0,this._appointmentChannelToLabel=t=>{switch(t){case"videocall":return i("Videoconsulta");case"chat":return i("Chat");case"phonecall":return i("Consulta telefónica");default:return""}},this._appointmentChannelToIcon=t=>{switch(t){case"videocall":return d({size:24});case"chat":return v({size:24});case"phonecall":return w({size:24});default:return l}}}static{this.styles=y}render(){const t=h().replace("_","-"),e=new Intl.DateTimeFormat(t,{weekday:"long",year:"numeric",month:"long",day:"numeric",...this.timezone?{timeZone:this.timezone}:{}}),i=new Intl.DateTimeFormat(t,{timeStyle:"short",...this.timezone?{timeZone:this.timezone}:{}}),o=new Date(this.startsAt),a=r(o,this.duration),s=e.format(o),p=i.format(o),d=i.format(a),v=this.timezone?n(this.timezone,o):"";return m`<div class="${c({"appointment-details":!0,wide:"wide"===this.variant})}"><div class="detail-row">${u({size:24})} <span>${s}</span></div><div class="detail-row">${f({size:24})} <span>${p} - ${d}${v?` (${v})`:""}</span></div>${this.channel?m`<div class="detail-row full-width">${this._appointmentChannelToIcon(this.channel)} <span>${this._appointmentChannelToLabel(this.channel)}</span></div>`:l}</div>`}};function x(t){return t/100}function z(t,e){const i=e.replaceAll("_","-");return new Intl.NumberFormat(i,{style:"currency",currency:t.currency}).format(x(t.amount))}function j(t){return null!=t&&t.amount>0}t([p({type:String})],g.prototype,"startsAt",void 0),t([p({type:Number})],g.prototype,"duration",void 0),t([p({type:String})],g.prototype,"channel",void 0),t([p({type:String})],g.prototype,"variant",void 0),t([p({type:Boolean,attribute:"strike-through"})],g.prototype,"strikeThrough",void 0),t([p({type:String})],g.prototype,"timezone",void 0),g=t([o(),e("appointment-details")],g);export{g as A,x as c,z as f,j as h};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./custom-element-DA9Fxvxd.js";import{m as a,s as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{i as s,a as r,x as n,E as l}from"./lit-element-DiWJYFwC.js";import{n as d}from"./property-scuRaFcM.js";import{r as p}from"./state-LQivXIgA.js";import{getLocale as m}from"../i18n.js";import{chevronDownIcon as f}from"../ui/icons/chevron-down-icon.js";import"../ui/mq-text-button.js";import"../ui/mq-avatar.js";const g=s`.header{display:flex;align-items:center;gap:var(--sp-4);margin-bottom:0}.header.expanded{margin-bottom:var(--sp-4)}@media (max-width:768px){.header{--avatar-size-lg:var(--avatar-size-md)}}.professional-info{flex:1}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutral-link-dark);margin:0}.professional-specialty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutral-text-default);margin:0}.collegiate-number{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);color:var(--color-neutrals-text-medium);margin:0;text-transform:uppercase}.languages{display:flex;flex-wrap:wrap;gap:var(--sp-3)}.language-pill{display:inline-block;background-color:#e5e5e5;color:var(--colors-neutral-text-default);font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);padding:var(--sp-1) var(--sp-2);border-radius:26px;text-transform:uppercase}.description{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal);margin-bottom:0;color:var(--color-neutrals-text-medium)}.icon{transition:transform .1s ease-in-out}.rotate-180{transform:rotate(180deg)}.details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-out;overflow:hidden}.details[data-expanded=true]{grid-template-rows:1fr}.details-content{overflow:hidden}.details-content>:not(:first-child){margin-top:var(--sp-3)}@media (min-width:769px){:host([always-expanded-on-desktop]) .details{grid-template-rows:1fr}:host([always-expanded-on-desktop]) mq-text-button{display:none}:host([always-expanded-on-desktop]) .header{margin-bottom:var(--sp-4)}}`;let c=class ProfessionalOverview extends r{constructor(){super(...arguments),this.alwaysExpandedOnDesktop=!1,this.detailsExpanded=!1}static{this.styles=g}render(){const t=m().replace("_","-"),e=this.languages.map(e=>n`<span class="language-pill">${new Intl.DisplayNames(t,{type:"language"}).of(e)}</span>`);return n`<div class="header ${this.detailsExpanded?"expanded":""}"><mq-avatar src="${this.avatar}" fallback="${this.name}" alt="${this.name}" size="lg"></mq-avatar><div class="professional-info"><h2 class="professional-name">${this.name}</h2>${this.specialtyName?n`<p class="professional-specialty">${this.specialtyName}</p>`:l}<mq-text-button type="button" size="sm" fontWeight="bold" @click="${()=>{this.detailsExpanded=!this.detailsExpanded}}">${this.detailsExpanded?a("Ocultar detalles"):a("Ver detalles")} ${f({size:24,className:"icon "+(this.detailsExpanded?"rotate-180":"")})}</mq-text-button></div></div><div class="details" data-expanded="${this.detailsExpanded}"><div class="details-content"><div class="languages">${e}</div>${this.collegiateNumber?n`<p class="collegiate-number">${a(i`Nº COL. ${this.collegiateNumber}`)}</p>`:l}<p class="description">${this.description}</p></div></div>`}};t([d({type:String})],c.prototype,"name",void 0),t([d({type:String})],c.prototype,"specialtyName",void 0),t([d({type:String})],c.prototype,"collegiateNumber",void 0),t([d({type:String})],c.prototype,"description",void 0),t([d({type:Array})],c.prototype,"languages",void 0),t([d({type:String})],c.prototype,"avatar",void 0),t([d({type:Boolean,reflect:!0,attribute:"always-expanded-on-desktop"})],c.prototype,"alwaysExpandedOnDesktop",void 0),t([p()],c.prototype,"detailsExpanded",void 0),c=t([o(),e("professional-overview")],c);export{c as P};
1
+ import{_ as t,c as e}from"./custom-element-D2ziPxYE.js";import{m as a,s as i}from"./runtime-Bg1WXVCx.js";import{l as o}from"./localized-decorator-BlOuLhym.js";import{i as s,a as r,x as n,E as l}from"./lit-element-DiWJYFwC.js";import{n as d}from"./property-scuRaFcM.js";import{r as p}from"./state-LQivXIgA.js";import{getLocale as m}from"../i18n.js";import{chevronDownIcon as c}from"../ui/icons/chevron-down-icon.js";import"../ui/mq-text-button.js";import"../ui/mq-avatar.js";const f=s`.header{display:flex;align-items:center;gap:var(--sp-4);margin-bottom:0}.header.expanded{margin-bottom:var(--sp-4)}@media (max-width:768px){.header{--avatar-size-lg:var(--avatar-size-md)}}.professional-info{flex:1}.professional-name{font-family:var(--font-titles);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutral-link-dark);margin:0}.professional-specialty{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutral-text-default);margin:0}.collegiate-number{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);color:var(--color-neutrals-text-medium);margin:0;text-transform:uppercase}.languages{display:flex;flex-wrap:wrap;gap:var(--sp-3)}.language-pill{display:inline-block;background-color:#e5e5e5;color:var(--colors-neutral-text-default);font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-medium);padding:var(--sp-1) var(--sp-2);border-radius:26px;text-transform:uppercase}.description{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal);margin-bottom:0;color:var(--color-neutrals-text-medium)}.icon{transition:transform .1s ease-in-out}.rotate-180{transform:rotate(180deg)}.details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-out;overflow:hidden}.details[data-expanded=true]{grid-template-rows:1fr}.details-content{overflow:hidden}.details-content>:not(:first-child){margin-top:var(--sp-3)}@media (min-width:769px){:host([always-expanded-on-desktop]) .details{grid-template-rows:1fr}:host([always-expanded-on-desktop]) mq-text-button{display:none}:host([always-expanded-on-desktop]) .header{margin-bottom:var(--sp-4)}}`;let g=class ProfessionalOverview extends r{constructor(){super(...arguments),this.alwaysExpandedOnDesktop=!1,this.detailsExpanded=!1}static{this.styles=f}render(){const t=m().replace("_","-"),e=this.languages.map(e=>n`<span class="language-pill">${new Intl.DisplayNames(t,{type:"language"}).of(e)}</span>`);return n`<div class="header ${this.detailsExpanded?"expanded":""}"><mq-avatar src="${this.avatar}" fallback="${this.name}" alt="${this.name}" size="lg"></mq-avatar><div class="professional-info"><h2 class="professional-name">${this.name}</h2>${this.specialtyName?n`<p class="professional-specialty">${this.specialtyName}</p>`:l}<mq-text-button type="button" size="sm" fontWeight="bold" @click="${()=>{this.detailsExpanded=!this.detailsExpanded}}">${this.detailsExpanded?a("Ocultar detalles"):a("Ver detalles")} ${c({size:24,className:"icon "+(this.detailsExpanded?"rotate-180":"")})}</mq-text-button></div></div><div class="details" data-expanded="${this.detailsExpanded}"><div class="details-content"><div class="languages">${e}</div>${this.collegiateNumber?n`<p class="collegiate-number">${a(i`Nº COL. ${this.collegiateNumber}`)}</p>`:l}<p class="description">${this.description}</p></div></div>`}};t([d({type:String})],g.prototype,"name",void 0),t([d({type:String})],g.prototype,"specialtyName",void 0),t([d({type:String})],g.prototype,"collegiateNumber",void 0),t([d({type:String})],g.prototype,"description",void 0),t([d({type:Array})],g.prototype,"languages",void 0),t([d({type:String})],g.prototype,"avatar",void 0),t([d({type:Boolean,reflect:!0,attribute:"always-expanded-on-desktop"})],g.prototype,"alwaysExpandedOnDesktop",void 0),t([p()],g.prototype,"detailsExpanded",void 0),g=t([o(),e("professional-overview")],g);export{g as P};
package/dist/env.js CHANGED
@@ -1 +1 @@
1
- const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",o="production",e="0.5.2",n={development:{MODE:"development",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=o;const _=new Proxy({},{get:(E,o)=>n[t??"production"][o]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
1
+ const E="https://mediquo-landing.s3.eu-central-1.amazonaws.com/sdk-web/elements",o="production",e="0.6.1",n={development:{MODE:"development",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"47836441",ASSETS_BASE_URL:E},production:{MODE:"production",MQ_DEFAULT_ENV:o,MQ_ELEMENTS_VERSION:e,OPENTOK_API_KEY:"46655102",ASSETS_BASE_URL:E}};let t=o;const _=new Proxy({},{get:(E,o)=>n[t??"production"][o]});function S(E){t=E}export{E as ASSETS_BASE_URL,_ as env,S as setEnv};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{MqThemeProvider}from"./mq-theme-provider.js";export{DownloadFileEvent,MqAppointmentBookEvent,MqAppointmentJoinVideocallEvent,MqAppointmentRescheduleEvent,MqAppointmentViewDocumentationEvent,MqBackEvent,MqHomeEvent,MqPaymentRedirectEvent,MqPaymentSucceededEvent,MqViewAppointmentsEvent,MqViewDocumentsEvent}from"./events.js";export{defaultTheme}from"./theme.js";import"./chunks/custom-element-DA9Fxvxd.js";import"./chunks/lit-element-DiWJYFwC.js";import"./chunks/property-scuRaFcM.js";import"./chunks/state-LQivXIgA.js";import"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";
1
+ export{MqThemeProvider}from"./mq-theme-provider.js";export{DownloadFileEvent,MqAppointmentBookEvent,MqAppointmentJoinVideocallEvent,MqAppointmentRescheduleEvent,MqAppointmentViewDocumentationEvent,MqBackEvent,MqHomeEvent,MqPaymentRedirectEvent,MqPaymentSucceededEvent,MqViewAppointmentsEvent,MqViewDocumentsEvent}from"./events.js";export{defaultTheme}from"./theme.js";import"./chunks/custom-element-D2ziPxYE.js";import"./chunks/lit-element-DiWJYFwC.js";import"./chunks/property-scuRaFcM.js";import"./chunks/state-LQivXIgA.js";import"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";
@@ -1 +1 @@
1
- import{_ as e,t}from"./chunks/custom-element-DA9Fxvxd.js";import{m as a}from"./chunks/runtime-Bg1WXVCx.js";import{l as s}from"./chunks/localized-decorator-BlOuLhym.js";import{L as i}from"./chunks/login-token-task-BI-L2zSV.js";import{l as n}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as o,a as r,x as p}from"./chunks/lit-element-DiWJYFwC.js";import{n as l}from"./chunks/property-scuRaFcM.js";import{r as c}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{initLocalization as u,isValidLocale as y,setLocale as d}from"./i18n.js";import{a as m}from"./chunks/api-chat-client-1Vz6ZOwp.js";import{u as v,s as b,r as k}from"./chunks/apple-pay-outcomes-0ozxSHyb.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function f(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function P(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!f()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}const g={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{u()}catch{}const E=["visa","masterCard","amex"],_=["supports3DS"],S=o`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function A(e,t){n.warn(e,{error:t instanceof Error?t.message:String(t)})}let C=class MqApplePayCheckout extends r{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this._loginTokenTask=new i(this,m,{args:()=>[this.apiKey,this.token],onComplete:e=>{m.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return A("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await m.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(v(a))}catch(t){A("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await m.payments.authorizeApplePay({order_id:this.sessionId,token:b(t.payment.token)}),{status:s,consultation_id:i}=a.data,n=k(s,i,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){A("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){A("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=S}willUpdate(e){if(e.has("env")&&this.env&&h(this.env),e.has("apiKey")&&m.setApiKey(this.apiKey),e.has("locale")){const e=y(this.locale)?this.locale:"es_ES";d(e),m.setLanguage(e)}e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await P(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return y(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...E],merchantCapabilities:[..._],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?p`<p class="state">${a("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:p`<p class="state">${a("Apple Pay no está disponible")}</p>`:p`<p class="state">${a("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>p`<p class="state">${a("Preparando Apple Pay…")}</p>`,error:()=>p`<p class="state">${a("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?p`<p class="state">${a("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():p`${this._showQrHelper?p`<p class="helper">${a("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,g[e]??"es-ES"}" aria-label="${a("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([l({type:String,attribute:"env"})],C.prototype,"env",void 0),e([l({type:String,attribute:"api-key"})],C.prototype,"apiKey",void 0),e([l({type:String,attribute:"token"})],C.prototype,"token",void 0),e([l({type:String,attribute:"locale",reflect:!0})],C.prototype,"locale",void 0),e([l({type:String,attribute:"merchant-id"})],C.prototype,"merchantId",void 0),e([l({type:String,attribute:"session-id"})],C.prototype,"sessionId",void 0),e([l({type:String,attribute:"amount"})],C.prototype,"amount",void 0),e([l({type:String,attribute:"currency"})],C.prototype,"currency",void 0),e([l({type:String,attribute:"country"})],C.prototype,"country",void 0),e([l({type:String,attribute:"label"})],C.prototype,"label",void 0),e([c()],C.prototype,"_availabilityPhase",void 0),e([c()],C.prototype,"_showQrHelper",void 0),e([c()],C.prototype,"_paying",void 0),C=e([s(),t("mq-apple-pay-checkout")],C);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,C as MqApplePayCheckout};
1
+ import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{m as a}from"./chunks/runtime-Bg1WXVCx.js";import{l as s}from"./chunks/localized-decorator-BlOuLhym.js";import{L as i}from"./chunks/login-token-task-BI-L2zSV.js";import{l as n}from"./chunks/chunk-4FFT6DC2-CVWibomC.js";import{i as o,a as r,x as p}from"./chunks/lit-element-DiWJYFwC.js";import{n as l}from"./chunks/property-scuRaFcM.js";import{r as c}from"./chunks/state-LQivXIgA.js";import{setEnv as h}from"./env.js";import{initLocalization as u,isValidLocale as y,setLocale as d}from"./i18n.js";import{a as m}from"./chunks/api-chat-client-1Vz6ZOwp.js";import{u as v,s as b,r as k}from"./chunks/apple-pay-outcomes-0ozxSHyb.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";function f(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/Safari/i.test(e)&&!/Chrome|Chromium|Edg|OPR|Firefox|FxiOS/i.test(e)}async function P(e){if("undefined"==typeof window||!window.isSecureContext)return{available:!1,reason:"unsupported"};if(!function(){if("undefined"==typeof window)return!1;const e="undefined"!=typeof ApplePaySession&&"function"==typeof ApplePaySession.canMakePayments,t="undefined"!=typeof customElements&&void 0!==customElements.get("apple-pay-button");return e&&t}())return{available:!1,reason:"sdk-missing"};if(!e.trim())return{available:!1,reason:"merchant-id-missing"};const t=ApplePaySession;if(function(e){return"function"==typeof e.applePayCapabilities}(t))try{return function(e){switch(e){case"applePayUnsupported":return{available:!1,reason:"unsupported"};case"paymentCredentialsUnavailable":case"paymentCredentialsAvailable":case"paymentCredentialStatusUnknown":return{available:!0,usesQrFlow:!f()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!f()}:{available:!1,reason:"unsupported"}}const g={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{u()}catch{}const E=["visa","masterCard","amex"],_=["supports3DS"],S=o`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:center;font-family:system-ui,sans-serif;font-size:13px;line-height:1.4;color:#6e6e73}.pay-row{display:block;width:100%}.pay-row--paying{opacity:.55;pointer-events:none}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:10px;--apple-pay-button-padding:0;display:block;width:100%;min-height:48px;cursor:pointer}.state{text-align:center;font-family:system-ui,sans-serif;font-size:15px;color:#86868b;margin:0}`;class ApplePayCheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(ApplePayCheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(ApplePayCheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class ApplePayCheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(ApplePayCheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}function A(e,t){n.warn(e,{error:t instanceof Error?t.message:String(t)})}let C=class MqApplePayCheckout extends r{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this._loginTokenTask=new i(this,m,{args:()=>[this.apiKey,this.token],onComplete:e=>{m.setAuthToken(e.access_token),this._refreshAvailability()},onError:()=>{this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"auth"}))}}),this._onPayClick=()=>{if(this._paying||"ready"!==this._availabilityPhase)return;let e;try{e=new ApplePaySession(3,this._buildPaymentRequest())}catch(e){return A("mq-apple-pay-checkout: failed to create ApplePaySession",e),void this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}this._paying=!0,this._suppressCancelEvent=!1,e.onvalidatemerchant=async t=>{try{const a=await m.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(v(a))}catch(t){A("mq-apple-pay-checkout: validate-merchant failed",t),this._suppressCancelEvent=!0,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"merchant"})),e.abort(),this._paying=!1}},e.onpaymentauthorized=async t=>{try{const a=await m.payments.authorizeApplePay({order_id:this.sessionId,token:b(t.payment.token)}),{status:s,consultation_id:i}=a.data,n=k(s,i,this.sessionId);switch(n.kind){case"success":e.completePayment(ApplePaySession.STATUS_SUCCESS),this.dispatchEvent(new ApplePayCheckoutSuccessEvent({sessionId:n.sessionId,reference:n.reference}));break;case"denied":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutDeniedEvent({sessionId:n.sessionId}));break;case"error":e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:n.reason}))}}catch(t){A("mq-apple-pay-checkout: authorize failed",t),e.completePayment(ApplePaySession.STATUS_FAILURE),this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"authorize"}))}finally{this._paying=!1}},e.oncancel=()=>{this._paying=!1,this._suppressCancelEvent?this._suppressCancelEvent=!1:this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"cancelled"}))};try{e.begin()}catch(e){A("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=S}willUpdate(e){if(e.has("env")&&this.env&&h(this.env),e.has("apiKey")&&m.setApiKey(this.apiKey),e.has("locale")){const e=y(this.locale)?this.locale:"es_ES";d(e),m.setLanguage(e)}e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await P(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return y(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...E],merchantCapabilities:[..._],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?p`<p class="state">${a("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:p`<p class="state">${a("Apple Pay no está disponible")}</p>`:p`<p class="state">${a("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>p`<p class="state">${a("Preparando Apple Pay…")}</p>`,error:()=>p`<p class="state">${a("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?p`<p class="state">${a("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():p`${this._showQrHelper?p`<p class="helper">${a("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,g[e]??"es-ES"}" aria-label="${a("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([l({type:String,attribute:"env"})],C.prototype,"env",void 0),e([l({type:String,attribute:"api-key"})],C.prototype,"apiKey",void 0),e([l({type:String,attribute:"token"})],C.prototype,"token",void 0),e([l({type:String,attribute:"locale",reflect:!0})],C.prototype,"locale",void 0),e([l({type:String,attribute:"merchant-id"})],C.prototype,"merchantId",void 0),e([l({type:String,attribute:"session-id"})],C.prototype,"sessionId",void 0),e([l({type:String,attribute:"amount"})],C.prototype,"amount",void 0),e([l({type:String,attribute:"currency"})],C.prototype,"currency",void 0),e([l({type:String,attribute:"country"})],C.prototype,"country",void 0),e([l({type:String,attribute:"label"})],C.prototype,"label",void 0),e([c()],C.prototype,"_availabilityPhase",void 0),e([c()],C.prototype,"_showQrHelper",void 0),e([c()],C.prototype,"_paying",void 0),C=e([s(),t("mq-apple-pay-checkout")],C);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,C as MqApplePayCheckout};
@@ -1 +1 @@
1
- import{_ as t,t as e}from"./chunks/custom-element-DA9Fxvxd.js";import{a as o,x as i}from"./chunks/lit-element-DiWJYFwC.js";import{n as s}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import{a as p}from"./chunks/api-chat-client-1Vz6ZOwp.js";import"./mq-checkout.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/login-token-task-BI-L2zSV.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async()=>{const t=await p.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:t.session_id,paymentUrl:t.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return i`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([s({type:String,attribute:"env"})],r.prototype,"env",void 0),t([s({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([s({type:String,attribute:"token"})],r.prototype,"token",void 0),t([s({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([s({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([s({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([s({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([s({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([s({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([s({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
1
+ import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as i}from"./chunks/lit-element-DiWJYFwC.js";import{n as s}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import{a as p}from"./chunks/api-chat-client-1Vz6ZOwp.js";import"./mq-checkout.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/login-token-task-BI-L2zSV.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";class AppointmentPaidEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(AppointmentPaidEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let r=class MqAppointmentCheckout extends o{constructor(){super(...arguments),this._provideSession=async()=>{const t=await p.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,preconsultation_documents:this.preconsultationDocuments});return{sessionId:t.session_id,paymentUrl:t.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return i`<mq-checkout env="${n(this.env)}" api-key="${this.apiKey}" token="${this.token}" locale="${this.locale}" .provideSession="${this._provideSession}" @payment-success="${this._onSuccess}"></mq-checkout>`}};t([s({type:String,attribute:"env"})],r.prototype,"env",void 0),t([s({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([s({type:String,attribute:"token"})],r.prototype,"token",void 0),t([s({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([s({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([s({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([s({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([s({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([s({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([s({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
@@ -1 +1 @@
1
- import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,t as o}from"./chunks/custom-element-DA9Fxvxd.js";import{Q as r}from"./chunks/query-controller-BlO1Ax65.js";import{g as n}from"./chunks/get-appointment-query-Ck68BEMg.js";import{a,i as c,x as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as d}from"./chunks/property-scuRaFcM.js";import{setEnv as p}from"./env.js";import{a as l}from"./chunks/api-chat-client-1Vz6ZOwp.js";import"./chunks/documentation-view-geQU8ttU.js";import"./ui/mq-card.js";import"./chunks/mq-layout-CGcdxGMQ.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/telemetry-client-BLJVs9me.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./chunks/state-LQivXIgA.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./chunks/consume-CovVqBjI.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-GZF3YFSX-DM-GTqxg.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/back-link.js";import"./ui/mq-text-button.js";import"./chunks/index-Bx8TWBsk.js";import"./ui/icons/download-icon.js";import"./chunks/get-organization-setup-query-BMbuRi6v.js";import"./chunks/i18n-formats-DYS91YEa.js";let u=class DocumentationViewSkeleton extends a{static{this.styles=c`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.back-link-skeleton{width:60px;height:20px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-6)}.title-skeleton{width:200px;height:32px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-3)}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return m`<div class="skeleton back-link-skeleton"></div><div class="skeleton title-skeleton"></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};u=s([o("documentation-view-skeleton")],u);let k=class MqAppointmentDocumentation extends a{constructor(){super(...arguments),this.getAppointmentQuery=new r(this,()=>n(l,{id:this.appointmentId}))}willUpdate(i){i.has("env")&&this.env&&p(this.env),i.has("apiKey")&&this.apiKey&&l.setApiKey(this.apiKey),i.has("token")&&this.token&&l.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),l.setLanguage(this.locale))}render(){return m`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>m`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>m``,pending:()=>m`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([d({type:String,attribute:"appointment-id"})],k.prototype,"appointmentId",void 0),s([d({type:String,attribute:"token"})],k.prototype,"token",void 0),s([d({type:String,attribute:"api-key"})],k.prototype,"apiKey",void 0),s([d({type:String,attribute:"locale"})],k.prototype,"locale",void 0),s([d({type:String,attribute:"env"})],k.prototype,"env",void 0),k=s([o("mq-appointment-documentation")],k),i();export{k as MqAppointmentDocumentation};
1
+ import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,c as o}from"./chunks/custom-element-D2ziPxYE.js";import{Q as r}from"./chunks/query-controller-BlO1Ax65.js";import{g as n}from"./chunks/get-appointment-query-Ck68BEMg.js";import{a,i as c,x as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as d}from"./chunks/property-scuRaFcM.js";import{setEnv as p}from"./env.js";import{a as l}from"./chunks/api-chat-client-1Vz6ZOwp.js";import"./chunks/documentation-view-DOUzUXRv.js";import"./ui/mq-card.js";import"./chunks/mq-layout-BndHxkbb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/telemetry-client-BLJVs9me.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.js";import"./chunks/state-LQivXIgA.js";import"./ui/icons/info-circle-outine-icon.js";import"./ui/mq-button.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./ui/icons/message-bubble-icon.js";import"./mq-chat-room.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./chunks/consume-CovVqBjI.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-avatar.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-GZF3YFSX-DM-GTqxg.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/back-link.js";import"./ui/mq-text-button.js";import"./chunks/index-BfAhWf7z.js";import"./ui/icons/download-icon.js";import"./chunks/get-organization-setup-query-BMbuRi6v.js";import"./chunks/i18n-formats-DYS91YEa.js";let u=class DocumentationViewSkeleton extends a{static{this.styles=c`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.back-link-skeleton{width:60px;height:20px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-6)}.title-skeleton{width:200px;height:32px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-3)}.description-skeleton{width:100%;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-2)}.description-skeleton:last-of-type{width:70%;margin-bottom:var(--size-5)}.professional-card{padding:var(--size-4);margin-bottom:var(--size-4)}.professional-name-skeleton{width:180px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-1)}.professional-speciality-skeleton{width:140px;height:16px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.description-list{display:flex;flex-direction:column;gap:var(--size-4)}.description-list-item{display:flex;flex-direction:row;align-items:center;gap:var(--size-2);font-family:var(--font-body)}.icon-skeleton{width:20px;height:20px;border-radius:var(--border-radius-sm)}.text-skeleton{width:120px;height:16px;border-radius:var(--border-radius-sm)}.documents-card{padding:var(--size-4);margin-bottom:var(--size-6)}.documents-card .skeleton{background-color:var(--color-muted)}.documents-card-title-skeleton{width:150px;height:24px;border-radius:var(--border-radius-sm);margin-bottom:var(--size-4)}.button-skeleton{width:100%;height:44px;border-radius:var(--border-radius-md);margin-top:var(--size-4)}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.6}100%{opacity:1}}`}render(){return m`<div class="skeleton back-link-skeleton"></div><div class="skeleton title-skeleton"></div><div class="skeleton description-skeleton"></div><div class="skeleton description-skeleton"></div><mq-card class="professional-card" roundness="md"><div><div class="skeleton professional-name-skeleton"></div><div class="skeleton professional-speciality-skeleton"></div></div><dl class="description-list"><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div><div class="description-list-item"><div class="skeleton icon-skeleton"></div><div class="skeleton text-skeleton"></div></div></dl></mq-card><mq-card class="documents-card" roundness="md"><div class="skeleton documents-card-title-skeleton"></div><div class="skeleton button-skeleton"></div></mq-card>`}};u=s([o("documentation-view-skeleton")],u);let k=class MqAppointmentDocumentation extends a{constructor(){super(...arguments),this.getAppointmentQuery=new r(this,()=>n(l,{id:this.appointmentId}))}willUpdate(i){i.has("env")&&this.env&&p(this.env),i.has("apiKey")&&this.apiKey&&l.setApiKey(this.apiKey),i.has("token")&&this.token&&l.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),l.setLanguage(this.locale))}render(){return m`<mq-layout background="transparent">${this.getAppointmentQuery.render({complete:t=>m`<documentation-view .token="${this.token}" .appointment="${t}"></documentation-view>`,error:()=>m``,pending:()=>m`<documentation-view-skeleton></documentation-view-skeleton>`})}</mq-layout>`}};s([d({type:String,attribute:"appointment-id"})],k.prototype,"appointmentId",void 0),s([d({type:String,attribute:"token"})],k.prototype,"token",void 0),s([d({type:String,attribute:"api-key"})],k.prototype,"apiKey",void 0),s([d({type:String,attribute:"locale"})],k.prototype,"locale",void 0),s([d({type:String,attribute:"env"})],k.prototype,"env",void 0),k=s([o("mq-appointment-documentation")],k),i();export{k as MqAppointmentDocumentation};