@alfadocs/ui-kit 1.115.0 → 1.117.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/accessible-target-D3j6F-AG.js +7 -0
- package/dist/_chunks/{actions-cell-renderer-bI27uXXC.js → actions-cell-renderer-DTaIQKp9.js} +3 -3
- package/dist/_chunks/{address-autocomplete-DC-H-MZw.js → address-autocomplete-Bnc9ieKO.js} +2 -2
- package/dist/_chunks/{address-fields-D5Ije0S2.js → address-fields-RIaGnpnm.js} +4 -4
- package/dist/_chunks/{anamnesis-card-Ddnrdfx3.js → anamnesis-card-sUFT0dpF.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-S1H_AARG.js → anamnesis-summary-card-BtFPpegp.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BZ36ULQk.js → anamnesis-summary-rows-BbAREK-3.js} +7 -7
- package/dist/_chunks/{antenatal-schedule-timeline-va9zx7tJ.js → antenatal-schedule-timeline-86YVlMYJ.js} +2 -2
- package/dist/_chunks/{appointment-card-D_-aBrx5.js → appointment-card-0PebvrOS.js} +3 -3
- package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-DdUhqfEi.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DxLu3afn.js → appointment-timeline-CC7nmBOH.js} +3 -3
- package/dist/_chunks/{appointment-tray-BhXOJpIJ.js → appointment-tray-B04zKY7g.js} +2 -2
- package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
- package/dist/_chunks/{balance-badge-cell-CXHihM22.js → balance-badge-cell-DPjab0eJ.js} +6 -6
- package/dist/_chunks/bill-line-table-vCnVo7_a.js +1565 -0
- package/dist/_chunks/{bishop-score-QJu-sM1y.js → bishop-score-CKztphVz.js} +2 -2
- package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-rri5vvMt.js} +3 -3
- package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-B2MJo0Se.js} +2 -2
- package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BVzFi4hH.js → calendar-appointment-editor-dialog-BEmBcb61.js} +18 -18
- package/dist/_chunks/{card-DVO3x8E-.js → card-n6W6LW-N.js} +78 -47
- package/dist/_chunks/{care-plan-card-BA3MfdfZ.js → care-plan-card-bGTIliXc.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUtFZ813.js → care-plan-entry-card-cdojypxu.js} +3 -3
- package/dist/_chunks/{chart-DebrFZ6L.js → chart-Aue_2dMb.js} +2 -2
- package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
- package/dist/_chunks/{clinical-note-card-Zz5_GEz-.js → clinical-note-card-DHn5W_bv.js} +2 -2
- package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
- package/dist/_chunks/{compact-editor-fields-cP6yh7xv.js → compact-editor-fields-6sTWRLtf.js} +3 -3
- package/dist/_chunks/{connection-status-DjarASoU.js → connection-status-DWClakYw.js} +2 -2
- package/dist/_chunks/{contact-card-Cv-Nwvac.js → contact-card-CGpbYuxl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BubJPyRB.js} +3 -3
- package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
- package/dist/_chunks/{cycle-calculator-C68V9rdH.js → cycle-calculator-C8nWAeTk.js} +3 -3
- package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-CaxgaEgI.js} +2 -2
- package/dist/_chunks/{toolbar-Bc3pjfG5.js → data-grid-DiBSbN2Y.js} +3017 -3106
- package/dist/_chunks/{data-grid-tabs-CsLbIv0h.js → data-grid-tabs-D9Y4DeeH.js} +2 -2
- package/dist/_chunks/{data-table-DXaE2Ret.js → data-table-DhYx-hCD.js} +101 -100
- package/dist/_chunks/{date-range-panel-CBFfkgmz.js → date-range-panel-CT6nXjRM.js} +7 -7
- package/dist/_chunks/default-tabs-CD285u0C.js +2250 -0
- package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
- package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-BWDTCEHI.js} +3 -3
- package/dist/_chunks/dropdown-menu-Dw6sgQwJ.js +679 -0
- package/dist/_chunks/{due-date-calculator-C1UA5jpS.js → due-date-calculator-c1NJPw9F.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-CtlMhLai.js → editable-currency-cell-renderer-BlK-8A7b.js} +2 -2
- package/dist/_chunks/{entity-summary-DGCBQDt1.js → entity-summary-BanguTa6.js} +2 -2
- package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
- package/dist/_chunks/{face-scheme-DkoxiDCh.js → face-scheme-Bt07zQJU.js} +20 -19
- package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-D0KofJJw.js} +3 -3
- package/dist/_chunks/{file-manager-DFFExyym.js → file-manager-CV1_GtjC.js} +5 -5
- package/dist/_chunks/{finished-terminal-BKTFUk3S.js → finished-terminal-FR8uc_Ws.js} +2 -2
- package/dist/_chunks/{forgot-password-form-Bc_UPax6.js → forgot-password-form-YvI9vX-G.js} +2 -2
- package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
- package/dist/_chunks/{gestational-age-calculator-60y1RyQL.js → gestational-age-calculator-Cg4Gq42R.js} +3 -3
- package/dist/_chunks/{grid-context-AwsLJRhH.js → grid-context-jn9y8tNE.js} +4 -4
- package/dist/_chunks/{hcg-doubling-CC-dbKE8.js → hcg-doubling-BjTa_77t.js} +3 -3
- package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DsvheAOt.js} +160 -147
- package/dist/_chunks/{heatmap-eXdtmEoU.js → heatmap-BurtKmeu.js} +3 -3
- package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
- package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
- package/dist/_chunks/{icon-button-group-C9mPK-bX.js → icon-button-group-BKtkVZ1W.js} +2 -2
- package/dist/_chunks/{kit-extensions-CzG0RmhQ.js → kit-extensions-C3oL0WTp.js} +7 -7
- package/dist/_chunks/{link-cell-renderer-Ditt5mvT.js → link-cell-renderer-NFNGdAGt.js} +4 -4
- package/dist/_chunks/{login-dev-card-CPndtWdz.js → login-dev-card-Dz3ezx1o.js} +2 -2
- package/dist/_chunks/map-view-Frj8vE7n.js +1105 -0
- package/dist/_chunks/{maps-core-gate-DkNqGkm3.js → maps-core-gate-Dgs7jXxy.js} +6 -6
- package/dist/_chunks/{marketplace-app-shell-CcEHJgDd.js → marketplace-app-shell-BOBWmzoT.js} +6 -6
- package/dist/_chunks/money-OE6_oDPH.js +138 -0
- package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-C9dnSxzw.js} +2 -2
- package/dist/_chunks/{notes-panel-BVYG_MJE.js → notes-panel-CHR-Jv6N.js} +5 -5
- package/dist/_chunks/{notification-card-CPW4poUr.js → notification-card-DRMv2_pW.js} +20 -20
- package/dist/_chunks/{notification-tray-CQK3lw87.js → notification-tray-mlCfxNRH.js} +2 -2
- package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
- package/dist/_chunks/{operator-hero-BWayX73x.js → operator-hero-CnfWckNQ.js} +2 -2
- package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
- package/dist/_chunks/parts-CcyRkB8t.js +869 -0
- package/dist/_chunks/{patient-details-DlT-vpSe.js → patient-details-C4dHR4iu.js} +3 -3
- package/dist/_chunks/{patient-field-row-B54uzvu-.js → patient-field-row-0QP8KCVp.js} +5 -5
- package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-D_S7joff.js} +3 -3
- package/dist/_chunks/{patient-summary-card-Dy9-CzON.js → patient-summary-card-x0-AhCyC.js} +4 -4
- package/dist/_chunks/{payment-automation-upsell-D7yaD4u1.js → payment-automation-upsell-CGdG2Mwk.js} +2 -2
- package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-CEIalOtr.js} +15 -14
- package/dist/_chunks/{periodontal-chart-Bjz7O4wT.js → periodontal-chart-DqHrQY4e.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CxEXHl2x.js → periodontal-chart-card-q9WSHRC2.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-DnZuZD14.js → periodontal-diagnosis-CJPWluQU.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-BBPB9wf1.js → periodontal-risk-chart-CKkyOROk.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-Cw4NZp0A.js → practice-profile-hero-BFS6lO2a.js} +2 -2
- package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CzHWprX4.js} +922 -787
- package/dist/_chunks/{pregnancy-dating-qZpw3zj8.js → pregnancy-dating-BO6diQMZ.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-DkGcEc_l.js} +3 -3
- package/dist/_chunks/{privacy-mask-BlJK51MD.js → privacy-mask-DJ1gee4c.js} +2 -2
- package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-C1LGeX-G.js → radiograph-panel.agent-9jwXlOXB.js} +2 -2
- package/dist/_chunks/{registration-form-DW-0X7S4.js → registration-form-CMXefBnC.js} +2 -2
- package/dist/_chunks/{reserved.agent-6p3Hm4oH.js → reserved.agent-TaZfI3yj.js} +5 -5
- package/dist/_chunks/{reset-password-form-C93SH0Tx.js → reset-password-form-D_TePSM1.js} +2 -2
- package/dist/_chunks/{reviews-panel-CfJPEkH7.js → reviews-panel-CdHUSndF.js} +2 -2
- package/dist/_chunks/{rich-text-editor-efaMWbYz.js → rich-text-editor-CMPA5Wgy.js} +12 -11
- package/dist/_chunks/row-actions-Dpf9CrCP.js +213 -0
- package/dist/_chunks/{section-card-DFr2wGal.js → section-card-CYfeQ6EQ.js} +2 -2
- package/dist/_chunks/{send-registration-link-form-DWxWa_cJ.js → send-registration-link-form-DuZQuKnI.js} +2 -2
- package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-Dzs0jZsd.js} +3 -3
- package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-CF8R38Og.js} +2 -2
- package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-P4qFmxk5.js} +2 -2
- package/dist/_chunks/{task-editor-CSa6vQ9r.js → task-editor-WdDCqbIL.js} +168 -178
- package/dist/_chunks/{tasks-panel-CVjY1d7Q.js → tasks-panel-DBSm3WjK.js} +2 -2
- package/dist/_chunks/{theme-toggle-CObX2Ffa.js → theme-toggle-CeKl8f_f.js} +3 -3
- package/dist/_chunks/{timeline-AMqE-c2T.js → timeline-DXko0M1t.js} +2 -2
- package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BrK5NQIq.js} +2 -2
- package/dist/_chunks/toolbar-z8vXnpXz.js +159 -0
- package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-DHRxV2sE.js} +2 -2
- package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
- package/dist/_chunks/{treatment-receipt-BydbojdD.js → treatment-receipt-1VnuinhY.js} +2 -2
- package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
- package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BMAiQYo6.js → use-appointment-details-read-B-SXnszJ.js} +10 -10
- package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
- package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
- package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-DCjkRuS_.js} +3 -3
- package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-D0avpoeS.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DNSe65yd.js → workflow-webhook-action-dgUjv9T7.js} +3 -3
- package/dist/agent-catalog.json +1080 -1
- package/dist/agent-i18n/en.json +50 -0
- package/dist/browser-support.js +2 -0
- package/dist/components/_shared/accessible-target.d.ts +19 -0
- package/dist/components/_shared/decimal.d.ts +171 -0
- package/dist/components/_shared/focus-visible.d.ts +8 -0
- package/dist/components/_shared/format-price.d.ts +54 -2
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- 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/bill-line-table/bill-line-table.agent.d.ts +4 -0
- package/dist/components/bill-line-table/bill-line-table.columns.d.ts +49 -0
- package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
- package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
- package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
- package/dist/components/bill-line-table/bill-line-table.variants.d.ts +36 -0
- package/dist/components/bill-line-table/index.d.ts +6 -0
- package/dist/components/bill-line-table/index.js +23 -0
- package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
- package/dist/components/bill-table/bill-table.d.ts +13 -0
- package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
- package/dist/components/bill-table/cells.d.ts +89 -0
- package/dist/components/bill-table/columns.d.ts +21 -0
- package/dist/components/bill-table/default-tabs.d.ts +21 -0
- package/dist/components/bill-table/handle.d.ts +19 -0
- package/dist/components/bill-table/index.d.ts +7 -0
- package/dist/components/bill-table/index.js +19 -0
- package/dist/components/bill-table/model.d.ts +103 -0
- package/dist/components/bill-table/row-actions.d.ts +27 -0
- package/dist/components/bill-table/status-maps.d.ts +225 -0
- package/dist/components/bill-table/types.d.ts +542 -0
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +9 -2
- package/dist/components/card/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/chart/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +59 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.js +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/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-grid/body.d.ts +6 -0
- package/dist/components/data-grid/data-grid.variants.d.ts +1 -9
- package/dist/components/data-grid/editors.d.ts +7 -1
- package/dist/components/data-grid/index.js +9 -8
- package/dist/components/data-grid/selection.d.ts +10 -0
- package/dist/components/data-grid/types.d.ts +61 -11
- package/dist/components/data-grid-tabs/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/dialog/focus-return.d.ts +12 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/entity-summary/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/file-manager/index.js +1 -1
- package/dist/components/finished-terminal/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-settings/header-settings.d.ts +7 -3
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +48 -0
- package/dist/components/money/index.js +1 -1
- package/dist/components/money/money.d.ts +39 -6
- package/dist/components/muscle-scheme/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-card/notification-card.d.ts +2 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +43 -2
- package/dist/components/number-input/use-locale-number.d.ts +67 -3
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- 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/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/periodontal-risk-chart/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +20 -0
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/row-actions/index.d.ts +3 -0
- package/dist/components/row-actions/index.js +5 -0
- package/dist/components/row-actions/row-actions.d.ts +63 -0
- package/dist/components/section-card/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/smart-date/smart-date.d.ts +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/decimal/index.js +149 -0
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +262 -0
- package/dist/i18n/locales/ar.js +263 -1
- package/dist/i18n/locales/de.d.ts +262 -0
- package/dist/i18n/locales/de.js +263 -1
- package/dist/i18n/locales/el.d.ts +262 -0
- package/dist/i18n/locales/el.js +263 -1
- package/dist/i18n/locales/en.d.ts +262 -0
- package/dist/i18n/locales/en.js +263 -1
- package/dist/i18n/locales/es.d.ts +262 -0
- package/dist/i18n/locales/es.js +263 -1
- package/dist/i18n/locales/fr.d.ts +262 -0
- package/dist/i18n/locales/fr.js +263 -1
- package/dist/i18n/locales/hi.d.ts +262 -0
- package/dist/i18n/locales/hi.js +263 -1
- package/dist/i18n/locales/it.d.ts +262 -0
- package/dist/i18n/locales/it.js +263 -1
- package/dist/i18n/locales/ja.d.ts +262 -0
- package/dist/i18n/locales/ja.js +263 -1
- package/dist/i18n/locales/nl.d.ts +262 -0
- package/dist/i18n/locales/nl.js +263 -1
- package/dist/i18n/locales/pl.d.ts +262 -0
- package/dist/i18n/locales/pl.js +263 -1
- package/dist/i18n/locales/pt.d.ts +262 -0
- package/dist/i18n/locales/pt.js +263 -1
- package/dist/i18n/locales/ro.d.ts +262 -0
- package/dist/i18n/locales/ro.js +263 -1
- package/dist/i18n/locales/ru.d.ts +262 -0
- package/dist/i18n/locales/ru.js +263 -1
- package/dist/i18n/locales/sq.d.ts +262 -0
- package/dist/i18n/locales/sq.js +263 -1
- package/dist/i18n/locales/sv.d.ts +262 -0
- package/dist/i18n/locales/sv.js +263 -1
- package/dist/i18n/locales/tr.d.ts +262 -0
- package/dist/i18n/locales/tr.js +263 -1
- package/dist/i18n/locales/zh.d.ts +262 -0
- package/dist/i18n/locales/zh.js +263 -1
- package/dist/index.js +1298 -1246
- package/dist/locales/ar.json +263 -1
- package/dist/locales/de.json +263 -1
- package/dist/locales/el.json +263 -1
- package/dist/locales/en.json +263 -1
- package/dist/locales/es.json +263 -1
- package/dist/locales/fr.json +263 -1
- package/dist/locales/hi.json +263 -1
- package/dist/locales/it.json +263 -1
- package/dist/locales/ja.json +263 -1
- package/dist/locales/nl.json +263 -1
- package/dist/locales/pl.json +263 -1
- package/dist/locales/pt.json +263 -1
- package/dist/locales/ro.json +263 -1
- package/dist/locales/ru.json +263 -1
- package/dist/locales/sq.json +263 -1
- package/dist/locales/sv.json +263 -1
- package/dist/locales/tr.json +263 -1
- package/dist/locales/zh.json +263 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/reset-password-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/verify-identity/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +22 -3
- package/dist/_chunks/combobox-duuDRI1t.js +0 -688
- package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
- package/dist/_chunks/dropdown-menu-CqxBthww.js +0 -595
- package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
- package/dist/_chunks/map-view-Bny79cWa.js +0 -856
- package/dist/_chunks/money-Tsczpjfz.js +0 -102
- package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
- package/dist/_chunks/parts-Wz2LeGnH.js +0 -1113
- package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
|
@@ -0,0 +1,1105 @@
|
|
|
1
|
+
import { jsx as l, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Fe, useMemo as _, useRef as k, useId as we, useState as N, useEffect as z, useCallback as V, useImperativeHandle as qe, useLayoutEffect as ke } from "react";
|
|
3
|
+
import { createPortal as Be } from "react-dom";
|
|
4
|
+
import { c as G } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as A } from "react-i18next";
|
|
6
|
+
import { M as Ue, A as Je, a as Xe, b as He, c as Ye, u as Me, d as B, e as Qe, P as me } from "./maps-core-gate-Dgs7jXxy.js";
|
|
7
|
+
import { B as ze } from "./button-DohK_Ak_.js";
|
|
8
|
+
import { S as et } from "./skeleton-tTWJpvAq.js";
|
|
9
|
+
import { V as Ee } from "./visually-hidden-BHxEUGyT.js";
|
|
10
|
+
import { E as tt } from "./error-boundary-tAn_GuCu.js";
|
|
11
|
+
import { u as nt } from "./registry-DvAUVLHh.js";
|
|
12
|
+
import { l as rt } from "./length-token-DwMnGEYT.js";
|
|
13
|
+
import { M as ot } from "./map-pin-BaY37-Km.js";
|
|
14
|
+
import { E as xe } from "./external-link-CY6zAXXU.js";
|
|
15
|
+
const st = {
|
|
16
|
+
id: "map-view",
|
|
17
|
+
// pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
|
|
18
|
+
// (NON-persisting marker focus, no value state slot).
|
|
19
|
+
capabilities: ["scroll", "set_value", "pick"],
|
|
20
|
+
// Every action routes through the imperative bridge, which only exists
|
|
21
|
+
// once the map has loaded: consent granted (the default is
|
|
22
|
+
// `consentGranted={false}`) and Google Maps finished loading. Until then
|
|
23
|
+
// all three actions are silent no-ops. `consentGranted` says whether the
|
|
24
|
+
// gate is passed, and a null `center` after it means the map is still
|
|
25
|
+
// loading. `center` / `zoom` are read off the live
|
|
26
|
+
// map because Google clamps zoom and animates pans, so requested is not
|
|
27
|
+
// applied; `selectedMarkerId` is the only confirmation the host accepted
|
|
28
|
+
// a `select_marker` proposal.
|
|
29
|
+
//
|
|
30
|
+
// A9: marker ids only (`MapMarker.id` is a stable opaque id). Never
|
|
31
|
+
// `MapMarker.label`, never the `address` prop (consumer-supplied free
|
|
32
|
+
// text, PII in any patient-address deployment), never `apiKey`.
|
|
33
|
+
state: {
|
|
34
|
+
consentGranted: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
descriptionKey: "ui.agent.mapView.state.consentGranted",
|
|
37
|
+
description: "True when the GDPR consent gate has been passed. Read this FIRST: while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so. When it is true but `center` is still null, Google Maps is loading; wait for `center` before acting.",
|
|
38
|
+
read: (e) => e.isConsentGranted()
|
|
39
|
+
},
|
|
40
|
+
markerCount: {
|
|
41
|
+
type: "number",
|
|
42
|
+
descriptionKey: "ui.agent.mapView.state.markerCount",
|
|
43
|
+
description: "Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.",
|
|
44
|
+
read: (e) => e.getMarkerCount()
|
|
45
|
+
},
|
|
46
|
+
selectedMarkerId: {
|
|
47
|
+
type: "string | null",
|
|
48
|
+
descriptionKey: "ui.agent.mapView.state.selectedMarkerId",
|
|
49
|
+
description: "Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.",
|
|
50
|
+
read: (e) => e.getSelectedMarkerId()
|
|
51
|
+
},
|
|
52
|
+
center: {
|
|
53
|
+
type: "{ lat: number; lng: number } | null",
|
|
54
|
+
descriptionKey: "ui.agent.mapView.state.center",
|
|
55
|
+
description: "Live map centre in lat/lng, or null until the map has loaded (consent not granted, or Google Maps still loading). The read-back for `pan_to`, and the sign that the map is ready.",
|
|
56
|
+
read: (e) => e.getCenter()
|
|
57
|
+
},
|
|
58
|
+
zoom: {
|
|
59
|
+
type: "number | null",
|
|
60
|
+
descriptionKey: "ui.agent.mapView.state.zoom",
|
|
61
|
+
description: "Live zoom level, or null until the map has loaded. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.",
|
|
62
|
+
read: (e) => e.getZoom()
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
actions: {
|
|
66
|
+
pan_to: {
|
|
67
|
+
// Ephemeral viewport move, no data loss → read.
|
|
68
|
+
safety: "read",
|
|
69
|
+
argsType: "{ position: { lat: number; lng: number } }",
|
|
70
|
+
argsSchema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
position: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
lat: { type: "number", description: "Latitude in degrees." },
|
|
77
|
+
lng: { type: "number", description: "Longitude in degrees." }
|
|
78
|
+
},
|
|
79
|
+
required: ["lat", "lng"]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
required: ["position"]
|
|
83
|
+
},
|
|
84
|
+
idempotent: !0,
|
|
85
|
+
descriptionKey: "ui.agent.mapView.actions.panTo",
|
|
86
|
+
description: "Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.",
|
|
87
|
+
errors: [
|
|
88
|
+
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading)."
|
|
89
|
+
],
|
|
90
|
+
invoke: (e, t) => {
|
|
91
|
+
e.panTo(t.position);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
set_zoom: {
|
|
95
|
+
// Ephemeral viewport zoom, no data loss → read.
|
|
96
|
+
safety: "read",
|
|
97
|
+
argsType: "{ zoom: number }",
|
|
98
|
+
argsSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {
|
|
101
|
+
zoom: {
|
|
102
|
+
type: "number",
|
|
103
|
+
description: "Zoom level, typical range 1–20."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
required: ["zoom"]
|
|
107
|
+
},
|
|
108
|
+
idempotent: !0,
|
|
109
|
+
descriptionKey: "ui.agent.mapView.actions.setZoom",
|
|
110
|
+
description: "Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.",
|
|
111
|
+
errors: [
|
|
112
|
+
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
|
|
113
|
+
"Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied."
|
|
114
|
+
],
|
|
115
|
+
invoke: (e, t) => {
|
|
116
|
+
e.setZoom(t.zoom);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
select_marker: {
|
|
120
|
+
// Ephemeral marker focus, no data loss → read.
|
|
121
|
+
safety: "read",
|
|
122
|
+
argsType: "{ id: string | null }",
|
|
123
|
+
argsSchema: {
|
|
124
|
+
type: "object",
|
|
125
|
+
properties: {
|
|
126
|
+
id: {
|
|
127
|
+
type: ["string", "null"],
|
|
128
|
+
description: "Marker id to select, or null to clear the selection."
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
required: ["id"]
|
|
132
|
+
},
|
|
133
|
+
idempotent: !0,
|
|
134
|
+
descriptionKey: "ui.agent.mapView.actions.selectMarker",
|
|
135
|
+
description: "Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.",
|
|
136
|
+
errors: [
|
|
137
|
+
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
|
|
138
|
+
"The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does."
|
|
139
|
+
],
|
|
140
|
+
invoke: (e, t) => {
|
|
141
|
+
e.selectMarker(t.id);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
domHooks: {
|
|
146
|
+
root: {
|
|
147
|
+
attr: "data-component",
|
|
148
|
+
value: "map-view",
|
|
149
|
+
description: "Marks the element as a kit MapView."
|
|
150
|
+
},
|
|
151
|
+
instanceId: {
|
|
152
|
+
attr: "data-component-id",
|
|
153
|
+
sourceProp: "id",
|
|
154
|
+
description: "Sourced from the id prop."
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
function fe(e) {
|
|
159
|
+
if (!(e instanceof Element)) return !1;
|
|
160
|
+
try {
|
|
161
|
+
return e.matches(":focus-visible");
|
|
162
|
+
} catch {
|
|
163
|
+
return !0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const at = G(
|
|
167
|
+
[
|
|
168
|
+
"ds:relative ds:overflow-hidden ds:block",
|
|
169
|
+
"ds:bg-[var(--muted)]",
|
|
170
|
+
// Focus lands on the region when the interactive map replaces its button.
|
|
171
|
+
"ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
172
|
+
].join(" "),
|
|
173
|
+
{
|
|
174
|
+
variants: {
|
|
175
|
+
size: {
|
|
176
|
+
sm: "ds:[--map-block-size:14rem]",
|
|
177
|
+
md: "ds:[--map-block-size:20rem]",
|
|
178
|
+
lg: "ds:[--map-block-size:28rem]",
|
|
179
|
+
// `fill` defers sizing to the parent. The outer takes
|
|
180
|
+
// `block-size: 100%` so the inner (also 100%) has something
|
|
181
|
+
// to inherit from. Use inside a viewport-locked column —
|
|
182
|
+
// `<PracticeResults variant="map-first">` wires this through
|
|
183
|
+
// automatically; standalone consumers must give the parent
|
|
184
|
+
// a constrained block-size or the map collapses to 0.
|
|
185
|
+
fill: "ds:[block-size:100%]"
|
|
186
|
+
},
|
|
187
|
+
surface: {
|
|
188
|
+
bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
189
|
+
elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]",
|
|
190
|
+
bare: "ds:rounded-none ds:border-0"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
defaultVariants: { size: "md", surface: "bordered" }
|
|
194
|
+
}
|
|
195
|
+
), it = G("ds:block ds:w-full", {
|
|
196
|
+
variants: {
|
|
197
|
+
size: {
|
|
198
|
+
sm: "ds:[block-size:var(--map-block-size)]",
|
|
199
|
+
md: "ds:[block-size:var(--map-block-size)]",
|
|
200
|
+
lg: "ds:[block-size:var(--map-block-size)]",
|
|
201
|
+
fill: "ds:[block-size:100%]"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
defaultVariants: { size: "md" }
|
|
205
|
+
}), lt = G(
|
|
206
|
+
[
|
|
207
|
+
"ds:absolute ds:inset-0",
|
|
208
|
+
"ds:flex ds:flex-col ds:items-center ds:justify-center",
|
|
209
|
+
"ds:gap-[var(--spacing-sm)]",
|
|
210
|
+
"ds:p-[var(--spacing-md)]",
|
|
211
|
+
"ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
|
|
212
|
+
"ds:text-center"
|
|
213
|
+
].join(" ")
|
|
214
|
+
), ct = G("type-heading-3 ds:m-0"), he = G(
|
|
215
|
+
"type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
|
|
216
|
+
);
|
|
217
|
+
function dt({
|
|
218
|
+
onHandleReady: e,
|
|
219
|
+
onMarkerSelect: t,
|
|
220
|
+
onCameraMove: r
|
|
221
|
+
}) {
|
|
222
|
+
const a = B();
|
|
223
|
+
return z(() => {
|
|
224
|
+
if (a)
|
|
225
|
+
return e({
|
|
226
|
+
panTo: (o) => {
|
|
227
|
+
r(), a.panTo(o);
|
|
228
|
+
},
|
|
229
|
+
setZoom: (o) => {
|
|
230
|
+
r(), a.setZoom(o);
|
|
231
|
+
},
|
|
232
|
+
jumpTo: (o, i) => {
|
|
233
|
+
r(), a.moveCamera({ center: o, zoom: i });
|
|
234
|
+
},
|
|
235
|
+
selectMarker: (o) => t(o),
|
|
236
|
+
// Read straight off the live map: Google clamps `setZoom` to the
|
|
237
|
+
// map type's range and animates `panTo`, so requested and applied
|
|
238
|
+
// are not the same value.
|
|
239
|
+
getCenter: () => {
|
|
240
|
+
var o;
|
|
241
|
+
return ((o = a.getCenter()) == null ? void 0 : o.toJSON()) ?? null;
|
|
242
|
+
},
|
|
243
|
+
getZoom: () => a.getZoom() ?? null
|
|
244
|
+
}), () => e(null);
|
|
245
|
+
}, [a, e, t, r]), null;
|
|
246
|
+
}
|
|
247
|
+
function ut({
|
|
248
|
+
onBoundsChange: e,
|
|
249
|
+
userInteraction: t
|
|
250
|
+
}) {
|
|
251
|
+
const r = B(), a = k(e);
|
|
252
|
+
return a.current = e, z(() => {
|
|
253
|
+
if (!r) return;
|
|
254
|
+
const o = r.getDiv();
|
|
255
|
+
let i = null;
|
|
256
|
+
const p = () => {
|
|
257
|
+
t.current = {
|
|
258
|
+
pendingInput: !1,
|
|
259
|
+
moved: !1,
|
|
260
|
+
programmatic: !1
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
p();
|
|
264
|
+
let m;
|
|
265
|
+
const c = /* @__PURE__ */ new Set(), d = (n) => {
|
|
266
|
+
if (n instanceof PointerEvent && n.pointerType === "touch" && (n.type === "pointerdown" && c.add(n.pointerId), n.type === "pointerup" || n.type === "pointercancel")) {
|
|
267
|
+
c.delete(n.pointerId);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (n instanceof PointerEvent && n.type === "pointermove" && n.buttons === 0 && n.pointerType !== "touch" || n instanceof KeyboardEvent && ![
|
|
271
|
+
"ArrowUp",
|
|
272
|
+
"ArrowDown",
|
|
273
|
+
"ArrowLeft",
|
|
274
|
+
"ArrowRight",
|
|
275
|
+
"+",
|
|
276
|
+
"=",
|
|
277
|
+
"-",
|
|
278
|
+
"_",
|
|
279
|
+
"Enter",
|
|
280
|
+
" ",
|
|
281
|
+
"PageUp",
|
|
282
|
+
"PageDown"
|
|
283
|
+
].includes(n.key))
|
|
284
|
+
return;
|
|
285
|
+
const h = document.fullscreenElement, w = !!(h && (h.contains(o) || o.contains(h)));
|
|
286
|
+
let y = n.type === "dblclick";
|
|
287
|
+
n instanceof PointerEvent && n.type === "pointermove" && (y = n.pointerType !== "touch" || c.size >= 2 || w), n.type === "touchmove" && (y = n.touches.length >= 2 || w), n instanceof KeyboardEvent && (y = n.key !== "Enter" && n.key !== " "), n instanceof WheelEvent && (y = n.ctrlKey || n.metaKey || w), n.type === "click" && (y = n.target instanceof Element && n.target.closest('button, [role="button"]') != null), y && (t.current.programmatic = !1), t.current.pendingInput = !0, clearTimeout(m), m = setTimeout(() => {
|
|
288
|
+
t.current.pendingInput = !1;
|
|
289
|
+
}, 250);
|
|
290
|
+
}, u = () => {
|
|
291
|
+
t.current.pendingInput && !t.current.programmatic && (t.current.moved = !0);
|
|
292
|
+
}, g = () => {
|
|
293
|
+
var O, j;
|
|
294
|
+
const n = (O = r.getBounds()) == null ? void 0 : O.toJSON(), h = (j = r.getCenter()) == null ? void 0 : j.toJSON(), w = r.getZoom(), y = t.current.moved;
|
|
295
|
+
if (p(), clearTimeout(m), !n || !h || w == null) return;
|
|
296
|
+
const E = !i || Object.keys(n).some(
|
|
297
|
+
(T) => n[T] !== i.bounds[T]
|
|
298
|
+
), S = i != null && (w !== i.zoom || h.lat !== i.center.lat || h.lng !== i.center.lng);
|
|
299
|
+
i = { bounds: n, center: h, zoom: w }, E && a.current(n, { userInteraction: y && S });
|
|
300
|
+
}, f = [
|
|
301
|
+
"pointerdown",
|
|
302
|
+
"pointermove",
|
|
303
|
+
"pointerup",
|
|
304
|
+
"pointercancel",
|
|
305
|
+
"touchstart",
|
|
306
|
+
"touchmove",
|
|
307
|
+
"click",
|
|
308
|
+
"dblclick",
|
|
309
|
+
"wheel",
|
|
310
|
+
"keydown"
|
|
311
|
+
];
|
|
312
|
+
f.forEach(
|
|
313
|
+
(n) => o.addEventListener(n, d, { capture: !0, passive: !0 })
|
|
314
|
+
);
|
|
315
|
+
const v = [
|
|
316
|
+
r.addListener("dragstart", () => {
|
|
317
|
+
t.current.programmatic = !1, t.current.moved = !0;
|
|
318
|
+
}),
|
|
319
|
+
r.addListener("center_changed", u),
|
|
320
|
+
r.addListener("zoom_changed", u),
|
|
321
|
+
r.addListener("idle", g)
|
|
322
|
+
];
|
|
323
|
+
return g(), () => {
|
|
324
|
+
v.forEach((n) => n.remove()), f.forEach(
|
|
325
|
+
(n) => o.removeEventListener(n, d, !0)
|
|
326
|
+
), clearTimeout(m), p();
|
|
327
|
+
};
|
|
328
|
+
}, [r, t]), null;
|
|
329
|
+
}
|
|
330
|
+
function pt(e, t) {
|
|
331
|
+
const r = B(), [a, o] = N(null), { lat: i, lng: p } = t;
|
|
332
|
+
return z(() => {
|
|
333
|
+
if (!r || typeof r.getCenter != "function") return;
|
|
334
|
+
const m = () => {
|
|
335
|
+
var h, w;
|
|
336
|
+
const d = (h = r.getCenter()) == null ? void 0 : h.toJSON(), u = r.getZoom(), g = (w = r.getDiv) == null ? void 0 : w.call(r);
|
|
337
|
+
if (!d || u == null || !g) {
|
|
338
|
+
o(null);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const f = g.clientWidth, v = g.clientHeight, n = Le * 2 ** u;
|
|
342
|
+
o({
|
|
343
|
+
id: e,
|
|
344
|
+
width: f,
|
|
345
|
+
height: v,
|
|
346
|
+
x: f / 2 + (p - d.lng) / 360 * n,
|
|
347
|
+
y: v / 2 - (q(i) - q(d.lat)) * n / (2 * Math.PI)
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
m();
|
|
351
|
+
const c = ["bounds_changed", "zoom_changed", "center_changed", "idle"].flatMap(
|
|
352
|
+
(d) => typeof r.addListener == "function" ? [r.addListener(d, m)] : []
|
|
353
|
+
);
|
|
354
|
+
return () => c.forEach((d) => d.remove());
|
|
355
|
+
}, [r, e, i, p]), (a == null ? void 0 : a.id) === e ? a : null;
|
|
356
|
+
}
|
|
357
|
+
function mt({
|
|
358
|
+
marker: e,
|
|
359
|
+
frame: t,
|
|
360
|
+
direction: r,
|
|
361
|
+
children: a
|
|
362
|
+
}) {
|
|
363
|
+
const o = pt(e.id, e.position);
|
|
364
|
+
return !o || !t ? null : Be(
|
|
365
|
+
/* @__PURE__ */ l(gt, { anchor: o, direction: r, children: a }),
|
|
366
|
+
t
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
const ft = 52, ht = 12, F = 8;
|
|
370
|
+
function gt({
|
|
371
|
+
anchor: e,
|
|
372
|
+
children: t,
|
|
373
|
+
direction: r
|
|
374
|
+
}) {
|
|
375
|
+
const a = k(null), [o, i] = N(
|
|
376
|
+
null
|
|
377
|
+
);
|
|
378
|
+
if (ke(() => {
|
|
379
|
+
const n = a.current;
|
|
380
|
+
n && i(
|
|
381
|
+
(h) => (h == null ? void 0 : h.width) === n.offsetWidth && h.height === n.offsetHeight ? h : { width: n.offsetWidth, height: n.offsetHeight }
|
|
382
|
+
);
|
|
383
|
+
}, [t, e.id]), !(e.x >= 0 && e.x <= e.width && e.y >= 0 && e.y <= e.height)) return null;
|
|
384
|
+
const m = (o == null ? void 0 : o.width) ?? 0, c = (o == null ? void 0 : o.height) ?? 0, d = Math.max(F, e.width - m - F), u = Math.min(Math.max(e.x - m / 2, F), d), g = e.y - ft - c, f = g < F, v = f ? e.y + ht : g;
|
|
385
|
+
return (
|
|
386
|
+
// The layer is `ltr` because the map is geographic: x is always measured
|
|
387
|
+
// from the physical left. The card inside takes the page direction.
|
|
388
|
+
/* @__PURE__ */ l(
|
|
389
|
+
"div",
|
|
390
|
+
{
|
|
391
|
+
dir: "ltr",
|
|
392
|
+
"aria-hidden": "true",
|
|
393
|
+
"data-component": "map-view-marker-card-layer",
|
|
394
|
+
className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:overflow-hidden",
|
|
395
|
+
children: /* @__PURE__ */ l(
|
|
396
|
+
"div",
|
|
397
|
+
{
|
|
398
|
+
ref: a,
|
|
399
|
+
"data-component": "map-view-marker-card",
|
|
400
|
+
"data-marker-id": e.id,
|
|
401
|
+
"data-placement": f ? "below" : "above",
|
|
402
|
+
style: {
|
|
403
|
+
"--marker-card-x": `${u}px`,
|
|
404
|
+
"--marker-card-y": `${v}px`
|
|
405
|
+
},
|
|
406
|
+
"data-measured": o ? "true" : "false",
|
|
407
|
+
className: "ds:absolute ds:[inset-inline-start:var(--marker-card-x)] ds:[inset-block-start:var(--marker-card-y)] ds:[inline-size:max-content] ds:[max-inline-size:calc(100%-var(--spacing-md))] ds:data-[measured=false]:invisible",
|
|
408
|
+
children: /* @__PURE__ */ l("div", { dir: r, children: t })
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
function ge(e) {
|
|
416
|
+
if (!e) return null;
|
|
417
|
+
if (e instanceof HTMLElement) return e;
|
|
418
|
+
const t = e.element;
|
|
419
|
+
return t instanceof HTMLElement ? t : null;
|
|
420
|
+
}
|
|
421
|
+
function vt({
|
|
422
|
+
marker: e,
|
|
423
|
+
label: t,
|
|
424
|
+
isSelected: r,
|
|
425
|
+
isHovered: a,
|
|
426
|
+
onSelect: o,
|
|
427
|
+
onHover: i
|
|
428
|
+
}) {
|
|
429
|
+
const [p, m] = N(null), { id: c } = e, d = k(!1);
|
|
430
|
+
return z(() => {
|
|
431
|
+
const u = ge(p);
|
|
432
|
+
if (!u || !i) return;
|
|
433
|
+
const g = (n) => {
|
|
434
|
+
fe(n.target) && i(c, !0, "focus");
|
|
435
|
+
}, f = (n) => {
|
|
436
|
+
u.contains(n.relatedTarget) || d.current || i(c, !1, "focus");
|
|
437
|
+
}, v = (n) => {
|
|
438
|
+
n.key === "Escape" && i(c, !1, "focus");
|
|
439
|
+
};
|
|
440
|
+
return u.addEventListener("focusin", g), u.addEventListener("focusout", f), u.addEventListener("keydown", v), () => {
|
|
441
|
+
u.removeEventListener("focusin", g), u.removeEventListener("focusout", f), u.removeEventListener("keydown", v);
|
|
442
|
+
};
|
|
443
|
+
}, [p, c, i]), /* @__PURE__ */ l(
|
|
444
|
+
Qe,
|
|
445
|
+
{
|
|
446
|
+
ref: m,
|
|
447
|
+
position: e.position,
|
|
448
|
+
title: t,
|
|
449
|
+
"aria-label": t,
|
|
450
|
+
"data-selected": r ? "true" : "false",
|
|
451
|
+
"data-hovered": a ? "true" : "false",
|
|
452
|
+
zIndex: a ? 1e3 : r ? 500 : void 0,
|
|
453
|
+
onClick: () => o(c),
|
|
454
|
+
onMouseEnter: i ? () => {
|
|
455
|
+
d.current = !0, i(c, !0, "pointer");
|
|
456
|
+
} : void 0,
|
|
457
|
+
onMouseLeave: i ? () => {
|
|
458
|
+
d.current = !1;
|
|
459
|
+
const u = ge(p), g = document.activeElement;
|
|
460
|
+
u && g && u.contains(g) && fe(g) || i(c, !1, "pointer");
|
|
461
|
+
} : void 0,
|
|
462
|
+
children: a ? (
|
|
463
|
+
// Hovered pin: larger, deep ink body with a white ring.
|
|
464
|
+
// Theme-invariant, because the tiles do not follow the kit theme: one
|
|
465
|
+
// of body and ring clears 3:1 on any map style. Not `--accent`, which
|
|
466
|
+
// failed contrast.
|
|
467
|
+
/* @__PURE__ */ l(
|
|
468
|
+
me,
|
|
469
|
+
{
|
|
470
|
+
scale: 1.4,
|
|
471
|
+
background: "var(--map-marker-hover-color)",
|
|
472
|
+
borderColor: "var(--map-marker-hover-ring)",
|
|
473
|
+
glyphColor: "var(--map-marker-hover-ring)"
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
) : /* @__PURE__ */ l(
|
|
477
|
+
me,
|
|
478
|
+
{
|
|
479
|
+
background: "var(--primary)",
|
|
480
|
+
borderColor: "var(--primary)",
|
|
481
|
+
glyphColor: "var(--primary-foreground)"
|
|
482
|
+
}
|
|
483
|
+
)
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
const Le = 256, bt = (e) => e * Math.PI / 180;
|
|
488
|
+
function q(e) {
|
|
489
|
+
const t = Math.min(Math.max(Math.sin(bt(e)), -0.9999), 0.9999);
|
|
490
|
+
return Math.log((1 + t) / (1 - t)) / 2;
|
|
491
|
+
}
|
|
492
|
+
const yt = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
|
|
493
|
+
function wt(e) {
|
|
494
|
+
let t = -90, r = 90, a = -180, o = 180;
|
|
495
|
+
for (const { lat: i, lng: p } of e)
|
|
496
|
+
t = Math.max(t, i), r = Math.min(r, i), a = Math.max(a, p), o = Math.min(o, p);
|
|
497
|
+
return { north: t, south: r, east: a, west: o };
|
|
498
|
+
}
|
|
499
|
+
function kt(e, t, r, a, o) {
|
|
500
|
+
const { north: i, south: p, east: m, west: c } = wt(e);
|
|
501
|
+
if (i === p && m === c)
|
|
502
|
+
return { center: { lat: i, lng: m }, zoom: o };
|
|
503
|
+
const d = q(i), u = q(p), g = {
|
|
504
|
+
lat: yt((d + u) / 2),
|
|
505
|
+
lng: (m + c) / 2
|
|
506
|
+
}, f = (n, h) => h > 0 ? Math.log2(Math.max(n, 1) / Le / h) : o, v = Math.min(
|
|
507
|
+
f(t - 2 * a, (m - c) / 360),
|
|
508
|
+
f(r - 2 * a, (d - u) / (2 * Math.PI)),
|
|
509
|
+
o
|
|
510
|
+
);
|
|
511
|
+
return { center: g, zoom: Math.max(0, Math.floor(v)) };
|
|
512
|
+
}
|
|
513
|
+
const Ie = ({ id: e, lat: t, lng: r }) => e != null ? `id:${e}` : `at:${t},${r}`;
|
|
514
|
+
function Mt({
|
|
515
|
+
points: e,
|
|
516
|
+
fitKey: t,
|
|
517
|
+
maxZoom: r,
|
|
518
|
+
onCameraMove: a
|
|
519
|
+
}) {
|
|
520
|
+
const o = B(), i = k(null), p = k(!1), m = k(null);
|
|
521
|
+
return z(() => {
|
|
522
|
+
if (!o) return;
|
|
523
|
+
const c = () => {
|
|
524
|
+
var n;
|
|
525
|
+
const u = m.current, g = (n = o.getCenter()) == null ? void 0 : n.toJSON(), f = o.getZoom();
|
|
526
|
+
u != null && f === u.zoom && g != null && Math.abs(g.lat - u.center.lat) < 1e-6 && Math.abs(g.lng - u.center.lng) < 1e-6 || (p.current = !0);
|
|
527
|
+
}, d = [
|
|
528
|
+
o.addListener("dragstart", () => {
|
|
529
|
+
p.current = !0;
|
|
530
|
+
}),
|
|
531
|
+
o.addListener("center_changed", c),
|
|
532
|
+
o.addListener("zoom_changed", c)
|
|
533
|
+
];
|
|
534
|
+
return () => d.forEach((u) => u.remove());
|
|
535
|
+
}, [o]), z(() => {
|
|
536
|
+
var w;
|
|
537
|
+
if (!o) return;
|
|
538
|
+
const c = ((w = i.current) == null ? void 0 : w.map) === o ? i.current : null;
|
|
539
|
+
if ((c == null ? void 0 : c.key) === t) return;
|
|
540
|
+
const d = new Set(e.map(Ie)), u = (y, E) => {
|
|
541
|
+
m.current = { center: y, zoom: E }, a(), o.moveCamera({ center: y, zoom: E }), p.current = !1;
|
|
542
|
+
};
|
|
543
|
+
if (e.length === 0) {
|
|
544
|
+
i.current = { map: o, key: t, points: d };
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
if (c != null && c.points.size > 0 && [...c.points].every((y) => d.has(y)) && p.current) {
|
|
548
|
+
i.current = { map: o, key: t, points: d };
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const f = o.getDiv();
|
|
552
|
+
if (!(f instanceof Element)) return;
|
|
553
|
+
const v = () => {
|
|
554
|
+
i.current = { map: o, key: t, points: d };
|
|
555
|
+
const y = Math.min(
|
|
556
|
+
rt("--spacing-2xl", f, 48),
|
|
557
|
+
f.clientWidth / 4,
|
|
558
|
+
f.clientHeight / 4
|
|
559
|
+
), { center: E, zoom: S } = kt(
|
|
560
|
+
e,
|
|
561
|
+
f.clientWidth,
|
|
562
|
+
f.clientHeight,
|
|
563
|
+
y,
|
|
564
|
+
r
|
|
565
|
+
);
|
|
566
|
+
u(E, S);
|
|
567
|
+
}, n = () => f.clientWidth > 0 && f.clientHeight > 0;
|
|
568
|
+
if (n() || typeof ResizeObserver > "u") {
|
|
569
|
+
v();
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
const h = new ResizeObserver(() => {
|
|
573
|
+
n() && (h.disconnect(), v());
|
|
574
|
+
});
|
|
575
|
+
return h.observe(f), () => h.disconnect();
|
|
576
|
+
}, [o, t, e, r, a]), null;
|
|
577
|
+
}
|
|
578
|
+
const Ce = (e) => {
|
|
579
|
+
var t, r;
|
|
580
|
+
return typeof ((r = (t = globalThis.google) == null ? void 0 : t.maps) == null ? void 0 : r[e]) == "function";
|
|
581
|
+
};
|
|
582
|
+
function ve() {
|
|
583
|
+
const { t: e } = A("ui");
|
|
584
|
+
return /* @__PURE__ */ M(
|
|
585
|
+
"div",
|
|
586
|
+
{
|
|
587
|
+
role: "status",
|
|
588
|
+
"data-testid": "map-view-loading",
|
|
589
|
+
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ l(et, { variant: "rectangular", width: "100%", height: "100%" }),
|
|
592
|
+
/* @__PURE__ */ l(Ee, { children: e("common.loading") })
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
function be({
|
|
598
|
+
preview: e,
|
|
599
|
+
onError: t
|
|
600
|
+
}) {
|
|
601
|
+
const { t: r } = A("ui");
|
|
602
|
+
return /* @__PURE__ */ M(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
"data-testid": "map-view-loading",
|
|
606
|
+
className: "ds:relative ds:[inline-size:100%] ds:[block-size:100%]",
|
|
607
|
+
children: [
|
|
608
|
+
/* @__PURE__ */ l(Ve, { preview: e, onError: t }),
|
|
609
|
+
/* @__PURE__ */ l("div", { role: "status", children: /* @__PURE__ */ l(Ee, { children: r("common.loading") }) })
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
function Ve({
|
|
615
|
+
preview: e,
|
|
616
|
+
onError: t
|
|
617
|
+
}) {
|
|
618
|
+
return /* @__PURE__ */ l(
|
|
619
|
+
"img",
|
|
620
|
+
{
|
|
621
|
+
src: e.src,
|
|
622
|
+
srcSet: e.srcSet,
|
|
623
|
+
alt: e.alt,
|
|
624
|
+
width: e.width,
|
|
625
|
+
height: e.height,
|
|
626
|
+
loading: "lazy",
|
|
627
|
+
decoding: "async",
|
|
628
|
+
onError: t,
|
|
629
|
+
"data-testid": "map-view-preview-image",
|
|
630
|
+
className: "ds:block ds:[inline-size:100%] ds:[block-size:100%] ds:[object-fit:contain]"
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
function zt({
|
|
635
|
+
children: e,
|
|
636
|
+
pending: t,
|
|
637
|
+
holdUntilLoaded: r = !1
|
|
638
|
+
}) {
|
|
639
|
+
const a = Ye();
|
|
640
|
+
return Me("maps") || Ce("Map") || !a && !r ? e : t;
|
|
641
|
+
}
|
|
642
|
+
function Et({ children: e }) {
|
|
643
|
+
return Me("marker") || Ce("Marker") ? e : null;
|
|
644
|
+
}
|
|
645
|
+
function Ne(e, t) {
|
|
646
|
+
ke(() => {
|
|
647
|
+
const r = e.current;
|
|
648
|
+
return () => {
|
|
649
|
+
t == null || t(!!(r && r.contains(document.activeElement)));
|
|
650
|
+
};
|
|
651
|
+
}, [e, t]);
|
|
652
|
+
}
|
|
653
|
+
function xt({
|
|
654
|
+
preview: e,
|
|
655
|
+
onLoadMap: t,
|
|
656
|
+
consentCta: r,
|
|
657
|
+
onImageError: a,
|
|
658
|
+
description: o,
|
|
659
|
+
openInGoogleMapsHref: i,
|
|
660
|
+
onUnmount: p
|
|
661
|
+
}) {
|
|
662
|
+
const { t: m } = A("ui"), c = we(), d = k(null);
|
|
663
|
+
return Ne(d, p), /* @__PURE__ */ M(
|
|
664
|
+
"div",
|
|
665
|
+
{
|
|
666
|
+
ref: d,
|
|
667
|
+
className: "ds:absolute ds:inset-0 ds:bg-[var(--muted)]",
|
|
668
|
+
"data-testid": "map-view-preview",
|
|
669
|
+
children: [
|
|
670
|
+
/* @__PURE__ */ l(Ve, { preview: e, onError: a }),
|
|
671
|
+
/* @__PURE__ */ l("div", { className: "ds:absolute ds:start-0 ds:end-0 ds:top-[var(--map-preview-inset-block-start,var(--spacing-md))] ds:flex ds:justify-center ds:px-[var(--spacing-md)]", children: /* @__PURE__ */ M(
|
|
672
|
+
"div",
|
|
673
|
+
{
|
|
674
|
+
"data-testid": "map-view-preview-plate",
|
|
675
|
+
className: "ds:flex ds:max-w-[24rem] ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-lg)] ds:bg-[var(--background)] ds:p-[var(--spacing-sm)] ds:text-center ds:shadow-[var(--shadow-lg)]",
|
|
676
|
+
children: [
|
|
677
|
+
/* @__PURE__ */ l(
|
|
678
|
+
"p",
|
|
679
|
+
{
|
|
680
|
+
id: c,
|
|
681
|
+
className: "type-meta ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
682
|
+
children: o
|
|
683
|
+
}
|
|
684
|
+
),
|
|
685
|
+
/* @__PURE__ */ M("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)]", children: [
|
|
686
|
+
r ?? /* @__PURE__ */ l(
|
|
687
|
+
ze,
|
|
688
|
+
{
|
|
689
|
+
type: "button",
|
|
690
|
+
intent: "primary",
|
|
691
|
+
size: "lg",
|
|
692
|
+
onClick: t,
|
|
693
|
+
"aria-describedby": c,
|
|
694
|
+
"data-testid": "map-view-load-cta",
|
|
695
|
+
children: m("mapView.consentTitle")
|
|
696
|
+
}
|
|
697
|
+
),
|
|
698
|
+
/* @__PURE__ */ M(
|
|
699
|
+
"a",
|
|
700
|
+
{
|
|
701
|
+
href: i,
|
|
702
|
+
target: "_blank",
|
|
703
|
+
rel: "noopener noreferrer",
|
|
704
|
+
className: "ds:inline-flex ds:min-h-[var(--min-target-size)] ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
705
|
+
children: [
|
|
706
|
+
m("mapView.openInGoogleMaps"),
|
|
707
|
+
/* @__PURE__ */ l(xe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
708
|
+
]
|
|
709
|
+
}
|
|
710
|
+
)
|
|
711
|
+
] })
|
|
712
|
+
]
|
|
713
|
+
}
|
|
714
|
+
) })
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
function ye({
|
|
720
|
+
address: e,
|
|
721
|
+
contentLang: t,
|
|
722
|
+
description: r,
|
|
723
|
+
onLoadMap: a,
|
|
724
|
+
openInGoogleMapsHref: o,
|
|
725
|
+
consentCta: i,
|
|
726
|
+
onUnmount: p
|
|
727
|
+
}) {
|
|
728
|
+
const { t: m } = A("ui"), c = k(null);
|
|
729
|
+
return Ne(c, p), /* @__PURE__ */ M(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
ref: c,
|
|
733
|
+
className: lt(),
|
|
734
|
+
"data-testid": "map-view-consent",
|
|
735
|
+
children: [
|
|
736
|
+
/* @__PURE__ */ l(
|
|
737
|
+
ot,
|
|
738
|
+
{
|
|
739
|
+
"aria-hidden": "true",
|
|
740
|
+
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
741
|
+
}
|
|
742
|
+
),
|
|
743
|
+
/* @__PURE__ */ l("p", { className: ct(), children: m("mapView.consentTitle") }),
|
|
744
|
+
e ? /* @__PURE__ */ l(
|
|
745
|
+
"p",
|
|
746
|
+
{
|
|
747
|
+
className: he(),
|
|
748
|
+
"data-testid": "map-view-address",
|
|
749
|
+
lang: t,
|
|
750
|
+
children: e
|
|
751
|
+
}
|
|
752
|
+
) : null,
|
|
753
|
+
/* @__PURE__ */ l("p", { className: he(), children: r }),
|
|
754
|
+
/* @__PURE__ */ M(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center",
|
|
758
|
+
"data-testid": "map-view-consent-actions",
|
|
759
|
+
children: [
|
|
760
|
+
i ?? /* @__PURE__ */ l(
|
|
761
|
+
ze,
|
|
762
|
+
{
|
|
763
|
+
type: "button",
|
|
764
|
+
intent: "primary",
|
|
765
|
+
size: "sm",
|
|
766
|
+
onClick: a,
|
|
767
|
+
"data-testid": "map-view-load-cta",
|
|
768
|
+
children: m("mapView.consentCta")
|
|
769
|
+
}
|
|
770
|
+
),
|
|
771
|
+
/* @__PURE__ */ M(
|
|
772
|
+
"a",
|
|
773
|
+
{
|
|
774
|
+
href: o,
|
|
775
|
+
target: "_blank",
|
|
776
|
+
rel: "noopener noreferrer",
|
|
777
|
+
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
778
|
+
children: [
|
|
779
|
+
m("mapView.openInGoogleMaps"),
|
|
780
|
+
/* @__PURE__ */ l(xe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
)
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
)
|
|
787
|
+
]
|
|
788
|
+
}
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
const Lt = Fe(
|
|
792
|
+
({
|
|
793
|
+
id: e,
|
|
794
|
+
apiKey: t,
|
|
795
|
+
center: r,
|
|
796
|
+
zoom: a = 15,
|
|
797
|
+
markers: o,
|
|
798
|
+
selectedMarkerId: i,
|
|
799
|
+
hoveredMarkerId: p,
|
|
800
|
+
renderMarkerCard: m,
|
|
801
|
+
onMarkerHover: c,
|
|
802
|
+
onMarkerClick: d,
|
|
803
|
+
onBoundsChange: u,
|
|
804
|
+
consentGranted: g = !1,
|
|
805
|
+
onConsentRequest: f,
|
|
806
|
+
staticPreview: v,
|
|
807
|
+
address: n,
|
|
808
|
+
contentLang: h,
|
|
809
|
+
consentDescription: w,
|
|
810
|
+
consentCta: y,
|
|
811
|
+
mapId: E,
|
|
812
|
+
size: S,
|
|
813
|
+
surface: O,
|
|
814
|
+
ariaLabel: j,
|
|
815
|
+
fitToPoints: T,
|
|
816
|
+
fitKey: ee,
|
|
817
|
+
fitMaxZoom: Se = 15,
|
|
818
|
+
className: Te,
|
|
819
|
+
..._e
|
|
820
|
+
}, Pe) => {
|
|
821
|
+
const { t: P, i18n: te } = A("ui"), Z = _(() => T ?? [], [T]), Re = _(
|
|
822
|
+
() => ee ?? Z.map((s) => `${Ie(s)}@${s.lat},${s.lng}`).sort().join("|"),
|
|
823
|
+
[ee, Z]
|
|
824
|
+
), L = Z.length > 0, ne = k(L), re = we(), Ge = _(
|
|
825
|
+
() => `map-${re.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
826
|
+
[re]
|
|
827
|
+
), [oe, Ae] = N(!1);
|
|
828
|
+
z(() => {
|
|
829
|
+
if (typeof window > "u") return;
|
|
830
|
+
const s = window.matchMedia("(prefers-reduced-motion: reduce)"), b = () => Ae(s.matches);
|
|
831
|
+
return b(), s.addEventListener("change", b), () => s.removeEventListener("change", b);
|
|
832
|
+
}, []);
|
|
833
|
+
const U = _(() => `https://www.google.com/maps/search/?api=1&query=${n ? encodeURIComponent(n) : `${r.lat},${r.lng}`}`, [n, r.lat, r.lng]), x = k(null), se = k({
|
|
834
|
+
pendingInput: !1,
|
|
835
|
+
moved: !1,
|
|
836
|
+
programmatic: !1
|
|
837
|
+
}), D = V(() => {
|
|
838
|
+
se.current = {
|
|
839
|
+
pendingInput: !1,
|
|
840
|
+
moved: !1,
|
|
841
|
+
programmatic: !0
|
|
842
|
+
};
|
|
843
|
+
}, []), $ = V(
|
|
844
|
+
(s) => {
|
|
845
|
+
D(), d == null || d(s);
|
|
846
|
+
},
|
|
847
|
+
[D, d]
|
|
848
|
+
), [Oe, je] = N(null), J = _(
|
|
849
|
+
() => p != null && m ? (o ?? []).find((s) => s.id === p) ?? null : null,
|
|
850
|
+
[p, m, o]
|
|
851
|
+
), Ze = V((s) => {
|
|
852
|
+
x.current = s;
|
|
853
|
+
}, []), ae = k(!1), ie = k(null), le = k(0), K = V(
|
|
854
|
+
() => ({
|
|
855
|
+
panTo: (s) => {
|
|
856
|
+
var b;
|
|
857
|
+
return (b = x.current) == null ? void 0 : b.panTo(s);
|
|
858
|
+
},
|
|
859
|
+
setZoom: (s) => {
|
|
860
|
+
var b;
|
|
861
|
+
return (b = x.current) == null ? void 0 : b.setZoom(s);
|
|
862
|
+
},
|
|
863
|
+
selectMarker: (s) => {
|
|
864
|
+
var b;
|
|
865
|
+
return (b = x.current) == null ? void 0 : b.selectMarker(s);
|
|
866
|
+
},
|
|
867
|
+
// Without `isConsentGranted` an agent has no way to learn that
|
|
868
|
+
// its pan / zoom / select was swallowed by the GDPR gate rather
|
|
869
|
+
// than applied: under the default (`consentGranted={false}`) the
|
|
870
|
+
// whole Maps subtree is unmounted and every action optional-chains
|
|
871
|
+
// into nothing.
|
|
872
|
+
isConsentGranted: () => ae.current,
|
|
873
|
+
getCenter: () => {
|
|
874
|
+
var s;
|
|
875
|
+
return ((s = x.current) == null ? void 0 : s.getCenter()) ?? null;
|
|
876
|
+
},
|
|
877
|
+
getZoom: () => {
|
|
878
|
+
var s;
|
|
879
|
+
return ((s = x.current) == null ? void 0 : s.getZoom()) ?? null;
|
|
880
|
+
},
|
|
881
|
+
getSelectedMarkerId: () => ie.current,
|
|
882
|
+
getMarkerCount: () => le.current
|
|
883
|
+
}),
|
|
884
|
+
[]
|
|
885
|
+
);
|
|
886
|
+
qe(Pe, K, [K]);
|
|
887
|
+
const De = _(
|
|
888
|
+
() => K(),
|
|
889
|
+
[K]
|
|
890
|
+
);
|
|
891
|
+
nt(st, De, e), z(() => {
|
|
892
|
+
var b, C;
|
|
893
|
+
const s = ne.current && !L;
|
|
894
|
+
if (ne.current = L, !L) {
|
|
895
|
+
if (s) {
|
|
896
|
+
(b = x.current) == null || b.jumpTo(r, a);
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
oe || (C = x.current) == null || C.panTo(r);
|
|
900
|
+
}
|
|
901
|
+
}, [r.lat, r.lng, oe, L]), z(() => {
|
|
902
|
+
var s;
|
|
903
|
+
L || (s = x.current) == null || s.setZoom(a);
|
|
904
|
+
}, [a, L]);
|
|
905
|
+
const [$e, ce] = N(!1), W = g || $e;
|
|
906
|
+
ae.current = W, ie.current = i ?? null, le.current = (o ?? []).length;
|
|
907
|
+
const [Ke, We] = N(null), I = v && v.src !== Ke ? v : void 0, X = v == null ? void 0 : v.src, H = V(() => {
|
|
908
|
+
X && We(X);
|
|
909
|
+
}, [X]), de = k(null), Y = k(!1), Q = k(!1), ue = V((s) => {
|
|
910
|
+
Q.current = s;
|
|
911
|
+
}, []);
|
|
912
|
+
z(() => {
|
|
913
|
+
var R;
|
|
914
|
+
if (!W) return;
|
|
915
|
+
const s = document.activeElement, b = !s || s === document.body, C = Y.current || Q.current && b;
|
|
916
|
+
Y.current = !1, Q.current = !1, C && ((R = de.current) == null || R.focus({ preventScroll: !0 }));
|
|
917
|
+
}, [W]);
|
|
918
|
+
const pe = V(() => {
|
|
919
|
+
if (Y.current = !0, f) {
|
|
920
|
+
f(), ce(!0);
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
ce(!0);
|
|
924
|
+
}, [f]);
|
|
925
|
+
return /* @__PURE__ */ l(
|
|
926
|
+
"div",
|
|
927
|
+
{
|
|
928
|
+
ref: de,
|
|
929
|
+
className: at({ size: S, surface: O, className: Te }),
|
|
930
|
+
"data-component": "map-view",
|
|
931
|
+
"data-component-id": e ?? Ge,
|
|
932
|
+
role: "region",
|
|
933
|
+
"aria-label": j ?? P("mapView.label"),
|
|
934
|
+
tabIndex: -1,
|
|
935
|
+
..._e,
|
|
936
|
+
children: /* @__PURE__ */ l(
|
|
937
|
+
"div",
|
|
938
|
+
{
|
|
939
|
+
ref: je,
|
|
940
|
+
className: it({ size: S, className: "ds:relative" }),
|
|
941
|
+
children: W ? (
|
|
942
|
+
// A provider failure shows the consent placeholder (its "Open in
|
|
943
|
+
// Google Maps" link needs no script) with "Load map" as the
|
|
944
|
+
// retry, instead of unmounting the host's React tree. The gate
|
|
945
|
+
// starts the provider only once Google's `core` and `maps`
|
|
946
|
+
// libraries have arrived.
|
|
947
|
+
/* @__PURE__ */ l(
|
|
948
|
+
tt,
|
|
949
|
+
{
|
|
950
|
+
fallback: ({ reset: s }) => /* @__PURE__ */ l(
|
|
951
|
+
ye,
|
|
952
|
+
{
|
|
953
|
+
address: n,
|
|
954
|
+
contentLang: h,
|
|
955
|
+
description: w ?? P("mapView.consentDescription"),
|
|
956
|
+
onLoadMap: s,
|
|
957
|
+
consentCta: void 0,
|
|
958
|
+
openInGoogleMapsHref: U
|
|
959
|
+
}
|
|
960
|
+
),
|
|
961
|
+
children: /* @__PURE__ */ l(
|
|
962
|
+
Ue,
|
|
963
|
+
{
|
|
964
|
+
libraries: ["maps"],
|
|
965
|
+
pending: I ? /* @__PURE__ */ l(
|
|
966
|
+
be,
|
|
967
|
+
{
|
|
968
|
+
preview: I,
|
|
969
|
+
onError: H
|
|
970
|
+
}
|
|
971
|
+
) : /* @__PURE__ */ l(ve, {}),
|
|
972
|
+
children: /* @__PURE__ */ l(
|
|
973
|
+
Je,
|
|
974
|
+
{
|
|
975
|
+
apiKey: t,
|
|
976
|
+
language: te.language,
|
|
977
|
+
children: /* @__PURE__ */ l(
|
|
978
|
+
zt,
|
|
979
|
+
{
|
|
980
|
+
holdUntilLoaded: !!I,
|
|
981
|
+
pending: I ? /* @__PURE__ */ l(
|
|
982
|
+
be,
|
|
983
|
+
{
|
|
984
|
+
preview: I,
|
|
985
|
+
onError: H
|
|
986
|
+
}
|
|
987
|
+
) : /* @__PURE__ */ l(ve, {}),
|
|
988
|
+
children: /* @__PURE__ */ M(
|
|
989
|
+
Xe,
|
|
990
|
+
{
|
|
991
|
+
defaultCenter: r,
|
|
992
|
+
defaultZoom: a,
|
|
993
|
+
mapId: E,
|
|
994
|
+
gestureHandling: "cooperative",
|
|
995
|
+
disableDefaultUI: !1,
|
|
996
|
+
onClick: () => $(null),
|
|
997
|
+
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
998
|
+
children: [
|
|
999
|
+
/* @__PURE__ */ l(
|
|
1000
|
+
dt,
|
|
1001
|
+
{
|
|
1002
|
+
onHandleReady: Ze,
|
|
1003
|
+
onMarkerSelect: $,
|
|
1004
|
+
onCameraMove: D
|
|
1005
|
+
}
|
|
1006
|
+
),
|
|
1007
|
+
u ? /* @__PURE__ */ l(
|
|
1008
|
+
ut,
|
|
1009
|
+
{
|
|
1010
|
+
onBoundsChange: u,
|
|
1011
|
+
userInteraction: se
|
|
1012
|
+
}
|
|
1013
|
+
) : null,
|
|
1014
|
+
T ? /* @__PURE__ */ l(
|
|
1015
|
+
Mt,
|
|
1016
|
+
{
|
|
1017
|
+
points: Z,
|
|
1018
|
+
fitKey: Re,
|
|
1019
|
+
maxZoom: Se,
|
|
1020
|
+
onCameraMove: D
|
|
1021
|
+
}
|
|
1022
|
+
) : null,
|
|
1023
|
+
J && m ? /* @__PURE__ */ l(
|
|
1024
|
+
mt,
|
|
1025
|
+
{
|
|
1026
|
+
marker: J,
|
|
1027
|
+
frame: Oe,
|
|
1028
|
+
direction: te.dir(),
|
|
1029
|
+
children: m(J.id)
|
|
1030
|
+
}
|
|
1031
|
+
) : null,
|
|
1032
|
+
/* @__PURE__ */ l(Et, { children: (o ?? []).map((s) => {
|
|
1033
|
+
const b = i != null && i === s.id, C = p != null && p === s.id, R = P("mapView.markerLabel", {
|
|
1034
|
+
label: s.label ?? s.id
|
|
1035
|
+
});
|
|
1036
|
+
return E ? /* @__PURE__ */ l(
|
|
1037
|
+
vt,
|
|
1038
|
+
{
|
|
1039
|
+
marker: s,
|
|
1040
|
+
label: R,
|
|
1041
|
+
isSelected: b,
|
|
1042
|
+
isHovered: C,
|
|
1043
|
+
onSelect: $,
|
|
1044
|
+
onHover: c
|
|
1045
|
+
},
|
|
1046
|
+
s.id
|
|
1047
|
+
) : /* @__PURE__ */ l(
|
|
1048
|
+
He,
|
|
1049
|
+
{
|
|
1050
|
+
position: s.position,
|
|
1051
|
+
title: R,
|
|
1052
|
+
zIndex: C ? 1e3 : b ? 500 : void 0,
|
|
1053
|
+
onClick: () => $(s.id),
|
|
1054
|
+
onMouseOver: c ? () => c(s.id, !0, "pointer") : void 0,
|
|
1055
|
+
onMouseOut: c ? () => c(s.id, !1, "pointer") : void 0
|
|
1056
|
+
},
|
|
1057
|
+
s.id
|
|
1058
|
+
);
|
|
1059
|
+
}) })
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
)
|
|
1063
|
+
}
|
|
1064
|
+
)
|
|
1065
|
+
}
|
|
1066
|
+
)
|
|
1067
|
+
}
|
|
1068
|
+
)
|
|
1069
|
+
}
|
|
1070
|
+
)
|
|
1071
|
+
) : I ? /* @__PURE__ */ l(
|
|
1072
|
+
xt,
|
|
1073
|
+
{
|
|
1074
|
+
preview: I,
|
|
1075
|
+
onLoadMap: pe,
|
|
1076
|
+
consentCta: y,
|
|
1077
|
+
onImageError: H,
|
|
1078
|
+
description: w ?? P("mapView.consentDescription"),
|
|
1079
|
+
openInGoogleMapsHref: U,
|
|
1080
|
+
onUnmount: ue
|
|
1081
|
+
}
|
|
1082
|
+
) : /* @__PURE__ */ l(
|
|
1083
|
+
ye,
|
|
1084
|
+
{
|
|
1085
|
+
address: n,
|
|
1086
|
+
contentLang: h,
|
|
1087
|
+
description: w ?? P("mapView.consentDescription"),
|
|
1088
|
+
onLoadMap: pe,
|
|
1089
|
+
consentCta: y,
|
|
1090
|
+
openInGoogleMapsHref: U,
|
|
1091
|
+
onUnmount: ue
|
|
1092
|
+
}
|
|
1093
|
+
)
|
|
1094
|
+
}
|
|
1095
|
+
)
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
Lt.displayName = "MapView";
|
|
1101
|
+
export {
|
|
1102
|
+
Lt as M,
|
|
1103
|
+
fe as i
|
|
1104
|
+
};
|
|
1105
|
+
//# sourceMappingURL=map-view-Frj8vE7n.js.map
|