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ClBe,EAAIK,QAAQrB,GAEPgB,CACT,C","sources":["webpack:///./src/components/AppDownloadPopover/index.tsx","webpack:///./node_modules/@ant-design/icons-svg/es/asn/EllipsisOutlined.js","webpack:///./node_modules/antd/es/dropdown/index.js","webpack:///./node_modules/rc-dropdown/es/placements.js","webpack:///./node_modules/rc-dropdown/es/hooks/useAccessibility.js","webpack:///./node_modules/rc-dropdown/es/Dropdown.js","webpack:///./node_modules/rc-dropdown/es/index.js","webpack:///./node_modules/rc-util/es/Dom/focus.js"],"sourcesContent":["import appIcon from '@/static/imgs/app-icon.svg';\nimport appQrcode from '@/static/imgs/app-qrcode.png';\nimport reviewAppQrcode from '@/static/imgs/review-app-qrcode.png';\nimport type { MenuProps } from 'antd';\nimport { Dropdown } from 'antd';\n\nconst AppDownloadPopover = () => {\n const url = window.location.href;\n\n const items: MenuProps['items'] = [\n {\n key: 1,\n label: (\n <div className=\"flex items-center text-hex-4E5969\">\n <div className=\"h-72px\">\n {url.includes('www.mediecogroup.com') ? (\n <img src={appQrcode} className=\"w-72px\" />\n ) : (\n <img src={reviewAppQrcode} className=\"w-72px\" />\n )}\n </div>\n <div className=\"ml-10px space-y-6px\">\n <div>扫码下载APP</div>\n <div>\n 领<span className=\"text-hex-EA3837\">2</span>张课程券\n </div>\n </div>\n </div>\n ),\n },\n ];\n\n return (\n <div>\n <Dropdown\n overlayStyle={{ width: 198 }}\n menu={{ items }}\n placement=\"bottomLeft\"\n // arrow\n >\n <a className=\"flex items-center space-x--10px text-hex-1D2129 relative cursor-pointer relative\">\n <img src={appIcon} className=\"w-20px mr-12px\" alt=\"APP下载\" />\n <span>\n APP下载\n <span className=\"w-32px h-15px px-4px bg-hex-EA3837 rounded-[8px_8px_8px_0] text-10px text-hex-fff absolute right--17px top--13px font-500\">\n NEW\n </span>\n </span>\n </a>\n </Dropdown>\n </div>\n );\n};\n\nexport default AppDownloadPopover;\n","// This icon file is generated automatically.\nvar EllipsisOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z\" } }] }, \"name\": \"ellipsis\", \"theme\": \"outlined\" };\nexport default EllipsisOutlined;\n","import Dropdown from './dropdown';\nexport default Dropdown;","var autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\nvar targetOffset = [0, 0];\nvar placements = {\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n topCenter: {\n points: ['bc', 'tc'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n topRight: {\n points: ['br', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n bottomCenter: {\n points: ['tc', 'bc'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n bottomRight: {\n points: ['tr', 'br'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n }\n};\nexport default placements;","import * as React from 'react';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport raf from \"rc-util/es/raf\";\nimport { getFocusNodeList } from \"rc-util/es/Dom/focus\";\nvar ESC = KeyCode.ESC,\n TAB = KeyCode.TAB;\nexport default function useAccessibility(_ref) {\n var visible = _ref.visible,\n setTriggerVisible = _ref.setTriggerVisible,\n triggerRef = _ref.triggerRef,\n onVisibleChange = _ref.onVisibleChange,\n autoFocus = _ref.autoFocus;\n var focusMenuRef = React.useRef(false);\n\n var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() {\n if (visible && triggerRef.current) {\n var _triggerRef$current, _triggerRef$current$t, _triggerRef$current$t2, _triggerRef$current$t3;\n\n (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : (_triggerRef$current$t = _triggerRef$current.triggerRef) === null || _triggerRef$current$t === void 0 ? void 0 : (_triggerRef$current$t2 = _triggerRef$current$t.current) === null || _triggerRef$current$t2 === void 0 ? void 0 : (_triggerRef$current$t3 = _triggerRef$current$t2.focus) === null || _triggerRef$current$t3 === void 0 ? void 0 : _triggerRef$current$t3.call(_triggerRef$current$t2);\n setTriggerVisible(false);\n\n if (typeof onVisibleChange === 'function') {\n onVisibleChange(false);\n }\n }\n };\n\n var focusMenu = function focusMenu() {\n var _triggerRef$current2, _triggerRef$current2$, _triggerRef$current2$2, _triggerRef$current2$3;\n\n var elements = getFocusNodeList((_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : (_triggerRef$current2$ = _triggerRef$current2.popupRef) === null || _triggerRef$current2$ === void 0 ? void 0 : (_triggerRef$current2$2 = _triggerRef$current2$.current) === null || _triggerRef$current2$2 === void 0 ? void 0 : (_triggerRef$current2$3 = _triggerRef$current2$2.getElement) === null || _triggerRef$current2$3 === void 0 ? void 0 : _triggerRef$current2$3.call(_triggerRef$current2$2));\n var firstElement = elements[0];\n\n if (firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus) {\n firstElement.focus();\n focusMenuRef.current = true;\n return true;\n }\n\n return false;\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n switch (event.keyCode) {\n case ESC:\n handleCloseMenuAndReturnFocus();\n break;\n\n case TAB:\n {\n var focusResult = false;\n\n if (!focusMenuRef.current) {\n focusResult = focusMenu();\n }\n\n if (focusResult) {\n event.preventDefault();\n } else {\n handleCloseMenuAndReturnFocus();\n }\n\n break;\n }\n }\n };\n\n React.useEffect(function () {\n if (visible) {\n window.addEventListener('keydown', handleKeyDown);\n\n if (autoFocus) {\n // FIXME: hack with raf\n raf(focusMenu, 3);\n }\n\n return function () {\n window.removeEventListener('keydown', handleKeyDown);\n focusMenuRef.current = false;\n };\n }\n\n return function () {\n focusMenuRef.current = false;\n };\n }, [visible]); // eslint-disable-line react-hooks/exhaustive-deps\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"arrow\", \"prefixCls\", \"transitionName\", \"animation\", \"align\", \"placement\", \"placements\", \"getPopupContainer\", \"showAction\", \"hideAction\", \"overlayClassName\", \"overlayStyle\", \"visible\", \"trigger\", \"autoFocus\"];\nimport * as React from 'react';\nimport Trigger from 'rc-trigger';\nimport classNames from 'classnames';\nimport Placements from './placements';\nimport useAccessibility from './hooks/useAccessibility';\n\nfunction Dropdown(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,\n transitionName = props.transitionName,\n animation = props.animation,\n align = props.align,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,\n _props$placements = props.placements,\n placements = _props$placements === void 0 ? Placements : _props$placements,\n getPopupContainer = props.getPopupContainer,\n showAction = props.showAction,\n hideAction = props.hideAction,\n overlayClassName = props.overlayClassName,\n overlayStyle = props.overlayStyle,\n visible = props.visible,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,\n autoFocus = props.autoFocus,\n otherProps = _objectWithoutProperties(props, _excluded);\n\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n triggerVisible = _React$useState2[0],\n setTriggerVisible = _React$useState2[1];\n\n var mergedVisible = 'visible' in props ? visible : triggerVisible;\n var triggerRef = React.useRef(null);\n React.useImperativeHandle(ref, function () {\n return triggerRef.current;\n });\n useAccessibility({\n visible: mergedVisible,\n setTriggerVisible: setTriggerVisible,\n triggerRef: triggerRef,\n onVisibleChange: props.onVisibleChange,\n autoFocus: autoFocus\n });\n\n var getOverlayElement = function getOverlayElement() {\n var overlay = props.overlay;\n var overlayElement;\n\n if (typeof overlay === 'function') {\n overlayElement = overlay();\n } else {\n overlayElement = overlay;\n }\n\n return overlayElement;\n };\n\n var onClick = function onClick(e) {\n var onOverlayClick = props.onOverlayClick;\n setTriggerVisible(false);\n\n if (onOverlayClick) {\n onOverlayClick(e);\n }\n };\n\n var onVisibleChange = function onVisibleChange(newVisible) {\n var onVisibleChangeProp = props.onVisibleChange;\n setTriggerVisible(newVisible);\n\n if (typeof onVisibleChangeProp === 'function') {\n onVisibleChangeProp(newVisible);\n }\n };\n\n var getMenuElement = function getMenuElement() {\n var overlayElement = getOverlayElement();\n return /*#__PURE__*/React.createElement(React.Fragment, null, arrow && /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-arrow\")\n }), overlayElement);\n };\n\n var getMenuElementOrLambda = function getMenuElementOrLambda() {\n var overlay = props.overlay;\n\n if (typeof overlay === 'function') {\n return getMenuElement;\n }\n\n return getMenuElement();\n };\n\n var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {\n var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,\n alignPoint = props.alignPoint;\n\n if ('minOverlayWidthMatchTrigger' in props) {\n return minOverlayWidthMatchTrigger;\n }\n\n return !alignPoint;\n };\n\n var getOpenClassName = function getOpenClassName() {\n var openClassName = props.openClassName;\n\n if (openClassName !== undefined) {\n return openClassName;\n }\n\n return \"\".concat(prefixCls, \"-open\");\n };\n\n var renderChildren = function renderChildren() {\n var children = props.children;\n var childrenProps = children.props ? children.props : {};\n var childClassName = classNames(childrenProps.className, getOpenClassName());\n return mergedVisible && children ? /*#__PURE__*/React.cloneElement(children, {\n className: childClassName\n }) : children;\n };\n\n var triggerHideAction = hideAction;\n\n if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {\n triggerHideAction = ['click'];\n }\n\n return /*#__PURE__*/React.createElement(Trigger, _objectSpread(_objectSpread({\n builtinPlacements: placements\n }, otherProps), {}, {\n prefixCls: prefixCls,\n ref: triggerRef,\n popupClassName: classNames(overlayClassName, _defineProperty({}, \"\".concat(prefixCls, \"-show-arrow\"), arrow)),\n popupStyle: overlayStyle,\n action: trigger,\n showAction: showAction,\n hideAction: triggerHideAction || [],\n popupPlacement: placement,\n popupAlign: align,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n popupVisible: mergedVisible,\n stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',\n popup: getMenuElementOrLambda(),\n onPopupVisibleChange: onVisibleChange,\n onPopupClick: onClick,\n getPopupContainer: getPopupContainer\n }), renderChildren());\n}\n\nexport default /*#__PURE__*/React.forwardRef(Dropdown);","import Dropdown from './Dropdown';\nexport default Dropdown;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport isVisible from './isVisible';\nfunction focusable(node) {\n var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (isVisible(node)) {\n var nodeName = node.nodeName.toLowerCase();\n var isFocusableElement =\n // Focusable element\n ['input', 'select', 'textarea', 'button'].includes(nodeName) ||\n // Editable element\n node.isContentEditable ||\n // Anchor with href element\n nodeName === 'a' && !!node.getAttribute('href');\n // Get tabIndex\n var tabIndexAttr = node.getAttribute('tabindex');\n var tabIndexNum = Number(tabIndexAttr);\n // Parse as number if validate\n var tabIndex = null;\n if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {\n tabIndex = tabIndexNum;\n } else if (isFocusableElement && tabIndex === null) {\n tabIndex = 0;\n }\n // Block focusable if disabled\n if (isFocusableElement && node.disabled) {\n tabIndex = null;\n }\n return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);\n }\n return false;\n}\nexport function getFocusNodeList(node) {\n var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var res = _toConsumableArray(node.querySelectorAll('*')).filter(function (child) {\n return focusable(child, includePositive);\n });\n if (focusable(node, includePositive)) {\n res.unshift(node);\n }\n return res;\n}\nvar lastFocusElement = null;\n/** @deprecated Do not use since this may failed when used in async */\nexport function saveLastFocusNode() {\n lastFocusElement = document.activeElement;\n}\n/** @deprecated Do not use since this may failed when used in async */\nexport function clearLastFocusNode() {\n lastFocusElement = null;\n}\n/** @deprecated Do not use since this may failed when used in async */\nexport function backLastFocusNode() {\n if (lastFocusElement) {\n try {\n // 元素可能已经被移动了\n lastFocusElement.focus();\n /* eslint-disable no-empty */\n } catch (e) {\n // empty\n }\n /* eslint-enable no-empty */\n }\n}\n\nexport function limitTabRange(node, e) {\n if (e.keyCode === 9) {\n var tabNodeList = getFocusNodeList(node);\n var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];\n var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;\n if (leavingTab) {\n var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];\n target.focus();\n e.preventDefault();\n }\n }\n}"],"names":["url","window","location","href","items","key","label","className","includes","src","appQrcode","reviewAppQrcode","overlayStyle","width","menu","placement","appIcon","alt","Dropdown","autoAdjustOverflow","adjustX","adjustY","targetOffset","topLeft","points","overflow","offset","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","ESC","KeyCode","TAB","_excluded","props","ref","_props$arrow","arrow","_props$prefixCls","prefixCls","transitionName","animation","align","_props$placement","_props$placements","placements","Placements","getPopupContainer","showAction","hideAction","overlayClassName","visible","_props$trigger","trigger","autoFocus","otherProps","_objectWithoutProperties","_React$useState","React","_React$useState2","_slicedToArray","triggerVisible","setTriggerVisible","mergedVisible","triggerRef","current","_ref","onVisibleChange","focusMenuRef","handleCloseMenuAndReturnFocus","_triggerRef$current","_triggerRef$current$t","_triggerRef$current$t2","_triggerRef$current$t3","focus","call","focusMenu","_triggerRef$current2","_triggerRef$current2$","_triggerRef$current2$2","_triggerRef$current2$3","firstElement","getFocusNodeList","popupRef","getElement","handleKeyDown","event","keyCode","focusResult","preventDefault","addEventListener","raf","removeEventListener","useAccessibility","openClassName","children","childrenProps","childClassName","minOverlayWidthMatchTrigger","alignPoint","getMenuElement","overlay","overlayElement","concat","triggerHideAction","indexOf","Trigger","_objectSpread","builtinPlacements","popupClassName","classNames","_defineProperty","popupStyle","action","popupPlacement","popupAlign","popupTransitionName","popupAnimation","popupVisible","stretch","popup","onPopupVisibleChange","newVisible","onVisibleChangeProp","onPopupClick","e","onOverlayClick","undefined","focusable","node","includePositive","arguments","length","isVisible","nodeName","toLowerCase","isFocusableElement","isContentEditable","getAttribute","tabIndexAttr","tabIndexNum","Number","tabIndex","isNaN","disabled","res","_toConsumableArray","querySelectorAll","filter","child","unshift"],"sourceRoot":""}