@luzmo/lucero 1.0.1-alpha.9 → 1.0.2
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/README.md +74 -9
- package/components/accordion/index.cjs +1 -26
- package/components/accordion/index.js +8 -164
- package/components/accordion-BHBIfsLU.cjs +43 -0
- package/components/accordion-DC7cjb1c.js +152 -0
- package/components/action-bar/index.cjs +1 -22
- package/components/action-bar/index.js +8 -90
- package/components/action-bar-BMHZ4e_p.cjs +39 -0
- package/components/action-bar-CmLjsljR.js +92 -0
- package/components/action-button/index.cjs +1 -7
- package/components/action-button/index.js +8 -144
- package/components/action-button-B4_UEJle.js +121 -0
- package/components/action-button-G0PWSrZo.cjs +24 -0
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +11 -12
- package/components/action-group-CH8FTW0i.cjs +20 -0
- package/components/action-group-DYKpp-mz.js +211 -0
- package/components/action-menu/index.cjs +1 -39
- package/components/action-menu/index.js +8 -109
- package/components/action-menu-CJyB0mmO.cjs +56 -0
- package/components/action-menu-FiS1vhW7.js +105 -0
- package/components/avatar/avatar.d.ts +5 -0
- package/components/avatar/index.cjs +1 -7
- package/components/avatar/index.js +8 -64
- package/components/avatar-CyY_ZSD0.js +65 -0
- package/components/avatar-PulwjkMI.cjs +24 -0
- package/components/badge/badge.d.ts +35 -0
- package/components/{random-id-CqvckpWe.cjs → badge/index.cjs} +1 -1
- package/components/badge/index.d.ts +8 -0
- package/components/badge/index.js +25 -0
- package/components/badge-D1Ry32wi.cjs +23 -0
- package/components/badge-D6p2hPj8.js +94 -0
- package/components/button/button-base.d.ts +16 -0
- package/components/button/button.d.ts +38 -2
- package/components/button/index.cjs +1 -3
- package/components/button/index.js +9 -110
- package/components/button-CRNRP8P0.js +115 -0
- package/components/button-D3ZTogni.cjs +20 -0
- package/components/button-base-BYV3Lp3P.cjs +25 -0
- package/components/button-base-SHgEJgk2.js +123 -0
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +8 -42
- package/components/button-group-CJVpgiLq.js +46 -0
- package/components/button-group-rEK_YaF3.cjs +18 -0
- package/components/calendar/calendar.d.ts +67 -0
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.d.ts +1 -0
- package/components/calendar/index.js +8 -11
- package/components/calendar-CKr5T_zV.js +619 -0
- package/components/calendar-WRhzTEyZ.cjs +142 -0
- package/components/chat-message/chat-message.d.ts +139 -0
- package/components/{random-id-ByCz1xaq.js → chat-message/index.cjs} +1 -9
- package/components/chat-message/index.d.ts +8 -0
- package/components/chat-message/index.js +25 -0
- package/components/chat-message-CNE-mGuP.cjs +149 -0
- package/components/chat-message-DJgocVNj.js +2295 -0
- package/components/chat-message-group/chat-message-group.d.ts +50 -0
- package/components/{when-CDZyJPvd.cjs → chat-message-group/index.cjs} +1 -5
- package/components/chat-message-group/index.d.ts +7 -0
- package/components/chat-message-group/index.js +25 -0
- package/components/chat-message-group-B4U2MzHx.js +100 -0
- package/components/chat-message-group-COmhCN-R.cjs +24 -0
- package/components/checkbox/checkbox.d.ts +7 -0
- package/components/checkbox/index.cjs +1 -8
- package/components/checkbox/index.js +8 -79
- package/components/checkbox-CPS-tR_i.js +89 -0
- package/components/checkbox-DFwDrIdY.cjs +25 -0
- package/components/checkbox-mixin-C5sLMo5L.js +67 -0
- package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-D4HeLrMj.cjs} +3 -3
- package/components/chunk-D-qHiVGv.cjs +18 -0
- package/components/close-button-BeXYep8K.js +42 -0
- package/components/close-button-BzapEpcF.cjs +18 -0
- package/components/color-area/index.cjs +1 -63
- package/components/color-area/index.js +8 -364
- package/components/color-area-DA3ps2-c.cjs +80 -0
- package/components/color-area-DViRjuKo.js +300 -0
- package/components/color-controller-DueaXfnX.cjs +18 -0
- package/components/color-controller-G2_v2xSl.js +247 -0
- package/components/color-field/color-field.d.ts +1 -0
- package/components/color-field/index.cjs +1 -6
- package/components/color-field/index.js +8 -68
- package/components/color-field-CxdIoSq6.js +75 -0
- package/components/color-field-D7_7z2A2.cjs +23 -0
- package/components/color-handle/index.cjs +1 -7
- package/components/color-handle/index.js +8 -56
- package/components/color-handle-BOusOFFx.js +62 -0
- package/components/color-handle-Cka48yPY.cjs +24 -0
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +11 -12
- package/components/color-loupe-DMk8uWZW.cjs +56 -0
- package/components/color-loupe-bEzi2P0y.js +76 -0
- package/components/color-menu/index.cjs +1 -69
- package/components/color-menu/index.js +8 -189
- package/components/color-menu-DwbTxeqv.cjs +89 -0
- package/components/color-menu-Lxc9PTzl.js +183 -0
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +8 -71
- package/components/color-palette-349EkPMg.cjs +18 -0
- package/components/color-palette-BAdaNySC.js +80 -0
- package/components/color-palette-group/index.cjs +1 -11
- package/components/color-palette-group/index.js +8 -188
- package/components/color-palette-group-BvP09zmT.cjs +28 -0
- package/components/color-palette-group-D8Mavsd2.js +163 -0
- package/components/color-picker/color-picker.d.ts +3 -3
- package/components/color-picker/index.cjs +1 -31
- package/components/color-picker/index.js +8 -128
- package/components/color-picker-CSWiU-X5.cjs +48 -0
- package/components/color-picker-DqjfTvYf.js +126 -0
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +8 -11
- package/components/color-slider-DxjJ72ue.cjs +57 -0
- package/components/color-slider-ihAIFt5p.js +421 -0
- package/components/{condition-attribute-with-id-Dv4lSRbe.js → condition-attribute-with-id-DauPaLSS.cjs} +1 -14
- package/components/{query-assigned-nodes-C76XVPWY.js → condition-attribute-with-id-Duo51HZ7.js} +10 -18
- package/components/date-range-picker/date-range-picker.d.ts +184 -0
- package/components/{if-defined-C9YGdo33.cjs → date-range-picker/index.cjs} +1 -5
- package/components/date-range-picker/index.d.ts +8 -0
- package/components/date-range-picker/index.js +25 -0
- package/components/date-range-picker/types.d.ts +16 -0
- package/components/date-range-picker-BdRQep--.js +626 -0
- package/components/date-range-picker-CgitOe0i.cjs +187 -0
- package/components/date-time-picker/date-time-picker.d.ts +3 -3
- package/components/date-time-picker/index.cjs +1 -88
- package/components/date-time-picker/index.d.ts +1 -0
- package/components/date-time-picker/index.js +8 -1109
- package/components/date-time-picker/{types.d.ts → shared/types.d.ts} +1 -1
- package/components/date-time-picker-Bz8XwSOR.cjs +105 -0
- package/components/date-time-picker-Ct_ln8Ot.js +470 -0
- package/components/decorate-B2wePfNm.cjs +18 -0
- package/components/decorate-aGxJUVxg.js +91 -0
- package/components/{condition-attribute-with-id-DrQYZzFS.cjs → dependency-manger-CHy9t__e.cjs} +1 -1
- package/components/dependency-manger-DMrulWcJ.js +40 -0
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +8 -44
- package/components/divider-Dn8XqbB6.cjs +18 -0
- package/components/divider-cU0lVwOp.js +59 -0
- package/components/divider.module-C65RfSUa.js +21 -0
- package/components/divider.module-CL60P_z8.cjs +18 -0
- package/components/element-resolution-Bs1x89vU.js +80 -0
- package/components/element-resolution-C0aiOB0Y.cjs +18 -0
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +11 -12
- package/components/field-group-C7ROsWq3.js +57 -0
- package/components/field-group-OcI5Lgu7.cjs +23 -0
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +11 -12
- package/components/field-label-BCl6R1uO.cjs +25 -0
- package/components/field-label-CtGCEmdp.js +87 -0
- package/components/focus-group-BshI1RpM.js +164 -0
- package/components/focus-group-SF8Kj7iB.cjs +18 -0
- package/components/focus-visible-B0NNezGc.cjs +18 -0
- package/components/focus-visible-CrooVCUu.js +58 -0
- package/components/focusable-BmS8IzhH.js +117 -0
- package/components/focusable-CupEoHmn.cjs +18 -0
- package/components/{base-BjTwmyRF.cjs → focusable-selectors-5n5liBn0.cjs} +1 -5
- package/components/{focusable-selectors-BgFlyFcY.cjs → focusable-selectors-Bg60_Kra.js} +13 -1
- package/components/{state-Deh-vKYE.js → get-label-from-slot-5vVnfSgN.js} +7 -11
- package/components/get-label-from-slot-LO_DZP60.cjs +18 -0
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +8 -71
- package/components/icon-B7hKwn_q.cjs +18 -0
- package/components/icon-CwBAE1eU.js +59 -0
- package/components/index.cjs +1 -1
- package/components/index.js +78 -176
- package/components/infield-button/index.cjs +1 -5
- package/components/infield-button/index.js +8 -47
- package/components/infield-button-B2z0dLzq.js +54 -0
- package/components/infield-button-BVKotWqr.cjs +22 -0
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +8 -34
- package/components/label-ClJE2esm.js +41 -0
- package/components/label-CqolZbJo.cjs +18 -0
- package/components/language-resolution-BYemISJC.cjs +18 -0
- package/components/language-resolution-BpfGTC29.js +43 -0
- package/components/like-anchor-BZJXts_H.cjs +32 -0
- package/components/like-anchor-DeOXX-MX.js +46 -0
- package/components/manage-help-text-CF0xBh0F.js +81 -0
- package/components/manage-help-text-D9VbYRf_.cjs +30 -0
- package/components/menu/index.cjs +1 -66
- package/components/menu/index.js +8 -879
- package/components/menu/menu-item.d.ts +8 -1
- package/components/menu/menu.d.ts +1 -0
- package/components/menu--ukVtSq7.js +749 -0
- package/components/menu-DAA51y45.cjs +108 -0
- package/components/multi-language-field/index.cjs +1 -22
- package/components/multi-language-field/index.js +8 -131
- package/components/multi-language-field/multi-language-field.d.ts +1 -0
- package/components/multi-language-field-BzY75rOY.js +122 -0
- package/components/multi-language-field-DmoMyCBH.cjs +40 -0
- package/components/number-field/index.cjs +1 -40
- package/components/number-field/index.js +8 -453
- package/components/number-field/number-field.d.ts +145 -0
- package/components/number-field-B4RSFeTR.cjs +57 -0
- package/components/number-field-C66dTUMM.js +402 -0
- package/components/observe-slot-presence-BCqd3VSd.js +55 -0
- package/components/observe-slot-presence-Dx8hzNzK.cjs +18 -0
- package/components/observe-slot-text-BhTcGuHY.cjs +18 -0
- package/components/observe-slot-text-Ddf1OC6F.js +71 -0
- package/components/options/index.cjs +1 -84
- package/components/options/index.js +8 -1160
- package/components/options/option.d.ts +16 -0
- package/components/options/options.d.ts +44 -4
- package/components/options-BPNAm4MW.cjs +101 -0
- package/components/options-Dz-ejkxF.js +484 -0
- package/components/overlay/index.cjs +1 -56
- package/components/overlay/index.js +10 -329
- package/components/overlay/overlay.d.ts +12 -1
- package/components/overlay/virtual-trigger.d.ts +3 -2
- package/components/overlay-8tN0KPbR.js +1115 -0
- package/components/overlay-CMd2Dnpv.cjs +73 -0
- package/components/overlay-CwR_36OV.js +227 -0
- package/components/overlay-DdrfkOry.cjs +47 -0
- package/components/pending-state-DFcNf5rd.js +50 -0
- package/components/{pending-state-CaH1si5b.cjs → pending-state-DIeF18qg.cjs} +4 -3
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +11 -15
- package/components/picker/picker.d.ts +1 -0
- package/components/picker-C4RVOxLq.cjs +123 -0
- package/components/picker-agQW7YNo.js +394 -0
- package/components/picker-button/index.cjs +1 -20
- package/components/picker-button/index.js +8 -70
- package/components/picker-button-BLbeT3Yu.js +72 -0
- package/components/picker-button-D34YXyXp.cjs +37 -0
- package/components/platform-B7Sk7Qon.cjs +18 -0
- package/components/{platform-BM-uMWpX.js → platform-D4V_cOJF.js} +29 -38
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +11 -12
- package/components/popover-DyC9xGhX.js +58 -0
- package/components/popover-dgL04x6P.cjs +30 -0
- package/components/progress-bar/index.cjs +18 -0
- package/components/progress-bar/index.d.ts +7 -0
- package/components/progress-bar/index.js +25 -0
- package/components/progress-bar/progress-bar.d.ts +34 -0
- package/components/progress-bar-BR28tISC.cjs +31 -0
- package/components/progress-bar-DHgFRml1.js +119 -0
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +11 -12
- package/components/progress-circle-Cg_ua9Ff.js +78 -0
- package/components/progress-circle-DuzwUiGN.cjs +33 -0
- package/components/progress-steps/index.cjs +18 -0
- package/components/progress-steps/index.d.ts +8 -0
- package/components/progress-steps/index.js +25 -0
- package/components/progress-steps/progress-steps.d.ts +148 -0
- package/components/progress-steps/types.d.ts +32 -0
- package/components/progress-steps-Da8aZWx3.js +262 -0
- package/components/progress-steps-WriXaZpE.cjs +96 -0
- package/components/prompt-box/controllers/attachments-controller.d.ts +35 -0
- package/components/prompt-box/controllers/recording-controller.d.ts +23 -0
- package/components/prompt-box/controllers/rich-input-controller.d.ts +89 -0
- package/components/prompt-box/controllers/trigger-menu-controller.d.ts +107 -0
- package/components/prompt-box/index.cjs +18 -0
- package/components/prompt-box/index.d.ts +9 -0
- package/components/prompt-box/index.js +25 -0
- package/components/prompt-box/keyboard-focus-tracker.d.ts +3 -0
- package/components/prompt-box/prompt-box-templates.d.ts +10 -0
- package/components/prompt-box/prompt-box.d.ts +194 -0
- package/components/prompt-box/range-from-point.d.ts +21 -0
- package/components/prompt-box/selection-utils.d.ts +39 -0
- package/components/prompt-box/slot-state-sync.d.ts +10 -0
- package/components/prompt-box/types.d.ts +112 -0
- package/components/prompt-box-BEloQP-R.js +1506 -0
- package/components/prompt-box-DV8Smf3Q.cjs +282 -0
- package/components/radio/index.cjs +1 -5
- package/components/radio/index.js +8 -174
- package/components/radio-BzEPGUmQ.js +141 -0
- package/components/radio-d-2GUbYE.cjs +22 -0
- package/components/{if-defined-DOaE2coe.js → random-id-B51lUxUB.cjs} +1 -10
- package/components/{when-CDK1Tt5Y.js → random-id-Dd4boCPV.js} +5 -10
- package/components/{focusable-selectors-B4YgbghQ.js → rolldown-runtime-CAFD8bLK.js} +10 -13
- package/components/roving-tabindex-B7x5ePUB.cjs +18 -0
- package/components/roving-tabindex-BP6mQbXf.js +62 -0
- package/components/{directive-oAbCiebi.js → scaled-indicator-BcO2BOsf.js} +24 -26
- package/components/scaled-indicator-p8-3k2cJ.cjs +26 -0
- package/components/search/index.cjs +1 -28
- package/components/search/index.js +8 -114
- package/components/search-CmLfd2dF.js +94 -0
- package/components/search-DRTD4xsE.cjs +45 -0
- package/components/segments-factory-CHo9oQw7.cjs +18 -0
- package/components/segments-factory-D0IveW-q.js +417 -0
- package/components/select/index.cjs +1 -140
- package/components/select/index.js +8 -602
- package/components/select/select.d.ts +26 -17
- package/components/select--vrG59GQ.cjs +158 -0
- package/components/select-DPeI0jP9.js +518 -0
- package/components/{language-resolution-8yZa5r_P.js → sized-mixin-DaBoZkVS.js} +38 -35
- package/components/sized-mixin-StFA4y0J.cjs +18 -0
- package/components/skeleton-loader/index.cjs +18 -0
- package/components/skeleton-loader/index.d.ts +7 -0
- package/components/skeleton-loader/index.js +25 -0
- package/components/skeleton-loader/skeleton-loader.d.ts +22 -0
- package/components/skeleton-loader-B8NgELvX.cjs +18 -0
- package/components/skeleton-loader-C1XG3m_u.js +46 -0
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +8 -1141
- package/components/slider/slider.d.ts +2 -0
- package/components/slider-3QBnq0S8.js +96 -0
- package/components/slider-uXRKcOz5.cjs +18 -0
- package/components/slottable-request-event-DZ2Z_BLk.js +29 -0
- package/components/{base-D76d76ww.js → slottable-request-event-gAcEQan2.cjs} +1 -9
- package/components/status-light/index.cjs +18 -0
- package/components/status-light/index.d.ts +8 -0
- package/components/status-light/index.js +25 -0
- package/components/status-light/status-light.d.ts +26 -0
- package/components/status-light-Bf8jGu4G.js +85 -0
- package/components/status-light-CBaAFRUc.cjs +21 -0
- package/components/strategies-DhxJGIZT.js +137 -0
- package/components/strategies-kuvLVIKO.cjs +18 -0
- package/components/streaming-listener-2NcP7ys7.js +77 -0
- package/components/streaming-listener-BnDW38lt.cjs +18 -0
- package/components/suggestion/index.cjs +18 -0
- package/components/suggestion/index.d.ts +8 -0
- package/components/suggestion/index.js +25 -0
- package/components/suggestion/suggestion.d.ts +45 -0
- package/components/suggestion-CEJiW_7y.cjs +23 -0
- package/components/suggestion-DK5gxxDI.js +76 -0
- package/components/swatch/index.cjs +1 -32
- package/components/swatch/index.js +8 -325
- package/components/swatch-BLuV-hlF.js +271 -0
- package/components/swatch-G70JUe6I.cjs +49 -0
- package/components/switch/index.cjs +1 -5
- package/components/switch/index.js +8 -56
- package/components/switch-BdE-hI69.js +60 -0
- package/components/switch-KzkrF-ob.cjs +22 -0
- package/components/tabs/index.cjs +1 -76
- package/components/tabs/index.js +8 -619
- package/components/tabs/tabs.d.ts +3 -9
- package/components/tabs-BfTgzdid.cjs +76 -0
- package/components/tabs-BthdwrmW.js +434 -0
- package/components/tags/index.cjs +1 -15
- package/components/tags/index.d.ts +1 -0
- package/components/tags/index.js +8 -156
- package/components/tags/tag.d.ts +28 -0
- package/components/tags/tags.d.ts +3 -1
- package/components/tags-B89eYzsB.js +203 -0
- package/components/tags-OBPAvjdV.cjs +47 -0
- package/components/text-field/index.cjs +1 -4
- package/components/text-field/index.js +9 -45
- package/components/text-field/text-field.d.ts +27 -0
- package/components/text-field-A4Obzs4l.cjs +21 -0
- package/components/text-field-BoGAvXvh.js +44 -0
- package/components/text-field-Cs8HYRYL.js +256 -0
- package/components/text-field-FJr8ZUhI.cjs +81 -0
- package/components/text-field.module-Btsve-VN.js +21 -0
- package/components/text-field.module-D5oDP7MB.cjs +18 -0
- package/components/toast/index.cjs +1 -34
- package/components/toast/index.js +8 -136
- package/components/toast-CJSQUzoW.cjs +51 -0
- package/components/toast-DKwphMrp.js +133 -0
- package/components/tooltip/index.cjs +1 -28
- package/components/tooltip/index.js +8 -205
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/tooltip-C3O4AQ1l.js +192 -0
- package/components/tooltip-DY1trLtg.cjs +45 -0
- package/components/top-nav/index.cjs +18 -0
- package/components/top-nav/index.d.ts +10 -0
- package/components/top-nav/index.js +25 -0
- package/components/top-nav/top-nav-item.d.ts +26 -0
- package/components/top-nav/top-nav.d.ts +45 -0
- package/components/top-nav-DVQ5ASMa.js +203 -0
- package/components/top-nav-DlTojz8S.cjs +45 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +8 -25
- package/components/voice-recorder-477xPHRU.js +134 -0
- package/components/voice-recorder-BUtmSvPO.cjs +18 -0
- package/custom-elements.json +1 -1
- package/index.d.ts +11 -1
- package/package.json +134 -5
- package/utils/button-interaction-controllers/interaction-controller.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/scaled-indicator.d.ts +8 -0
- package/utils/voice-recorder.d.ts +121 -0
- package/components/NumberFormatter-DewVDY5w.cjs +0 -18
- package/components/NumberFormatter-DgOUVrge.js +0 -136
- package/components/NumberParser-Dik4a0h-.cjs +0 -18
- package/components/NumberParser-ci9J5EKv.js +0 -173
- package/components/action-group-DBImibFn.js +0 -258
- package/components/action-group-DJGMcRHb.cjs +0 -20
- package/components/async-directive-BX1T1e1_.cjs +0 -22
- package/components/async-directive-BfcqVjDp.js +0 -82
- package/components/base-CBCg3yyw.cjs +0 -40
- package/components/base-WsynuqaS.js +0 -677
- package/components/button-base-DbkDzb71.js +0 -144
- package/components/button-base-XgPLmwP-.cjs +0 -25
- package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
- package/components/class-map-Di1D_rCm.cjs +0 -22
- package/components/class-map-NbVXqBU0.js +0 -51
- package/components/clear-button-DQcRdcUa.js +0 -53
- package/components/clear-button-OFUFFe7G.cjs +0 -18
- package/components/close-button-Cbnb7XXj.cjs +0 -18
- package/components/close-button-CqHYZhum.js +0 -51
- package/components/color-controller-DTp1juRz.js +0 -3198
- package/components/color-controller-_ZwyhvaU.cjs +0 -18
- package/components/color-loupe-CaA_Lfkk.cjs +0 -56
- package/components/color-loupe-CmMsXbjT.js +0 -81
- package/components/dependency-manger-C5HCkMMB.cjs +0 -18
- package/components/dependency-manger-CEXvGQUV.js +0 -54
- package/components/directive-C7oCP5Bh.cjs +0 -22
- package/components/directive-helpers-Cm6gitnu.js +0 -62
- package/components/directive-helpers-DyIRTWwA.cjs +0 -22
- package/components/divider.module-DDvBo9zo.cjs +0 -18
- package/components/divider.module-DoQWQEIJ.js +0 -21
- package/components/element-resolution-BvRLGqIU.cjs +0 -18
- package/components/element-resolution-FCUT-wql.js +0 -91
- package/components/field-group-DXfBWrkO.js +0 -66
- package/components/field-group-DkGst3r5.cjs +0 -23
- package/components/field-label-CZ2zzChK.js +0 -106
- package/components/field-label-mO1AkUgR.cjs +0 -25
- package/components/flow-D-0MTYCm.js +0 -527
- package/components/flow-DM3dNAKs.cjs +0 -30
- package/components/focus-group-DHeTq18L.js +0 -218
- package/components/focus-group-DnxZUBhQ.cjs +0 -18
- package/components/focus-visible-B0P9aY_G.cjs +0 -18
- package/components/focus-visible-DBlJGoEW.js +0 -74
- package/components/focusable-BxtpnzWp.js +0 -153
- package/components/focusable-EbipgXRh.cjs +0 -18
- package/components/index-BwxgAdzi.cjs +0 -57
- package/components/index-Cl54m8Yh.js +0 -1490
- package/components/index-HjQa8tew.js +0 -1174
- package/components/index-Wq3qZJGh.cjs +0 -113
- package/components/language-resolution-DJzmyzZq.cjs +0 -18
- package/components/like-anchor-Bvn_vLQ8.js +0 -69
- package/components/like-anchor-sod1C1fR.cjs +0 -32
- package/components/luzmo-icons-4nDFv1Lq.js +0 -229
- package/components/luzmo-icons-D4IvHgVd.cjs +0 -29
- package/components/manage-help-text-DhgARkZX.cjs +0 -30
- package/components/manage-help-text-syYnjKGL.js +0 -92
- package/components/mutation-controller-DH7YOCyj.js +0 -52
- package/components/mutation-controller-DkOMCW-c.cjs +0 -22
- package/components/observe-slot-presence-CmVi0zTc.js +0 -68
- package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
- package/components/observe-slot-text-BPfIQQtz.js +0 -87
- package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
- package/components/overlay-Cig9r6uU.js +0 -2747
- package/components/overlay-KSKMzzkh.cjs +0 -47
- package/components/pending-state-DTX7ggyF.js +0 -61
- package/components/picker-BfBP7XJN.js +0 -461
- package/components/picker-xIphqE6d.cjs +0 -123
- package/components/platform-BiXhwqk3.cjs +0 -18
- package/components/popover-DjX0aAnY.js +0 -67
- package/components/popover-KFfO0IYL.cjs +0 -30
- package/components/progress-circle-BvRJNuNo.cjs +0 -33
- package/components/progress-circle-DXH9z8-6.js +0 -97
- package/components/query-BL-TJj7K.cjs +0 -22
- package/components/query-D_KR_GUc.js +0 -51
- package/components/query-assigned-elements-DjfhL1cl.js +0 -36
- package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
- package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
- package/components/roving-tabindex-By_fCy_e.cjs +0 -18
- package/components/roving-tabindex-DOg4z6ZU.js +0 -66
- package/components/sized-mixin-CPxE5C96.cjs +0 -18
- package/components/sized-mixin-D4ACoVUr.js +0 -63
- package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
- package/components/slottable-request-event-DggLA4Rx.js +0 -31
- package/components/state-D8JEtYqe.cjs +0 -22
- package/components/strategies-9indNIEb.js +0 -195
- package/components/strategies-BACP6MhR.cjs +0 -18
- package/components/streaming-listener-B00MvALi.cjs +0 -18
- package/components/streaming-listener-CP-JE6Fa.js +0 -91
- package/components/style-map-CeilmSgs.cjs +0 -22
- package/components/style-map-IgqIKvlE.js +0 -53
- package/components/text-field-BTkr42k4.cjs +0 -85
- package/components/text-field-ol9Ed5lQ.js +0 -314
- package/components/text-field.module-ColtFhf_.js +0 -21
- package/components/text-field.module-p_VF2tC_.cjs +0 -18
- package/components/unit-input/index.cjs +0 -43
- package/components/unit-input/index.d.ts +0 -7
- package/components/unit-input/index.js +0 -183
- package/components/unit-input/unit-input.d.ts +0 -33
- /package/components/date-time-picker/{helpers.d.ts → shared/helpers.d.ts} +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/day-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/month-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date/year-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/date-time-segments.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/editable-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/literal-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/clear-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/decrement-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/increment-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/input-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/modifiers/segments-modifier.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/segments-factory.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/segments-formatter.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/day-period-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/hour-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/millisecond-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/minute-segment.d.ts +0 -0
- /package/components/date-time-picker/{segments → shared/segments}/time/second-segment.d.ts +0 -0
|
@@ -0,0 +1,2295 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
import { n as e, t } from "./decorate-aGxJUVxg.js";
|
|
19
|
+
import { n } from "./sized-mixin-DaBoZkVS.js";
|
|
20
|
+
import { t as r } from "./language-resolution-BpfGTC29.js";
|
|
21
|
+
import { html as i, nothing as a, unsafeCSS as o } from "lit";
|
|
22
|
+
import { property as s, state as c } from "lit/decorators.js";
|
|
23
|
+
import { classMap as l } from "lit/directives/class-map.js";
|
|
24
|
+
import { unsafeHTML as u } from "lit/directives/unsafe-html.js";
|
|
25
|
+
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
26
|
+
var { entries: d, setPrototypeOf: ee, isFrozen: te, getPrototypeOf: f, getOwnPropertyDescriptor: ne } = Object, { freeze: p, seal: m, create: re } = Object, { apply: ie, construct: ae } = typeof Reflect < "u" && Reflect;
|
|
27
|
+
p ||= function(e) {
|
|
28
|
+
return e;
|
|
29
|
+
}, m ||= function(e) {
|
|
30
|
+
return e;
|
|
31
|
+
}, ie ||= function(e, t) {
|
|
32
|
+
var n = [...arguments].slice(2);
|
|
33
|
+
return e.apply(t, n);
|
|
34
|
+
}, ae ||= function(e) {
|
|
35
|
+
return new e(...[...arguments].slice(1));
|
|
36
|
+
};
|
|
37
|
+
var oe = x(Array.prototype.forEach), se = x(Array.prototype.lastIndexOf), ce = x(Array.prototype.pop), le = x(Array.prototype.push), ue = x(Array.prototype.splice), h = Array.isArray, de = x(String.prototype.toLowerCase), fe = x(String.prototype.toString), pe = x(String.prototype.match), me = x(String.prototype.replace), he = x(String.prototype.indexOf), ge = x(String.prototype.trim), _e = x(Number.prototype.toString), ve = x(Boolean.prototype.toString), g = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), _ = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), v = x(Object.prototype.hasOwnProperty), y = x(Object.prototype.toString), b = x(RegExp.prototype.test), ye = be(TypeError);
|
|
38
|
+
function x(e) {
|
|
39
|
+
return function(t) {
|
|
40
|
+
t instanceof RegExp && (t.lastIndex = 0);
|
|
41
|
+
var n = [...arguments].slice(1);
|
|
42
|
+
return ie(e, t, n);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function be(e) {
|
|
46
|
+
return function() {
|
|
47
|
+
return ae(e, [...arguments]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function S(e, t) {
|
|
51
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : de;
|
|
52
|
+
if (ee && ee(e, null), !h(t)) return e;
|
|
53
|
+
let r = t.length;
|
|
54
|
+
for (; r--;) {
|
|
55
|
+
let i = t[r];
|
|
56
|
+
if (typeof i == "string") {
|
|
57
|
+
let e = n(i);
|
|
58
|
+
e !== i && (te(t) || (t[r] = e), i = e);
|
|
59
|
+
}
|
|
60
|
+
e[i] = !0;
|
|
61
|
+
}
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
64
|
+
function xe(e) {
|
|
65
|
+
for (let t = 0; t < e.length; t++) v(e, t) || (e[t] = null);
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
function C(e) {
|
|
69
|
+
let t = re(null);
|
|
70
|
+
for (let [n, r] of d(e)) v(e, n) && (h(r) ? t[n] = xe(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = C(r) : t[n] = r);
|
|
71
|
+
return t;
|
|
72
|
+
}
|
|
73
|
+
function Se(e) {
|
|
74
|
+
switch (typeof e) {
|
|
75
|
+
case "string": return e;
|
|
76
|
+
case "number": return _e(e);
|
|
77
|
+
case "boolean": return ve(e);
|
|
78
|
+
case "bigint": return g ? g(e) : "0";
|
|
79
|
+
case "symbol": return _ ? _(e) : "Symbol()";
|
|
80
|
+
case "undefined": return y(e);
|
|
81
|
+
case "function":
|
|
82
|
+
case "object": {
|
|
83
|
+
if (e === null) return y(e);
|
|
84
|
+
let t = e, n = Ce(t, "toString");
|
|
85
|
+
if (typeof n == "function") {
|
|
86
|
+
let e = n(t);
|
|
87
|
+
return typeof e == "string" ? e : y(e);
|
|
88
|
+
}
|
|
89
|
+
return y(e);
|
|
90
|
+
}
|
|
91
|
+
default: return y(e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function Ce(e, t) {
|
|
95
|
+
for (; e !== null;) {
|
|
96
|
+
let n = ne(e, t);
|
|
97
|
+
if (n) {
|
|
98
|
+
if (n.get) return x(n.get);
|
|
99
|
+
if (typeof n.value == "function") return x(n.value);
|
|
100
|
+
}
|
|
101
|
+
e = f(e);
|
|
102
|
+
}
|
|
103
|
+
function n() {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
return n;
|
|
107
|
+
}
|
|
108
|
+
function we(e) {
|
|
109
|
+
try {
|
|
110
|
+
return b(e, ""), !0;
|
|
111
|
+
} catch {
|
|
112
|
+
return !1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
var Te = p(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ee = p(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), De = p([
|
|
116
|
+
"feBlend",
|
|
117
|
+
"feColorMatrix",
|
|
118
|
+
"feComponentTransfer",
|
|
119
|
+
"feComposite",
|
|
120
|
+
"feConvolveMatrix",
|
|
121
|
+
"feDiffuseLighting",
|
|
122
|
+
"feDisplacementMap",
|
|
123
|
+
"feDistantLight",
|
|
124
|
+
"feDropShadow",
|
|
125
|
+
"feFlood",
|
|
126
|
+
"feFuncA",
|
|
127
|
+
"feFuncB",
|
|
128
|
+
"feFuncG",
|
|
129
|
+
"feFuncR",
|
|
130
|
+
"feGaussianBlur",
|
|
131
|
+
"feImage",
|
|
132
|
+
"feMerge",
|
|
133
|
+
"feMergeNode",
|
|
134
|
+
"feMorphology",
|
|
135
|
+
"feOffset",
|
|
136
|
+
"fePointLight",
|
|
137
|
+
"feSpecularLighting",
|
|
138
|
+
"feSpotLight",
|
|
139
|
+
"feTile",
|
|
140
|
+
"feTurbulence"
|
|
141
|
+
]), Oe = p([
|
|
142
|
+
"animate",
|
|
143
|
+
"color-profile",
|
|
144
|
+
"cursor",
|
|
145
|
+
"discard",
|
|
146
|
+
"font-face",
|
|
147
|
+
"font-face-format",
|
|
148
|
+
"font-face-name",
|
|
149
|
+
"font-face-src",
|
|
150
|
+
"font-face-uri",
|
|
151
|
+
"foreignobject",
|
|
152
|
+
"hatch",
|
|
153
|
+
"hatchpath",
|
|
154
|
+
"mesh",
|
|
155
|
+
"meshgradient",
|
|
156
|
+
"meshpatch",
|
|
157
|
+
"meshrow",
|
|
158
|
+
"missing-glyph",
|
|
159
|
+
"script",
|
|
160
|
+
"set",
|
|
161
|
+
"solidcolor",
|
|
162
|
+
"unknown",
|
|
163
|
+
"use"
|
|
164
|
+
]), ke = p(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ae = p([
|
|
165
|
+
"maction",
|
|
166
|
+
"maligngroup",
|
|
167
|
+
"malignmark",
|
|
168
|
+
"mlongdiv",
|
|
169
|
+
"mscarries",
|
|
170
|
+
"mscarry",
|
|
171
|
+
"msgroup",
|
|
172
|
+
"mstack",
|
|
173
|
+
"msline",
|
|
174
|
+
"msrow",
|
|
175
|
+
"semantics",
|
|
176
|
+
"annotation",
|
|
177
|
+
"annotation-xml",
|
|
178
|
+
"mprescripts",
|
|
179
|
+
"none"
|
|
180
|
+
]), je = p(["#text"]), Me = p(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Ne = p(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Pe = p(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Fe = p([
|
|
181
|
+
"xlink:href",
|
|
182
|
+
"xml:id",
|
|
183
|
+
"xlink:title",
|
|
184
|
+
"xml:space",
|
|
185
|
+
"xmlns:xlink"
|
|
186
|
+
]), Ie = m(/\{\{[\w\W]*|[\w\W]*\}\}/gm), w = m(/<%[\w\W]*|[\w\W]*%>/gm), Le = m(/\$\{[\w\W]*/gm), Re = m(/^data-[\-\w.\u00B7-\uFFFF]+$/), ze = m(/^aria-[\-\w]+$/), Be = m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ve = m(/^(?:\w+script|data):/i), He = m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ue = m(/^html$/i), We = m(/^[a-z][.\w]*(-[.\w]+)+$/i), Ge = /* @__PURE__ */ Object.freeze({
|
|
187
|
+
__proto__: null,
|
|
188
|
+
ARIA_ATTR: ze,
|
|
189
|
+
ATTR_WHITESPACE: He,
|
|
190
|
+
CUSTOM_ELEMENT: We,
|
|
191
|
+
DATA_ATTR: Re,
|
|
192
|
+
DOCTYPE_NAME: Ue,
|
|
193
|
+
ERB_EXPR: w,
|
|
194
|
+
IS_ALLOWED_URI: Be,
|
|
195
|
+
IS_SCRIPT_OR_DATA: Ve,
|
|
196
|
+
MUSTACHE_EXPR: Ie,
|
|
197
|
+
TMPLIT_EXPR: Le
|
|
198
|
+
}), Ke = {
|
|
199
|
+
element: 1,
|
|
200
|
+
text: 3,
|
|
201
|
+
progressingInstruction: 7,
|
|
202
|
+
comment: 8,
|
|
203
|
+
document: 9
|
|
204
|
+
}, qe = function() {
|
|
205
|
+
return typeof window > "u" ? null : window;
|
|
206
|
+
}, Je = function(e, t) {
|
|
207
|
+
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
208
|
+
let n = null, r = "data-tt-policy-suffix";
|
|
209
|
+
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
210
|
+
let i = "dompurify" + (n ? "#" + n : "");
|
|
211
|
+
try {
|
|
212
|
+
return e.createPolicy(i, {
|
|
213
|
+
createHTML(e) {
|
|
214
|
+
return e;
|
|
215
|
+
},
|
|
216
|
+
createScriptURL(e) {
|
|
217
|
+
return e;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
} catch {
|
|
221
|
+
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
222
|
+
}
|
|
223
|
+
}, Ye = function() {
|
|
224
|
+
return {
|
|
225
|
+
afterSanitizeAttributes: [],
|
|
226
|
+
afterSanitizeElements: [],
|
|
227
|
+
afterSanitizeShadowDOM: [],
|
|
228
|
+
beforeSanitizeAttributes: [],
|
|
229
|
+
beforeSanitizeElements: [],
|
|
230
|
+
beforeSanitizeShadowDOM: [],
|
|
231
|
+
uponSanitizeAttribute: [],
|
|
232
|
+
uponSanitizeElement: [],
|
|
233
|
+
uponSanitizeShadowNode: []
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
function Xe() {
|
|
237
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qe(), t = (e) => Xe(e);
|
|
238
|
+
if (t.version = "3.4.1", t.removed = [], !e || !e.document || e.document.nodeType !== Ke.document || !e.Element) return t.isSupported = !1, t;
|
|
239
|
+
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: ee, DOMParser: te, trustedTypes: f } = e, ne = c.prototype, m = Ce(ne, "cloneNode"), ie = Ce(ne, "remove"), ae = Ce(ne, "nextSibling"), _e = Ce(ne, "childNodes"), ve = Ce(ne, "parentNode");
|
|
240
|
+
if (typeof o == "function") {
|
|
241
|
+
let e = n.createElement("template");
|
|
242
|
+
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
243
|
+
}
|
|
244
|
+
let g, _ = "", { implementation: y, createNodeIterator: x, createDocumentFragment: be, getElementsByTagName: xe } = n, { importNode: Ie } = r, w = Ye();
|
|
245
|
+
t.isSupported = typeof d == "function" && typeof ve == "function" && y && y.createHTMLDocument !== void 0;
|
|
246
|
+
let { MUSTACHE_EXPR: Le, ERB_EXPR: Re, TMPLIT_EXPR: ze, DATA_ATTR: Ve, ARIA_ATTR: He, IS_SCRIPT_OR_DATA: We, ATTR_WHITESPACE: Ze, CUSTOM_ELEMENT: Qe } = Ge, { IS_ALLOWED_URI: T } = Ge, E = null, D = S({}, [
|
|
247
|
+
...Te,
|
|
248
|
+
...Ee,
|
|
249
|
+
...De,
|
|
250
|
+
...ke,
|
|
251
|
+
...je
|
|
252
|
+
]), O = null, $e = S({}, [
|
|
253
|
+
...Me,
|
|
254
|
+
...Ne,
|
|
255
|
+
...Pe,
|
|
256
|
+
...Fe
|
|
257
|
+
]), k = Object.seal(re(null, {
|
|
258
|
+
tagNameCheck: {
|
|
259
|
+
writable: !0,
|
|
260
|
+
configurable: !1,
|
|
261
|
+
enumerable: !0,
|
|
262
|
+
value: null
|
|
263
|
+
},
|
|
264
|
+
attributeNameCheck: {
|
|
265
|
+
writable: !0,
|
|
266
|
+
configurable: !1,
|
|
267
|
+
enumerable: !0,
|
|
268
|
+
value: null
|
|
269
|
+
},
|
|
270
|
+
allowCustomizedBuiltInElements: {
|
|
271
|
+
writable: !0,
|
|
272
|
+
configurable: !1,
|
|
273
|
+
enumerable: !0,
|
|
274
|
+
value: !1
|
|
275
|
+
}
|
|
276
|
+
})), et = null, tt = null, A = Object.seal(re(null, {
|
|
277
|
+
tagCheck: {
|
|
278
|
+
writable: !0,
|
|
279
|
+
configurable: !1,
|
|
280
|
+
enumerable: !0,
|
|
281
|
+
value: null
|
|
282
|
+
},
|
|
283
|
+
attributeCheck: {
|
|
284
|
+
writable: !0,
|
|
285
|
+
configurable: !1,
|
|
286
|
+
enumerable: !0,
|
|
287
|
+
value: null
|
|
288
|
+
}
|
|
289
|
+
})), j = !0, nt = !0, rt = !1, it = !0, M = !1, at = !0, N = !1, ot = !1, st = !1, P = !1, ct = !1, F = !1, lt = !0, ut = !1, dt = "user-content-", ft = !0, I = !1, L = {}, R = null, pt = S({}, [
|
|
290
|
+
"annotation-xml",
|
|
291
|
+
"audio",
|
|
292
|
+
"colgroup",
|
|
293
|
+
"desc",
|
|
294
|
+
"foreignobject",
|
|
295
|
+
"head",
|
|
296
|
+
"iframe",
|
|
297
|
+
"math",
|
|
298
|
+
"mi",
|
|
299
|
+
"mn",
|
|
300
|
+
"mo",
|
|
301
|
+
"ms",
|
|
302
|
+
"mtext",
|
|
303
|
+
"noembed",
|
|
304
|
+
"noframes",
|
|
305
|
+
"noscript",
|
|
306
|
+
"plaintext",
|
|
307
|
+
"script",
|
|
308
|
+
"style",
|
|
309
|
+
"svg",
|
|
310
|
+
"template",
|
|
311
|
+
"thead",
|
|
312
|
+
"title",
|
|
313
|
+
"video",
|
|
314
|
+
"xmp"
|
|
315
|
+
]), mt = null, ht = S({}, [
|
|
316
|
+
"audio",
|
|
317
|
+
"video",
|
|
318
|
+
"img",
|
|
319
|
+
"source",
|
|
320
|
+
"image",
|
|
321
|
+
"track"
|
|
322
|
+
]), gt = null, z = S({}, [
|
|
323
|
+
"alt",
|
|
324
|
+
"class",
|
|
325
|
+
"for",
|
|
326
|
+
"id",
|
|
327
|
+
"label",
|
|
328
|
+
"name",
|
|
329
|
+
"pattern",
|
|
330
|
+
"placeholder",
|
|
331
|
+
"role",
|
|
332
|
+
"summary",
|
|
333
|
+
"title",
|
|
334
|
+
"value",
|
|
335
|
+
"style",
|
|
336
|
+
"xmlns"
|
|
337
|
+
]), B = "http://www.w3.org/1998/Math/MathML", V = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml", U = H, _t = !1, vt = null, yt = S({}, [
|
|
338
|
+
B,
|
|
339
|
+
V,
|
|
340
|
+
H
|
|
341
|
+
], fe), bt = S({}, [
|
|
342
|
+
"mi",
|
|
343
|
+
"mo",
|
|
344
|
+
"mn",
|
|
345
|
+
"ms",
|
|
346
|
+
"mtext"
|
|
347
|
+
]), xt = S({}, ["annotation-xml"]), St = S({}, [
|
|
348
|
+
"title",
|
|
349
|
+
"style",
|
|
350
|
+
"font",
|
|
351
|
+
"a",
|
|
352
|
+
"script"
|
|
353
|
+
]), Ct = null, wt = ["application/xhtml+xml", "text/html"], W = null, Tt = null, Et = n.createElement("form"), Dt = function(e) {
|
|
354
|
+
return e instanceof RegExp || e instanceof Function;
|
|
355
|
+
}, Ot = function() {
|
|
356
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
357
|
+
if (Tt && Tt === e) return;
|
|
358
|
+
(!e || typeof e != "object") && (e = {}), e = C(e), Ct = wt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, W = Ct === "application/xhtml+xml" ? fe : de, E = v(e, "ALLOWED_TAGS") && h(e.ALLOWED_TAGS) ? S({}, e.ALLOWED_TAGS, W) : D, O = v(e, "ALLOWED_ATTR") && h(e.ALLOWED_ATTR) ? S({}, e.ALLOWED_ATTR, W) : $e, vt = v(e, "ALLOWED_NAMESPACES") && h(e.ALLOWED_NAMESPACES) ? S({}, e.ALLOWED_NAMESPACES, fe) : yt, gt = v(e, "ADD_URI_SAFE_ATTR") && h(e.ADD_URI_SAFE_ATTR) ? S(C(z), e.ADD_URI_SAFE_ATTR, W) : z, mt = v(e, "ADD_DATA_URI_TAGS") && h(e.ADD_DATA_URI_TAGS) ? S(C(ht), e.ADD_DATA_URI_TAGS, W) : ht, R = v(e, "FORBID_CONTENTS") && h(e.FORBID_CONTENTS) ? S({}, e.FORBID_CONTENTS, W) : pt, et = v(e, "FORBID_TAGS") && h(e.FORBID_TAGS) ? S({}, e.FORBID_TAGS, W) : C({}), tt = v(e, "FORBID_ATTR") && h(e.FORBID_ATTR) ? S({}, e.FORBID_ATTR, W) : C({}), L = v(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? C(e.USE_PROFILES) : e.USE_PROFILES : !1, j = e.ALLOW_ARIA_ATTR !== !1, nt = e.ALLOW_DATA_ATTR !== !1, rt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, it = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, M = e.SAFE_FOR_TEMPLATES || !1, at = e.SAFE_FOR_XML !== !1, N = e.WHOLE_DOCUMENT || !1, P = e.RETURN_DOM || !1, ct = e.RETURN_DOM_FRAGMENT || !1, F = e.RETURN_TRUSTED_TYPE || !1, st = e.FORCE_BODY || !1, lt = e.SANITIZE_DOM !== !1, ut = e.SANITIZE_NAMED_PROPS || !1, ft = e.KEEP_CONTENT !== !1, I = e.IN_PLACE || !1, T = we(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Be, U = typeof e.NAMESPACE == "string" ? e.NAMESPACE : H, bt = v(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? C(e.MATHML_TEXT_INTEGRATION_POINTS) : S({}, [
|
|
359
|
+
"mi",
|
|
360
|
+
"mo",
|
|
361
|
+
"mn",
|
|
362
|
+
"ms",
|
|
363
|
+
"mtext"
|
|
364
|
+
]), xt = v(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? C(e.HTML_INTEGRATION_POINTS) : S({}, ["annotation-xml"]);
|
|
365
|
+
let t = v(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : re(null);
|
|
366
|
+
if (k = re(null), v(t, "tagNameCheck") && Dt(t.tagNameCheck) && (k.tagNameCheck = t.tagNameCheck), v(t, "attributeNameCheck") && Dt(t.attributeNameCheck) && (k.attributeNameCheck = t.attributeNameCheck), v(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (k.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), M && (nt = !1), ct && (P = !0), L && (E = S({}, je), O = re(null), L.html === !0 && (S(E, Te), S(O, Me)), L.svg === !0 && (S(E, Ee), S(O, Ne), S(O, Fe)), L.svgFilters === !0 && (S(E, De), S(O, Ne), S(O, Fe)), L.mathMl === !0 && (S(E, ke), S(O, Pe), S(O, Fe))), A.tagCheck = null, A.attributeCheck = null, v(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? A.tagCheck = e.ADD_TAGS : h(e.ADD_TAGS) && (E === D && (E = C(E)), S(E, e.ADD_TAGS, W))), v(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? A.attributeCheck = e.ADD_ATTR : h(e.ADD_ATTR) && (O === $e && (O = C(O)), S(O, e.ADD_ATTR, W))), v(e, "ADD_URI_SAFE_ATTR") && h(e.ADD_URI_SAFE_ATTR) && S(gt, e.ADD_URI_SAFE_ATTR, W), v(e, "FORBID_CONTENTS") && h(e.FORBID_CONTENTS) && (R === pt && (R = C(R)), S(R, e.FORBID_CONTENTS, W)), v(e, "ADD_FORBID_CONTENTS") && h(e.ADD_FORBID_CONTENTS) && (R === pt && (R = C(R)), S(R, e.ADD_FORBID_CONTENTS, W)), ft && (E["#text"] = !0), N && S(E, [
|
|
367
|
+
"html",
|
|
368
|
+
"head",
|
|
369
|
+
"body"
|
|
370
|
+
]), E.table && (S(E, ["tbody"]), delete et.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
371
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ye("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
372
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ye("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
373
|
+
g = e.TRUSTED_TYPES_POLICY, _ = g.createHTML("");
|
|
374
|
+
} else g === void 0 && (g = Je(f, i)), g !== null && typeof _ == "string" && (_ = g.createHTML(""));
|
|
375
|
+
p && p(e), Tt = e;
|
|
376
|
+
}, kt = S({}, [
|
|
377
|
+
...Ee,
|
|
378
|
+
...De,
|
|
379
|
+
...Oe
|
|
380
|
+
]), At = S({}, [...ke, ...Ae]), jt = function(e) {
|
|
381
|
+
let t = ve(e);
|
|
382
|
+
(!t || !t.tagName) && (t = {
|
|
383
|
+
namespaceURI: U,
|
|
384
|
+
tagName: "template"
|
|
385
|
+
});
|
|
386
|
+
let n = de(e.tagName), r = de(t.tagName);
|
|
387
|
+
return vt[e.namespaceURI] ? e.namespaceURI === V ? t.namespaceURI === H ? n === "svg" : t.namespaceURI === B ? n === "svg" && (r === "annotation-xml" || bt[r]) : !!kt[n] : e.namespaceURI === B ? t.namespaceURI === H ? n === "math" : t.namespaceURI === V ? n === "math" && xt[r] : !!At[n] : e.namespaceURI === H ? t.namespaceURI === V && !xt[r] || t.namespaceURI === B && !bt[r] ? !1 : !At[n] && (St[n] || !kt[n]) : !!(Ct === "application/xhtml+xml" && vt[e.namespaceURI]) : !1;
|
|
388
|
+
}, G = function(e) {
|
|
389
|
+
le(t.removed, { element: e });
|
|
390
|
+
try {
|
|
391
|
+
ve(e).removeChild(e);
|
|
392
|
+
} catch {
|
|
393
|
+
ie(e);
|
|
394
|
+
}
|
|
395
|
+
}, K = function(e, n) {
|
|
396
|
+
try {
|
|
397
|
+
le(t.removed, {
|
|
398
|
+
attribute: n.getAttributeNode(e),
|
|
399
|
+
from: n
|
|
400
|
+
});
|
|
401
|
+
} catch {
|
|
402
|
+
le(t.removed, {
|
|
403
|
+
attribute: null,
|
|
404
|
+
from: n
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
if (n.removeAttribute(e), e === "is") if (P || ct) try {
|
|
408
|
+
G(n);
|
|
409
|
+
} catch {}
|
|
410
|
+
else try {
|
|
411
|
+
n.setAttribute(e, "");
|
|
412
|
+
} catch {}
|
|
413
|
+
}, Mt = function(e) {
|
|
414
|
+
let t = null, r = null;
|
|
415
|
+
if (st) e = "<remove></remove>" + e;
|
|
416
|
+
else {
|
|
417
|
+
let t = pe(e, /^[\r\n\t ]+/);
|
|
418
|
+
r = t && t[0];
|
|
419
|
+
}
|
|
420
|
+
Ct === "application/xhtml+xml" && U === H && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
421
|
+
let i = g ? g.createHTML(e) : e;
|
|
422
|
+
if (U === H) try {
|
|
423
|
+
t = new te().parseFromString(i, Ct);
|
|
424
|
+
} catch {}
|
|
425
|
+
if (!t || !t.documentElement) {
|
|
426
|
+
t = y.createDocument(U, "template", null);
|
|
427
|
+
try {
|
|
428
|
+
t.documentElement.innerHTML = _t ? _ : i;
|
|
429
|
+
} catch {}
|
|
430
|
+
}
|
|
431
|
+
let a = t.body || t.documentElement;
|
|
432
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), U === H ? xe.call(t, N ? "html" : "body")[0] : N ? t.documentElement : a;
|
|
433
|
+
}, Nt = function(e) {
|
|
434
|
+
return x.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
435
|
+
}, Pt = function(e) {
|
|
436
|
+
return e instanceof ee && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
437
|
+
}, Ft = function(e) {
|
|
438
|
+
return typeof s == "function" && e instanceof s;
|
|
439
|
+
};
|
|
440
|
+
function q(e, n, r) {
|
|
441
|
+
oe(e, (e) => {
|
|
442
|
+
e.call(t, n, r, Tt);
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
let It = function(e) {
|
|
446
|
+
let n = null;
|
|
447
|
+
if (q(w.beforeSanitizeElements, e, null), Pt(e)) return G(e), !0;
|
|
448
|
+
let r = W(e.nodeName);
|
|
449
|
+
if (q(w.uponSanitizeElement, e, {
|
|
450
|
+
tagName: r,
|
|
451
|
+
allowedTags: E
|
|
452
|
+
}), at && e.hasChildNodes() && !Ft(e.firstElementChild) && b(/<[/\w!]/g, e.innerHTML) && b(/<[/\w!]/g, e.textContent) || at && e.namespaceURI === H && r === "style" && Ft(e.firstElementChild) || e.nodeType === Ke.progressingInstruction || at && e.nodeType === Ke.comment && b(/<[/\w]/g, e.data)) return G(e), !0;
|
|
453
|
+
if (et[r] || !(A.tagCheck instanceof Function && A.tagCheck(r)) && !E[r]) {
|
|
454
|
+
if (!et[r] && zt(r) && (k.tagNameCheck instanceof RegExp && b(k.tagNameCheck, r) || k.tagNameCheck instanceof Function && k.tagNameCheck(r))) return !1;
|
|
455
|
+
if (ft && !R[r]) {
|
|
456
|
+
let t = ve(e) || e.parentNode, n = _e(e) || e.childNodes;
|
|
457
|
+
if (n && t) {
|
|
458
|
+
let r = n.length;
|
|
459
|
+
for (let i = r - 1; i >= 0; --i) {
|
|
460
|
+
let r = m(n[i], !0);
|
|
461
|
+
t.insertBefore(r, ae(e));
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return G(e), !0;
|
|
466
|
+
}
|
|
467
|
+
return e instanceof c && !jt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && b(/<\/no(script|embed|frames)/i, e.innerHTML) ? (G(e), !0) : (M && e.nodeType === Ke.text && (n = e.textContent, oe([
|
|
468
|
+
Le,
|
|
469
|
+
Re,
|
|
470
|
+
ze
|
|
471
|
+
], (e) => {
|
|
472
|
+
n = me(n, e, " ");
|
|
473
|
+
}), e.textContent !== n && (le(t.removed, { element: e.cloneNode() }), e.textContent = n)), q(w.afterSanitizeElements, e, null), !1);
|
|
474
|
+
}, Lt = function(e, t, r) {
|
|
475
|
+
if (tt[t] || lt && (t === "id" || t === "name") && (r in n || r in Et)) return !1;
|
|
476
|
+
if (!(nt && !tt[t] && b(Ve, t)) && !(j && b(He, t)) && !(A.attributeCheck instanceof Function && A.attributeCheck(t, e))) {
|
|
477
|
+
if (!O[t] || tt[t]) {
|
|
478
|
+
if (!(zt(e) && (k.tagNameCheck instanceof RegExp && b(k.tagNameCheck, e) || k.tagNameCheck instanceof Function && k.tagNameCheck(e)) && (k.attributeNameCheck instanceof RegExp && b(k.attributeNameCheck, t) || k.attributeNameCheck instanceof Function && k.attributeNameCheck(t, e)) || t === "is" && k.allowCustomizedBuiltInElements && (k.tagNameCheck instanceof RegExp && b(k.tagNameCheck, r) || k.tagNameCheck instanceof Function && k.tagNameCheck(r)))) return !1;
|
|
479
|
+
} else if (!gt[t] && !b(T, me(r, Ze, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && he(r, "data:") === 0 && mt[e]) && !(rt && !b(We, me(r, Ze, ""))) && r) return !1;
|
|
480
|
+
}
|
|
481
|
+
return !0;
|
|
482
|
+
}, Rt = S({}, [
|
|
483
|
+
"annotation-xml",
|
|
484
|
+
"color-profile",
|
|
485
|
+
"font-face",
|
|
486
|
+
"font-face-format",
|
|
487
|
+
"font-face-name",
|
|
488
|
+
"font-face-src",
|
|
489
|
+
"font-face-uri",
|
|
490
|
+
"missing-glyph"
|
|
491
|
+
]), zt = function(e) {
|
|
492
|
+
return !Rt[de(e)] && b(Qe, e);
|
|
493
|
+
}, Bt = function(e) {
|
|
494
|
+
q(w.beforeSanitizeAttributes, e, null);
|
|
495
|
+
let { attributes: n } = e;
|
|
496
|
+
if (!n || Pt(e)) return;
|
|
497
|
+
let r = {
|
|
498
|
+
attrName: "",
|
|
499
|
+
attrValue: "",
|
|
500
|
+
keepAttr: !0,
|
|
501
|
+
allowedAttributes: O,
|
|
502
|
+
forceKeepAttr: void 0
|
|
503
|
+
}, i = n.length;
|
|
504
|
+
for (; i--;) {
|
|
505
|
+
let { name: a, namespaceURI: o, value: s } = n[i], c = W(a), l = s, u = a === "value" ? l : ge(l);
|
|
506
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, q(w.uponSanitizeAttribute, e, r), u = r.attrValue, ut && (c === "id" || c === "name") && he(u, dt) !== 0 && (K(a, e), u = dt + u), at && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, u)) {
|
|
507
|
+
K(a, e);
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
if (c === "attributename" && pe(u, "href")) {
|
|
511
|
+
K(a, e);
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
if (r.forceKeepAttr) continue;
|
|
515
|
+
if (!r.keepAttr) {
|
|
516
|
+
K(a, e);
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
if (!it && b(/\/>/i, u)) {
|
|
520
|
+
K(a, e);
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
M && oe([
|
|
524
|
+
Le,
|
|
525
|
+
Re,
|
|
526
|
+
ze
|
|
527
|
+
], (e) => {
|
|
528
|
+
u = me(u, e, " ");
|
|
529
|
+
});
|
|
530
|
+
let d = W(e.nodeName);
|
|
531
|
+
if (!Lt(d, c, u)) {
|
|
532
|
+
K(a, e);
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
if (g && typeof f == "object" && typeof f.getAttributeType == "function" && !o) switch (f.getAttributeType(d, c)) {
|
|
536
|
+
case "TrustedHTML":
|
|
537
|
+
u = g.createHTML(u);
|
|
538
|
+
break;
|
|
539
|
+
case "TrustedScriptURL":
|
|
540
|
+
u = g.createScriptURL(u);
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
if (u !== l) try {
|
|
544
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Pt(e) ? G(e) : ce(t.removed);
|
|
545
|
+
} catch {
|
|
546
|
+
K(a, e);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
q(w.afterSanitizeAttributes, e, null);
|
|
550
|
+
}, Vt = function(e) {
|
|
551
|
+
let t = null, n = Nt(e);
|
|
552
|
+
for (q(w.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) q(w.uponSanitizeShadowNode, t, null), It(t), Bt(t), t.content instanceof a && Vt(t.content);
|
|
553
|
+
q(w.afterSanitizeShadowDOM, e, null);
|
|
554
|
+
};
|
|
555
|
+
return t.sanitize = function(e) {
|
|
556
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
557
|
+
if (_t = !e, _t && (e = "<!-->"), typeof e != "string" && !Ft(e) && (e = Se(e), typeof e != "string")) throw ye("dirty is not a string, aborting");
|
|
558
|
+
if (!t.isSupported) return e;
|
|
559
|
+
if (ot || Ot(n), t.removed = [], typeof e == "string" && (I = !1), I) {
|
|
560
|
+
let t = e.nodeName;
|
|
561
|
+
if (typeof t == "string") {
|
|
562
|
+
let e = W(t);
|
|
563
|
+
if (!E[e] || et[e]) throw ye("root node is forbidden and cannot be sanitized in-place");
|
|
564
|
+
}
|
|
565
|
+
} else if (e instanceof s) i = Mt("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === Ke.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
|
|
566
|
+
else {
|
|
567
|
+
if (!P && !M && !N && e.indexOf("<") === -1) return g && F ? g.createHTML(e) : e;
|
|
568
|
+
if (i = Mt(e), !i) return P ? null : F ? _ : "";
|
|
569
|
+
}
|
|
570
|
+
i && st && G(i.firstChild);
|
|
571
|
+
let u = Nt(I ? e : i);
|
|
572
|
+
for (; c = u.nextNode();) It(c), Bt(c), c.content instanceof a && Vt(c.content);
|
|
573
|
+
if (I) return e;
|
|
574
|
+
if (P) {
|
|
575
|
+
if (M) {
|
|
576
|
+
i.normalize();
|
|
577
|
+
let e = i.innerHTML;
|
|
578
|
+
oe([
|
|
579
|
+
Le,
|
|
580
|
+
Re,
|
|
581
|
+
ze
|
|
582
|
+
], (t) => {
|
|
583
|
+
e = me(e, t, " ");
|
|
584
|
+
}), i.innerHTML = e;
|
|
585
|
+
}
|
|
586
|
+
if (ct) for (l = be.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
587
|
+
else l = i;
|
|
588
|
+
return (O.shadowroot || O.shadowrootmode) && (l = Ie.call(r, l, !0)), l;
|
|
589
|
+
}
|
|
590
|
+
let d = N ? i.outerHTML : i.innerHTML;
|
|
591
|
+
return N && E["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ue, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), M && oe([
|
|
592
|
+
Le,
|
|
593
|
+
Re,
|
|
594
|
+
ze
|
|
595
|
+
], (e) => {
|
|
596
|
+
d = me(d, e, " ");
|
|
597
|
+
}), g && F ? g.createHTML(d) : d;
|
|
598
|
+
}, t.setConfig = function() {
|
|
599
|
+
Ot(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), ot = !0;
|
|
600
|
+
}, t.clearConfig = function() {
|
|
601
|
+
Tt = null, ot = !1;
|
|
602
|
+
}, t.isValidAttribute = function(e, t, n) {
|
|
603
|
+
return Tt || Ot({}), Lt(W(e), W(t), n);
|
|
604
|
+
}, t.addHook = function(e, t) {
|
|
605
|
+
typeof t == "function" && le(w[e], t);
|
|
606
|
+
}, t.removeHook = function(e, t) {
|
|
607
|
+
if (t !== void 0) {
|
|
608
|
+
let n = se(w[e], t);
|
|
609
|
+
return n === -1 ? void 0 : ue(w[e], n, 1)[0];
|
|
610
|
+
}
|
|
611
|
+
return ce(w[e]);
|
|
612
|
+
}, t.removeHooks = function(e) {
|
|
613
|
+
w[e] = [];
|
|
614
|
+
}, t.removeAllHooks = function() {
|
|
615
|
+
w = Ye();
|
|
616
|
+
}, t;
|
|
617
|
+
}
|
|
618
|
+
var Ze = Xe();
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region node_modules/marked/lib/marked.esm.js
|
|
621
|
+
function Qe() {
|
|
622
|
+
return {
|
|
623
|
+
async: !1,
|
|
624
|
+
breaks: !1,
|
|
625
|
+
extensions: null,
|
|
626
|
+
gfm: !0,
|
|
627
|
+
hooks: null,
|
|
628
|
+
pedantic: !1,
|
|
629
|
+
renderer: null,
|
|
630
|
+
silent: !1,
|
|
631
|
+
tokenizer: null,
|
|
632
|
+
walkTokens: null
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
var T = Qe();
|
|
636
|
+
function E(e) {
|
|
637
|
+
T = e;
|
|
638
|
+
}
|
|
639
|
+
var D = { exec: () => null };
|
|
640
|
+
function O(e, t = "") {
|
|
641
|
+
let n = typeof e == "string" ? e : e.source, r = {
|
|
642
|
+
replace: (e, t) => {
|
|
643
|
+
let i = typeof t == "string" ? t : t.source;
|
|
644
|
+
return i = i.replace(k.caret, "$1"), n = n.replace(e, i), r;
|
|
645
|
+
},
|
|
646
|
+
getRegex: () => new RegExp(n, t)
|
|
647
|
+
};
|
|
648
|
+
return r;
|
|
649
|
+
}
|
|
650
|
+
var $e = ((e = "") => {
|
|
651
|
+
try {
|
|
652
|
+
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
653
|
+
} catch {
|
|
654
|
+
return !1;
|
|
655
|
+
}
|
|
656
|
+
})(), k = {
|
|
657
|
+
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
658
|
+
outputLinkReplace: /\\([\[\]])/g,
|
|
659
|
+
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
660
|
+
beginningSpace: /^\s+/,
|
|
661
|
+
endingHash: /#$/,
|
|
662
|
+
startingSpaceChar: /^ /,
|
|
663
|
+
endingSpaceChar: / $/,
|
|
664
|
+
nonSpaceChar: /[^ ]/,
|
|
665
|
+
newLineCharGlobal: /\n/g,
|
|
666
|
+
tabCharGlobal: /\t/g,
|
|
667
|
+
multipleSpaceGlobal: /\s+/g,
|
|
668
|
+
blankLine: /^[ \t]*$/,
|
|
669
|
+
doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
|
|
670
|
+
blockquoteStart: /^ {0,3}>/,
|
|
671
|
+
blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
|
|
672
|
+
blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
|
|
673
|
+
listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
|
|
674
|
+
listIsTask: /^\[[ xX]\] +\S/,
|
|
675
|
+
listReplaceTask: /^\[[ xX]\] +/,
|
|
676
|
+
listTaskCheckbox: /\[[ xX]\]/,
|
|
677
|
+
anyLine: /\n.*\n/,
|
|
678
|
+
hrefBrackets: /^<(.*)>$/,
|
|
679
|
+
tableDelimiter: /[:|]/,
|
|
680
|
+
tableAlignChars: /^\||\| *$/g,
|
|
681
|
+
tableRowBlankLine: /\n[ \t]*$/,
|
|
682
|
+
tableAlignRight: /^ *-+: *$/,
|
|
683
|
+
tableAlignCenter: /^ *:-+: *$/,
|
|
684
|
+
tableAlignLeft: /^ *:-+ *$/,
|
|
685
|
+
startATag: /^<a /i,
|
|
686
|
+
endATag: /^<\/a>/i,
|
|
687
|
+
startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
|
|
688
|
+
endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
|
|
689
|
+
startAngleBracket: /^</,
|
|
690
|
+
endAngleBracket: />$/,
|
|
691
|
+
pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
|
|
692
|
+
unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
|
|
693
|
+
escapeTest: /[&<>"']/,
|
|
694
|
+
escapeReplace: /[&<>"']/g,
|
|
695
|
+
escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
|
|
696
|
+
escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
|
|
697
|
+
caret: /(^|[^\[])\^/g,
|
|
698
|
+
percentDecode: /%25/g,
|
|
699
|
+
findPipe: /\|/g,
|
|
700
|
+
splitPipe: / \|/,
|
|
701
|
+
slashPipe: /\\\|/g,
|
|
702
|
+
carriageReturn: /\r\n|\r/g,
|
|
703
|
+
spaceLine: /^ +$/gm,
|
|
704
|
+
notSpaceStart: /^\S*/,
|
|
705
|
+
endingNewline: /\n$/,
|
|
706
|
+
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
707
|
+
nextBulletRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
708
|
+
hrRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
|
|
709
|
+
fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
|
|
710
|
+
headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
|
|
711
|
+
htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i"),
|
|
712
|
+
blockquoteBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}>`)
|
|
713
|
+
}, et = /^(?:[ \t]*(?:\n|$))+/, tt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, A = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, j = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, nt = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, rt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, it = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, M = O(it).replace(/bull/g, rt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), at = O(it).replace(/bull/g, rt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), N = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ot = /^[^\n]+/, st = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, P = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", st).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ct = O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, rt).getRegex(), F = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", lt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ut = O("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", lt).replace("tag", F).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), dt = O(N).replace("hr", j).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", F).getRegex(), ft = {
|
|
714
|
+
blockquote: O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", dt).getRegex(),
|
|
715
|
+
code: tt,
|
|
716
|
+
def: P,
|
|
717
|
+
fences: A,
|
|
718
|
+
heading: nt,
|
|
719
|
+
hr: j,
|
|
720
|
+
html: ut,
|
|
721
|
+
lheading: M,
|
|
722
|
+
list: ct,
|
|
723
|
+
newline: et,
|
|
724
|
+
paragraph: dt,
|
|
725
|
+
table: D,
|
|
726
|
+
text: ot
|
|
727
|
+
}, I = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", j).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", F).getRegex(), L = {
|
|
728
|
+
...ft,
|
|
729
|
+
lheading: at,
|
|
730
|
+
table: I,
|
|
731
|
+
paragraph: O(N).replace("hr", j).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", I).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", F).getRegex()
|
|
732
|
+
}, R = {
|
|
733
|
+
...ft,
|
|
734
|
+
html: O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", lt).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
735
|
+
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
736
|
+
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
737
|
+
fences: D,
|
|
738
|
+
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
739
|
+
paragraph: O(N).replace("hr", j).replace("heading", " *#{1,6} *[^\n]").replace("lheading", M).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
740
|
+
}, pt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ht = /^( {2,}|\\)\n(?!\s*$)/, gt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, B = /[\s\p{P}\p{S}]/u, V = /[^\s\p{P}\p{S}]/u, H = O(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, B).getRegex(), U = /(?!~)[\p{P}\p{S}]/u, _t = /(?!~)[\s\p{P}\p{S}]/u, vt = /(?:[^\s\p{P}\p{S}]|~)/u, yt = O(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", $e ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), bt = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, xt = O(bt, "u").replace(/punct/g, z).getRegex(), St = O(bt, "u").replace(/punct/g, U).getRegex(), Ct = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", wt = O(Ct, "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), W = O(Ct, "gu").replace(/notPunctSpace/g, vt).replace(/punctSpace/g, _t).replace(/punct/g, U).getRegex(), Tt = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), Et = O(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), Dt = O("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), Ot = O(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), kt = O(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), At = O(lt).replace("(?:-->|$)", "-->").getRegex(), jt = O("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", At).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, K = O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Mt = O(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", st).getRegex(), Nt = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", st).getRegex(), Pt = O("reflink|nolink(?!\\()", "g").replace("reflink", Mt).replace("nolink", Nt).getRegex(), Ft = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, q = {
|
|
741
|
+
_backpedal: D,
|
|
742
|
+
anyPunctuation: Ot,
|
|
743
|
+
autolink: kt,
|
|
744
|
+
blockSkip: yt,
|
|
745
|
+
br: ht,
|
|
746
|
+
code: mt,
|
|
747
|
+
del: D,
|
|
748
|
+
delLDelim: D,
|
|
749
|
+
delRDelim: D,
|
|
750
|
+
emStrongLDelim: xt,
|
|
751
|
+
emStrongRDelimAst: wt,
|
|
752
|
+
emStrongRDelimUnd: Tt,
|
|
753
|
+
escape: pt,
|
|
754
|
+
link: K,
|
|
755
|
+
nolink: Nt,
|
|
756
|
+
punctuation: H,
|
|
757
|
+
reflink: Mt,
|
|
758
|
+
reflinkSearch: Pt,
|
|
759
|
+
tag: jt,
|
|
760
|
+
text: gt,
|
|
761
|
+
url: D
|
|
762
|
+
}, It = {
|
|
763
|
+
...q,
|
|
764
|
+
link: O(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(),
|
|
765
|
+
reflink: O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex()
|
|
766
|
+
}, Lt = {
|
|
767
|
+
...q,
|
|
768
|
+
emStrongRDelimAst: W,
|
|
769
|
+
emStrongLDelim: St,
|
|
770
|
+
delLDelim: Et,
|
|
771
|
+
delRDelim: Dt,
|
|
772
|
+
url: O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ft).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
773
|
+
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
774
|
+
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
775
|
+
text: O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ft).getRegex()
|
|
776
|
+
}, Rt = {
|
|
777
|
+
...Lt,
|
|
778
|
+
br: O(ht).replace("{2,}", "*").getRegex(),
|
|
779
|
+
text: O(Lt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
780
|
+
}, zt = {
|
|
781
|
+
normal: ft,
|
|
782
|
+
gfm: L,
|
|
783
|
+
pedantic: R
|
|
784
|
+
}, Bt = {
|
|
785
|
+
normal: q,
|
|
786
|
+
gfm: Lt,
|
|
787
|
+
breaks: Rt,
|
|
788
|
+
pedantic: It
|
|
789
|
+
}, Vt = {
|
|
790
|
+
"&": "&",
|
|
791
|
+
"<": "<",
|
|
792
|
+
">": ">",
|
|
793
|
+
"\"": """,
|
|
794
|
+
"'": "'"
|
|
795
|
+
}, Ht = (e) => Vt[e];
|
|
796
|
+
function J(e, t) {
|
|
797
|
+
if (t) {
|
|
798
|
+
if (k.escapeTest.test(e)) return e.replace(k.escapeReplace, Ht);
|
|
799
|
+
} else if (k.escapeTestNoEncode.test(e)) return e.replace(k.escapeReplaceNoEncode, Ht);
|
|
800
|
+
return e;
|
|
801
|
+
}
|
|
802
|
+
function Ut(e) {
|
|
803
|
+
try {
|
|
804
|
+
e = encodeURI(e).replace(k.percentDecode, "%");
|
|
805
|
+
} catch {
|
|
806
|
+
return null;
|
|
807
|
+
}
|
|
808
|
+
return e;
|
|
809
|
+
}
|
|
810
|
+
function Wt(e, t) {
|
|
811
|
+
let n = e.replace(k.findPipe, (e, t, n) => {
|
|
812
|
+
let r = !1, i = t;
|
|
813
|
+
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
814
|
+
return r ? "|" : " |";
|
|
815
|
+
}).split(k.splitPipe), r = 0;
|
|
816
|
+
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
817
|
+
else for (; n.length < t;) n.push("");
|
|
818
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(k.slashPipe, "|");
|
|
819
|
+
return n;
|
|
820
|
+
}
|
|
821
|
+
function Y(e, t, n) {
|
|
822
|
+
let r = e.length;
|
|
823
|
+
if (r === 0) return "";
|
|
824
|
+
let i = 0;
|
|
825
|
+
for (; i < r;) {
|
|
826
|
+
let a = e.charAt(r - i - 1);
|
|
827
|
+
if (a === t && !n) i++;
|
|
828
|
+
else if (a !== t && n) i++;
|
|
829
|
+
else break;
|
|
830
|
+
}
|
|
831
|
+
return e.slice(0, r - i);
|
|
832
|
+
}
|
|
833
|
+
function Gt(e) {
|
|
834
|
+
let t = e.split("\n"), n = t.length - 1;
|
|
835
|
+
for (; n >= 0 && k.blankLine.test(t[n]);) n--;
|
|
836
|
+
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
837
|
+
}
|
|
838
|
+
function Kt(e, t) {
|
|
839
|
+
if (e.indexOf(t[1]) === -1) return -1;
|
|
840
|
+
let n = 0;
|
|
841
|
+
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
842
|
+
else if (e[r] === t[0]) n++;
|
|
843
|
+
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
844
|
+
return n > 0 ? -2 : -1;
|
|
845
|
+
}
|
|
846
|
+
function qt(e, t = 0) {
|
|
847
|
+
let n = t, r = "";
|
|
848
|
+
for (let t of e) if (t === " ") {
|
|
849
|
+
let e = 4 - n % 4;
|
|
850
|
+
r += " ".repeat(e), n += e;
|
|
851
|
+
} else r += t, n++;
|
|
852
|
+
return r;
|
|
853
|
+
}
|
|
854
|
+
function Jt(e, t, n, r, i) {
|
|
855
|
+
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
856
|
+
r.state.inLink = !0;
|
|
857
|
+
let c = {
|
|
858
|
+
type: e[0].charAt(0) === "!" ? "image" : "link",
|
|
859
|
+
raw: n,
|
|
860
|
+
href: a,
|
|
861
|
+
title: o,
|
|
862
|
+
text: s,
|
|
863
|
+
tokens: r.inlineTokens(s)
|
|
864
|
+
};
|
|
865
|
+
return r.state.inLink = !1, c;
|
|
866
|
+
}
|
|
867
|
+
function Yt(e, t, n) {
|
|
868
|
+
let r = e.match(n.other.indentCodeCompensation);
|
|
869
|
+
if (r === null) return t;
|
|
870
|
+
let i = r[1];
|
|
871
|
+
return t.split("\n").map((e) => {
|
|
872
|
+
let t = e.match(n.other.beginningSpace);
|
|
873
|
+
if (t === null) return e;
|
|
874
|
+
let [r] = t;
|
|
875
|
+
return r.length >= i.length ? e.slice(i.length) : e;
|
|
876
|
+
}).join("\n");
|
|
877
|
+
}
|
|
878
|
+
var Xt = class {
|
|
879
|
+
options;
|
|
880
|
+
rules;
|
|
881
|
+
lexer;
|
|
882
|
+
constructor(e) {
|
|
883
|
+
this.options = e || T;
|
|
884
|
+
}
|
|
885
|
+
space(e) {
|
|
886
|
+
let t = this.rules.block.newline.exec(e);
|
|
887
|
+
if (t && t[0].length > 0) return {
|
|
888
|
+
type: "space",
|
|
889
|
+
raw: t[0]
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
code(e) {
|
|
893
|
+
let t = this.rules.block.code.exec(e);
|
|
894
|
+
if (t) {
|
|
895
|
+
let e = this.options.pedantic ? t[0] : Gt(t[0]);
|
|
896
|
+
return {
|
|
897
|
+
type: "code",
|
|
898
|
+
raw: e,
|
|
899
|
+
codeBlockStyle: "indented",
|
|
900
|
+
text: e.replace(this.rules.other.codeRemoveIndent, "")
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
fences(e) {
|
|
905
|
+
let t = this.rules.block.fences.exec(e);
|
|
906
|
+
if (t) {
|
|
907
|
+
let e = t[0], n = Yt(e, t[3] || "", this.rules);
|
|
908
|
+
return {
|
|
909
|
+
type: "code",
|
|
910
|
+
raw: e,
|
|
911
|
+
lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
|
|
912
|
+
text: n
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
heading(e) {
|
|
917
|
+
let t = this.rules.block.heading.exec(e);
|
|
918
|
+
if (t) {
|
|
919
|
+
let e = t[2].trim();
|
|
920
|
+
if (this.rules.other.endingHash.test(e)) {
|
|
921
|
+
let t = Y(e, "#");
|
|
922
|
+
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
923
|
+
}
|
|
924
|
+
return {
|
|
925
|
+
type: "heading",
|
|
926
|
+
raw: Y(t[0], "\n"),
|
|
927
|
+
depth: t[1].length,
|
|
928
|
+
text: e,
|
|
929
|
+
tokens: this.lexer.inline(e)
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
hr(e) {
|
|
934
|
+
let t = this.rules.block.hr.exec(e);
|
|
935
|
+
if (t) return {
|
|
936
|
+
type: "hr",
|
|
937
|
+
raw: Y(t[0], "\n")
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
blockquote(e) {
|
|
941
|
+
let t = this.rules.block.blockquote.exec(e);
|
|
942
|
+
if (t) {
|
|
943
|
+
let e = Y(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
944
|
+
for (; e.length > 0;) {
|
|
945
|
+
let t = !1, a = [], o;
|
|
946
|
+
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
947
|
+
else if (!t) a.push(e[o]);
|
|
948
|
+
else break;
|
|
949
|
+
e = e.slice(o);
|
|
950
|
+
let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
951
|
+
n = n ? `${n}
|
|
952
|
+
${s}` : s, r = r ? `${r}
|
|
953
|
+
${c}` : c;
|
|
954
|
+
let l = this.lexer.state.top;
|
|
955
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
|
|
956
|
+
let u = i.at(-1);
|
|
957
|
+
if (u?.type === "code") break;
|
|
958
|
+
if (u?.type === "blockquote") {
|
|
959
|
+
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
|
|
960
|
+
i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
|
|
961
|
+
break;
|
|
962
|
+
} else if (u?.type === "list") {
|
|
963
|
+
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
|
|
964
|
+
i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
|
|
965
|
+
continue;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
return {
|
|
969
|
+
type: "blockquote",
|
|
970
|
+
raw: n,
|
|
971
|
+
tokens: i,
|
|
972
|
+
text: r
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
list(e) {
|
|
977
|
+
let t = this.rules.block.list.exec(e);
|
|
978
|
+
if (t) {
|
|
979
|
+
let n = t[1].trim(), r = n.length > 1, i = {
|
|
980
|
+
type: "list",
|
|
981
|
+
raw: "",
|
|
982
|
+
ordered: r,
|
|
983
|
+
start: r ? +n.slice(0, -1) : "",
|
|
984
|
+
loose: !1,
|
|
985
|
+
items: []
|
|
986
|
+
};
|
|
987
|
+
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
988
|
+
let a = this.rules.other.listItemRegex(n), o = !1;
|
|
989
|
+
for (; e;) {
|
|
990
|
+
let n = !1, r = "", s = "";
|
|
991
|
+
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
992
|
+
r = t[0], e = e.substring(r.length);
|
|
993
|
+
let c = qt(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
994
|
+
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
995
|
+
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), ee = this.rules.other.blockquoteBeginRegex(d);
|
|
996
|
+
for (; e;) {
|
|
997
|
+
let te = e.split("\n", 1)[0], f;
|
|
998
|
+
if (l = te, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), f = l) : f = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || ee.test(l) || t.test(l) || n.test(l)) break;
|
|
999
|
+
if (f.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + f.slice(d);
|
|
1000
|
+
else {
|
|
1001
|
+
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
1002
|
+
s += "\n" + l;
|
|
1003
|
+
}
|
|
1004
|
+
u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = f.slice(d);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
1008
|
+
type: "list_item",
|
|
1009
|
+
raw: r,
|
|
1010
|
+
task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
|
|
1011
|
+
loose: !1,
|
|
1012
|
+
text: s,
|
|
1013
|
+
tokens: []
|
|
1014
|
+
}), i.raw += r;
|
|
1015
|
+
}
|
|
1016
|
+
let s = i.items.at(-1);
|
|
1017
|
+
if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
|
|
1018
|
+
else return;
|
|
1019
|
+
i.raw = i.raw.trimEnd();
|
|
1020
|
+
for (let e of i.items) {
|
|
1021
|
+
if (this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []), e.task) {
|
|
1022
|
+
if (e.text = e.text.replace(this.rules.other.listReplaceTask, ""), e.tokens[0]?.type === "text" || e.tokens[0]?.type === "paragraph") {
|
|
1023
|
+
e.tokens[0].raw = e.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), e.tokens[0].text = e.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
|
|
1024
|
+
for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
|
|
1025
|
+
this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
let t = this.rules.other.listTaskCheckbox.exec(e.raw);
|
|
1030
|
+
if (t) {
|
|
1031
|
+
let n = {
|
|
1032
|
+
type: "checkbox",
|
|
1033
|
+
raw: t[0] + " ",
|
|
1034
|
+
checked: t[0] !== "[ ]"
|
|
1035
|
+
};
|
|
1036
|
+
e.checked = n.checked, i.loose ? e.tokens[0] && ["paragraph", "text"].includes(e.tokens[0].type) && "tokens" in e.tokens[0] && e.tokens[0].tokens ? (e.tokens[0].raw = n.raw + e.tokens[0].raw, e.tokens[0].text = n.raw + e.tokens[0].text, e.tokens[0].tokens.unshift(n)) : e.tokens.unshift({
|
|
1037
|
+
type: "paragraph",
|
|
1038
|
+
raw: n.raw,
|
|
1039
|
+
text: n.raw,
|
|
1040
|
+
tokens: [n]
|
|
1041
|
+
}) : e.tokens.unshift(n);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if (!i.loose) {
|
|
1045
|
+
let t = e.tokens.filter((e) => e.type === "space");
|
|
1046
|
+
i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
if (i.loose) for (let e of i.items) {
|
|
1050
|
+
e.loose = !0;
|
|
1051
|
+
for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
|
|
1052
|
+
}
|
|
1053
|
+
return i;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
html(e) {
|
|
1057
|
+
let t = this.rules.block.html.exec(e);
|
|
1058
|
+
if (t) {
|
|
1059
|
+
let e = Gt(t[0]);
|
|
1060
|
+
return {
|
|
1061
|
+
type: "html",
|
|
1062
|
+
block: !0,
|
|
1063
|
+
raw: e,
|
|
1064
|
+
pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
|
|
1065
|
+
text: e
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
def(e) {
|
|
1070
|
+
let t = this.rules.block.def.exec(e);
|
|
1071
|
+
if (t) {
|
|
1072
|
+
let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
1073
|
+
return {
|
|
1074
|
+
type: "def",
|
|
1075
|
+
tag: e,
|
|
1076
|
+
raw: Y(t[0], "\n"),
|
|
1077
|
+
href: n,
|
|
1078
|
+
title: r
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
table(e) {
|
|
1083
|
+
let t = this.rules.block.table.exec(e);
|
|
1084
|
+
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1085
|
+
let n = Wt(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
1086
|
+
type: "table",
|
|
1087
|
+
raw: Y(t[0], "\n"),
|
|
1088
|
+
header: [],
|
|
1089
|
+
align: [],
|
|
1090
|
+
rows: []
|
|
1091
|
+
};
|
|
1092
|
+
if (n.length === r.length) {
|
|
1093
|
+
for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
|
|
1094
|
+
for (let e = 0; e < n.length; e++) a.header.push({
|
|
1095
|
+
text: n[e],
|
|
1096
|
+
tokens: this.lexer.inline(n[e]),
|
|
1097
|
+
header: !0,
|
|
1098
|
+
align: a.align[e]
|
|
1099
|
+
});
|
|
1100
|
+
for (let e of i) a.rows.push(Wt(e, a.header.length).map((e, t) => ({
|
|
1101
|
+
text: e,
|
|
1102
|
+
tokens: this.lexer.inline(e),
|
|
1103
|
+
header: !1,
|
|
1104
|
+
align: a.align[t]
|
|
1105
|
+
})));
|
|
1106
|
+
return a;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
lheading(e) {
|
|
1110
|
+
let t = this.rules.block.lheading.exec(e);
|
|
1111
|
+
if (t) {
|
|
1112
|
+
let e = t[1].trim();
|
|
1113
|
+
return {
|
|
1114
|
+
type: "heading",
|
|
1115
|
+
raw: Y(t[0], "\n"),
|
|
1116
|
+
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
1117
|
+
text: e,
|
|
1118
|
+
tokens: this.lexer.inline(e)
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
paragraph(e) {
|
|
1123
|
+
let t = this.rules.block.paragraph.exec(e);
|
|
1124
|
+
if (t) {
|
|
1125
|
+
let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
|
|
1126
|
+
return {
|
|
1127
|
+
type: "paragraph",
|
|
1128
|
+
raw: t[0],
|
|
1129
|
+
text: e,
|
|
1130
|
+
tokens: this.lexer.inline(e)
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
text(e) {
|
|
1135
|
+
let t = this.rules.block.text.exec(e);
|
|
1136
|
+
if (t) return {
|
|
1137
|
+
type: "text",
|
|
1138
|
+
raw: t[0],
|
|
1139
|
+
text: t[0],
|
|
1140
|
+
tokens: this.lexer.inline(t[0])
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
escape(e) {
|
|
1144
|
+
let t = this.rules.inline.escape.exec(e);
|
|
1145
|
+
if (t) return {
|
|
1146
|
+
type: "escape",
|
|
1147
|
+
raw: t[0],
|
|
1148
|
+
text: t[1]
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
tag(e) {
|
|
1152
|
+
let t = this.rules.inline.tag.exec(e);
|
|
1153
|
+
if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
|
|
1154
|
+
type: "html",
|
|
1155
|
+
raw: t[0],
|
|
1156
|
+
inLink: this.lexer.state.inLink,
|
|
1157
|
+
inRawBlock: this.lexer.state.inRawBlock,
|
|
1158
|
+
block: !1,
|
|
1159
|
+
text: t[0]
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
link(e) {
|
|
1163
|
+
let t = this.rules.inline.link.exec(e);
|
|
1164
|
+
if (t) {
|
|
1165
|
+
let e = t[2].trim();
|
|
1166
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
1167
|
+
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
1168
|
+
let t = Y(e.slice(0, -1), "\\");
|
|
1169
|
+
if ((e.length - t.length) % 2 == 0) return;
|
|
1170
|
+
} else {
|
|
1171
|
+
let e = Kt(t[2], "()");
|
|
1172
|
+
if (e === -2) return;
|
|
1173
|
+
if (e > -1) {
|
|
1174
|
+
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
1175
|
+
t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
let n = t[2], r = "";
|
|
1179
|
+
if (this.options.pedantic) {
|
|
1180
|
+
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
1181
|
+
e && (n = e[1], r = e[3]);
|
|
1182
|
+
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
1183
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), Jt(t, {
|
|
1184
|
+
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1185
|
+
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1186
|
+
}, t[0], this.lexer, this.rules);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
reflink(e, t) {
|
|
1190
|
+
let n;
|
|
1191
|
+
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
1192
|
+
let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
|
|
1193
|
+
if (!e) {
|
|
1194
|
+
let e = n[0].charAt(0);
|
|
1195
|
+
return {
|
|
1196
|
+
type: "text",
|
|
1197
|
+
raw: e,
|
|
1198
|
+
text: e
|
|
1199
|
+
};
|
|
1200
|
+
}
|
|
1201
|
+
return Jt(n, e, n[0], this.lexer, this.rules);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
emStrong(e, t, n = "") {
|
|
1205
|
+
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
1206
|
+
if (!(!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[3]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
1207
|
+
let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
1208
|
+
for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
|
|
1209
|
+
if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
|
|
1210
|
+
if (a = [...i].length, r[3] || r[4]) {
|
|
1211
|
+
o += a;
|
|
1212
|
+
continue;
|
|
1213
|
+
} else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
|
|
1214
|
+
s += a;
|
|
1215
|
+
continue;
|
|
1216
|
+
}
|
|
1217
|
+
if (o -= a, o > 0) continue;
|
|
1218
|
+
a = Math.min(a, a + o + s);
|
|
1219
|
+
let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
|
|
1220
|
+
if (Math.min(n, a) % 2) {
|
|
1221
|
+
let e = c.slice(1, -1);
|
|
1222
|
+
return {
|
|
1223
|
+
type: "em",
|
|
1224
|
+
raw: c,
|
|
1225
|
+
text: e,
|
|
1226
|
+
tokens: this.lexer.inlineTokens(e)
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
let l = c.slice(2, -2);
|
|
1230
|
+
return {
|
|
1231
|
+
type: "strong",
|
|
1232
|
+
raw: c,
|
|
1233
|
+
text: l,
|
|
1234
|
+
tokens: this.lexer.inlineTokens(l)
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
codespan(e) {
|
|
1240
|
+
let t = this.rules.inline.code.exec(e);
|
|
1241
|
+
if (t) {
|
|
1242
|
+
let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
|
|
1243
|
+
return n && r && (e = e.substring(1, e.length - 1)), {
|
|
1244
|
+
type: "codespan",
|
|
1245
|
+
raw: t[0],
|
|
1246
|
+
text: e
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
br(e) {
|
|
1251
|
+
let t = this.rules.inline.br.exec(e);
|
|
1252
|
+
if (t) return {
|
|
1253
|
+
type: "br",
|
|
1254
|
+
raw: t[0]
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
del(e, t, n = "") {
|
|
1258
|
+
let r = this.rules.inline.delLDelim.exec(e);
|
|
1259
|
+
if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
|
|
1260
|
+
let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
|
|
1261
|
+
for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
|
|
1262
|
+
if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
|
|
1263
|
+
if (r[3] || r[4]) {
|
|
1264
|
+
o += a;
|
|
1265
|
+
continue;
|
|
1266
|
+
}
|
|
1267
|
+
if (o -= a, o > 0) continue;
|
|
1268
|
+
a = Math.min(a, a + o);
|
|
1269
|
+
let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
|
|
1270
|
+
return {
|
|
1271
|
+
type: "del",
|
|
1272
|
+
raw: s,
|
|
1273
|
+
text: c,
|
|
1274
|
+
tokens: this.lexer.inlineTokens(c)
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
autolink(e) {
|
|
1280
|
+
let t = this.rules.inline.autolink.exec(e);
|
|
1281
|
+
if (t) {
|
|
1282
|
+
let e, n;
|
|
1283
|
+
return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
|
|
1284
|
+
type: "link",
|
|
1285
|
+
raw: t[0],
|
|
1286
|
+
text: e,
|
|
1287
|
+
href: n,
|
|
1288
|
+
tokens: [{
|
|
1289
|
+
type: "text",
|
|
1290
|
+
raw: e,
|
|
1291
|
+
text: e
|
|
1292
|
+
}]
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
url(e) {
|
|
1297
|
+
let t;
|
|
1298
|
+
if (t = this.rules.inline.url.exec(e)) {
|
|
1299
|
+
let e, n;
|
|
1300
|
+
if (t[2] === "@") e = t[0], n = "mailto:" + e;
|
|
1301
|
+
else {
|
|
1302
|
+
let r;
|
|
1303
|
+
do
|
|
1304
|
+
r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
|
|
1305
|
+
while (r !== t[0]);
|
|
1306
|
+
e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
|
|
1307
|
+
}
|
|
1308
|
+
return {
|
|
1309
|
+
type: "link",
|
|
1310
|
+
raw: t[0],
|
|
1311
|
+
text: e,
|
|
1312
|
+
href: n,
|
|
1313
|
+
tokens: [{
|
|
1314
|
+
type: "text",
|
|
1315
|
+
raw: e,
|
|
1316
|
+
text: e
|
|
1317
|
+
}]
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
inlineText(e) {
|
|
1322
|
+
let t = this.rules.inline.text.exec(e);
|
|
1323
|
+
if (t) {
|
|
1324
|
+
let e = this.lexer.state.inRawBlock;
|
|
1325
|
+
return {
|
|
1326
|
+
type: "text",
|
|
1327
|
+
raw: t[0],
|
|
1328
|
+
text: t[0],
|
|
1329
|
+
escaped: e
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}, X = class e {
|
|
1334
|
+
tokens;
|
|
1335
|
+
options;
|
|
1336
|
+
state;
|
|
1337
|
+
inlineQueue;
|
|
1338
|
+
tokenizer;
|
|
1339
|
+
constructor(e) {
|
|
1340
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new Xt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1341
|
+
inLink: !1,
|
|
1342
|
+
inRawBlock: !1,
|
|
1343
|
+
top: !0
|
|
1344
|
+
};
|
|
1345
|
+
let t = {
|
|
1346
|
+
other: k,
|
|
1347
|
+
block: zt.normal,
|
|
1348
|
+
inline: Bt.normal
|
|
1349
|
+
};
|
|
1350
|
+
this.options.pedantic ? (t.block = zt.pedantic, t.inline = Bt.pedantic) : this.options.gfm && (t.block = zt.gfm, this.options.breaks ? t.inline = Bt.breaks : t.inline = Bt.gfm), this.tokenizer.rules = t;
|
|
1351
|
+
}
|
|
1352
|
+
static get rules() {
|
|
1353
|
+
return {
|
|
1354
|
+
block: zt,
|
|
1355
|
+
inline: Bt
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
static lex(t, n) {
|
|
1359
|
+
return new e(n).lex(t);
|
|
1360
|
+
}
|
|
1361
|
+
static lexInline(t, n) {
|
|
1362
|
+
return new e(n).inlineTokens(t);
|
|
1363
|
+
}
|
|
1364
|
+
lex(e) {
|
|
1365
|
+
e = e.replace(k.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
1366
|
+
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
1367
|
+
let t = this.inlineQueue[e];
|
|
1368
|
+
this.inlineTokens(t.src, t.tokens);
|
|
1369
|
+
}
|
|
1370
|
+
return this.inlineQueue = [], this.tokens;
|
|
1371
|
+
}
|
|
1372
|
+
blockTokens(e, t = [], n = !1) {
|
|
1373
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(k.tabCharGlobal, " ").replace(k.spaceLine, ""));
|
|
1374
|
+
let r = Infinity;
|
|
1375
|
+
for (; e;) {
|
|
1376
|
+
if (e.length < r) r = e.length;
|
|
1377
|
+
else {
|
|
1378
|
+
this.infiniteLoopError(e.charCodeAt(0));
|
|
1379
|
+
break;
|
|
1380
|
+
}
|
|
1381
|
+
let i;
|
|
1382
|
+
if (this.options.extensions?.block?.some((n) => (i = n.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1)) continue;
|
|
1383
|
+
if (i = this.tokenizer.space(e)) {
|
|
1384
|
+
e = e.substring(i.raw.length);
|
|
1385
|
+
let n = t.at(-1);
|
|
1386
|
+
i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
|
|
1387
|
+
continue;
|
|
1388
|
+
}
|
|
1389
|
+
if (i = this.tokenizer.code(e)) {
|
|
1390
|
+
e = e.substring(i.raw.length);
|
|
1391
|
+
let n = t.at(-1);
|
|
1392
|
+
n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.at(-1).src = n.text) : t.push(i);
|
|
1393
|
+
continue;
|
|
1394
|
+
}
|
|
1395
|
+
if (i = this.tokenizer.fences(e)) {
|
|
1396
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
if (i = this.tokenizer.heading(e)) {
|
|
1400
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1401
|
+
continue;
|
|
1402
|
+
}
|
|
1403
|
+
if (i = this.tokenizer.hr(e)) {
|
|
1404
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1405
|
+
continue;
|
|
1406
|
+
}
|
|
1407
|
+
if (i = this.tokenizer.blockquote(e)) {
|
|
1408
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1409
|
+
continue;
|
|
1410
|
+
}
|
|
1411
|
+
if (i = this.tokenizer.list(e)) {
|
|
1412
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1413
|
+
continue;
|
|
1414
|
+
}
|
|
1415
|
+
if (i = this.tokenizer.html(e)) {
|
|
1416
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1417
|
+
continue;
|
|
1418
|
+
}
|
|
1419
|
+
if (i = this.tokenizer.def(e)) {
|
|
1420
|
+
e = e.substring(i.raw.length);
|
|
1421
|
+
let n = t.at(-1);
|
|
1422
|
+
n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
|
|
1423
|
+
href: i.href,
|
|
1424
|
+
title: i.title
|
|
1425
|
+
}, t.push(i));
|
|
1426
|
+
continue;
|
|
1427
|
+
}
|
|
1428
|
+
if (i = this.tokenizer.table(e)) {
|
|
1429
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
if (i = this.tokenizer.lheading(e)) {
|
|
1433
|
+
e = e.substring(i.raw.length), t.push(i);
|
|
1434
|
+
continue;
|
|
1435
|
+
}
|
|
1436
|
+
let a = e;
|
|
1437
|
+
if (this.options.extensions?.startBlock) {
|
|
1438
|
+
let t = Infinity, n = e.slice(1), r;
|
|
1439
|
+
this.options.extensions.startBlock.forEach((e) => {
|
|
1440
|
+
r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
|
|
1441
|
+
}), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
|
|
1442
|
+
}
|
|
1443
|
+
if (this.state.top && (i = this.tokenizer.paragraph(a))) {
|
|
1444
|
+
let r = t.at(-1);
|
|
1445
|
+
n && r?.type === "paragraph" ? (r.raw += (r.raw.endsWith("\n") ? "" : "\n") + i.raw, r.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = r.text) : t.push(i), n = a.length !== e.length, e = e.substring(i.raw.length);
|
|
1446
|
+
continue;
|
|
1447
|
+
}
|
|
1448
|
+
if (i = this.tokenizer.text(e)) {
|
|
1449
|
+
e = e.substring(i.raw.length);
|
|
1450
|
+
let n = t.at(-1);
|
|
1451
|
+
n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(i);
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
if (e) {
|
|
1455
|
+
this.infiniteLoopError(e.charCodeAt(0));
|
|
1456
|
+
break;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return this.state.top = !0, t;
|
|
1460
|
+
}
|
|
1461
|
+
inline(e, t = []) {
|
|
1462
|
+
return this.inlineQueue.push({
|
|
1463
|
+
src: e,
|
|
1464
|
+
tokens: t
|
|
1465
|
+
}), t;
|
|
1466
|
+
}
|
|
1467
|
+
inlineTokens(e, t = []) {
|
|
1468
|
+
this.tokenizer.lexer = this;
|
|
1469
|
+
let n = e, r = null;
|
|
1470
|
+
if (this.tokens.links) {
|
|
1471
|
+
let e = Object.keys(this.tokens.links);
|
|
1472
|
+
if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
1473
|
+
}
|
|
1474
|
+
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
1475
|
+
let i;
|
|
1476
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
1477
|
+
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
1478
|
+
let a = !1, o = "", s = Infinity;
|
|
1479
|
+
for (; e;) {
|
|
1480
|
+
if (e.length < s) s = e.length;
|
|
1481
|
+
else {
|
|
1482
|
+
this.infiniteLoopError(e.charCodeAt(0));
|
|
1483
|
+
break;
|
|
1484
|
+
}
|
|
1485
|
+
a || (o = ""), a = !1;
|
|
1486
|
+
let r;
|
|
1487
|
+
if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
|
|
1488
|
+
if (r = this.tokenizer.escape(e)) {
|
|
1489
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1490
|
+
continue;
|
|
1491
|
+
}
|
|
1492
|
+
if (r = this.tokenizer.tag(e)) {
|
|
1493
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1494
|
+
continue;
|
|
1495
|
+
}
|
|
1496
|
+
if (r = this.tokenizer.link(e)) {
|
|
1497
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1498
|
+
continue;
|
|
1499
|
+
}
|
|
1500
|
+
if (r = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
1501
|
+
e = e.substring(r.raw.length);
|
|
1502
|
+
let n = t.at(-1);
|
|
1503
|
+
r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
|
|
1504
|
+
continue;
|
|
1505
|
+
}
|
|
1506
|
+
if (r = this.tokenizer.emStrong(e, n, o)) {
|
|
1507
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1508
|
+
continue;
|
|
1509
|
+
}
|
|
1510
|
+
if (r = this.tokenizer.codespan(e)) {
|
|
1511
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
if (r = this.tokenizer.br(e)) {
|
|
1515
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
if (r = this.tokenizer.del(e, n, o)) {
|
|
1519
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1520
|
+
continue;
|
|
1521
|
+
}
|
|
1522
|
+
if (r = this.tokenizer.autolink(e)) {
|
|
1523
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1524
|
+
continue;
|
|
1525
|
+
}
|
|
1526
|
+
if (!this.state.inLink && (r = this.tokenizer.url(e))) {
|
|
1527
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
let i = e;
|
|
1531
|
+
if (this.options.extensions?.startInline) {
|
|
1532
|
+
let t = Infinity, n = e.slice(1), r;
|
|
1533
|
+
this.options.extensions.startInline.forEach((e) => {
|
|
1534
|
+
r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
|
|
1535
|
+
}), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
|
|
1536
|
+
}
|
|
1537
|
+
if (r = this.tokenizer.inlineText(i)) {
|
|
1538
|
+
e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
|
|
1539
|
+
let n = t.at(-1);
|
|
1540
|
+
n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
|
|
1541
|
+
continue;
|
|
1542
|
+
}
|
|
1543
|
+
if (e) {
|
|
1544
|
+
this.infiniteLoopError(e.charCodeAt(0));
|
|
1545
|
+
break;
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
return t;
|
|
1549
|
+
}
|
|
1550
|
+
infiniteLoopError(e) {
|
|
1551
|
+
let t = "Infinite loop on byte: " + e;
|
|
1552
|
+
if (this.options.silent) console.error(t);
|
|
1553
|
+
else throw Error(t);
|
|
1554
|
+
}
|
|
1555
|
+
}, Zt = class {
|
|
1556
|
+
options;
|
|
1557
|
+
parser;
|
|
1558
|
+
constructor(e) {
|
|
1559
|
+
this.options = e || T;
|
|
1560
|
+
}
|
|
1561
|
+
space(e) {
|
|
1562
|
+
return "";
|
|
1563
|
+
}
|
|
1564
|
+
code({ text: e, lang: t, escaped: n }) {
|
|
1565
|
+
let r = (t || "").match(k.notSpaceStart)?.[0], i = e.replace(k.endingNewline, "") + "\n";
|
|
1566
|
+
return r ? "<pre><code class=\"language-" + J(r) + "\">" + (n ? i : J(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : J(i, !0)) + "</code></pre>\n";
|
|
1567
|
+
}
|
|
1568
|
+
blockquote({ tokens: e }) {
|
|
1569
|
+
return `<blockquote>
|
|
1570
|
+
${this.parser.parse(e)}</blockquote>
|
|
1571
|
+
`;
|
|
1572
|
+
}
|
|
1573
|
+
html({ text: e }) {
|
|
1574
|
+
return e;
|
|
1575
|
+
}
|
|
1576
|
+
def(e) {
|
|
1577
|
+
return "";
|
|
1578
|
+
}
|
|
1579
|
+
heading({ tokens: e, depth: t }) {
|
|
1580
|
+
return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
1581
|
+
`;
|
|
1582
|
+
}
|
|
1583
|
+
hr(e) {
|
|
1584
|
+
return "<hr>\n";
|
|
1585
|
+
}
|
|
1586
|
+
list(e) {
|
|
1587
|
+
let t = e.ordered, n = e.start, r = "";
|
|
1588
|
+
for (let t = 0; t < e.items.length; t++) {
|
|
1589
|
+
let n = e.items[t];
|
|
1590
|
+
r += this.listitem(n);
|
|
1591
|
+
}
|
|
1592
|
+
let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
|
|
1593
|
+
return "<" + i + a + ">\n" + r + "</" + i + ">\n";
|
|
1594
|
+
}
|
|
1595
|
+
listitem(e) {
|
|
1596
|
+
return `<li>${this.parser.parse(e.tokens)}</li>
|
|
1597
|
+
`;
|
|
1598
|
+
}
|
|
1599
|
+
checkbox({ checked: e }) {
|
|
1600
|
+
return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
|
|
1601
|
+
}
|
|
1602
|
+
paragraph({ tokens: e }) {
|
|
1603
|
+
return `<p>${this.parser.parseInline(e)}</p>
|
|
1604
|
+
`;
|
|
1605
|
+
}
|
|
1606
|
+
table(e) {
|
|
1607
|
+
let t = "", n = "";
|
|
1608
|
+
for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
|
|
1609
|
+
t += this.tablerow({ text: n });
|
|
1610
|
+
let r = "";
|
|
1611
|
+
for (let t = 0; t < e.rows.length; t++) {
|
|
1612
|
+
let i = e.rows[t];
|
|
1613
|
+
n = "";
|
|
1614
|
+
for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
|
|
1615
|
+
r += this.tablerow({ text: n });
|
|
1616
|
+
}
|
|
1617
|
+
return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
|
|
1618
|
+
}
|
|
1619
|
+
tablerow({ text: e }) {
|
|
1620
|
+
return `<tr>
|
|
1621
|
+
${e}</tr>
|
|
1622
|
+
`;
|
|
1623
|
+
}
|
|
1624
|
+
tablecell(e) {
|
|
1625
|
+
let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
|
|
1626
|
+
return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
|
|
1627
|
+
`;
|
|
1628
|
+
}
|
|
1629
|
+
strong({ tokens: e }) {
|
|
1630
|
+
return `<strong>${this.parser.parseInline(e)}</strong>`;
|
|
1631
|
+
}
|
|
1632
|
+
em({ tokens: e }) {
|
|
1633
|
+
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
1634
|
+
}
|
|
1635
|
+
codespan({ text: e }) {
|
|
1636
|
+
return `<code>${J(e, !0)}</code>`;
|
|
1637
|
+
}
|
|
1638
|
+
br(e) {
|
|
1639
|
+
return "<br>";
|
|
1640
|
+
}
|
|
1641
|
+
del({ tokens: e }) {
|
|
1642
|
+
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1643
|
+
}
|
|
1644
|
+
link({ href: e, title: t, tokens: n }) {
|
|
1645
|
+
let r = this.parser.parseInline(n), i = Ut(e);
|
|
1646
|
+
if (i === null) return r;
|
|
1647
|
+
e = i;
|
|
1648
|
+
let a = "<a href=\"" + e + "\"";
|
|
1649
|
+
return t && (a += " title=\"" + J(t) + "\""), a += ">" + r + "</a>", a;
|
|
1650
|
+
}
|
|
1651
|
+
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1652
|
+
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1653
|
+
let i = Ut(e);
|
|
1654
|
+
if (i === null) return J(n);
|
|
1655
|
+
e = i;
|
|
1656
|
+
let a = `<img src="${e}" alt="${J(n)}"`;
|
|
1657
|
+
return t && (a += ` title="${J(t)}"`), a += ">", a;
|
|
1658
|
+
}
|
|
1659
|
+
text(e) {
|
|
1660
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : J(e.text);
|
|
1661
|
+
}
|
|
1662
|
+
}, Qt = class {
|
|
1663
|
+
strong({ text: e }) {
|
|
1664
|
+
return e;
|
|
1665
|
+
}
|
|
1666
|
+
em({ text: e }) {
|
|
1667
|
+
return e;
|
|
1668
|
+
}
|
|
1669
|
+
codespan({ text: e }) {
|
|
1670
|
+
return e;
|
|
1671
|
+
}
|
|
1672
|
+
del({ text: e }) {
|
|
1673
|
+
return e;
|
|
1674
|
+
}
|
|
1675
|
+
html({ text: e }) {
|
|
1676
|
+
return e;
|
|
1677
|
+
}
|
|
1678
|
+
text({ text: e }) {
|
|
1679
|
+
return e;
|
|
1680
|
+
}
|
|
1681
|
+
link({ text: e }) {
|
|
1682
|
+
return "" + e;
|
|
1683
|
+
}
|
|
1684
|
+
image({ text: e }) {
|
|
1685
|
+
return "" + e;
|
|
1686
|
+
}
|
|
1687
|
+
br() {
|
|
1688
|
+
return "";
|
|
1689
|
+
}
|
|
1690
|
+
checkbox({ raw: e }) {
|
|
1691
|
+
return e;
|
|
1692
|
+
}
|
|
1693
|
+
}, Z = class e {
|
|
1694
|
+
options;
|
|
1695
|
+
renderer;
|
|
1696
|
+
textRenderer;
|
|
1697
|
+
constructor(e) {
|
|
1698
|
+
this.options = e || T, this.options.renderer = this.options.renderer || new Zt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Qt();
|
|
1699
|
+
}
|
|
1700
|
+
static parse(t, n) {
|
|
1701
|
+
return new e(n).parse(t);
|
|
1702
|
+
}
|
|
1703
|
+
static parseInline(t, n) {
|
|
1704
|
+
return new e(n).parseInline(t);
|
|
1705
|
+
}
|
|
1706
|
+
parse(e) {
|
|
1707
|
+
this.renderer.parser = this;
|
|
1708
|
+
let t = "";
|
|
1709
|
+
for (let n = 0; n < e.length; n++) {
|
|
1710
|
+
let r = e[n];
|
|
1711
|
+
if (this.options.extensions?.renderers?.[r.type]) {
|
|
1712
|
+
let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
|
|
1713
|
+
if (n !== !1 || ![
|
|
1714
|
+
"space",
|
|
1715
|
+
"hr",
|
|
1716
|
+
"heading",
|
|
1717
|
+
"code",
|
|
1718
|
+
"table",
|
|
1719
|
+
"blockquote",
|
|
1720
|
+
"list",
|
|
1721
|
+
"html",
|
|
1722
|
+
"def",
|
|
1723
|
+
"paragraph",
|
|
1724
|
+
"text"
|
|
1725
|
+
].includes(e.type)) {
|
|
1726
|
+
t += n || "";
|
|
1727
|
+
continue;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
let i = r;
|
|
1731
|
+
switch (i.type) {
|
|
1732
|
+
case "space":
|
|
1733
|
+
t += this.renderer.space(i);
|
|
1734
|
+
break;
|
|
1735
|
+
case "hr":
|
|
1736
|
+
t += this.renderer.hr(i);
|
|
1737
|
+
break;
|
|
1738
|
+
case "heading":
|
|
1739
|
+
t += this.renderer.heading(i);
|
|
1740
|
+
break;
|
|
1741
|
+
case "code":
|
|
1742
|
+
t += this.renderer.code(i);
|
|
1743
|
+
break;
|
|
1744
|
+
case "table":
|
|
1745
|
+
t += this.renderer.table(i);
|
|
1746
|
+
break;
|
|
1747
|
+
case "blockquote":
|
|
1748
|
+
t += this.renderer.blockquote(i);
|
|
1749
|
+
break;
|
|
1750
|
+
case "list":
|
|
1751
|
+
t += this.renderer.list(i);
|
|
1752
|
+
break;
|
|
1753
|
+
case "checkbox":
|
|
1754
|
+
t += this.renderer.checkbox(i);
|
|
1755
|
+
break;
|
|
1756
|
+
case "html":
|
|
1757
|
+
t += this.renderer.html(i);
|
|
1758
|
+
break;
|
|
1759
|
+
case "def":
|
|
1760
|
+
t += this.renderer.def(i);
|
|
1761
|
+
break;
|
|
1762
|
+
case "paragraph":
|
|
1763
|
+
t += this.renderer.paragraph(i);
|
|
1764
|
+
break;
|
|
1765
|
+
case "text":
|
|
1766
|
+
t += this.renderer.text(i);
|
|
1767
|
+
break;
|
|
1768
|
+
default: {
|
|
1769
|
+
let e = "Token with \"" + i.type + "\" type was not found.";
|
|
1770
|
+
if (this.options.silent) return console.error(e), "";
|
|
1771
|
+
throw Error(e);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
return t;
|
|
1776
|
+
}
|
|
1777
|
+
parseInline(e, t = this.renderer) {
|
|
1778
|
+
this.renderer.parser = this;
|
|
1779
|
+
let n = "";
|
|
1780
|
+
for (let r = 0; r < e.length; r++) {
|
|
1781
|
+
let i = e[r];
|
|
1782
|
+
if (this.options.extensions?.renderers?.[i.type]) {
|
|
1783
|
+
let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
1784
|
+
if (e !== !1 || ![
|
|
1785
|
+
"escape",
|
|
1786
|
+
"html",
|
|
1787
|
+
"link",
|
|
1788
|
+
"image",
|
|
1789
|
+
"strong",
|
|
1790
|
+
"em",
|
|
1791
|
+
"codespan",
|
|
1792
|
+
"br",
|
|
1793
|
+
"del",
|
|
1794
|
+
"text"
|
|
1795
|
+
].includes(i.type)) {
|
|
1796
|
+
n += e || "";
|
|
1797
|
+
continue;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
let a = i;
|
|
1801
|
+
switch (a.type) {
|
|
1802
|
+
case "escape":
|
|
1803
|
+
n += t.text(a);
|
|
1804
|
+
break;
|
|
1805
|
+
case "html":
|
|
1806
|
+
n += t.html(a);
|
|
1807
|
+
break;
|
|
1808
|
+
case "link":
|
|
1809
|
+
n += t.link(a);
|
|
1810
|
+
break;
|
|
1811
|
+
case "image":
|
|
1812
|
+
n += t.image(a);
|
|
1813
|
+
break;
|
|
1814
|
+
case "checkbox":
|
|
1815
|
+
n += t.checkbox(a);
|
|
1816
|
+
break;
|
|
1817
|
+
case "strong":
|
|
1818
|
+
n += t.strong(a);
|
|
1819
|
+
break;
|
|
1820
|
+
case "em":
|
|
1821
|
+
n += t.em(a);
|
|
1822
|
+
break;
|
|
1823
|
+
case "codespan":
|
|
1824
|
+
n += t.codespan(a);
|
|
1825
|
+
break;
|
|
1826
|
+
case "br":
|
|
1827
|
+
n += t.br(a);
|
|
1828
|
+
break;
|
|
1829
|
+
case "del":
|
|
1830
|
+
n += t.del(a);
|
|
1831
|
+
break;
|
|
1832
|
+
case "text":
|
|
1833
|
+
n += t.text(a);
|
|
1834
|
+
break;
|
|
1835
|
+
default: {
|
|
1836
|
+
let e = "Token with \"" + a.type + "\" type was not found.";
|
|
1837
|
+
if (this.options.silent) return console.error(e), "";
|
|
1838
|
+
throw Error(e);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
return n;
|
|
1843
|
+
}
|
|
1844
|
+
}, $t = class {
|
|
1845
|
+
options;
|
|
1846
|
+
block;
|
|
1847
|
+
constructor(e) {
|
|
1848
|
+
this.options = e || T;
|
|
1849
|
+
}
|
|
1850
|
+
static passThroughHooks = new Set([
|
|
1851
|
+
"preprocess",
|
|
1852
|
+
"postprocess",
|
|
1853
|
+
"processAllTokens",
|
|
1854
|
+
"emStrongMask"
|
|
1855
|
+
]);
|
|
1856
|
+
static passThroughHooksRespectAsync = new Set([
|
|
1857
|
+
"preprocess",
|
|
1858
|
+
"postprocess",
|
|
1859
|
+
"processAllTokens"
|
|
1860
|
+
]);
|
|
1861
|
+
preprocess(e) {
|
|
1862
|
+
return e;
|
|
1863
|
+
}
|
|
1864
|
+
postprocess(e) {
|
|
1865
|
+
return e;
|
|
1866
|
+
}
|
|
1867
|
+
processAllTokens(e) {
|
|
1868
|
+
return e;
|
|
1869
|
+
}
|
|
1870
|
+
emStrongMask(e) {
|
|
1871
|
+
return e;
|
|
1872
|
+
}
|
|
1873
|
+
provideLexer(e = this.block) {
|
|
1874
|
+
return e ? X.lex : X.lexInline;
|
|
1875
|
+
}
|
|
1876
|
+
provideParser(e = this.block) {
|
|
1877
|
+
return e ? Z.parse : Z.parseInline;
|
|
1878
|
+
}
|
|
1879
|
+
}, en = new class {
|
|
1880
|
+
defaults = Qe();
|
|
1881
|
+
options = this.setOptions;
|
|
1882
|
+
parse = this.parseMarkdown(!0);
|
|
1883
|
+
parseInline = this.parseMarkdown(!1);
|
|
1884
|
+
Parser = Z;
|
|
1885
|
+
Renderer = Zt;
|
|
1886
|
+
TextRenderer = Qt;
|
|
1887
|
+
Lexer = X;
|
|
1888
|
+
Tokenizer = Xt;
|
|
1889
|
+
Hooks = $t;
|
|
1890
|
+
constructor(...e) {
|
|
1891
|
+
this.use(...e);
|
|
1892
|
+
}
|
|
1893
|
+
walkTokens(e, t) {
|
|
1894
|
+
let n = [];
|
|
1895
|
+
for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
|
|
1896
|
+
case "table": {
|
|
1897
|
+
let e = r;
|
|
1898
|
+
for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
|
|
1899
|
+
for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
|
|
1900
|
+
break;
|
|
1901
|
+
}
|
|
1902
|
+
case "list": {
|
|
1903
|
+
let e = r;
|
|
1904
|
+
n = n.concat(this.walkTokens(e.items, t));
|
|
1905
|
+
break;
|
|
1906
|
+
}
|
|
1907
|
+
default: {
|
|
1908
|
+
let e = r;
|
|
1909
|
+
this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
|
|
1910
|
+
let i = e[r].flat(Infinity);
|
|
1911
|
+
n = n.concat(this.walkTokens(i, t));
|
|
1912
|
+
}) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
return n;
|
|
1916
|
+
}
|
|
1917
|
+
use(...e) {
|
|
1918
|
+
let t = this.defaults.extensions || {
|
|
1919
|
+
renderers: {},
|
|
1920
|
+
childTokens: {}
|
|
1921
|
+
};
|
|
1922
|
+
return e.forEach((e) => {
|
|
1923
|
+
let n = { ...e };
|
|
1924
|
+
if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
|
|
1925
|
+
if (!e.name) throw Error("extension name required");
|
|
1926
|
+
if ("renderer" in e) {
|
|
1927
|
+
let n = t.renderers[e.name];
|
|
1928
|
+
n ? t.renderers[e.name] = function(...t) {
|
|
1929
|
+
let r = e.renderer.apply(this, t);
|
|
1930
|
+
return r === !1 && (r = n.apply(this, t)), r;
|
|
1931
|
+
} : t.renderers[e.name] = e.renderer;
|
|
1932
|
+
}
|
|
1933
|
+
if ("tokenizer" in e) {
|
|
1934
|
+
if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
|
|
1935
|
+
let n = t[e.level];
|
|
1936
|
+
n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
|
|
1937
|
+
}
|
|
1938
|
+
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
1939
|
+
}), n.extensions = t), e.renderer) {
|
|
1940
|
+
let t = this.defaults.renderer || new Zt(this.defaults);
|
|
1941
|
+
for (let n in e.renderer) {
|
|
1942
|
+
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
1943
|
+
if (["options", "parser"].includes(n)) continue;
|
|
1944
|
+
let r = n, i = e.renderer[r], a = t[r];
|
|
1945
|
+
t[r] = (...e) => {
|
|
1946
|
+
let n = i.apply(t, e);
|
|
1947
|
+
return n === !1 && (n = a.apply(t, e)), n || "";
|
|
1948
|
+
};
|
|
1949
|
+
}
|
|
1950
|
+
n.renderer = t;
|
|
1951
|
+
}
|
|
1952
|
+
if (e.tokenizer) {
|
|
1953
|
+
let t = this.defaults.tokenizer || new Xt(this.defaults);
|
|
1954
|
+
for (let n in e.tokenizer) {
|
|
1955
|
+
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
1956
|
+
if ([
|
|
1957
|
+
"options",
|
|
1958
|
+
"rules",
|
|
1959
|
+
"lexer"
|
|
1960
|
+
].includes(n)) continue;
|
|
1961
|
+
let r = n, i = e.tokenizer[r], a = t[r];
|
|
1962
|
+
t[r] = (...e) => {
|
|
1963
|
+
let n = i.apply(t, e);
|
|
1964
|
+
return n === !1 && (n = a.apply(t, e)), n;
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
n.tokenizer = t;
|
|
1968
|
+
}
|
|
1969
|
+
if (e.hooks) {
|
|
1970
|
+
let t = this.defaults.hooks || new $t();
|
|
1971
|
+
for (let n in e.hooks) {
|
|
1972
|
+
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
1973
|
+
if (["options", "block"].includes(n)) continue;
|
|
1974
|
+
let r = n, i = e.hooks[r], a = t[r];
|
|
1975
|
+
$t.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
1976
|
+
if (this.defaults.async && $t.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
1977
|
+
let n = await i.call(t, e);
|
|
1978
|
+
return a.call(t, n);
|
|
1979
|
+
})();
|
|
1980
|
+
let r = i.call(t, e);
|
|
1981
|
+
return a.call(t, r);
|
|
1982
|
+
} : t[r] = (...e) => {
|
|
1983
|
+
if (this.defaults.async) return (async () => {
|
|
1984
|
+
let n = await i.apply(t, e);
|
|
1985
|
+
return n === !1 && (n = await a.apply(t, e)), n;
|
|
1986
|
+
})();
|
|
1987
|
+
let n = i.apply(t, e);
|
|
1988
|
+
return n === !1 && (n = a.apply(t, e)), n;
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
n.hooks = t;
|
|
1992
|
+
}
|
|
1993
|
+
if (e.walkTokens) {
|
|
1994
|
+
let t = this.defaults.walkTokens, r = e.walkTokens;
|
|
1995
|
+
n.walkTokens = function(e) {
|
|
1996
|
+
let n = [];
|
|
1997
|
+
return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
|
|
1998
|
+
};
|
|
1999
|
+
}
|
|
2000
|
+
this.defaults = {
|
|
2001
|
+
...this.defaults,
|
|
2002
|
+
...n
|
|
2003
|
+
};
|
|
2004
|
+
}), this;
|
|
2005
|
+
}
|
|
2006
|
+
setOptions(e) {
|
|
2007
|
+
return this.defaults = {
|
|
2008
|
+
...this.defaults,
|
|
2009
|
+
...e
|
|
2010
|
+
}, this;
|
|
2011
|
+
}
|
|
2012
|
+
lexer(e, t) {
|
|
2013
|
+
return X.lex(e, t ?? this.defaults);
|
|
2014
|
+
}
|
|
2015
|
+
parser(e, t) {
|
|
2016
|
+
return Z.parse(e, t ?? this.defaults);
|
|
2017
|
+
}
|
|
2018
|
+
parseMarkdown(e) {
|
|
2019
|
+
return (t, n) => {
|
|
2020
|
+
let r = { ...n }, i = {
|
|
2021
|
+
...this.defaults,
|
|
2022
|
+
...r
|
|
2023
|
+
}, a = this.onError(!!i.silent, !!i.async);
|
|
2024
|
+
if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
2025
|
+
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
2026
|
+
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
2027
|
+
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
2028
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? X.lex : X.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
2029
|
+
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
2030
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Z.parse : Z.parseInline)(a, i);
|
|
2031
|
+
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
2032
|
+
})().catch(a);
|
|
2033
|
+
try {
|
|
2034
|
+
i.hooks && (t = i.hooks.preprocess(t));
|
|
2035
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? X.lex : X.lexInline)(t, i);
|
|
2036
|
+
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
2037
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? Z.parse : Z.parseInline)(n, i);
|
|
2038
|
+
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
2039
|
+
} catch (e) {
|
|
2040
|
+
return a(e);
|
|
2041
|
+
}
|
|
2042
|
+
};
|
|
2043
|
+
}
|
|
2044
|
+
onError(e, t) {
|
|
2045
|
+
return (n) => {
|
|
2046
|
+
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
2047
|
+
let e = "<p>An error occurred:</p><pre>" + J(n.message + "", !0) + "</pre>";
|
|
2048
|
+
return t ? Promise.resolve(e) : e;
|
|
2049
|
+
}
|
|
2050
|
+
if (t) return Promise.reject(n);
|
|
2051
|
+
throw n;
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
}();
|
|
2055
|
+
function Q(e, t) {
|
|
2056
|
+
return en.parse(e, t);
|
|
2057
|
+
}
|
|
2058
|
+
Q.options = Q.setOptions = function(e) {
|
|
2059
|
+
return en.setOptions(e), Q.defaults = en.defaults, E(Q.defaults), Q;
|
|
2060
|
+
}, Q.getDefaults = Qe, Q.defaults = T, Q.use = function(...e) {
|
|
2061
|
+
return en.use(...e), Q.defaults = en.defaults, E(Q.defaults), Q;
|
|
2062
|
+
}, Q.walkTokens = function(e, t) {
|
|
2063
|
+
return en.walkTokens(e, t);
|
|
2064
|
+
}, Q.parseInline = en.parseInline, Q.Parser = Z, Q.parser = Z.parse, Q.Renderer = Zt, Q.TextRenderer = Qt, Q.Lexer = X, Q.lexer = X.lex, Q.Tokenizer = Xt, Q.Hooks = $t, Q.parse = Q, Q.options, Q.setOptions, Q.use, Q.walkTokens, Q.parseInline, Z.parse, X.lex;
|
|
2065
|
+
//#endregion
|
|
2066
|
+
//#region src/components/chat-message/chat-message.module.scss?inline
|
|
2067
|
+
var tn = ":host{width:100%;font-family:var(--luzmo-chat-message-font-family,var(--chat-message-font-family));font-size:var(--luzmo-chat-message-font-size,var(--chat-message-font-size));line-height:var(--luzmo-chat-message-line-height,var(--chat-message-line-height));color:var(--highcontrast-chat-message-text-color,var(--luzmo-chat-message-text-color,var(--chat-message-text-color)));display:flex}:host([position=left]){justify-content:flex-start}:host([position=right]){justify-content:flex-end}:host([position=middle]){justify-content:center}.container{gap:var(--luzmo-chat-message-message-to-avatar,var(--chat-message-message-to-avatar));max-width:var(--luzmo-chat-message-max-width,var(--chat-message-max-width));width:fit-content;display:flex}:host(:not([data-has-avatar])) .container{gap:0}:host(:not([data-has-avatar])) .avatar-wrapper{display:none}.position-left{flex-direction:row}.position-left .avatar-wrapper{order:0}.position-left .message-wrapper{order:1;align-items:flex-start}.position-left .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius-bottom-start,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right{flex-direction:row-reverse}.position-right .avatar-wrapper{order:0}.position-right .message-wrapper{order:1;align-items:flex-end}.position-right .header{justify-content:flex-end}.position-right .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius-bottom-end,var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius)))}.position-right .actions-outside{justify-content:flex-end}.position-middle .message-wrapper{align-items:center}.position-middle .header,.position-middle .actions-outside{justify-content:center}.avatar-wrapper{margin-top:var(--luzmo-chat-message-avatar-margin-top,var(--chat-message-avatar-margin-top,0));margin-bottom:var(--luzmo-chat-message-avatar-margin-bottom,var(--chat-message-avatar-margin-bottom,0));flex-shrink:0;align-items:flex-start;display:flex}:host([data-in-group]) .avatar-wrapper{min-width:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)));flex-basis:var(--chat-message-avatar-size,var(--luzmo-avatar-size,var(--avatar-size,32px)))}:host([data-in-group]:not([data-group-square-border])) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important;border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius))!important}.avatar-top .avatar-wrapper{align-self:flex-start}.avatar-middle .avatar-wrapper{align-self:center}.avatar-bottom .avatar-wrapper{align-self:flex-end}.avatar-middle .message-wrapper,.avatar-bottom .message-wrapper{position:relative}.avatar-middle .actions-outside,.avatar-bottom .actions-outside{margin-top:var(--luzmo-chat-message-gap,var(--chat-message-gap));position:absolute;top:100%}.avatar-middle.position-left .actions-outside,.avatar-bottom.position-left .actions-outside{left:0}.avatar-middle.position-right .actions-outside,.avatar-bottom.position-right .actions-outside{right:0}.avatar-bottom.position-left .message{--luzmo-chat-message-message-border-radius-bottom-start:0}.avatar-bottom.position-right .message{--luzmo-chat-message-message-border-radius-bottom-end:0}.message-wrapper{gap:var(--luzmo-chat-message-gap,var(--chat-message-gap));flex-direction:column;min-width:0;display:flex}.message{padding:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding)) var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));border-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-width:var(--luzmo-chat-message-message-border-width,var(--chat-message-message-border-width));border-style:solid;border-color:var(--highcontrast-chat-message-message-border-color,var(--luzmo-chat-message-message-border-color,var(--chat-message-message-border-color)));background-color:var(--highcontrast-chat-message-message-background-color,var(--luzmo-chat-message-message-background-color,var(--chat-message-message-background-color)));box-shadow:var(--luzmo-chat-message-message-shadow,var(--chat-message-message-shadow));color:var(--luzmo-chat-message-message-text-color,var(--chat-message-message-text-color));word-wrap:break-word;overflow-wrap:break-word;max-width:100%;position:relative}.message .header,.message .user-name,.message .datetime,.message .actions-inside{color:inherit}.message.squared-top-left{border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-top-right{border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-left{border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.message.squared-bottom-right{border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-left]) .message{border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=top-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-left]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}:host([data-group-square-border=bottom-right]) .message{border-top-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-top-right-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-left-radius:var(--luzmo-chat-message-message-border-radius,var(--chat-message-message-border-radius));border-bottom-right-radius:var(--luzmo-chat-message-squared-border-radius,var(--chat-message-squared-border-radius))!important}.header{align-items:baseline;gap:var(--luzmo-chat-message-header-gap,var(--chat-message-header-gap));margin-bottom:var(--luzmo-chat-message-header-margin-bottom,var(--chat-message-header-margin-bottom));flex-wrap:wrap;display:flex}:host([meta=outside]) .header{margin-bottom:0}.user-name{font-weight:var(--luzmo-chat-message-user-name-font-weight,var(--chat-message-user-name-font-weight));color:var(--luzmo-chat-message-user-name-color,var(--chat-message-user-name-color))}.datetime{font-size:var(--luzmo-chat-message-datetime-font-size,var(--chat-message-datetime-font-size));color:var(--luzmo-chat-message-datetime-color,var(--chat-message-datetime-color));opacity:var(--luzmo-chat-message-datetime-opacity,var(--chat-message-datetime-opacity))}.content{display:block}.markdown-content>*{margin-block:0 var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing))}.markdown-content>:first-child{margin-top:0}.markdown-content>:last-child{margin-bottom:0}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top)) var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));font-weight:var(--luzmo-chat-message-markdown-heading-font-weight,var(--chat-message-markdown-heading-font-weight));line-height:var(--luzmo-chat-message-markdown-heading-line-height,var(--chat-message-markdown-heading-line-height))}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.3em}.markdown-content h3{font-size:1.15em}.markdown-content h4{font-size:1em}.markdown-content h5{font-size:.9em}.markdown-content h6{font-size:.85em}.markdown-content strong{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content em{font-style:italic}.markdown-content del{text-decoration:line-through}.markdown-content a{color:var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));text-underline-offset:.15em;text-decoration:underline}.markdown-content a:hover{text-decoration-thickness:2px}.markdown-content a:focus-visible{outline:var(--luzmo-indicator-width,1px) solid var(--luzmo-chat-message-markdown-link-color,var(--chat-message-markdown-link-color));outline-offset:2px;border-radius:var(--luzmo-border-radius-s)}.markdown-content code{font-family:var(--luzmo-chat-message-markdown-code-font-family,var(--chat-message-markdown-code-font-family));font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:var(--luzmo-chat-message-markdown-code-background,var(--chat-message-markdown-code-background));border-radius:var(--luzmo-chat-message-markdown-code-radius,var(--chat-message-markdown-code-radius));padding:.15em .35em}.markdown-content pre{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding:var(--luzmo-chat-message-markdown-pre-padding,var(--chat-message-markdown-pre-padding));background:var(--luzmo-chat-message-markdown-pre-background,var(--chat-message-markdown-pre-background));border-radius:var(--luzmo-chat-message-markdown-pre-radius,var(--chat-message-markdown-pre-radius));white-space:pre;scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-scrollbar-thumb-background) var(--luzmo-scrollbar-track-background);overflow-x:auto}.markdown-content pre code{font-size:var(--luzmo-chat-message-markdown-code-font-size,var(--chat-message-markdown-code-font-size));background:0 0;border-radius:0;padding:0}.markdown-content blockquote{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-inline-start:var(--luzmo-spacing-1,2px) solid var(--luzmo-chat-message-markdown-blockquote-border-color,var(--chat-message-markdown-blockquote-border-color));margin-inline:0;padding-inline-start:var(--luzmo-spacing-4)}.markdown-content blockquote>:first-child{margin-top:0}.markdown-content blockquote>:last-child{margin-bottom:0}.markdown-content ul,.markdown-content ol{margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent))}.markdown-content li,.markdown-content li>ul,.markdown-content li>ol{margin-block:var(--luzmo-spacing-1)}.markdown-content li.task-list-item{margin-inline-start:calc(-1 * var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent)));padding-inline-start:var(--luzmo-chat-message-markdown-list-indent,var(--chat-message-markdown-list-indent));list-style:none}.markdown-content li.task-list-item input[type=checkbox]{vertical-align:middle;margin-inline-end:var(--luzmo-spacing-2)}.markdown-content table{width:max-content;max-width:100%;margin-block:var(--luzmo-chat-message-markdown-block-spacing,var(--chat-message-markdown-block-spacing));border-collapse:collapse;display:block;overflow-x:auto}.markdown-content th,.markdown-content td{padding:var(--luzmo-chat-message-markdown-table-cell-padding,var(--chat-message-markdown-table-cell-padding));border:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color));text-align:start}.markdown-content th{font-weight:var(--luzmo-font-weight-bold,600)}.markdown-content hr{margin-block:var(--luzmo-chat-message-markdown-heading-spacing-top,var(--chat-message-markdown-heading-spacing-top));border:0;border-top:var(--luzmo-border-width,1px) solid var(--luzmo-chat-message-markdown-border-color,var(--chat-message-markdown-border-color))}.markdown-content img{border-radius:var(--luzmo-border-radius);max-width:100%;height:auto}.actions{gap:var(--luzmo-chat-message-actions-gap,var(--chat-message-actions-gap));align-items:center;display:flex}.actions-inside{margin-top:var(--luzmo-chat-message-actions-margin-top,var(--chat-message-actions-margin-top))}.actions-outside{opacity:var(--luzmo-chat-message-actions-opacity,var(--chat-message-actions-opacity));transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out}:host(:hover) .actions-outside,:host(:focus-within) .actions-outside{opacity:var(--luzmo-chat-message-actions-opacity-hover,var(--chat-message-actions-opacity-hover))}::slotted([slot=avatar]){display:block}::slotted([slot=actions]){align-items:center;display:inline-flex}.extra-actions{top:var(--luzmo-chat-message-extra-actions-top,var(--chat-message-extra-actions-top));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right));bottom:var(--luzmo-chat-message-extra-actions-bottom,var(--chat-message-extra-actions-bottom));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left));padding:var(--luzmo-chat-message-extra-actions-vertical-padding,var(--chat-message-extra-actions-vertical-padding)) var(--luzmo-chat-message-extra-actions-horizontal-padding,var(--chat-message-extra-actions-horizontal-padding));opacity:0;pointer-events:none;transition:opacity var(--luzmo-chat-message-animation-duration,var(--chat-message-animation-duration)) ease-in-out;z-index:10;position:absolute}:host([position=left]) .extra-actions{left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding)));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m]) .extra-actions{top:calc(-1 * var(--luzmo-spacing-5))}:host([size=m][position=right]) .extra-actions{left:calc(-1 * var(--luzmo-spacing-5));right:var(--luzmo-chat-message-extra-actions-right,var(--chat-message-extra-actions-right), auto)}:host([size=m][position=middle]) .extra-actions,:host([size=m][position=left]) .extra-actions{right:calc(-1 * var(--luzmo-spacing-5));left:var(--luzmo-chat-message-extra-actions-left,var(--chat-message-extra-actions-left), auto)}.extra-actions-wrapper{background-color:var(--luzmo-chat-message-extra-actions-wrapper-background-color,var(--luzmo-background-color));border-radius:var(--luzmo-chat-message-extra-actions-wrapper-border-radius,var(--luzmo-border-radius));border-width:var(--luzmo-chat-message-extra-actions-wrapper-border-width,var(--luzmo-border-width));border-style:var(--luzmo-chat-message-extra-actions-wrapper-border-style,solid);border-color:var(--luzmo-chat-message-extra-actions-wrapper-border,var(--luzmo-border-color));padding:var(--luzmo-chat-message-extra-actions-wrapper-vertical-padding,var(--chat-message-extra-actions-wrapper-vertical-padding)) var(--luzmo-chat-message-extra-actions-wrapper-horizontal-padding,var(--chat-message-extra-actions-wrapper-horizontal-padding));position:var(--luzmo-chat-message-extra-actions-wrapper-position,var(--chat-message-extra-actions-wrapper-position), relative);top:var(--luzmo-chat-message-extra-actions-wrapper-top,var(--chat-message-extra-actions-wrapper-top));right:var(--luzmo-chat-message-extra-actions-wrapper-right,var(--chat-message-extra-actions-wrapper-right));bottom:var(--luzmo-chat-message-extra-actions-wrapper-bottom,var(--chat-message-extra-actions-wrapper-bottom));left:var(--luzmo-chat-message-extra-actions-wrapper-left,var(--chat-message-extra-actions-wrapper-left));align-items:center;display:inline-flex}:host(:hover) .extra-actions,:host(:focus-within) .extra-actions,:host(:active) .extra-actions{opacity:1;pointer-events:auto}::slotted([slot=extra-actions]){align-items:center;display:inline-flex}@media (forced-colors:active){.markdown-content th,.markdown-content td,.markdown-content hr{border-color:canvastext}.markdown-content pre,.markdown-content code{border:1px solid canvastext}.markdown-content pre code{border:0}.markdown-content blockquote{border-inline-start-color:canvastext}.markdown-content a{color:linktext}:host{--highcontrast-chat-message-message-background-color:Canvas;--highcontrast-chat-message-message-border-color:CanvasText;--highcontrast-chat-message-text-color:CanvasText}}:host{--chat-message-message-border-width:var(--luzmo-border-width);--chat-message-message-border-color:var(--luzmo-border-color);--chat-message-message-background-color:var(--luzmo-background-color-highlight);--chat-message-message-shadow:0 1px 2px rgba(var(--luzmo-border-color-rgb), .05);--chat-message-message-text-color:inherit;--chat-message-font-family:var(--luzmo-font-family);--chat-message-font-size:var(--luzmo-font-size);--chat-message-line-height:1.5;--chat-message-text-color:var(--luzmo-font-color);--chat-message-header-gap:var(--luzmo-spacing-2);--chat-message-header-margin-bottom:var(--luzmo-spacing-1);--chat-message-user-name-font-weight:var(--luzmo-font-weight-bold,600);--chat-message-user-name-color:var(--luzmo-font-color);--chat-message-datetime-font-size:.75em;--chat-message-datetime-color:var(--luzmo-font-color-secondary);--chat-message-datetime-opacity:.7;--chat-message-actions-gap:var(--luzmo-spacing-1);--chat-message-actions-margin-top:var(--luzmo-spacing-2);--chat-message-actions-opacity:1;--chat-message-actions-opacity-hover:1;--chat-message-animation-duration:var(--luzmo-animation-duration,.15s);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-3);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-primary-background-color:var(--luzmo-primary);--chat-message-primary-border-color:var(--luzmo-primary);--chat-message-primary-text-color:var(--luzmo-primary-inverse-color);--chat-message-primary-text-color-outline:var(--luzmo-primary);--chat-message-secondary-background-color:var(--luzmo-secondary);--chat-message-secondary-border-color:var(--luzmo-secondary);--chat-message-secondary-text-color:var(--luzmo-secondary-inverse-color);--chat-message-secondary-text-color-outline:var(--luzmo-secondary);--chat-message-markdown-block-spacing:var(--luzmo-spacing-4);--chat-message-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--chat-message-markdown-heading-spacing-top:var(--luzmo-spacing-5);--chat-message-markdown-heading-line-height:1.25;--chat-message-markdown-code-font-family:ui-monospace, sfmono-regular, \"SF Mono\", menlo, consolas, \"Liberation Mono\", monospace;--chat-message-markdown-code-font-size:.875em;--chat-message-markdown-code-background:var(--luzmo-background-color-highlight);--chat-message-markdown-code-radius:var(--luzmo-border-radius-s);--chat-message-markdown-pre-background:var(--luzmo-background-color-highlight);--chat-message-markdown-pre-radius:var(--luzmo-border-radius);--chat-message-markdown-pre-padding:var(--luzmo-spacing-4);--chat-message-markdown-border-color:var(--luzmo-border-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-border-color);--chat-message-markdown-link-color:var(--luzmo-primary);--chat-message-markdown-list-indent:var(--luzmo-spacing-5);--chat-message-markdown-table-cell-padding:var(--luzmo-spacing-2) var(--luzmo-spacing-3)}:host([position=middle]){--chat-message-max-width:90%}:host{--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:var(--luzmo-spacing-4);--chat-message-max-width:80%;--chat-message-content-vertical-padding:var(--luzmo-spacing-4);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xs]){--chat-message-message-border-radius:var(--luzmo-border-radius);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:11px;--chat-message-content-vertical-padding:var(--luzmo-spacing-3);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-1);--chat-message-message-to-avatar:var(--luzmo-spacing-3)}:host([size=s]){--chat-message-message-border-radius:var(--luzmo-border-radius-l);--chat-message-squared-border-radius:var(--luzmo-border-radius-xs);--chat-message-font-size:12px;--chat-message-content-vertical-padding:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--chat-message-content-horizontal-padding:var(--luzmo-spacing-4);--chat-message-gap:var(--luzmo-spacing-2);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=l]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:16px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--chat-message-gap:var(--luzmo-spacing-3);--chat-message-message-to-avatar:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1))}:host([size=xl]){--chat-message-message-border-radius:var(--luzmo-border-radius-xl);--chat-message-squared-border-radius:var(--luzmo-border-radius-s);--chat-message-font-size:18px;--chat-message-content-vertical-padding:var(--luzmo-spacing-5);--chat-message-content-horizontal-padding:var(--luzmo-spacing-5);--chat-message-gap:var(--luzmo-spacing-4);--chat-message-message-to-avatar:var(--luzmo-spacing-5)}:host([treatment=fill]){--chat-message-message-shadow:none}:host([variant=default][treatment=fill]){--chat-message-message-border-width:0}:host([variant=primary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-primary-background-color);--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color)}:host([variant=secondary][treatment=fill]){--chat-message-message-background-color:var(--chat-message-secondary-background-color);--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color)}:host([variant=primary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-primary-down);--chat-message-markdown-pre-background:var(--luzmo-primary-down);--chat-message-markdown-link-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-primary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-primary-inverse-color)}:host([variant=secondary][treatment=fill]:not([quiet])){--chat-message-markdown-code-background:var(--luzmo-secondary-down);--chat-message-markdown-pre-background:var(--luzmo-secondary-down);--chat-message-markdown-link-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-border-color:var(--luzmo-secondary-inverse-color);--chat-message-markdown-blockquote-border-color:var(--luzmo-secondary-inverse-color)}:host([treatment=outline]){--chat-message-message-background-color:transparent;--chat-message-message-shadow:none}:host([variant=primary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-primary-border-color);--chat-message-message-text-color:var(--chat-message-primary-text-color-outline)}:host([variant=secondary][treatment=outline]){--chat-message-message-border-color:var(--chat-message-secondary-border-color);--chat-message-message-text-color:var(--chat-message-secondary-text-color-outline)}:host([quiet]){--chat-message-message-background-color:transparent;--chat-message-message-border-color:transparent;--chat-message-message-border-width:0;--chat-message-message-shadow:none;--chat-message-content-vertical-padding:0;--chat-message-content-horizontal-padding:0}:host([quiet][avatar-placement=top]){--chat-message-avatar-margin-top:calc((var(--chat-message-line-height) - 1) / 2 * 1em)}:host([quiet][avatar-placement=bottom]){--chat-message-avatar-margin-bottom:calc((var(--chat-message-line-height) - 1) / 2 * -1em)}:host([quiet][variant=primary]){--chat-message-primary-background-color:transparent;--chat-message-primary-border-color:transparent;--chat-message-primary-text-color:var(--luzmo-primary)}:host([quiet][variant=secondary]){--chat-message-secondary-background-color:transparent;--chat-message-secondary-border-color:transparent;--chat-message-secondary-text-color:var(--luzmo-secondary)}:host{--chat-message-extra-actions-top:var(--luzmo-chat-message-content-vertical-padding,var(--chat-message-content-vertical-padding));--chat-message-extra-actions-right:var(--luzmo-chat-message-content-horizontal-padding,var(--chat-message-content-horizontal-padding));--chat-message-extra-actions-bottom:auto;--chat-message-extra-actions-left:auto;--chat-message-extra-actions-vertical-padding:0;--chat-message-extra-actions-horizontal-padding:0;--chat-message-extra-actions-wrapper-background-color:var(--luzmo-border-color);--chat-message-extra-actions-wrapper-border-radius:var(--luzmo-border-radius);--chat-message-extra-actions-wrapper-border:none;--chat-message-extra-actions-wrapper-vertical-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-horizontal-padding:var(--luzmo-spacing-1);--chat-message-extra-actions-wrapper-position:relative;--chat-message-extra-actions-wrapper-top:auto;--chat-message-extra-actions-wrapper-right:auto;--chat-message-extra-actions-wrapper-bottom:auto;--chat-message-extra-actions-wrapper-left:auto}", $ = class extends n(e, {
|
|
2068
|
+
validSizes: [
|
|
2069
|
+
"xs",
|
|
2070
|
+
"s",
|
|
2071
|
+
"m",
|
|
2072
|
+
"l",
|
|
2073
|
+
"xl"
|
|
2074
|
+
],
|
|
2075
|
+
defaultSize: "m"
|
|
2076
|
+
}) {
|
|
2077
|
+
constructor() {
|
|
2078
|
+
super(), this.defaultSlotObserver = new MutationObserver((e) => {
|
|
2079
|
+
this.hasUpdated && e.some((e) => this.shouldUpdateForDefaultSlotMutation(e)) && this.requestUpdate();
|
|
2080
|
+
}), this.position = "right", this.variant = "default", this.treatment = "fill", this.quiet = !1, this.meta = "inside", this.actionsPosition = "outside", this.avatarPlacement = "top", this._hasAvatar = !1, this._hasActions = !1, this._hasExtraActions = !1, this.languageResolver = new r(this);
|
|
2081
|
+
}
|
|
2082
|
+
connectedCallback() {
|
|
2083
|
+
super.connectedCallback(), this.defaultSlotObserver.observe(this, {
|
|
2084
|
+
attributes: !0,
|
|
2085
|
+
attributeFilter: ["slot"],
|
|
2086
|
+
childList: !0,
|
|
2087
|
+
characterData: !0,
|
|
2088
|
+
subtree: !0
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
disconnectedCallback() {
|
|
2092
|
+
this.defaultSlotObserver.disconnect(), super.disconnectedCallback();
|
|
2093
|
+
}
|
|
2094
|
+
static get styles() {
|
|
2095
|
+
return [o(tn)];
|
|
2096
|
+
}
|
|
2097
|
+
_handleAvatarSlotChange(e) {
|
|
2098
|
+
let t = e.target;
|
|
2099
|
+
this._hasAvatar = t.assignedNodes().length > 0, this._hasAvatar ? this.setAttribute("data-has-avatar", "") : this.removeAttribute("data-has-avatar");
|
|
2100
|
+
}
|
|
2101
|
+
_handleActionsSlotChange(e) {
|
|
2102
|
+
let t = e.target;
|
|
2103
|
+
this._hasActions = t.assignedNodes().length > 0;
|
|
2104
|
+
}
|
|
2105
|
+
_handleExtraActionsSlotChange(e) {
|
|
2106
|
+
let t = e.target;
|
|
2107
|
+
this._hasExtraActions = t.assignedNodes().length > 0;
|
|
2108
|
+
}
|
|
2109
|
+
shouldUpdateForDefaultSlotMutation(e) {
|
|
2110
|
+
switch (e.type) {
|
|
2111
|
+
case "attributes": return e.attributeName === "slot" && e.target.parentNode === this;
|
|
2112
|
+
case "characterData": return e.target.parentNode === this;
|
|
2113
|
+
case "childList": return e.target === this && [...e.addedNodes, ...e.removedNodes].some((e) => e.nodeType === Node.TEXT_NODE || e.nodeType === Node.CDATA_SECTION_NODE || e.nodeType === Node.ELEMENT_NODE && !e.hasAttribute("slot"));
|
|
2114
|
+
default: return !1;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
get defaultSlotMarkdown() {
|
|
2118
|
+
let e = [...this.childNodes].filter((e) => e.nodeType !== Node.ELEMENT_NODE || !e.hasAttribute("slot"));
|
|
2119
|
+
if (e.some((e) => e.nodeType === Node.ELEMENT_NODE)) return;
|
|
2120
|
+
let t = e.filter((e) => e.nodeType === Node.TEXT_NODE || e.nodeType === Node.CDATA_SECTION_NODE).map((e) => e.textContent || "").join("").replaceAll("\r\n", "\n").replaceAll("\r", "\n").trim();
|
|
2121
|
+
if (t) return Ze.sanitize(Q.parse(t, {
|
|
2122
|
+
gfm: !0,
|
|
2123
|
+
async: !1
|
|
2124
|
+
}), { USE_PROFILES: { html: !0 } });
|
|
2125
|
+
}
|
|
2126
|
+
renderDefaultSlotFallback() {
|
|
2127
|
+
let e = this.defaultSlotMarkdown;
|
|
2128
|
+
return e ? i`
|
|
2129
|
+
<div class="markdown-content">
|
|
2130
|
+
${u(e)}
|
|
2131
|
+
</div>
|
|
2132
|
+
` : i`<slot data-default-slot></slot>`;
|
|
2133
|
+
}
|
|
2134
|
+
get formattedDatetime() {
|
|
2135
|
+
if (this.datetime) try {
|
|
2136
|
+
let e = new Date(this.datetime);
|
|
2137
|
+
if (Number.isNaN(e.getTime())) return;
|
|
2138
|
+
let t = this.datetimeFormatOptions || {
|
|
2139
|
+
hour: "numeric",
|
|
2140
|
+
minute: "numeric"
|
|
2141
|
+
};
|
|
2142
|
+
return new Intl.DateTimeFormat(this.datetimeLanguage || this.languageResolver.language || void 0, t).format(e);
|
|
2143
|
+
} catch {
|
|
2144
|
+
return;
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
get squaredCorners() {
|
|
2148
|
+
let e = {
|
|
2149
|
+
topLeft: !1,
|
|
2150
|
+
topRight: !1,
|
|
2151
|
+
bottomLeft: !1,
|
|
2152
|
+
bottomRight: !1
|
|
2153
|
+
};
|
|
2154
|
+
if (this.position === "left") switch (this.avatarPlacement) {
|
|
2155
|
+
case "top":
|
|
2156
|
+
e.topLeft = !0;
|
|
2157
|
+
break;
|
|
2158
|
+
case "middle": break;
|
|
2159
|
+
case "bottom":
|
|
2160
|
+
e.bottomLeft = !0;
|
|
2161
|
+
break;
|
|
2162
|
+
}
|
|
2163
|
+
else if (this.position === "right") switch (this.avatarPlacement) {
|
|
2164
|
+
case "top":
|
|
2165
|
+
e.topRight = !0;
|
|
2166
|
+
break;
|
|
2167
|
+
case "middle": break;
|
|
2168
|
+
case "bottom":
|
|
2169
|
+
e.bottomRight = !0;
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
return e;
|
|
2173
|
+
}
|
|
2174
|
+
renderMeta() {
|
|
2175
|
+
return !this.name && !this.formattedDatetime ? a : i`
|
|
2176
|
+
<div class="header" part="header">
|
|
2177
|
+
${this.name ? i`<span class="user-name">${this.name}</span>` : a}
|
|
2178
|
+
${this.formattedDatetime ? i`<time class="datetime" datetime=${this.datetime || ""}>
|
|
2179
|
+
${this.formattedDatetime}
|
|
2180
|
+
</time>` : a}
|
|
2181
|
+
</div>
|
|
2182
|
+
`;
|
|
2183
|
+
}
|
|
2184
|
+
renderActions(e) {
|
|
2185
|
+
return this.actionsPosition === e ? this._hasActions ? i`
|
|
2186
|
+
<div class="actions actions-${e}" part="actions">
|
|
2187
|
+
<slot
|
|
2188
|
+
name="actions"
|
|
2189
|
+
@slotchange=${this._handleActionsSlotChange}
|
|
2190
|
+
></slot>
|
|
2191
|
+
</div>
|
|
2192
|
+
` : i`<slot
|
|
2193
|
+
name="actions"
|
|
2194
|
+
@slotchange=${this._handleActionsSlotChange}
|
|
2195
|
+
></slot>` : a;
|
|
2196
|
+
}
|
|
2197
|
+
render() {
|
|
2198
|
+
let e = this.squaredCorners, t = {
|
|
2199
|
+
message: !0,
|
|
2200
|
+
"squared-top-left": e.topLeft,
|
|
2201
|
+
"squared-top-right": e.topRight,
|
|
2202
|
+
"squared-bottom-left": e.bottomLeft,
|
|
2203
|
+
"squared-bottom-right": e.bottomRight,
|
|
2204
|
+
"has-avatar": this._hasAvatar
|
|
2205
|
+
};
|
|
2206
|
+
return i`
|
|
2207
|
+
<div class=${l({
|
|
2208
|
+
container: !0,
|
|
2209
|
+
[`position-${this.position}`]: !0,
|
|
2210
|
+
[`avatar-${this.avatarPlacement}`]: !0
|
|
2211
|
+
})}>
|
|
2212
|
+
<div class="avatar-wrapper">
|
|
2213
|
+
<slot
|
|
2214
|
+
name="avatar"
|
|
2215
|
+
@slotchange=${this._handleAvatarSlotChange}
|
|
2216
|
+
></slot>
|
|
2217
|
+
</div>
|
|
2218
|
+
|
|
2219
|
+
<div class="message-wrapper">
|
|
2220
|
+
${this.meta === "outside" ? this.renderMeta() : a}
|
|
2221
|
+
|
|
2222
|
+
<div class=${l(t)} part="message">
|
|
2223
|
+
${this.meta === "inside" ? this.renderMeta() : a}
|
|
2224
|
+
|
|
2225
|
+
<div class="content" part="content">
|
|
2226
|
+
<slot name="message">${this.renderDefaultSlotFallback()}</slot>
|
|
2227
|
+
</div>
|
|
2228
|
+
|
|
2229
|
+
${this.renderActions("inside")}
|
|
2230
|
+
${this._hasExtraActions ? i`
|
|
2231
|
+
<div class="extra-actions" part="extra-actions">
|
|
2232
|
+
<div
|
|
2233
|
+
class="extra-actions-wrapper"
|
|
2234
|
+
part="extra-actions-wrapper"
|
|
2235
|
+
>
|
|
2236
|
+
<slot
|
|
2237
|
+
name="extra-actions"
|
|
2238
|
+
@slotchange=${this._handleExtraActionsSlotChange}
|
|
2239
|
+
></slot>
|
|
2240
|
+
</div>
|
|
2241
|
+
</div>
|
|
2242
|
+
` : i`
|
|
2243
|
+
<slot
|
|
2244
|
+
name="extra-actions"
|
|
2245
|
+
@slotchange=${this._handleExtraActionsSlotChange}
|
|
2246
|
+
></slot>
|
|
2247
|
+
`}
|
|
2248
|
+
</div>
|
|
2249
|
+
|
|
2250
|
+
${this.renderActions("outside")}
|
|
2251
|
+
</div>
|
|
2252
|
+
</div>
|
|
2253
|
+
`;
|
|
2254
|
+
}
|
|
2255
|
+
};
|
|
2256
|
+
//#endregion
|
|
2257
|
+
//#region src/components/chat-message/index.ts
|
|
2258
|
+
t([s({
|
|
2259
|
+
type: String,
|
|
2260
|
+
reflect: !0
|
|
2261
|
+
})], $.prototype, "position", void 0), t([s({
|
|
2262
|
+
type: String,
|
|
2263
|
+
reflect: !0
|
|
2264
|
+
})], $.prototype, "variant", void 0), t([s({
|
|
2265
|
+
type: String,
|
|
2266
|
+
reflect: !0
|
|
2267
|
+
})], $.prototype, "treatment", void 0), t([s({
|
|
2268
|
+
type: Boolean,
|
|
2269
|
+
reflect: !0
|
|
2270
|
+
})], $.prototype, "quiet", void 0), t([s({
|
|
2271
|
+
type: String,
|
|
2272
|
+
attribute: "name"
|
|
2273
|
+
})], $.prototype, "name", void 0), t([s({
|
|
2274
|
+
type: String,
|
|
2275
|
+
attribute: "datetime"
|
|
2276
|
+
})], $.prototype, "datetime", void 0), t([s({
|
|
2277
|
+
type: Object,
|
|
2278
|
+
attribute: "datetime-format-options"
|
|
2279
|
+
})], $.prototype, "datetimeFormatOptions", void 0), t([s({
|
|
2280
|
+
type: String,
|
|
2281
|
+
attribute: "datetime-language"
|
|
2282
|
+
})], $.prototype, "datetimeLanguage", void 0), t([s({
|
|
2283
|
+
type: String,
|
|
2284
|
+
reflect: !0
|
|
2285
|
+
})], $.prototype, "meta", void 0), t([s({
|
|
2286
|
+
type: String,
|
|
2287
|
+
reflect: !0,
|
|
2288
|
+
attribute: "actions"
|
|
2289
|
+
})], $.prototype, "actionsPosition", void 0), t([s({
|
|
2290
|
+
type: String,
|
|
2291
|
+
reflect: !0,
|
|
2292
|
+
attribute: "avatar-placement"
|
|
2293
|
+
})], $.prototype, "avatarPlacement", void 0), t([c()], $.prototype, "_hasAvatar", void 0), t([c()], $.prototype, "_hasActions", void 0), t([c()], $.prototype, "_hasExtraActions", void 0), customElements.get("luzmo-chat-message") || customElements.define("luzmo-chat-message", $);
|
|
2294
|
+
//#endregion
|
|
2295
|
+
export { $ as t };
|