@digi-frontend/dgate-api-documentation 1.1.12 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +13 -0
- package/.prettierignore +8 -0
- package/.prettierrc +15 -0
- package/dist/_virtual/index4.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index7.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/createPopper.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/createPopper.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/enums.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/enums.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js.map +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +1 -1
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js.map +1 -1
- package/dist/node_modules/@tippyjs/react/dist/tippy-react.esm.js +1 -1
- package/dist/node_modules/@tippyjs/react/dist/tippy-react.esm.js.map +1 -1
- package/dist/node_modules/digitinary-ui/dist/index.js +1 -1
- package/dist/node_modules/digitinary-ui/dist/index.js.map +1 -1
- package/dist/node_modules/dom-serializer/lib/foreignNames.js +1 -1
- package/dist/node_modules/dom-serializer/lib/foreignNames.js.map +1 -1
- package/dist/node_modules/dom-serializer/lib/index.js +1 -1
- package/dist/node_modules/dom-serializer/lib/index.js.map +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -1
- package/dist/node_modules/domhandler/lib/node.js +1 -1
- package/dist/node_modules/domhandler/lib/node.js.map +1 -1
- package/dist/node_modules/domutils/lib/feeds.js +1 -1
- package/dist/node_modules/domutils/lib/feeds.js.map +1 -1
- package/dist/node_modules/domutils/lib/helpers.js +1 -1
- package/dist/node_modules/domutils/lib/helpers.js.map +1 -1
- package/dist/node_modules/domutils/lib/legacy.js +1 -1
- package/dist/node_modules/domutils/lib/legacy.js.map +1 -1
- package/dist/node_modules/domutils/lib/querying.js +1 -1
- package/dist/node_modules/domutils/lib/querying.js.map +1 -1
- package/dist/node_modules/domutils/lib/stringify.js +1 -1
- package/dist/node_modules/domutils/lib/stringify.js.map +1 -1
- package/dist/node_modules/entities/dist/commonjs/decode.js +1 -1
- package/dist/node_modules/entities/dist/commonjs/decode.js.map +1 -1
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js +1 -1
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -1
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +1 -1
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -1
- package/dist/node_modules/formik/dist/formik.esm.js +1 -1
- package/dist/node_modules/formik/dist/formik.esm.js.map +1 -1
- package/dist/node_modules/formik/node_modules/deepmerge/dist/es.js +1 -1
- package/dist/node_modules/formik/node_modules/deepmerge/dist/es.js.map +1 -1
- package/dist/node_modules/highlight.js/lib/core.js +1 -1
- package/dist/node_modules/highlight.js/lib/core.js.map +1 -1
- package/dist/node_modules/highlight.js/lib/languages/json.js +1 -1
- package/dist/node_modules/highlight.js/lib/languages/json.js.map +1 -1
- package/dist/node_modules/html-react-parser/lib/utilities.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -1
- package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js +1 -1
- package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js.map +1 -1
- package/dist/node_modules/lodash-es/_baseClone.js +1 -1
- package/dist/node_modules/lodash-es/_baseClone.js.map +1 -1
- package/dist/node_modules/lodash-es/_getSymbols.js +1 -1
- package/dist/node_modules/lodash-es/_getSymbols.js.map +1 -1
- package/dist/node_modules/lodash-es/_memoizeCapped.js +1 -1
- package/dist/node_modules/lodash-es/_memoizeCapped.js.map +1 -1
- package/dist/node_modules/lodash-es/_stringToPath.js +1 -1
- package/dist/node_modules/lodash-es/_stringToPath.js.map +1 -1
- package/dist/node_modules/property-expr/index.js +1 -1
- package/dist/node_modules/property-expr/index.js.map +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
- package/dist/node_modules/react-property/lib/index.js +1 -1
- package/dist/node_modules/react-property/lib/index.js.map +1 -1
- package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js +1 -1
- package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js.map +1 -1
- package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js +1 -1
- package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js.map +1 -1
- package/dist/node_modules/react-toastify/dist/index.mjs.js +1 -1
- package/dist/node_modules/react-toastify/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/style-to-js/cjs/index.js +1 -1
- package/dist/node_modules/style-to-js/cjs/index.js.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js.map +1 -1
- package/dist/node_modules/tiny-case/index.js +1 -1
- package/dist/node_modules/tiny-case/index.js.map +1 -1
- package/dist/node_modules/tippy.js/dist/tippy.esm.js +1 -1
- package/dist/node_modules/tippy.js/dist/tippy.esm.js.map +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/toposort/index.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/node_modules/yup/index.esm.js.map +1 -1
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/JsonInput/JsonInput.js +1 -1
- package/dist/src/components/JsonInput/JsonInput.js.map +1 -1
- package/dist/src/components/LivePreview/LivePreview.js +1 -1
- package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
- package/dist/src/components/SVGLoader/SVGLoader.js +1 -1
- package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
- package/dist/src/components/Tooltip/Tooltip.js +1 -1
- package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/table.js.map +1 -1
- package/dist/src/components/table/tags-table.js +1 -1
- package/dist/src/components/table/tags-table.js.map +1 -1
- package/dist/src/constants/methods.constant.js +1 -1
- package/dist/src/constants/methods.constant.js.map +1 -1
- package/dist/src/context/SectionToggleContext.js +1 -1
- package/dist/src/context/SectionToggleContext.js.map +1 -1
- package/dist/src/helpers/docs.helper.js +1 -1
- package/dist/src/helpers/docs.helper.js.map +1 -1
- package/dist/src/helpers/layout.helper.js +1 -1
- package/dist/src/helpers/layout.helper.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js +1 -1
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +1 -1
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js +1 -1
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js +1 -1
- package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +1 -1
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +1 -1
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +1 -1
- package/dist/src/layout/docsLayout.js +1 -1
- package/dist/src/layout/docsLayout.js.map +1 -1
- package/dist/src/layout/layout.js +1 -1
- package/dist/src/layout/layout.js.map +1 -1
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/validator/form.scheme.js +1 -1
- package/dist/src/validator/form.scheme.js.map +1 -1
- package/dist/styles.css +773 -773
- package/index.ts +2 -0
- package/package.json +4 -9
- package/rollup.config.js +37 -0
- package/src/assets/icons/AddRow.svg +3 -0
- package/src/assets/icons/ApiIcon.svg +12 -0
- package/src/assets/icons/ArrowBack.svg +3 -0
- package/src/assets/icons/BookIcon.svg +6 -0
- package/src/assets/icons/CheckMarkSquare.svg +5 -0
- package/src/assets/icons/CloseIcon.svg +4 -0
- package/src/assets/icons/CopySticker.svg +6 -0
- package/src/assets/icons/DeleteIcon.svg +3 -0
- package/src/assets/icons/DownArrow.svg +3 -0
- package/src/assets/icons/EditIcon.svg +3 -0
- package/src/assets/icons/FilterIcon.svg +4 -0
- package/src/assets/icons/Plus.svg +5 -0
- package/src/assets/icons/PlusSquare.svg +3 -0
- package/src/assets/icons/RequestOption.svg +5 -0
- package/src/assets/icons/UpArrow.svg +3 -0
- package/src/assets/icons/arrow-down.svg +3 -0
- package/src/assets/icons/arrow-up.svg +10 -0
- package/src/assets/icons/arrowDownGray.svg +3 -0
- package/src/assets/icons/arrowRightGray.svg +3 -0
- package/src/assets/icons/close-circle.svg +5 -0
- package/src/assets/icons/copy.svg +4 -0
- package/src/assets/icons/deleteOutlinedIcon.svg +8 -0
- package/src/assets/icons/document.svg +6 -0
- package/src/assets/icons/eye.svg +4 -0
- package/src/assets/icons/index.ts +27 -0
- package/src/assets/icons/infoIcon.svg +5 -0
- package/src/assets/icons/newCopyIcon.svg +4 -0
- package/src/assets/icons/searchIcon.svg +4 -0
- package/src/components/Chips/Chips.tsx +87 -0
- package/src/components/InfoForm/InfoForm.tsx +432 -0
- package/src/components/JsonInput/JsonInput.tsx +149 -0
- package/src/components/LivePreview/LivePreview.tsx +224 -0
- package/src/components/MethodAccordion/MethodAccordion.tsx +1070 -0
- package/src/components/SVGLoader/SVGLoader.tsx +96 -0
- package/src/components/SectionHead/SectionHead.tsx +22 -0
- package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -0
- package/src/components/SimpleLabelValue/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.tsx +85 -0
- package/src/components/dialog/dialog.ts +61 -0
- package/src/components/dialog/index.tsx +88 -0
- package/src/components/table/table.tsx +508 -0
- package/src/components/table/tags-table.tsx +348 -0
- package/src/constants/index.ts +95 -0
- package/src/constants/methods.constant.ts +26 -0
- package/src/constants/regex.ts +7 -0
- package/src/context/SectionToggleContext.tsx +121 -0
- package/src/global.d.ts +13 -0
- package/src/helpers/docs.helper.ts +42 -0
- package/src/helpers/layout.helper.ts +290 -0
- package/src/helpers/methodAccordion.helper.ts +20 -0
- package/src/index.ts +2 -0
- package/src/layout/docsComponents/Codebox/Codebox.tsx +61 -0
- package/src/layout/docsComponents/DocsAside/DocsAside.tsx +112 -0
- package/src/layout/docsComponents/DocsContent/DocsContent.tsx +51 -0
- package/src/layout/docsComponents/DocsContent/EndpointPage/index.tsx +307 -0
- package/src/layout/docsComponents/DocsContent/OverviewPage/index.tsx +223 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +188 -0
- package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +229 -0
- package/src/layout/docsComponents/index.tsx +28 -0
- package/src/layout/docsLayout.tsx +123 -0
- package/src/layout/layout.module.css +65 -0
- package/src/layout/layout.tsx +177 -0
- package/src/types/docsLayout.type.ts +7 -0
- package/src/types/index.ts +28 -0
- package/src/types/layout.type.ts +32 -0
- package/src/types/openApi.ts +109 -0
- package/src/types/transformedOpenApi.ts +52 -0
- package/src/utils/index.ts +15 -0
- package/src/validator/form.scheme.ts +96 -0
- package/tsconfig.json +33 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/react-property/lib/index.js"],"sourcesContent":["'use strict';\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\n\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nconst RESERVED = 0;\n\n// A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\nconst STRING = 1;\n\n// A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\nconst BOOLEANISH_STRING = 2;\n\n// A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\nconst BOOLEAN = 3;\n\n// An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\nconst OVERLOADED_BOOLEAN = 4;\n\n// An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\nconst NUMERIC = 5;\n\n// An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\nconst POSITIVE_NUMERIC = 6;\n\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(\n name,\n type,\n mustUseProperty,\n attributeName,\n attributeNamespace,\n sanitizeURL,\n removeEmptyString,\n) {\n this.acceptsBooleans =\n type === BOOLEANISH_STRING ||\n type === BOOLEAN ||\n type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n}\n\n// When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\nconst properties = {};\n\n// These props are reserved by React. They shouldn't be written to the DOM.\nconst reservedProps = [\n 'children',\n 'dangerouslySetInnerHTML',\n // TODO: This prevents the assignment of defaultValue to regular\n // elements (not just inputs). Now that ReactDOMInput assigns to the\n // defaultValue property -- do we need this?\n 'defaultValue',\n 'defaultChecked',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'suppressHydrationWarning',\n 'style',\n];\n\nreservedProps.forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n RESERVED,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n[\n ['acceptCharset', 'accept-charset'],\n ['className', 'class'],\n ['htmlFor', 'for'],\n ['httpEquiv', 'http-equiv'],\n].forEach(([name, attributeName]) => {\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n[\n 'autoReverse',\n 'externalResourcesRequired',\n 'focusable',\n 'preserveAlpha',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML boolean attributes.\n[\n 'allowFullScreen',\n 'async',\n // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n 'autoFocus',\n 'autoPlay',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'disablePictureInPicture',\n 'disableRemotePlayback',\n 'formNoValidate',\n 'hidden',\n 'loop',\n 'noModule',\n 'noValidate',\n 'open',\n 'playsInline',\n 'readOnly',\n 'required',\n 'reversed',\n 'scoped',\n 'seamless',\n // Microdata\n 'itemScope',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n[\n 'checked',\n // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n 'multiple',\n 'muted',\n 'selected',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n[\n 'capture',\n 'download',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n OVERLOADED_BOOLEAN,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be positive numbers.\n[\n 'cols',\n 'rows',\n 'size',\n 'span',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n POSITIVE_NUMERIC,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be numbers.\n['rowSpan', 'start'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n NUMERIC,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\nconst CAMELIZE = /[\\-\\:]([a-z])/g;\nconst capitalize = token => token[1].toUpperCase();\n\n// This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n[\n 'accent-height',\n 'alignment-baseline',\n 'arabic-form',\n 'baseline-shift',\n 'cap-height',\n 'clip-path',\n 'clip-rule',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'dominant-baseline',\n 'enable-background',\n 'fill-opacity',\n 'fill-rule',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'glyph-name',\n 'glyph-orientation-horizontal',\n 'glyph-orientation-vertical',\n 'horiz-adv-x',\n 'horiz-origin-x',\n 'image-rendering',\n 'letter-spacing',\n 'lighting-color',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'overline-position',\n 'overline-thickness',\n 'paint-order',\n 'panose-1',\n 'pointer-events',\n 'rendering-intent',\n 'shape-rendering',\n 'stop-color',\n 'stop-opacity',\n 'strikethrough-position',\n 'strikethrough-thickness',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke-width',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'underline-position',\n 'underline-thickness',\n 'unicode-bidi',\n 'unicode-range',\n 'units-per-em',\n 'v-alphabetic',\n 'v-hanging',\n 'v-ideographic',\n 'v-mathematical',\n 'vector-effect',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'word-spacing',\n 'writing-mode',\n 'xmlns:xlink',\n 'x-height',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xlink namespace.\n[\n 'xlink:actuate',\n 'xlink:arcrole',\n 'xlink:role',\n 'xlink:show',\n 'xlink:title',\n 'xlink:type',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/1999/xlink',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xml namespace.\n[\n 'xml:base',\n 'xml:lang',\n 'xml:space',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/XML/1998/namespace',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n['tabIndex', 'crossOrigin'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\nconst xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord(\n 'xlinkHref',\n STRING,\n false, // mustUseProperty\n 'xlink:href',\n 'http://www.w3.org/1999/xlink',\n true, // sanitizeURL\n false, // removeEmptyString\n);\n\n['src', 'href', 'action', 'formAction'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true, // removeEmptyString\n );\n});\n\n// \nconst {\n CAMELCASE,\n SAME,\n possibleStandardNames: possibleStandardNamesOptimized\n} = require('../lib/possibleStandardNamesOptimized');\n\nconst ATTRIBUTE_NAME_START_CHAR =\n ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n\nconst ATTRIBUTE_NAME_CHAR =\n ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\n\n/**\n * Checks whether a property name is a custom attribute.\n *\n * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25\n *\n * @type {(attribute: string) => boolean}\n */\nconst isCustomAttribute =\n RegExp.prototype.test.bind(\n // eslint-disable-next-line no-misleading-character-class\n new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')\n );\n\n/**\n * @type {Record<string, string>}\n */\nconst possibleStandardNames = Object.keys(\n possibleStandardNamesOptimized\n).reduce((accumulator, standardName) => {\n const propName = possibleStandardNamesOptimized[standardName];\n if (propName === SAME) {\n accumulator[standardName] = standardName;\n } else if (propName === CAMELCASE) {\n accumulator[standardName.toLowerCase()] = standardName;\n } else {\n accumulator[standardName] = propName;\n }\n return accumulator;\n}, {});\n\nexports.BOOLEAN = BOOLEAN;\nexports.BOOLEANISH_STRING = BOOLEANISH_STRING;\nexports.NUMERIC = NUMERIC;\nexports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;\nexports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;\nexports.RESERVED = RESERVED;\nexports.STRING = STRING;\nexports.getPropertyInfo = getPropertyInfo;\nexports.isCustomAttribute = isCustomAttribute;\nexports.possibleStandardNames = possibleStandardNames;\n"],"names":["PropertyInfoRecord","name","type","mustUseProperty","attributeName","attributeNamespace","sanitizeURL","removeEmptyString","this","acceptsBooleans","propertyName","properties","forEach","toLowerCase","CAMELIZE","capitalize","token","toUpperCase","replace","CAMELCASE","SAME","possibleStandardNames","possibleStandardNamesOptimized","require$$0","isCustomAttribute","RegExp","prototype","test","bind","Object","keys","reduce","accumulator","standardName","propName","lib","BOOLEAN","BOOLEANISH_STRING","NUMERIC","OVERLOADED_BOOLEAN","POSITIVE_NUMERIC","RESERVED","STRING","getPropertyInfo","hasOwnProperty"],"mappings":"8JAmDA,SAASA,EACPC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEAC,KAAKC,gBAlCmB,IAmCtBP,GA9BY,IA+BZA,GAzBuB,IA0BvBA,EACFM,KAAKJ,cAAgBA,EACrBI,KAAKH,mBAAqBA,EAC1BG,KAAKL,gBAAkBA,EACvBK,KAAKE,aAAeT,EACpBO,KAAKN,KAAOA,EACZM,KAAKF,YAAcA,EACnBE,KAAKD,kBAAoBA,CAC3B,CAKA,MAAMI,EAAa,CAAA,EAGG,CACpB,WACA,0BAIA,eACA,iBACA,YACA,iCACA,2BACA,SAGYC,SAAQX,IACpBU,EAAWV,GAAQ,IAAID,EACrBC,EA/Ea,GAiFb,EACAA,EACA,MACA,GACA,MAMJ,CACE,CAAC,gBAAiB,kBAClB,CAAC,YAAa,SACd,CAAC,UAAW,OACZ,CAAC,YAAa,eACdW,SAAQ,EAAEX,EAAMG,MAChBO,EAAWV,GAAQ,IAAID,EACrBC,EA9FW,GAgGX,EACAG,EACA,MACA,GACA,MAOJ,CAAC,kBAAmB,YAAa,aAAc,SAASQ,SAAQX,IAC9DU,EAAWV,GAAQ,IAAID,EACrBC,EAvGsB,GAyGtB,EACAA,EAAKY,cACL,MACA,GACA,MAQJ,CACE,cACA,4BACA,YACA,iBACAD,SAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EA5HsB,GA8HtB,EACAA,EACA,MACA,GACA,MAKJ,CACE,kBACA,QAGA,YACA,WACA,WACA,UACA,QACA,WACA,0BACA,wBACA,iBACA,SACA,OACA,WACA,aACA,OACA,cACA,WACA,WACA,WACA,SACA,WAEA,aACAW,SAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EA/JY,GAiKZ,EACAA,EAAKY,cACL,MACA,GACA,MAMJ,CACE,UAGA,WACA,QACA,YAKAD,SAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EAxLY,GA0LZ,EACAA,EACA,MACA,GACA,MAMJ,CACE,UACA,YAKAW,SAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EAvMuB,GAyMvB,EACAA,EACA,MACA,GACA,MAKJ,CACE,OACA,OACA,OACA,QAKAW,SAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EArNqB,GAuNrB,EACAA,EACA,MACA,GACA,MAKJ,CAAC,UAAW,SAASW,SAAQX,IAC3BU,EAAWV,GAAQ,IAAID,EACrBC,EAtOY,GAwOZ,EACAA,EAAKY,cACL,MACA,GACA,MAIJ,MAAMC,EAAW,iBACXC,EAAaC,GAASA,EAAM,GAAGC,cAOrC,CACE,gBACA,qBACA,cACA,iBACA,aACA,YACA,YACA,sBACA,8BACA,gBACA,kBACA,oBACA,oBACA,eACA,YACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,aACA,+BACA,6BACA,cACA,iBACA,kBACA,iBACA,iBACA,aACA,aACA,eACA,oBACA,qBACA,cACA,WACA,iBACA,mBACA,kBACA,aACA,eACA,yBACA,0BACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,eACA,cACA,kBACA,iBACA,qBACA,sBACA,eACA,gBACA,eACA,eACA,YACA,gBACA,iBACA,gBACA,aACA,gBACA,gBACA,eACA,eACA,cACA,YAKAL,SAAQR,IACR,MAAMH,EAAOG,EAAcc,QAAQJ,EAAUC,GAC7CJ,EAAWV,GAAQ,IAAID,EACrBC,EA9VW,GAgWX,EACAG,EACA,MACA,GACA,MAKJ,CACE,gBACA,gBACA,aACA,aACA,cACA,cAKAQ,SAAQR,IACR,MAAMH,EAAOG,EAAcc,QAAQJ,EAAUC,GAC7CJ,EAAWV,GAAQ,IAAID,EACrBC,EAvXW,GAyXX,EACAG,EACA,gCACA,GACA,MAKJ,CACE,WACA,WACA,aAKAQ,SAAQR,IACR,MAAMH,EAAOG,EAAcc,QAAQJ,EAAUC,GAC7CJ,EAAWV,GAAQ,IAAID,EACrBC,EA7YW,GA+YX,EACAG,EACA,wCACA,GACA,MAOJ,CAAC,WAAY,eAAeQ,SAAQR,IAClCO,EAAWP,GAAiB,IAAIJ,EAC9BI,EA5ZW,GA8ZX,EACAA,EAAcS,cACd,MACA,GACA,MAOJF,EAAoB,UAAI,IAAIX,EAC1B,YA1aa,GA4ab,EACA,aACA,gCACA,GACA,GAGF,CAAC,MAAO,OAAQ,SAAU,cAAcY,SAAQR,IAC9CO,EAAWP,GAAiB,IAAIJ,EAC9BI,EArbW,GAubX,EACAA,EAAcS,cACd,MACA,GACA,MAKJ,MAAMM,UACJA,EAASC,KACTA,EACAC,sBAAuBC,GACrBC,IAeEC,EACJC,OAAOC,UAAUC,KAAKC,KAEpB,IAAIH,OAAO,+OAMTJ,EAAwBQ,OAAOC,KACnCR,GACAS,QAAO,CAACC,EAAaC,KACrB,MAAMC,EAAWZ,EAA+BW,GAQhD,OAPIC,IAAad,EACfY,EAAYC,GAAgBA,EACnBC,IAAaf,EACtBa,EAAYC,EAAapB,eAAiBoB,EAE1CD,EAAYC,GAAgBC,EAEvBF,IACN,CAAE,UAELG,EAAAC,QA/dgB,EAgehBD,EAAAE,kBAre0B,EAse1BF,EAAAG,QAvdgB,EAwdhBH,EAAAI,mBA5d2B,EA6d3BJ,EAAAK,iBArdyB,EAsdzBL,EAAAM,SAnfiB,EAofjBN,EAAAO,OAhfe,EAiffP,EAAAQ,gBAtdA,SAAyB1C,GACvB,OAAOU,EAAWiC,eAAe3C,GAAQU,EAAWV,GAAQ,IAC9D,EAqdAkC,EAAAX,kBAA4BA,EAC5BW,EAAAd,sBAAgCA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/react-property/lib/index.js"],"sourcesContent":["'use strict';\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\n\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nconst RESERVED = 0;\n\n// A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\nconst STRING = 1;\n\n// A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\nconst BOOLEANISH_STRING = 2;\n\n// A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\nconst BOOLEAN = 3;\n\n// An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\nconst OVERLOADED_BOOLEAN = 4;\n\n// An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\nconst NUMERIC = 5;\n\n// An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\nconst POSITIVE_NUMERIC = 6;\n\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(\n name,\n type,\n mustUseProperty,\n attributeName,\n attributeNamespace,\n sanitizeURL,\n removeEmptyString,\n) {\n this.acceptsBooleans =\n type === BOOLEANISH_STRING ||\n type === BOOLEAN ||\n type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n}\n\n// When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\nconst properties = {};\n\n// These props are reserved by React. They shouldn't be written to the DOM.\nconst reservedProps = [\n 'children',\n 'dangerouslySetInnerHTML',\n // TODO: This prevents the assignment of defaultValue to regular\n // elements (not just inputs). Now that ReactDOMInput assigns to the\n // defaultValue property -- do we need this?\n 'defaultValue',\n 'defaultChecked',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'suppressHydrationWarning',\n 'style',\n];\n\nreservedProps.forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n RESERVED,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n[\n ['acceptCharset', 'accept-charset'],\n ['className', 'class'],\n ['htmlFor', 'for'],\n ['httpEquiv', 'http-equiv'],\n].forEach(([name, attributeName]) => {\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n[\n 'autoReverse',\n 'externalResourcesRequired',\n 'focusable',\n 'preserveAlpha',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML boolean attributes.\n[\n 'allowFullScreen',\n 'async',\n // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n 'autoFocus',\n 'autoPlay',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'disablePictureInPicture',\n 'disableRemotePlayback',\n 'formNoValidate',\n 'hidden',\n 'loop',\n 'noModule',\n 'noValidate',\n 'open',\n 'playsInline',\n 'readOnly',\n 'required',\n 'reversed',\n 'scoped',\n 'seamless',\n // Microdata\n 'itemScope',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n[\n 'checked',\n // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n 'multiple',\n 'muted',\n 'selected',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n[\n 'capture',\n 'download',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n OVERLOADED_BOOLEAN,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be positive numbers.\n[\n 'cols',\n 'rows',\n 'size',\n 'span',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n POSITIVE_NUMERIC,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be numbers.\n['rowSpan', 'start'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n NUMERIC,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\nconst CAMELIZE = /[\\-\\:]([a-z])/g;\nconst capitalize = token => token[1].toUpperCase();\n\n// This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n[\n 'accent-height',\n 'alignment-baseline',\n 'arabic-form',\n 'baseline-shift',\n 'cap-height',\n 'clip-path',\n 'clip-rule',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'dominant-baseline',\n 'enable-background',\n 'fill-opacity',\n 'fill-rule',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'glyph-name',\n 'glyph-orientation-horizontal',\n 'glyph-orientation-vertical',\n 'horiz-adv-x',\n 'horiz-origin-x',\n 'image-rendering',\n 'letter-spacing',\n 'lighting-color',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'overline-position',\n 'overline-thickness',\n 'paint-order',\n 'panose-1',\n 'pointer-events',\n 'rendering-intent',\n 'shape-rendering',\n 'stop-color',\n 'stop-opacity',\n 'strikethrough-position',\n 'strikethrough-thickness',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke-width',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'underline-position',\n 'underline-thickness',\n 'unicode-bidi',\n 'unicode-range',\n 'units-per-em',\n 'v-alphabetic',\n 'v-hanging',\n 'v-ideographic',\n 'v-mathematical',\n 'vector-effect',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'word-spacing',\n 'writing-mode',\n 'xmlns:xlink',\n 'x-height',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xlink namespace.\n[\n 'xlink:actuate',\n 'xlink:arcrole',\n 'xlink:role',\n 'xlink:show',\n 'xlink:title',\n 'xlink:type',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/1999/xlink',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xml namespace.\n[\n 'xml:base',\n 'xml:lang',\n 'xml:space',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/XML/1998/namespace',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n['tabIndex', 'crossOrigin'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\nconst xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord(\n 'xlinkHref',\n STRING,\n false, // mustUseProperty\n 'xlink:href',\n 'http://www.w3.org/1999/xlink',\n true, // sanitizeURL\n false, // removeEmptyString\n);\n\n['src', 'href', 'action', 'formAction'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true, // removeEmptyString\n );\n});\n\n// \nconst {\n CAMELCASE,\n SAME,\n possibleStandardNames: possibleStandardNamesOptimized\n} = require('../lib/possibleStandardNamesOptimized');\n\nconst ATTRIBUTE_NAME_START_CHAR =\n ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n\nconst ATTRIBUTE_NAME_CHAR =\n ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\n\n/**\n * Checks whether a property name is a custom attribute.\n *\n * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25\n *\n * @type {(attribute: string) => boolean}\n */\nconst isCustomAttribute =\n RegExp.prototype.test.bind(\n // eslint-disable-next-line no-misleading-character-class\n new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')\n );\n\n/**\n * @type {Record<string, string>}\n */\nconst possibleStandardNames = Object.keys(\n possibleStandardNamesOptimized\n).reduce((accumulator, standardName) => {\n const propName = possibleStandardNamesOptimized[standardName];\n if (propName === SAME) {\n accumulator[standardName] = standardName;\n } else if (propName === CAMELCASE) {\n accumulator[standardName.toLowerCase()] = standardName;\n } else {\n accumulator[standardName] = propName;\n }\n return accumulator;\n}, {});\n\nexports.BOOLEAN = BOOLEAN;\nexports.BOOLEANISH_STRING = BOOLEANISH_STRING;\nexports.NUMERIC = NUMERIC;\nexports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;\nexports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;\nexports.RESERVED = RESERVED;\nexports.STRING = STRING;\nexports.getPropertyInfo = getPropertyInfo;\nexports.isCustomAttribute = isCustomAttribute;\nexports.possibleStandardNames = possibleStandardNames;\n"],"names":["PropertyInfoRecord","name","type","mustUseProperty","attributeName","attributeNamespace","sanitizeURL","removeEmptyString","this","acceptsBooleans","propertyName","properties","forEach","toLowerCase","CAMELIZE","capitalize","token","toUpperCase","replace","CAMELCASE","SAME","possibleStandardNames","possibleStandardNamesOptimized","require$$0","isCustomAttribute","RegExp","prototype","test","bind","Object","keys","reduce","accumulator","standardName","propName","lib","BOOLEAN","BOOLEANISH_STRING","NUMERIC","OVERLOADED_BOOLEAN","POSITIVE_NUMERIC","RESERVED","STRING","getPropertyInfo","hasOwnProperty"],"mappings":"8JAmDA,SAASA,EACPC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEAC,KAAKC,gBAlCmB,IAmCtBP,GA9BY,IA+BZA,GAzBuB,IA0BvBA,EACFM,KAAKJ,cAAgBA,EACrBI,KAAKH,mBAAqBA,EAC1BG,KAAKL,gBAAkBA,EACvBK,KAAKE,aAAeT,EACpBO,KAAKN,KAAOA,EACZM,KAAKF,YAAcA,EACnBE,KAAKD,kBAAoBA,CAC3B,CAKA,MAAMI,EAAa,CAAA,EAGG,CACpB,WACA,0BAIA,eACA,iBACA,YACA,iCACA,2BACA,SAGYC,QAAQX,IACpBU,EAAWV,GAAQ,IAAID,EACrBC,EA/Ea,GAiFb,EACAA,EACA,MACA,GACA,KAMJ,CACE,CAAC,gBAAiB,kBAClB,CAAC,YAAa,SACd,CAAC,UAAW,OACZ,CAAC,YAAa,eACdW,QAAQ,EAAEX,EAAMG,MAChBO,EAAWV,GAAQ,IAAID,EACrBC,EA9FW,GAgGX,EACAG,EACA,MACA,GACA,KAOJ,CAAC,kBAAmB,YAAa,aAAc,SAASQ,QAAQX,IAC9DU,EAAWV,GAAQ,IAAID,EACrBC,EAvGsB,GAyGtB,EACAA,EAAKY,cACL,MACA,GACA,KAQJ,CACE,cACA,4BACA,YACA,iBACAD,QAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EA5HsB,GA8HtB,EACAA,EACA,MACA,GACA,KAKJ,CACE,kBACA,QAGA,YACA,WACA,WACA,UACA,QACA,WACA,0BACA,wBACA,iBACA,SACA,OACA,WACA,aACA,OACA,cACA,WACA,WACA,WACA,SACA,WAEA,aACAW,QAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EA/JY,GAiKZ,EACAA,EAAKY,cACL,MACA,GACA,KAMJ,CACE,UAGA,WACA,QACA,YAKAD,QAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EAxLY,GA0LZ,EACAA,EACA,MACA,GACA,KAMJ,CACE,UACA,YAKAW,QAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EAvMuB,GAyMvB,EACAA,EACA,MACA,GACA,KAKJ,CACE,OACA,OACA,OACA,QAKAW,QAAQX,IACRU,EAAWV,GAAQ,IAAID,EACrBC,EArNqB,GAuNrB,EACAA,EACA,MACA,GACA,KAKJ,CAAC,UAAW,SAASW,QAAQX,IAC3BU,EAAWV,GAAQ,IAAID,EACrBC,EAtOY,GAwOZ,EACAA,EAAKY,cACL,MACA,GACA,KAIJ,MAAMC,EAAW,iBACXC,EAAaC,GAASA,EAAM,GAAGC,cAOrC,CACE,gBACA,qBACA,cACA,iBACA,aACA,YACA,YACA,sBACA,8BACA,gBACA,kBACA,oBACA,oBACA,eACA,YACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,aACA,+BACA,6BACA,cACA,iBACA,kBACA,iBACA,iBACA,aACA,aACA,eACA,oBACA,qBACA,cACA,WACA,iBACA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AE1CD,EAAYC,GAAgBC,EAEvBF,GACN,CAAE,UAELG,EAAAC,QA/dgB,EAgehBD,EAAAE,kBAre0B,EAse1BF,EAAAG,QAvdgB,EAwdhBH,EAAAI,mBA5d2B,EA6d3BJ,EAAAK,iBArdyB,EAsdzBL,EAAAM,SAnfiB,EAofjBN,EAAAO,OAhfe,EAiffP,EAAAQ,gBAtdA,SAAyB1C,GACvB,OAAOU,EAAWiC,eAAe3C,GAAQU,EAAWV,GAAQ,IAC9D,EAqdAkC,EAAAX,kBAA4BA,EAC5BW,EAAAd,sBAAgCA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import c from"../../../@babel/runtime/helpers/esm/extends.js";import t from"../../../@babel/runtime/helpers/esm/defineProperty.js";import n from"react";function o(c,t){var n=Object.keys(c);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(c);t&&(o=o.filter(
|
|
1
|
+
import c from"../../../@babel/runtime/helpers/esm/extends.js";import t from"../../../@babel/runtime/helpers/esm/defineProperty.js";import n from"react";function o(c,t){var n=Object.keys(c);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(c);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(c,t).enumerable})),n.push.apply(n,o)}return n}function a(c){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?o(Object(a),!0).forEach(function(n){t(c,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach(function(t){Object.defineProperty(c,t,Object.getOwnPropertyDescriptor(a,t))})}return c}var e={};function r(c){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(c){if(0===c.length||1===c.length)return c;var t,n,o=c.join(".");return e[o]||(e[o]=0===(n=(t=c).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),e[o]}(c.filter(function(c){return"token"!==c})).reduce(function(c,t){return a(a({},c),n[t])},t)}function s(c){return c.join(" ")}function i(c,t){var n=0;return function(o){return n+=1,o.map(function(o,a){return u({node:o,stylesheet:c,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(a)})})}}function u(t){var o=t.node,e=t.stylesheet,u=t.style,l=void 0===u?{}:u,f=t.useInlineStyles,p=t.key,m=o.properties,y=o.type,b=o.tagName,d=o.value;if("text"===y)return d;if(b){var O,v=i(e,f);if(f){var j=Object.keys(e).reduce(function(c,t){return t.split(".").forEach(function(t){c.includes(t)||c.push(t)}),c},[]),h=m.className&&m.className.includes("token")?["token"]:[],g=m.className&&h.concat(m.className.filter(function(c){return!j.includes(c)}));O=a(a({},m),{},{className:s(g)||void 0,style:r(m.className,Object.assign({},m.style,l),e)})}else O=a(a({},m),{},{className:s(m.className)});var N=v(o.children);return n.createElement(b,c({key:p},O),N)}}export{i as createChildren,s as createClassNameString,r as createStyleObject,u as default};
|
|
2
2
|
//# sourceMappingURL=create-element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-element.js","sources":["../../../../../node_modules/react-syntax-highlighter/dist/esm/create-element.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport React from 'react';\n\n// Get all possible permutations of all power sets\n//\n// Super simple, non-algorithmic solution since the\n// number of class names will not be greater than 4\nfunction powerSetPermutations(arr) {\n var arrLength = arr.length;\n if (arrLength === 0 || arrLength === 1) return arr;\n if (arrLength === 2) {\n // prettier-ignore\n return [arr[0], arr[1], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength === 3) {\n return [arr[0], arr[1], arr[2], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength >= 4) {\n // Currently does not support more than 4 extra\n // class names (after `.token` has been removed)\n return [arr[0], arr[1], arr[2], arr[3], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n}\nvar classNameCombinations = {};\nfunction getClassNameCombinations(classNames) {\n if (classNames.length === 0 || classNames.length === 1) return classNames;\n var key = classNames.join('.');\n if (!classNameCombinations[key]) {\n classNameCombinations[key] = powerSetPermutations(classNames);\n }\n return classNameCombinations[key];\n}\nexport function createStyleObject(classNames) {\n var elementStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var stylesheet = arguments.length > 2 ? arguments[2] : undefined;\n var nonTokenClassNames = classNames.filter(function (className) {\n return className !== 'token';\n });\n var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);\n return classNamesCombinations.reduce(function (styleObject, className) {\n return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);\n }, elementStyle);\n}\nexport function createClassNameString(classNames) {\n return classNames.join(' ');\n}\nexport function createChildren(stylesheet, useInlineStyles) {\n var childrenCount = 0;\n return function (children) {\n childrenCount += 1;\n return children.map(function (child, i) {\n return createElement({\n node: child,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segment-\".concat(childrenCount, \"-\").concat(i)\n });\n });\n };\n}\nexport default function createElement(_ref) {\n var node = _ref.node,\n stylesheet = _ref.stylesheet,\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n useInlineStyles = _ref.useInlineStyles,\n key = _ref.key;\n var properties = node.properties,\n type = node.type,\n TagName = node.tagName,\n value = node.value;\n if (type === 'text') {\n return value;\n } else if (TagName) {\n var childrenCreator = createChildren(stylesheet, useInlineStyles);\n var props;\n if (!useInlineStyles) {\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(properties.className)\n });\n } else {\n var allStylesheetSelectors = Object.keys(stylesheet).reduce(function (classes, selector) {\n selector.split('.').forEach(function (className) {\n if (!classes.includes(className)) classes.push(className);\n });\n return classes;\n }, []);\n\n // For compatibility with older versions of react-syntax-highlighter\n var startingClassName = properties.className && properties.className.includes('token') ? ['token'] : [];\n var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {\n return !allStylesheetSelectors.includes(className);\n }));\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(className) || undefined,\n style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)\n });\n }\n var children = childrenCreator(node.children);\n return /*#__PURE__*/React.createElement(TagName, _extends({\n key: key\n }, props), children);\n }\n}"],"names":["ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","classNameCombinations","createStyleObject","classNames","elementStyle","undefined","stylesheet","arr","arrLength","key","join","concat","getClassNameCombinations","className","reduce","styleObject","createClassNameString","createChildren","useInlineStyles","childrenCount","children","map","child","i","createElement","node","_ref","_ref$style","style","properties","type","TagName","tagName","value","props","childrenCreator","allStylesheetSelectors","classes","selector","split","includes","startingClassName","assign","React","_extends"],"mappings":"wJAEA,SAASA,EAAQC,EAAGC,GAAK,IAAIC,EAAIC,OAAOC,KAAKJ,GAAI,GAAIG,OAAOE,sBAAuB,CAAE,IAAIC,EAAIH,OAAOE,sBAAsBL,GAAIC,IAAMK,EAAIA,EAAEC,QAAO,SAAUN,GAAK,OAAOE,OAAOK,yBAAyBR,EAAGC,GAAGQ,UAAW,KAAMP,EAAEQ,KAAKC,MAAMT,EAAGI,EAAG,CAAG,OAAOJ,CAAI,CAC/P,SAASU,EAAcZ,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIY,UAAUC,OAAQb,IAAK,CAAE,IAAIC,EAAI,MAAQW,UAAUZ,GAAKY,UAAUZ,GAAK,CAAE,EAAEA,EAAI,EAAIF,EAAQI,OAAOD,IAAI,GAAIa,SAAQ,SAAUd,GAAKe,EAAgBhB,EAAGC,EAAGC,EAAED,GAAM,IAAIE,OAAOc,0BAA4Bd,OAAOe,iBAAiBlB,EAAGG,OAAOc,0BAA0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AAS,CACxDnC,IAAKA,GACJyB,GAAQd,EACZ,CACH"}
|
|
1
|
+
{"version":3,"file":"create-element.js","sources":["../../../../../node_modules/react-syntax-highlighter/dist/esm/create-element.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport React from 'react';\n\n// Get all possible permutations of all power sets\n//\n// Super simple, non-algorithmic solution since the\n// number of class names will not be greater than 4\nfunction powerSetPermutations(arr) {\n var arrLength = arr.length;\n if (arrLength === 0 || arrLength === 1) return arr;\n if (arrLength === 2) {\n // prettier-ignore\n return [arr[0], arr[1], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength === 3) {\n return [arr[0], arr[1], arr[2], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength >= 4) {\n // Currently does not support more than 4 extra\n // class names (after `.token` has been removed)\n return [arr[0], arr[1], arr[2], arr[3], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n}\nvar classNameCombinations = {};\nfunction getClassNameCombinations(classNames) {\n if (classNames.length === 0 || classNames.length === 1) return classNames;\n var key = classNames.join('.');\n if (!classNameCombinations[key]) {\n classNameCombinations[key] = powerSetPermutations(classNames);\n }\n return classNameCombinations[key];\n}\nexport function createStyleObject(classNames) {\n var elementStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var stylesheet = arguments.length > 2 ? arguments[2] : undefined;\n var nonTokenClassNames = classNames.filter(function (className) {\n return className !== 'token';\n });\n var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);\n return classNamesCombinations.reduce(function (styleObject, className) {\n return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);\n }, elementStyle);\n}\nexport function createClassNameString(classNames) {\n return classNames.join(' ');\n}\nexport function createChildren(stylesheet, useInlineStyles) {\n var childrenCount = 0;\n return function (children) {\n childrenCount += 1;\n return children.map(function (child, i) {\n return createElement({\n node: child,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segment-\".concat(childrenCount, \"-\").concat(i)\n });\n });\n };\n}\nexport default function createElement(_ref) {\n var node = _ref.node,\n stylesheet = _ref.stylesheet,\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n useInlineStyles = _ref.useInlineStyles,\n key = _ref.key;\n var properties = node.properties,\n type = node.type,\n TagName = node.tagName,\n value = node.value;\n if (type === 'text') {\n return value;\n } else if (TagName) {\n var childrenCreator = createChildren(stylesheet, useInlineStyles);\n var props;\n if (!useInlineStyles) {\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(properties.className)\n });\n } else {\n var allStylesheetSelectors = Object.keys(stylesheet).reduce(function (classes, selector) {\n selector.split('.').forEach(function (className) {\n if (!classes.includes(className)) classes.push(className);\n });\n return classes;\n }, []);\n\n // For compatibility with older versions of react-syntax-highlighter\n var startingClassName = properties.className && properties.className.includes('token') ? ['token'] : [];\n var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {\n return !allStylesheetSelectors.includes(className);\n }));\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(className) || undefined,\n style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)\n });\n }\n var children = childrenCreator(node.children);\n return /*#__PURE__*/React.createElement(TagName, _extends({\n key: key\n }, props), children);\n }\n}"],"names":["ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","classNameCombinations","createStyleObject","classNames","elementStyle","undefined","stylesheet","arr","arrLength","key","join","concat","getClassNameCombinations","className","reduce","styleObject","createClassNameString","createChildren","useInlineStyles","childrenCount","children","map","child","i","createElement","node","_ref","_ref$style","style","properties","type","TagName","tagName","value","props","childrenCreator","allStylesheetSelectors","classes","selector","split","includes","startingClassName","assign","React","_extends"],"mappings":"wJAEA,SAASA,EAAQC,EAAGC,GAAK,IAAIC,EAAIC,OAAOC,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,EAAWhB,WAAagB,EAAWhB,UAAU2B,SAAS,SAAW,CAAC,SAAW,GACjG3B,EAAYgB,EAAWhB,WAAa4B,EAAkB9B,OAAOkB,EAAWhB,UAAUzB,OAAO,SAAUyB,GACrG,OAAQuB,EAAuBI,SAAS3B,EACzC,IACDqB,EAAQzC,EAAcA,EAAc,CAAE,EAAEoC,GAAa,CAAA,EAAI,CACvDhB,UAAWG,EAAsBH,SAAcR,EAC/CuB,MAAO1B,EAAkB2B,EAAWhB,UAAW7B,OAAO0D,OAAO,CAAE,EAAEb,EAAWD,MAAOA,GAAQtB,IAE9F,MApBC4B,EAAQzC,EAAcA,EAAc,CAAE,EAAEoC,GAAa,CAAA,EAAI,CACvDhB,UAAWG,EAAsBa,EAAWhB,aAoBhD,IAAIO,EAAWe,EAAgBV,EAAKL,UACpC,OAAoBuB,EAAMnB,cAAcO,EAASa,EAAS,CACxDnC,IAAKA,GACJyB,GAAQd,EACZ,CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import t from"../../../@babel/runtime/helpers/esm/toConsumableArray.js";import n from"../../../@babel/runtime/helpers/esm/defineProperty.js";import r from"react";import a from"./create-element.js";import i from"./checkForListedLanguage.js";var l=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(
|
|
1
|
+
import e from"../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import t from"../../../@babel/runtime/helpers/esm/toConsumableArray.js";import n from"../../../@babel/runtime/helpers/esm/defineProperty.js";import r from"react";import a from"./create-element.js";import i from"./checkForListedLanguage.js";var l=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var c=/\n/g;function u(e){var t=e.codeString,n=e.codeStyle,a=e.containerStyle,i=void 0===a?{float:"left",paddingRight:"10px"}:a,l=e.numberStyle,s=void 0===l?{}:l,o=e.startingLineNumber;return r.createElement("code",{style:Object.assign({},n,i)},function(e){var t=e.lines,n=e.startingLineNumber,a=e.style;return t.map(function(e,t){var i=t+n;return r.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof a?a(i):a},"".concat(i,"\n"))})}({lines:t.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:o}))}function p(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function m(e,t,n){var r,a={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},i="function"==typeof e?e(t):e;return o(o({},a),i)}function g(e){var n=e.children,r=e.lineNumber,a=e.lineNumberStyle,i=e.largestLineNumber,l=e.showInlineLineNumbers,s=e.lineProps,c=void 0===s?{}:s,u=e.className,g=void 0===u?[]:u,h=e.showLineNumbers,v=e.wrapLongLines,d=e.wrapLines,f=void 0!==d&&d?o({},"function"==typeof c?c(r):c):{};if(f.className=f.className?[].concat(t(f.className.trim().split(/\s+/)),t(g)):g,r&&l){var y=m(a,r,i);n.unshift(p(r,y))}return v&h&&(f.style=o({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:n}}function h(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=0;a<e.length;a++){var i=e[a];if("text"===i.type)r.push(g({children:[i],className:t(new Set(n))}));else if(i.children){var l=n.concat(i.properties.className);h(i.children,l).forEach(function(e){return r.push(e)})}}return r}function v(e,t,n,r,a,i,l,s,o){var u,v=h(e.value),d=[],f=-1,y=0;function b(e,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,i){return g({children:e,lineNumber:i,lineNumberStyle:s,largestLineNumber:l,showInlineLineNumbers:a,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:o,wrapLines:t})}(e,i,c):function(e,t){if(r&&t&&a){var n=m(s,t,l);e.unshift(p(t,n))}return e}(e,i)}for(var N=function(){var e=v[y],t=e.children[0].value;if(t.match(c)){var n=t.split("\n");n.forEach(function(t,a){var l=r&&d.length+i,s={type:"text",value:"".concat(t,"\n")};if(0===a){var o=b(v.slice(f+1,y).concat(g({children:[s],className:e.properties.className})),l);d.push(o)}else if(a===n.length-1){var c=v[y+1]&&v[y+1].children&&v[y+1].children[0],u={type:"text",value:"".concat(t)};if(c){var p=g({children:[u],className:e.properties.className});v.splice(y+1,0,p)}else{var m=b([u],l,e.properties.className);d.push(m)}}else{var h=b([s],l,e.properties.className);d.push(h)}}),f=y}y++};y<v.length;)N();if(f!==v.length-1){var L=v.slice(f+1,v.length);if(L&&L.length){var w=b(L,r&&d.length+i);d.push(w)}}return t?d:(u=[]).concat.apply(u,d)}function d(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return a({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})})}function f(e){return e&&void 0!==e.highlightAuto}function y(t,n){return function(a){var s=a.language,c=a.children,p=a.style,m=void 0===p?n:p,g=a.customStyle,h=void 0===g?{}:g,y=a.codeTagProps,b=void 0===y?{className:s?"language-".concat(s):void 0,style:o(o({},m['code[class*="language-"]']),m['code[class*="language-'.concat(s,'"]')])}:y,N=a.useInlineStyles,L=void 0===N||N,w=a.showLineNumbers,S=void 0!==w&&w,j=a.showInlineLineNumbers,O=void 0===j||j,P=a.startingLineNumber,x=void 0===P?1:P,E=a.lineNumberContainerStyle,I=a.lineNumberStyle,C=void 0===I?{}:I,k=a.wrapLines,A=a.wrapLongLines,T=void 0!==A&&A,D=a.lineProps,G=void 0===D?{}:D,R=a.renderer,V=a.PreTag,W=void 0===V?"pre":V,F=a.CodeTag,$=void 0===F?"code":F,q=a.code,z=void 0===q?(Array.isArray(c)?c[0]:c)||"":q,B=a.astGenerator,H=e(a,l);B=B||t;var J=S?r.createElement(u,{containerStyle:E,codeStyle:b.style||{},numberStyle:C,startingLineNumber:x,codeString:z}):null,K=m.hljs||m['pre[class*="language-"]']||{backgroundColor:"#fff"},M=f(B)?"hljs":"prismjs",Q=L?Object.assign({},H,{style:Object.assign({},K,h)}):Object.assign({},H,{className:H.className?"".concat(M," ").concat(H.className):M,style:Object.assign({},h)});if(b.style=o(T?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},b.style),!B)return r.createElement(W,Q,J,r.createElement($,b,z));(void 0===k&&R||T)&&(k=!0),R=R||d;var U=[{type:"text",value:z}],X=function(e){var t=e.astGenerator,n=e.language,r=e.code,a=e.defaultCodeValue;if(f(t)){var l=i(t,n);return"text"===n?{value:a,language:"text"}:l?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:a}}catch(e){return{value:a}}}({astGenerator:B,language:s,code:z,defaultCodeValue:U});null===X.language&&(X.value=U);var Y=X.value.length;1===Y&&"text"===X.value[0].type&&(Y=X.value[0].value.split("\n").length);var Z=v(X,k,G,S,O,x,Y+x,C,T);return r.createElement(W,Q,r.createElement($,b,!O&&J,R({rows:Z,stylesheet:m,useInlineStyles:L})))}}export{y as default};
|
|
2
2
|
//# sourceMappingURL=highlight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.js","sources":["../../../../../node_modules/react-syntax-highlighter/dist/esm/highlight.js"],"sourcesContent":["import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _excluded = [\"language\", \"children\", \"style\", \"customStyle\", \"codeTagProps\", \"useInlineStyles\", \"showLineNumbers\", \"showInlineLineNumbers\", \"startingLineNumber\", \"lineNumberContainerStyle\", \"lineNumberStyle\", \"wrapLines\", \"wrapLongLines\", \"lineProps\", \"renderer\", \"PreTag\", \"CodeTag\", \"code\", \"astGenerator\"];\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport React from 'react';\nimport createElement from './create-element';\nimport checkForListedLanguage from './checkForListedLanguage';\nvar newLineRegex = /\\n/g;\nfunction getNewLines(str) {\n return str.match(newLineRegex);\n}\nfunction getAllLineNumbers(_ref) {\n var lines = _ref.lines,\n startingLineNumber = _ref.startingLineNumber,\n style = _ref.style;\n return lines.map(function (_, i) {\n var number = i + startingLineNumber;\n return /*#__PURE__*/React.createElement(\"span\", {\n key: \"line-\".concat(i),\n className: \"react-syntax-highlighter-line-number\",\n style: typeof style === 'function' ? style(number) : style\n }, \"\".concat(number, \"\\n\"));\n });\n}\nfunction AllLineNumbers(_ref2) {\n var codeString = _ref2.codeString,\n codeStyle = _ref2.codeStyle,\n _ref2$containerStyle = _ref2.containerStyle,\n containerStyle = _ref2$containerStyle === void 0 ? {\n \"float\": 'left',\n paddingRight: '10px'\n } : _ref2$containerStyle,\n _ref2$numberStyle = _ref2.numberStyle,\n numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,\n startingLineNumber = _ref2.startingLineNumber;\n return /*#__PURE__*/React.createElement(\"code\", {\n style: Object.assign({}, codeStyle, containerStyle)\n }, getAllLineNumbers({\n lines: codeString.replace(/\\n$/, '').split('\\n'),\n style: numberStyle,\n startingLineNumber: startingLineNumber\n }));\n}\nfunction getEmWidthOfNumber(num) {\n return \"\".concat(num.toString().length, \".25em\");\n}\nfunction getInlineLineNumber(lineNumber, inlineLineNumberStyle) {\n return {\n type: 'element',\n tagName: 'span',\n properties: {\n key: \"line-number--\".concat(lineNumber),\n className: ['comment', 'linenumber', 'react-syntax-highlighter-line-number'],\n style: inlineLineNumberStyle\n },\n children: [{\n type: 'text',\n value: lineNumber\n }]\n };\n}\nfunction assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {\n // minimally necessary styling for line numbers\n var defaultLineNumberStyle = {\n display: 'inline-block',\n minWidth: getEmWidthOfNumber(largestLineNumber),\n paddingRight: '1em',\n textAlign: 'right',\n userSelect: 'none'\n };\n // prep custom styling\n var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle;\n // combine\n var assembledStyle = _objectSpread(_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);\n return assembledStyle;\n}\nfunction createLineElement(_ref3) {\n var children = _ref3.children,\n lineNumber = _ref3.lineNumber,\n lineNumberStyle = _ref3.lineNumberStyle,\n largestLineNumber = _ref3.largestLineNumber,\n showInlineLineNumbers = _ref3.showInlineLineNumbers,\n _ref3$lineProps = _ref3.lineProps,\n lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps,\n _ref3$className = _ref3.className,\n className = _ref3$className === void 0 ? [] : _ref3$className,\n showLineNumbers = _ref3.showLineNumbers,\n wrapLongLines = _ref3.wrapLongLines,\n _ref3$wrapLines = _ref3.wrapLines,\n wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;\n var properties = wrapLines ? _objectSpread({}, typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps) : {};\n properties['className'] = properties['className'] ? [].concat(_toConsumableArray(properties['className'].trim().split(/\\s+/)), _toConsumableArray(className)) : className;\n if (lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n if (wrapLongLines & showLineNumbers) {\n properties.style = _objectSpread({\n display: 'flex'\n }, properties.style);\n }\n return {\n type: 'element',\n tagName: 'span',\n properties: properties,\n children: children\n };\n}\nfunction flattenCodeTree(tree) {\n var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var newTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n if (node.type === 'text') {\n newTree.push(createLineElement({\n children: [node],\n className: _toConsumableArray(new Set(className))\n }));\n } else if (node.children) {\n var classNames = className.concat(node.properties.className);\n flattenCodeTree(node.children, classNames).forEach(function (i) {\n return newTree.push(i);\n });\n }\n }\n return newTree;\n}\nfunction processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {\n var _ref4;\n var tree = flattenCodeTree(codeTree.value);\n var newTree = [];\n var lastLineBreakIndex = -1;\n var index = 0;\n function createWrappedLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return createLineElement({\n children: children,\n lineNumber: lineNumber,\n lineNumberStyle: lineNumberStyle,\n largestLineNumber: largestLineNumber,\n showInlineLineNumbers: showInlineLineNumbers,\n lineProps: lineProps,\n className: className,\n showLineNumbers: showLineNumbers,\n wrapLongLines: wrapLongLines,\n wrapLines: wrapLines\n });\n }\n function createUnwrappedLine(children, lineNumber) {\n if (showLineNumbers && lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n return children;\n }\n function createLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return wrapLines || className.length > 0 ? createWrappedLine(children, lineNumber, className) : createUnwrappedLine(children, lineNumber);\n }\n var _loop = function _loop() {\n var node = tree[index];\n var value = node.children[0].value;\n var newLines = getNewLines(value);\n if (newLines) {\n var splitValue = value.split('\\n');\n splitValue.forEach(function (text, i) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var newChild = {\n type: 'text',\n value: \"\".concat(text, \"\\n\")\n };\n\n // if it's the first line\n if (i === 0) {\n var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({\n children: [newChild],\n className: node.properties.className\n }));\n var _line = createLine(_children, lineNumber);\n newTree.push(_line);\n\n // if it's the last line\n } else if (i === splitValue.length - 1) {\n var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];\n var lastLineInPreviousSpan = {\n type: 'text',\n value: \"\".concat(text)\n };\n if (stringChild) {\n var newElem = createLineElement({\n children: [lastLineInPreviousSpan],\n className: node.properties.className\n });\n tree.splice(index + 1, 0, newElem);\n } else {\n var _children2 = [lastLineInPreviousSpan];\n var _line2 = createLine(_children2, lineNumber, node.properties.className);\n newTree.push(_line2);\n }\n\n // if it's neither the first nor the last line\n } else {\n var _children3 = [newChild];\n var _line3 = createLine(_children3, lineNumber, node.properties.className);\n newTree.push(_line3);\n }\n });\n lastLineBreakIndex = index;\n }\n index++;\n };\n while (index < tree.length) {\n _loop();\n }\n if (lastLineBreakIndex !== tree.length - 1) {\n var children = tree.slice(lastLineBreakIndex + 1, tree.length);\n if (children && children.length) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var line = createLine(children, lineNumber);\n newTree.push(line);\n }\n }\n return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);\n}\nfunction defaultRenderer(_ref5) {\n var rows = _ref5.rows,\n stylesheet = _ref5.stylesheet,\n useInlineStyles = _ref5.useInlineStyles;\n return rows.map(function (node, i) {\n return createElement({\n node: node,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segement\".concat(i)\n });\n });\n}\n\n// only highlight.js has the highlightAuto method\nfunction isHighlightJs(astGenerator) {\n return astGenerator && typeof astGenerator.highlightAuto !== 'undefined';\n}\nfunction getCodeTree(_ref6) {\n var astGenerator = _ref6.astGenerator,\n language = _ref6.language,\n code = _ref6.code,\n defaultCodeValue = _ref6.defaultCodeValue;\n // figure out whether we're using lowlight/highlight or refractor/prism\n // then attempt highlighting accordingly\n\n // lowlight/highlight?\n if (isHighlightJs(astGenerator)) {\n var hasLanguage = checkForListedLanguage(astGenerator, language);\n if (language === 'text') {\n return {\n value: defaultCodeValue,\n language: 'text'\n };\n } else if (hasLanguage) {\n return astGenerator.highlight(language, code);\n } else {\n return astGenerator.highlightAuto(code);\n }\n }\n\n // must be refractor/prism, then\n try {\n return language && language !== 'text' ? {\n value: astGenerator.highlight(code, language)\n } : {\n value: defaultCodeValue\n };\n } catch (e) {\n return {\n value: defaultCodeValue\n };\n }\n}\nexport default function (defaultAstGenerator, defaultStyle) {\n return function SyntaxHighlighter(_ref7) {\n var language = _ref7.language,\n children = _ref7.children,\n _ref7$style = _ref7.style,\n style = _ref7$style === void 0 ? defaultStyle : _ref7$style,\n _ref7$customStyle = _ref7.customStyle,\n customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle,\n _ref7$codeTagProps = _ref7.codeTagProps,\n codeTagProps = _ref7$codeTagProps === void 0 ? {\n className: language ? \"language-\".concat(language) : undefined,\n style: _objectSpread(_objectSpread({}, style['code[class*=\"language-\"]']), style[\"code[class*=\\\"language-\".concat(language, \"\\\"]\")])\n } : _ref7$codeTagProps,\n _ref7$useInlineStyles = _ref7.useInlineStyles,\n useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,\n _ref7$showLineNumbers = _ref7.showLineNumbers,\n showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers,\n _ref7$showInlineLineN = _ref7.showInlineLineNumbers,\n showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN,\n _ref7$startingLineNum = _ref7.startingLineNumber,\n startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum,\n lineNumberContainerStyle = _ref7.lineNumberContainerStyle,\n _ref7$lineNumberStyle = _ref7.lineNumberStyle,\n lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle,\n wrapLines = _ref7.wrapLines,\n _ref7$wrapLongLines = _ref7.wrapLongLines,\n wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines,\n _ref7$lineProps = _ref7.lineProps,\n lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps,\n renderer = _ref7.renderer,\n _ref7$PreTag = _ref7.PreTag,\n PreTag = _ref7$PreTag === void 0 ? 'pre' : _ref7$PreTag,\n _ref7$CodeTag = _ref7.CodeTag,\n CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,\n _ref7$code = _ref7.code,\n code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,\n astGenerator = _ref7.astGenerator,\n rest = _objectWithoutProperties(_ref7, _excluded);\n astGenerator = astGenerator || defaultAstGenerator;\n var allLineNumbers = showLineNumbers ? /*#__PURE__*/React.createElement(AllLineNumbers, {\n containerStyle: lineNumberContainerStyle,\n codeStyle: codeTagProps.style || {},\n numberStyle: lineNumberStyle,\n startingLineNumber: startingLineNumber,\n codeString: code\n }) : null;\n var defaultPreStyle = style.hljs || style['pre[class*=\"language-\"]'] || {\n backgroundColor: '#fff'\n };\n var generatorClassName = isHighlightJs(astGenerator) ? 'hljs' : 'prismjs';\n var preProps = useInlineStyles ? Object.assign({}, rest, {\n style: Object.assign({}, defaultPreStyle, customStyle)\n }) : Object.assign({}, rest, {\n className: rest.className ? \"\".concat(generatorClassName, \" \").concat(rest.className) : generatorClassName,\n style: Object.assign({}, customStyle)\n });\n if (wrapLongLines) {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre-wrap'\n }, codeTagProps.style);\n } else {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre'\n }, codeTagProps.style);\n }\n if (!astGenerator) {\n return /*#__PURE__*/React.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, code));\n }\n\n /*\n * Some custom renderers rely on individual row elements so we need to turn wrapLines on\n * if renderer is provided and wrapLines is undefined.\n */\n if (wrapLines === undefined && renderer || wrapLongLines) wrapLines = true;\n renderer = renderer || defaultRenderer;\n var defaultCodeValue = [{\n type: 'text',\n value: code\n }];\n var codeTree = getCodeTree({\n astGenerator: astGenerator,\n language: language,\n code: code,\n defaultCodeValue: defaultCodeValue\n });\n if (codeTree.language === null) {\n codeTree.value = defaultCodeValue;\n }\n\n // determine largest line number so that we can force minWidth on all linenumber elements\n var lineCount = codeTree.value.length;\n if (lineCount === 1 && codeTree.value[0].type === 'text') {\n // Since codeTree for an unparsable text (e.g. 'a\\na\\na') is [{ type: 'text', value: 'a\\na\\na' }]\n lineCount = codeTree.value[0].value.split('\\n').length;\n }\n var largestLineNumber = lineCount + startingLineNumber;\n var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);\n return /*#__PURE__*/React.createElement(PreTag, preProps, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({\n rows: rows,\n stylesheet: style,\n useInlineStyles: useInlineStyles\n })));\n };\n}"],"names":["_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","newLineRegex","AllLineNumbers","_ref2","codeString","codeStyle","_ref2$containerStyle","containerStyle","float","paddingRight","_ref2$numberStyle","numberStyle","startingLineNumber","React","createElement","style","assign","_ref","lines","map","_","i","number","key","concat","className","getAllLineNumbers","replace","split","getInlineLineNumber","lineNumber","inlineLineNumberStyle","type","tagName","properties","children","value","assembleLineNumberStyles","lineNumberStyle","largestLineNumber","num","defaultLineNumberStyle","display","minWidth","toString","textAlign","userSelect","customLineNumberStyle","createLineElement","_ref3","showInlineLineNumbers","_ref3$lineProps","lineProps","_ref3$className","showLineNumbers","wrapLongLines","_ref3$wrapLines","wrapLines","_toConsumableArray","trim","unshift","flattenCodeTree","tree","undefined","newTree","node","Set","classNames","processLines","codeTree","_ref4","lastLineBreakIndex","index","createLine","createWrappedLine","createUnwrappedLine","_loop","match","splitValue","text","newChild","_line","slice","stringChild","lastLineInPreviousSpan","newElem","splice","_line2","_line3","line","defaultRenderer","_ref5","rows","stylesheet","useInlineStyles","isHighlightJs","astGenerator","highlightAuto","highlight","defaultAstGenerator","defaultStyle","_ref7","language","_ref7$style","_ref7$customStyle","customStyle","_ref7$codeTagProps","codeTagProps","_ref7$useInlineStyles","_ref7$showLineNumbers","_ref7$showInlineLineN","_ref7$startingLineNum","lineNumberContainerStyle","_ref7$lineNumberStyle","_ref7$wrapLongLines","_ref7$lineProps","renderer","_ref7$PreTag","PreTag","_ref7$CodeTag","CodeTag","_ref7$code","code","Array","isArray","rest","_objectWithoutProperties","allLineNumbers","defaultPreStyle","hljs","backgroundColor","generatorClassName","preProps","whiteSpace","defaultCodeValue","_ref6","hasLanguage","checkForListedLanguage","getCodeTree","lineCount"],"mappings":"8TAGA,IAAIA,EAAY,CAAC,WAAY,WAAY,QAAS,cAAe,eAAgB,kBAAmB,kBAAmB,wBAAyB,qBAAsB,2BAA4B,kBAAmB,YAAa,gBAAiB,YAAa,WAAY,SAAU,UAAW,OAAQ,gBACzS,SAASC,EAAQC,EAAGC,GAAK,IAAIC,EAAIC,OAAOC,KAAKJ,GAAI,GAAIG,OAAOE,sBAAuB,CAAE,IAAIC,EAAIH,OAAOE,sBAAsBL,GAAIC,IAAMK,EAAIA,EAAEC,QAAO,SAAUN,GAAK,OAAOE,OAAOK,yBAAyBR,EAAGC,GAAGQ,UAAW,KAAMP,EAAEQ,KAAKC,MAAMT,EAAGI,EAAG,CAAG,OAAOJ,CAAI,CAC/P,SAASU,EAAcZ,GAAK,IAAK,IAAIC,EAAI,EAAGA,EAAIY,UAAUC,OAAQb,IAAK,CAAE,IAAIC,EAAI,MAAQW,UAAUZ,GAAKY,UAAUZ,GAAK,CAAE,EAAEA,EAAI,EAAIF,EAAQI,OAAOD,IAAI,GAAIa,SAAQ,SAAUd,GAAKe,EAAgBhB,EAAGC,EAAGC,EAAED,GAAM,IAAIE,OAAOc,0BAA4Bd,OAAOe,iBAAiBlB,EAAGG,OAAOc,0BAA0Bf,IAAMH,EAAQI,OAAOD,IAAIa,SAAQ,SAAUd,GAAKE,OAAOgB,eAAenB,EAAGC,EAAGE,OAAOK,yBAAyBN,EAAGD,GAAI,GAAM,CAAC,OAAOD,CAAI,CAIvb,IAAIoB,EAAe,MAiBnB,SAASC,EAAeC,GACtB,IAAIC,EAAaD,EAAMC,WACrBC,EAAYF,EAAME,UAClBC,EAAuBH,EAAMI,eAC7BA,OAA0C,IAAzBD,EAAkC,CACjDE,MAAS,OACTC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AAMb,KACbY,EAAmBC,EAAMD,iBAK3B,GAAIvC,EAAcC,GAAe,CAC/B,IAAIwC,EAAcC,EAAuBzC,EAAcM,GACvD,MAAiB,SAAbA,EACK,CACLlE,MAAOkG,EACPhC,SAAU,QAEHkC,EACFxC,EAAaE,UAAUI,EAAUoB,GAEjC1B,EAAaC,cAAcyB,EAErC,CAGD,IACE,OAAOpB,GAAyB,SAAbA,EAAsB,CACvClE,MAAO4D,EAAaE,UAAUwB,EAAMpB,IAClC,CACFlE,MAAOkG,EAEV,CAAC,MAAOzJ,GACP,MAAO,CACLuD,MAAOkG,EAEV,CACH,CAgFmBI,CAAY,CACzB1C,aAAcA,EACdM,SAAUA,EACVoB,KAAMA,EACNY,iBAAkBA,IAEM,OAAtBjE,EAASiC,WACXjC,EAASjC,MAAQkG,GAInB,IAAIK,EAAYtE,EAASjC,MAAMzC,OACb,IAAdgJ,GAA8C,SAA3BtE,EAASjC,MAAM,GAAGJ,OAEvC2G,EAAYtE,EAASjC,MAAM,GAAGA,MAAMR,MAAM,MAAMjC,QAElD,IACIiG,EAAOxB,EAAaC,EAAUZ,EAAWL,EAAWE,EAAiBJ,EAAuBtC,EADxE+H,EAAY/H,EACmG0B,EAAiBiB,GACxJ,OAAoB1C,EAAMC,cAAcwG,EAAQc,EAAuBvH,EAAMC,cAAc0G,EAASb,GAAezD,GAAyB6E,EAAgBX,EAAS,CACnKxB,KAAMA,EACNC,WAAY9E,EACZ+E,gBAAiBA,KAEvB,CACA"}
|
|
1
|
+
{"version":3,"file":"highlight.js","sources":["../../../../../node_modules/react-syntax-highlighter/dist/esm/highlight.js"],"sourcesContent":["import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _excluded = [\"language\", \"children\", \"style\", \"customStyle\", \"codeTagProps\", \"useInlineStyles\", \"showLineNumbers\", \"showInlineLineNumbers\", \"startingLineNumber\", \"lineNumberContainerStyle\", \"lineNumberStyle\", \"wrapLines\", \"wrapLongLines\", \"lineProps\", \"renderer\", \"PreTag\", \"CodeTag\", \"code\", \"astGenerator\"];\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport React from 'react';\nimport createElement from './create-element';\nimport checkForListedLanguage from './checkForListedLanguage';\nvar newLineRegex = /\\n/g;\nfunction getNewLines(str) {\n return str.match(newLineRegex);\n}\nfunction getAllLineNumbers(_ref) {\n var lines = _ref.lines,\n startingLineNumber = _ref.startingLineNumber,\n style = _ref.style;\n return lines.map(function (_, i) {\n var number = i + startingLineNumber;\n return /*#__PURE__*/React.createElement(\"span\", {\n key: \"line-\".concat(i),\n className: \"react-syntax-highlighter-line-number\",\n style: typeof style === 'function' ? style(number) : style\n }, \"\".concat(number, \"\\n\"));\n });\n}\nfunction AllLineNumbers(_ref2) {\n var codeString = _ref2.codeString,\n codeStyle = _ref2.codeStyle,\n _ref2$containerStyle = _ref2.containerStyle,\n containerStyle = _ref2$containerStyle === void 0 ? {\n \"float\": 'left',\n paddingRight: '10px'\n } : _ref2$containerStyle,\n _ref2$numberStyle = _ref2.numberStyle,\n numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,\n startingLineNumber = _ref2.startingLineNumber;\n return /*#__PURE__*/React.createElement(\"code\", {\n style: Object.assign({}, codeStyle, containerStyle)\n }, getAllLineNumbers({\n lines: codeString.replace(/\\n$/, '').split('\\n'),\n style: numberStyle,\n startingLineNumber: startingLineNumber\n }));\n}\nfunction getEmWidthOfNumber(num) {\n return \"\".concat(num.toString().length, \".25em\");\n}\nfunction getInlineLineNumber(lineNumber, inlineLineNumberStyle) {\n return {\n type: 'element',\n tagName: 'span',\n properties: {\n key: \"line-number--\".concat(lineNumber),\n className: ['comment', 'linenumber', 'react-syntax-highlighter-line-number'],\n style: inlineLineNumberStyle\n },\n children: [{\n type: 'text',\n value: lineNumber\n }]\n };\n}\nfunction assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {\n // minimally necessary styling for line numbers\n var defaultLineNumberStyle = {\n display: 'inline-block',\n minWidth: getEmWidthOfNumber(largestLineNumber),\n paddingRight: '1em',\n textAlign: 'right',\n userSelect: 'none'\n };\n // prep custom styling\n var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle;\n // combine\n var assembledStyle = _objectSpread(_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);\n return assembledStyle;\n}\nfunction createLineElement(_ref3) {\n var children = _ref3.children,\n lineNumber = _ref3.lineNumber,\n lineNumberStyle = _ref3.lineNumberStyle,\n largestLineNumber = _ref3.largestLineNumber,\n showInlineLineNumbers = _ref3.showInlineLineNumbers,\n _ref3$lineProps = _ref3.lineProps,\n lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps,\n _ref3$className = _ref3.className,\n className = _ref3$className === void 0 ? [] : _ref3$className,\n showLineNumbers = _ref3.showLineNumbers,\n wrapLongLines = _ref3.wrapLongLines,\n _ref3$wrapLines = _ref3.wrapLines,\n wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;\n var properties = wrapLines ? _objectSpread({}, typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps) : {};\n properties['className'] = properties['className'] ? [].concat(_toConsumableArray(properties['className'].trim().split(/\\s+/)), _toConsumableArray(className)) : className;\n if (lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n if (wrapLongLines & showLineNumbers) {\n properties.style = _objectSpread({\n display: 'flex'\n }, properties.style);\n }\n return {\n type: 'element',\n tagName: 'span',\n properties: properties,\n children: children\n };\n}\nfunction flattenCodeTree(tree) {\n var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var newTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n if (node.type === 'text') {\n newTree.push(createLineElement({\n children: [node],\n className: _toConsumableArray(new Set(className))\n }));\n } else if (node.children) {\n var classNames = className.concat(node.properties.className);\n flattenCodeTree(node.children, classNames).forEach(function (i) {\n return newTree.push(i);\n });\n }\n }\n return newTree;\n}\nfunction processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {\n var _ref4;\n var tree = flattenCodeTree(codeTree.value);\n var newTree = [];\n var lastLineBreakIndex = -1;\n var index = 0;\n function createWrappedLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return createLineElement({\n children: children,\n lineNumber: lineNumber,\n lineNumberStyle: lineNumberStyle,\n largestLineNumber: largestLineNumber,\n showInlineLineNumbers: showInlineLineNumbers,\n lineProps: lineProps,\n className: className,\n showLineNumbers: showLineNumbers,\n wrapLongLines: wrapLongLines,\n wrapLines: wrapLines\n });\n }\n function createUnwrappedLine(children, lineNumber) {\n if (showLineNumbers && lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n return children;\n }\n function createLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return wrapLines || className.length > 0 ? createWrappedLine(children, lineNumber, className) : createUnwrappedLine(children, lineNumber);\n }\n var _loop = function _loop() {\n var node = tree[index];\n var value = node.children[0].value;\n var newLines = getNewLines(value);\n if (newLines) {\n var splitValue = value.split('\\n');\n splitValue.forEach(function (text, i) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var newChild = {\n type: 'text',\n value: \"\".concat(text, \"\\n\")\n };\n\n // if it's the first line\n if (i === 0) {\n var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({\n children: [newChild],\n className: node.properties.className\n }));\n var _line = createLine(_children, lineNumber);\n newTree.push(_line);\n\n // if it's the last line\n } else if (i === splitValue.length - 1) {\n var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];\n var lastLineInPreviousSpan = {\n type: 'text',\n value: \"\".concat(text)\n };\n if (stringChild) {\n var newElem = createLineElement({\n children: [lastLineInPreviousSpan],\n className: node.properties.className\n });\n tree.splice(index + 1, 0, newElem);\n } else {\n var _children2 = [lastLineInPreviousSpan];\n var _line2 = createLine(_children2, lineNumber, node.properties.className);\n newTree.push(_line2);\n }\n\n // if it's neither the first nor the last line\n } else {\n var _children3 = [newChild];\n var _line3 = createLine(_children3, lineNumber, node.properties.className);\n newTree.push(_line3);\n }\n });\n lastLineBreakIndex = index;\n }\n index++;\n };\n while (index < tree.length) {\n _loop();\n }\n if (lastLineBreakIndex !== tree.length - 1) {\n var children = tree.slice(lastLineBreakIndex + 1, tree.length);\n if (children && children.length) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var line = createLine(children, lineNumber);\n newTree.push(line);\n }\n }\n return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);\n}\nfunction defaultRenderer(_ref5) {\n var rows = _ref5.rows,\n stylesheet = _ref5.stylesheet,\n useInlineStyles = _ref5.useInlineStyles;\n return rows.map(function (node, i) {\n return createElement({\n node: node,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segement\".concat(i)\n });\n });\n}\n\n// only highlight.js has the highlightAuto method\nfunction isHighlightJs(astGenerator) {\n return astGenerator && typeof astGenerator.highlightAuto !== 'undefined';\n}\nfunction getCodeTree(_ref6) {\n var astGenerator = _ref6.astGenerator,\n language = _ref6.language,\n code = _ref6.code,\n defaultCodeValue = _ref6.defaultCodeValue;\n // figure out whether we're using lowlight/highlight or refractor/prism\n // then attempt highlighting accordingly\n\n // lowlight/highlight?\n if (isHighlightJs(astGenerator)) {\n var hasLanguage = checkForListedLanguage(astGenerator, language);\n if (language === 'text') {\n return {\n value: defaultCodeValue,\n language: 'text'\n };\n } else if (hasLanguage) {\n return astGenerator.highlight(language, code);\n } else {\n return astGenerator.highlightAuto(code);\n }\n }\n\n // must be refractor/prism, then\n try {\n return language && language !== 'text' ? {\n value: astGenerator.highlight(code, language)\n } : {\n value: defaultCodeValue\n };\n } catch (e) {\n return {\n value: defaultCodeValue\n };\n }\n}\nexport default function (defaultAstGenerator, defaultStyle) {\n return function SyntaxHighlighter(_ref7) {\n var language = _ref7.language,\n children = _ref7.children,\n _ref7$style = _ref7.style,\n style = _ref7$style === void 0 ? defaultStyle : _ref7$style,\n _ref7$customStyle = _ref7.customStyle,\n customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle,\n _ref7$codeTagProps = _ref7.codeTagProps,\n codeTagProps = _ref7$codeTagProps === void 0 ? {\n className: language ? \"language-\".concat(language) : undefined,\n style: _objectSpread(_objectSpread({}, style['code[class*=\"language-\"]']), style[\"code[class*=\\\"language-\".concat(language, \"\\\"]\")])\n } : _ref7$codeTagProps,\n _ref7$useInlineStyles = _ref7.useInlineStyles,\n useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,\n _ref7$showLineNumbers = _ref7.showLineNumbers,\n showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers,\n _ref7$showInlineLineN = _ref7.showInlineLineNumbers,\n showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN,\n _ref7$startingLineNum = _ref7.startingLineNumber,\n startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum,\n lineNumberContainerStyle = _ref7.lineNumberContainerStyle,\n _ref7$lineNumberStyle = _ref7.lineNumberStyle,\n lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle,\n wrapLines = _ref7.wrapLines,\n _ref7$wrapLongLines = _ref7.wrapLongLines,\n wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines,\n _ref7$lineProps = _ref7.lineProps,\n lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps,\n renderer = _ref7.renderer,\n _ref7$PreTag = _ref7.PreTag,\n PreTag = _ref7$PreTag === void 0 ? 'pre' : _ref7$PreTag,\n _ref7$CodeTag = _ref7.CodeTag,\n CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,\n _ref7$code = _ref7.code,\n code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,\n astGenerator = _ref7.astGenerator,\n rest = _objectWithoutProperties(_ref7, _excluded);\n astGenerator = astGenerator || defaultAstGenerator;\n var allLineNumbers = showLineNumbers ? /*#__PURE__*/React.createElement(AllLineNumbers, {\n containerStyle: lineNumberContainerStyle,\n codeStyle: codeTagProps.style || {},\n numberStyle: lineNumberStyle,\n startingLineNumber: startingLineNumber,\n codeString: code\n }) : null;\n var defaultPreStyle = style.hljs || style['pre[class*=\"language-\"]'] || {\n backgroundColor: '#fff'\n };\n var generatorClassName = isHighlightJs(astGenerator) ? 'hljs' : 'prismjs';\n var preProps = useInlineStyles ? Object.assign({}, rest, {\n style: Object.assign({}, defaultPreStyle, customStyle)\n }) : Object.assign({}, rest, {\n className: rest.className ? \"\".concat(generatorClassName, \" \").concat(rest.className) : generatorClassName,\n style: Object.assign({}, customStyle)\n });\n if (wrapLongLines) {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre-wrap'\n }, codeTagProps.style);\n } else {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre'\n }, codeTagProps.style);\n }\n if (!astGenerator) {\n return /*#__PURE__*/React.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, code));\n }\n\n /*\n * Some custom renderers rely on individual row elements so we need to turn wrapLines on\n * if renderer is provided and wrapLines is undefined.\n */\n if (wrapLines === undefined && renderer || wrapLongLines) wrapLines = true;\n renderer = renderer || defaultRenderer;\n var defaultCodeValue = [{\n type: 'text',\n value: code\n }];\n var codeTree = getCodeTree({\n astGenerator: astGenerator,\n language: language,\n code: code,\n defaultCodeValue: defaultCodeValue\n });\n if (codeTree.language === null) {\n codeTree.value = defaultCodeValue;\n }\n\n // determine largest line number so that we can force minWidth on all linenumber elements\n var lineCount = codeTree.value.length;\n if (lineCount === 1 && codeTree.value[0].type === 'text') {\n // Since codeTree for an unparsable text (e.g. 'a\\na\\na') is [{ type: 'text', value: 'a\\na\\na' }]\n lineCount = codeTree.value[0].value.split('\\n').length;\n }\n var largestLineNumber = lineCount + startingLineNumber;\n var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);\n return /*#__PURE__*/React.createElement(PreTag, preProps, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({\n rows: rows,\n stylesheet: style,\n useInlineStyles: useInlineStyles\n })));\n };\n}"],"names":["_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","newLineRegex","AllLineNumbers","_ref2","codeString","codeStyle","_ref2$containerStyle","containerStyle","float","paddingRight","_ref2$numberStyle","numberStyle","startingLineNumber","React","createElement","style","assign","_ref","lines","map","_","i","number","key","concat","className","getAllLineNumbers","replace","split","getInlineLineNumber","lineNumber","inlineLineNumberStyle","type","tagName","properties","children","value","assembleLineNumberStyles","lineNumberStyle","largestLineNumber","num","defaultLineNumberStyle","display","minWidth","toString","textAlign","userSelect","customLineNumberStyle","createLineElement","_ref3","showInlineLineNumbers","_ref3$lineProps","lineProps","_ref3$className","showLineNumbers","wrapLongLines","_ref3$wrapLines","wrapLines","_toConsumableArray","trim","unshift","flattenCodeTree","tree","undefined","newTree","node","Set","classNames","processLines","codeTree","_ref4","lastLineBreakIndex","index","createLine","createWrappedLine","createUnwrappedLine","_loop","match","splitValue","text","newChild","_line","slice","stringChild","lastLineInPreviousSpan","newElem","splice","_line2","_line3","line","defaultRenderer","_ref5","rows","stylesheet","useInlineStyles","isHighlightJs","astGenerator","highlightAuto","highlight","defaultAstGenerator","defaultStyle","_ref7","language","_ref7$style","_ref7$customStyle","customStyle","_ref7$codeTagProps","codeTagProps","_ref7$useInlineStyles","_ref7$showLineNumbers","_ref7$showInlineLineN","_ref7$startingLineNum","lineNumberContainerStyle","_ref7$lineNumberStyle","_ref7$wrapLongLines","_ref7$lineProps","renderer","_ref7$PreTag","PreTag","_ref7$CodeTag","CodeTag","_ref7$code","code","Array","isArray","rest","_objectWithoutProperties","allLineNumbers","defaultPreStyle","hljs","backgroundColor","generatorClassName","preProps","whiteSpace","defaultCodeValue","_ref6","hasLanguage","checkForListedLanguage","getCodeTree","lineCount"],"mappings":"8TAGA,IAAIA,EAAY,CAAC,WAAY,WAAY,QAAS,cAAe,eAAgB,kBAAmB,kBAAmB,wBAAyB,qBAAsB,2BAA4B,kBAAmB,YAAa,gBAAiB,YAAa,WAAY,SAAU,UAAW,OAAQ,gBACzS,SAASC,EAAQC,EAAGC,GAAK,IAAIC,EAAIC,OAAOC,KAAKJ,GAAI,GAAIG,OAAOE,sBAAuB,CAAE,IAAIC,EAAIH,OAAOE,sBAAsBL,GAAIC,IAAMK,EAAIA,EAA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ACXjC,EAASjC,MAAQkG,GAInB,IAAIK,EAAYtE,EAASjC,MAAMzC,OACb,IAAdgJ,GAA8C,SAA3BtE,EAASjC,MAAM,GAAGJ,OAEvC2G,EAAYtE,EAASjC,MAAM,GAAGA,MAAMR,MAAM,MAAMjC,QAElD,IACIiG,EAAOxB,EAAaC,EAAUZ,EAAWL,EAAWE,EAAiBJ,EAAuBtC,EADxE+H,EAAY/H,EACmG0B,EAAiBiB,GACxJ,OAAoB1C,EAAMC,cAAcwG,EAAQc,EAAuBvH,EAAMC,cAAc0G,EAASb,GAAezD,GAAyB6E,EAAgBX,EAAS,CACnKxB,KAAMA,EACNC,WAAY9E,EACZ+E,gBAAiBA,KAEvB,CACA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t,{useState as o,useRef as e,useEffect as a,useSyncExternalStore as s,useLayoutEffect as r,isValidElement as i,cloneElement as n}from"react";import{clsx as l}from"../../clsx/dist/clsx.mjs.js";!function(t){if(!t||"undefined"==typeof document)return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var f=t=>"number"==typeof t&&!isNaN(t),c=t=>"string"==typeof t,d=t=>"function"==typeof t,y=t=>c(t)||d(t)?t:null,p=(t,o)=>!1===t||f(t)&&t>0?t:o,m=t=>i(t)||c(t)||d(t)||f(t);function u(t,o,e=300){let{scrollHeight:a,style:s}=t;requestAnimationFrame((()=>{s.minHeight="initial",s.height=a+"px",s.transition=`all ${e}ms`,requestAnimationFrame((()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(o,e)}))}))}function _({enter:o,exit:s,appendPosition:i=!1,collapse:n=!0,collapseDuration:l=300}){return function({children:f,position:c,preventExitTransition:d,done:y,nodeRef:p,isIn:m,playToast:_}){let g=i?`${o}--${c}`:o,v=i?`${s}--${c}`:s,b=e(0);return r((()=>{let t=p.current,o=g.split(" "),e=a=>{a.target===p.current&&(_(),t.removeEventListener("animationend",e),t.removeEventListener("animationcancel",e),0===b.current&&"animationcancel"!==a.type&&t.classList.remove(...o))};t.classList.add(...o),t.addEventListener("animationend",e),t.addEventListener("animationcancel",e)}),[]),a((()=>{let t=p.current,o=()=>{t.removeEventListener("animationend",o),n?u(t,y,l):y()};m||(d?o():(b.current=1,t.className+=` ${v}`,t.addEventListener("animationend",o)))}),[m]),t.createElement(t.Fragment,null,f)}}function g(t,o){return{content:v(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:o}}function v(t,o,e=!1){return i(t)&&!c(t.type)?n(t,{closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):d(t)?t({closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):t}function b({delay:o,isRunning:e,closeToast:a,type:s="default",hide:r,className:i,controlledProgress:n,progress:f,rtl:c,isIn:y,theme:p}){let m=r||n&&0===f,u={animationDuration:`${o}ms`,animationPlayState:e?"running":"paused"};n&&(u.transform=`scaleX(${f})`);let _=l("Toastify__progress-bar",n?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":c}),g=d(i)?i({rtl:c,type:s,defaultClassName:_}):l(_,i),v={[n&&f>=1?"onTransitionEnd":"onAnimationEnd"]:n&&f<1?null:()=>{y&&a()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${s}`}),t.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:g,style:u,...v}))}var T=1,h=()=>""+T++;function x(t,o,e){let a=1,s=0,r=[],i=[],n=o,l=new Map,c=new Set,d=()=>{i=Array.from(l.values()),c.forEach((t=>t()))},u=t=>{var o,e;null==(e=null==(o=t.props)?void 0:o.onClose)||e.call(o,t.removalReason),t.isActive=!1},_=t=>{if(null==t)l.forEach(u);else{let o=l.get(t);o&&u(o)}d()},v=t=>{var o,a;let{toastId:s,updateId:r}=t.props,i=null==r;t.staleId&&l.delete(t.staleId),t.isActive=!0,l.set(s,t),d(),e(g(t,i?"added":"updated")),i&&(null==(a=(o=t.props).onOpen)||a.call(o))};return{id:t,props:n,observe:t=>(c.add(t),()=>c.delete(t)),toggle:(t,o)=>{l.forEach((e=>{var a;(null==o||o===e.props.toastId)&&(null==(a=e.toggle)||a.call(e,t))}))},removeToast:_,toasts:l,clearQueue:()=>{s-=r.length,r=[]},buildToast:(o,i)=>{if((({containerId:o,toastId:e,updateId:a})=>{let s=o?o!==t:1!==t,r=l.has(e)&&null==a;return s||r})(i))return;let{toastId:c,updateId:u,data:b,staleId:T,delay:h}=i,x=null==u;x&&s++;let k={...n,style:n.toastStyle,key:a++,...Object.fromEntries(Object.entries(i).filter((([t,o])=>null!=o))),toastId:c,updateId:u,data:b,isIn:!1,className:y(i.className||n.toastClassName),progressClassName:y(i.progressClassName||n.progressClassName),autoClose:!i.isLoading&&p(i.autoClose,n.autoClose),closeToast(t){l.get(c).removalReason=t,_(c)},deleteToast(){let t=l.get(c);if(null!=t){if(e(g(t,"removed")),l.delete(c),s--,s<0&&(s=0),r.length>0)return void v(r.shift());d()}}};k.closeButton=n.closeButton,!1===i.closeButton||m(i.closeButton)?k.closeButton=i.closeButton:!0===i.closeButton&&(k.closeButton=!m(n.closeButton)||n.closeButton);let w={content:o,props:k,staleId:T};n.limit&&n.limit>0&&s>n.limit&&x?r.push(w):f(h)?setTimeout((()=>{v(w)}),h):v(w)},setProps(t){n=t},setToggle:(t,o)=>{let e=l.get(t);e&&(e.toggle=o)},isToastActive:t=>{var o;return null==(o=l.get(t))?void 0:o.isActive},getSnapshot:()=>i}}var k=new Map,w=[],I=new Set,E=t=>I.forEach((o=>o(t))),L=()=>k.size>0;function C(t,o){var e;if(o)return!(null==(e=k.get(o))||!e.isToastActive(t));let a=!1;return k.forEach((o=>{o.isToastActive(t)&&(a=!0)})),a}function O(t){if(L()){if(null==t||(t=>c(t)||f(t))(t))k.forEach((o=>{o.removeToast(t)}));else if(t&&("containerId"in t||"id"in t)){let o=k.get(t.containerId);o?o.removeToast(t.id):k.forEach((o=>{o.removeToast(t.id)}))}}else w=w.filter((o=>null!=t&&o.options.toastId!==t))}function z(t,o){m(t)&&(L()||w.push({content:t,options:o}),k.forEach((e=>{e.buildToast(t,o)})))}function P(t,o){k.forEach((e=>{(null==o||null==o||!o.containerId||(null==o?void 0:o.containerId)===e.id)&&e.toggle(t,null==o?void 0:o.id)}))}function N(t){let o=t.containerId||1;return{subscribe(e){let a=x(o,t,E);k.set(o,a);let s=a.observe(e);return w.forEach((t=>z(t.content,t.options))),w=[],()=>{s(),k.delete(o)}},setProps(t){var e;null==(e=k.get(o))||e.setProps(t)},getSnapshot(){var t;return null==(t=k.get(o))?void 0:t.getSnapshot()}}}function $(t){return t&&(c(t.toastId)||f(t.toastId))?t.toastId:h()}function D(t,o){return z(t,o),o.toastId}function A(t,o){return{...o,type:o&&o.type||t,toastId:$(o)}}function R(t){return(o,e)=>D(o,A(t,e))}function B(t,o){return D(t,A("default",o))}function M(t){let[s,r]=o(!1),[i,n]=o(!1),l=e(null),f=e({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:d,closeToast:y,onClick:p,closeOnClick:m}=t;function u(){r(!0)}function _(){r(!1)}function g(o){let e=l.current;if(f.canDrag&&e){f.didMove=!0,s&&_(),"x"===t.draggableDirection?f.delta=o.clientX-f.start:f.delta=o.clientY-f.start,f.start!==o.clientX&&(f.canCloseOnClick=!1);let a="x"===t.draggableDirection?`${f.delta}px, var(--y)`:`0, calc(${f.delta}px + var(--y))`;e.style.transform=`translate3d(${a},0)`,e.style.opacity=""+(1-Math.abs(f.delta/f.removalDistance))}}function v(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v);let o=l.current;if(f.canDrag&&f.didMove&&o){if(f.canDrag=!1,Math.abs(f.delta)>f.removalDistance)return n(!0),t.closeToast(!0),void t.collapseAll();o.style.transition="transform 0.2s, opacity 0.2s",o.style.removeProperty("transform"),o.style.removeProperty("opacity")}}(function(t){var o;null==(o=k.get(t.containerId||1))||o.setToggle(t.id,t.fn)})({id:t.toastId,containerId:t.containerId,fn:r}),a((()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||_(),window.addEventListener("focus",u),window.addEventListener("blur",_),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",_)}}),[t.pauseOnFocusLoss]);let b={onPointerDown:function(o){if(!0===t.draggable||t.draggable===o.pointerType){f.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",v);let e=l.current;f.canCloseOnClick=!0,f.canDrag=!0,e.style.transition="none","x"===t.draggableDirection?(f.start=o.clientX,f.removalDistance=e.offsetWidth*(t.draggablePercent/100)):(f.start=o.clientY,f.removalDistance=e.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(o){let{top:e,bottom:a,left:s,right:r}=l.current.getBoundingClientRect();"touchend"!==o.nativeEvent.type&&t.pauseOnHover&&o.clientX>=s&&o.clientX<=r&&o.clientY>=e&&o.clientY<=a?_():u()}};return c&&d&&(b.onMouseEnter=_,t.stacked||(b.onMouseLeave=u)),m&&(b.onClick=t=>{p&&p(t),f.canCloseOnClick&&y(!0)}),{playToast:u,pauseToast:_,isRunning:s,preventExitTransition:i,toastRef:l,eventHandlers:b}}B.loading=(t,o)=>D(t,A("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...o})),B.promise=function(t,{pending:o,error:e,success:a},s){let r;o&&(r=c(o)?B.loading(o,s):B.loading(o.render,{...s,...o}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},n=(t,o,e)=>{if(null==o)return void B.dismiss(r);let a={type:t,...i,...s,data:e},n=c(o)?{render:o}:o;return r?B.update(r,{...a,...n}):B(n.render,{...a,...n}),e},l=d(t)?t():t;return l.then((t=>n("success",a,t))).catch((t=>n("error",e,t))),l},B.success=R("success"),B.info=R("info"),B.error=R("error"),B.warning=R("warning"),B.warn=B.warning,B.dark=(t,o)=>D(t,A("default",{theme:"dark",...o})),B.dismiss=function(t){O(t)},B.clearWaitingQueue=(t={})=>{k.forEach((o=>{o.props.limit&&(!t.containerId||o.id===t.containerId)&&o.clearQueue()}))},B.isActive=C,B.update=(t,o={})=>{let e=((t,{containerId:o})=>{var e;return null==(e=k.get(o||1))?void 0:e.toasts.get(t)})(t,o);if(e){let{props:a,content:s}=e,r={delay:100,...a,...o,toastId:o.toastId||t,updateId:h()};r.toastId!==t&&(r.staleId=t);let i=r.render||s;delete r.render,D(i,r)}},B.done=t=>{B.update(t,{progress:1})},B.onChange=function(t){return I.add(t),()=>{I.delete(t)}},B.play=t=>P(!0,t),B.pause=t=>P(!1,t);var X="undefined"!=typeof window?r:a,S=({theme:o,type:e,isLoading:a,...s})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===o?"currentColor":`var(--toastify-icon-color-${e})`,...s});var H={info:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};function U({theme:t,type:o,isLoading:e,icon:a}){let s=null,r={theme:t,type:o};return!1===a||(d(a)?s=a({...r,isLoading:e}):i(a)?s=n(a,r):e?s=H.spinner():(t=>t in H)(o)&&(s=H[o](r))),s}var F=o=>{let{isRunning:e,preventExitTransition:a,toastRef:s,eventHandlers:r,playToast:f}=M(o),{closeButton:c,children:y,autoClose:p,onClick:m,type:u,hideProgressBar:_,closeToast:g,transition:T,position:h,className:x,style:k,progressClassName:w,updateId:I,role:E,progress:L,rtl:C,toastId:O,deleteToast:z,isIn:P,isLoading:N,closeOnClick:$,theme:D,ariaLabel:A}=o,R=l("Toastify__toast",`Toastify__toast-theme--${D}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":$}),B=d(x)?x({rtl:C,position:h,type:u,defaultClassName:R}):l(R,x),X=U(o),S=!!L||!p,H={closeToast:g,type:u,theme:D},F=null;return!1===c||(F=d(c)?c(H):i(c)?n(c,H):function({closeToast:o,theme:e,ariaLabel:a="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:t=>{t.stopPropagation(),o(!0)},"aria-label":a},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(H)),t.createElement(T,{isIn:P,done:z,position:h,preventExitTransition:a,nodeRef:s,playToast:f},t.createElement("div",{id:O,tabIndex:0,onClick:m,"data-in":P,className:B,...r,style:k,ref:s,...P&&{role:E,"aria-label":A}},null!=X&&t.createElement("div",{className:l("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},X),v(y,o,!e),F,!o.customProgressBar&&t.createElement(b,{...I&&!S?{key:`p-${I}`}:{},rtl:C,theme:D,delay:p,isRunning:e,isIn:P,closeToast:g,hide:_,type:u,className:w,controlledProgress:S,progress:L||0})))},Y=_(((t,o=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:o}))("bounce",!0)),j={position:"top-right",transition:Y,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&"KeyT"===t.code};function q(r){let i={...j,...r},n=r.stacked,[f,c]=o(!0),p=e(null),{getToastToRender:m,isToastActive:u,count:_}=function(t){var o;let{subscribe:a,getSnapshot:r,setProps:i}=e(N(t)).current;i(t);let n=null==(o=s(a,r,r))?void 0:o.slice();return{getToastToRender:function(o){if(!n)return[];let e=new Map;return t.newestOnTop&&n.reverse(),n.forEach((t=>{let{position:o}=t.props;e.has(o)||e.set(o,[]),e.get(o).push(t)})),Array.from(e,(t=>o(t[0],t[1])))},isToastActive:C,count:null==n?void 0:n.length}}(i),{className:g,style:v,rtl:b,containerId:T,hotKeys:h}=i;function x(t){let o=l("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":b});return d(g)?g({position:t,rtl:b,defaultClassName:o}):l(o,y(g))}function k(){n&&(c(!0),B.play())}return X((()=>{var t;if(n){let o=p.current.querySelectorAll('[data-in="true"]'),e=12,a=null==(t=i.position)?void 0:t.includes("top"),s=0,r=0;Array.from(o).reverse().forEach(((t,o)=>{let i=t;i.classList.add("Toastify__toast--stacked"),o>0&&(i.dataset.collapsed=`${f}`),i.dataset.pos||(i.dataset.pos=a?"top":"bot");let n=s*(f?.2:1)+(f?0:e*o);i.style.setProperty("--y",`${a?n:-1*n}px`),i.style.setProperty("--g",`${e}`),i.style.setProperty("--s",""+(1-(f?r:0))),s+=i.offsetHeight,r+=.025}))}}),[f,_,n]),a((()=>{function t(t){var o;let e=p.current;h(t)&&(null==(o=e.querySelector('[tabIndex="0"]'))||o.focus(),c(!1),B.pause()),"Escape"===t.key&&(document.activeElement===e||null!=e&&e.contains(document.activeElement))&&(c(!0),B.play())}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[h]),t.createElement("section",{ref:p,className:"Toastify",id:T,onMouseEnter:()=>{n&&(c(!1),B.pause())},onMouseLeave:k,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":i["aria-label"]},m(((o,e)=>{let a=e.length?{...v}:{...v,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:x(o),"data-stacked":n,style:a,key:`c-${o}`},e.map((({content:o,props:e})=>t.createElement(F,{...e,stacked:n,collapseAll:k,isIn:u(e.toastId,e.containerId),key:`t-${e.key}`},o))))})))}export{Y as Bounce,H as Icons,q as ToastContainer,u as collapseToast,_ as cssTransition,B as toast};
|
|
1
|
+
import t,{useState as o,useRef as e,useEffect as a,useSyncExternalStore as s,useLayoutEffect as r,isValidElement as i,cloneElement as n}from"react";import{clsx as l}from"../../clsx/dist/clsx.mjs.js";!function(t){if(!t||"undefined"==typeof document)return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var f=t=>"number"==typeof t&&!isNaN(t),c=t=>"string"==typeof t,d=t=>"function"==typeof t,y=t=>c(t)||d(t)?t:null,p=(t,o)=>!1===t||f(t)&&t>0?t:o,m=t=>i(t)||c(t)||d(t)||f(t);function u(t,o,e=300){let{scrollHeight:a,style:s}=t;requestAnimationFrame(()=>{s.minHeight="initial",s.height=a+"px",s.transition=`all ${e}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(o,e)})})}function _({enter:o,exit:s,appendPosition:i=!1,collapse:n=!0,collapseDuration:l=300}){return function({children:f,position:c,preventExitTransition:d,done:y,nodeRef:p,isIn:m,playToast:_}){let g=i?`${o}--${c}`:o,v=i?`${s}--${c}`:s,b=e(0);return r(()=>{let t=p.current,o=g.split(" "),e=a=>{a.target===p.current&&(_(),t.removeEventListener("animationend",e),t.removeEventListener("animationcancel",e),0===b.current&&"animationcancel"!==a.type&&t.classList.remove(...o))};t.classList.add(...o),t.addEventListener("animationend",e),t.addEventListener("animationcancel",e)},[]),a(()=>{let t=p.current,o=()=>{t.removeEventListener("animationend",o),n?u(t,y,l):y()};m||(d?o():(b.current=1,t.className+=` ${v}`,t.addEventListener("animationend",o)))},[m]),t.createElement(t.Fragment,null,f)}}function g(t,o){return{content:v(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:o}}function v(t,o,e=!1){return i(t)&&!c(t.type)?n(t,{closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):d(t)?t({closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):t}function b({delay:o,isRunning:e,closeToast:a,type:s="default",hide:r,className:i,controlledProgress:n,progress:f,rtl:c,isIn:y,theme:p}){let m=r||n&&0===f,u={animationDuration:`${o}ms`,animationPlayState:e?"running":"paused"};n&&(u.transform=`scaleX(${f})`);let _=l("Toastify__progress-bar",n?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":c}),g=d(i)?i({rtl:c,type:s,defaultClassName:_}):l(_,i),v={[n&&f>=1?"onTransitionEnd":"onAnimationEnd"]:n&&f<1?null:()=>{y&&a()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${s}`}),t.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:g,style:u,...v}))}var T=1,h=()=>""+T++;function x(t,o,e){let a=1,s=0,r=[],i=[],n=o,l=new Map,c=new Set,d=()=>{i=Array.from(l.values()),c.forEach(t=>t())},u=t=>{var o,e;null==(e=null==(o=t.props)?void 0:o.onClose)||e.call(o,t.removalReason),t.isActive=!1},_=t=>{if(null==t)l.forEach(u);else{let o=l.get(t);o&&u(o)}d()},v=t=>{var o,a;let{toastId:s,updateId:r}=t.props,i=null==r;t.staleId&&l.delete(t.staleId),t.isActive=!0,l.set(s,t),d(),e(g(t,i?"added":"updated")),i&&(null==(a=(o=t.props).onOpen)||a.call(o))};return{id:t,props:n,observe:t=>(c.add(t),()=>c.delete(t)),toggle:(t,o)=>{l.forEach(e=>{var a;(null==o||o===e.props.toastId)&&(null==(a=e.toggle)||a.call(e,t))})},removeToast:_,toasts:l,clearQueue:()=>{s-=r.length,r=[]},buildToast:(o,i)=>{if((({containerId:o,toastId:e,updateId:a})=>{let s=o?o!==t:1!==t,r=l.has(e)&&null==a;return s||r})(i))return;let{toastId:c,updateId:u,data:b,staleId:T,delay:h}=i,x=null==u;x&&s++;let k={...n,style:n.toastStyle,key:a++,...Object.fromEntries(Object.entries(i).filter(([t,o])=>null!=o)),toastId:c,updateId:u,data:b,isIn:!1,className:y(i.className||n.toastClassName),progressClassName:y(i.progressClassName||n.progressClassName),autoClose:!i.isLoading&&p(i.autoClose,n.autoClose),closeToast(t){l.get(c).removalReason=t,_(c)},deleteToast(){let t=l.get(c);if(null!=t){if(e(g(t,"removed")),l.delete(c),s--,s<0&&(s=0),r.length>0)return void v(r.shift());d()}}};k.closeButton=n.closeButton,!1===i.closeButton||m(i.closeButton)?k.closeButton=i.closeButton:!0===i.closeButton&&(k.closeButton=!m(n.closeButton)||n.closeButton);let w={content:o,props:k,staleId:T};n.limit&&n.limit>0&&s>n.limit&&x?r.push(w):f(h)?setTimeout(()=>{v(w)},h):v(w)},setProps(t){n=t},setToggle:(t,o)=>{let e=l.get(t);e&&(e.toggle=o)},isToastActive:t=>{var o;return null==(o=l.get(t))?void 0:o.isActive},getSnapshot:()=>i}}var k=new Map,w=[],I=new Set,E=t=>I.forEach(o=>o(t)),L=()=>k.size>0;function C(t,o){var e;if(o)return!(null==(e=k.get(o))||!e.isToastActive(t));let a=!1;return k.forEach(o=>{o.isToastActive(t)&&(a=!0)}),a}function O(t){if(L()){if(null==t||(t=>c(t)||f(t))(t))k.forEach(o=>{o.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let o=k.get(t.containerId);o?o.removeToast(t.id):k.forEach(o=>{o.removeToast(t.id)})}}else w=w.filter(o=>null!=t&&o.options.toastId!==t)}function z(t,o){m(t)&&(L()||w.push({content:t,options:o}),k.forEach(e=>{e.buildToast(t,o)}))}function P(t,o){k.forEach(e=>{(null==o||null==o||!o.containerId||(null==o?void 0:o.containerId)===e.id)&&e.toggle(t,null==o?void 0:o.id)})}function N(t){let o=t.containerId||1;return{subscribe(e){let a=x(o,t,E);k.set(o,a);let s=a.observe(e);return w.forEach(t=>z(t.content,t.options)),w=[],()=>{s(),k.delete(o)}},setProps(t){var e;null==(e=k.get(o))||e.setProps(t)},getSnapshot(){var t;return null==(t=k.get(o))?void 0:t.getSnapshot()}}}function $(t){return t&&(c(t.toastId)||f(t.toastId))?t.toastId:h()}function D(t,o){return z(t,o),o.toastId}function A(t,o){return{...o,type:o&&o.type||t,toastId:$(o)}}function R(t){return(o,e)=>D(o,A(t,e))}function B(t,o){return D(t,A("default",o))}function M(t){let[s,r]=o(!1),[i,n]=o(!1),l=e(null),f=e({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:d,closeToast:y,onClick:p,closeOnClick:m}=t;function u(){r(!0)}function _(){r(!1)}function g(o){let e=l.current;if(f.canDrag&&e){f.didMove=!0,s&&_(),"x"===t.draggableDirection?f.delta=o.clientX-f.start:f.delta=o.clientY-f.start,f.start!==o.clientX&&(f.canCloseOnClick=!1);let a="x"===t.draggableDirection?`${f.delta}px, var(--y)`:`0, calc(${f.delta}px + var(--y))`;e.style.transform=`translate3d(${a},0)`,e.style.opacity=""+(1-Math.abs(f.delta/f.removalDistance))}}function v(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v);let o=l.current;if(f.canDrag&&f.didMove&&o){if(f.canDrag=!1,Math.abs(f.delta)>f.removalDistance)return n(!0),t.closeToast(!0),void t.collapseAll();o.style.transition="transform 0.2s, opacity 0.2s",o.style.removeProperty("transform"),o.style.removeProperty("opacity")}}(function(t){var o;null==(o=k.get(t.containerId||1))||o.setToggle(t.id,t.fn)})({id:t.toastId,containerId:t.containerId,fn:r}),a(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||_(),window.addEventListener("focus",u),window.addEventListener("blur",_),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",_)}},[t.pauseOnFocusLoss]);let b={onPointerDown:function(o){if(!0===t.draggable||t.draggable===o.pointerType){f.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",v);let e=l.current;f.canCloseOnClick=!0,f.canDrag=!0,e.style.transition="none","x"===t.draggableDirection?(f.start=o.clientX,f.removalDistance=e.offsetWidth*(t.draggablePercent/100)):(f.start=o.clientY,f.removalDistance=e.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(o){let{top:e,bottom:a,left:s,right:r}=l.current.getBoundingClientRect();"touchend"!==o.nativeEvent.type&&t.pauseOnHover&&o.clientX>=s&&o.clientX<=r&&o.clientY>=e&&o.clientY<=a?_():u()}};return c&&d&&(b.onMouseEnter=_,t.stacked||(b.onMouseLeave=u)),m&&(b.onClick=t=>{p&&p(t),f.canCloseOnClick&&y(!0)}),{playToast:u,pauseToast:_,isRunning:s,preventExitTransition:i,toastRef:l,eventHandlers:b}}B.loading=(t,o)=>D(t,A("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...o})),B.promise=function(t,{pending:o,error:e,success:a},s){let r;o&&(r=c(o)?B.loading(o,s):B.loading(o.render,{...s,...o}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},n=(t,o,e)=>{if(null==o)return void B.dismiss(r);let a={type:t,...i,...s,data:e},n=c(o)?{render:o}:o;return r?B.update(r,{...a,...n}):B(n.render,{...a,...n}),e},l=d(t)?t():t;return l.then(t=>n("success",a,t)).catch(t=>n("error",e,t)),l},B.success=R("success"),B.info=R("info"),B.error=R("error"),B.warning=R("warning"),B.warn=B.warning,B.dark=(t,o)=>D(t,A("default",{theme:"dark",...o})),B.dismiss=function(t){O(t)},B.clearWaitingQueue=(t={})=>{k.forEach(o=>{o.props.limit&&(!t.containerId||o.id===t.containerId)&&o.clearQueue()})},B.isActive=C,B.update=(t,o={})=>{let e=((t,{containerId:o})=>{var e;return null==(e=k.get(o||1))?void 0:e.toasts.get(t)})(t,o);if(e){let{props:a,content:s}=e,r={delay:100,...a,...o,toastId:o.toastId||t,updateId:h()};r.toastId!==t&&(r.staleId=t);let i=r.render||s;delete r.render,D(i,r)}},B.done=t=>{B.update(t,{progress:1})},B.onChange=function(t){return I.add(t),()=>{I.delete(t)}},B.play=t=>P(!0,t),B.pause=t=>P(!1,t);var X="undefined"!=typeof window?r:a,S=({theme:o,type:e,isLoading:a,...s})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===o?"currentColor":`var(--toastify-icon-color-${e})`,...s});var H={info:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(o){return t.createElement(S,{...o},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};function U({theme:t,type:o,isLoading:e,icon:a}){let s=null,r={theme:t,type:o};return!1===a||(d(a)?s=a({...r,isLoading:e}):i(a)?s=n(a,r):e?s=H.spinner():(t=>t in H)(o)&&(s=H[o](r))),s}var F=o=>{let{isRunning:e,preventExitTransition:a,toastRef:s,eventHandlers:r,playToast:f}=M(o),{closeButton:c,children:y,autoClose:p,onClick:m,type:u,hideProgressBar:_,closeToast:g,transition:T,position:h,className:x,style:k,progressClassName:w,updateId:I,role:E,progress:L,rtl:C,toastId:O,deleteToast:z,isIn:P,isLoading:N,closeOnClick:$,theme:D,ariaLabel:A}=o,R=l("Toastify__toast",`Toastify__toast-theme--${D}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":$}),B=d(x)?x({rtl:C,position:h,type:u,defaultClassName:R}):l(R,x),X=U(o),S=!!L||!p,H={closeToast:g,type:u,theme:D},F=null;return!1===c||(F=d(c)?c(H):i(c)?n(c,H):function({closeToast:o,theme:e,ariaLabel:a="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:t=>{t.stopPropagation(),o(!0)},"aria-label":a},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(H)),t.createElement(T,{isIn:P,done:z,position:h,preventExitTransition:a,nodeRef:s,playToast:f},t.createElement("div",{id:O,tabIndex:0,onClick:m,"data-in":P,className:B,...r,style:k,ref:s,...P&&{role:E,"aria-label":A}},null!=X&&t.createElement("div",{className:l("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},X),v(y,o,!e),F,!o.customProgressBar&&t.createElement(b,{...I&&!S?{key:`p-${I}`}:{},rtl:C,theme:D,delay:p,isRunning:e,isIn:P,closeToast:g,hide:_,type:u,className:w,controlledProgress:S,progress:L||0})))},Y=_(((t,o=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:o}))("bounce",!0)),j={position:"top-right",transition:Y,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&"KeyT"===t.code};function q(r){let i={...j,...r},n=r.stacked,[f,c]=o(!0),p=e(null),{getToastToRender:m,isToastActive:u,count:_}=function(t){var o;let{subscribe:a,getSnapshot:r,setProps:i}=e(N(t)).current;i(t);let n=null==(o=s(a,r,r))?void 0:o.slice();return{getToastToRender:function(o){if(!n)return[];let e=new Map;return t.newestOnTop&&n.reverse(),n.forEach(t=>{let{position:o}=t.props;e.has(o)||e.set(o,[]),e.get(o).push(t)}),Array.from(e,t=>o(t[0],t[1]))},isToastActive:C,count:null==n?void 0:n.length}}(i),{className:g,style:v,rtl:b,containerId:T,hotKeys:h}=i;function x(t){let o=l("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":b});return d(g)?g({position:t,rtl:b,defaultClassName:o}):l(o,y(g))}function k(){n&&(c(!0),B.play())}return X(()=>{var t;if(n){let o=p.current.querySelectorAll('[data-in="true"]'),e=12,a=null==(t=i.position)?void 0:t.includes("top"),s=0,r=0;Array.from(o).reverse().forEach((t,o)=>{let i=t;i.classList.add("Toastify__toast--stacked"),o>0&&(i.dataset.collapsed=`${f}`),i.dataset.pos||(i.dataset.pos=a?"top":"bot");let n=s*(f?.2:1)+(f?0:e*o);i.style.setProperty("--y",`${a?n:-1*n}px`),i.style.setProperty("--g",`${e}`),i.style.setProperty("--s",""+(1-(f?r:0))),s+=i.offsetHeight,r+=.025})}},[f,_,n]),a(()=>{function t(t){var o;let e=p.current;h(t)&&(null==(o=e.querySelector('[tabIndex="0"]'))||o.focus(),c(!1),B.pause()),"Escape"===t.key&&(document.activeElement===e||null!=e&&e.contains(document.activeElement))&&(c(!0),B.play())}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[h]),t.createElement("section",{ref:p,className:"Toastify",id:T,onMouseEnter:()=>{n&&(c(!1),B.pause())},onMouseLeave:k,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":i["aria-label"]},m((o,e)=>{let a=e.length?{...v}:{...v,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:x(o),"data-stacked":n,style:a,key:`c-${o}`},e.map(({content:o,props:e})=>t.createElement(F,{...e,stacked:n,collapseAll:k,isIn:u(e.toastId,e.containerId),key:`t-${e.key}`},o)))}))}export{Y as Bounce,H as Icons,q as ToastContainer,u as collapseToast,_ as cssTransition,B as toast};
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|