@mediquo/elements 0.11.0 → 0.12.0

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 (140) hide show
  1. package/README.md +7 -18
  2. package/dist/chunks/api-chat-client-Dx-sFrf2.js +1 -0
  3. package/dist/chunks/{apple-pay-outcomes-SIvDJWN_.js → apple-pay-outcomes--uAwZeLE.js} +1 -1
  4. package/dist/chunks/appointment-details-BM8peAHH.js +1 -0
  5. package/dist/chunks/{appointment-details-CVEDe_k0.d.ts → appointment-details-KL9fK6vG.d.ts} +1 -2
  6. package/dist/chunks/ca_ES-DYhnenv6.js +1 -0
  7. package/dist/chunks/checkout-bridge-BFpVxNww.js +1 -0
  8. package/dist/chunks/{chunk-Y4EKUX25-Bix9r5ry.js → chunk-Y4EKUX25-Bdei04iw.js} +1 -1
  9. package/dist/chunks/{chunk-YTQUGGS3-DH0H7ld7.js → chunk-YTQUGGS3-sBILRfPo.js} +1 -1
  10. package/dist/chunks/de_DE-Dw0iVZNb.js +1 -0
  11. package/dist/chunks/{documentation-view-BSt0gtCR.js → documentation-view-BcA4Vbhp.js} +1 -1
  12. package/dist/chunks/en_US-DONnbI9l.js +1 -0
  13. package/dist/chunks/{external-JLtsAfi6.js → external-cM_kgYO_.js} +1 -1
  14. package/dist/chunks/{index-CUirgiWh.d.ts → index-BEPyJrJL.d.ts} +1 -1
  15. package/dist/chunks/{index-B3rs7SlM.d.ts → index-BKjqWyIs.d.ts} +1 -1
  16. package/dist/chunks/{index-B6OMnYjW.js → index-CGWd3FWG.js} +1 -1
  17. package/dist/chunks/index-Djkwyh_M.js +1 -0
  18. package/dist/chunks/{index-CCWMMqiq.js → index-Dw4Aeoyg.js} +1 -1
  19. package/dist/chunks/{appointment.model.d-BWwBLaEL.d.ts → index-DwlJg2um.d.ts} +13 -0
  20. package/dist/chunks/{index-D2yqKnpP.js → index-VQqG1eyA.js} +1 -1
  21. package/dist/chunks/{index-DFaKhE7Q.d.ts → index-fut7tm1R.d.ts} +1 -1
  22. package/dist/chunks/{index.d-ByhRBSb1.d.ts → index.d-DHMNq1lu.d.ts} +2 -7
  23. package/dist/chunks/{login-token-task-Yib__6a9.js → login-token-task-NQJ77O_q.js} +1 -1
  24. package/dist/chunks/mq-chat-room-BkXGHzrd.js +1 -0
  25. package/dist/chunks/{mq-chat-room-C8wCADp2.d.ts → mq-chat-room-C0dJCvpV.d.ts} +2 -2
  26. package/dist/chunks/{mq-next-appointments-CbjNpG1H.js → mq-next-appointments-BngkXupq.js} +1 -1
  27. package/dist/chunks/{mq-recent-documents-DNqh_8J0.js → mq-recent-documents-Ee-JRTdl.js} +1 -1
  28. package/dist/chunks/mq-schedule-DAKftQ3D.js +1 -0
  29. package/dist/chunks/{mq-support-chat-tdev5LC-.js → mq-support-chat-Bzj5LYHb.js} +1 -1
  30. package/dist/chunks/{mq-videocall-CwYtlPu6.js → mq-videocall-Cp7LSoDs.js} +1 -1
  31. package/dist/chunks/{next-appointment-card-DLU7-wIv.js → next-appointment-card-BE0KW2vv.js} +1 -1
  32. package/dist/chunks/{next-appointment-card-CPg9FuOI.d.ts → next-appointment-card-Z5G1jqtz.d.ts} +4 -4
  33. package/dist/chunks/professional-overview-Ck_SPivX.js +1 -0
  34. package/dist/chunks/{professional-overview-mO3tuMuH.d.ts → professional-overview-QVHl_ITk.d.ts} +1 -0
  35. package/dist/chunks/pt_PT-dELUeDqB.js +1 -0
  36. package/dist/chunks/task-CqjSKFwZ.js +1 -0
  37. package/dist/chunks/{telemetry-client-K37KMdy_.js → telemetry-client-DA2_SZBC.js} +1 -1
  38. package/dist/env.js +1 -1
  39. package/dist/events.d.ts +1 -22
  40. package/dist/events.js +1 -1
  41. package/dist/i18n.js +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/mq-api-client-provider.d.ts +1 -1
  45. package/dist/mq-api-client-provider.js +1 -1
  46. package/dist/mq-apple-pay-checkout.d.ts +1 -1
  47. package/dist/mq-apple-pay-checkout.js +1 -1
  48. package/dist/mq-appointment-checkout.d.ts +20 -14
  49. package/dist/mq-appointment-checkout.js +1 -1
  50. package/dist/mq-appointment-documentation.d.ts +4 -4
  51. package/dist/mq-appointment-documentation.js +1 -1
  52. package/dist/mq-chat-room.d.ts +3 -3
  53. package/dist/mq-chat-room.js +1 -1
  54. package/dist/mq-checkout.d.ts +44 -61
  55. package/dist/mq-checkout.js +1 -1
  56. package/dist/mq-dashboard.d.ts +6 -6
  57. package/dist/mq-dashboard.js +1 -1
  58. package/dist/mq-documents.d.ts +2 -2
  59. package/dist/mq-documents.js +1 -1
  60. package/dist/mq-google-pay-checkout.d.ts +1 -1
  61. package/dist/mq-google-pay-checkout.js +1 -1
  62. package/dist/mq-immediate-videocall-checkout.d.ts +10 -9
  63. package/dist/mq-immediate-videocall-checkout.js +1 -1
  64. package/dist/mq-my-appointments.d.ts +6 -6
  65. package/dist/mq-my-appointments.js +1 -1
  66. package/dist/mq-next-appointments.d.ts +5 -5
  67. package/dist/mq-next-appointments.js +1 -1
  68. package/dist/mq-payment-poller.d.ts +2 -2
  69. package/dist/mq-payment-poller.js +1 -1
  70. package/dist/mq-professional-presence-sync.js +1 -1
  71. package/dist/mq-recent-documents.d.ts +2 -2
  72. package/dist/mq-recent-documents.js +1 -1
  73. package/dist/mq-schedule-success.d.ts +5 -5
  74. package/dist/mq-schedule-success.js +2 -2
  75. package/dist/mq-schedule.d.ts +52 -98
  76. package/dist/mq-schedule.js +1 -1
  77. package/dist/mq-socket-provider.js +1 -1
  78. package/dist/mq-support-chat.d.ts +3 -3
  79. package/dist/mq-support-chat.js +1 -1
  80. package/dist/mq-terms-and-conditions.d.ts +2 -2
  81. package/dist/mq-terms-and-conditions.js +1 -1
  82. package/dist/mq-unread-count-sync.js +1 -1
  83. package/dist/mq-videocall.d.ts +5 -5
  84. package/dist/mq-videocall.js +1 -1
  85. package/dist/react/mq-api-client-provider.d.ts +1 -1
  86. package/dist/react/mq-api-client-provider.js +1 -1
  87. package/dist/react/mq-apple-pay-checkout.d.ts +1 -1
  88. package/dist/react/mq-apple-pay-checkout.js +1 -1
  89. package/dist/react/mq-appointment-checkout.d.ts +12 -8
  90. package/dist/react/mq-appointment-checkout.js +1 -1
  91. package/dist/react/mq-appointment-documentation.d.ts +4 -4
  92. package/dist/react/mq-appointment-documentation.js +1 -1
  93. package/dist/react/mq-chat-room.d.ts +3 -3
  94. package/dist/react/mq-chat-room.js +1 -1
  95. package/dist/react/mq-checkout.d.ts +11 -8
  96. package/dist/react/mq-checkout.js +1 -1
  97. package/dist/react/mq-dashboard.d.ts +6 -6
  98. package/dist/react/mq-dashboard.js +1 -1
  99. package/dist/react/mq-documents-page.d.ts +2 -2
  100. package/dist/react/mq-documents-page.js +1 -1
  101. package/dist/react/mq-documents.d.ts +2 -2
  102. package/dist/react/mq-documents.js +1 -1
  103. package/dist/react/mq-google-pay-checkout.d.ts +1 -1
  104. package/dist/react/mq-google-pay-checkout.js +1 -1
  105. package/dist/react/mq-immediate-videocall-checkout.d.ts +4 -2
  106. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  107. package/dist/react/mq-my-appointments.d.ts +6 -6
  108. package/dist/react/mq-my-appointments.js +1 -1
  109. package/dist/react/mq-next-appointments.d.ts +5 -5
  110. package/dist/react/mq-next-appointments.js +1 -1
  111. package/dist/react/mq-payment-poller.d.ts +1 -1
  112. package/dist/react/mq-payment-poller.js +1 -1
  113. package/dist/react/mq-professional-presence-sync.js +1 -1
  114. package/dist/react/mq-recent-documents.d.ts +2 -2
  115. package/dist/react/mq-recent-documents.js +1 -1
  116. package/dist/react/mq-schedule-success.d.ts +5 -5
  117. package/dist/react/mq-schedule-success.js +1 -1
  118. package/dist/react/mq-schedule.d.ts +4 -14
  119. package/dist/react/mq-schedule.js +1 -1
  120. package/dist/react/mq-socket-provider.js +1 -1
  121. package/dist/react/mq-support-chat.d.ts +3 -3
  122. package/dist/react/mq-support-chat.js +1 -1
  123. package/dist/react/mq-terms-and-conditions.d.ts +2 -2
  124. package/dist/react/mq-terms-and-conditions.js +1 -1
  125. package/dist/react/mq-unread-count-sync.js +1 -1
  126. package/dist/react/mq-videocall.d.ts +5 -5
  127. package/dist/react/mq-videocall.js +1 -1
  128. package/dist/ui/mq-calendar.js +1 -1
  129. package/dist/ui/mq-tabs.js +49 -22
  130. package/package.json +1 -1
  131. package/dist/chunks/api-chat-client-s45J7LKB.js +0 -1
  132. package/dist/chunks/appointment-details-BYGwLfww.js +0 -1
  133. package/dist/chunks/ca_ES-BOvS9ayb.js +0 -1
  134. package/dist/chunks/de_DE-B-4V4SgD.js +0 -1
  135. package/dist/chunks/en_US-CgxjeeCm.js +0 -1
  136. package/dist/chunks/mq-chat-room-B_WgeuXn.js +0 -1
  137. package/dist/chunks/mq-schedule-BfW7y8uG.js +0 -1
  138. package/dist/chunks/professional-overview-B4E05rLd.js +0 -1
  139. package/dist/chunks/pt_PT-Vb6hoo2l.js +0 -1
  140. package/dist/chunks/task-Bj8p7kJX.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { M as MediquoApiChatClient } from './chunks/index.d-ByhRBSb1.js';
