useblocks 1.1.85-dev.10 → 1.1.85-dev.11
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 +70 -40
- package/compat-globals.js +1 -1
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/js/discussHandlers.sDXLf5I7.js +88 -0
- package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.714faf8a.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.js → iframe.body.714faf8a.js} +35 -35
- package/iframe/js/iframe.js +2 -2
- package/package.json +4 -1
- package/runtime/THIRD_PARTY_LICENSES.txt +49 -42
- package/runtime/package.json +4 -1
- package/runtime/react/index.js +1 -1
- package/runtime/uuid/index.js +21 -0
- package/static/core/11bc33e0.js +1 -0
- package/static/core/1ed86ed3.js +1 -0
- package/static/core/248de796.js +1 -0
- package/static/core/{e50b6f57.js → 274b5d7a.js} +1 -1
- package/static/core/4067c5be.js +1 -0
- package/static/core/453596ac.js +27 -0
- package/static/core/4b12ae50.js +1 -0
- package/static/core/{db82c42b.js → 50d547f6.js} +1 -1
- package/static/core/549c0ef1.js +1 -0
- package/static/core/{b29146b3.js → 563a690f.js} +5 -5
- package/static/core/{c1bf6439.js → 5c62f38b.js} +1 -1
- package/static/core/5f949f39.js +1 -0
- package/static/core/{e0d71533.js → 60aa31a3.js} +6 -6
- package/static/core/{79749848.js → 66619f08.js} +7 -7
- package/static/core/7052d050.js +28 -0
- package/static/core/{984e936f.js → 7555e955.js} +1 -1
- package/static/core/{55a38638.js → 7c89682e.js} +7 -7
- package/static/core/83c17079.js +2 -0
- package/static/core/{4c83d06a.js → 8c5284f6.js} +1 -1
- package/static/core/{e0e5c9b9.js → 958fe93e.js} +2 -2
- package/static/core/{6fcb3c31.js → a3f7b4c9.js} +1 -1
- package/static/core/{9560f31a.js → a494cc9f.js} +1 -1
- package/static/core/{a5996860.js → a6303cb2.js} +1 -1
- package/static/core/b8a0f663.js +1 -0
- package/static/core/bb65f553.js +1 -0
- package/static/core/{4c3f5897.js → c2f990cf.js} +2 -2
- package/static/core/{72d350ea.js → c8d6258e.js} +1 -1
- package/static/core/{3ece766f.js → d58ae4ac.js} +2 -2
- package/static/core/d61988e0.js +7 -0
- package/static/core/d887672a.js +1 -0
- package/static/core/dcc37768.js +1 -0
- package/static/core/{30841c46.js → e50f64f6.js} +1 -1
- package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
- package/static/esm/2490dab8.js +1 -0
- package/static/esm/971f1b2c.js +1 -0
- package/static/esm/ad8c16a9.js +1 -0
- package/static/esm/f76c9d9d.js +1 -0
- package/static/umd/6639d610.js +1 -0
- package/static/umd-runtime/B7h7P1Np.js +1 -0
- package/static/umd-runtime/{DHIkHsbq.js → BAqQTgiL.js} +1 -1
- package/static/umd-runtime/{DiNHpyis.js → BB6AXfHj.js} +1 -1
- package/static/umd-runtime/{CnUGCoaH.js → BauvM4c_.js} +1 -1
- package/static/umd-runtime/{cL_ha9ef.js → CgVJ4rE0.js} +1 -1
- package/static/umd-runtime/Cvm7BS4_.js +341 -0
- package/static/umd-runtime/{BnE05QKl.js → D7DggGzi.js} +1 -1
- package/static/umd-runtime/{2iAslXEF.js → DBbch1O-.js} +1 -1
- package/static/umd-runtime/{Bcqtk2f7.js → Dqoi-pC_.js} +2 -2
- package/static/umd-runtime/{CDTBLHGd.js → G2k8ELiO.js} +3 -3
- package/static/umd-runtime/{CVtPwspX.js → SFp4nbvq.js} +1 -1
- package/static/umd-runtime/{DVB_-O4B.js → UsRzAWs2.js} +1 -1
- package/static/umd-runtime/runtime.js +1 -1
- package/static/umd-runtime/ui-kit-icons.js +1 -1
- package/static/umd-runtime/ui-kit.js +2 -2
- package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
- package/useblocks-core.714faf8a.js +859 -0
- package/useblocks-esm.js +11 -11
- package/{useblocks-po.8098d114.js → useblocks-po.714faf8a.js} +1 -1
- package/useblocks.d.ts +109 -25
- package/useblocks.js +39 -15
- package/vendor/@rc-component/cascader/package.json +1 -1
- package/vendor/@rc-component/dialog/es/Dialog/Content/Panel.js +3 -2
- package/vendor/@rc-component/dialog/package.json +1 -1
- package/vendor/@rc-component/image/es/Preview/index.js +3 -3
- package/vendor/@rc-component/image/package.json +1 -1
- package/vendor/@rc-component/input/es/BaseInput.js +3 -3
- package/vendor/@rc-component/input/es/Input.js +20 -27
- package/vendor/@rc-component/{textarea → input}/es/ResizableTextArea.js +5 -4
- package/vendor/@rc-component/{textarea → input}/es/TextArea.js +30 -40
- package/vendor/@rc-component/{textarea → input}/es/calculateNodeHeight.js +4 -4
- package/vendor/@rc-component/input/es/hooks/useCountDisplay.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useCountExceed.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useMergedValue.js +13 -0
- package/vendor/@rc-component/input/es/index.js +3 -1
- package/vendor/@rc-component/input/package.json +1 -1
- package/vendor/@rc-component/mentions/es/DropdownMenu.js +1 -1
- package/vendor/@rc-component/mentions/es/Mentions.js +35 -8
- package/vendor/@rc-component/mentions/package.json +1 -1
- package/vendor/@rc-component/menu/es/Menu.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItem.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItemGroup.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/PopupTrigger.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/index.js +1 -0
- package/vendor/@rc-component/menu/es/context/MenuContext.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useAccessibility.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useKeyRecords.js +1 -0
- package/vendor/@rc-component/menu/es/utils/commonUtil.js +1 -0
- package/vendor/@rc-component/menu/es/utils/nodeUtil.js +2 -1
- package/vendor/@rc-component/menu/es/utils/warnUtil.js +1 -0
- package/vendor/@rc-component/menu/package.json +1 -1
- package/vendor/@rc-component/notification/LICENSE +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/LICENSE +22 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Children/toArray.js +15 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/canUseDom.js +6 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/contains.js +13 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/dynamicCSS.js +94 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/findDOMNode.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/focus.js +99 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/isVisible.js +18 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/shadow.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/styleChecker.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/KeyCode.js +499 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Portal.js +28 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/isFragment.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/render.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/getScrollBarSize.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useControlledState.js +3 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useDelayState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useEvent.js +9 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useId.js +23 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useLayoutEffect.js +26 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMemo.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMergedState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useState.js +24 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useSyncState.js +20 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/index.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/is.js +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isEqual.js +35 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isMobile.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/mergeProps.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/omit.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/pickAttrs.js +50 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/proxyObject.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/raf.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/ref.js +38 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/test/domHook.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/get.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/set.js +58 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/warning.js +46 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/package.json +6 -0
- package/vendor/@rc-component/notification/es/Notification.js +129 -0
- package/vendor/@rc-component/notification/es/NotificationList/Content.js +33 -0
- package/vendor/@rc-component/notification/es/NotificationList/index.js +174 -0
- package/vendor/@rc-component/notification/es/NotificationProvider.js +4 -3
- package/vendor/@rc-component/notification/es/Notifications.js +28 -31
- package/vendor/@rc-component/notification/es/Progress.js +10 -0
- package/vendor/@rc-component/notification/es/hooks/useClosable.js +30 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/index.js +50 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/useSizes.js +33 -0
- package/vendor/@rc-component/notification/es/hooks/useNoticeTimer.js +58 -0
- package/vendor/@rc-component/notification/es/hooks/useNotification.js +27 -18
- package/vendor/@rc-component/notification/es/hooks/useStack.js +4 -4
- package/vendor/@rc-component/notification/es/index.js +4 -2
- package/vendor/@rc-component/notification/package.json +1 -1
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js +13 -3
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/index.js +3 -1
- package/vendor/@rc-component/picker/es/PickerInput/SinglePicker.js +2 -1
- package/vendor/@rc-component/picker/package.json +1 -1
- package/vendor/@rc-component/table/LICENSE +21 -0
- package/vendor/@rc-component/table/es/Body/MeasureCell.js +1 -0
- package/vendor/@rc-component/table/es/Body/MeasureRow.js +1 -0
- package/vendor/@rc-component/table/es/Cell/useCellRender.js +1 -0
- package/vendor/@rc-component/table/es/FixedHolder/index.js +1 -0
- package/vendor/@rc-component/table/es/Table.js +17 -9
- package/vendor/@rc-component/table/es/VirtualTable/BodyGrid.js +10 -4
- package/vendor/@rc-component/table/es/VirtualTable/BodyLine.js +13 -5
- package/vendor/@rc-component/table/es/hooks/useColumns/index.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useExpand.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useFixedInfo.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useSticky.js +1 -0
- package/vendor/@rc-component/table/es/index.js +2 -1
- package/vendor/@rc-component/table/es/stickyScrollBar.js +1 -0
- package/vendor/@rc-component/table/es/utils/legacyUtil.js +1 -0
- package/vendor/@rc-component/table/es/utils/offsetUtil.js +1 -0
- package/vendor/@rc-component/table/package.json +1 -1
- package/vendor/@rc-component/tabs/es/TabNavList/OperationNode.js +4 -2
- package/vendor/@rc-component/tabs/es/TabNavList/TabNode.js +5 -4
- package/vendor/@rc-component/tabs/es/TabNavList/index.js +11 -4
- package/vendor/@rc-component/tabs/es/Tabs.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useIndicator.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useUpdate.js +1 -0
- package/vendor/@rc-component/tabs/package.json +1 -1
- package/vendor/@rc-component/tour/es/TourStep/DefaultPanel.js +4 -1
- package/vendor/@rc-component/tour/package.json +1 -1
- package/vendor/@rc-component/tree/es/MotionTreeNode.js +1 -0
- package/vendor/@rc-component/tree/es/NodeList.js +2 -2
- package/vendor/@rc-component/tree/es/Tree.js +4 -5
- package/vendor/@rc-component/tree/es/TreeNode.js +7 -2
- package/vendor/@rc-component/tree/es/index.js +3 -0
- package/vendor/@rc-component/tree/es/useUnmount.js +1 -0
- package/vendor/@rc-component/tree/es/util.js +1 -0
- package/vendor/@rc-component/tree/es/utils/conductUtil.js +1 -0
- package/vendor/@rc-component/tree/es/utils/treeUtil.js +1 -0
- package/vendor/@rc-component/tree/package.json +1 -1
- package/vendor/@rc-component/tree-select/package.json +1 -1
- package/vendor/@rc-component/util/es/index.js +10 -10
- package/vendor/antd/es/_util/ActionButton.js +2 -3
- package/vendor/antd/es/_util/ContextIsolator.js +1 -1
- package/vendor/antd/es/_util/PurePanel.js +7 -4
- package/vendor/antd/es/_util/convertToTooltipProps.js +2 -2
- package/vendor/antd/es/_util/fallbackProp.js +15 -0
- package/vendor/antd/es/_util/gapSize.js +2 -1
- package/vendor/antd/es/_util/getRenderPropValue.js +2 -1
- package/vendor/antd/es/_util/getScroll.js +4 -4
- package/vendor/antd/es/_util/hooks/index.js +2 -2
- package/vendor/antd/es/_util/hooks/useAllowClear.js +25 -0
- package/vendor/antd/es/_util/hooks/useClosable.js +6 -5
- package/vendor/antd/es/_util/hooks/{useMergeSemantic.js → useMergeSemantic/index.js} +14 -24
- package/vendor/antd/es/_util/hooks/useMergeSemantic/utils.js +14 -0
- package/vendor/antd/es/_util/hooks/useMergedMask.js +2 -1
- package/vendor/antd/es/_util/is.js +27 -0
- package/vendor/antd/es/_util/motion.js +8 -8
- package/vendor/antd/es/_util/normalizeIcon.js +9 -0
- package/vendor/antd/es/_util/placements.js +2 -1
- package/vendor/antd/es/_util/reactNode.js +2 -1
- package/vendor/antd/es/_util/responsiveObserver.js +3 -2
- package/vendor/antd/es/_util/scrollTo.js +3 -1
- package/vendor/antd/es/_util/styleChecker.js +1 -0
- package/vendor/antd/es/_util/throttleByAnimationFrame.js +1 -0
- package/vendor/antd/es/_util/toList.js +1 -1
- package/vendor/antd/es/_util/wave/WaveEffect.js +3 -1
- package/vendor/antd/es/_util/wave/index.js +14 -4
- package/vendor/antd/es/_util/wave/util.js +5 -3
- package/vendor/antd/es/alert/Alert.js +12 -10
- package/vendor/antd/es/alert/ErrorBoundary.js +1 -1
- package/vendor/antd/es/alert/style/index.js +16 -10
- package/vendor/antd/es/anchor/Anchor.js +23 -16
- package/vendor/antd/es/anchor/AnchorLink.js +4 -4
- package/vendor/antd/es/app/App.js +7 -3
- package/vendor/antd/es/auto-complete/AutoComplete.js +7 -8
- package/vendor/antd/es/avatar/Avatar.js +5 -3
- package/vendor/antd/es/back-top/index.js +1 -0
- package/vendor/antd/es/badge/Badge.js +5 -6
- package/vendor/antd/es/badge/Ribbon.js +1 -2
- package/vendor/antd/es/badge/style/index.js +4 -3
- package/vendor/antd/es/border-beam/BorderBeam.js +42 -0
- package/vendor/antd/es/border-beam/BorderBeamEffect.js +24 -0
- package/vendor/antd/es/border-beam/hooks/useBorderSize.js +37 -0
- package/vendor/antd/es/border-beam/hooks/useChildDom.js +24 -0
- package/vendor/antd/es/border-beam/index.js +7 -0
- package/vendor/antd/es/border-beam/style/index.js +60 -0
- package/vendor/antd/es/border-beam/util.js +26 -0
- package/vendor/antd/es/breadcrumb/Breadcrumb.js +1 -2
- package/vendor/antd/es/breadcrumb/BreadcrumbItem.js +1 -1
- package/vendor/antd/es/breadcrumb/useItemRender.js +3 -2
- package/vendor/antd/es/button/Button.js +7 -6
- package/vendor/antd/es/button/buttonHelpers.js +4 -8
- package/vendor/antd/es/button/index.js +2 -2
- package/vendor/antd/es/button/style/index.js +5 -0
- package/vendor/antd/es/calendar/generateCalendar.js +20 -8
- package/vendor/antd/es/card/Card.js +5 -7
- package/vendor/antd/es/card/CardMeta.js +1 -2
- package/vendor/antd/es/carousel/index.js +2 -1
- package/vendor/antd/es/cascader/Panel.js +1 -1
- package/vendor/antd/es/cascader/index.js +23 -16
- package/vendor/antd/es/cascader/style/columns.js +6 -2
- package/vendor/antd/es/checkbox/Checkbox.js +2 -3
- package/vendor/antd/es/checkbox/Group.js +2 -1
- package/vendor/antd/es/checkbox/style/index.js +1 -5
- package/vendor/antd/es/checkbox/useBubbleLock.js +1 -0
- package/vendor/antd/es/collapse/Collapse.js +3 -3
- package/vendor/antd/es/collapse/style/index.js +1 -4
- package/vendor/antd/es/color-picker/ColorPicker.js +1 -2
- package/vendor/antd/es/color-picker/ColorPickerPanel.js +2 -1
- package/vendor/antd/es/color-picker/components/ColorTrigger.js +3 -1
- package/vendor/antd/es/color-picker/components/PanelPicker/index.js +1 -0
- package/vendor/antd/es/config-provider/hooks/useSize.js +3 -2
- package/vendor/antd/es/config-provider/hooks/useTheme.js +2 -0
- package/vendor/antd/es/config-provider/index.js +11 -3
- package/vendor/antd/es/date-picker/generatePicker/generateRangePicker.js +20 -10
- package/vendor/antd/es/date-picker/generatePicker/generateSinglePicker.js +17 -8
- package/vendor/antd/es/date-picker/generatePicker/useSuffixIcon.js +1 -1
- package/vendor/antd/es/date-picker/hooks/useMergedPickerSemantic.js +1 -2
- package/vendor/antd/es/date-picker/style/index.js +13 -3
- package/vendor/antd/es/date-picker/style/multiple.js +3 -4
- package/vendor/antd/es/date-picker/style/panel.js +5 -20
- package/vendor/antd/es/date-picker/util.js +14 -13
- package/vendor/antd/es/descriptions/Cell.js +2 -3
- package/vendor/antd/es/descriptions/hooks/useItems.js +2 -1
- package/vendor/antd/es/descriptions/index.js +3 -3
- package/vendor/antd/es/divider/index.js +3 -2
- package/vendor/antd/es/drawer/Drawer.js +10 -5
- package/vendor/antd/es/drawer/DrawerPanel.js +3 -2
- package/vendor/antd/es/dropdown/dropdown.js +11 -8
- package/vendor/antd/es/dropdown/style/index.js +2 -6
- package/vendor/antd/es/empty/index.js +1 -2
- package/vendor/antd/es/flex/index.js +2 -2
- package/vendor/antd/es/float-button/BackTop.js +1 -0
- package/vendor/antd/es/float-button/FloatButton.js +3 -3
- package/vendor/antd/es/float-button/FloatButtonGroup.js +2 -2
- package/vendor/antd/es/form/ErrorList.js +13 -6
- package/vendor/antd/es/form/Form.js +7 -6
- package/vendor/antd/es/form/FormItem/ItemHolder.js +1 -1
- package/vendor/antd/es/form/FormItem/index.js +6 -6
- package/vendor/antd/es/form/FormItemInput.js +5 -3
- package/vendor/antd/es/form/FormItemLabel.js +2 -1
- package/vendor/antd/es/form/FormList.js +1 -0
- package/vendor/antd/es/form/hooks/useChildren.js +4 -3
- package/vendor/antd/es/form/hooks/useForm.js +3 -1
- package/vendor/antd/es/form/hooks/useFrameState.js +1 -0
- package/vendor/antd/es/form/hooks/useItemRef.js +7 -5
- package/vendor/antd/es/form/style/index.js +1 -3
- package/vendor/antd/es/grid/col.js +5 -7
- package/vendor/antd/es/grid/hooks/useBreakpoint.js +1 -0
- package/vendor/antd/es/grid/hooks/useGutter.js +2 -1
- package/vendor/antd/es/grid/row.js +7 -6
- package/vendor/antd/es/image/PreviewGroup.js +1 -2
- package/vendor/antd/es/image/Progress.js +58 -0
- package/vendor/antd/es/image/hooks/useMergedPreviewConfig.js +3 -1
- package/vendor/antd/es/image/hooks/usePlaceholderConfig.js +15 -0
- package/vendor/antd/es/image/hooks/usePreviewConfig.js +3 -2
- package/vendor/antd/es/image/index.js +36 -5
- package/vendor/antd/es/image/style/index.js +114 -4
- package/vendor/antd/es/image/style/progressAnimation.js +26 -0
- package/vendor/antd/es/index.js +2 -1
- package/vendor/antd/es/input/Input.js +9 -4
- package/vendor/antd/es/input/OTP/OTPInput.js +1 -0
- package/vendor/antd/es/input/OTP/index.js +3 -3
- package/vendor/antd/es/input/Password.js +45 -26
- package/vendor/antd/es/input/Search.js +6 -5
- package/vendor/antd/es/input/TextArea.js +13 -7
- package/vendor/antd/es/input/style/index.js +17 -11
- package/vendor/antd/es/input/style/otp.js +2 -1
- package/vendor/antd/es/input/style/variants.js +16 -10
- package/vendor/antd/es/input-number/index.js +3 -3
- package/vendor/antd/es/input-number/style/index.js +9 -9
- package/vendor/antd/es/layout/Sider.js +3 -2
- package/vendor/antd/es/list/index.js +5 -3
- package/vendor/antd/es/locale/en_US.js +3 -1
- package/vendor/antd/es/locale/ru_RU.js +3 -1
- package/vendor/antd/es/locale/useLocale.js +2 -1
- package/vendor/antd/es/masonry/Masonry.js +4 -3
- package/vendor/antd/es/mentions/index.js +28 -14
- package/vendor/antd/es/menu/MenuItem.js +2 -1
- package/vendor/antd/es/menu/OverrideContext.js +1 -0
- package/vendor/antd/es/menu/SubMenu.js +1 -1
- package/vendor/antd/es/menu/menu.js +5 -5
- package/vendor/antd/es/menu/style/index.js +21 -36
- package/vendor/antd/es/menu/style/vertical.js +2 -1
- package/vendor/antd/es/message/PureList.js +49 -0
- package/vendor/antd/es/message/PurePanel.js +28 -36
- package/vendor/antd/es/message/index.js +6 -3
- package/vendor/antd/es/message/style/index.js +102 -99
- package/vendor/antd/es/message/useMessage.js +29 -33
- package/vendor/antd/es/message/util.js +1 -1
- package/vendor/antd/es/modal/ConfirmDialog.js +11 -9
- package/vendor/antd/es/modal/Modal.js +12 -7
- package/vendor/antd/es/modal/PurePanel.js +1 -2
- package/vendor/antd/es/modal/confirm.js +4 -3
- package/vendor/antd/es/modal/shared.js +3 -2
- package/vendor/antd/es/modal/useModal/HookModal.js +2 -1
- package/vendor/antd/es/notification/PureList.js +46 -0
- package/vendor/antd/es/notification/PurePanel.js +37 -56
- package/vendor/antd/es/notification/hooks/useStackConfig.js +13 -0
- package/vendor/antd/es/notification/index.js +3 -1
- package/vendor/antd/es/notification/style/index.js +103 -170
- package/vendor/antd/es/notification/style/notification.js +191 -0
- package/vendor/antd/es/notification/style/placement.js +117 -60
- package/vendor/antd/es/notification/useNotification.js +37 -40
- package/vendor/antd/es/notification/util.js +9 -50
- package/vendor/antd/es/pagination/Pagination.js +1 -2
- package/vendor/antd/es/pagination/useShowSizeChanger.js +2 -1
- package/vendor/antd/es/popconfirm/PurePanel.js +4 -1
- package/vendor/antd/es/popconfirm/index.js +1 -2
- package/vendor/antd/es/popover/PurePanel.js +1 -2
- package/vendor/antd/es/popover/index.js +1 -2
- package/vendor/antd/es/progress/Circle.js +2 -1
- package/vendor/antd/es/progress/progress.js +3 -3
- package/vendor/antd/es/progress/utils.js +4 -3
- package/vendor/antd/es/qr-code/index.js +4 -4
- package/vendor/antd/es/radio/group.js +4 -3
- package/vendor/antd/es/radio/radio.js +2 -2
- package/vendor/antd/es/radio/style/index.js +1 -1
- package/vendor/antd/es/rate/index.js +2 -4
- package/vendor/antd/es/result/index.js +6 -5
- package/vendor/antd/es/result/style/index.js +10 -6
- package/vendor/antd/es/segmented/index.js +5 -3
- package/vendor/antd/es/select/index.js +23 -12
- package/vendor/antd/es/select/style/dropdown.js +1 -1
- package/vendor/antd/es/select/style/select-input.js +23 -15
- package/vendor/antd/es/select/useIcons.js +43 -26
- package/vendor/antd/es/skeleton/Element.js +2 -1
- package/vendor/antd/es/skeleton/Skeleton.js +3 -3
- package/vendor/antd/es/slider/SliderTooltip.js +1 -0
- package/vendor/antd/es/slider/index.js +5 -3
- package/vendor/antd/es/slider/useRafLock.js +1 -0
- package/vendor/antd/es/space/Compact.js +1 -1
- package/vendor/antd/es/space/Item.js +1 -1
- package/vendor/antd/es/space/index.js +2 -2
- package/vendor/antd/es/space/style/addon.js +5 -2
- package/vendor/antd/es/spin/Indicator/Progress.js +2 -1
- package/vendor/antd/es/spin/index.js +1 -2
- package/vendor/antd/es/splitter/Panel.js +7 -3
- package/vendor/antd/es/splitter/SplitBar.js +5 -4
- package/vendor/antd/es/splitter/Splitter.js +9 -6
- package/vendor/antd/es/splitter/hooks/useItems.js +2 -1
- package/vendor/antd/es/splitter/hooks/useSizes.js +1 -1
- package/vendor/antd/es/splitter/style/index.js +8 -6
- package/vendor/antd/es/statistic/Number.js +8 -4
- package/vendor/antd/es/statistic/Statistic.js +14 -10
- package/vendor/antd/es/steps/index.js +4 -4
- package/vendor/antd/es/style/compact-item-vertical.js +2 -1
- package/vendor/antd/es/style/compact-item.js +6 -6
- package/vendor/antd/es/switch/index.js +1 -2
- package/vendor/antd/es/table/InternalTable.js +23 -14
- package/vendor/antd/es/table/hooks/useFilledColumns.js +23 -0
- package/vendor/antd/es/table/hooks/useFilter/FilterDropdown.js +22 -16
- package/vendor/antd/es/table/hooks/useFilter/FilterWrapper.js +1 -0
- package/vendor/antd/es/table/hooks/useFilter/index.js +34 -18
- package/vendor/antd/es/table/hooks/useLazyKVMap.js +2 -1
- package/vendor/antd/es/table/hooks/usePagination.js +7 -4
- package/vendor/antd/es/table/hooks/useSelection.js +32 -21
- package/vendor/antd/es/table/hooks/useSorter.js +10 -5
- package/vendor/antd/es/table/style/bordered.js +5 -27
- package/vendor/antd/es/table/style/empty.js +1 -4
- package/vendor/antd/es/table/style/index.js +1 -4
- package/vendor/antd/es/table/util.js +6 -6
- package/vendor/antd/es/tabs/hooks/useAnimateConfig.js +2 -1
- package/vendor/antd/es/tabs/index.js +1 -2
- package/vendor/antd/es/tag/CheckableTagGroup.js +8 -5
- package/vendor/antd/es/tag/hooks/useColor.js +4 -3
- package/vendor/antd/es/tag/index.js +13 -7
- package/vendor/antd/es/theme/themes/dark/colors.js +2 -1
- package/vendor/antd/es/theme/themes/default/colors.js +2 -1
- package/vendor/antd/es/theme/useToken.js +2 -2
- package/vendor/antd/es/theme/util/alias.js +34 -29
- package/vendor/antd/es/timeline/Timeline.js +3 -4
- package/vendor/antd/es/tooltip/PurePanel.js +1 -2
- package/vendor/antd/es/tooltip/UniqueProvider/index.js +2 -1
- package/vendor/antd/es/tooltip/index.js +9 -7
- package/vendor/antd/es/tour/PurePanel.js +2 -2
- package/vendor/antd/es/tour/index.js +1 -1
- package/vendor/antd/es/tour/panelRender.js +4 -2
- package/vendor/antd/es/transfer/ListBody.js +3 -1
- package/vendor/antd/es/transfer/ListItem.js +2 -1
- package/vendor/antd/es/transfer/Section.js +17 -8
- package/vendor/antd/es/transfer/index.js +51 -16
- package/vendor/antd/es/transfer/style/index.js +5 -1
- package/vendor/antd/es/tree/Tree.js +1 -2
- package/vendor/antd/es/tree/style/index.js +5 -1
- package/vendor/antd/es/tree/utils/iconUtil.js +5 -4
- package/vendor/antd/es/tree-select/index.js +3 -3
- package/vendor/antd/es/typography/Base/CopyBtn.js +3 -2
- package/vendor/antd/es/typography/Base/Ellipsis.js +3 -3
- package/vendor/antd/es/typography/Base/index.js +38 -31
- package/vendor/antd/es/typography/Editable.js +10 -4
- package/vendor/antd/es/typography/Link.js +1 -0
- package/vendor/antd/es/typography/Text.js +2 -1
- package/vendor/antd/es/typography/Typography.js +20 -10
- package/vendor/antd/es/typography/hooks/useCopyClick.js +2 -1
- package/vendor/antd/es/typography/hooks/useMergedConfig.js +13 -7
- package/vendor/antd/es/typography/hooks/useTooltipProps.js +2 -1
- package/vendor/antd/es/typography/hooks/useTypographySemantic.js +33 -0
- package/vendor/antd/es/typography/style/index.js +12 -27
- package/vendor/antd/es/typography/style/mixins.js +46 -13
- package/vendor/antd/es/upload/Upload.js +13 -7
- package/vendor/antd/es/upload/UploadList/ListItem.js +6 -5
- package/vendor/antd/es/upload/UploadList/index.js +4 -3
- package/vendor/antd/es/upload/utils.js +18 -1
- package/vendor/antd/es/version/version.js +1 -1
- package/vendor/antd/es/watermark/index.js +6 -4
- package/vendor/antd/es/watermark/useSingletonCache.js +1 -0
- package/vendor/antd/es/watermark/useWatermark.js +3 -3
- package/vendor/antd/package.json +1 -1
- package/vendor/useblocks-ui-kit/es/components/DataEntry/Input/index.js +1 -1
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/iframe/js/discussHandlers.CCCXIEaO.js +0 -88
- package/static/core/1f101241.js +0 -1
- package/static/core/1fa93ad8.js +0 -28
- package/static/core/2007bc93.js +0 -1
- package/static/core/30ab7b1d.js +0 -1
- package/static/core/440a91be.js +0 -1
- package/static/core/44e96a78.js +0 -1
- package/static/core/823aedee.js +0 -1
- package/static/core/828583e1.js +0 -2
- package/static/core/8cc6e392.js +0 -1
- package/static/core/9aefcefb.js +0 -1
- package/static/core/a4f90443.js +0 -27
- package/static/core/a7ac37cd.js +0 -1
- package/static/core/df41de18.js +0 -7
- package/static/esm/349f9e2c.js +0 -1
- package/static/esm/50fbfdf6.js +0 -1
- package/static/media/icon-sets/lucide.json +0 -6275
- package/static/media/icon-sets/tabler.json +0 -19336
- package/static/umd-runtime/Cl8heeC3.js +0 -1
- package/static/umd-runtime/D0xo8o9c.js +0 -335
- package/useblocks-core.8098d114.js +0 -859
- package/vendor/@rc-component/notification/es/Notice.js +0 -106
- package/vendor/@rc-component/notification/es/NoticeList.js +0 -98
- package/vendor/@rc-component/textarea/LICENSE.md +0 -9
- package/vendor/@rc-component/textarea/es/index.js +0 -6
- package/vendor/@rc-component/textarea/package.json +0 -6
- package/vendor/antd/es/_util/extendsObject.js +0 -12
- package/vendor/antd/es/_util/getAllowClear.js +0 -12
- package/vendor/antd/es/_util/isNonNullable.js +0 -6
- package/vendor/antd/es/_util/isPrimitive.js +0 -4
- package/vendor/antd/es/notification/style/pure-panel.js +0 -18
- package/vendor/antd/es/notification/style/stack.js +0 -85
- /package/iframe/{iframe-eblock.8098d114.html → iframe-eblock.714faf8a.html} +0 -0
- /package/iframe/{iframe.8098d114.html → iframe.714faf8a.html} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
2
|
-
`);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&
|
|
3
|
-
`)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:
|
|
4
|
-
`)}function
|
|
1
|
+
__useblocks__.define("static/core/66619f08.js",["require","exports","module","static/core/2ff39ddf.js"],function(Ct,Et,nn){const on=Ct("./2ff39ddf.js");function x(t){const e=new Map;return t&&t.split(";").map(n=>n.trim()).filter(Boolean).forEach(n=>{const o=n.indexOf(":");if(o===-1)return;const r=n.slice(0,o).trim().toLowerCase(),i=n.slice(o+1).trim();r&&e.set(r,i)}),e}function R(t){return t.replace(/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])(?![0-9a-fA-F])/g,(e,n,o,r)=>`#${n}${n}${o}${o}${r}${r}`)}function P(t){return Array.from(t.entries()).filter(([,e])=>e!==""&&e!=null).map(([e,n])=>`${e}: ${R(n)};`).join(" ")}function E(t){const e=o=>{if(!o)return null;const r=/^(-?\d+(?:\.\d+)?)px$/.exec(o.trim());return r?Math.round(parseFloat(r[1])):/^0$/.test(o.trim())?0:null},n=t.get("padding");if(n){const o=n.trim().split(/\s+/);if(o.length===1){const r=e(o[0]);return{top:r,right:r,bottom:r,left:r}}if(o.length===2){const r=e(o[0]),i=e(o[1]);return{top:r,right:i,bottom:r,left:i}}if(o.length===3)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[1])};if(o.length===4)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[3])}}return{top:e(t.get("padding-top")),right:e(t.get("padding-right")),bottom:e(t.get("padding-bottom")),left:e(t.get("padding-left"))}}function T(t,e){return t==null&&e==null?null:(t??0)+(e??0)}function Pt(t,e){return{top:T(t.top,e.top),right:T(t.right,e.right),bottom:T(t.bottom,e.bottom),left:T(t.left,e.left)}}function Q(t,e,n){if(!e&&!n)return;const o=E(t),r=o.top??0,i=(o.right??0)+n,l=o.bottom??0,s=(o.left??0)+e;t.delete("padding"),t.delete("padding-top"),t.delete("padding-right"),t.delete("padding-bottom"),t.delete("padding-left"),t.set("padding",`${r}px ${i}px ${l}px ${s}px`)}function Mt(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function L(t,e){if(t)return x(t.getAttribute("style")).get(e.toLowerCase())}function M(t){if(!t)return null;const e=t.getAttribute("width");if(e){const o=e.trim();if(/^\d+(\.\d+)?$/.test(o))return Math.round(parseFloat(o));const r=/^(\d+(?:\.\d+)?)px$/i.exec(o);if(r)return Math.round(parseFloat(r[1]))}const n=L(t,"width")??L(t,"max-width");if(n){const o=/^(\d+(?:\.\d+)?)px$/i.exec(n.trim());if(o)return Math.round(parseFloat(o[1]))}return null}function Ft(t,e){const n=M(t);if(n!=null)return n;const o=t.getAttribute("width")?.trim()??"",r=/^(\d+(?:\.\d+)?)%$/.exec(o);return r?Math.round(parseFloat(r[1])/100*e):e}function y(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Tt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var Lt=["font-family","font-size","font-weight","font-style","line-height","letter-spacing","color","direction","text-decoration","text-transform"];function Nt(...t){const e=new Map;return Lt.forEach(n=>{for(const o of t){const r=o?.get(n);if(r!=null&&r!==""){e.set(n,r);break}}}),e}function Bt(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());return e?parseFloat(e[1]):null}function Rt(t){const e=t.get("line-height")?.trim();if(!e||e==="normal"||e==="inherit")return;const n=/^(-?\d+(?:\.\d+)?)px$/i.exec(e);if(n){t.set("line-height",`${Math.round(parseFloat(n[1]))}px`);return}const o=Bt(t.get("font-size"));if(o==null)return;const r=/^(\d+(?:\.\d+)?)%$/.exec(e);if(r){t.set("line-height",`${Math.round(o*parseFloat(r[1])/100)}px`);return}const i=/^(\d+(?:\.\d+)?)em$/i.exec(e);if(i){t.set("line-height",`${Math.round(o*parseFloat(i[1]))}px`);return}const l=/^(\d+(?:\.\d+)?)$/.exec(e);l&&t.set("line-height",`${Math.round(o*parseFloat(l[1]))}px`)}function zt(t){const e=t.get("letter-spacing")?.trim();e!=null&&(/^-?(?:\d+(?:\.\d+)?|\.\d+)/.test(e)||t.delete("letter-spacing"))}function Ht(t,e){[t,...Array.from(t.querySelectorAll("[style]"))].forEach(n=>{const o=n.getAttribute("style");if(!o||!o.toLowerCase().includes(e.toLowerCase()))return;const r=x(o);if(!r.has(e))return;r.delete(e);const i=P(r);i?n.setAttribute("style",i):n.removeAttribute("style")})}function qt(t){t.get("direction")?.trim().toLowerCase()==="ltr"&&t.delete("direction")}function It(...t){for(const e of t){const n=e?.get("text-align");if(n)return n}}function tt(t){const e=t?/^(\d+(?:\.\d+)?)px$/.exec(t.trim()):null;return e?Math.round(parseFloat(e[1])):null}function et(t,e){const n=tt(t.get(`margin-${e}`));if(n!=null)return n;const o=t.get("margin");if(!o)return null;const r=o.trim().split(/\s+/);return tt(r[e==="top"||r.length<3?0:2])}function jt(t){return et(t,"top")}function Ot(t){return et(t,"bottom")}var D={top:null,right:null,bottom:null,left:null};function Wt(){return{padPadding:{top:null,right:null,bottom:null,left:null},divFontSize:null,divLineHeight:null,divTextAlign:null,btnFontSize:null,btnLineHeight:null,btnWidthPerc:null,spacerHeight:null}}function G(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());if(e)return Math.round(parseFloat(e[1]));const n=/^(-?\d+(?:\.\d+)?)$/.exec(t.trim());return n?Math.round(parseFloat(n[1])):null}function Dt(t){if(!t)return null;const e=/^(\d+(?:\.\d+)?)%$/.exec(t.trim());return e?Math.round(parseFloat(e[1])):null}function Gt(t){const e=t?.trim().toLowerCase();return e==="left"||e==="center"||e==="right"?e:null}function nt(t,e){let n=0;for(let o=e;o<t.length;o+=1)if(t[o]==="{")n+=1;else if(t[o]==="}"&&(n-=1,n===0))return o;return-1}function U(t,e){["top","right","bottom","left"].forEach(n=>{e[n]!=null&&(t[n]=e[n])})}function Ut(t){const e=x(t.replace(/!important/gi,"")),n=["padding","padding-top","padding-right","padding-bottom","padding-left"].some(o=>e.has(o));return{padding:n?E(e):{...D},hasPadding:n,fontSize:G(e.get("font-size")),lineHeight:G(e.get("line-height")),textAlign:Gt(e.get("text-align")),widthPerc:Dt(e.get("width")),height:G(e.get("height"))}}function Vt(t,e){const n=t.blocks.get(e);if(n)return n;const o=Wt();return t.blocks.set(e,o),o}function Zt(t,e,n){const o=/\.row-(\d+)\b/.exec(t);if(!o)return;const r=o[1],i=/\.column-(\d+)\b/.exec(t),l=/\.block-(\d+)\b/.exec(t);if(t.includes(".row-content")&&!i&&!l){if(e.hasPadding){const b=n.rowContentPadding.get(r)??{...D};U(b,e.padding),n.rowContentPadding.set(r,b)}return}if(i&&!l&&!t.includes(".row-content")){if(e.hasPadding){const b=`${r}|${i[1]}`,d=n.columnPadding.get(b)??{...D};U(d,e.padding),n.columnPadding.set(b,d)}return}if(!i||!l)return;const s=Vt(n,`${r}|${i[1]}|${l[1]}`),c=/td\.pad\s*>\s*div/.test(t)||/\bh[1-6]\b/.test(t),a=/\.button\b/.test(t),h=/\bspan\b/.test(t),f=/\.spacer_block\b/.test(t),g=/td\.pad\b/.test(t);if(f){e.height!=null&&(s.spacerHeight=e.height);return}if(c){e.fontSize!=null&&(s.divFontSize=e.fontSize),e.lineHeight!=null&&(s.divLineHeight=e.lineHeight),e.textAlign!=null&&(s.divTextAlign=e.textAlign);return}if(h){e.fontSize!=null&&(s.btnFontSize=e.fontSize),e.lineHeight!=null&&(s.btnLineHeight=e.lineHeight);return}if(a){e.widthPerc!=null&&(s.btnWidthPerc=e.widthPerc);return}g&&e.hasPadding&&U(s.padPadding,e.padding)}function Kt(t,e){let n=0;for(;n<t.length;){const o=t.indexOf("{",n);if(o===-1)break;const r=t.slice(n,o).trim(),i=nt(t,o);if(i===-1)break;const l=t.slice(o+1,i);if(!r.startsWith("@")){const s=Ut(l);r.split(",").forEach(c=>Zt(c.trim(),s,e))}n=i+1}}function Yt(t){const e={rowContentPadding:new Map,columnPadding:new Map,blocks:new Map},n=Array.from(t.querySelectorAll("style")).map(r=>r.textContent??"").join(`
|
|
2
|
+
`);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&Kt(n.slice(i+1,s),e),o=s+1}return e}function ot(t,e){if(!t)return[];const n=["top","right","bottom","left"],o=[];return n.forEach(r=>{const i=t[r];i!=null&&i!==(e[r]??0)&&o.push(`em-mob-padding_${r}-${i}`)}),o}function Xt(t){const e=/\bblock-(\d+)\b/.exec(t.getAttribute("class")??""),n=t.closest("td.column"),o=n?/\bcolumn-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=t.closest("table.row"),i=r?/\brow-(\d+)\b/.exec(r.getAttribute("class")??""):null;return!i||!o||!e?null:`${i[1]}|${o[1]}|${e[1]}`}var Jt="em-show-td-mobile",Qt="em-show-td-desktop";function rt(t){const e=t.getAttribute("class")??"";return/\bdesktop_hide\b/.test(e)?"mobile":/\bmobile_hide\b/.test(e)?"desktop":"all"}function te(t){return t==="mobile"?{className:Jt,inlineStyle:"display: none;",wrapNonMso:!0}:t==="desktop"?{className:Qt,inlineStyle:"",wrapNonMso:!1}:{className:"",inlineStyle:"",wrapNonMso:!1}}var it="-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif";function lt(t,e){if(!e)return null;const n=(t.get("font-style")??"").toLowerCase().includes("italic"),o=e.register(t.get("font-family"),t.get("font-weight"),n);return o?(t.set("font-family",o.fallback),o.emClass):null}function ee(t){const e=t.closest("table")?.getAttribute("cellpadding");if(e==null)return null;const n=parseInt(e.trim(),10);return Number.isFinite(n)?n:null}function st(t,e){const n=E(e),o=ee(t);return o==null?n:{top:n.top??o,right:n.right??o,bottom:n.bottom??o,left:n.left??o}}function at(t,e){return t==null?null:(e??0)+t}function ne(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function ct(t,e,n){const o=n?.left??0,r=n?.right??0,i=n?.mobileLeft??o,l=n?.mobileRight??r,s=t.top??0,c=(t.right??0)+r,a=t.bottom??0,h=(t.left??0)+o,f=[],g=(b,d,w)=>{d!==w&&f.push(`em-mob-padding_${b}-${d}`)};return e?.top!=null&&g("top",e.top,s),e?.bottom!=null&&g("bottom",e.bottom,a),(e?.left!=null||i!==o)&&g("left",(e?.left??t.left??0)+i,h),(e?.right!=null||l!==r)&&g("right",(e?.right??t.right??0)+l,c),{style:ne({top:s,right:c,bottom:a,left:h}),classes:f}}function N(t,e,n=""){const o=[];t.align&&o.push(`align="${y(t.align)}"`),t.valign&&o.push(`valign="${y(t.valign)}"`),t.width&&o.push(`width="${y(t.width)}"`),t.height&&o.push(`height="${y(t.height)}"`),t.className&&o.push(`class="${y(t.className)}"`);let r=t.style??"";if(t.insetX&&(t.insetX.left||t.insetX.right)){const a=x(r);Q(a,t.insetX.left,t.insetX.right),r=P(a)}r&&o.push(`style="${y(r)}"`);const i=o.length?` ${o.join(" ")}`:"",l=["em-mob-width-100perc"];let s="";t.visibility==="desktop"?l.push("em-show-table-desktop"):t.visibility==="mobile"&&(l.push("em-show-table-mobile"),s=' style="display: none;"');const c=`<table cellpadding="0" cellspacing="0" border="0" width="100%" class="${l.join(" ")}"${s} em="atom"${n}><tr><td${i}>${e}</td></tr></table>`;return t.visibility==="mobile"?`<!--[if !mso]><!-->${c}<!--<![endif]-->`:c}function ut(t){return t.querySelector("td.pad")??t.querySelector("td")}function j(t,e){if(!e)return;const n=Xt(t);return n?e.blocks.get(n):void 0}function z(t,e,n,o){const r=ut(t),i=r?st(r,x(r.getAttribute("style"))):{top:null,right:null,bottom:null,left:null},l=i.top==null&&i.right==null&&i.bottom==null&&i.left==null,s=j(t,e);return ct(o&&l?o:i,s?.padPadding,n)}function oe(t){if(!t)return[];const e=[];return t.divFontSize!=null&&e.push(`em-mob-font_size-${t.divFontSize}px`),t.divLineHeight!=null&&e.push(`em-mob-line_height-${t.divLineHeight}px`),e}var O="p, h1, h2, h3, h4, h5, h6",dt="data-em-text-run",re=`${O}, [${dt}]`;function ie(t){const e=t;return t.nodeType===1&&e.querySelector(O)!=null}function le(t){return t.map(e=>e.textContent??"").join("").replace(/\u00a0/g," ").trim()!==""?!0:t.some(e=>{const n=e;return e.nodeType===1&&(n.matches("img")||n.querySelector("img")!=null)})}function se(t){const e=t.ownerDocument;if(!e)return;const n=o=>{let r=[];const i=()=>{const l=r;if(r=[],l.length===0||!le(l))return;const s=e.createElement("div");s.setAttribute(dt,""),o.insertBefore(s,l[0]),l.forEach(c=>s.appendChild(c))};Array.from(o.childNodes).forEach(l=>{if(l.nodeType===1&&l.matches(O)){i();return}if(ie(l)){i(),n(l);return}r.push(l)}),i()};n(t)}function ft(t,e){let n=t;for(;n;){const o=Array.from(n.classList).find(r=>r.startsWith("em-font-"));if(o)return o;if(n===e)return null;n=n.parentElement}return null}function ae(t,e){let n=t.parentElement;for(;n&&n!==e;){const o=x(n.getAttribute("style"));if(o.get("font-family")||o.get("font-size")||o.get("color"))return o;n=n.parentElement}return new Map}function ce(t,e,n,o,r){const i=ut(t);if(!i)return"";const l=x(i.getAttribute("style")),s=st(i,l),c=i.getAttribute("align")??void 0,a=j(t,e),h=oe(a);i.querySelector(O)&&se(i);let f=Array.from(i.querySelectorAll(re));if(f.length===0){const d=i.querySelector("div");d&&(d.textContent??"").trim()!==""?f=[d]:(i.textContent??"").trim()!==""&&(f=[i])}if(f.length===0)return"";const g=/\bheading_block\b/.test(t.getAttribute("class")??""),b=f.length;return f.map((d,w)=>{const m=x(d.getAttribute("style")),u=ae(d,i),p=Nt(m,u,l);g&&!p.get("font-weight")&&p.set("font-weight","700"),p.get("font-family")||p.set("font-family",it),Rt(p),zt(p),qt(p);const A=lt(p,n)??ft(d,i),_=It(m,u,l)??d.getAttribute("align")??c??"left",C=jt(m),$=Ot(m),k={top:T(C,w===0?s.top:null),right:s.right,bottom:T($,w===b-1?s.bottom:null),left:s.left};Ht(d,"word-break");const v=d.innerHTML.trim(),B=A?[...h,A]:h,H=`<div${B.length?` class="${B.join(" ")}"`:""} style="${P(p)}">${v}</div>`,{style:q,classes:I}=ct(k,{top:w===0?at(a?.padPadding.top,C):null,right:a?.padPadding.right??null,bottom:w===b-1?at(a?.padPadding.bottom,$):null,left:a?.padPadding.left??null},o),F=[...I];return a?.divTextAlign!=null&&F.push(`em-mob-text_align-${a.divTextAlign}`),N({align:_??void 0,style:q||void 0,className:F.length?F.join(" "):void 0,visibility:r},H)}).join(`
|
|
3
|
+
`)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:F,classes:W}=z(t,e,o,{top:10,right:null,bottom:10,left:null});return N({align:I,style:F||void 0,className:W.length?W.join(" "):void 0,visibility:r},q)}function pe(t,e,n,o){const r=t.querySelector(".divider_inner")??t.querySelector('td[style*="border-top"]'),i=L(r,"border-top")??"1px solid #BFBFBF",{style:l,classes:s}=z(t,e,n,{top:20,right:null,bottom:null,left:null});return N({height:"0",style:`${l}${l?" ":""}border-top: ${i};`,className:s.length?s.join(" "):void 0,visibility:o}," ")}function be(t,e,n,o){const r=t.matches(".spacer_block")?t:t.querySelector(".spacer_block"),i=r?L(r,"height"):void 0,l=i?parseInt(i,10):NaN;if(!Number.isFinite(l)||l<=0)return"";const s=j(t,e),c=[];s?.spacerHeight!=null&&s.spacerHeight!==l&&c.push(`em-mob-height-${s.spacerHeight}px`);const{style:a,classes:h}=z(t,e,n);return c.push(...h),N({height:String(l),style:a||void 0,className:c.length?c.join(" "):void 0,visibility:o},"")}function we(t,e,n,o){const r=Array.from(t.querySelectorAll("a")).map(h=>{const f=h.getAttribute("href")??"",g=h.querySelector("img");if(!g)return"";const b=g.getAttribute("src")??"",d=g.getAttribute("width")??"40",w=g.getAttribute("alt")??"",m=g.getAttribute("title")??"",u=Math.round(parseFloat(d))||40,p=Math.round(parseFloat(g.getAttribute("height")??""))||null,A=p?` height="${p}"`:"",_=p?"":"height:auto;";return`<td><a href="${y(f)}" target="_blank"><img src="${y(b)}" width="${u}"${A} border="0" alt="${y(w)}"${m?` title="${y(m)}"`:""} style="display:block;${_}"></a></td>`}).filter(Boolean);if(r.length===0)return"";const i=r.reduce((h,f,g)=>(g>0&&h.push('<td width="5"> </td>'),h.push(f),h),[]),l=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",s=`<table border="0" cellspacing="0" cellpadding="0"><tr>${i.join("")}</tr></table>`,{style:c,classes:a}=z(t,e,n);return N({align:l,style:c||void 0,className:a.length?a.join(" "):void 0,visibility:o},s,' em-type="social"')}function Z(t,e,n,o){const r=t.getAttribute("class")??"",i=rt(t);return/\bheading_block\b/.test(r)||/\bparagraph_block\b/.test(r)||/\btext_block\b/.test(r)?ce(t,e,n,o,i):/\bimage_block\b/.test(r)?ue(t,e,o,i):/\bbutton_block\b/.test(r)?me(t,e,n,o,i):/\bdivider_block\b/.test(r)?pe(t,e,o,i):/\bspacer_block\b/.test(r)?be(t,e,o,i):/\bsocial_block\b/.test(r)?we(t,e,o,i):""}function ye(t){const e=[];return Array.from(t.children).forEach(n=>{n.tagName.toLowerCase()==="tbody"?e.push(...Array.from(n.children)):e.push(n)}),e.filter(n=>n.tagName.toLowerCase()==="tr")}function ht(t){return ye(t).find(e=>/\bem-structure\b/.test(e.getAttribute("class")??""))??null}function xe(t){return/\brow-content\b/.test(t.getAttribute("class")??"")}function $e(t){return t.tagName.toLowerCase()!=="table"||t.getAttribute("em")!=="block"||xe(t)?!1:ht(t)!==null}function gt(t){const e=ht(t);if(!e)return null;const n=Array.from(e.children).filter(o=>o.tagName.toLowerCase()==="td");return n.length===0?null:`<tr em="block">${n.map(o=>o.outerHTML).join("")}</tr>`}var rn=".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block";function Ae(t){return t.tagName.toLowerCase()==="table"&&/\brow-content\b/.test(t.getAttribute("class")??"")}function Se(t){return Ae(t)?"row-content":$e(t)?"em-block":t.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")?"beefree-block":null}function K(t){return(t.textContent??"").trim()!==""||t.querySelector("img")!==null}function ke(t){return t.tagName.toLowerCase()!=="table"?!1:K(t)}function mt(t,e){return(t.getAttribute("class")??"").split(/\s+/).includes(e)}function ve(t){return t.tagName.toLowerCase()==="table"&&(mt(t,"row")||mt(t,"row-content"))}function _e(t,e){let n=e;for(;n&&n.parentElement!==t;)n=n.parentElement;return n}function Ce(t){if(t)for(let e=0;e<8;e+=1){const n=new Map;let o=!1;if(Array.from(t.querySelectorAll("table")).forEach(r=>{if(!ve(r)||!r.parentElement?.closest("table.row-content"))return;const i=_e(t,r);!i||i===r||((n.get(i)??i).insertAdjacentElement("afterend",r),n.set(i,r),o=!0)}),!o)return}}function Ee(t){const e=[];if(!t)return e;const n=o=>{if(o.matches(".preheader"))return;const r=Se(o);if(r){e.push({kind:r,element:o});return}const i=e.length;Array.from(o.children).forEach(n),e.length===i&&ke(o)&&e.push({kind:"unknown",element:o})};return Array.from(t.children).forEach(n),e}var Pe=/^\.(em-mob-[A-Za-z0-9_-]+)$/,pt=/([^{}]+)\{([^{}]*)\}/g;function Me(t){return t.split(";").map(e=>e.trim()).filter(e=>e!=="").map(e=>` ${e};`).join(`
|
|
4
|
+
`)}function Fe(t){const e=new Map;return t.querySelectorAll('style[em="styles"]').forEach(n=>{const o=n.textContent??"";let r;for(pt.lastIndex=0;(r=pt.exec(o))!==null;){const i=r[1].trim(),l=Pe.exec(i);if(!l||e.has(l[1]))continue;const s=Me(r[2]);s!==""&&e.set(l[1],s)}}),e}var bt={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Te={"Sans Serif":"sans-serif",Serif:"serif"},Le={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function Y(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function wt(t){return(t.split(",")[0]??"").trim().replace(/^['"]/,"").replace(/['"]$/,"").trim()}function yt(t){const e=t.split(",").map(n=>n.trim().replace(/^['"]|['"]$/g,"").toLowerCase());return e.includes("serif")&&!e.includes("sans-serif")?"Serif":"Sans Serif"}function xt(t,e){let n=(t??"").trim().toLowerCase();n==="bold"?n="700":(n==="normal"||n==="")&&(n="400");const o=Le[n]??"Regular";return e?`${o} Italic`:o}function Ne(t,e){return`em-font-${t.replace(/\s/g,"")}-${e.replace(/\s/g,"")}`}function $t(t){const e=[],n=t.split("?")[1];return n&&n.split("&").forEach(o=>{const r=o.indexOf("=");if(r===-1)return;const i=o.slice(0,r),l=o.slice(r+1);if(i!=="family"||!l)return;let s=l;try{s=decodeURIComponent(l.replace(/\+/g," "))}catch{s=l.replace(/\+/g," ")}s.split("|").forEach(c=>{const a=c.split(":")[0].trim();a&&e.push(a)})}),e}function Be(t){const e=new Set;t.querySelectorAll("link[href]").forEach(o=>{const r=o.getAttribute("href")??"";r.includes("fonts.googleapis.com")&&$t(r).forEach(i=>e.add(Y(i)))});const n=/@import\s+(?:url\(\s*)?['"]?(https?:\/\/fonts\.googleapis\.com\/[^'")\s]+)/g;return t.querySelectorAll("style").forEach(o=>{const r=o.textContent??"";let i;for(;(i=n.exec(r))!==null;)$t(i[1]).forEach(l=>e.add(Y(l)))}),e}function Re(t,e){const n=new RegExp(`(?:^|;)\\s*${e}\\s*:([^;]+)`,"i").exec(t)?.[1];return n?n.replace(/!important/gi,"").trim():void 0}function ze(t){const e=new Map,n=/([^{}]+)\{([^{}]*)\}/g;t.querySelectorAll("style").forEach(r=>{const i=r.textContent??"";let l;for(n.lastIndex=0;(l=n.exec(i))!==null;){const s=l[2];l[1].split(",").forEach(c=>{const a=/^\s*\.(em-font-[A-Za-z0-9_-]+)\s*$/.exec(c);if(!a)return;const h=e.get(a[1])??new Map;["font-family","font-weight","font-style"].forEach(f=>{const g=Re(s,f);g&&h.set(f,g)}),e.set(a[1],h)})}});const o=new Map;return e.forEach((r,i)=>{const l=r.get("font-family"),s=l?wt(l):"";if(!l||!s)return;const c=(r.get("font-style")??"").toLowerCase().includes("italic");o.set(i,{emClass:i,family:s,variant:xt(r.get("font-weight"),c),category:yt(l)})}),o}var He=class{imported;emFontRules;used=new Map;constructor(t,e=new Map){this.imported=t,this.emFontRules=e}register(t,e,n=!1){if(!t)return null;const o=wt(t);if(!o||!this.imported.has(Y(o)))return null;const r=yt(t),i=xt(e,n),l=Ne(o,i);return this.used.has(l)||this.used.set(l,{emClass:l,family:o,variant:i,category:r}),{emClass:l,fallback:r==="Serif"?'"Times New Roman", Times, serif':"Helvetica, Arial, sans-serif"}}registerEmFontClasses(t){const e=/em-font-[A-Za-z0-9_-]+/g;let n;for(;(n=e.exec(t))!==null;){const o=this.emFontRules.get(n[0]);o&&!this.used.has(o.emClass)&&this.used.set(o.emClass,o)}}get hasFonts(){return this.used.size>0}linkTags(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n})=>{const o=bt[n]??"400",r=o.includes("i"),i=o.replace(/i/g,"");return` <link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${e}:ital,wght@${r?"1":"0"},${i}&display=swap`}" em-class="${t}">`}).join(`
|
|
5
5
|
`)}styleRules(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n,category:o})=>{const r=bt[n]??"400",i=r.includes("i"),l=r.replace(/i/g,"");let s=`font-family: '${e}', ${Te[o]??"sans-serif"}!important; font-weight: ${l}!important;`;return i&&(s+=" font-style: italic!important;"),` .${t} { ${s} }`})}};function At(t,e){const n=new Set;let o;for(;(o=e.exec(t))!==null;)n.add(o[1]);return Array.from(n).sort((r,i)=>Number(r)-Number(i))}function qe(t){const e=new Set;return t.forEach(n=>{(n.split("{")[0].match(/\.[A-Za-z][A-Za-z0-9_-]*/g)??[]).forEach(o=>e.add(o.slice(1)))}),e}function Ie(t,e,n=[],o=new Map){const r=[];r.push(` .em-narrow-table {
|
|
6
6
|
width: 100%!important;
|
|
7
7
|
max-width: ${e}px!important;
|
|
@@ -86,6 +86,6 @@ ${l}
|
|
|
86
86
|
</tr>
|
|
87
87
|
</table>
|
|
88
88
|
</body>
|
|
89
|
-
</html>`}var Oe=["background-color","border","border-top","border-right","border-bottom","border-left","border-radius","box-shadow"],We=["padding","padding-top","padding-right","padding-bottom","padding-left"];function St(t,e){const n=new Map;return Oe.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),e&&We.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),n}function De(t){const e=t.querySelector(".preheader");if(!e)return"";const n=e.cloneNode(!0);return n.querySelectorAll("vk-snippet-end").forEach(o=>o.remove()),(n.textContent??"").replace(/[\u034F\u200C\u200B\u00AD\uFEFF\u2800]/g,"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}function Ge(t){return t.nonWrap?["em-mob-wrap","em-mob-wrap-cancel",`em-mob-width-${t.columnWidthPerc}perc`]:["em-mob-wrap","em-mob-width-100perc"]}function Ue(t,e){const n=t.closest("table.row"),o=n?/\brow-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=/\bcolumn-(\d+)\b/.exec(t.getAttribute("class")??"");if(!(!o||!r))return e.columnPadding.get(`${o[1]}|${r[1]}`)}function Ve(t,e){const n=t?{top:t.top,right:null,bottom:t.bottom,left:null}:void 0,o={top:e.top,right:null,bottom:e.bottom,left:null};return ot(n,o)}function
|
|
90
|
-
`)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=
|
|
91
|
-
`);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),
|
|
89
|
+
</html>`}var Oe=["background-color","border","border-top","border-right","border-bottom","border-left","border-radius","box-shadow"],We=["padding","padding-top","padding-right","padding-bottom","padding-left"];function St(t,e){const n=new Map;return Oe.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),e&&We.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),n}function De(t){const e=t.querySelector(".preheader");if(!e)return"";const n=e.cloneNode(!0);return n.querySelectorAll("vk-snippet-end").forEach(o=>o.remove()),(n.textContent??"").replace(/[\u034F\u200C\u200B\u00AD\uFEFF\u2800]/g,"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}function Ge(t){return t.nonWrap?["em-mob-wrap","em-mob-wrap-cancel",`em-mob-width-${t.columnWidthPerc}perc`]:["em-mob-wrap","em-mob-width-100perc"]}function Ue(t,e){const n=t.closest("table.row"),o=n?/\brow-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=/\bcolumn-(\d+)\b/.exec(t.getAttribute("class")??"");if(!(!o||!r))return e.columnPadding.get(`${o[1]}|${r[1]}`)}function Ve(t,e){const n=t?{top:t.top,right:null,bottom:t.bottom,left:null}:void 0,o={top:e.top,right:null,bottom:e.bottom,left:null};return ot(n,o)}function Ze(t,e){const n=t.querySelector("td.col-pad"),o=E(n?x(n.getAttribute("style")):new Map);return Pt(E(e),o)}function Ke(t,e,n,o){const r=[],i=s=>{s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")&&r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i)},l=s=>{if(s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i);return}if(s.querySelector(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){Array.from(s.children).forEach(l);return}K(s)&&r.push(s.outerHTML)};return Array.from(t.children).forEach(l),r.filter(s=>s.trim()!=="").join(`
|
|
90
|
+
`)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=Ft(t,e),c=St(l,!1),a=Ze(t,l),h=Ue(t,n),f={left:a.left??0,right:a.right??0},g={left:h?.left??null,right:h?.right??null},b={top:a.top,right:null,bottom:a.bottom,left:null},d=i?{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}:{left:0,right:0},w=[P(c),Mt(b)].filter(Boolean).join(" "),m=Ke(t,n,o,d),u=[...Ge(r),...Ve(h,a)],p=w?` style="${y(w)}"`:"";return{cellHtml:`<td width="${s}" valign="top" class="${u.join(" ")}"${p}>${m||" "}</td>`,hasContent:m.trim()!=="",hoistedHorizontal:i?{left:0,right:0,mobileLeft:null,mobileRight:null}:{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}}}function kt(t,e){return`<td width="${t}" class="em-mob-wrap${e.nonWrap?" em-mob-wrap-cancel":""} em-mob-height-${t}px"> </td>`}function Xe(t,e){const n=t.querySelector("table");return kt(M(n)??M(t)??0,e)}function Je(t,e,n){const o=t.closest("table.row"),r=x(t.getAttribute("style"));if(o&&!r.has("background-color")){const S=x(o.getAttribute("style")).get("background-color")??o.getAttribute("bgcolor")??"";S&&S!=="transparent"&&r.set("background-color",S)}const i=M(t)??660,l=Array.from(t.querySelectorAll("td.column")).filter(S=>!/\bgap\b/.test(S.getAttribute("class")??""));if(l.length===0){const S=gt(t);return S?{html:S,width:i}:null}const s=/\bstack\b/.test(t.getAttribute("class")??""),c=l.length>1,a=!s&&c,h={nonWrap:a,columnWidthPerc:a?Math.round(100/l.length)-2:100},f=l[0].parentElement,g=f?Array.from(f.children):l,b=[];let d=!1,w=!1,m={left:0,right:0,mobileLeft:null,mobileRight:null};if(g.forEach(S=>{if(!(S instanceof Element)||S.tagName.toLowerCase()!=="td")return;const X=S.getAttribute("class")??"";if(/\bcolumn\b/.test(X)&&/\bgap\b/.test(X))b.push(Xe(S,h)),w=!1;else if(/\bcolumn\b/.test(X)){w&&b.push(kt(0,h));const J=Ye(S,i,e,n,h,c);b.push(J.cellHtml),d=d||J.hasContent,m=J.hoistedHorizontal,w=!0}}),!d)return null;const u=`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr>${b.join("")}</tr></table>`,p=St(r,!0);Q(p,m.left,m.right);const A=P(p),_=o?rt(o):"all",C=te(_),$=o?/\brow-(\d+)\b/.exec(o.getAttribute("class")??""):null,k=$?e.rowContentPadding.get($[1]):void 0,v=E(p),B=(v.left??0)-m.left,H=(v.right??0)-m.right,q={top:k?.top??null,bottom:k?.bottom??null,left:m.mobileLeft!=null?(k?.left??B)+m.mobileLeft:k?.left??null,right:m.mobileRight!=null?(k?.right??H)+m.mobileRight:k?.right??null},I=ot(q,v),F=[C.className,...I].filter(Boolean),W=F.length?` class="${F.join(" ")}"`:"",vt=[A,C.inlineStyle].filter(Boolean).join(" "),_t=`<td${W}${vt?` style="${y(vt)}"`:""}>${u}</td>`;return{html:`<tr em="block">${C.wrapNonMso?`<!--[if !mso]><!-->${_t}<!--<![endif]-->`:_t}</tr>`,width:i}}function Qe(t,e,n,o){const r=Z(t,e,n,{left:0,right:0});return r.trim()===""?null:{html:`<tr em="block"><td>${`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr><td width="${o}" valign="top" class="em-mob-wrap em-mob-width-100perc">${r}</td></tr></table>`}</td></tr>`,width:o}}function tn(t){let e=0;return t.querySelectorAll('table.row-content, table[em="block"]').forEach(n=>{e=Math.max(e,M(n)??0)}),e>0?e:660}function en(t){const e=new DOMParser().parseFromString(t,"text/html"),n=x(e.body?.getAttribute("style")),o=R(n.get("background-color")??"#FFFFFF"),r=De(e),i=(e.querySelector("title")?.textContent??"").trim()||"Email";Ce(e.body);const l=Yt(e),s=new He(Be(e),ze(e)),c=[];let a=0;const h=tn(e);Ee(e.body).forEach(d=>{if(d.kind==="row-content"){const m=Je(d.element,l,s);if(m){c.push(m.html),a=Math.max(a,m.width);return}K(d.element)&&(c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0));return}if(d.kind==="beefree-block"){const m=Qe(d.element,l,s,h);m&&(c.push(m.html),a=Math.max(a,m.width));return}if(d.kind==="unknown"){c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0);return}const w=gt(d.element);w&&(c.push(w),a=Math.max(a,M(d.element)??0))});const f=a>0?a:660,g=c.map(d=>` ${d}`).join(`
|
|
91
|
+
`);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),Fe(e));return je({title:i,preheader:r,outerBackground:o,narrowWidth:f,stylesBlock:b,blocksHtml:g,fontLinks:s.linkTags()})}Et.convertBeeFreeToEmailMaker=en});
|