@alfadocs/ui-kit 1.52.0 → 1.54.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.
- package/dist/_chunks/{Alfadocs_Logo_Mark-7o3L3WBI.js → Alfadocs_Logo_Mark-Z_b6ZI1g.js} +22 -9
- package/dist/_chunks/{actions-cell-renderer-DhmUGzRY.js → actions-cell-renderer-CjzSqMgn.js} +3 -3
- package/dist/_chunks/{address-autocomplete-BVLoHU3E.js → address-autocomplete-BBZ0u_U1.js} +100 -99
- package/dist/_chunks/address-fields-1pD-8hML.js +292 -0
- package/dist/_chunks/{agenda-tray-C-_iu6Fo.js → agenda-tray-B8vuZKjH.js} +3 -3
- package/dist/_chunks/{ai-credits-notice-Da0fJPXO.js → ai-credits-notice-D9_qP2xc.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-C5q_uHBA.js → ai-permission-notice-Cr6o1f0f.js} +3 -3
- package/dist/_chunks/{ai-prompt-input-IObcUWqB.js → ai-prompt-input-DkL8W-nt.js} +3 -3
- package/dist/_chunks/{alia-sidebar-DyQMsyiz.js → alia-sidebar-DSUQ2RpK.js} +6 -6
- package/dist/_chunks/{anamnesis-card-D4RWzQXP.js → anamnesis-card-BT1tMt5O.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-DaSoA80I.js → anamnesis-summary-rows-BMjSBqhS.js} +20 -20
- package/dist/_chunks/apexcharts-theme-DNoXvgnZ.js +105 -0
- package/dist/_chunks/{appointment-peek-DpPzeYXm.js → appointment-peek-Cbrg36wj.js} +3 -3
- package/dist/_chunks/{appointment-timeline-BZErHbD1.js → appointment-timeline-CssAJLpL.js} +4 -4
- package/dist/_chunks/{appointment-tray-DR_Zm4Gw.js → appointment-tray-EQUjllVy.js} +3 -3
- package/dist/_chunks/{audio-recorder-BafA28cX.js → audio-recorder-BM68r6fe.js} +3 -3
- package/dist/_chunks/auth-form-parts-Celi-TLV.js +85 -0
- package/dist/_chunks/{autocomplete-IfLaXwyb.js → autocomplete-BXm1rnT0.js} +229 -220
- package/dist/_chunks/{balance-badge-cell-CS-iKkLM.js → balance-badge-cell-BDX1Krdv.js} +5 -5
- package/dist/_chunks/{bishop-score-BfDsm9HH.js → bishop-score-CGAVpIWL.js} +3 -3
- package/dist/_chunks/{bmi-calculator-BNtmMzQy.js → bmi-calculator-g_wjo4nq.js} +5 -5
- package/dist/_chunks/booking-CPUjwxj0.js +3710 -0
- package/dist/_chunks/{button-group-DnSR6eN6.js → button-group-CpEycMps.js} +2 -2
- package/dist/_chunks/{calendar-workspace-B9MKJXER.js → calendar-workspace-BbZIx2PT.js} +32 -32
- package/dist/_chunks/{care-plan-card-BanlKJZn.js → care-plan-card-BqI-_B4T.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-ByqT84_P.js → care-plan-entry-card-CbsZmfQM.js} +2 -2
- package/dist/_chunks/{care-plan-header-BwfUHMgM.js → care-plan-header-BIS4CGcp.js} +3 -3
- package/dist/_chunks/{carousel.agent-WKODAYVw.js → carousel.agent-DW9iPLdy.js} +2 -2
- package/dist/_chunks/{chart-CuE30cfr.js → chart-C134Ibwm.js} +81 -81
- package/dist/_chunks/{chat-input-DA10w969.js → chat-input-Bg99kcl3.js} +2 -2
- package/dist/_chunks/{chat-message-DoMjMa-M.js → chat-message-D4rvLoIJ.js} +2 -2
- package/dist/_chunks/{checkbox-CZkipDn7.js → checkbox--ndmyokr.js} +19 -15
- package/dist/_chunks/{checkbox-group-C7czpHmJ.js → checkbox-group-B0oZHNT3.js} +2 -2
- package/dist/_chunks/{city-input-CAnTVgBZ.js → city-input-DyxVWSRQ.js} +10 -9
- package/dist/_chunks/{clinical-note-card-kvlUrmP-.js → clinical-note-card-gmWXEwSu.js} +2 -2
- package/dist/_chunks/{code-block-NtHjtagI.js → code-block-CRVa-Thh.js} +2 -2
- package/dist/_chunks/{color-picker-Yl99lHuF.js → color-picker-Bu0wM8xv.js} +50 -50
- package/dist/_chunks/combobox-DppVSuUm.js +614 -0
- package/dist/_chunks/{connection-status-Dz8o-Fui.js → connection-status-BwTnjnUj.js} +2 -2
- package/dist/_chunks/{contact-card-D2gXrxlL.js → contact-card-CIVCcicP.js} +2 -2
- package/dist/_chunks/{contact-profile-card-B7cXr8g5.js → contact-profile-card-h0QX4_5B.js} +3 -3
- package/dist/_chunks/{control-room-rail-B446rHSL.js → control-room-rail-g4vNSPFi.js} +3 -3
- package/dist/_chunks/{country-select-BYa4BrEi.js → country-select-r3QC7cVA.js} +139 -113
- package/dist/_chunks/{cycle-calculator-D_5f9VSN.js → cycle-calculator-CwDEdmda.js} +4 -4
- package/dist/_chunks/{dashboard-grid-DWNP02Ff.js → dashboard-grid--rkojX6m.js} +2 -2
- package/dist/_chunks/{data-table-DJvEwZZx.js → data-table-DeUoJzNn.js} +8 -8
- package/dist/_chunks/{data-table-tabs-Dc6zvoI_.js → data-table-tabs-BfEmXvUk.js} +4 -4
- package/dist/_chunks/{date-picker-p9yz3pxc.js → date-picker-BnhBmcH6.js} +31 -31
- package/dist/_chunks/{date-range-picker-DIy8gNY0.js → date-range-picker-Dg050N1d.js} +65 -65
- package/dist/_chunks/{date-time-picker-C3UVzqOm.js → date-time-picker-Ckl6ezCL.js} +50 -49
- package/dist/_chunks/{description-list-9rchqp5q.js → description-list-BKQMUiXv.js} +2 -2
- package/dist/_chunks/dev-bypass-button-Y1s7gPSD.js +33 -0
- package/dist/_chunks/dev-bypass-button.agent-BJqFSTqE.js +17 -0
- package/dist/_chunks/{document-preview-1CZJg6CX.js → document-preview-C_6R_VZK.js} +4 -4
- package/dist/_chunks/{document-scanner-T5jHiraQ.js → document-scanner-pADVX447.js} +2 -2
- package/dist/_chunks/{due-date-calculator-iJXm6HOj.js → due-date-calculator-_0Dz_d7n.js} +6 -6
- package/dist/_chunks/{editable-currency-cell-renderer-DdMHme5y.js → editable-currency-cell-renderer-CfFp_1hI.js} +3 -3
- package/dist/_chunks/{editable-description-Cy3AZ5K2.js → editable-description-CCrAEJMq.js} +2 -2
- package/dist/_chunks/{editor-overlay-C0awV6ba.js → editor-overlay-CWV0chPV.js} +2 -2
- package/dist/_chunks/{email-input-ebdovOmh.js → email-input-Cmeo4zdT.js} +88 -86
- package/dist/_chunks/{empty-state-DActfjdn.js → empty-state-CgvmPPvW.js} +71 -66
- package/dist/_chunks/{entity-summary-oW3_jFhU.js → entity-summary-C3E4JKVr.js} +3 -3
- package/dist/_chunks/{error-boundary--w5hYiQ-.js → error-boundary-Bzjk9Q2l.js} +2 -2
- package/dist/_chunks/error-page-CKFJlekz.js +275 -0
- package/dist/_chunks/error-page-illustration-QGJAvuFB.js +459 -0
- package/dist/_chunks/{face-scheme-Dg7KcbW2.js → face-scheme-pZgT26gB.js} +8 -8
- package/dist/_chunks/{fetal-weight-BoIkl2t1.js → fetal-weight-CbE61Uyk.js} +3 -3
- package/dist/_chunks/{field-array-BF2nCmvt.js → field-array-DGiIHCdy.js} +2 -2
- package/dist/_chunks/{file-manager-BGHShxn_.js → file-manager-DdsAd4TQ.js} +8 -8
- package/dist/_chunks/{file-upload-OMlGHz70.js → file-upload-CxjCs7TX.js} +46 -46
- package/dist/_chunks/{fiscal-code-input-CuuE8_dt.js → fiscal-code-input-DNA_SbQx.js} +69 -69
- package/dist/_chunks/forgot-password-form-DVVOBEGj.js +203 -0
- package/dist/_chunks/form-field-D9WfDpYB.js +165 -0
- package/dist/_chunks/form-field-context-DtiROUJV.js +36 -0
- package/dist/_chunks/{freemium-paywall-BhxKSEJD.js → freemium-paywall-CtUCj-ND.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CjZ7v-8x.js → gestational-age-calculator-BMkoLJGR.js} +7 -7
- package/dist/_chunks/{hcg-doubling-BYMogA0e.js → hcg-doubling-BtW2pBJX.js} +4 -4
- package/dist/_chunks/{header-CzJbtTGQ.js → header--a4ZTiM5.js} +6 -3
- package/dist/_chunks/{header-settings-BqdBe4zk.js → header-settings-kkVm9VP3.js} +3 -3
- package/dist/_chunks/{help-me-write-templates-CGCyhAVE.js → help-me-write-templates-Cy-iO5AU.js} +8 -8
- package/dist/_chunks/{hover-card-DEMPFs9M.js → hover-card-CcRSI4gy.js} +2 -2
- package/dist/_chunks/{iban-input-D88HRGZo.js → iban-input-CpOUMMR-.js} +35 -35
- package/dist/_chunks/{icon-button-group-DHRz90jY.js → icon-button-group-BsQkbCX4.js} +2 -2
- package/dist/_chunks/{icon-button-JAXAkqWC.js → icon-button-mKIvw90h.js} +31 -30
- package/dist/_chunks/{icon-picker-C5Fhx1-3.js → icon-picker-CSViTQL9.js} +3 -3
- package/dist/_chunks/{index.modern-Zta-A4Jm.js → index.modern-BeRXQVdc.js} +3 -2
- package/dist/_chunks/{info-tip-DfmEvyAF.js → info-tip-Czh1izZ6.js} +2 -2
- package/dist/_chunks/is-development-CLUAnsU7.js +11 -0
- package/dist/_chunks/{key-value-pair-DZH8ESsc.js → key-value-pair-BkXjt88Z.js} +2 -2
- package/dist/_chunks/{kit-extensions-CF5mDF_Z.js → kit-extensions-Kca1tkfP.js} +6 -6
- package/dist/_chunks/{link-BlVUIKk1.js → link-2HokYuIi.js} +19 -18
- package/dist/_chunks/{link-cell-renderer-DvcbSHyp.js → link-cell-renderer-D-xv2HMS.js} +7 -7
- package/dist/_chunks/{locale-picker-DYDppQdZ.js → locale-picker-BhNIgeXA.js} +3 -3
- package/dist/_chunks/log-in-OQUEoGhX.js +16 -0
- package/dist/_chunks/login-dev-card-C7wo-Hv1.js +275 -0
- package/dist/_chunks/{logo-1FuSGx0n.js → logo-CuaqxTGK.js} +128 -77
- package/dist/_chunks/{map-view-CmNGS6Ok.js → map-view-CQmqQJwK.js} +158 -129
- package/dist/_chunks/mark-pieces-m_rn1mAc.js +46 -0
- package/dist/_chunks/{marketplace-app-shell-rd1bSSm4.js → marketplace-app-shell-DbEfoNxe.js} +6 -6
- package/dist/_chunks/{message-card-Dub3790J.js → message-card-C1buKlzM.js} +2 -2
- package/dist/_chunks/{message-tray-CTd6CsnG.js → message-tray-DyBVqlGj.js} +3 -3
- package/dist/_chunks/{multi-select-Bx0_cgPI.js → multi-select-CVb6PJOK.js} +87 -85
- package/dist/_chunks/{muscle-scheme-X2bdmsQt.js → muscle-scheme-DfYQ0Z3v.js} +2 -2
- package/dist/_chunks/{nav-grid-BnY0Ilet.js → nav-grid-BPbmzHY0.js} +2 -2
- package/dist/_chunks/{note-attachment-CpPRIfSn.js → note-attachment-I1NLoeRZ.js} +2 -2
- package/dist/_chunks/{note-timeline-CZUmobcn.js → note-timeline-CsY8YOE7.js} +2 -2
- package/dist/_chunks/{notes-panel-CPfxz-1j.js → notes-panel-BPb-2ZnJ.js} +6 -6
- package/dist/_chunks/{notification-card-B39g86vM.js → notification-card-DubeUbVJ.js} +2 -2
- package/dist/_chunks/{notification-tray-WsP7c1jf.js → notification-tray-DJ0gtfu6.js} +3 -3
- package/dist/_chunks/{number-input-BLrx3utH.js → number-input-DRDRYZJg.js} +41 -41
- package/dist/_chunks/{optical-prescription-x--Rpmmx.js → optical-prescription-DBvebioV.js} +5 -5
- package/dist/_chunks/{otp-input-Dz8WMg4F.js → otp-input-BedEqmIV.js} +47 -45
- package/dist/_chunks/{panel-subview-DAY-ToM3.js → panel-subview-D8HGXaUa.js} +2 -2
- package/dist/_chunks/password-input-B7pQTk7l.js +447 -0
- package/dist/_chunks/{patient-details-BSAMAd3I.js → patient-details-BP9r_lNS.js} +3 -3
- package/dist/_chunks/{patient-field-row-dUF2cW2G.js → patient-field-row-BK9JjbzA.js} +19 -19
- package/dist/_chunks/{patient-search-CXl0FNfN.js → patient-search-Dm3w0jWw.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DF-Mxcma.js → patient-summary-card-DGbRLzF1.js} +6 -6
- package/dist/_chunks/{payment-form-DxsjXYHJ.js → payment-form-B08gHZIY.js} +327 -295
- package/dist/_chunks/{payment-request-card-BFsmHLtf.js → payment-request-card-CR7SjsRs.js} +4 -4
- package/dist/_chunks/{pdf-viewer-hzfM5pZf.js → pdf-viewer-zv7pkUPA.js} +2 -2
- package/dist/_chunks/{periodontal-chart-Bvii6uOg.js → periodontal-chart-5nLsSuRM.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-DTbvFQO7.js → periodontal-chart-card-Djr3en8Q.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-BqEo0usu.js → periodontal-diagnosis-DmVIqXtC.js} +4 -4
- package/dist/_chunks/{permission-matrix-DHKECaNW.js → permission-matrix-DuTkUHxe.js} +3 -3
- package/dist/_chunks/{phone-input-opMMHkyh.js → phone-input-BzeUr49H.js} +253 -204
- package/dist/_chunks/{popover-CGYPYIVi.js → popover-9_v-7fJc.js} +2 -2
- package/dist/_chunks/{postal-code-input-Dv02t5MD.js → postal-code-input-BmbqjkfD.js} +71 -71
- package/dist/_chunks/{practice-results-DjhcggtZ.js → practice-results-D3liWOz1.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-CcPxK3S3.js → pregnancy-dating-DV3o2PPl.js} +8 -8
- package/dist/_chunks/{pregnancy-weight-gain-tGbbravi.js → pregnancy-weight-gain-BLjWgtS9.js} +5 -5
- package/dist/_chunks/{privacy-lock-Bh4O7Y7g.js → privacy-lock-KDPKiTpH.js} +3 -3
- package/dist/_chunks/{privacy-mask-noG15O9q.js → privacy-mask-H8yYwgIb.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BmBzDba9.js → product-hub-panel-M5X3TYzq.js} +4 -4
- package/dist/_chunks/{province-select-BZtM0RSR.js → province-select-DtF2ukoC.js} +92 -79
- package/dist/_chunks/{public-footer.agent-CVYmHY94.js → public-footer-Bfs81Qzp.js} +188 -219
- package/dist/_chunks/public-footer.agent-CRZCrq3_.js +37 -0
- package/dist/_chunks/{public-header.agent-1mcrQqIM.js → public-header.agent-CrXkGtTF.js} +3 -3
- package/dist/_chunks/{qr-code-C3m9o7om.js → qr-code-Ofx7ryyu.js} +2 -2
- package/dist/_chunks/{radio-6fml-pWk.js → radio-BBbMdbE_.js} +15 -11
- package/dist/_chunks/{radio-group-CIjmyioi.js → radio-group-BT97ty7o.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BP71J_VB.js → radiograph-panel.agent-C4j6eoQn.js} +8 -8
- package/dist/_chunks/recaptcha-widget-CsvwlYTE.js +234 -0
- package/dist/_chunks/registration-form-CBDeXzlk.js +748 -0
- package/dist/_chunks/{reviews-panel-DDb_t7vy.js → reviews-panel-CyxZ0VmZ.js} +3 -3
- package/dist/_chunks/{rich-text-editor-C7N4Cem6.js → rich-text-editor-CCCSEPlG.js} +13 -13
- package/dist/_chunks/safe-href-5dbsfbQn.js +22 -0
- package/dist/_chunks/{search-bar-Blq_QeSe.js → search-bar-D695TCDH.js} +2 -2
- package/dist/_chunks/{search-input-DfsAu3P2.js → search-input-Tl-RkS5x.js} +31 -31
- package/dist/_chunks/{select-Br88h070.js → select-DHPmASkG.js} +293 -228
- package/dist/_chunks/{sheet-BE6oi30q.js → sheet-BTgxkDJS.js} +2 -2
- package/dist/_chunks/{sign-document-Buw-zC_7.js → sign-document-B_3U-S6g.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-Bd4VPGQh.js → sign-in-with-alfadocs-button-DFmgQuDo.js} +3 -3
- package/dist/_chunks/{signature-field-DBIGiY-J.js → signature-field-DLDznGnB.js} +2 -2
- package/dist/_chunks/{signature-request-DqZkn-iB.js → signature-request-BdolmJk4.js} +6 -6
- package/dist/_chunks/signed-out-frame-dz1rLJ65.js +171 -0
- package/dist/_chunks/{slider-BRq2lL-l.js → slider-pZ95bEm7.js} +50 -50
- package/dist/_chunks/{slot-grid-Bkg9MVXP.js → slot-grid-kCDoV3k4.js} +3 -3
- package/dist/_chunks/{social-sign-in-button-Bb2UQpsA.js → social-sign-in-button-BMGNlUWs.js} +2 -2
- package/dist/_chunks/{sparkline-ZOxMBU76.js → sparkline-pkGPCXbl.js} +80 -80
- package/dist/_chunks/spinner-a0FTYX9Q.js +211 -0
- package/dist/_chunks/{streaming-text-D0IJeRBg.js → streaming-text-BAPn_sZs.js} +2 -2
- package/dist/_chunks/{switch-DXGD2Drz.js → switch-D--x7n6h.js} +29 -29
- package/dist/_chunks/{tabs-DLXVEDsa.js → tabs-yIY-RySP.js} +2 -2
- package/dist/_chunks/{task-card-CngF4Zee.js → task-card-C02Km4Gb.js} +2 -2
- package/dist/_chunks/{task-editor-Dz93rRXg.js → task-editor-Dl27rI3J.js} +15 -15
- package/dist/_chunks/{task-tray-CB6_BvH9.js → task-tray-By6DPwbT.js} +4 -4
- package/dist/_chunks/{tasks-panel-DHAoTQtR.js → tasks-panel-BkN9sROF.js} +7 -7
- package/dist/_chunks/{text-area-Cjtw7mna.js → text-area-CDuItrvL.js} +23 -23
- package/dist/_chunks/{text-input-CLaItY93.js → text-input-lZ2-t-p2.js} +37 -37
- package/dist/_chunks/{theme-toggle-Byg0x2vB.js → theme-toggle-BAHz3itd.js} +4 -4
- package/dist/_chunks/{time-picker-BG7G3ujX.js → time-picker-DKKmpFh3.js} +28 -28
- package/dist/_chunks/{toast-6wbpghjF.js → toast-UMUvXFsA.js} +2 -2
- package/dist/_chunks/{tool-rail-CXcLzxPb.js → tool-rail-CwXN-sDC.js} +2 -2
- package/dist/_chunks/{tooth-scheme-BLbwUVer.js → tooth-scheme-BAMhwCZe.js} +3 -3
- package/dist/_chunks/{transcript-panel-Dve7bsm7.js → transcript-panel-CLgtyVbR.js} +2 -2
- package/dist/_chunks/{unit-converter-D8WnJbZm.js → unit-converter-CXNr5P4J.js} +4 -4
- package/dist/_chunks/{use-appointment-details-read-YsuJgYeB.js → use-appointment-details-read-BEbLseXW.js} +13 -13
- package/dist/_chunks/use-field-match-pdbEnKvO.js +28 -0
- package/dist/_chunks/use-password-requirements-C8DdwPEy.js +69 -0
- package/dist/_chunks/use-prism-DaspP8w-.js +55 -0
- package/dist/_chunks/use-registration-submit-DxCWic5_.js +141 -0
- package/dist/_chunks/{wallet-pay-button-C-GFl7RO.js → wallet-pay-button-Dew8Pmgq.js} +2 -2
- package/dist/_chunks/{warning-stack-CzKSeB5v.js → warning-stack-B_v_qMBI.js} +2 -2
- package/dist/_chunks/{widget-picker-b5NCHxFe.js → widget-picker-BCbwD5Z1.js} +2 -2
- package/dist/_chunks/{workflow-map-C7fHKTXL.js → workflow-map-PzamnfJK.js} +191 -199
- package/dist/agent-catalog.json +339 -109
- package/dist/agent-i18n/en.json +38 -11
- package/dist/brand/logo-asset/Alfadocs_Logo_Main.d.ts +2 -1
- package/dist/brand/logo-asset/Alfadocs_Logo_Mark.d.ts +2 -1
- package/dist/brand/logo-asset/Alfadocs_Logo_Neg.d.ts +2 -1
- package/dist/brand/logo-asset/index.d.ts +1 -0
- package/dist/brand/logo-asset/mark-piece.d.ts +10 -0
- package/dist/components/_shared/index.d.ts +1 -0
- package/dist/components/_shared/is-development.d.ts +8 -0
- package/dist/components/_shared/safe-href.d.ts +21 -0
- package/dist/components/_shared/use-keep-apex-tooltip-inside.d.ts +3 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/address-fields.d.ts +7 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +7 -0
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +57 -0
- package/dist/components/booking/booking.d.ts +1 -1
- package/dist/components/booking/details-form.d.ts +5 -0
- package/dist/components/booking/index.d.ts +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/city-input/city-input.d.ts +2 -5
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +10 -4
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/country-select/country-select.d.ts +3 -4
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/dev-bypass-button.agent.d.ts +3 -0
- package/dist/components/dev-bypass-button/dev-bypass-button.d.ts +18 -0
- package/dist/components/dev-bypass-button/index.d.ts +4 -0
- package/dist/components/dev-bypass-button/index.js +7 -0
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/email-input/email-input.d.ts +13 -4
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/empty-state/empty-state.d.ts +6 -0
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/form-field/form-field-context.d.ts +20 -0
- package/dist/components/form-field/index.d.ts +1 -1
- package/dist/components/form-field/index.js +7 -5
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/iban-input/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/index.d.ts +8 -2
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/logo/logo.d.ts +15 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +8 -5
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/password-input/index.js +3 -2
- package/dist/components/password-input/password-input.d.ts +6 -3
- package/dist/components/password-input/use-password-requirements.d.ts +9 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +8 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts +13 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/postal-code-input/index.js +1 -1
- package/dist/components/postal-code-input/postal-code-input.d.ts +3 -2
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/province-select/province-select.d.ts +3 -2
- package/dist/components/public-footer/index.js +6 -5
- package/dist/components/public-footer/public-footer.d.ts +8 -0
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +13 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +6 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/error-pages/400.ar.html +41 -0
- package/dist/error-pages/400.de.html +41 -0
- package/dist/error-pages/400.el.html +41 -0
- package/dist/error-pages/400.en.html +41 -0
- package/dist/error-pages/400.es.html +41 -0
- package/dist/error-pages/400.fr.html +41 -0
- package/dist/error-pages/400.hi.html +41 -0
- package/dist/error-pages/400.html +41 -0
- package/dist/error-pages/400.it.html +41 -0
- package/dist/error-pages/400.ja.html +41 -0
- package/dist/error-pages/400.nl.html +41 -0
- package/dist/error-pages/400.pl.html +41 -0
- package/dist/error-pages/400.pt.html +41 -0
- package/dist/error-pages/400.ro.html +41 -0
- package/dist/error-pages/400.ru.html +41 -0
- package/dist/error-pages/400.sq.html +41 -0
- package/dist/error-pages/400.sv.html +41 -0
- package/dist/error-pages/400.tr.html +41 -0
- package/dist/error-pages/400.zh.html +41 -0
- package/dist/error-pages/401.ar.html +41 -0
- package/dist/error-pages/401.de.html +41 -0
- package/dist/error-pages/401.el.html +41 -0
- package/dist/error-pages/401.en.html +41 -0
- package/dist/error-pages/401.es.html +41 -0
- package/dist/error-pages/401.fr.html +41 -0
- package/dist/error-pages/401.hi.html +41 -0
- package/dist/error-pages/401.html +41 -0
- package/dist/error-pages/401.it.html +41 -0
- package/dist/error-pages/401.ja.html +41 -0
- package/dist/error-pages/401.nl.html +41 -0
- package/dist/error-pages/401.pl.html +41 -0
- package/dist/error-pages/401.pt.html +41 -0
- package/dist/error-pages/401.ro.html +41 -0
- package/dist/error-pages/401.ru.html +41 -0
- package/dist/error-pages/401.sq.html +41 -0
- package/dist/error-pages/401.sv.html +41 -0
- package/dist/error-pages/401.tr.html +41 -0
- package/dist/error-pages/401.zh.html +41 -0
- package/dist/error-pages/403.ar.html +41 -0
- package/dist/error-pages/403.de.html +41 -0
- package/dist/error-pages/403.el.html +41 -0
- package/dist/error-pages/403.en.html +41 -0
- package/dist/error-pages/403.es.html +41 -0
- package/dist/error-pages/403.fr.html +41 -0
- package/dist/error-pages/403.hi.html +41 -0
- package/dist/error-pages/403.html +41 -0
- package/dist/error-pages/403.it.html +41 -0
- package/dist/error-pages/403.ja.html +41 -0
- package/dist/error-pages/403.nl.html +41 -0
- package/dist/error-pages/403.pl.html +41 -0
- package/dist/error-pages/403.pt.html +41 -0
- package/dist/error-pages/403.ro.html +41 -0
- package/dist/error-pages/403.ru.html +41 -0
- package/dist/error-pages/403.sq.html +41 -0
- package/dist/error-pages/403.sv.html +41 -0
- package/dist/error-pages/403.tr.html +41 -0
- package/dist/error-pages/403.zh.html +41 -0
- package/dist/error-pages/404.ar.html +41 -0
- package/dist/error-pages/404.de.html +41 -0
- package/dist/error-pages/404.el.html +41 -0
- package/dist/error-pages/404.en.html +41 -0
- package/dist/error-pages/404.es.html +41 -0
- package/dist/error-pages/404.fr.html +41 -0
- package/dist/error-pages/404.hi.html +41 -0
- package/dist/error-pages/404.html +41 -0
- package/dist/error-pages/404.it.html +41 -0
- package/dist/error-pages/404.ja.html +41 -0
- package/dist/error-pages/404.nl.html +41 -0
- package/dist/error-pages/404.pl.html +41 -0
- package/dist/error-pages/404.pt.html +41 -0
- package/dist/error-pages/404.ro.html +41 -0
- package/dist/error-pages/404.ru.html +41 -0
- package/dist/error-pages/404.sq.html +41 -0
- package/dist/error-pages/404.sv.html +41 -0
- package/dist/error-pages/404.tr.html +41 -0
- package/dist/error-pages/404.zh.html +41 -0
- package/dist/error-pages/405.ar.html +41 -0
- package/dist/error-pages/405.de.html +41 -0
- package/dist/error-pages/405.el.html +41 -0
- package/dist/error-pages/405.en.html +41 -0
- package/dist/error-pages/405.es.html +41 -0
- package/dist/error-pages/405.fr.html +41 -0
- package/dist/error-pages/405.hi.html +41 -0
- package/dist/error-pages/405.html +41 -0
- package/dist/error-pages/405.it.html +41 -0
- package/dist/error-pages/405.ja.html +41 -0
- package/dist/error-pages/405.nl.html +41 -0
- package/dist/error-pages/405.pl.html +41 -0
- package/dist/error-pages/405.pt.html +41 -0
- package/dist/error-pages/405.ro.html +41 -0
- package/dist/error-pages/405.ru.html +41 -0
- package/dist/error-pages/405.sq.html +41 -0
- package/dist/error-pages/405.sv.html +41 -0
- package/dist/error-pages/405.tr.html +41 -0
- package/dist/error-pages/405.zh.html +41 -0
- package/dist/error-pages/410.ar.html +41 -0
- package/dist/error-pages/410.de.html +41 -0
- package/dist/error-pages/410.el.html +41 -0
- package/dist/error-pages/410.en.html +41 -0
- package/dist/error-pages/410.es.html +41 -0
- package/dist/error-pages/410.fr.html +41 -0
- package/dist/error-pages/410.hi.html +41 -0
- package/dist/error-pages/410.html +41 -0
- package/dist/error-pages/410.it.html +41 -0
- package/dist/error-pages/410.ja.html +41 -0
- package/dist/error-pages/410.nl.html +41 -0
- package/dist/error-pages/410.pl.html +41 -0
- package/dist/error-pages/410.pt.html +41 -0
- package/dist/error-pages/410.ro.html +41 -0
- package/dist/error-pages/410.ru.html +41 -0
- package/dist/error-pages/410.sq.html +41 -0
- package/dist/error-pages/410.sv.html +41 -0
- package/dist/error-pages/410.tr.html +41 -0
- package/dist/error-pages/410.zh.html +41 -0
- package/dist/error-pages/419.ar.html +42 -0
- package/dist/error-pages/419.de.html +42 -0
- package/dist/error-pages/419.el.html +42 -0
- package/dist/error-pages/419.en.html +42 -0
- package/dist/error-pages/419.es.html +42 -0
- package/dist/error-pages/419.fr.html +42 -0
- package/dist/error-pages/419.hi.html +42 -0
- package/dist/error-pages/419.html +42 -0
- package/dist/error-pages/419.it.html +42 -0
- package/dist/error-pages/419.ja.html +42 -0
- package/dist/error-pages/419.nl.html +42 -0
- package/dist/error-pages/419.pl.html +42 -0
- package/dist/error-pages/419.pt.html +42 -0
- package/dist/error-pages/419.ro.html +42 -0
- package/dist/error-pages/419.ru.html +42 -0
- package/dist/error-pages/419.sq.html +42 -0
- package/dist/error-pages/419.sv.html +42 -0
- package/dist/error-pages/419.tr.html +42 -0
- package/dist/error-pages/419.zh.html +42 -0
- package/dist/error-pages/429.ar.html +42 -0
- package/dist/error-pages/429.de.html +42 -0
- package/dist/error-pages/429.el.html +42 -0
- package/dist/error-pages/429.en.html +42 -0
- package/dist/error-pages/429.es.html +42 -0
- package/dist/error-pages/429.fr.html +42 -0
- package/dist/error-pages/429.hi.html +42 -0
- package/dist/error-pages/429.html +42 -0
- package/dist/error-pages/429.it.html +42 -0
- package/dist/error-pages/429.ja.html +42 -0
- package/dist/error-pages/429.nl.html +42 -0
- package/dist/error-pages/429.pl.html +42 -0
- package/dist/error-pages/429.pt.html +42 -0
- package/dist/error-pages/429.ro.html +42 -0
- package/dist/error-pages/429.ru.html +42 -0
- package/dist/error-pages/429.sq.html +42 -0
- package/dist/error-pages/429.sv.html +42 -0
- package/dist/error-pages/429.tr.html +42 -0
- package/dist/error-pages/429.zh.html +42 -0
- package/dist/error-pages/500.ar.html +41 -0
- package/dist/error-pages/500.de.html +41 -0
- package/dist/error-pages/500.el.html +41 -0
- package/dist/error-pages/500.en.html +41 -0
- package/dist/error-pages/500.es.html +41 -0
- package/dist/error-pages/500.fr.html +41 -0
- package/dist/error-pages/500.hi.html +41 -0
- package/dist/error-pages/500.html +41 -0
- package/dist/error-pages/500.it.html +41 -0
- package/dist/error-pages/500.ja.html +41 -0
- package/dist/error-pages/500.nl.html +41 -0
- package/dist/error-pages/500.pl.html +41 -0
- package/dist/error-pages/500.pt.html +41 -0
- package/dist/error-pages/500.ro.html +41 -0
- package/dist/error-pages/500.ru.html +41 -0
- package/dist/error-pages/500.sq.html +41 -0
- package/dist/error-pages/500.sv.html +41 -0
- package/dist/error-pages/500.tr.html +41 -0
- package/dist/error-pages/500.zh.html +41 -0
- package/dist/error-pages/502.ar.html +41 -0
- package/dist/error-pages/502.de.html +41 -0
- package/dist/error-pages/502.el.html +41 -0
- package/dist/error-pages/502.en.html +41 -0
- package/dist/error-pages/502.es.html +41 -0
- package/dist/error-pages/502.fr.html +41 -0
- package/dist/error-pages/502.hi.html +41 -0
- package/dist/error-pages/502.html +41 -0
- package/dist/error-pages/502.it.html +41 -0
- package/dist/error-pages/502.ja.html +41 -0
- package/dist/error-pages/502.nl.html +41 -0
- package/dist/error-pages/502.pl.html +41 -0
- package/dist/error-pages/502.pt.html +41 -0
- package/dist/error-pages/502.ro.html +41 -0
- package/dist/error-pages/502.ru.html +41 -0
- package/dist/error-pages/502.sq.html +41 -0
- package/dist/error-pages/502.sv.html +41 -0
- package/dist/error-pages/502.tr.html +41 -0
- package/dist/error-pages/502.zh.html +41 -0
- package/dist/error-pages/503.ar.html +41 -0
- package/dist/error-pages/503.de.html +41 -0
- package/dist/error-pages/503.el.html +41 -0
- package/dist/error-pages/503.en.html +41 -0
- package/dist/error-pages/503.es.html +41 -0
- package/dist/error-pages/503.fr.html +41 -0
- package/dist/error-pages/503.hi.html +41 -0
- package/dist/error-pages/503.html +41 -0
- package/dist/error-pages/503.it.html +41 -0
- package/dist/error-pages/503.ja.html +41 -0
- package/dist/error-pages/503.nl.html +41 -0
- package/dist/error-pages/503.pl.html +41 -0
- package/dist/error-pages/503.pt.html +41 -0
- package/dist/error-pages/503.ro.html +41 -0
- package/dist/error-pages/503.ru.html +41 -0
- package/dist/error-pages/503.sq.html +41 -0
- package/dist/error-pages/503.sv.html +41 -0
- package/dist/error-pages/503.tr.html +41 -0
- package/dist/error-pages/503.zh.html +41 -0
- package/dist/error-pages/504.ar.html +41 -0
- package/dist/error-pages/504.de.html +41 -0
- package/dist/error-pages/504.el.html +41 -0
- package/dist/error-pages/504.en.html +41 -0
- package/dist/error-pages/504.es.html +41 -0
- package/dist/error-pages/504.fr.html +41 -0
- package/dist/error-pages/504.hi.html +41 -0
- package/dist/error-pages/504.html +41 -0
- package/dist/error-pages/504.it.html +41 -0
- package/dist/error-pages/504.ja.html +41 -0
- package/dist/error-pages/504.nl.html +41 -0
- package/dist/error-pages/504.pl.html +41 -0
- package/dist/error-pages/504.pt.html +41 -0
- package/dist/error-pages/504.ro.html +41 -0
- package/dist/error-pages/504.ru.html +41 -0
- package/dist/error-pages/504.sq.html +41 -0
- package/dist/error-pages/504.sv.html +41 -0
- package/dist/error-pages/504.tr.html +41 -0
- package/dist/error-pages/504.zh.html +41 -0
- package/dist/error-pages/maintenance.ar.html +41 -0
- package/dist/error-pages/maintenance.de.html +41 -0
- package/dist/error-pages/maintenance.el.html +41 -0
- package/dist/error-pages/maintenance.en.html +41 -0
- package/dist/error-pages/maintenance.es.html +41 -0
- package/dist/error-pages/maintenance.fr.html +41 -0
- package/dist/error-pages/maintenance.hi.html +41 -0
- package/dist/error-pages/maintenance.html +41 -0
- package/dist/error-pages/maintenance.it.html +41 -0
- package/dist/error-pages/maintenance.ja.html +41 -0
- package/dist/error-pages/maintenance.nl.html +41 -0
- package/dist/error-pages/maintenance.pl.html +41 -0
- package/dist/error-pages/maintenance.pt.html +41 -0
- package/dist/error-pages/maintenance.ro.html +41 -0
- package/dist/error-pages/maintenance.ru.html +41 -0
- package/dist/error-pages/maintenance.sq.html +41 -0
- package/dist/error-pages/maintenance.sv.html +41 -0
- package/dist/error-pages/maintenance.tr.html +41 -0
- package/dist/error-pages/maintenance.zh.html +41 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +89 -79
- package/dist/hooks/use-field-match.d.ts +71 -0
- package/dist/hooks/use-prism.d.ts +85 -0
- package/dist/host-compat.css +16 -1
- package/dist/i18n/locales/ar.d.ts +121 -0
- package/dist/i18n/locales/ar.js +121 -0
- package/dist/i18n/locales/de.d.ts +121 -0
- package/dist/i18n/locales/de.js +121 -0
- package/dist/i18n/locales/el.d.ts +121 -0
- package/dist/i18n/locales/el.js +121 -0
- package/dist/i18n/locales/en.d.ts +121 -0
- package/dist/i18n/locales/en.js +121 -0
- package/dist/i18n/locales/es.d.ts +121 -0
- package/dist/i18n/locales/es.js +121 -0
- package/dist/i18n/locales/fr.d.ts +121 -0
- package/dist/i18n/locales/fr.js +121 -0
- package/dist/i18n/locales/hi.d.ts +121 -0
- package/dist/i18n/locales/hi.js +121 -0
- package/dist/i18n/locales/it.d.ts +121 -0
- package/dist/i18n/locales/it.js +121 -0
- package/dist/i18n/locales/ja.d.ts +121 -0
- package/dist/i18n/locales/ja.js +121 -0
- package/dist/i18n/locales/nl.d.ts +121 -0
- package/dist/i18n/locales/nl.js +121 -0
- package/dist/i18n/locales/pl.d.ts +121 -0
- package/dist/i18n/locales/pl.js +121 -0
- package/dist/i18n/locales/pt.d.ts +121 -0
- package/dist/i18n/locales/pt.js +121 -0
- package/dist/i18n/locales/ro.d.ts +121 -0
- package/dist/i18n/locales/ro.js +121 -0
- package/dist/i18n/locales/ru.d.ts +121 -0
- package/dist/i18n/locales/ru.js +121 -0
- package/dist/i18n/locales/sq.d.ts +121 -0
- package/dist/i18n/locales/sq.js +121 -0
- package/dist/i18n/locales/sv.d.ts +121 -0
- package/dist/i18n/locales/sv.js +121 -0
- package/dist/i18n/locales/tr.d.ts +121 -0
- package/dist/i18n/locales/tr.js +121 -0
- package/dist/i18n/locales/zh.d.ts +121 -0
- package/dist/i18n/locales/zh.js +121 -0
- package/dist/index.js +1170 -1139
- package/dist/locales/ar.json +121 -0
- package/dist/locales/de.json +121 -0
- package/dist/locales/el.json +121 -0
- package/dist/locales/en.json +121 -0
- package/dist/locales/es.json +121 -0
- package/dist/locales/fr.json +121 -0
- package/dist/locales/hi.json +121 -0
- package/dist/locales/it.json +121 -0
- package/dist/locales/ja.json +121 -0
- package/dist/locales/nl.json +121 -0
- package/dist/locales/pl.json +121 -0
- package/dist/locales/pt.json +121 -0
- package/dist/locales/ro.json +121 -0
- package/dist/locales/ru.json +121 -0
- package/dist/locales/sq.json +121 -0
- package/dist/locales/sv.json +121 -0
- package/dist/locales/tr.json +121 -0
- package/dist/locales/zh.json +121 -0
- package/dist/patterns/_shared/auth-form-parts.d.ts +55 -0
- package/dist/patterns/_shared/brand-mark.d.ts +15 -0
- package/dist/patterns/_shared/mark-pieces.d.ts +15 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page-illustration.d.ts +6 -0
- package/dist/patterns/error-page/error-page-locale.d.ts +32 -0
- package/dist/patterns/error-page/error-page-statuses.d.ts +16 -0
- package/dist/patterns/error-page/error-page.d.ts +48 -0
- package/dist/patterns/error-page/index.d.ts +5 -0
- package/dist/patterns/error-page/index.js +9 -0
- package/dist/patterns/forgot-password-form/forgot-password-form.d.ts +105 -0
- package/dist/patterns/forgot-password-form/index.d.ts +3 -0
- package/dist/patterns/forgot-password-form/index.js +6 -0
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.d.ts +5 -0
- package/dist/patterns/login-form/index.js +7 -0
- package/dist/patterns/login-form/login-dev-card.d.ts +27 -0
- package/dist/patterns/login-form/login-form.d.ts +120 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/registration-form/index.d.ts +3 -0
- package/dist/patterns/registration-form/index.js +6 -0
- package/dist/patterns/registration-form/registration-form.d.ts +217 -0
- package/dist/patterns/registration-form/use-registration-submit.d.ts +59 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.d.ts +5 -0
- package/dist/patterns/signed-out-frame/index.js +6 -0
- package/dist/patterns/signed-out-frame/signed-out-frame.d.ts +27 -0
- package/dist/patterns/signed-out-frame/signed-out-header.d.ts +23 -0
- package/dist/tokens.css +1 -1
- package/package.json +29 -2
- package/dist/_chunks/address-fields-UiEXHxEX.js +0 -246
- package/dist/_chunks/apexcharts-theme-B_AxGC_h.js +0 -72
- package/dist/_chunks/booking-DP543-BT.js +0 -3474
- package/dist/_chunks/combobox-Iel8y3u6.js +0 -578
- package/dist/_chunks/form-field-YUJl_U5l.js +0 -131
- package/dist/_chunks/form-field-context-B3APVHKx.js +0 -21
- package/dist/_chunks/recaptcha-widget-BNAeSTCo.js +0 -228
- package/dist/_chunks/spinner-DxjSZLD-.js +0 -220
- package/dist/_chunks/use-password-requirements-DK4hV1Ik.js +0 -453
|
@@ -0,0 +1,3710 @@
|
|
|
1
|
+
import { jsx as s, jsxs as v, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ls, useId as Rt, useRef as _, useCallback as fe, useState as X, useEffect as V, useMemo as L, Fragment as Rs, useImperativeHandle as Ps } from "react";
|
|
3
|
+
import { c as kt } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as U, Trans as Vs } from "react-i18next";
|
|
5
|
+
import { u as $s } from "./registry-DvAUVLHh.js";
|
|
6
|
+
import { A as Q } from "./alert-BhCstf2h.js";
|
|
7
|
+
import { B as Je } from "./button-CYPx2xFq.js";
|
|
8
|
+
import { C as rt } from "./checkbox--ndmyokr.js";
|
|
9
|
+
import { C as qs } from "./checkbox-group-B0oZHNT3.js";
|
|
10
|
+
import { D as Ks } from "./date-picker-BnhBmcH6.js";
|
|
11
|
+
import { E as zs } from "./email-input-Cmeo4zdT.js";
|
|
12
|
+
import { F as Ve } from "./form-field-D9WfDpYB.js";
|
|
13
|
+
import { P as js } from "./phone-input-BzeUr49H.js";
|
|
14
|
+
import { T as Us } from "./text-area-CDuItrvL.js";
|
|
15
|
+
import { T as Tt } from "./text-input-lZ2-t-p2.js";
|
|
16
|
+
import { A as Gs } from "./address-fields-1pD-8hML.js";
|
|
17
|
+
import { S as us } from "./spinner-a0FTYX9Q.js";
|
|
18
|
+
import { a as St } from "./format-price-DAbh61Lz.js";
|
|
19
|
+
import { C as Hs } from "./credit-card-D9XZsHGA.js";
|
|
20
|
+
import { B as ps } from "./badge-hnBt8o7n.js";
|
|
21
|
+
import { I as ss } from "./icon-button-mKIvw90h.js";
|
|
22
|
+
import { S as Pt } from "./select-DHPmASkG.js";
|
|
23
|
+
import { C as Wt } from "./combobox-DppVSuUm.js";
|
|
24
|
+
import { M as Yt } from "./multi-select-CVb6PJOK.js";
|
|
25
|
+
import { S as Bt } from "./skeleton-B1KTdJ4N.js";
|
|
26
|
+
import { E as ms } from "./empty-state-CgvmPPvW.js";
|
|
27
|
+
import { S as Js } from "./stepper-accordion-BPNS6J6B.js";
|
|
28
|
+
import { S as Ws } from "./stepper-progress-D6H8wQiV.js";
|
|
29
|
+
import { S as Ys } from "./slot-grid-kCDoV3k4.js";
|
|
30
|
+
import { p as me } from "./parseISO-y3LncvfO.js";
|
|
31
|
+
import { C as Zs } from "./chevron-down-DWE7GSq9.js";
|
|
32
|
+
import { r as at, f as Lt, b as ns } from "./format-D-1gTdHF.js";
|
|
33
|
+
import { x as fs, d as ot, a as jt, i as Xs, s as bt, m as Qs, y as Dt } from "./date-picker-variants-B3AFKDSu.js";
|
|
34
|
+
import { s as en } from "./subDays-XBMBTVOO.js";
|
|
35
|
+
import { C as tn } from "./chevron-left-B8cOyH-V.js";
|
|
36
|
+
import { C as sn } from "./chevron-right-I9AeSxH2.js";
|
|
37
|
+
import { c as Ie } from "./createLucideIcon-DhHxpK9K.js";
|
|
38
|
+
import { M as nn, S as rn } from "./sun-Bj9Mr553.js";
|
|
39
|
+
import { S as an } from "./stethoscope-sZXGC43m.js";
|
|
40
|
+
import { H as on } from "./heart-pulse-BCppJyN2.js";
|
|
41
|
+
import { E as cn } from "./eye-BjhN2nYf.js";
|
|
42
|
+
import { B as dn } from "./baby-Dku-Xvg9.js";
|
|
43
|
+
import { S as ln } from "./scan-line-CNseIHQ0.js";
|
|
44
|
+
import { A as un } from "./astroid-BN4f5VXU.js";
|
|
45
|
+
import { C as pn } from "./clipboard-check-BeAGxDVT.js";
|
|
46
|
+
/**
|
|
47
|
+
* @license lucide-react v1.22.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/
|
|
52
|
+
const mn = [
|
|
53
|
+
[
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
57
|
+
key: "169zse"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
], fn = Ie("activity", mn);
|
|
61
|
+
/**
|
|
62
|
+
* @license lucide-react v1.22.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/
|
|
67
|
+
const gn = [
|
|
68
|
+
[
|
|
69
|
+
"path",
|
|
70
|
+
{
|
|
71
|
+
d: "M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",
|
|
72
|
+
key: "w610uw"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
], hn = Ie("bone", gn);
|
|
76
|
+
/**
|
|
77
|
+
* @license lucide-react v1.22.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/
|
|
82
|
+
const vn = [
|
|
83
|
+
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
84
|
+
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
85
|
+
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
86
|
+
["path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77", key: "iwvgf7" }],
|
|
87
|
+
["path", { d: "M18 18a4 4 0 0 0 2-7.464", key: "efp6ie" }],
|
|
88
|
+
["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
|
|
89
|
+
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
90
|
+
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
91
|
+
], bn = Ie("brain", vn);
|
|
92
|
+
/**
|
|
93
|
+
* @license lucide-react v1.22.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/
|
|
98
|
+
const yn = [
|
|
99
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
100
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
101
|
+
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
102
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
103
|
+
["path", { d: "M17 14h-6", key: "bkmgh3" }],
|
|
104
|
+
["path", { d: "M13 18H7", key: "bb0bb7" }],
|
|
105
|
+
["path", { d: "M7 14h.01", key: "1qa3f1" }],
|
|
106
|
+
["path", { d: "M17 18h.01", key: "1bdyru" }]
|
|
107
|
+
], kn = Ie("calendar-range", yn);
|
|
108
|
+
/**
|
|
109
|
+
* @license lucide-react v1.22.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/
|
|
114
|
+
const Sn = [
|
|
115
|
+
["path", { d: "M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0", key: "1dfaln" }],
|
|
116
|
+
["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
|
|
117
|
+
], xn = Ie("ear", Sn);
|
|
118
|
+
/**
|
|
119
|
+
* @license lucide-react v1.22.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/
|
|
124
|
+
const In = [
|
|
125
|
+
["path", { d: "M6 18h8", key: "1borvv" }],
|
|
126
|
+
["path", { d: "M3 22h18", key: "8prr45" }],
|
|
127
|
+
["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
|
|
128
|
+
["path", { d: "M9 14h2", key: "197e7h" }],
|
|
129
|
+
["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
|
|
130
|
+
["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
|
|
131
|
+
], Nn = Ie("microscope", In);
|
|
132
|
+
/**
|
|
133
|
+
* @license lucide-react v1.22.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/
|
|
138
|
+
const wn = [
|
|
139
|
+
[
|
|
140
|
+
"path",
|
|
141
|
+
{ d: "m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z", key: "wa1lgi" }
|
|
142
|
+
],
|
|
143
|
+
["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
|
|
144
|
+
], Cn = Ie("pill", wn);
|
|
145
|
+
/**
|
|
146
|
+
* @license lucide-react v1.22.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/
|
|
151
|
+
const An = [
|
|
152
|
+
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
153
|
+
["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
|
|
154
|
+
["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
|
|
155
|
+
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
156
|
+
["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
|
|
157
|
+
], Tn = Ie("scissors", An);
|
|
158
|
+
/**
|
|
159
|
+
* @license lucide-react v1.22.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/
|
|
164
|
+
const Dn = [
|
|
165
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
166
|
+
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
167
|
+
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
168
|
+
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
169
|
+
], On = Ie("smile", Dn);
|
|
170
|
+
/**
|
|
171
|
+
* @license lucide-react v1.22.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/
|
|
176
|
+
const Mn = [
|
|
177
|
+
["path", { d: "M12 10V2", key: "16sf7g" }],
|
|
178
|
+
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
|
|
179
|
+
["path", { d: "M2 18h2", key: "j10viu" }],
|
|
180
|
+
["path", { d: "M20 18h2", key: "wocana" }],
|
|
181
|
+
["path", { d: "m19.07 10.93-1.41 1.41", key: "15zs5n" }],
|
|
182
|
+
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
183
|
+
["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
|
|
184
|
+
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
185
|
+
], Fn = Ie("sunset", Mn);
|
|
186
|
+
/**
|
|
187
|
+
* @license lucide-react v1.22.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/
|
|
192
|
+
const _n = [
|
|
193
|
+
["path", { d: "m18 2 4 4", key: "22kx64" }],
|
|
194
|
+
["path", { d: "m17 7 3-3", key: "1w1zoj" }],
|
|
195
|
+
["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5", key: "1exhtz" }],
|
|
196
|
+
["path", { d: "m9 11 4 4", key: "rovt3i" }],
|
|
197
|
+
["path", { d: "m5 19-3 3", key: "59f2uf" }],
|
|
198
|
+
["path", { d: "m14 4 6 6", key: "yqp9t2" }]
|
|
199
|
+
], is = Ie("syringe", _n);
|
|
200
|
+
function Ln(e, t, n) {
|
|
201
|
+
return fs(e, -1, n);
|
|
202
|
+
}
|
|
203
|
+
const Bn = {
|
|
204
|
+
id: "booking",
|
|
205
|
+
// `view_change` removed (0.69): the layout `variant` is a fixed prop — the
|
|
206
|
+
// handle exposes only `getVariant` (state), no action mutates it. The flow's
|
|
207
|
+
// only navigation is step-to-step (`goto_step` → `navigate`).
|
|
208
|
+
capabilities: ["navigate"],
|
|
209
|
+
state: {
|
|
210
|
+
variant: {
|
|
211
|
+
type: "string",
|
|
212
|
+
descriptionKey: "ui.agent.booking.state.variant",
|
|
213
|
+
description: "Active variant — one of `inline-list`, `accordion`, `calendar`, `flexible`, `progress`.",
|
|
214
|
+
read: (e) => e.getVariant()
|
|
215
|
+
},
|
|
216
|
+
currentStep: {
|
|
217
|
+
type: "number",
|
|
218
|
+
descriptionKey: "ui.agent.booking.state.currentStep",
|
|
219
|
+
description: "The step the flow is on — 1 insurance, 2 specialty, 3 service, 4 provider, 5 date, 6 time, 7 patient details, 8 confirmation (after a successful submit). Read this back after `goto_step` to see where the clamp landed.",
|
|
220
|
+
read: (e) => e.getCurrentStep()
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
actions: {
|
|
224
|
+
reset: {
|
|
225
|
+
// destructive: clears the whole in-progress booking value (patient
|
|
226
|
+
// identity, contact, slot choice) — irreversibly loses user input.
|
|
227
|
+
safety: "destructive",
|
|
228
|
+
idempotent: !0,
|
|
229
|
+
descriptionKey: "ui.agent.booking.actions.reset",
|
|
230
|
+
description: "Clear the booking value back to an empty state. Use to abandon an in-progress flow.",
|
|
231
|
+
errors: [
|
|
232
|
+
"Resetting after submit has no effect — the flow is on step 8.",
|
|
233
|
+
"Refused while a payment session is open (step 7): the consumer must cancel the hold first."
|
|
234
|
+
],
|
|
235
|
+
invoke: (e) => {
|
|
236
|
+
e.reset();
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
goto_step: {
|
|
240
|
+
safety: "read",
|
|
241
|
+
argsType: "{ step: 1 | 2 | 3 | 4 | 5 | 6 | 7 }",
|
|
242
|
+
argsSchema: {
|
|
243
|
+
type: "object",
|
|
244
|
+
properties: {
|
|
245
|
+
step: {
|
|
246
|
+
type: "integer",
|
|
247
|
+
enum: [1, 2, 3, 4, 5, 6, 7],
|
|
248
|
+
description: "Target step (1-7)."
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
required: ["step"]
|
|
252
|
+
},
|
|
253
|
+
idempotent: !0,
|
|
254
|
+
descriptionKey: "ui.agent.booking.actions.gotoStep",
|
|
255
|
+
description: "Jump to the given step. A step that is hidden for this practice, or that sits ahead of the first incomplete step, clamps to that first incomplete step — read `currentStep` back to see where it landed.",
|
|
256
|
+
errors: [
|
|
257
|
+
"Requested step is not yet reachable — clamped to the first incomplete step.",
|
|
258
|
+
"Requested step is hidden for this practice (e.g. insurance outside Germany, or provider choice turned off) — clamped to the first incomplete step."
|
|
259
|
+
],
|
|
260
|
+
examples: [{ args: { step: 1 }, note: "Return to the first step." }],
|
|
261
|
+
invoke: (e, t) => {
|
|
262
|
+
e.goToStep(t.step);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
domHooks: {
|
|
267
|
+
root: {
|
|
268
|
+
attr: "data-component",
|
|
269
|
+
value: "booking",
|
|
270
|
+
description: "Marks the Booking root region."
|
|
271
|
+
},
|
|
272
|
+
instanceId: {
|
|
273
|
+
attr: "data-component-id",
|
|
274
|
+
sourceProp: "id",
|
|
275
|
+
description: "Sourced from the id prop."
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}, Ht = [
|
|
279
|
+
"email",
|
|
280
|
+
"whatsapp",
|
|
281
|
+
"sms"
|
|
282
|
+
], we = "all", En = "de";
|
|
283
|
+
function Rn(e) {
|
|
284
|
+
const t = e.lockedOperatorId;
|
|
285
|
+
return [...t ? e.operatorsByService ? e.specialties.filter(
|
|
286
|
+
(r) => e.services.some(
|
|
287
|
+
(i) => {
|
|
288
|
+
var a;
|
|
289
|
+
return i.specialtyId === r.id && ((a = i.operatorIds) == null ? void 0 : a.includes(t));
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
) : e.specialties.filter((r) => {
|
|
293
|
+
var i;
|
|
294
|
+
return (i = r.operatorIds) == null ? void 0 : i.includes(t);
|
|
295
|
+
}) : e.specialties].sort((r, i) => {
|
|
296
|
+
const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY, d = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
|
|
297
|
+
return a - d;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
function Pn(e) {
|
|
301
|
+
let t = e.services;
|
|
302
|
+
if (e.lockedOperatorId && (t = t.filter(
|
|
303
|
+
(r) => {
|
|
304
|
+
var i;
|
|
305
|
+
return (i = r.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
|
|
306
|
+
}
|
|
307
|
+
)), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
|
|
308
|
+
const r = $e(e.value);
|
|
309
|
+
r.length > 0 && (t = t.filter(
|
|
310
|
+
(i) => i.specialtyId !== void 0 && r.includes(i.specialtyId)
|
|
311
|
+
));
|
|
312
|
+
}
|
|
313
|
+
return t;
|
|
314
|
+
}
|
|
315
|
+
function Vn(e) {
|
|
316
|
+
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = Te(e.value);
|
|
317
|
+
if ((!t || e.operatorsByService) && n.length > 0)
|
|
318
|
+
return e.operators.filter(
|
|
319
|
+
(r) => {
|
|
320
|
+
var i;
|
|
321
|
+
return (i = r.appointmentBookingReasonIds) == null ? void 0 : i.some((a) => n.includes(a));
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
if (t) {
|
|
325
|
+
const r = $e(e.value);
|
|
326
|
+
if (r.length > 0)
|
|
327
|
+
return e.operators.filter(
|
|
328
|
+
(i) => {
|
|
329
|
+
var a;
|
|
330
|
+
return (a = i.specialtyIds) == null ? void 0 : a.some((d) => r.includes(d));
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
return [];
|
|
335
|
+
}
|
|
336
|
+
function $n(e, t) {
|
|
337
|
+
const n = e.country === En, r = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && r, d = $e(e.value).length > 0, g = !a || d, p = Te(e.value).length > 0, h = !g || p, o = t.operators, c = !!e.allowOperatorSelection && h && p && !e.lockedOperatorId && o.length > 1, f = h && p, I = (!f || e.value.date !== void 0) && e.value.date !== void 0, E = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = p && o.length === 0;
|
|
338
|
+
return {
|
|
339
|
+
insurance: n,
|
|
340
|
+
specialty: a,
|
|
341
|
+
service: g,
|
|
342
|
+
operator: c,
|
|
343
|
+
date: f,
|
|
344
|
+
slot: I,
|
|
345
|
+
details: E,
|
|
346
|
+
onboardingIncomplete: w
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
function qn(e, t) {
|
|
350
|
+
const n = [];
|
|
351
|
+
return t.insurance && n.push(1), t.specialty && n.push(2), n.push(3), t.operator && n.push(4), n.push(5), n.push(6), n.push(7), {
|
|
352
|
+
currentStep: n.find(
|
|
353
|
+
(i) => !Ae(i, e.value)
|
|
354
|
+
) ?? 7,
|
|
355
|
+
visibleSteps: n
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function Ae(e, t) {
|
|
359
|
+
switch (e) {
|
|
360
|
+
case 1:
|
|
361
|
+
return t.insuranceType !== void 0;
|
|
362
|
+
// 0.34.0: array-or-single — satisfied when EITHER form is present.
|
|
363
|
+
case 2:
|
|
364
|
+
return $e(t).length > 0;
|
|
365
|
+
case 3:
|
|
366
|
+
return Te(t).length > 0;
|
|
367
|
+
// Always satisfied, like its gate: "no preference" is a valid answer,
|
|
368
|
+
// whether it is the `'all'` sentinel or an empty multi-select.
|
|
369
|
+
case 4:
|
|
370
|
+
return !0;
|
|
371
|
+
case 5:
|
|
372
|
+
return t.date !== void 0;
|
|
373
|
+
case 6:
|
|
374
|
+
return t.slotKey !== void 0;
|
|
375
|
+
// Details fulfilment is owned by the form's own validation.
|
|
376
|
+
case 7:
|
|
377
|
+
return !1;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function Kn(e) {
|
|
381
|
+
const t = {
|
|
382
|
+
specialties: Rn(e),
|
|
383
|
+
services: Pn(e),
|
|
384
|
+
operators: Vn(e)
|
|
385
|
+
}, n = $n(e, t), { currentStep: r, visibleSteps: i } = qn(e, n);
|
|
386
|
+
let a;
|
|
387
|
+
if (e.value.date && e.value.slotKey) {
|
|
388
|
+
const h = e.availableSlots[e.value.date];
|
|
389
|
+
h && (a = h.find((o) => o.key === e.value.slotKey));
|
|
390
|
+
}
|
|
391
|
+
const d = Te(e.value), u = d.length > 0 ? e.services.find((h) => h.id === d[0]) : void 0, g = $e(e.value).length > 0, p = d.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || g);
|
|
392
|
+
return {
|
|
393
|
+
gates: n,
|
|
394
|
+
filtered: t,
|
|
395
|
+
currentStep: r,
|
|
396
|
+
totalSteps: i.length,
|
|
397
|
+
visibleSteps: i,
|
|
398
|
+
isReadyToSubmit: p,
|
|
399
|
+
durationMin: u == null ? void 0 : u.durationMin,
|
|
400
|
+
selectedSlot: a
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function gs(e, t) {
|
|
404
|
+
return {
|
|
405
|
+
...e,
|
|
406
|
+
insuranceType: t,
|
|
407
|
+
specialtyId: void 0,
|
|
408
|
+
serviceId: void 0,
|
|
409
|
+
operatorId: void 0,
|
|
410
|
+
date: void 0,
|
|
411
|
+
slotKey: void 0,
|
|
412
|
+
details: void 0
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function hs(e, t) {
|
|
416
|
+
return {
|
|
417
|
+
...e,
|
|
418
|
+
specialtyId: t,
|
|
419
|
+
specialtyIds: void 0,
|
|
420
|
+
serviceId: void 0,
|
|
421
|
+
serviceIds: void 0,
|
|
422
|
+
operatorId: void 0,
|
|
423
|
+
operatorIds: void 0,
|
|
424
|
+
date: void 0,
|
|
425
|
+
slotKey: void 0,
|
|
426
|
+
details: void 0
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
function vs(e, t) {
|
|
430
|
+
return {
|
|
431
|
+
...e,
|
|
432
|
+
specialtyId: void 0,
|
|
433
|
+
specialtyIds: t,
|
|
434
|
+
serviceId: void 0,
|
|
435
|
+
serviceIds: void 0,
|
|
436
|
+
operatorId: void 0,
|
|
437
|
+
operatorIds: void 0,
|
|
438
|
+
date: void 0,
|
|
439
|
+
slotKey: void 0,
|
|
440
|
+
details: void 0
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
function bs(e, t) {
|
|
444
|
+
return {
|
|
445
|
+
...e,
|
|
446
|
+
serviceId: t,
|
|
447
|
+
serviceIds: void 0,
|
|
448
|
+
// Default the operator to the "All operators" sentinel so a patient
|
|
449
|
+
// who doesn't care about picking lands on a satisfied step 4 without
|
|
450
|
+
// any further input.
|
|
451
|
+
operatorId: t ? we : void 0,
|
|
452
|
+
operatorIds: void 0,
|
|
453
|
+
date: void 0,
|
|
454
|
+
slotKey: void 0,
|
|
455
|
+
details: void 0
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
function ys(e, t) {
|
|
459
|
+
const n = !!t && t.length > 0;
|
|
460
|
+
return {
|
|
461
|
+
...e,
|
|
462
|
+
serviceId: void 0,
|
|
463
|
+
serviceIds: t,
|
|
464
|
+
operatorId: n ? we : void 0,
|
|
465
|
+
operatorIds: void 0,
|
|
466
|
+
date: void 0,
|
|
467
|
+
slotKey: void 0,
|
|
468
|
+
details: void 0
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
function ks(e, t) {
|
|
472
|
+
return {
|
|
473
|
+
...e,
|
|
474
|
+
operatorId: t,
|
|
475
|
+
operatorIds: void 0,
|
|
476
|
+
date: void 0,
|
|
477
|
+
slotKey: void 0,
|
|
478
|
+
details: void 0
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
function Ss(e, t) {
|
|
482
|
+
return {
|
|
483
|
+
...e,
|
|
484
|
+
operatorId: void 0,
|
|
485
|
+
operatorIds: t,
|
|
486
|
+
date: void 0,
|
|
487
|
+
slotKey: void 0,
|
|
488
|
+
details: void 0
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
function $e(e) {
|
|
492
|
+
return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
|
|
493
|
+
}
|
|
494
|
+
function Te(e) {
|
|
495
|
+
return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
|
|
496
|
+
}
|
|
497
|
+
function Jt(e) {
|
|
498
|
+
return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
|
|
499
|
+
}
|
|
500
|
+
function Vt(e, t) {
|
|
501
|
+
return {
|
|
502
|
+
...e,
|
|
503
|
+
date: t,
|
|
504
|
+
slotKey: void 0
|
|
505
|
+
// Keep details — date/slot changes shouldn't wipe the patient form
|
|
506
|
+
// since the user has already filled some fields.
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
function xs(e, t) {
|
|
510
|
+
return {
|
|
511
|
+
...e,
|
|
512
|
+
slotKey: t
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
function zn(e, t) {
|
|
516
|
+
let n = e;
|
|
517
|
+
if (t.lockedOperatorId && n.operatorId !== t.lockedOperatorId && (n = { ...n, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && n.specialtyId === void 0 && n.specialtyIds === void 0 && (n = { ...n, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
518
|
+
const i = $e(n), a = i.length > 0 ? t.services.filter(
|
|
519
|
+
(d) => d.specialtyId && i.includes(d.specialtyId)
|
|
520
|
+
) : t.services;
|
|
521
|
+
a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: we }));
|
|
522
|
+
}
|
|
523
|
+
return n;
|
|
524
|
+
}
|
|
525
|
+
function Is(e) {
|
|
526
|
+
if (e.operatorId && e.operatorId !== we)
|
|
527
|
+
return e.operatorId;
|
|
528
|
+
}
|
|
529
|
+
function jn(e) {
|
|
530
|
+
if (!e) return !1;
|
|
531
|
+
const t = e.trim();
|
|
532
|
+
return /^\+?\d[\d\s\-()]{6,}$/.test(t);
|
|
533
|
+
}
|
|
534
|
+
function Ns(e) {
|
|
535
|
+
const t = e && e.length > 0 ? e : ["email"], n = new Set(t);
|
|
536
|
+
return Ht.filter((r) => n.has(r));
|
|
537
|
+
}
|
|
538
|
+
function Un(e, t, n) {
|
|
539
|
+
const r = Ns(e), i = new Set(r);
|
|
540
|
+
if (n)
|
|
541
|
+
return Ht.filter(
|
|
542
|
+
(p) => n.includes(p) && i.has(p)
|
|
543
|
+
);
|
|
544
|
+
const a = [];
|
|
545
|
+
i.has("email") && a.push("email");
|
|
546
|
+
const d = jn(t), u = i.has("whatsapp");
|
|
547
|
+
u && d && a.push("whatsapp"), !u && i.has("sms") && a.push("sms");
|
|
548
|
+
const g = new Set(a);
|
|
549
|
+
return Ht.filter((p) => g.has(p));
|
|
550
|
+
}
|
|
551
|
+
const Gn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Hn = /* @__PURE__ */ new Set([
|
|
552
|
+
".",
|
|
553
|
+
",",
|
|
554
|
+
";",
|
|
555
|
+
":",
|
|
556
|
+
"!",
|
|
557
|
+
"?",
|
|
558
|
+
"'",
|
|
559
|
+
"»",
|
|
560
|
+
"›"
|
|
561
|
+
]), Jn = { ")": "(", "]": "[", "}": "{" }, rs = (e, t) => e.split(t).length - 1;
|
|
562
|
+
function Wn(e) {
|
|
563
|
+
const t = {};
|
|
564
|
+
for (const [r, i] of Object.entries(Jn))
|
|
565
|
+
t[r] = rs(e, r) - rs(e, i);
|
|
566
|
+
let n = e.length;
|
|
567
|
+
for (; n > 0; ) {
|
|
568
|
+
const r = e[n - 1];
|
|
569
|
+
if (Hn.has(r))
|
|
570
|
+
n -= 1;
|
|
571
|
+
else if (r in t && t[r] > 0)
|
|
572
|
+
t[r] -= 1, n -= 1;
|
|
573
|
+
else
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
return e.slice(0, n);
|
|
577
|
+
}
|
|
578
|
+
const Yn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, Zn = /[A-Za-z0-9]/;
|
|
579
|
+
function Xn(e) {
|
|
580
|
+
const t = e.search(Yn);
|
|
581
|
+
return t > 0 && Zn.test(e[t - 1]) ? e.slice(0, t) : e;
|
|
582
|
+
}
|
|
583
|
+
function Qn(e) {
|
|
584
|
+
try {
|
|
585
|
+
const { protocol: t, hostname: n } = new URL(e);
|
|
586
|
+
return (t === "http:" || t === "https:") && n !== "";
|
|
587
|
+
} catch {
|
|
588
|
+
return !1;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function ei(e) {
|
|
592
|
+
const t = [];
|
|
593
|
+
let n = 0;
|
|
594
|
+
const r = (i) => {
|
|
595
|
+
if (i === "") return;
|
|
596
|
+
const a = t[t.length - 1];
|
|
597
|
+
(a == null ? void 0 : a.kind) === "text" ? a.text += i : t.push({ kind: "text", text: i });
|
|
598
|
+
};
|
|
599
|
+
for (const i of e.matchAll(Gn)) {
|
|
600
|
+
const a = i.index ?? 0, d = Wn(Xn(i[0]));
|
|
601
|
+
Qn(d) && (r(e.slice(n, a)), t.push({ kind: "link", text: d, href: d }), n = a + d.length);
|
|
602
|
+
}
|
|
603
|
+
return r(e.slice(n)), t;
|
|
604
|
+
}
|
|
605
|
+
const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 300, Ut = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", Ot = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, ni = (e, t) => ({
|
|
606
|
+
street: (e == null ? void 0 : e.address.line1) ?? "",
|
|
607
|
+
city: (e == null ? void 0 : e.address.city) ?? "",
|
|
608
|
+
postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
|
|
609
|
+
province: (e == null ? void 0 : e.address.state) ?? "",
|
|
610
|
+
// The practice's country only until the patient has an address at all.
|
|
611
|
+
country: (e ? e.address.country : t).toLowerCase(),
|
|
612
|
+
formatted: ""
|
|
613
|
+
}), ii = (e, t, n = null) => ({
|
|
614
|
+
name: t,
|
|
615
|
+
address: {
|
|
616
|
+
line1: e.street,
|
|
617
|
+
line2: n,
|
|
618
|
+
city: e.city,
|
|
619
|
+
state: e.province,
|
|
620
|
+
postalCode: e.postcode,
|
|
621
|
+
country: e.country.toUpperCase()
|
|
622
|
+
}
|
|
623
|
+
}), ri = kt("ds:flex ds:flex-col ds:border", {
|
|
624
|
+
variants: {
|
|
625
|
+
noticeStyle: {
|
|
626
|
+
plain: "ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
|
|
627
|
+
highlighted: "ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border-[color-mix(in_srgb,var(--primary)_30%,var(--border))] ds:bg-[color-mix(in_srgb,var(--primary)_8%,var(--card))] ds:p-[var(--spacing-md)]"
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
defaultVariants: { noticeStyle: "plain" }
|
|
631
|
+
}), ai = ["it", "ch", "de", "at", "fr", "sm"], yt = {
|
|
632
|
+
country: "billing.country",
|
|
633
|
+
street: "billing.street",
|
|
634
|
+
city: "billing.city",
|
|
635
|
+
postcode: "billing.postcode",
|
|
636
|
+
province: "billing.province"
|
|
637
|
+
}, ws = /^\d{5}$/, oi = (e) => {
|
|
638
|
+
if (!e) return !1;
|
|
639
|
+
const { line1: t, city: n, postalCode: r, country: i, state: a } = e.address;
|
|
640
|
+
return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() && ws.test(r.trim());
|
|
641
|
+
}, ci = (e, t) => {
|
|
642
|
+
var n;
|
|
643
|
+
return {
|
|
644
|
+
name: t,
|
|
645
|
+
address: {
|
|
646
|
+
line1: e.address.line1.trim(),
|
|
647
|
+
line2: ((n = e.address.line2) == null ? void 0 : n.trim()) || null,
|
|
648
|
+
city: e.address.city.trim(),
|
|
649
|
+
state: e.address.state.trim(),
|
|
650
|
+
postalCode: e.address.postalCode.trim(),
|
|
651
|
+
country: e.address.country.trim().toUpperCase()
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
}, Mt = { state: "idle" }, Zt = ls(
|
|
655
|
+
({
|
|
656
|
+
value: e,
|
|
657
|
+
onChange: t,
|
|
658
|
+
onSubmit: n,
|
|
659
|
+
requireCodiceFiscale: r = !1,
|
|
660
|
+
requireDateOfBirth: i = !1,
|
|
661
|
+
requireInsuranceNumber: a = !1,
|
|
662
|
+
insuranceType: d,
|
|
663
|
+
showNote: u = !1,
|
|
664
|
+
showReturningPatientFlag: g = !1,
|
|
665
|
+
privacyPolicyUrl: p,
|
|
666
|
+
termsUrl: h,
|
|
667
|
+
practiceConsent: o,
|
|
668
|
+
payment: c,
|
|
669
|
+
paymentTermsUrl: f,
|
|
670
|
+
paymentBlocked: x = !1,
|
|
671
|
+
billingInDetails: I = !1,
|
|
672
|
+
paymentNoticeStyle: A = "plain",
|
|
673
|
+
criticalInformationToAccept: E,
|
|
674
|
+
validateCodiceFiscale: w,
|
|
675
|
+
validateInsuranceNumber: S,
|
|
676
|
+
submitting: N = !1,
|
|
677
|
+
summarySlot: T,
|
|
678
|
+
defaultPhoneCountry: D,
|
|
679
|
+
confirmationChannels: y,
|
|
680
|
+
defaultConfirmationChannels: k,
|
|
681
|
+
submitError: B
|
|
682
|
+
}, $) => {
|
|
683
|
+
var wt, gt, Ct, ht, vt;
|
|
684
|
+
const { t: b, i18n: ge } = U("ui"), O = Rt(), K = _(null), M = fe(
|
|
685
|
+
(l) => {
|
|
686
|
+
K.current = l, typeof $ == "function" ? $(l) : $ && ($.current = l);
|
|
687
|
+
},
|
|
688
|
+
[$]
|
|
689
|
+
), [he, dt] = X(0);
|
|
690
|
+
V(() => {
|
|
691
|
+
var m;
|
|
692
|
+
if (he === 0) return;
|
|
693
|
+
const l = (m = K.current) == null ? void 0 : m.querySelectorAll(
|
|
694
|
+
'[aria-invalid="true"], [role="checkbox"][aria-required="true"][aria-checked="false"], [data-unanswered] [role="checkbox"]'
|
|
695
|
+
);
|
|
696
|
+
for (const C of l ?? [])
|
|
697
|
+
if (C.focus(), document.activeElement === C) return;
|
|
698
|
+
}, [he]);
|
|
699
|
+
const ve = _(!1), [qe, De] = X(!1), [G, Oe] = X(!1), be = N || qe, [H, ae] = X(Mt), [ye, ke] = X(Mt), [W, Me] = X({}), ne = fe(
|
|
700
|
+
(l) => Me((m) => ({ ...m, [l]: !0 })),
|
|
701
|
+
[]
|
|
702
|
+
), oe = _(null), Y = _(
|
|
703
|
+
null
|
|
704
|
+
);
|
|
705
|
+
V(
|
|
706
|
+
() => () => {
|
|
707
|
+
oe.current && clearTimeout(oe.current), Y.current && clearTimeout(Y.current);
|
|
708
|
+
},
|
|
709
|
+
[]
|
|
710
|
+
);
|
|
711
|
+
const F = fe(
|
|
712
|
+
(l) => {
|
|
713
|
+
Oe(!1), t({ ...e, ...l });
|
|
714
|
+
},
|
|
715
|
+
[e, t]
|
|
716
|
+
), Ce = c ? JSON.stringify([
|
|
717
|
+
c.serviceId,
|
|
718
|
+
c.kind,
|
|
719
|
+
c.amountCents,
|
|
720
|
+
c.currencyCode,
|
|
721
|
+
f
|
|
722
|
+
]) : void 0, [Ke, xt] = X(
|
|
723
|
+
() => e.paymentAccepted ? Ce : void 0
|
|
724
|
+
), We = _(Ce), Ye = !!(c && e.paymentAccepted && Ke === Ce);
|
|
725
|
+
V(() => {
|
|
726
|
+
We.current !== Ce && (We.current = Ce, xt(void 0), e.paymentAccepted !== void 0 && F({ paymentAccepted: c ? !1 : void 0 }));
|
|
727
|
+
}, [Ce, c, F, e.paymentAccepted]);
|
|
728
|
+
const Ze = typeof (o == null ? void 0 : o.label) == "string" && o.label.trim() !== "", Ne = o && Ze ? JSON.stringify([
|
|
729
|
+
o.label,
|
|
730
|
+
o.url ?? null,
|
|
731
|
+
o.required
|
|
732
|
+
]) : void 0, [ee, It] = X(
|
|
733
|
+
() => e.practiceConsentAccepted ? Ne : void 0
|
|
734
|
+
), ie = _(Ne), Fe = !!(Ne !== void 0 && e.practiceConsentAccepted && ee === Ne);
|
|
735
|
+
V(() => {
|
|
736
|
+
ie.current !== Ne && (ie.current = Ne, It(void 0), e.practiceConsentAccepted !== void 0 && F({ practiceConsentAccepted: void 0 }));
|
|
737
|
+
}, [Ne, F, e.practiceConsentAccepted]);
|
|
738
|
+
const ce = c ? St(c.amountCents, c.currencyCode, ge.language) : "", _e = Ot(f), R = I && !!c && !x, de = r, Xe = (D || "it").toLowerCase(), lt = !R || oi(e.billing), Z = ni(e.billing, Xe), le = Z.country === "it", ut = _(null), Le = _(
|
|
739
|
+
null
|
|
740
|
+
), te = (wt = e.billing) == null ? void 0 : wt.address.line1.trim(), ze = ((Ct = (gt = e.billing) == null ? void 0 : gt.address.line2) == null ? void 0 : Ct.trim()) || null;
|
|
741
|
+
V(() => {
|
|
742
|
+
var l;
|
|
743
|
+
te !== void 0 && ze ? Le.current = { street: te, line2: ze } : (te === void 0 || te === ((l = Le.current) == null ? void 0 : l.street)) && (Le.current = null);
|
|
744
|
+
}, [te, ze]);
|
|
745
|
+
const Be = (l) => W[yt[l]] ? Z[l].trim() ? (
|
|
746
|
+
// The one format the block itself checks: an Italian CAP.
|
|
747
|
+
l === "postcode" && le && !ws.test(Z.postcode.trim()) ? b("inputs.postalCode.invalid") : void 0
|
|
748
|
+
) : b("booking.details.fieldRequired") : void 0, qt = fe(
|
|
749
|
+
() => Me(
|
|
750
|
+
(l) => l[yt.province] ? l : {
|
|
751
|
+
...l,
|
|
752
|
+
codiceFiscale: !0,
|
|
753
|
+
...Object.fromEntries(
|
|
754
|
+
Object.values(yt).map((m) => [m, !0])
|
|
755
|
+
)
|
|
756
|
+
}
|
|
757
|
+
),
|
|
758
|
+
[]
|
|
759
|
+
), Qe = L(
|
|
760
|
+
() => Ns(y),
|
|
761
|
+
[y]
|
|
762
|
+
), ue = !c && !x && Qe.length >= 2, je = _(!1);
|
|
763
|
+
V(() => {
|
|
764
|
+
if (c || x) return;
|
|
765
|
+
if (!ue) {
|
|
766
|
+
e.confirmationChannels !== void 0 && F({ confirmationChannels: void 0 });
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
if (e.confirmationChannels !== void 0) {
|
|
770
|
+
je.current = !0;
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
const l = Un(
|
|
774
|
+
Qe,
|
|
775
|
+
e.mobilePhone,
|
|
776
|
+
k
|
|
777
|
+
);
|
|
778
|
+
je.current = !0, F({ confirmationChannels: l });
|
|
779
|
+
}, [
|
|
780
|
+
ue,
|
|
781
|
+
c,
|
|
782
|
+
x,
|
|
783
|
+
Qe,
|
|
784
|
+
e.mobilePhone,
|
|
785
|
+
k
|
|
786
|
+
]);
|
|
787
|
+
const q = L(
|
|
788
|
+
() => e.confirmationChannels ?? [],
|
|
789
|
+
[e.confirmationChannels]
|
|
790
|
+
), z = ue && q.length === 0, pt = _(w), et = _(S);
|
|
791
|
+
V(() => {
|
|
792
|
+
pt.current = w, et.current = S;
|
|
793
|
+
}, [w, S]);
|
|
794
|
+
const mt = !!w, ft = !!S;
|
|
795
|
+
V(() => {
|
|
796
|
+
const l = e.codiceFiscale;
|
|
797
|
+
if (!de || !mt || !l) {
|
|
798
|
+
ae(Mt);
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
if (!ti.test(l)) {
|
|
802
|
+
ae({
|
|
803
|
+
state: "invalid",
|
|
804
|
+
hint: b("booking.details.codiceFiscale.invalidFormat")
|
|
805
|
+
});
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
ae({ state: "pending" });
|
|
809
|
+
let m = !0;
|
|
810
|
+
return oe.current && clearTimeout(oe.current), oe.current = setTimeout(async () => {
|
|
811
|
+
try {
|
|
812
|
+
const C = pt.current;
|
|
813
|
+
if (!C) return;
|
|
814
|
+
const P = await C(l);
|
|
815
|
+
m && ae({
|
|
816
|
+
state: P.valid ? "valid" : "invalid",
|
|
817
|
+
hint: P.hint,
|
|
818
|
+
value: l
|
|
819
|
+
});
|
|
820
|
+
} catch {
|
|
821
|
+
m && ae({
|
|
822
|
+
state: "invalid",
|
|
823
|
+
hint: b("booking.details.codiceFiscale.unavailable"),
|
|
824
|
+
value: l
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
}, os), () => {
|
|
828
|
+
m = !1, oe.current && clearTimeout(oe.current);
|
|
829
|
+
};
|
|
830
|
+
}, [de, mt, e.codiceFiscale, b]);
|
|
831
|
+
const Ee = a && d === "public";
|
|
832
|
+
V(() => {
|
|
833
|
+
const l = e.insuranceNumber;
|
|
834
|
+
if (!Ee || !ft || !l) {
|
|
835
|
+
ke(Mt);
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
ke({ state: "pending" }), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
|
|
839
|
+
const m = et.current;
|
|
840
|
+
m && m(l).then(
|
|
841
|
+
(C) => ke(
|
|
842
|
+
C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
|
|
843
|
+
)
|
|
844
|
+
).catch(
|
|
845
|
+
() => ke({
|
|
846
|
+
state: "invalid",
|
|
847
|
+
hint: b("booking.details.insuranceNumber.unavailable")
|
|
848
|
+
})
|
|
849
|
+
);
|
|
850
|
+
}, os);
|
|
851
|
+
}, [Ee, ft, e.insuranceNumber, b]);
|
|
852
|
+
const tt = L(
|
|
853
|
+
() => !!(e.email && si.test(e.email)),
|
|
854
|
+
[e.email]
|
|
855
|
+
), st = L(
|
|
856
|
+
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
857
|
+
[e.mobilePhone]
|
|
858
|
+
), Ue = L(() => {
|
|
859
|
+
var l, m;
|
|
860
|
+
return !(!((l = e.firstName) != null && l.trim()) || !((m = e.lastName) != null && m.trim()) || !tt || !st || de && (H.state !== "valid" || H.value !== e.codiceFiscale) || !lt || i && !e.dateOfBirth || Ee && ye.state !== "valid");
|
|
861
|
+
}, [
|
|
862
|
+
e.firstName,
|
|
863
|
+
e.lastName,
|
|
864
|
+
tt,
|
|
865
|
+
st,
|
|
866
|
+
de,
|
|
867
|
+
lt,
|
|
868
|
+
H.state,
|
|
869
|
+
H.value,
|
|
870
|
+
e.codiceFiscale,
|
|
871
|
+
i,
|
|
872
|
+
e.dateOfBirth,
|
|
873
|
+
Ee,
|
|
874
|
+
ye.state
|
|
875
|
+
]), nt = E != null && E.trim() ? E : void 0, Re = nt !== void 0, Nt = !Re || !!e.criticalInformationAccepted, Kt = !Ze || !(o != null && o.required) || Fe, Se = !!(e.privacyConsent && e.termsConsent && Nt && Kt), zt = !ue || q.length > 0, it = Ue && Se && zt && (!c || Ye) && !x && !be, Ge = async (l) => {
|
|
876
|
+
if (l.preventDefault(), Me({
|
|
877
|
+
firstName: !0,
|
|
878
|
+
lastName: !0,
|
|
879
|
+
email: !0,
|
|
880
|
+
mobilePhone: !0,
|
|
881
|
+
codiceFiscale: !0,
|
|
882
|
+
dateOfBirth: !0,
|
|
883
|
+
insuranceNumber: !0,
|
|
884
|
+
...Object.fromEntries(
|
|
885
|
+
Object.values(yt).map((C) => [C, !0])
|
|
886
|
+
)
|
|
887
|
+
}), be || ve.current) return;
|
|
888
|
+
if (!it) {
|
|
889
|
+
dt((C) => C + 1);
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
const m = {
|
|
893
|
+
firstName: e.firstName.trim(),
|
|
894
|
+
lastName: e.lastName.trim(),
|
|
895
|
+
email: e.email.trim(),
|
|
896
|
+
mobilePhone: e.mobilePhone,
|
|
897
|
+
privacyConsent: !0,
|
|
898
|
+
termsConsent: !0,
|
|
899
|
+
// Only present when the service carried text to accept — a
|
|
900
|
+
// reason without it leaves the key out of the payload entirely.
|
|
901
|
+
...Re ? { criticalInformationAccepted: !0 } : {},
|
|
902
|
+
// Sent whenever the practice's box is shown, ticked or not, so the
|
|
903
|
+
// server can record the answer; left out when there is no box.
|
|
904
|
+
...Ze ? { practiceConsentAccepted: Fe } : {},
|
|
905
|
+
...c ? { paymentAccepted: !0 } : {},
|
|
906
|
+
codiceFiscale: e.codiceFiscale,
|
|
907
|
+
dateOfBirth: e.dateOfBirth,
|
|
908
|
+
insuranceNumber: e.insuranceNumber,
|
|
909
|
+
note: e.note,
|
|
910
|
+
returningPatient: e.returningPatient,
|
|
911
|
+
// Only include when the picker was visible; otherwise the single
|
|
912
|
+
// implicit channel is inferred backend-side from the practice
|
|
913
|
+
// config.
|
|
914
|
+
confirmationChannels: ue ? q : void 0,
|
|
915
|
+
...R && e.billing ? {
|
|
916
|
+
billing: ci(
|
|
917
|
+
e.billing,
|
|
918
|
+
`${e.firstName.trim()} ${e.lastName.trim()}`
|
|
919
|
+
)
|
|
920
|
+
} : {}
|
|
921
|
+
};
|
|
922
|
+
ve.current = !0, De(!0), Oe(!1);
|
|
923
|
+
try {
|
|
924
|
+
await n(m);
|
|
925
|
+
} catch {
|
|
926
|
+
Oe(!0);
|
|
927
|
+
} finally {
|
|
928
|
+
ve.current = !1, De(!1);
|
|
929
|
+
}
|
|
930
|
+
}, re = /* @__PURE__ */ s(
|
|
931
|
+
Ve,
|
|
932
|
+
{
|
|
933
|
+
label: b("booking.details.codiceFiscale.label"),
|
|
934
|
+
required: !0,
|
|
935
|
+
description: H.state === "pending" ? b("booking.details.codiceFiscale.checking") : b("booking.details.codiceFiscale.helper"),
|
|
936
|
+
error: W.codiceFiscale && H.state === "invalid" ? H.hint ?? b("booking.details.codiceFiscale.invalid") : W.codiceFiscale && !e.codiceFiscale ? b("booking.details.fieldRequired") : void 0,
|
|
937
|
+
children: /* @__PURE__ */ s(
|
|
938
|
+
Tt,
|
|
939
|
+
{
|
|
940
|
+
value: e.codiceFiscale ?? "",
|
|
941
|
+
maxLength: 16,
|
|
942
|
+
onChange: (l) => F({
|
|
943
|
+
codiceFiscale: l.target.value.slice(0, 16).toUpperCase()
|
|
944
|
+
}),
|
|
945
|
+
onBlur: () => ne("codiceFiscale")
|
|
946
|
+
}
|
|
947
|
+
)
|
|
948
|
+
}
|
|
949
|
+
), Pe = (l, m) => {
|
|
950
|
+
const C = Ot(m);
|
|
951
|
+
return C ? /* @__PURE__ */ s(
|
|
952
|
+
Vs,
|
|
953
|
+
{
|
|
954
|
+
ns: "ui",
|
|
955
|
+
i18nKey: l,
|
|
956
|
+
components: {
|
|
957
|
+
// The `<Trans>` runtime injects link text from the i18n
|
|
958
|
+
// string. The anchor renders empty at static-analysis time,
|
|
959
|
+
// so `jsx-a11y/anchor-has-content` would false-flag — silence
|
|
960
|
+
// it; the runtime content is the localised policy / terms
|
|
961
|
+
// label.
|
|
962
|
+
policyLink: (
|
|
963
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
964
|
+
/* @__PURE__ */ s(
|
|
965
|
+
"a",
|
|
966
|
+
{
|
|
967
|
+
href: C,
|
|
968
|
+
target: "_blank",
|
|
969
|
+
rel: "noopener noreferrer",
|
|
970
|
+
className: Ut
|
|
971
|
+
}
|
|
972
|
+
)
|
|
973
|
+
)
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
) : b(l);
|
|
977
|
+
};
|
|
978
|
+
return /* @__PURE__ */ v(
|
|
979
|
+
"form",
|
|
980
|
+
{
|
|
981
|
+
ref: M,
|
|
982
|
+
id: O,
|
|
983
|
+
noValidate: !0,
|
|
984
|
+
onSubmit: Ge,
|
|
985
|
+
onFocus: (l) => {
|
|
986
|
+
const m = ut.current;
|
|
987
|
+
!m || !l.currentTarget.contains(l.target) || !m.contains(l.target) && m.compareDocumentPosition(l.target) & Node.DOCUMENT_POSITION_FOLLOWING && qt();
|
|
988
|
+
},
|
|
989
|
+
"aria-busy": be || void 0,
|
|
990
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
991
|
+
children: [
|
|
992
|
+
T,
|
|
993
|
+
/* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
994
|
+
/* @__PURE__ */ s(
|
|
995
|
+
Ve,
|
|
996
|
+
{
|
|
997
|
+
label: b("booking.details.firstName.label"),
|
|
998
|
+
required: !0,
|
|
999
|
+
error: W.firstName && !((ht = e.firstName) != null && ht.trim()) ? b("booking.details.firstName.required") : void 0,
|
|
1000
|
+
children: /* @__PURE__ */ s(
|
|
1001
|
+
Tt,
|
|
1002
|
+
{
|
|
1003
|
+
autoComplete: "given-name",
|
|
1004
|
+
value: e.firstName ?? "",
|
|
1005
|
+
onChange: (l) => F({ firstName: l.target.value }),
|
|
1006
|
+
onBlur: () => ne("firstName")
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
1011
|
+
/* @__PURE__ */ s(
|
|
1012
|
+
Ve,
|
|
1013
|
+
{
|
|
1014
|
+
label: b("booking.details.lastName.label"),
|
|
1015
|
+
required: !0,
|
|
1016
|
+
error: W.lastName && !((vt = e.lastName) != null && vt.trim()) ? b("booking.details.lastName.required") : void 0,
|
|
1017
|
+
children: /* @__PURE__ */ s(
|
|
1018
|
+
Tt,
|
|
1019
|
+
{
|
|
1020
|
+
autoComplete: "family-name",
|
|
1021
|
+
value: e.lastName ?? "",
|
|
1022
|
+
onChange: (l) => F({ lastName: l.target.value }),
|
|
1023
|
+
onBlur: () => ne("lastName")
|
|
1024
|
+
}
|
|
1025
|
+
)
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
] }),
|
|
1029
|
+
/* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1030
|
+
/* @__PURE__ */ s(
|
|
1031
|
+
Ve,
|
|
1032
|
+
{
|
|
1033
|
+
label: b("booking.details.email.label"),
|
|
1034
|
+
required: !0,
|
|
1035
|
+
error: W.email && !tt ? b("booking.details.email.invalid") : void 0,
|
|
1036
|
+
children: /* @__PURE__ */ s(
|
|
1037
|
+
zs,
|
|
1038
|
+
{
|
|
1039
|
+
value: e.email ?? "",
|
|
1040
|
+
onChange: (l) => F({ email: l.target.value }),
|
|
1041
|
+
onBlur: () => ne("email")
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
}
|
|
1045
|
+
),
|
|
1046
|
+
/* @__PURE__ */ s(
|
|
1047
|
+
Ve,
|
|
1048
|
+
{
|
|
1049
|
+
label: b("booking.details.mobilePhone.label"),
|
|
1050
|
+
required: !0,
|
|
1051
|
+
error: W.mobilePhone && !st ? b("booking.details.mobilePhone.invalid") : void 0,
|
|
1052
|
+
children: /* @__PURE__ */ s(
|
|
1053
|
+
js,
|
|
1054
|
+
{
|
|
1055
|
+
value: e.mobilePhone ?? "",
|
|
1056
|
+
defaultCountry: D == null ? void 0 : D.toUpperCase(),
|
|
1057
|
+
onChange: (l) => {
|
|
1058
|
+
F({ mobilePhone: l }), ne("mobilePhone");
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
)
|
|
1062
|
+
}
|
|
1063
|
+
)
|
|
1064
|
+
] }),
|
|
1065
|
+
de && !R || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1066
|
+
de && !R ? re : null,
|
|
1067
|
+
i ? /* @__PURE__ */ s(
|
|
1068
|
+
Ve,
|
|
1069
|
+
{
|
|
1070
|
+
label: b("booking.details.dateOfBirth.label"),
|
|
1071
|
+
required: !0,
|
|
1072
|
+
error: W.dateOfBirth && !e.dateOfBirth ? b("booking.details.dateOfBirth.required") : void 0,
|
|
1073
|
+
children: /* @__PURE__ */ s(
|
|
1074
|
+
Ks,
|
|
1075
|
+
{
|
|
1076
|
+
value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
|
|
1077
|
+
onChange: (l) => {
|
|
1078
|
+
F({
|
|
1079
|
+
dateOfBirth: l ? l.toISOString().slice(0, 10) : void 0
|
|
1080
|
+
}), ne("dateOfBirth");
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
1085
|
+
) : null
|
|
1086
|
+
] }) : null,
|
|
1087
|
+
Ee ? /* @__PURE__ */ s(
|
|
1088
|
+
Ve,
|
|
1089
|
+
{
|
|
1090
|
+
label: b("booking.details.insuranceNumber.label"),
|
|
1091
|
+
required: !0,
|
|
1092
|
+
description: ye.state === "pending" ? b("booking.details.insuranceNumber.checking") : void 0,
|
|
1093
|
+
error: W.insuranceNumber && ye.state === "invalid" ? ye.hint ?? b("booking.details.insuranceNumber.invalid") : void 0,
|
|
1094
|
+
children: /* @__PURE__ */ s(
|
|
1095
|
+
Tt,
|
|
1096
|
+
{
|
|
1097
|
+
value: e.insuranceNumber ?? "",
|
|
1098
|
+
onChange: (l) => F({ insuranceNumber: l.target.value }),
|
|
1099
|
+
onBlur: () => ne("insuranceNumber")
|
|
1100
|
+
}
|
|
1101
|
+
)
|
|
1102
|
+
}
|
|
1103
|
+
) : null,
|
|
1104
|
+
R ? /* @__PURE__ */ v(
|
|
1105
|
+
"div",
|
|
1106
|
+
{
|
|
1107
|
+
ref: ut,
|
|
1108
|
+
"data-component": "booking-billing",
|
|
1109
|
+
role: "group",
|
|
1110
|
+
"aria-labelledby": `${O}-billing-heading`,
|
|
1111
|
+
"aria-describedby": `${O}-billing-intro`,
|
|
1112
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:p-[var(--spacing-sm)]",
|
|
1113
|
+
onBlur: (l) => {
|
|
1114
|
+
var C;
|
|
1115
|
+
const m = (C = l.target.closest("[data-address-field]")) == null ? void 0 : C.getAttribute("data-address-field");
|
|
1116
|
+
(m === "street" || m === "city" || m === "postcode") && ne(yt[m]);
|
|
1117
|
+
},
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1120
|
+
/* @__PURE__ */ s(
|
|
1121
|
+
"h3",
|
|
1122
|
+
{
|
|
1123
|
+
id: `${O}-billing-heading`,
|
|
1124
|
+
className: "type-label ds:m-0 ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1125
|
+
children: b("booking.details.billing.heading")
|
|
1126
|
+
}
|
|
1127
|
+
),
|
|
1128
|
+
/* @__PURE__ */ s(
|
|
1129
|
+
"p",
|
|
1130
|
+
{
|
|
1131
|
+
id: `${O}-billing-intro`,
|
|
1132
|
+
className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
1133
|
+
children: b("booking.details.billing.intro")
|
|
1134
|
+
}
|
|
1135
|
+
)
|
|
1136
|
+
] }),
|
|
1137
|
+
de ? re : null,
|
|
1138
|
+
/* @__PURE__ */ s(
|
|
1139
|
+
Gs,
|
|
1140
|
+
{
|
|
1141
|
+
value: Z,
|
|
1142
|
+
onChange: (l) => {
|
|
1143
|
+
var m;
|
|
1144
|
+
return (
|
|
1145
|
+
// The name is set from the patient's own on submit.
|
|
1146
|
+
F({
|
|
1147
|
+
billing: ii(
|
|
1148
|
+
l,
|
|
1149
|
+
"",
|
|
1150
|
+
// A second line belongs to its street: it goes when the
|
|
1151
|
+
// patient writes another, and returns with the first.
|
|
1152
|
+
l.street.trim() === ((m = Le.current) == null ? void 0 : m.street) ? Le.current.line2 : null
|
|
1153
|
+
)
|
|
1154
|
+
})
|
|
1155
|
+
);
|
|
1156
|
+
},
|
|
1157
|
+
popularCountries: ai,
|
|
1158
|
+
layout: "grid",
|
|
1159
|
+
fields: le ? void 0 : ["street", "city", "postcode"],
|
|
1160
|
+
required: le ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
|
|
1161
|
+
errors: {
|
|
1162
|
+
country: Be("country"),
|
|
1163
|
+
street: Be("street"),
|
|
1164
|
+
city: Be("city"),
|
|
1165
|
+
postcode: Be("postcode"),
|
|
1166
|
+
province: le ? Be("province") : void 0
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
)
|
|
1170
|
+
]
|
|
1171
|
+
}
|
|
1172
|
+
) : null,
|
|
1173
|
+
u ? /* @__PURE__ */ s(
|
|
1174
|
+
Ve,
|
|
1175
|
+
{
|
|
1176
|
+
label: b("booking.details.note.label"),
|
|
1177
|
+
description: b("booking.details.note.helper", {
|
|
1178
|
+
max: as
|
|
1179
|
+
}),
|
|
1180
|
+
children: /* @__PURE__ */ s(
|
|
1181
|
+
Us,
|
|
1182
|
+
{
|
|
1183
|
+
value: e.note ?? "",
|
|
1184
|
+
maxLength: as,
|
|
1185
|
+
rows: 3,
|
|
1186
|
+
onChange: (l) => F({ note: l.target.value })
|
|
1187
|
+
}
|
|
1188
|
+
)
|
|
1189
|
+
}
|
|
1190
|
+
) : null,
|
|
1191
|
+
g ? /* @__PURE__ */ s(
|
|
1192
|
+
rt,
|
|
1193
|
+
{
|
|
1194
|
+
checked: !!e.returningPatient,
|
|
1195
|
+
onCheckedChange: (l) => F({ returningPatient: l === !0 }),
|
|
1196
|
+
label: b("booking.details.returningPatient.label")
|
|
1197
|
+
}
|
|
1198
|
+
) : null,
|
|
1199
|
+
nt !== void 0 ? /* @__PURE__ */ v(
|
|
1200
|
+
"div",
|
|
1201
|
+
{
|
|
1202
|
+
"data-component": "booking-critical-information",
|
|
1203
|
+
role: "group",
|
|
1204
|
+
"aria-labelledby": `${O}-critical-information-heading`,
|
|
1205
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
|
|
1206
|
+
children: [
|
|
1207
|
+
/* @__PURE__ */ s(
|
|
1208
|
+
"h3",
|
|
1209
|
+
{
|
|
1210
|
+
id: `${O}-critical-information-heading`,
|
|
1211
|
+
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
|
|
1212
|
+
children: b("booking.details.criticalInformation.heading")
|
|
1213
|
+
}
|
|
1214
|
+
),
|
|
1215
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: ei(nt).map(
|
|
1216
|
+
(l, m) => l.kind === "link" ? /* @__PURE__ */ s(
|
|
1217
|
+
"a",
|
|
1218
|
+
{
|
|
1219
|
+
href: l.href,
|
|
1220
|
+
target: "_blank",
|
|
1221
|
+
rel: "noopener noreferrer",
|
|
1222
|
+
className: Ut,
|
|
1223
|
+
children: l.text
|
|
1224
|
+
},
|
|
1225
|
+
m
|
|
1226
|
+
) : /* @__PURE__ */ s(Rs, { children: l.text }, m)
|
|
1227
|
+
) }),
|
|
1228
|
+
/* @__PURE__ */ s(
|
|
1229
|
+
rt,
|
|
1230
|
+
{
|
|
1231
|
+
checked: !!e.criticalInformationAccepted,
|
|
1232
|
+
onCheckedChange: (l) => F({ criticalInformationAccepted: l === !0 }),
|
|
1233
|
+
"aria-required": !0,
|
|
1234
|
+
label: /* @__PURE__ */ v(se, { children: [
|
|
1235
|
+
b("booking.details.criticalInformation.accept"),
|
|
1236
|
+
/* @__PURE__ */ s(
|
|
1237
|
+
"span",
|
|
1238
|
+
{
|
|
1239
|
+
"aria-hidden": "true",
|
|
1240
|
+
className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
|
|
1241
|
+
children: "*"
|
|
1242
|
+
}
|
|
1243
|
+
)
|
|
1244
|
+
] })
|
|
1245
|
+
}
|
|
1246
|
+
)
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
) : null,
|
|
1250
|
+
c ? /* @__PURE__ */ v(
|
|
1251
|
+
"div",
|
|
1252
|
+
{
|
|
1253
|
+
"data-component": "booking-payment-notice",
|
|
1254
|
+
role: "group",
|
|
1255
|
+
"aria-labelledby": `${O}-payment-heading`,
|
|
1256
|
+
"data-notice-style": A,
|
|
1257
|
+
className: ri({
|
|
1258
|
+
noticeStyle: A
|
|
1259
|
+
}),
|
|
1260
|
+
children: [
|
|
1261
|
+
A === "highlighted" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1262
|
+
/* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(Hs, { "aria-hidden": "true", className: "ds:size-5" }) }),
|
|
1263
|
+
/* @__PURE__ */ s(
|
|
1264
|
+
"h3",
|
|
1265
|
+
{
|
|
1266
|
+
id: `${O}-payment-heading`,
|
|
1267
|
+
className: "type-title-item ds:m-0 ds:flex-1",
|
|
1268
|
+
children: b("booking.payment.noticeTitle")
|
|
1269
|
+
}
|
|
1270
|
+
),
|
|
1271
|
+
/* @__PURE__ */ s(
|
|
1272
|
+
"span",
|
|
1273
|
+
{
|
|
1274
|
+
"aria-hidden": "true",
|
|
1275
|
+
className: "type-title-card ds:shrink-0 ds:text-[var(--foreground)]",
|
|
1276
|
+
children: ce
|
|
1277
|
+
}
|
|
1278
|
+
)
|
|
1279
|
+
] }) : /* @__PURE__ */ s(
|
|
1280
|
+
"h3",
|
|
1281
|
+
{
|
|
1282
|
+
id: `${O}-payment-heading`,
|
|
1283
|
+
className: "type-label ds:m-0",
|
|
1284
|
+
children: b("booking.payment.noticeTitle")
|
|
1285
|
+
}
|
|
1286
|
+
),
|
|
1287
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount: ce }) }),
|
|
1288
|
+
_e ? /* @__PURE__ */ s(
|
|
1289
|
+
"a",
|
|
1290
|
+
{
|
|
1291
|
+
href: _e,
|
|
1292
|
+
target: "_blank",
|
|
1293
|
+
rel: "noopener noreferrer",
|
|
1294
|
+
className: "type-body-sm ds:inline-flex ds:items-center ds:self-start ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1295
|
+
children: b("booking.payment.terms")
|
|
1296
|
+
}
|
|
1297
|
+
) : null,
|
|
1298
|
+
/* @__PURE__ */ s(
|
|
1299
|
+
rt,
|
|
1300
|
+
{
|
|
1301
|
+
checked: Ye,
|
|
1302
|
+
onCheckedChange: (l) => {
|
|
1303
|
+
xt(
|
|
1304
|
+
l === !0 ? Ce : void 0
|
|
1305
|
+
), F({ paymentAccepted: l === !0 });
|
|
1306
|
+
},
|
|
1307
|
+
"aria-required": !0,
|
|
1308
|
+
label: /* @__PURE__ */ v(se, { children: [
|
|
1309
|
+
b("booking.payment.accept", { amount: ce }),
|
|
1310
|
+
/* @__PURE__ */ s(
|
|
1311
|
+
"span",
|
|
1312
|
+
{
|
|
1313
|
+
"aria-hidden": "true",
|
|
1314
|
+
className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
|
|
1315
|
+
children: "*"
|
|
1316
|
+
}
|
|
1317
|
+
)
|
|
1318
|
+
] })
|
|
1319
|
+
}
|
|
1320
|
+
)
|
|
1321
|
+
]
|
|
1322
|
+
}
|
|
1323
|
+
) : null,
|
|
1324
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1325
|
+
/* @__PURE__ */ s(
|
|
1326
|
+
rt,
|
|
1327
|
+
{
|
|
1328
|
+
checked: !!e.privacyConsent,
|
|
1329
|
+
onCheckedChange: (l) => F({ privacyConsent: l === !0 }),
|
|
1330
|
+
"aria-required": !0,
|
|
1331
|
+
label: /* @__PURE__ */ v(se, { children: [
|
|
1332
|
+
Pe(
|
|
1333
|
+
"booking.details.consent.privacy.label",
|
|
1334
|
+
p
|
|
1335
|
+
),
|
|
1336
|
+
/* @__PURE__ */ s(
|
|
1337
|
+
"span",
|
|
1338
|
+
{
|
|
1339
|
+
"aria-hidden": "true",
|
|
1340
|
+
className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
|
|
1341
|
+
children: "*"
|
|
1342
|
+
}
|
|
1343
|
+
)
|
|
1344
|
+
] })
|
|
1345
|
+
}
|
|
1346
|
+
),
|
|
1347
|
+
/* @__PURE__ */ s(
|
|
1348
|
+
rt,
|
|
1349
|
+
{
|
|
1350
|
+
checked: !!e.termsConsent,
|
|
1351
|
+
onCheckedChange: (l) => F({ termsConsent: l === !0 }),
|
|
1352
|
+
"aria-required": !0,
|
|
1353
|
+
label: /* @__PURE__ */ v(se, { children: [
|
|
1354
|
+
Pe(
|
|
1355
|
+
"booking.details.consent.terms.label",
|
|
1356
|
+
h
|
|
1357
|
+
),
|
|
1358
|
+
/* @__PURE__ */ s(
|
|
1359
|
+
"span",
|
|
1360
|
+
{
|
|
1361
|
+
"aria-hidden": "true",
|
|
1362
|
+
className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
|
|
1363
|
+
children: "*"
|
|
1364
|
+
}
|
|
1365
|
+
)
|
|
1366
|
+
] })
|
|
1367
|
+
}
|
|
1368
|
+
),
|
|
1369
|
+
o && Ze ? /* @__PURE__ */ s(
|
|
1370
|
+
rt,
|
|
1371
|
+
{
|
|
1372
|
+
checked: Fe,
|
|
1373
|
+
onCheckedChange: (l) => {
|
|
1374
|
+
It(
|
|
1375
|
+
l === !0 ? Ne : void 0
|
|
1376
|
+
), F({ practiceConsentAccepted: l === !0 });
|
|
1377
|
+
},
|
|
1378
|
+
"aria-required": o.required || void 0,
|
|
1379
|
+
label: /* @__PURE__ */ v(se, { children: [
|
|
1380
|
+
Ot(o.url) ? /* @__PURE__ */ s(
|
|
1381
|
+
"a",
|
|
1382
|
+
{
|
|
1383
|
+
href: Ot(o.url),
|
|
1384
|
+
target: "_blank",
|
|
1385
|
+
rel: "noopener noreferrer",
|
|
1386
|
+
className: Ut,
|
|
1387
|
+
children: o.label
|
|
1388
|
+
}
|
|
1389
|
+
) : o.label,
|
|
1390
|
+
o.required ? /* @__PURE__ */ s(
|
|
1391
|
+
"span",
|
|
1392
|
+
{
|
|
1393
|
+
"aria-hidden": "true",
|
|
1394
|
+
className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
|
|
1395
|
+
children: "*"
|
|
1396
|
+
}
|
|
1397
|
+
) : null
|
|
1398
|
+
] })
|
|
1399
|
+
}
|
|
1400
|
+
) : null
|
|
1401
|
+
] }),
|
|
1402
|
+
ue ? /* @__PURE__ */ s(
|
|
1403
|
+
"div",
|
|
1404
|
+
{
|
|
1405
|
+
"data-component": "booking-confirmation-channels",
|
|
1406
|
+
"data-unanswered": z || void 0,
|
|
1407
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1408
|
+
children: /* @__PURE__ */ s(
|
|
1409
|
+
qs,
|
|
1410
|
+
{
|
|
1411
|
+
label: b("booking.confirmation.heading"),
|
|
1412
|
+
helperText: b("booking.confirmation.helper"),
|
|
1413
|
+
value: q,
|
|
1414
|
+
onChange: (l) => F({
|
|
1415
|
+
confirmationChannels: l
|
|
1416
|
+
}),
|
|
1417
|
+
orientation: "vertical",
|
|
1418
|
+
options: Qe.map((l) => ({
|
|
1419
|
+
value: l,
|
|
1420
|
+
label: b(`booking.confirmation.channel.${l}`)
|
|
1421
|
+
})),
|
|
1422
|
+
error: z ? b("booking.confirmation.atLeastOne") : void 0
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1425
|
+
}
|
|
1426
|
+
) : null,
|
|
1427
|
+
B || G || x ? /* @__PURE__ */ s(Q, { variant: "error", children: /* @__PURE__ */ s(Q.Description, { children: B ?? b(
|
|
1428
|
+
x ? "booking.payment.unavailable" : "booking.payment.submitFailed"
|
|
1429
|
+
) }) }) : null,
|
|
1430
|
+
/* @__PURE__ */ s(
|
|
1431
|
+
Je,
|
|
1432
|
+
{
|
|
1433
|
+
intent: "primary",
|
|
1434
|
+
size: "md",
|
|
1435
|
+
type: "submit",
|
|
1436
|
+
disabled: be || x,
|
|
1437
|
+
"aria-disabled": !it || void 0,
|
|
1438
|
+
startIcon: be ? /* @__PURE__ */ s(us, { variant: "pulse", size: "sm" }) : void 0,
|
|
1439
|
+
children: c ? b("booking.payment.submit", { amount: ce }) : b("booking.details.submit")
|
|
1440
|
+
}
|
|
1441
|
+
)
|
|
1442
|
+
]
|
|
1443
|
+
}
|
|
1444
|
+
);
|
|
1445
|
+
}
|
|
1446
|
+
);
|
|
1447
|
+
Zt.displayName = "BookingDetailsForm";
|
|
1448
|
+
function Xt(e) {
|
|
1449
|
+
const t = e.payment;
|
|
1450
|
+
if (!t) return;
|
|
1451
|
+
const n = (t.currencyCode ?? "EUR").toUpperCase();
|
|
1452
|
+
if (!(!Number.isSafeInteger(t.amountCents) || t.amountCents <= 0 || !["full", "deposit"].includes(t.kind) || !/^[A-Z]{3}$/.test(n)))
|
|
1453
|
+
return {
|
|
1454
|
+
serviceId: e.id,
|
|
1455
|
+
kind: t.kind,
|
|
1456
|
+
amountCents: t.amountCents,
|
|
1457
|
+
currencyCode: n
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
function di(e, t, n) {
|
|
1461
|
+
const r = e.filter(
|
|
1462
|
+
(a) => t.includes(a.id)
|
|
1463
|
+
), i = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
|
|
1464
|
+
if (i) {
|
|
1465
|
+
const a = r.find((u) => u.id === i);
|
|
1466
|
+
if (!a) return { blocked: !0 };
|
|
1467
|
+
const d = Xt(a);
|
|
1468
|
+
return { payment: d, blocked: !!(a.payment && !d) };
|
|
1469
|
+
}
|
|
1470
|
+
return { blocked: r.some((a) => !!a.payment) };
|
|
1471
|
+
}
|
|
1472
|
+
function Ft(e) {
|
|
1473
|
+
return e ? JSON.stringify([
|
|
1474
|
+
e.serviceId,
|
|
1475
|
+
e.kind,
|
|
1476
|
+
e.amountCents,
|
|
1477
|
+
e.currencyCode
|
|
1478
|
+
]) : "";
|
|
1479
|
+
}
|
|
1480
|
+
function li({
|
|
1481
|
+
services: e,
|
|
1482
|
+
value: t,
|
|
1483
|
+
availableSlots: n,
|
|
1484
|
+
onSubmit: r,
|
|
1485
|
+
onChange: i,
|
|
1486
|
+
paymentState: a,
|
|
1487
|
+
submitting: d,
|
|
1488
|
+
paymentTermsUrl: u,
|
|
1489
|
+
renderPayment: g
|
|
1490
|
+
}) {
|
|
1491
|
+
var ve, qe, De;
|
|
1492
|
+
const p = JSON.stringify([
|
|
1493
|
+
t.insuranceType,
|
|
1494
|
+
t.specialtyId,
|
|
1495
|
+
t.specialtyIds,
|
|
1496
|
+
Te(t),
|
|
1497
|
+
t.operatorId,
|
|
1498
|
+
t.operatorIds,
|
|
1499
|
+
t.date,
|
|
1500
|
+
t.slotKey
|
|
1501
|
+
]), h = _(
|
|
1502
|
+
void 0
|
|
1503
|
+
), c = (t.date ? (ve = n[t.date]) == null ? void 0 : ve.find((G) => G.key === t.slotKey) : void 0) ?? (((qe = h.current) == null ? void 0 : qe.selection) === p ? h.current.slot : void 0), f = di(
|
|
1504
|
+
e,
|
|
1505
|
+
Te(t),
|
|
1506
|
+
c
|
|
1507
|
+
), x = f.blocked || !!(f.payment && !g), I = JSON.stringify([
|
|
1508
|
+
p,
|
|
1509
|
+
c == null ? void 0 : c.serviceId,
|
|
1510
|
+
Ft(f.payment),
|
|
1511
|
+
u,
|
|
1512
|
+
x
|
|
1513
|
+
]), A = f.payment ? JSON.stringify([Ft(f.payment), u]) : "", E = _(void 0), w = !!((De = t.details) != null && De.paymentAccepted);
|
|
1514
|
+
V(() => {
|
|
1515
|
+
if (!w) E.current = void 0;
|
|
1516
|
+
else if (A) E.current === void 0 ? E.current = A : E.current !== A && (E.current = void 0, i({
|
|
1517
|
+
...t,
|
|
1518
|
+
details: { ...t.details, paymentAccepted: !1 }
|
|
1519
|
+
}));
|
|
1520
|
+
else return;
|
|
1521
|
+
}, [w, A, i, t]);
|
|
1522
|
+
const S = _(I);
|
|
1523
|
+
S.current = I;
|
|
1524
|
+
const [N, T] = X({ status: "idle" }), D = _(0), y = _(!1), k = _(!0), B = _(!1), $ = _(void 0), b = _(I);
|
|
1525
|
+
V(() => (k.current = !0, () => {
|
|
1526
|
+
k.current = !1, D.current += 1;
|
|
1527
|
+
}), []);
|
|
1528
|
+
const ge = N.status === "payment" || N.status === "success";
|
|
1529
|
+
V(() => {
|
|
1530
|
+
b.current === I || B.current || ge || (b.current = I, D.current += 1, y.current = !1, T({ status: "idle" }));
|
|
1531
|
+
}, [I, ge]);
|
|
1532
|
+
const O = ge || b.current === I ? N.session : void 0, K = L(
|
|
1533
|
+
() => O && (a == null ? void 0 : a.sessionId) === O.id ? a : O ? { sessionId: O.id, status: "ready" } : void 0,
|
|
1534
|
+
[O, a]
|
|
1535
|
+
);
|
|
1536
|
+
O && K && "phase" in K && K.phase === "completion" && ($.current = O.id);
|
|
1537
|
+
const M = L(
|
|
1538
|
+
() => O && $.current === O.id && K && K.status !== "paid" && (!("phase" in K) || K.phase !== "completion") ? {
|
|
1539
|
+
sessionId: O.id,
|
|
1540
|
+
status: "processing",
|
|
1541
|
+
phase: "completion"
|
|
1542
|
+
} : K,
|
|
1543
|
+
[O, K]
|
|
1544
|
+
);
|
|
1545
|
+
V(() => {
|
|
1546
|
+
!O || !M || B.current || (M.status === "paid" ? (B.current = !0, T((G) => ({ ...G, status: "success" }))) : M.status === "cancelled" && (D.current += 1, y.current = !1, h.current = void 0, i({
|
|
1547
|
+
...t,
|
|
1548
|
+
details: { ...t.details, paymentAccepted: !1 }
|
|
1549
|
+
}), T({ status: "idle", cancelled: !0 })));
|
|
1550
|
+
}, [O, M, i, t]);
|
|
1551
|
+
const he = () => {
|
|
1552
|
+
D.current += 1, y.current = !1, B.current = !1, $.current = void 0, h.current = void 0, b.current = S.current, T({ status: "idle" });
|
|
1553
|
+
}, dt = async (G) => {
|
|
1554
|
+
var ke, W, Me, ne, oe;
|
|
1555
|
+
if (!(c != null && c.available) || x || d || y.current || N.status === "payment" || B.current || f.payment && !G.paymentAccepted) return;
|
|
1556
|
+
y.current = !0, h.current = { selection: p, slot: { ...c } };
|
|
1557
|
+
const Oe = ++D.current, be = I;
|
|
1558
|
+
b.current = be;
|
|
1559
|
+
const H = {
|
|
1560
|
+
slot: { ...c, meta: c.meta ? { ...c.meta } : void 0 },
|
|
1561
|
+
value: {
|
|
1562
|
+
...t,
|
|
1563
|
+
serviceIds: (ke = t.serviceIds) == null ? void 0 : ke.slice(),
|
|
1564
|
+
specialtyIds: (W = t.specialtyIds) == null ? void 0 : W.slice(),
|
|
1565
|
+
operatorIds: (Me = t.operatorIds) == null ? void 0 : Me.slice(),
|
|
1566
|
+
operatorId: Is(t) ?? t.operatorId,
|
|
1567
|
+
details: { ...G }
|
|
1568
|
+
},
|
|
1569
|
+
details: {
|
|
1570
|
+
...G,
|
|
1571
|
+
confirmationChannels: (ne = G.confirmationChannels) == null ? void 0 : ne.slice()
|
|
1572
|
+
},
|
|
1573
|
+
...f.payment ? { payment: { ...f.payment } } : {}
|
|
1574
|
+
}, ae = () => k.current && D.current === Oe && S.current === be;
|
|
1575
|
+
T({ status: "submitting" });
|
|
1576
|
+
let ye = !1;
|
|
1577
|
+
try {
|
|
1578
|
+
const Y = await r(H);
|
|
1579
|
+
if (!ae()) return;
|
|
1580
|
+
if (H.payment) {
|
|
1581
|
+
const F = Y == null ? void 0 : Y.paymentSession;
|
|
1582
|
+
if (!((oe = F == null ? void 0 : F.id) != null && oe.trim()) || Ft(F.payment) !== Ft(H.payment)) {
|
|
1583
|
+
T({ status: "error" });
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
ye = !0, T({
|
|
1587
|
+
status: "payment",
|
|
1588
|
+
snapshot: H,
|
|
1589
|
+
session: { id: F.id, payment: { ...F.payment } }
|
|
1590
|
+
});
|
|
1591
|
+
} else Y != null && Y.paymentSession ? T({ status: "error" }) : (B.current = !0, T({ status: "success", snapshot: H }));
|
|
1592
|
+
} catch {
|
|
1593
|
+
ae() && T({ status: "error" });
|
|
1594
|
+
} finally {
|
|
1595
|
+
ae() && !ye && (y.current = !1);
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
return {
|
|
1599
|
+
...N,
|
|
1600
|
+
payment: f.payment,
|
|
1601
|
+
blocked: x,
|
|
1602
|
+
state: M,
|
|
1603
|
+
activeSession: O,
|
|
1604
|
+
submit: dt,
|
|
1605
|
+
reset: he
|
|
1606
|
+
};
|
|
1607
|
+
}
|
|
1608
|
+
const ui = kt(
|
|
1609
|
+
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
|
|
1610
|
+
{
|
|
1611
|
+
variants: {
|
|
1612
|
+
variant: {
|
|
1613
|
+
"inline-list": "ds:gap-[var(--spacing-md)]",
|
|
1614
|
+
accordion: "ds:gap-[var(--spacing-md)]",
|
|
1615
|
+
calendar: "ds:gap-[var(--spacing-md)]",
|
|
1616
|
+
flexible: "ds:gap-[var(--spacing-lg)]",
|
|
1617
|
+
progress: "ds:gap-[var(--spacing-sm)]"
|
|
1618
|
+
},
|
|
1619
|
+
// `surface="elevated"` matches `Card variant="elevated"` — same
|
|
1620
|
+
// tokens, same padding, same boundary behaviour — so consumers can
|
|
1621
|
+
// drop their own Card wraps without a double-card look. Default
|
|
1622
|
+
// `'flat'` preserves 0.30.x rendering.
|
|
1623
|
+
surface: {
|
|
1624
|
+
flat: "",
|
|
1625
|
+
elevated: [
|
|
1626
|
+
"ds:rounded-[var(--radius-lg)]",
|
|
1627
|
+
"ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
|
|
1628
|
+
"ds:border ds:border-[color:var(--card-border)]",
|
|
1629
|
+
"ds:shadow-[var(--shadow-card)]",
|
|
1630
|
+
"ds:p-[var(--spacing-md)]"
|
|
1631
|
+
].join(" ")
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
defaultVariants: { variant: "inline-list", surface: "flat" }
|
|
1635
|
+
}
|
|
1636
|
+
), pi = [
|
|
1637
|
+
[
|
|
1638
|
+
/\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
|
|
1639
|
+
is
|
|
1640
|
+
],
|
|
1641
|
+
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, on],
|
|
1642
|
+
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, On],
|
|
1643
|
+
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, cn],
|
|
1644
|
+
[/\b(otorin|udito|orecchi|hearing|ear)/i, xn],
|
|
1645
|
+
[/\b(neuro|brain|cervello)/i, bn],
|
|
1646
|
+
[/\b(pediatr|child|bambin)/i, dn],
|
|
1647
|
+
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, hn],
|
|
1648
|
+
[/\b(lab|analis|test|sang|esami)/i, Nn],
|
|
1649
|
+
[/\b(farmaco|pharm|pillol|refill)/i, Cn],
|
|
1650
|
+
[/\b(chirurg|surg|intervent|operat)/i, Tn],
|
|
1651
|
+
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, ln],
|
|
1652
|
+
[/\b(vacc|inject|inie|punto)/i, is],
|
|
1653
|
+
[/\b(derma|skin|pelle)/i, un],
|
|
1654
|
+
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, pn],
|
|
1655
|
+
[/\b(general|medicin|family|control|check[-\s]?up)/i, fn]
|
|
1656
|
+
];
|
|
1657
|
+
function mi(e) {
|
|
1658
|
+
for (const [t, n] of pi)
|
|
1659
|
+
if (t.test(e)) return n;
|
|
1660
|
+
return null;
|
|
1661
|
+
}
|
|
1662
|
+
function fi(e) {
|
|
1663
|
+
const t = mi(e.label) ?? an;
|
|
1664
|
+
return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
|
|
1665
|
+
}
|
|
1666
|
+
function Cs(e) {
|
|
1667
|
+
var t;
|
|
1668
|
+
return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
|
|
1669
|
+
}
|
|
1670
|
+
function He(e) {
|
|
1671
|
+
return Lt(e, "yyyy-MM-dd");
|
|
1672
|
+
}
|
|
1673
|
+
const gi = [
|
|
1674
|
+
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
1675
|
+
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
1676
|
+
"ds:rounded-[var(--radius-sm)]",
|
|
1677
|
+
"ds:text-[length:var(--font-size-sm)]",
|
|
1678
|
+
"ds:transition-colors ds:duration-[var(--animation-duration)]",
|
|
1679
|
+
"ds:motion-reduce:transition-none",
|
|
1680
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1681
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1682
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1683
|
+
].join(" "), hi = kt(gi, {
|
|
1684
|
+
variants: {
|
|
1685
|
+
state: {
|
|
1686
|
+
available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
|
|
1687
|
+
unavailable: "ds:cursor-not-allowed ds:text-[var(--muted-foreground)]/60",
|
|
1688
|
+
selected: "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)] ds:font-[var(--font-weight-semibold)]",
|
|
1689
|
+
outside: "ds:text-[var(--muted-foreground)]/40"
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
defaultVariants: { state: "unavailable" }
|
|
1693
|
+
});
|
|
1694
|
+
function vi({
|
|
1695
|
+
availableDates: e,
|
|
1696
|
+
selectedDate: t,
|
|
1697
|
+
onSelectDate: n,
|
|
1698
|
+
locale: r,
|
|
1699
|
+
loading: i
|
|
1700
|
+
}) {
|
|
1701
|
+
const { t: a } = U("ui"), d = L(() => t ? bt(me(t)) : e.length > 0 ? bt(me(e[0])) : bt(/* @__PURE__ */ new Date()), [t, e]), [u, g] = X(d), [p, h] = X(null), o = L(() => {
|
|
1702
|
+
const w = bt(u), S = Qs(u), N = w.getDay(), T = S.getDate(), D = [];
|
|
1703
|
+
for (let y = N; y > 0; y -= 1) {
|
|
1704
|
+
const k = new Date(w);
|
|
1705
|
+
k.setDate(w.getDate() - y), D.push(k);
|
|
1706
|
+
}
|
|
1707
|
+
for (let y = 0; y < T; y += 1) {
|
|
1708
|
+
const k = new Date(w);
|
|
1709
|
+
k.setDate(w.getDate() + y), D.push(k);
|
|
1710
|
+
}
|
|
1711
|
+
for (; D.length < 42; ) {
|
|
1712
|
+
const y = D[D.length - 1], k = new Date(y);
|
|
1713
|
+
k.setDate(y.getDate() + 1), D.push(k);
|
|
1714
|
+
}
|
|
1715
|
+
return D;
|
|
1716
|
+
}, [u]), c = L(() => {
|
|
1717
|
+
try {
|
|
1718
|
+
return new Intl.DateTimeFormat(r, {
|
|
1719
|
+
month: "long",
|
|
1720
|
+
year: "numeric"
|
|
1721
|
+
}).format(u);
|
|
1722
|
+
} catch {
|
|
1723
|
+
return Lt(u, "MMMM yyyy");
|
|
1724
|
+
}
|
|
1725
|
+
}, [u, r]), f = L(() => {
|
|
1726
|
+
const w = new Date(2024, 0, 7);
|
|
1727
|
+
return Array.from({ length: 7 }, (S, N) => {
|
|
1728
|
+
const T = new Date(w);
|
|
1729
|
+
T.setDate(w.getDate() + N);
|
|
1730
|
+
try {
|
|
1731
|
+
return new Intl.DateTimeFormat(r, { weekday: "short" }).format(T);
|
|
1732
|
+
} catch {
|
|
1733
|
+
return Lt(T, "EEE");
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1736
|
+
}, [r]), x = L(() => new Set(e), [e]), I = fe(
|
|
1737
|
+
(w) => x.has(He(w)),
|
|
1738
|
+
[x]
|
|
1739
|
+
), A = L(() => {
|
|
1740
|
+
if (p) return p;
|
|
1741
|
+
if (t) return me(t);
|
|
1742
|
+
const w = o.find(
|
|
1743
|
+
(S) => Dt(S, u) && I(S)
|
|
1744
|
+
);
|
|
1745
|
+
return w || (o.find((S) => Dt(S, u)) ?? null);
|
|
1746
|
+
}, [p, t, o, u, I]), E = fe(
|
|
1747
|
+
(w, S) => {
|
|
1748
|
+
let N = null;
|
|
1749
|
+
switch (w.key) {
|
|
1750
|
+
case "ArrowLeft":
|
|
1751
|
+
N = new Date(S), N.setDate(S.getDate() - 1);
|
|
1752
|
+
break;
|
|
1753
|
+
case "ArrowRight":
|
|
1754
|
+
N = new Date(S), N.setDate(S.getDate() + 1);
|
|
1755
|
+
break;
|
|
1756
|
+
case "ArrowUp":
|
|
1757
|
+
N = new Date(S), N.setDate(S.getDate() - 7);
|
|
1758
|
+
break;
|
|
1759
|
+
case "ArrowDown":
|
|
1760
|
+
N = new Date(S), N.setDate(S.getDate() + 7);
|
|
1761
|
+
break;
|
|
1762
|
+
case "Home":
|
|
1763
|
+
N = new Date(S), N.setDate(S.getDate() - S.getDay());
|
|
1764
|
+
break;
|
|
1765
|
+
case "End":
|
|
1766
|
+
N = new Date(S), N.setDate(S.getDate() + (6 - S.getDay()));
|
|
1767
|
+
break;
|
|
1768
|
+
case "Enter":
|
|
1769
|
+
case " ": {
|
|
1770
|
+
w.preventDefault(), I(S) && n(He(S));
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1773
|
+
default:
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
N && (w.preventDefault(), Dt(N, u) || g(bt(N)), h(N));
|
|
1777
|
+
},
|
|
1778
|
+
[I, n, u]
|
|
1779
|
+
);
|
|
1780
|
+
return i ? /* @__PURE__ */ v(
|
|
1781
|
+
"div",
|
|
1782
|
+
{
|
|
1783
|
+
role: "status",
|
|
1784
|
+
"aria-live": "polite",
|
|
1785
|
+
"aria-label": a("common.loading"),
|
|
1786
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1787
|
+
children: [
|
|
1788
|
+
/* @__PURE__ */ s(Bt, { variant: "text", width: "40%" }),
|
|
1789
|
+
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w, S) => /* @__PURE__ */ s(Bt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${S}`)) })
|
|
1790
|
+
]
|
|
1791
|
+
}
|
|
1792
|
+
) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1793
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1794
|
+
/* @__PURE__ */ s(
|
|
1795
|
+
ss,
|
|
1796
|
+
{
|
|
1797
|
+
icon: /* @__PURE__ */ s(tn, {}),
|
|
1798
|
+
"aria-label": a("booking.previousMonth"),
|
|
1799
|
+
size: "sm",
|
|
1800
|
+
intent: "ghost",
|
|
1801
|
+
flipIconInRtl: !0,
|
|
1802
|
+
onClick: () => {
|
|
1803
|
+
g((w) => Ln(w)), h(null);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
),
|
|
1807
|
+
/* @__PURE__ */ s(
|
|
1808
|
+
"span",
|
|
1809
|
+
{
|
|
1810
|
+
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1811
|
+
"aria-live": "polite",
|
|
1812
|
+
children: c
|
|
1813
|
+
}
|
|
1814
|
+
),
|
|
1815
|
+
/* @__PURE__ */ s(
|
|
1816
|
+
ss,
|
|
1817
|
+
{
|
|
1818
|
+
icon: /* @__PURE__ */ s(sn, {}),
|
|
1819
|
+
"aria-label": a("booking.nextMonth"),
|
|
1820
|
+
size: "sm",
|
|
1821
|
+
intent: "ghost",
|
|
1822
|
+
flipIconInRtl: !0,
|
|
1823
|
+
onClick: () => {
|
|
1824
|
+
g((w) => fs(w, 1)), h(null);
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
)
|
|
1828
|
+
] }),
|
|
1829
|
+
/* @__PURE__ */ v(
|
|
1830
|
+
"div",
|
|
1831
|
+
{
|
|
1832
|
+
role: "grid",
|
|
1833
|
+
"aria-label": a("booking.monthGridLabel"),
|
|
1834
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
1835
|
+
children: [
|
|
1836
|
+
/* @__PURE__ */ s(
|
|
1837
|
+
"div",
|
|
1838
|
+
{
|
|
1839
|
+
role: "row",
|
|
1840
|
+
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1841
|
+
children: f.map((w, S) => /* @__PURE__ */ s(
|
|
1842
|
+
"div",
|
|
1843
|
+
{
|
|
1844
|
+
role: "columnheader",
|
|
1845
|
+
className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
|
|
1846
|
+
children: w
|
|
1847
|
+
},
|
|
1848
|
+
`wd-${S}`
|
|
1849
|
+
))
|
|
1850
|
+
}
|
|
1851
|
+
),
|
|
1852
|
+
Array.from({ length: 6 }, (w, S) => /* @__PURE__ */ s(
|
|
1853
|
+
"div",
|
|
1854
|
+
{
|
|
1855
|
+
role: "row",
|
|
1856
|
+
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1857
|
+
children: o.slice(S * 7, S * 7 + 7).map((N, T) => {
|
|
1858
|
+
const D = S * 7 + T, y = Dt(N, u), k = y && I(N), B = t ? ns(N, me(t)) : !1, $ = y ? B ? "selected" : k ? "available" : "unavailable" : "outside", b = A ? ns(A, N) : !1, ge = (() => {
|
|
1859
|
+
try {
|
|
1860
|
+
return new Intl.DateTimeFormat(r, {
|
|
1861
|
+
dateStyle: "full"
|
|
1862
|
+
}).format(N);
|
|
1863
|
+
} catch {
|
|
1864
|
+
return Lt(N, "PPP");
|
|
1865
|
+
}
|
|
1866
|
+
})();
|
|
1867
|
+
return /* @__PURE__ */ s(
|
|
1868
|
+
"button",
|
|
1869
|
+
{
|
|
1870
|
+
type: "button",
|
|
1871
|
+
role: "gridcell",
|
|
1872
|
+
"aria-label": ge,
|
|
1873
|
+
"aria-selected": B || void 0,
|
|
1874
|
+
"aria-disabled": !k || void 0,
|
|
1875
|
+
tabIndex: b ? 0 : -1,
|
|
1876
|
+
disabled: !k,
|
|
1877
|
+
onClick: () => {
|
|
1878
|
+
k && n(He(N));
|
|
1879
|
+
},
|
|
1880
|
+
onKeyDown: (O) => E(O, N),
|
|
1881
|
+
className: hi({ state: $ }),
|
|
1882
|
+
children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: N.getDate() })
|
|
1883
|
+
},
|
|
1884
|
+
`mg-cell-${D}`
|
|
1885
|
+
);
|
|
1886
|
+
})
|
|
1887
|
+
},
|
|
1888
|
+
`mg-row-${S}`
|
|
1889
|
+
))
|
|
1890
|
+
]
|
|
1891
|
+
}
|
|
1892
|
+
)
|
|
1893
|
+
] });
|
|
1894
|
+
}
|
|
1895
|
+
const bi = kt(
|
|
1896
|
+
[
|
|
1897
|
+
"ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
|
|
1898
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
1899
|
+
"ds:rounded-[var(--radius-md)]",
|
|
1900
|
+
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
1901
|
+
"ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
|
|
1902
|
+
"ds:text-start",
|
|
1903
|
+
"ds:transition-[background-color,box-shadow]",
|
|
1904
|
+
"ds:duration-[var(--animation-duration)]",
|
|
1905
|
+
"ds:motion-reduce:transition-none",
|
|
1906
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1907
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1908
|
+
"ds:forced-colors:[outline:1px_solid_CanvasText]",
|
|
1909
|
+
"ds:cursor-pointer"
|
|
1910
|
+
].join(" "),
|
|
1911
|
+
{
|
|
1912
|
+
variants: {
|
|
1913
|
+
state: {
|
|
1914
|
+
idle: "ds:bg-[var(--card)] ds:shadow-[var(--shadow-sm)] ds:hover:shadow-[var(--shadow-md)]",
|
|
1915
|
+
selected: "ds:bg-[color-mix(in_srgb,var(--primary)_8%,var(--card))] ds:shadow-[var(--shadow-sm)]"
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
defaultVariants: { state: "idle" }
|
|
1919
|
+
}
|
|
1920
|
+
);
|
|
1921
|
+
function yi({
|
|
1922
|
+
services: e,
|
|
1923
|
+
selectedServiceId: t,
|
|
1924
|
+
onSelect: n
|
|
1925
|
+
}) {
|
|
1926
|
+
const { t: r, i18n: i } = U("ui"), a = Rt(), [d, u] = X(() => {
|
|
1927
|
+
if (t) {
|
|
1928
|
+
const o = e.findIndex((c) => c.id === t);
|
|
1929
|
+
if (o >= 0) return o;
|
|
1930
|
+
}
|
|
1931
|
+
return 0;
|
|
1932
|
+
}), g = _(/* @__PURE__ */ new Map()), p = fe((o) => {
|
|
1933
|
+
var c;
|
|
1934
|
+
(c = g.current.get(o)) == null || c.focus();
|
|
1935
|
+
}, []), h = fe(
|
|
1936
|
+
(o, c, f) => {
|
|
1937
|
+
const x = e.length;
|
|
1938
|
+
if (x !== 0)
|
|
1939
|
+
switch (o.key) {
|
|
1940
|
+
case "ArrowDown":
|
|
1941
|
+
case "ArrowRight": {
|
|
1942
|
+
o.preventDefault();
|
|
1943
|
+
const I = (c + 1) % x;
|
|
1944
|
+
u(I), p(I);
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
case "ArrowUp":
|
|
1948
|
+
case "ArrowLeft": {
|
|
1949
|
+
o.preventDefault();
|
|
1950
|
+
const I = (c - 1 + x) % x;
|
|
1951
|
+
u(I), p(I);
|
|
1952
|
+
break;
|
|
1953
|
+
}
|
|
1954
|
+
case "Home": {
|
|
1955
|
+
o.preventDefault(), u(0), p(0);
|
|
1956
|
+
break;
|
|
1957
|
+
}
|
|
1958
|
+
case "End": {
|
|
1959
|
+
o.preventDefault();
|
|
1960
|
+
const I = x - 1;
|
|
1961
|
+
u(I), p(I);
|
|
1962
|
+
break;
|
|
1963
|
+
}
|
|
1964
|
+
case "Enter":
|
|
1965
|
+
case " ": {
|
|
1966
|
+
o.preventDefault(), n(f);
|
|
1967
|
+
break;
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
[e.length, p, n]
|
|
1972
|
+
);
|
|
1973
|
+
return e.length === 0 ? null : /* @__PURE__ */ s(
|
|
1974
|
+
"div",
|
|
1975
|
+
{
|
|
1976
|
+
role: "radiogroup",
|
|
1977
|
+
"aria-label": r("booking.serviceListLabel"),
|
|
1978
|
+
id: a,
|
|
1979
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1980
|
+
children: e.map((o, c) => {
|
|
1981
|
+
const f = t === o.id, x = d === c, I = Xt(o), A = o.payment ? I ? r(`booking.payment.${I.kind}`, {
|
|
1982
|
+
amount: St(
|
|
1983
|
+
I.amountCents,
|
|
1984
|
+
I.currencyCode,
|
|
1985
|
+
i.language
|
|
1986
|
+
)
|
|
1987
|
+
}) : r("booking.payment.unavailable") : Cs(o), E = A ? r("booking.serviceCardLabelPrice", {
|
|
1988
|
+
label: o.label,
|
|
1989
|
+
price: A
|
|
1990
|
+
}) : r("booking.serviceCardLabel", {
|
|
1991
|
+
label: o.label,
|
|
1992
|
+
duration: o.durationMin
|
|
1993
|
+
}), w = fi(o);
|
|
1994
|
+
return /* @__PURE__ */ v(
|
|
1995
|
+
"button",
|
|
1996
|
+
{
|
|
1997
|
+
ref: (S) => {
|
|
1998
|
+
S ? g.current.set(c, S) : g.current.delete(c);
|
|
1999
|
+
},
|
|
2000
|
+
type: "button",
|
|
2001
|
+
role: "radio",
|
|
2002
|
+
"aria-checked": f,
|
|
2003
|
+
"aria-label": E,
|
|
2004
|
+
tabIndex: x ? 0 : -1,
|
|
2005
|
+
onClick: () => n(o.id),
|
|
2006
|
+
onFocus: () => u(c),
|
|
2007
|
+
onKeyDown: (S) => h(S, c, o.id),
|
|
2008
|
+
className: bi({
|
|
2009
|
+
state: f ? "selected" : "idle"
|
|
2010
|
+
}),
|
|
2011
|
+
children: [
|
|
2012
|
+
/* @__PURE__ */ s(
|
|
2013
|
+
"span",
|
|
2014
|
+
{
|
|
2015
|
+
"aria-hidden": "true",
|
|
2016
|
+
className: "ds:flex ds:size-10 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-[var(--primary)]/10 ds:text-[var(--primary)]",
|
|
2017
|
+
children: w
|
|
2018
|
+
}
|
|
2019
|
+
),
|
|
2020
|
+
/* @__PURE__ */ v("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2021
|
+
/* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: o.label }),
|
|
2022
|
+
A ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: r("booking.serviceSummary", {
|
|
2023
|
+
minutes: o.durationMin
|
|
2024
|
+
}) })
|
|
2025
|
+
] }),
|
|
2026
|
+
A ? /* @__PURE__ */ s(
|
|
2027
|
+
"span",
|
|
2028
|
+
{
|
|
2029
|
+
"aria-hidden": "true",
|
|
2030
|
+
className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
|
|
2031
|
+
children: /* @__PURE__ */ s(ps, { variant: "accentSoft", size: "lg", children: A })
|
|
2032
|
+
}
|
|
2033
|
+
) : null
|
|
2034
|
+
]
|
|
2035
|
+
},
|
|
2036
|
+
o.id
|
|
2037
|
+
);
|
|
2038
|
+
})
|
|
2039
|
+
}
|
|
2040
|
+
);
|
|
2041
|
+
}
|
|
2042
|
+
const ki = kt(
|
|
2043
|
+
[
|
|
2044
|
+
"ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
|
|
2045
|
+
"ds:min-h-[var(--min-target-size)]",
|
|
2046
|
+
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
2047
|
+
"ds:pt-[var(--spacing-2xs)] ds:pb-[var(--spacing-2xs)]",
|
|
2048
|
+
"ds:rounded-[var(--radius-md)]",
|
|
2049
|
+
"ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-medium)]",
|
|
2050
|
+
"ds:transition-[background-color,color,box-shadow] ds:duration-[var(--animation-duration)]",
|
|
2051
|
+
"ds:motion-reduce:transition-none",
|
|
2052
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2053
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2054
|
+
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
|
|
2055
|
+
"ds:forced-colors:[border:1px_solid_ButtonText] ds:forced-colors:text-[ButtonText]"
|
|
2056
|
+
].join(" "),
|
|
2057
|
+
{
|
|
2058
|
+
variants: {
|
|
2059
|
+
state: {
|
|
2060
|
+
idle: "ds:bg-[color:var(--card)] ds:text-[color:var(--foreground)] ds:shadow-[var(--shadow-sm)] ds:hover:enabled:bg-[color:var(--muted)]/40 ds:hover:enabled:shadow-[var(--shadow-md)]",
|
|
2061
|
+
selected: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:shadow-[var(--shadow-sm)]",
|
|
2062
|
+
unavailable: "ds:[outline:1px_dashed_color:var(--border)] ds:[outline-offset:-1px] ds:bg-transparent ds:text-[color:var(--muted-foreground)]"
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
defaultVariants: { state: "idle" }
|
|
2066
|
+
}
|
|
2067
|
+
);
|
|
2068
|
+
function Si(e) {
|
|
2069
|
+
const [t] = e.split(":").map((r) => parseInt(r, 10)), n = Number.isFinite(t) ? t : 0;
|
|
2070
|
+
return n < 12 ? "morning" : n < 17 ? "afternoon" : "evening";
|
|
2071
|
+
}
|
|
2072
|
+
const xi = {
|
|
2073
|
+
morning: rn,
|
|
2074
|
+
afternoon: Fn,
|
|
2075
|
+
evening: nn
|
|
2076
|
+
};
|
|
2077
|
+
function Ii({
|
|
2078
|
+
date: e,
|
|
2079
|
+
slots: t,
|
|
2080
|
+
selectedSlotKey: n,
|
|
2081
|
+
onSelect: r,
|
|
2082
|
+
loading: i,
|
|
2083
|
+
locale: a
|
|
2084
|
+
}) {
|
|
2085
|
+
const { t: d } = U("ui"), u = L(() => {
|
|
2086
|
+
try {
|
|
2087
|
+
return new Intl.DateTimeFormat(a, {
|
|
2088
|
+
weekday: "long",
|
|
2089
|
+
day: "numeric",
|
|
2090
|
+
month: "long"
|
|
2091
|
+
}).format(me(e));
|
|
2092
|
+
} catch {
|
|
2093
|
+
return e;
|
|
2094
|
+
}
|
|
2095
|
+
}, [e, a]), g = L(() => {
|
|
2096
|
+
const o = {
|
|
2097
|
+
morning: [],
|
|
2098
|
+
afternoon: [],
|
|
2099
|
+
evening: []
|
|
2100
|
+
};
|
|
2101
|
+
for (const c of t)
|
|
2102
|
+
o[Si(c.time)].push(c);
|
|
2103
|
+
return o;
|
|
2104
|
+
}, [t]), p = t.filter((o) => o.available).length, h = ["morning", "afternoon", "evening"];
|
|
2105
|
+
return i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2106
|
+
/* @__PURE__ */ s(Bt, { variant: "text", width: "60%" }),
|
|
2107
|
+
[0, 1].map((o) => /* @__PURE__ */ s(
|
|
2108
|
+
"div",
|
|
2109
|
+
{
|
|
2110
|
+
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
|
|
2111
|
+
children: [0, 1, 2].map((c) => /* @__PURE__ */ s(Bt, { variant: "rounded", height: "44px" }, c))
|
|
2112
|
+
},
|
|
2113
|
+
o
|
|
2114
|
+
))
|
|
2115
|
+
] }) : p === 0 ? /* @__PURE__ */ s(ms, { variant: "no-results", title: d("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2116
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
2117
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
2118
|
+
/* @__PURE__ */ s(
|
|
2119
|
+
kn,
|
|
2120
|
+
{
|
|
2121
|
+
"aria-hidden": "true",
|
|
2122
|
+
className: "ds:size-4 ds:text-[color:var(--accent)]"
|
|
2123
|
+
}
|
|
2124
|
+
),
|
|
2125
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u })
|
|
2126
|
+
] }),
|
|
2127
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: d("booking.slotsAvailable", { count: p }) })
|
|
2128
|
+
] }),
|
|
2129
|
+
h.map((o) => {
|
|
2130
|
+
const c = g[o];
|
|
2131
|
+
if (c.length === 0) return null;
|
|
2132
|
+
const f = xi[o];
|
|
2133
|
+
return /* @__PURE__ */ v(
|
|
2134
|
+
"div",
|
|
2135
|
+
{
|
|
2136
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
2137
|
+
children: [
|
|
2138
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
2139
|
+
/* @__PURE__ */ s(f, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
2140
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: d(`booking.timeOfDay.${o}`) })
|
|
2141
|
+
] }),
|
|
2142
|
+
/* @__PURE__ */ s(
|
|
2143
|
+
"div",
|
|
2144
|
+
{
|
|
2145
|
+
role: "group",
|
|
2146
|
+
"aria-label": d(`booking.timeOfDay.${o}`),
|
|
2147
|
+
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
|
|
2148
|
+
children: c.map((x) => {
|
|
2149
|
+
const I = x.key === n, A = x.available ? I ? "selected" : "idle" : "unavailable";
|
|
2150
|
+
return /* @__PURE__ */ s(
|
|
2151
|
+
"button",
|
|
2152
|
+
{
|
|
2153
|
+
type: "button",
|
|
2154
|
+
"data-slot-id": x.key,
|
|
2155
|
+
disabled: !x.available,
|
|
2156
|
+
"aria-pressed": I,
|
|
2157
|
+
"aria-label": d("booking.slotAvailableLabel", {
|
|
2158
|
+
time: x.time
|
|
2159
|
+
}),
|
|
2160
|
+
onClick: () => x.available && r(x),
|
|
2161
|
+
className: ki({ state: A }),
|
|
2162
|
+
children: x.time
|
|
2163
|
+
},
|
|
2164
|
+
x.key
|
|
2165
|
+
);
|
|
2166
|
+
})
|
|
2167
|
+
}
|
|
2168
|
+
)
|
|
2169
|
+
]
|
|
2170
|
+
},
|
|
2171
|
+
o
|
|
2172
|
+
);
|
|
2173
|
+
})
|
|
2174
|
+
] });
|
|
2175
|
+
}
|
|
2176
|
+
const _t = 4;
|
|
2177
|
+
function Ni({
|
|
2178
|
+
availableDates: e,
|
|
2179
|
+
availableSlots: t,
|
|
2180
|
+
value: n,
|
|
2181
|
+
onChange: r,
|
|
2182
|
+
onDateSelect: i,
|
|
2183
|
+
onWindowChange: a,
|
|
2184
|
+
loadingDates: d,
|
|
2185
|
+
loadingSlots: u,
|
|
2186
|
+
locale: g,
|
|
2187
|
+
agentIdBase: p
|
|
2188
|
+
}) {
|
|
2189
|
+
const h = L(() => at(/* @__PURE__ */ new Date()), []), [o, c] = X(() => {
|
|
2190
|
+
if (n.date) {
|
|
2191
|
+
const k = at(me(n.date));
|
|
2192
|
+
if (!ot(h, k)) return k;
|
|
2193
|
+
}
|
|
2194
|
+
if (e.length > 0) {
|
|
2195
|
+
const k = at(me(e[0]));
|
|
2196
|
+
if (ot(k, h)) return k;
|
|
2197
|
+
}
|
|
2198
|
+
return h;
|
|
2199
|
+
}), f = L(
|
|
2200
|
+
() => jt(o, _t - 1),
|
|
2201
|
+
[o]
|
|
2202
|
+
), x = L(() => Array.from({ length: _t }, (k, B) => {
|
|
2203
|
+
const $ = jt(o, B), b = He($), O = (t[b] ?? []).map((K) => ({
|
|
2204
|
+
id: K.key,
|
|
2205
|
+
// SlotGrid formats `start` as a time via Intl.DateTimeFormat —
|
|
2206
|
+
// compose a full ISO from the column's date + the slot's HH:mm
|
|
2207
|
+
// so the locale-formatter has a real timestamp to work with.
|
|
2208
|
+
start: `${b}T${K.time}:00`,
|
|
2209
|
+
available: K.available
|
|
2210
|
+
}));
|
|
2211
|
+
return { date: b, slots: O };
|
|
2212
|
+
}), [o, t]), I = ot(o, h), A = !0, E = fe(() => {
|
|
2213
|
+
c((k) => {
|
|
2214
|
+
const B = en(k, _t);
|
|
2215
|
+
return ot(h, B) ? h : B;
|
|
2216
|
+
});
|
|
2217
|
+
}, [h]), w = fe(() => {
|
|
2218
|
+
c((k) => jt(k, _t));
|
|
2219
|
+
}, []);
|
|
2220
|
+
V(() => {
|
|
2221
|
+
if (e.length === 0) return;
|
|
2222
|
+
const k = at(me(e[0]));
|
|
2223
|
+
!ot(k, h) || e.some(($) => {
|
|
2224
|
+
const b = at(me($));
|
|
2225
|
+
return !ot(b, f) && !Xs(b, o);
|
|
2226
|
+
}) || c(k);
|
|
2227
|
+
}, [e]), V(() => {
|
|
2228
|
+
a == null || a(He(o), He(f));
|
|
2229
|
+
}, [o, f, a]);
|
|
2230
|
+
const S = fe(
|
|
2231
|
+
(k, B) => {
|
|
2232
|
+
const $ = typeof B.date == "string" ? B.date : He(B.date);
|
|
2233
|
+
r({
|
|
2234
|
+
...xs(Vt(n, $), k.id)
|
|
2235
|
+
}), i == null || i($);
|
|
2236
|
+
},
|
|
2237
|
+
[r, i, n]
|
|
2238
|
+
), N = d || u ? "loading" : "default", T = x.some((k) => k.slots.length > 0), D = e[0];
|
|
2239
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2240
|
+
!T && !!D ? /* @__PURE__ */ s(
|
|
2241
|
+
Qt,
|
|
2242
|
+
{
|
|
2243
|
+
nextAvailableDate: D,
|
|
2244
|
+
onJump: () => c(at(me(D))),
|
|
2245
|
+
locale: g
|
|
2246
|
+
}
|
|
2247
|
+
) : null,
|
|
2248
|
+
/* @__PURE__ */ s(
|
|
2249
|
+
Ys,
|
|
2250
|
+
{
|
|
2251
|
+
id: p ? `${p}-slots` : void 0,
|
|
2252
|
+
days: x,
|
|
2253
|
+
state: N,
|
|
2254
|
+
selectedSlotId: n.slotKey,
|
|
2255
|
+
maxInitialSlotsPerDay: 6,
|
|
2256
|
+
locale: g,
|
|
2257
|
+
hasPrevious: I,
|
|
2258
|
+
hasNext: A,
|
|
2259
|
+
onSlotSelect: S,
|
|
2260
|
+
onPreviousDays: E,
|
|
2261
|
+
onNextDays: w
|
|
2262
|
+
}
|
|
2263
|
+
)
|
|
2264
|
+
] });
|
|
2265
|
+
}
|
|
2266
|
+
function As(e) {
|
|
2267
|
+
const {
|
|
2268
|
+
inputs: t,
|
|
2269
|
+
value: n,
|
|
2270
|
+
onChange: r,
|
|
2271
|
+
onDateSelect: i,
|
|
2272
|
+
onWindowChange: a,
|
|
2273
|
+
loadingDates: d,
|
|
2274
|
+
loadingSlots: u,
|
|
2275
|
+
locale: g,
|
|
2276
|
+
datePickerStyle: p,
|
|
2277
|
+
agentIdBase: h
|
|
2278
|
+
} = e;
|
|
2279
|
+
return p === "four-day-grid" ? /* @__PURE__ */ s(
|
|
2280
|
+
Ni,
|
|
2281
|
+
{
|
|
2282
|
+
availableDates: t.availableDates,
|
|
2283
|
+
availableSlots: t.availableSlots,
|
|
2284
|
+
value: n,
|
|
2285
|
+
onChange: r,
|
|
2286
|
+
onDateSelect: i,
|
|
2287
|
+
onWindowChange: a,
|
|
2288
|
+
loadingDates: d,
|
|
2289
|
+
loadingSlots: u,
|
|
2290
|
+
locale: g,
|
|
2291
|
+
agentIdBase: h
|
|
2292
|
+
}
|
|
2293
|
+
) : /* @__PURE__ */ s(
|
|
2294
|
+
vi,
|
|
2295
|
+
{
|
|
2296
|
+
availableDates: t.availableDates,
|
|
2297
|
+
selectedDate: n.date,
|
|
2298
|
+
onSelectDate: (o) => {
|
|
2299
|
+
r(Vt(n, o)), i == null || i(o);
|
|
2300
|
+
},
|
|
2301
|
+
locale: g,
|
|
2302
|
+
loading: d ?? u
|
|
2303
|
+
}
|
|
2304
|
+
);
|
|
2305
|
+
}
|
|
2306
|
+
function Ts(e) {
|
|
2307
|
+
const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle: d } = e;
|
|
2308
|
+
return d === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
|
|
2309
|
+
Ii,
|
|
2310
|
+
{
|
|
2311
|
+
date: n.date,
|
|
2312
|
+
slots: t.availableSlots[n.date] ?? [],
|
|
2313
|
+
selectedSlotKey: n.slotKey,
|
|
2314
|
+
onSelect: (u) => r(xs(n, u.key)),
|
|
2315
|
+
loading: i,
|
|
2316
|
+
locale: a
|
|
2317
|
+
}
|
|
2318
|
+
);
|
|
2319
|
+
}
|
|
2320
|
+
function Ds({ value: e, onChange: t }) {
|
|
2321
|
+
const { t: n } = U("ui"), r = [
|
|
2322
|
+
{ value: "private", label: n("booking.insurance.private") },
|
|
2323
|
+
{ value: "public", label: n("booking.insurance.public") }
|
|
2324
|
+
];
|
|
2325
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2326
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.insurance.heading") }),
|
|
2327
|
+
/* @__PURE__ */ s(
|
|
2328
|
+
Pt,
|
|
2329
|
+
{
|
|
2330
|
+
options: r,
|
|
2331
|
+
value: e ?? "",
|
|
2332
|
+
onValueChange: (i) => {
|
|
2333
|
+
(i === "private" || i === "public") && t(i);
|
|
2334
|
+
},
|
|
2335
|
+
placeholder: n("booking.insurance.placeholder"),
|
|
2336
|
+
"aria-label": n("booking.insurance.heading")
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
] });
|
|
2340
|
+
}
|
|
2341
|
+
function Os({
|
|
2342
|
+
specialties: e,
|
|
2343
|
+
value: t,
|
|
2344
|
+
valueIds: n,
|
|
2345
|
+
onChange: r,
|
|
2346
|
+
onChangeIds: i,
|
|
2347
|
+
pickerStyle: a = "select"
|
|
2348
|
+
}) {
|
|
2349
|
+
const { t: d } = U("ui"), u = e.map((p) => ({
|
|
2350
|
+
value: p.id,
|
|
2351
|
+
label: p.label
|
|
2352
|
+
})), g = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d("booking.specialty.heading") });
|
|
2353
|
+
return a === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2354
|
+
g,
|
|
2355
|
+
/* @__PURE__ */ s(
|
|
2356
|
+
Yt,
|
|
2357
|
+
{
|
|
2358
|
+
options: u,
|
|
2359
|
+
value: n ?? [],
|
|
2360
|
+
onChange: i,
|
|
2361
|
+
placeholder: d("booking.specialty.placeholder"),
|
|
2362
|
+
"aria-label": d("booking.specialty.heading"),
|
|
2363
|
+
allowClear: !0
|
|
2364
|
+
}
|
|
2365
|
+
)
|
|
2366
|
+
] }) : a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2367
|
+
g,
|
|
2368
|
+
/* @__PURE__ */ s(
|
|
2369
|
+
Wt,
|
|
2370
|
+
{
|
|
2371
|
+
options: u,
|
|
2372
|
+
value: t ?? "",
|
|
2373
|
+
onValueChange: (p) => r(p === "" ? "" : p),
|
|
2374
|
+
placeholder: d("booking.specialty.placeholder"),
|
|
2375
|
+
"aria-label": d("booking.specialty.heading"),
|
|
2376
|
+
clearable: !0
|
|
2377
|
+
}
|
|
2378
|
+
)
|
|
2379
|
+
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2380
|
+
g,
|
|
2381
|
+
/* @__PURE__ */ s(
|
|
2382
|
+
Pt,
|
|
2383
|
+
{
|
|
2384
|
+
options: u,
|
|
2385
|
+
value: t ?? "",
|
|
2386
|
+
onValueChange: (p) => r(p),
|
|
2387
|
+
placeholder: d("booking.specialty.placeholder"),
|
|
2388
|
+
"aria-label": d("booking.specialty.heading")
|
|
2389
|
+
}
|
|
2390
|
+
)
|
|
2391
|
+
] });
|
|
2392
|
+
}
|
|
2393
|
+
function Ms({
|
|
2394
|
+
services: e,
|
|
2395
|
+
value: t,
|
|
2396
|
+
valueIds: n,
|
|
2397
|
+
onChange: r,
|
|
2398
|
+
onChangeIds: i,
|
|
2399
|
+
pickerStyle: a,
|
|
2400
|
+
compact: d
|
|
2401
|
+
}) {
|
|
2402
|
+
const { t: u, i18n: g } = U("ui"), p = a ?? (d ? "select" : "cards"), h = e.map((c) => {
|
|
2403
|
+
const f = Xt(c), x = c.payment ? f ? u(`booking.payment.${f.kind}`, {
|
|
2404
|
+
amount: St(
|
|
2405
|
+
f.amountCents,
|
|
2406
|
+
f.currencyCode,
|
|
2407
|
+
g.language
|
|
2408
|
+
)
|
|
2409
|
+
}) : u("booking.payment.unavailable") : Cs(c);
|
|
2410
|
+
return x ? {
|
|
2411
|
+
value: c.id,
|
|
2412
|
+
label: c.label,
|
|
2413
|
+
endContent: /* @__PURE__ */ s(ps, { variant: "accentSoft", size: "lg", children: x })
|
|
2414
|
+
} : {
|
|
2415
|
+
value: c.id,
|
|
2416
|
+
label: `${c.label} · ${u("booking.serviceSummary", {
|
|
2417
|
+
minutes: c.durationMin
|
|
2418
|
+
})}`
|
|
2419
|
+
};
|
|
2420
|
+
}), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u("booking.service.heading") });
|
|
2421
|
+
return p === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2422
|
+
o,
|
|
2423
|
+
/* @__PURE__ */ s(
|
|
2424
|
+
Yt,
|
|
2425
|
+
{
|
|
2426
|
+
options: h,
|
|
2427
|
+
value: n ?? [],
|
|
2428
|
+
onChange: i,
|
|
2429
|
+
placeholder: u("booking.service.placeholder"),
|
|
2430
|
+
"aria-label": u("booking.service.heading"),
|
|
2431
|
+
allowClear: !0
|
|
2432
|
+
}
|
|
2433
|
+
)
|
|
2434
|
+
] }) : p === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2435
|
+
o,
|
|
2436
|
+
/* @__PURE__ */ s(
|
|
2437
|
+
Wt,
|
|
2438
|
+
{
|
|
2439
|
+
options: h,
|
|
2440
|
+
value: t ?? "",
|
|
2441
|
+
onValueChange: (c) => r(c === "" ? "" : c),
|
|
2442
|
+
placeholder: u("booking.service.placeholder"),
|
|
2443
|
+
"aria-label": u("booking.service.heading"),
|
|
2444
|
+
clearable: !0
|
|
2445
|
+
}
|
|
2446
|
+
)
|
|
2447
|
+
] }) : p === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2448
|
+
o,
|
|
2449
|
+
/* @__PURE__ */ s(
|
|
2450
|
+
Pt,
|
|
2451
|
+
{
|
|
2452
|
+
options: h,
|
|
2453
|
+
value: t ?? "",
|
|
2454
|
+
onValueChange: (c) => r(c),
|
|
2455
|
+
placeholder: u("booking.service.placeholder"),
|
|
2456
|
+
"aria-label": u("booking.service.heading")
|
|
2457
|
+
}
|
|
2458
|
+
)
|
|
2459
|
+
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2460
|
+
o,
|
|
2461
|
+
/* @__PURE__ */ s(
|
|
2462
|
+
yi,
|
|
2463
|
+
{
|
|
2464
|
+
services: e,
|
|
2465
|
+
selectedServiceId: t,
|
|
2466
|
+
onSelect: r
|
|
2467
|
+
}
|
|
2468
|
+
)
|
|
2469
|
+
] });
|
|
2470
|
+
}
|
|
2471
|
+
function Fs({
|
|
2472
|
+
operators: e,
|
|
2473
|
+
value: t,
|
|
2474
|
+
valueIds: n,
|
|
2475
|
+
onChange: r,
|
|
2476
|
+
onChangeIds: i,
|
|
2477
|
+
pickerStyle: a = "select"
|
|
2478
|
+
}) {
|
|
2479
|
+
const { t: d } = U("ui"), u = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d("booking.operator.heading") });
|
|
2480
|
+
if (a === "multi-select" && i) {
|
|
2481
|
+
const p = e.map((h) => ({
|
|
2482
|
+
value: h.id,
|
|
2483
|
+
label: h.name
|
|
2484
|
+
}));
|
|
2485
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2486
|
+
u,
|
|
2487
|
+
/* @__PURE__ */ s(
|
|
2488
|
+
Yt,
|
|
2489
|
+
{
|
|
2490
|
+
options: p,
|
|
2491
|
+
value: n ?? [],
|
|
2492
|
+
onChange: i,
|
|
2493
|
+
placeholder: d("booking.operator.placeholder"),
|
|
2494
|
+
"aria-label": d("booking.operator.heading"),
|
|
2495
|
+
allowClear: !0
|
|
2496
|
+
}
|
|
2497
|
+
)
|
|
2498
|
+
] });
|
|
2499
|
+
}
|
|
2500
|
+
const g = [
|
|
2501
|
+
{ value: we, label: d("booking.operator.all") },
|
|
2502
|
+
...e.map((p) => ({ value: p.id, label: p.name }))
|
|
2503
|
+
];
|
|
2504
|
+
return a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2505
|
+
u,
|
|
2506
|
+
/* @__PURE__ */ s(
|
|
2507
|
+
Wt,
|
|
2508
|
+
{
|
|
2509
|
+
options: g,
|
|
2510
|
+
value: t ?? we,
|
|
2511
|
+
onValueChange: (p) => r(p === "" ? we : p),
|
|
2512
|
+
placeholder: d("booking.operator.placeholder"),
|
|
2513
|
+
"aria-label": d("booking.operator.heading"),
|
|
2514
|
+
clearable: !0
|
|
2515
|
+
}
|
|
2516
|
+
)
|
|
2517
|
+
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2518
|
+
u,
|
|
2519
|
+
/* @__PURE__ */ s(
|
|
2520
|
+
Pt,
|
|
2521
|
+
{
|
|
2522
|
+
options: g,
|
|
2523
|
+
value: t ?? we,
|
|
2524
|
+
onValueChange: (p) => r(p),
|
|
2525
|
+
placeholder: d("booking.operator.placeholder"),
|
|
2526
|
+
"aria-label": d("booking.operator.heading")
|
|
2527
|
+
}
|
|
2528
|
+
)
|
|
2529
|
+
] });
|
|
2530
|
+
}
|
|
2531
|
+
function _s({
|
|
2532
|
+
customSlot: e
|
|
2533
|
+
}) {
|
|
2534
|
+
const { t } = U("ui");
|
|
2535
|
+
return e ? /* @__PURE__ */ s(se, { children: e }) : /* @__PURE__ */ v(Q, { variant: "warning", children: [
|
|
2536
|
+
/* @__PURE__ */ s(Q.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
|
|
2537
|
+
/* @__PURE__ */ s(Q.Description, { children: t("booking.onboardingIncomplete.description") })
|
|
2538
|
+
] });
|
|
2539
|
+
}
|
|
2540
|
+
function Qt({
|
|
2541
|
+
nextAvailableDate: e,
|
|
2542
|
+
onJump: t,
|
|
2543
|
+
locale: n
|
|
2544
|
+
}) {
|
|
2545
|
+
const { t: r } = U("ui"), i = L(() => {
|
|
2546
|
+
try {
|
|
2547
|
+
return new Intl.DateTimeFormat(n, { dateStyle: "long" }).format(
|
|
2548
|
+
me(e)
|
|
2549
|
+
);
|
|
2550
|
+
} catch {
|
|
2551
|
+
return e;
|
|
2552
|
+
}
|
|
2553
|
+
}, [e, n]);
|
|
2554
|
+
return /* @__PURE__ */ v(Q, { variant: "info", children: [
|
|
2555
|
+
/* @__PURE__ */ s(Q.Description, { children: r("booking.nextAvailable.description", { date: i }) }),
|
|
2556
|
+
/* @__PURE__ */ s(Q.Action, { children: /* @__PURE__ */ s(Je, { intent: "secondary", size: "sm", onClick: t, children: r("booking.nextAvailable.cta") }) })
|
|
2557
|
+
] });
|
|
2558
|
+
}
|
|
2559
|
+
function wi({
|
|
2560
|
+
payment: e,
|
|
2561
|
+
snapshot: t,
|
|
2562
|
+
operators: n,
|
|
2563
|
+
specialties: r,
|
|
2564
|
+
services: i,
|
|
2565
|
+
locale: a,
|
|
2566
|
+
mode: d,
|
|
2567
|
+
showModify: u,
|
|
2568
|
+
onReset: g,
|
|
2569
|
+
onModify: p,
|
|
2570
|
+
focusWasLost: h
|
|
2571
|
+
}) {
|
|
2572
|
+
const { t: o } = U("ui"), c = _(null);
|
|
2573
|
+
V(() => {
|
|
2574
|
+
const T = c.current, D = document.activeElement, y = T == null ? void 0 : T.closest('[data-component="booking"]');
|
|
2575
|
+
!e || !T || (D && (y != null && y.contains(D)) || h()) && T.focus();
|
|
2576
|
+
}, []);
|
|
2577
|
+
const x = (t.details.confirmationChannels ?? ["email"]).map(
|
|
2578
|
+
(T) => o(`booking.confirmation.channel.${T}`)
|
|
2579
|
+
), I = e ? St(e.amountCents, e.currencyCode, a) : "", A = e ? o(
|
|
2580
|
+
d === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
|
|
2581
|
+
{ amount: I }
|
|
2582
|
+
) : d === "demo" ? o("booking.success.descriptionDemo") : x.length > 1 ? o("booking.success.descriptionMultiple", {
|
|
2583
|
+
channels: x.join(" · ")
|
|
2584
|
+
}) : o("booking.success.descriptionSingle", { channel: x[0] }), E = L(() => {
|
|
2585
|
+
if (t.date)
|
|
2586
|
+
try {
|
|
2587
|
+
return new Intl.DateTimeFormat(a, {
|
|
2588
|
+
weekday: "long",
|
|
2589
|
+
day: "numeric",
|
|
2590
|
+
month: "long"
|
|
2591
|
+
}).format(me(t.date));
|
|
2592
|
+
} catch {
|
|
2593
|
+
return t.date;
|
|
2594
|
+
}
|
|
2595
|
+
}, [t.date, a]), w = L(() => {
|
|
2596
|
+
const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((y) => y !== we).map((y) => {
|
|
2597
|
+
var k;
|
|
2598
|
+
return (k = n.find((B) => B.id === y)) == null ? void 0 : k.name;
|
|
2599
|
+
}).filter((y) => y !== void 0);
|
|
2600
|
+
if (D.length === 0) return "";
|
|
2601
|
+
try {
|
|
2602
|
+
return new Intl.ListFormat(a === "en" ? "en-GB" : a, {
|
|
2603
|
+
style: "long",
|
|
2604
|
+
type: "conjunction"
|
|
2605
|
+
}).format(D);
|
|
2606
|
+
} catch {
|
|
2607
|
+
return D.join(", ");
|
|
2608
|
+
}
|
|
2609
|
+
}, [t.operatorIds, t.operatorId, n, a]), S = t.specialtyId ? r.find((T) => T.id === t.specialtyId) : void 0, N = t.serviceId ? i.find((T) => T.id === t.serviceId) : void 0;
|
|
2610
|
+
return /* @__PURE__ */ v(
|
|
2611
|
+
"div",
|
|
2612
|
+
{
|
|
2613
|
+
"data-component": "booking-success",
|
|
2614
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
2615
|
+
children: [
|
|
2616
|
+
/* @__PURE__ */ v(Q, { variant: "success", children: [
|
|
2617
|
+
/* @__PURE__ */ s(
|
|
2618
|
+
Q.Title,
|
|
2619
|
+
{
|
|
2620
|
+
as: "h3",
|
|
2621
|
+
ref: c,
|
|
2622
|
+
tabIndex: e ? -1 : void 0,
|
|
2623
|
+
className: e ? Et : void 0,
|
|
2624
|
+
children: o(
|
|
2625
|
+
e ? d === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
|
|
2626
|
+
)
|
|
2627
|
+
}
|
|
2628
|
+
),
|
|
2629
|
+
/* @__PURE__ */ s(Q.Description, { children: A })
|
|
2630
|
+
] }),
|
|
2631
|
+
/* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ v("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
|
|
2632
|
+
e && d !== "demo" ? /* @__PURE__ */ v(se, { children: [
|
|
2633
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.payment.summaryPaid") }),
|
|
2634
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
|
|
2635
|
+
] }) : null,
|
|
2636
|
+
S ? /* @__PURE__ */ v(se, { children: [
|
|
2637
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summarySpecialty") }),
|
|
2638
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S.label })
|
|
2639
|
+
] }) : null,
|
|
2640
|
+
N ? /* @__PURE__ */ v(se, { children: [
|
|
2641
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryService") }),
|
|
2642
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N.label })
|
|
2643
|
+
] }) : null,
|
|
2644
|
+
E ? /* @__PURE__ */ v(se, { children: [
|
|
2645
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryDate") }),
|
|
2646
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: E })
|
|
2647
|
+
] }) : null,
|
|
2648
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryTime") }),
|
|
2649
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: t.slot.time }),
|
|
2650
|
+
w ? /* @__PURE__ */ v(se, { children: [
|
|
2651
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryProvider") }),
|
|
2652
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w })
|
|
2653
|
+
] }) : null
|
|
2654
|
+
] }) }),
|
|
2655
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
2656
|
+
/* @__PURE__ */ s(Je, { intent: "secondary", size: "md", onClick: g, children: o("booking.success.bookAnother") }),
|
|
2657
|
+
u ? /* @__PURE__ */ s(Je, { intent: "ghost", size: "md", onClick: p, children: o("booking.success.modifyBooking") }) : null
|
|
2658
|
+
] })
|
|
2659
|
+
]
|
|
2660
|
+
}
|
|
2661
|
+
);
|
|
2662
|
+
}
|
|
2663
|
+
function Ls({ customSlot: e }) {
|
|
2664
|
+
const { t } = U("ui");
|
|
2665
|
+
return e ? /* @__PURE__ */ s(se, { children: e }) : /* @__PURE__ */ s(
|
|
2666
|
+
ms,
|
|
2667
|
+
{
|
|
2668
|
+
variant: "no-results",
|
|
2669
|
+
title: t("booking.emptyServices.title"),
|
|
2670
|
+
description: t("booking.emptyServices.description")
|
|
2671
|
+
}
|
|
2672
|
+
);
|
|
2673
|
+
}
|
|
2674
|
+
const Bs = "data-booking-step-active", Ci = `[${Bs}]`, Et = [
|
|
2675
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
2676
|
+
"ds:focus-visible:outline-solid",
|
|
2677
|
+
"ds:focus-visible:outline-[var(--ring)]",
|
|
2678
|
+
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2679
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
2680
|
+
].join(" ");
|
|
2681
|
+
function j({
|
|
2682
|
+
step: e,
|
|
2683
|
+
active: t,
|
|
2684
|
+
className: n,
|
|
2685
|
+
id: r,
|
|
2686
|
+
children: i
|
|
2687
|
+
}) {
|
|
2688
|
+
return /* @__PURE__ */ s(
|
|
2689
|
+
"div",
|
|
2690
|
+
{
|
|
2691
|
+
id: r,
|
|
2692
|
+
"data-booking-step": String(e),
|
|
2693
|
+
...t ? { [Bs]: "" } : null,
|
|
2694
|
+
tabIndex: -1,
|
|
2695
|
+
className: n ? `${n} ${Et}` : Et,
|
|
2696
|
+
children: i
|
|
2697
|
+
}
|
|
2698
|
+
);
|
|
2699
|
+
}
|
|
2700
|
+
function es(e, t) {
|
|
2701
|
+
return t === "four-day-grid" ? e.filter((n) => n !== 6) : e;
|
|
2702
|
+
}
|
|
2703
|
+
function Ai(e) {
|
|
2704
|
+
const {
|
|
2705
|
+
cascade: t,
|
|
2706
|
+
inputs: n,
|
|
2707
|
+
value: r,
|
|
2708
|
+
onChange: i,
|
|
2709
|
+
onSubmit: a,
|
|
2710
|
+
emptyServicesSlot: d,
|
|
2711
|
+
onboardingIncompleteSlot: u,
|
|
2712
|
+
loadingDates: g,
|
|
2713
|
+
loadingSlots: p,
|
|
2714
|
+
onDateSelect: h,
|
|
2715
|
+
onWindowChange: o,
|
|
2716
|
+
datePickerStyle: c,
|
|
2717
|
+
specialtyPickerStyle: f,
|
|
2718
|
+
servicePickerStyle: x,
|
|
2719
|
+
operatorPickerStyle: I,
|
|
2720
|
+
submitting: A,
|
|
2721
|
+
locale: E,
|
|
2722
|
+
detailsProps: w,
|
|
2723
|
+
agentIdBase: S,
|
|
2724
|
+
activeStep: N
|
|
2725
|
+
} = e, { t: T } = U("ui"), D = ct(N, c), y = (k, B) => ({
|
|
2726
|
+
step: k,
|
|
2727
|
+
active: k === D,
|
|
2728
|
+
className: B
|
|
2729
|
+
});
|
|
2730
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2731
|
+
t.gates.insurance ? /* @__PURE__ */ s(j, { ...y(1), children: /* @__PURE__ */ s(
|
|
2732
|
+
Ds,
|
|
2733
|
+
{
|
|
2734
|
+
value: r.insuranceType,
|
|
2735
|
+
onChange: (k) => i(gs(r, k))
|
|
2736
|
+
}
|
|
2737
|
+
) }) : null,
|
|
2738
|
+
t.gates.specialty ? /* @__PURE__ */ s(j, { ...y(2), children: /* @__PURE__ */ s(
|
|
2739
|
+
Os,
|
|
2740
|
+
{
|
|
2741
|
+
specialties: t.filtered.specialties,
|
|
2742
|
+
value: r.specialtyId,
|
|
2743
|
+
valueIds: r.specialtyIds,
|
|
2744
|
+
onChange: (k) => i(hs(r, k)),
|
|
2745
|
+
onChangeIds: (k) => i(vs(r, k)),
|
|
2746
|
+
pickerStyle: f
|
|
2747
|
+
}
|
|
2748
|
+
) }) : null,
|
|
2749
|
+
t.gates.service ? /* @__PURE__ */ s(j, { ...y(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Ls, { customSlot: d }) : /* @__PURE__ */ s(
|
|
2750
|
+
Ms,
|
|
2751
|
+
{
|
|
2752
|
+
services: t.filtered.services,
|
|
2753
|
+
value: r.serviceId,
|
|
2754
|
+
valueIds: r.serviceIds,
|
|
2755
|
+
onChange: (k) => i(bs(r, k)),
|
|
2756
|
+
onChangeIds: (k) => i(ys(r, k)),
|
|
2757
|
+
pickerStyle: x
|
|
2758
|
+
}
|
|
2759
|
+
) }) : null,
|
|
2760
|
+
t.gates.onboardingIncomplete ? /* @__PURE__ */ s(_s, { customSlot: u }) : null,
|
|
2761
|
+
t.gates.operator ? /* @__PURE__ */ s(j, { ...y(4), children: /* @__PURE__ */ s(
|
|
2762
|
+
Fs,
|
|
2763
|
+
{
|
|
2764
|
+
operators: t.filtered.operators,
|
|
2765
|
+
value: r.operatorId,
|
|
2766
|
+
valueIds: r.operatorIds,
|
|
2767
|
+
onChange: (k) => i(ks(r, k)),
|
|
2768
|
+
onChangeIds: (k) => i(Ss(r, k)),
|
|
2769
|
+
pickerStyle: I
|
|
2770
|
+
}
|
|
2771
|
+
) }) : null,
|
|
2772
|
+
t.gates.date ? /* @__PURE__ */ v(
|
|
2773
|
+
j,
|
|
2774
|
+
{
|
|
2775
|
+
...y(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
|
|
2776
|
+
children: [
|
|
2777
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.date.heading") }),
|
|
2778
|
+
n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
|
|
2779
|
+
Qt,
|
|
2780
|
+
{
|
|
2781
|
+
nextAvailableDate: n.nextAvailableDate,
|
|
2782
|
+
onJump: () => i(Vt(r, n.nextAvailableDate)),
|
|
2783
|
+
locale: E
|
|
2784
|
+
}
|
|
2785
|
+
) : As({
|
|
2786
|
+
inputs: n,
|
|
2787
|
+
value: r,
|
|
2788
|
+
onChange: i,
|
|
2789
|
+
onDateSelect: h,
|
|
2790
|
+
onWindowChange: o,
|
|
2791
|
+
loadingDates: g,
|
|
2792
|
+
loadingSlots: p,
|
|
2793
|
+
locale: E,
|
|
2794
|
+
datePickerStyle: c,
|
|
2795
|
+
agentIdBase: S
|
|
2796
|
+
})
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
) : null,
|
|
2800
|
+
t.gates.slot && r.date && c === "month-calendar" ? /* @__PURE__ */ v(
|
|
2801
|
+
j,
|
|
2802
|
+
{
|
|
2803
|
+
...y(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
|
|
2804
|
+
children: [
|
|
2805
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.slot.heading") }),
|
|
2806
|
+
Ts({
|
|
2807
|
+
inputs: n,
|
|
2808
|
+
value: r,
|
|
2809
|
+
onChange: i,
|
|
2810
|
+
loadingSlots: p,
|
|
2811
|
+
locale: E,
|
|
2812
|
+
datePickerStyle: c
|
|
2813
|
+
})
|
|
2814
|
+
]
|
|
2815
|
+
}
|
|
2816
|
+
) : null,
|
|
2817
|
+
t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(j, { ...y(7), children: /* @__PURE__ */ s(
|
|
2818
|
+
Zt,
|
|
2819
|
+
{
|
|
2820
|
+
...w,
|
|
2821
|
+
value: r.details ?? {},
|
|
2822
|
+
onChange: (k) => i({ ...r, details: k }),
|
|
2823
|
+
onSubmit: a,
|
|
2824
|
+
submitting: A,
|
|
2825
|
+
defaultPhoneCountry: e.policy.country
|
|
2826
|
+
}
|
|
2827
|
+
) }) : null
|
|
2828
|
+
] });
|
|
2829
|
+
}
|
|
2830
|
+
function xe(e, t, n = {}) {
|
|
2831
|
+
const {
|
|
2832
|
+
cascade: r,
|
|
2833
|
+
inputs: i,
|
|
2834
|
+
value: a,
|
|
2835
|
+
onChange: d,
|
|
2836
|
+
onSubmit: u,
|
|
2837
|
+
emptyServicesSlot: g,
|
|
2838
|
+
onboardingIncompleteSlot: p,
|
|
2839
|
+
loadingDates: h,
|
|
2840
|
+
loadingSlots: o,
|
|
2841
|
+
onDateSelect: c,
|
|
2842
|
+
onWindowChange: f,
|
|
2843
|
+
datePickerStyle: x,
|
|
2844
|
+
specialtyPickerStyle: I,
|
|
2845
|
+
servicePickerStyle: A,
|
|
2846
|
+
operatorPickerStyle: E,
|
|
2847
|
+
submitting: w,
|
|
2848
|
+
locale: S,
|
|
2849
|
+
detailsProps: N,
|
|
2850
|
+
policy: T,
|
|
2851
|
+
agentIdBase: D
|
|
2852
|
+
} = t;
|
|
2853
|
+
switch (e) {
|
|
2854
|
+
case 1:
|
|
2855
|
+
return /* @__PURE__ */ s(
|
|
2856
|
+
Ds,
|
|
2857
|
+
{
|
|
2858
|
+
value: a.insuranceType,
|
|
2859
|
+
onChange: (y) => d(gs(a, y))
|
|
2860
|
+
}
|
|
2861
|
+
);
|
|
2862
|
+
case 2:
|
|
2863
|
+
return /* @__PURE__ */ s(
|
|
2864
|
+
Os,
|
|
2865
|
+
{
|
|
2866
|
+
specialties: r.filtered.specialties,
|
|
2867
|
+
value: a.specialtyId,
|
|
2868
|
+
valueIds: a.specialtyIds,
|
|
2869
|
+
onChange: (y) => d(hs(a, y)),
|
|
2870
|
+
onChangeIds: (y) => d(vs(a, y)),
|
|
2871
|
+
pickerStyle: I
|
|
2872
|
+
}
|
|
2873
|
+
);
|
|
2874
|
+
case 3:
|
|
2875
|
+
return r.filtered.services.length === 0 ? /* @__PURE__ */ s(Ls, { customSlot: g }) : r.gates.onboardingIncomplete ? /* @__PURE__ */ s(_s, { customSlot: p }) : /* @__PURE__ */ s(
|
|
2876
|
+
Ms,
|
|
2877
|
+
{
|
|
2878
|
+
services: r.filtered.services,
|
|
2879
|
+
value: a.serviceId,
|
|
2880
|
+
valueIds: a.serviceIds,
|
|
2881
|
+
onChange: (y) => d(bs(a, y)),
|
|
2882
|
+
onChangeIds: (y) => d(ys(a, y)),
|
|
2883
|
+
pickerStyle: A,
|
|
2884
|
+
compact: n.compactService
|
|
2885
|
+
}
|
|
2886
|
+
);
|
|
2887
|
+
case 4:
|
|
2888
|
+
return /* @__PURE__ */ s(
|
|
2889
|
+
Fs,
|
|
2890
|
+
{
|
|
2891
|
+
operators: r.filtered.operators,
|
|
2892
|
+
value: a.operatorId,
|
|
2893
|
+
valueIds: a.operatorIds,
|
|
2894
|
+
onChange: (y) => d(ks(a, y)),
|
|
2895
|
+
onChangeIds: (y) => d(Ss(a, y)),
|
|
2896
|
+
pickerStyle: E
|
|
2897
|
+
}
|
|
2898
|
+
);
|
|
2899
|
+
case 5:
|
|
2900
|
+
return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ s(
|
|
2901
|
+
Qt,
|
|
2902
|
+
{
|
|
2903
|
+
nextAvailableDate: i.nextAvailableDate,
|
|
2904
|
+
onJump: () => d(Vt(a, i.nextAvailableDate)),
|
|
2905
|
+
locale: S
|
|
2906
|
+
}
|
|
2907
|
+
) : As({
|
|
2908
|
+
inputs: i,
|
|
2909
|
+
value: a,
|
|
2910
|
+
onChange: d,
|
|
2911
|
+
onDateSelect: c,
|
|
2912
|
+
onWindowChange: f,
|
|
2913
|
+
loadingDates: h,
|
|
2914
|
+
loadingSlots: o,
|
|
2915
|
+
locale: S,
|
|
2916
|
+
datePickerStyle: x,
|
|
2917
|
+
agentIdBase: D
|
|
2918
|
+
});
|
|
2919
|
+
case 6:
|
|
2920
|
+
return Ts({
|
|
2921
|
+
inputs: i,
|
|
2922
|
+
value: a,
|
|
2923
|
+
onChange: d,
|
|
2924
|
+
loadingSlots: o,
|
|
2925
|
+
locale: S,
|
|
2926
|
+
datePickerStyle: x
|
|
2927
|
+
});
|
|
2928
|
+
case 7:
|
|
2929
|
+
return r.selectedSlot ? /* @__PURE__ */ s(
|
|
2930
|
+
Zt,
|
|
2931
|
+
{
|
|
2932
|
+
...N,
|
|
2933
|
+
value: a.details ?? {},
|
|
2934
|
+
onChange: (y) => d({ ...a, details: y }),
|
|
2935
|
+
onSubmit: u,
|
|
2936
|
+
submitting: w,
|
|
2937
|
+
defaultPhoneCountry: T.country
|
|
2938
|
+
}
|
|
2939
|
+
) : null;
|
|
2940
|
+
/* c8 ignore next 2 */
|
|
2941
|
+
default:
|
|
2942
|
+
return null;
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
function $t() {
|
|
2946
|
+
const { t: e } = U("ui");
|
|
2947
|
+
return L(
|
|
2948
|
+
() => ({
|
|
2949
|
+
1: e("booking.insurance.heading"),
|
|
2950
|
+
2: e("booking.specialty.heading"),
|
|
2951
|
+
3: e("booking.service.heading"),
|
|
2952
|
+
4: e("booking.operator.heading"),
|
|
2953
|
+
5: e("booking.date.heading"),
|
|
2954
|
+
6: e("booking.slot.heading"),
|
|
2955
|
+
7: e("booking.details.heading")
|
|
2956
|
+
}),
|
|
2957
|
+
[e]
|
|
2958
|
+
);
|
|
2959
|
+
}
|
|
2960
|
+
function ct(e, t) {
|
|
2961
|
+
return t === "four-day-grid" && e === 6 ? 5 : e;
|
|
2962
|
+
}
|
|
2963
|
+
function Ti(e) {
|
|
2964
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, d = $t(), { t: u } = U("ui"), g = u("booking.operator.all"), p = L(
|
|
2965
|
+
() => es(t.visibleSteps, a),
|
|
2966
|
+
[t.visibleSteps, a]
|
|
2967
|
+
), h = ct(r, a), o = Math.max(0, p.indexOf(h)), c = L(
|
|
2968
|
+
() => p.map((f) => ({
|
|
2969
|
+
label: d[f],
|
|
2970
|
+
summary: Es(f, n, t, g),
|
|
2971
|
+
status: Di(f, n, t),
|
|
2972
|
+
content: /* @__PURE__ */ s(j, { step: f, active: f === h, children: xe(f, e, { compactService: !0 }) })
|
|
2973
|
+
})),
|
|
2974
|
+
[
|
|
2975
|
+
p,
|
|
2976
|
+
n,
|
|
2977
|
+
d,
|
|
2978
|
+
t,
|
|
2979
|
+
e,
|
|
2980
|
+
h,
|
|
2981
|
+
g
|
|
2982
|
+
]
|
|
2983
|
+
);
|
|
2984
|
+
return /* @__PURE__ */ s(
|
|
2985
|
+
Js,
|
|
2986
|
+
{
|
|
2987
|
+
activeStep: o,
|
|
2988
|
+
steps: c,
|
|
2989
|
+
onStepChange: (f) => {
|
|
2990
|
+
const x = p[f];
|
|
2991
|
+
x && i(x);
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
);
|
|
2995
|
+
}
|
|
2996
|
+
function Di(e, t, n) {
|
|
2997
|
+
return Ae(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
|
|
2998
|
+
}
|
|
2999
|
+
function cs(e, t) {
|
|
3000
|
+
return e !== 4 ? Ae(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Is(t) !== void 0;
|
|
3001
|
+
}
|
|
3002
|
+
function Gt(e, t) {
|
|
3003
|
+
const n = e.map((r) => {
|
|
3004
|
+
var i;
|
|
3005
|
+
return (i = t.find((a) => a.id === r)) == null ? void 0 : i.label;
|
|
3006
|
+
}).filter((r) => r !== void 0);
|
|
3007
|
+
return n.length > 0 ? n.join(", ") : void 0;
|
|
3008
|
+
}
|
|
3009
|
+
function Es(e, t, n, r) {
|
|
3010
|
+
var i;
|
|
3011
|
+
if (Ae(e, t))
|
|
3012
|
+
switch (e) {
|
|
3013
|
+
case 1:
|
|
3014
|
+
return t.insuranceType;
|
|
3015
|
+
case 2:
|
|
3016
|
+
return Gt(
|
|
3017
|
+
$e(t),
|
|
3018
|
+
n.filtered.specialties
|
|
3019
|
+
);
|
|
3020
|
+
case 3:
|
|
3021
|
+
return Gt(Te(t), n.filtered.services);
|
|
3022
|
+
case 4: {
|
|
3023
|
+
const d = Jt(t).filter((g) => g !== we), u = Gt(
|
|
3024
|
+
d,
|
|
3025
|
+
n.filtered.operators.map((g) => ({
|
|
3026
|
+
id: g.id,
|
|
3027
|
+
label: g.name
|
|
3028
|
+
}))
|
|
3029
|
+
);
|
|
3030
|
+
return u !== void 0 ? u : d.length === 0 ? r : void 0;
|
|
3031
|
+
}
|
|
3032
|
+
case 5:
|
|
3033
|
+
return t.date;
|
|
3034
|
+
case 6:
|
|
3035
|
+
return (i = n.selectedSlot) == null ? void 0 : i.time;
|
|
3036
|
+
case 7:
|
|
3037
|
+
return;
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
function Oi(e) {
|
|
3041
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } = U("ui"), d = $t(), u = a("booking.operator.all"), g = `${Rt()}-filter`, p = ct(r, e.datePickerStyle), h = t.visibleSteps.filter(
|
|
3042
|
+
(f) => f === 1 || f === 2 || f === 3 || f === 4
|
|
3043
|
+
), o = h.some(
|
|
3044
|
+
(f) => !Ae(f, n)
|
|
3045
|
+
), c = h.some(
|
|
3046
|
+
(f) => f === r
|
|
3047
|
+
) ? r : h.find((f) => !Ae(f, n));
|
|
3048
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3049
|
+
h.length > 0 ? /* @__PURE__ */ s(
|
|
3050
|
+
"div",
|
|
3051
|
+
{
|
|
3052
|
+
role: "group",
|
|
3053
|
+
"aria-label": a("booking.filtersLabel"),
|
|
3054
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
3055
|
+
children: h.map((f) => {
|
|
3056
|
+
const x = Es(
|
|
3057
|
+
f,
|
|
3058
|
+
n,
|
|
3059
|
+
t,
|
|
3060
|
+
u
|
|
3061
|
+
), I = f === c, A = Ae(f, n);
|
|
3062
|
+
return /* @__PURE__ */ s(
|
|
3063
|
+
Je,
|
|
3064
|
+
{
|
|
3065
|
+
intent: I ? "primary" : "outline",
|
|
3066
|
+
size: "sm",
|
|
3067
|
+
endIcon: /* @__PURE__ */ s(
|
|
3068
|
+
Zs,
|
|
3069
|
+
{
|
|
3070
|
+
"aria-hidden": "true",
|
|
3071
|
+
className: I ? "ds:rotate-180" : void 0
|
|
3072
|
+
}
|
|
3073
|
+
),
|
|
3074
|
+
"aria-expanded": A ? I : void 0,
|
|
3075
|
+
"aria-controls": A && I ? g : void 0,
|
|
3076
|
+
"aria-current": !A && I ? "step" : void 0,
|
|
3077
|
+
onClick: () => i(
|
|
3078
|
+
A && I ? t.currentStep : f
|
|
3079
|
+
),
|
|
3080
|
+
children: x ? /* @__PURE__ */ v(se, { children: [
|
|
3081
|
+
d[f],
|
|
3082
|
+
": ",
|
|
3083
|
+
x
|
|
3084
|
+
] }) : d[f]
|
|
3085
|
+
},
|
|
3086
|
+
`csc-${f}`
|
|
3087
|
+
);
|
|
3088
|
+
})
|
|
3089
|
+
}
|
|
3090
|
+
) : null,
|
|
3091
|
+
c !== void 0 ? /* @__PURE__ */ s(
|
|
3092
|
+
j,
|
|
3093
|
+
{
|
|
3094
|
+
step: c,
|
|
3095
|
+
active: c === p,
|
|
3096
|
+
id: g,
|
|
3097
|
+
children: xe(c, e, { compactService: !0 })
|
|
3098
|
+
}
|
|
3099
|
+
) : null,
|
|
3100
|
+
!o && t.gates.date ? (
|
|
3101
|
+
// four-day-grid embeds slots inline with the day strip — the
|
|
3102
|
+
// historic 2-col date|slot split collapses to a single column
|
|
3103
|
+
// so the picker spans the full width instead of orphaning an
|
|
3104
|
+
// empty right cell.
|
|
3105
|
+
e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(j, { step: 5, active: p === 5, children: xe(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
3106
|
+
/* @__PURE__ */ s(
|
|
3107
|
+
j,
|
|
3108
|
+
{
|
|
3109
|
+
step: 5,
|
|
3110
|
+
active: p === 5,
|
|
3111
|
+
className: "ds:min-w-0",
|
|
3112
|
+
children: xe(5, e)
|
|
3113
|
+
}
|
|
3114
|
+
),
|
|
3115
|
+
n.date ? /* @__PURE__ */ s(
|
|
3116
|
+
j,
|
|
3117
|
+
{
|
|
3118
|
+
step: 6,
|
|
3119
|
+
active: p === 6,
|
|
3120
|
+
className: "ds:min-w-0",
|
|
3121
|
+
children: xe(6, e)
|
|
3122
|
+
}
|
|
3123
|
+
) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
|
|
3124
|
+
] })
|
|
3125
|
+
) : null,
|
|
3126
|
+
t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: p === 7, children: xe(7, e) }) : null
|
|
3127
|
+
] });
|
|
3128
|
+
}
|
|
3129
|
+
function Mi(e) {
|
|
3130
|
+
const { cascade: t, datePickerStyle: n, activeStep: r } = e, i = ct(r, n), a = t.visibleSteps.filter(
|
|
3131
|
+
(u) => u === 1 || u === 2 || u === 3 || u === 4
|
|
3132
|
+
);
|
|
3133
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3134
|
+
/* @__PURE__ */ v(
|
|
3135
|
+
"div",
|
|
3136
|
+
{
|
|
3137
|
+
className: n === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
|
|
3138
|
+
children: [
|
|
3139
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((u) => /* @__PURE__ */ s(j, { step: u, active: u === i, children: xe(u, e, { compactService: !0 }) }, `fbf-${u}`)) }),
|
|
3140
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3141
|
+
t.gates.date ? /* @__PURE__ */ s(j, { step: 5, active: i === 5, children: xe(5, e) }) : null,
|
|
3142
|
+
t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(j, { step: 6, active: i === 6, children: xe(6, e) }) : null
|
|
3143
|
+
] })
|
|
3144
|
+
]
|
|
3145
|
+
}
|
|
3146
|
+
),
|
|
3147
|
+
t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: i === 7, children: xe(7, e) }) : null
|
|
3148
|
+
] });
|
|
3149
|
+
}
|
|
3150
|
+
function Fi(e) {
|
|
3151
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t: d } = U("ui"), u = $t(), g = L(
|
|
3152
|
+
() => es(t.visibleSteps, a),
|
|
3153
|
+
[t.visibleSteps, a]
|
|
3154
|
+
), p = ct(r, a), h = Math.max(0, g.indexOf(p)), o = g.length, c = L(
|
|
3155
|
+
() => g.map((A) => ({ label: u[A] })),
|
|
3156
|
+
[g, u]
|
|
3157
|
+
), f = h > 0, x = p === 5 && a === "four-day-grid", I = h < o - 1 && Ae(p, n) && (!x || Ae(6, n));
|
|
3158
|
+
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3159
|
+
/* @__PURE__ */ s(Ws, { activeStep: h, steps: c }),
|
|
3160
|
+
/* @__PURE__ */ s(j, { step: p, active: !0, children: xe(p, e, { compactService: !0 }) }),
|
|
3161
|
+
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
3162
|
+
/* @__PURE__ */ s(
|
|
3163
|
+
Je,
|
|
3164
|
+
{
|
|
3165
|
+
intent: "ghost",
|
|
3166
|
+
size: "md",
|
|
3167
|
+
disabled: !f,
|
|
3168
|
+
onClick: () => {
|
|
3169
|
+
const A = g[h - 1];
|
|
3170
|
+
A && i(A);
|
|
3171
|
+
},
|
|
3172
|
+
children: d("booking.actions.back")
|
|
3173
|
+
}
|
|
3174
|
+
),
|
|
3175
|
+
p < 7 ? /* @__PURE__ */ s(
|
|
3176
|
+
Je,
|
|
3177
|
+
{
|
|
3178
|
+
intent: "primary",
|
|
3179
|
+
size: "md",
|
|
3180
|
+
disabled: !I,
|
|
3181
|
+
onClick: () => {
|
|
3182
|
+
const A = g[h + 1];
|
|
3183
|
+
A && i(A);
|
|
3184
|
+
},
|
|
3185
|
+
children: d("booking.actions.next")
|
|
3186
|
+
}
|
|
3187
|
+
) : null
|
|
3188
|
+
] })
|
|
3189
|
+
] });
|
|
3190
|
+
}
|
|
3191
|
+
const _i = [], Li = [];
|
|
3192
|
+
function ds() {
|
|
3193
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3194
|
+
}
|
|
3195
|
+
const Bi = ls(
|
|
3196
|
+
({
|
|
3197
|
+
variant: e = "inline-list",
|
|
3198
|
+
country: t,
|
|
3199
|
+
// No default — the cascade engine treats `undefined` as "auto-on
|
|
3200
|
+
// when `specialties` has items" so consumers who pass specialty
|
|
3201
|
+
// data without the explicit flag still get the step.
|
|
3202
|
+
useSpecialties: n,
|
|
3203
|
+
allowOperatorSelection: r = !1,
|
|
3204
|
+
lockedOperatorId: i,
|
|
3205
|
+
operatorsByService: a = !1,
|
|
3206
|
+
autoSelectSingleService: d = !1,
|
|
3207
|
+
specialties: u,
|
|
3208
|
+
services: g,
|
|
3209
|
+
operators: p,
|
|
3210
|
+
availableDates: h,
|
|
3211
|
+
availableSlots: o,
|
|
3212
|
+
nextAvailableDate: c,
|
|
3213
|
+
requireCodiceFiscale: f,
|
|
3214
|
+
requireDateOfBirth: x,
|
|
3215
|
+
requireInsuranceNumber: I,
|
|
3216
|
+
billingInDetails: A = !1,
|
|
3217
|
+
paymentNoticeStyle: E = "plain",
|
|
3218
|
+
showNote: w,
|
|
3219
|
+
showReturningPatientFlag: S,
|
|
3220
|
+
privacyPolicyUrl: N,
|
|
3221
|
+
termsUrl: T,
|
|
3222
|
+
practiceConsent: D,
|
|
3223
|
+
paymentTermsUrl: y,
|
|
3224
|
+
paymentState: k,
|
|
3225
|
+
renderPayment: B,
|
|
3226
|
+
renderPaymentCompletion: $,
|
|
3227
|
+
validateCodiceFiscale: b,
|
|
3228
|
+
validateInsuranceNumber: ge,
|
|
3229
|
+
confirmationChannels: O,
|
|
3230
|
+
defaultConfirmationChannels: K,
|
|
3231
|
+
value: M,
|
|
3232
|
+
onChange: he,
|
|
3233
|
+
onSubmit: dt,
|
|
3234
|
+
onStepChange: ve,
|
|
3235
|
+
onDateSelect: qe,
|
|
3236
|
+
onWindowChange: De,
|
|
3237
|
+
datePickerStyle: G = "month-calendar",
|
|
3238
|
+
specialtyPickerStyle: Oe,
|
|
3239
|
+
servicePickerStyle: be,
|
|
3240
|
+
operatorPickerStyle: H,
|
|
3241
|
+
loadingDates: ae,
|
|
3242
|
+
loadingSlots: ye,
|
|
3243
|
+
submitting: ke,
|
|
3244
|
+
submitError: W,
|
|
3245
|
+
mode: Me = "live",
|
|
3246
|
+
showModifyOnSuccess: ne = !0,
|
|
3247
|
+
surface: oe = "flat",
|
|
3248
|
+
emptyServicesSlot: Y,
|
|
3249
|
+
onboardingIncompleteSlot: F,
|
|
3250
|
+
"aria-label": Ce,
|
|
3251
|
+
id: Ke,
|
|
3252
|
+
className: xt,
|
|
3253
|
+
onFocus: We,
|
|
3254
|
+
onBlur: Ye,
|
|
3255
|
+
...Ze
|
|
3256
|
+
}, Ne) => {
|
|
3257
|
+
var ht, vt, l;
|
|
3258
|
+
const { t: ee, i18n: It } = U("ui"), ie = e ?? "inline-list", Fe = It.language ?? "en", ce = u ?? _i, _e = p ?? Li;
|
|
3259
|
+
V(() => {
|
|
3260
|
+
const m = zn(M, {
|
|
3261
|
+
useSpecialties: n,
|
|
3262
|
+
lockedOperatorId: i,
|
|
3263
|
+
autoSelectSingleService: d,
|
|
3264
|
+
specialties: ce,
|
|
3265
|
+
services: g
|
|
3266
|
+
});
|
|
3267
|
+
(m.specialtyId !== M.specialtyId || m.operatorId !== M.operatorId || m.serviceId !== M.serviceId) && he(m);
|
|
3268
|
+
}, [
|
|
3269
|
+
i,
|
|
3270
|
+
n,
|
|
3271
|
+
d,
|
|
3272
|
+
ce,
|
|
3273
|
+
g
|
|
3274
|
+
]);
|
|
3275
|
+
const R = L(
|
|
3276
|
+
() => Kn({
|
|
3277
|
+
country: t,
|
|
3278
|
+
useSpecialties: n,
|
|
3279
|
+
allowOperatorSelection: r,
|
|
3280
|
+
lockedOperatorId: i,
|
|
3281
|
+
operatorsByService: a,
|
|
3282
|
+
specialties: ce,
|
|
3283
|
+
services: g,
|
|
3284
|
+
operators: _e,
|
|
3285
|
+
availableSlots: o,
|
|
3286
|
+
value: M
|
|
3287
|
+
}),
|
|
3288
|
+
[
|
|
3289
|
+
t,
|
|
3290
|
+
n,
|
|
3291
|
+
r,
|
|
3292
|
+
i,
|
|
3293
|
+
a,
|
|
3294
|
+
d,
|
|
3295
|
+
ce,
|
|
3296
|
+
g,
|
|
3297
|
+
_e,
|
|
3298
|
+
h,
|
|
3299
|
+
o,
|
|
3300
|
+
M
|
|
3301
|
+
]
|
|
3302
|
+
), de = L(
|
|
3303
|
+
() => [
|
|
3304
|
+
JSON.stringify(M.insuranceType),
|
|
3305
|
+
JSON.stringify($e(M)),
|
|
3306
|
+
JSON.stringify(Te(M)),
|
|
3307
|
+
JSON.stringify(Jt(M)),
|
|
3308
|
+
JSON.stringify(M.date),
|
|
3309
|
+
JSON.stringify(M.slotKey)
|
|
3310
|
+
],
|
|
3311
|
+
[M]
|
|
3312
|
+
), Xe = ie === "progress", lt = fe(
|
|
3313
|
+
(m) => {
|
|
3314
|
+
if (m === 4 && R.visibleSteps.includes(4) && Jt(M).length === 0)
|
|
3315
|
+
return Math.min(4, R.currentStep);
|
|
3316
|
+
if (!Xe) return R.currentStep;
|
|
3317
|
+
const C = R.visibleSteps.find(
|
|
3318
|
+
(P) => P > m && !cs(P, M)
|
|
3319
|
+
);
|
|
3320
|
+
return C === void 0 ? R.currentStep : Math.min(C, R.currentStep);
|
|
3321
|
+
},
|
|
3322
|
+
[Xe, R.visibleSteps, R.currentStep, M]
|
|
3323
|
+
), [Z, le] = X(
|
|
3324
|
+
R.currentStep
|
|
3325
|
+
), ut = _(de), Le = _(R.visibleSteps);
|
|
3326
|
+
V(() => {
|
|
3327
|
+
const m = ut.current, C = Le.current;
|
|
3328
|
+
ut.current = de, Le.current = R.visibleSteps;
|
|
3329
|
+
const P = de.findIndex(
|
|
3330
|
+
(pe, ts) => pe !== m[ts]
|
|
3331
|
+
);
|
|
3332
|
+
if (P !== -1) {
|
|
3333
|
+
le(lt(P + 1));
|
|
3334
|
+
return;
|
|
3335
|
+
}
|
|
3336
|
+
const J = Xe ? R.visibleSteps.find(
|
|
3337
|
+
(pe) => pe < Z && !C.includes(pe) && !cs(pe, M)
|
|
3338
|
+
) : void 0;
|
|
3339
|
+
if (J !== void 0) {
|
|
3340
|
+
le(J);
|
|
3341
|
+
return;
|
|
3342
|
+
}
|
|
3343
|
+
R.visibleSteps.includes(Z) || le(R.currentStep);
|
|
3344
|
+
}, [
|
|
3345
|
+
de,
|
|
3346
|
+
lt,
|
|
3347
|
+
Xe,
|
|
3348
|
+
R.currentStep,
|
|
3349
|
+
R.visibleSteps,
|
|
3350
|
+
Z,
|
|
3351
|
+
M
|
|
3352
|
+
]);
|
|
3353
|
+
const te = _(null), ze = L(
|
|
3354
|
+
() => es(R.visibleSteps, G),
|
|
3355
|
+
[R.visibleSteps, G]
|
|
3356
|
+
), Be = $t(), [qt, Qe] = X(""), ue = _(null), je = _(null);
|
|
3357
|
+
V(() => {
|
|
3358
|
+
const m = ct(Z, G);
|
|
3359
|
+
if (je.current === null) {
|
|
3360
|
+
je.current = m;
|
|
3361
|
+
return;
|
|
3362
|
+
}
|
|
3363
|
+
if (je.current === m) return;
|
|
3364
|
+
je.current = m;
|
|
3365
|
+
const C = ze.indexOf(m);
|
|
3366
|
+
Qe(
|
|
3367
|
+
C === -1 ? "" : ee("booking.stepAnnouncement", {
|
|
3368
|
+
current: C + 1,
|
|
3369
|
+
total: ze.length,
|
|
3370
|
+
label: Be[m]
|
|
3371
|
+
})
|
|
3372
|
+
);
|
|
3373
|
+
const P = ue.current;
|
|
3374
|
+
if (!P || P.isConnected) return;
|
|
3375
|
+
const J = te.current;
|
|
3376
|
+
if (!J) return;
|
|
3377
|
+
const pe = document.activeElement;
|
|
3378
|
+
if (!(pe === null || pe === document.body || !J.contains(pe))) return;
|
|
3379
|
+
const At = J.querySelector(Ci) ?? J;
|
|
3380
|
+
if (At.focus({ preventScroll: !0 }), typeof At.scrollIntoView == "function")
|
|
3381
|
+
try {
|
|
3382
|
+
At.scrollIntoView({
|
|
3383
|
+
behavior: ds() ? "auto" : "smooth",
|
|
3384
|
+
block: "nearest"
|
|
3385
|
+
});
|
|
3386
|
+
} catch {
|
|
3387
|
+
At.scrollIntoView();
|
|
3388
|
+
}
|
|
3389
|
+
}, [Z, G, ze, Be, ee]);
|
|
3390
|
+
const q = li({
|
|
3391
|
+
services: g,
|
|
3392
|
+
value: M,
|
|
3393
|
+
availableSlots: o,
|
|
3394
|
+
onSubmit: dt,
|
|
3395
|
+
onChange: he,
|
|
3396
|
+
paymentState: k,
|
|
3397
|
+
submitting: ke,
|
|
3398
|
+
paymentTermsUrl: y,
|
|
3399
|
+
renderPayment: B
|
|
3400
|
+
}), z = q.status, pt = q.submit, et = _(q.reset);
|
|
3401
|
+
et.current = q.reset;
|
|
3402
|
+
const mt = Rt(), ft = _(null), Ee = _(null), tt = ((ht = q.state) == null ? void 0 : ht.status) === "failed", st = q.state && "phase" in q.state && q.state.phase === "completion";
|
|
3403
|
+
V(() => {
|
|
3404
|
+
var m, C;
|
|
3405
|
+
if (z === "payment") {
|
|
3406
|
+
const P = document.activeElement;
|
|
3407
|
+
(!st || !P || P === document.body || !((m = te.current) != null && m.contains(P))) && ((C = ft.current) == null || C.focus());
|
|
3408
|
+
}
|
|
3409
|
+
}, [z, st]), V(() => {
|
|
3410
|
+
var m;
|
|
3411
|
+
z === "payment" && tt && ((m = Ee.current) == null || m.focus());
|
|
3412
|
+
}, [z, tt]), Ps(Ne, () => te.current, []);
|
|
3413
|
+
const Ue = z === "success" ? 8 : z === "payment" ? 7 : R.currentStep, nt = _(null);
|
|
3414
|
+
V(() => {
|
|
3415
|
+
if (Ue !== nt.current && (nt.current = Ue, ve == null || ve(Ue), Ue === 8 && te.current))
|
|
3416
|
+
try {
|
|
3417
|
+
te.current.scrollIntoView({
|
|
3418
|
+
behavior: ds() ? "auto" : "smooth",
|
|
3419
|
+
block: "start"
|
|
3420
|
+
});
|
|
3421
|
+
} catch {
|
|
3422
|
+
te.current.scrollIntoView();
|
|
3423
|
+
}
|
|
3424
|
+
}, [Ue, ve]);
|
|
3425
|
+
const Re = _({ activeStep: Z, cascade: R, submitState: z });
|
|
3426
|
+
V(() => {
|
|
3427
|
+
Re.current = { activeStep: Z, cascade: R, submitState: z };
|
|
3428
|
+
}, [Z, R, z]);
|
|
3429
|
+
const Nt = L(
|
|
3430
|
+
() => ({
|
|
3431
|
+
getVariant: () => ie,
|
|
3432
|
+
getCurrentStep: () => {
|
|
3433
|
+
const m = Re.current;
|
|
3434
|
+
return m.submitState === "success" ? 8 : m.submitState === "payment" ? 7 : m.activeStep;
|
|
3435
|
+
},
|
|
3436
|
+
reset: () => {
|
|
3437
|
+
Re.current.submitState !== "payment" && (he({}), et.current(), le(1));
|
|
3438
|
+
},
|
|
3439
|
+
goToStep: (m) => {
|
|
3440
|
+
const C = Re.current, P = C.cascade.visibleSteps.includes(m), J = C.cascade.currentStep, pe = C.submitState === "payment" ? 7 : !P || m > J ? J : m;
|
|
3441
|
+
Re.current = { ...C, activeStep: pe }, le(pe);
|
|
3442
|
+
}
|
|
3443
|
+
}),
|
|
3444
|
+
[ie, he]
|
|
3445
|
+
);
|
|
3446
|
+
$s(Bn, Nt, Ke);
|
|
3447
|
+
const Kt = Ce ?? ee("booking.regionLabel"), Se = q.snapshot, zt = z === "success" && Se ? /* @__PURE__ */ s(
|
|
3448
|
+
wi,
|
|
3449
|
+
{
|
|
3450
|
+
payment: Se.payment,
|
|
3451
|
+
snapshot: {
|
|
3452
|
+
...Se.value,
|
|
3453
|
+
slot: Se.slot,
|
|
3454
|
+
details: Se.details,
|
|
3455
|
+
serviceId: ((vt = Se.payment) == null ? void 0 : vt.serviceId) ?? Se.slot.serviceId ?? Se.value.serviceId
|
|
3456
|
+
},
|
|
3457
|
+
operators: _e,
|
|
3458
|
+
specialties: ce,
|
|
3459
|
+
services: g,
|
|
3460
|
+
locale: Fe,
|
|
3461
|
+
mode: Me,
|
|
3462
|
+
showModify: ne && !Se.payment,
|
|
3463
|
+
onReset: () => Nt.reset(),
|
|
3464
|
+
focusWasLost: () => {
|
|
3465
|
+
const m = ue.current, C = document.activeElement;
|
|
3466
|
+
return !!(m && !m.isConnected) && (!C || C === document.body);
|
|
3467
|
+
},
|
|
3468
|
+
onModify: () => {
|
|
3469
|
+
et.current(), le(7);
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
) : null, it = q.activeSession, Ge = q.state, re = it && Ge ? {
|
|
3473
|
+
session: it,
|
|
3474
|
+
payment: it.payment,
|
|
3475
|
+
state: Ge,
|
|
3476
|
+
billing: (l = q.snapshot) == null ? void 0 : l.details.billing
|
|
3477
|
+
} : void 0, Pe = Ge && "phase" in Ge && Ge.phase === "completion", wt = z === "payment" && re ? /* @__PURE__ */ v(
|
|
3478
|
+
"section",
|
|
3479
|
+
{
|
|
3480
|
+
"aria-labelledby": mt,
|
|
3481
|
+
"data-component": "booking-payment",
|
|
3482
|
+
"data-payment-status": re.state.status,
|
|
3483
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
3484
|
+
children: [
|
|
3485
|
+
/* @__PURE__ */ s(
|
|
3486
|
+
"h3",
|
|
3487
|
+
{
|
|
3488
|
+
ref: ft,
|
|
3489
|
+
id: mt,
|
|
3490
|
+
tabIndex: -1,
|
|
3491
|
+
className: "type-title-card ds:m-0",
|
|
3492
|
+
children: ee(
|
|
3493
|
+
Pe ? "booking.payment.confirming" : "booking.payment.heading"
|
|
3494
|
+
)
|
|
3495
|
+
}
|
|
3496
|
+
),
|
|
3497
|
+
Pe ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: ee("booking.payment.noticeBody", {
|
|
3498
|
+
amount: St(
|
|
3499
|
+
re.payment.amountCents,
|
|
3500
|
+
re.payment.currencyCode,
|
|
3501
|
+
Fe
|
|
3502
|
+
)
|
|
3503
|
+
}) }),
|
|
3504
|
+
/* @__PURE__ */ s(
|
|
3505
|
+
"p",
|
|
3506
|
+
{
|
|
3507
|
+
role: "status",
|
|
3508
|
+
className: re.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
|
|
3509
|
+
children: re.state.status === "processing" ? /* @__PURE__ */ v(se, { children: [
|
|
3510
|
+
/* @__PURE__ */ s(us, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
|
|
3511
|
+
/* @__PURE__ */ s("span", { children: ee(
|
|
3512
|
+
Pe ? "booking.payment.confirming" : "booking.payment.processing"
|
|
3513
|
+
) })
|
|
3514
|
+
] }) : null
|
|
3515
|
+
}
|
|
3516
|
+
),
|
|
3517
|
+
re.state.status === "failed" ? /* @__PURE__ */ s(
|
|
3518
|
+
Q,
|
|
3519
|
+
{
|
|
3520
|
+
ref: Ee,
|
|
3521
|
+
variant: "error",
|
|
3522
|
+
tabIndex: -1,
|
|
3523
|
+
className: Et,
|
|
3524
|
+
children: /* @__PURE__ */ s(Q.Description, { children: re.state.error ?? ee(
|
|
3525
|
+
Pe ? "booking.payment.completionFailed" : "booking.payment.failed"
|
|
3526
|
+
) })
|
|
3527
|
+
}
|
|
3528
|
+
) : null,
|
|
3529
|
+
Pe ? $ == null ? void 0 : $(re) : B == null ? void 0 : B(re)
|
|
3530
|
+
]
|
|
3531
|
+
}
|
|
3532
|
+
) : null, gt = L(() => {
|
|
3533
|
+
const m = new Set(Te(M)), C = g.filter((P) => m.has(P.id)).map((P) => {
|
|
3534
|
+
var J;
|
|
3535
|
+
return {
|
|
3536
|
+
label: P.label,
|
|
3537
|
+
text: ((J = P.criticalInformationToAccept) == null ? void 0 : J.trim()) ?? ""
|
|
3538
|
+
};
|
|
3539
|
+
}).filter((P) => P.text.length > 0);
|
|
3540
|
+
if (C.length !== 0)
|
|
3541
|
+
return C.length === 1 ? C[0].text : C.map((P) => `${P.label}: ${P.text}`).join(`
|
|
3542
|
+
|
|
3543
|
+
`);
|
|
3544
|
+
}, [g, M]), Ct = L(() => {
|
|
3545
|
+
if (z === "success" || z === "payment") return null;
|
|
3546
|
+
const m = ie === "accordion" ? Ti : ie === "calendar" ? Oi : ie === "flexible" ? Mi : ie === "progress" ? Fi : Ai, C = {
|
|
3547
|
+
cascade: R,
|
|
3548
|
+
inputs: {
|
|
3549
|
+
specialties: ce,
|
|
3550
|
+
services: g,
|
|
3551
|
+
operators: _e,
|
|
3552
|
+
availableDates: h,
|
|
3553
|
+
availableSlots: o,
|
|
3554
|
+
nextAvailableDate: c
|
|
3555
|
+
},
|
|
3556
|
+
value: M,
|
|
3557
|
+
onChange: he,
|
|
3558
|
+
onSubmit: pt,
|
|
3559
|
+
policy: { country: t, lockedOperatorId: i },
|
|
3560
|
+
detailsProps: {
|
|
3561
|
+
requireCodiceFiscale: f,
|
|
3562
|
+
requireDateOfBirth: x,
|
|
3563
|
+
requireInsuranceNumber: I,
|
|
3564
|
+
insuranceType: M.insuranceType,
|
|
3565
|
+
showNote: w,
|
|
3566
|
+
showReturningPatientFlag: S,
|
|
3567
|
+
privacyPolicyUrl: N,
|
|
3568
|
+
termsUrl: T,
|
|
3569
|
+
practiceConsent: D,
|
|
3570
|
+
criticalInformationToAccept: gt,
|
|
3571
|
+
payment: q.payment,
|
|
3572
|
+
paymentTermsUrl: y,
|
|
3573
|
+
paymentBlocked: q.blocked,
|
|
3574
|
+
billingInDetails: A,
|
|
3575
|
+
paymentNoticeStyle: E,
|
|
3576
|
+
validateCodiceFiscale: b,
|
|
3577
|
+
validateInsuranceNumber: ge,
|
|
3578
|
+
confirmationChannels: O,
|
|
3579
|
+
defaultConfirmationChannels: K,
|
|
3580
|
+
submitError: W ?? (z === "error" ? ee("booking.payment.submitFailed") : void 0)
|
|
3581
|
+
},
|
|
3582
|
+
emptyServicesSlot: Y,
|
|
3583
|
+
onboardingIncompleteSlot: F,
|
|
3584
|
+
loadingDates: ae,
|
|
3585
|
+
loadingSlots: ye,
|
|
3586
|
+
onDateSelect: qe,
|
|
3587
|
+
onWindowChange: De,
|
|
3588
|
+
datePickerStyle: G,
|
|
3589
|
+
specialtyPickerStyle: Oe,
|
|
3590
|
+
servicePickerStyle: be,
|
|
3591
|
+
operatorPickerStyle: H,
|
|
3592
|
+
submitting: ke || z === "submitting",
|
|
3593
|
+
locale: Fe,
|
|
3594
|
+
activeStep: Z,
|
|
3595
|
+
setActiveStep: le,
|
|
3596
|
+
agentIdBase: Ke
|
|
3597
|
+
};
|
|
3598
|
+
return /* @__PURE__ */ s(m, { ...C });
|
|
3599
|
+
}, [
|
|
3600
|
+
z,
|
|
3601
|
+
q.payment,
|
|
3602
|
+
q.blocked,
|
|
3603
|
+
y,
|
|
3604
|
+
ee,
|
|
3605
|
+
ie,
|
|
3606
|
+
R,
|
|
3607
|
+
ce,
|
|
3608
|
+
g,
|
|
3609
|
+
_e,
|
|
3610
|
+
h,
|
|
3611
|
+
o,
|
|
3612
|
+
c,
|
|
3613
|
+
M,
|
|
3614
|
+
he,
|
|
3615
|
+
pt,
|
|
3616
|
+
t,
|
|
3617
|
+
i,
|
|
3618
|
+
f,
|
|
3619
|
+
x,
|
|
3620
|
+
I,
|
|
3621
|
+
A,
|
|
3622
|
+
E,
|
|
3623
|
+
W,
|
|
3624
|
+
w,
|
|
3625
|
+
S,
|
|
3626
|
+
N,
|
|
3627
|
+
T,
|
|
3628
|
+
D,
|
|
3629
|
+
gt,
|
|
3630
|
+
b,
|
|
3631
|
+
ge,
|
|
3632
|
+
O,
|
|
3633
|
+
K,
|
|
3634
|
+
Y,
|
|
3635
|
+
F,
|
|
3636
|
+
ae,
|
|
3637
|
+
ye,
|
|
3638
|
+
qe,
|
|
3639
|
+
De,
|
|
3640
|
+
G,
|
|
3641
|
+
Oe,
|
|
3642
|
+
be,
|
|
3643
|
+
H,
|
|
3644
|
+
ke,
|
|
3645
|
+
Fe,
|
|
3646
|
+
Z,
|
|
3647
|
+
Ke
|
|
3648
|
+
]);
|
|
3649
|
+
return /* @__PURE__ */ v(
|
|
3650
|
+
"div",
|
|
3651
|
+
{
|
|
3652
|
+
ref: te,
|
|
3653
|
+
role: "region",
|
|
3654
|
+
"aria-label": Kt,
|
|
3655
|
+
id: Ke,
|
|
3656
|
+
"data-component": "booking",
|
|
3657
|
+
"data-component-id": Ke,
|
|
3658
|
+
"data-variant": ie,
|
|
3659
|
+
className: ui({
|
|
3660
|
+
variant: ie,
|
|
3661
|
+
surface: oe,
|
|
3662
|
+
className: xt
|
|
3663
|
+
}),
|
|
3664
|
+
tabIndex: -1,
|
|
3665
|
+
onFocus: (m) => {
|
|
3666
|
+
ue.current = m.target, We == null || We(m);
|
|
3667
|
+
},
|
|
3668
|
+
onBlur: (m) => {
|
|
3669
|
+
const C = m.target;
|
|
3670
|
+
window.setTimeout(() => {
|
|
3671
|
+
var J;
|
|
3672
|
+
const P = document.activeElement;
|
|
3673
|
+
ue.current === C && C.isConnected && !(P && ((J = te.current) != null && J.contains(P))) && (ue.current = null);
|
|
3674
|
+
}), Ye == null || Ye(m);
|
|
3675
|
+
},
|
|
3676
|
+
...Ze,
|
|
3677
|
+
children: [
|
|
3678
|
+
/* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: qt }),
|
|
3679
|
+
/* @__PURE__ */ v(
|
|
3680
|
+
"div",
|
|
3681
|
+
{
|
|
3682
|
+
className: [
|
|
3683
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
3684
|
+
"ds:rounded-[var(--radius-md)]",
|
|
3685
|
+
"ds:bg-[color-mix(in_srgb,var(--primary)_35%,var(--background))]",
|
|
3686
|
+
"ds:bg-[image:var(--gradient-hero-brand)]",
|
|
3687
|
+
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
3688
|
+
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
|
|
3689
|
+
].join(" "),
|
|
3690
|
+
children: [
|
|
3691
|
+
/* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ee("booking.regionLabel") }),
|
|
3692
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: ee("booking.headingSubtitle") })
|
|
3693
|
+
]
|
|
3694
|
+
}
|
|
3695
|
+
),
|
|
3696
|
+
q.cancelled ? /* @__PURE__ */ s(Q, { variant: "info", children: /* @__PURE__ */ s(Q.Description, { children: ee("booking.payment.cancelled") }) }) : null,
|
|
3697
|
+
zt ?? wt ?? Ct
|
|
3698
|
+
]
|
|
3699
|
+
}
|
|
3700
|
+
);
|
|
3701
|
+
}
|
|
3702
|
+
);
|
|
3703
|
+
Bi.displayName = "Booking";
|
|
3704
|
+
export {
|
|
3705
|
+
Bi as B,
|
|
3706
|
+
Ht as C,
|
|
3707
|
+
we as O,
|
|
3708
|
+
Bn as b
|
|
3709
|
+
};
|
|
3710
|
+
//# sourceMappingURL=booking-CPUjwxj0.js.map
|