2
+ import { M as MediquoApiChatClient } from './chunks/index.d-DHMNq1lu.js';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
4
  import { Env } from './env.js';
5
5
  import 'axios';
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{e as o}from"./chunks/provide-BwI4DDGF.js";import{A as i}from"./chunks/api-client-context-BXGqBAlO.js";import{a as s,x as r}from"./chunks/lit-element-DiWJYFwC.js";import{n}from"./chunks/property-scuRaFcM.js";import{r as p}from"./chunks/state-LQivXIgA.js";import{setEnv as c}from"./env.js";import{c as a,n as m}from"./chunks/api-chat-client-s45J7LKB.js";import{e as u}from"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";u();let h=class MqApiClientProvider extends s{constructor(){super(...arguments),this.apiClient=a()}willUpdate(t){t.has("env")&&this.env&&c(this.env);const e=m(t,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale});e&&(this.apiClient=e)}render(){return r`<slot></slot>`}};t([n({type:String,attribute:"api-key"})],h.prototype,"apiKey",void 0),t([n({type:String,attribute:"token"})],h.prototype,"token",void 0),t([n({type:String,attribute:"locale"})],h.prototype,"locale",void 0),t([n({type:String,attribute:"env"})],h.prototype,"env",void 0),t([o({context:i}),p()],h.prototype,"apiClient",void 0),h=t([e("mq-api-client-provider")],h);export{h as MqApiClientProvider};
1
+ import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{e as o}from"./chunks/provide-BwI4DDGF.js";import{A as i}from"./chunks/api-client-context-BXGqBAlO.js";import{a as s,x as r}from"./chunks/lit-element-DiWJYFwC.js";import{n}from"./chunks/property-scuRaFcM.js";import{r as p}from"./chunks/state-LQivXIgA.js";import{setEnv as c}from"./env.js";import{c as a,n as m}from"./chunks/api-chat-client-Dx-sFrf2.js";import{e as u}from"./chunks/ensure-context-root-DbdqwnKB.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/isBefore-DBi1CiNR.js";u();let h=class MqApiClientProvider extends s{constructor(){super(...arguments),this.apiClient=a()}willUpdate(t){t.has("env")&&this.env&&c(this.env);const e=m(t,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale});e&&(this.apiClient=e)}render(){return r`<slot></slot>`}};t([n({type:String,attribute:"api-key"})],h.prototype,"apiKey",void 0),t([n({type:String,attribute:"token"})],h.prototype,"token",void 0),t([n({type:String,attribute:"locale"})],h.prototype,"locale",void 0),t([n({type:String,attribute:"env"})],h.prototype,"env",void 0),t([o({context:i}),p()],h.prototype,"apiClient",void 0),h=t([e("mq-api-client-provider")],h);export{h as MqApiClientProvider};
@@ -1,6 +1,6 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
- import { M as MediquoApiChatClient } from './chunks/index.d-ByhRBSb1.js';
3
+ import { M as MediquoApiChatClient } from './chunks/index.d-DHMNq1lu.js';
4
4
  import { Env } from './env.js';
5
5
  import { Locale } from './i18n.js';
6
6
  import 'axios';
