From 15bd0c01b3ac352bc8fce7844ace683d10972ba7 Mon Sep 17 00:00:00 2001 From: Ronald Huereca Date: Sun, 21 Jul 2024 09:14:39 -0500 Subject: [PATCH] Auto stash before merge of "main" and "feature/custom-colors" --- build/index-rtl.css | 134 +- build/index.asset.php | 2 +- build/index.css | 136 +- build/index.css.map | 1 - build/index.js | 6446 +---------------------------------------- build/index.js.map | 2 +- 6 files changed, 11 insertions(+), 6710 deletions(-) delete mode 100644 build/index.css.map diff --git a/build/index-rtl.css b/build/index-rtl.css index 04f0c00..8d625a5 100644 --- a/build/index-rtl.css +++ b/build/index-rtl.css @@ -1,131 +1,3 @@ -/*!*********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/AlertButton/editor.scss ***! - \*********************************************************************************************************************************************************************************************************************************************************************************************************/ -.alerts-dlx-button-popover-base-control { - padding: 16px; -} - -.alertx-dlx-button-link { - max-width: 100%; - border: 1px solid #ddd; - border-radius: 2px; -} - -.alerts-dlx-button-wrapper { - position: relative; - display: inline-flex; - align-items: center; -} - -.alerts-dlx-button-wrapper .alertx-dlx-button-link-icon { - visibility: hidden; -} -.alerts-dlx-button-wrapper:hover .alertx-dlx-button-link-icon, .alerts-dlx-button-wrapper:focus .alertx-dlx-button-link-icon { - visibility: visible; -} - -.alerts-dlx-link-toggle { - margin-top: 15px; -} -/*!*********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/unit-picker/editor.scss ***! - \*********************************************************************************************************************************************************************************************************************************************************************************************************/ -/* Unit Picker Component - Forked from @GenerateBlocks */ -.components-has-units-control-header__units { - display: flex; - justify-content: space-between; - margin-bottom: 5px; - align-items: center; -} - -.components-has-control__units .components-has-control-buttons__units button.components-button { - background: #fff; - box-shadow: none !important; - color: #929da7; - font-size: 10px; - padding: 0 5px; - position: relative; - text-align: center; - text-shadow: none; - border: 0; - border-radius: 0 !important; - line-height: 20px; - padding: 0 5px; - height: auto; -} -.components-has-control__units .components-has-control-buttons__units button.components-button.is-primary { - background: #fff !important; - color: #000 !important; - cursor: default; - z-index: 1; - font-weight: bold; -} -/*!********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/IconPicker/editor.scss ***! - \********************************************************************************************************************************************************************************************************************************************************************************************************/ -.alerts-dlx-icon-popover .components-popover__content > div { - min-width: 350px; -} - -.alerts-dlx-icon-picker { - padding: 16px; - text-align: center; -} -.alerts-dlx-icon-picker h2 { - margin: 0; - padding: 0; -} - -.alerts-dlx-icon-list { - display: grid; - grid-template-columns: 1fr 1fr 1fr; - grid-gap: 10px; - justify-content: center; - max-height: 350px; - overflow: auto; - padding-top: 15px; -} -.alerts-dlx-icon-list li { - text-align: center; -} -.alerts-dlx-icon-list svg { - width: 24px; - height: 24px; -} - -.alerts-dlx-custom-icon-input button:first-child { - margin-left: 15px; -} -.alerts-dlx-custom-icon-input button:last-child { - margin-right: 15px; -} - -.components-base-control.alerts-dlx-icon-wrapper { - font-size: 1em; -} - -.alerts-dlx-icon-preview { - display: flex; - justify-content: center; - font-size: 1em; -} -.alerts-dlx-icon-preview svg { - width: 1.2em; - height: 1.2em; - margin-top: 0.175em; -} - -.alerts-dlx-custom-icon-preview svg { - max-width: 48px; - max-height: 48px; -} - -button.components-button.alerts-dlx-icon-preview-button { - display: flex; - align-items: flex-start; - justify-content: center; - padding: 0; - margin: 0; - font-size: inherit; - line-height: 0; -} +.alerts-dlx-button-popover-base-control{padding:16px}.alertx-dlx-button-link{border:1px solid #ddd;border-radius:2px;max-width:100%}.alerts-dlx-button-wrapper{align-items:center;display:inline-flex;position:relative}.alerts-dlx-button-wrapper .alertx-dlx-button-link-icon{visibility:hidden}.alerts-dlx-button-wrapper:focus .alertx-dlx-button-link-icon,.alerts-dlx-button-wrapper:hover .alertx-dlx-button-link-icon{visibility:visible}.alerts-dlx-link-toggle{margin-top:15px} +.components-has-units-control-header__units{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.components-has-control__units .components-has-control-buttons__units button.components-button{background:#fff;border:0;border-radius:0!important;box-shadow:none!important;color:#929da7;font-size:10px;height:auto;line-height:20px;padding:0 5px;position:relative;text-align:center;text-shadow:none}.components-has-control__units .components-has-control-buttons__units button.components-button.is-primary{background:#fff!important;color:#000!important;cursor:default;font-weight:700;z-index:1} +.alerts-dlx-icon-popover .components-popover__content>div{min-width:350px}.alerts-dlx-icon-picker{padding:16px;text-align:center}.alerts-dlx-icon-picker h2{margin:0;padding:0}.alerts-dlx-icon-list{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;justify-content:center;max-height:350px;overflow:auto;padding-top:15px}.alerts-dlx-icon-list li{text-align:center}.alerts-dlx-icon-list svg{height:24px;width:24px}.alerts-dlx-custom-icon-input button:first-child{margin-left:15px}.alerts-dlx-custom-icon-input button:last-child{margin-right:15px}.components-base-control.alerts-dlx-icon-wrapper{font-size:1em}.alerts-dlx-icon-preview{display:flex;font-size:1em;justify-content:center}.alerts-dlx-icon-preview svg{height:1.2em;margin-top:.175em;width:1.2em}.alerts-dlx-custom-icon-preview svg{max-height:48px;max-width:48px}button.components-button.alerts-dlx-icon-preview-button{align-items:flex-start;display:flex;font-size:inherit;justify-content:center;line-height:0;margin:0;padding:0} diff --git a/build/index.asset.php b/build/index.asset.php index 18a0406..f84a604 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '891adba2c48a7c6e999c'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'b670f2ea4860bdd8b72b'); diff --git a/build/index.css b/build/index.css index 90e1f87..2307fb2 100644 --- a/build/index.css +++ b/build/index.css @@ -1,133 +1,3 @@ -/*!*********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/AlertButton/editor.scss ***! - \*********************************************************************************************************************************************************************************************************************************************************************************************************/ -.alerts-dlx-button-popover-base-control { - padding: 16px; -} - -.alertx-dlx-button-link { - max-width: 100%; - border: 1px solid #ddd; - border-radius: 2px; -} - -.alerts-dlx-button-wrapper { - position: relative; - display: inline-flex; - align-items: center; -} - -.alerts-dlx-button-wrapper .alertx-dlx-button-link-icon { - visibility: hidden; -} -.alerts-dlx-button-wrapper:hover .alertx-dlx-button-link-icon, .alerts-dlx-button-wrapper:focus .alertx-dlx-button-link-icon { - visibility: visible; -} - -.alerts-dlx-link-toggle { - margin-top: 15px; -} -/*!*********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/unit-picker/editor.scss ***! - \*********************************************************************************************************************************************************************************************************************************************************************************************************/ -/* Unit Picker Component - Forked from @GenerateBlocks */ -.components-has-units-control-header__units { - display: flex; - justify-content: space-between; - margin-bottom: 5px; - align-items: center; -} - -.components-has-control__units .components-has-control-buttons__units button.components-button { - background: #fff; - box-shadow: none !important; - color: #929da7; - font-size: 10px; - padding: 0 5px; - position: relative; - text-align: center; - text-shadow: none; - border: 0; - border-radius: 0 !important; - line-height: 20px; - padding: 0 5px; - height: auto; -} -.components-has-control__units .components-has-control-buttons__units button.components-button.is-primary { - background: #fff !important; - color: #000 !important; - cursor: default; - z-index: 1; - font-weight: bold; -} -/*!********************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/@wordpress/scripts/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/js/blocks/components/IconPicker/editor.scss ***! - \********************************************************************************************************************************************************************************************************************************************************************************************************/ -.alerts-dlx-icon-popover .components-popover__content > div { - min-width: 350px; -} - -.alerts-dlx-icon-picker { - padding: 16px; - text-align: center; -} -.alerts-dlx-icon-picker h2 { - margin: 0; - padding: 0; -} - -.alerts-dlx-icon-list { - display: grid; - grid-template-columns: 1fr 1fr 1fr; - grid-gap: 10px; - justify-content: center; - max-height: 350px; - overflow: auto; - padding-top: 15px; -} -.alerts-dlx-icon-list li { - text-align: center; -} -.alerts-dlx-icon-list svg { - width: 24px; - height: 24px; -} - -.alerts-dlx-custom-icon-input button:first-child { - margin-right: 15px; -} -.alerts-dlx-custom-icon-input button:last-child { - margin-left: 15px; -} - -.components-base-control.alerts-dlx-icon-wrapper { - font-size: 1em; -} - -.alerts-dlx-icon-preview { - display: flex; - justify-content: center; - font-size: 1em; -} -.alerts-dlx-icon-preview svg { - width: 1.2em; - height: 1.2em; - margin-top: 0.175em; -} - -.alerts-dlx-custom-icon-preview svg { - max-width: 48px; - max-height: 48px; -} - -button.components-button.alerts-dlx-icon-preview-button { - display: flex; - align-items: flex-start; - justify-content: center; - padding: 0; - margin: 0; - font-size: inherit; - line-height: 0; -} - -/*# sourceMappingURL=index.css.map*/ \ No newline at end of file +.alerts-dlx-button-popover-base-control{padding:16px}.alertx-dlx-button-link{border:1px solid #ddd;border-radius:2px;max-width:100%}.alerts-dlx-button-wrapper{align-items:center;display:inline-flex;position:relative}.alerts-dlx-button-wrapper .alertx-dlx-button-link-icon{visibility:hidden}.alerts-dlx-button-wrapper:focus .alertx-dlx-button-link-icon,.alerts-dlx-button-wrapper:hover .alertx-dlx-button-link-icon{visibility:visible}.alerts-dlx-link-toggle{margin-top:15px} +.components-has-units-control-header__units{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.components-has-control__units .components-has-control-buttons__units button.components-button{background:#fff;border:0;border-radius:0!important;box-shadow:none!important;color:#929da7;font-size:10px;height:auto;line-height:20px;padding:0 5px;position:relative;text-align:center;text-shadow:none}.components-has-control__units .components-has-control-buttons__units button.components-button.is-primary{background:#fff!important;color:#000!important;cursor:default;font-weight:700;z-index:1} +.alerts-dlx-icon-popover .components-popover__content>div{min-width:350px}.alerts-dlx-icon-picker{padding:16px;text-align:center}.alerts-dlx-icon-picker h2{margin:0;padding:0}.alerts-dlx-icon-list{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;justify-content:center;max-height:350px;overflow:auto;padding-top:15px}.alerts-dlx-icon-list li{text-align:center}.alerts-dlx-icon-list svg{height:24px;width:24px}.alerts-dlx-custom-icon-input button:first-child{margin-right:15px}.alerts-dlx-custom-icon-input button:last-child{margin-left:15px}.components-base-control.alerts-dlx-icon-wrapper{font-size:1em}.alerts-dlx-icon-preview{display:flex;font-size:1em;justify-content:center}.alerts-dlx-icon-preview svg{height:1.2em;margin-top:.175em;width:1.2em}.alerts-dlx-custom-icon-preview svg{max-height:48px;max-width:48px}button.components-button.alerts-dlx-icon-preview-button{align-items:flex-start;display:flex;font-size:inherit;justify-content:center;line-height:0;margin:0;padding:0} diff --git a/build/index.css.map b/build/index.css.map deleted file mode 100644 index d3bd70a..0000000 --- a/build/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.css","mappings":";;;AAAA;EACC;AACD;;AACA;EACC;EACA;EACA;AAED;;AACA;EACC;EACA;EACA;AAED;;AACC;EACC;AAEF;AACC;EACC;AACF;;AAEA;EACC;AACD,C;;;;ACzBA;AACA;EACC;EACA;EACA;EACA;AACD;;AAIE;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AADH;AAGG;EACC;EACA;EACA;EACA;EACA;AADJ,C;;;;AC7BA;EACC;AACD;;AACA;EACC;EACA;AAED;AAAC;EACC;EACA;AAEF;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;AAED;AAAC;EACC;AAEF;AAAC;EACC;EACA;AAEF;;AAGE;EACC;AAAH;AAEE;EACC;AAAH;;AAIA;EACC;AADD;;AAGA;EACC;EACA;EACA;AAAD;AACC;EACC;EACA;EACA;AACF;;AAGC;EACC;EACA;AAAF;;AAGA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;AAAD,C","sources":["webpack://alerts-dlx/./src/js/blocks/components/AlertButton/editor.scss","webpack://alerts-dlx/./src/js/blocks/components/unit-picker/editor.scss","webpack://alerts-dlx/./src/js/blocks/components/IconPicker/editor.scss"],"sourcesContent":[".alerts-dlx-button-popover-base-control {\n\tpadding: 16px;\n}\n.alertx-dlx-button-link {\n\tmax-width: 100%;\n\tborder: 1px solid #ddd;\n\tborder-radius: 2px;\n}\n\n.alerts-dlx-button-wrapper {\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n.alerts-dlx-button-wrapper {\n\t.alertx-dlx-button-link-icon {\n\t\tvisibility: hidden;\n\t}\n\n\t&:hover .alertx-dlx-button-link-icon, &:focus .alertx-dlx-button-link-icon{\n\t\tvisibility: visible;\n\t}\n}\n.alerts-dlx-link-toggle {\n\tmargin-top: 15px;\n}","/* Unit Picker Component - Forked from @GenerateBlocks */\n.components-has-units-control-header__units {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tmargin-bottom: 5px;\n\talign-items: center;\n}\n\n.components-has-control__units {\n\t.components-has-control-buttons__units {\n\t\tbutton.components-button {\n\t\t\tbackground: #fff;\n\t\t\tbox-shadow: none !important;\n\t\t\tcolor: #929da7;\n\t\t\tfont-size: 10px;\n\t\t\tpadding: 0 5px;\n\t\t\tposition: relative;\n\t\t\ttext-align: center;\n\t\t\ttext-shadow: none;\n\t\t\tborder: 0;\n\t\t\tborder-radius: 0 !important;\n\t\t\tline-height: 20px;\n\t\t\tpadding: 0 5px;\n\t\t\theight: auto;\n\n\t\t\t&.is-primary {\n\t\t\t\tbackground: #fff !important;\n\t\t\t\tcolor: #000 !important;\n\t\t\t\tcursor: default;\n\t\t\t\tz-index: 1;\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\t\t}\n\t}\n}",".alerts-dlx-icon-popover .components-popover__content > div {\n\tmin-width: 350px;\n}\n.alerts-dlx-icon-picker {\n\tpadding: 16px;\n\ttext-align: center;\n\n\th2 {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n}\n.alerts-dlx-icon-list {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1fr 1fr;\n\tgrid-gap: 10px;\n\tjustify-content: center;\n\tmax-height: 350px;\n\toverflow: auto;\n\tpadding-top: 15px;\n\n\tli {\n\t\ttext-align: center;\n\t}\n\tsvg {\n\t\twidth: 24px;\n\t\theight: 24px;\n\t}\n}\n.alerts-dlx-custom-icon-input {\n\tbutton {\n\t\t&:first-child {\n\t\t\tmargin-right: 15px;\n\t\t}\n\t\t&:last-child {\n\t\t\tmargin-left: 15px;\n\t\t}\n\t}\n}\n.components-base-control.alerts-dlx-icon-wrapper {\n\tfont-size: 1em;\n}\n.alerts-dlx-icon-preview {\n\tdisplay: flex;\n\tjustify-content: center;\n\tfont-size: 1em;\n\tsvg {\n\t\twidth: 1.2em;\n\t\theight: 1.2em;\n\t\tmargin-top: 0.175em;\n\t}\n}\n.alerts-dlx-custom-icon-preview {\n\tsvg {\n\t\tmax-width: 48px;\n\t\tmax-height: 48px;\n\t}\n}\nbutton.components-button.alerts-dlx-icon-preview-button {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: center;\n\tpadding: 0;\n\tmargin: 0;\n\tfont-size: inherit;\n\tline-height: 0;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/index.js b/build/index.js index f2cce51..9b4d23a 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6444 +1,4 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/@wordpress/icons/build-module/library/link.js": -/*!********************************************************************!*\ - !*** ./node_modules/@wordpress/icons/build-module/library/link.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); - - -/** - * WordPress dependencies - */ - -const link = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24" -}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { - d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" -})); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (link); -//# sourceMappingURL=link.js.map - -/***/ }), - -/***/ "./src/js/blocks/bootstrap/colors.js": -/*!*******************************************!*\ - !*** ./src/js/blocks/bootstrap/colors.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -var bootstrapColors = [{ - name: 'Primary Color', - color: '#084298' -}, { - name: 'Primary Color Border', - color: '#b6d4fe' -}, { - name: 'Primary Color Accent', - color: '#26559c' -}, { - name: 'Primary Color Light', - color: '#cfe2ff' -}, { - name: 'Secondary Color', - color: '#41464b' -}, { - name: 'Secondary Color Border', - color: '#d3d6d8' -}, { - name: 'Secondary Color Accent', - color: '#5c6874' -}, { - name: 'Secondary Color Light', - color: '#e2e3e5' -}, { - name: 'Success Color', - color: '#0f5132' -}, { - name: 'Success Color Border', - color: '#badbcc' -}, { - name: 'Success Color Accent', - color: '#167247' -}, { - name: 'Success Color Light', - color: '#d1e7dd' -}, { - name: 'Danger Color', - color: '#842029' -}, { - name: 'Danger Color Border', - color: '#f5c2c7' -}, { - name: 'Danger Color Accent', - color: '#832e35' -}, { - name: 'Danger Color Light', - color: '#f8d7da' -}, { - name: 'Warning Color', - color: '#664d03' -}, { - name: 'Warning Color Border', - color: '#ffecb5' -}, { - name: 'Warning Color Accent', - color: '#7f6002' -}, { - name: 'Warning Color Light', - color: '#fff3cd' -}, { - name: 'Info Color', - color: '#055160' -}, { - name: 'Info Color Border', - color: '#b6effb' -}, { - name: 'Info Color Accent', - color: '#076c81' -}, { - name: 'Info Color Light', - color: '#cff4fc' -}, { - name: 'Light Color', - color: '#636464' -}, { - name: 'Light Color Border', - color: '#fdfdfe' -}, { - name: 'Light Color Accent', - color: '#7b7c7c' -}, { - name: 'Light Color Light', - color: '#fefefe' -}, { - name: 'Dark Color', - color: '#141619' -}, { - name: 'Dark Color Border', - color: '#bcbebf' -}, { - name: 'Dark Color Accent', - color: '#292d33' -}, { - name: 'Dark Color Light', - color: '#d3d3d4' -}]; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bootstrapColors); - -/***/ }), - -/***/ "./src/js/blocks/bootstrap/edit.js": -/*!*****************************************!*\ - !*** ./src/js/blocks/bootstrap/edit.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _components_AlertButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/AlertButton */ "./src/js/blocks/components/AlertButton/index.js"); -/* harmony import */ var _components_unit_picker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/unit-picker */ "./src/js/blocks/components/unit-picker/index.js"); -/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../components/IconPicker */ "./src/js/blocks/components/IconPicker/index.js"); -/* harmony import */ var _components_icons_BootstrapIcons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../components/icons/BootstrapIcons */ "./src/js/blocks/components/icons/BootstrapIcons.js"); -/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./colors */ "./src/js/blocks/bootstrap/colors.js"); -/* harmony import */ var _components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/CloseButtonIcons */ "./src/js/blocks/components/CloseButtonIcons/index.js"); -/* eslint-disable no-undef */ -/* eslint-disable no-unused-vars */ -/* eslint-disable camelcase */ -/** - * External dependencies - */ - - - - - - - - - - - - - - - - -// For storing unique IDs. -var uniqueIds = []; -var BootstrapAlerts = function BootstrapAlerts(props) { - // Shortcts. - var attributes = props.attributes, - setAttributes = props.setAttributes, - clientId = props.clientId; - var uniqueId = attributes.uniqueId, - alertType = attributes.alertType, - alertTitle = attributes.alertTitle, - alertDescription = attributes.alertDescription, - buttonEnabled = attributes.buttonEnabled, - maximumWidthUnit = attributes.maximumWidthUnit, - maximumWidth = attributes.maximumWidth, - icon = attributes.icon, - descriptionEnabled = attributes.descriptionEnabled, - titleEnabled = attributes.titleEnabled, - iconEnabled = attributes.iconEnabled, - closeButtonEnabled = attributes.closeButtonEnabled, - closeButtonExpiration = attributes.closeButtonExpiration, - className = attributes.className, - baseFontSize = attributes.baseFontSize, - enableCustomFonts = attributes.enableCustomFonts, - variant = attributes.variant, - iconVerticalAlignment = attributes.iconVerticalAlignment, - innerBlocksEnabled = attributes.innerBlocksEnabled, - colorPrimary = attributes.colorPrimary, - colorBorder = attributes.colorBorder, - colorAccent = attributes.colorAccent, - colorAlt = attributes.colorAlt, - colorBold = attributes.colorBold, - colorLight = attributes.colorLight, - mode = attributes.mode; - - /** - * Get a unique ID for the block for inline styling if necessary. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (null === uniqueId || uniqueIds.includes(uniqueId) || '' === uniqueId) { - var newUniqueId = 'alerts-dlx-' + clientId.substr(2, 9).replace('-', ''); - setAttributes({ - uniqueId: newUniqueId - }); - uniqueIds.push(newUniqueId); - } else { - uniqueIds.push(uniqueId); - } - }, []); - var innerBlocksRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); - var innerBlockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)({ - className: 'alerts-dlx-content', - ref: innerBlocksRef - }, { - allowedBlocks: innerBlocksEnabled ? true : ['core/paragraph'], - template: [['core/paragraph', { - placeholder: '' - }]] - }); - var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store), - replaceInnerBlocks = _useDispatch.replaceInnerBlocks; - - /** - * Migrate RichText to InnerBlocks. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - // Port shareText attribute to use innerBlocks instead. - if (alertDescription !== '' && null !== innerBlocksRef.current) { - // Convert text over to blocks. - var richTextConvertedToBlocks = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__.rawHandler)({ - HTML: alertDescription - }); - replaceInnerBlocks(clientId, richTextConvertedToBlocks); - setAttributes({ - alertDescription: '' - }); - } - }, [innerBlocksRef]); - var styles = "\n\t\t#".concat(uniqueId, " {\n\t\t\t--alerts-dlx-bootstrap-color-primary: ").concat(colorPrimary, ";\n\t\t\t--alerts-dlx-bootstrap-color-border: ").concat(colorBorder, ";\n\t\t\t--alerts-dlx-bootstrap-color-accent: ").concat(colorAccent, ";\n\t\t\t--alerts-dlx-bootstrap-color-alt: ").concat(colorAlt, ";\n\t\t\t--alerts-dlx-bootstrap-color-bold: ").concat(colorBold, ";\n\t\t\t--alerts-dlx-bootstrap-color-light: ").concat(colorLight, ";\n\t\t}"); - var inspectorControls = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert Settings', 'alerts-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Icon', 'alerts-dlx'), - checked: iconEnabled, - onChange: function onChange(value) { - setAttributes({ - iconEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Title', 'alerts-dlx'), - checked: titleEnabled, - onChange: function onChange(value) { - setAttributes({ - titleEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Description', 'alerts-dlx'), - checked: descriptionEnabled, - onChange: function onChange(value) { - setAttributes({ - descriptionEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Button', 'alerts-dlx'), - checked: buttonEnabled, - onChange: function onChange(value) { - setAttributes({ - buttonEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Close Button', 'alerts-dlx'), - checked: closeButtonEnabled, - onChange: function onChange(value) { - setAttributes({ - closeButtonEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the alert to be dismissible.', 'alerts-dlx') - })), closeButtonEnabled && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Close Button save expiration', 'alerts-dlx'), - value: closeButtonExpiration, - onChange: function onChange(value) { - setAttributes({ - closeButtonExpiration: parseInt(value) - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the expiration time in seconds for the close button to reappear. Set to zero to never expire.', 'alerts-dlx'), - type: 'number' - })))), 'custom' === alertType && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.PanelColorSettings, { - __experimentalIsRenderedInSidebar: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Color Settings', 'alerts-dlx'), - colorSettings: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Text Color', 'alerts-dlx'), - value: colorPrimary, - onChange: function onChange(value) { - setAttributes({ - colorPrimary: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Border Color', 'alerts-dlx'), - value: colorBorder, - onChange: function onChange(value) { - setAttributes({ - colorBorder: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accent Color', 'alerts-dlx'), - value: colorAccent, - onChange: function onChange(value) { - setAttributes({ - colorAccent: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button Color', 'alerts-dlx'), - value: colorAlt, - onChange: function onChange(value) { - setAttributes({ - colorAlt: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Color', 'alerts-dlx'), - value: colorBold, - onChange: function onChange(value) { - setAttributes({ - colorBold: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background Color', 'alerts-dlx'), - value: colorLight, - onChange: function onChange(value) { - setAttributes({ - colorLight: value - }); - } - }], - colors: _colors__WEBPACK_IMPORTED_MODULE_12__["default"] - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Appearance', 'alerts-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_components_unit_picker__WEBPACK_IMPORTED_MODULE_9__["default"], { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Width', 'alerts-dlx'), - value: maximumWidthUnit, - units: ['px', '%', 'vw'], - onClick: function onClick(value) { - setAttributes({ - maximumWidthUnit: value - }); - } - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - type: 'text', - value: maximumWidth, - onChange: function onChange(value) { - setAttributes({ - maximumWidth: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-variants-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Alert Variant', 'alerts-dlx'), - className: "alerts-dlx-bootstrap-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'default' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'default' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Default', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), iconEnabled && 'centered' !== variant && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-button-group-icon-alignment", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Vertical Alignment', 'alerts-dlx'), - className: "alerts-dlx-material-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'top' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'top' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-mode-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set Light or Dark Mode', 'alerts-dlx'), - className: "alerts-dlx-chakra-mode" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'light' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'light' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Light Mode', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'dark' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'dark' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Dark Mode', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Base Font Size', 'alerts-dlx'), - step: 1, - value: baseFontSize, - max: 36, - min: 12, - currentInput: 16, - initialPosition: 16, - allowReset: true, - onChange: function onChange(fontSizeValue) { - setAttributes({ - baseFontSize: fontSizeValue - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the base font size for the alert.', 'alerts-dlx') - })))); - var advancedControls = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Flexible InnerBlocks', 'alerts-dlx'), - checked: innerBlocksEnabled, - onChange: function onChange(value) { - setAttributes({ - innerBlocksEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the use of any block within the alert.', 'alerts-dlx') - })); - - /** - * Attempt to check when block styles are changed. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (undefined === className) { - return; - } - var styleMatch = new RegExp(/is-style-([^\s]*)/g).exec(className); - if (null !== styleMatch) { - var match = styleMatch[1]; - setAttributes({ - alertType: match - }); - } - }, [className]); - var getIconSets = function getIconSets() { - return _components_icons_BootstrapIcons__WEBPACK_IMPORTED_MODULE_11__["default"]; - }; - - // Calculate max width. - var maxWidthStyle = { - maxWidth: maximumWidth + maximumWidthUnit - }; - var baseFontSizeStyles = "#".concat(uniqueId, " { font-size: ").concat(parseInt(baseFontSize), "px; }"); - var block = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, inspectorControls), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorAdvancedControls, null, advancedControls), /*#__PURE__*/React.createElement("style", null, baseFontSizeStyles), 'custom' === alertType && /*#__PURE__*/React.createElement("style", null, styles), /*#__PURE__*/React.createElement("link", { - rel: "stylesheet", - href: "".concat(alertsDlxBlock.font_stylesheet) - }), /*#__PURE__*/React.createElement("figure", { - role: "alert", - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('alerts-dlx-alert alerts-dlx-bootstrap', { - 'alerts-dlx-has-icon': iconEnabled, - 'alerts-dlx-has-description': descriptionEnabled, - 'alerts-dlx-has-button': buttonEnabled - }), - style: maxWidthStyle, - id: uniqueId - }, iconEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-icon", - "aria-hidden": "true" - }, /*#__PURE__*/React.createElement(_components_IconPicker__WEBPACK_IMPORTED_MODULE_10__["default"], { - defaultSvg: icon, - setAttributes: setAttributes, - alertType: alertType, - icons: getIconSets() - })), /*#__PURE__*/React.createElement("section", null, closeButtonEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-close" - }, /*#__PURE__*/React.createElement(_components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__.BootstrapCloseIcon, null)), titleEnabled && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.RichText, { - tagName: "h2", - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert title', 'alerts-dlx'), - value: alertTitle, - className: "alerts-dlx-title", - disableLineBreaks: true, - allowedFormats: [], - onChange: function onChange(value) { - setAttributes({ - alertTitle: value - }); - } - }), /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-content-wrapper" - }, descriptionEnabled && /*#__PURE__*/React.createElement("div", innerBlockProps), buttonEnabled && /*#__PURE__*/React.createElement(_components_AlertButton__WEBPACK_IMPORTED_MODULE_8__["default"], { - attributes: attributes, - setAttributes: setAttributes - }))))); - var blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, "alerts-dlx template-bootstrap is-style-".concat(alertType), { - 'custom-fonts-enabled': enableCustomFonts, - 'is-appearance-default': 'default' === variant, - 'is-appearance-centered': 'centered' === variant, - 'icon-vertical-align-top': 'top' === iconVerticalAlignment, - 'icon-vertical-align-centered': 'centered' === iconVerticalAlignment, - 'is-dark-mode': 'dark' === mode - }) - }); - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", blockProps, block)); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BootstrapAlerts); - -/***/ }), - -/***/ "./src/js/blocks/bootstrap/index.js": -/*!******************************************!*\ - !*** ./src/js/blocks/bootstrap/index.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/js/blocks/bootstrap/block.json"); -/* harmony import */ var _components_icons_BootstrapLogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/icons/BootstrapLogo */ "./src/js/blocks/components/icons/BootstrapLogo.js"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/js/blocks/bootstrap/edit.js"); - - - - - -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__, { - edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"], - save: function save() { - return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null); - }, - icon: /*#__PURE__*/React.createElement(_components_icons_BootstrapLogo__WEBPACK_IMPORTED_MODULE_3__["default"], null), - transforms: { - from: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'bootstrap'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-bootstrap', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'bootstrap'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-bootstrap', attributes, innerBlocks); - } - }], - to: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'material'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-material', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'subtle'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'chakra'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-chakra', attributes, innerBlocks); - } - }] - } -}); - -/***/ }), - -/***/ "./src/js/blocks/chakraui/colors.js": -/*!******************************************!*\ - !*** ./src/js/blocks/chakraui/colors.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -var chakraColors = [{ - name: 'Success Color', - color: '#2d3748' -}, { - name: 'Success Color Accent', - color: '#38a169' -}, { - name: 'Success Color Alt', - color: '#3dae71' -}, { - name: 'Success Color Light', - color: '#c6f6d5' -}, { - name: 'Info Color', - color: '#014361' -}, { - name: 'Info Color Accent', - color: '#3182ce' -}, { - name: 'Info Color Alt', - color: '#2d75b8' -}, { - name: 'Info Color Bold', - color: '#2d76bb' -}, { - name: 'Info Color Light', - color: '#bee3f8' -}, { - name: 'Warning Color', - color: '#2d3748' -}, { - name: 'Warning Color Accent', - color: '#dd6b20' -}, { - name: 'Warning Color Alt', - color: '#b35719' -}, { - name: 'Warning Color Light', - color: '#feebc8' -}, { - name: 'Error Color Accent', - color: '#a92525' -}, { - name: 'Error Color Alt', - color: '#d32f2f' -}, { - name: 'Error Color Bold', - color: '#ef5350' -}, { - name: 'Error Color Light', - color: '#fed7d7' -}]; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chakraColors); - -/***/ }), - -/***/ "./src/js/blocks/chakraui/edit.js": -/*!****************************************!*\ - !*** ./src/js/blocks/chakraui/edit.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _components_AlertButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/AlertButton */ "./src/js/blocks/components/AlertButton/index.js"); -/* harmony import */ var _components_unit_picker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/unit-picker */ "./src/js/blocks/components/unit-picker/index.js"); -/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../components/IconPicker */ "./src/js/blocks/components/IconPicker/index.js"); -/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./colors */ "./src/js/blocks/chakraui/colors.js"); -/* harmony import */ var _components_icons_ChakraIcons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../components/icons/ChakraIcons */ "./src/js/blocks/components/icons/ChakraIcons.js"); -/* harmony import */ var _components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/CloseButtonIcons */ "./src/js/blocks/components/CloseButtonIcons/index.js"); -/* eslint-disable no-undef */ -/* eslint-disable no-unused-vars */ -/* eslint-disable camelcase */ -/** - * External dependencies - */ - - - - - - - - - - - - - - - - -// For storing unique IDs. -var uniqueIds = []; -var ChakraAlerts = function ChakraAlerts(props) { - var innerBlocksRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); - var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store), - replaceInnerBlocks = _useDispatch.replaceInnerBlocks; - - // Shortcuts. - var attributes = props.attributes, - setAttributes = props.setAttributes, - clientId = props.clientId; - var uniqueId = attributes.uniqueId, - alertType = attributes.alertType, - alertTitle = attributes.alertTitle, - alertDescription = attributes.alertDescription, - buttonEnabled = attributes.buttonEnabled, - maximumWidthUnit = attributes.maximumWidthUnit, - maximumWidth = attributes.maximumWidth, - icon = attributes.icon, - descriptionEnabled = attributes.descriptionEnabled, - titleEnabled = attributes.titleEnabled, - iconEnabled = attributes.iconEnabled, - className = attributes.className, - baseFontSize = attributes.baseFontSize, - enableCustomFonts = attributes.enableCustomFonts, - variant = attributes.variant, - mode = attributes.mode, - iconVerticalAlignment = attributes.iconVerticalAlignment, - colorPrimary = attributes.colorPrimary, - colorBorder = attributes.colorBorder, - colorAccent = attributes.colorAccent, - colorAlt = attributes.colorAlt, - colorBold = attributes.colorBold, - colorLight = attributes.colorLight, - closeButtonEnabled = attributes.closeButtonEnabled, - closeButtonExpiration = attributes.closeButtonExpiration, - innerBlocksEnabled = attributes.innerBlocksEnabled; - var innerBlockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)({ - className: 'alerts-dlx-content', - ref: innerBlocksRef - }, { - allowedBlocks: innerBlocksEnabled ? true : ['core/paragraph'], - template: [['core/paragraph', { - placeholder: '' - }]] - }); - - /** - * Migrate RichText to InnerBlocks. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - // Port shareText attribute to use innerBlocks instead. - if (alertDescription !== '' && null !== innerBlocksRef.current) { - // Convert text over to blocks. - var richTextConvertedToBlocks = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__.rawHandler)({ - HTML: alertDescription - }); - replaceInnerBlocks(clientId, richTextConvertedToBlocks); - setAttributes({ - alertDescription: '' - }); - } - }, [innerBlocksRef]); - - /** - * Get a unique ID for the block for inline styling if necessary. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (null === uniqueId || uniqueIds.includes(uniqueId) || '' === uniqueId) { - var newUniqueId = 'alerts-dlx-' + clientId.substr(2, 9).replace('-', ''); - setAttributes({ - uniqueId: newUniqueId - }); - uniqueIds.push(newUniqueId); - } else { - uniqueIds.push(uniqueId); - } - }, []); - var styles = "\n\t\t#".concat(uniqueId, " {\n\t\t\t--alerts-dlx-chakra-color-primary: ").concat(colorPrimary, ";\n\t\t\t--alerts-dlx-chakra-color-border: ").concat(colorBorder, ";\n\t\t\t--alerts-dlx-chakra-color-accent: ").concat(colorAccent, ";\n\t\t\t--alerts-dlx-chakra-color-alt: ").concat(colorAlt, ";\n\t\t\t--alerts-dlx-chakra-color-bold: ").concat(colorBold, ";\n\t\t\t--alerts-dlx-chakra-color-light: ").concat(colorLight, ";\n\t\t}"); - var inspectorControls = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert Settings', 'alerts-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Icon', 'alerts-dlx'), - checked: iconEnabled, - onChange: function onChange(value) { - setAttributes({ - iconEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Title', 'alerts-dlx'), - checked: titleEnabled, - onChange: function onChange(value) { - setAttributes({ - titleEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Description', 'alerts-dlx'), - checked: descriptionEnabled, - onChange: function onChange(value) { - setAttributes({ - descriptionEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Button', 'alerts-dlx'), - checked: buttonEnabled, - onChange: function onChange(value) { - setAttributes({ - buttonEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Close Button', 'alerts-dlx'), - checked: closeButtonEnabled, - onChange: function onChange(value) { - setAttributes({ - closeButtonEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the alert to be dismissible.', 'alerts-dlx') - })), closeButtonEnabled && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Close Button save expiration', 'alerts-dlx'), - value: closeButtonExpiration, - onChange: function onChange(value) { - setAttributes({ - closeButtonExpiration: parseInt(value) - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the expiration time in seconds for the close button to reappear. Set to zero to never expire.', 'alerts-dlx'), - type: 'number' - })))), 'custom' === alertType && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.PanelColorSettings, { - __experimentalIsRenderedInSidebar: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Color Settings', 'alerts-dlx'), - colorSettings: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Text Color', 'alerts-dlx'), - value: colorPrimary, - onChange: function onChange(value) { - setAttributes({ - colorPrimary: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Border Color', 'alerts-dlx'), - value: colorBorder, - onChange: function onChange(value) { - setAttributes({ - colorBorder: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accent Color', 'alerts-dlx'), - value: colorAccent, - onChange: function onChange(value) { - setAttributes({ - colorAccent: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button Color', 'alerts-dlx'), - value: colorAlt, - onChange: function onChange(value) { - setAttributes({ - colorAlt: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Color', 'alerts-dlx'), - value: colorBold, - onChange: function onChange(value) { - setAttributes({ - colorBold: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background Color', 'alerts-dlx'), - value: colorLight, - onChange: function onChange(value) { - setAttributes({ - colorLight: value - }); - } - }], - colors: _colors__WEBPACK_IMPORTED_MODULE_11__["default"] - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Appearance', 'quotes-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_components_unit_picker__WEBPACK_IMPORTED_MODULE_9__["default"], { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Width', 'quotes-dlx'), - value: maximumWidthUnit, - units: ['px', '%', 'vw'], - onClick: function onClick(value) { - setAttributes({ - maximumWidthUnit: value - }); - } - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - type: 'text', - value: maximumWidth, - onChange: function onChange(value) { - setAttributes({ - maximumWidth: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-variants-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Alert Variant', 'quotes-dlx'), - className: "alerts-dlx-chakra-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'subtle' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'subtle' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Subtle', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'solid' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'solid' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Solid', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'left-accent' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'left-accent' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Left Accent', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'top-accent' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'top-accent' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top Accent', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-mode-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set Light or Dark Mode', 'quotes-dlx'), - className: "alerts-dlx-chakra-mode" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'light' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'light' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Light Mode', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'dark' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'dark' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Dark Mode', 'alerts-dlx'))))), iconEnabled && 'centered' !== variant && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-button-group-icon-alignment", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Vertical Alignment', 'quotes-dlx'), - className: "alerts-dlx-material-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'top' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'top' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Base Font Size', 'alerts-dlx'), - step: 1, - value: baseFontSize, - max: 36, - min: 12, - currentInput: 16, - initialPosition: 16, - allowReset: true, - onChange: function onChange(fontSizeValue) { - setAttributes({ - baseFontSize: fontSizeValue - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the base font size for the alert.', 'alerts-dlx') - })))); - var advancedControls = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Flexible InnerBlocks', 'alerts-dlx'), - checked: innerBlocksEnabled, - onChange: function onChange(value) { - setAttributes({ - innerBlocksEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the use of any block within the alert.', 'alerts-dlx') - })); - - /** - * Attempt to check when block styles are changed. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (undefined === className) { - return; - } - var styleMatch = new RegExp(/is-style-([^\s]*)/g).exec(className); - if (null !== styleMatch) { - var match = styleMatch[1]; - setAttributes({ - alertType: match - }); - } - }, [className]); - var getIconSets = function getIconSets() { - return _components_icons_ChakraIcons__WEBPACK_IMPORTED_MODULE_12__["default"]; - }; - - // Calculate max width. - var maxWidthStyle = { - maxWidth: maximumWidth + maximumWidthUnit - }; - var baseFontSizeStyles = "#".concat(uniqueId, " { font-size: ").concat(parseInt(baseFontSize), "px; }"); - var block = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, inspectorControls), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorAdvancedControls, null, advancedControls), /*#__PURE__*/React.createElement("style", null, baseFontSizeStyles), 'custom' === alertType && /*#__PURE__*/React.createElement("style", null, styles), /*#__PURE__*/React.createElement("figure", { - role: "alert", - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('alerts-dlx-alert alerts-dlx-chakra', { - 'alerts-dlx-has-icon': iconEnabled, - 'alerts-dlx-has-description': descriptionEnabled, - 'alerts-dlx-has-button': buttonEnabled - }), - style: maxWidthStyle, - id: uniqueId - }, iconEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-icon", - "aria-hidden": "true" - }, /*#__PURE__*/React.createElement(_components_IconPicker__WEBPACK_IMPORTED_MODULE_10__["default"], { - defaultSvg: icon, - setAttributes: setAttributes, - alertType: alertType, - icons: getIconSets() - })), /*#__PURE__*/React.createElement("section", null, closeButtonEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-close" - }, /*#__PURE__*/React.createElement(_components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__.ChakraCloseIcon, null)), titleEnabled && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.RichText, { - tagName: "h2", - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert title', 'quotes-dlx'), - value: alertTitle, - className: "alerts-dlx-title", - disableLineBreaks: true, - allowedFormats: [], - onChange: function onChange(value) { - setAttributes({ - alertTitle: value - }); - } - }), /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-content-wrapper" - }, descriptionEnabled && /*#__PURE__*/React.createElement("div", innerBlockProps), buttonEnabled && /*#__PURE__*/React.createElement(_components_AlertButton__WEBPACK_IMPORTED_MODULE_8__["default"], { - attributes: attributes, - setAttributes: setAttributes - }))))); - var blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, "alerts-dlx template-chakra is-style-".concat(alertType), { - 'is-dark-mode': 'dark' === mode, - 'custom-fonts-enabled': enableCustomFonts, - 'is-appearance-subtle': 'subtle' === variant, - 'is-appearance-solid': 'solid' === variant, - 'is-appearance-left-accent': 'left-accent' === variant, - 'is-appearance-top-accent': 'top-accent' === variant, - 'is-appearance-centered': 'centered' === variant, - 'icon-vertical-align-top': 'top' === iconVerticalAlignment, - 'icon-vertical-align-centered': 'centered' === iconVerticalAlignment - }) - }); - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", blockProps, block)); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChakraAlerts); - -/***/ }), - -/***/ "./src/js/blocks/chakraui/index.js": -/*!*****************************************!*\ - !*** ./src/js/blocks/chakraui/index.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/js/blocks/chakraui/block.json"); -/* harmony import */ var _components_icons_ChakraUILogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/icons/ChakraUILogo */ "./src/js/blocks/components/icons/ChakraUILogo.js"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/js/blocks/chakraui/edit.js"); - - - - - -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__, { - edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"], - save: function save() { - return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null); - }, - icon: /*#__PURE__*/React.createElement(_components_icons_ChakraUILogo__WEBPACK_IMPORTED_MODULE_3__["default"], null), - transforms: { - from: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'subtle'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'chakra'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-chakra', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'subtle'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'chakra'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-chakra', attributes, innerBlocks); - } - }], - to: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'material'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-material', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'bootstrap'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-bootstrap', attributes, innerBlocks); - } - }] - } -}); - -/***/ }), - -/***/ "./src/js/blocks/components/AlertButton/index.js": -/*!*******************************************************!*\ - !*** ./src/js/blocks/components/AlertButton/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/js/blocks/components/AlertButton/editor.scss"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - -var AlertButton = function AlertButton(props) { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - isPopOverVisible = _useState2[0], - setIsPopOverVisible = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - isFocusedOutside = _useState4[0], - setIsFocusedOutside = _useState4[1]; - var attributes = props.attributes, - setAttributes = props.setAttributes; - var buttonText = attributes.buttonText, - buttonUrl = attributes.buttonUrl, - buttonTarget = attributes.buttonTarget, - buttonRelNoFollow = attributes.buttonRelNoFollow, - buttonRelSponsored = attributes.buttonRelSponsored; - var toggleVisible = function toggleVisible() { - setIsPopOverVisible(function (state) { - return !state; - }); - }; - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-button-wrapper", - style: { - display: 'inline-flex' - } - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { - className: "alerts-dlx-button button-reset" - }, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, { - tagName: "span", - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Button text', 'quotes-dlx'), - value: buttonText, - className: "alerts-dlx-button-text", - disableLineBreaks: true, - allowedFormats: [], - onChange: function onChange(value) { - setAttributes({ - buttonText: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { - className: "button-reset alertx-dlx-button-link-icon", - icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], - iconSize: 25, - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Choose Link', 'quotes-dlx'), - onClick: function onClick() { - if (isFocusedOutside && !isPopOverVisible) { - setIsFocusedOutside(false); - } - if (!isPopOverVisible && !isFocusedOutside) { - toggleVisible(); - setIsFocusedOutside(false); - } - } - }), isPopOverVisible && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, { - noArrow: false, - onFocusOutside: function onFocusOutside() { - setIsPopOverVisible(false); - setIsFocusedOutside(true); - } - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.BaseControl, { - className: "alerts-dlx-button-popover-base-control" - }, /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-button-link-select" - }, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.URLInput, { - className: 'alertx-dlx-button-link', - value: buttonUrl, - onChange: function onChange(value) { - setAttributes({ - buttonUrl: value, - buttonHasUrl: !!value - }); - }, - __nextHasNoMarginBottom: true - }), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Open link in a new tab', 'alerts-dlx'), - checked: buttonTarget || '', - onChange: function onChange(value) { - setAttributes({ - buttonTarget: value - }); - }, - className: "alerts-dlx-link-toggle" - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Add rel="nofollow"', 'alerts-dlx'), - checked: buttonRelNoFollow || '', - onChange: function onChange(value) { - setAttributes({ - buttonRelNoFollow: value - }); - }, - className: "alerts-dlx-link-toggle" - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Add rel="sponsored"', 'alerts-dlx'), - checked: buttonRelSponsored || '', - onChange: function onChange(value) { - setAttributes({ - buttonRelSponsored: value - }); - }, - className: "alerts-dlx-link-toggle" - }))))))); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AlertButton); - -/***/ }), - -/***/ "./src/js/blocks/components/CloseButtonIcons/index.js": -/*!************************************************************!*\ - !*** ./src/js/blocks/components/CloseButtonIcons/index.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ BootstrapCloseIcon: () => (/* binding */ BootstrapCloseIcon), -/* harmony export */ ChakraCloseIcon: () => (/* binding */ ChakraCloseIcon), -/* harmony export */ MaterialCloseIcon: () => (/* binding */ MaterialCloseIcon), -/* harmony export */ ShoeLaceCloseIcon: () => (/* binding */ ShoeLaceCloseIcon) -/* harmony export */ }); -var BootstrapCloseIcon = function BootstrapCloseIcon(props) { - return /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 16 16", - width: "16", - height: "16", - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z" - })); -}; -var ChakraCloseIcon = function ChakraCloseIcon(props) { - return /*#__PURE__*/React.createElement("svg", { - viewBox: "0 0 24 24", - focusable: "false", - className: "chakra-icon css-onkibi", - "aria-hidden": "true", - width: "16", - height: "16" - }, /*#__PURE__*/React.createElement("path", { - fill: "currentColor", - d: "M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z" - })); -}; -var ShoeLaceCloseIcon = function ShoeLaceCloseIcon(props) { - return /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-x-lg", - viewBox: "0 0 16 16", - part: "svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" - })); -}; -var MaterialCloseIcon = function MaterialCloseIcon(props) { - return /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - width: "16", - height: "16", - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z" - })); -}; - - -/***/ }), - -/***/ "./src/js/blocks/components/IconPicker/index.js": -/*!******************************************************!*\ - !*** ./src/js/blocks/components/IconPicker/index.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.scss */ "./src/js/blocks/components/IconPicker/editor.scss"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utils_sanitize_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/sanitize-svg */ "./src/js/blocks/utils/sanitize-svg/index.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -var IconPicker = function IconPicker(props) { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - isCustomIcon = _useState2[0], - setIsCustomIcon = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(props.defaultSvg), - _useState4 = _slicedToArray(_useState3, 2), - selectedIcon = _useState4[0], - setSelectedIcon = _useState4[1]; - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false), - _useState6 = _slicedToArray(_useState5, 2), - isPopoverVisible = _useState6[0], - setIsPopOverVisible = _useState6[1]; - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false), - _useState8 = _slicedToArray(_useState7, 2), - isFocusedOutside = _useState8[0], - setIsFocusedOutside = _useState8[1]; - var defaultSvg = props.defaultSvg, - setAttributes = props.setAttributes, - icons = props.icons; - - /** - * Retrieve popover content for custom icons or regular icons. - * - * @return {string} Popover content. - */ - var getPopoverContent = function getPopoverContent() { - if (!isCustomIcon) { - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("ul", { - className: "alerts-dlx-icon-list" - }, Object.keys(icons).map(function (svg, i) { - return /*#__PURE__*/React.createElement("li", { - key: "alerts-dlx-icon-".concat(i) - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Tooltip, { - text: icons[svg].label - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - className: "editor-block-list-item-button", - onClick: function onClick() { - setAttributes({ - icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.renderToString)(icons[svg].icon) - }); - } - }, /*#__PURE__*/React.createElement("span", { - className: "editor-block-types-list__item-icon" - }, icons[svg].icon)))); - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - className: "alerts-dlx-custom-icon-button", - variant: "secondary", - showTooltip: true, - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Add in a custom SVG instead of selecting an icon.', 'alerts-dlx'), - onClick: function onClick() { - setIsCustomIcon(true); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Set a Custom Icon', 'alerts-dlx'))); - } - // Return custom icon interface. - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-custom-icon-preview" - }, /*#__PURE__*/React.createElement("span", { - dangerouslySetInnerHTML: { - __html: (0,_utils_sanitize_svg__WEBPACK_IMPORTED_MODULE_4__["default"])(selectedIcon) - } - })), /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-custom-icon-input" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SVG Code', 'alerts-dlx'), - value: (0,_utils_sanitize_svg__WEBPACK_IMPORTED_MODULE_4__["default"])(selectedIcon), - onChange: function onChange(value) { - setSelectedIcon(value); - } - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - isPrimary: true, - onClick: function onClick() { - setAttributes({ - icon: (0,_utils_sanitize_svg__WEBPACK_IMPORTED_MODULE_4__["default"])(selectedIcon) - }); - setSelectedIcon(selectedIcon); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Set Icon', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: "tertiary", - onClick: function onClick() { - setIsCustomIcon(false); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Back to Icons', 'alerts-dlx')))); - }; - var toggleVisible = function toggleVisible() { - setIsPopOverVisible(function (state) { - return !state; - }); - }; - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - className: "alerts-dlx-icon-wrapper" - }, /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-icon-preview" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - className: "button-reset alerts-dlx-icon-preview-button", - onClick: function onClick(e) { - if (isFocusedOutside) { - setIsFocusedOutside(false); - return; - } - toggleVisible(); - } - }, /*#__PURE__*/React.createElement("span", { - dangerouslySetInnerHTML: { - __html: (0,_utils_sanitize_svg__WEBPACK_IMPORTED_MODULE_4__["default"])(defaultSvg) - } - })))), isPopoverVisible && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, { - noArrow: false, - className: "alerts-dlx-icon-popover", - onFocusOutside: function onFocusOutside() { - setIsFocusedOutside(true); - setIsPopOverVisible(false); - } - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - className: "alerts-dlx-icon-picker" - }, /*#__PURE__*/React.createElement("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Select an Icon', 'alerts-dlx')), getPopoverContent()))); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconPicker); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/AlertsLogo.js": -/*!******************************************************!*\ - !*** ./src/js/blocks/components/icons/AlertsLogo.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } - -var AlertsLogo = function AlertsLogo(props) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ - viewBox: "0 0 15463 13646", - xmlns: "http://www.w3.org/2000/svg", - xmlSpace: "preserve", - style: { - fillRule: 'evenodd', - clipRule: 'evenodd', - strokeLinejoin: 'round', - strokeMiterlimit: 2 - }, - width: "32", - height: "32" - }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "M7729.12 13643.9c1930.92 0 3861.92 0 5792.83-.042 341.667 0 683.417-.708 1025.08-1.167 141.375-.166 277.041-41.083 392.75-111.041 206.666-124.834 367.875-296.875 455.375-531.167 78.125-208.917 91.291-418.875 23.541-629.292-61.124-189.958-176.25-356.625-277.708-524.958-186.792-310-358.708-628.458-545.292-938.542-154.083-256.041-297.208-518.583-447.291-777.083-187-322-382.167-639.458-562.875-965.042-187.375-337.5-387.917-667.208-578.167-1002.83-118.75-209.5-231.25-422.792-358-627.333-124.958-201.959-234.958-412.042-357.291-615.25-100.876-167.251-193.376-339.708-291.501-508.709-111.5-191.833-229.374-379.958-336.417-574.083-213.333-386.708-447.583-761.167-655.416-1151.17-127.667-239.708-278.166-467.166-410.625-705.033-206.792-371.804-426.791-736.25-640.583-1104.09-204.834-352.204-409.084-704.596-613.001-1057.28-183.999-318.108-367.624-636.395-550.624-955.133-85.459-148.971-157.459-307.025-255.584-446.859-167.458-238.353-401.708-379.457-695.625-408.749-269-26.879-511 36.8-728.958 205.033-135.083 104.217-219.042 241.225-299.958 383.596-154.042 271.07-304.584 544.133-460.334 814.221-159.666 276.762-329.249 547.883-484.499 827.092-182.542 328.066-371.042 652.537-559.875 976.97-99.626 171.196-205.001 339.971-299.251 513.279-112.249 206.588-235.333 406.912-346.875 613.951-148.916 276.249-316.208 542.625-473.125 814.583-186.308 322.875-368.866 647.958-555.204 970.75-215.325 373.041-433.991 744.042-649.392 1117-209.916 363.333-416.712 728.416-626.379 1091.83-194.187 336.583-390.125 672.167-585.766 1007.83-149 255.584-306.609 506.625-445.754 767.292-108.234 202.75-238.717 391.833-343.755 596.458-90.375 176.084-200.454 342.125-300.529 513.417-158.704 271.375-317.121 542.875-474.071 815.292-67.233 116.583-139.075 232.083-173.766 363.75-64.813 245.666-41.084 483.958 78.825 708.416 173.383 324.167 436.433 520.417 812.954 531.959 256.7 7.833 513.837 1.875 770.746 1.875 2010.5.041 4020.97.041 6031.38.25Z", - style: { - fill: '#333' - } - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "M7729.12 13643.8c-2010.42-.042-4020.88-.042-6031.38-.083-256.909 0-514.046 5.958-770.746-1.875-376.521-11.542-639.571-207.792-812.954-531.959-119.909-224.458-143.638-462.75-78.825-708.416 34.691-131.667 106.533-247.167 173.766-363.75 156.95-272.417 315.367-543.917 474.071-815.292 100.075-171.292 210.154-337.333 300.529-513.417 105.038-204.625 235.521-393.708 343.755-596.458 139.145-260.667 296.754-511.708 445.754-767.292 195.641-335.666 391.579-671.25 585.766-1007.83 209.667-363.417 416.463-728.5 626.379-1091.83 215.401-372.958 434.067-743.959 649.392-1117 186.338-322.792 368.896-647.875 555.204-970.75 156.917-271.958 324.209-538.334 473.125-814.583 111.542-207.039 234.626-407.363 346.875-613.951 94.25-173.308 199.625-342.083 299.251-513.279 188.833-324.433 377.333-648.904 559.875-976.97 155.25-279.209 324.833-550.33 484.499-827.092 155.75-270.088 306.292-543.151 460.334-814.221 80.916-142.371 164.875-279.379 299.958-383.596C7331.706 45.923 7573.706-17.756 7842.706 9.123c293.917 29.292 528.167 170.396 695.625 408.749 98.125 139.834 170.125 297.888 255.584 446.859 183 318.738 366.625 637.025 550.624 955.133 203.917 352.683 408.167 705.075 613.001 1057.28 213.792 367.838 433.791 732.284 640.583 1104.09 132.459 237.867 282.958 465.325 410.625 705.033 207.833 390 442.083 764.459 655.416 1151.17 107.043 194.125 224.917 382.25 336.417 574.083 98.125 169.001 190.625 341.458 291.501 508.709 122.333 203.208 232.333 413.291 357.291 615.25 126.75 204.541 239.25 417.833 358 627.333 190.25 335.625 390.792 665.333 578.167 1002.83 180.708 325.584 375.875 643.042 562.875 965.042 150.083 258.5 293.208 521.042 447.291 777.083 186.584 310.084 358.5 628.542 545.292 938.542 101.458 168.333 216.584 335 277.708 524.958 67.75 210.417 54.584 420.375-23.541 629.292-87.5 234.292-248.709 406.333-455.375 531.167-115.709 69.958-251.375 110.875-392.75 111.041-341.667.459-683.417 1.167-1025.08 1.167-1930.92.042-3861.92.042-5792.83-.125Z", - style: { - fill: '#333' - } - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "M9083.38 5193.79c-74.708 454.166-164.959 991.583-251.125 1529.62-138.75 866.25-278.875 1732.33-410.166 2599.71-64.251 424.5-330.001 710.292-688 711.958-359.293 1.625-634.167-284.958-699.959-705.333-207.667-1327.21-420.042-2653.75-633.834-3980-104.916-650.833 179.917-1061.17 822.167-1179.08 402.709-73.975 800.375-77.488 1196.46 43.75 427.333 130.792 670.042 451.166 664.458 979.375ZM8775.71 11734c0 581.25-471.25 1052.5-1052.5 1052.5-581.291 0-1052.5-471.25-1052.5-1052.5 0-581.292 471.209-1052.5 1052.5-1052.5 581.25 0 1052.5 471.208 1052.5 1052.5Z", - style: { - fill: '#fff', - fillRule: 'nonzero' - } - })); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AlertsLogo); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/BootstrapIcons.js": -/*!**********************************************************!*\ - !*** ./src/js/blocks/components/icons/BootstrapIcons.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * WordPress dependencies - */ -var _x = wp.i18n._x; -var BootstrapIcons = { - check: { - label: _x('Check', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z" - })) - }, - checkCircle: { - label: _x('Check Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z" - })) - }, - checkCircleFilled: { - label: _x('Check Circle Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check-circle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" - })) - }, - checkLarge: { - label: _x('Check Large', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check-lg", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z" - })) - }, - checkSquare: { - label: _x('Check Square', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check-square", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" - }), /*#__PURE__*/React.createElement("path", { - d: "M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z" - })) - }, - checkSquareFill: { - label: _x('Check Square Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-check-square-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm10.03 4.97a.75.75 0 0 1 .011 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.75.75 0 0 1 1.08-.022z" - })) - }, - circleSlash: { - label: _x('Circle Slash', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-slash-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "M11.354 4.646a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 .708.708l6-6a.5.5 0 0 0 0-.708z" - })) - }, - dashCircle: { - label: _x('Dash Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-dash-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z" - })) - }, - dashCircleFilled: { - label: _x('Dash Circle Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-dash-circle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7z" - })) - }, - exclamation: { - label: _x('Exclamation', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995z" - })) - }, - exclamationCircle: { - label: _x('Exclamation Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" - })) - }, - exclamationCircleFilled: { - label: _x('Exclamation Circle Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-circle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" - })) - }, - exclamationDiamond: { - label: _x('Exclamation Diamond', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-diamond", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M6.95.435c.58-.58 1.52-.58 2.1 0l6.515 6.516c.58.58.58 1.519 0 2.098L9.05 15.565c-.58.58-1.519.58-2.098 0L.435 9.05a1.482 1.482 0 0 1 0-2.098L6.95.435zm1.4.7a.495.495 0 0 0-.7 0L1.134 7.65a.495.495 0 0 0 0 .7l6.516 6.516a.495.495 0 0 0 .7 0l6.516-6.516a.495.495 0 0 0 0-.7L8.35 1.134z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" - })) - }, - exclamationDiamondFilled: { - label: _x('Exclamation Diamond Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-diamond-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M9.05.435c-.58-.58-1.52-.58-2.1 0L.436 6.95c-.58.58-.58 1.519 0 2.098l6.516 6.516c.58.58 1.519.58 2.098 0l6.516-6.516c.58-.58.58-1.519 0-2.098L9.05.435zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" - })) - }, - exclamationOctagon: { - label: _x('Exclamation Octagon', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-octagon", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1 1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1H5.1z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" - })) - }, - exclamationOctagonFilled: { - label: _x('Exclamation Octagon Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-octagon-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zM8 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" - })) - }, - exclamationSquare: { - label: _x('Exclamation Square', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-square", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" - })) - }, - exclamationSquareFilled: { - label: _x('Exclamation Square Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-square-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6 4c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995A.905.905 0 0 1 8 4zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" - })) - }, - exclamationTriangle: { - label: _x('Exclamation Triangle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-triangle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z" - })) - }, - exclamationTriangleFilled: { - label: _x('Settings', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-exclamation-triangle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" - })) - }, - info: { - label: _x('Info', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-info", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" - })) - }, - infoCircle: { - label: _x('Info Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-info-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" - })) - }, - infoCircleFill: { - label: _x('Info Circle Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-info-circle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" - })) - }, - infoSquare: { - label: _x('Info Square', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-info-square", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" - }), /*#__PURE__*/React.createElement("path", { - d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" - })) - }, - infoSquareFilled: { - label: _x('Info Square Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-info-square-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm8.93 4.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM8 5.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2z" - })) - }, - questionCircle: { - label: _x('Question Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-circle", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" - }), /*#__PURE__*/React.createElement("path", { - d: "M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" - })) - }, - questionDiamond: { - label: _x('Question Diamond', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-diamond", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M6.95.435c.58-.58 1.52-.58 2.1 0l6.515 6.516c.58.58.58 1.519 0 2.098L9.05 15.565c-.58.58-1.519.58-2.098 0L.435 9.05a1.482 1.482 0 0 1 0-2.098L6.95.435zm1.4.7a.495.495 0 0 0-.7 0L1.134 7.65a.495.495 0 0 0 0 .7l6.516 6.516a.495.495 0 0 0 .7 0l6.516-6.516a.495.495 0 0 0 0-.7L8.35 1.134z" - }), /*#__PURE__*/React.createElement("path", { - d: "M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" - })) - }, - questionDiamondFill: { - label: _x('Question Diamond Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-diamond-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M9.05.435c-.58-.58-1.52-.58-2.1 0L.436 6.95c-.58.58-.58 1.519 0 2.098l6.516 6.516c.58.58 1.519.58 2.098 0l6.516-6.516c.58-.58.58-1.519 0-2.098L9.05.435zM5.495 6.033a.237.237 0 0 1-.24-.247C5.35 4.091 6.737 3.5 8.005 3.5c1.396 0 2.672.73 2.672 2.24 0 1.08-.635 1.594-1.244 2.057-.737.559-1.01.768-1.01 1.486v.105a.25.25 0 0 1-.25.25h-.81a.25.25 0 0 1-.25-.246l-.004-.217c-.038-.927.495-1.498 1.168-1.987.59-.444.965-.736.965-1.371 0-.825-.628-1.168-1.314-1.168-.803 0-1.253.478-1.342 1.134-.018.137-.128.25-.266.25h-.825zm2.325 6.443c-.584 0-1.009-.394-1.009-.927 0-.552.425-.94 1.01-.94.609 0 1.028.388 1.028.94 0 .533-.42.927-1.029.927z" - })) - }, - questionCircleFill: { - label: _x('Question Circle Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-circle-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z" - })) - }, - questionLarge: { - label: _x('Question Large', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-lg", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - d: "M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 0 1-.5.5h-.77a.5.5 0 0 1-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777ZM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14Z" - })) - }, - questionSquare: { - label: _x('Question Square', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-square", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" - }), /*#__PURE__*/React.createElement("path", { - d: "M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" - })) - }, - questionSquareFill: { - label: _x('Question Square Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-question-square-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm3.496 6.033a.237.237 0 0 1-.24-.247C5.35 4.091 6.737 3.5 8.005 3.5c1.396 0 2.672.73 2.672 2.24 0 1.08-.635 1.594-1.244 2.057-.737.559-1.01.768-1.01 1.486v.105a.25.25 0 0 1-.25.25h-.81a.25.25 0 0 1-.25-.246l-.004-.217c-.038-.927.495-1.498 1.168-1.987.59-.444.965-.736.965-1.371 0-.825-.628-1.168-1.314-1.168-.803 0-1.253.478-1.342 1.134-.018.137-.128.25-.266.25h-.825zm2.325 6.443c-.584 0-1.009-.394-1.009-.927 0-.552.425-.94 1.01-.94.609 0 1.028.388 1.028.94 0 .533-.42.927-1.029.927z" - })) - }, - radioactive: { - label: _x('Radioactive', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-radioactive", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Z" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.653 5.496A2.986 2.986 0 0 0 8 5c-.61 0-1.179.183-1.653.496L4.694 2.992A5.972 5.972 0 0 1 8 2c1.222 0 2.358.365 3.306.992L9.653 5.496Zm1.342 2.324a2.986 2.986 0 0 1-.884 2.312 3.01 3.01 0 0 1-.769.552l1.342 2.683c.57-.286 1.09-.66 1.538-1.103a5.986 5.986 0 0 0 1.767-4.624l-2.994.18Zm-5.679 5.548 1.342-2.684A3 3 0 0 1 5.005 7.82l-2.994-.18a6 6 0 0 0 3.306 5.728ZM10 8a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" - })) - }, - lightbulb: { - label: _x('Lightbulb', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-lightbulb", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1z" - })) - }, - lightbulbFilled: { - label: _x('Lightbulb Filled', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - width: "16", - height: "16", - fill: "currentColor", - className: "bi bi-lightbulb-fill", - viewBox: "0 0 16 16" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5z" - })) - } -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BootstrapIcons); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/BootstrapLogo.js": -/*!*********************************************************!*\ - !*** ./src/js/blocks/components/icons/BootstrapLogo.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } -// eslint-disable-next-line no-unused-vars - -var BootstrapLogo = function BootstrapLogo(props) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ - viewBox: "0 0 167 134", - xmlns: "http://www.w3.org/2000/svg", - xmlSpace: "preserve", - style: { - fillRule: 'evenodd', - clipRule: 'evenodd', - strokeLinejoin: 'round', - strokeMiterlimit: 2 - } - }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "M34.617.282c-9.51 0-16.546 8.324-16.231 17.351.302 8.672-.091 19.904-2.918 29.063C12.631 55.883 7.835 61.702 0 62.449v8.435c7.835.747 12.631 6.567 15.468 15.753 2.827 9.16 3.22 20.391 2.918 29.064-.315 9.025 6.721 17.35 16.233 17.35h97.443c9.51 0 16.545-8.324 16.23-17.35-.302-8.673.091-19.904 2.918-29.064 2.838-9.186 7.622-15.006 15.457-15.753v-8.435c-7.835-.747-12.619-6.566-15.457-15.753-2.827-9.158-3.22-20.391-2.918-29.063.315-9.026-6.72-17.351-16.23-17.351H34.616h.001Zm78.377 81.728c0 12.429-9.271 19.967-24.656 19.967H62.147a2.838 2.838 0 0 1-2.825-2.824V34.181a2.838 2.838 0 0 1 2.825-2.825h26.041c12.829 0 21.248 6.949 21.248 17.619 0 7.488-5.663 14.193-12.88 15.367v.391c9.824 1.078 16.438 7.88 16.438 17.277ZM85.482 40.311H70.548v21.093h12.578c9.723 0 15.084-3.915 15.084-10.914 0-6.558-4.61-10.179-12.728-10.179ZM70.548 69.773V93.02h15.483c10.123 0 15.486-4.062 15.486-11.697 0-7.635-5.513-11.55-16.137-11.55H70.548Z" - })); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BootstrapLogo); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/ChakraIcons.js": -/*!*******************************************************!*\ - !*** ./src/js/blocks/components/icons/ChakraIcons.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * WordPress dependencies - */ -var _x = wp.i18n._x; -var ChakraIcons = { - add: { - label: _x('Add', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z" - })) - }, - atSign: { - label: _x('At Sign', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z" - })) - }, - attachment: { - label: _x('Attachment', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z" - })) - }, - bell: { - label: _x('Bell', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z" - })) - }, - calendar: { - label: _x('Calendar', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 14, - width: 14, - viewBox: "0 0 14 14" - }, /*#__PURE__*/React.createElement("path", { - d: "M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z" - })) - }, - chat: { - label: _x('Chat', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 14, - width: 14, - viewBox: "0 0 14 14" - }, /*#__PURE__*/React.createElement("path", { - d: "M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z" - })) - }, - check: { - label: _x('Check', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 14, - width: 14, - viewBox: "0 0 14 14" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor" - }, /*#__PURE__*/React.createElement("polygon", { - points: "5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039" - }))) - }, - checkCircle: { - label: _x('Check Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z" - })) - }, - close: { - label: _x('Close', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z" - })) - }, - copy: { - label: _x('Copy', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" - })) - }, - "delete": { - label: _x('Delete', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z" - })) - }, - download: { - label: _x('Download', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 14, - width: 14, - viewBox: "0 0 14 14" - }, /*#__PURE__*/React.createElement("path", { - d: "M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z" - })) - }, - info: { - label: _x('Info', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z" - })) - }, - infoOutline: { - label: _x('Info Outline', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor", - stroke: "currentColor", - strokeLinecap: "square", - strokeWidth: "2" - }, /*#__PURE__*/React.createElement("circle", { - cx: "12", - cy: "12", - fill: "none", - r: "11", - stroke: "currentColor" - }), /*#__PURE__*/React.createElement("line", { - fill: "none", - x1: "11.959", - x2: "11.959", - y1: "11", - y2: "17" - }), /*#__PURE__*/React.createElement("circle", { - cx: "11.959", - cy: "7", - r: "1", - stroke: "none" - }))) - }, - link: { - label: _x('Link', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z" - }), /*#__PURE__*/React.createElement("path", { - d: "M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z" - }))) - }, - lock: { - label: _x('Lock', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z" - })) - }, - notAllowed: { - label: _x('Not Allowed', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z" - })) - }, - question: { - label: _x('Question', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z" - })) - }, - questionOutline: { - label: _x('Question Outline', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - stroke: "currentColor", - strokeWidth: "1.5" - }, /*#__PURE__*/React.createElement("path", { - strokeLinecap: "round", - fill: "none", - d: "M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25" - }), /*#__PURE__*/React.createElement("path", { - fill: "none", - strokeLinecap: "round", - d: "M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0" - }), /*#__PURE__*/React.createElement("circle", { - fill: "none", - strokeMiterlimit: "10", - cx: "12", - cy: "12", - r: "11.25" - }))) - }, - settings: { - label: _x('Settings', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 14, - width: 14, - viewBox: "0 0 14 14" - }, /*#__PURE__*/React.createElement("path", { - d: "M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z" - })) - }, - star: { - label: _x('Star', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z" - })) - }, - time: { - label: _x('Time', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z" - }), /*#__PURE__*/React.createElement("path", { - d: "M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z" - }))) - }, - unlock: { - label: _x('Unlock', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z" - })) - }, - view: { - label: _x('View', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z" - }), /*#__PURE__*/React.createElement("circle", { - cx: "12", - cy: "12", - r: "2" - }))) - }, - viewOff: { - label: _x('View Off', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("g", { - fill: "currentColor" - }, /*#__PURE__*/React.createElement("path", { - d: "M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z" - }), /*#__PURE__*/React.createElement("path", { - d: "M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z" - }))) - }, - warning: { - label: _x('Warning', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z" - })) - }, - warningTwo: { - label: _x('Warning Two', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 24, - width: 24, - viewBox: "0 0 24 24" - }, /*#__PURE__*/React.createElement("path", { - d: "M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z" - })) - } -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChakraIcons); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/ChakraUILogo.js": -/*!********************************************************!*\ - !*** ./src/js/blocks/components/icons/ChakraUILogo.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } -// eslint-disable-next-line no-unused-vars - -var ChakraUILogo = function ChakraUILogo(props) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ - viewBox: "0 0 804 804", - xmlns: "http://www.w3.org/2000/svg", - xmlSpace: "preserve", - style: { - fillRule: 'evenodd', - clipRule: 'evenodd', - strokeLinejoin: 'round', - strokeMiterlimit: 2 - } - }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "M803.125 401.563C803.125 179.934 623.191 0 401.562 0 179.934 0 0 179.934 0 401.563c0 221.628 179.934 401.562 401.563 401.562 221.628 0 401.562-179.934 401.562-401.563Z", - style: { - fill: 'url(#a)' - } - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - d: "m217.369 418.703 273.725-271.841c5.112-5.078 13.344 1.102 9.89 7.428L399.106 341.016c-2.275 4.162.741 9.243 5.485 9.243h176.062c5.672 0 8.409 6.947 4.263 10.819L276.391 649.022c-5.532 5.162-13.766-2.113-9.324-8.238l146.049-201.478c2.993-4.131.043-9.918-5.06-9.918H221.773c-5.579 0-8.362-6.754-4.404-10.685Z", - style: { - fill: '#fff', - fillRule: 'nonzero' - } - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("linearGradient", { - id: "a", - x1: 0, - y1: 0, - x2: 1, - y2: 0, - gradientUnits: "userSpaceOnUse", - gradientTransform: "matrix(0 803.125 -803.125 0 401.562 0)" - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("stop", { - offset: 0, - style: { - stopColor: '#7bcbd4', - stopOpacity: 1 - } - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("stop", { - offset: 1, - style: { - stopColor: '#29c6b7', - stopOpacity: 1 - } - })))); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChakraUILogo); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/MaterialIcons.js": -/*!*********************************************************!*\ - !*** ./src/js/blocks/components/icons/MaterialIcons.js ***! - \*********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -/** - * WordPress dependencies - */ -var _x = wp.i18n._x; -var svgs = _defineProperty({ - deviceInformation: { - label: _x('Device Information', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.5 33.1V20.3h3v12.8Zm1.5-15q-.7 0-1.175-.475-.475-.475-.475-1.175 0-.7.45-1.175.45-.475 1.15-.475t1.2.475q.5.475.5 1.175 0 .7-.475 1.175Q24.7 18.1 24 18.1ZM13 46q-1.2 0-2.1-.9-.9-.9-.9-2.1V5q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v38q0 1.2-.9 2.1-.9.9-2.1.9Zm0-4.5V43h22v-1.5Zm0-3h22v-29H13Zm0-32h22V5H13Zm0 0V5v1.5Zm0 35V43Z" - })) - }, - lightbulbCircle: { - label: _x('Lightbulb Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 38q.9 0 1.6-.575.7-.575.85-1.425h-4.9q.2.85.875 1.425Q23.1 38 24 38Zm-6-5.5h12v-2H18Zm.05-4.5h11.9q1.85-1.35 2.95-3.425Q34 22.5 34 20q0-4.15-2.925-7.075T24 10q-4.15 0-7.075 2.925T14 20q0 2.5 1.1 4.575T18.05 28Zm.7-2q-1.3-1.25-2.025-2.825Q16 21.6 16 20q0-3.3 2.35-5.65Q20.7 12 24 12q3.3 0 5.65 2.35Q32 16.7 32 20q0 1.6-.725 3.175Q30.55 24.75 29.25 26ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" - })) - }, - privacyTip: { - label: _x('Privacy Tip', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.5 33.8h3V20.95h-3ZM24 17.65q.7 0 1.2-.5t.5-1.2q0-.7-.5-1.2t-1.2-.5q-.7 0-1.2.5t-.5 1.2q0 .7.5 1.2t1.2.5Zm0 26.3q-7-1.75-11.5-8.125T8 21.85V9.95l16-6 16 6v11.9q0 7.6-4.5 13.975T24 43.95Zm0-3.1q5.75-1.9 9.375-7.175T37 21.85v-9.8l-13-4.9-13 4.9v9.8q0 6.55 3.625 11.825Q18.25 38.95 24 40.85ZM24 24Z" - })) - }, - psychologyAlt: { - label: _x('Psychology Alt', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M25.05 27.9q.6 0 1-.4t.4-1q0-.6-.4-1t-1-.4q-.6 0-1 .4t-.4 1q0 .6.4 1t1 .4Zm-.95-4.5H26q0-.75.125-1.125t.575-.925q.2-.2.45-.5t.5-.55q.7-.8 1-1.425.3-.625.3-1.325 0-1.55-1.025-2.5T25.2 14.1q-1.45 0-2.525.725T21.15 16.85l1.75.7q.25-.85.85-1.275.6-.425 1.35-.425.85 0 1.4.525.55.525.55 1.325 0 .45-.225.875t-.725.925q-.4.4-.775.7-.375.3-.625.7-.3.45-.45 1.025-.15.575-.15 1.475ZM18.45 42v-6.35H14.9q-1.2 0-2.1-.9-.9-.9-.9-2.1V27.1h-2q-1 0-1.5-.925t.05-1.975L11.9 18q1.3-5.45 5.125-8.725Q20.85 6 26 6q5.75 0 9.875 4.125T40 20q0 4.25-2.35 7.5t-6.4 5.2V42Zm3-3h6.8v-8.25l1.4-.65Q33 28.55 35 25.875 37 23.2 37 20q0-4.55-3.225-7.775Q30.55 9 26 9q-4.45 0-7.575 2.975T15.05 18.6L12 24.1h2.9v8.55h6.55Zm3.05-15Z" - })) - }, - helpCenter: { - label: _x('Help Center', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M23.85 35.7q.8 0 1.35-.55t.55-1.35q0-.8-.55-1.35t-1.35-.55q-.8 0-1.35.55t-.55 1.35q0 .8.55 1.35t1.35.55Zm-1.65-7.4h2.85q0-1.55.5-2.525.5-.975 1.75-2.225 1.65-1.65 2.3-2.925.65-1.275.65-2.675 0-2.65-1.7-4.2-1.7-1.55-4.6-1.55-2.55 0-4.375 1.225Q17.75 14.65 16.9 16.8l2.65 1.1q.7-1.4 1.8-2.125 1.1-.725 2.6-.725 1.6 0 2.525.8.925.8.925 2.2 0 1-.55 1.925T25 22.15q-1.85 1.75-2.325 3-.475 1.25-.475 3.15ZM9 42q-1.2 0-2.1-.9Q6 40.2 6 39V9q0-1.2.9-2.1Q7.8 6 9 6h30q1.2 0 2.1.9.9.9.9 2.1v30q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h30V9H9v30ZM9 9v30V9Z" - })) - }, - quiz: { - label: _x('Quiz', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M27.15 31q.85 0 1.45-.6t.6-1.45q0-.85-.6-1.45t-1.45-.6q-.85 0-1.45.6t-.6 1.45q0 .85.6 1.45t1.45.6Zm-1.25-6.3h2.35q.1-1.45.425-2.15.325-.7 1.625-1.95 1.35-1.3 1.875-2.275.525-.975.525-2.275 0-2.3-1.575-3.75Q29.55 10.85 27 10.85q-1.9 0-3.4 1.025t-2.2 2.875l2.25.95q.55-1.25 1.375-1.9.825-.65 1.975-.65 1.5 0 2.425.85.925.85.925 2.15 0 1-.45 1.75t-1.6 1.6q-1.6 1.45-2 2.325-.4.875-.4 2.875ZM13 38q-1.2 0-2.1-.9-.9-.9-.9-2.1V7q0-1.2.9-2.1.9-.9 2.1-.9h28q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h28V7H13v28Zm-6 9q-1.2 0-2.1-.9Q4 42.2 4 41V10h3v31h31v3Zm6-37v28V7Z" - })) - }, - barChart: { - label: _x('Bar Chart', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M8 40V18h7v22Zm12.5 0V8h7v32ZM33 40V26h7v14Z" - })) - }, - insights: { - label: _x('Insights', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M5.5 40.5q-1.45 0-2.475-1.025Q2 38.45 2 37q0-1.45 1.025-2.475Q4.05 33.5 5.5 33.5q.25 0 .5.025t.65.125l10-10q-.1-.4-.125-.65-.025-.25-.025-.5 0-1.45 1.025-2.475Q18.55 19 20 19q1.45 0 2.475 1.025Q23.5 21.05 23.5 22.5q0 .1-.15 1.15l5.5 5.5q.4-.1.65-.125.25-.025.5-.025t.5.025q.25.025.65.125l8-8q-.1-.4-.125-.65Q39 20.25 39 20q0-1.45 1.025-2.475Q41.05 16.5 42.5 16.5q1.45 0 2.475 1.025Q46 18.55 46 20q0 1.45-1.025 2.475Q43.95 23.5 42.5 23.5q-.25 0-.5-.025t-.65-.125l-8 8q.1.4.125.65.025.25.025.5 0 1.45-1.025 2.475Q31.45 36 30 36q-1.45 0-2.475-1.025Q26.5 33.95 26.5 32.5q0-.25.025-.5t.125-.65l-5.5-5.5q-.4.1-.65.125-.25.025-.5.025-.1 0-1.15-.15l-10 10q.1.4.125.65.025.25.025.5 0 1.45-1.025 2.475Q6.95 40.5 5.5 40.5ZM8 18.4l-1-2.2-2.2-1 2.2-1L8 12l1 2.2 2.2 1-2.2 1Zm22-2.55-1.55-3.3-3.3-1.55 3.3-1.55L30 6.15l1.55 3.3 3.3 1.55-3.3 1.55Z" - })) - }, - questionMark: { - label: _x('Star', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M21.55 31.5q.05-3.6.825-5.25.775-1.65 2.925-3.6 2.1-1.9 3.225-3.525t1.125-3.475q0-2.25-1.5-3.75t-4.2-1.5q-2.6 0-4 1.475T17.9 14.95l-4.2-1.85q1.1-2.95 3.725-5.025T23.95 6q5 0 7.7 2.775t2.7 6.675q0 2.4-1.025 4.35-1.025 1.95-3.275 4.1-2.45 2.35-2.95 3.6t-.55 4Zm2.4 12.5q-1.45 0-2.475-1.025Q20.45 41.95 20.45 40.5q0-1.45 1.025-2.475Q22.5 37 23.95 37q1.45 0 2.475 1.025Q27.45 39.05 27.45 40.5q0 1.45-1.025 2.475Q25.4 44 23.95 44Z" - })) - }, - lightbulb: { - label: _x('Lightbulb', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 44q-1.7 0-2.875-1.175T19.95 39.95h8.1q0 1.7-1.175 2.875T24 44Zm-8.1-7.15v-3h16.2v3Zm.25-6.05q-3.3-2.15-5.225-5.375Q9 22.2 9 18.15q0-6.1 4.45-10.55Q17.9 3.15 24 3.15q6.1 0 10.55 4.45Q39 12.05 39 18.15q0 4.05-1.9 7.275-1.9 3.225-5.25 5.375Zm1.1-3H30.8q2.4-1.6 3.8-4.15 1.4-2.55 1.4-5.5 0-4.95-3.525-8.475Q28.95 6.15 24 6.15q-4.95 0-8.475 3.525Q12 13.2 12 18.15q0 2.95 1.4 5.5t3.85 4.15Zm6.75 0Z" - })) - }, - contactSupport: { - label: _x('Contact Support', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m25.75 44-.5-5.5h-2q-7.15 0-12.2-5.05Q6 28.4 6 21.25q0-7.15 5.075-12.2Q16.15 4 23.35 4q3.55 0 6.575 1.275Q32.95 6.55 35.2 8.85q2.25 2.3 3.525 5.425T40 21.1q0 3.3-.975 6.6T36.2 34q-1.85 3-4.5 5.55T25.75 44Zm2.5-5.4q4.1-3.45 6.425-8.125T37 21.1q0-6.2-3.875-10.15T23.35 7q-6 0-10.175 4.175Q9 15.35 9 21.25q0 5.9 4.175 10.075Q17.35 35.5 23.25 35.5h5Zm-4.9-5.75q.8 0 1.35-.55t.55-1.35q0-.8-.55-1.35t-1.35-.55q-.8 0-1.35.55t-.55 1.35q0 .8.55 1.35t1.35.55ZM22 26.05h2.5q0-1.25.425-2.075.425-.825 1.775-2.175 1.35-1.35 1.9-2.475.55-1.125.55-2.425 0-2.25-1.525-3.7-1.525-1.45-4.075-1.45-2.1 0-3.75 1.1t-2.45 3l2.3.95q.55-1.3 1.525-1.925.975-.625 2.225-.625 1.5 0 2.35.725.85.725.85 1.925 0 .95-.55 1.925-.55.975-1.95 2.425-1.35 1.4-1.725 2.25-.375.85-.375 2.55Zm1-3.25Z" - })) - }, - tipsUpdates: { - label: _x('Tips and Updates', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m44.35 19.65-1.15-2.5L40.7 16l2.5-1.15 1.15-2.5 1.15 2.5L48 16l-2.5 1.15ZM38 10.9l-1.75-3.7-3.7-1.75 3.7-1.75L38 0l1.75 3.7 3.7 1.75-3.7 1.75ZM18 44q-1.7 0-2.875-1.175T13.95 39.95h8.1q0 1.7-1.175 2.875T18 44Zm-8.1-7.15v-3h16.2v3Zm.25-6.05q-3.3-2.15-5.225-5.375Q3 22.2 3 18.15q0-6.1 4.45-10.55Q11.9 3.15 18 3.15q6.1 0 10.55 4.45Q33 12.05 33 18.15q0 4.05-1.9 7.275-1.9 3.225-5.25 5.375Zm1.1-3H24.8q2.4-1.6 3.8-4.15 1.4-2.55 1.4-5.5 0-4.95-3.525-8.475Q22.95 6.15 18 6.15q-4.95 0-8.475 3.525Q6 13.2 6 18.15q0 2.95 1.4 5.5t3.85 4.15Zm6.75 0Z" - })) - }, - trendingUp: { - label: _x('Trending Up', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M6.15 36 4 33.85 18.6 19.3l8.35 8.35L39 15.6h-6.35v-3H44v11.35h-2.95V17.8L26.9 31.95l-8.35-8.35Z" - })) - }, - help: { - label: _x('Help', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24.2 35.65q.8 0 1.35-.55t.55-1.35q0-.8-.55-1.35t-1.35-.55q-.8 0-1.35.55t-.55 1.35q0 .8.55 1.35t1.35.55Zm-1.75-7.3h2.95q0-1.3.325-2.375T27.75 23.5q1.55-1.3 2.2-2.55.65-1.25.65-2.75 0-2.65-1.725-4.25t-4.575-1.6q-2.45 0-4.325 1.225T17.25 16.95l2.65 1q.55-1.4 1.65-2.175 1.1-.775 2.6-.775 1.7 0 2.75.925t1.05 2.375q0 1.1-.65 2.075-.65.975-1.9 2.025-1.5 1.3-2.225 2.575-.725 1.275-.725 3.375ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" - })) - }, - info: { - label: _x('Info', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.65 34h3V22h-3ZM24 18.3q.7 0 1.175-.45.475-.45.475-1.15t-.475-1.2Q24.7 15 24 15q-.7 0-1.175.5-.475.5-.475 1.2t.475 1.15q.475.45 1.175.45ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" - })) - }, - settings: { - label: _x('Settings', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m19.4 44-1-6.3q-.95-.35-2-.95t-1.85-1.25l-5.9 2.7L4 30l5.4-3.95q-.1-.45-.125-1.025Q9.25 24.45 9.25 24q0-.45.025-1.025T9.4 21.95L4 18l4.65-8.2 5.9 2.7q.8-.65 1.85-1.25t2-.9l1-6.35h9.2l1 6.3q.95.35 2.025.925Q32.7 11.8 33.45 12.5l5.9-2.7L44 18l-5.4 3.85q.1.5.125 1.075.025.575.025 1.075t-.025 1.05q-.025.55-.125 1.05L44 30l-4.65 8.2-5.9-2.7q-.8.65-1.825 1.275-1.025.625-2.025.925l-1 6.3ZM24 30.5q2.7 0 4.6-1.9 1.9-1.9 1.9-4.6 0-2.7-1.9-4.6-1.9-1.9-4.6-1.9-2.7 0-4.6 1.9-1.9 1.9-1.9 4.6 0 2.7 1.9 4.6 1.9 1.9 4.6 1.9Zm0-3q-1.45 0-2.475-1.025Q20.5 25.45 20.5 24q0-1.45 1.025-2.475Q22.55 20.5 24 20.5q1.45 0 2.475 1.025Q27.5 22.55 27.5 24q0 1.45-1.025 2.475Q25.45 27.5 24 27.5Zm0-3.5Zm-2.2 17h4.4l.7-5.6q1.65-.4 3.125-1.25T32.7 32.1l5.3 2.3 2-3.6-4.7-3.45q.2-.85.325-1.675.125-.825.125-1.675 0-.85-.1-1.675-.1-.825-.35-1.675L40 17.2l-2-3.6-5.3 2.3q-1.15-1.3-2.6-2.175-1.45-.875-3.2-1.125L26.2 7h-4.4l-.7 5.6q-1.7.35-3.175 1.2-1.475.85-2.625 2.1L10 13.6l-2 3.6 4.7 3.45q-.2.85-.325 1.675-.125.825-.125 1.675 0 .85.125 1.675.125.825.325 1.675L8 30.8l2 3.6 5.3-2.3q1.2 1.2 2.675 2.05Q19.45 35 21.1 35.4Z" - })) - }, - checkbox: { - label: _x('Checkbox', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M20.95 31.95 35.4 17.5l-2.15-2.15-12.3 12.3L15 21.7l-2.15 2.15ZM9 42q-1.2 0-2.1-.9Q6 40.2 6 39V9q0-1.2.9-2.1Q7.8 6 9 6h30q1.2 0 2.1.9.9.9.9 2.1v30q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h30V9H9v30ZM9 9v30V9Z" - })) - }, - taskalt: { - label: _x('Task Alt', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 44q-4.25 0-7.9-1.525-3.65-1.525-6.35-4.225-2.7-2.7-4.225-6.35Q4 28.25 4 24q0-4.2 1.525-7.85Q7.05 12.5 9.75 9.8q2.7-2.7 6.35-4.25Q19.75 4 24 4q3.75 0 7 1.2t5.85 3.3l-2.15 2.15q-2.2-1.75-4.9-2.7Q27.1 7 24 7q-7.25 0-12.125 4.875T7 24q0 7.25 4.875 12.125T24 41q7.25 0 12.125-4.875T41 24q0-1.5-.225-2.925-.225-1.425-.675-2.775l2.3-2.3q.8 1.85 1.2 3.85.4 2 .4 4.15 0 4.25-1.55 7.9-1.55 3.65-4.25 6.35-2.7 2.7-6.35 4.225Q28.2 44 24 44Zm-2.95-10.9-8.25-8.3 2.25-2.25 6 6 20.7-20.7 2.3 2.25Z" - })) - }, - checkcircle: { - label: _x('Check Circle', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" - })) - }, - doneall: { - label: _x('Done All', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M14.7 35.9 3.5 24.7l2.15-2.15 9.05 9.05 2.15 2.15Zm8.5 0L12 24.7l2.15-2.15 9.05 9.05 19.2-19.2 2.15 2.15Zm0-8.5-2.15-2.15L33.9 12.4l2.15 2.15Z" - })) - }, - done: { - label: _x('Done', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M18.9 35.7 7.7 24.5l2.15-2.15 9.05 9.05 19.2-19.2 2.15 2.15Z" - })) - }, - task: { - label: _x('Task', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M21.7 35.25 33.15 23.8l-1.95-1.95-9.5 9.5-5.15-5.15-1.95 1.95ZM11 44q-1.2 0-2.1-.9Q8 42.2 8 41V7q0-1.2.9-2.1Q9.8 4 11 4h18.05L40 14.95V41q0 1.2-.9 2.1-.9.9-2.1.9Zm16.55-27.7V7H11v34h26V16.3ZM11 7v9.3V7v34V7Z" - })) - }, - verified: { - label: _x('Verified', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: 48, - width: 48, - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m17.3 45-3.8-6.5-7.55-1.55.85-7.35L2 24l4.8-5.55-.85-7.35 7.55-1.55L17.3 3 24 6.1 30.7 3l3.85 6.55 7.5 1.55-.85 7.35L46 24l-4.8 5.6.85 7.35-7.5 1.55L30.7 45 24 41.9Zm1.35-3.95L24 38.8l5.5 2.25 3.35-5 5.85-1.5-.6-5.95 4.05-4.6-4.05-4.7.6-5.95-5.85-1.4-3.45-5L24 9.2l-5.5-2.25-3.35 5-5.85 1.4.6 5.95L5.85 24l4.05 4.6-.6 6.05 5.85 1.4ZM24 24Zm-2.15 6.65L33.2 19.4l-2.25-2.05-9.1 9-4.75-4.95-2.3 2.25Z" - })) - }, - heart: { - label: _x('Heart', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m24 41.95-2.05-1.85q-5.3-4.85-8.75-8.375-3.45-3.525-5.5-6.3T4.825 20.4Q4 18.15 4 15.85q0-4.5 3.025-7.525Q10.05 5.3 14.5 5.3q2.85 0 5.275 1.35Q22.2 8 24 10.55q2.1-2.7 4.45-3.975T33.5 5.3q4.45 0 7.475 3.025Q44 11.35 44 15.85q0 2.3-.825 4.55T40.3 25.425q-2.05 2.775-5.5 6.3T26.05 40.1ZM24 38q5.05-4.65 8.325-7.975 3.275-3.325 5.2-5.825 1.925-2.5 2.7-4.45.775-1.95.775-3.9 0-3.3-2.1-5.425T33.5 8.3q-2.55 0-4.75 1.575T25.2 14.3h-2.45q-1.3-2.8-3.5-4.4-2.2-1.6-4.75-1.6-3.3 0-5.4 2.125Q7 12.55 7 15.85q0 1.95.775 3.925.775 1.975 2.7 4.5Q12.4 26.8 15.7 30.1 19 33.4 24 38Zm0-14.85Z" - })) - }, - star: { - label: _x('Star', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m16.15 37.75 7.85-4.7 7.85 4.75-2.1-8.9 6.9-6-9.1-.8L24 13.7l-3.55 8.35-9.1.8 6.9 6ZM11.65 44l3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55ZM24 26.25Z" - })) - }, - emergencyHome: { - label: _x('Emergency Home', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M26.1 43.6q-.85.85-2.1.85t-2.1-.85L4.4 26.1q-.85-.85-.85-2.1t.85-2.1L21.9 4.4q.85-.85 2.1-.85t2.1.85l17.5 17.5q.85.85.85 2.1t-.85 2.1ZM24 41.45 41.45 24 24 6.55 6.55 24 24 41.45ZM22.5 26h3V14h-3Zm1.5 5.5q.6 0 1.05-.45.45-.45.45-1.05 0-.6-.45-1.05-.45-.45-1.05-.45-.6 0-1.05.45-.45.45-.45 1.05 0 .6.45 1.05.45.45 1.05.45Zm0-7.5Z" - })) - }, - settingsAlert: { - label: _x('Settings Alert', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "m19.4 44-1-6.3q-.95-.35-2-.95t-1.85-1.25l-5.9 2.7L4 30l5.4-3.95q-.1-.45-.125-1.025Q9.25 24.45 9.25 24q0-.45.025-1.025T9.4 21.95L4 18l4.65-8.2 5.9 2.7q.8-.65 1.85-1.25t2-.9l1-6.35h9.2l1 6.3q.95.35 2.025.925Q32.7 11.8 33.45 12.5l5.9-2.7L44 18l-5.4 3.85q.1.5.125 1.075.025.575.025 1.075t-.025 1.05q-.025.55-.125 1.05L44 30l-4.65 8.2-5.9-2.7q-.8.65-1.825 1.275-1.025.625-2.025.925l-1 6.3Zm2.4-3h4.4l.7-5.6q1.65-.4 3.125-1.25T32.7 32.1l5.3 2.3 2-3.6-4.7-3.45q.2-.85.325-1.675.125-.825.125-1.675 0-.85-.1-1.675-.1-.825-.35-1.675L40 17.2l-2-3.6-5.3 2.3q-1.15-1.3-2.6-2.175-1.45-.875-3.2-1.125L26.2 7h-4.4l-.7 5.6q-1.7.35-3.175 1.2-1.475.85-2.625 2.1L10 13.6l-2 3.6 4.7 3.45q-.2.85-.325 1.675-.125.825-.125 1.675 0 .85.125 1.675.125.825.325 1.675L8 30.8l2 3.6 5.3-2.3q1.2 1.2 2.675 2.05Q19.45 35 21.1 35.4Zm2.2-9.5q.65 0 1.075-.425.425-.425.425-1.075 0-.65-.425-1.075Q24.65 28.5 24 28.5q-.65 0-1.075.425Q22.5 29.35 22.5 30q0 .65.425 1.075.425.425 1.075.425ZM22.5 26h3V16h-3Zm1.5-2Z" - })) - }, - nearbyError: { - label: _x('Nearby Error', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M40.75 37.35V20.2h3v17.15Zm1.5 7q-.7 0-1.225-.525Q40.5 43.3 40.5 42.6q0-.7.525-1.225.525-.525 1.225-.525.7 0 1.225.525Q44 41.9 44 42.6q0 .7-.525 1.225-.525.525-1.225.525ZM24 43.85q-.55 0-1.1-.25t-1-.65L5.05 26.1q-.4-.45-.625-1.025Q4.2 24.5 4.2 23.95q0-.6.225-1.15.225-.55.625-.95l16.9-16.9q.45-.45 1-.65t1.1-.2q.55 0 1.1.2t.95.65L37.75 16.6v5.5L24 8.35 8.35 24 24 39.65 37.75 25.9v5.45l-11.6 11.6q-.45.45-1.025.675-.575.225-1.125.225Zm0-8.7L12.85 24 24 12.85 35.15 24Z" - })) - }, - circleNotifications: { - label: _x('Circle Notifications', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 37.2q1.15 0 1.975-.85.825-.85.825-2h-5.65q0 1.15.85 2 .85.85 2 .85Zm-9.7-5.85h19.35v-3h-2V22.6q0-3.05-1.575-5.55T25.65 14v-1.5q0-.7-.475-1.175Q24.7 10.85 24 10.85q-.7 0-1.2.475t-.5 1.175V14q-2.85.55-4.425 2.95-1.575 2.4-1.575 5.35v6.05h-2ZM24 44q-4.25 0-7.9-1.525-3.65-1.525-6.35-4.225-2.7-2.7-4.225-6.35Q4 28.25 4 24q0-4.2 1.525-7.85Q7.05 12.5 9.75 9.8q2.7-2.7 6.35-4.25Q19.75 4 24 4q4.2 0 7.85 1.55Q35.5 7.1 38.2 9.8q2.7 2.7 4.25 6.35Q44 19.8 44 24q0 4.25-1.55 7.9-1.55 3.65-4.25 6.35-2.7 2.7-6.35 4.225Q28.2 44 24 44Zm0-3q7.25 0 12.125-4.875T41 24q0-7.25-4.875-12.125T24 7q-7.25 0-12.125 4.875T7 24q0 7.25 4.875 12.125T24 41Zm-4.7-12.65V22q0-2.05 1.325-3.475Q21.95 17.1 24 17.1t3.35 1.425q1.3 1.425 1.3 3.475v6.35ZM24 24Z" - })) - }, - exclamation: { - label: _x('Exclamation', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.5 29V10h3v19Zm0 9v-3h3v3Z" - })) - }, - notificationImportant: { - label: _x('Notification Important', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.5 26.6h3V16h-3ZM24 32q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 28.7 24 28.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 32 24 32ZM8 38v-3h4.2V19.7q0-4.2 2.475-7.475Q17.15 8.95 21.2 8.1V6.65q0-1.15.825-1.9T24 4q1.15 0 1.975.75.825.75.825 1.9V8.1q4.05.85 6.55 4.125t2.5 7.475V35H40v3Zm16-14.75ZM24 44q-1.6 0-2.8-1.175Q20 41.65 20 40h8q0 1.65-1.175 2.825Q25.65 44 24 44Zm-8.8-9h17.65V19.7q0-3.7-2.55-6.3-2.55-2.6-6.25-2.6t-6.275 2.6Q15.2 16 15.2 19.7Z" - })) - }, - report: { - label: _x('Report', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 33.95q.7 0 1.225-.525.525-.525.525-1.225 0-.7-.525-1.225Q24.7 30.45 24 30.45q-.7 0-1.225.525-.525.525-.525 1.225 0 .7.525 1.225.525.525 1.225.525Zm-1.5-7.2h3V13.6h-3ZM16.5 42 6 31.5v-15L16.5 6h15L42 16.5v15L31.5 42Zm1.25-3h12.5L39 30.25v-12.5L30.25 9h-12.5L9 17.75v12.5ZM24 24Z" - })) - }, - highPriority: { - label: _x('High Priority', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 42q-1.45 0-2.475-1.025Q20.5 39.95 20.5 38.5q0-1.45 1.025-2.475Q22.55 35 24 35q1.45 0 2.475 1.025Q27.5 37.05 27.5 38.5q0 1.45-1.025 2.475Q25.45 42 24 42Zm-3.5-12V6h7v24Z" - })) - }, - campaign: { - label: _x('Campaign', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M36.5 25.5v-3H44v3ZM39 40l-6.05-4.5 1.8-2.4 6.05 4.5Zm-4.1-25.15-1.8-2.4L39 8l1.8 2.4ZM10.5 38v-8H7q-1.25 0-2.125-.875T4 27v-6q0-1.25.875-2.125T7 18h9l10-6v24l-10-6h-2.5v8ZM28 30.7V17.3q1.35 1.2 2.175 2.925Q31 21.95 31 24t-.825 3.775Q29.35 29.5 28 30.7ZM7 21v6h9.8l6.2 3.7V17.3L16.8 21Zm8 3Z" - })) - }, - notificationsActive: { - label: _x('Notifications Active', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M6.2 19.65q0-4.05 1.7-7.675T12.75 5.8l2.05 2.25q-2.65 2.15-4.125 5.175T9.2 19.65Zm32.65 0q0-3.4-1.4-6.425T33.4 8.05l2.05-2.25q3.1 2.6 4.75 6.2t1.65 7.65ZM8 38v-3h4.2V19.7q0-4.2 2.475-7.475Q17.15 8.95 21.2 8.1V6.65q0-1.15.825-1.9T24 4q1.15 0 1.975.75.825.75.825 1.9V8.1q4.05.85 6.55 4.125t2.5 7.475V35H40v3Zm16-14.75ZM24 44q-1.6 0-2.8-1.175Q20 41.65 20 40h8q0 1.65-1.175 2.825Q25.65 44 24 44Zm-8.8-9h17.65V19.7q0-3.7-2.55-6.3-2.55-2.6-6.25-2.6t-6.275 2.6Q15.2 16 15.2 19.7Z" - })) - }, - error: { - label: _x('Error', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M24 34q.7 0 1.175-.475.475-.475.475-1.175 0-.7-.475-1.175Q24.7 30.7 24 30.7q-.7 0-1.175.475-.475.475-.475 1.175 0 .7.475 1.175Q23.3 34 24 34Zm-1.35-7.65h3V13.7h-3ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" - })) - }, - warning: { - label: _x('Warning', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 42 24 4l22 38Zm5.2-3h33.6L24 10Zm17-2.85q.65 0 1.075-.425.425-.425.425-1.075 0-.65-.425-1.075-.425-.425-1.075-.425-.65 0-1.075.425Q22.7 34 22.7 34.65q0 .65.425 1.075.425.425 1.075.425Zm-1.5-5.55h3V19.4h-3Zm1.3-6.1Z" - })) - } -}, "info", { - label: _x('Info', 'label', 'alerts-dlx'), - icon: /*#__PURE__*/React.createElement("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "48", - width: "48", - viewBox: "0 0 48 48" - }, /*#__PURE__*/React.createElement("path", { - d: "M22.65 34h3V22h-3ZM24 18.3q.7 0 1.175-.45.475-.45.475-1.15t-.475-1.2Q24.7 15 24 15q-.7 0-1.175.5-.475.5-.475 1.2t.475 1.15q.475.45 1.175.45ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z" - })) -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (svgs); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/MaterialIconsLogo.js": -/*!*************************************************************!*\ - !*** ./src/js/blocks/components/icons/MaterialIconsLogo.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } -// eslint-disable-next-line no-unused-vars - -var MaterialIconsLogo = function MaterialIconsLogo(props) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ - xmlns: "http://www.w3.org/2000/svg", - width: 48, - height: 48, - viewBox: "0 0 48 48" - }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#29b6f6", - d: "m1 5 6 4v20l-6-4z" - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#0288d1", - d: "m47 20-6 4v13l6-4zM47 6l-6 4v7l6-4zM35 5l-6 4v20l6-4z" - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#29b6f6", - d: "m1 12 17 11v-7L1 5z" - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#0288d1", - d: "M35 12 18 23v-7L35 5zM35 26 18 37v-7l17-11zM47 34 30 45v-7l17-11z" - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#29b6f6", - d: "M30 37.765 18 30v7l12 7.765z" - })); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MaterialIconsLogo); - -/***/ }), - -/***/ "./src/js/blocks/components/icons/ShoelaceLogo.js": -/*!********************************************************!*\ - !*** ./src/js/blocks/components/icons/ShoelaceLogo.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } -// eslint-disable-next-line no-unused-vars - -var ShoelaceLogo = function ShoelaceLogo(props) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 127 141" - }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { - fill: "#0ea5e9", - fillRule: "nonzero", - d: "M102.375 90.85a14.728 14.728 0 0 0 1.775-1.024l2.275-1.325a96.104 96.104 0 0 0 2.375-1.851l.15-.149c.933-.934 1.966-1.384 3.1-1.351.5 0 1.083.134 1.75.4l8.5-7.55c.233-.2.467-.367.7-.5h.05c.9-.533 1.65-.5 2.25.1 1.067.566 1.15 1.533.25 2.9l-8.9 7.899c.067.134.1.267.1.4.133.6.083 1.2-.15 1.8-.2.4-.483.783-.85 1.15-.371.396-.754.779-1.15 1.149l-5.15 3.75c-.46.322-.927.622-1.4.9-.59.358-1.19.684-1.8.975-.265.121-.532.237-.8.351a19.27 19.27 0 0 1-5 1.375c-.8 6.733-3.1 12.934-6.9 18.6-4.8 7.066-11.367 12.45-19.7 16.15-8.3 3.7-17.283 5.55-26.95 5.55-13.333-.134-24.15-3.134-32.45-9C4.817 124.75 0 115.7 0 104.399v-1.55c.333-7.7 2.6-15 6.8-21.899 4.133-6.834 10.183-11.45 18.15-13.85 4.1-1.2 8.216-1.8 12.35-1.8 4.267 0 8.667.783 13.2 2.35 4.533 1.566 9.65 4.266 15.35 8.1L80.7 85.7c4.133 2.699 7.9 4.533 11.3 5.5-.7-6.9-3.2-12.801-7.5-17.7-4.3-4.967-9.783-8.6-16.45-10.9l-6.4-2.2c-5.867-2.067-10.233-4.1-13.1-6.1-7.733-5.233-12.033-12.417-12.9-21.55l-.15-2.7c0-8.8 3.567-16.167 10.7-22.1C52.567 2.65 60.133 0 68.9 0c6.6 0 12.517 1.9 17.75 5.7 5.267 3.833 8.25 9.267 8.95 16.3l.15 2.75c0 5.1-1.317 9.466-3.95 13.1-2.7 3.633-5.083 5.45-7.15 5.45a8.187 8.187 0 0 1-1.225-.175L74.1 51.9c-1.5.833-2.517.683-3.05-.45-.533-.6-.483-1.35.15-2.25l.05-.05c.133-.2.317-.417.55-.65l8.675-8.225a6.586 6.586 0 0 1-.175-1.325c0-1.133.45-2.083 1.35-2.85 3.8-3.4 5.7-7.316 5.7-11.75 0-4.4-1.667-8.1-5-11.1s-7.883-4.534-13.65-4.6c-7.2 0-13.117 2.167-17.75 6.5-4.633 4.333-6.95 9.533-6.95 15.6 0 4.9 1.883 9.316 5.65 13.25 3.733 3.9 9.5 6.966 17.3 9.2 10.933 3.167 19.283 8.5 25.05 16 5.133 6.633 8 14.083 8.6 22.35a12.692 12.692 0 0 0 1.775-.7ZM71.95 49.05c0 .3.167.45.5.45.033 0 2.667-2.434 7.9-7.3 0-.667-1.4.25-4.2 2.75-2.8 2.533-4.2 3.9-4.2 4.1Zm2.2 1.75c0-.267-.133-.4-.4-.4-.3 0-.567.15-.8.45-.534-.033-.917.034-1.15.2-.1.067-.15.133-.15.2 0 .2.133.35.4.45h.9c.8-.3 1.2-.6 1.2-.9Zm6.2-5.45c0-.767-.45-.767-1.35 0-.433.4-.983.967-1.65 1.7-.233.167-.717.617-1.45 1.35-.767.8-1.15 1.283-1.15 1.45l.05.35c.2.067.333.1.4.1.033 0 .9-.8 2.6-2.4 1.7-1.6 2.55-2.45 2.55-2.55ZM124.2 78.3l-8.4 7.4c.5.267.867.649 1.1 1.149l8.3-7.399c.066-.334.017-.601-.15-.801-.167-.132-.45-.25-.85-.349Zm-.45-.25-.2-.2-7.4 6 .45.55 7.15-6.35Zm-31.9 21.849c-2.2-.566-4.233-1.25-6.1-2.05-4.2-1.7-9.417-4.666-15.65-8.899L59.85 82c-4.333-2.767-8.283-4.834-11.85-6.2-3.6-1.333-7.133-2-10.6-2h-1.5c-8.833.467-15.7 3.783-20.6 9.95-4.566 5.7-6.85 12.434-6.85 20.2 0 8.733 3.5 15.566 10.5 20.5 6.966 4.966 16.517 7.449 28.65 7.449 9.533 0 17.566-1.699 24.1-5.1 6.5-3.4 11.55-7.9 15.15-13.5 2.7-4.266 4.367-8.733 5-13.4Z" - })); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoelaceLogo); - -/***/ }), - -/***/ "./src/js/blocks/components/unit-picker/index.js": -/*!*******************************************************!*\ - !*** ./src/js/blocks/components/unit-picker/index.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editor.scss */ "./src/js/blocks/components/unit-picker/editor.scss"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/** - * Unit Picker Component. - * Credit: Forked from @GenerateBlocks - */ - - - - -var UnitChooser = function UnitChooser(props) { - var label = props.label, - value = props.value, - _onClick = props.onClick, - units = props.units; - return /*#__PURE__*/React.createElement("div", { - className: "components-has-units-control-header__units" - }, /*#__PURE__*/React.createElement("div", { - className: "components-has-units-control-label__units" - }, label), /*#__PURE__*/React.createElement("div", { - className: "components-has-control__units" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ButtonGroup, { - className: "components-has-control-buttons__units", - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Units', 'quotes-dlx') - }, units.map(function (unit) { - var unitName = unit; - if ('px' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('Pixel', 'A size unit for CSS markup', 'quotes-dlx'); - } - if ('em' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('Em', 'A size unit for CSS markup', 'quotes-dlx'); - } - if ('%' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('Percentage', 'A size unit for CSS markup', 'quotes-dlx'); - } - if ('vw' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('View Width', 'A size unit for CSS markup', 'quotes-dlx'); - } - if ('rem' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('Rem', 'A size unit for CSS markup', 'quotes-dlx'); - } - if ('deg' === unit) { - unitName = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__._x)('Degree', 'A size unit for CSS markup', 'quotes-dlx'); - } - return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, { - text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: Unit type (px, em, %) */ - (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('%s Units', 'quotes-dlx'), unitName), - key: unit - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { - key: unit, - className: 'components-has-control-button__units--' + unit, - isSmall: true, - isPrimary: value === unit, - "aria-pressed": value === unit, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.sprintf)( /* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */ - (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('%s Units', 'quotes-dlx'), unitName), - onClick: function onClick() { - return _onClick(unit); - } - }, unit)); - })))); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnitChooser); - -/***/ }), - -/***/ "./src/js/blocks/material/colors.js": -/*!******************************************!*\ - !*** ./src/js/blocks/material/colors.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -var materialColors = [{ - name: 'Success Color', - color: '#1e4620' -}, { - name: 'Success Color Accent', - color: '#295e2c' -}, { - name: 'Success Color Alt', - color: '#2e7d32' -}, { - name: 'Success Color Bold', - color: '#4caf50' -}, { - name: 'Success Color Light', - color: '#edf7ed' -}, { - name: 'Info Color', - color: '#014361' -}, { - name: 'Info Color Accent', - color: '#035e88' -}, { - name: 'Info Color Alt', - color: '#0277bd' -}, { - name: 'Info Color Bold', - color: '#03a9f4' -}, { - name: 'Info Color Light', - color: '#e5f6fd' -}, { - name: 'Warning Color', - color: '#663c00' -}, { - name: 'Warning Color Accent', - color: '#8c5e00' -}, { - name: 'Warning Color Alt', - color: '#ed6c02' -}, { - name: 'Warning Color Bold', - color: '#ff9800' -}, { - name: 'Warning Color Light', - color: '#fff4e5' -}, { - name: 'Error Color', - color: '#5f2120' -}, { - name: 'Error Color Accent', - color: '#8c2d2b' -}, { - name: 'Error Color Alt', - color: '#d32f2f' -}, { - name: 'Error Color Bold', - color: '#ef5350' -}, { - name: 'Error Color Light', - color: '#fdeded' -}]; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (materialColors); - -/***/ }), - -/***/ "./src/js/blocks/material/edit.js": -/*!****************************************!*\ - !*** ./src/js/blocks/material/edit.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _components_AlertButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/AlertButton */ "./src/js/blocks/components/AlertButton/index.js"); -/* harmony import */ var _components_unit_picker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/unit-picker */ "./src/js/blocks/components/unit-picker/index.js"); -/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../components/IconPicker */ "./src/js/blocks/components/IconPicker/index.js"); -/* harmony import */ var _components_icons_MaterialIcons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../components/icons/MaterialIcons */ "./src/js/blocks/components/icons/MaterialIcons.js"); -/* harmony import */ var _components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../components/CloseButtonIcons */ "./src/js/blocks/components/CloseButtonIcons/index.js"); -/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./colors */ "./src/js/blocks/material/colors.js"); -/* eslint-disable no-undef */ -/* eslint-disable no-unused-vars */ -/* eslint-disable camelcase */ -/** - * External dependencies - */ - - - - - - - - - - - - - - - -var MaterialAlerts = function MaterialAlerts(props) { - var generatedUniqueId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__.useInstanceId)(MaterialAlerts, 'adlx-material'); - var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store), - replaceInnerBlocks = _useDispatch.replaceInnerBlocks; - - // Shortcuts. - var attributes = props.attributes, - setAttributes = props.setAttributes, - clientId = props.clientId; - var uniqueId = attributes.uniqueId, - alertType = attributes.alertType, - alertTitle = attributes.alertTitle, - alertDescription = attributes.alertDescription, - buttonEnabled = attributes.buttonEnabled, - maximumWidthUnit = attributes.maximumWidthUnit, - maximumWidth = attributes.maximumWidth, - icon = attributes.icon, - descriptionEnabled = attributes.descriptionEnabled, - titleEnabled = attributes.titleEnabled, - iconEnabled = attributes.iconEnabled, - className = attributes.className, - baseFontSize = attributes.baseFontSize, - enableCustomFonts = attributes.enableCustomFonts, - variant = attributes.variant, - mode = attributes.mode, - enableDropShadow = attributes.enableDropShadow, - iconVerticalAlignment = attributes.iconVerticalAlignment, - colorPrimary = attributes.colorPrimary, - colorBorder = attributes.colorBorder, - colorAccent = attributes.colorAccent, - colorAlt = attributes.colorAlt, - colorBold = attributes.colorBold, - colorLight = attributes.colorLight, - closeButtonEnabled = attributes.closeButtonEnabled, - closeButtonExpiration = attributes.closeButtonExpiration, - innerBlocksEnabled = attributes.innerBlocksEnabled; - var innerBlocksRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); - var innerBlockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)({ - className: 'alerts-dlx-content', - ref: innerBlocksRef - }, { - allowedBlocks: innerBlocksEnabled ? true : ['core/paragraph'], - template: [['core/paragraph', { - placeholder: '' - }]], - renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InnerBlocks.DefaultBlockAppender - }); - var styles = "\n\t\t#".concat(uniqueId, " {\n\t\t\t--alerts-dlx-material-color-primary: ").concat(colorPrimary, ";\n\t\t\t--alerts-dlx-material-color-border: ").concat(colorBorder, ";\n\t\t\t--alerts-dlx-material-color-accent: ").concat(colorAccent, ";\n\t\t\t--alerts-dlx-material-color-alt: ").concat(colorAlt, ";\n\t\t\t--alerts-dlx-material-color-bold: ").concat(colorBold, ";\n\t\t\t--alerts-dlx-material-color-light: ").concat(colorLight, ";\n\t\t}"); - - /** - * Migrate RichText to InnerBlocks. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - // Port shareText attribute to use innerBlocks instead. - if (alertDescription !== '' && null !== innerBlocksRef.current) { - // Convert text over to blocks. - var richTextConvertedToBlocks = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__.rawHandler)({ - HTML: alertDescription - }); - replaceInnerBlocks(clientId, richTextConvertedToBlocks); - setAttributes({ - alertDescription: '' - }); - } - }, [innerBlocksRef]); - var inspectorControls = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert Settings', 'quotes-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Icon', 'alerts-dlx'), - checked: iconEnabled, - onChange: function onChange(value) { - setAttributes({ - iconEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Title', 'alerts-dlx'), - checked: titleEnabled, - onChange: function onChange(value) { - setAttributes({ - titleEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Description', 'alerts-dlx'), - checked: descriptionEnabled, - onChange: function onChange(value) { - setAttributes({ - descriptionEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Button', 'alerts-dlx'), - checked: buttonEnabled, - onChange: function onChange(value) { - setAttributes({ - buttonEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Close Button', 'alerts-dlx'), - checked: closeButtonEnabled, - onChange: function onChange(value) { - setAttributes({ - closeButtonEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the alert to be dismissible.', 'alerts-dlx') - })), closeButtonEnabled && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Close Button save expiration', 'alerts-dlx'), - value: closeButtonExpiration, - onChange: function onChange(value) { - setAttributes({ - closeButtonExpiration: parseInt(value) - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the expiration time in seconds for the close button to reappear. Set to zero to never expire.', 'alerts-dlx'), - type: 'number' - })))), 'custom' === alertType && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.PanelColorSettings, { - __experimentalIsRenderedInSidebar: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Color Settings', 'alerts-dlx'), - colorSettings: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Text Color', 'alerts-dlx'), - value: colorPrimary, - onChange: function onChange(value) { - setAttributes({ - colorPrimary: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Border Color', 'alerts-dlx'), - value: colorBorder, - onChange: function onChange(value) { - setAttributes({ - colorBorder: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accent Color', 'alerts-dlx'), - value: colorAccent, - onChange: function onChange(value) { - setAttributes({ - colorAccent: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button Color', 'alerts-dlx'), - value: colorAlt, - onChange: function onChange(value) { - setAttributes({ - colorAlt: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Color', 'alerts-dlx'), - value: colorBold, - onChange: function onChange(value) { - setAttributes({ - colorBold: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background Color', 'alerts-dlx'), - value: colorLight, - onChange: function onChange(value) { - setAttributes({ - colorLight: value - }); - } - }], - colors: _colors__WEBPACK_IMPORTED_MODULE_13__["default"] - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Appearance', 'quotes-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_components_unit_picker__WEBPACK_IMPORTED_MODULE_9__["default"], { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Width', 'quotes-dlx'), - value: maximumWidthUnit, - units: ['px', '%', 'vw'], - onClick: function onClick(value) { - setAttributes({ - maximumWidthUnit: value - }); - } - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - type: 'text', - value: maximumWidth, - onChange: function onChange(value) { - setAttributes({ - maximumWidth: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-variants-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Alert Variant', 'quotes-dlx'), - className: "alerts-dlx-material-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'default' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'default' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Default', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'outlined' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'outlined' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Outlined', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'filled' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'filled' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Filled', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-mode-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set Light or Dark Mode', 'quotes-dlx'), - className: "alerts-dlx-chakra-mode" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'light' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'light' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Light Mode', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'dark' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'dark' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Dark Mode', 'alerts-dlx'))))), iconEnabled && 'centered' !== variant && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-button-group-icon-alignment", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Vertical Alignment', 'quotes-dlx'), - className: "alerts-dlx-material-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'top' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'top' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Base Font Size', 'alerts-dlx'), - step: 1, - value: baseFontSize, - max: 36, - min: 12, - currentInput: 16, - initialPosition: 16, - allowReset: true, - onChange: function onChange(fontSizeValue) { - setAttributes({ - baseFontSize: fontSizeValue - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the base font size for the alert.', 'alerts-dlx') - })), 'default' === variant && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Drop Shadow', 'alerts-dlx'), - checked: enableDropShadow, - onChange: function onChange(value) { - setAttributes({ - enableDropShadow: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable or disable the drop shadow for the default variant.', 'alerts-dlx') - })))); - var advancedControls = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Flexible InnerBlocks', 'alerts-dlx'), - checked: innerBlocksEnabled, - onChange: function onChange(value) { - setAttributes({ - innerBlocksEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the use of any block within the alert.', 'alerts-dlx') - })); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - setAttributes({ - uniqueId: generatedUniqueId - }); - }, []); - - /** - * Attempt to check when block styles are changed. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (undefined === className) { - return; - } - var styleMatch = new RegExp(/is-style-([^\s]*)/g).exec(className); - if (null !== styleMatch) { - var match = styleMatch[1]; - setAttributes({ - alertType: match - }); - } - }, [className]); - var getIconSets = function getIconSets() { - return _components_icons_MaterialIcons__WEBPACK_IMPORTED_MODULE_11__["default"]; - }; - - // Calculate max width. - var maxWidthStyle = { - maxWidth: maximumWidth + maximumWidthUnit - }; - var baseFontSizeStyles = "#".concat(uniqueId, " { font-size: ").concat(parseInt(baseFontSize), "px; }"); - var block = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, inspectorControls), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorAdvancedControls, null, advancedControls), /*#__PURE__*/React.createElement("style", null, baseFontSizeStyles), 'custom' === alertType && /*#__PURE__*/React.createElement("style", null, styles), /*#__PURE__*/React.createElement("figure", { - role: "alert", - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('alerts-dlx-alert alerts-dlx-material', { - 'alerts-dlx-has-icon': iconEnabled, - 'alerts-dlx-has-description': descriptionEnabled, - 'alerts-dlx-has-button': buttonEnabled - }), - style: maxWidthStyle, - id: uniqueId - }, iconEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-icon", - "aria-hidden": "true" - }, /*#__PURE__*/React.createElement(_components_IconPicker__WEBPACK_IMPORTED_MODULE_10__["default"], { - defaultSvg: icon, - setAttributes: setAttributes, - alertType: alertType, - icons: getIconSets() - })), /*#__PURE__*/React.createElement("section", null, closeButtonEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-close" - }, /*#__PURE__*/React.createElement(_components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_12__.MaterialCloseIcon, null)), titleEnabled && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.RichText, { - tagName: "h2", - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert title', 'quotes-dlx'), - value: alertTitle, - className: "alerts-dlx-title", - disableLineBreaks: true, - allowedFormats: [], - onChange: function onChange(value) { - setAttributes({ - alertTitle: value - }); - } - }), /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-content-wrapper" - }, descriptionEnabled && /*#__PURE__*/React.createElement("div", innerBlockProps), buttonEnabled && /*#__PURE__*/React.createElement(_components_AlertButton__WEBPACK_IMPORTED_MODULE_8__["default"], { - attributes: attributes, - setAttributes: setAttributes - }))))); - var blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, 'alerts-dlx template-material', { - 'is-style-success': className === undefined && 'success' === alertType, - 'is-style-info': className === undefined && 'info' === alertType, - 'is-style-warning': className === undefined && 'warning' === alertType, - 'is-style-error': className === undefined && 'error' === alertType, - 'is-dark-mode': 'dark' === mode, - 'custom-fonts-enabled': enableCustomFonts, - 'is-appearance-default': 'default' === variant, - 'is-appearance-outlined': 'outlined' === variant, - 'is-appearance-filled': 'filled' === variant, - 'is-appearance-centered': 'centered' === variant, - 'is-dropshadow-enabled': enableDropShadow, - 'icon-vertical-align-top': 'top' === iconVerticalAlignment, - 'icon-vertical-align-centered': 'centered' === iconVerticalAlignment - }) - }); - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", blockProps, block)); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MaterialAlerts); - -/***/ }), - -/***/ "./src/js/blocks/material/index.js": -/*!*****************************************!*\ - !*** ./src/js/blocks/material/index.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/js/blocks/material/block.json"); -/* harmony import */ var _components_icons_MaterialIconsLogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/icons/MaterialIconsLogo */ "./src/js/blocks/components/icons/MaterialIconsLogo.js"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/js/blocks/material/edit.js"); - - - - - -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__, { - edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"], - save: function save() { - return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null); - }, - icon: /*#__PURE__*/React.createElement(_components_icons_MaterialIconsLogo__WEBPACK_IMPORTED_MODULE_3__["default"], null), - transforms: { - from: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'material'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-material', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'material'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-material', attributes, innerBlocks); - } - }], - to: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'subtle'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'chakra'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-chakra', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'bootstrap'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-bootstrap', attributes, innerBlocks); - } - }] - } -}); - -/***/ }), - -/***/ "./src/js/blocks/shoelace/colors.js": -/*!******************************************!*\ - !*** ./src/js/blocks/shoelace/colors.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -var shoelaceColors = [{ - name: 'Text Color', - color: '#000' -}, { - name: 'Primary Color', - color: '#0284c7' -}, { - name: 'Primary Color Accent', - color: '#0ea5e9' -}, { - name: 'Success Color', - color: '#16a34a' -}, { - name: 'Success Color Accent', - color: '#22c55e' -}, { - name: 'Neutral Color', - color: '#52525b' -}, { - name: 'Neutral Color Accent', - color: '#71717a' -}, { - name: 'Warning Color', - color: '#d97706' -}, { - name: 'Warning Color Accent', - color: '#f59e0b' -}, { - name: 'Danger Color', - color: '#dc2626' -}, { - name: 'Danger Color Accent', - color: '#ef437f' -}, { - name: 'White', - color: '#fff' -}]; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (shoelaceColors); - -/***/ }), - -/***/ "./src/js/blocks/shoelace/edit.js": -/*!****************************************!*\ - !*** ./src/js/blocks/shoelace/edit.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); -/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _components_AlertButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/AlertButton */ "./src/js/blocks/components/AlertButton/index.js"); -/* harmony import */ var _components_unit_picker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/unit-picker */ "./src/js/blocks/components/unit-picker/index.js"); -/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../components/IconPicker */ "./src/js/blocks/components/IconPicker/index.js"); -/* harmony import */ var _components_icons_BootstrapIcons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../components/icons/BootstrapIcons */ "./src/js/blocks/components/icons/BootstrapIcons.js"); -/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./colors */ "./src/js/blocks/shoelace/colors.js"); -/* harmony import */ var _components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/CloseButtonIcons */ "./src/js/blocks/components/CloseButtonIcons/index.js"); -/* eslint-disable no-undef */ -/* eslint-disable no-unused-vars */ -/* eslint-disable camelcase */ -/** - * External dependencies - */ - - - - - - - - - - - - - - - - -// For storing unique IDs. -var uniqueIds = []; -var ShoelaceAlerts = function ShoelaceAlerts(props) { - var generatedUniqueId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__.useInstanceId)(ShoelaceAlerts, 'adlx-shoelace'); - var _useDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store), - replaceInnerBlocks = _useDispatch.replaceInnerBlocks; - - // Shortcuts. - var attributes = props.attributes, - setAttributes = props.setAttributes, - clientId = props.clientId; - var uniqueId = attributes.uniqueId, - closeButtonEnabled = attributes.closeButtonEnabled, - closeButtonExpiration = attributes.closeButtonExpiration, - alertType = attributes.alertType, - alertTitle = attributes.alertTitle, - alertDescription = attributes.alertDescription, - buttonEnabled = attributes.buttonEnabled, - maximumWidthUnit = attributes.maximumWidthUnit, - maximumWidth = attributes.maximumWidth, - icon = attributes.icon, - descriptionEnabled = attributes.descriptionEnabled, - titleEnabled = attributes.titleEnabled, - iconEnabled = attributes.iconEnabled, - className = attributes.className, - baseFontSize = attributes.baseFontSize, - enableCustomFonts = attributes.enableCustomFonts, - variant = attributes.variant, - iconVerticalAlignment = attributes.iconVerticalAlignment, - mode = attributes.mode, - colorPrimary = attributes.colorPrimary, - colorBorder = attributes.colorBorder, - colorAccent = attributes.colorAccent, - colorAlt = attributes.colorAlt, - colorBold = attributes.colorBold, - colorLight = attributes.colorLight, - innerBlocksEnabled = attributes.innerBlocksEnabled; - var innerBlocksRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); - var innerBlockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)({ - className: 'alerts-dlx-content', - ref: innerBlocksRef - }, { - allowedBlocks: innerBlocksEnabled ? true : ['core/paragraph'], - template: [['core/paragraph', { - placeholder: '' - }]] - }); - - /** - * Get a unique ID for the block for inline styling if necessary. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (null === uniqueId || uniqueIds.includes(uniqueId) || '' === uniqueId) { - var newUniqueId = 'alerts-dlx-' + clientId.substr(2, 9).replace('-', ''); - setAttributes({ - uniqueId: newUniqueId - }); - uniqueIds.push(newUniqueId); - } else { - uniqueIds.push(uniqueId); - } - }, []); - - /** - * Migrate RichText to InnerBlocks. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - // Port shareText attribute to use innerBlocks instead. - if (alertDescription !== '' && null !== innerBlocksRef.current) { - // Convert text over to blocks. - var richTextConvertedToBlocks = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__.rawHandler)({ - HTML: alertDescription - }); - replaceInnerBlocks(clientId, richTextConvertedToBlocks); - setAttributes({ - alertDescription: '' - }); - } - }, [innerBlocksRef]); - var styles = "\n\t\t#".concat(uniqueId, " {\n\t\t\t--alerts-dlx-shoelace-color-primary: ").concat(colorPrimary, ";\n\t\t\t--alerts-dlx-shoelace-color-border: ").concat(colorBorder, ";\n\t\t\t--alerts-dlx-shoelace-color-accent: ").concat(colorAccent, ";\n\t\t\t--alerts-dlx-shoelace-color-alt: ").concat(colorAlt, ";\n\t\t\t--alerts-dlx-shoelace-color-bold: ").concat(colorBold, ";\n\t\t\t--alerts-dlx-shoelace-color-light: ").concat(colorLight, ";\n\t\t}"); - var inspectorControls = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert Settings', 'quotes-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Icon', 'alerts-dlx'), - checked: iconEnabled, - onChange: function onChange(value) { - setAttributes({ - iconEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Title', 'alerts-dlx'), - checked: titleEnabled, - onChange: function onChange(value) { - setAttributes({ - titleEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Description', 'alerts-dlx'), - checked: descriptionEnabled, - onChange: function onChange(value) { - setAttributes({ - descriptionEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Alert Button', 'alerts-dlx'), - checked: buttonEnabled, - onChange: function onChange(value) { - setAttributes({ - buttonEnabled: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Close Button', 'alerts-dlx'), - checked: closeButtonEnabled, - onChange: function onChange(value) { - setAttributes({ - closeButtonEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the alert to be dismissible.', 'alerts-dlx') - })), closeButtonEnabled && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Close Button save expiration', 'alerts-dlx'), - value: closeButtonExpiration, - onChange: function onChange(value) { - setAttributes({ - closeButtonExpiration: parseInt(value) - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the expiration time in seconds for the close button to reappear. Set to zero to never expire.', 'alerts-dlx'), - type: 'number' - })))), 'custom' === alertType && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.PanelColorSettings, { - __experimentalIsRenderedInSidebar: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Color Settings', 'alerts-dlx'), - colorSettings: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Text Color', 'alerts-dlx'), - value: colorPrimary, - onChange: function onChange(value) { - setAttributes({ - colorPrimary: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Border Color', 'alerts-dlx'), - value: colorBorder, - onChange: function onChange(value) { - setAttributes({ - colorBorder: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accent Color', 'alerts-dlx'), - value: colorAccent, - onChange: function onChange(value) { - setAttributes({ - colorAccent: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button Color', 'alerts-dlx'), - value: colorAlt, - onChange: function onChange(value) { - setAttributes({ - colorAlt: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Color', 'alerts-dlx'), - value: colorBold, - onChange: function onChange(value) { - setAttributes({ - colorBold: value - }); - } - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background Color', 'alerts-dlx'), - value: colorLight, - onChange: function onChange(value) { - setAttributes({ - colorLight: value - }); - } - }], - colors: _colors__WEBPACK_IMPORTED_MODULE_12__["default"] - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { - initialOpen: true, - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Appearance', 'quotes-dlx') - }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_components_unit_picker__WEBPACK_IMPORTED_MODULE_9__["default"], { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum Width', 'quotes-dlx'), - value: maximumWidthUnit, - units: ['px', '%', 'vw'], - onClick: function onClick(value) { - setAttributes({ - maximumWidthUnit: value - }); - } - }), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, { - type: 'text', - value: maximumWidth, - onChange: function onChange(value) { - setAttributes({ - maximumWidth: value - }); - } - })), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-variants-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Alert Variant', 'quotes-dlx'), - className: "alerts-dlx-shoelace-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'top-accent' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'top-accent' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top Accent', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'left-accent' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'left-accent' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Left Accent', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'solid' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'solid' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Solid', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: variant === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - variant: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-mode-button-group", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set Light or Dark Mode', 'quotes-dlx'), - className: "alerts-dlx-shoelace-mode" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'light' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'light' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Light Mode', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: mode === 'dark' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - mode: 'dark' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Dark Mode', 'alerts-dlx'))))), iconEnabled && 'centered' !== variant && 'left-accent' !== variant && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.BaseControl, { - id: "alerts-dlx-button-group-icon-alignment", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Vertical Alignment', 'quotes-dlx'), - className: "alerts-dlx-material-variants" - }, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ButtonGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'top' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'top' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top', 'alerts-dlx')), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { - variant: iconVerticalAlignment === 'centered' ? 'primary' : 'secondary', - onClick: function onClick(e) { - setAttributes({ - iconVerticalAlignment: 'centered' - }); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Centered', 'alerts-dlx'))))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the Base Font Size', 'alerts-dlx'), - step: 1, - value: baseFontSize, - max: 36, - min: 12, - currentInput: 16, - initialPosition: 16, - allowReset: true, - onChange: function onChange(fontSizeValue) { - setAttributes({ - baseFontSize: fontSizeValue - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Set the base font size for the alert.', 'alerts-dlx') - })))); - var advancedControls = /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable Flexible InnerBlocks', 'alerts-dlx'), - checked: innerBlocksEnabled, - onChange: function onChange(value) { - setAttributes({ - innerBlocksEnabled: value - }); - }, - help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Enable this option to allow the use of any block within the alert.', 'alerts-dlx') - })); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - setAttributes({ - uniqueId: generatedUniqueId - }); - }, []); - - /** - * Attempt to check when block styles are changed. - */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () { - if (undefined === className) { - return; - } - var styleMatch = new RegExp(/is-style-([^\s]*)/g).exec(className); - if (null !== styleMatch) { - var match = styleMatch[1]; - setAttributes({ - alertType: match - }); - } - }, [className]); - var getIconSets = function getIconSets() { - return _components_icons_BootstrapIcons__WEBPACK_IMPORTED_MODULE_11__["default"]; - }; - - // Calculate max width. - var maxWidthStyle = { - maxWidth: maximumWidth + maximumWidthUnit - }; - var baseFontSizeStyles = "#".concat(uniqueId, " { font-size: ").concat(parseInt(baseFontSize), "px; }"); - var block = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, inspectorControls), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorAdvancedControls, null, advancedControls), /*#__PURE__*/React.createElement("style", null, baseFontSizeStyles), 'custom' === alertType && /*#__PURE__*/React.createElement("style", null, styles), /*#__PURE__*/React.createElement("figure", { - role: "alert", - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('alerts-dlx-alert alerts-dlx-shoelace', { - 'alerts-dlx-has-icon': iconEnabled, - 'alerts-dlx-has-description': descriptionEnabled, - 'alerts-dlx-has-button': buttonEnabled - }), - style: maxWidthStyle, - id: uniqueId - }, iconEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-icon", - "aria-hidden": "true" - }, /*#__PURE__*/React.createElement(_components_IconPicker__WEBPACK_IMPORTED_MODULE_10__["default"], { - defaultSvg: icon, - setAttributes: setAttributes, - alertType: alertType, - icons: getIconSets() - })), /*#__PURE__*/React.createElement("section", null, closeButtonEnabled && /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-close" - }, /*#__PURE__*/React.createElement(_components_CloseButtonIcons__WEBPACK_IMPORTED_MODULE_13__.ShoeLaceCloseIcon, null)), titleEnabled && /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.RichText, { - tagName: "h2", - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Alert title', 'quotes-dlx'), - value: alertTitle, - className: "alerts-dlx-title", - disableLineBreaks: true, - allowedFormats: [], - onChange: function onChange(value) { - setAttributes({ - alertTitle: value - }); - } - }), /*#__PURE__*/React.createElement("div", { - className: "alerts-dlx-content-wrapper" - }, descriptionEnabled && /*#__PURE__*/React.createElement("div", innerBlockProps), buttonEnabled && /*#__PURE__*/React.createElement(_components_AlertButton__WEBPACK_IMPORTED_MODULE_8__["default"], { - attributes: attributes, - setAttributes: setAttributes - }))))); - var blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, "alerts-dlx template-shoelace is-style-".concat(alertType), { - 'custom-fonts-enabled': enableCustomFonts, - 'is-appearance-left-accent': 'left-accent' === variant, - 'is-appearance-top-accent': 'top-accent' === variant, - 'is-appearance-default': 'default' === variant, - 'is-appearance-centered': 'centered' === variant, - 'is-appearance-solid': 'solid' === variant, - 'icon-vertical-align-top': 'top' === iconVerticalAlignment, - 'icon-vertical-align-centered': 'centered' === iconVerticalAlignment, - 'is-dark-mode': 'dark' === mode - }) - }); - return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", blockProps, block)); -}; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoelaceAlerts); - -/***/ }), - -/***/ "./src/js/blocks/shoelace/index.js": -/*!*****************************************!*\ - !*** ./src/js/blocks/shoelace/index.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/js/blocks/shoelace/block.json"); -/* harmony import */ var _components_icons_ShoelaceLogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/icons/ShoelaceLogo */ "./src/js/blocks/components/icons/ShoelaceLogo.js"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/js/blocks/shoelace/edit.js"); - - - - - -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__, { - edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"], - save: function save() { - return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null); - }, - icon: /*#__PURE__*/React.createElement(_components_icons_ShoelaceLogo__WEBPACK_IMPORTED_MODULE_3__["default"], null), - transforms: { - from: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'shoelace'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-shoelace', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'shoelace'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-shoelace', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'shoelace'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-shoelace', attributes, innerBlocks); - } - }], - to: [{ - type: 'block', - blocks: ['mediaron/alerts-dlx-material'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'material'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-material', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-chakra'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'subtle'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'chakra'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-chakra', attributes, innerBlocks); - } - }, { - type: 'block', - blocks: ['mediaron/alerts-dlx-bootstrap'], - transform: function transform(attributes, innerBlocks) { - attributes.alertType = 'success'; - attributes.variant = 'default'; - attributes.className = 'is-style-success'; - attributes.alertGroup = 'bootstrap'; - return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('mediaron/alerts-dlx-bootstrap', attributes, innerBlocks); - } - }] - } -}); - -/***/ }), - -/***/ "./src/js/blocks/utils/sanitize-svg/index.js": -/*!***************************************************!*\ - !*** ./src/js/blocks/utils/sanitize-svg/index.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ sanitizeSVG) -/* harmony export */ }); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dompurify */ "./node_modules/dompurify/dist/purify.js"); -/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_0__); - -function sanitizeSVG(svg) { - return dompurify__WEBPACK_IMPORTED_MODULE_0___default().sanitize(svg, { - USE_PROFILES: { - svg: true, - svgFilters: true - } - }); -} - -/***/ }), - -/***/ "./node_modules/classnames/index.js": -/*!******************************************!*\ - !*** ./node_modules/classnames/index.js ***! - \******************************************/ -/***/ ((module, exports) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString === Object.prototype.toString) { - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } else { - classes.push(arg.toString()); - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/dompurify/dist/purify.js": -/*!***********************************************!*\ - !*** ./node_modules/dompurify/dist/purify.js ***! - \***********************************************/ -/***/ (function(module) { - -/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */ - -(function (global, factory) { - true ? module.exports = factory() : - 0; -})(this, (function () { 'use strict'; - - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var hasOwnProperty = Object.hasOwnProperty, - setPrototypeOf = Object.setPrototypeOf, - isFrozen = Object.isFrozen, - getPrototypeOf = Object.getPrototypeOf, - getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var freeze = Object.freeze, - seal = Object.seal, - create = Object.create; // eslint-disable-line import/no-mutable-exports - - var _ref = typeof Reflect !== 'undefined' && Reflect, - apply = _ref.apply, - construct = _ref.construct; - - if (!apply) { - apply = function apply(fun, thisValue, args) { - return fun.apply(thisValue, args); - }; - } - - if (!freeze) { - freeze = function freeze(x) { - return x; - }; - } - - if (!seal) { - seal = function seal(x) { - return x; - }; - } - - if (!construct) { - construct = function construct(Func, args) { - return _construct(Func, _toConsumableArray(args)); - }; - } - - var arrayForEach = unapply(Array.prototype.forEach); - var arrayPop = unapply(Array.prototype.pop); - var arrayPush = unapply(Array.prototype.push); - var stringToLowerCase = unapply(String.prototype.toLowerCase); - var stringMatch = unapply(String.prototype.match); - var stringReplace = unapply(String.prototype.replace); - var stringIndexOf = unapply(String.prototype.indexOf); - var stringTrim = unapply(String.prototype.trim); - var regExpTest = unapply(RegExp.prototype.test); - var typeErrorCreate = unconstruct(TypeError); - function unapply(func) { - return function (thisArg) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return apply(func, thisArg, args); - }; - } - function unconstruct(func) { - return function () { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return construct(func, args); - }; - } - /* Add properties to a lookup table */ - - function addToSet(set, array, transformCaseFunc) { - transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase; - - if (setPrototypeOf) { - // Make 'in' and truthy checks like Boolean(set.constructor) - // independent of any properties defined on Object.prototype. - // Prevent prototype setters from intercepting set as a this value. - setPrototypeOf(set, null); - } - - var l = array.length; - - while (l--) { - var element = array[l]; - - if (typeof element === 'string') { - var lcElement = transformCaseFunc(element); - - if (lcElement !== element) { - // Config presets (e.g. tags.js, attrs.js) are immutable. - if (!isFrozen(array)) { - array[l] = lcElement; - } - - element = lcElement; - } - } - - set[element] = true; - } - - return set; - } - /* Shallow clone an object */ - - function clone(object) { - var newObject = create(null); - var property; - - for (property in object) { - if (apply(hasOwnProperty, object, [property])) { - newObject[property] = object[property]; - } - } - - return newObject; - } - /* IE10 doesn't support __lookupGetter__ so lets' - * simulate it. It also automatically checks - * if the prop is function or getter and behaves - * accordingly. */ - - function lookupGetter(object, prop) { - while (object !== null) { - var desc = getOwnPropertyDescriptor(object, prop); - - if (desc) { - if (desc.get) { - return unapply(desc.get); - } - - if (typeof desc.value === 'function') { - return unapply(desc.value); - } - } - - object = getPrototypeOf(object); - } - - function fallbackValue(element) { - console.warn('fallback value for', element); - return null; - } - - return fallbackValue; - } - - var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG - - var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); - var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. - // We still need to know them so that we can do namespace - // checks properly in case one wants to add them to - // allow-list. - - var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); - var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements, - // even those that we disallow by default. - - var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); - var text = freeze(['#text']); - - var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']); - var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); - var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); - var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); - - var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode - - var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); - var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape - - var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape - - var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape - ); - var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); - var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex - ); - var DOCTYPE_NAME = seal(/^html$/i); - - var getGlobal = function getGlobal() { - return typeof window === 'undefined' ? null : window; - }; - /** - * Creates a no-op policy for internal use only. - * Don't export this function outside this module! - * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory. - * @param {Document} document The document object (to determine policy name suffix) - * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types - * are not supported). - */ - - - var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) { - if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') { - return null; - } // Allow the callers to control the unique policy name - // by adding a data-tt-policy-suffix to the script element with the DOMPurify. - // Policy creation with duplicate names throws in Trusted Types. - - - var suffix = null; - var ATTR_NAME = 'data-tt-policy-suffix'; - - if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) { - suffix = document.currentScript.getAttribute(ATTR_NAME); - } - - var policyName = 'dompurify' + (suffix ? '#' + suffix : ''); - - try { - return trustedTypes.createPolicy(policyName, { - createHTML: function createHTML(html) { - return html; - }, - createScriptURL: function createScriptURL(scriptUrl) { - return scriptUrl; - } - }); - } catch (_) { - // Policy creation failed (most likely another DOMPurify script has - // already run). Skip creating the policy, as this will only cause errors - // if TT are enforced. - console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); - return null; - } - }; - - function createDOMPurify() { - var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); - - var DOMPurify = function DOMPurify(root) { - return createDOMPurify(root); - }; - /** - * Version label, exposed for easier checks - * if DOMPurify is up to date or not - */ - - - DOMPurify.version = '2.4.0'; - /** - * Array of elements that DOMPurify removed during sanitation. - * Empty if nothing was removed. - */ - - DOMPurify.removed = []; - - if (!window || !window.document || window.document.nodeType !== 9) { - // Not running in a browser, provide a factory function - // so that you can pass your own Window - DOMPurify.isSupported = false; - return DOMPurify; - } - - var originalDocument = window.document; - var document = window.document; - var DocumentFragment = window.DocumentFragment, - HTMLTemplateElement = window.HTMLTemplateElement, - Node = window.Node, - Element = window.Element, - NodeFilter = window.NodeFilter, - _window$NamedNodeMap = window.NamedNodeMap, - NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap, - HTMLFormElement = window.HTMLFormElement, - DOMParser = window.DOMParser, - trustedTypes = window.trustedTypes; - var ElementPrototype = Element.prototype; - var cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); - var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); - var getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); - var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a - // new document created via createHTMLDocument. As per the spec - // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) - // a new empty registry is used when creating a template contents owner - // document, so we use that as our parent document to ensure nothing - // is inherited. - - if (typeof HTMLTemplateElement === 'function') { - var template = document.createElement('template'); - - if (template.content && template.content.ownerDocument) { - document = template.content.ownerDocument; - } - } - - var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); - - var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : ''; - var _document = document, - implementation = _document.implementation, - createNodeIterator = _document.createNodeIterator, - createDocumentFragment = _document.createDocumentFragment, - getElementsByTagName = _document.getElementsByTagName; - var importNode = originalDocument.importNode; - var documentMode = {}; - - try { - documentMode = clone(document).documentMode ? document.documentMode : {}; - } catch (_) {} - - var hooks = {}; - /** - * Expose whether this browser supports running the full DOMPurify. - */ - - DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9; - var MUSTACHE_EXPR$1 = MUSTACHE_EXPR, - ERB_EXPR$1 = ERB_EXPR, - DATA_ATTR$1 = DATA_ATTR, - ARIA_ATTR$1 = ARIA_ATTR, - IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, - ATTR_WHITESPACE$1 = ATTR_WHITESPACE; - var IS_ALLOWED_URI$1 = IS_ALLOWED_URI; - /** - * We consider the elements and attributes below to be safe. Ideally - * don't add any new ones but feel free to remove unwanted ones. - */ - - /* allowed element names */ - - var ALLOWED_TAGS = null; - var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text))); - /* Allowed attribute names */ - - var ALLOWED_ATTR = null; - var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml))); - /* - * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements. - * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements) - * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list) - * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`. - */ - - var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, { - tagNameCheck: { - writable: true, - configurable: false, - enumerable: true, - value: null - }, - attributeNameCheck: { - writable: true, - configurable: false, - enumerable: true, - value: null - }, - allowCustomizedBuiltInElements: { - writable: true, - configurable: false, - enumerable: true, - value: false - } - })); - /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ - - var FORBID_TAGS = null; - /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ - - var FORBID_ATTR = null; - /* Decide if ARIA attributes are okay */ - - var ALLOW_ARIA_ATTR = true; - /* Decide if custom data attributes are okay */ - - var ALLOW_DATA_ATTR = true; - /* Decide if unknown protocols are okay */ - - var ALLOW_UNKNOWN_PROTOCOLS = false; - /* Output should be safe for common template engines. - * This means, DOMPurify removes data attributes, mustaches and ERB - */ - - var SAFE_FOR_TEMPLATES = false; - /* Decide if document with ... should be returned */ - - var WHOLE_DOCUMENT = false; - /* Track whether config is already set on this instance of DOMPurify. */ - - var SET_CONFIG = false; - /* Decide if all elements (e.g. style, script) must be children of - * document.body. By default, browsers might move them to document.head */ - - var FORCE_BODY = false; - /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported). - * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead - */ - - var RETURN_DOM = false; - /* Decide if a DOM `DocumentFragment` should be returned, instead of a html - * string (or a TrustedHTML object if Trusted Types are supported) */ - - var RETURN_DOM_FRAGMENT = false; - /* Try to return a Trusted Type object instead of a string, return a string in - * case Trusted Types are not supported */ - - var RETURN_TRUSTED_TYPE = false; - /* Output should be free from DOM clobbering attacks? - * This sanitizes markups named with colliding, clobberable built-in DOM APIs. - */ - - var SANITIZE_DOM = true; - /* Achieve full DOM Clobbering protection by isolating the namespace of named - * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules. - * - * HTML/DOM spec rules that enable DOM Clobbering: - * - Named Access on Window (§7.3.3) - * - DOM Tree Accessors (§3.1.5) - * - Form Element Parent-Child Relations (§4.10.3) - * - Iframe srcdoc / Nested WindowProxies (§4.8.5) - * - HTMLCollection (§4.2.10.2) - * - * Namespace isolation is implemented by prefixing `id` and `name` attributes - * with a constant string, i.e., `user-content-` - */ - - var SANITIZE_NAMED_PROPS = false; - var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-'; - /* Keep element content when removing element? */ - - var KEEP_CONTENT = true; - /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead - * of importing it into a new Document and returning a sanitized copy */ - - var IN_PLACE = false; - /* Allow usage of profiles like html, svg and mathMl */ - - var USE_PROFILES = {}; - /* Tags to ignore content of when KEEP_CONTENT is true */ - - var FORBID_CONTENTS = null; - var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); - /* Tags that are safe for data: URIs */ - - var DATA_URI_TAGS = null; - var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); - /* Attributes safe for values like "javascript:" */ - - var URI_SAFE_ATTRIBUTES = null; - var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); - var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; - /* Document namespace */ - - var NAMESPACE = HTML_NAMESPACE; - var IS_EMPTY_INPUT = false; - /* Parsing of strict XHTML documents */ - - var PARSER_MEDIA_TYPE; - var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html']; - var DEFAULT_PARSER_MEDIA_TYPE = 'text/html'; - var transformCaseFunc; - /* Keep a reference to config to pass to hooks */ - - var CONFIG = null; - /* Ideally, do not touch anything below this line */ - - /* ______________________________________________ */ - - var formElement = document.createElement('form'); - - var isRegexOrFunction = function isRegexOrFunction(testValue) { - return testValue instanceof RegExp || testValue instanceof Function; - }; - /** - * _parseConfig - * - * @param {Object} cfg optional config literal - */ - // eslint-disable-next-line complexity - - - var _parseConfig = function _parseConfig(cfg) { - if (CONFIG && CONFIG === cfg) { - return; - } - /* Shield configuration object from tampering */ - - - if (!cfg || _typeof(cfg) !== 'object') { - cfg = {}; - } - /* Shield configuration object from prototype pollution */ - - - cfg = clone(cfg); - PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes - SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is. - - transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) { - return x; - } : stringToLowerCase; - /* Set configuration parameters */ - - ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; - ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; - URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent - cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent - transformCaseFunc // eslint-disable-line indent - ) // eslint-disable-line indent - : DEFAULT_URI_SAFE_ATTRIBUTES; - DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent - cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent - transformCaseFunc // eslint-disable-line indent - ) // eslint-disable-line indent - : DEFAULT_DATA_URI_TAGS; - FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; - FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; - FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; - USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false; - ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true - - ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true - - ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false - - SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false - - WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false - - RETURN_DOM = cfg.RETURN_DOM || false; // Default false - - RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false - - RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false - - FORCE_BODY = cfg.FORCE_BODY || false; // Default false - - SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true - - SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false - - KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true - - IN_PLACE = cfg.IN_PLACE || false; // Default false - - IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1; - NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; - - if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { - CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; - } - - if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { - CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; - } - - if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') { - CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; - } - - if (SAFE_FOR_TEMPLATES) { - ALLOW_DATA_ATTR = false; - } - - if (RETURN_DOM_FRAGMENT) { - RETURN_DOM = true; - } - /* Parse profile info */ - - - if (USE_PROFILES) { - ALLOWED_TAGS = addToSet({}, _toConsumableArray(text)); - ALLOWED_ATTR = []; - - if (USE_PROFILES.html === true) { - addToSet(ALLOWED_TAGS, html$1); - addToSet(ALLOWED_ATTR, html); - } - - if (USE_PROFILES.svg === true) { - addToSet(ALLOWED_TAGS, svg$1); - addToSet(ALLOWED_ATTR, svg); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.svgFilters === true) { - addToSet(ALLOWED_TAGS, svgFilters); - addToSet(ALLOWED_ATTR, svg); - addToSet(ALLOWED_ATTR, xml); - } - - if (USE_PROFILES.mathMl === true) { - addToSet(ALLOWED_TAGS, mathMl$1); - addToSet(ALLOWED_ATTR, mathMl); - addToSet(ALLOWED_ATTR, xml); - } - } - /* Merge configuration parameters */ - - - if (cfg.ADD_TAGS) { - if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { - ALLOWED_TAGS = clone(ALLOWED_TAGS); - } - - addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); - } - - if (cfg.ADD_ATTR) { - if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { - ALLOWED_ATTR = clone(ALLOWED_ATTR); - } - - addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); - } - - if (cfg.ADD_URI_SAFE_ATTR) { - addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); - } - - if (cfg.FORBID_CONTENTS) { - if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { - FORBID_CONTENTS = clone(FORBID_CONTENTS); - } - - addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); - } - /* Add #text in case KEEP_CONTENT is set to true */ - - - if (KEEP_CONTENT) { - ALLOWED_TAGS['#text'] = true; - } - /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ - - - if (WHOLE_DOCUMENT) { - addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); - } - /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ - - - if (ALLOWED_TAGS.table) { - addToSet(ALLOWED_TAGS, ['tbody']); - delete FORBID_TAGS.tbody; - } // Prevent further manipulation of configuration. - // Not available in IE8, Safari 5, etc. - - - if (freeze) { - freeze(cfg); - } - - CONFIG = cfg; - }; - - var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); - var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML - // namespace. We need to specify them explicitly - // so that they don't get erroneously deleted from - // HTML namespace. - - var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']); - /* Keep track of all possible SVG and MathML tags - * so that we can perform the namespace checks - * correctly. */ - - var ALL_SVG_TAGS = addToSet({}, svg$1); - addToSet(ALL_SVG_TAGS, svgFilters); - addToSet(ALL_SVG_TAGS, svgDisallowed); - var ALL_MATHML_TAGS = addToSet({}, mathMl$1); - addToSet(ALL_MATHML_TAGS, mathMlDisallowed); - /** - * - * - * @param {Element} element a DOM element whose namespace is being checked - * @returns {boolean} Return false if the element has a - * namespace that a spec-compliant parser would never - * return. Return true otherwise. - */ - - var _checkValidNamespace = function _checkValidNamespace(element) { - var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode - // can be null. We just simulate parent in this case. - - if (!parent || !parent.tagName) { - parent = { - namespaceURI: HTML_NAMESPACE, - tagName: 'template' - }; - } - - var tagName = stringToLowerCase(element.tagName); - var parentTagName = stringToLowerCase(parent.tagName); - - if (element.namespaceURI === SVG_NAMESPACE) { - // The only way to switch from HTML namespace to SVG - // is via . If it happens via any other tag, then - // it should be killed. - if (parent.namespaceURI === HTML_NAMESPACE) { - return tagName === 'svg'; - } // The only way to switch from MathML to SVG is via - // svg if parent is either or MathML - // text integration points. - - - if (parent.namespaceURI === MATHML_NAMESPACE) { - return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); - } // We only allow elements that are defined in SVG - // spec. All others are disallowed in SVG namespace. - - - return Boolean(ALL_SVG_TAGS[tagName]); - } - - if (element.namespaceURI === MATHML_NAMESPACE) { - // The only way to switch from HTML namespace to MathML - // is via . If it happens via any other tag, then - // it should be killed. - if (parent.namespaceURI === HTML_NAMESPACE) { - return tagName === 'math'; - } // The only way to switch from SVG to MathML is via - // and HTML integration points - - - if (parent.namespaceURI === SVG_NAMESPACE) { - return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName]; - } // We only allow elements that are defined in MathML - // spec. All others are disallowed in MathML namespace. - - - return Boolean(ALL_MATHML_TAGS[tagName]); - } - - if (element.namespaceURI === HTML_NAMESPACE) { - // The only way to switch from SVG to HTML is via - // HTML integration points, and from MathML to HTML - // is via MathML text integration points - if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { - return false; - } - - if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { - return false; - } // We disallow tags that are specific for MathML - // or SVG and should never appear in HTML namespace - - - return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); - } // The code should never reach this place (this means - // that the element somehow got namespace that is not - // HTML, SVG or MathML). Return false just in case. - - - return false; - }; - /** - * _forceRemove - * - * @param {Node} node a DOM node - */ - - - var _forceRemove = function _forceRemove(node) { - arrayPush(DOMPurify.removed, { - element: node - }); - - try { - // eslint-disable-next-line unicorn/prefer-dom-node-remove - node.parentNode.removeChild(node); - } catch (_) { - try { - node.outerHTML = emptyHTML; - } catch (_) { - node.remove(); - } - } - }; - /** - * _removeAttribute - * - * @param {String} name an Attribute name - * @param {Node} node a DOM node - */ - - - var _removeAttribute = function _removeAttribute(name, node) { - try { - arrayPush(DOMPurify.removed, { - attribute: node.getAttributeNode(name), - from: node - }); - } catch (_) { - arrayPush(DOMPurify.removed, { - attribute: null, - from: node - }); - } - - node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes - - if (name === 'is' && !ALLOWED_ATTR[name]) { - if (RETURN_DOM || RETURN_DOM_FRAGMENT) { - try { - _forceRemove(node); - } catch (_) {} - } else { - try { - node.setAttribute(name, ''); - } catch (_) {} - } - } - }; - /** - * _initDocument - * - * @param {String} dirty a string of dirty markup - * @return {Document} a DOM, filled with the dirty markup - */ - - - var _initDocument = function _initDocument(dirty) { - /* Create a HTML document */ - var doc; - var leadingWhitespace; - - if (FORCE_BODY) { - dirty = '' + dirty; - } else { - /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ - var matches = stringMatch(dirty, /^[\r\n\t ]+/); - leadingWhitespace = matches && matches[0]; - } - - if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') { - // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict) - dirty = '' + dirty + ''; - } - - var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; - /* - * Use the DOMParser API by default, fallback later if needs be - * DOMParser not work for svg when has multiple root element. - */ - - if (NAMESPACE === HTML_NAMESPACE) { - try { - doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); - } catch (_) {} - } - /* Use createHTMLDocument in case DOMParser is not available */ - - - if (!doc || !doc.documentElement) { - doc = implementation.createDocument(NAMESPACE, 'template', null); - - try { - doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload; - } catch (_) {// Syntax error if dirtyPayload is invalid xml - } - } - - var body = doc.body || doc.documentElement; - - if (dirty && leadingWhitespace) { - body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null); - } - /* Work on whole document or just its body */ - - - if (NAMESPACE === HTML_NAMESPACE) { - return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; - } - - return WHOLE_DOCUMENT ? doc.documentElement : body; - }; - /** - * _createIterator - * - * @param {Document} root document/fragment to create iterator for - * @return {Iterator} iterator instance - */ - - - var _createIterator = function _createIterator(root) { - return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise - NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false); - }; - /** - * _isClobbered - * - * @param {Node} elm element to check for clobbering attacks - * @return {Boolean} true if clobbered, false if safe - */ - - - var _isClobbered = function _isClobbered(elm) { - return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function'); - }; - /** - * _isNode - * - * @param {Node} obj object to check whether it's a DOM node - * @return {Boolean} true is object is a DOM node - */ - - - var _isNode = function _isNode(object) { - return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'; - }; - /** - * _executeHook - * Execute user configurable hooks - * - * @param {String} entryPoint Name of the hook's entry point - * @param {Node} currentNode node to work on with the hook - * @param {Object} data additional hook parameters - */ - - - var _executeHook = function _executeHook(entryPoint, currentNode, data) { - if (!hooks[entryPoint]) { - return; - } - - arrayForEach(hooks[entryPoint], function (hook) { - hook.call(DOMPurify, currentNode, data, CONFIG); - }); - }; - /** - * _sanitizeElements - * - * @protect nodeName - * @protect textContent - * @protect removeChild - * - * @param {Node} currentNode to check for permission to exist - * @return {Boolean} true if node was killed, false if left alive - */ - - - var _sanitizeElements = function _sanitizeElements(currentNode) { - var content; - /* Execute a hook if present */ - - _executeHook('beforeSanitizeElements', currentNode, null); - /* Check if element is clobbered or can clobber */ - - - if (_isClobbered(currentNode)) { - _forceRemove(currentNode); - - return true; - } - /* Check if tagname contains Unicode */ - - - if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) { - _forceRemove(currentNode); - - return true; - } - /* Now let's check the element's type and name */ - - - var tagName = transformCaseFunc(currentNode.nodeName); - /* Execute a hook if present */ - - _executeHook('uponSanitizeElement', currentNode, { - tagName: tagName, - allowedTags: ALLOWED_TAGS - }); - /* Detect mXSS attempts abusing namespace confusion */ - - - if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { - _forceRemove(currentNode); - - return true; - } - /* Mitigate a problem with templates inside select */ - - - if (tagName === 'select' && regExpTest(/