@@ -1 +1 @@
1
- import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{e as a}from"./chunks/provide-BwI4DDGF.js";import{c as i}from"./chunks/consume-CovVqBjI.js";import{m as s}from"./chunks/runtime-Bg1WXVCx.js";import{l as n}from"./chunks/localized-decorator-BlOuLhym.js";import{A as o}from"./chunks/api-client-context-BXGqBAlO.js";import{L as r}from"./chunks/login-token-task-Yib__6a9.js";import{l as p}from"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import{i as l,a as c,x as h}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as y}from"./chunks/state-LQivXIgA.js";import{setEnv as d}from"./env.js";import{initLocalization as m,setLocale as v,isValidLocale as k}from"./i18n.js";import{c as b,n as f}from"./chunks/api-chat-client-s45J7LKB.js";import{u as P,s as _,r as E}from"./chunks/apple-pay-outcomes-SIvDJWN_.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";function g(){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 A(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:!g()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}const C={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{m()}catch{}const S=["visa","masterCard","amex"],w=["supports3DS"],x=l`: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 j(e,t){p.warn(e,{error:t instanceof Error?t.message:String(t)})}let T=class MqApplePayCheckout extends c{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this.apiClient=b(),this._loginTokenTask=new r(this,()=>this.apiClient,{args:()=>[this.apiKey,this.token],onComplete:e=>{this._sessionToken=e.access_token,this.apiClient.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 j("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 this.apiClient.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(P(a))}catch(t){j("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 this.apiClient.payments.authorizeApplePay({order_id:this.sessionId,token:_(t.payment.token)}),{status:i,consultation_id:s}=a.data,n=E(i,s,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){j("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){j("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=x}willUpdate(e){e.has("env")&&this.env&&d(this.env),e.has("locale")&&v(k(this.locale)?this.locale:"es_ES");const t=f(e,{env:this.env,apiKey:this.apiKey,token:this._sessionToken,locale:k(this.locale)?this.locale:"es_ES"},this.inheritedApiClient);t&&(this.apiClient=t),e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await A(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return k(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...S],merchantCapabilities:[...w],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?h`<p class="state">${s("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:h`<p class="state">${s("Apple Pay no está disponible")}</p>`:h`<p class="state">${s("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>h`<p class="state">${s("Preparando Apple Pay…")}</p>`,error:()=>h`<p class="state">${s("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?h`<p class="state">${s("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():h`${this._showQrHelper?h`<p class="helper">${s("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,C[e]??"es-ES"}" aria-label="${s("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>`;var e}})}};e([u({type:String,attribute:"env"})],T.prototype,"env",void 0),e([u({type:String,attribute:"api-key"})],T.prototype,"apiKey",void 0),e([u({type:String,attribute:"token"})],T.prototype,"token",void 0),e([u({type:String,attribute:"locale",reflect:!0})],T.prototype,"locale",void 0),e([u({type:String,attribute:"merchant-id"})],T.prototype,"merchantId",void 0),e([u({type:String,attribute:"session-id"})],T.prototype,"sessionId",void 0),e([u({type:String,attribute:"amount"})],T.prototype,"amount",void 0),e([u({type:String,attribute:"currency"})],T.prototype,"currency",void 0),e([u({type:String,attribute:"country"})],T.prototype,"country",void 0),e([u({type:String,attribute:"label"})],T.prototype,"label",void 0),e([y()],T.prototype,"_availabilityPhase",void 0),e([y()],T.prototype,"_showQrHelper",void 0),e([y()],T.prototype,"_paying",void 0),e([i({context:o,subscribe:!0}),y()],T.prototype,"inheritedApiClient",void 0),e([a({context:o}),y()],T.prototype,"apiClient",void 0),T=e([n(),t("mq-apple-pay-checkout")],T);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,T as MqApplePayCheckout};
1
+ import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{e as a}from"./chunks/provide-BwI4DDGF.js";import{c as s}from"./chunks/consume-CovVqBjI.js";import{m as i}from"./chunks/runtime-Bg1WXVCx.js";import{l as n}from"./chunks/localized-decorator-BlOuLhym.js";import{A as o}from"./chunks/api-client-context-BXGqBAlO.js";import{L as r}from"./chunks/login-token-task-NQJ77O_q.js";import{l as p}from"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import{i as l,a as c,x as h}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as y}from"./chunks/state-LQivXIgA.js";import{setEnv as d}from"./env.js";import{initLocalization as m,setLocale as v,isValidLocale as k}from"./i18n.js";import{c as b,n as f}from"./chunks/api-chat-client-Dx-sFrf2.js";import{u as P,s as _,r as E}from"./chunks/apple-pay-outcomes--uAwZeLE.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/task-CqjSKFwZ.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";function g(){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 A(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:!g()}}}((await t.applePayCapabilities(e)).paymentCredentialStatus)}catch{return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}return t.canMakePayments()?{available:!0,usesQrFlow:!g()}:{available:!1,reason:"unsupported"}}const C={es_ES:"es-ES",en_US:"en-US",pt_PT:"pt-PT",de_DE:"de-DE",ca_ES:"ca-ES"};try{m()}catch{}const S=["visa","masterCard","amex"],w=["supports3DS"],x=l`:host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:12px;width:100%;min-height:48px}.helper{margin:0;text-align:start;font-family:system-ui,sans-serif;font-size:12px;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 j(e,t){p.warn(e,{error:t instanceof Error?t.message:String(t)})}let T=class MqApplePayCheckout extends c{constructor(){super(...arguments),this._availabilityPhase="checking",this._showQrHelper=!1,this._paying=!1,this._suppressCancelEvent=!1,this._availabilityGeneration=0,this.apiClient=b(),this._loginTokenTask=new r(this,()=>this.apiClient,{args:()=>[this.apiKey,this.token],onComplete:e=>{this._sessionToken=e.access_token,this.apiClient.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 j("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 this.apiClient.payments.validateApplePayMerchant({order_id:this.sessionId,validation_url:t.validationURL});e.completeMerchantValidation(P(a))}catch(t){j("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 this.apiClient.payments.authorizeApplePay({order_id:this.sessionId,token:_(t.payment.token)}),{status:s,consultation_id:i}=a.data,n=E(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){j("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){j("mq-apple-pay-checkout: session.begin() failed",e),this._paying=!1,this.dispatchEvent(new ApplePayCheckoutErrorEvent({reason:"unsupported"}))}}}static{this.styles=x}willUpdate(e){e.has("env")&&this.env&&d(this.env),e.has("locale")&&v(k(this.locale)?this.locale:"es_ES");const t=f(e,{env:this.env,apiKey:this.apiKey,token:this._sessionToken,locale:k(this.locale)?this.locale:"es_ES"},this.inheritedApiClient);t&&(this.apiClient=t),e.has("merchantId")&&this._loginTokenTask.value&&this._refreshAvailability()}async _refreshAvailability(){const e=++this._availabilityGeneration;this._availabilityPhase="checking",this._showQrHelper=!1;const t=await A(this.merchantId??"");e===this._availabilityGeneration&&(t.available?(this._availabilityPhase="ready",this._showQrHelper=t.usesQrFlow):this._availabilityPhase="unavailable")}get _resolvedLocale(){return k(this.locale)?this.locale:"es_ES"}_buildPaymentRequest(){return{countryCode:this.country,currencyCode:this.currency,supportedNetworks:[...S],merchantCapabilities:[...w],total:{label:this.label,amount:this.amount}}}_renderUnavailable(){return this.merchantId?.trim()?"undefined"==typeof ApplePaySession?h`<p class="state">${i("No se ha podido cargar Apple Pay. Comprueba la configuración del sitio e inténtalo de nuevo.")}</p>`:h`<p class="state">${i("Apple Pay no está disponible")}</p>`:h`<p class="state">${i("Falta el identificador de comercio de Apple Pay")}</p>`}render(){return this._loginTokenTask.render({pending:()=>h`<p class="state">${i("Preparando Apple Pay…")}</p>`,error:()=>h`<p class="state">${i("No hemos podido iniciar el pago")}</p>`,complete:()=>{return"checking"===this._availabilityPhase?h`<p class="state">${i("Comprobando Apple Pay…")}</p>`:"unavailable"===this._availabilityPhase?this._renderUnavailable():h`<div class="pay-row ${this._paying?"pay-row--paying":""}"><apple-pay-button buttonstyle="black" type="pay" locale="${e=this._resolvedLocale,C[e]??"es-ES"}" aria-label="${i("Pagar con Apple Pay")}" @click="${this._onPayClick}"></apple-pay-button></div>${this._showQrHelper?h`<p class="helper">${i("Para pagar con Apple Pay, escanea el código QR con tu iPhone (iOS 18 o posterior) y confirma el pago.")}</p>`:null}`;var e}})}};e([u({type:String,attribute:"env"})],T.prototype,"env",void 0),e([u({type:String,attribute:"api-key"})],T.prototype,"apiKey",void 0),e([u({type:String,attribute:"token"})],T.prototype,"token",void 0),e([u({type:String,attribute:"locale",reflect:!0})],T.prototype,"locale",void 0),e([u({type:String,attribute:"merchant-id"})],T.prototype,"merchantId",void 0),e([u({type:String,attribute:"session-id"})],T.prototype,"sessionId",void 0),e([u({type:String,attribute:"amount"})],T.prototype,"amount",void 0),e([u({type:String,attribute:"currency"})],T.prototype,"currency",void 0),e([u({type:String,attribute:"country"})],T.prototype,"country",void 0),e([u({type:String,attribute:"label"})],T.prototype,"label",void 0),e([y()],T.prototype,"_availabilityPhase",void 0),e([y()],T.prototype,"_showQrHelper",void 0),e([y()],T.prototype,"_paying",void 0),e([s({context:o,subscribe:!0}),y()],T.prototype,"inheritedApiClient",void 0),e([a({context:o}),y()],T.prototype,"apiClient",void 0),T=e([n(),t("mq-apple-pay-checkout")],T);export{ApplePayCheckoutDeniedEvent,ApplePayCheckoutErrorEvent,ApplePayCheckoutSuccessEvent,T as MqApplePayCheckout};
@@ -1,15 +1,18 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { C as CreatePaymentLinkRequest } from './chunks/index.d-ByhRBSb1.js';
3
2
  import { LitElement } from 'lit';
4
3
  import { Env } from './env.js';
5
4
  import { Locale } from './i18n.js';
6
5
  import './mq-checkout.js';
7
- import 'axios';
8
6
  import 'zod';
7
+ import './chunks/index.d-DHMNq1lu.js';
8
+ import 'axios';
9
9
  import './chunks/schemas.d-b6_AekBb.js';
10
10
  import './ui/mq-skeleton.js';
11
11
 
12
- type PreconsultationDocument = NonNullable<CreatePaymentLinkRequest["preconsultation_documents"]>[number];
12
+ type PreconsultationDocument = {
13
+ file_path: string;
14
+ file_name: string;
15
+ };
13
16
  declare class AppointmentPaidEvent extends Event {
14
17
  readonly detail: {
15
18
  appointmentId: string;
@@ -20,33 +23,36 @@ declare class AppointmentPaidEvent extends Event {
20
23
  });
21
24
  }
22
25
  /**
23
- * Appointment-specific checkout. Creates a payment session from a `slot-id` +
24
- * `service-id` via `createPaymentLink` and delegates the entire payment UX to
25
- * the agnostic `<mq-checkout>`. Re-creation on retry is handled by `mq-checkout`
26
- * calling the same `provideSession` factory again — no host wiring required.
26
+ * Appointment-specific checkout. Passes the signed `payable-reference` of the
27
+ * selected slot (plus the reason and an optional coupon) to the agnostic
28
+ * `<mq-checkout>`, which embeds the hosted checkout: it creates the payment and
29
+ * takes the patient through it, whichever way the organization charges.
27
30
  *
28
31
  * Must be rendered inside `<mq-theme-provider>`.
29
32
  *
30
33
  * @fires payment-success - Payment confirmed. Detail: `{ appointmentId }`.
31
34
  * @fires payment-denied - Payment rejected. Bubbles from `<mq-checkout>`. Detail: `{ sessionId }`.
32
- * @fires payment-error - Auth, session creation or timeout failure. Bubbles from `<mq-checkout>`. Detail: `{ reason }`.
35
+ * @fires payment-error - The payment cannot go on. Bubbles from `<mq-checkout>`. Detail: `{ reason }`.
36
+ * `reason: "expired"` means the slot offer lapsed: let the patient pick a slot again.
33
37
  */
34
38
  declare class MqAppointmentCheckout extends LitElement {
35
39
  env?: Env;
36
40
  apiKey: string;
37
41
  token: string;
38
42
  locale: Locale;
39
- slotId: string;
40
- serviceId: string;
41
- specialtyId: string;
43
+ /** @deprecated Not sent any more: the signed `payable-reference` already carries it. */
44
+ slotId?: string;
45
+ /** @deprecated Not sent any more: the signed `payable-reference` already carries it. */
46
+ serviceId?: string;
47
+ /** @deprecated Not sent any more: the signed `payable-reference` already carries it. */
48
+ specialtyId?: string;
42
49
  consultationReason?: string;
43
50
  /** Discount coupon code applied to the booking. The coupon UI lives in the host app. */
44
51
  discountCode?: string;
45
- /** Stripe payable from the selected slot. Hosts that skip the wizard pass it themselves. */
52
+ /** Signed `appt_…` reference from the slot listing. Hosts that skip the wizard pass it themselves. */
46
53
  payableReference?: string;
47
- /** Optional pre-consultation documents. Set as a JS property, not an attribute. */
54
+ /** @deprecated Not forwarded: the hosted checkout does not take pre-consultation documents. */
48
55
  preconsultationDocuments?: PreconsultationDocument[];
49
- private _provideSession;
50
56
  private _onSuccess;
51
57
  render(): lit_html.TemplateResult<1>;
52
58
  }
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{a as o,x as s}from"./chunks/lit-element-DiWJYFwC.js";import{n as i}from"./chunks/property-scuRaFcM.js";import{o as n}from"./chunks/if-defined-BYeVdwgd.js";import"./mq-checkout.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/api-chat-client-s45J7LKB.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./env.js";import"./chunks/api-client-context-BXGqBAlO.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/login-token-task-Yib__6a9.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.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 t=>{const e=await t.payments.createPaymentLink({slot_id:this.slotId,service_id:this.serviceId,specialty_id:this.specialtyId,consultation_reason:this.consultationReason,discount_code:this.discountCode,payable_reference:this.payableReference,preconsultation_documents:this.preconsultationDocuments});return{sessionId:e.session_id,paymentUrl:e.payment_link}},this._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return s`<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([i({type:String,attribute:"env"})],r.prototype,"env",void 0),t([i({type:String,attribute:"api-key"})],r.prototype,"apiKey",void 0),t([i({type:String,attribute:"token"})],r.prototype,"token",void 0),t([i({type:String,attribute:"locale",reflect:!0})],r.prototype,"locale",void 0),t([i({type:String,attribute:"slot-id"})],r.prototype,"slotId",void 0),t([i({type:String,attribute:"service-id"})],r.prototype,"serviceId",void 0),t([i({type:String,attribute:"specialty-id"})],r.prototype,"specialtyId",void 0),t([i({type:String,attribute:"consultation-reason"})],r.prototype,"consultationReason",void 0),t([i({type:String,attribute:"discount-code"})],r.prototype,"discountCode",void 0),t([i({type:String,attribute:"payable-reference"})],r.prototype,"payableReference",void 0),t([i({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"./mq-checkout.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-CqjSKFwZ.js";import"./chunks/api-client-context-BXGqBAlO.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/login-token-task-NQJ77O_q.js";import"./chunks/state-LQivXIgA.js";import"./chunks/query-CeeutdfT.js";import"./env.js";import"./theme.js";import"./i18n.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/api-chat-client-Dx-sFrf2.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/checkout-bridge-BFpVxNww.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._onSuccess=t=>{t.stopPropagation(),this.dispatchEvent(new AppointmentPaidEvent({appointmentId:t.detail.reference}))}}render(){return i`<mq-checkout env="${n(this.env)}" api-key="${n(this.apiKey)}" token="${n(this.token)}" locale="${n(this.locale)}" payable-reference="${n(this.payableReference)}" discount-code="${n(this.discountCode)}" consultation-reason="${n(this.consultationReason)}" @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({type:String,attribute:"payable-reference"})],r.prototype,"payableReference",void 0),t([s({attribute:!1})],r.prototype,"preconsultationDocuments",void 0),r=t([e("mq-appointment-checkout")],r);export{AppointmentPaidEvent,r as MqAppointmentCheckout};
@@ -1,21 +1,21 @@
1
1
  import * as lit_html from 'lit-html';
2
- import { M as MediquoApiChatClient } from './chunks/index.d-ByhRBSb1.js';
2
+ import { M as MediquoApiChatClient } from './chunks/index.d-DHMNq1lu.js';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
4
  import { Env } from './env.js';
5
5
  import './ui/mq-button.js';
6
- import './chunks/mq-chat-room-C8wCADp2.js';
6
+ import './chunks/mq-chat-room-C0dJCvpV.js';
7
7
  import './ui/mq-floating-bubble.js';
8
8
  import './ui/mq-card.js';
9
9
  import './ui/mq-unread-badge.js';
10
10
  import './ui/mq-page-title.js';
11
- import './chunks/index-B3rs7SlM.js';
11
+ import './chunks/index-BKjqWyIs.js';
12
12
  import './chunks/mq-layout-D8Mak16a.js';
13
13
  import 'axios';
14
14
  import 'zod';
15
15
  import './chunks/schemas.d-b6_AekBb.js';
16
16
  import './ui/mq-avatar.js';
17
17
  import './ui/mq-skeleton.js';
18
- import './chunks/appointment.model.d-BWwBLaEL.js';
18
+ import './chunks/index-DwlJg2um.js';
19
19
  import '@tanstack/query-core';
20
20
  import './chunks/document.model.d-DIzMiOmd.js';
21
21
 
@@ -1 +1 @@
1
- import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as o,c as s}from"./chunks/custom-element-D2ziPxYE.js";import{e as r}from"./chunks/provide-BwI4DDGF.js";import{c as n}from"./chunks/consume-CovVqBjI.js";import{Q as a}from"./chunks/query-controller-B1byDHlF.js";import{A as c}from"./chunks/api-client-context-BXGqBAlO.js";import{g as d}from"./chunks/get-appointment-query-DuHrjd8L.js";import{a as p,i as l,x as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as h}from"./chunks/state-LQivXIgA.js";import{setEnv as k}from"./env.js";import{c as v,n as b}from"./chunks/api-chat-client-s45J7LKB.js";import"./chunks/documentation-view-BSt0gtCR.js";import"./ui/mq-card.js";import"./chunks/mq-layout-BndHxkbb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"@tanstack/query-core";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./chunks/chunk-5EJXDIGT-Bb4_pfDr.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-Bj8p7kJX.js";import"./chunks/addSeconds-fO5orJrt.js";import"./ui/icons/calendar-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.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-CQJ38pW6.js";import"./ui/icons/message-bubble-icon.js";import"./chunks/mq-chat-room-B_WgeuXn.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-BUV4MGML-CkhBbfUu.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-Y4EKUX25-Bix9r5ry.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/addDays-CdyO-PRI.js";import"./chunks/chunk-YTQUGGS3-DH0H7ld7.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./ui/icons/download-icon.js";import"./chunks/blob-to-base64-CUL1trde.js";import"./chunks/telemetry-client-K37KMdy_.js";let j=class DocumentationViewSkeleton extends p{static{this.styles=l`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.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="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></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>`}};j=o([s("documentation-view-skeleton")],j);let g=class MqAppointmentDocumentation extends p{constructor(){super(...arguments),this.showMediquoBranding=!0,this.getAppointmentQuery=new a(this,()=>d(this.apiClient,{id:this.appointmentId})),this.apiClient=v()}willUpdate(i){i.has("env")&&this.env&&k(this.env),i.has("locale")&&this.locale&&t(this.locale)&&e(this.locale);const o=b(i,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale},this.inheritedApiClient);o&&(this.apiClient=o)}render(){return m`<mq-layout background="transparent" .showMediquoBranding="${this.showMediquoBranding}">${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>`}};o([u({type:String,attribute:"appointment-id"})],g.prototype,"appointmentId",void 0),o([u({type:String,attribute:"token"})],g.prototype,"token",void 0),o([u({type:String,attribute:"api-key"})],g.prototype,"apiKey",void 0),o([u({type:String,attribute:"locale"})],g.prototype,"locale",void 0),o([u({type:String,attribute:"env"})],g.prototype,"env",void 0),o([u({type:Boolean,attribute:"show-mediquo-branding",converter:{fromAttribute:t=>null===t||"false"!==t&&"0"!==t,toAttribute:t=>t?"":"false"}})],g.prototype,"showMediquoBranding",void 0),o([n({context:c,subscribe:!0}),h()],g.prototype,"inheritedApiClient",void 0),o([r({context:c}),h()],g.prototype,"apiClient",void 0),g=o([s("mq-appointment-documentation")],g),i();export{g as MqAppointmentDocumentation};
1
+ import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as o,c as s}from"./chunks/custom-element-D2ziPxYE.js";import{e as n}from"./chunks/provide-BwI4DDGF.js";import{c as r}from"./chunks/consume-CovVqBjI.js";import{Q as a}from"./chunks/query-controller-B1byDHlF.js";import{A as c}from"./chunks/api-client-context-BXGqBAlO.js";import{g as d}from"./chunks/get-appointment-query-DuHrjd8L.js";import{a as p,i as l,x as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as h}from"./chunks/state-LQivXIgA.js";import{setEnv as k}from"./env.js";import{c as v,n as b}from"./chunks/api-chat-client-Dx-sFrf2.js";import"./chunks/documentation-view-BcA4Vbhp.js";import"./ui/mq-card.js";import"./chunks/mq-layout-BndHxkbb.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"./chunks/create-context-DqP79qjF.js";import"@tanstack/query-core";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./chunks/chunk-5EJXDIGT-Bb4_pfDr.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/task-CqjSKFwZ.js";import"./chunks/addSeconds-fO5orJrt.js";import"./ui/icons/calendar-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/types.js";import"./ui/icons/clock-icon.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-CQJ38pW6.js";import"./ui/icons/message-bubble-icon.js";import"./chunks/mq-chat-room-BkXGHzrd.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-BUV4MGML-CkhBbfUu.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./events.js";import"./chunks/chunk-Y4EKUX25-Bdei04iw.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/addDays-CdyO-PRI.js";import"./chunks/chunk-YTQUGGS3-sBILRfPo.js";import"./chunks/index-Djkwyh_M.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import"./ui/mq-page-title.js";import"./ui/icons/arrow-narrow-left-icon.js";import"./ui/icons/download-icon.js";import"./chunks/blob-to-base64-CUL1trde.js";import"./chunks/telemetry-client-DA2_SZBC.js";let j=class DocumentationViewSkeleton extends p{static{this.styles=l`.skeleton{border-radius:var(--border-radius-md);background-color:#f0f0f0;animation:skeleton-pulse 1.5s infinite}.page-title-skeleton{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--size-3)}.back-button-skeleton{width:var(--size-10);height:var(--size-10);border-radius:var(--border-radius-full);flex-shrink:0}.title-bar-skeleton{width:120px;height:24px;border-radius:var(--border-radius-sm)}@media (min-width:768px){.page-title-skeleton{gap:var(--sp-6)}.title-bar-skeleton{width:200px;height:32px}}.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="page-title-skeleton"><div class="skeleton back-button-skeleton"></div><div class="skeleton title-bar-skeleton"></div></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>`}};j=o([s("documentation-view-skeleton")],j);let g=class MqAppointmentDocumentation extends p{constructor(){super(...arguments),this.showMediquoBranding=!0,this.getAppointmentQuery=new a(this,()=>d(this.apiClient,{id:this.appointmentId})),this.apiClient=v()}willUpdate(i){i.has("env")&&this.env&&k(this.env),i.has("locale")&&this.locale&&t(this.locale)&&e(this.locale);const o=b(i,{env:this.env,apiKey:this.apiKey,token:this.token,locale:this.locale},this.inheritedApiClient);o&&(this.apiClient=o)}render(){return m`<mq-layout background="transparent" .showMediquoBranding="${this.showMediquoBranding}">${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>`}};o([u({type:String,attribute:"appointment-id"})],g.prototype,"appointmentId",void 0),o([u({type:String,attribute:"token"})],g.prototype,"token",void 0),o([u({type:String,attribute:"api-key"})],g.prototype,"apiKey",void 0),o([u({type:String,attribute:"locale"})],g.prototype,"locale",void 0),o([u({type:String,attribute:"env"})],g.prototype,"env",void 0),o([u({type:Boolean,attribute:"show-mediquo-branding",converter:{fromAttribute:t=>null===t||"false"!==t&&"0"!==t,toAttribute:t=>t?"":"false"}})],g.prototype,"showMediquoBranding",void 0),o([r({context:c,subscribe:!0}),h()],g.prototype,"inheritedApiClient",void 0),o([n({context:c}),h()],g.prototype,"apiClient",void 0),g=o([s("mq-appointment-documentation")],g),i();export{g as MqAppointmentDocumentation};
@@ -1,14 +1,14 @@
1
- export { M as MqChatRoom } from './chunks/mq-chat-room-C8wCADp2.js';
1
+ export { M as MqChatRoom } from './chunks/mq-chat-room-C0dJCvpV.js';
2
2
  import 'lit-html';
3
3
  import 'lit';
4
- import './chunks/index.d-ByhRBSb1.js';
4
+ import './chunks/index.d-DHMNq1lu.js';
5
5
  import 'axios';
6
6
  import 'zod';
7
7
  import './chunks/schemas.d-b6_AekBb.js';
8
8
  import './ui/mq-avatar.js';
9
9
  import './ui/mq-button.js';
10
10
  import './ui/mq-skeleton.js';
11
- import './chunks/appointment.model.d-BWwBLaEL.js';
11
+ import './chunks/index-DwlJg2um.js';
12
12
  import '@tanstack/query-core';
13
13
 
14
14
  declare class MqChatRoomCloseEvent extends Event {
@@ -1 +1 @@
1
- export{M as MqChatRoom,a as MqChatRoomCloseEvent,b as MqChatRoomProfileEvent}from"./chunks/mq-chat-room-B_WgeuXn.js";import"./chunks/custom-element-D2ziPxYE.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/api-client-context-BXGqBAlO.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/lit-element-DiWJYFwC.js";import"./chunks/property-scuRaFcM.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/types.js";import"./ui/mq-avatar.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./ui/mq-button.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/query-controller-B1byDHlF.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"@tanstack/query-core";import"./chunks/chunk-BUV4MGML-CkhBbfUu.js";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/chunk-S5RWG6G2-CQJ38pW6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/query-CeeutdfT.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./events.js";import"./chunks/api-chat-client-s45J7LKB.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/isBefore-DBi1CiNR.js";import"./env.js";import"./chunks/chunk-Y4EKUX25-Bix9r5ry.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./i18n.js";import"./chunks/addDays-CdyO-PRI.js";import"./chunks/chunk-YTQUGGS3-DH0H7ld7.js";import"./chunks/mutation-controller-CR2qcqhH.js";
1
+ export{M as MqChatRoom,a as MqChatRoomCloseEvent,b as MqChatRoomProfileEvent}from"./chunks/mq-chat-room-BkXGHzrd.js";import"./chunks/custom-element-D2ziPxYE.js";import"./chunks/provide-BwI4DDGF.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/consume-CovVqBjI.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/localized-decorator-BlOuLhym.js";import"./chunks/runtime-Bg1WXVCx.js";import"./chunks/api-client-context-BXGqBAlO.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/lit-element-DiWJYFwC.js";import"./chunks/property-scuRaFcM.js";import"./chunks/state-LQivXIgA.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/icons/types.js";import"./ui/mq-avatar.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./ui/mq-button.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/query-controller-B1byDHlF.js";import"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import"@tanstack/query-core";import"./chunks/chunk-BUV4MGML-CkhBbfUu.js";import"./chunks/chunk-6CCJWPGL-TiaqZaPV.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/chunk-S5RWG6G2-CQJ38pW6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/query-CeeutdfT.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./events.js";import"./chunks/api-chat-client-Dx-sFrf2.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/isBefore-DBi1CiNR.js";import"./env.js";import"./chunks/chunk-Y4EKUX25-Bdei04iw.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./i18n.js";import"./chunks/addDays-CdyO-PRI.js";import"./chunks/chunk-YTQUGGS3-sBILRfPo.js";import"./chunks/index-Djkwyh_M.js";import"./chunks/mutation-controller-CR2qcqhH.js";
@@ -1,7 +1,7 @@
1
1
  import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, PropertyValues } from 'lit';
4
- import { M as MediquoApiChatClient } from './chunks/index.d-ByhRBSb1.js';
4
+ import { M as MediquoApiChatClient } from './chunks/index.d-DHMNq1lu.js';
5
5
  import { Env } from './env.js';
6
6
  import { Locale } from './i18n.js';
7
7
  import './ui/mq-skeleton.js';
@@ -9,23 +9,11 @@ import 'axios';
9
9
  import 'zod';
10
10
  import './chunks/schemas.d-b6_AekBb.js';
11
11
 
12
- /** The minimal session contract `mq-checkout` needs to render the gateway. */
13
- interface CheckoutSession {
14
- /** Identifier used to poll the payment status. */
15
- sessionId: string;
16
- /** Fully-qualified URL of the payment portal embedded in the iframe. */
17
- paymentUrl: string;
18
- }
19
- /** Async factory the host supplies to create (and re-create, on retry) a session. */
20
- /**
21
- * Creates the payment session this checkout should show.
22
- *
23
- * Receives the client this checkout authenticated with, so a caller that needs
24
- * to reach the API for the session speaks for the same organization and the
25
- * same patient session. Building your own client here would send the call with
26
- * no bearer.
27
- */
28
- type ProvideSession = (client: MediquoApiChatClient) => Promise<CheckoutSession>;
12
+ /** Why a payment ended without being charged, as seen by the host. */
13
+ type CheckoutErrorReason = "auth" | "session" | "timeout" | "unavailable" | "unsupported"
14
+ /** The signed reference is stale or invalid: the patient has to pick again. */
15
+ | "expired";
16
+
29
17
  declare class CheckoutSuccessEvent extends Event {
30
18
  readonly detail: {
31
19
  sessionId: string;
@@ -46,7 +34,10 @@ declare class CheckoutDeniedEvent extends Event {
46
34
  sessionId: string;
47
35
  });
48
36
  }
49
- type CheckoutErrorReason = "auth" | "session" | "timeout";
37
+ declare class CheckoutGrantedEvent extends Event {
38
+ static eventName: string;
39
+ constructor();
40
+ }
50
41
  declare class CheckoutErrorEvent extends Event {
51
42
  readonly detail: {
52
43
  reason: CheckoutErrorReason;
@@ -56,67 +47,59 @@ declare class CheckoutErrorEvent extends Event {
56
47
  reason: CheckoutErrorReason;
57
48
  });
58
49
  }
59
- declare class CheckoutRetryEvent extends Event {
60
- static eventName: string;
61
- constructor();
62
- }
63
50
  /**
64
- * Use-case agnostic payment gateway. Embeds the Mediquo payment portal in an
65
- * iframe, polls the backend for completion and surfaces the outcome through
66
- * generic events. It knows nothing about appointments — the host provides a
67
- * `provideSession` callback that returns `{ sessionId, paymentUrl }`, which the
68
- * component invokes for the initial load and again on every retry, so retries
69
- * are transparent to the integrator.
51
+ * Use-case agnostic payment gateway. Embeds the hosted Mediquo checkout in an
52
+ * iframe and surfaces the outcome it reports through generic events. The
53
+ * checkout creates the payment session and takes the patient through payment
54
+ * itself, so integrators configure nothing payment-related: they only say what
55
+ * is being paid (`payable-reference`) and, optionally, a coupon already
56
+ * validated on their side.
70
57
  *
71
58
  * Must be rendered inside `<mq-theme-provider>`.
72
59
  *
73
- * @fires payment-success - Payment confirmed (status === "paid"). Detail: `{ sessionId, reference }`.
74
- * @fires payment-denied - Payment rejected (status === "denied"). Detail: `{ sessionId }`.
75
- * @fires payment-error - Auth, session creation or polling timeout failure. Detail: `{ reason }`.
76
- * @fires payment-retry - Notification only — the portal requested a retry. Re-creation is handled internally.
60
+ * @fires payment-success - Payment confirmed. Detail: `{ sessionId, reference }`.
61
+ * @fires payment-denied - Payment rejected; the checkout lets the patient try again. Detail: `{ sessionId }`.
62
+ * @fires payment-granted - Nothing to pay: the patient may already consult for free.
63
+ * @fires payment-error - The payment cannot go on. Detail: `{ reason }`.
77
64
  */
78
65
  declare class MqCheckout extends LitElement {
79
66
  static styles: lit.CSSResult[];
80
- /**
81
- * Backend environment. Applied before authentication, so set it once at
82
- * mount — changing it later rebuilds the API client and drops the session.
83
- */
67
+ /** Backend environment. Defaults to the one this build targets. */
84
68
  env?: Env;
85
69
  apiKey: string;
70
+ /** Raw integrator user token; exchanged here for the session token the checkout sends. */
86
71
  token: string;
87
72
  locale: Locale;
88
- /**
89
- * Async factory returning the payment session. Set as a JS property
90
- * (`el.provideSession = …` / `.provideSession=${…}`), never an attribute.
91
- */
92
- provideSession?: ProvideSession;
93
- private _iframeLoaded;
94
- private _iframeHeight;
95
- private _sessionEpoch;
96
- private _currentSessionId;
97
- private _paymentOrigin;
73
+ /** Signed reference of what is being paid: `appt_…`, `chat_…` or `vc_…`. */
74
+ payableReference?: string;
75
+ /** Discount coupon already validated by the host; reloads the checkout when it changes. */
76
+ discountCode?: string;
77
+ consultationReason?: string;
98
78
  /** The organization scope this element was mounted under, if any. */
99
79
  private inheritedApiClient?;
100
- /**
101
- * This element's own transport, bound to its `api-key` and provided to every
102
- * descendant. Never shared with another element.
103
- */
80
+ /** This element's own transport, bound to its `api-key` and provided to every descendant. */
104
81
  apiClient: MediquoApiChatClient;
105
- /** Session token from the login exchange; survives a client rebuild. */
106
- private _sessionToken?;
82
+ private _iframe?;
83
+ private _iframeLoaded;
84
+ private _iframeHeight;
85
+ private _reportedReason;
86
+ private _renderedUrl;
107
87
  private _loginTokenTask;
108
- private _sessionTask;
109
- private _paymentPoll;
110
- get _timedOut(): boolean;
111
88
  connectedCallback(): void;
112
89
  disconnectedCallback(): void;
113
90
  protected willUpdate(changed: PropertyValues<this>): void;
91
+ protected updated(): void;
92
+ /** The element's own `api-key`, or the organization it was mounted under. */
93
+ private get _apiKey();
94
+ /** Why the checkout cannot even be opened, when the host left something out. */
95
+ private get _missingInput();
96
+ private get _url();
114
97
  private _onIframeLoad;
115
98
  private _onMessage;
116
99
  private _renderState;
117
- private _renderLoading;
118
- private _renderFrame;
119
- render(): lit_html.TemplateResult<1> | undefined;
100
+ private _renderMissingInput;
101
+ private _renderSkeleton;
102
+ render(): lit_html.TemplateResult<1>;
120
103
  }
121
104
  declare global {
122
105
  interface HTMLElementTagNameMap {
@@ -124,5 +107,5 @@ declare global {
124
107
  }
125
108
  }
126
109
 
127
- export { CheckoutDeniedEvent, CheckoutErrorEvent, CheckoutRetryEvent, CheckoutSuccessEvent, MqCheckout };
128
- export type { CheckoutErrorReason, CheckoutSession, ProvideSession };
110
+ export { CheckoutDeniedEvent, CheckoutErrorEvent, CheckoutGrantedEvent, CheckoutSuccessEvent, MqCheckout };
111
+ export type { CheckoutErrorReason };
@@ -1 +1 @@
1
- import{_ as t,c as e}from"./chunks/custom-element-D2ziPxYE.js";import{e as s}from"./chunks/provide-BwI4DDGF.js";import{c as i}from"./chunks/consume-CovVqBjI.js";import{m as o}from"./chunks/runtime-Bg1WXVCx.js";import{l as n}from"./chunks/localized-decorator-BlOuLhym.js";import{h as r}from"./chunks/task-Bj8p7kJX.js";import{c as a,P as h,n as c}from"./chunks/api-chat-client-s45J7LKB.js";import{A as d}from"./chunks/api-client-context-BXGqBAlO.js";import{L as l}from"./chunks/login-token-task-Yib__6a9.js";import{l as p}from"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import{i as m,a as u,x as v}from"./chunks/lit-element-DiWJYFwC.js";import{n as _}from"./chunks/property-scuRaFcM.js";import{r as f}from"./chunks/state-LQivXIgA.js";import{setEnv as k}from"./env.js";import{tokens as y}from"./theme.js";import{initLocalization as g,setLocale as E,isValidLocale as C}from"./i18n.js";import"./ui/mq-skeleton.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/external-JLtsAfi6.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";var x=class{constructor(t,e){this.host=t,this.options=e,this._deadline=0,this._timedOut=!1,this.host.addController(this)}get timedOut(){return this._timedOut}hostConnected(){const t=this.options.intervalMs??1e3,e=void 0!==this.options.startDelayMs?this.options.startDelayMs:t;this._deadline=Date.now()+this.options.timeoutMs,this._timedOut=!1,this._startTimeoutId=setTimeout(()=>{this._startTimeoutId=void 0,this._poll(),this._intervalId=setInterval(()=>{this._poll()},t)},e)}hostDisconnected(){this._stop()}stop(){this._stop()}async _poll(){if(Date.now()>=this._deadline)return this._stop(),this._timedOut=!0,this.host.requestUpdate(),void this.options.onTimeout?.();try{const t=await this.options.refetchFn();this.options.shouldComplete(t)&&(this._stop(),this.options.onComplete?.(t))}catch{}}_stop(){void 0!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),void 0!==this._startTimeoutId&&(clearTimeout(this._startTimeoutId),this._startTimeoutId=void 0)}};try{g()}catch{}const b=m`:host{height:100%;min-height:0;display:flex;flex-direction:column;flex:1}.payment-frame{position:relative;width:100%;min-width:0;display:flex;flex-direction:column;flex:1;min-height:0}.payment-frame iframe:not(.loaded){position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:none}.payment-frame iframe.loaded{flex:none;display:block;width:100%;border:none;min-height:1050px}.state{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:var(--sp-4);padding:var(--sp-8);text-align:center}.state-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);margin:0}.state-message{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);margin:0}`,w="mediquo:payment:retry",j="mediquo:payment:resize";class CheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(t){super(CheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class CheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(t){super(CheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class CheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(t){super(CheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}class CheckoutRetryEvent extends Event{static{this.eventName="payment-retry"}constructor(){super(CheckoutRetryEvent.eventName,{bubbles:!0,composed:!0})}}let S=class MqCheckout extends u{constructor(){super(...arguments),this._iframeLoaded=!1,this._iframeHeight=null,this._sessionEpoch=0,this._currentSessionId=null,this._paymentOrigin=null,this.apiClient=a(),this._loginTokenTask=new l(this,()=>this.apiClient,{args:()=>[this.apiKey,this.token],onComplete:t=>{this._sessionToken=t.access_token,this.apiClient.setAuthToken(t.access_token),this._sessionTask.run()},onError:()=>{this.dispatchEvent(new CheckoutErrorEvent({reason:"auth"}))}}),this._sessionTask=new r(this,{task:async()=>{if("function"!=typeof this.provideSession)throw new Error("mq-checkout: `provideSession` property is required");return this.provideSession(this.apiClient)},args:()=>[this._sessionEpoch],autoRun:!1,onComplete:t=>{this._currentSessionId=t.sessionId,this._iframeLoaded=!1,this._iframeHeight=null;try{this._paymentOrigin=new URL(t.paymentUrl).origin}catch{this._paymentOrigin=null,p.warn(`mq-checkout: invalid paymentUrl "${t.paymentUrl}"`)}},onError:()=>{this.dispatchEvent(new CheckoutErrorEvent({reason:"session"}))}}),this._paymentPoll=new x(this,{startDelayMs:5e3,intervalMs:3e3,timeoutMs:6e5,refetchFn:async()=>{if(!this._currentSessionId)throw new Error("mq-checkout: session not ready");const t=await this.apiClient.payments.getPaymentSession(this._currentSessionId);return t.status===h.Denied&&(this._paymentPoll.stop(),this.dispatchEvent(new CheckoutDeniedEvent({sessionId:this._currentSessionId}))),t},shouldComplete:t=>t.status===h.Paid,onComplete:t=>{this.dispatchEvent(new CheckoutSuccessEvent({sessionId:this._currentSessionId??"",reference:t.consultation_id}))},onTimeout:()=>{this.dispatchEvent(new CheckoutErrorEvent({reason:"timeout"}))}}),this._onMessage=t=>{if(!this._paymentOrigin||t.origin===this._paymentOrigin)switch(t.data?.type){case w:return this.dispatchEvent(new CheckoutRetryEvent),this._sessionEpoch+=1,void this._sessionTask.run();case j:return void("number"==typeof t.data.height&&(this._iframeHeight=t.data.height))}}}static{this.styles=[y,b]}get _timedOut(){return this._paymentPoll.timedOut}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage)}disconnectedCallback(){window.removeEventListener("message",this._onMessage),super.disconnectedCallback()}willUpdate(t){t.has("env")&&this.env&&k(this.env),t.has("locale")&&E(C(this.locale)?this.locale:"es_ES");const e=c(t,{env:this.env,apiKey:this.apiKey,token:this._sessionToken,locale:C(this.locale)?this.locale:"es_ES"},this.inheritedApiClient);e&&(this.apiClient=e)}_onIframeLoad(){this._iframeLoaded=!0}_renderState(t,e){return v`<div class="state"><p class="state-title">${t}</p>${e?v`<p class="state-message">${e}</p>`:null}</div>`}_renderLoading(){return v`<div class="payment-frame"><mq-skeleton width="100%" height="600px" border-radius="md" role="status" aria-live="polite" aria-label="${o("Cargando portal de pago")}"></mq-skeleton></div>`}_renderFrame(t){return v`<div class="payment-frame">${this._iframeLoaded?null:this._renderLoading()}<iframe class="${this._iframeLoaded?"loaded":""}" src="${t}" title="${o("Portal de pago")}" style="${null!==this._iframeHeight?`min-height: ${this._iframeHeight}px; height: ${this._iframeHeight}px;`:""}" @load="${this._onIframeLoad}"></iframe></div>`}render(){return this._timedOut?this._renderState(o("No hemos podido confirmar tu pago"),o("Ha ocurrido un problema al verificar el estado de tu pago. Por favor, contacta con soporte si el cargo se ha realizado.")):this._loginTokenTask.render({pending:()=>this._renderLoading(),error:()=>this._renderState(o("No hemos podido iniciar el pago"),o("Por favor, inténtalo de nuevo más tarde.")),complete:()=>this._sessionTask.render({initial:()=>this._renderLoading(),pending:()=>this._renderLoading(),error:()=>this._renderState(o("No hemos podido iniciar el pago"),o("Por favor, inténtalo de nuevo más tarde.")),complete:t=>this._renderFrame(t.paymentUrl)})})}};t([_({type:String,attribute:"env"})],S.prototype,"env",void 0),t([_({type:String,attribute:"api-key"})],S.prototype,"apiKey",void 0),t([_({type:String,attribute:"token"})],S.prototype,"token",void 0),t([_({type:String,attribute:"locale",reflect:!0})],S.prototype,"locale",void 0),t([_({attribute:!1})],S.prototype,"provideSession",void 0),t([f()],S.prototype,"_iframeLoaded",void 0),t([f()],S.prototype,"_iframeHeight",void 0),t([f()],S.prototype,"_sessionEpoch",void 0),t([i({context:d,subscribe:!0}),f()],S.prototype,"inheritedApiClient",void 0),t([s({context:d}),f()],S.prototype,"apiClient",void 0),S=t([n(),e("mq-checkout")],S);export{CheckoutDeniedEvent,CheckoutErrorEvent,CheckoutRetryEvent,CheckoutSuccessEvent,S as MqCheckout};
1
+ import{_ as e,c as t}from"./chunks/custom-element-D2ziPxYE.js";import{e as s}from"./chunks/provide-BwI4DDGF.js";import{c as i}from"./chunks/consume-CovVqBjI.js";import{m as n}from"./chunks/runtime-Bg1WXVCx.js";import{l as o}from"./chunks/localized-decorator-BlOuLhym.js";import{s as r}from"./chunks/task-CqjSKFwZ.js";import{A as a}from"./chunks/api-client-context-BXGqBAlO.js";import{L as c}from"./chunks/login-token-task-NQJ77O_q.js";import{i as h,a as l,x as d}from"./chunks/lit-element-DiWJYFwC.js";import{n as p}from"./chunks/property-scuRaFcM.js";import{r as u}from"./chunks/state-LQivXIgA.js";import{e as m}from"./chunks/query-CeeutdfT.js";import{env as v}from"./env.js";import{tokens as f}from"./theme.js";import{initLocalization as k,setLocale as g,isValidLocale as y}from"./i18n.js";import{c as _,n as b}from"./chunks/api-chat-client-Dx-sFrf2.js";import"./ui/mq-skeleton.js";import{i as E,p as x,b as C}from"./chunks/checkout-bridge-BFpVxNww.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/chunk-FUCSYDW7-Duj5hy8S.js";import"./chunks/external-cM_kgYO_.js";import"./chunks/chunk-NIAGR3ZC-BDlNUZa1.js";import"./chunks/parseISO-CEksKisk.js";import"./chunks/isBefore-DBi1CiNR.js";import"./chunks/style-map-CIdqdn7C.js";import"./chunks/directive-2EDmOukv.js";try{k()}catch{}const j=h`:host{height:100%;min-height:0;display:flex;flex-direction:column;flex:1}.payment-frame{position:relative;width:100%;min-width:0;display:flex;flex-direction:column;flex:1;min-height:0}.payment-frame iframe:not(.loaded){position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:none}.payment-frame iframe.loaded{flex:none;display:block;width:100%;border:none;min-height:400px}.state{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:var(--sp-4);padding:var(--sp-8);text-align:center}.state-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);margin:0}.state-message{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);margin:0}`;class CheckoutSuccessEvent extends Event{static{this.eventName="payment-success"}constructor(e){super(CheckoutSuccessEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class CheckoutDeniedEvent extends Event{static{this.eventName="payment-denied"}constructor(e){super(CheckoutDeniedEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}class CheckoutGrantedEvent extends Event{static{this.eventName="payment-granted"}constructor(){super(CheckoutGrantedEvent.eventName,{bubbles:!0,composed:!0})}}class CheckoutErrorEvent extends Event{static{this.eventName="payment-error"}constructor(e){super(CheckoutErrorEvent.eventName,{bubbles:!0,composed:!0}),this.detail=e}}let w=class MqCheckout extends l{constructor(){super(...arguments),this.apiClient=_(),this._iframeLoaded=!1,this._iframeHeight=null,this._reportedReason=null,this._renderedUrl=null,this._loginTokenTask=new c(this,()=>this.apiClient,{args:()=>[this._apiKey,this.token]}),this._onMessage=e=>{if(!E(e,this._iframe?.contentWindow))return;const t=x(e.data);switch(t?.type){case"resize":return void(this._iframeHeight=t.height);case"success":return void this.dispatchEvent(new CheckoutSuccessEvent({sessionId:t.sessionId,reference:t.reference}));case"denied":return void this.dispatchEvent(new CheckoutDeniedEvent({sessionId:t.sessionId}));case"granted":return void this.dispatchEvent(new CheckoutGrantedEvent);case"error":return void this.dispatchEvent(new CheckoutErrorEvent({reason:t.reason}))}}}static{this.styles=[f,j]}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage)}disconnectedCallback(){window.removeEventListener("message",this._onMessage),super.disconnectedCallback()}willUpdate(e){const t=b(e,{env:this.env,apiKey:this.apiKey},this.inheritedApiClient);t&&(this.apiClient=t),e.has("locale")&&g(y(this.locale)?this.locale:"es_ES"),this._url!==this._renderedUrl&&(this._renderedUrl=this._url,this._iframeLoaded=!1,this._iframeHeight=null)}updated(){const e=this._missingInput;e&&e!==this._reportedReason&&this.dispatchEvent(new CheckoutErrorEvent({reason:e})),this._reportedReason=e}get _apiKey(){return this.apiKey||this.inheritedApiClient?.getApiKey()}get _missingInput(){return this.payableReference?this._apiKey&&this.token?this._loginTokenTask.status===r.ERROR?"auth":null:"auth":"unsupported"}get _url(){const e=this._loginTokenTask.status===r.COMPLETE?this._loginTokenTask.value?.access_token:void 0;return this._missingInput||!e?null:C({apiKey:this._apiKey,token:e,payableReference:this.payableReference,env:this.env??v.MODE,locale:y(this.locale)?this.locale:"es_ES",discountCode:this.discountCode,consultationReason:this.consultationReason,methods:["card"]})}_onIframeLoad(){this._iframeLoaded=!0}_renderState(e,t){return d`<div class="state"><p class="state-title">${e}</p><p class="state-message">${t}</p></div>`}_renderMissingInput(e){return"unsupported"===e?this._renderState(n("Esta consulta no se puede pagar aquí"),n("Por favor, contacta con soporte para poder continuar.")):this._renderState(n("No hemos podido iniciar el pago"),n("Por favor, inténtalo de nuevo más tarde."))}_renderSkeleton(){return d`<mq-skeleton width="100%" height="400px" border-radius="md" role="status" aria-live="polite" aria-label="${n("Cargando portal de pago")}"></mq-skeleton>`}render(){const e=this._missingInput,t=this._url;return e?this._renderMissingInput(e):t?d`<div class="payment-frame">${this._iframeLoaded?null:this._renderSkeleton()}<iframe class="${this._iframeLoaded?"loaded":""}" src="${t}" title="${n("Portal de pago")}" allow="payment" style="${null!==this._iframeHeight?`height: ${this._iframeHeight}px;`:""}" @load="${this._onIframeLoad}"></iframe></div>`:d`<div class="payment-frame">${this._renderSkeleton()}</div>`}};e([p({type:String,attribute:"env"})],w.prototype,"env",void 0),e([p({type:String,attribute:"api-key"})],w.prototype,"apiKey",void 0),e([p({type:String,attribute:"token"})],w.prototype,"token",void 0),e([p({type:String,attribute:"locale",reflect:!0})],w.prototype,"locale",void 0),e([p({type:String,attribute:"payable-reference"})],w.prototype,"payableReference",void 0),e([p({type:String,attribute:"discount-code"})],w.prototype,"discountCode",void 0),e([p({type:String,attribute:"consultation-reason"})],w.prototype,"consultationReason",void 0),e([i({context:a,subscribe:!0}),u()],w.prototype,"inheritedApiClient",void 0),e([s({context:a}),u()],w.prototype,"apiClient",void 0),e([m("iframe")],w.prototype,"_iframe",void 0),e([u()],w.prototype,"_iframeLoaded",void 0),e([u()],w.prototype,"_iframeHeight",void 0),w=e([o(),t("mq-checkout")],w);export{CheckoutDeniedEvent,CheckoutErrorEvent,CheckoutGrantedEvent,CheckoutSuccessEvent,w as MqCheckout};
@@ -1,7 +1,7 @@
1
1
  import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, nothing, PropertyValues } from 'lit';
4
- import { M as MediquoApiChatClient, b as GetOrganizationSetupResponse } from './chunks/index.d-ByhRBSb1.js';
4
+ import { M as MediquoApiChatClient, b as GetOrganizationSetupResponse } from './chunks/index.d-DHMNq1lu.js';
5
5
  import { L as LoginTokenResponse } from './chunks/schemas.d-b6_AekBb.js';
6
6
  import { Env } from './env.js';
7
7
  import './mq-next-appointments.js';
@@ -15,17 +15,17 @@ import 'axios';
15
15
  import 'zod';
16
16
  import './chunks/index-Nf3nZ9O3.js';
17
17
  import './chunks/index-DTEtqjQF.js';
18
- import './chunks/next-appointment-card-CPg9FuOI.js';
19
- import './chunks/mq-chat-room-C8wCADp2.js';
20
- import './chunks/appointment.model.d-BWwBLaEL.js';
18
+ import './chunks/next-appointment-card-Z5G1jqtz.js';
19
+ import './chunks/mq-chat-room-C0dJCvpV.js';
20
+ import './chunks/index-DwlJg2um.js';
21
21
  import '@tanstack/query-core';
22
22
  import './ui/mq-dialog.js';
23
23
  import './chunks/price.d-CwLosdAN.js';
24
- import './chunks/professional-overview-mO3tuMuH.js';
24
+ import './chunks/professional-overview-QVHl_ITk.js';
25
25
  import './ui/mq-text-button.js';
26
26
  import './ui/mq-floating-bubble.js';
27
27
  import './ui/mq-unread-badge.js';
28
- import './chunks/index-DFaKhE7Q.js';
28
+ import './chunks/index-fut7tm1R.js';
29
29
  import './chunks/document.model.d-DIzMiOmd.js';
30
30
 
31
31
  declare class SupportChatBanner extends LitElement {