Version Description
Download this release
Release Info
Developer | Mat Lipe |
Plugin | Advanced Sidebar Menu |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 8.8.3 to 2.1.0
- advanced-sidebar-menu.php +19 -38
- js/dist/admin.css +61 -0
- js/dist/admin.css.map +1 -0
- js/dist/admin.js +3301 -0
- js/dist/admin.js.map +1 -0
- js/dist/admin.min.css +3 -0
- js/dist/admin.min.js +2 -0
- js/dist/manifest.json +14 -0
- js/dist/master.js +9 -0
- js/dist/master.js.map +1 -0
- languages/advanced-sidebar-menu-de_DE-db8c2f4a99b6d52af632434da54ae10a.json +1 -0
- languages/advanced-sidebar-menu-de_DE.mo +0 -0
- languages/advanced-sidebar-menu-de_DE.po +187 -105
- languages/advanced-sidebar-menu-es_ES-db8c2f4a99b6d52af632434da54ae10a.json +1 -0
- languages/advanced-sidebar-menu-es_ES.mo +0 -0
- languages/advanced-sidebar-menu-es_ES.po +181 -103
- languages/advanced-sidebar-menu-fr_FR-db8c2f4a99b6d52af632434da54ae10a.json +1 -0
- languages/advanced-sidebar-menu-fr_FR.mo +0 -0
- languages/advanced-sidebar-menu-fr_FR.po +185 -106
- languages/advanced-sidebar-menu.pot +153 -79
- readme.txt +63 -79
- resources/blocks/category/block.json +18 -0
- resources/blocks/pages/block.json +18 -0
- resources/css/advanced-sidebar-menu.css +2 -2
- src/Blocks/Block_Abstract.php +313 -0
- src/Blocks/Categories.php +122 -0
- src/Blocks/Pages.php +110 -0
- src/Core.php +43 -0
- src/List_Pages.php +1 -1
- src/Menus/Category.php +70 -22
- src/Menus/Menu_Abstract.php +12 -3
- src/Menus/Page.php +2 -2
- src/Notice.php +35 -15
- src/Scripts.php +138 -14
- src/Widget/Category.php +28 -9
- src/Widget/Page.php +25 -15
- src/Widget/Widget_Abstract.php +0 -2
advanced-sidebar-menu.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
* Plugin URI: https://onpointplugins.com/advanced-sidebar-menu/
|
5 |
* Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
* Author: OnPoint Plugins
|
7 |
-
* Version:
|
8 |
* Author URI: https://onpointplugins.com
|
9 |
* Text Domain: advanced-sidebar-menu
|
10 |
* Domain Path: /languages/
|
11 |
* Network: false
|
12 |
-
* Requires at least: 5.
|
13 |
-
* Requires PHP:
|
14 |
*
|
15 |
* @package advanced-sidebar-menu
|
16 |
*/
|
@@ -19,11 +19,14 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
|
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
-
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '
|
23 |
-
define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '
|
24 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
25 |
define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
|
26 |
|
|
|
|
|
|
|
27 |
use Advanced_Sidebar_Menu\Cache;
|
28 |
use Advanced_Sidebar_Menu\Core;
|
29 |
use Advanced_Sidebar_Menu\Debug;
|
@@ -49,6 +52,10 @@ use Advanced_Sidebar_Menu\Widget\Widget_Abstract;
|
|
49 |
*/
|
50 |
function advanced_sidebar_menu_load() {
|
51 |
Core::init();
|
|
|
|
|
|
|
|
|
52 |
Cache::init();
|
53 |
Debug::init();
|
54 |
Notice::init();
|
@@ -57,6 +64,8 @@ function advanced_sidebar_menu_load() {
|
|
57 |
if ( Notice::instance()->is_conflicting_pro_version() ) {
|
58 |
remove_action( 'plugins_loaded', 'advanced_sidebar_menu_pro_init', 11 );
|
59 |
}
|
|
|
|
|
60 |
}
|
61 |
|
62 |
add_action( 'plugins_loaded', 'advanced_sidebar_menu_load' );
|
@@ -76,6 +85,11 @@ function advanced_sidebar_menu_autoload( $class ) {
|
|
76 |
Widget_Page::class => 'Widget/Page.php',
|
77 |
Widget_Category::class => 'Widget/Category.php',
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
// Core.
|
80 |
Cache::class => 'Cache.php',
|
81 |
Core::class => 'Core.php',
|
@@ -105,36 +119,3 @@ function advanced_sidebar_menu_autoload( $class ) {
|
|
105 |
}
|
106 |
|
107 |
spl_autoload_register( 'advanced_sidebar_menu_autoload' );
|
108 |
-
|
109 |
-
add_action( 'plugins_loaded', 'advanced_sidebar_menu_translate' );
|
110 |
-
/**
|
111 |
-
* Load translations
|
112 |
-
*
|
113 |
-
* @return void
|
114 |
-
*/
|
115 |
-
function advanced_sidebar_menu_translate() {
|
116 |
-
load_plugin_textdomain( 'advanced-sidebar-menu', false, 'advanced-sidebar-menu/languages' );
|
117 |
-
}
|
118 |
-
|
119 |
-
add_action( 'advanced-sidebar-menu/widget/page/after-form', 'advanced_sidebar_menu_widget_docs', 99, 2 );
|
120 |
-
add_action( 'advanced-sidebar-menu/widget/category/after-form', 'advanced_sidebar_menu_widget_docs', 99, 2 );
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Add a link to widget docs inside the widget.
|
124 |
-
*
|
125 |
-
* @param array $instance - Widget settings.
|
126 |
-
* @param WP_Widget $widget - Current widget.
|
127 |
-
*/
|
128 |
-
function advanced_sidebar_menu_widget_docs( $instance, WP_Widget $widget ) {
|
129 |
-
$anchor = Widget_Category::NAME === $widget->id_base ? 'categories-menu' : 'pages-menu';
|
130 |
-
?>
|
131 |
-
<p class="advanced-sidebar-widget-documentation">
|
132 |
-
<a
|
133 |
-
href="https://onpointplugins.com/advanced-sidebar-menu/#advanced-sidebar-<?php echo esc_attr( $anchor ); ?>"
|
134 |
-
target="_blank"
|
135 |
-
rel="noopener noreferrer">
|
136 |
-
<?php esc_html_e( 'widget documentation', 'advanced-sidebar-menu' ); ?>
|
137 |
-
</a>
|
138 |
-
</p>
|
139 |
-
<?php
|
140 |
-
}
|
4 |
* Plugin URI: https://onpointplugins.com/advanced-sidebar-menu/
|
5 |
* Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
* Author: OnPoint Plugins
|
7 |
+
* Version: 9.0.0
|
8 |
* Author URI: https://onpointplugins.com
|
9 |
* Text Domain: advanced-sidebar-menu
|
10 |
* Domain Path: /languages/
|
11 |
* Network: false
|
12 |
+
* Requires at least: 5.8.0
|
13 |
+
* Requires PHP: 7.0.0
|
14 |
*
|
15 |
* @package advanced-sidebar-menu
|
16 |
*/
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
+
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '9.0.0' );
|
23 |
+
define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '9.0.0' );
|
24 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
25 |
define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
|
26 |
|
27 |
+
use Advanced_Sidebar_Menu\Blocks\Block_Abstract;
|
28 |
+
use Advanced_Sidebar_Menu\Blocks\Categories;
|
29 |
+
use Advanced_Sidebar_Menu\Blocks\Pages;
|
30 |
use Advanced_Sidebar_Menu\Cache;
|
31 |
use Advanced_Sidebar_Menu\Core;
|
32 |
use Advanced_Sidebar_Menu\Debug;
|
52 |
*/
|
53 |
function advanced_sidebar_menu_load() {
|
54 |
Core::init();
|
55 |
+
// Blocks.
|
56 |
+
Categories::init();
|
57 |
+
Pages::init();
|
58 |
+
|
59 |
Cache::init();
|
60 |
Debug::init();
|
61 |
Notice::init();
|
64 |
if ( Notice::instance()->is_conflicting_pro_version() ) {
|
65 |
remove_action( 'plugins_loaded', 'advanced_sidebar_menu_pro_init', 11 );
|
66 |
}
|
67 |
+
|
68 |
+
load_plugin_textdomain( 'advanced-sidebar-menu', false, 'advanced-sidebar-menu/languages' );
|
69 |
}
|
70 |
|
71 |
add_action( 'plugins_loaded', 'advanced_sidebar_menu_load' );
|
85 |
Widget_Page::class => 'Widget/Page.php',
|
86 |
Widget_Category::class => 'Widget/Category.php',
|
87 |
|
88 |
+
// Blocks.
|
89 |
+
Block_Abstract::class => 'Blocks/Block_Abstract.php',
|
90 |
+
Categories::class => 'Blocks/Categories.php',
|
91 |
+
Pages::class => 'Blocks/Pages.php',
|
92 |
+
|
93 |
// Core.
|
94 |
Cache::class => 'Cache.php',
|
95 |
Core::class => 'Core.php',
|
119 |
}
|
120 |
|
121 |
spl_autoload_register( 'advanced_sidebar_menu_autoload' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/dist/admin.css
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.preview__placeholder__QP .components-placeholder__label {
|
2 |
+
/* stylelint-disable-line */
|
3 |
+
flex-direction: column;
|
4 |
+
width: 100%
|
5 |
+
}
|
6 |
+
.preview__placeholder__QP .components-placeholder__instructions {
|
7 |
+
display: block !important
|
8 |
+
}
|
9 |
+
.preview__placeholder__QP .components-placeholder__instructions {
|
10 |
+
/* stylelint-disable-line */
|
11 |
+
text-align: center;
|
12 |
+
width: 100%
|
13 |
+
}
|
14 |
+
.preview__placeholder__QP .dashicons {
|
15 |
+
font-size: 30px;
|
16 |
+
height: 35px;
|
17 |
+
width: 35px
|
18 |
+
}
|
19 |
+
.preview__placeholder__QP .components-placeholder__fieldset {
|
20 |
+
/* stylelint-disable-line */
|
21 |
+
text-align: center
|
22 |
+
}
|
23 |
+
.preview__error__xF {
|
24 |
+
padding: 10px;
|
25 |
+
margin: 2px;
|
26 |
+
border: 4px double #d63638;
|
27 |
+
font-size: 14px;
|
28 |
+
font-weight: 600
|
29 |
+
}
|
30 |
+
.preview__spin-wrap__Jr {
|
31 |
+
position: relative;
|
32 |
+
min-height: 100px
|
33 |
+
}
|
34 |
+
.preview__spin__A4 {
|
35 |
+
position: absolute;
|
36 |
+
top: 50%;
|
37 |
+
left: 50%;
|
38 |
+
margin: -9px 0 0 -9px
|
39 |
+
}
|
40 |
+
.preview__spin-content__Yg {
|
41 |
+
opacity: .2
|
42 |
+
}
|
43 |
+
.info-panel__wrap__YT ul {
|
44 |
+
margin-block-end: 1em
|
45 |
+
}
|
46 |
+
.info-panel__wrap__YT li {
|
47 |
+
list-style: disc;
|
48 |
+
margin: 0 0 0 15px
|
49 |
+
}
|
50 |
+
.info-panel__button__PN {
|
51 |
+
width: 100%;
|
52 |
+
justify-content: center
|
53 |
+
}
|
54 |
+
.edit__error___h {
|
55 |
+
padding: 10px;
|
56 |
+
margin: 2px;
|
57 |
+
border: 4px double #d63638;
|
58 |
+
font-weight: 600
|
59 |
+
}
|
60 |
+
|
61 |
+
/*# sourceMappingURL=admin.css.map*/
|
js/dist/admin.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"admin.css","mappings":"AAAA;EACE,2BAA2B;EAC3B,sBAAsB;EACtB;AACF;AACA;EACE;AACF;AACA;EACE,2BAA2B;EAC3B,kBAAkB;EAClB;AACF;AACA;EACE,eAAe;EACf,YAAY;EACZ;AACF;AACA;EACE,2BAA2B;EAC3B;AACF;AACA;EACE,aAAa;EACb,WAAW;EACX,0BAA0B;EAC1B,eAAe;EACf;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT;AACF;AACA;EACE;AACF,C;ACzCA;EACE;AACF;AACA;EACE,gBAAgB;EAChB;AACF;AACA;EACE,WAAW;EACX;AACF,C;ACVA;EACE,aAAa;EACb,WAAW;EACX,0BAA0B;EAC1B;AACF,C","sources":["webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/%3Cinput%20css%202jKQ6s%3E","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/%3Cinput%20css%20vzmfU4%3E","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/pages/%3Cinput%20css%20NepUEK%3E"],"sourcesContent":[".placeholder :global(.components-placeholder__label) {\n /* stylelint-disable-line */\n flex-direction: column;\n width: 100%\n}\n.placeholder :global(.components-placeholder__instructions) {\n display: block !important\n}\n.placeholder :global(.components-placeholder__instructions) {\n /* stylelint-disable-line */\n text-align: center;\n width: 100%\n}\n.placeholder :global(.dashicons) {\n font-size: 30px;\n height: 35px;\n width: 35px\n}\n.placeholder :global(.components-placeholder__fieldset) {\n /* stylelint-disable-line */\n text-align: center\n}\n.error {\n padding: 10px;\n margin: 2px;\n border: 4px double #d63638;\n font-size: 14px;\n font-weight: 600\n}\n.spin-wrap {\n position: relative;\n min-height: 100px\n}\n.spin {\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -9px 0 0 -9px\n}\n.spin-content {\n opacity: .2\n}",".wrap ul {\n margin-block-end: 1em\n}\n.wrap li {\n list-style: disc;\n margin: 0 0 0 15px\n}\n.button {\n width: 100%;\n justify-content: center\n}",".error {\n padding: 10px;\n margin: 2px;\n border: 4px double #d63638;\n font-weight: 600\n}"],"names":[],"sourceRoot":""}
|
js/dist/admin.js
ADDED
@@ -0,0 +1,3301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function() { // webpackBootstrap
|
2 |
+
/******/ var __webpack_modules__ = ({
|
3 |
+
|
4 |
+
/***/ "./.yarn/__virtual__/@lipemat-js-boilerplate-gutenberg-virtual-6ce9f74a52/0/cache/@lipemat-js-boilerplate-gutenberg-npm-2.9.5-b01ffe5a8b-6d75996942.zip/node_modules/@lipemat/js-boilerplate-gutenberg/dist/index.module.js":
|
5 |
+
/*!**********************************************************************************************************************************************************************************************************************************!*\
|
6 |
+
!*** ./.yarn/__virtual__/@lipemat-js-boilerplate-gutenberg-virtual-6ce9f74a52/0/cache/@lipemat-js-boilerplate-gutenberg-npm-2.9.5-b01ffe5a8b-6d75996942.zip/node_modules/@lipemat/js-boilerplate-gutenberg/dist/index.module.js ***!
|
7 |
+
\**********************************************************************************************************************************************************************************************************************************/
|
8 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
9 |
+
|
10 |
+
"use strict";
|
11 |
+
__webpack_require__.r(__webpack_exports__);
|
12 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
13 |
+
/* harmony export */ "addMiddleware": function() { return /* binding */ m; },
|
14 |
+
/* harmony export */ "autoload": function() { return /* binding */ z; },
|
15 |
+
/* harmony export */ "autoloadBlocks": function() { return /* binding */ U; },
|
16 |
+
/* harmony export */ "autoloadPlugins": function() { return /* binding */ X; },
|
17 |
+
/* harmony export */ "clearApplicationPassword": function() { return /* binding */ W; },
|
18 |
+
/* harmony export */ "clearNonce": function() { return /* binding */ P; },
|
19 |
+
/* harmony export */ "createMethods": function() { return /* binding */ G; },
|
20 |
+
/* harmony export */ "defaultFetchHandler": function() { return /* binding */ B; },
|
21 |
+
/* harmony export */ "doRequest": function() { return /* binding */ A; },
|
22 |
+
/* harmony export */ "doRequestWithPagination": function() { return /* binding */ C; },
|
23 |
+
/* harmony export */ "enableApplicationPassword": function() { return /* binding */ N; },
|
24 |
+
/* harmony export */ "getAuthorizationUrl": function() { return /* binding */ D; },
|
25 |
+
/* harmony export */ "hasApplicationPassword": function() { return /* binding */ M; },
|
26 |
+
/* harmony export */ "hasExternalNonce": function() { return /* binding */ g; },
|
27 |
+
/* harmony export */ "removeMiddleware": function() { return /* binding */ w; },
|
28 |
+
/* harmony export */ "restoreNonce": function() { return /* binding */ E; },
|
29 |
+
/* harmony export */ "restoreRootURL": function() { return /* binding */ R; },
|
30 |
+
/* harmony export */ "setNonce": function() { return /* binding */ b; },
|
31 |
+
/* harmony export */ "setRootURL": function() { return /* binding */ I; },
|
32 |
+
/* harmony export */ "usePostMeta": function() { return /* binding */ F; },
|
33 |
+
/* harmony export */ "useTerms": function() { return /* binding */ Y; },
|
34 |
+
/* harmony export */ "wpapi": function() { return /* binding */ L; }
|
35 |
+
/* harmony export */ });
|
36 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
|
37 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__);
|
38 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
39 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
40 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
|
41 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_2__);
|
42 |
+
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
43 |
+
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);
|
44 |
+
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
|
45 |
+
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__);
|
46 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
47 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
|
48 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "react");
|
49 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
50 |
+
function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l,v,h=[];function m(e){return h.push(e),h.length-1}function w(e){return delete h[e],h}function g(){return void 0!==v}function b(e){E(),v=m(function(e){function t(e,n){var r=e.headers,o=void 0===r?{}:r;for(var i in o)"x-wp-nonce"===i.toLowerCase()&&delete o[i];return n(p({},e,{headers:p({},o,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t}(e))}function P(){void 0!==v&&(w(v),v=void 0),void 0===l&&(l=m(function(e,t){if(void 0!==e.headers)for(var n in e.headers)"x-wp-nonce"===n.toLowerCase()&&delete e.headers[n];return t(e,t)}))}function E(){void 0!==v&&w(v),void 0!==l&&w(l),v=void 0,l=void 0}var y=function(e,t){return void 0===t&&(t=!0),Promise.resolve(function(e,t){return void 0===t&&(t=!0),t?204===e.status?null:e.json?e.json():Promise.reject(e):e}(e,t)).catch(function(e){return T(e,t)})};function T(e,n){if(void 0===n&&(n=!0),!n)throw e;return function(e){var n={code:"invalid_json",message:(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw n;return e.json().catch(function(){throw n})}(e).then(function(e){var n={code:"unknown_error",message:(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("An unknown error occurred.")};throw"rest_cookie_invalid_nonce"===e.code&&g()&&(e.code="external_rest_cookie_invalid_nonce"),e||n})}var k,_=["url","path","data","parse"],j={Accept:"application/json, */*;q=0.1"},x={credentials:"include"},O=function(e){if(e.status>=200&&e.status<300)return e;throw e},B=function(e){var n=function e(t,n){return function(r){return void 0===n[t]?r:(0,n[t])(r,t===n.length-1?function(e){return e}:e(t+1,n))}}(0,h.filter(Boolean))(p({},x,e)),r=n.url,o=n.path,i=n.data,u=n.parse,s=void 0===u||u,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(n,_),a=n.body,d=n.headers;return d=p({},j,d),i&&(a=JSON.stringify(i),d["Content-Type"]="application/json"),window.fetch(r||o,p({},c,{body:a,headers:d})).then(function(e){return Promise.resolve(e).then(O).catch(function(e){return T(e,s)}).then(function(e){return y(e,s)})},function(){throw{code:"fetch_error",message:(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("You are probably offline.")}})},C=function(e,t,n){return Promise.resolve(A(e,t,n,!1)).then(function(e){return Promise.resolve(y(e)).then(function(t){return{items:t,totalPages:parseInt(e.headers.get("X-WP-TotalPages")||"1"),totalItems:parseInt(e.headers.get("X-WP-Total")||"0")}})})},A=function(t,r,o,i){void 0===i&&(i=!0);try{return Promise.resolve(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()(void 0===o||"GET"===r?{method:r,parse:i,path:(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_2__.addQueryArgs)(t,o)}:{data:o,method:r,parse:i,path:t}))}catch(e){return Promise.reject(e)}};function G(e){return{create:function(t){return A(e,"POST",t)},delete:function(t){return A(e+="/"+t,"DELETE",{force:!0})},get:function(t){return A(e,"GET",t)},getById:function(t,n){return A(e+="/"+t,"GET",n)},getWithPagination:function(t){return C(e,"GET",t)},trash:function(t){return A(e+="/"+t,"DELETE")},update:function(t){return A(e+="/"+t.id,"PATCH",t)}}}function L(t){var n={};return["categories","comments","blocks","media","menus","menu-locations","menu-items","statuses","pages","posts","tags","taxonomies","types","search"].map(function(e){return n[e]=function(){return G("/wp/v2/"+e)}}),n.menuLocations=function(){return G("/wp/v2/menu-locations")},n.menuItems=function(){return G("/wp/v2/menu-items")},n.users=function(){var e=G("/wp/v2/users");return e.delete=function(e,t){return void 0===t&&(t=!1),A("/wp/v2/users/"+e,"DELETE",{force:!0,reassign:t})},e},n.applicationPasswords=function(){return{create:function(e,t){return A("/wp/v2/users/"+e+"/application-passwords","POST",t)},delete:function(e,t){return A("/wp/v2/users/"+e+"/application-passwords/"+t,"DELETE")},get:function(e){return A("/wp/v2/users/"+e+"/application-passwords","GET")},getById:function(e,t){return A("/wp/v2/users/"+e+"/application-passwords/"+t,"GET")},introspect:function(e){return A("/wp/v2/users/"+e+"/application-passwords/introspect","GET")},update:function(e,t,n){return A("/wp/v2/users/"+e+"/application-passwords/"+t,"PUT",n)}}},n.settings=function(){return{get:function(){return A("/wp/v2/settings","GET")},update:function(e){return A("/wp/v2/settings","POST",e)}}},void 0!==t&&Object.keys(t).map(function(e){return n[e]=t[e]}),_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default().setFetchHandler(B),n}function R(){w(k)}function I(t,n){k&&w(k),k=m(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default().createRootURLMiddleware(t.replace(/\/$/,"")+"/")),window.location.hostname&&new URL(t).hostname===window.location.hostname?E():void 0!==n?b(n):g()||P()}var S,D=function(r){return Promise.resolve(function(o,i){try{var u=Promise.resolve(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({path:"/",method:"GET"})).then(function(e){return e.authentication["application-passwords"]?(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_2__.addQueryArgs)(e.authentication["application-passwords"].endpoints.authorization,r):{code:"application_passwords_disabled",message:(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Application passwords are not enabled on this site."),data:null}})}catch(e){return e}return u&&u.then?u.then(void 0,function(e){return e}):u}())};function M(){return void 0!==S}function W(){void 0!==S&&(w(S),S=void 0)}function N(e,t){W(),S=m(function(n,r){var o=n.headers;return r(p({},n,{headers:p({},void 0===o?{}:o,{Authorization:"Basic "+btoa(e+":"+t)})}),r)})}var U=function(e,t){z({afterReload:q,beforeReload:J,getContext:e,pluginModule:t,register:_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__.registerBlockType,unregister:_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__.unregisterBlockType,type:"block"})},X=function(e,t){z({afterReload:function(){},beforeReload:function(){},getContext:e,pluginModule:t,register:_wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__.registerPlugin,unregister:_wordpress_plugins__WEBPACK_IMPORTED_MODULE_4__.unregisterPlugin,type:"plugin"})},z=function(e){var t=e.afterReload,n=e.beforeReload,r=e.getContext,o=e.pluginModule,i=e.register,u=e.unregister,s=e.type,c={},a=function(){n();var e=r();if(e){var o=[];return e.keys().forEach(function(t){var n=e(t);n.exclude||n!==c[t]&&(c[n.name+"-"+s]&&u(n.name),i(n.name,n.settings),o.push(n.name),c[n.name+"-"+s]=n)}),t(o),e}},d=a();o.hot&&null!=d&&d.id&&o.hot.accept(d.id,a)},H=null,J=function(){H=(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.select)("core/block-editor").getSelectedBlockClientId(),(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.dispatch)("core/block-editor").clearSelectedBlock()},q=function(e){void 0===e&&(e=[]),(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.select)("core/block-editor").getBlocks().forEach(function(t){var n=t.clientId;e.includes(t.name)&&(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.dispatch)("core/block-editor").selectBlock(n)}),H?(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.dispatch)("core/block-editor").selectBlock(H):(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.dispatch)("core/block-editor").clearSelectedBlock(),H=null};function F(e){var t=(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)("core/editor").editPost,n=(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(function(e){return{previous:e("core/editor").getCurrentPostAttribute("meta"),current:e("core/editor").getEditedPostAttribute("meta")}}),r=e?n.current[e]:n.current,o=e?n.previous[e]:n.previous,i=(0,react__WEBPACK_IMPORTED_MODULE_6__.useCallback)(function(n){var r;e&&t({meta:(r={},r[e]=n,r)})},[t,e]),u=(0,react__WEBPACK_IMPORTED_MODULE_6__.useCallback)(function(e,n){var r;t({meta:(r={},r[e]=n,r)})},[t]);return e?[r,i,o]:[r,u,o]}function Y(e){var t=(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useDispatch)("core/editor").editPost,n=(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(function(t){var n=t("core").getTaxonomy(e);return n?{taxonomy:n,current:t("core/editor").getEditedPostAttribute(n.rest_base),previous:t("core/editor").getCurrentPostAttribute(n.rest_base)}:{current:[],previous:[]}}),r=(0,react__WEBPACK_IMPORTED_MODULE_6__.useCallback)(function(e){try{var r;return Promise.resolve(n.taxonomy?t(((r={})[n.taxonomy.rest_base]=e,r)):void 0)}catch(e){return Promise.reject(e)}},[n,t]);return[n.current,r,n.previous]}
|
51 |
+
//# sourceMappingURL=index.module.js.map
|
52 |
+
|
53 |
+
|
54 |
+
/***/ }),
|
55 |
+
|
56 |
+
/***/ "./src/components/ErrorBoundary.tsx":
|
57 |
+
/*!******************************************!*\
|
58 |
+
!*** ./src/components/ErrorBoundary.tsx ***!
|
59 |
+
\******************************************/
|
60 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
61 |
+
|
62 |
+
"use strict";
|
63 |
+
__webpack_require__.r(__webpack_exports__);
|
64 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
65 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
66 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../globals/config */ "./src/globals/config.ts");
|
67 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
|
68 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_2__);
|
69 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dompurify */ "./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js");
|
70 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_3__);
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Wrap any component in me, which may throw errors, and I will
|
77 |
+
* prevent the entire UI from disappearing.
|
78 |
+
*
|
79 |
+
* Custom version special to Advanced Sidebar Menu with links to
|
80 |
+
* support as well as debugging information.
|
81 |
+
*
|
82 |
+
* @link https://reactjs.org/docs/error-boundaries.html#introducing-error-boundaries
|
83 |
+
*/
|
84 |
+
|
85 |
+
class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
|
86 |
+
constructor(props) {
|
87 |
+
super(props);
|
88 |
+
this.state = {
|
89 |
+
hasError: false,
|
90 |
+
error: null
|
91 |
+
};
|
92 |
+
}
|
93 |
+
|
94 |
+
static getDerivedStateFromError() {
|
95 |
+
// Update state, so the next render will show the fallback UI.
|
96 |
+
return {
|
97 |
+
hasError: true
|
98 |
+
};
|
99 |
+
}
|
100 |
+
/**
|
101 |
+
* Log information about the error when it happens.
|
102 |
+
*
|
103 |
+
* @notice Will log "Error: A cross-origin error was thrown. React doesn't have
|
104 |
+
* access to the actual error object in development" in React development
|
105 |
+
* mode but provides full error info in React production.
|
106 |
+
*/
|
107 |
+
|
108 |
+
|
109 |
+
componentDidCatch(error, info) {
|
110 |
+
console.log('%cError caught by the Advanced Sidebar ErrorBoundary!', 'color:orange; font-size: large; font-weight: bold');
|
111 |
+
console.log(this.props);
|
112 |
+
console.log(error);
|
113 |
+
console.log(info);
|
114 |
+
this.setState({
|
115 |
+
error
|
116 |
+
});
|
117 |
+
}
|
118 |
+
|
119 |
+
render() {
|
120 |
+
if (this.state.hasError) {
|
121 |
+
if (!_globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.siteInfo.scriptDebug) {
|
122 |
+
return /*#__PURE__*/React.createElement("div", {
|
123 |
+
className: 'components-panel__body is-opened'
|
124 |
+
}, /*#__PURE__*/React.createElement("h4", {
|
125 |
+
style: {
|
126 |
+
color: 'red'
|
127 |
+
}
|
128 |
+
}, "Something went wrong!"), /*#__PURE__*/React.createElement("p", null, "Please ", /*#__PURE__*/React.createElement("a", {
|
129 |
+
href: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_2__.addQueryArgs)((0,dompurify__WEBPACK_IMPORTED_MODULE_3__.sanitize)(window.location.href), {
|
130 |
+
'script-debug': true
|
131 |
+
})
|
132 |
+
}, "enable script debug"), ":"));
|
133 |
+
}
|
134 |
+
|
135 |
+
return /*#__PURE__*/React.createElement("div", {
|
136 |
+
className: 'components-panel__body is-opened'
|
137 |
+
}, /*#__PURE__*/React.createElement("h4", {
|
138 |
+
style: {
|
139 |
+
color: 'red'
|
140 |
+
}
|
141 |
+
}, "Something went wrong!"), /*#__PURE__*/React.createElement("p", null, "Please ", /*#__PURE__*/React.createElement("a", {
|
142 |
+
target: "_blank",
|
143 |
+
href: _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.support,
|
144 |
+
rel: "noreferrer"
|
145 |
+
}, "create a support request"), " with the following:"), /*#__PURE__*/React.createElement("ol", null, /*#__PURE__*/React.createElement("li", null, "The ", /*#__PURE__*/React.createElement("a", {
|
146 |
+
href: 'https://onpointplugins.com/how-to-retrieve-console-logs-from-your-browser/',
|
147 |
+
target: '_blank',
|
148 |
+
rel: "noreferrer"
|
149 |
+
}, "logs from your browser console.")), /*#__PURE__*/React.createElement("li", null, "The following information.")), /*#__PURE__*/React.createElement("div", {
|
150 |
+
style: {
|
151 |
+
border: '2px groove',
|
152 |
+
padding: '10px',
|
153 |
+
width: '100%',
|
154 |
+
overflowWrap: 'break-word'
|
155 |
+
}
|
156 |
+
}, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement("em", null, "Message")), " ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("code", null, this.state.error?.message)), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement("em", null, "Block")), " ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("code", null, this.props.block)), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement("em", null, "Attributes")), " ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("code", null, JSON.stringify(this.props.attributes))), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement("em", null, "Site Info")), " ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("code", null, JSON.stringify(_globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.siteInfo))), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement("em", null, "Stack")), " ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("code", null, this.state.error?.stack))), /*#__PURE__*/React.createElement("p", null, "\xA0"), /*#__PURE__*/React.createElement("p", null, "\xA0"));
|
157 |
+
}
|
158 |
+
|
159 |
+
return this.props.children;
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
/* harmony default export */ __webpack_exports__["default"] = (ErrorBoundary);
|
165 |
+
|
166 |
+
/***/ }),
|
167 |
+
|
168 |
+
/***/ "./src/globals/config.ts":
|
169 |
+
/*!*******************************!*\
|
170 |
+
!*** ./src/globals/config.ts ***!
|
171 |
+
\*******************************/
|
172 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
173 |
+
|
174 |
+
"use strict";
|
175 |
+
__webpack_require__.r(__webpack_exports__);
|
176 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
177 |
+
/* harmony export */ "CONFIG": function() { return /* binding */ CONFIG; }
|
178 |
+
/* harmony export */ });
|
179 |
+
const CONFIG = window.ADVANCED_SIDEBAR_MENU || {};
|
180 |
+
|
181 |
+
/***/ }),
|
182 |
+
|
183 |
+
/***/ "./src/gutenberg/SideLoad.tsx":
|
184 |
+
/*!************************************!*\
|
185 |
+
!*** ./src/gutenberg/SideLoad.tsx ***!
|
186 |
+
\************************************/
|
187 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
188 |
+
|
189 |
+
"use strict";
|
190 |
+
__webpack_require__.r(__webpack_exports__);
|
191 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
192 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
|
193 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
194 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
|
195 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash");
|
196 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
197 |
+
|
198 |
+
|
199 |
+
|
200 |
+
let firstClientId = '';
|
201 |
+
/**
|
202 |
+
* The customizer area does not include a `PluginArea` component,
|
203 |
+
* so our slot fills do not load.
|
204 |
+
*
|
205 |
+
* We can use filters, but the Fills double up each time
|
206 |
+
* another block is added to the page.
|
207 |
+
*
|
208 |
+
* Track the clientId of the first block we add the Fill to
|
209 |
+
* and only return the Fill for that block. The rest of the blocks
|
210 |
+
* inherit the Fill from the first block via their Slots.
|
211 |
+
*/
|
212 |
+
|
213 |
+
const SideLoad = _ref => {
|
214 |
+
let {
|
215 |
+
clientId,
|
216 |
+
children
|
217 |
+
} = _ref;
|
218 |
+
|
219 |
+
if (!(0,lodash__WEBPACK_IMPORTED_MODULE_2__.isEmpty)(firstClientId) && clientId !== firstClientId) {
|
220 |
+
// Make sure block still exists.
|
221 |
+
if (-1 !== (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('core/block-editor').getBlockIndex(firstClientId)) {
|
222 |
+
return null;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
firstClientId = clientId;
|
227 |
+
return children ?? null;
|
228 |
+
};
|
229 |
+
|
230 |
+
/* harmony default export */ __webpack_exports__["default"] = ((0,_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.withFilters)('advanced-sidebar-menu.blocks.side-load')(SideLoad));
|
231 |
+
|
232 |
+
/***/ }),
|
233 |
+
|
234 |
+
/***/ "./src/gutenberg/blocks/Display.tsx":
|
235 |
+
/*!******************************************!*\
|
236 |
+
!*** ./src/gutenberg/blocks/Display.tsx ***!
|
237 |
+
\******************************************/
|
238 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
239 |
+
|
240 |
+
"use strict";
|
241 |
+
__webpack_require__.r(__webpack_exports__);
|
242 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
243 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
|
244 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../globals/config */ "./src/globals/config.ts");
|
245 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
246 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
247 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash");
|
248 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
|
249 |
+
/* harmony import */ var react_string_replace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-string-replace */ "./.yarn/cache/react-string-replace-npm-1.1.0-9af2371852-5df67fbdb4.zip/node_modules/react-string-replace/index.js");
|
250 |
+
/* harmony import */ var react_string_replace__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_string_replace__WEBPACK_IMPORTED_MODULE_4__);
|
251 |
+
/* harmony import */ var _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/ErrorBoundary */ "./src/components/ErrorBoundary.tsx");
|
252 |
+
|
253 |
+
|
254 |
+
|
255 |
+
|
256 |
+
|
257 |
+
|
258 |
+
const checkboxes = {
|
259 |
+
/* translators: Selected taxonomy single label */
|
260 |
+
include_parent: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display the highest level parent %s', 'advanced-sidebar-menu'),
|
261 |
+
|
262 |
+
/* translators: Selected taxonomy single label */
|
263 |
+
include_childless_parent: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display menu when there is only the parent %s', 'advanced-sidebar-menu'),
|
264 |
+
|
265 |
+
/* translators: Selected taxonomy plural label */
|
266 |
+
display_all: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Always display child %s', 'advanced-sidebar-menu')
|
267 |
+
};
|
268 |
+
/**
|
269 |
+
* Display Options shared between widgets.
|
270 |
+
*
|
271 |
+
* 1. Display the highest level parent page.
|
272 |
+
* 2. Display menu when there is only the parent page.
|
273 |
+
* 3. Always display child pages.
|
274 |
+
* 5. Display levels of child pages.
|
275 |
+
*
|
276 |
+
*/
|
277 |
+
|
278 |
+
const Display = _ref => {
|
279 |
+
let {
|
280 |
+
attributes,
|
281 |
+
setAttributes,
|
282 |
+
type,
|
283 |
+
name,
|
284 |
+
clientId,
|
285 |
+
children
|
286 |
+
} = _ref;
|
287 |
+
const showLevels = _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.pages.id === name && _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.isPro || attributes.display_all;
|
288 |
+
const fillProps = {
|
289 |
+
type,
|
290 |
+
attributes,
|
291 |
+
name,
|
292 |
+
setAttributes,
|
293 |
+
clientId
|
294 |
+
};
|
295 |
+
return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelBody, {
|
296 |
+
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display', 'advanced-sidebar-menu')
|
297 |
+
}, Object.keys(checkboxes).map(item => {
|
298 |
+
let label = type?.labels?.singular_name.toLowerCase() ?? '';
|
299 |
+
|
300 |
+
if ('display_all' === item) {
|
301 |
+
label = type?.labels?.name.toLowerCase() ?? '';
|
302 |
+
}
|
303 |
+
|
304 |
+
return /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CheckboxControl, {
|
305 |
+
key: item //eslint-disable-next-line @wordpress/valid-sprintf
|
306 |
+
,
|
307 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(checkboxes[item], label),
|
308 |
+
checked: !!attributes[item],
|
309 |
+
onChange: value => {
|
310 |
+
setAttributes({
|
311 |
+
[item]: !!value
|
312 |
+
});
|
313 |
+
}
|
314 |
+
});
|
315 |
+
}), showLevels && /*#__PURE__*/React.createElement("div", {
|
316 |
+
className: 'components-base-control'
|
317 |
+
},
|
318 |
+
/* translators: {select html input}, {post type plural label} */
|
319 |
+
react_string_replace__WEBPACK_IMPORTED_MODULE_4___default()((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display %1$s levels of child %2$s', 'advanced-sidebar-menu').replace('%2$s', type?.labels?.name.toLowerCase() ?? ''), '%1$s', () => /*#__PURE__*/React.createElement("select", {
|
320 |
+
key: 'levels',
|
321 |
+
value: attributes.levels,
|
322 |
+
onChange: ev => setAttributes({
|
323 |
+
levels: parseInt(ev.target.value)
|
324 |
+
})
|
325 |
+
}, /*#__PURE__*/React.createElement("option", {
|
326 |
+
value: "100"
|
327 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('- All -', 'advanced-sidebar-menu')), (0,lodash__WEBPACK_IMPORTED_MODULE_3__.range)(1, 10).map(n => /*#__PURE__*/React.createElement("option", {
|
328 |
+
key: n,
|
329 |
+
value: n
|
330 |
+
}, n))))), children, /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
331 |
+
attributes: attributes,
|
332 |
+
block: name
|
333 |
+
}, _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.pages.id === name && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Slot, {
|
334 |
+
name: "advanced-sidebar-menu/pages/display",
|
335 |
+
fillProps: fillProps
|
336 |
+
}), _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.categories.id === name && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Slot, {
|
337 |
+
name: "advanced-sidebar-menu/categories/display",
|
338 |
+
fillProps: fillProps
|
339 |
+
})));
|
340 |
+
};
|
341 |
+
|
342 |
+
/* harmony default export */ __webpack_exports__["default"] = (Display);
|
343 |
+
|
344 |
+
/***/ }),
|
345 |
+
|
346 |
+
/***/ "./src/gutenberg/blocks/InfoPanel.tsx":
|
347 |
+
/*!********************************************!*\
|
348 |
+
!*** ./src/gutenberg/blocks/InfoPanel.tsx ***!
|
349 |
+
\********************************************/
|
350 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
351 |
+
|
352 |
+
"use strict";
|
353 |
+
__webpack_require__.r(__webpack_exports__);
|
354 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../globals/config */ "./src/globals/config.ts");
|
355 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
356 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
357 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
358 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
|
359 |
+
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
|
360 |
+
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_3__);
|
361 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
362 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
|
363 |
+
/* harmony import */ var _info_panel_pcss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./info-panel.pcss */ "./src/gutenberg/blocks/info-panel.pcss");
|
364 |
+
|
365 |
+
|
366 |
+
|
367 |
+
|
368 |
+
|
369 |
+
|
370 |
+
|
371 |
+
const InfoPanel = _ref => {
|
372 |
+
let {} = _ref;
|
373 |
+
return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, {
|
374 |
+
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Advanced Sidebar Menu PRO', 'advanced-sidebar-menu'),
|
375 |
+
className: _info_panel_pcss__WEBPACK_IMPORTED_MODULE_5__["default"].wrap
|
376 |
+
}, /*#__PURE__*/React.createElement("ul", null, _globals_config__WEBPACK_IMPORTED_MODULE_0__.CONFIG.features.map(feature => /*#__PURE__*/React.createElement("li", {
|
377 |
+
key: feature
|
378 |
+
}, (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_3__.decodeEntities)(feature))), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("a", {
|
379 |
+
href: "https://onpointplugins.com/product/advanced-sidebar-menu-pro/?utm_source=block-more&utm_campaign=gopro&utm_medium=wp-dash",
|
380 |
+
target: "_blank",
|
381 |
+
style: {
|
382 |
+
textDecoration: 'none'
|
383 |
+
},
|
384 |
+
rel: "noreferrer"
|
385 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('So much more…', 'advanced-sidebar-menu')))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
|
386 |
+
className: _info_panel_pcss__WEBPACK_IMPORTED_MODULE_5__["default"].button,
|
387 |
+
href: 'https://onpointplugins.com/product/advanced-sidebar-menu-pro/?trigger_buy_now=1&utm_source=block-upgrade&utm_campaign=gopro&utm_medium=wp-dash',
|
388 |
+
target: '_blank',
|
389 |
+
rel: 'noreferrer',
|
390 |
+
isPrimary: true
|
391 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Upgrade', 'advanced-sidebar-menu'))));
|
392 |
+
};
|
393 |
+
|
394 |
+
/* harmony default export */ __webpack_exports__["default"] = ((0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.withFilters)('advanced-sidebar-menu.blocks.info-panel')(InfoPanel));
|
395 |
+
|
396 |
+
/***/ }),
|
397 |
+
|
398 |
+
/***/ "./src/gutenberg/blocks/Preview.tsx":
|
399 |
+
/*!******************************************!*\
|
400 |
+
!*** ./src/gutenberg/blocks/Preview.tsx ***!
|
401 |
+
\******************************************/
|
402 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
403 |
+
|
404 |
+
"use strict";
|
405 |
+
__webpack_require__.r(__webpack_exports__);
|
406 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
407 |
+
/* harmony export */ "sanitizeClientId": function() { return /* binding */ sanitizeClientId; }
|
408 |
+
/* harmony export */ });
|
409 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
410 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
411 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../globals/config */ "./src/globals/config.ts");
|
412 |
+
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
|
413 |
+
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__);
|
414 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
415 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
416 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
417 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);
|
418 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dompurify */ "./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js");
|
419 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_5__);
|
420 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
|
421 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__);
|
422 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
423 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
|
424 |
+
/* harmony import */ var _preview_pcss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./preview.pcss */ "./src/gutenberg/blocks/preview.pcss");
|
425 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
426 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_9__);
|
427 |
+
/* provided dependency */ var $ = __webpack_require__(/*! jquery */ "jquery");
|
428 |
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
429 |
+
|
430 |
+
|
431 |
+
|
432 |
+
|
433 |
+
|
434 |
+
|
435 |
+
|
436 |
+
|
437 |
+
|
438 |
+
|
439 |
+
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Sanitize a client id for use as an HTML id.
|
443 |
+
*
|
444 |
+
* Must not start with a `-` or a digit.
|
445 |
+
*
|
446 |
+
*/
|
447 |
+
const sanitizeClientId = clientId => {
|
448 |
+
return clientId.replace(/^([\d-])/, '_$1');
|
449 |
+
};
|
450 |
+
/**
|
451 |
+
* If we are in the widgets' area, the block is wrapped in
|
452 |
+
* a "sidebar" block. We retrieve the id to pass along with
|
453 |
+
* the request to use the `widget_args` within the preview.
|
454 |
+
*
|
455 |
+
*/
|
456 |
+
|
457 |
+
const getSidebarId = clientId => {
|
458 |
+
if ('widgets' !== _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen) {
|
459 |
+
return '';
|
460 |
+
}
|
461 |
+
|
462 |
+
const rootId = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_9__.select)('core/block-editor').getBlockRootClientId(clientId);
|
463 |
+
|
464 |
+
if (rootId) {
|
465 |
+
const ParentBlock = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_9__.select)('core/block-editor').getBlocksByClientId([rootId]);
|
466 |
+
|
467 |
+
if (ParentBlock[0] && 'core/widget-area' === ParentBlock[0].name) {
|
468 |
+
return ParentBlock[0]?.attributes?.id;
|
469 |
+
}
|
470 |
+
}
|
471 |
+
|
472 |
+
return '';
|
473 |
+
};
|
474 |
+
/**
|
475 |
+
* @notice Must use static constants, or the ServerSide requests
|
476 |
+
* will fire anytime something on the page is changed
|
477 |
+
* because the component re-renders.
|
478 |
+
*/
|
479 |
+
|
480 |
+
|
481 |
+
const Page = () => /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Placeholder, {
|
482 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].placeholder,
|
483 |
+
icon: 'welcome-widgets-menus',
|
484 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Advanced Sidebar - Pages', 'advanced-sidebar-menu'),
|
485 |
+
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('No preview available', 'advanced-sidebar-menu')
|
486 |
+
});
|
487 |
+
|
488 |
+
const Category = () => /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Placeholder, {
|
489 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].placeholder,
|
490 |
+
icon: 'welcome-widgets-menus',
|
491 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Advanced Sidebar - Categories', 'advanced-sidebar-menu'),
|
492 |
+
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('No preview available', 'advanced-sidebar-menu')
|
493 |
+
});
|
494 |
+
|
495 |
+
const Navigation = () => /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Placeholder, {
|
496 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].placeholder,
|
497 |
+
icon: 'welcome-widgets-menus',
|
498 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Advanced Sidebar - Navigation', 'advanced-sidebar-menu'),
|
499 |
+
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('No preview available', 'advanced-sidebar-menu')
|
500 |
+
});
|
501 |
+
/**
|
502 |
+
* @notice The styles will not display for the preview
|
503 |
+
* in the block inserter sidebar when Webpack
|
504 |
+
* is enabled because the iframe has a late init.
|
505 |
+
*
|
506 |
+
*/
|
507 |
+
|
508 |
+
|
509 |
+
const placeholder = block => {
|
510 |
+
switch (block) {
|
511 |
+
case _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.pages.id:
|
512 |
+
return Page;
|
513 |
+
|
514 |
+
case _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.categories.id:
|
515 |
+
return Category;
|
516 |
+
|
517 |
+
case _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.blocks.navigation?.id:
|
518 |
+
return Navigation;
|
519 |
+
}
|
520 |
+
|
521 |
+
return () => /*#__PURE__*/React.createElement(React.Fragment, null);
|
522 |
+
};
|
523 |
+
/**
|
524 |
+
* Same as the `DefaultLoadingResponsePlaceholder` except we trigger
|
525 |
+
* an action when the loading component is unmounted to allow
|
526 |
+
* components to hook into when ServerSideRender has finished loading.
|
527 |
+
*
|
528 |
+
* @notice Using a constant to prevent reload on every content change.
|
529 |
+
*
|
530 |
+
*/
|
531 |
+
|
532 |
+
|
533 |
+
const TriggerWhenLoadingFinished = _ref => {
|
534 |
+
let {
|
535 |
+
children,
|
536 |
+
attributes = {
|
537 |
+
clientId: ''
|
538 |
+
}
|
539 |
+
} = _ref;
|
540 |
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
541 |
+
// Call action when the loading component unmounts because loading is finished.
|
542 |
+
return () => {
|
543 |
+
// Give the preview a chance to load on WP 5.8.
|
544 |
+
setTimeout(() => {
|
545 |
+
$('[data-preview="' + `${attributes.clientId}` + '"]').find('a').on('click', ev => ev.preventDefault());
|
546 |
+
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.doAction)('advanced-sidebar-menu.blocks.preview.loading-finished', {
|
547 |
+
values: attributes,
|
548 |
+
clientId: attributes.clientId
|
549 |
+
});
|
550 |
+
}, 100);
|
551 |
+
};
|
552 |
+
});
|
553 |
+
/**
|
554 |
+
* ServerSideRender returns a <RawHTML /> filled with an error object when fetch fails.
|
555 |
+
*
|
556 |
+
* We throw an error, so our `ErrorBoundary` will catch it, otherwise we end up
|
557 |
+
* with a "React objects may not be used as children" error, which means nothing.
|
558 |
+
*/
|
559 |
+
|
560 |
+
if (children?.props?.children?.errorMsg) {
|
561 |
+
throw new Error(children?.props?.children?.errorMsg ?? 'Failed');
|
562 |
+
}
|
563 |
+
|
564 |
+
return /*#__PURE__*/React.createElement("div", {
|
565 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].spinWrap
|
566 |
+
}, /*#__PURE__*/React.createElement("div", {
|
567 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].spin
|
568 |
+
}, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Spinner, null)), /*#__PURE__*/React.createElement("div", {
|
569 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].spinContent
|
570 |
+
}, children));
|
571 |
+
};
|
572 |
+
|
573 |
+
const Preview = _ref2 => {
|
574 |
+
let {
|
575 |
+
attributes,
|
576 |
+
block,
|
577 |
+
clientId
|
578 |
+
} = _ref2;
|
579 |
+
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)();
|
580 |
+
|
581 |
+
if ('' !== _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.error) {
|
582 |
+
return /*#__PURE__*/React.createElement("div", {
|
583 |
+
className: _preview_pcss__WEBPACK_IMPORTED_MODULE_8__["default"].error,
|
584 |
+
dangerouslySetInnerHTML: {
|
585 |
+
__html: (0,dompurify__WEBPACK_IMPORTED_MODULE_5__.sanitize)(_globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.error)
|
586 |
+
}
|
587 |
+
});
|
588 |
+
}
|
589 |
+
|
590 |
+
const sanitizedClientId = sanitizeClientId(clientId); // Prevent styles from doubling up as they are already added via render in PHP.
|
591 |
+
|
592 |
+
delete blockProps.style;
|
593 |
+
return /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
|
594 |
+
"data-preview": sanitizedClientId
|
595 |
+
}), /*#__PURE__*/React.createElement((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default()), {
|
596 |
+
EmptyResponsePlaceholder: placeholder(block),
|
597 |
+
LoadingResponsePlaceholder: TriggerWhenLoadingFinished,
|
598 |
+
attributes: { ...attributes,
|
599 |
+
// Send custom attribute to determine server side renders.
|
600 |
+
isServerSideRenderRequest: true,
|
601 |
+
clientId: sanitizedClientId,
|
602 |
+
sidebarId: getSidebarId(clientId)
|
603 |
+
},
|
604 |
+
block: block,
|
605 |
+
httpMethod: 'POST'
|
606 |
+
}));
|
607 |
+
};
|
608 |
+
|
609 |
+
/* harmony default export */ __webpack_exports__["default"] = (Preview);
|
610 |
+
|
611 |
+
/***/ }),
|
612 |
+
|
613 |
+
/***/ "./src/gutenberg/blocks/categories/Edit.tsx":
|
614 |
+
/*!**************************************************!*\
|
615 |
+
!*** ./src/gutenberg/blocks/categories/Edit.tsx ***!
|
616 |
+
\**************************************************/
|
617 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
618 |
+
|
619 |
+
"use strict";
|
620 |
+
__webpack_require__.r(__webpack_exports__);
|
621 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
622 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
|
623 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../globals/config */ "./src/globals/config.ts");
|
624 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dompurify */ "./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js");
|
625 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_2__);
|
626 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
627 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
|
628 |
+
/* harmony import */ var _Preview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Preview */ "./src/gutenberg/blocks/Preview.tsx");
|
629 |
+
/* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block */ "./src/gutenberg/blocks/categories/block.tsx");
|
630 |
+
/* harmony import */ var _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../components/ErrorBoundary */ "./src/components/ErrorBoundary.tsx");
|
631 |
+
/* harmony import */ var _Display__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Display */ "./src/gutenberg/blocks/Display.tsx");
|
632 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
633 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__);
|
634 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
635 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
|
636 |
+
/* harmony import */ var _InfoPanel__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InfoPanel */ "./src/gutenberg/blocks/InfoPanel.tsx");
|
637 |
+
/* harmony import */ var _pages_edit_pcss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../pages/edit.pcss */ "./src/gutenberg/blocks/pages/edit.pcss");
|
638 |
+
/* harmony import */ var _SideLoad__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../SideLoad */ "./src/gutenberg/SideLoad.tsx");
|
639 |
+
|
640 |
+
|
641 |
+
|
642 |
+
|
643 |
+
|
644 |
+
|
645 |
+
|
646 |
+
|
647 |
+
|
648 |
+
|
649 |
+
|
650 |
+
|
651 |
+
|
652 |
+
|
653 |
+
const Edit = _ref => {
|
654 |
+
let {
|
655 |
+
attributes,
|
656 |
+
setAttributes,
|
657 |
+
clientId,
|
658 |
+
name
|
659 |
+
} = _ref;
|
660 |
+
const taxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(select => {
|
661 |
+
const type = select('core').getTaxonomy(attributes.taxonomy ?? 'category');
|
662 |
+
return type ?? select('core').getTaxonomy('category');
|
663 |
+
}, [attributes.taxonomy]); // We have a version conflict or license error.
|
664 |
+
|
665 |
+
if ('' !== _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.error) {
|
666 |
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, /*#__PURE__*/React.createElement("div", {
|
667 |
+
className: _pages_edit_pcss__WEBPACK_IMPORTED_MODULE_11__["default"].error,
|
668 |
+
dangerouslySetInnerHTML: {
|
669 |
+
__html: (0,dompurify__WEBPACK_IMPORTED_MODULE_2__.sanitize)(_globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.error)
|
670 |
+
}
|
671 |
+
})), /*#__PURE__*/React.createElement(_Preview__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
672 |
+
attributes: attributes,
|
673 |
+
block: _block__WEBPACK_IMPORTED_MODULE_5__.block.id,
|
674 |
+
clientId: clientId
|
675 |
+
}));
|
676 |
+
}
|
677 |
+
|
678 |
+
const fillProps = {
|
679 |
+
type: taxonomy,
|
680 |
+
attributes,
|
681 |
+
name,
|
682 |
+
setAttributes,
|
683 |
+
clientId
|
684 |
+
};
|
685 |
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
686 |
+
attributes: attributes,
|
687 |
+
block: name
|
688 |
+
}, ('widgets' === _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen || 'site-editor' === _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen || 'customize' === _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen) && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.TextControl, {
|
689 |
+
value: attributes.title ?? '',
|
690 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Title', 'advanced-sidebar-menu'),
|
691 |
+
onChange: title => setAttributes({
|
692 |
+
title
|
693 |
+
})
|
694 |
+
})), /*#__PURE__*/React.createElement(_Display__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
695 |
+
attributes: attributes,
|
696 |
+
clientId: clientId,
|
697 |
+
name: name,
|
698 |
+
setAttributes: setAttributes,
|
699 |
+
type: taxonomy
|
700 |
+
}, 'post' !== _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.CheckboxControl
|
701 |
+
/* translators: Selected taxonomy plural label */
|
702 |
+
, {
|
703 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Display %s on single posts', 'advanced-sidebar-menu'), taxonomy?.labels?.name.toLowerCase() ?? ''),
|
704 |
+
checked: !!attributes.single,
|
705 |
+
onChange: value => {
|
706 |
+
setAttributes({
|
707 |
+
single: !!value
|
708 |
+
});
|
709 |
+
}
|
710 |
+
}), 'widgets' === _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.currentScreen && attributes.single && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, {
|
711 |
+
/* translators: Selected taxonomy single label */
|
712 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Display each single post\'s %s', 'advanced-sidebar-menu'), taxonomy?.labels?.name.toLowerCase() ?? ''),
|
713 |
+
value: attributes.new_widget,
|
714 |
+
options: Object.entries(_globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.categories.displayEach).map(_ref2 => {
|
715 |
+
let [value, label] = _ref2;
|
716 |
+
return {
|
717 |
+
value,
|
718 |
+
label
|
719 |
+
};
|
720 |
+
})
|
721 |
+
/* eslint-disable-next-line camelcase */
|
722 |
+
,
|
723 |
+
onChange: new_widget => setAttributes({
|
724 |
+
new_widget
|
725 |
+
})
|
726 |
+
})), /*#__PURE__*/React.createElement("div", {
|
727 |
+
className: 'components-panel__body is-opened'
|
728 |
+
}, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Slot, {
|
729 |
+
name: "advanced-sidebar-menu/categories/general",
|
730 |
+
fillProps: fillProps
|
731 |
+
}), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.TextControl
|
732 |
+
/* translators: Selected post type plural label */
|
733 |
+
, {
|
734 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('%s to exclude (ids, comma separated)', 'advanced-sidebar-menu'), taxonomy?.labels?.name ?? ''),
|
735 |
+
value: attributes.exclude,
|
736 |
+
onChange: value => {
|
737 |
+
setAttributes({
|
738 |
+
exclude: value
|
739 |
+
});
|
740 |
+
}
|
741 |
+
}), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
|
742 |
+
href: _globals_config__WEBPACK_IMPORTED_MODULE_1__.CONFIG.docs.category,
|
743 |
+
target: "_blank",
|
744 |
+
rel: "noopener noreferrer"
|
745 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('block documentation', 'advanced-sidebar-menu')))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Slot, {
|
746 |
+
name: "advanced-sidebar-menu/categories/inspector",
|
747 |
+
fillProps: fillProps
|
748 |
+
}))), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
749 |
+
attributes: attributes,
|
750 |
+
block: name
|
751 |
+
}, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Slot, {
|
752 |
+
name: "advanced-sidebar-menu/categories/block-controls",
|
753 |
+
fillProps: fillProps
|
754 |
+
}))), /*#__PURE__*/React.createElement(_InfoPanel__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
755 |
+
clientId: clientId
|
756 |
+
}), /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
757 |
+
attributes: attributes,
|
758 |
+
block: name
|
759 |
+
}, /*#__PURE__*/React.createElement(_Preview__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
760 |
+
attributes: attributes,
|
761 |
+
block: _block__WEBPACK_IMPORTED_MODULE_5__.block.id,
|
762 |
+
clientId: clientId
|
763 |
+
})), /*#__PURE__*/React.createElement(_SideLoad__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
764 |
+
clientId: clientId
|
765 |
+
}));
|
766 |
+
};
|
767 |
+
|
768 |
+
/* harmony default export */ __webpack_exports__["default"] = (Edit);
|
769 |
+
|
770 |
+
/***/ }),
|
771 |
+
|
772 |
+
/***/ "./src/gutenberg/blocks/categories/block.tsx":
|
773 |
+
/*!***************************************************!*\
|
774 |
+
!*** ./src/gutenberg/blocks/categories/block.tsx ***!
|
775 |
+
\***************************************************/
|
776 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
777 |
+
|
778 |
+
"use strict";
|
779 |
+
__webpack_require__.r(__webpack_exports__);
|
780 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
781 |
+
/* harmony export */ "block": function() { return /* binding */ block; },
|
782 |
+
/* harmony export */ "name": function() { return /* binding */ name; },
|
783 |
+
/* harmony export */ "settings": function() { return /* binding */ settings; }
|
784 |
+
/* harmony export */ });
|
785 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../globals/config */ "./src/globals/config.ts");
|
786 |
+
/* harmony import */ var _Edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Edit */ "./src/gutenberg/blocks/categories/Edit.tsx");
|
787 |
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers */ "./src/gutenberg/helpers.ts");
|
788 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
789 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
790 |
+
|
791 |
+
|
792 |
+
|
793 |
+
|
794 |
+
/**
|
795 |
+
* Attributes specific to the widget as well as shared
|
796 |
+
* widget attributes.
|
797 |
+
*
|
798 |
+
* @see \Advanced_Sidebar_Menu\Blocks\Block_Abstract::get_all_attributes
|
799 |
+
* @see \Advanced_Sidebar_Menu\Blocks\Pages::get_attributes
|
800 |
+
*/
|
801 |
+
|
802 |
+
/**
|
803 |
+
* Attributes used for the example preview.
|
804 |
+
* Combines some PRO and basic attributes.
|
805 |
+
* The PRO attributes will only be sent if PRO is active.
|
806 |
+
*/
|
807 |
+
const EXAMPLE = {
|
808 |
+
'display-posts': 'all',
|
809 |
+
'display-posts/limit': 2,
|
810 |
+
apply_current_page_parent_styles_to_parent: true,
|
811 |
+
apply_current_page_styles_to_parent: true,
|
812 |
+
block_style: true,
|
813 |
+
border: true,
|
814 |
+
border_color: '#333',
|
815 |
+
bullet_style: 'none',
|
816 |
+
child_page_bg_color: '#666',
|
817 |
+
child_page_color: '#fff',
|
818 |
+
parent_page_bg_color: '#282828',
|
819 |
+
parent_page_color: '#0cc4c6',
|
820 |
+
parent_page_font_weight: 'normal',
|
821 |
+
display_all: true,
|
822 |
+
grandchild_page_bg_color: '#989898',
|
823 |
+
grandchild_page_color: '#282828',
|
824 |
+
grandchild_page_font_weight: 'bold',
|
825 |
+
include_childless_parent: true,
|
826 |
+
include_parent: true,
|
827 |
+
levels: '2'
|
828 |
+
};
|
829 |
+
const block = _globals_config__WEBPACK_IMPORTED_MODULE_0__.CONFIG.blocks.categories;
|
830 |
+
const name = block.id;
|
831 |
+
const settings = {
|
832 |
+
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Advanced Sidebar - Categories', 'advanced-sidebar-menu'),
|
833 |
+
icon: 'welcome-widgets-menus',
|
834 |
+
category: 'widgets',
|
835 |
+
example: {
|
836 |
+
attributes: EXAMPLE
|
837 |
+
},
|
838 |
+
transforms: {
|
839 |
+
from: [{
|
840 |
+
type: 'block',
|
841 |
+
blocks: ['core/legacy-widget'],
|
842 |
+
isMatch: _ref => {
|
843 |
+
let {
|
844 |
+
idBase,
|
845 |
+
instance
|
846 |
+
} = _ref;
|
847 |
+
|
848 |
+
if (!instance?.raw) {
|
849 |
+
// Can't transform if raw instance is not shown in REST API.
|
850 |
+
return false;
|
851 |
+
}
|
852 |
+
|
853 |
+
return 'advanced_sidebar_menu_category' === idBase;
|
854 |
+
},
|
855 |
+
transform: (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.transformLegacyWidget)(name)
|
856 |
+
}]
|
857 |
+
},
|
858 |
+
// `attributes` are registered server side because we use ServerSideRender.
|
859 |
+
// `supports` are registered server side for easy overrides.
|
860 |
+
edit: props => /*#__PURE__*/React.createElement(_Edit__WEBPACK_IMPORTED_MODULE_1__["default"], props),
|
861 |
+
save: () => null,
|
862 |
+
apiVersion: 2
|
863 |
+
};
|
864 |
+
|
865 |
+
/***/ }),
|
866 |
+
|
867 |
+
/***/ "./src/gutenberg/blocks/pages/Edit.tsx":
|
868 |
+
/*!*********************************************!*\
|
869 |
+
!*** ./src/gutenberg/blocks/pages/Edit.tsx ***!
|
870 |
+
\*********************************************/
|
871 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
872 |
+
|
873 |
+
"use strict";
|
874 |
+
__webpack_require__.r(__webpack_exports__);
|
875 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
876 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
877 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
878 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
879 |
+
/* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block */ "./src/gutenberg/blocks/pages/block.tsx");
|
880 |
+
/* harmony import */ var _Preview__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Preview */ "./src/gutenberg/blocks/Preview.tsx");
|
881 |
+
/* harmony import */ var _Display__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Display */ "./src/gutenberg/blocks/Display.tsx");
|
882 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
883 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
|
884 |
+
/* harmony import */ var _InfoPanel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../InfoPanel */ "./src/gutenberg/blocks/InfoPanel.tsx");
|
885 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../globals/config */ "./src/globals/config.ts");
|
886 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dompurify */ "./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js");
|
887 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_8__);
|
888 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
889 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
|
890 |
+
/* harmony import */ var _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../components/ErrorBoundary */ "./src/components/ErrorBoundary.tsx");
|
891 |
+
/* harmony import */ var _edit_pcss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./edit.pcss */ "./src/gutenberg/blocks/pages/edit.pcss");
|
892 |
+
/* harmony import */ var _SideLoad__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../SideLoad */ "./src/gutenberg/SideLoad.tsx");
|
893 |
+
|
894 |
+
|
895 |
+
|
896 |
+
|
897 |
+
|
898 |
+
|
899 |
+
|
900 |
+
|
901 |
+
|
902 |
+
|
903 |
+
|
904 |
+
|
905 |
+
|
906 |
+
|
907 |
+
/**
|
908 |
+
* Pages block content in the editor.
|
909 |
+
*/
|
910 |
+
const Edit = _ref => {
|
911 |
+
let {
|
912 |
+
attributes,
|
913 |
+
setAttributes,
|
914 |
+
clientId,
|
915 |
+
name
|
916 |
+
} = _ref;
|
917 |
+
const postType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(select => {
|
918 |
+
const type = select('core').getPostType(attributes.post_type ?? 'page');
|
919 |
+
return type ?? select('core').getPostType('page');
|
920 |
+
}, [attributes.post_type]); // We have a version conflict or license error.
|
921 |
+
|
922 |
+
if ('' !== _globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.error) {
|
923 |
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InspectorControls, null, /*#__PURE__*/React.createElement("div", {
|
924 |
+
className: _edit_pcss__WEBPACK_IMPORTED_MODULE_11__["default"].error,
|
925 |
+
dangerouslySetInnerHTML: {
|
926 |
+
__html: (0,dompurify__WEBPACK_IMPORTED_MODULE_8__.sanitize)(_globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.error)
|
927 |
+
}
|
928 |
+
})), /*#__PURE__*/React.createElement(_Preview__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
929 |
+
attributes: attributes,
|
930 |
+
block: _block__WEBPACK_IMPORTED_MODULE_2__.block.id,
|
931 |
+
clientId: clientId
|
932 |
+
}));
|
933 |
+
}
|
934 |
+
|
935 |
+
const fillProps = {
|
936 |
+
type: postType,
|
937 |
+
attributes,
|
938 |
+
name,
|
939 |
+
setAttributes,
|
940 |
+
clientId
|
941 |
+
};
|
942 |
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InspectorControls, null, /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
943 |
+
attributes: attributes,
|
944 |
+
block: name
|
945 |
+
}, ('widgets' === _globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.currentScreen || 'site-editor' === _globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.currentScreen || 'customize' === _globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.currentScreen) && /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
|
946 |
+
value: attributes.title ?? '',
|
947 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Title', 'advanced-sidebar-menu'),
|
948 |
+
onChange: title => setAttributes({
|
949 |
+
title
|
950 |
+
})
|
951 |
+
})), /*#__PURE__*/React.createElement(_Display__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
952 |
+
attributes: attributes,
|
953 |
+
clientId: clientId,
|
954 |
+
name: name,
|
955 |
+
setAttributes: setAttributes,
|
956 |
+
type: postType
|
957 |
+
}), /*#__PURE__*/React.createElement("div", {
|
958 |
+
className: 'components-panel__body is-opened'
|
959 |
+
}, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Slot, {
|
960 |
+
name: "advanced-sidebar-menu/pages/general",
|
961 |
+
fillProps: fillProps
|
962 |
+
}), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, {
|
963 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Order by', 'advanced-sidebar-menu'),
|
964 |
+
value: attributes.order_by,
|
965 |
+
labelPosition: 'side',
|
966 |
+
options: Object.entries(_globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.pages.orderBy).map(_ref2 => {
|
967 |
+
let [value, label] = _ref2;
|
968 |
+
return {
|
969 |
+
value,
|
970 |
+
label
|
971 |
+
};
|
972 |
+
}),
|
973 |
+
onChange: value => {
|
974 |
+
setAttributes({
|
975 |
+
order_by: value
|
976 |
+
});
|
977 |
+
}
|
978 |
+
}), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl
|
979 |
+
/* translators: Selected post type plural label */
|
980 |
+
, {
|
981 |
+
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('%s to exclude (ids, comma separated)', 'advanced-sidebar-menu'), postType?.labels?.name ?? ''),
|
982 |
+
value: attributes.exclude,
|
983 |
+
onChange: value => {
|
984 |
+
setAttributes({
|
985 |
+
exclude: value
|
986 |
+
});
|
987 |
+
}
|
988 |
+
}), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
|
989 |
+
href: _globals_config__WEBPACK_IMPORTED_MODULE_7__.CONFIG.docs.page,
|
990 |
+
target: "_blank",
|
991 |
+
rel: "noopener noreferrer"
|
992 |
+
}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('block documentation', 'advanced-sidebar-menu')))), /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Slot, {
|
993 |
+
name: "advanced-sidebar-menu/pages/inspector",
|
994 |
+
fillProps: fillProps
|
995 |
+
}))), /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.BlockControls, null, /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
996 |
+
attributes: attributes,
|
997 |
+
block: name
|
998 |
+
}, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Slot, {
|
999 |
+
name: "advanced-sidebar-menu/pages/block-controls",
|
1000 |
+
fillProps: fillProps
|
1001 |
+
}))), /*#__PURE__*/React.createElement(_InfoPanel__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
1002 |
+
clientId: clientId
|
1003 |
+
}), /*#__PURE__*/React.createElement(_components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
1004 |
+
attributes: attributes,
|
1005 |
+
block: name
|
1006 |
+
}, /*#__PURE__*/React.createElement(_Preview__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
1007 |
+
attributes: attributes,
|
1008 |
+
block: _block__WEBPACK_IMPORTED_MODULE_2__.block.id,
|
1009 |
+
clientId: clientId
|
1010 |
+
})), /*#__PURE__*/React.createElement(_SideLoad__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
1011 |
+
clientId: clientId
|
1012 |
+
}));
|
1013 |
+
};
|
1014 |
+
|
1015 |
+
/* harmony default export */ __webpack_exports__["default"] = (Edit);
|
1016 |
+
|
1017 |
+
/***/ }),
|
1018 |
+
|
1019 |
+
/***/ "./src/gutenberg/blocks/pages/block.tsx":
|
1020 |
+
/*!**********************************************!*\
|
1021 |
+
!*** ./src/gutenberg/blocks/pages/block.tsx ***!
|
1022 |
+
\**********************************************/
|
1023 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1024 |
+
|
1025 |
+
"use strict";
|
1026 |
+
__webpack_require__.r(__webpack_exports__);
|
1027 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1028 |
+
/* harmony export */ "block": function() { return /* binding */ block; },
|
1029 |
+
/* harmony export */ "name": function() { return /* binding */ name; },
|
1030 |
+
/* harmony export */ "settings": function() { return /* binding */ settings; }
|
1031 |
+
/* harmony export */ });
|
1032 |
+
/* harmony import */ var _globals_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../globals/config */ "./src/globals/config.ts");
|
1033 |
+
/* harmony import */ var _Edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Edit */ "./src/gutenberg/blocks/pages/Edit.tsx");
|
1034 |
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers */ "./src/gutenberg/helpers.ts");
|
1035 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1036 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
1037 |
+
|
1038 |
+
|
1039 |
+
|
1040 |
+
|
1041 |
+
/**
|
1042 |
+
* Attributes specific to the widget as well as shared
|
1043 |
+
* widget attributes.
|
1044 |
+
*
|
1045 |
+
* @see \Advanced_Sidebar_Menu\Blocks\Block_Abstract::get_all_attributes
|
1046 |
+
* @see \Advanced_Sidebar_Menu\Blocks\Pages::get_attributes
|
1047 |
+
*/
|
1048 |
+
|
1049 |
+
/**
|
1050 |
+
* Attributes used for the example preview.
|
1051 |
+
* Combines some PRO and basic attributes.
|
1052 |
+
* The PRO attributes will only be sent if PRO is active.
|
1053 |
+
*/
|
1054 |
+
const EXAMPLE = {
|
1055 |
+
include_parent: true,
|
1056 |
+
include_childless_parent: true,
|
1057 |
+
display_all: true,
|
1058 |
+
levels: '2',
|
1059 |
+
apply_current_page_styles_to_parent: true,
|
1060 |
+
apply_current_page_parent_styles_to_parent: true,
|
1061 |
+
block_style: true,
|
1062 |
+
border: true,
|
1063 |
+
border_color: '#333',
|
1064 |
+
bullet_style: 'none',
|
1065 |
+
parent_page_color: '#fff',
|
1066 |
+
parent_page_bg_color: '#666',
|
1067 |
+
child_page_color: '#fff',
|
1068 |
+
child_page_bg_color: '#666',
|
1069 |
+
grandchild_page_color: '#282828',
|
1070 |
+
grandchild_page_bg_color: '#989898',
|
1071 |
+
grandchild_page_font_weight: 'bold',
|
1072 |
+
current_page_color: '#0cc4c6',
|
1073 |
+
current_page_bg_color: '#282828',
|
1074 |
+
current_page_font_weight: 'normal',
|
1075 |
+
current_page_parent_bg_color: '#333'
|
1076 |
+
};
|
1077 |
+
const block = _globals_config__WEBPACK_IMPORTED_MODULE_0__.CONFIG.blocks.pages;
|
1078 |
+
const name = block.id;
|
1079 |
+
const settings = {
|
1080 |
+
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Advanced Sidebar - Pages', 'advanced-sidebar-menu'),
|
1081 |
+
icon: 'welcome-widgets-menus',
|
1082 |
+
category: 'widgets',
|
1083 |
+
example: {
|
1084 |
+
attributes: EXAMPLE
|
1085 |
+
},
|
1086 |
+
transforms: {
|
1087 |
+
from: [{
|
1088 |
+
type: 'block',
|
1089 |
+
blocks: ['core/legacy-widget'],
|
1090 |
+
isMatch: _ref => {
|
1091 |
+
let {
|
1092 |
+
idBase,
|
1093 |
+
instance
|
1094 |
+
} = _ref;
|
1095 |
+
|
1096 |
+
if (!instance?.raw) {
|
1097 |
+
// Can't transform if raw instance is not shown in REST API.
|
1098 |
+
return false;
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
return 'advanced_sidebar_menu' === idBase;
|
1102 |
+
},
|
1103 |
+
transform: (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.transformLegacyWidget)(name)
|
1104 |
+
}]
|
1105 |
+
},
|
1106 |
+
// `attributes` are registered server side because we use ServerSideRender.
|
1107 |
+
// `supports` are registered server side for easy overrides.
|
1108 |
+
edit: props => /*#__PURE__*/React.createElement(_Edit__WEBPACK_IMPORTED_MODULE_1__["default"], props),
|
1109 |
+
save: () => null,
|
1110 |
+
apiVersion: 2
|
1111 |
+
};
|
1112 |
+
|
1113 |
+
/***/ }),
|
1114 |
+
|
1115 |
+
/***/ "./src/gutenberg/helpers.ts":
|
1116 |
+
/*!**********************************!*\
|
1117 |
+
!*** ./src/gutenberg/helpers.ts ***!
|
1118 |
+
\**********************************/
|
1119 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1120 |
+
|
1121 |
+
"use strict";
|
1122 |
+
__webpack_require__.r(__webpack_exports__);
|
1123 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1124 |
+
/* harmony export */ "transformLegacyWidget": function() { return /* binding */ transformLegacyWidget; }
|
1125 |
+
/* harmony export */ });
|
1126 |
+
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
1127 |
+
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
1128 |
+
|
1129 |
+
|
1130 |
+
/**
|
1131 |
+
* Transform a legacy widget to the matching block.
|
1132 |
+
*
|
1133 |
+
*/
|
1134 |
+
const transformLegacyWidget = name => _ref => {
|
1135 |
+
let {
|
1136 |
+
instance
|
1137 |
+
} = _ref;
|
1138 |
+
return [(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)(name, translateLegacyWidget(instance.raw))];
|
1139 |
+
};
|
1140 |
+
/**
|
1141 |
+
* Translate the widget's "checked" to the boolean
|
1142 |
+
* version used in the block.
|
1143 |
+
*
|
1144 |
+
*/
|
1145 |
+
|
1146 |
+
const translateLegacyWidget = settings => {
|
1147 |
+
Object.entries(settings).forEach(_ref2 => {
|
1148 |
+
let [key, value] = _ref2;
|
1149 |
+
|
1150 |
+
if ('checked' === value) {
|
1151 |
+
settings[key] = true;
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
if ('object' === typeof value) {
|
1155 |
+
translateLegacyWidget(settings[key]);
|
1156 |
+
} // Old widgets used to use "0" for some defaults.
|
1157 |
+
|
1158 |
+
|
1159 |
+
if ('0' === value) {
|
1160 |
+
delete settings[key];
|
1161 |
+
}
|
1162 |
+
});
|
1163 |
+
return settings;
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
/***/ }),
|
1167 |
+
|
1168 |
+
/***/ "./src/gutenberg/index.ts":
|
1169 |
+
/*!********************************!*\
|
1170 |
+
!*** ./src/gutenberg/index.ts ***!
|
1171 |
+
\********************************/
|
1172 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1173 |
+
|
1174 |
+
"use strict";
|
1175 |
+
__webpack_require__.r(__webpack_exports__);
|
1176 |
+
/* harmony import */ var _lipemat_js_boilerplate_gutenberg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lipemat/js-boilerplate-gutenberg */ "./.yarn/__virtual__/@lipemat-js-boilerplate-gutenberg-virtual-6ce9f74a52/0/cache/@lipemat-js-boilerplate-gutenberg-npm-2.9.5-b01ffe5a8b-6d75996942.zip/node_modules/@lipemat/js-boilerplate-gutenberg/dist/index.module.js");
|
1177 |
+
/* harmony import */ var _blocks_Preview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blocks/Preview */ "./src/gutenberg/blocks/Preview.tsx");
|
1178 |
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/gutenberg/helpers.ts");
|
1179 |
+
/* harmony import */ var _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/ErrorBoundary */ "./src/components/ErrorBoundary.tsx");
|
1180 |
+
/* module decorator */ module = __webpack_require__.hmd(module);
|
1181 |
+
|
1182 |
+
|
1183 |
+
|
1184 |
+
|
1185 |
+
/**
|
1186 |
+
* Use our custom autoloader to automatically require,
|
1187 |
+
* register and add HMR support to Gutenberg related items.
|
1188 |
+
*
|
1189 |
+
* Will load from specified directory recursively.
|
1190 |
+
*/
|
1191 |
+
|
1192 |
+
/* harmony default export */ __webpack_exports__["default"] = (() => {
|
1193 |
+
// Load all blocks
|
1194 |
+
(0,_lipemat_js_boilerplate_gutenberg__WEBPACK_IMPORTED_MODULE_3__.autoloadBlocks)(() => __webpack_require__("./src/gutenberg/blocks sync recursive block\\.tsx$"), module); // Expose helpers and Preview component to window, so we can use them in PRO.
|
1195 |
+
|
1196 |
+
window.ADVANCED_SIDEBAR_MENU.ErrorBoundary = _components_ErrorBoundary__WEBPACK_IMPORTED_MODULE_2__["default"];
|
1197 |
+
window.ADVANCED_SIDEBAR_MENU.Preview = _blocks_Preview__WEBPACK_IMPORTED_MODULE_0__["default"];
|
1198 |
+
window.ADVANCED_SIDEBAR_MENU.transformLegacyWidget = _helpers__WEBPACK_IMPORTED_MODULE_1__.transformLegacyWidget;
|
1199 |
+
});
|
1200 |
+
|
1201 |
+
/***/ }),
|
1202 |
+
|
1203 |
+
/***/ "./src/gutenberg/blocks/info-panel.pcss":
|
1204 |
+
/*!**********************************************!*\
|
1205 |
+
!*** ./src/gutenberg/blocks/info-panel.pcss ***!
|
1206 |
+
\**********************************************/
|
1207 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1208 |
+
|
1209 |
+
"use strict";
|
1210 |
+
__webpack_require__.r(__webpack_exports__);
|
1211 |
+
// extracted by mini-css-extract-plugin
|
1212 |
+
/* harmony default export */ __webpack_exports__["default"] = ({"wrap":"info-panel__wrap__YT","button":"info-panel__button__PN"});
|
1213 |
+
|
1214 |
+
/***/ }),
|
1215 |
+
|
1216 |
+
/***/ "./src/gutenberg/blocks/pages/edit.pcss":
|
1217 |
+
/*!**********************************************!*\
|
1218 |
+
!*** ./src/gutenberg/blocks/pages/edit.pcss ***!
|
1219 |
+
\**********************************************/
|
1220 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1221 |
+
|
1222 |
+
"use strict";
|
1223 |
+
__webpack_require__.r(__webpack_exports__);
|
1224 |
+
// extracted by mini-css-extract-plugin
|
1225 |
+
/* harmony default export */ __webpack_exports__["default"] = ({"error":"edit__error___h"});
|
1226 |
+
|
1227 |
+
/***/ }),
|
1228 |
+
|
1229 |
+
/***/ "./src/gutenberg/blocks/preview.pcss":
|
1230 |
+
/*!*******************************************!*\
|
1231 |
+
!*** ./src/gutenberg/blocks/preview.pcss ***!
|
1232 |
+
\*******************************************/
|
1233 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1234 |
+
|
1235 |
+
"use strict";
|
1236 |
+
__webpack_require__.r(__webpack_exports__);
|
1237 |
+
// extracted by mini-css-extract-plugin
|
1238 |
+
/* harmony default export */ __webpack_exports__["default"] = ({"placeholder":"preview__placeholder__QP","error":"preview__error__xF","spin-wrap":"preview__spin-wrap__Jr","spinWrap":"preview__spin-wrap__Jr","spin":"preview__spin__A4","spin-content":"preview__spin-content__Yg","spinContent":"preview__spin-content__Yg"});
|
1239 |
+
|
1240 |
+
/***/ }),
|
1241 |
+
|
1242 |
+
/***/ "./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js":
|
1243 |
+
/*!**********************************************************************************************************!*\
|
1244 |
+
!*** ./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js ***!
|
1245 |
+
\**********************************************************************************************************/
|
1246 |
+
/***/ (function(module) {
|
1247 |
+
|
1248 |
+
/*! @license DOMPurify 2.3.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.10/LICENSE */
|
1249 |
+
|
1250 |
+
(function (global, factory) {
|
1251 |
+
true ? module.exports = factory() :
|
1252 |
+
0;
|
1253 |
+
})(this, (function () { 'use strict';
|
1254 |
+
|
1255 |
+
function _typeof(obj) {
|
1256 |
+
"@babel/helpers - typeof";
|
1257 |
+
|
1258 |
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
1259 |
+
return typeof obj;
|
1260 |
+
} : function (obj) {
|
1261 |
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1262 |
+
}, _typeof(obj);
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
function _setPrototypeOf(o, p) {
|
1266 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
1267 |
+
o.__proto__ = p;
|
1268 |
+
return o;
|
1269 |
+
};
|
1270 |
+
|
1271 |
+
return _setPrototypeOf(o, p);
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
function _isNativeReflectConstruct() {
|
1275 |
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
1276 |
+
if (Reflect.construct.sham) return false;
|
1277 |
+
if (typeof Proxy === "function") return true;
|
1278 |
+
|
1279 |
+
try {
|
1280 |
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
1281 |
+
return true;
|
1282 |
+
} catch (e) {
|
1283 |
+
return false;
|
1284 |
+
}
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
function _construct(Parent, args, Class) {
|
1288 |
+
if (_isNativeReflectConstruct()) {
|
1289 |
+
_construct = Reflect.construct;
|
1290 |
+
} else {
|
1291 |
+
_construct = function _construct(Parent, args, Class) {
|
1292 |
+
var a = [null];
|
1293 |
+
a.push.apply(a, args);
|
1294 |
+
var Constructor = Function.bind.apply(Parent, a);
|
1295 |
+
var instance = new Constructor();
|
1296 |
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
1297 |
+
return instance;
|
1298 |
+
};
|
1299 |
+
}
|
1300 |
+
|
1301 |
+
return _construct.apply(null, arguments);
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
function _toConsumableArray(arr) {
|
1305 |
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
function _arrayWithoutHoles(arr) {
|
1309 |
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
function _iterableToArray(iter) {
|
1313 |
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
1314 |
+
}
|
1315 |
+
|
1316 |
+
function _unsupportedIterableToArray(o, minLen) {
|
1317 |
+
if (!o) return;
|
1318 |
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
1319 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1320 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1321 |
+
if (n === "Map" || n === "Set") return Array.from(o);
|
1322 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
function _arrayLikeToArray(arr, len) {
|
1326 |
+
if (len == null || len > arr.length) len = arr.length;
|
1327 |
+
|
1328 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1329 |
+
|
1330 |
+
return arr2;
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
function _nonIterableSpread() {
|
1334 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
var hasOwnProperty = Object.hasOwnProperty,
|
1338 |
+
setPrototypeOf = Object.setPrototypeOf,
|
1339 |
+
isFrozen = Object.isFrozen,
|
1340 |
+
getPrototypeOf = Object.getPrototypeOf,
|
1341 |
+
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
1342 |
+
var freeze = Object.freeze,
|
1343 |
+
seal = Object.seal,
|
1344 |
+
create = Object.create; // eslint-disable-line import/no-mutable-exports
|
1345 |
+
|
1346 |
+
var _ref = typeof Reflect !== 'undefined' && Reflect,
|
1347 |
+
apply = _ref.apply,
|
1348 |
+
construct = _ref.construct;
|
1349 |
+
|
1350 |
+
if (!apply) {
|
1351 |
+
apply = function apply(fun, thisValue, args) {
|
1352 |
+
return fun.apply(thisValue, args);
|
1353 |
+
};
|
1354 |
+
}
|
1355 |
+
|
1356 |
+
if (!freeze) {
|
1357 |
+
freeze = function freeze(x) {
|
1358 |
+
return x;
|
1359 |
+
};
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
if (!seal) {
|
1363 |
+
seal = function seal(x) {
|
1364 |
+
return x;
|
1365 |
+
};
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
if (!construct) {
|
1369 |
+
construct = function construct(Func, args) {
|
1370 |
+
return _construct(Func, _toConsumableArray(args));
|
1371 |
+
};
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
var arrayForEach = unapply(Array.prototype.forEach);
|
1375 |
+
var arrayPop = unapply(Array.prototype.pop);
|
1376 |
+
var arrayPush = unapply(Array.prototype.push);
|
1377 |
+
var stringToLowerCase = unapply(String.prototype.toLowerCase);
|
1378 |
+
var stringMatch = unapply(String.prototype.match);
|
1379 |
+
var stringReplace = unapply(String.prototype.replace);
|
1380 |
+
var stringIndexOf = unapply(String.prototype.indexOf);
|
1381 |
+
var stringTrim = unapply(String.prototype.trim);
|
1382 |
+
var regExpTest = unapply(RegExp.prototype.test);
|
1383 |
+
var typeErrorCreate = unconstruct(TypeError);
|
1384 |
+
function unapply(func) {
|
1385 |
+
return function (thisArg) {
|
1386 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1387 |
+
args[_key - 1] = arguments[_key];
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
return apply(func, thisArg, args);
|
1391 |
+
};
|
1392 |
+
}
|
1393 |
+
function unconstruct(func) {
|
1394 |
+
return function () {
|
1395 |
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
1396 |
+
args[_key2] = arguments[_key2];
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
return construct(func, args);
|
1400 |
+
};
|
1401 |
+
}
|
1402 |
+
/* Add properties to a lookup table */
|
1403 |
+
|
1404 |
+
function addToSet(set, array, transformCaseFunc) {
|
1405 |
+
transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;
|
1406 |
+
|
1407 |
+
if (setPrototypeOf) {
|
1408 |
+
// Make 'in' and truthy checks like Boolean(set.constructor)
|
1409 |
+
// independent of any properties defined on Object.prototype.
|
1410 |
+
// Prevent prototype setters from intercepting set as a this value.
|
1411 |
+
setPrototypeOf(set, null);
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
var l = array.length;
|
1415 |
+
|
1416 |
+
while (l--) {
|
1417 |
+
var element = array[l];
|
1418 |
+
|
1419 |
+
if (typeof element === 'string') {
|
1420 |
+
var lcElement = transformCaseFunc(element);
|
1421 |
+
|
1422 |
+
if (lcElement !== element) {
|
1423 |
+
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
1424 |
+
if (!isFrozen(array)) {
|
1425 |
+
array[l] = lcElement;
|
1426 |
+
}
|
1427 |
+
|
1428 |
+
element = lcElement;
|
1429 |
+
}
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
set[element] = true;
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
return set;
|
1436 |
+
}
|
1437 |
+
/* Shallow clone an object */
|
1438 |
+
|
1439 |
+
function clone(object) {
|
1440 |
+
var newObject = create(null);
|
1441 |
+
var property;
|
1442 |
+
|
1443 |
+
for (property in object) {
|
1444 |
+
if (apply(hasOwnProperty, object, [property])) {
|
1445 |
+
newObject[property] = object[property];
|
1446 |
+
}
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
return newObject;
|
1450 |
+
}
|
1451 |
+
/* IE10 doesn't support __lookupGetter__ so lets'
|
1452 |
+
* simulate it. It also automatically checks
|
1453 |
+
* if the prop is function or getter and behaves
|
1454 |
+
* accordingly. */
|
1455 |
+
|
1456 |
+
function lookupGetter(object, prop) {
|
1457 |
+
while (object !== null) {
|
1458 |
+
var desc = getOwnPropertyDescriptor(object, prop);
|
1459 |
+
|
1460 |
+
if (desc) {
|
1461 |
+
if (desc.get) {
|
1462 |
+
return unapply(desc.get);
|
1463 |
+
}
|
1464 |
+
|
1465 |
+
if (typeof desc.value === 'function') {
|
1466 |
+
return unapply(desc.value);
|
1467 |
+
}
|
1468 |
+
}
|
1469 |
+
|
1470 |
+
object = getPrototypeOf(object);
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
function fallbackValue(element) {
|
1474 |
+
console.warn('fallback value for', element);
|
1475 |
+
return null;
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
return fallbackValue;
|
1479 |
+
}
|
1480 |
+
|
1481 |
+
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
|
1482 |
+
|
1483 |
+
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']);
|
1484 |
+
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.
|
1485 |
+
// We still need to know them so that we can do namespace
|
1486 |
+
// checks properly in case one wants to add them to
|
1487 |
+
// allow-list.
|
1488 |
+
|
1489 |
+
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']);
|
1490 |
+
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,
|
1491 |
+
// even those that we disallow by default.
|
1492 |
+
|
1493 |
+
var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
1494 |
+
var text = freeze(['#text']);
|
1495 |
+
|
1496 |
+
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']);
|
1497 |
+
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']);
|
1498 |
+
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']);
|
1499 |
+
var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
1500 |
+
|
1501 |
+
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
1502 |
+
|
1503 |
+
var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
1504 |
+
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
|
1505 |
+
|
1506 |
+
var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
1507 |
+
|
1508 |
+
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
|
1509 |
+
);
|
1510 |
+
var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
1511 |
+
var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
1512 |
+
);
|
1513 |
+
var DOCTYPE_NAME = seal(/^html$/i);
|
1514 |
+
|
1515 |
+
var getGlobal = function getGlobal() {
|
1516 |
+
return typeof window === 'undefined' ? null : window;
|
1517 |
+
};
|
1518 |
+
/**
|
1519 |
+
* Creates a no-op policy for internal use only.
|
1520 |
+
* Don't export this function outside this module!
|
1521 |
+
* @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
|
1522 |
+
* @param {Document} document The document object (to determine policy name suffix)
|
1523 |
+
* @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
|
1524 |
+
* are not supported).
|
1525 |
+
*/
|
1526 |
+
|
1527 |
+
|
1528 |
+
var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
|
1529 |
+
if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
1530 |
+
return null;
|
1531 |
+
} // Allow the callers to control the unique policy name
|
1532 |
+
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
1533 |
+
// Policy creation with duplicate names throws in Trusted Types.
|
1534 |
+
|
1535 |
+
|
1536 |
+
var suffix = null;
|
1537 |
+
var ATTR_NAME = 'data-tt-policy-suffix';
|
1538 |
+
|
1539 |
+
if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
|
1540 |
+
suffix = document.currentScript.getAttribute(ATTR_NAME);
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
|
1544 |
+
|
1545 |
+
try {
|
1546 |
+
return trustedTypes.createPolicy(policyName, {
|
1547 |
+
createHTML: function createHTML(html) {
|
1548 |
+
return html;
|
1549 |
+
},
|
1550 |
+
createScriptURL: function createScriptURL(scriptUrl) {
|
1551 |
+
return scriptUrl;
|
1552 |
+
}
|
1553 |
+
});
|
1554 |
+
} catch (_) {
|
1555 |
+
// Policy creation failed (most likely another DOMPurify script has
|
1556 |
+
// already run). Skip creating the policy, as this will only cause errors
|
1557 |
+
// if TT are enforced.
|
1558 |
+
console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
|
1559 |
+
return null;
|
1560 |
+
}
|
1561 |
+
};
|
1562 |
+
|
1563 |
+
function createDOMPurify() {
|
1564 |
+
var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
1565 |
+
|
1566 |
+
var DOMPurify = function DOMPurify(root) {
|
1567 |
+
return createDOMPurify(root);
|
1568 |
+
};
|
1569 |
+
/**
|
1570 |
+
* Version label, exposed for easier checks
|
1571 |
+
* if DOMPurify is up to date or not
|
1572 |
+
*/
|
1573 |
+
|
1574 |
+
|
1575 |
+
DOMPurify.version = '2.3.10';
|
1576 |
+
/**
|
1577 |
+
* Array of elements that DOMPurify removed during sanitation.
|
1578 |
+
* Empty if nothing was removed.
|
1579 |
+
*/
|
1580 |
+
|
1581 |
+
DOMPurify.removed = [];
|
1582 |
+
|
1583 |
+
if (!window || !window.document || window.document.nodeType !== 9) {
|
1584 |
+
// Not running in a browser, provide a factory function
|
1585 |
+
// so that you can pass your own Window
|
1586 |
+
DOMPurify.isSupported = false;
|
1587 |
+
return DOMPurify;
|
1588 |
+
}
|
1589 |
+
|
1590 |
+
var originalDocument = window.document;
|
1591 |
+
var document = window.document;
|
1592 |
+
var DocumentFragment = window.DocumentFragment,
|
1593 |
+
HTMLTemplateElement = window.HTMLTemplateElement,
|
1594 |
+
Node = window.Node,
|
1595 |
+
Element = window.Element,
|
1596 |
+
NodeFilter = window.NodeFilter,
|
1597 |
+
_window$NamedNodeMap = window.NamedNodeMap,
|
1598 |
+
NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
|
1599 |
+
HTMLFormElement = window.HTMLFormElement,
|
1600 |
+
DOMParser = window.DOMParser,
|
1601 |
+
trustedTypes = window.trustedTypes;
|
1602 |
+
var ElementPrototype = Element.prototype;
|
1603 |
+
var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
|
1604 |
+
var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
|
1605 |
+
var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
|
1606 |
+
var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a
|
1607 |
+
// new document created via createHTMLDocument. As per the spec
|
1608 |
+
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
1609 |
+
// a new empty registry is used when creating a template contents owner
|
1610 |
+
// document, so we use that as our parent document to ensure nothing
|
1611 |
+
// is inherited.
|
1612 |
+
|
1613 |
+
if (typeof HTMLTemplateElement === 'function') {
|
1614 |
+
var template = document.createElement('template');
|
1615 |
+
|
1616 |
+
if (template.content && template.content.ownerDocument) {
|
1617 |
+
document = template.content.ownerDocument;
|
1618 |
+
}
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
|
1622 |
+
|
1623 |
+
var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';
|
1624 |
+
var _document = document,
|
1625 |
+
implementation = _document.implementation,
|
1626 |
+
createNodeIterator = _document.createNodeIterator,
|
1627 |
+
createDocumentFragment = _document.createDocumentFragment,
|
1628 |
+
getElementsByTagName = _document.getElementsByTagName;
|
1629 |
+
var importNode = originalDocument.importNode;
|
1630 |
+
var documentMode = {};
|
1631 |
+
|
1632 |
+
try {
|
1633 |
+
documentMode = clone(document).documentMode ? document.documentMode : {};
|
1634 |
+
} catch (_) {}
|
1635 |
+
|
1636 |
+
var hooks = {};
|
1637 |
+
/**
|
1638 |
+
* Expose whether this browser supports running the full DOMPurify.
|
1639 |
+
*/
|
1640 |
+
|
1641 |
+
DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
|
1642 |
+
var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
|
1643 |
+
ERB_EXPR$1 = ERB_EXPR,
|
1644 |
+
DATA_ATTR$1 = DATA_ATTR,
|
1645 |
+
ARIA_ATTR$1 = ARIA_ATTR,
|
1646 |
+
IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
|
1647 |
+
ATTR_WHITESPACE$1 = ATTR_WHITESPACE;
|
1648 |
+
var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
|
1649 |
+
/**
|
1650 |
+
* We consider the elements and attributes below to be safe. Ideally
|
1651 |
+
* don't add any new ones but feel free to remove unwanted ones.
|
1652 |
+
*/
|
1653 |
+
|
1654 |
+
/* allowed element names */
|
1655 |
+
|
1656 |
+
var ALLOWED_TAGS = null;
|
1657 |
+
var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));
|
1658 |
+
/* Allowed attribute names */
|
1659 |
+
|
1660 |
+
var ALLOWED_ATTR = null;
|
1661 |
+
var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));
|
1662 |
+
/*
|
1663 |
+
* Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
|
1664 |
+
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
1665 |
+
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
1666 |
+
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
1667 |
+
*/
|
1668 |
+
|
1669 |
+
var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
|
1670 |
+
tagNameCheck: {
|
1671 |
+
writable: true,
|
1672 |
+
configurable: false,
|
1673 |
+
enumerable: true,
|
1674 |
+
value: null
|
1675 |
+
},
|
1676 |
+
attributeNameCheck: {
|
1677 |
+
writable: true,
|
1678 |
+
configurable: false,
|
1679 |
+
enumerable: true,
|
1680 |
+
value: null
|
1681 |
+
},
|
1682 |
+
allowCustomizedBuiltInElements: {
|
1683 |
+
writable: true,
|
1684 |
+
configurable: false,
|
1685 |
+
enumerable: true,
|
1686 |
+
value: false
|
1687 |
+
}
|
1688 |
+
}));
|
1689 |
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
1690 |
+
|
1691 |
+
var FORBID_TAGS = null;
|
1692 |
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
1693 |
+
|
1694 |
+
var FORBID_ATTR = null;
|
1695 |
+
/* Decide if ARIA attributes are okay */
|
1696 |
+
|
1697 |
+
var ALLOW_ARIA_ATTR = true;
|
1698 |
+
/* Decide if custom data attributes are okay */
|
1699 |
+
|
1700 |
+
var ALLOW_DATA_ATTR = true;
|
1701 |
+
/* Decide if unknown protocols are okay */
|
1702 |
+
|
1703 |
+
var ALLOW_UNKNOWN_PROTOCOLS = false;
|
1704 |
+
/* Output should be safe for common template engines.
|
1705 |
+
* This means, DOMPurify removes data attributes, mustaches and ERB
|
1706 |
+
*/
|
1707 |
+
|
1708 |
+
var SAFE_FOR_TEMPLATES = false;
|
1709 |
+
/* Decide if document with <html>... should be returned */
|
1710 |
+
|
1711 |
+
var WHOLE_DOCUMENT = false;
|
1712 |
+
/* Track whether config is already set on this instance of DOMPurify. */
|
1713 |
+
|
1714 |
+
var SET_CONFIG = false;
|
1715 |
+
/* Decide if all elements (e.g. style, script) must be children of
|
1716 |
+
* document.body. By default, browsers might move them to document.head */
|
1717 |
+
|
1718 |
+
var FORCE_BODY = false;
|
1719 |
+
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
1720 |
+
* string (or a TrustedHTML object if Trusted Types are supported).
|
1721 |
+
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
1722 |
+
*/
|
1723 |
+
|
1724 |
+
var RETURN_DOM = false;
|
1725 |
+
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
1726 |
+
* string (or a TrustedHTML object if Trusted Types are supported) */
|
1727 |
+
|
1728 |
+
var RETURN_DOM_FRAGMENT = false;
|
1729 |
+
/* Try to return a Trusted Type object instead of a string, return a string in
|
1730 |
+
* case Trusted Types are not supported */
|
1731 |
+
|
1732 |
+
var RETURN_TRUSTED_TYPE = false;
|
1733 |
+
/* Output should be free from DOM clobbering attacks? */
|
1734 |
+
|
1735 |
+
var SANITIZE_DOM = true;
|
1736 |
+
/* Keep element content when removing element? */
|
1737 |
+
|
1738 |
+
var KEEP_CONTENT = true;
|
1739 |
+
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
1740 |
+
* of importing it into a new Document and returning a sanitized copy */
|
1741 |
+
|
1742 |
+
var IN_PLACE = false;
|
1743 |
+
/* Allow usage of profiles like html, svg and mathMl */
|
1744 |
+
|
1745 |
+
var USE_PROFILES = {};
|
1746 |
+
/* Tags to ignore content of when KEEP_CONTENT is true */
|
1747 |
+
|
1748 |
+
var FORBID_CONTENTS = null;
|
1749 |
+
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']);
|
1750 |
+
/* Tags that are safe for data: URIs */
|
1751 |
+
|
1752 |
+
var DATA_URI_TAGS = null;
|
1753 |
+
var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
1754 |
+
/* Attributes safe for values like "javascript:" */
|
1755 |
+
|
1756 |
+
var URI_SAFE_ATTRIBUTES = null;
|
1757 |
+
var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
|
1758 |
+
var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
1759 |
+
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
1760 |
+
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
1761 |
+
/* Document namespace */
|
1762 |
+
|
1763 |
+
var NAMESPACE = HTML_NAMESPACE;
|
1764 |
+
var IS_EMPTY_INPUT = false;
|
1765 |
+
/* Parsing of strict XHTML documents */
|
1766 |
+
|
1767 |
+
var PARSER_MEDIA_TYPE;
|
1768 |
+
var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
1769 |
+
var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
1770 |
+
var transformCaseFunc;
|
1771 |
+
/* Keep a reference to config to pass to hooks */
|
1772 |
+
|
1773 |
+
var CONFIG = null;
|
1774 |
+
/* Ideally, do not touch anything below this line */
|
1775 |
+
|
1776 |
+
/* ______________________________________________ */
|
1777 |
+
|
1778 |
+
var formElement = document.createElement('form');
|
1779 |
+
|
1780 |
+
var isRegexOrFunction = function isRegexOrFunction(testValue) {
|
1781 |
+
return testValue instanceof RegExp || testValue instanceof Function;
|
1782 |
+
};
|
1783 |
+
/**
|
1784 |
+
* _parseConfig
|
1785 |
+
*
|
1786 |
+
* @param {Object} cfg optional config literal
|
1787 |
+
*/
|
1788 |
+
// eslint-disable-next-line complexity
|
1789 |
+
|
1790 |
+
|
1791 |
+
var _parseConfig = function _parseConfig(cfg) {
|
1792 |
+
if (CONFIG && CONFIG === cfg) {
|
1793 |
+
return;
|
1794 |
+
}
|
1795 |
+
/* Shield configuration object from tampering */
|
1796 |
+
|
1797 |
+
|
1798 |
+
if (!cfg || _typeof(cfg) !== 'object') {
|
1799 |
+
cfg = {};
|
1800 |
+
}
|
1801 |
+
/* Shield configuration object from prototype pollution */
|
1802 |
+
|
1803 |
+
|
1804 |
+
cfg = clone(cfg);
|
1805 |
+
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
1806 |
+
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.
|
1807 |
+
|
1808 |
+
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {
|
1809 |
+
return x;
|
1810 |
+
} : stringToLowerCase;
|
1811 |
+
/* Set configuration parameters */
|
1812 |
+
|
1813 |
+
ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
1814 |
+
ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
1815 |
+
URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent
|
1816 |
+
cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent
|
1817 |
+
transformCaseFunc // eslint-disable-line indent
|
1818 |
+
) // eslint-disable-line indent
|
1819 |
+
: DEFAULT_URI_SAFE_ATTRIBUTES;
|
1820 |
+
DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent
|
1821 |
+
cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent
|
1822 |
+
transformCaseFunc // eslint-disable-line indent
|
1823 |
+
) // eslint-disable-line indent
|
1824 |
+
: DEFAULT_DATA_URI_TAGS;
|
1825 |
+
FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
1826 |
+
FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
1827 |
+
FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
1828 |
+
USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
|
1829 |
+
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
1830 |
+
|
1831 |
+
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
1832 |
+
|
1833 |
+
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
|
1834 |
+
|
1835 |
+
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
|
1836 |
+
|
1837 |
+
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
|
1838 |
+
|
1839 |
+
RETURN_DOM = cfg.RETURN_DOM || false; // Default false
|
1840 |
+
|
1841 |
+
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
|
1842 |
+
|
1843 |
+
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
|
1844 |
+
|
1845 |
+
FORCE_BODY = cfg.FORCE_BODY || false; // Default false
|
1846 |
+
|
1847 |
+
SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
|
1848 |
+
|
1849 |
+
KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
|
1850 |
+
|
1851 |
+
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
1852 |
+
|
1853 |
+
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;
|
1854 |
+
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
1855 |
+
|
1856 |
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
1857 |
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
1858 |
+
}
|
1859 |
+
|
1860 |
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
1861 |
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
|
1865 |
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
if (SAFE_FOR_TEMPLATES) {
|
1869 |
+
ALLOW_DATA_ATTR = false;
|
1870 |
+
}
|
1871 |
+
|
1872 |
+
if (RETURN_DOM_FRAGMENT) {
|
1873 |
+
RETURN_DOM = true;
|
1874 |
+
}
|
1875 |
+
/* Parse profile info */
|
1876 |
+
|
1877 |
+
|
1878 |
+
if (USE_PROFILES) {
|
1879 |
+
ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));
|
1880 |
+
ALLOWED_ATTR = [];
|
1881 |
+
|
1882 |
+
if (USE_PROFILES.html === true) {
|
1883 |
+
addToSet(ALLOWED_TAGS, html$1);
|
1884 |
+
addToSet(ALLOWED_ATTR, html);
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
if (USE_PROFILES.svg === true) {
|
1888 |
+
addToSet(ALLOWED_TAGS, svg$1);
|
1889 |
+
addToSet(ALLOWED_ATTR, svg);
|
1890 |
+
addToSet(ALLOWED_ATTR, xml);
|
1891 |
+
}
|
1892 |
+
|
1893 |
+
if (USE_PROFILES.svgFilters === true) {
|
1894 |
+
addToSet(ALLOWED_TAGS, svgFilters);
|
1895 |
+
addToSet(ALLOWED_ATTR, svg);
|
1896 |
+
addToSet(ALLOWED_ATTR, xml);
|
1897 |
+
}
|
1898 |
+
|
1899 |
+
if (USE_PROFILES.mathMl === true) {
|
1900 |
+
addToSet(ALLOWED_TAGS, mathMl$1);
|
1901 |
+
addToSet(ALLOWED_ATTR, mathMl);
|
1902 |
+
addToSet(ALLOWED_ATTR, xml);
|
1903 |
+
}
|
1904 |
+
}
|
1905 |
+
/* Merge configuration parameters */
|
1906 |
+
|
1907 |
+
|
1908 |
+
if (cfg.ADD_TAGS) {
|
1909 |
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
1910 |
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
1911 |
+
}
|
1912 |
+
|
1913 |
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
if (cfg.ADD_ATTR) {
|
1917 |
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
1918 |
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
1919 |
+
}
|
1920 |
+
|
1921 |
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
1922 |
+
}
|
1923 |
+
|
1924 |
+
if (cfg.ADD_URI_SAFE_ATTR) {
|
1925 |
+
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
if (cfg.FORBID_CONTENTS) {
|
1929 |
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
1930 |
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
1934 |
+
}
|
1935 |
+
/* Add #text in case KEEP_CONTENT is set to true */
|
1936 |
+
|
1937 |
+
|
1938 |
+
if (KEEP_CONTENT) {
|
1939 |
+
ALLOWED_TAGS['#text'] = true;
|
1940 |
+
}
|
1941 |
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
1942 |
+
|
1943 |
+
|
1944 |
+
if (WHOLE_DOCUMENT) {
|
1945 |
+
addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
|
1946 |
+
}
|
1947 |
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
1948 |
+
|
1949 |
+
|
1950 |
+
if (ALLOWED_TAGS.table) {
|
1951 |
+
addToSet(ALLOWED_TAGS, ['tbody']);
|
1952 |
+
delete FORBID_TAGS.tbody;
|
1953 |
+
} // Prevent further manipulation of configuration.
|
1954 |
+
// Not available in IE8, Safari 5, etc.
|
1955 |
+
|
1956 |
+
|
1957 |
+
if (freeze) {
|
1958 |
+
freeze(cfg);
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
CONFIG = cfg;
|
1962 |
+
};
|
1963 |
+
|
1964 |
+
var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
|
1965 |
+
var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML
|
1966 |
+
// namespace. We need to specify them explicitly
|
1967 |
+
// so that they don't get erroneously deleted from
|
1968 |
+
// HTML namespace.
|
1969 |
+
|
1970 |
+
var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
|
1971 |
+
/* Keep track of all possible SVG and MathML tags
|
1972 |
+
* so that we can perform the namespace checks
|
1973 |
+
* correctly. */
|
1974 |
+
|
1975 |
+
var ALL_SVG_TAGS = addToSet({}, svg$1);
|
1976 |
+
addToSet(ALL_SVG_TAGS, svgFilters);
|
1977 |
+
addToSet(ALL_SVG_TAGS, svgDisallowed);
|
1978 |
+
var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
|
1979 |
+
addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
|
1980 |
+
/**
|
1981 |
+
*
|
1982 |
+
*
|
1983 |
+
* @param {Element} element a DOM element whose namespace is being checked
|
1984 |
+
* @returns {boolean} Return false if the element has a
|
1985 |
+
* namespace that a spec-compliant parser would never
|
1986 |
+
* return. Return true otherwise.
|
1987 |
+
*/
|
1988 |
+
|
1989 |
+
var _checkValidNamespace = function _checkValidNamespace(element) {
|
1990 |
+
var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode
|
1991 |
+
// can be null. We just simulate parent in this case.
|
1992 |
+
|
1993 |
+
if (!parent || !parent.tagName) {
|
1994 |
+
parent = {
|
1995 |
+
namespaceURI: HTML_NAMESPACE,
|
1996 |
+
tagName: 'template'
|
1997 |
+
};
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
var tagName = stringToLowerCase(element.tagName);
|
2001 |
+
var parentTagName = stringToLowerCase(parent.tagName);
|
2002 |
+
|
2003 |
+
if (element.namespaceURI === SVG_NAMESPACE) {
|
2004 |
+
// The only way to switch from HTML namespace to SVG
|
2005 |
+
// is via <svg>. If it happens via any other tag, then
|
2006 |
+
// it should be killed.
|
2007 |
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
2008 |
+
return tagName === 'svg';
|
2009 |
+
} // The only way to switch from MathML to SVG is via
|
2010 |
+
// svg if parent is either <annotation-xml> or MathML
|
2011 |
+
// text integration points.
|
2012 |
+
|
2013 |
+
|
2014 |
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
2015 |
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
2016 |
+
} // We only allow elements that are defined in SVG
|
2017 |
+
// spec. All others are disallowed in SVG namespace.
|
2018 |
+
|
2019 |
+
|
2020 |
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
if (element.namespaceURI === MATHML_NAMESPACE) {
|
2024 |
+
// The only way to switch from HTML namespace to MathML
|
2025 |
+
// is via <math>. If it happens via any other tag, then
|
2026 |
+
// it should be killed.
|
2027 |
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
2028 |
+
return tagName === 'math';
|
2029 |
+
} // The only way to switch from SVG to MathML is via
|
2030 |
+
// <math> and HTML integration points
|
2031 |
+
|
2032 |
+
|
2033 |
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
2034 |
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
2035 |
+
} // We only allow elements that are defined in MathML
|
2036 |
+
// spec. All others are disallowed in MathML namespace.
|
2037 |
+
|
2038 |
+
|
2039 |
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
if (element.namespaceURI === HTML_NAMESPACE) {
|
2043 |
+
// The only way to switch from SVG to HTML is via
|
2044 |
+
// HTML integration points, and from MathML to HTML
|
2045 |
+
// is via MathML text integration points
|
2046 |
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
2047 |
+
return false;
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
2051 |
+
return false;
|
2052 |
+
} // We disallow tags that are specific for MathML
|
2053 |
+
// or SVG and should never appear in HTML namespace
|
2054 |
+
|
2055 |
+
|
2056 |
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
2057 |
+
} // The code should never reach this place (this means
|
2058 |
+
// that the element somehow got namespace that is not
|
2059 |
+
// HTML, SVG or MathML). Return false just in case.
|
2060 |
+
|
2061 |
+
|
2062 |
+
return false;
|
2063 |
+
};
|
2064 |
+
/**
|
2065 |
+
* _forceRemove
|
2066 |
+
*
|
2067 |
+
* @param {Node} node a DOM node
|
2068 |
+
*/
|
2069 |
+
|
2070 |
+
|
2071 |
+
var _forceRemove = function _forceRemove(node) {
|
2072 |
+
arrayPush(DOMPurify.removed, {
|
2073 |
+
element: node
|
2074 |
+
});
|
2075 |
+
|
2076 |
+
try {
|
2077 |
+
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
2078 |
+
node.parentNode.removeChild(node);
|
2079 |
+
} catch (_) {
|
2080 |
+
try {
|
2081 |
+
node.outerHTML = emptyHTML;
|
2082 |
+
} catch (_) {
|
2083 |
+
node.remove();
|
2084 |
+
}
|
2085 |
+
}
|
2086 |
+
};
|
2087 |
+
/**
|
2088 |
+
* _removeAttribute
|
2089 |
+
*
|
2090 |
+
* @param {String} name an Attribute name
|
2091 |
+
* @param {Node} node a DOM node
|
2092 |
+
*/
|
2093 |
+
|
2094 |
+
|
2095 |
+
var _removeAttribute = function _removeAttribute(name, node) {
|
2096 |
+
try {
|
2097 |
+
arrayPush(DOMPurify.removed, {
|
2098 |
+
attribute: node.getAttributeNode(name),
|
2099 |
+
from: node
|
2100 |
+
});
|
2101 |
+
} catch (_) {
|
2102 |
+
arrayPush(DOMPurify.removed, {
|
2103 |
+
attribute: null,
|
2104 |
+
from: node
|
2105 |
+
});
|
2106 |
+
}
|
2107 |
+
|
2108 |
+
node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes
|
2109 |
+
|
2110 |
+
if (name === 'is' && !ALLOWED_ATTR[name]) {
|
2111 |
+
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
2112 |
+
try {
|
2113 |
+
_forceRemove(node);
|
2114 |
+
} catch (_) {}
|
2115 |
+
} else {
|
2116 |
+
try {
|
2117 |
+
node.setAttribute(name, '');
|
2118 |
+
} catch (_) {}
|
2119 |
+
}
|
2120 |
+
}
|
2121 |
+
};
|
2122 |
+
/**
|
2123 |
+
* _initDocument
|
2124 |
+
*
|
2125 |
+
* @param {String} dirty a string of dirty markup
|
2126 |
+
* @return {Document} a DOM, filled with the dirty markup
|
2127 |
+
*/
|
2128 |
+
|
2129 |
+
|
2130 |
+
var _initDocument = function _initDocument(dirty) {
|
2131 |
+
/* Create a HTML document */
|
2132 |
+
var doc;
|
2133 |
+
var leadingWhitespace;
|
2134 |
+
|
2135 |
+
if (FORCE_BODY) {
|
2136 |
+
dirty = '<remove></remove>' + dirty;
|
2137 |
+
} else {
|
2138 |
+
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
2139 |
+
var matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
2140 |
+
leadingWhitespace = matches && matches[0];
|
2141 |
+
}
|
2142 |
+
|
2143 |
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {
|
2144 |
+
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
2145 |
+
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
|
2146 |
+
}
|
2147 |
+
|
2148 |
+
var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
2149 |
+
/*
|
2150 |
+
* Use the DOMParser API by default, fallback later if needs be
|
2151 |
+
* DOMParser not work for svg when has multiple root element.
|
2152 |
+
*/
|
2153 |
+
|
2154 |
+
if (NAMESPACE === HTML_NAMESPACE) {
|
2155 |
+
try {
|
2156 |
+
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
2157 |
+
} catch (_) {}
|
2158 |
+
}
|
2159 |
+
/* Use createHTMLDocument in case DOMParser is not available */
|
2160 |
+
|
2161 |
+
|
2162 |
+
if (!doc || !doc.documentElement) {
|
2163 |
+
doc = implementation.createDocument(NAMESPACE, 'template', null);
|
2164 |
+
|
2165 |
+
try {
|
2166 |
+
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;
|
2167 |
+
} catch (_) {// Syntax error if dirtyPayload is invalid xml
|
2168 |
+
}
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
var body = doc.body || doc.documentElement;
|
2172 |
+
|
2173 |
+
if (dirty && leadingWhitespace) {
|
2174 |
+
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
2175 |
+
}
|
2176 |
+
/* Work on whole document or just its body */
|
2177 |
+
|
2178 |
+
|
2179 |
+
if (NAMESPACE === HTML_NAMESPACE) {
|
2180 |
+
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
2184 |
+
};
|
2185 |
+
/**
|
2186 |
+
* _createIterator
|
2187 |
+
*
|
2188 |
+
* @param {Document} root document/fragment to create iterator for
|
2189 |
+
* @return {Iterator} iterator instance
|
2190 |
+
*/
|
2191 |
+
|
2192 |
+
|
2193 |
+
var _createIterator = function _createIterator(root) {
|
2194 |
+
return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
|
2195 |
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
|
2196 |
+
};
|
2197 |
+
/**
|
2198 |
+
* _isClobbered
|
2199 |
+
*
|
2200 |
+
* @param {Node} elm element to check for clobbering attacks
|
2201 |
+
* @return {Boolean} true if clobbered, false if safe
|
2202 |
+
*/
|
2203 |
+
|
2204 |
+
|
2205 |
+
var _isClobbered = function _isClobbered(elm) {
|
2206 |
+
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');
|
2207 |
+
};
|
2208 |
+
/**
|
2209 |
+
* _isNode
|
2210 |
+
*
|
2211 |
+
* @param {Node} obj object to check whether it's a DOM node
|
2212 |
+
* @return {Boolean} true is object is a DOM node
|
2213 |
+
*/
|
2214 |
+
|
2215 |
+
|
2216 |
+
var _isNode = function _isNode(object) {
|
2217 |
+
return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
|
2218 |
+
};
|
2219 |
+
/**
|
2220 |
+
* _executeHook
|
2221 |
+
* Execute user configurable hooks
|
2222 |
+
*
|
2223 |
+
* @param {String} entryPoint Name of the hook's entry point
|
2224 |
+
* @param {Node} currentNode node to work on with the hook
|
2225 |
+
* @param {Object} data additional hook parameters
|
2226 |
+
*/
|
2227 |
+
|
2228 |
+
|
2229 |
+
var _executeHook = function _executeHook(entryPoint, currentNode, data) {
|
2230 |
+
if (!hooks[entryPoint]) {
|
2231 |
+
return;
|
2232 |
+
}
|
2233 |
+
|
2234 |
+
arrayForEach(hooks[entryPoint], function (hook) {
|
2235 |
+
hook.call(DOMPurify, currentNode, data, CONFIG);
|
2236 |
+
});
|
2237 |
+
};
|
2238 |
+
/**
|
2239 |
+
* _sanitizeElements
|
2240 |
+
*
|
2241 |
+
* @protect nodeName
|
2242 |
+
* @protect textContent
|
2243 |
+
* @protect removeChild
|
2244 |
+
*
|
2245 |
+
* @param {Node} currentNode to check for permission to exist
|
2246 |
+
* @return {Boolean} true if node was killed, false if left alive
|
2247 |
+
*/
|
2248 |
+
|
2249 |
+
|
2250 |
+
var _sanitizeElements = function _sanitizeElements(currentNode) {
|
2251 |
+
var content;
|
2252 |
+
/* Execute a hook if present */
|
2253 |
+
|
2254 |
+
_executeHook('beforeSanitizeElements', currentNode, null);
|
2255 |
+
/* Check if element is clobbered or can clobber */
|
2256 |
+
|
2257 |
+
|
2258 |
+
if (_isClobbered(currentNode)) {
|
2259 |
+
_forceRemove(currentNode);
|
2260 |
+
|
2261 |
+
return true;
|
2262 |
+
}
|
2263 |
+
/* Check if tagname contains Unicode */
|
2264 |
+
|
2265 |
+
|
2266 |
+
if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) {
|
2267 |
+
_forceRemove(currentNode);
|
2268 |
+
|
2269 |
+
return true;
|
2270 |
+
}
|
2271 |
+
/* Now let's check the element's type and name */
|
2272 |
+
|
2273 |
+
|
2274 |
+
var tagName = transformCaseFunc(currentNode.nodeName);
|
2275 |
+
/* Execute a hook if present */
|
2276 |
+
|
2277 |
+
_executeHook('uponSanitizeElement', currentNode, {
|
2278 |
+
tagName: tagName,
|
2279 |
+
allowedTags: ALLOWED_TAGS
|
2280 |
+
});
|
2281 |
+
/* Detect mXSS attempts abusing namespace confusion */
|
2282 |
+
|
2283 |
+
|
2284 |
+
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
2285 |
+
_forceRemove(currentNode);
|
2286 |
+
|
2287 |
+
return true;
|
2288 |
+
}
|
2289 |
+
/* Mitigate a problem with templates inside select */
|
2290 |
+
|
2291 |
+
|
2292 |
+
if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {
|
2293 |
+
_forceRemove(currentNode);
|
2294 |
+
|
2295 |
+
return true;
|
2296 |
+
}
|
2297 |
+
/* Remove element if anything forbids its presence */
|
2298 |
+
|
2299 |
+
|
2300 |
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
2301 |
+
/* Check if we have a custom element to handle */
|
2302 |
+
if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
|
2303 |
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
|
2304 |
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
|
2305 |
+
}
|
2306 |
+
/* Keep content except for bad-listed elements */
|
2307 |
+
|
2308 |
+
|
2309 |
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
2310 |
+
var parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
2311 |
+
var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
2312 |
+
|
2313 |
+
if (childNodes && parentNode) {
|
2314 |
+
var childCount = childNodes.length;
|
2315 |
+
|
2316 |
+
for (var i = childCount - 1; i >= 0; --i) {
|
2317 |
+
parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
|
2318 |
+
}
|
2319 |
+
}
|
2320 |
+
}
|
2321 |
+
|
2322 |
+
_forceRemove(currentNode);
|
2323 |
+
|
2324 |
+
return true;
|
2325 |
+
}
|
2326 |
+
/* Check whether element has a valid namespace */
|
2327 |
+
|
2328 |
+
|
2329 |
+
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
2330 |
+
_forceRemove(currentNode);
|
2331 |
+
|
2332 |
+
return true;
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
|
2336 |
+
_forceRemove(currentNode);
|
2337 |
+
|
2338 |
+
return true;
|
2339 |
+
}
|
2340 |
+
/* Sanitize element content to be template-safe */
|
2341 |
+
|
2342 |
+
|
2343 |
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
|
2344 |
+
/* Get the element's text content */
|
2345 |
+
content = currentNode.textContent;
|
2346 |
+
content = stringReplace(content, MUSTACHE_EXPR$1, ' ');
|
2347 |
+
content = stringReplace(content, ERB_EXPR$1, ' ');
|
2348 |
+
|
2349 |
+
if (currentNode.textContent !== content) {
|
2350 |
+
arrayPush(DOMPurify.removed, {
|
2351 |
+
element: currentNode.cloneNode()
|
2352 |
+
});
|
2353 |
+
currentNode.textContent = content;
|
2354 |
+
}
|
2355 |
+
}
|
2356 |
+
/* Execute a hook if present */
|
2357 |
+
|
2358 |
+
|
2359 |
+
_executeHook('afterSanitizeElements', currentNode, null);
|
2360 |
+
|
2361 |
+
return false;
|
2362 |
+
};
|
2363 |
+
/**
|
2364 |
+
* _isValidAttribute
|
2365 |
+
*
|
2366 |
+
* @param {string} lcTag Lowercase tag name of containing element.
|
2367 |
+
* @param {string} lcName Lowercase attribute name.
|
2368 |
+
* @param {string} value Attribute value.
|
2369 |
+
* @return {Boolean} Returns true if `value` is valid, otherwise false.
|
2370 |
+
*/
|
2371 |
+
// eslint-disable-next-line complexity
|
2372 |
+
|
2373 |
+
|
2374 |
+
var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
2375 |
+
/* Make sure attribute cannot clobber */
|
2376 |
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
2377 |
+
return false;
|
2378 |
+
}
|
2379 |
+
/* Allow valid data-* attributes: At least one character after "-"
|
2380 |
+
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
2381 |
+
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
2382 |
+
We don't need to check the value; it's always URI safe. */
|
2383 |
+
|
2384 |
+
|
2385 |
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
2386 |
+
if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
2387 |
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2388 |
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
2389 |
+
_basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
2390 |
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2391 |
+
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
2392 |
+
return false;
|
2393 |
+
}
|
2394 |
+
/* Check value is safe. First, is attr inert? If so, is safe */
|
2395 |
+
|
2396 |
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (!value) ; else {
|
2397 |
+
return false;
|
2398 |
+
}
|
2399 |
+
|
2400 |
+
return true;
|
2401 |
+
};
|
2402 |
+
/**
|
2403 |
+
* _basicCustomElementCheck
|
2404 |
+
* checks if at least one dash is included in tagName, and it's not the first char
|
2405 |
+
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
2406 |
+
* @param {string} tagName name of the tag of the node to sanitize
|
2407 |
+
*/
|
2408 |
+
|
2409 |
+
|
2410 |
+
var _basicCustomElementTest = function _basicCustomElementTest(tagName) {
|
2411 |
+
return tagName.indexOf('-') > 0;
|
2412 |
+
};
|
2413 |
+
/**
|
2414 |
+
* _sanitizeAttributes
|
2415 |
+
*
|
2416 |
+
* @protect attributes
|
2417 |
+
* @protect nodeName
|
2418 |
+
* @protect removeAttribute
|
2419 |
+
* @protect setAttribute
|
2420 |
+
*
|
2421 |
+
* @param {Node} currentNode to sanitize
|
2422 |
+
*/
|
2423 |
+
|
2424 |
+
|
2425 |
+
var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
2426 |
+
var attr;
|
2427 |
+
var value;
|
2428 |
+
var lcName;
|
2429 |
+
var l;
|
2430 |
+
/* Execute a hook if present */
|
2431 |
+
|
2432 |
+
_executeHook('beforeSanitizeAttributes', currentNode, null);
|
2433 |
+
|
2434 |
+
var attributes = currentNode.attributes;
|
2435 |
+
/* Check if we have attributes; if not we might have a text node */
|
2436 |
+
|
2437 |
+
if (!attributes) {
|
2438 |
+
return;
|
2439 |
+
}
|
2440 |
+
|
2441 |
+
var hookEvent = {
|
2442 |
+
attrName: '',
|
2443 |
+
attrValue: '',
|
2444 |
+
keepAttr: true,
|
2445 |
+
allowedAttributes: ALLOWED_ATTR
|
2446 |
+
};
|
2447 |
+
l = attributes.length;
|
2448 |
+
/* Go backwards over all attributes; safely remove bad ones */
|
2449 |
+
|
2450 |
+
while (l--) {
|
2451 |
+
attr = attributes[l];
|
2452 |
+
var _attr = attr,
|
2453 |
+
name = _attr.name,
|
2454 |
+
namespaceURI = _attr.namespaceURI;
|
2455 |
+
value = name === 'value' ? attr.value : stringTrim(attr.value);
|
2456 |
+
lcName = transformCaseFunc(name);
|
2457 |
+
/* Execute a hook if present */
|
2458 |
+
|
2459 |
+
hookEvent.attrName = lcName;
|
2460 |
+
hookEvent.attrValue = value;
|
2461 |
+
hookEvent.keepAttr = true;
|
2462 |
+
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
2463 |
+
|
2464 |
+
_executeHook('uponSanitizeAttribute', currentNode, hookEvent);
|
2465 |
+
|
2466 |
+
value = hookEvent.attrValue;
|
2467 |
+
/* Did the hooks approve of the attribute? */
|
2468 |
+
|
2469 |
+
if (hookEvent.forceKeepAttr) {
|
2470 |
+
continue;
|
2471 |
+
}
|
2472 |
+
/* Remove attribute */
|
2473 |
+
|
2474 |
+
|
2475 |
+
_removeAttribute(name, currentNode);
|
2476 |
+
/* Did the hooks approve of the attribute? */
|
2477 |
+
|
2478 |
+
|
2479 |
+
if (!hookEvent.keepAttr) {
|
2480 |
+
continue;
|
2481 |
+
}
|
2482 |
+
/* Work around a security issue in jQuery 3.0 */
|
2483 |
+
|
2484 |
+
|
2485 |
+
if (regExpTest(/\/>/i, value)) {
|
2486 |
+
_removeAttribute(name, currentNode);
|
2487 |
+
|
2488 |
+
continue;
|
2489 |
+
}
|
2490 |
+
/* Sanitize attribute content to be template-safe */
|
2491 |
+
|
2492 |
+
|
2493 |
+
if (SAFE_FOR_TEMPLATES) {
|
2494 |
+
value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
|
2495 |
+
value = stringReplace(value, ERB_EXPR$1, ' ');
|
2496 |
+
}
|
2497 |
+
/* Is `value` valid for this attribute? */
|
2498 |
+
|
2499 |
+
|
2500 |
+
var lcTag = transformCaseFunc(currentNode.nodeName);
|
2501 |
+
|
2502 |
+
if (!_isValidAttribute(lcTag, lcName, value)) {
|
2503 |
+
continue;
|
2504 |
+
}
|
2505 |
+
/* Handle attributes that require Trusted Types */
|
2506 |
+
|
2507 |
+
|
2508 |
+
if (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {
|
2509 |
+
if (namespaceURI) ; else {
|
2510 |
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
2511 |
+
case 'TrustedHTML':
|
2512 |
+
value = trustedTypesPolicy.createHTML(value);
|
2513 |
+
break;
|
2514 |
+
|
2515 |
+
case 'TrustedScriptURL':
|
2516 |
+
value = trustedTypesPolicy.createScriptURL(value);
|
2517 |
+
break;
|
2518 |
+
}
|
2519 |
+
}
|
2520 |
+
}
|
2521 |
+
/* Handle invalid data-* attribute set by try-catching it */
|
2522 |
+
|
2523 |
+
|
2524 |
+
try {
|
2525 |
+
if (namespaceURI) {
|
2526 |
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
2527 |
+
} else {
|
2528 |
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
2529 |
+
currentNode.setAttribute(name, value);
|
2530 |
+
}
|
2531 |
+
|
2532 |
+
arrayPop(DOMPurify.removed);
|
2533 |
+
} catch (_) {}
|
2534 |
+
}
|
2535 |
+
/* Execute a hook if present */
|
2536 |
+
|
2537 |
+
|
2538 |
+
_executeHook('afterSanitizeAttributes', currentNode, null);
|
2539 |
+
};
|
2540 |
+
/**
|
2541 |
+
* _sanitizeShadowDOM
|
2542 |
+
*
|
2543 |
+
* @param {DocumentFragment} fragment to iterate over recursively
|
2544 |
+
*/
|
2545 |
+
|
2546 |
+
|
2547 |
+
var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
2548 |
+
var shadowNode;
|
2549 |
+
|
2550 |
+
var shadowIterator = _createIterator(fragment);
|
2551 |
+
/* Execute a hook if present */
|
2552 |
+
|
2553 |
+
|
2554 |
+
_executeHook('beforeSanitizeShadowDOM', fragment, null);
|
2555 |
+
|
2556 |
+
while (shadowNode = shadowIterator.nextNode()) {
|
2557 |
+
/* Execute a hook if present */
|
2558 |
+
_executeHook('uponSanitizeShadowNode', shadowNode, null);
|
2559 |
+
/* Sanitize tags and elements */
|
2560 |
+
|
2561 |
+
|
2562 |
+
if (_sanitizeElements(shadowNode)) {
|
2563 |
+
continue;
|
2564 |
+
}
|
2565 |
+
/* Deep shadow DOM detected */
|
2566 |
+
|
2567 |
+
|
2568 |
+
if (shadowNode.content instanceof DocumentFragment) {
|
2569 |
+
_sanitizeShadowDOM(shadowNode.content);
|
2570 |
+
}
|
2571 |
+
/* Check attributes, sanitize if necessary */
|
2572 |
+
|
2573 |
+
|
2574 |
+
_sanitizeAttributes(shadowNode);
|
2575 |
+
}
|
2576 |
+
/* Execute a hook if present */
|
2577 |
+
|
2578 |
+
|
2579 |
+
_executeHook('afterSanitizeShadowDOM', fragment, null);
|
2580 |
+
};
|
2581 |
+
/**
|
2582 |
+
* Sanitize
|
2583 |
+
* Public method providing core sanitation functionality
|
2584 |
+
*
|
2585 |
+
* @param {String|Node} dirty string or DOM node
|
2586 |
+
* @param {Object} configuration object
|
2587 |
+
*/
|
2588 |
+
// eslint-disable-next-line complexity
|
2589 |
+
|
2590 |
+
|
2591 |
+
DOMPurify.sanitize = function (dirty, cfg) {
|
2592 |
+
var body;
|
2593 |
+
var importedNode;
|
2594 |
+
var currentNode;
|
2595 |
+
var oldNode;
|
2596 |
+
var returnNode;
|
2597 |
+
/* Make sure we have a string to sanitize.
|
2598 |
+
DO NOT return early, as this will return the wrong type if
|
2599 |
+
the user has requested a DOM object rather than a string */
|
2600 |
+
|
2601 |
+
IS_EMPTY_INPUT = !dirty;
|
2602 |
+
|
2603 |
+
if (IS_EMPTY_INPUT) {
|
2604 |
+
dirty = '<!-->';
|
2605 |
+
}
|
2606 |
+
/* Stringify, in case dirty is an object */
|
2607 |
+
|
2608 |
+
|
2609 |
+
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
2610 |
+
// eslint-disable-next-line no-negated-condition
|
2611 |
+
if (typeof dirty.toString !== 'function') {
|
2612 |
+
throw typeErrorCreate('toString is not a function');
|
2613 |
+
} else {
|
2614 |
+
dirty = dirty.toString();
|
2615 |
+
|
2616 |
+
if (typeof dirty !== 'string') {
|
2617 |
+
throw typeErrorCreate('dirty is not a string, aborting');
|
2618 |
+
}
|
2619 |
+
}
|
2620 |
+
}
|
2621 |
+
/* Check we can run. Otherwise fall back or ignore */
|
2622 |
+
|
2623 |
+
|
2624 |
+
if (!DOMPurify.isSupported) {
|
2625 |
+
if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
|
2626 |
+
if (typeof dirty === 'string') {
|
2627 |
+
return window.toStaticHTML(dirty);
|
2628 |
+
}
|
2629 |
+
|
2630 |
+
if (_isNode(dirty)) {
|
2631 |
+
return window.toStaticHTML(dirty.outerHTML);
|
2632 |
+
}
|
2633 |
+
}
|
2634 |
+
|
2635 |
+
return dirty;
|
2636 |
+
}
|
2637 |
+
/* Assign config vars */
|
2638 |
+
|
2639 |
+
|
2640 |
+
if (!SET_CONFIG) {
|
2641 |
+
_parseConfig(cfg);
|
2642 |
+
}
|
2643 |
+
/* Clean up removed elements */
|
2644 |
+
|
2645 |
+
|
2646 |
+
DOMPurify.removed = [];
|
2647 |
+
/* Check if dirty is correctly typed for IN_PLACE */
|
2648 |
+
|
2649 |
+
if (typeof dirty === 'string') {
|
2650 |
+
IN_PLACE = false;
|
2651 |
+
}
|
2652 |
+
|
2653 |
+
if (IN_PLACE) {
|
2654 |
+
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
2655 |
+
if (dirty.nodeName) {
|
2656 |
+
var tagName = transformCaseFunc(dirty.nodeName);
|
2657 |
+
|
2658 |
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
2659 |
+
throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
|
2660 |
+
}
|
2661 |
+
}
|
2662 |
+
} else if (dirty instanceof Node) {
|
2663 |
+
/* If dirty is a DOM element, append to an empty document to avoid
|
2664 |
+
elements being stripped by the parser */
|
2665 |
+
body = _initDocument('<!---->');
|
2666 |
+
importedNode = body.ownerDocument.importNode(dirty, true);
|
2667 |
+
|
2668 |
+
if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
|
2669 |
+
/* Node is already a body, use as is */
|
2670 |
+
body = importedNode;
|
2671 |
+
} else if (importedNode.nodeName === 'HTML') {
|
2672 |
+
body = importedNode;
|
2673 |
+
} else {
|
2674 |
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
2675 |
+
body.appendChild(importedNode);
|
2676 |
+
}
|
2677 |
+
} else {
|
2678 |
+
/* Exit directly if we have nothing to do */
|
2679 |
+
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
|
2680 |
+
dirty.indexOf('<') === -1) {
|
2681 |
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
2682 |
+
}
|
2683 |
+
/* Initialize the document to work on */
|
2684 |
+
|
2685 |
+
|
2686 |
+
body = _initDocument(dirty);
|
2687 |
+
/* Check we have a DOM node from the data */
|
2688 |
+
|
2689 |
+
if (!body) {
|
2690 |
+
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
|
2691 |
+
}
|
2692 |
+
}
|
2693 |
+
/* Remove first element node (ours) if FORCE_BODY is set */
|
2694 |
+
|
2695 |
+
|
2696 |
+
if (body && FORCE_BODY) {
|
2697 |
+
_forceRemove(body.firstChild);
|
2698 |
+
}
|
2699 |
+
/* Get node iterator */
|
2700 |
+
|
2701 |
+
|
2702 |
+
var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
|
2703 |
+
/* Now start iterating over the created document */
|
2704 |
+
|
2705 |
+
|
2706 |
+
while (currentNode = nodeIterator.nextNode()) {
|
2707 |
+
/* Fix IE's strange behavior with manipulated textNodes #89 */
|
2708 |
+
if (currentNode.nodeType === 3 && currentNode === oldNode) {
|
2709 |
+
continue;
|
2710 |
+
}
|
2711 |
+
/* Sanitize tags and elements */
|
2712 |
+
|
2713 |
+
|
2714 |
+
if (_sanitizeElements(currentNode)) {
|
2715 |
+
continue;
|
2716 |
+
}
|
2717 |
+
/* Shadow DOM detected, sanitize it */
|
2718 |
+
|
2719 |
+
|
2720 |
+
if (currentNode.content instanceof DocumentFragment) {
|
2721 |
+
_sanitizeShadowDOM(currentNode.content);
|
2722 |
+
}
|
2723 |
+
/* Check attributes, sanitize if necessary */
|
2724 |
+
|
2725 |
+
|
2726 |
+
_sanitizeAttributes(currentNode);
|
2727 |
+
|
2728 |
+
oldNode = currentNode;
|
2729 |
+
}
|
2730 |
+
|
2731 |
+
oldNode = null;
|
2732 |
+
/* If we sanitized `dirty` in-place, return it. */
|
2733 |
+
|
2734 |
+
if (IN_PLACE) {
|
2735 |
+
return dirty;
|
2736 |
+
}
|
2737 |
+
/* Return sanitized string or DOM */
|
2738 |
+
|
2739 |
+
|
2740 |
+
if (RETURN_DOM) {
|
2741 |
+
if (RETURN_DOM_FRAGMENT) {
|
2742 |
+
returnNode = createDocumentFragment.call(body.ownerDocument);
|
2743 |
+
|
2744 |
+
while (body.firstChild) {
|
2745 |
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
2746 |
+
returnNode.appendChild(body.firstChild);
|
2747 |
+
}
|
2748 |
+
} else {
|
2749 |
+
returnNode = body;
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
if (ALLOWED_ATTR.shadowroot) {
|
2753 |
+
/*
|
2754 |
+
AdoptNode() is not used because internal state is not reset
|
2755 |
+
(e.g. the past names map of a HTMLFormElement), this is safe
|
2756 |
+
in theory but we would rather not risk another attack vector.
|
2757 |
+
The state that is cloned by importNode() is explicitly defined
|
2758 |
+
by the specs.
|
2759 |
+
*/
|
2760 |
+
returnNode = importNode.call(originalDocument, returnNode, true);
|
2761 |
+
}
|
2762 |
+
|
2763 |
+
return returnNode;
|
2764 |
+
}
|
2765 |
+
|
2766 |
+
var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
2767 |
+
/* Serialize doctype if allowed */
|
2768 |
+
|
2769 |
+
if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
2770 |
+
serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
|
2771 |
+
}
|
2772 |
+
/* Sanitize final string template-safe */
|
2773 |
+
|
2774 |
+
|
2775 |
+
if (SAFE_FOR_TEMPLATES) {
|
2776 |
+
serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');
|
2777 |
+
serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');
|
2778 |
+
}
|
2779 |
+
|
2780 |
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
2781 |
+
};
|
2782 |
+
/**
|
2783 |
+
* Public method to set the configuration once
|
2784 |
+
* setConfig
|
2785 |
+
*
|
2786 |
+
* @param {Object} cfg configuration object
|
2787 |
+
*/
|
2788 |
+
|
2789 |
+
|
2790 |
+
DOMPurify.setConfig = function (cfg) {
|
2791 |
+
_parseConfig(cfg);
|
2792 |
+
|
2793 |
+
SET_CONFIG = true;
|
2794 |
+
};
|
2795 |
+
/**
|
2796 |
+
* Public method to remove the configuration
|
2797 |
+
* clearConfig
|
2798 |
+
*
|
2799 |
+
*/
|
2800 |
+
|
2801 |
+
|
2802 |
+
DOMPurify.clearConfig = function () {
|
2803 |
+
CONFIG = null;
|
2804 |
+
SET_CONFIG = false;
|
2805 |
+
};
|
2806 |
+
/**
|
2807 |
+
* Public method to check if an attribute value is valid.
|
2808 |
+
* Uses last set config, if any. Otherwise, uses config defaults.
|
2809 |
+
* isValidAttribute
|
2810 |
+
*
|
2811 |
+
* @param {string} tag Tag name of containing element.
|
2812 |
+
* @param {string} attr Attribute name.
|
2813 |
+
* @param {string} value Attribute value.
|
2814 |
+
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
2815 |
+
*/
|
2816 |
+
|
2817 |
+
|
2818 |
+
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
2819 |
+
/* Initialize shared config vars if necessary. */
|
2820 |
+
if (!CONFIG) {
|
2821 |
+
_parseConfig({});
|
2822 |
+
}
|
2823 |
+
|
2824 |
+
var lcTag = transformCaseFunc(tag);
|
2825 |
+
var lcName = transformCaseFunc(attr);
|
2826 |
+
return _isValidAttribute(lcTag, lcName, value);
|
2827 |
+
};
|
2828 |
+
/**
|
2829 |
+
* AddHook
|
2830 |
+
* Public method to add DOMPurify hooks
|
2831 |
+
*
|
2832 |
+
* @param {String} entryPoint entry point for the hook to add
|
2833 |
+
* @param {Function} hookFunction function to execute
|
2834 |
+
*/
|
2835 |
+
|
2836 |
+
|
2837 |
+
DOMPurify.addHook = function (entryPoint, hookFunction) {
|
2838 |
+
if (typeof hookFunction !== 'function') {
|
2839 |
+
return;
|
2840 |
+
}
|
2841 |
+
|
2842 |
+
hooks[entryPoint] = hooks[entryPoint] || [];
|
2843 |
+
arrayPush(hooks[entryPoint], hookFunction);
|
2844 |
+
};
|
2845 |
+
/**
|
2846 |
+
* RemoveHook
|
2847 |
+
* Public method to remove a DOMPurify hook at a given entryPoint
|
2848 |
+
* (pops it from the stack of hooks if more are present)
|
2849 |
+
*
|
2850 |
+
* @param {String} entryPoint entry point for the hook to remove
|
2851 |
+
* @return {Function} removed(popped) hook
|
2852 |
+
*/
|
2853 |
+
|
2854 |
+
|
2855 |
+
DOMPurify.removeHook = function (entryPoint) {
|
2856 |
+
if (hooks[entryPoint]) {
|
2857 |
+
return arrayPop(hooks[entryPoint]);
|
2858 |
+
}
|
2859 |
+
};
|
2860 |
+
/**
|
2861 |
+
* RemoveHooks
|
2862 |
+
* Public method to remove all DOMPurify hooks at a given entryPoint
|
2863 |
+
*
|
2864 |
+
* @param {String} entryPoint entry point for the hooks to remove
|
2865 |
+
*/
|
2866 |
+
|
2867 |
+
|
2868 |
+
DOMPurify.removeHooks = function (entryPoint) {
|
2869 |
+
if (hooks[entryPoint]) {
|
2870 |
+
hooks[entryPoint] = [];
|
2871 |
+
}
|
2872 |
+
};
|
2873 |
+
/**
|
2874 |
+
* RemoveAllHooks
|
2875 |
+
* Public method to remove all DOMPurify hooks
|
2876 |
+
*
|
2877 |
+
*/
|
2878 |
+
|
2879 |
+
|
2880 |
+
DOMPurify.removeAllHooks = function () {
|
2881 |
+
hooks = {};
|
2882 |
+
};
|
2883 |
+
|
2884 |
+
return DOMPurify;
|
2885 |
+
}
|
2886 |
+
|
2887 |
+
var purify = createDOMPurify();
|
2888 |
+
|
2889 |
+
return purify;
|
2890 |
+
|
2891 |
+
}));
|
2892 |
+
//# sourceMappingURL=purify.js.map
|
2893 |
+
|
2894 |
+
|
2895 |
+
/***/ }),
|
2896 |
+
|
2897 |
+
/***/ "./.yarn/cache/react-string-replace-npm-1.1.0-9af2371852-5df67fbdb4.zip/node_modules/react-string-replace/index.js":
|
2898 |
+
/*!*************************************************************************************************************************!*\
|
2899 |
+
!*** ./.yarn/cache/react-string-replace-npm-1.1.0-9af2371852-5df67fbdb4.zip/node_modules/react-string-replace/index.js ***!
|
2900 |
+
\*************************************************************************************************************************/
|
2901 |
+
/***/ (function(module) {
|
2902 |
+
|
2903 |
+
/* eslint-disable vars-on-top, no-var, prefer-template */
|
2904 |
+
var isRegExp = function (re) {
|
2905 |
+
return re instanceof RegExp;
|
2906 |
+
};
|
2907 |
+
var escapeRegExp = function escapeRegExp(string) {
|
2908 |
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
2909 |
+
reHasRegExpChar = RegExp(reRegExpChar.source);
|
2910 |
+
|
2911 |
+
return (string && reHasRegExpChar.test(string))
|
2912 |
+
? string.replace(reRegExpChar, '\\$&')
|
2913 |
+
: string;
|
2914 |
+
};
|
2915 |
+
var isString = function (value) {
|
2916 |
+
return typeof value === 'string';
|
2917 |
+
};
|
2918 |
+
var flatten = function (array) {
|
2919 |
+
var newArray = [];
|
2920 |
+
|
2921 |
+
array.forEach(function (item) {
|
2922 |
+
if (Array.isArray(item)) {
|
2923 |
+
newArray = newArray.concat(item);
|
2924 |
+
} else {
|
2925 |
+
newArray.push(item);
|
2926 |
+
}
|
2927 |
+
});
|
2928 |
+
|
2929 |
+
return newArray;
|
2930 |
+
};
|
2931 |
+
|
2932 |
+
/**
|
2933 |
+
* Given a string, replace every substring that is matched by the `match` regex
|
2934 |
+
* with the result of calling `fn` on matched substring. The result will be an
|
2935 |
+
* array with all odd indexed elements containing the replacements. The primary
|
2936 |
+
* use case is similar to using String.prototype.replace except for React.
|
2937 |
+
*
|
2938 |
+
* React will happily render an array as children of a react element, which
|
2939 |
+
* makes this approach very useful for tasks like surrounding certain text
|
2940 |
+
* within a string with react elements.
|
2941 |
+
*
|
2942 |
+
* Example:
|
2943 |
+
* matchReplace(
|
2944 |
+
* 'Emphasize all phone numbers like 884-555-4443.',
|
2945 |
+
* /([\d|-]+)/g,
|
2946 |
+
* (number, i) => <strong key={i}>{number}</strong>
|
2947 |
+
* );
|
2948 |
+
* // => ['Emphasize all phone numbers like ', <strong>884-555-4443</strong>, '.'
|
2949 |
+
*
|
2950 |
+
* @param {string} str
|
2951 |
+
* @param {RegExp|str} match Must contain a matching group
|
2952 |
+
* @param {function} fn
|
2953 |
+
* @return {array}
|
2954 |
+
*/
|
2955 |
+
function replaceString(str, match, fn) {
|
2956 |
+
var curCharStart = 0;
|
2957 |
+
var curCharLen = 0;
|
2958 |
+
|
2959 |
+
if (str === '') {
|
2960 |
+
return str;
|
2961 |
+
} else if (!str || !isString(str)) {
|
2962 |
+
throw new TypeError('First argument to react-string-replace#replaceString must be a string');
|
2963 |
+
}
|
2964 |
+
|
2965 |
+
var re = match;
|
2966 |
+
|
2967 |
+
if (!isRegExp(re)) {
|
2968 |
+
re = new RegExp('(' + escapeRegExp(re) + ')', 'gi');
|
2969 |
+
}
|
2970 |
+
|
2971 |
+
var result = str.split(re);
|
2972 |
+
|
2973 |
+
// Apply fn to all odd elements
|
2974 |
+
for (var i = 1, length = result.length; i < length; i += 2) {
|
2975 |
+
/** @see {@link https://github.com/iansinnott/react-string-replace/issues/74} */
|
2976 |
+
if (result[i] === undefined || result[i - 1] === undefined) {
|
2977 |
+
console.warn('reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.');
|
2978 |
+
continue;
|
2979 |
+
}
|
2980 |
+
|
2981 |
+
curCharLen = result[i].length;
|
2982 |
+
curCharStart += result[i - 1].length;
|
2983 |
+
result[i] = fn(result[i], i, curCharStart);
|
2984 |
+
curCharStart += curCharLen;
|
2985 |
+
}
|
2986 |
+
|
2987 |
+
return result;
|
2988 |
+
}
|
2989 |
+
|
2990 |
+
module.exports = function reactStringReplace(source, match, fn) {
|
2991 |
+
if (!Array.isArray(source)) source = [source];
|
2992 |
+
|
2993 |
+
return flatten(source.map(function(x) {
|
2994 |
+
return isString(x) ? replaceString(x, match, fn) : x;
|
2995 |
+
}));
|
2996 |
+
};
|
2997 |
+
|
2998 |
+
|
2999 |
+
/***/ }),
|
3000 |
+
|
3001 |
+
/***/ "./src/gutenberg/blocks sync recursive block\\.tsx$":
|
3002 |
+
/*!************************************************!*\
|
3003 |
+
!*** ./src/gutenberg/blocks/ sync block\.tsx$ ***!
|
3004 |
+
\************************************************/
|
3005 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3006 |
+
|
3007 |
+
var map = {
|
3008 |
+
"./categories/block.tsx": "./src/gutenberg/blocks/categories/block.tsx",
|
3009 |
+
"./pages/block.tsx": "./src/gutenberg/blocks/pages/block.tsx",
|
3010 |
+
"gutenberg/blocks/categories/block.tsx": "./src/gutenberg/blocks/categories/block.tsx",
|
3011 |
+
"gutenberg/blocks/pages/block.tsx": "./src/gutenberg/blocks/pages/block.tsx"
|
3012 |
+
};
|
3013 |
+
|
3014 |
+
|
3015 |
+
function webpackContext(req) {
|
3016 |
+
var id = webpackContextResolve(req);
|
3017 |
+
return __webpack_require__(id);
|
3018 |
+
}
|
3019 |
+
function webpackContextResolve(req) {
|
3020 |
+
if(!__webpack_require__.o(map, req)) {
|
3021 |
+
var e = new Error("Cannot find module '" + req + "'");
|
3022 |
+
e.code = 'MODULE_NOT_FOUND';
|
3023 |
+
throw e;
|
3024 |
+
}
|
3025 |
+
return map[req];
|
3026 |
+
}
|
3027 |
+
webpackContext.keys = function webpackContextKeys() {
|
3028 |
+
return Object.keys(map);
|
3029 |
+
};
|
3030 |
+
webpackContext.resolve = webpackContextResolve;
|
3031 |
+
module.exports = webpackContext;
|
3032 |
+
webpackContext.id = "./src/gutenberg/blocks sync recursive block\\.tsx$";
|
3033 |
+
|
3034 |
+
/***/ }),
|
3035 |
+
|
3036 |
+
/***/ "react":
|
3037 |
+
/*!************************!*\
|
3038 |
+
!*** external "React" ***!
|
3039 |
+
\************************/
|
3040 |
+
/***/ (function(module) {
|
3041 |
+
|
3042 |
+
"use strict";
|
3043 |
+
module.exports = React;
|
3044 |
+
|
3045 |
+
/***/ }),
|
3046 |
+
|
3047 |
+
/***/ "jquery":
|
3048 |
+
/*!*************************!*\
|
3049 |
+
!*** external "jQuery" ***!
|
3050 |
+
\*************************/
|
3051 |
+
/***/ (function(module) {
|
3052 |
+
|
3053 |
+
"use strict";
|
3054 |
+
module.exports = jQuery;
|
3055 |
+
|
3056 |
+
/***/ }),
|
3057 |
+
|
3058 |
+
/***/ "lodash":
|
3059 |
+
/*!*************************!*\
|
3060 |
+
!*** external "lodash" ***!
|
3061 |
+
\*************************/
|
3062 |
+
/***/ (function(module) {
|
3063 |
+
|
3064 |
+
"use strict";
|
3065 |
+
module.exports = lodash;
|
3066 |
+
|
3067 |
+
/***/ }),
|
3068 |
+
|
3069 |
+
/***/ "@wordpress/api-fetch":
|
3070 |
+
/*!******************************!*\
|
3071 |
+
!*** external "wp.apiFetch" ***!
|
3072 |
+
\******************************/
|
3073 |
+
/***/ (function(module) {
|
3074 |
+
|
3075 |
+
"use strict";
|
3076 |
+
module.exports = wp.apiFetch;
|
3077 |
+
|
3078 |
+
/***/ }),
|
3079 |
+
|
3080 |
+
/***/ "@wordpress/block-editor":
|
3081 |
+
/*!*********************************!*\
|
3082 |
+
!*** external "wp.blockEditor" ***!
|
3083 |
+
\*********************************/
|
3084 |
+
/***/ (function(module) {
|
3085 |
+
|
3086 |
+
"use strict";
|
3087 |
+
module.exports = wp.blockEditor;
|
3088 |
+
|
3089 |
+
/***/ }),
|
3090 |
+
|
3091 |
+
/***/ "@wordpress/blocks":
|
3092 |
+
/*!****************************!*\
|
3093 |
+
!*** external "wp.blocks" ***!
|
3094 |
+
\****************************/
|
3095 |
+
/***/ (function(module) {
|
3096 |
+
|
3097 |
+
"use strict";
|
3098 |
+
module.exports = wp.blocks;
|
3099 |
+
|
3100 |
+
/***/ }),
|
3101 |
+
|
3102 |
+
/***/ "@wordpress/components":
|
3103 |
+
/*!********************************!*\
|
3104 |
+
!*** external "wp.components" ***!
|
3105 |
+
\********************************/
|
3106 |
+
/***/ (function(module) {
|
3107 |
+
|
3108 |
+
"use strict";
|
3109 |
+
module.exports = wp.components;
|
3110 |
+
|
3111 |
+
/***/ }),
|
3112 |
+
|
3113 |
+
/***/ "@wordpress/data":
|
3114 |
+
/*!**************************!*\
|
3115 |
+
!*** external "wp.data" ***!
|
3116 |
+
\**************************/
|
3117 |
+
/***/ (function(module) {
|
3118 |
+
|
3119 |
+
"use strict";
|
3120 |
+
module.exports = wp.data;
|
3121 |
+
|
3122 |
+
/***/ }),
|
3123 |
+
|
3124 |
+
/***/ "@wordpress/hooks":
|
3125 |
+
/*!***************************!*\
|
3126 |
+
!*** external "wp.hooks" ***!
|
3127 |
+
\***************************/
|
3128 |
+
/***/ (function(module) {
|
3129 |
+
|
3130 |
+
"use strict";
|
3131 |
+
module.exports = wp.hooks;
|
3132 |
+
|
3133 |
+
/***/ }),
|
3134 |
+
|
3135 |
+
/***/ "@wordpress/html-entities":
|
3136 |
+
/*!**********************************!*\
|
3137 |
+
!*** external "wp.htmlEntities" ***!
|
3138 |
+
\**********************************/
|
3139 |
+
/***/ (function(module) {
|
3140 |
+
|
3141 |
+
"use strict";
|
3142 |
+
module.exports = wp.htmlEntities;
|
3143 |
+
|
3144 |
+
/***/ }),
|
3145 |
+
|
3146 |
+
/***/ "@wordpress/i18n":
|
3147 |
+
/*!**************************!*\
|
3148 |
+
!*** external "wp.i18n" ***!
|
3149 |
+
\**************************/
|
3150 |
+
/***/ (function(module) {
|
3151 |
+
|
3152 |
+
"use strict";
|
3153 |
+
module.exports = wp.i18n;
|
3154 |
+
|
3155 |
+
/***/ }),
|
3156 |
+
|
3157 |
+
/***/ "@wordpress/plugins":
|
3158 |
+
/*!*****************************!*\
|
3159 |
+
!*** external "wp.plugins" ***!
|
3160 |
+
\*****************************/
|
3161 |
+
/***/ (function(module) {
|
3162 |
+
|
3163 |
+
"use strict";
|
3164 |
+
module.exports = wp.plugins;
|
3165 |
+
|
3166 |
+
/***/ }),
|
3167 |
+
|
3168 |
+
/***/ "@wordpress/server-side-render":
|
3169 |
+
/*!**************************************!*\
|
3170 |
+
!*** external "wp.serverSideRender" ***!
|
3171 |
+
\**************************************/
|
3172 |
+
/***/ (function(module) {
|
3173 |
+
|
3174 |
+
"use strict";
|
3175 |
+
module.exports = wp.serverSideRender;
|
3176 |
+
|
3177 |
+
/***/ }),
|
3178 |
+
|
3179 |
+
/***/ "@wordpress/url":
|
3180 |
+
/*!*************************!*\
|
3181 |
+
!*** external "wp.url" ***!
|
3182 |
+
\*************************/
|
3183 |
+
/***/ (function(module) {
|
3184 |
+
|
3185 |
+
"use strict";
|
3186 |
+
module.exports = wp.url;
|
3187 |
+
|
3188 |
+
/***/ })
|
3189 |
+
|
3190 |
+
/******/ });
|
3191 |
+
/************************************************************************/
|
3192 |
+
/******/ // The module cache
|
3193 |
+
/******/ var __webpack_module_cache__ = {};
|
3194 |
+
/******/
|
3195 |
+
/******/ // The require function
|
3196 |
+
/******/ function __webpack_require__(moduleId) {
|
3197 |
+
/******/ // Check if module is in cache
|
3198 |
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
3199 |
+
/******/ if (cachedModule !== undefined) {
|
3200 |
+
/******/ return cachedModule.exports;
|
3201 |
+
/******/ }
|
3202 |
+
/******/ // Create a new module (and put it into the cache)
|
3203 |
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
3204 |
+
/******/ id: moduleId,
|
3205 |
+
/******/ loaded: false,
|
3206 |
+
/******/ exports: {}
|
3207 |
+
/******/ };
|
3208 |
+
/******/
|
3209 |
+
/******/ // Execute the module function
|
3210 |
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
3211 |
+
/******/
|
3212 |
+
/******/ // Flag the module as loaded
|
3213 |
+
/******/ module.loaded = true;
|
3214 |
+
/******/
|
3215 |
+
/******/ // Return the exports of the module
|
3216 |
+
/******/ return module.exports;
|
3217 |
+
/******/ }
|
3218 |
+
/******/
|
3219 |
+
/************************************************************************/
|
3220 |
+
/******/ /* webpack/runtime/compat get default export */
|
3221 |
+
/******/ !function() {
|
3222 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
3223 |
+
/******/ __webpack_require__.n = function(module) {
|
3224 |
+
/******/ var getter = module && module.__esModule ?
|
3225 |
+
/******/ function() { return module['default']; } :
|
3226 |
+
/******/ function() { return module; };
|
3227 |
+
/******/ __webpack_require__.d(getter, { a: getter });
|
3228 |
+
/******/ return getter;
|
3229 |
+
/******/ };
|
3230 |
+
/******/ }();
|
3231 |
+
/******/
|
3232 |
+
/******/ /* webpack/runtime/define property getters */
|
3233 |
+
/******/ !function() {
|
3234 |
+
/******/ // define getter functions for harmony exports
|
3235 |
+
/******/ __webpack_require__.d = function(exports, definition) {
|
3236 |
+
/******/ for(var key in definition) {
|
3237 |
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
3238 |
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
3239 |
+
/******/ }
|
3240 |
+
/******/ }
|
3241 |
+
/******/ };
|
3242 |
+
/******/ }();
|
3243 |
+
/******/
|
3244 |
+
/******/ /* webpack/runtime/harmony module decorator */
|
3245 |
+
/******/ !function() {
|
3246 |
+
/******/ __webpack_require__.hmd = function(module) {
|
3247 |
+
/******/ module = Object.create(module);
|
3248 |
+
/******/ if (!module.children) module.children = [];
|
3249 |
+
/******/ Object.defineProperty(module, 'exports', {
|
3250 |
+
/******/ enumerable: true,
|
3251 |
+
/******/ set: function() {
|
3252 |
+
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
3253 |
+
/******/ }
|
3254 |
+
/******/ });
|
3255 |
+
/******/ return module;
|
3256 |
+
/******/ };
|
3257 |
+
/******/ }();
|
3258 |
+
/******/
|
3259 |
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
3260 |
+
/******/ !function() {
|
3261 |
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
3262 |
+
/******/ }();
|
3263 |
+
/******/
|
3264 |
+
/******/ /* webpack/runtime/make namespace object */
|
3265 |
+
/******/ !function() {
|
3266 |
+
/******/ // define __esModule on exports
|
3267 |
+
/******/ __webpack_require__.r = function(exports) {
|
3268 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
3269 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
3270 |
+
/******/ }
|
3271 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
3272 |
+
/******/ };
|
3273 |
+
/******/ }();
|
3274 |
+
/******/
|
3275 |
+
/************************************************************************/
|
3276 |
+
var __webpack_exports__ = {};
|
3277 |
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
3278 |
+
!function() {
|
3279 |
+
/*!**********************!*\
|
3280 |
+
!*** ./src/admin.js ***!
|
3281 |
+
\**********************/
|
3282 |
+
console.log('Advanced Sidebar - Loaded');
|
3283 |
+
/**
|
3284 |
+
* 1. Blocks can't be lazy loaded, or they will be unavailable
|
3285 |
+
* intermittently when developing.
|
3286 |
+
* 2. Theme Customizers must wait until the page is finished loading.
|
3287 |
+
*
|
3288 |
+
* @version 1.1.0
|
3289 |
+
*/
|
3290 |
+
|
3291 |
+
if (typeof wp.element !== 'undefined' && typeof wp.plugins !== 'undefined') {
|
3292 |
+
(__webpack_require__(/*! ./gutenberg */ "./src/gutenberg/index.ts")["default"])();
|
3293 |
+
} else if (typeof wp.customize !== 'undefined') {
|
3294 |
+
wp.customize.bind('ready', () => {
|
3295 |
+
(__webpack_require__(/*! ./gutenberg */ "./src/gutenberg/index.ts")["default"])();
|
3296 |
+
});
|
3297 |
+
}
|
3298 |
+
}();
|
3299 |
+
/******/ })()
|
3300 |
+
;
|
3301 |
+
//# sourceMappingURL=admin.js.map
|
js/dist/admin.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"admin.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA2Y,aAAa,oCAAoC,YAAY,mBAAmB,KAAK,mBAAmB,sEAAsE,SAAS,wBAAwB,aAAa,cAAc,4BAA4B,cAAc,qBAAqB,aAAa,kBAAkB,cAAc,oBAAoB,gBAAgB,+BAA+B,GAAG,2DAA2D,aAAa,IAAI,YAAY,IAAI,qBAAqB,EAAE,GAAG,mBAAmB,KAAK,aAAa,2DAA2D,iGAAiG,cAAc,GAAG,aAAa,oDAAoD,oBAAoB,wDAAwD,oFAAoF,yBAAyB,cAAc,GAAG,gBAAgB,iCAAiC,mBAAmB,OAAO,4BAA4B,mDAAC,gDAAgD,uBAAuB,iCAAiC,QAAQ,EAAE,qBAAqB,OAAO,6BAA6B,mDAAC,gCAAgC,mGAAmG,EAAE,yCAAyC,8BAA8B,OAAO,IAAI,sBAAsB,eAAe,wCAAwC,QAAQ,eAAe,sBAAsB,mBAAmB,6DAA6D,SAAS,YAAY,0BAA0B,2EAA2E,oBAAoB,YAAY,kBAAkB,QAAQ,WAAW,sCAAsC,SAAS,2BAA2B,aAAa,0FAA0F,IAAI,iBAAiB,oBAAoB,oDAAoD,cAAc,mBAAmB,cAAc,EAAE,YAAY,MAAM,2BAA2B,mDAAC,+BAA+B,EAAE,mBAAmB,qDAAqD,8CAA8C,OAAO,0HAA0H,EAAE,EAAE,qBAAqB,mBAAmB,IAAI,uBAAuB,2DAAC,wBAAwB,sBAAsB,4DAAC,MAAM,EAAE,+BAA+B,GAAG,SAAS,2BAA2B,cAAc,OAA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A;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,+DAAe,MAAM;EACpB;EACA2B,iFAAc,CAAE,MAAMC,yEAAR,EAA4DE,MAA5D,CAAd,CAFoB,CAIpB;;EACAvK,MAAM,CAACe,qBAAP,CAA6B/B,aAA7B,GAA6CA,iEAA7C;EACAgB,MAAM,CAACe,qBAAP,CAA6BqF,OAA7B,GAAuCA,uDAAvC;EACApG,MAAM,CAACe,qBAAP,CAA6B2G,qBAA7B,GAAqDA,2DAArD;AACA,CARD;;;;;;;;;;;;ACXA;AACA,+DAAe,CAAC,gEAAgE;;;;;;;;;;;;ACDhF;AACA,+DAAe,CAAC,0BAA0B;;;;;;;;;;;;ACD1C;AACA,+DAAe,CAAC,+PAA+P;;;;;;;;;;ACD/Q;;AAEA;AACA,EAAE,KAA4D;AAC9D,EAAE,CACwG;AAC1G,CAAC,uBAAuB;;AAExB;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kFAAkF;AAClF;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2CAA2C,SAAS;;AAEpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,k/BAAk/B;;AAEl/B;AACA,wYAAwY;AACxY;AACA;AACA;;AAEA;AACA,gTAAgT;AAChT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA8B,EAAE,iBAAiB,EAAE,MAAM;;AAEzD;AACA,sDAAsD;;AAEtD,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,UAAU;AACvB,cAAc,oBAAoB;AAClC;AACA;;;AAGA;AACA;AACA;AACA,MAAM;AACN;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA,kBAAkB,sBAAsB;AACxC,kBAAkB,sBAAsB;AACxC,kBAAkB,SAAS;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA,2CAA2C;AAC3C;;AAEA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sKAAsK;;AAEtK;AACA;AACA,QAAQ;AACR;;AAEA,wDAAwD;AACxD,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D,sDAAsD;AACtD,sDAAsD;AACtD;AACA,uDAAuD;;AAEvD,uDAAuD;;AAEvD,sEAAsE;;AAEtE,4DAA4D;;AAE5D,oDAAoD;;AAEpD,4CAA4C;;AAE5C,8DAA8D;;AAE9D,8DAA8D;;AAE9D,4CAA4C;;AAE5C,iDAAiD;;AAEjD,iDAAiD;;AAEjD,wCAAwC;;AAExC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,QAAQ;AACR;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA,oDAAoD;AACpD,6CAA6C,yDAAyD;AACtG;AACA;AACA;;AAEA,kDAAkD;AAClD;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB,iBAAiB,SAAS;AAC1B;AACA;AACA;;AAEA;AACA,2CAA2C;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;;AAGA;AACA,QAAQ;AACR;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;;AAGA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,MAAM;AACtB;;;AAGA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;;AAEA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,UAAU;AAC1B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,UAAU,WAAW;AACrB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B,gBAAgB,UAAU;AAC1B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB,gBAAgB,SAAS;AACzB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB,gBAAgB,SAAS;AACzB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,MAAM;AACtB,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,MAAM;AACvB,iBAAiB,SAAS;AAC1B;;;AAGA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,SAAS;AACzB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;;AAG5C,wFAAwF,+DAA+D;AACvJ;AACA;AACA;AACA;AACA;AACA,uTAAuT;AACvT;AACA;AACA;;AAEA,QAAQ,wCAAwC,sFAAsF,oKAAoK,qHAAqH,mBAAmB;AAClb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sCAAsC;;AAEtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C;;AAE7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;;;AAGA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,SAAS;AACzB;;;AAGA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,UAAU;AAC1B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,CAAC;AACD;;;;;;;;;;;AC7mDA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,EAAE,EAAE,OAAO;AAC5C;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,YAAY;AACvB,WAAW,UAAU;AACrB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,0CAA0C,YAAY;AACtD,cAAc,oEAAoE;AAClF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;;;;;WCVA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;ACNAjI,OAAO,CAACC,GAAR,CAAa,2BAAb;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAK,OAAO8K,EAAE,CAACC,OAAV,KAAsB,WAAtB,IAAqC,OAAOD,EAAE,CAACE,OAAV,KAAsB,WAAhE,EAA8E;EAC7EL,+EAAA;AACA,CAFD,MAEO,IAAK,OAAOG,EAAE,CAACI,SAAV,KAAwB,WAA7B,EAA2C;EACjDJ,EAAE,CAACI,SAAH,CAAaC,IAAb,CAAmB,OAAnB,EAA4B,MAAM;IACjCR,+EAAA;EACA,CAFD;AAGA,C","sources":["webpack://@onpointplugins/advanced-sidebar-menu/./.yarn/__virtual__/@lipemat-js-boilerplate-gutenberg-virtual-6ce9f74a52/0/cache/@lipemat-js-boilerplate-gutenberg-npm-2.9.5-b01ffe5a8b-6d75996942.zip/node_modules/@lipemat/js-boilerplate-gutenberg/dist/index.module.js","webpack://@onpointplugins/advanced-sidebar-menu/./src/components/ErrorBoundary.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/globals/config.ts","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/SideLoad.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/Display.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/InfoPanel.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/Preview.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/categories/Edit.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/categories/block.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/pages/Edit.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/pages/block.tsx","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/helpers.ts","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/index.ts","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/info-panel.pcss","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/pages/edit.pcss","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/preview.pcss","webpack://@onpointplugins/advanced-sidebar-menu/./.yarn/cache/dompurify-npm-2.3.10-6db07a88c6-ee343876b4.zip/node_modules/dompurify/dist/purify.js","webpack://@onpointplugins/advanced-sidebar-menu/./.yarn/cache/react-string-replace-npm-1.1.0-9af2371852-5df67fbdb4.zip/node_modules/react-string-replace/index.js","webpack://@onpointplugins/advanced-sidebar-menu/./src/gutenberg/blocks/ sync block\\.tsx$","webpack://@onpointplugins/advanced-sidebar-menu/external var \"React\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"jQuery\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"lodash\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.apiFetch\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.blockEditor\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.blocks\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.components\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.data\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.hooks\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.htmlEntities\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.i18n\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.plugins\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.serverSideRender\"","webpack://@onpointplugins/advanced-sidebar-menu/external var \"wp.url\"","webpack://@onpointplugins/advanced-sidebar-menu/webpack/bootstrap","webpack://@onpointplugins/advanced-sidebar-menu/webpack/runtime/compat get default export","webpack://@onpointplugins/advanced-sidebar-menu/webpack/runtime/define property getters","webpack://@onpointplugins/advanced-sidebar-menu/webpack/runtime/harmony module decorator","webpack://@onpointplugins/advanced-sidebar-menu/webpack/runtime/hasOwnProperty shorthand","webpack://@onpointplugins/advanced-sidebar-menu/webpack/runtime/make namespace object","webpack://@onpointplugins/advanced-sidebar-menu/./src/admin.js"],"sourcesContent":["import e from\"@wordpress/api-fetch\";import{__ as t}from\"@wordpress/i18n\";import{addQueryArgs as n}from\"@wordpress/url\";import{registerBlockType as r,unregisterBlockType as o}from\"@wordpress/blocks\";import{registerPlugin as i,unregisterPlugin as u}from\"@wordpress/plugins\";import{select as s,dispatch as c,useDispatch as a,useSelect as d}from\"@wordpress/data\";import{useCallback as f}from\"react\";function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l,v,h=[];function m(e){return h.push(e),h.length-1}function w(e){return delete h[e],h}function g(){return void 0!==v}function b(e){E(),v=m(function(e){function t(e,n){var r=e.headers,o=void 0===r?{}:r;for(var i in o)\"x-wp-nonce\"===i.toLowerCase()&&delete o[i];return n(p({},e,{headers:p({},o,{\"X-WP-Nonce\":t.nonce})}))}return t.nonce=e,t}(e))}function P(){void 0!==v&&(w(v),v=void 0),void 0===l&&(l=m(function(e,t){if(void 0!==e.headers)for(var n in e.headers)\"x-wp-nonce\"===n.toLowerCase()&&delete e.headers[n];return t(e,t)}))}function E(){void 0!==v&&w(v),void 0!==l&&w(l),v=void 0,l=void 0}var y=function(e,t){return void 0===t&&(t=!0),Promise.resolve(function(e,t){return void 0===t&&(t=!0),t?204===e.status?null:e.json?e.json():Promise.reject(e):e}(e,t)).catch(function(e){return T(e,t)})};function T(e,n){if(void 0===n&&(n=!0),!n)throw e;return function(e){var n={code:\"invalid_json\",message:t(\"The response is not a valid JSON response.\")};if(!e||!e.json)throw n;return e.json().catch(function(){throw n})}(e).then(function(e){var n={code:\"unknown_error\",message:t(\"An unknown error occurred.\")};throw\"rest_cookie_invalid_nonce\"===e.code&&g()&&(e.code=\"external_rest_cookie_invalid_nonce\"),e||n})}var k,_=[\"url\",\"path\",\"data\",\"parse\"],j={Accept:\"application/json, */*;q=0.1\"},x={credentials:\"include\"},O=function(e){if(e.status>=200&&e.status<300)return e;throw e},B=function(e){var n=function e(t,n){return function(r){return void 0===n[t]?r:(0,n[t])(r,t===n.length-1?function(e){return e}:e(t+1,n))}}(0,h.filter(Boolean))(p({},x,e)),r=n.url,o=n.path,i=n.data,u=n.parse,s=void 0===u||u,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(n,_),a=n.body,d=n.headers;return d=p({},j,d),i&&(a=JSON.stringify(i),d[\"Content-Type\"]=\"application/json\"),window.fetch(r||o,p({},c,{body:a,headers:d})).then(function(e){return Promise.resolve(e).then(O).catch(function(e){return T(e,s)}).then(function(e){return y(e,s)})},function(){throw{code:\"fetch_error\",message:t(\"You are probably offline.\")}})},C=function(e,t,n){return Promise.resolve(A(e,t,n,!1)).then(function(e){return Promise.resolve(y(e)).then(function(t){return{items:t,totalPages:parseInt(e.headers.get(\"X-WP-TotalPages\")||\"1\"),totalItems:parseInt(e.headers.get(\"X-WP-Total\")||\"0\")}})})},A=function(t,r,o,i){void 0===i&&(i=!0);try{return Promise.resolve(e(void 0===o||\"GET\"===r?{method:r,parse:i,path:n(t,o)}:{data:o,method:r,parse:i,path:t}))}catch(e){return Promise.reject(e)}};function G(e){return{create:function(t){return A(e,\"POST\",t)},delete:function(t){return A(e+=\"/\"+t,\"DELETE\",{force:!0})},get:function(t){return A(e,\"GET\",t)},getById:function(t,n){return A(e+=\"/\"+t,\"GET\",n)},getWithPagination:function(t){return C(e,\"GET\",t)},trash:function(t){return A(e+=\"/\"+t,\"DELETE\")},update:function(t){return A(e+=\"/\"+t.id,\"PATCH\",t)}}}function L(t){var n={};return[\"categories\",\"comments\",\"blocks\",\"media\",\"menus\",\"menu-locations\",\"menu-items\",\"statuses\",\"pages\",\"posts\",\"tags\",\"taxonomies\",\"types\",\"search\"].map(function(e){return n[e]=function(){return G(\"/wp/v2/\"+e)}}),n.menuLocations=function(){return G(\"/wp/v2/menu-locations\")},n.menuItems=function(){return G(\"/wp/v2/menu-items\")},n.users=function(){var e=G(\"/wp/v2/users\");return e.delete=function(e,t){return void 0===t&&(t=!1),A(\"/wp/v2/users/\"+e,\"DELETE\",{force:!0,reassign:t})},e},n.applicationPasswords=function(){return{create:function(e,t){return A(\"/wp/v2/users/\"+e+\"/application-passwords\",\"POST\",t)},delete:function(e,t){return A(\"/wp/v2/users/\"+e+\"/application-passwords/\"+t,\"DELETE\")},get:function(e){return A(\"/wp/v2/users/\"+e+\"/application-passwords\",\"GET\")},getById:function(e,t){return A(\"/wp/v2/users/\"+e+\"/application-passwords/\"+t,\"GET\")},introspect:function(e){return A(\"/wp/v2/users/\"+e+\"/application-passwords/introspect\",\"GET\")},update:function(e,t,n){return A(\"/wp/v2/users/\"+e+\"/application-passwords/\"+t,\"PUT\",n)}}},n.settings=function(){return{get:function(){return A(\"/wp/v2/settings\",\"GET\")},update:function(e){return A(\"/wp/v2/settings\",\"POST\",e)}}},void 0!==t&&Object.keys(t).map(function(e){return n[e]=t[e]}),e.setFetchHandler(B),n}function R(){w(k)}function I(t,n){k&&w(k),k=m(e.createRootURLMiddleware(t.replace(/\\/$/,\"\")+\"/\")),window.location.hostname&&new URL(t).hostname===window.location.hostname?E():void 0!==n?b(n):g()||P()}var S,D=function(r){return Promise.resolve(function(o,i){try{var u=Promise.resolve(e({path:\"/\",method:\"GET\"})).then(function(e){return e.authentication[\"application-passwords\"]?n(e.authentication[\"application-passwords\"].endpoints.authorization,r):{code:\"application_passwords_disabled\",message:t(\"Application passwords are not enabled on this site.\"),data:null}})}catch(e){return e}return u&&u.then?u.then(void 0,function(e){return e}):u}())};function M(){return void 0!==S}function W(){void 0!==S&&(w(S),S=void 0)}function N(e,t){W(),S=m(function(n,r){var o=n.headers;return r(p({},n,{headers:p({},void 0===o?{}:o,{Authorization:\"Basic \"+btoa(e+\":\"+t)})}),r)})}var U=function(e,t){z({afterReload:q,beforeReload:J,getContext:e,pluginModule:t,register:r,unregister:o,type:\"block\"})},X=function(e,t){z({afterReload:function(){},beforeReload:function(){},getContext:e,pluginModule:t,register:i,unregister:u,type:\"plugin\"})},z=function(e){var t=e.afterReload,n=e.beforeReload,r=e.getContext,o=e.pluginModule,i=e.register,u=e.unregister,s=e.type,c={},a=function(){n();var e=r();if(e){var o=[];return e.keys().forEach(function(t){var n=e(t);n.exclude||n!==c[t]&&(c[n.name+\"-\"+s]&&u(n.name),i(n.name,n.settings),o.push(n.name),c[n.name+\"-\"+s]=n)}),t(o),e}},d=a();o.hot&&null!=d&&d.id&&o.hot.accept(d.id,a)},H=null,J=function(){H=s(\"core/block-editor\").getSelectedBlockClientId(),c(\"core/block-editor\").clearSelectedBlock()},q=function(e){void 0===e&&(e=[]),s(\"core/block-editor\").getBlocks().forEach(function(t){var n=t.clientId;e.includes(t.name)&&c(\"core/block-editor\").selectBlock(n)}),H?c(\"core/block-editor\").selectBlock(H):c(\"core/block-editor\").clearSelectedBlock(),H=null};function F(e){var t=a(\"core/editor\").editPost,n=d(function(e){return{previous:e(\"core/editor\").getCurrentPostAttribute(\"meta\"),current:e(\"core/editor\").getEditedPostAttribute(\"meta\")}}),r=e?n.current[e]:n.current,o=e?n.previous[e]:n.previous,i=f(function(n){var r;e&&t({meta:(r={},r[e]=n,r)})},[t,e]),u=f(function(e,n){var r;t({meta:(r={},r[e]=n,r)})},[t]);return e?[r,i,o]:[r,u,o]}function Y(e){var t=a(\"core/editor\").editPost,n=d(function(t){var n=t(\"core\").getTaxonomy(e);return n?{taxonomy:n,current:t(\"core/editor\").getEditedPostAttribute(n.rest_base),previous:t(\"core/editor\").getCurrentPostAttribute(n.rest_base)}:{current:[],previous:[]}}),r=f(function(e){try{var r;return Promise.resolve(n.taxonomy?t(((r={})[n.taxonomy.rest_base]=e,r)):void 0)}catch(e){return Promise.reject(e)}},[n,t]);return[n.current,r,n.previous]}export{m as addMiddleware,z as autoload,U as autoloadBlocks,X as autoloadPlugins,W as clearApplicationPassword,P as clearNonce,G as createMethods,B as defaultFetchHandler,A as doRequest,C as doRequestWithPagination,N as enableApplicationPassword,D as getAuthorizationUrl,M as hasApplicationPassword,g as hasExternalNonce,w as removeMiddleware,E as restoreNonce,R as restoreRootURL,b as setNonce,I as setRootURL,F as usePostMeta,Y as useTerms,L as wpapi};\n//# sourceMappingURL=index.module.js.map\n","import {Component, ErrorInfo} from 'react';\nimport {CONFIG} from '../globals/config';\nimport {addQueryArgs} from '@wordpress/url';\nimport {sanitize} from 'dompurify';\n\n/**\n * Wrap any component in me, which may throw errors, and I will\n * prevent the entire UI from disappearing.\n *\n * Custom version special to Advanced Sidebar Menu with links to\n * support as well as debugging information.\n *\n * @link https://reactjs.org/docs/error-boundaries.html#introducing-error-boundaries\n */\nclass ErrorBoundary extends Component<{ attributes: Record<string, any>, block: string }, { hasError: boolean, error: Error | null }> {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\thasError: false,\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromError() {\n\t\t// Update state, so the next render will show the fallback UI.\n\t\treturn {\n\t\t\thasError: true,\n\t\t};\n\t}\n\n\t/**\n\t * Log information about the error when it happens.\n\t *\n\t * @notice Will log \"Error: A cross-origin error was thrown. React doesn't have\n\t * access to the actual error object in development\" in React development\n\t * mode but provides full error info in React production.\n\t */\n\tcomponentDidCatch( error: Error, info: ErrorInfo ) {\n\t\tconsole.log( '%cError caught by the Advanced Sidebar ErrorBoundary!', 'color:orange; font-size: large; font-weight: bold' );\n\t\tconsole.log( this.props );\n\t\tconsole.log( error );\n\t\tconsole.log( info );\n\t\tthis.setState( {\n\t\t\terror,\n\t\t} );\n\t}\n\n\trender() {\n\t\tif ( this.state.hasError ) {\n\t\t\tif ( ! CONFIG.siteInfo.scriptDebug ) {\n\t\t\t\treturn ( <div className={'components-panel__body is-opened'}>\n\t\t\t\t\t<h4 style={{color: 'red'}}>\n\t\t\t\t\t\tSomething went wrong!\n\t\t\t\t\t</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tPlease <a href={addQueryArgs( sanitize( window.location.href ), {'script-debug': true}, )}>\n\t\t\t\t\t\t\tenable script debug\n\t\t\t\t\t\t</a>:\n\t\t\t\t\t</p>\n\t\t\t\t</div> );\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<div className={'components-panel__body is-opened'}>\n\t\t\t\t\t<h4 style={{color: 'red'}}>\n\t\t\t\t\t\tSomething went wrong!\n\t\t\t\t\t</h4>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tPlease <a target=\"_blank\" href={CONFIG.support} rel=\"noreferrer\">\n\t\t\t\t\t\t\tcreate a support request\n\t\t\t\t\t\t</a> with the following:\n\t\t\t\t\t</p>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\tThe <a\n\t\t\t\t\t\t\t\thref={'https://onpointplugins.com/how-to-retrieve-console-logs-from-your-browser/'}\n\t\t\t\t\t\t\t\ttarget={'_blank'} rel=\"noreferrer\">\n\t\t\t\t\t\t\t\tlogs from your browser console.\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\tThe following information.\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ol>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tborder: '2px groove',\n\t\t\t\t\t\t\tpadding: '10px',\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\toverflowWrap: 'break-word',\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong><em>Message</em></strong> <br />\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{this.state.error?.message}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong><em>Block</em></strong> <br />\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{this.props.block}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong><em>Attributes</em></strong> <br />\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{JSON.stringify( this.props.attributes )}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong><em>Site Info</em></strong> <br />\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{JSON.stringify( CONFIG.siteInfo )}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong><em>Stack</em></strong> <br />\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{this.state.error?.stack}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t \n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\nexport default ErrorBoundary;\n","import {ComponentClass, FunctionComponent} from 'react';\nimport {TransformLegacy} from '../gutenberg/helpers';\n\ninterface JSConfig {\n\tblocks: {\n\t\tcategories: {\n\t\t\tid: string;\n\t\t};\n\t\tpages: {\n\t\t\tid: string;\n\t\t};\n\t\tnavigation?: {\n\t\t\tid: string;\n\t\t}\n\t};\n\tcategories: {\n\t\tdisplayEach: { [ value: string ]: string };\n\t};\n\tcurrentScreen: 'site-editor' | 'widgets' | 'post' | 'customize';\n\tdocs: {\n\t\tpage: string;\n\t\tcategory: string;\n\t};\n\terror: false | string;\n\tErrorBoundary: ComponentClass<{ attributes: Record<string, any>, block: string }>;\n\tfeatures: Array<string>;\n\tisPro: boolean;\n\tpages: {\n\t\torderBy: { [ value: string ]: string };\n\t};\n\tPreview: FunctionComponent<any>;\n\tsiteInfo: {\n\t\tbasic: string;\n\t\tpro: string;\n\t\tscriptDebug: boolean;\n\t\twordpress: string;\n\t};\n\tsupport: string;\n\ttransformLegacyWidget: TransformLegacy;\n}\n\n\ndeclare global {\n\tinterface Window {\n\t\tADVANCED_SIDEBAR_MENU: JSConfig;\n\t\t__TEST__?: boolean;\n\t}\n}\n\nexport const CONFIG: JSConfig = window.ADVANCED_SIDEBAR_MENU || ( {} as JSConfig );\n","import {withFilters} from '@wordpress/components';\nimport {select} from '@wordpress/data';\nimport {isEmpty} from 'lodash';\n\ntype Props = {\n\tclientId: string;\n};\n\nlet firstClientId = '';\n/**\n * The customizer area does not include a `PluginArea` component,\n * so our slot fills do not load.\n *\n * We can use filters, but the Fills double up each time\n * another block is added to the page.\n *\n * Track the clientId of the first block we add the Fill to\n * and only return the Fill for that block. The rest of the blocks\n * inherit the Fill from the first block via their Slots.\n */\nconst SideLoad = ( {clientId, children} ) => {\n\tif ( ! isEmpty( firstClientId ) && clientId !== firstClientId ) {\n\t\t// Make sure block still exists.\n\t\tif ( -1 !== select( 'core/block-editor' ).getBlockIndex( firstClientId ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\tfirstClientId = clientId;\n\treturn children ?? null;\n};\n\nexport default withFilters<Props>( 'advanced-sidebar-menu.blocks.side-load' )( SideLoad );\n","import {CheckboxControl, PanelBody, Slot} from '@wordpress/components';\nimport {CONFIG} from '../../globals/config';\nimport type {Attr as PageAttr} from './pages/block';\nimport type {Attr as CategoryAttr} from './categories/block';\nimport {__, sprintf} from '@wordpress/i18n';\nimport {Type} from '@wordpress/api/types';\nimport {range} from 'lodash';\nimport reactStringReplace from 'react-string-replace';\nimport {Taxonomy} from '@wordpress/api/taxonomies';\nimport ErrorBoundary from '../../components/ErrorBoundary';\nimport {BlockEditProps} from '@wordpress/blocks';\nimport {PropsWithChildren} from 'react';\n\n\nexport type DisplayOptions = {\n\tdisplay_all: boolean;\n\tinclude_childless_parent: boolean;\n\tinclude_parent: boolean;\n\tlevels: number;\n}\n\nexport type FillProps =\n\tPick<BlockEditProps<PageAttr | CategoryAttr>, 'clientId' | 'attributes' | 'setAttributes' | 'name'>\n\t& { type?: Type | Taxonomy }\n\ntype Props = PropsWithChildren<{\n\tattributes: PageAttr | CategoryAttr;\n\tsetAttributes: BlockEditProps<PageAttr | CategoryAttr>['setAttributes'];\n\ttype?: Type | Taxonomy;\n\tname: string;\n\tclientId: string;\n}>;\n\nconst checkboxes: { [attr in keyof Partial<DisplayOptions>]: string } = {\n\t/* translators: Selected taxonomy single label */\n\tinclude_parent: __( 'Display the highest level parent %s', 'advanced-sidebar-menu' ),\n\t/* translators: Selected taxonomy single label */\n\tinclude_childless_parent: __( 'Display menu when there is only the parent %s', 'advanced-sidebar-menu' ),\n\t/* translators: Selected taxonomy plural label */\n\tdisplay_all: __( 'Always display child %s', 'advanced-sidebar-menu' ),\n};\n\n/**\n * Display Options shared between widgets.\n *\n * 1. Display the highest level parent page.\n * 2. Display menu when there is only the parent page.\n * 3. Always display child pages.\n * 5. Display levels of child pages.\n *\n */\nconst Display = ( {\n\tattributes,\n\tsetAttributes,\n\ttype,\n\tname,\n\tclientId,\n\tchildren,\n}: Props ) => {\n\tconst showLevels = ( CONFIG.blocks.pages.id === name && CONFIG.isPro ) || attributes.display_all;\n\n\tconst fillProps: FillProps = {\n\t\ttype,\n\t\tattributes,\n\t\tname,\n\t\tsetAttributes,\n\t\tclientId,\n\t};\n\n\treturn (\n\t\t<PanelBody title={__( 'Display', 'advanced-sidebar-menu' )}>\n\t\t\t{Object.keys( checkboxes ).map( item => {\n\t\t\t\tlet label = type?.labels?.singular_name.toLowerCase() ?? '';\n\t\t\t\tif ( 'display_all' === item ) {\n\t\t\t\t\tlabel = type?.labels?.name.toLowerCase() ?? '';\n\t\t\t\t}\n\t\t\t\treturn <CheckboxControl\n\t\t\t\t\tkey={item}\n\t\t\t\t\t//eslint-disable-next-line @wordpress/valid-sprintf\n\t\t\t\t\tlabel={sprintf( checkboxes[ item ], label )}\n\t\t\t\t\tchecked={!! attributes[ item ]}\n\t\t\t\t\tonChange={value => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t[ item ]: !! value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}}\n\t\t\t\t/>;\n\t\t\t} )}\n\t\t\t{showLevels && <div className={'components-base-control'}>\n\t\t\t\t{/* translators: {select html input}, {post type plural label} */\n\t\t\t\t\treactStringReplace( __( 'Display %1$s levels of child %2$s', 'advanced-sidebar-menu' ).replace( '%2$s', type?.labels?.name.toLowerCase() ?? '' ), '%1$s',\n\t\t\t\t\t\t() => (\n\t\t\t\t\t\t\t<select\n\t\t\t\t\t\t\t\tkey={'levels'}\n\t\t\t\t\t\t\t\tvalue={attributes.levels}\n\t\t\t\t\t\t\t\tonChange={ev => setAttributes( {levels: parseInt( ev.target.value )} )}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<option value=\"100\">\n\t\t\t\t\t\t\t\t\t{__( '- All -', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t{range( 1, 10 ).map( n => <option key={n} value={n}>\n\t\t\t\t\t\t\t\t\t{n}\n\t\t\t\t\t\t\t\t</option> )}\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t) )}\n\t\t\t</div>}\n\n\t\t\t{children}\n\n\t\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t\t{CONFIG.blocks.pages.id === name &&\n\t\t\t\t\t<Slot<FillProps>\n\t\t\t\t\t\tname=\"advanced-sidebar-menu/pages/display\"\n\t\t\t\t\t\tfillProps={fillProps} />}\n\t\t\t\t{CONFIG.blocks.categories.id === name &&\n\t\t\t\t\t<Slot<FillProps>\n\t\t\t\t\t\tname=\"advanced-sidebar-menu/categories/display\"\n\t\t\t\t\t\tfillProps={fillProps} />}\n\t\t\t</ErrorBoundary>\n\n\t\t</PanelBody>\n\t);\n};\n\nexport default Display;\n","import {CONFIG} from '../../globals/config';\nimport {Button, PanelBody, withFilters} from '@wordpress/components';\nimport {InspectorControls} from '@wordpress/block-editor';\nimport {decodeEntities} from '@wordpress/html-entities';\nimport {__} from '@wordpress/i18n';\n\nimport styles from './info-panel.pcss';\n\ntype Props = {\n\tclientId: string;\n};\n\nconst InfoPanel = ( {}: Props ) => {\n\treturn ( <InspectorControls>\n\t\t<PanelBody\n\t\t\ttitle={__( 'Advanced Sidebar Menu PRO', 'advanced-sidebar-menu' )}\n\t\t\tclassName={styles.wrap}\n\t\t>\n\t\t\t<ul>\n\t\t\t\t{CONFIG.features.map( feature =>\n\t\t\t\t\t<li key={feature}>{decodeEntities( feature )}</li> )}\n\t\t\t\t<li>\n\t\t\t\t\t<a\n\t\t\t\t\t\thref=\"https://onpointplugins.com/product/advanced-sidebar-menu-pro/?utm_source=block-more&utm_campaign=gopro&utm_medium=wp-dash\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\tstyle={{textDecoration: 'none'}}\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{__( 'So much more…', 'advanced-sidebar-menu' )}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<Button\n\t\t\t\tclassName={styles.button}\n\t\t\t\thref={'https://onpointplugins.com/product/advanced-sidebar-menu-pro/?trigger_buy_now=1&utm_source=block-upgrade&utm_campaign=gopro&utm_medium=wp-dash'}\n\t\t\t\ttarget={'_blank'}\n\t\t\t\trel={'noreferrer'}\n\t\t\t\tisPrimary\n\t\t\t>\n\t\t\t\t{__( 'Upgrade', 'advanced-sidebar-menu' )}\n\t\t\t</Button>\n\t\t</PanelBody>\n\t</InspectorControls> );\n};\n\nexport default withFilters<Props>( 'advanced-sidebar-menu.blocks.info-panel' )( InfoPanel );\n","import {ReactElement, useEffect} from 'react';\nimport {CONFIG} from '../../globals/config';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport {Placeholder, Spinner} from '@wordpress/components';\nimport {useBlockProps} from '@wordpress/block-editor';\nimport {sanitize} from 'dompurify';\nimport {doAction} from '@wordpress/hooks';\nimport {__} from '@wordpress/i18n';\n\nimport styles from './preview.pcss';\nimport {select} from '@wordpress/data';\n\nexport type PreviewOptions = {\n\tisServerSideRenderRequest: boolean;\n\tclientId: string;\n\tsidebarId: string;\n}\n\ntype Props<A> = {\n\tattributes: A;\n\tblock: string;\n\tclientId: string;\n};\n\n/**\n * Sanitize a client id for use as an HTML id.\n *\n * Must not start with a `-` or a digit.\n *\n */\nexport const sanitizeClientId = ( clientId: string ): string => {\n\treturn clientId.replace( /^([\\d-])/, '_$1' );\n};\n\n/**\n * If we are in the widgets' area, the block is wrapped in\n * a \"sidebar\" block. We retrieve the id to pass along with\n * the request to use the `widget_args` within the preview.\n *\n */\nconst getSidebarId = ( clientId: string ): string => {\n\tif ( 'widgets' !== CONFIG.currentScreen ) {\n\t\treturn '';\n\t}\n\tconst rootId = select( 'core/block-editor' ).getBlockRootClientId( clientId );\n\tif ( rootId ) {\n\t\tconst ParentBlock = select( 'core/block-editor' ).getBlocksByClientId( [ rootId ] );\n\t\tif ( ParentBlock[ 0 ] && 'core/widget-area' === ParentBlock[ 0 ].name ) {\n\t\t\treturn ParentBlock[ 0 ]?.attributes?.id;\n\t\t}\n\t}\n\n\treturn '';\n};\n\n/**\n * @notice Must use static constants, or the ServerSide requests\n * will fire anytime something on the page is changed\n * because the component re-renders.\n */\nconst Page = () => <Placeholder\n\tclassName={styles.placeholder}\n\ticon={'welcome-widgets-menus'}\n\tlabel={__( 'Advanced Sidebar - Pages', 'advanced-sidebar-menu' )}\n\tinstructions={__( 'No preview available', 'advanced-sidebar-menu' )}\n/>;\n\nconst Category = () => <Placeholder\n\tclassName={styles.placeholder}\n\ticon={'welcome-widgets-menus'}\n\tlabel={__( 'Advanced Sidebar - Categories', 'advanced-sidebar-menu' )}\n\tinstructions={__( 'No preview available', 'advanced-sidebar-menu' )}\n/>;\n\nconst Navigation = () => <Placeholder\n\tclassName={styles.placeholder}\n\ticon={'welcome-widgets-menus'}\n\tlabel={__( 'Advanced Sidebar - Navigation', 'advanced-sidebar-menu' )}\n\tinstructions={__( 'No preview available', 'advanced-sidebar-menu' )}\n/>;\n\n/**\n * @notice The styles will not display for the preview\n * in the block inserter sidebar when Webpack\n * is enabled because the iframe has a late init.\n *\n */\nconst placeholder = ( block ): () => ReactElement => {\n\tswitch ( block ) {\n\t\tcase CONFIG.blocks.pages.id:\n\t\t\treturn Page;\n\t\tcase CONFIG.blocks.categories.id:\n\t\t\treturn Category;\n\t\tcase CONFIG.blocks.navigation?.id:\n\t\t\treturn Navigation;\n\t}\n\treturn () => <></>;\n};\n\n\n/**\n * Same as the `DefaultLoadingResponsePlaceholder` except we trigger\n * an action when the loading component is unmounted to allow\n * components to hook into when ServerSideRender has finished loading.\n *\n * @notice Using a constant to prevent reload on every content change.\n *\n */\nconst TriggerWhenLoadingFinished = ( {\n\tchildren,\n\tattributes = {\n\t\tclientId: '',\n\t},\n} ) => {\n\tuseEffect( () => {\n\t\t// Call action when the loading component unmounts because loading is finished.\n\t\treturn () => {\n\t\t\t// Give the preview a chance to load on WP 5.8.\n\t\t\tsetTimeout( () => {\n\t\t\t\t$( '[data-preview=\"' + `${attributes.clientId}` + '\"]' )\n\t\t\t\t\t.find( 'a' )\n\t\t\t\t\t.on( 'click', ev => ev.preventDefault() );\n\n\t\t\t\tdoAction( 'advanced-sidebar-menu.blocks.preview.loading-finished', {\n\t\t\t\t\tvalues: attributes,\n\t\t\t\t\tclientId: attributes.clientId,\n\t\t\t\t} );\n\t\t\t}, 100 );\n\t\t};\n\t} );\n\n\t/**\n\t * ServerSideRender returns a <RawHTML /> filled with an error object when fetch fails.\n\t *\n\t * We throw an error, so our `ErrorBoundary` will catch it, otherwise we end up\n\t * with a \"React objects may not be used as children\" error, which means nothing.\n\t */\n\tif ( children?.props?.children?.errorMsg ) {\n\t\tthrow new Error( children?.props?.children?.errorMsg ?? 'Failed' );\n\t}\n\n\treturn (\n\t\t<div className={styles.spinWrap}>\n\t\t\t<div className={styles.spin}>\n\t\t\t\t<Spinner />\n\t\t\t</div>\n\t\t\t<div className={styles.spinContent}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n\nconst Preview = <A, >( {attributes, block, clientId}: Props<A> ) => {\n\tconst blockProps = useBlockProps();\n\n\tif ( '' !== CONFIG.error ) {\n\t\treturn <div\n\t\t\tclassName={styles.error}\n\t\t\tdangerouslySetInnerHTML={{__html: sanitize( CONFIG.error )}} />;\n\t}\n\n\n\tconst sanitizedClientId = sanitizeClientId( clientId );\n\n\t// Prevent styles from doubling up as they are already added via render in PHP.\n\tdelete blockProps.style;\n\n\treturn (\n\t\t<div {...blockProps} data-preview={sanitizedClientId}>\n\t\t\t<ServerSideRender<A & PreviewOptions>\n\t\t\t\tEmptyResponsePlaceholder={placeholder( block )}\n\t\t\t\tLoadingResponsePlaceholder={TriggerWhenLoadingFinished}\n\t\t\t\tattributes={{\n\t\t\t\t\t...attributes,\n\t\t\t\t\t// Send custom attribute to determine server side renders.\n\t\t\t\t\tisServerSideRenderRequest: true,\n\t\t\t\t\tclientId: sanitizedClientId,\n\t\t\t\t\tsidebarId: getSidebarId( clientId ),\n\t\t\t\t}}\n\t\t\t\tblock={block}\n\t\t\t\thttpMethod={'POST'}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nexport default Preview;\n","import {useSelect} from '@wordpress/data';\nimport {CONFIG} from '../../../globals/config';\nimport {sanitize} from 'dompurify';\nimport {BlockControls, InspectorControls} from '@wordpress/block-editor';\nimport Preview from '../Preview';\nimport {Attr, block} from './block';\nimport {Taxonomy} from '@wordpress/api/taxonomies';\nimport {BlockEditProps} from '@wordpress/blocks';\nimport ErrorBoundary from '../../../components/ErrorBoundary';\nimport Display from '../Display';\nimport {\n\tCheckboxControl,\n\tPanelBody,\n\tSelectControl,\n\tSlot,\n\tTextControl,\n} from '@wordpress/components';\nimport {__, sprintf} from '@wordpress/i18n';\nimport InfoPanel from '../InfoPanel';\n\nimport styles from '../pages/edit.pcss';\nimport SideLoad from '../../SideLoad';\n\nexport type FillProps =\n\tPick<BlockEditProps<Attr>, 'clientId' | 'attributes' | 'setAttributes' | 'name'>\n\t& { type?: Taxonomy }\n\ntype Props = BlockEditProps<Attr>;\n\nconst Edit = ( {attributes, setAttributes, clientId, name}: Props ) => {\n\tconst taxonomy: Taxonomy | undefined = useSelect( select => {\n\t\tconst type = select( 'core' ).getTaxonomy( attributes.taxonomy ?? 'category' );\n\t\treturn type ?? select( 'core' ).getTaxonomy( 'category' );\n\t}, [ attributes.taxonomy ] );\n\n\t// We have a version conflict or license error.\n\tif ( '' !== CONFIG.error ) {\n\t\treturn ( <>\n\t\t\t<InspectorControls>\n\t\t\t\t<div\n\t\t\t\t\tclassName={styles.error}\n\t\t\t\t\tdangerouslySetInnerHTML={{__html: sanitize( CONFIG.error )}} />\n\t\t\t</InspectorControls>\n\t\t\t<Preview<Attr> attributes={attributes} block={block.id} clientId={clientId} />\n\t\t</> );\n\t}\n\n\tconst fillProps: FillProps = {\n\t\ttype: taxonomy,\n\t\tattributes,\n\t\tname,\n\t\tsetAttributes,\n\t\tclientId,\n\t};\n\n\treturn ( <>\n\t\t<InspectorControls>\n\t\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t\t{( 'widgets' === CONFIG.currentScreen || 'site-editor' === CONFIG.currentScreen || 'customize' === CONFIG.currentScreen ) &&\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tvalue={attributes.title ?? ''}\n\t\t\t\t\t\t\tlabel={__( 'Title', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\t\tonChange={title => setAttributes( {title} )} />\n\t\t\t\t\t</PanelBody>}\n\t\t\t\t<Display\n\t\t\t\t\tattributes={attributes}\n\t\t\t\t\tclientId={clientId}\n\t\t\t\t\tname={name}\n\t\t\t\t\tsetAttributes={setAttributes}\n\t\t\t\t\ttype={taxonomy}\n\t\t\t\t>\n\t\t\t\t\t{/* Not offering \"Display categories on single posts\"\n\t\t when editing a post because this must be true, or\n\t\t the block won't display.\n\n\t\t We default the attribute to `true` if we are editing\n\t\t a post during register of block attributes. */}\n\t\t\t\t\t{'post' !== CONFIG.currentScreen && <CheckboxControl\n\t\t\t\t\t\t/* translators: Selected taxonomy plural label */\n\t\t\t\t\t\tlabel={sprintf( __( 'Display %s on single posts', 'advanced-sidebar-menu' ), taxonomy?.labels?.name.toLowerCase() ?? '' )}\n\t\t\t\t\t\tchecked={!! attributes.single}\n\t\t\t\t\t\tonChange={value => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tsingle: !! value,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>}\n\t\t\t\t\t{/*\n\t\t\t\t\t\t Only widget screens support this option because we\n\t\t\t\t\t\t have no widget wrap to use on other screens, so they are\n\t\t\t\t\t\t list only. */}\n\t\t\t\t\t{( 'widgets' === CONFIG.currentScreen ) && attributes.single &&\n\t\t\t\t\t\t<SelectControl<'list' | 'widget'>\n\t\t\t\t\t\t\t/* translators: Selected taxonomy single label */\n\t\t\t\t\t\t\tlabel={sprintf( __( 'Display each single post\\'s %s', 'advanced-sidebar-menu' ), taxonomy?.labels?.name.toLowerCase() ?? '' )}\n\t\t\t\t\t\t\tvalue={attributes.new_widget}\n\t\t\t\t\t\t\toptions={Object.entries( CONFIG.categories.displayEach ).map( ( [ value, label ] ) => ( {\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t} ) )}\n\t\t\t\t\t\t\t/* eslint-disable-next-line camelcase */\n\t\t\t\t\t\t\tonChange={new_widget => setAttributes( {new_widget} )}\n\t\t\t\t\t\t/>}\n\t\t\t\t</Display>\n\n\t\t\t\t<div className={'components-panel__body is-opened'}>\n\n\t\t\t\t\t<Slot<FillProps>\n\t\t\t\t\t\tname=\"advanced-sidebar-menu/categories/general\"\n\t\t\t\t\t\tfillProps={fillProps} />\n\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t/* translators: Selected post type plural label */\n\t\t\t\t\t\tlabel={sprintf( __( '%s to exclude (ids, comma separated)', 'advanced-sidebar-menu' ), taxonomy?.labels?.name ?? '' )}\n\t\t\t\t\t\tvalue={attributes.exclude}\n\t\t\t\t\t\tonChange={value => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\texclude: value,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}} />\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref={CONFIG.docs.category}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{__( 'block documentation', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t<Slot<FillProps>\n\t\t\t\t\tname=\"advanced-sidebar-menu/categories/inspector\"\n\t\t\t\t\tfillProps={fillProps} />\n\n\t\t\t</ErrorBoundary>\n\t\t</InspectorControls>\n\n\t\t<BlockControls>\n\t\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t\t<Slot<FillProps>\n\t\t\t\t\tname=\"advanced-sidebar-menu/categories/block-controls\"\n\t\t\t\t\tfillProps={fillProps} />\n\t\t\t</ErrorBoundary>\n\t\t</BlockControls>\n\n\t\t<InfoPanel clientId={clientId} />\n\n\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t<Preview<Attr> attributes={attributes} block={block.id} clientId={clientId} />\n\t\t</ErrorBoundary>\n\n\t\t<SideLoad clientId={clientId} />\n\t</> );\n};\n\nexport default Edit;\n","import {PreviewOptions} from '../Preview';\nimport {CONFIG} from '../../../globals/config';\nimport {BlockSettings, LegacyWidget} from '@wordpress/blocks';\nimport Edit from './Edit';\nimport {DisplayOptions} from '../Display';\nimport {transformLegacyWidget} from '../../helpers';\nimport {__} from '@wordpress/i18n';\n\n/**\n * Attributes specific to the widget as well as shared\n * widget attributes.\n *\n * @see \\Advanced_Sidebar_Menu\\Blocks\\Block_Abstract::get_all_attributes\n * @see \\Advanced_Sidebar_Menu\\Blocks\\Pages::get_attributes\n */\nexport type Attr = {\n\texclude: string;\n\tnew_widget: 'widget' | 'list';\n\torder_by: string;\n\tsingle: boolean;\n\ttitle: string;\n} & DisplayOptions & ProRegistered & PreviewOptions;\n\n// Options used by basic when available from PRO.\ntype ProRegistered = {\n\ttaxonomy: string;\n}\n\nexport type setAttributes = ( newValue: {\n\t[attribute in keyof Attr]?: Attr[attribute]\n} ) => void;\n\n/**\n * Attributes used for the example preview.\n * Combines some PRO and basic attributes.\n * The PRO attributes will only be sent if PRO is active.\n */\nconst EXAMPLE = {\n\t'display-posts': 'all',\n\t'display-posts/limit': 2,\n\tapply_current_page_parent_styles_to_parent: true,\n\tapply_current_page_styles_to_parent: true,\n\tblock_style: true,\n\tborder: true,\n\tborder_color: '#333',\n\tbullet_style: 'none',\n\tchild_page_bg_color: '#666',\n\tchild_page_color: '#fff',\n\tparent_page_bg_color: '#282828',\n\tparent_page_color: '#0cc4c6',\n\tparent_page_font_weight: 'normal',\n\tdisplay_all: true,\n\tgrandchild_page_bg_color: '#989898',\n\tgrandchild_page_color: '#282828',\n\tgrandchild_page_font_weight: 'bold',\n\tinclude_childless_parent: true,\n\tinclude_parent: true,\n\tlevels: '2',\n};\n\n\nexport const block = CONFIG.blocks.categories;\n\nexport const name = block.id;\n\nexport const settings: BlockSettings<Attr, '', LegacyWidget<Attr & { title: string }>> = {\n\ttitle: __( 'Advanced Sidebar - Categories', 'advanced-sidebar-menu' ),\n\ticon: 'welcome-widgets-menus',\n\tcategory: 'widgets',\n\texample: {\n\t\tattributes: EXAMPLE as any,\n\t},\n\ttransforms: {\n\t\tfrom: [\n\t\t\t{\n\t\t\t\ttype: 'block',\n\t\t\t\tblocks: [ 'core/legacy-widget' ],\n\t\t\t\tisMatch: ( {idBase, instance} ) => {\n\t\t\t\t\tif ( ! instance?.raw ) {\n\t\t\t\t\t\t// Can't transform if raw instance is not shown in REST API.\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn 'advanced_sidebar_menu_category' === idBase;\n\t\t\t\t},\n\t\t\t\ttransform: transformLegacyWidget<Attr>( name ),\n\t\t\t},\n\t\t],\n\t},\n\t// `attributes` are registered server side because we use ServerSideRender.\n\t// `supports` are registered server side for easy overrides.\n\tedit: props => (\n\t\t<Edit {...props} />\n\t),\n\tsave: () => null,\n\tapiVersion: 2,\n};\n","import {BlockControls, InspectorControls} from '@wordpress/block-editor';\nimport {PanelBody, SelectControl, Slot, TextControl} from '@wordpress/components';\nimport {BlockEditProps} from '@wordpress/blocks';\nimport {Attr, block} from './block';\nimport Preview from '../Preview';\nimport Display from '../Display';\nimport {useSelect} from '@wordpress/data';\nimport InfoPanel from '../InfoPanel';\nimport {CONFIG} from '../../../globals/config';\nimport {sanitize} from 'dompurify';\nimport {__, sprintf} from '@wordpress/i18n';\nimport {Type} from '@wordpress/api/types';\nimport ErrorBoundary from '../../../components/ErrorBoundary';\n\nimport styles from './edit.pcss';\nimport SideLoad from '../../SideLoad';\n\nexport type FillProps =\n\tPick<BlockEditProps<Attr>, 'clientId' | 'attributes' | 'setAttributes' | 'name'>\n\t& { type?: Type }\n\ntype Props = BlockEditProps<Attr>;\n\n/**\n * Pages block content in the editor.\n */\nconst Edit = ( {attributes, setAttributes, clientId, name}: Props ) => {\n\tconst postType: Type | undefined = useSelect( select => {\n\t\tconst type = select( 'core' ).getPostType( attributes.post_type ?? 'page' );\n\t\treturn type ?? select( 'core' ).getPostType( 'page' );\n\t}, [ attributes.post_type ] );\n\n\t// We have a version conflict or license error.\n\tif ( '' !== CONFIG.error ) {\n\t\treturn ( <>\n\t\t\t<InspectorControls>\n\t\t\t\t<div\n\t\t\t\t\tclassName={styles.error}\n\t\t\t\t\tdangerouslySetInnerHTML={{__html: sanitize( CONFIG.error )}} />\n\t\t\t</InspectorControls>\n\t\t\t<Preview<Attr> attributes={attributes} block={block.id} clientId={clientId} />\n\t\t</> );\n\t}\n\n\tconst fillProps: FillProps = {\n\t\ttype: postType,\n\t\tattributes,\n\t\tname,\n\t\tsetAttributes,\n\t\tclientId,\n\t};\n\n\treturn ( <>\n\t\t<InspectorControls>\n\t\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t\t{( 'widgets' === CONFIG.currentScreen || 'site-editor' === CONFIG.currentScreen || 'customize' === CONFIG.currentScreen ) &&\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tvalue={attributes.title ?? ''}\n\t\t\t\t\t\t\tlabel={__( 'Title', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\t\tonChange={title => setAttributes( {title} )} />\n\t\t\t\t\t</PanelBody>}\n\t\t\t\t<Display\n\t\t\t\t\tattributes={attributes}\n\t\t\t\t\tclientId={clientId}\n\t\t\t\t\tname={name}\n\t\t\t\t\tsetAttributes={setAttributes}\n\t\t\t\t\ttype={postType} />\n\n\t\t\t\t<div className={'components-panel__body is-opened'}>\n\n\t\t\t\t\t<Slot<FillProps>\n\t\t\t\t\t\tname=\"advanced-sidebar-menu/pages/general\"\n\t\t\t\t\t\tfillProps={fillProps} />\n\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={__( 'Order by', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\tvalue={attributes.order_by}\n\t\t\t\t\t\tlabelPosition={'side'}\n\t\t\t\t\t\toptions={Object.entries( CONFIG.pages.orderBy ).map( ( [ value, label ] ) => ( {\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t} ) )}\n\t\t\t\t\t\tonChange={value => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\torder_by: value,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}} />\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t/* translators: Selected post type plural label */\n\t\t\t\t\t\tlabel={sprintf( __( '%s to exclude (ids, comma separated)', 'advanced-sidebar-menu' ), postType?.labels?.name ?? '' )}\n\t\t\t\t\t\tvalue={attributes.exclude}\n\t\t\t\t\t\tonChange={value => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\texclude: value,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}} />\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref={CONFIG.docs.page}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{__( 'block documentation', 'advanced-sidebar-menu' )}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t<Slot<FillProps>\n\t\t\t\t\tname=\"advanced-sidebar-menu/pages/inspector\"\n\t\t\t\t\tfillProps={fillProps} />\n\n\t\t\t</ErrorBoundary>\n\t\t</InspectorControls>\n\n\t\t<BlockControls>\n\t\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t\t<Slot<FillProps>\n\t\t\t\t\tname=\"advanced-sidebar-menu/pages/block-controls\"\n\t\t\t\t\tfillProps={fillProps} />\n\t\t\t</ErrorBoundary>\n\t\t</BlockControls>\n\n\t\t<InfoPanel clientId={clientId} />\n\n\t\t<ErrorBoundary attributes={attributes} block={name}>\n\t\t\t<Preview<Attr> attributes={attributes} block={block.id} clientId={clientId} />\n\t\t</ErrorBoundary>\n\n\t\t<SideLoad clientId={clientId} />\n\t</> );\n};\n\nexport default Edit;\n","import {BlockSettings, LegacyWidget} from '@wordpress/blocks';\nimport {CONFIG} from '../../../globals/config';\nimport Edit from './Edit';\nimport {PreviewOptions} from '../Preview';\nimport {DisplayOptions} from '../Display';\nimport {transformLegacyWidget} from '../../helpers';\nimport {__} from '@wordpress/i18n';\n\n/**\n * Attributes specific to the widget as well as shared\n * widget attributes.\n *\n * @see \\Advanced_Sidebar_Menu\\Blocks\\Block_Abstract::get_all_attributes\n * @see \\Advanced_Sidebar_Menu\\Blocks\\Pages::get_attributes\n */\nexport type Attr = {\n\texclude: string;\n\torder_by: string;\n\ttitle: string;\n} & DisplayOptions & ProRegistered & PreviewOptions;\n\n// Options used by basic when available from PRO.\ntype ProRegistered = {\n\tpost_type: string;\n}\n\nexport type setAttributes = ( newValue: {\n\t[attribute in keyof Attr]?: Attr[attribute]\n} ) => void;\n\n\n/**\n * Attributes used for the example preview.\n * Combines some PRO and basic attributes.\n * The PRO attributes will only be sent if PRO is active.\n */\nconst EXAMPLE = {\n\tinclude_parent: true,\n\tinclude_childless_parent: true,\n\tdisplay_all: true,\n\tlevels: '2',\n\tapply_current_page_styles_to_parent: true,\n\tapply_current_page_parent_styles_to_parent: true,\n\tblock_style: true,\n\tborder: true,\n\tborder_color: '#333',\n\tbullet_style: 'none',\n\tparent_page_color: '#fff',\n\tparent_page_bg_color: '#666',\n\tchild_page_color: '#fff',\n\tchild_page_bg_color: '#666',\n\tgrandchild_page_color: '#282828',\n\tgrandchild_page_bg_color: '#989898',\n\tgrandchild_page_font_weight: 'bold',\n\tcurrent_page_color: '#0cc4c6',\n\tcurrent_page_bg_color: '#282828',\n\tcurrent_page_font_weight: 'normal',\n\tcurrent_page_parent_bg_color: '#333',\n};\n\nexport const block = CONFIG.blocks.pages;\n\nexport const name = block.id;\n\nexport const settings: BlockSettings<Attr, '', LegacyWidget<Attr & { title: string }>> = {\n\ttitle: __( 'Advanced Sidebar - Pages', 'advanced-sidebar-menu' ),\n\ticon: 'welcome-widgets-menus',\n\tcategory: 'widgets',\n\texample: {\n\t\tattributes: EXAMPLE as any,\n\t},\n\ttransforms: {\n\t\tfrom: [\n\t\t\t{\n\t\t\t\ttype: 'block',\n\t\t\t\tblocks: [ 'core/legacy-widget' ],\n\t\t\t\tisMatch: ( {idBase, instance} ) => {\n\t\t\t\t\tif ( ! instance?.raw ) {\n\t\t\t\t\t\t// Can't transform if raw instance is not shown in REST API.\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn 'advanced_sidebar_menu' === idBase;\n\t\t\t\t},\n\t\t\t\ttransform: transformLegacyWidget<Attr>( name ),\n\t\t\t},\n\t\t],\n\t},\n\t// `attributes` are registered server side because we use ServerSideRender.\n\t// `supports` are registered server side for easy overrides.\n\tedit: props => (\n\t\t<Edit {...props} />\n\t),\n\tsave: () => null,\n\tapiVersion: 2,\n};\n","import {createBlock, CreateBlock} from '@wordpress/blocks';\n\nexport type TransformLegacy = <A>( name: string ) => ( widgetValues: { instance: Record<string, any> } ) => CreateBlock<A>[];\n\n/**\n * Transform a legacy widget to the matching block.\n *\n */\nexport const transformLegacyWidget: TransformLegacy = <A>( name: string ) => ( {instance} ) => {\n\treturn [ createBlock<A>( name, translateLegacyWidget<A>( instance.raw ) ) ];\n};\n\n/**\n * Translate the widget's \"checked\" to the boolean\n * version used in the block.\n *\n */\nconst translateLegacyWidget = <A>( settings ): A => {\n\tObject.entries( settings ).forEach( ( [ key, value ] ) => {\n\t\tif ( 'checked' === value ) {\n\t\t\tsettings[ key ] = true;\n\t\t}\n\t\tif ( 'object' === typeof value ) {\n\t\t\ttranslateLegacyWidget( settings[ key ] );\n\t\t}\n\t\t// Old widgets used to use \"0\" for some defaults.\n\t\tif ( '0' === value ) {\n\t\t\tdelete settings[ key ];\n\t\t}\n\t} );\n\treturn settings;\n};\n","import {autoloadBlocks} from '@lipemat/js-boilerplate-gutenberg';\nimport Preview from './blocks/Preview';\nimport {transformLegacyWidget} from './helpers';\nimport ErrorBoundary from '../components/ErrorBoundary';\n\n/**\n * Use our custom autoloader to automatically require,\n * register and add HMR support to Gutenberg related items.\n *\n * Will load from specified directory recursively.\n */\nexport default () => {\n\t// Load all blocks\n\tautoloadBlocks( () => require.context( './blocks', true, /block\\.tsx$/ ), module );\n\n\t// Expose helpers and Preview component to window, so we can use them in PRO.\n\twindow.ADVANCED_SIDEBAR_MENU.ErrorBoundary = ErrorBoundary;\n\twindow.ADVANCED_SIDEBAR_MENU.Preview = Preview;\n\twindow.ADVANCED_SIDEBAR_MENU.transformLegacyWidget = transformLegacyWidget;\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"wrap\":\"info-panel__wrap__YT\",\"button\":\"info-panel__button__PN\"};","// extracted by mini-css-extract-plugin\nexport default {\"error\":\"edit__error___h\"};","// extracted by mini-css-extract-plugin\nexport default {\"placeholder\":\"preview__placeholder__QP\",\"error\":\"preview__error__xF\",\"spin-wrap\":\"preview__spin-wrap__Jr\",\"spinWrap\":\"preview__spin-wrap__Jr\",\"spin\":\"preview__spin__A4\",\"spin-content\":\"preview__spin-content__Yg\",\"spinContent\":\"preview__spin-content__Yg\"};","/*! @license DOMPurify 2.3.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.10/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /* Add properties to a lookup table */\n\n function addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /* Shallow clone an object */\n\n function clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n 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\n\n 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']);\n 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.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n 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']);\n 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,\n // even those that we disallow by default.\n\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n\n 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']);\n 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']);\n 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']);\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n 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\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.3.10';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with <html>... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n var FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n var RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks? */\n\n var SANITIZE_DOM = true;\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n 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']);\n /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n 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.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n return x;\n } : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n\n\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n var _isClobbered = function _isClobbered(elm) {\n 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');\n };\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check if tagname contains Unicode */\n\n\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n var tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Mitigate a problem with templates inside select */\n\n\n if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;\n }\n /* Keep content except for bad-listed elements */\n\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n var childCount = childNodes.length;\n\n for (var i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check whether element has a valid namespace */\n\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n\n if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = stringReplace(content, MUSTACHE_EXPR$1, ' ');\n content = stringReplace(content, ERB_EXPR$1, ' ');\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (!value) ; else {\n return false;\n }\n\n return true;\n };\n /**\n * _basicCustomElementCheck\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n * @param {string} tagName name of the tag of the node to sanitize\n */\n\n\n var _basicCustomElementTest = function _basicCustomElementTest(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr;\n var value;\n var lcName;\n var l;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n value = name === 'value' ? attr.value : stringTrim(attr.value);\n lcName = transformCaseFunc(name);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n\n if (regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n value = stringReplace(value, ERB_EXPR$1, ' ');\n }\n /* Is `value` valid for this attribute? */\n\n\n var lcTag = transformCaseFunc(currentNode.nodeName);\n\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Handle attributes that require Trusted Types */\n\n\n if (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n value = trustedTypesPolicy.createHTML(value);\n break;\n\n case 'TrustedScriptURL':\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode;\n\n var shadowIterator = _createIterator(fragment);\n /* Execute a hook if present */\n\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n\n\n DOMPurify.sanitize = function (dirty, cfg) {\n var body;\n var importedNode;\n var currentNode;\n var oldNode;\n var returnNode;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw typeErrorCreate('toString is not a function');\n } else {\n dirty = dirty.toString();\n\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n }\n }\n /* Check we can run. Otherwise fall back or ignore */\n\n\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n /* Assign config vars */\n\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n var tagName = transformCaseFunc(dirty.nodeName);\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n /* If we sanitized `dirty` in-place, return it. */\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');\n serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = transformCaseFunc(tag);\n var lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n","/* eslint-disable vars-on-top, no-var, prefer-template */\nvar isRegExp = function (re) { \n return re instanceof RegExp;\n};\nvar escapeRegExp = function escapeRegExp(string) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n};\nvar isString = function (value) {\n return typeof value === 'string';\n};\nvar flatten = function (array) {\n var newArray = [];\n\n array.forEach(function (item) {\n if (Array.isArray(item)) {\n newArray = newArray.concat(item);\n } else {\n newArray.push(item);\n }\n });\n\n return newArray;\n};\n\n/**\n * Given a string, replace every substring that is matched by the `match` regex\n * with the result of calling `fn` on matched substring. The result will be an\n * array with all odd indexed elements containing the replacements. The primary\n * use case is similar to using String.prototype.replace except for React.\n *\n * React will happily render an array as children of a react element, which\n * makes this approach very useful for tasks like surrounding certain text\n * within a string with react elements.\n *\n * Example:\n * matchReplace(\n * 'Emphasize all phone numbers like 884-555-4443.',\n * /([\\d|-]+)/g,\n * (number, i) => <strong key={i}>{number}</strong>\n * );\n * // => ['Emphasize all phone numbers like ', <strong>884-555-4443</strong>, '.'\n *\n * @param {string} str\n * @param {RegExp|str} match Must contain a matching group\n * @param {function} fn\n * @return {array}\n */\nfunction replaceString(str, match, fn) {\n var curCharStart = 0;\n var curCharLen = 0;\n\n if (str === '') {\n return str;\n } else if (!str || !isString(str)) {\n throw new TypeError('First argument to react-string-replace#replaceString must be a string');\n }\n\n var re = match;\n\n if (!isRegExp(re)) {\n re = new RegExp('(' + escapeRegExp(re) + ')', 'gi');\n }\n\n var result = str.split(re);\n\n // Apply fn to all odd elements\n for (var i = 1, length = result.length; i < length; i += 2) {\n /** @see {@link https://github.com/iansinnott/react-string-replace/issues/74} */\n if (result[i] === undefined || result[i - 1] === undefined) {\n console.warn('reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.');\n continue;\n }\n\n curCharLen = result[i].length;\n curCharStart += result[i - 1].length;\n result[i] = fn(result[i], i, curCharStart);\n curCharStart += curCharLen;\n }\n\n return result;\n}\n\nmodule.exports = function reactStringReplace(source, match, fn) {\n if (!Array.isArray(source)) source = [source];\n\n return flatten(source.map(function(x) {\n return isString(x) ? replaceString(x, match, fn) : x;\n }));\n};\n","var map = {\n\t\"./categories/block.tsx\": \"./src/gutenberg/blocks/categories/block.tsx\",\n\t\"./pages/block.tsx\": \"./src/gutenberg/blocks/pages/block.tsx\",\n\t\"gutenberg/blocks/categories/block.tsx\": \"./src/gutenberg/blocks/categories/block.tsx\",\n\t\"gutenberg/blocks/pages/block.tsx\": \"./src/gutenberg/blocks/pages/block.tsx\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/gutenberg/blocks sync recursive block\\\\.tsx$\";","module.exports = React;","module.exports = jQuery;","module.exports = lodash;","module.exports = wp.apiFetch;","module.exports = wp.blockEditor;","module.exports = wp.blocks;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.hooks;","module.exports = wp.htmlEntities;","module.exports = wp.i18n;","module.exports = wp.plugins;","module.exports = wp.serverSideRender;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","console.log( 'Advanced Sidebar - Loaded' );\n\n/**\n * 1. Blocks can't be lazy loaded, or they will be unavailable\n * intermittently when developing.\n * 2. Theme Customizers must wait until the page is finished loading.\n *\n * @version 1.1.0\n */\nif ( typeof wp.element !== 'undefined' && typeof wp.plugins !== 'undefined' ) {\n\trequire( './gutenberg' ).default();\n} else if ( typeof wp.customize !== 'undefined' ) {\n\twp.customize.bind( 'ready', () => {\n\t\trequire( './gutenberg' ).default();\n\t} );\n}\n"],"names":["Component","CONFIG","addQueryArgs","sanitize","ErrorBoundary","constructor","props","state","hasError","error","getDerivedStateFromError","componentDidCatch","info","console","log","setState","render","siteInfo","scriptDebug","color","window","location","href","support","border","padding","width","overflowWrap","message","block","JSON","stringify","attributes","stack","children","ADVANCED_SIDEBAR_MENU","withFilters","select","isEmpty","firstClientId","SideLoad","clientId","getBlockIndex","CheckboxControl","PanelBody","Slot","__","sprintf","range","reactStringReplace","checkboxes","include_parent","include_childless_parent","display_all","Display","setAttributes","type","name","showLevels","blocks","pages","id","isPro","fillProps","Object","keys","map","item","label","labels","singular_name","toLowerCase","value","replace","levels","ev","parseInt","target","n","categories","Button","InspectorControls","decodeEntities","styles","InfoPanel","wrap","features","feature","textDecoration","button","useEffect","ServerSideRender","Placeholder","Spinner","useBlockProps","doAction","sanitizeClientId","getSidebarId","currentScreen","rootId","getBlockRootClientId","ParentBlock","getBlocksByClientId","Page","placeholder","Category","Navigation","navigation","TriggerWhenLoadingFinished","setTimeout","$","find","on","preventDefault","values","errorMsg","Error","spinWrap","spin","spinContent","Preview","blockProps","__html","sanitizedClientId","style","isServerSideRenderRequest","sidebarId","useSelect","BlockControls","SelectControl","TextControl","Edit","taxonomy","getTaxonomy","title","single","new_widget","entries","displayEach","exclude","docs","category","transformLegacyWidget","EXAMPLE","apply_current_page_parent_styles_to_parent","apply_current_page_styles_to_parent","block_style","border_color","bullet_style","child_page_bg_color","child_page_color","parent_page_bg_color","parent_page_color","parent_page_font_weight","grandchild_page_bg_color","grandchild_page_color","grandchild_page_font_weight","settings","icon","example","transforms","from","isMatch","idBase","instance","raw","transform","edit","save","apiVersion","postType","getPostType","post_type","order_by","orderBy","page","current_page_color","current_page_bg_color","current_page_font_weight","current_page_parent_bg_color","createBlock","translateLegacyWidget","forEach","key","autoloadBlocks","require","context","module","wp","element","plugins","default","customize","bind"],"sourceRoot":""}
|
js/dist/admin.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.QPB_Z .components-placeholder__label{flex-direction:column;width:100%}.QPB_Z .components-placeholder__instructions{display:block!important;text-align:center;width:100%}.QPB_Z .dashicons{font-size:30px;height:35px;width:35px}.QPB_Z .components-placeholder__fieldset{text-align:center}.xF2E_{padding:10px;margin:2px;border:4px double #d63638;font-size:14px;font-weight:600}.JrCy1{position:relative;min-height:100px}.A45Ny{position:absolute;top:50%;left:50%;margin:-9px 0 0 -9px}.Ygsqf{opacity:.2}
|
2 |
+
.YTpls ul{margin-block-end:1em}.YTpls li{list-style:disc;margin:0 0 0 15px}.PNgUV{width:100%;justify-content:center}
|
3 |
+
._h987{padding:10px;margin:2px;border:4px double #d63638;font-weight:600}
|
js/dist/admin.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! For license information please see admin.min.js.LICENSE.txt */
|
2 |
+
!function(){var e={941:function(e,t,n){"use strict";var r=n(363),a=n(539),o=n(368),l=n(538);class c extends r.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.log("%cError caught by the Advanced Sidebar ErrorBoundary!","color:orange; font-size: large; font-weight: bold"),console.log(this.props),console.log(e),console.log(t),this.setState({error:e})}render(){return this.state.hasError?a.k.siteInfo.scriptDebug?React.createElement("div",{className:"components-panel__body is-opened"},React.createElement("h4",{style:{color:"red"}},"Something went wrong!"),React.createElement("p",null,"Please ",React.createElement("a",{target:"_blank",href:a.k.support,rel:"noreferrer"},"create a support request")," with the following:"),React.createElement("ol",null,React.createElement("li",null,"The ",React.createElement("a",{href:"https://onpointplugins.com/how-to-retrieve-console-logs-from-your-browser/",target:"_blank",rel:"noreferrer"},"logs from your browser console.")),React.createElement("li",null,"The following information.")),React.createElement("div",{style:{border:"2px groove",padding:"10px",width:"100%",overflowWrap:"break-word"}},React.createElement("p",null,React.createElement("strong",null,React.createElement("em",null,"Message"))," ",React.createElement("br",null),React.createElement("code",null,this.state.error?.message)),React.createElement("p",null,React.createElement("strong",null,React.createElement("em",null,"Block"))," ",React.createElement("br",null),React.createElement("code",null,this.props.block)),React.createElement("p",null,React.createElement("strong",null,React.createElement("em",null,"Attributes"))," ",React.createElement("br",null),React.createElement("code",null,JSON.stringify(this.props.attributes))),React.createElement("p",null,React.createElement("strong",null,React.createElement("em",null,"Site Info"))," ",React.createElement("br",null),React.createElement("code",null,JSON.stringify(a.k.siteInfo))),React.createElement("p",null,React.createElement("strong",null,React.createElement("em",null,"Stack"))," ",React.createElement("br",null),React.createElement("code",null,this.state.error?.stack))),React.createElement("p",null," "),React.createElement("p",null," ")):React.createElement("div",{className:"components-panel__body is-opened"},React.createElement("h4",{style:{color:"red"}},"Something went wrong!"),React.createElement("p",null,"Please ",React.createElement("a",{href:(0,o.addQueryArgs)((0,l.sanitize)(window.location.href),{"script-debug":!0})},"enable script debug"),":")):this.props.children}}t.Z=c},539:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});const r=window.ADVANCED_SIDEBAR_MENU||{}},338:function(e,t,n){"use strict";var r=n(537),a=n(284),o=n(85);let l="";t.Z=(0,r.withFilters)("advanced-sidebar-menu.blocks.side-load")((e=>{let{clientId:t,children:n}=e;return(0,o.isEmpty)(l)||t===l||-1===(0,a.select)("core/block-editor").getBlockIndex(l)?(l=t,n??null):null}))},333:function(e,t,n){"use strict";var r=n(537),a=n(539),o=n(3),l=n(85),c=n(589),i=n.n(c),s=n(941);const u={include_parent:(0,o.__)("Display the highest level parent %s","advanced-sidebar-menu"),include_childless_parent:(0,o.__)("Display menu when there is only the parent %s","advanced-sidebar-menu"),display_all:(0,o.__)("Always display child %s","advanced-sidebar-menu")};t.Z=e=>{let{attributes:t,setAttributes:n,type:c,name:d,clientId:m,children:p}=e;const f=a.k.blocks.pages.id===d&&a.k.isPro||t.display_all,g={type:c,attributes:t,name:d,setAttributes:n,clientId:m};return React.createElement(r.PanelBody,{title:(0,o.__)("Display","advanced-sidebar-menu")},Object.keys(u).map((e=>{let a=c?.labels?.singular_name.toLowerCase()??"";return"display_all"===e&&(a=c?.labels?.name.toLowerCase()??""),React.createElement(r.CheckboxControl,{key:e,label:(0,o.sprintf)(u[e],a),checked:!!t[e],onChange:t=>{n({[e]:!!t})}})})),f&&React.createElement("div",{className:"components-base-control"},i()((0,o.__)("Display %1$s levels of child %2$s","advanced-sidebar-menu").replace("%2$s",c?.labels?.name.toLowerCase()??""),"%1$s",(()=>React.createElement("select",{key:"levels",value:t.levels,onChange:e=>n({levels:parseInt(e.target.value)})},React.createElement("option",{value:"100"},(0,o.__)("- All -","advanced-sidebar-menu")),(0,l.range)(1,10).map((e=>React.createElement("option",{key:e,value:e},e))))))),p,React.createElement(s.Z,{attributes:t,block:d},a.k.blocks.pages.id===d&&React.createElement(r.Slot,{name:"advanced-sidebar-menu/pages/display",fillProps:g}),a.k.blocks.categories.id===d&&React.createElement(r.Slot,{name:"advanced-sidebar-menu/categories/display",fillProps:g})))}},821:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(539),a=n(537),o=n(78),l=wp.htmlEntities,c=n(3),i=(0,a.withFilters)("advanced-sidebar-menu.blocks.info-panel")((e=>{let{}=e;return React.createElement(o.InspectorControls,null,React.createElement(a.PanelBody,{title:(0,c.__)("Advanced Sidebar Menu PRO","advanced-sidebar-menu"),className:"YTpls"},React.createElement("ul",null,r.k.features.map((e=>React.createElement("li",{key:e},(0,l.decodeEntities)(e)))),React.createElement("li",null,React.createElement("a",{href:"https://onpointplugins.com/product/advanced-sidebar-menu-pro/?utm_source=block-more&utm_campaign=gopro&utm_medium=wp-dash",target:"_blank",style:{textDecoration:"none"},rel:"noreferrer"},(0,c.__)("So much more…","advanced-sidebar-menu")))),React.createElement(a.Button,{className:"PNgUV",href:"https://onpointplugins.com/product/advanced-sidebar-menu-pro/?trigger_buy_now=1&utm_source=block-upgrade&utm_campaign=gopro&utm_medium=wp-dash",target:"_blank",rel:"noreferrer",isPrimary:!0},(0,c.__)("Upgrade","advanced-sidebar-menu"))))}))},464:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(363),a=n(539),o=wp.serverSideRender,l=n.n(o),c=n(537),i=n(78),s=n(538),u=wp.hooks,d=n(3),m="QPB_Z",p=n(284),f=n(311);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const b=e=>{if("widgets"!==a.k.currentScreen)return"";const t=(0,p.select)("core/block-editor").getBlockRootClientId(e);if(t){const e=(0,p.select)("core/block-editor").getBlocksByClientId([t]);if(e[0]&&"core/widget-area"===e[0].name)return e[0]?.attributes?.id}return""},h=()=>React.createElement(c.Placeholder,{className:m,icon:"welcome-widgets-menus",label:(0,d.__)("Advanced Sidebar - Pages","advanced-sidebar-menu"),instructions:(0,d.__)("No preview available","advanced-sidebar-menu")}),y=()=>React.createElement(c.Placeholder,{className:m,icon:"welcome-widgets-menus",label:(0,d.__)("Advanced Sidebar - Categories","advanced-sidebar-menu"),instructions:(0,d.__)("No preview available","advanced-sidebar-menu")}),_=()=>React.createElement(c.Placeholder,{className:m,icon:"welcome-widgets-menus",label:(0,d.__)("Advanced Sidebar - Navigation","advanced-sidebar-menu"),instructions:(0,d.__)("No preview available","advanced-sidebar-menu")}),v=e=>{switch(e){case a.k.blocks.pages.id:return h;case a.k.blocks.categories.id:return y;case a.k.blocks.navigation?.id:return _}return()=>React.createElement(React.Fragment,null)},E=e=>{let{children:t,attributes:n={clientId:""}}=e;if((0,r.useEffect)((()=>()=>{setTimeout((()=>{f(`[data-preview="${n.clientId}"]`).find("a").on("click",(e=>e.preventDefault())),(0,u.doAction)("advanced-sidebar-menu.blocks.preview.loading-finished",{values:n,clientId:n.clientId})}),100)})),t?.props?.children?.errorMsg)throw new Error(t?.props?.children?.errorMsg??"Failed");return React.createElement("div",{className:"JrCy1"},React.createElement("div",{className:"A45Ny"},React.createElement(c.Spinner,null)),React.createElement("div",{className:"Ygsqf"},t))};var R=e=>{let{attributes:t,block:n,clientId:r}=e;const o=(0,i.useBlockProps)();if(""!==a.k.error)return React.createElement("div",{className:"xF2E_",dangerouslySetInnerHTML:{__html:(0,s.sanitize)(a.k.error)}});const c=(e=>e.replace(/^([\d-])/,"_$1"))(r);return delete o.style,React.createElement("div",g({},o,{"data-preview":c}),React.createElement(l(),{EmptyResponsePlaceholder:v(n),LoadingResponsePlaceholder:E,attributes:{...t,isServerSideRenderRequest:!0,clientId:c,sidebarId:b(r)},block:n,httpMethod:"POST"}))}},125:function(e,t,n){"use strict";n.r(t),n.d(t,{block:function(){return h},name:function(){return y},settings:function(){return _}});var r=n(539),a=n(284),o=n(538),l=n(78),c=n(464),i=n(941),s=n(333),u=n(537),d=n(3),m=n(821),p=n(474),f=n(338),g=e=>{let{attributes:t,setAttributes:n,clientId:g,name:b}=e;const y=(0,a.useSelect)((e=>e("core").getTaxonomy(t.taxonomy??"category")??e("core").getTaxonomy("category")),[t.taxonomy]);if(""!==r.k.error)return React.createElement(React.Fragment,null,React.createElement(l.InspectorControls,null,React.createElement("div",{className:p.Z.error,dangerouslySetInnerHTML:{__html:(0,o.sanitize)(r.k.error)}})),React.createElement(c.Z,{attributes:t,block:h.id,clientId:g}));const _={type:y,attributes:t,name:b,setAttributes:n,clientId:g};return React.createElement(React.Fragment,null,React.createElement(l.InspectorControls,null,React.createElement(i.Z,{attributes:t,block:b},("widgets"===r.k.currentScreen||"site-editor"===r.k.currentScreen||"customize"===r.k.currentScreen)&&React.createElement(u.PanelBody,null,React.createElement(u.TextControl,{value:t.title??"",label:(0,d.__)("Title","advanced-sidebar-menu"),onChange:e=>n({title:e})})),React.createElement(s.Z,{attributes:t,clientId:g,name:b,setAttributes:n,type:y},"post"!==r.k.currentScreen&&React.createElement(u.CheckboxControl,{label:(0,d.sprintf)((0,d.__)("Display %s on single posts","advanced-sidebar-menu"),y?.labels?.name.toLowerCase()??""),checked:!!t.single,onChange:e=>{n({single:!!e})}}),"widgets"===r.k.currentScreen&&t.single&&React.createElement(u.SelectControl,{label:(0,d.sprintf)((0,d.__)("Display each single post's %s","advanced-sidebar-menu"),y?.labels?.name.toLowerCase()??""),value:t.new_widget,options:Object.entries(r.k.categories.displayEach).map((e=>{let[t,n]=e;return{value:t,label:n}})),onChange:e=>n({new_widget:e})})),React.createElement("div",{className:"components-panel__body is-opened"},React.createElement(u.Slot,{name:"advanced-sidebar-menu/categories/general",fillProps:_}),React.createElement(u.TextControl,{label:(0,d.sprintf)((0,d.__)("%s to exclude (ids, comma separated)","advanced-sidebar-menu"),y?.labels?.name??""),value:t.exclude,onChange:e=>{n({exclude:e})}}),React.createElement("p",null,React.createElement("a",{href:r.k.docs.category,target:"_blank",rel:"noopener noreferrer"},(0,d.__)("block documentation","advanced-sidebar-menu")))),React.createElement(u.Slot,{name:"advanced-sidebar-menu/categories/inspector",fillProps:_}))),React.createElement(l.BlockControls,null,React.createElement(i.Z,{attributes:t,block:b},React.createElement(u.Slot,{name:"advanced-sidebar-menu/categories/block-controls",fillProps:_}))),React.createElement(m.Z,{clientId:g}),React.createElement(i.Z,{attributes:t,block:b},React.createElement(c.Z,{attributes:t,block:h.id,clientId:g})),React.createElement(f.Z,{clientId:g}))},b=n(928);const h=r.k.blocks.categories,y=h.id,_={title:(0,d.__)("Advanced Sidebar - Categories","advanced-sidebar-menu"),icon:"welcome-widgets-menus",category:"widgets",example:{attributes:{"display-posts":"all","display-posts/limit":2,apply_current_page_parent_styles_to_parent:!0,apply_current_page_styles_to_parent:!0,block_style:!0,border:!0,border_color:"#333",bullet_style:"none",child_page_bg_color:"#666",child_page_color:"#fff",parent_page_bg_color:"#282828",parent_page_color:"#0cc4c6",parent_page_font_weight:"normal",display_all:!0,grandchild_page_bg_color:"#989898",grandchild_page_color:"#282828",grandchild_page_font_weight:"bold",include_childless_parent:!0,include_parent:!0,levels:"2"}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"advanced_sidebar_menu_category"===t},transform:(0,b.n)(y)}]},edit:e=>React.createElement(g,e),save:()=>null,apiVersion:2}},789:function(e,t,n){"use strict";n.r(t),n.d(t,{block:function(){return h},name:function(){return y},settings:function(){return _}});var r=n(539),a=n(78),o=n(537),l=n(464),c=n(333),i=n(284),s=n(821),u=n(538),d=n(3),m=n(941),p=n(474),f=n(338),g=e=>{let{attributes:t,setAttributes:n,clientId:g,name:b}=e;const y=(0,i.useSelect)((e=>e("core").getPostType(t.post_type??"page")??e("core").getPostType("page")),[t.post_type]);if(""!==r.k.error)return React.createElement(React.Fragment,null,React.createElement(a.InspectorControls,null,React.createElement("div",{className:p.Z.error,dangerouslySetInnerHTML:{__html:(0,u.sanitize)(r.k.error)}})),React.createElement(l.Z,{attributes:t,block:h.id,clientId:g}));const _={type:y,attributes:t,name:b,setAttributes:n,clientId:g};return React.createElement(React.Fragment,null,React.createElement(a.InspectorControls,null,React.createElement(m.Z,{attributes:t,block:b},("widgets"===r.k.currentScreen||"site-editor"===r.k.currentScreen||"customize"===r.k.currentScreen)&&React.createElement(o.PanelBody,null,React.createElement(o.TextControl,{value:t.title??"",label:(0,d.__)("Title","advanced-sidebar-menu"),onChange:e=>n({title:e})})),React.createElement(c.Z,{attributes:t,clientId:g,name:b,setAttributes:n,type:y}),React.createElement("div",{className:"components-panel__body is-opened"},React.createElement(o.Slot,{name:"advanced-sidebar-menu/pages/general",fillProps:_}),React.createElement(o.SelectControl,{label:(0,d.__)("Order by","advanced-sidebar-menu"),value:t.order_by,labelPosition:"side",options:Object.entries(r.k.pages.orderBy).map((e=>{let[t,n]=e;return{value:t,label:n}})),onChange:e=>{n({order_by:e})}}),React.createElement(o.TextControl,{label:(0,d.sprintf)((0,d.__)("%s to exclude (ids, comma separated)","advanced-sidebar-menu"),y?.labels?.name??""),value:t.exclude,onChange:e=>{n({exclude:e})}}),React.createElement("p",null,React.createElement("a",{href:r.k.docs.page,target:"_blank",rel:"noopener noreferrer"},(0,d.__)("block documentation","advanced-sidebar-menu")))),React.createElement(o.Slot,{name:"advanced-sidebar-menu/pages/inspector",fillProps:_}))),React.createElement(a.BlockControls,null,React.createElement(m.Z,{attributes:t,block:b},React.createElement(o.Slot,{name:"advanced-sidebar-menu/pages/block-controls",fillProps:_}))),React.createElement(s.Z,{clientId:g}),React.createElement(m.Z,{attributes:t,block:b},React.createElement(l.Z,{attributes:t,block:h.id,clientId:g})),React.createElement(f.Z,{clientId:g}))},b=n(928);const h=r.k.blocks.pages,y=h.id,_={title:(0,d.__)("Advanced Sidebar - Pages","advanced-sidebar-menu"),icon:"welcome-widgets-menus",category:"widgets",example:{attributes:{include_parent:!0,include_childless_parent:!0,display_all:!0,levels:"2",apply_current_page_styles_to_parent:!0,apply_current_page_parent_styles_to_parent:!0,block_style:!0,border:!0,border_color:"#333",bullet_style:"none",parent_page_color:"#fff",parent_page_bg_color:"#666",child_page_color:"#fff",child_page_bg_color:"#666",grandchild_page_color:"#282828",grandchild_page_bg_color:"#989898",grandchild_page_font_weight:"bold",current_page_color:"#0cc4c6",current_page_bg_color:"#282828",current_page_font_weight:"normal",current_page_parent_bg_color:"#333"}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"advanced_sidebar_menu"===t},transform:(0,b.n)(y)}]},edit:e=>React.createElement(g,e),save:()=>null,apiVersion:2}},928:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});var r=n(378);const a=e=>t=>{let{instance:n}=t;return[(0,r.createBlock)(e,o(n.raw))]},o=e=>(Object.entries(e).forEach((t=>{let[n,r]=t;"checked"===r&&(e[n]=!0),"object"==typeof r&&o(e[n]),"0"===r&&delete e[n]})),e)},171:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}}),wp.apiFetch,n(3),n(368);var r=n(378),a=(wp.plugins,n(284));n(363);var o=null,l=function(){o=(0,a.select)("core/block-editor").getSelectedBlockClientId(),(0,a.dispatch)("core/block-editor").clearSelectedBlock()},c=function(e){void 0===e&&(e=[]),(0,a.select)("core/block-editor").getBlocks().forEach((function(t){var n=t.clientId;e.includes(t.name)&&(0,a.dispatch)("core/block-editor").selectBlock(n)})),o?(0,a.dispatch)("core/block-editor").selectBlock(o):(0,a.dispatch)("core/block-editor").clearSelectedBlock(),o=null},i=n(464),s=n(928),u=n(941);e=n.hmd(e);var d=()=>{(function(e){var t=e.afterReload,n=e.beforeReload,r=e.getContext,a=e.pluginModule,o=e.register,l=e.unregister,c=e.type,i={},s=function(){n();var e=r();if(e){var a=[];return e.keys().forEach((function(t){var n=e(t);n.exclude||n!==i[t]&&(i[n.name+"-"+c]&&l(n.name),o(n.name,n.settings),a.push(n.name),i[n.name+"-"+c]=n)})),t(a),e}},u=s();a.hot&&null!=u&&u.id&&a.hot.accept(u.id,s)})({afterReload:c,beforeReload:l,getContext:()=>n(267),pluginModule:e,register:r.registerBlockType,unregister:r.unregisterBlockType,type:"block"}),window.ADVANCED_SIDEBAR_MENU.ErrorBoundary=u.Z,window.ADVANCED_SIDEBAR_MENU.Preview=i.Z,window.ADVANCED_SIDEBAR_MENU.transformLegacyWidget=s.n}},474:function(e,t){"use strict";t.Z={error:"_h987"}},538:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,a,o){return r=n()?Reflect.construct:function(e,n,r){var a=[null];a.push.apply(a,n);var o=new(Function.bind.apply(e,a));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=Object.hasOwnProperty,c=Object.setPrototypeOf,i=Object.isFrozen,s=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,m=Object.seal,p=Object.create,f="undefined"!=typeof Reflect&&Reflect,g=f.apply,b=f.construct;g||(g=function(e,t,n){return e.apply(t,n)}),d||(d=function(e){return e}),m||(m=function(e){return e}),b||(b=function(e,t){return r(e,a(t))});var h,y=x(Array.prototype.forEach),_=x(Array.prototype.pop),v=x(Array.prototype.push),E=x(String.prototype.toLowerCase),R=x(String.prototype.match),k=x(String.prototype.replace),w=x(String.prototype.indexOf),N=x(String.prototype.trim),S=x(RegExp.prototype.test),T=(h=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b(h,t)});function x(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return g(e,t,r)}}function A(e,t,n){n=n||E,c&&c(e,null);for(var r=t.length;r--;){var a=t[r];if("string"==typeof a){var o=n(a);o!==a&&(i(t)||(t[r]=o),a=o)}e[a]=!0}return e}function C(e){var t,n=p(null);for(t in e)g(l,e,[t])&&(n[t]=e[t]);return n}function D(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=s(e)}return function(e){return console.warn("fallback value for",e),null}}var O=d(["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"]),I=d(["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"]),M=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=d(["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"]),P=d(["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"]),B=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=d(["#text"]),U=d(["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"]),z=d(["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"]),H=d(["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"]),j=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=m(/<%[\w\W]*|[\w\W]*%>/gm),W=m(/^data-[\-\w.\u00B7-\uFFFF]/),$=m(/^aria-[\-\w]+$/),q=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=m(/^(?:\w+script|data):/i),Y=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=m(/^html$/i),J=function(){return"undefined"==typeof window?null:window},Q=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,a="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(a)&&(r=n.currentScript.getAttribute(a));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),r=function(e){return t(e)};if(r.version="2.3.10",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var o=n.document,l=n.document,c=n.DocumentFragment,i=n.HTMLTemplateElement,s=n.Node,u=n.Element,m=n.NodeFilter,p=n.NamedNodeMap,f=void 0===p?n.NamedNodeMap||n.MozNamedAttrMap:p,g=n.HTMLFormElement,b=n.DOMParser,h=n.trustedTypes,x=u.prototype,X=D(x,"cloneNode"),ee=D(x,"nextSibling"),te=D(x,"childNodes"),ne=D(x,"parentNode");if("function"==typeof i){var re=l.createElement("template");re.content&&re.content.ownerDocument&&(l=re.content.ownerDocument)}var ae=Q(h,o),oe=ae?ae.createHTML(""):"",le=l,ce=le.implementation,ie=le.createNodeIterator,se=le.createDocumentFragment,ue=le.getElementsByTagName,de=o.importNode,me={};try{me=C(l).documentMode?l.documentMode:{}}catch(e){}var pe={};r.isSupported="function"==typeof ne&&ce&&void 0!==ce.createHTMLDocument&&9!==me;var fe,ge,be=Z,he=G,ye=W,_e=$,ve=V,Ee=Y,Re=q,ke=null,we=A({},[].concat(a(O),a(I),a(M),a(P),a(F))),Ne=null,Se=A({},[].concat(a(U),a(z),a(H),a(j))),Te=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Ae=null,Ce=!0,De=!0,Oe=!1,Ie=!1,Me=!1,Le=!1,Pe=!1,Be=!1,Fe=!1,Ue=!1,ze=!0,He=!0,je=!1,Ze={},Ge=null,We=A({},["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"]),$e=null,qe=A({},["audio","video","img","source","image","track"]),Ve=null,Ye=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml",Xe=Qe,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,at=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},lt=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=C(t),fe=fe=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===fe?function(e){return e}:E,ke="ALLOWED_TAGS"in t?A({},t.ALLOWED_TAGS,ge):we,Ne="ALLOWED_ATTR"in t?A({},t.ALLOWED_ATTR,ge):Se,Ve="ADD_URI_SAFE_ATTR"in t?A(C(Ye),t.ADD_URI_SAFE_ATTR,ge):Ye,$e="ADD_DATA_URI_TAGS"in t?A(C(qe),t.ADD_DATA_URI_TAGS,ge):qe,Ge="FORBID_CONTENTS"in t?A({},t.FORBID_CONTENTS,ge):We,xe="FORBID_TAGS"in t?A({},t.FORBID_TAGS,ge):{},Ae="FORBID_ATTR"in t?A({},t.FORBID_ATTR,ge):{},Ze="USE_PROFILES"in t&&t.USE_PROFILES,Ce=!1!==t.ALLOW_ARIA_ATTR,De=!1!==t.ALLOW_DATA_ATTR,Oe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=t.SAFE_FOR_TEMPLATES||!1,Me=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,Fe=t.RETURN_DOM_FRAGMENT||!1,Ue=t.RETURN_TRUSTED_TYPE||!1,Pe=t.FORCE_BODY||!1,ze=!1!==t.SANITIZE_DOM,He=!1!==t.KEEP_CONTENT,je=t.IN_PLACE||!1,Re=t.ALLOWED_URI_REGEXP||Re,Xe=t.NAMESPACE||Qe,t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Te.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Te.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Te.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(De=!1),Fe&&(Be=!0),Ze&&(ke=A({},a(F)),Ne=[],!0===Ze.html&&(A(ke,O),A(Ne,U)),!0===Ze.svg&&(A(ke,I),A(Ne,z),A(Ne,j)),!0===Ze.svgFilters&&(A(ke,M),A(Ne,z),A(Ne,j)),!0===Ze.mathMl&&(A(ke,P),A(Ne,H),A(Ne,j))),t.ADD_TAGS&&(ke===we&&(ke=C(ke)),A(ke,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Ne===Se&&(Ne=C(Ne)),A(Ne,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&A(Ve,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(Ge===We&&(Ge=C(Ge)),A(Ge,t.FORBID_CONTENTS,ge)),He&&(ke["#text"]=!0),Me&&A(ke,["html","head","body"]),ke.table&&(A(ke,["tbody"]),delete xe.tbody),d&&d(t),rt=t)},ct=A({},["mi","mo","mn","ms","mtext"]),it=A({},["foreignobject","desc","title","annotation-xml"]),st=A({},["title","style","font","a","script"]),ut=A({},I);A(ut,M),A(ut,L);var dt=A({},P);A(dt,B);var mt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});var n=E(e.tagName),r=E(t.tagName);return e.namespaceURI===Je?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||ct[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===Qe?"math"===n:t.namespaceURI===Je?"math"===n&&it[r]:Boolean(dt[n]):e.namespaceURI===Qe&&!(t.namespaceURI===Je&&!it[r])&&!(t.namespaceURI===Ke&&!ct[r])&&!dt[n]&&(st[n]||!ut[n])},pt=function(e){v(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,t){try{v(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ne[e])if(Be||Fe)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){var t,n;if(Pe)e="<remove></remove>"+e;else{var r=R(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=ae?ae.createHTML(e):e;if(Xe===Qe)try{t=(new b).parseFromString(a,fe)}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=et?"":a}catch(e){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(l.createTextNode(n),o.childNodes[0]||null),Xe===Qe?ue.call(t,Me?"html":"body")[0]:Me?t.documentElement:o},bt=function(e){return ie.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof g&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(t){return"object"===e(s)?t instanceof s:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},_t=function(e,t,n){pe[e]&&y(pe[e],(function(e){e.call(r,t,n,rt)}))},vt=function(e){var t;if(_t("beforeSanitizeElements",e,null),ht(e))return pt(e),!0;if(S(/[\u0080-\uFFFF]/,e.nodeName))return pt(e),!0;var n=ge(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:ke}),e.hasChildNodes()&&!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return pt(e),!0;if("select"===n&&S(/<template/i,e.innerHTML))return pt(e),!0;if(!ke[n]||xe[n]){if(!xe[n]&&Rt(n)){if(Te.tagNameCheck instanceof RegExp&&S(Te.tagNameCheck,n))return!1;if(Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))return!1}if(He&&!Ge[n]){var a=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&a)for(var l=o.length-1;l>=0;--l)a.insertBefore(X(o[l],!0),ee(e))}return pt(e),!0}return e instanceof u&&!mt(e)?(pt(e),!0):"noscript"!==n&&"noembed"!==n||!S(/<\/no(script|embed)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,t=k(t,be," "),t=k(t,he," "),e.textContent!==t&&(v(r.removed,{element:e.cloneNode()}),e.textContent=t)),_t("afterSanitizeElements",e,null),!1):(pt(e),!0)},Et=function(e,t,n){if(ze&&("id"===t||"name"===t)&&(n in l||n in at))return!1;if(De&&!Ae[t]&&S(ye,t));else if(Ce&&S(_e,t));else if(!Ne[t]||Ae[t]){if(!(Rt(e)&&(Te.tagNameCheck instanceof RegExp&&S(Te.tagNameCheck,e)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(e))&&(Te.attributeNameCheck instanceof RegExp&&S(Te.attributeNameCheck,t)||Te.attributeNameCheck instanceof Function&&Te.attributeNameCheck(t))||"is"===t&&Te.allowCustomizedBuiltInElements&&(Te.tagNameCheck instanceof RegExp&&S(Te.tagNameCheck,n)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))))return!1}else if(Ve[t]);else if(S(Re,k(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!$e[e])if(Oe&&!S(ve,k(n,Ee,"")));else if(n)return!1;return!0},Rt=function(e){return e.indexOf("-")>0},kt=function(t){var n,a,o,l;_t("beforeSanitizeAttributes",t,null);var c=t.attributes;if(c){var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne};for(l=c.length;l--;){var s=n=c[l],u=s.name,d=s.namespaceURI;if(a="value"===u?n.value:N(n.value),o=ge(u),i.attrName=o,i.attrValue=a,i.keepAttr=!0,i.forceKeepAttr=void 0,_t("uponSanitizeAttribute",t,i),a=i.attrValue,!i.forceKeepAttr&&(ft(u,t),i.keepAttr))if(S(/\/>/i,a))ft(u,t);else{Ie&&(a=k(a,be," "),a=k(a,he," "));var m=ge(t.nodeName);if(Et(m,o,a)){if(ae&&"object"===e(h)&&"function"==typeof h.getAttributeType)if(d);else switch(h.getAttributeType(m,o)){case"TrustedHTML":a=ae.createHTML(a);break;case"TrustedScriptURL":a=ae.createScriptURL(a)}try{d?t.setAttributeNS(d,u,a):t.setAttribute(u,a),_(r.removed)}catch(e){}}}}_t("afterSanitizeAttributes",t,null)}},wt=function e(t){var n,r=bt(t);for(_t("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)_t("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof c&&e(n.content),kt(n));_t("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t,a){var l,i,u,d,m;if((et=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!yt(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(yt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Le||lt(a),r.removed=[],"string"==typeof t&&(je=!1),je){if(t.nodeName){var p=ge(t.nodeName);if(!ke[p]||xe[p])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof s)1===(i=(l=gt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?l=i:l.appendChild(i);else{if(!Be&&!Ie&&!Me&&-1===t.indexOf("<"))return ae&&Ue?ae.createHTML(t):t;if(!(l=gt(t)))return Be?null:Ue?oe:""}l&&Pe&&pt(l.firstChild);for(var f=bt(je?t:l);u=f.nextNode();)3===u.nodeType&&u===d||vt(u)||(u.content instanceof c&&wt(u.content),kt(u),d=u);if(d=null,je)return t;if(Be){if(Fe)for(m=se.call(l.ownerDocument);l.firstChild;)m.appendChild(l.firstChild);else m=l;return Ne.shadowroot&&(m=de.call(o,m,!0)),m}var g=Me?l.outerHTML:l.innerHTML;return Me&&ke["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&S(K,l.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+l.ownerDocument.doctype.name+">\n"+g),Ie&&(g=k(g,be," "),g=k(g,he," ")),ae&&Ue?ae.createHTML(g):g},r.setConfig=function(e){lt(e),Le=!0},r.clearConfig=function(){rt=null,Le=!1},r.isValidAttribute=function(e,t,n){rt||lt({});var r=ge(e),a=ge(t);return Et(r,a,n)},r.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],v(pe[e],t))},r.removeHook=function(e){if(pe[e])return _(pe[e])},r.removeHooks=function(e){pe[e]&&(pe[e]=[])},r.removeAllHooks=function(){pe={}},r}()}()},589:function(e){var t=function(e){return"string"==typeof e};e.exports=function(e,n,r){return Array.isArray(e)||(e=[e]),a=e.map((function(e){return t(e)?function(e,n,r){var a=0,o=0;if(""===e)return e;if(!e||!t(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var l,c,i,s=n;(function(e){return e instanceof RegExp})(s)||(s=new RegExp("("+(l=s,c=/[\\^$.*+?()[\]{}|]/g,i=RegExp(c.source),(l&&i.test(l)?l.replace(c,"\\$&"):l)+")"),"gi"));for(var u=e.split(s),d=1,m=u.length;d<m;d+=2)void 0!==u[d]&&void 0!==u[d-1]?(o=u[d].length,a+=u[d-1].length,u[d]=r(u[d],d,a),a+=o):console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");return u}(e,n,r):e})),o=[],a.forEach((function(e){Array.isArray(e)?o=o.concat(e):o.push(e)})),o;var a,o}},267:function(e,t,n){var r={"./categories/block.tsx":125,"./pages/block.tsx":789,"gutenberg/blocks/categories/block.tsx":125,"gutenberg/blocks/pages/block.tsx":789};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=267},363:function(e){"use strict";e.exports=React},311:function(e){"use strict";e.exports=jQuery},85:function(e){"use strict";e.exports=lodash},78:function(e){"use strict";e.exports=wp.blockEditor},378:function(e){"use strict";e.exports=wp.blocks},537:function(e){"use strict";e.exports=wp.components},284:function(e){"use strict";e.exports=wp.data},3:function(e){"use strict";e.exports=wp.i18n},368:function(e){"use strict";e.exports=wp.url}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},console.log("Advanced Sidebar - Loaded"),void 0!==wp.element&&void 0!==wp.plugins?n(171).Z():void 0!==wp.customize&&wp.customize.bind("ready",(()=>{n(171).Z()}))}();
|
js/dist/manifest.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"admin.min.css": {
|
3 |
+
"src": "admin.min.css",
|
4 |
+
"integrity": "sha256-Wr7NQv3Tom2oLlg2Xc0kftYisZNQop8CxIRTCZuXAD0= sha384-9tfNkTop/Fd237pCVexAdxq+NuEGjZASkO1u3wlX16xe60XOque8Jvb6Ab5zS0TB sha512-4gsxkk6dnlFYDgG0R2xAvvvk/ZIRKgVeEbaQ75wqxgfaInQHlhCsaXF0Lnp2ieqXyjmi3K0SomAt5EAmAej21w=="
|
5 |
+
},
|
6 |
+
"admin.min.js": {
|
7 |
+
"src": "admin.min.js",
|
8 |
+
"integrity": "sha256-IE++P9YlePYaeCLuxz1HIwCLyGj69vQ3FQDDi6Xr8EY= sha384-VKgYAkVsgwz79ftP4D6+JEZAL5RsnuPRKvj7/9auOU51F7nKrYqBsk9Jvc8/Jdlc sha512-GoZDH/tVkdcXuozmPSSVbbaCbViJdaJfJV3j0BkCM9UZ5s04n0oAcZAbJfsZGmytbiRdMQzstdTeX1EwSMYORw=="
|
9 |
+
},
|
10 |
+
"admin.min.js.LICENSE.txt": {
|
11 |
+
"src": "admin.min.js.LICENSE.txt",
|
12 |
+
"integrity": "sha256-wyNQxpz4tzoXllsiY73lQh19mmS5APFg+P0PgCwHrZQ= sha384-64Ff8FC2egZ650+D0i8DSccCNoXL3lfp3vXLQBykpicSluEZu85aBCZFUTKTh47+ sha512-S4/moBEwu3mvoTWtH5kA3gt7m1PNpWRAbHb1QVM3466sV7mi3lydKjKfAZtn11PWbONXf1yGEEFmvM8pTtH4jQ=="
|
13 |
+
}
|
14 |
+
}
|
js/dist/master.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function() { // webpackBootstrap
|
2 |
+
var __webpack_exports__ = {};
|
3 |
+
/*!**********************!*\
|
4 |
+
!*** ./src/index.js ***!
|
5 |
+
\**********************/
|
6 |
+
console.log('Currently not used');
|
7 |
+
/******/ })()
|
8 |
+
;
|
9 |
+
//# sourceMappingURL=master.js.map
|
js/dist/master.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"master.js","mappings":";;;;;AAAAA,OAAO,CAACC,GAAR,CAAa,oBAAb,E","sources":["webpack://@onpointplugins/advanced-sidebar-menu/./src/index.js"],"sourcesContent":["console.log( 'Currently not used' );\n"],"names":["console","log"],"sourceRoot":""}
|
languages/advanced-sidebar-menu-de_DE-db8c2f4a99b6d52af632434da54ae10a.json
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"Display the highest level parent %s":["Anzeige der \u00fcbergeordneten %s der h\u00f6chsten Ebene"],"Display menu when there is only the parent %s":["Men\u00fc \"Anzeige\" wird nur die \u00fcbergeordnete %s"],"Always display child %s":["Immer untergeordnete %s anzeigen"],"Display":["Anzeige"],"Display %1$s levels of child %2$s":["Anzeigen %1$s Ebenen der %2$s"],"- All -":["- Alle -"],"Advanced Sidebar Menu PRO":["Advanced Sidebar Menu PRO"],"So much more\u2026":["So viel mehr\u2026"],"Upgrade":["Aktualisierung"],"Advanced Sidebar - Pages":["Advanced Sidebar - Seitenmen\u00fc"],"No preview available":["Keine Vorschau verf\u00fcgbar"],"Advanced Sidebar - Categories":["Advanced Sidebar - Kategorien"],"Advanced Sidebar - Navigation":["Advanced Sidebar - Navigationsmen\u00fc"],"Title":["Titel"],"Display %s on single posts":["%s auf einzelne Beitr\u00e4ge anzeigen"],"Display each single post's %s":["Anzeigen der %s jedes einzelnen Beitrags"],"%s to exclude (ids, comma separated)":["Auszuschlie\u00dfende %s (IDs), durch Kommas getrennt"],"block documentation":["dokumentation blockieren"],"Order by":["Sortieren nach"]}}}
|
languages/advanced-sidebar-menu-de_DE.mo
CHANGED
Binary file
|
languages/advanced-sidebar-menu-de_DE.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: Mat Lipe <support@onpointplugins.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: de_DE\n"
|
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
-
"X-Generator: Poedit 2.4.
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
@@ -21,12 +21,154 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
msgid "widget documentation"
|
26 |
msgstr "widget-dokumentation"
|
27 |
|
28 |
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
29 |
-
#: src/Notice.php:
|
30 |
#, php-format
|
31 |
msgctxt "{<a>}{</a>}"
|
32 |
msgid ""
|
@@ -36,11 +178,23 @@ msgstr ""
|
|
36 |
"Das Advanced Sidebar Menu erfordert %1$s sAdvanced Sidebar Menu PRO%2$s es "
|
37 |
"Version %3$s+. Bitte aktualisieren oder deaktivieren Sie die PRO-Version."
|
38 |
|
39 |
-
#: src/Notice.php:
|
40 |
-
msgid "
|
41 |
-
msgstr "
|
42 |
|
43 |
-
#: src/Notice.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
msgid ""
|
45 |
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
46 |
"font weight."
|
@@ -48,133 +202,55 @@ msgstr ""
|
|
48 |
"Stylingoptionen wie Rahmen, Aufzählungszeichen, Farben, Hintergründe, Größe "
|
49 |
"und Schriftstärke."
|
50 |
|
51 |
-
#: src/Notice.php:
|
52 |
msgid "Accordion menus."
|
53 |
msgstr "Akkordeon-Menüs."
|
54 |
|
55 |
-
#: src/Notice.php:
|
56 |
msgid "Support for custom navigation menus from Appearance -> Menus."
|
57 |
msgstr ""
|
58 |
"Unterstützung für kundenspezifische Navigationsmenüs von Appearance-> Menü."
|
59 |
|
60 |
-
#: src/Notice.php:
|
61 |
-
msgid "Select and display custom post types."
|
62 |
-
msgstr "
|
63 |
-
|
64 |
-
|
65 |
-
msgid "Select and display custom taxonomies."
|
66 |
-
msgstr "Wählen Sie benutzerdefinierte Taxonomien aus und zeigen Sie sie an."
|
67 |
|
68 |
-
#: src/Notice.php:
|
69 |
msgid "Priority support with access to members only support area."
|
70 |
msgstr ""
|
71 |
"Prioritätsunterstützung, einschließlich Zugang zum Supportbereich für "
|
72 |
"Mitglieder."
|
73 |
|
74 |
-
#: src/
|
75 |
-
msgid "So much more..."
|
76 |
-
msgstr "So viel mehr..."
|
77 |
-
|
78 |
-
#: src/Notice.php:119
|
79 |
-
msgid "Upgrade"
|
80 |
-
msgstr "Aktualisierung"
|
81 |
-
|
82 |
-
#: src/Notice.php:127
|
83 |
-
msgid "Preview"
|
84 |
-
msgstr "Vorschau"
|
85 |
-
|
86 |
-
#: src/Widget/Category.php:52
|
87 |
-
msgid ""
|
88 |
-
"Creates a menu of all the categories using the child/parent relationship"
|
89 |
-
msgstr ""
|
90 |
-
"Erstellt ein Menü aller Kategorien, die unter Zugrundelegung der Eltern-Kind-"
|
91 |
-
"Beziehung"
|
92 |
-
|
93 |
-
#: src/Widget/Category.php:58
|
94 |
-
msgid "Advanced Sidebar - Categories"
|
95 |
-
msgstr "Advanced Sidebar - Kategorien"
|
96 |
-
|
97 |
-
#. translators: Selected taxonomy single label
|
98 |
-
#: src/Widget/Category.php:123
|
99 |
-
#, php-format
|
100 |
-
msgid "Display the highest level parent %s"
|
101 |
-
msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
|
102 |
-
|
103 |
-
#. translators: Selected taxonomy single label
|
104 |
-
#. translators: Selected post type single label
|
105 |
-
#: src/Widget/Category.php:132 src/Widget/Page.php:130
|
106 |
-
#, php-format
|
107 |
-
msgid "Display menu when there is only the parent %s"
|
108 |
-
msgstr "Menü \"Anzeige\" wird nur die übergeordnete %s"
|
109 |
-
|
110 |
-
#. translators: Selected taxonomy plural label
|
111 |
-
#. translators: Selected post type plural label
|
112 |
-
#: src/Widget/Category.php:141 src/Widget/Page.php:140
|
113 |
-
#, php-format
|
114 |
-
msgid "Always display child %s"
|
115 |
-
msgstr "Immer untergeordnete %s anzeigen"
|
116 |
-
|
117 |
-
#: src/Widget/Category.php:155 src/Widget/Page.php:161
|
118 |
-
msgid "- All -"
|
119 |
-
msgstr "- Alle -"
|
120 |
-
|
121 |
-
#. translators: {select html input}, {Selected post type plural label}
|
122 |
-
#: src/Widget/Category.php:170 src/Widget/Page.php:175
|
123 |
-
#, php-format
|
124 |
-
msgid "Display %1$s levels of child %2$s"
|
125 |
-
msgstr "Anzeigen %1$s Ebenen der %2$s"
|
126 |
-
|
127 |
-
#. translators: Selected taxonomy plural label
|
128 |
-
#: src/Widget/Category.php:200
|
129 |
-
#, php-format
|
130 |
-
msgid "Display %s on single posts"
|
131 |
-
msgstr "%s auf einzelne Beiträge anzeigen"
|
132 |
-
|
133 |
-
#. translators: Selected taxonomy single label
|
134 |
-
#: src/Widget/Category.php:210
|
135 |
-
#, php-format
|
136 |
-
msgid "Display each single post's %s"
|
137 |
-
msgstr "Anzeigen der %s jedes einzelnen Beitrags"
|
138 |
-
|
139 |
-
#: src/Widget/Category.php:220
|
140 |
msgid "In a new widget"
|
141 |
msgstr "In einem neuen Widget"
|
142 |
|
143 |
-
#: src/Widget/Category.php:
|
144 |
msgid "In another list in the same widget"
|
145 |
msgstr "In einer anderen Liste im selben Widget"
|
146 |
|
147 |
-
#. translators: Selected taxonomy plural label
|
148 |
-
#. translators: Selected post type plural label
|
149 |
-
#: src/Widget/Category.php:251 src/Widget/Page.php:245
|
150 |
-
#, php-format
|
151 |
-
msgid "%s to exclude (ids, comma separated)"
|
152 |
-
msgstr "Auszuschließende %s (IDs), durch Kommas getrennt"
|
153 |
-
|
154 |
-
#: src/Widget/Category.php:283 src/Widget/Page.php:276
|
155 |
-
msgid "Title"
|
156 |
-
msgstr "Titel"
|
157 |
-
|
158 |
#: src/Widget/Page.php:48
|
159 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
160 |
msgstr ""
|
161 |
"Erstellt ein Menü mit allen Seiten, die die Child / Parent-Beziehung "
|
162 |
"verwenden"
|
163 |
|
164 |
-
#: src/Widget/Page.php:
|
165 |
-
msgid "
|
166 |
-
msgstr "
|
|
|
|
|
|
|
|
|
167 |
|
168 |
#. translators: Selected post type single label
|
169 |
-
#: src/Widget/Page.php:
|
170 |
#, php-format
|
171 |
msgid "Display highest level parent %s"
|
172 |
msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
|
173 |
|
174 |
-
#: src/Widget/Page.php:202
|
175 |
-
msgid "Order by"
|
176 |
-
msgstr "Sortieren nach"
|
177 |
-
|
178 |
#. Plugin Name of the plugin/theme
|
179 |
msgid "Advanced Sidebar Menu"
|
180 |
msgstr "Advanced Sidebar Menu"
|
@@ -199,6 +275,12 @@ msgstr "OnPoint Plugins"
|
|
199 |
msgid "https://onpointplugins.com"
|
200 |
msgstr "https://onpointplugins.com"
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
#, php-format
|
203 |
#~ msgid "Levels of child %s to display"
|
204 |
#~ msgstr "Niveau der Kinder %s zu zeigen"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
+
"POT-Creation-Date: 2022-08-21 08:44-0400\n"
|
5 |
+
"PO-Revision-Date: 2022-08-21 08:44-0400\n"
|
6 |
"Last-Translator: Mat Lipe <support@onpointplugins.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: de_DE\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
+
"X-Generator: Poedit 2.4.3\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#. translators: Selected taxonomy single label
|
25 |
+
#: js/src/gutenberg/blocks/Display.tsx:36 src/Widget/Category.php:140
|
26 |
+
#, javascript-format, php-format
|
27 |
+
msgid "Display the highest level parent %s"
|
28 |
+
msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
|
29 |
+
|
30 |
+
#. translators: Selected taxonomy single label
|
31 |
+
#. translators: Selected taxonomy single label
|
32 |
+
#. translators: Selected post type single label
|
33 |
+
#: js/src/gutenberg/blocks/Display.tsx:38 src/Widget/Category.php:149
|
34 |
+
#: src/Widget/Page.php:150
|
35 |
+
#, javascript-format, php-format
|
36 |
+
msgid "Display menu when there is only the parent %s"
|
37 |
+
msgstr "Menü \"Anzeige\" wird nur die übergeordnete %s"
|
38 |
+
|
39 |
+
#. translators: Selected taxonomy plural label
|
40 |
+
#. translators: Selected taxonomy plural label
|
41 |
+
#. translators: Selected post type plural label
|
42 |
+
#: js/src/gutenberg/blocks/Display.tsx:40 src/Widget/Category.php:158
|
43 |
+
#: src/Widget/Page.php:160
|
44 |
+
#, javascript-format, php-format
|
45 |
+
msgid "Always display child %s"
|
46 |
+
msgstr "Immer untergeordnete %s anzeigen"
|
47 |
+
|
48 |
+
#: js/src/gutenberg/blocks/Display.tsx:71
|
49 |
+
msgid "Display"
|
50 |
+
msgstr "Anzeige"
|
51 |
+
|
52 |
+
#. translators: {select html input}, {post type plural label}
|
53 |
+
#. translators: {select html input}, {Selected post type plural label}
|
54 |
+
#: js/src/gutenberg/blocks/Display.tsx:91 src/Widget/Category.php:187
|
55 |
+
#: src/Widget/Page.php:195
|
56 |
+
#, javascript-format, php-format
|
57 |
+
msgid "Display %1$s levels of child %2$s"
|
58 |
+
msgstr "Anzeigen %1$s Ebenen der %2$s"
|
59 |
+
|
60 |
+
#: js/src/gutenberg/blocks/Display.tsx:99 src/Widget/Category.php:172
|
61 |
+
#: src/Widget/Page.php:181
|
62 |
+
msgid "- All -"
|
63 |
+
msgstr "- Alle -"
|
64 |
+
|
65 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:16 src/Notice.php:97
|
66 |
+
msgid "Advanced Sidebar Menu PRO"
|
67 |
+
msgstr "Advanced Sidebar Menu PRO"
|
68 |
+
|
69 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:29
|
70 |
+
msgid "So much more…"
|
71 |
+
msgstr "So viel mehr…"
|
72 |
+
|
73 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:40 src/Notice.php:124
|
74 |
+
msgid "Upgrade"
|
75 |
+
msgstr "Aktualisierung"
|
76 |
+
|
77 |
+
#: js/src/gutenberg/blocks/Preview.tsx:64
|
78 |
+
#: js/src/gutenberg/blocks/pages/block.tsx:66 src/Widget/Page.php:55
|
79 |
+
msgid "Advanced Sidebar - Pages"
|
80 |
+
msgstr "Advanced Sidebar - Seitenmenü"
|
81 |
+
|
82 |
+
#: js/src/gutenberg/blocks/Preview.tsx:65
|
83 |
+
#: js/src/gutenberg/blocks/Preview.tsx:72
|
84 |
+
#: js/src/gutenberg/blocks/Preview.tsx:79
|
85 |
+
msgid "No preview available"
|
86 |
+
msgstr "Keine Vorschau verfügbar"
|
87 |
+
|
88 |
+
#: js/src/gutenberg/blocks/Preview.tsx:71
|
89 |
+
#: js/src/gutenberg/blocks/categories/block.tsx:67 src/Widget/Category.php:59
|
90 |
+
msgid "Advanced Sidebar - Categories"
|
91 |
+
msgstr "Advanced Sidebar - Kategorien"
|
92 |
+
|
93 |
+
#: js/src/gutenberg/blocks/Preview.tsx:78
|
94 |
+
msgid "Advanced Sidebar - Navigation"
|
95 |
+
msgstr "Advanced Sidebar - Navigationsmenü"
|
96 |
+
|
97 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:63
|
98 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:60 src/Widget/Category.php:305
|
99 |
+
#: src/Widget/Page.php:116 src/Widget/Page.php:286
|
100 |
+
msgid "Title"
|
101 |
+
msgstr "Titel"
|
102 |
+
|
103 |
+
#. translators: Selected taxonomy plural label
|
104 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:81 src/Widget/Category.php:217
|
105 |
+
#, javascript-format, php-format
|
106 |
+
msgid "Display %s on single posts"
|
107 |
+
msgstr "%s auf einzelne Beiträge anzeigen"
|
108 |
+
|
109 |
+
#. translators: Selected taxonomy single label
|
110 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:96 src/Widget/Category.php:227
|
111 |
+
#, javascript-format, php-format
|
112 |
+
msgid "Display each single post's %s"
|
113 |
+
msgstr "Anzeigen der %s jedes einzelnen Beitrags"
|
114 |
+
|
115 |
+
#. translators: Selected post type plural label
|
116 |
+
#. translators: Selected taxonomy plural label
|
117 |
+
#. translators: Selected post type plural label
|
118 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:115
|
119 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:91 src/Widget/Category.php:273
|
120 |
+
#: src/Widget/Page.php:255
|
121 |
+
#, javascript-format, php-format
|
122 |
+
msgid "%s to exclude (ids, comma separated)"
|
123 |
+
msgstr "Auszuschließende %s (IDs), durch Kommas getrennt"
|
124 |
+
|
125 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:128
|
126 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:104
|
127 |
+
msgid "block documentation"
|
128 |
+
msgstr "dokumentation blockieren"
|
129 |
+
|
130 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:77 src/Widget/Page.php:221
|
131 |
+
msgid "Order by"
|
132 |
+
msgstr "Sortieren nach"
|
133 |
+
|
134 |
+
#: src/Blocks/Block_Abstract.php:258
|
135 |
+
msgid "This block requires WordPress version 5.6!"
|
136 |
+
msgstr "Dieser Block erfordert WordPress Version 5.6!"
|
137 |
+
|
138 |
+
#: src/Blocks/Categories.php:25 src/Blocks/Pages.php:25
|
139 |
+
#: src/Widget/Category.php:52
|
140 |
+
msgid ""
|
141 |
+
"Creates a menu of all the categories using the child/parent relationship"
|
142 |
+
msgstr ""
|
143 |
+
"Erstellt ein Menü aller Kategorien, die unter Zugrundelegung der Eltern-Kind-"
|
144 |
+
"Beziehung"
|
145 |
+
|
146 |
+
#: src/Blocks/Categories.php:65 src/Blocks/Pages.php:58
|
147 |
+
msgid "menu"
|
148 |
+
msgstr "menü"
|
149 |
+
|
150 |
+
#: src/Blocks/Categories.php:66 src/Blocks/Pages.php:59
|
151 |
+
msgid "sidebar"
|
152 |
+
msgstr "seitenleiste"
|
153 |
+
|
154 |
+
#: src/Blocks/Categories.php:67
|
155 |
+
msgid "taxonomy"
|
156 |
+
msgstr "taxonomie"
|
157 |
+
|
158 |
+
#: src/Blocks/Categories.php:68
|
159 |
+
msgid "term"
|
160 |
+
msgstr "begriff"
|
161 |
+
|
162 |
+
#: src/Blocks/Pages.php:60
|
163 |
+
msgid "pages"
|
164 |
+
msgstr "peiten"
|
165 |
+
|
166 |
+
#: src/Core.php:49
|
167 |
msgid "widget documentation"
|
168 |
msgstr "widget-dokumentation"
|
169 |
|
170 |
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
171 |
+
#: src/Notice.php:69
|
172 |
#, php-format
|
173 |
msgctxt "{<a>}{</a>}"
|
174 |
msgid ""
|
178 |
"Das Advanced Sidebar Menu erfordert %1$s sAdvanced Sidebar Menu PRO%2$s es "
|
179 |
"Version %3$s+. Bitte aktualisieren oder deaktivieren Sie die PRO-Version."
|
180 |
|
181 |
+
#: src/Notice.php:115
|
182 |
+
msgid "So much more..."
|
183 |
+
msgstr "So viel mehr..."
|
184 |
|
185 |
+
#: src/Notice.php:132
|
186 |
+
msgid "Preview"
|
187 |
+
msgstr "Vorschau"
|
188 |
+
|
189 |
+
#: src/Notice.php:162
|
190 |
+
msgid "PRO version widget options"
|
191 |
+
msgstr "Widget-Optionen für die PRO-Version"
|
192 |
+
|
193 |
+
#: src/Notice.php:177
|
194 |
+
msgid "Go PRO"
|
195 |
+
msgstr "Gehen Sie PRO"
|
196 |
+
|
197 |
+
#: src/Notice.php:191
|
198 |
msgid ""
|
199 |
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
200 |
"font weight."
|
202 |
"Stylingoptionen wie Rahmen, Aufzählungszeichen, Farben, Hintergründe, Größe "
|
203 |
"und Schriftstärke."
|
204 |
|
205 |
+
#: src/Notice.php:192
|
206 |
msgid "Accordion menus."
|
207 |
msgstr "Akkordeon-Menüs."
|
208 |
|
209 |
+
#: src/Notice.php:193
|
210 |
msgid "Support for custom navigation menus from Appearance -> Menus."
|
211 |
msgstr ""
|
212 |
"Unterstützung für kundenspezifische Navigationsmenüs von Appearance-> Menü."
|
213 |
|
214 |
+
#: src/Notice.php:194
|
215 |
+
msgid "Select and display custom post types and taxonomies."
|
216 |
+
msgstr ""
|
217 |
+
"Wählen Sie benutzerdefinierte Beitragstypen und Taxonomien aus und zeigen "
|
218 |
+
"Sie sie an."
|
|
|
|
|
219 |
|
220 |
+
#: src/Notice.php:195
|
221 |
msgid "Priority support with access to members only support area."
|
222 |
msgstr ""
|
223 |
"Prioritätsunterstützung, einschließlich Zugang zum Supportbereich für "
|
224 |
"Mitglieder."
|
225 |
|
226 |
+
#: src/Widget/Category.php:118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
msgid "In a new widget"
|
228 |
msgstr "In einem neuen Widget"
|
229 |
|
230 |
+
#: src/Widget/Category.php:119
|
231 |
msgid "In another list in the same widget"
|
232 |
msgstr "In einer anderen Liste im selben Widget"
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
#: src/Widget/Page.php:48
|
235 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
236 |
msgstr ""
|
237 |
"Erstellt ein Menü mit allen Seiten, die die Child / Parent-Beziehung "
|
238 |
"verwenden"
|
239 |
|
240 |
+
#: src/Widget/Page.php:115
|
241 |
+
msgid "Page Order"
|
242 |
+
msgstr "Seitenreihenfolge"
|
243 |
+
|
244 |
+
#: src/Widget/Page.php:117
|
245 |
+
msgid "Published Date"
|
246 |
+
msgstr "Veröffentlichungsdatum"
|
247 |
|
248 |
#. translators: Selected post type single label
|
249 |
+
#: src/Widget/Page.php:139
|
250 |
#, php-format
|
251 |
msgid "Display highest level parent %s"
|
252 |
msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
|
253 |
|
|
|
|
|
|
|
|
|
254 |
#. Plugin Name of the plugin/theme
|
255 |
msgid "Advanced Sidebar Menu"
|
256 |
msgstr "Advanced Sidebar Menu"
|
275 |
msgid "https://onpointplugins.com"
|
276 |
msgstr "https://onpointplugins.com"
|
277 |
|
278 |
+
#~ msgid "Post type"
|
279 |
+
#~ msgstr "Beitragstyp"
|
280 |
+
|
281 |
+
#~ msgid "Select and display custom taxonomies."
|
282 |
+
#~ msgstr "Wählen Sie benutzerdefinierte Taxonomien aus und zeigen Sie sie an."
|
283 |
+
|
284 |
#, php-format
|
285 |
#~ msgid "Levels of child %s to display"
|
286 |
#~ msgstr "Niveau der Kinder %s zu zeigen"
|
languages/advanced-sidebar-menu-es_ES-db8c2f4a99b6d52af632434da54ae10a.json
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"Display the highest level parent %s":["Mostrar el %s principal de nivel m\u00e1s alto"],"Display menu when there is only the parent %s":["Mostrar men\u00fa cuando solo hay el elemento primario %s"],"Always display child %s":["Muestre siempre %s secundarios"],"Display":["Mostrar"],"Display %1$s levels of child %2$s":["Mostrar %1$s niveles de %2$s secundario"],"- All -":["- Todo -"],"Advanced Sidebar Menu PRO":["Advanced Sidebar Menu PRO"],"So much more\u2026":["Mucho m\u00e1s\u2026"],"Upgrade":["Actualizar"],"Advanced Sidebar - Pages":["Advanced Sidebar - P\u00e1ginas"],"No preview available":["No hay vista previa disponible"],"Advanced Sidebar - Categories":["Advanced Sidebar - Categor\u00edas"],"Advanced Sidebar - Navigation":["Advanced Sidebar - P\u00e1ginas"],"Title":["T\u00edtulo"],"Display %s on single posts":["Mostrar %s en publicaciones individuales"],"Display each single post's %s":["Muestra las %s de cada publicaci\u00f3n"],"%s to exclude (ids, comma separated)":["%s para excluir (ids, separados por comas)"],"block documentation":["bloquear documentaci\u00f3n"],"Order by":["Ordenar por"]}}}
|
languages/advanced-sidebar-menu-es_ES.mo
CHANGED
Binary file
|
languages/advanced-sidebar-menu-es_ES.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: es_ES\n"
|
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
-
"X-Generator: Poedit 2.4.
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
@@ -21,12 +21,152 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
msgid "widget documentation"
|
26 |
msgstr "documentación del widget"
|
27 |
|
28 |
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
29 |
-
#: src/Notice.php:
|
30 |
#, php-format
|
31 |
msgctxt "{<a>}{</a>}"
|
32 |
msgid ""
|
@@ -36,11 +176,23 @@ msgstr ""
|
|
36 |
"Advanced Sidebar Menu requiere %1$sAdvanced Sidebar Menu PRO%2$s versión %3$s"
|
37 |
"+. Actualice o desactive la versión PRO."
|
38 |
|
39 |
-
#: src/Notice.php:
|
40 |
-
msgid "
|
41 |
-
msgstr "
|
42 |
|
43 |
-
#: src/Notice.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
msgid ""
|
45 |
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
46 |
"font weight."
|
@@ -48,126 +200,49 @@ msgstr ""
|
|
48 |
"Opciones de estilo que incluyen bordes, viñetas, colores, fondos, tamaño y "
|
49 |
"peso de fuente."
|
50 |
|
51 |
-
#: src/Notice.php:
|
52 |
msgid "Accordion menus."
|
53 |
msgstr "Menús de acordeón."
|
54 |
|
55 |
-
#: src/Notice.php:
|
56 |
msgid "Support for custom navigation menus from Appearance -> Menus."
|
57 |
msgstr "Compatibilidad con menús de navegación personalizados."
|
58 |
|
59 |
-
#: src/Notice.php:
|
60 |
-
msgid "Select and display custom post types."
|
61 |
-
msgstr "
|
62 |
-
|
63 |
-
#: src/Notice.php:100
|
64 |
-
msgid "Select and display custom taxonomies."
|
65 |
-
msgstr "Seleccione y muestre taxonomías personalizadas."
|
66 |
|
67 |
-
#: src/Notice.php:
|
68 |
msgid "Priority support with access to members only support area."
|
69 |
msgstr "Soporte prioritario con acceso a los miembros solo área de apoyo."
|
70 |
|
71 |
-
#: src/
|
72 |
-
msgid "So much more..."
|
73 |
-
msgstr "Mucho más..."
|
74 |
-
|
75 |
-
#: src/Notice.php:119
|
76 |
-
msgid "Upgrade"
|
77 |
-
msgstr "Actualizar"
|
78 |
-
|
79 |
-
#: src/Notice.php:127
|
80 |
-
msgid "Preview"
|
81 |
-
msgstr "Vista previa"
|
82 |
-
|
83 |
-
#: src/Widget/Category.php:52
|
84 |
-
msgid ""
|
85 |
-
"Creates a menu of all the categories using the child/parent relationship"
|
86 |
-
msgstr "Crea un menú de todas las categorías utilizando la relación hijo/padre"
|
87 |
-
|
88 |
-
#: src/Widget/Category.php:58
|
89 |
-
msgid "Advanced Sidebar - Categories"
|
90 |
-
msgstr "Advanced Sidebar - Categorías"
|
91 |
-
|
92 |
-
#. translators: Selected taxonomy single label
|
93 |
-
#: src/Widget/Category.php:123
|
94 |
-
#, php-format
|
95 |
-
msgid "Display the highest level parent %s"
|
96 |
-
msgstr "Mostrar el %s principal de nivel más alto"
|
97 |
-
|
98 |
-
#. translators: Selected taxonomy single label
|
99 |
-
#. translators: Selected post type single label
|
100 |
-
#: src/Widget/Category.php:132 src/Widget/Page.php:130
|
101 |
-
#, php-format
|
102 |
-
msgid "Display menu when there is only the parent %s"
|
103 |
-
msgstr "Mostrar menú cuando solo hay el elemento primario %s"
|
104 |
-
|
105 |
-
#. translators: Selected taxonomy plural label
|
106 |
-
#. translators: Selected post type plural label
|
107 |
-
#: src/Widget/Category.php:141 src/Widget/Page.php:140
|
108 |
-
#, php-format
|
109 |
-
msgid "Always display child %s"
|
110 |
-
msgstr "Muestre siempre %s secundarios"
|
111 |
-
|
112 |
-
#: src/Widget/Category.php:155 src/Widget/Page.php:161
|
113 |
-
msgid "- All -"
|
114 |
-
msgstr "- Todo -"
|
115 |
-
|
116 |
-
#. translators: {select html input}, {Selected post type plural label}
|
117 |
-
#: src/Widget/Category.php:170 src/Widget/Page.php:175
|
118 |
-
#, php-format
|
119 |
-
msgid "Display %1$s levels of child %2$s"
|
120 |
-
msgstr "Mostrar %1$s niveles de %2$s secundario"
|
121 |
-
|
122 |
-
#. translators: Selected taxonomy plural label
|
123 |
-
#: src/Widget/Category.php:200
|
124 |
-
#, php-format
|
125 |
-
msgid "Display %s on single posts"
|
126 |
-
msgstr "Mostrar %s en publicaciones individuales"
|
127 |
-
|
128 |
-
#. translators: Selected taxonomy single label
|
129 |
-
#: src/Widget/Category.php:210
|
130 |
-
#, php-format
|
131 |
-
msgid "Display each single post's %s"
|
132 |
-
msgstr "Muestra las %s de cada publicación"
|
133 |
-
|
134 |
-
#: src/Widget/Category.php:220
|
135 |
msgid "In a new widget"
|
136 |
msgstr "En un nuevo widget"
|
137 |
|
138 |
-
#: src/Widget/Category.php:
|
139 |
msgid "In another list in the same widget"
|
140 |
msgstr "En otra lista en el mismo widget"
|
141 |
|
142 |
-
#. translators: Selected taxonomy plural label
|
143 |
-
#. translators: Selected post type plural label
|
144 |
-
#: src/Widget/Category.php:251 src/Widget/Page.php:245
|
145 |
-
#, php-format
|
146 |
-
msgid "%s to exclude (ids, comma separated)"
|
147 |
-
msgstr "%s para excluir (ids, separados por comas)"
|
148 |
-
|
149 |
-
#: src/Widget/Category.php:283 src/Widget/Page.php:276
|
150 |
-
msgid "Title"
|
151 |
-
msgstr "Título"
|
152 |
-
|
153 |
#: src/Widget/Page.php:48
|
154 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
155 |
msgstr "Crea un menú de todas las páginas utilizando la relación hijo/padre"
|
156 |
|
157 |
-
#: src/Widget/Page.php:
|
158 |
-
msgid "
|
159 |
-
msgstr "
|
|
|
|
|
|
|
|
|
160 |
|
161 |
#. translators: Selected post type single label
|
162 |
-
#: src/Widget/Page.php:
|
163 |
#, php-format
|
164 |
msgid "Display highest level parent %s"
|
165 |
msgstr "Mostrar el %s principal de nivel más alto"
|
166 |
|
167 |
-
#: src/Widget/Page.php:202
|
168 |
-
msgid "Order by"
|
169 |
-
msgstr "Ordenar por"
|
170 |
-
|
171 |
#. Plugin Name of the plugin/theme
|
172 |
msgid "Advanced Sidebar Menu"
|
173 |
msgstr "Advanced Sidebar Menu"
|
@@ -191,3 +266,6 @@ msgstr "OnPoint Plugins"
|
|
191 |
#. Author URI of the plugin/theme
|
192 |
msgid "https://onpointplugins.com"
|
193 |
msgstr "https://onpointplugins.com"
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
+
"POT-Creation-Date: 2022-08-21 08:44-0400\n"
|
5 |
+
"PO-Revision-Date: 2022-08-21 08:44-0400\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: es_ES\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
+
"X-Generator: Poedit 2.4.3\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#. translators: Selected taxonomy single label
|
25 |
+
#: js/src/gutenberg/blocks/Display.tsx:36 src/Widget/Category.php:140
|
26 |
+
#, javascript-format, php-format
|
27 |
+
msgid "Display the highest level parent %s"
|
28 |
+
msgstr "Mostrar el %s principal de nivel más alto"
|
29 |
+
|
30 |
+
#. translators: Selected taxonomy single label
|
31 |
+
#. translators: Selected taxonomy single label
|
32 |
+
#. translators: Selected post type single label
|
33 |
+
#: js/src/gutenberg/blocks/Display.tsx:38 src/Widget/Category.php:149
|
34 |
+
#: src/Widget/Page.php:150
|
35 |
+
#, javascript-format, php-format
|
36 |
+
msgid "Display menu when there is only the parent %s"
|
37 |
+
msgstr "Mostrar menú cuando solo hay el elemento primario %s"
|
38 |
+
|
39 |
+
#. translators: Selected taxonomy plural label
|
40 |
+
#. translators: Selected taxonomy plural label
|
41 |
+
#. translators: Selected post type plural label
|
42 |
+
#: js/src/gutenberg/blocks/Display.tsx:40 src/Widget/Category.php:158
|
43 |
+
#: src/Widget/Page.php:160
|
44 |
+
#, javascript-format, php-format
|
45 |
+
msgid "Always display child %s"
|
46 |
+
msgstr "Muestre siempre %s secundarios"
|
47 |
+
|
48 |
+
#: js/src/gutenberg/blocks/Display.tsx:71
|
49 |
+
msgid "Display"
|
50 |
+
msgstr "Mostrar"
|
51 |
+
|
52 |
+
#. translators: {select html input}, {post type plural label}
|
53 |
+
#. translators: {select html input}, {Selected post type plural label}
|
54 |
+
#: js/src/gutenberg/blocks/Display.tsx:91 src/Widget/Category.php:187
|
55 |
+
#: src/Widget/Page.php:195
|
56 |
+
#, javascript-format, php-format
|
57 |
+
msgid "Display %1$s levels of child %2$s"
|
58 |
+
msgstr "Mostrar %1$s niveles de %2$s secundario"
|
59 |
+
|
60 |
+
#: js/src/gutenberg/blocks/Display.tsx:99 src/Widget/Category.php:172
|
61 |
+
#: src/Widget/Page.php:181
|
62 |
+
msgid "- All -"
|
63 |
+
msgstr "- Todo -"
|
64 |
+
|
65 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:16 src/Notice.php:97
|
66 |
+
msgid "Advanced Sidebar Menu PRO"
|
67 |
+
msgstr "Advanced Sidebar Menu PRO"
|
68 |
+
|
69 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:29
|
70 |
+
msgid "So much more…"
|
71 |
+
msgstr "Mucho más…"
|
72 |
+
|
73 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:40 src/Notice.php:124
|
74 |
+
msgid "Upgrade"
|
75 |
+
msgstr "Actualizar"
|
76 |
+
|
77 |
+
#: js/src/gutenberg/blocks/Preview.tsx:64
|
78 |
+
#: js/src/gutenberg/blocks/pages/block.tsx:66 src/Widget/Page.php:55
|
79 |
+
msgid "Advanced Sidebar - Pages"
|
80 |
+
msgstr "Advanced Sidebar - Páginas"
|
81 |
+
|
82 |
+
#: js/src/gutenberg/blocks/Preview.tsx:65
|
83 |
+
#: js/src/gutenberg/blocks/Preview.tsx:72
|
84 |
+
#: js/src/gutenberg/blocks/Preview.tsx:79
|
85 |
+
msgid "No preview available"
|
86 |
+
msgstr "No hay vista previa disponible"
|
87 |
+
|
88 |
+
#: js/src/gutenberg/blocks/Preview.tsx:71
|
89 |
+
#: js/src/gutenberg/blocks/categories/block.tsx:67 src/Widget/Category.php:59
|
90 |
+
msgid "Advanced Sidebar - Categories"
|
91 |
+
msgstr "Advanced Sidebar - Categorías"
|
92 |
+
|
93 |
+
#: js/src/gutenberg/blocks/Preview.tsx:78
|
94 |
+
msgid "Advanced Sidebar - Navigation"
|
95 |
+
msgstr "Advanced Sidebar - Páginas"
|
96 |
+
|
97 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:63
|
98 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:60 src/Widget/Category.php:305
|
99 |
+
#: src/Widget/Page.php:116 src/Widget/Page.php:286
|
100 |
+
msgid "Title"
|
101 |
+
msgstr "Título"
|
102 |
+
|
103 |
+
#. translators: Selected taxonomy plural label
|
104 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:81 src/Widget/Category.php:217
|
105 |
+
#, javascript-format, php-format
|
106 |
+
msgid "Display %s on single posts"
|
107 |
+
msgstr "Mostrar %s en publicaciones individuales"
|
108 |
+
|
109 |
+
#. translators: Selected taxonomy single label
|
110 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:96 src/Widget/Category.php:227
|
111 |
+
#, javascript-format, php-format
|
112 |
+
msgid "Display each single post's %s"
|
113 |
+
msgstr "Muestra las %s de cada publicación"
|
114 |
+
|
115 |
+
#. translators: Selected post type plural label
|
116 |
+
#. translators: Selected taxonomy plural label
|
117 |
+
#. translators: Selected post type plural label
|
118 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:115
|
119 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:91 src/Widget/Category.php:273
|
120 |
+
#: src/Widget/Page.php:255
|
121 |
+
#, javascript-format, php-format
|
122 |
+
msgid "%s to exclude (ids, comma separated)"
|
123 |
+
msgstr "%s para excluir (ids, separados por comas)"
|
124 |
+
|
125 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:128
|
126 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:104
|
127 |
+
msgid "block documentation"
|
128 |
+
msgstr "bloquear documentación"
|
129 |
+
|
130 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:77 src/Widget/Page.php:221
|
131 |
+
msgid "Order by"
|
132 |
+
msgstr "Ordenar por"
|
133 |
+
|
134 |
+
#: src/Blocks/Block_Abstract.php:258
|
135 |
+
msgid "This block requires WordPress version 5.6!"
|
136 |
+
msgstr "¡Este bloque requiere WordPress versión 5.6!"
|
137 |
+
|
138 |
+
#: src/Blocks/Categories.php:25 src/Blocks/Pages.php:25
|
139 |
+
#: src/Widget/Category.php:52
|
140 |
+
msgid ""
|
141 |
+
"Creates a menu of all the categories using the child/parent relationship"
|
142 |
+
msgstr "Crea un menú de todas las categorías utilizando la relación hijo/padre"
|
143 |
+
|
144 |
+
#: src/Blocks/Categories.php:65 src/Blocks/Pages.php:58
|
145 |
+
msgid "menu"
|
146 |
+
msgstr "menu"
|
147 |
+
|
148 |
+
#: src/Blocks/Categories.php:66 src/Blocks/Pages.php:59
|
149 |
+
msgid "sidebar"
|
150 |
+
msgstr "barra lateral"
|
151 |
+
|
152 |
+
#: src/Blocks/Categories.php:67
|
153 |
+
msgid "taxonomy"
|
154 |
+
msgstr "taxonomía"
|
155 |
+
|
156 |
+
#: src/Blocks/Categories.php:68
|
157 |
+
msgid "term"
|
158 |
+
msgstr "término"
|
159 |
+
|
160 |
+
#: src/Blocks/Pages.php:60
|
161 |
+
msgid "pages"
|
162 |
+
msgstr "páginas"
|
163 |
+
|
164 |
+
#: src/Core.php:49
|
165 |
msgid "widget documentation"
|
166 |
msgstr "documentación del widget"
|
167 |
|
168 |
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
169 |
+
#: src/Notice.php:69
|
170 |
#, php-format
|
171 |
msgctxt "{<a>}{</a>}"
|
172 |
msgid ""
|
176 |
"Advanced Sidebar Menu requiere %1$sAdvanced Sidebar Menu PRO%2$s versión %3$s"
|
177 |
"+. Actualice o desactive la versión PRO."
|
178 |
|
179 |
+
#: src/Notice.php:115
|
180 |
+
msgid "So much more..."
|
181 |
+
msgstr "Mucho más..."
|
182 |
|
183 |
+
#: src/Notice.php:132
|
184 |
+
msgid "Preview"
|
185 |
+
msgstr "Vista previa"
|
186 |
+
|
187 |
+
#: src/Notice.php:162
|
188 |
+
msgid "PRO version widget options"
|
189 |
+
msgstr "Opciones del widget de la versión PRO"
|
190 |
+
|
191 |
+
#: src/Notice.php:177
|
192 |
+
msgid "Go PRO"
|
193 |
+
msgstr "Actualizar a PRO"
|
194 |
+
|
195 |
+
#: src/Notice.php:191
|
196 |
msgid ""
|
197 |
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
198 |
"font weight."
|
200 |
"Opciones de estilo que incluyen bordes, viñetas, colores, fondos, tamaño y "
|
201 |
"peso de fuente."
|
202 |
|
203 |
+
#: src/Notice.php:192
|
204 |
msgid "Accordion menus."
|
205 |
msgstr "Menús de acordeón."
|
206 |
|
207 |
+
#: src/Notice.php:193
|
208 |
msgid "Support for custom navigation menus from Appearance -> Menus."
|
209 |
msgstr "Compatibilidad con menús de navegación personalizados."
|
210 |
|
211 |
+
#: src/Notice.php:194
|
212 |
+
msgid "Select and display custom post types and taxonomies."
|
213 |
+
msgstr ""
|
214 |
+
"Seleccione y muestre taxonomías y tipos de publicaciones personalizadas."
|
|
|
|
|
|
|
215 |
|
216 |
+
#: src/Notice.php:195
|
217 |
msgid "Priority support with access to members only support area."
|
218 |
msgstr "Soporte prioritario con acceso a los miembros solo área de apoyo."
|
219 |
|
220 |
+
#: src/Widget/Category.php:118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
msgid "In a new widget"
|
222 |
msgstr "En un nuevo widget"
|
223 |
|
224 |
+
#: src/Widget/Category.php:119
|
225 |
msgid "In another list in the same widget"
|
226 |
msgstr "En otra lista en el mismo widget"
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
#: src/Widget/Page.php:48
|
229 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
230 |
msgstr "Crea un menú de todas las páginas utilizando la relación hijo/padre"
|
231 |
|
232 |
+
#: src/Widget/Page.php:115
|
233 |
+
msgid "Page Order"
|
234 |
+
msgstr "Orden de páginas"
|
235 |
+
|
236 |
+
#: src/Widget/Page.php:117
|
237 |
+
msgid "Published Date"
|
238 |
+
msgstr "Fecha de publicación"
|
239 |
|
240 |
#. translators: Selected post type single label
|
241 |
+
#: src/Widget/Page.php:139
|
242 |
#, php-format
|
243 |
msgid "Display highest level parent %s"
|
244 |
msgstr "Mostrar el %s principal de nivel más alto"
|
245 |
|
|
|
|
|
|
|
|
|
246 |
#. Plugin Name of the plugin/theme
|
247 |
msgid "Advanced Sidebar Menu"
|
248 |
msgstr "Advanced Sidebar Menu"
|
266 |
#. Author URI of the plugin/theme
|
267 |
msgid "https://onpointplugins.com"
|
268 |
msgstr "https://onpointplugins.com"
|
269 |
+
|
270 |
+
#~ msgid "Select and display custom taxonomies."
|
271 |
+
#~ msgstr "Seleccione y muestre taxonomías personalizadas."
|
languages/advanced-sidebar-menu-fr_FR-db8c2f4a99b6d52af632434da54ae10a.json
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"Display the highest level parent %s":["Affichez les comp\u00e9tences parentales de haut niveau %s"],"Display menu when there is only the parent %s":["Afficher le menu lorsqu\u2019il n\u2019y a que le parent %s"],"Always display child %s":["Affichez toujours les enfants %s"],"Display":["Afficher"],"Display %1$s levels of child %2$s":["Afficher %1$s niveaux d'%2$s"],"- All -":["- Tout -"],"Advanced Sidebar Menu PRO":["Advanced Sidebar Menu PRO"],"So much more\u2026":["Tellement plus\u2026"],"Upgrade":["Mise \u00e0 jour"],"Advanced Sidebar - Pages":["Advanced Sidebar - Des Pages"],"No preview available":["Aucun aper\u00e7u disponible"],"Advanced Sidebar - Categories":["Advanced Sidebar - Cat\u00e9gories"],"Advanced Sidebar - Navigation":["Advanced Sidebar - La navigation"],"Title":["Titre"],"Display %s on single posts":["Afficher %s sur les messages simples"],"Display each single post's %s":["Affichez les %s"],"%s to exclude (ids, comma separated)":["%s exclure (ids, virgule s\u00e9par\u00e9e)"],"block documentation":["bloquer la documentation"],"Order by":["Trier par"]}}}
|
languages/advanced-sidebar-menu-fr_FR.mo
CHANGED
Binary file
|
languages/advanced-sidebar-menu-fr_FR.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: fr_FR\n"
|
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
13 |
-
"X-Generator: Poedit 2.4.
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
@@ -21,65 +21,121 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
27 |
|
28 |
-
#. translators:
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
"
|
35 |
-
msgstr ""
|
36 |
-
"Le menu Sidebar avancé nécessite %1$sAvanced Sidebar Menu PRO%2$s version "
|
37 |
-
"%3$s+. Veuillez mettre à jour ou désactiver la version PRO."
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Advanced Sidebar Menu PRO"
|
41 |
msgstr "Advanced Sidebar Menu PRO"
|
42 |
|
43 |
-
#: src/
|
44 |
-
msgid ""
|
45 |
-
"
|
46 |
-
"font weight."
|
47 |
-
msgstr ""
|
48 |
-
"Options de style incluant les bordures, les balles, les couleurs, les "
|
49 |
-
"arrière-plans, la taille et le poids de la police."
|
50 |
|
51 |
-
#: src/Notice.php:
|
52 |
-
msgid "
|
53 |
-
msgstr "
|
54 |
|
55 |
-
#: src/
|
56 |
-
|
57 |
-
|
|
|
58 |
|
59 |
-
#: src/
|
60 |
-
|
61 |
-
|
|
|
|
|
62 |
|
63 |
-
#: src/
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
-
#: src/
|
68 |
-
msgid "
|
69 |
-
msgstr "
|
70 |
|
71 |
-
#: src/
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
#: src/Widget/Category.php:52
|
84 |
msgid ""
|
85 |
"Creates a menu of all the categories using the child/parent relationship"
|
@@ -87,90 +143,110 @@ msgstr ""
|
|
87 |
"Crée un menu de toutes les catégories en utilisant la relation de l'enfant/"
|
88 |
"parent"
|
89 |
|
90 |
-
#: src/
|
91 |
-
msgid "
|
92 |
-
msgstr "
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
msgid "Display the highest level parent %s"
|
98 |
-
msgstr "Affichez les compétences parentales de haut niveau %s"
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
#, php-format
|
104 |
-
msgid "Display menu when there is only the parent %s"
|
105 |
-
msgstr "Afficher le menu lorsqu’il n’y a que le parent %s"
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
#, php-format
|
111 |
-
msgid "Always display child %s"
|
112 |
-
msgstr "Affichez toujours les enfants %s"
|
113 |
|
114 |
-
#: src/
|
115 |
-
msgid "
|
116 |
-
msgstr "
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
msgid "Display %1$s levels of child %2$s"
|
122 |
-
msgstr "Afficher %1$s niveaux d'%2$s"
|
123 |
|
124 |
-
#. translators:
|
125 |
-
#: src/
|
126 |
#, php-format
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
msgid "Display each single post's %s"
|
134 |
-
msgstr "Affichez les %s"
|
135 |
|
136 |
-
#: src/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
msgid "In a new widget"
|
138 |
msgstr "Dans un nouveau widget"
|
139 |
|
140 |
-
#: src/Widget/Category.php:
|
141 |
msgid "In another list in the same widget"
|
142 |
msgstr "Dans une autre liste dans le même widget"
|
143 |
|
144 |
-
#. translators: Selected taxonomy plural label
|
145 |
-
#. translators: Selected post type plural label
|
146 |
-
#: src/Widget/Category.php:251 src/Widget/Page.php:245
|
147 |
-
#, php-format
|
148 |
-
msgid "%s to exclude (ids, comma separated)"
|
149 |
-
msgstr "%s exclure (ids, virgule séparée)"
|
150 |
-
|
151 |
-
#: src/Widget/Category.php:283 src/Widget/Page.php:276
|
152 |
-
msgid "Title"
|
153 |
-
msgstr "Titre"
|
154 |
-
|
155 |
#: src/Widget/Page.php:48
|
156 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
157 |
msgstr ""
|
158 |
"Crée un menu de toutes les pages en utilisant la relation enfant/parent"
|
159 |
|
160 |
-
#: src/Widget/Page.php:
|
161 |
-
msgid "
|
162 |
-
msgstr "
|
|
|
|
|
|
|
|
|
163 |
|
164 |
#. translators: Selected post type single label
|
165 |
-
#: src/Widget/Page.php:
|
166 |
#, php-format
|
167 |
msgid "Display highest level parent %s"
|
168 |
msgstr "Afficher les parents de haut niveau %s"
|
169 |
|
170 |
-
#: src/Widget/Page.php:202
|
171 |
-
msgid "Order by"
|
172 |
-
msgstr "Trier par"
|
173 |
-
|
174 |
#. Plugin Name of the plugin/theme
|
175 |
msgid "Advanced Sidebar Menu"
|
176 |
msgstr "Advanced Sidebar Menu"
|
@@ -194,3 +270,6 @@ msgstr "OnPoint Plugins"
|
|
194 |
#. Author URI of the plugin/theme
|
195 |
msgid "https://onpointplugins.com"
|
196 |
msgstr "https://onpointplugins.com"
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
4 |
+
"POT-Creation-Date: 2022-08-21 08:44-0400\n"
|
5 |
+
"PO-Revision-Date: 2022-08-21 08:44-0400\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: fr_FR\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
13 |
+
"X-Generator: Poedit 2.4.3\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#. translators: Selected taxonomy single label
|
25 |
+
#: js/src/gutenberg/blocks/Display.tsx:36 src/Widget/Category.php:140
|
26 |
+
#, javascript-format, php-format
|
27 |
+
msgid "Display the highest level parent %s"
|
28 |
+
msgstr "Affichez les compétences parentales de haut niveau %s"
|
29 |
|
30 |
+
#. translators: Selected taxonomy single label
|
31 |
+
#. translators: Selected taxonomy single label
|
32 |
+
#. translators: Selected post type single label
|
33 |
+
#: js/src/gutenberg/blocks/Display.tsx:38 src/Widget/Category.php:149
|
34 |
+
#: src/Widget/Page.php:150
|
35 |
+
#, javascript-format, php-format
|
36 |
+
msgid "Display menu when there is only the parent %s"
|
37 |
+
msgstr "Afficher le menu lorsqu’il n’y a que le parent %s"
|
|
|
|
|
38 |
|
39 |
+
#. translators: Selected taxonomy plural label
|
40 |
+
#. translators: Selected taxonomy plural label
|
41 |
+
#. translators: Selected post type plural label
|
42 |
+
#: js/src/gutenberg/blocks/Display.tsx:40 src/Widget/Category.php:158
|
43 |
+
#: src/Widget/Page.php:160
|
44 |
+
#, javascript-format, php-format
|
45 |
+
msgid "Always display child %s"
|
46 |
+
msgstr "Affichez toujours les enfants %s"
|
47 |
+
|
48 |
+
#: js/src/gutenberg/blocks/Display.tsx:71
|
49 |
+
msgid "Display"
|
50 |
+
msgstr "Afficher"
|
51 |
+
|
52 |
+
#. translators: {select html input}, {post type plural label}
|
53 |
+
#. translators: {select html input}, {Selected post type plural label}
|
54 |
+
#: js/src/gutenberg/blocks/Display.tsx:91 src/Widget/Category.php:187
|
55 |
+
#: src/Widget/Page.php:195
|
56 |
+
#, javascript-format, php-format
|
57 |
+
msgid "Display %1$s levels of child %2$s"
|
58 |
+
msgstr "Afficher %1$s niveaux d'%2$s"
|
59 |
+
|
60 |
+
#: js/src/gutenberg/blocks/Display.tsx:99 src/Widget/Category.php:172
|
61 |
+
#: src/Widget/Page.php:181
|
62 |
+
msgid "- All -"
|
63 |
+
msgstr "- Tout -"
|
64 |
+
|
65 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:16 src/Notice.php:97
|
66 |
msgid "Advanced Sidebar Menu PRO"
|
67 |
msgstr "Advanced Sidebar Menu PRO"
|
68 |
|
69 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:29
|
70 |
+
msgid "So much more…"
|
71 |
+
msgstr "Tellement plus…"
|
|
|
|
|
|
|
|
|
72 |
|
73 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:40 src/Notice.php:124
|
74 |
+
msgid "Upgrade"
|
75 |
+
msgstr "Mise à jour"
|
76 |
|
77 |
+
#: js/src/gutenberg/blocks/Preview.tsx:64
|
78 |
+
#: js/src/gutenberg/blocks/pages/block.tsx:66 src/Widget/Page.php:55
|
79 |
+
msgid "Advanced Sidebar - Pages"
|
80 |
+
msgstr "Advanced Sidebar - Des Pages"
|
81 |
|
82 |
+
#: js/src/gutenberg/blocks/Preview.tsx:65
|
83 |
+
#: js/src/gutenberg/blocks/Preview.tsx:72
|
84 |
+
#: js/src/gutenberg/blocks/Preview.tsx:79
|
85 |
+
msgid "No preview available"
|
86 |
+
msgstr "Aucun aperçu disponible"
|
87 |
|
88 |
+
#: js/src/gutenberg/blocks/Preview.tsx:71
|
89 |
+
#: js/src/gutenberg/blocks/categories/block.tsx:67 src/Widget/Category.php:59
|
90 |
+
msgid "Advanced Sidebar - Categories"
|
91 |
+
msgstr "Advanced Sidebar - Catégories"
|
92 |
|
93 |
+
#: js/src/gutenberg/blocks/Preview.tsx:78
|
94 |
+
msgid "Advanced Sidebar - Navigation"
|
95 |
+
msgstr "Advanced Sidebar - La navigation"
|
96 |
|
97 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:63
|
98 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:60 src/Widget/Category.php:305
|
99 |
+
#: src/Widget/Page.php:116 src/Widget/Page.php:286
|
100 |
+
msgid "Title"
|
101 |
+
msgstr "Titre"
|
102 |
|
103 |
+
#. translators: Selected taxonomy plural label
|
104 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:81 src/Widget/Category.php:217
|
105 |
+
#, javascript-format, php-format
|
106 |
+
msgid "Display %s on single posts"
|
107 |
+
msgstr "Afficher %s sur les messages simples"
|
108 |
|
109 |
+
#. translators: Selected taxonomy single label
|
110 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:96 src/Widget/Category.php:227
|
111 |
+
#, javascript-format, php-format
|
112 |
+
msgid "Display each single post's %s"
|
113 |
+
msgstr "Affichez les %s"
|
114 |
|
115 |
+
#. translators: Selected post type plural label
|
116 |
+
#. translators: Selected taxonomy plural label
|
117 |
+
#. translators: Selected post type plural label
|
118 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:115
|
119 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:91 src/Widget/Category.php:273
|
120 |
+
#: src/Widget/Page.php:255
|
121 |
+
#, javascript-format, php-format
|
122 |
+
msgid "%s to exclude (ids, comma separated)"
|
123 |
+
msgstr "%s exclure (ids, virgule séparée)"
|
124 |
+
|
125 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:128
|
126 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:104
|
127 |
+
msgid "block documentation"
|
128 |
+
msgstr "bloquer la documentation"
|
129 |
+
|
130 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:77 src/Widget/Page.php:221
|
131 |
+
msgid "Order by"
|
132 |
+
msgstr "Trier par"
|
133 |
+
|
134 |
+
#: src/Blocks/Block_Abstract.php:258
|
135 |
+
msgid "This block requires WordPress version 5.6!"
|
136 |
+
msgstr "Ce bloc nécessite WordPress version 5.6!"
|
137 |
+
|
138 |
+
#: src/Blocks/Categories.php:25 src/Blocks/Pages.php:25
|
139 |
#: src/Widget/Category.php:52
|
140 |
msgid ""
|
141 |
"Creates a menu of all the categories using the child/parent relationship"
|
143 |
"Crée un menu de toutes les catégories en utilisant la relation de l'enfant/"
|
144 |
"parent"
|
145 |
|
146 |
+
#: src/Blocks/Categories.php:65 src/Blocks/Pages.php:58
|
147 |
+
msgid "menu"
|
148 |
+
msgstr "menu"
|
149 |
|
150 |
+
#: src/Blocks/Categories.php:66 src/Blocks/Pages.php:59
|
151 |
+
msgid "sidebar"
|
152 |
+
msgstr "barre latérale"
|
|
|
|
|
153 |
|
154 |
+
#: src/Blocks/Categories.php:67
|
155 |
+
msgid "taxonomy"
|
156 |
+
msgstr "taxonomie"
|
|
|
|
|
|
|
157 |
|
158 |
+
#: src/Blocks/Categories.php:68
|
159 |
+
msgid "term"
|
160 |
+
msgstr "terme"
|
|
|
|
|
|
|
161 |
|
162 |
+
#: src/Blocks/Pages.php:60
|
163 |
+
msgid "pages"
|
164 |
+
msgstr "pages"
|
165 |
|
166 |
+
#: src/Core.php:49
|
167 |
+
msgid "widget documentation"
|
168 |
+
msgstr "documentation widget"
|
|
|
|
|
169 |
|
170 |
+
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
171 |
+
#: src/Notice.php:69
|
172 |
#, php-format
|
173 |
+
msgctxt "{<a>}{</a>}"
|
174 |
+
msgid ""
|
175 |
+
"Advanced Sidebar Menu requires %1$sAdvanced Sidebar Menu PRO%2$s version %3$s"
|
176 |
+
"+. Please update or deactivate the PRO version."
|
177 |
+
msgstr ""
|
178 |
+
"Le menu Sidebar avancé nécessite %1$sAvanced Sidebar Menu PRO%2$s version "
|
179 |
+
"%3$s+. Veuillez mettre à jour ou désactiver la version PRO."
|
180 |
|
181 |
+
#: src/Notice.php:115
|
182 |
+
msgid "So much more..."
|
183 |
+
msgstr "Tellement plus..."
|
|
|
|
|
184 |
|
185 |
+
#: src/Notice.php:132
|
186 |
+
msgid "Preview"
|
187 |
+
msgstr "Aperçu"
|
188 |
+
|
189 |
+
#: src/Notice.php:162
|
190 |
+
msgid "PRO version widget options"
|
191 |
+
msgstr "Options du widget version PRO"
|
192 |
+
|
193 |
+
#: src/Notice.php:177
|
194 |
+
msgid "Go PRO"
|
195 |
+
msgstr "Passer à la version pro"
|
196 |
+
|
197 |
+
#: src/Notice.php:191
|
198 |
+
msgid ""
|
199 |
+
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
200 |
+
"font weight."
|
201 |
+
msgstr ""
|
202 |
+
"Options de style incluant les bordures, les balles, les couleurs, les "
|
203 |
+
"arrière-plans, la taille et le poids de la police."
|
204 |
+
|
205 |
+
#: src/Notice.php:192
|
206 |
+
msgid "Accordion menus."
|
207 |
+
msgstr "Menus accordéon."
|
208 |
+
|
209 |
+
#: src/Notice.php:193
|
210 |
+
msgid "Support for custom navigation menus from Appearance -> Menus."
|
211 |
+
msgstr "Prise en charge des menus de navigation personnalisés."
|
212 |
+
|
213 |
+
#: src/Notice.php:194
|
214 |
+
msgid "Select and display custom post types and taxonomies."
|
215 |
+
msgstr ""
|
216 |
+
"Sélectionnez et affichez des types de publication et des taxonomies "
|
217 |
+
"personnalisés."
|
218 |
+
|
219 |
+
#: src/Notice.php:195
|
220 |
+
msgid "Priority support with access to members only support area."
|
221 |
+
msgstr "Soutien prioritaire avec accès aux membres uniquement zone de soutien."
|
222 |
+
|
223 |
+
#: src/Widget/Category.php:118
|
224 |
msgid "In a new widget"
|
225 |
msgstr "Dans un nouveau widget"
|
226 |
|
227 |
+
#: src/Widget/Category.php:119
|
228 |
msgid "In another list in the same widget"
|
229 |
msgstr "Dans une autre liste dans le même widget"
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
#: src/Widget/Page.php:48
|
232 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
233 |
msgstr ""
|
234 |
"Crée un menu de toutes les pages en utilisant la relation enfant/parent"
|
235 |
|
236 |
+
#: src/Widget/Page.php:115
|
237 |
+
msgid "Page Order"
|
238 |
+
msgstr "Ordre des pages"
|
239 |
+
|
240 |
+
#: src/Widget/Page.php:117
|
241 |
+
msgid "Published Date"
|
242 |
+
msgstr "Date de publication"
|
243 |
|
244 |
#. translators: Selected post type single label
|
245 |
+
#: src/Widget/Page.php:139
|
246 |
#, php-format
|
247 |
msgid "Display highest level parent %s"
|
248 |
msgstr "Afficher les parents de haut niveau %s"
|
249 |
|
|
|
|
|
|
|
|
|
250 |
#. Plugin Name of the plugin/theme
|
251 |
msgid "Advanced Sidebar Menu"
|
252 |
msgstr "Advanced Sidebar Menu"
|
270 |
#. Author URI of the plugin/theme
|
271 |
msgid "https://onpointplugins.com"
|
272 |
msgstr "https://onpointplugins.com"
|
273 |
+
|
274 |
+
#~ msgid "Select and display custom taxonomies."
|
275 |
+
#~ msgstr "Sélectionnez et affichez des taxonomies personnalisées."
|
languages/advanced-sidebar-menu.pot
CHANGED
@@ -5,14 +5,14 @@ msgstr ""
|
|
5 |
"sidebar-menu\n"
|
6 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
7 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
8 |
-
"POT-Creation-Date:
|
9 |
"PO-Revision-Date: 2019-03-05 12:29-0500\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 2.4.
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
18 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
@@ -23,149 +23,223 @@ msgstr ""
|
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
25 |
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
msgstr ""
|
29 |
|
30 |
-
#. translators:
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: src/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgid "Advanced Sidebar Menu PRO"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: src/
|
44 |
-
msgid ""
|
45 |
-
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
46 |
-
"font weight."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: src/Notice.php:
|
50 |
-
msgid "
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: src/
|
54 |
-
|
|
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: src/
|
58 |
-
|
|
|
|
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: src/
|
62 |
-
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: src/
|
66 |
-
msgid "
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: src/
|
70 |
-
|
|
|
|
|
71 |
msgstr ""
|
72 |
|
73 |
-
|
74 |
-
|
|
|
|
|
75 |
msgstr ""
|
76 |
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
msgstr ""
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
#: src/Widget/Category.php:52
|
82 |
msgid ""
|
83 |
"Creates a menu of all the categories using the child/parent relationship"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: src/
|
87 |
-
msgid "
|
88 |
msgstr ""
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
#, php-format
|
93 |
-
msgid "Display the highest level parent %s"
|
94 |
msgstr ""
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
#: src/Widget/Category.php:132 src/Widget/Page.php:130
|
99 |
-
#, php-format
|
100 |
-
msgid "Display menu when there is only the parent %s"
|
101 |
msgstr ""
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
#: src/Widget/Category.php:141 src/Widget/Page.php:140
|
106 |
-
#, php-format
|
107 |
-
msgid "Always display child %s"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: src/
|
111 |
-
msgid "
|
112 |
msgstr ""
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
#, php-format
|
117 |
-
msgid "Display %1$s levels of child %2$s"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#. translators:
|
121 |
-
#: src/
|
122 |
#, php-format
|
123 |
-
|
|
|
|
|
|
|
124 |
msgstr ""
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
#, php-format
|
129 |
-
msgid "Display each single post's %s"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: src/
|
133 |
-
msgid "
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: src/
|
137 |
-
msgid "
|
138 |
msgstr ""
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
#: src/Widget/Category.php:251 src/Widget/Page.php:245
|
143 |
-
#, php-format
|
144 |
-
msgid "%s to exclude (ids, comma separated)"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: src/
|
148 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
msgstr ""
|
150 |
|
151 |
#: src/Widget/Page.php:48
|
152 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: src/Widget/Page.php:
|
156 |
-
msgid "
|
|
|
|
|
|
|
|
|
157 |
msgstr ""
|
158 |
|
159 |
#. translators: Selected post type single label
|
160 |
-
#: src/Widget/Page.php:
|
161 |
#, php-format
|
162 |
msgid "Display highest level parent %s"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: src/Widget/Page.php:202
|
166 |
-
msgid "Order by"
|
167 |
-
msgstr ""
|
168 |
-
|
169 |
#. Plugin Name of the plugin/theme
|
170 |
msgid "Advanced Sidebar Menu"
|
171 |
msgstr ""
|
5 |
"sidebar-menu\n"
|
6 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
7 |
"Project-Id-Version: Advanced Sidebar Menu\n"
|
8 |
+
"POT-Creation-Date: 2022-08-21 08:44-0400\n"
|
9 |
"PO-Revision-Date: 2019-03-05 12:29-0500\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.4.3\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
18 |
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
25 |
|
26 |
+
#. translators: Selected taxonomy single label
|
27 |
+
#: js/src/gutenberg/blocks/Display.tsx:36 src/Widget/Category.php:140
|
28 |
+
#, javascript-format, php-format
|
29 |
+
msgid "Display the highest level parent %s"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#. translators: Selected taxonomy single label
|
33 |
+
#. translators: Selected taxonomy single label
|
34 |
+
#. translators: Selected post type single label
|
35 |
+
#: js/src/gutenberg/blocks/Display.tsx:38 src/Widget/Category.php:149
|
36 |
+
#: src/Widget/Page.php:150
|
37 |
+
#, javascript-format, php-format
|
38 |
+
msgid "Display menu when there is only the parent %s"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#. translators: Selected taxonomy plural label
|
42 |
+
#. translators: Selected taxonomy plural label
|
43 |
+
#. translators: Selected post type plural label
|
44 |
+
#: js/src/gutenberg/blocks/Display.tsx:40 src/Widget/Category.php:158
|
45 |
+
#: src/Widget/Page.php:160
|
46 |
+
#, javascript-format, php-format
|
47 |
+
msgid "Always display child %s"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: js/src/gutenberg/blocks/Display.tsx:71
|
51 |
+
msgid "Display"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#. translators: {select html input}, {post type plural label}
|
55 |
+
#. translators: {select html input}, {Selected post type plural label}
|
56 |
+
#: js/src/gutenberg/blocks/Display.tsx:91 src/Widget/Category.php:187
|
57 |
+
#: src/Widget/Page.php:195
|
58 |
+
#, javascript-format, php-format
|
59 |
+
msgid "Display %1$s levels of child %2$s"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: js/src/gutenberg/blocks/Display.tsx:99 src/Widget/Category.php:172
|
63 |
+
#: src/Widget/Page.php:181
|
64 |
+
msgid "- All -"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:16 src/Notice.php:97
|
68 |
msgid "Advanced Sidebar Menu PRO"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:29
|
72 |
+
msgid "So much more…"
|
|
|
|
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: js/src/gutenberg/blocks/InfoPanel.tsx:40 src/Notice.php:124
|
76 |
+
msgid "Upgrade"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: js/src/gutenberg/blocks/Preview.tsx:64
|
80 |
+
#: js/src/gutenberg/blocks/pages/block.tsx:66 src/Widget/Page.php:55
|
81 |
+
msgid "Advanced Sidebar - Pages"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: js/src/gutenberg/blocks/Preview.tsx:65
|
85 |
+
#: js/src/gutenberg/blocks/Preview.tsx:72
|
86 |
+
#: js/src/gutenberg/blocks/Preview.tsx:79
|
87 |
+
msgid "No preview available"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: js/src/gutenberg/blocks/Preview.tsx:71
|
91 |
+
#: js/src/gutenberg/blocks/categories/block.tsx:67 src/Widget/Category.php:59
|
92 |
+
msgid "Advanced Sidebar - Categories"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: js/src/gutenberg/blocks/Preview.tsx:78
|
96 |
+
msgid "Advanced Sidebar - Navigation"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:63
|
100 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:60 src/Widget/Category.php:305
|
101 |
+
#: src/Widget/Page.php:116 src/Widget/Page.php:286
|
102 |
+
msgid "Title"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#. translators: Selected taxonomy plural label
|
106 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:81 src/Widget/Category.php:217
|
107 |
+
#, javascript-format, php-format
|
108 |
+
msgid "Display %s on single posts"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#. translators: Selected taxonomy single label
|
112 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:96 src/Widget/Category.php:227
|
113 |
+
#, javascript-format, php-format
|
114 |
+
msgid "Display each single post's %s"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#. translators: Selected post type plural label
|
118 |
+
#. translators: Selected taxonomy plural label
|
119 |
+
#. translators: Selected post type plural label
|
120 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:115
|
121 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:91 src/Widget/Category.php:273
|
122 |
+
#: src/Widget/Page.php:255
|
123 |
+
#, javascript-format, php-format
|
124 |
+
msgid "%s to exclude (ids, comma separated)"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: js/src/gutenberg/blocks/categories/Edit.tsx:128
|
128 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:104
|
129 |
+
msgid "block documentation"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: js/src/gutenberg/blocks/pages/Edit.tsx:77 src/Widget/Page.php:221
|
133 |
+
msgid "Order by"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: src/Blocks/Block_Abstract.php:258
|
137 |
+
msgid "This block requires WordPress version 5.6!"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: src/Blocks/Categories.php:25 src/Blocks/Pages.php:25
|
141 |
#: src/Widget/Category.php:52
|
142 |
msgid ""
|
143 |
"Creates a menu of all the categories using the child/parent relationship"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: src/Blocks/Categories.php:65 src/Blocks/Pages.php:58
|
147 |
+
msgid "menu"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: src/Blocks/Categories.php:66 src/Blocks/Pages.php:59
|
151 |
+
msgid "sidebar"
|
|
|
|
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: src/Blocks/Categories.php:67
|
155 |
+
msgid "taxonomy"
|
|
|
|
|
|
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: src/Blocks/Categories.php:68
|
159 |
+
msgid "term"
|
|
|
|
|
|
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: src/Blocks/Pages.php:60
|
163 |
+
msgid "pages"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: src/Core.php:49
|
167 |
+
msgid "widget documentation"
|
|
|
|
|
168 |
msgstr ""
|
169 |
|
170 |
+
#. translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>]
|
171 |
+
#: src/Notice.php:69
|
172 |
#, php-format
|
173 |
+
msgctxt "{<a>}{</a>}"
|
174 |
+
msgid ""
|
175 |
+
"Advanced Sidebar Menu requires %1$sAdvanced Sidebar Menu PRO%2$s version "
|
176 |
+
"%3$s+. Please update or deactivate the PRO version."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: src/Notice.php:115
|
180 |
+
msgid "So much more..."
|
|
|
|
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: src/Notice.php:132
|
184 |
+
msgid "Preview"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: src/Notice.php:162
|
188 |
+
msgid "PRO version widget options"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: src/Notice.php:177
|
192 |
+
msgid "Go PRO"
|
|
|
|
|
|
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: src/Notice.php:191
|
196 |
+
msgid ""
|
197 |
+
"Styling options including borders, bullets, colors, backgrounds, size, and "
|
198 |
+
"font weight."
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: src/Notice.php:192
|
202 |
+
msgid "Accordion menus."
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: src/Notice.php:193
|
206 |
+
msgid "Support for custom navigation menus from Appearance -> Menus."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: src/Notice.php:194
|
210 |
+
msgid "Select and display custom post types and taxonomies."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: src/Notice.php:195
|
214 |
+
msgid "Priority support with access to members only support area."
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: src/Widget/Category.php:118
|
218 |
+
msgid "In a new widget"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: src/Widget/Category.php:119
|
222 |
+
msgid "In another list in the same widget"
|
223 |
msgstr ""
|
224 |
|
225 |
#: src/Widget/Page.php:48
|
226 |
msgid "Creates a menu of all the pages using the child/parent relationship"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: src/Widget/Page.php:115
|
230 |
+
msgid "Page Order"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: src/Widget/Page.php:117
|
234 |
+
msgid "Published Date"
|
235 |
msgstr ""
|
236 |
|
237 |
#. translators: Selected post type single label
|
238 |
+
#: src/Widget/Page.php:139
|
239 |
#, php-format
|
240 |
msgid "Display highest level parent %s"
|
241 |
msgstr ""
|
242 |
|
|
|
|
|
|
|
|
|
243 |
#. Plugin Name of the plugin/theme
|
244 |
msgid "Advanced Sidebar Menu"
|
245 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,24 +2,29 @@
|
|
2 |
|
3 |
Contributors: Mat Lipe, onpointplugins
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40onpointplugins%2ecom&lc=US&item_name=Advanced%20Sidebar%20Menu&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
5 |
-
Tags:
|
6 |
-
Requires at least: 5.
|
7 |
Tested up to: 6.0.1
|
8 |
-
Requires PHP:
|
9 |
-
Stable tag:
|
|
|
|
|
10 |
|
11 |
== Description ==
|
12 |
|
|
|
|
|
13 |
Uses the parent/child relationship of your pages or categories to generate menus based on the current section of your site. Assign a page or category to a parent and this will do the rest for you.
|
14 |
|
15 |
Keeps the menu clean and usable. Only related items display so you don't have to worry about keeping a custom menu up to date or displaying links to items that don't belong.
|
16 |
|
17 |
<strong>Check out <a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">Advanced Sidebar Menu PRO</a> for more features including accordion menus, menu colors and styles, custom link text, excluding of pages, category ordering, custom post types, custom taxonomies, priority support, and so much more!</strong>
|
18 |
|
19 |
-
<blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version
|
20 |
|
21 |
<h3>Features</h3>
|
22 |
* Page and Category widgets.
|
|
|
23 |
* Option to display or not display the highest level parent page or category.
|
24 |
* Option to display the menu when there is only the highest level parent.
|
25 |
* Ability to order pages by (date, title, page order).
|
@@ -27,30 +32,30 @@ Keeps the menu clean and usable. Only related items display so you don't have to
|
|
27 |
* Option to always display child pages or categories.
|
28 |
* Option to select the levels of pages or categories to display when always display child is used.
|
29 |
* Option to display or not display categories on single posts.
|
30 |
-
* Ability to display each single post's category in a new widget or in same list.
|
31 |
-
|
32 |
-
<h3>Page
|
33 |
-
*
|
34 |
-
* Display
|
35 |
-
*
|
36 |
-
*
|
37 |
-
*
|
38 |
-
*
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
*
|
43 |
-
* Display
|
44 |
-
* Display
|
45 |
-
*
|
46 |
-
*
|
47 |
-
*
|
48 |
-
* Always display child categories
|
49 |
-
* Levels of Categories to display when always display child categories is checked
|
50 |
|
51 |
<h3>PRO Features</h3>
|
|
|
|
|
52 |
* Ability to customize each page or navigation menu item link's text.
|
53 |
-
* Click-and-drag styling for page, category, and navigation
|
54 |
* Styling options for links including color, background color, size, hover, and font weight.
|
55 |
* Styling options for different levels of links.
|
56 |
* Styling options for the current page or category.
|
@@ -61,15 +66,15 @@ Keeps the menu clean and usable. Only related items display so you don't have to
|
|
61 |
* Accordion icon style and color selection.
|
62 |
* Accordion option to keep all sections closed until clicked.
|
63 |
* Accordion option to include highest level parent in accordion.
|
64 |
-
* Accordion option to use links for open/close.
|
65 |
* Ability to exclude a page from all menus using a simple checkbox.
|
66 |
-
* Link ordering for the category
|
67 |
* Number of levels of pages to show when "always display child pages" is not checked.
|
68 |
* Ability to select and display custom post types.
|
69 |
* Ability to select and display custom taxonomies.
|
70 |
* Option to display only the current page's parents, grandparents, and children.
|
71 |
* Option to display child page siblings when on a child page (with or without grandchildren available).
|
72 |
-
* Ability to display the
|
73 |
* Ability to select the highest level parent page/category.
|
74 |
* Ability to select which levels of categories assigned posts will display under.
|
75 |
* Ability to display assigned posts or custom post types under categories or taxonomies.
|
@@ -100,28 +105,31 @@ Use the standard WordPress plugins search and install.
|
|
100 |
Manual Installation
|
101 |
|
102 |
1. Upload the `advanced-sidebar-menu` folder to the `/wp-content/plugins/` directory
|
103 |
-
|
104 |
-
|
|
|
|
|
105 |
|
106 |
|
107 |
== Screenshots ==
|
108 |
|
109 |
-
1. Page widget options
|
110 |
-
2. Category widget options
|
111 |
-
3. Example of a page menu using the 2017 theme and default styles
|
112 |
-
3. Example of a category menu ordered by title using the 2017 theme and default styles
|
113 |
|
114 |
|
115 |
== Frequently Asked Questions ==
|
116 |
|
117 |
-
= The
|
118 |
|
119 |
-
The
|
120 |
|
121 |
The most common causes for this confusion come from one of these reasons:
|
122 |
-
1. The incorrect
|
123 |
2. "Display the highest level parent page" or "Display the highest level parent category" is not checked.
|
124 |
-
3. The
|
|
|
125 |
|
126 |
= How do I change the styling of the current page? =
|
127 |
|
@@ -150,7 +158,7 @@ To style your menu without using any code <a href="https://onpointplugins.com/pr
|
|
150 |
|
151 |
= How do you get the categories to display on single post pages? =
|
152 |
|
153 |
-
The Categories Menu widget contains a "Display categories on single posts" checkbox, which will display the category menus based on the categories the current post is assigned to.
|
154 |
|
155 |
= Does the menu change for each page you are on? =
|
156 |
|
@@ -158,6 +166,18 @@ Yes. Based on whatever page, post or category you are on, the menu will change a
|
|
158 |
|
159 |
|
160 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
= 8.8.3 =
|
162 |
* Introduced `advanced-sidebar-menu/menus/category/top-level-term-ids` filter.
|
163 |
* Supported PRO version 8.9.2.
|
@@ -165,7 +185,7 @@ Yes. Based on whatever page, post or category you are on, the menu will change a
|
|
165 |
= 8.8.2 =
|
166 |
* Fixed widget id generation with block based widgets.
|
167 |
* Introduced `advanced-sidebar-menu/core/include-template-parts-comments` filter.
|
168 |
-
* Organized the `
|
169 |
* Tested to WordPress Core 6.0.1.
|
170 |
|
171 |
= 8.8.1 =
|
@@ -301,42 +321,6 @@ Yes. Based on whatever page, post or category you are on, the menu will change a
|
|
301 |
= 8.0.0 =
|
302 |
Major version update. See <a href="https://onpointplugins.com/advanced-sidebar-menu/advanced-sidebar-menu-version-8-migration-guide/">migration guide</a> if you are extending the plugin's functionality via action, filters, or calling plugin classes.
|
303 |
|
304 |
-
* Entirely new code structure.
|
305 |
-
* Removed all deprecated code and filters.
|
306 |
-
* Improved filter and action names.
|
307 |
-
* Improved performance.
|
308 |
-
* Remove default plugin styling.
|
309 |
-
|
310 |
-
= 7.7.3 =
|
311 |
-
* Fix widget info pane links.
|
312 |
-
* Fix widget editing on mobile devices.
|
313 |
-
* Tested up to PHP 7.4
|
314 |
-
* Tested up to WordPress Core version 5.4.1
|
315 |
-
|
316 |
-
= 7.7.2 =
|
317 |
-
* Tested to 5.3.3.
|
318 |
-
* Change default "levels to display" to All.
|
319 |
-
* Fix notice level errors when retrieving current page.
|
320 |
-
|
321 |
-
= 7.7.0 =
|
322 |
-
* Enable accordion previews when editing via Beaver Builder.
|
323 |
-
* Greatly improved widget styles and UI when using Elementor.
|
324 |
-
* Overall third party page builder improvements.
|
325 |
-
* Move scripts and styles into new Scripts class.
|
326 |
-
* Introduced a Singleton trait.
|
327 |
-
|
328 |
-
= 7.6.0 =
|
329 |
-
* Elementor support for multiple widgets of the same type on the same page.
|
330 |
-
* Automatically increment widget ids under any cases where they would duplicate.
|
331 |
-
* Bump required WordPress Core version to 4.8.0.
|
332 |
-
|
333 |
-
= 7.5.0 =
|
334 |
-
* Convert "Always display child pages" to use our List_Pages structure and support all widget options.
|
335 |
-
* Bump required PHP version to 5.4.4.
|
336 |
-
|
337 |
== Upgrade Notice ==
|
338 |
-
=
|
339 |
-
|
340 |
-
|
341 |
-
= 8.5.0 =
|
342 |
-
Update to support PRO version 8.4.0.
|
2 |
|
3 |
Contributors: Mat Lipe, onpointplugins
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40onpointplugins%2ecom&lc=US&item_name=Advanced%20Sidebar%20Menu&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
5 |
+
Tags: block, widget, dynamic, hierarchy, menus, sidebar menu, category, pages, parent, child, automatic
|
6 |
+
Requires at least: 5.8.0
|
7 |
Tested up to: 6.0.1
|
8 |
+
Requires PHP: 7.0.0
|
9 |
+
Stable tag: 9.0.0
|
10 |
+
License: GPLv3 or later
|
11 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
<h3>Fully automatic sidebar menus.</h3>
|
16 |
+
|
17 |
Uses the parent/child relationship of your pages or categories to generate menus based on the current section of your site. Assign a page or category to a parent and this will do the rest for you.
|
18 |
|
19 |
Keeps the menu clean and usable. Only related items display so you don't have to worry about keeping a custom menu up to date or displaying links to items that don't belong.
|
20 |
|
21 |
<strong>Check out <a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">Advanced Sidebar Menu PRO</a> for more features including accordion menus, menu colors and styles, custom link text, excluding of pages, category ordering, custom post types, custom taxonomies, priority support, and so much more!</strong>
|
22 |
|
23 |
+
<blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version 9.0.0/a> is now available with Gutenberg blocks!</blockquote>
|
24 |
|
25 |
<h3>Features</h3>
|
26 |
* Page and Category widgets.
|
27 |
+
* Page and Category blocks. **NEW**
|
28 |
* Option to display or not display the highest level parent page or category.
|
29 |
* Option to display the menu when there is only the highest level parent.
|
30 |
* Ability to order pages by (date, title, page order).
|
32 |
* Option to always display child pages or categories.
|
33 |
* Option to select the levels of pages or categories to display when always display child is used.
|
34 |
* Option to display or not display categories on single posts.
|
35 |
+
* Ability to display each single post's category in a new widget/block or in same list.
|
36 |
+
|
37 |
+
<h3>Page Menu Options</h3>
|
38 |
+
* Display the highest level parent page.
|
39 |
+
* Display menu when there is only the parent page.
|
40 |
+
* Order pages by (date, title, page order).
|
41 |
+
* Exclude pages.
|
42 |
+
* Always display child Pages.
|
43 |
+
* Levels of child pages to display when always display child pages is checked.
|
44 |
+
|
45 |
+
<h3>Category Menu Options</h3>
|
46 |
+
* Display the highest level parent category.
|
47 |
+
* Display menu when there is only the parent category.
|
48 |
+
* Display categories on single posts.
|
49 |
+
* Display each single post's category in a new widget/block or in same list.
|
50 |
+
* Exclude categories.
|
51 |
+
* Always display child categories.
|
52 |
+
* Levels of Categories to display when always display child categories is checked.
|
|
|
|
|
53 |
|
54 |
<h3>PRO Features</h3>
|
55 |
+
* Navigation menu widget.
|
56 |
+
* Navigation menu Gutenberg block. **NEW**
|
57 |
* Ability to customize each page or navigation menu item link's text.
|
58 |
+
* Click-and-drag styling for page, category, and navigation menus.
|
59 |
* Styling options for links including color, background color, size, hover, and font weight.
|
60 |
* Styling options for different levels of links.
|
61 |
* Styling options for the current page or category.
|
66 |
* Accordion icon style and color selection.
|
67 |
* Accordion option to keep all sections closed until clicked.
|
68 |
* Accordion option to include highest level parent in accordion.
|
69 |
+
* Accordion option to use links for open/close.
|
70 |
* Ability to exclude a page from all menus using a simple checkbox.
|
71 |
+
* Link ordering for the category menus.
|
72 |
* Number of levels of pages to show when "always display child pages" is not checked.
|
73 |
* Ability to select and display custom post types.
|
74 |
* Ability to select and display custom taxonomies.
|
75 |
* Option to display only the current page's parents, grandparents, and children.
|
76 |
* Option to display child page siblings when on a child page (with or without grandchildren available).
|
77 |
+
* Ability to display the menu everywhere the widget area is used (including homepage if applicable).
|
78 |
* Ability to select the highest level parent page/category.
|
79 |
* Ability to select which levels of categories assigned posts will display under.
|
80 |
* Ability to display assigned posts or custom post types under categories or taxonomies.
|
105 |
Manual Installation
|
106 |
|
107 |
1. Upload the `advanced-sidebar-menu` folder to the `/wp-content/plugins/` directory
|
108 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
109 |
+
3. Drag the "Advanced Sidebar - Pages" widget, or the "Advanced Sidebar - Categories" widget into a sidebar.
|
110 |
+
4. Use the block inserter to insert the "Advanced Sidebar - Pages" block, or the "Advanced Sidebar - Categories" block into Gutenberg content.
|
111 |
+
|
112 |
|
113 |
|
114 |
== Screenshots ==
|
115 |
|
116 |
+
1. Page widget options.
|
117 |
+
2. Category widget options.
|
118 |
+
3. Example of a page menu using the 2017 theme and default styles.
|
119 |
+
3. Example of a category menu ordered by title using the 2017 theme and default styles.
|
120 |
|
121 |
|
122 |
== Frequently Asked Questions ==
|
123 |
|
124 |
+
= The menu won't show up?
|
125 |
|
126 |
+
The menu in this plugin are smart enough to not show up on pages or categories where the only thing that would display is the title. While it may appear like the menu is broken, it is actually doing what it is intended to do.
|
127 |
|
128 |
The most common causes for this confusion come from one of these reasons:
|
129 |
+
1. The incorrect menu was selected. Categories have their own widget/block as pages have their own widget/block.
|
130 |
2. "Display the highest level parent page" or "Display the highest level parent category" is not checked.
|
131 |
+
3. The Pages menu is currently not being viewed on a page.
|
132 |
+
4. The Categories menu is not currently being view on a category.
|
133 |
|
134 |
= How do I change the styling of the current page? =
|
135 |
|
158 |
|
159 |
= How do you get the categories to display on single post pages? =
|
160 |
|
161 |
+
The Categories Menu widget/block contains a "Display categories on single posts" checkbox, which will display the category menus based on the categories the current post is assigned to.
|
162 |
|
163 |
= Does the menu change for each page you are on? =
|
164 |
|
166 |
|
167 |
|
168 |
== Changelog ==
|
169 |
+
= 9.0.0 =
|
170 |
+
<a href="https://onpointplugins.com/advanced-sidebar-gutenberg-blocks/">Full release notes</a>.
|
171 |
+
|
172 |
+
* Introduced Gutenberg blocks.
|
173 |
+
* Improved translations.
|
174 |
+
* Improved Elementor support.
|
175 |
+
* Removed all deprecated functionality.
|
176 |
+
* Required PRO version 9.0.0+.
|
177 |
+
* Required WordPress Core 5.8.0+.
|
178 |
+
* Drop support for PHP 5.6 if favor of PHP 7.0+.
|
179 |
+
* Numerous bug fixes.
|
180 |
+
|
181 |
= 8.8.3 =
|
182 |
* Introduced `advanced-sidebar-menu/menus/category/top-level-term-ids` filter.
|
183 |
* Supported PRO version 8.9.2.
|
185 |
= 8.8.2 =
|
186 |
* Fixed widget id generation with block based widgets.
|
187 |
* Introduced `advanced-sidebar-menu/core/include-template-parts-comments` filter.
|
188 |
+
* Organized the `Menu_Abstract` class constants.
|
189 |
* Tested to WordPress Core 6.0.1.
|
190 |
|
191 |
= 8.8.1 =
|
321 |
= 8.0.0 =
|
322 |
Major version update. See <a href="https://onpointplugins.com/advanced-sidebar-menu/advanced-sidebar-menu-version-8-migration-guide/">migration guide</a> if you are extending the plugin's functionality via action, filters, or calling plugin classes.
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
== Upgrade Notice ==
|
325 |
+
= 9.0.0 =
|
326 |
+
Introducing <a href="https://onpointplugins.com/advanced-sidebar-menu/advanced-sidebar-menu-gutenberg-blocks/">Gutenberg blocks</a>.
|
|
|
|
|
|
resources/blocks/category/block.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
3 |
+
"apiVersion": 2,
|
4 |
+
"name": "advanced-sidebar-menu/categories",
|
5 |
+
"title": "Advanced Sidebar - Categories",
|
6 |
+
"category": "widgets",
|
7 |
+
"icon": "welcome-widgets-menus",
|
8 |
+
"description": "Creates a menu of all the categories using the child/parent relationship",
|
9 |
+
"keywords": [
|
10 |
+
"menu",
|
11 |
+
"sidebar",
|
12 |
+
"categories"
|
13 |
+
],
|
14 |
+
"version": "9.0.0",
|
15 |
+
"textdomain": "advanced-sidebar-menu",
|
16 |
+
"editorScript": "file:./js/dist/admin.min.js",
|
17 |
+
"editorStyle": "file:./js/dist/admin.css.js"
|
18 |
+
}
|
resources/blocks/pages/block.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
3 |
+
"apiVersion": 2,
|
4 |
+
"name": "advanced-sidebar-menu/pages",
|
5 |
+
"title": "Advanced Sidebar - Pages",
|
6 |
+
"category": "widgets",
|
7 |
+
"icon": "welcome-widgets-menus",
|
8 |
+
"description": "Creates a menu of all the pages using the child/parent relationship",
|
9 |
+
"keywords": [
|
10 |
+
"menu",
|
11 |
+
"sidebar",
|
12 |
+
"pages"
|
13 |
+
],
|
14 |
+
"version": "9.0.0",
|
15 |
+
"textdomain": "advanced-sidebar-menu",
|
16 |
+
"editorScript": "file:./js/dist/admin.min.js",
|
17 |
+
"editorStyle": "file:./js/dist/admin.css.js"
|
18 |
+
}
|
resources/css/advanced-sidebar-menu.css
CHANGED
@@ -34,7 +34,8 @@
|
|
34 |
}
|
35 |
|
36 |
.advanced-sidebar-menu-column-box select,
|
37 |
-
.advanced-sidebar-menu-column-box input
|
|
|
38 |
background: #fff !important;
|
39 |
}
|
40 |
|
@@ -69,7 +70,6 @@
|
|
69 |
font-weight: 600 !important;
|
70 |
box-shadow: none;
|
71 |
color: #000;
|
72 |
-
!important;
|
73 |
}
|
74 |
|
75 |
.advanced-sidebar-info-panel ol {
|
34 |
}
|
35 |
|
36 |
.advanced-sidebar-menu-column-box select,
|
37 |
+
.advanced-sidebar-menu-column-box input[type='number'],
|
38 |
+
.advanced-sidebar-menu-column-box input[type='text'] {
|
39 |
background: #fff !important;
|
40 |
}
|
41 |
|
70 |
font-weight: 600 !important;
|
71 |
box-shadow: none;
|
72 |
color: #000;
|
|
|
73 |
}
|
74 |
|
75 |
.advanced-sidebar-info-panel ol {
|
src/Blocks/Block_Abstract.php
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
use Advanced_Sidebar_Menu\Scripts;
|
7 |
+
use Advanced_Sidebar_Menu\Utils;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Functionality shared by and required by all blocks.
|
11 |
+
*
|
12 |
+
* @since 9.0.0
|
13 |
+
*/
|
14 |
+
abstract class Block_Abstract {
|
15 |
+
const NAME = 'block-abstract';
|
16 |
+
|
17 |
+
const RENDER_REQUEST = 'isServerSideRenderRequest';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Widget arguments used in rendering.
|
21 |
+
*
|
22 |
+
* 1. Values are passed down through filters if used in a widget area.
|
23 |
+
* 2. We append the block wrap to `before_widget` before use to include
|
24 |
+
* styles and other HTML attributes in the output.
|
25 |
+
*
|
26 |
+
* @var string[]
|
27 |
+
*/
|
28 |
+
protected $widget_args = [
|
29 |
+
'before_widget' => '',
|
30 |
+
'after_widget' => '',
|
31 |
+
// Default used for FSE.
|
32 |
+
'before_title' => '<h2 class="advanced-sidebar-menu-title">',
|
33 |
+
'after_title' => '</h2>',
|
34 |
+
];
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get list of attributes and their types.
|
39 |
+
*
|
40 |
+
* Must be done PHP side because we're using ServerSideRender.
|
41 |
+
*
|
42 |
+
* @see Pro_Block_Abstract::get_all_attributes()
|
43 |
+
*
|
44 |
+
* @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
abstract protected function get_attributes();
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get featured this block supports.
|
53 |
+
*
|
54 |
+
* Done on the PHP side, so we can easily add additional features
|
55 |
+
* via the PRO version.
|
56 |
+
*
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
abstract protected function get_block_support();
|
60 |
+
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Get list of words used to search for the block.
|
64 |
+
*
|
65 |
+
* @return string[]
|
66 |
+
*/
|
67 |
+
abstract protected function get_keywords();
|
68 |
+
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Get the description of this block.
|
72 |
+
*
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
abstract protected function get_description();
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get the widget class, which matches this block.
|
80 |
+
*/
|
81 |
+
abstract protected function get_widget_class();
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Actions and filters.
|
86 |
+
*
|
87 |
+
* @return void
|
88 |
+
*/
|
89 |
+
public function hook() {
|
90 |
+
add_action( 'init', [ $this, 'register' ] );
|
91 |
+
add_filter( 'advanced-sidebar-menu/scripts/js-config', [ $this, 'js_config' ] );
|
92 |
+
add_filter( 'widget_display_callback', [ $this, 'short_circuit_widget_blocks' ], 10, 3 );
|
93 |
+
add_filter( 'widget_types_to_hide_from_legacy_widget_block', [ $this, 'exclude_from_legacy_widgets' ] );
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Exclude this block from new Legacy Widgets.
|
99 |
+
*
|
100 |
+
* Leave existing intact while forcing users to use the block
|
101 |
+
* instead for new Widgets.
|
102 |
+
*
|
103 |
+
* @param array $blocks - Excluded blocks.
|
104 |
+
*
|
105 |
+
* @action
|
106 |
+
*
|
107 |
+
* @return array
|
108 |
+
*/
|
109 |
+
public function exclude_from_legacy_widgets( $blocks ) {
|
110 |
+
/**
|
111 |
+
* Programmatically opt in to exclude legacy widgets from the Block Inserter
|
112 |
+
* if legacy widgets a not needed to match a theme's styles.
|
113 |
+
*
|
114 |
+
* In the future, this filter will be removed in favor of not allowing new legacy
|
115 |
+
* widgets in the block inserter.
|
116 |
+
*
|
117 |
+
* @link https://developer.wordpress.org/block-editor/how-to-guides/widgets/legacy-widget-block/#3-hide-the-widget-from-the-legacy-widget-block
|
118 |
+
*/
|
119 |
+
if ( ! apply_filters( 'advanced-sidebar-menu/block-abstract/exclude-legacy-widgets', false, $this->get_widget_class(), $blocks, $this ) ) {
|
120 |
+
return $blocks;
|
121 |
+
}
|
122 |
+
|
123 |
+
$widget = $this->get_widget_class();
|
124 |
+
$blocks[] = $widget::NAME;
|
125 |
+
return $blocks;
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Store the widget arguments, so we send the appropriate wraps to the
|
131 |
+
* render of the menu.
|
132 |
+
*
|
133 |
+
* Using a block in widgets will wrap the contents of block
|
134 |
+
* in a `<section>` tag, regardless of the content within.
|
135 |
+
* We mimic the functionality of the inner echo while excluding
|
136 |
+
* the calls to output the wrap.
|
137 |
+
*
|
138 |
+
* @param bool|array $instance - Contents of the block, before parsing.
|
139 |
+
* @param \WP_Widget $widget - Object representing a block based widget.
|
140 |
+
* @param array $args - Widget area arguments.
|
141 |
+
*
|
142 |
+
* @return false|array
|
143 |
+
*/
|
144 |
+
public function short_circuit_widget_blocks( $instance, $widget, array $args ) {
|
145 |
+
if ( ! \is_array( $instance ) || empty( $instance['content'] ) || strpos( $instance['content'], static::NAME ) === false ) {
|
146 |
+
return $instance;
|
147 |
+
}
|
148 |
+
|
149 |
+
// Pass on the widget arguments.
|
150 |
+
$this->widget_args = $args;
|
151 |
+
|
152 |
+
echo apply_filters( 'widget_block_content', $instance['content'], $instance, $widget, $args ); //phpcs:ignore
|
153 |
+
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Register the block.
|
160 |
+
*
|
161 |
+
* @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/
|
162 |
+
*
|
163 |
+
* @see Pro_Block_Abstract::register()
|
164 |
+
*
|
165 |
+
* @action init 10 0
|
166 |
+
*
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
public function register() {
|
170 |
+
register_block_type( static::NAME,
|
171 |
+
apply_filters( 'advanced-sidebar-menu/block-register/' . static::NAME, [
|
172 |
+
'api_version' => 2,
|
173 |
+
'attributes' => $this->get_all_attributes(),
|
174 |
+
'description' => $this->get_description(),
|
175 |
+
'editor_script' => Scripts::GUTENBERG_HANDLE,
|
176 |
+
'editor_style' => Scripts::GUTENBERG_CSS_HANDLE,
|
177 |
+
'keywords' => $this->get_keywords(),
|
178 |
+
'render_callback' => [ $this, 'render' ],
|
179 |
+
'supports' => $this->get_block_support(),
|
180 |
+
] ) );
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Get attributes defined in this class as well
|
186 |
+
* as common attributes shared by all blocks.
|
187 |
+
*
|
188 |
+
* @return array
|
189 |
+
*/
|
190 |
+
protected function get_all_attributes() {
|
191 |
+
return \array_merge( [
|
192 |
+
'clientId' => [
|
193 |
+
'type' => 'string',
|
194 |
+
],
|
195 |
+
self::RENDER_REQUEST => [
|
196 |
+
'type' => 'boolean',
|
197 |
+
],
|
198 |
+
'sidebarId' => [
|
199 |
+
'type' => 'string',
|
200 |
+
],
|
201 |
+
'style' => [
|
202 |
+
'type' => 'object',
|
203 |
+
],
|
204 |
+
Menu_Abstract::TITLE => [
|
205 |
+
'type' => 'string',
|
206 |
+
],
|
207 |
+
], $this->get_attributes() );
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Include this block's id and attributes in the JS config.
|
213 |
+
*
|
214 |
+
* @param array $config - JS config in current state.
|
215 |
+
*
|
216 |
+
* @filter advanced-sidebar-menu/pro-scripts/js-config
|
217 |
+
*
|
218 |
+
* @return array
|
219 |
+
*/
|
220 |
+
public function js_config( array $config ) {
|
221 |
+
$config['blocks'][ \explode( '/', static::NAME )[1] ] = [
|
222 |
+
'id' => static::NAME,
|
223 |
+
];
|
224 |
+
|
225 |
+
return $config;
|
226 |
+
}
|
227 |
+
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Checkboxes are saved as `true` on the Gutenberg side.
|
231 |
+
* The widgets expect the values to be `checked`.
|
232 |
+
*
|
233 |
+
* @param array $attr - Attribute values pre-converted.
|
234 |
+
*
|
235 |
+
* @return array
|
236 |
+
*/
|
237 |
+
public function convert_checkbox_values( array $attr ) {
|
238 |
+
// Map the boolean values to widget style 'checked'.
|
239 |
+
return Utils::instance()->array_map_recursive( function( $value ) {
|
240 |
+
if ( true === $value ) {
|
241 |
+
return 'checked';
|
242 |
+
}
|
243 |
+
return $value;
|
244 |
+
}, $attr );
|
245 |
+
}
|
246 |
+
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Render the block template via ServerSideRender.
|
250 |
+
*
|
251 |
+
* @param array $attr - Block attributes matching widget settings.
|
252 |
+
*
|
253 |
+
* @return string
|
254 |
+
*/
|
255 |
+
public function render( $attr ) {
|
256 |
+
// @todo Remove early 2022.
|
257 |
+
if ( ! function_exists( 'get_block_wrapper_attributes' ) ) {
|
258 |
+
return __( 'This block requires WordPress version 5.6!', 'advanced-sidebar-menu' );
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Within the Editor ServerSideRender request come in as REST requests.
|
263 |
+
* We spoof the WP_Query as much as required to get the menus to
|
264 |
+
* display the same way they will on the front-end.
|
265 |
+
*/
|
266 |
+
if ( defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $attr[ self::RENDER_REQUEST ] ) ) {
|
267 |
+
if ( ! empty( get_post() ) ) {
|
268 |
+
add_action( 'advanced-sidebar-menu/widget/before-render', function( $menu ) {
|
269 |
+
if ( method_exists( $menu, 'set_current_post' ) ) {
|
270 |
+
$menu->set_current_post( get_post() );
|
271 |
+
}
|
272 |
+
} );
|
273 |
+
add_filter( 'advanced-sidebar-menu/core/include-template-parts-comments', '__return_false' );
|
274 |
+
$GLOBALS['wp_query']->queried_object = get_post();
|
275 |
+
$GLOBALS['wp_query']->queried_object_id = get_the_ID();
|
276 |
+
$GLOBALS['wp_query']->is_singular = true;
|
277 |
+
if ( get_post_type() === 'page' ) {
|
278 |
+
$GLOBALS['wp_query']->is_page = true;
|
279 |
+
} else {
|
280 |
+
$GLOBALS['wp_query']->is_single = true;
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
// Use the sidebar arguments if available.
|
285 |
+
if ( ! empty( $attr['sidebarId'] ) && ! empty( $GLOBALS['wp_registered_sidebars'][ $attr['sidebarId'] ] ) ) {
|
286 |
+
$this->widget_args = wp_parse_args( $GLOBALS['wp_registered_sidebars'][ $attr['sidebarId'] ], $this->widget_args );
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
$classnames = 'advanced-sidebar-menu';
|
291 |
+
if ( ! empty( $attr['block_style'] ) ) {
|
292 |
+
$classnames .= ' advanced-sidebar-blocked-style';
|
293 |
+
}
|
294 |
+
|
295 |
+
// Widgets already have a `<section>` wrap.
|
296 |
+
$wrap = empty( $this->widget_args['before_widget'] ) ? 'section' : 'div';
|
297 |
+
$wrapper_attributes = get_block_wrapper_attributes( [
|
298 |
+
'class' => \trim( esc_attr( $classnames ) ),
|
299 |
+
] );
|
300 |
+
$this->widget_args['before_widget'] .= sprintf( '<%s %s>', $wrap, $wrapper_attributes );
|
301 |
+
$this->widget_args['after_widget'] = sprintf( '</%s>', $wrap ) . $this->widget_args['after_widget'];
|
302 |
+
// Passed via ServerSideRender, so we can enable accordions in Gutenberg editor.
|
303 |
+
if ( ! empty( $attr['clientId'] ) ) {
|
304 |
+
$this->widget_args['widget_id'] = $attr['clientId'];
|
305 |
+
}
|
306 |
+
|
307 |
+
ob_start();
|
308 |
+
$widget = $this->get_widget_class();
|
309 |
+
$widget->widget( $this->widget_args, $this->convert_checkbox_values( $attr ) );
|
310 |
+
return ob_get_clean();
|
311 |
+
}
|
312 |
+
|
313 |
+
}
|
src/Blocks/Categories.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Advanced_Sidebar_Menu\Blocks;
|
4 |
+
|
5 |
+
use Advanced_Sidebar_Menu\Traits\Singleton;
|
6 |
+
use Advanced_Sidebar_Menu\Widget\Category;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Advanced Sidebar - Categories, Gutenberg block.
|
10 |
+
*
|
11 |
+
* @since 9.0.0
|
12 |
+
*/
|
13 |
+
class Categories extends Block_Abstract {
|
14 |
+
use Singleton;
|
15 |
+
|
16 |
+
const NAME = 'advanced-sidebar-menu/categories';
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get the description of this block.
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
protected function get_description() {
|
25 |
+
return __( 'Creates a menu of all the categories using the child/parent relationship',
|
26 |
+
'advanced-sidebar-menu' );
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get featured this block supports.
|
32 |
+
*
|
33 |
+
* Done on the PHP side, so we can easily add additional features
|
34 |
+
* via the PRO version.
|
35 |
+
*
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
protected function get_block_support() {
|
39 |
+
return apply_filters( 'advanced-sidebar-menu/blocks/categories/supports', [
|
40 |
+
'anchor' => true,
|
41 |
+
] );
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get list of words used to search for the block.
|
47 |
+
*
|
48 |
+
* English and translated so both will be searchable.
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function get_keywords() {
|
53 |
+
$category = get_taxonomy( 'category' );
|
54 |
+
|
55 |
+
return [
|
56 |
+
'Advanced Sidebar',
|
57 |
+
'menu',
|
58 |
+
'sidebar',
|
59 |
+
'category',
|
60 |
+
'categories',
|
61 |
+
'taxonomy',
|
62 |
+
'term',
|
63 |
+
$category ? $category->labels->name : '',
|
64 |
+
$category ? $category->labels->singular_name : '',
|
65 |
+
__( 'menu', 'advanced-sidebar-menu' ),
|
66 |
+
__( 'sidebar', 'advanced-sidebar-menu' ),
|
67 |
+
__( 'taxonomy', 'advanced-sidebar-menu' ),
|
68 |
+
__( 'term', 'advanced-sidebar-menu' ),
|
69 |
+
];
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get list of attributes and their types.
|
75 |
+
*
|
76 |
+
* Must be done PHP side because we're using ServerSideRender
|
77 |
+
*
|
78 |
+
* @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
protected function get_attributes() {
|
83 |
+
return apply_filters( 'advanced-sidebar-menu/blocks/categories/attributes', [
|
84 |
+
Category::INCLUDE_PARENT => [
|
85 |
+
'type' => 'boolean',
|
86 |
+
],
|
87 |
+
Category::INCLUDE_CHILDLESS_PARENT => [
|
88 |
+
'type' => 'boolean',
|
89 |
+
],
|
90 |
+
Category::EXCLUDE => [
|
91 |
+
'type' => 'string',
|
92 |
+
],
|
93 |
+
Category::DISPLAY_ALL => [
|
94 |
+
'type' => 'boolean',
|
95 |
+
],
|
96 |
+
Category::DISPLAY_ON_SINGLE => [
|
97 |
+
'type' => 'boolean',
|
98 |
+
'default' => true,
|
99 |
+
],
|
100 |
+
// No block option available. We only support 'list'.
|
101 |
+
Category::EACH_CATEGORY_DISPLAY => [
|
102 |
+
'type' => 'string',
|
103 |
+
'default' => \Advanced_Sidebar_Menu\Menus\Category::EACH_LIST,
|
104 |
+
],
|
105 |
+
Category::LEVELS => [
|
106 |
+
'type' => 'number',
|
107 |
+
'default' => 100,
|
108 |
+
],
|
109 |
+
] );
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Return a new instance of the Page widget.
|
115 |
+
*
|
116 |
+
* @return Category
|
117 |
+
*/
|
118 |
+
protected function get_widget_class() {
|
119 |
+
return new Category();
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
src/Blocks/Pages.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Advanced_Sidebar_Menu\Blocks;
|
4 |
+
|
5 |
+
use Advanced_Sidebar_Menu\Traits\Singleton;
|
6 |
+
use Advanced_Sidebar_Menu\Widget\Page;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Advanced Sidebar - Pages, Gutenberg block.
|
10 |
+
*
|
11 |
+
* @since 9.0.0
|
12 |
+
*/
|
13 |
+
class Pages extends Block_Abstract {
|
14 |
+
use Singleton;
|
15 |
+
|
16 |
+
const NAME = 'advanced-sidebar-menu/pages';
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get the description of this block.
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
protected function get_description() {
|
25 |
+
return __( 'Creates a menu of all the categories using the child/parent relationship',
|
26 |
+
'advanced-sidebar-menu' );
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get featured this block supports.
|
32 |
+
*
|
33 |
+
* Done on the PHP side, so we can easily add additional features
|
34 |
+
* via the PRO version.
|
35 |
+
*
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
protected function get_block_support() {
|
39 |
+
return apply_filters( 'advanced-sidebar-menu/blocks/pages/supports', [
|
40 |
+
'anchor' => true,
|
41 |
+
] );
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get list of words used to search for the block.
|
47 |
+
*
|
48 |
+
* English and translated so both will be searchable.
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function get_keywords() {
|
53 |
+
return [
|
54 |
+
'Advanced Sidebar',
|
55 |
+
'menu',
|
56 |
+
'sidebar',
|
57 |
+
'pages',
|
58 |
+
__( 'menu', 'advanced-sidebar-menu' ),
|
59 |
+
__( 'sidebar', 'advanced-sidebar-menu' ),
|
60 |
+
__( 'pages', 'advanced-sidebar-menu' ),
|
61 |
+
];
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get list of attributes and their types.
|
67 |
+
*
|
68 |
+
* Must be done PHP side because we're using ServerSideRender
|
69 |
+
*
|
70 |
+
* @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/
|
71 |
+
*
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
protected function get_attributes() {
|
75 |
+
return apply_filters( 'advanced-sidebar-menu/blocks/pages/attributes', [
|
76 |
+
Page::INCLUDE_PARENT => [
|
77 |
+
'type' => 'boolean',
|
78 |
+
],
|
79 |
+
Page::INCLUDE_CHILDLESS_PARENT => [
|
80 |
+
'type' => 'boolean',
|
81 |
+
],
|
82 |
+
Page::ORDER_BY => [
|
83 |
+
'type' => 'string',
|
84 |
+
'default' => 'menu_order',
|
85 |
+
],
|
86 |
+
Page::EXCLUDE => [
|
87 |
+
'type' => 'string',
|
88 |
+
'default' => '',
|
89 |
+
],
|
90 |
+
Page::DISPLAY_ALL => [
|
91 |
+
'type' => 'boolean',
|
92 |
+
],
|
93 |
+
Page::LEVELS => [
|
94 |
+
'type' => 'number',
|
95 |
+
'default' => 100,
|
96 |
+
],
|
97 |
+
] );
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Return a new instance of the Page widget.
|
103 |
+
*
|
104 |
+
* @return Page
|
105 |
+
*/
|
106 |
+
protected function get_widget_class() {
|
107 |
+
return new Page();
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
src/Core.php
CHANGED
@@ -23,6 +23,49 @@ class Core {
|
|
23 |
*/
|
24 |
protected function hook() {
|
25 |
add_action( 'widgets_init', [ $this, 'register_widgets' ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
|
23 |
*/
|
24 |
protected function hook() {
|
25 |
add_action( 'widgets_init', [ $this, 'register_widgets' ] );
|
26 |
+
add_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'widget_documentation' ], 99, 2 );
|
27 |
+
add_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'widget_documentation' ], 99, 2 );
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Display a link to a widget's documentation.
|
33 |
+
*
|
34 |
+
* @param array $_ - Widget settings.
|
35 |
+
* @param \WP_Widget $widget - Widget class.
|
36 |
+
*
|
37 |
+
* @since 9.0.0
|
38 |
+
*
|
39 |
+
* @return void
|
40 |
+
*/
|
41 |
+
public function widget_documentation( $_, \WP_Widget $widget ) {
|
42 |
+
?>
|
43 |
+
<p class="advanced-sidebar-widget-documentation">
|
44 |
+
<a
|
45 |
+
href="<?php echo esc_url( $this->get_documentation_url( $widget->id_base ) ); ?>"
|
46 |
+
target="_blank"
|
47 |
+
rel="noopener noreferrer"
|
48 |
+
>
|
49 |
+
<?php esc_html_e( 'widget documentation', 'advanced-sidebar-menu' ); ?>
|
50 |
+
</a>
|
51 |
+
</p>
|
52 |
+
<?php
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Get the URL of a widget's documentation.
|
58 |
+
*
|
59 |
+
* @param string $widget_id - ID of the widget.
|
60 |
+
*
|
61 |
+
* @since 9.0.0
|
62 |
+
*
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function get_documentation_url( $widget_id ) {
|
66 |
+
$url = Category::NAME === $widget_id ? 'https://onpointplugins.com/advanced-sidebar-menu/basic-usage/advanced-sidebar-menu-categories/' : 'https://onpointplugins.com/advanced-sidebar-menu/basic-usage/advanced-sidebar-menu-pages/';
|
67 |
+
|
68 |
+
return apply_filters( 'advanced-sidebar-menu/widget-docs/url', $url, $widget_id );
|
69 |
}
|
70 |
|
71 |
|
src/List_Pages.php
CHANGED
@@ -317,7 +317,7 @@ class List_Pages {
|
|
317 |
$cache->add_child_pages( $this, $child_pages );
|
318 |
}
|
319 |
|
320 |
-
$child_pages = array_map( 'get_post', (array) $child_pages );
|
321 |
|
322 |
if ( $is_first_level ) {
|
323 |
return apply_filters( 'advanced-sidebar-menu/list-pages/first-level-child-pages', $child_pages, $this, $this->menu );
|
317 |
$cache->add_child_pages( $this, $child_pages );
|
318 |
}
|
319 |
|
320 |
+
$child_pages = \array_map( 'get_post', (array) $child_pages );
|
321 |
|
322 |
if ( $is_first_level ) {
|
323 |
return apply_filters( 'advanced-sidebar-menu/list-pages/first-level-child-pages', $child_pages, $this, $this->menu );
|
src/Menus/Category.php
CHANGED
@@ -20,6 +20,9 @@ class Category extends Menu_Abstract {
|
|
20 |
const DISPLAY_ON_SINGLE = 'single';
|
21 |
const EACH_CATEGORY_DISPLAY = 'new_widget';
|
22 |
|
|
|
|
|
|
|
23 |
/**
|
24 |
* Top_level_term.
|
25 |
*
|
@@ -109,6 +112,10 @@ class Category extends Menu_Abstract {
|
|
109 |
$ancestors[] = $term_ancestors;
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
112 |
return \array_merge( ...$ancestors );
|
113 |
}, __METHOD__, [] );
|
114 |
}
|
@@ -151,7 +158,7 @@ class Category extends Menu_Abstract {
|
|
151 |
|
152 |
|
153 |
/**
|
154 |
-
* Gets the number of levels
|
155 |
*
|
156 |
* @return int
|
157 |
*/
|
@@ -167,17 +174,17 @@ class Category extends Menu_Abstract {
|
|
167 |
|
168 |
/**
|
169 |
* Get the top-level terms for the current page.
|
170 |
-
*
|
171 |
-
*
|
172 |
*
|
173 |
* @return \WP_Term[]
|
174 |
*/
|
175 |
public function get_top_level_terms() {
|
176 |
-
$
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
$top_level_term_ids = apply_filters( 'advanced-sidebar-menu/menus/category/top-level-term-ids', $top_level_term_ids, $this->args, $this->instance, $this );
|
182 |
|
183 |
$terms = [];
|
@@ -208,7 +215,7 @@ class Category extends Menu_Abstract {
|
|
208 |
*/
|
209 |
public function get_included_term_ids() {
|
210 |
$term_ids = [];
|
211 |
-
if (
|
212 |
$term_ids = wp_get_object_terms( get_the_ID(), $this->get_taxonomy(), [ 'fields' => 'ids' ] );
|
213 |
} elseif ( $this->is_tax() ) {
|
214 |
$term_ids[] = get_queried_object()->term_id;
|
@@ -270,7 +277,7 @@ class Category extends Menu_Abstract {
|
|
270 |
*/
|
271 |
public function is_displayed() {
|
272 |
$display = false;
|
273 |
-
if (
|
274 |
if ( $this->checked( self::DISPLAY_ON_SINGLE ) ) {
|
275 |
$display = true;
|
276 |
}
|
@@ -496,7 +503,25 @@ class Category extends Menu_Abstract {
|
|
496 |
|
497 |
|
498 |
/**
|
499 |
-
* Render the widget output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
*
|
501 |
* @return void
|
502 |
*/
|
@@ -509,6 +534,7 @@ class Category extends Menu_Abstract {
|
|
509 |
|
510 |
$menu_open = false;
|
511 |
$close_menu = false;
|
|
|
512 |
|
513 |
foreach ( $this->get_top_level_terms() as $_cat ) {
|
514 |
$this->set_current_top_level_term( $_cat );
|
@@ -516,9 +542,8 @@ class Category extends Menu_Abstract {
|
|
516 |
continue;
|
517 |
}
|
518 |
|
519 |
-
if ( ! $menu_open || (
|
520 |
-
//phpcs:
|
521 |
-
echo $this->args['before_widget'];
|
522 |
|
523 |
do_action( 'advanced-sidebar-menu/menus/category/render', $this );
|
524 |
|
@@ -528,27 +553,50 @@ class Category extends Menu_Abstract {
|
|
528 |
|
529 |
$menu_open = true;
|
530 |
$close_menu = true;
|
531 |
-
if (
|
532 |
$close_menu = false;
|
533 |
}
|
534 |
}
|
535 |
}
|
536 |
|
537 |
-
$
|
538 |
|
539 |
-
|
540 |
|
541 |
if ( $close_menu ) {
|
542 |
-
|
543 |
-
|
544 |
}
|
545 |
}
|
546 |
|
547 |
if ( ! $close_menu && $menu_open ) {
|
548 |
-
|
549 |
-
echo $this->args['after_widget'];
|
550 |
}
|
551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
}
|
553 |
|
554 |
}
|
20 |
const DISPLAY_ON_SINGLE = 'single';
|
21 |
const EACH_CATEGORY_DISPLAY = 'new_widget';
|
22 |
|
23 |
+
const EACH_LIST = 'list';
|
24 |
+
const EACH_WIDGET = 'widget';
|
25 |
+
|
26 |
/**
|
27 |
* Top_level_term.
|
28 |
*
|
112 |
$ancestors[] = $term_ancestors;
|
113 |
}
|
114 |
|
115 |
+
if ( empty( $ancestors ) ) {
|
116 |
+
return [];
|
117 |
+
}
|
118 |
+
|
119 |
return \array_merge( ...$ancestors );
|
120 |
}, __METHOD__, [] );
|
121 |
}
|
158 |
|
159 |
|
160 |
/**
|
161 |
+
* Gets the number of levels to display when using "Always display child categories".
|
162 |
*
|
163 |
* @return int
|
164 |
*/
|
174 |
|
175 |
/**
|
176 |
* Get the top-level terms for the current page.
|
177 |
+
* Could be multiple if on a single.
|
178 |
+
* This will be one if on an archive.
|
179 |
*
|
180 |
* @return \WP_Term[]
|
181 |
*/
|
182 |
public function get_top_level_terms() {
|
183 |
+
$top_level_term_ids = \array_filter( \array_map( function( $term_id ) {
|
184 |
+
$top = $this->get_highest_parent( $term_id );
|
185 |
+
return $this->is_excluded( $top ) ? null : $top;
|
186 |
+
}, $this->get_included_term_ids() ) );
|
187 |
+
|
188 |
$top_level_term_ids = apply_filters( 'advanced-sidebar-menu/menus/category/top-level-term-ids', $top_level_term_ids, $this->args, $this->instance, $this );
|
189 |
|
190 |
$terms = [];
|
215 |
*/
|
216 |
public function get_included_term_ids() {
|
217 |
$term_ids = [];
|
218 |
+
if ( is_singular() ) {
|
219 |
$term_ids = wp_get_object_terms( get_the_ID(), $this->get_taxonomy(), [ 'fields' => 'ids' ] );
|
220 |
} elseif ( $this->is_tax() ) {
|
221 |
$term_ids[] = get_queried_object()->term_id;
|
277 |
*/
|
278 |
public function is_displayed() {
|
279 |
$display = false;
|
280 |
+
if ( is_singular() ) {
|
281 |
if ( $this->checked( self::DISPLAY_ON_SINGLE ) ) {
|
282 |
$display = true;
|
283 |
}
|
503 |
|
504 |
|
505 |
/**
|
506 |
+
* Render the widget output.
|
507 |
+
*
|
508 |
+
* @example Display singe post categories in a new widget.
|
509 |
+
* ```html
|
510 |
+
* <div>
|
511 |
+
* <ul />
|
512 |
+
* </div>
|
513 |
+
* <div>
|
514 |
+
* <ul />
|
515 |
+
* </div>
|
516 |
+
* ```
|
517 |
+
*
|
518 |
+
* @example Display singe post categories in another list.
|
519 |
+
* ```html
|
520 |
+
* <div>
|
521 |
+
* <ul />
|
522 |
+
* <ul />
|
523 |
+
* </div>
|
524 |
+
* ```
|
525 |
*
|
526 |
* @return void
|
527 |
*/
|
534 |
|
535 |
$menu_open = false;
|
536 |
$close_menu = false;
|
537 |
+
$output = '';
|
538 |
|
539 |
foreach ( $this->get_top_level_terms() as $_cat ) {
|
540 |
$this->set_current_top_level_term( $_cat );
|
542 |
continue;
|
543 |
}
|
544 |
|
545 |
+
if ( ! $menu_open || ( static::EACH_WIDGET === $this->instance[ self::EACH_CATEGORY_DISPLAY ] ) ) {
|
546 |
+
echo $this->args['before_widget']; //phpcs:ignore
|
|
|
547 |
|
548 |
do_action( 'advanced-sidebar-menu/menus/category/render', $this );
|
549 |
|
553 |
|
554 |
$menu_open = true;
|
555 |
$close_menu = true;
|
556 |
+
if ( static::EACH_LIST === $this->instance[ self::EACH_CATEGORY_DISPLAY ] ) {
|
557 |
$close_menu = false;
|
558 |
}
|
559 |
}
|
560 |
}
|
561 |
|
562 |
+
$view = require Core::instance()->get_template_part( 'category_list.php' );
|
563 |
|
564 |
+
$output .= apply_filters( 'advanced-sidebar-menu/menus/category/output', $view, $this->args, $this->instance, $this );
|
565 |
|
566 |
if ( $close_menu ) {
|
567 |
+
$this->close_menu( $output );
|
568 |
+
$output = '';
|
569 |
}
|
570 |
}
|
571 |
|
572 |
if ( ! $close_menu && $menu_open ) {
|
573 |
+
$this->close_menu( $output );
|
|
|
574 |
}
|
575 |
+
}
|
576 |
+
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Close the menu after applying final filters.
|
580 |
+
*
|
581 |
+
* Either we wrap each list when display each category in a
|
582 |
+
* new widget, or we wrap all lists when displaying each
|
583 |
+
* category in another list.
|
584 |
+
*
|
585 |
+
* The `advanced-sidebar-menu/menus/category/close-menu` filter lets
|
586 |
+
* us target the inner content of each `<div>`.
|
587 |
+
*
|
588 |
+
* @param string $output - Contents of the widget `<div>`.
|
589 |
+
*
|
590 |
+
* @since 9.0.0
|
591 |
+
*
|
592 |
+
* @return void
|
593 |
+
*/
|
594 |
+
protected function close_menu( $output ) {
|
595 |
+
//phpcs:disable WordPress.Security.EscapeOutput
|
596 |
+
echo apply_filters( 'advanced-sidebar-menu/menus/category/close-menu', $output, $this->args, $this->instance, $this );
|
597 |
+
do_action( 'advanced-sidebar-menu/menus/category/render/after', $this );
|
598 |
+
echo $this->args['after_widget'];
|
599 |
+
//phpcs:enable WordPress.Security.EscapeOutput
|
600 |
}
|
601 |
|
602 |
}
|
src/Menus/Menu_Abstract.php
CHANGED
@@ -132,8 +132,14 @@ abstract class Menu_Abstract {
|
|
132 |
// Block widgets loaded via the REST API don't have full widget args.
|
133 |
if ( ! isset( $this->args['widget_id'] ) ) {
|
134 |
// Prefix any leading digits or hyphens with '_'.
|
135 |
-
$this->args['widget_id'] = \preg_replace( '/^([\d-])/', '_$1', wp_hash(
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
|
|
137 |
if ( \in_array( $this->args['widget_id'], self::$unique_widget_ids, true ) ) {
|
138 |
$suffix = 2;
|
139 |
do {
|
@@ -221,14 +227,17 @@ abstract class Menu_Abstract {
|
|
221 |
* @return array
|
222 |
*/
|
223 |
public function get_excluded_ids() {
|
|
|
|
|
|
|
224 |
return \array_map( 'intval', \array_filter( \explode( ',', $this->instance[ self::EXCLUDE ] ), 'is_numeric' ) );
|
225 |
}
|
226 |
|
227 |
|
228 |
/**
|
229 |
-
* Echos the title of the widget to the page
|
230 |
*
|
231 |
-
* @
|
232 |
*/
|
233 |
public function title() {
|
234 |
if ( ! empty( $this->instance[ self::TITLE ] ) ) {
|
132 |
// Block widgets loaded via the REST API don't have full widget args.
|
133 |
if ( ! isset( $this->args['widget_id'] ) ) {
|
134 |
// Prefix any leading digits or hyphens with '_'.
|
135 |
+
$this->args['widget_id'] = \preg_replace( '/^([\d-])/', '_$1', wp_hash( wp_json_encode( $this->instance ) ) );
|
136 |
+
} elseif ( ! empty( $_POST ) ) { //phpcs:ignore
|
137 |
+
// Page builders send one widget at a time, so we use their settings
|
138 |
+
// to differentiate between multiple widgets of the same type.
|
139 |
+
// Page builders send `POST` when updating preview.
|
140 |
+
$this->args['widget_id'] .= wp_hash( wp_json_encode( $this->instance ) );
|
141 |
}
|
142 |
+
|
143 |
if ( \in_array( $this->args['widget_id'], self::$unique_widget_ids, true ) ) {
|
144 |
$suffix = 2;
|
145 |
do {
|
227 |
* @return array
|
228 |
*/
|
229 |
public function get_excluded_ids() {
|
230 |
+
if ( empty( $this->instance[ self::EXCLUDE ] ) ) {
|
231 |
+
return [];
|
232 |
+
}
|
233 |
return \array_map( 'intval', \array_filter( \explode( ',', $this->instance[ self::EXCLUDE ] ), 'is_numeric' ) );
|
234 |
}
|
235 |
|
236 |
|
237 |
/**
|
238 |
+
* Echos the title of the widget to the page.
|
239 |
*
|
240 |
+
* @return void
|
241 |
*/
|
242 |
public function title() {
|
243 |
if ( ! empty( $this->instance[ self::TITLE ] ) ) {
|
src/Menus/Page.php
CHANGED
@@ -101,7 +101,7 @@ class Page extends Menu_Abstract {
|
|
101 |
public function is_displayed() {
|
102 |
$display = false;
|
103 |
$post_type = $this->get_post_type();
|
104 |
-
if ( is_page() || (
|
105 |
// If we are on the correct post type.
|
106 |
if ( get_post_type( $this->get_top_parent_id() ) === $post_type ) {
|
107 |
// If we have children.
|
@@ -135,7 +135,7 @@ class Page extends Menu_Abstract {
|
|
135 |
|
136 |
|
137 |
/**
|
138 |
-
* Gets the number of levels
|
139 |
*
|
140 |
* @return int
|
141 |
*/
|
101 |
public function is_displayed() {
|
102 |
$display = false;
|
103 |
$post_type = $this->get_post_type();
|
104 |
+
if ( is_page() || ( is_singular() && $post_type === $this->get_current_post()->post_type ) ) {
|
105 |
// If we are on the correct post type.
|
106 |
if ( get_post_type( $this->get_top_parent_id() ) === $post_type ) {
|
107 |
// If we have children.
|
135 |
|
136 |
|
137 |
/**
|
138 |
+
* Gets the number of levels to display when doing 'Always display'
|
139 |
*
|
140 |
* @return int
|
141 |
*/
|
src/Notice.php
CHANGED
@@ -4,7 +4,6 @@ namespace Advanced_Sidebar_Menu;
|
|
4 |
|
5 |
use Advanced_Sidebar_Menu\Traits\Singleton;
|
6 |
use Advanced_Sidebar_Menu\Widget\Category;
|
7 |
-
use Advanced_Sidebar_Menu\Widget\Page as Widget_Page;
|
8 |
|
9 |
/**
|
10 |
* Various notice handling for the admin and widgets.
|
@@ -28,6 +27,7 @@ class Notice {
|
|
28 |
|
29 |
if ( $this->is_conflicting_pro_version() ) {
|
30 |
add_action( 'all_admin_notices', [ $this, 'pro_version_warning' ] );
|
|
|
31 |
}
|
32 |
}
|
33 |
|
@@ -51,16 +51,25 @@ class Notice {
|
|
51 |
?>
|
52 |
<div class="<?php echo true === $no_banner ? '' : 'error'; ?>">
|
53 |
<p>
|
54 |
-
<?php
|
55 |
-
/* translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>] */
|
56 |
-
printf( esc_html_x( 'Advanced Sidebar Menu requires %1$sAdvanced Sidebar Menu PRO%2$s version %3$s+. Please update or deactivate the PRO version.', '{<a>}{</a>}', 'advanced-sidebar-menu' ), '<a target="_blank" rel="noreferrer noopener" href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">', '</a>', esc_attr( ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION ) );
|
57 |
-
?>
|
58 |
</p>
|
59 |
</div>
|
60 |
<?php
|
61 |
}
|
62 |
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* Notify widget users about the PRO options
|
66 |
*
|
@@ -89,21 +98,15 @@ class Notice {
|
|
89 |
</a>
|
90 |
</h3>
|
91 |
<ol>
|
92 |
-
<li><?php esc_html_e( 'Styling options including borders, bullets, colors, backgrounds, size, and font weight.', 'advanced-sidebar-menu' ); ?></li>
|
93 |
-
<li><?php esc_html_e( 'Accordion menus.', 'advanced-sidebar-menu' ); ?></li>
|
94 |
-
<li><?php esc_html_e( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' ); ?></li>
|
95 |
<?php
|
96 |
-
|
97 |
?>
|
98 |
-
<li
|
99 |
-
|
100 |
-
|
101 |
-
?>
|
102 |
-
<li><?php esc_html_e( 'Select and display custom taxonomies.', 'advanced-sidebar-menu' ); ?></li>
|
103 |
<?php
|
104 |
}
|
105 |
?>
|
106 |
-
<li><?php esc_html_e( 'Priority support with access to members only support area.', 'advanced-sidebar-menu' ); ?></li>
|
107 |
<li>
|
108 |
<a
|
109 |
href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/?utm_source=widget-more&utm_campaign=gopro&utm_medium=wp-dash"
|
@@ -176,4 +179,21 @@ class Notice {
|
|
176 |
return $actions;
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
4 |
|
5 |
use Advanced_Sidebar_Menu\Traits\Singleton;
|
6 |
use Advanced_Sidebar_Menu\Widget\Category;
|
|
|
7 |
|
8 |
/**
|
9 |
* Various notice handling for the admin and widgets.
|
27 |
|
28 |
if ( $this->is_conflicting_pro_version() ) {
|
29 |
add_action( 'all_admin_notices', [ $this, 'pro_version_warning' ] );
|
30 |
+
add_filter( 'advanced-sidebar-menu/scripts/js-config/error', [ $this, 'get_pro_version_warning_message' ] );
|
31 |
}
|
32 |
}
|
33 |
|
51 |
?>
|
52 |
<div class="<?php echo true === $no_banner ? '' : 'error'; ?>">
|
53 |
<p>
|
54 |
+
<?php echo $this->get_pro_version_warning_message(); //phpcs:ignore ?>
|
|
|
|
|
|
|
55 |
</p>
|
56 |
</div>
|
57 |
<?php
|
58 |
}
|
59 |
|
60 |
|
61 |
+
/**
|
62 |
+
* Get message to display in various admin locations if
|
63 |
+
* basic version of the plugin is unsupported.
|
64 |
+
*
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
public function get_pro_version_warning_message() {
|
68 |
+
/* translators: Link to PRO plugin {%1$s}[<a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">]{%2$s}[</a>] */
|
69 |
+
return sprintf( esc_html_x( 'Advanced Sidebar Menu requires %1$sAdvanced Sidebar Menu PRO%2$s version %3$s+. Please update or deactivate the PRO version.', '{<a>}{</a>}', 'advanced-sidebar-menu' ), '<a target="_blank" rel="noreferrer noopener" href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">', '</a>', esc_attr( ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION ) );
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
/**
|
74 |
* Notify widget users about the PRO options
|
75 |
*
|
98 |
</a>
|
99 |
</h3>
|
100 |
<ol>
|
|
|
|
|
|
|
101 |
<?php
|
102 |
+
foreach ( $this->get_features() as $feature ) {
|
103 |
?>
|
104 |
+
<li>
|
105 |
+
<?php echo esc_html( $feature ); ?>
|
106 |
+
</li>
|
|
|
|
|
107 |
<?php
|
108 |
}
|
109 |
?>
|
|
|
110 |
<li>
|
111 |
<a
|
112 |
href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/?utm_source=widget-more&utm_campaign=gopro&utm_medium=wp-dash"
|
179 |
return $actions;
|
180 |
}
|
181 |
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Get a list of PRO plugin features for display in
|
185 |
+
* the info panel for widgets and blocks.
|
186 |
+
*
|
187 |
+
* @return array
|
188 |
+
*/
|
189 |
+
public function get_features() {
|
190 |
+
return [
|
191 |
+
__( 'Styling options including borders, bullets, colors, backgrounds, size, and font weight.', 'advanced-sidebar-menu' ),
|
192 |
+
__( 'Accordion menus.', 'advanced-sidebar-menu' ),
|
193 |
+
__( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' ),
|
194 |
+
__( 'Select and display custom post types and taxonomies.', 'advanced-sidebar-menu' ),
|
195 |
+
__( 'Priority support with access to members only support area.', 'advanced-sidebar-menu' ),
|
196 |
+
];
|
197 |
+
}
|
198 |
+
|
199 |
}
|
src/Scripts.php
CHANGED
@@ -2,22 +2,30 @@
|
|
2 |
|
3 |
namespace Advanced_Sidebar_Menu;
|
4 |
|
|
|
5 |
use Advanced_Sidebar_Menu\Traits\Singleton;
|
|
|
|
|
6 |
|
7 |
/**
|
8 |
* Scripts and styles.
|
9 |
-
*
|
10 |
-
* @author Mat Lipe
|
11 |
-
* @since 7.7.0
|
12 |
*/
|
13 |
class Scripts {
|
14 |
use Singleton;
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* Add various scripts to the cue.
|
18 |
*/
|
19 |
public function hook() {
|
20 |
-
add_action( '
|
|
|
21 |
// Elementor support.
|
22 |
add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );
|
23 |
// UGH! Beaver Builder hack.
|
@@ -32,25 +40,141 @@ class Scripts {
|
|
32 |
|
33 |
|
34 |
/**
|
35 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
*
|
37 |
* @return void
|
38 |
*/
|
39 |
public function admin_scripts() {
|
40 |
wp_enqueue_script(
|
41 |
-
|
42 |
trailingslashit( (string) ADVANCED_SIDEBAR_MENU_URL ) . 'resources/js/advanced-sidebar-menu.js',
|
43 |
[ 'jquery' ],
|
44 |
ADVANCED_SIDEBAR_BASIC_VERSION,
|
45 |
false
|
46 |
);
|
47 |
|
48 |
-
wp_enqueue_style(
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
|
@@ -61,8 +185,8 @@ class Scripts {
|
|
61 |
* page builders or the backend by standard WordPress or
|
62 |
* really anywhere.
|
63 |
*
|
64 |
-
* @notice Does not work in Gutenberg as widget's markup is loaded
|
65 |
-
* and React.
|
66 |
*
|
67 |
* @return void
|
68 |
*/
|
2 |
|
3 |
namespace Advanced_Sidebar_Menu;
|
4 |
|
5 |
+
use Advanced_Sidebar_Menu\Blocks\Block_Abstract;
|
6 |
use Advanced_Sidebar_Menu\Traits\Singleton;
|
7 |
+
use Advanced_Sidebar_Menu\Widget\Category;
|
8 |
+
use Advanced_Sidebar_Menu\Widget\Page;
|
9 |
|
10 |
/**
|
11 |
* Scripts and styles.
|
|
|
|
|
|
|
12 |
*/
|
13 |
class Scripts {
|
14 |
use Singleton;
|
15 |
|
16 |
+
const ADMIN_SCRIPT = 'advanced-sidebar-menu-script';
|
17 |
+
const ADMIN_STYLE = 'advanced-sidebar-menu-style';
|
18 |
+
|
19 |
+
const GUTENBERG_HANDLE = 'advanced-sidebar-menu/gutenberg';
|
20 |
+
const GUTENBERG_CSS_HANDLE = 'advanced-sidebar-menu/gutenberg-css';
|
21 |
+
|
22 |
+
|
23 |
/**
|
24 |
* Add various scripts to the cue.
|
25 |
*/
|
26 |
public function hook() {
|
27 |
+
add_action( 'init', [ $this, 'register_gutenberg_scripts' ] );
|
28 |
+
add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );
|
29 |
// Elementor support.
|
30 |
add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );
|
31 |
// UGH! Beaver Builder hack.
|
40 |
|
41 |
|
42 |
/**
|
43 |
+
* Register Gutenberg block scripts.
|
44 |
+
*
|
45 |
+
* We register instead of enqueue so Gutenberg will load them
|
46 |
+
* within the iframes of areas such as FSE.
|
47 |
+
*
|
48 |
+
* The actual script/style loading is done via `register_block_type`
|
49 |
+
* using 'editor_script' and 'editor_style.
|
50 |
+
*
|
51 |
+
* @action init 10 0
|
52 |
+
*
|
53 |
+
* @notice Must be run before `get_block_editor_settings` is
|
54 |
+
* called to allow styles to be included in the Site
|
55 |
+
* Editor iframe.
|
56 |
+
*
|
57 |
+
* @see Block_Abstract::register()
|
58 |
+
*
|
59 |
+
* @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#wpdefinedasset
|
60 |
+
*
|
61 |
+
* @since 9.0.0
|
62 |
+
*
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
+
public function register_gutenberg_scripts() {
|
66 |
+
$js_dir = apply_filters( 'advanced-sidebar-menu/js-dir', ADVANCED_SIDEBAR_MENU_URL . 'js/dist/' );
|
67 |
+
$file = $this->is_script_debug_enabled() ? 'admin' : 'admin.min';
|
68 |
+
|
69 |
+
wp_register_script( self::GUTENBERG_HANDLE, "{$js_dir}{$file}.js", [
|
70 |
+
'jquery',
|
71 |
+
'react',
|
72 |
+
'react-dom',
|
73 |
+
'wp-url',
|
74 |
+
], ADVANCED_SIDEBAR_BASIC_VERSION, true );
|
75 |
+
|
76 |
+
// Must register here because used as a dependency of the Gutenberg styles.
|
77 |
+
wp_register_style( self::ADMIN_STYLE, trailingslashit( (string) ADVANCED_SIDEBAR_MENU_URL ) . 'resources/css/advanced-sidebar-menu.css', [], ADVANCED_SIDEBAR_BASIC_VERSION );
|
78 |
+
|
79 |
+
if ( ! $this->is_webpack_enabled() ) {
|
80 |
+
wp_register_style( self::GUTENBERG_CSS_HANDLE, "{$js_dir}{$file}.css", [
|
81 |
+
self::ADMIN_STYLE,
|
82 |
+
'dashicons',
|
83 |
+
], ADVANCED_SIDEBAR_BASIC_VERSION );
|
84 |
+
}
|
85 |
+
|
86 |
+
wp_set_script_translations( self::GUTENBERG_HANDLE, 'advanced-sidebar-menu', ADVANCED_SIDEBAR_DIR . 'languages' );
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Load separately because `$this->js_config()` is heavy, and
|
90 |
+
* the block scripts must be registered before we have
|
91 |
+
* access to `wp_should_load_block_editor_scripts_and_styles`.
|
92 |
+
*/
|
93 |
+
add_action( 'enqueue_block_editor_assets', function() {
|
94 |
+
wp_localize_script( self::GUTENBERG_HANDLE, 'ADVANCED_SIDEBAR_MENU', $this->js_config() );
|
95 |
+
}, 1 );
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Add JS and CSS to the admin and in specific cases the front-end.
|
101 |
+
*
|
102 |
+
* @action admin_enqueue_scripts 10 0
|
103 |
*
|
104 |
* @return void
|
105 |
*/
|
106 |
public function admin_scripts() {
|
107 |
wp_enqueue_script(
|
108 |
+
self::ADMIN_SCRIPT,
|
109 |
trailingslashit( (string) ADVANCED_SIDEBAR_MENU_URL ) . 'resources/js/advanced-sidebar-menu.js',
|
110 |
[ 'jquery' ],
|
111 |
ADVANCED_SIDEBAR_BASIC_VERSION,
|
112 |
false
|
113 |
);
|
114 |
|
115 |
+
wp_enqueue_style( self::ADMIN_STYLE );
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Is SCRIPT_DEBUG enabled or passed via URL argument.
|
121 |
+
*
|
122 |
+
* @since 9.0.0
|
123 |
+
*
|
124 |
+
* @return bool
|
125 |
+
*/
|
126 |
+
public function is_script_debug_enabled() {
|
127 |
+
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
128 |
+
return ( \defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || ! empty( $_GET['script-debug'] );
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Are we currently developing locally with Webpack enabled?
|
134 |
+
*
|
135 |
+
* Provides a consistent interface for determining considerations
|
136 |
+
* when Webpack is enabled.
|
137 |
+
*
|
138 |
+
* @since 9.0.0.
|
139 |
+
*
|
140 |
+
* @return bool
|
141 |
+
*/
|
142 |
+
public function is_webpack_enabled() {
|
143 |
+
return SCRIPT_DEBUG && has_filter( 'advanced-sidebar-menu/js-dir' );
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Configuration passed from PHP to JavaScript.
|
149 |
+
*
|
150 |
+
* @return array
|
151 |
+
*/
|
152 |
+
public function js_config() {
|
153 |
+
return apply_filters( 'advanced-sidebar-menu/scripts/js-config', [
|
154 |
+
'categories' => [
|
155 |
+
'displayEach' => Category::get_display_each_options(),
|
156 |
+
],
|
157 |
+
'currentScreen' => is_admin() ? get_current_screen()->base : '',
|
158 |
+
'docs' => [
|
159 |
+
'page' => Core::instance()->get_documentation_url( Page::NAME ),
|
160 |
+
'category' => Core::instance()->get_documentation_url( Category::NAME ),
|
161 |
+
],
|
162 |
+
'error' => apply_filters( 'advanced-sidebar-menu/scripts/js-config/error', '' ),
|
163 |
+
'features' => Notice::instance()->get_features(),
|
164 |
+
'isPostEdit' => ! empty( $GLOBALS['pagenow'] ) && 'post.php' === $GLOBALS['pagenow'],
|
165 |
+
'isPro' => false,
|
166 |
+
'isWidgets' => ! empty( $GLOBALS['pagenow'] ) && 'widgets.php' === $GLOBALS['pagenow'],
|
167 |
+
'pages' => [
|
168 |
+
'orderBy' => Page::get_order_by_options(),
|
169 |
+
],
|
170 |
+
'siteInfo' => [
|
171 |
+
'basic' => ADVANCED_SIDEBAR_BASIC_VERSION,
|
172 |
+
'pro' => false,
|
173 |
+
'scriptDebug' => $this->is_script_debug_enabled(),
|
174 |
+
'wordpress' => get_bloginfo( 'version' ),
|
175 |
+
],
|
176 |
+
'support' => 'https://wordpress.org/support/plugin/advanced-sidebar-menu/#new-topic-0',
|
177 |
+
] );
|
178 |
}
|
179 |
|
180 |
|
185 |
* page builders or the backend by standard WordPress or
|
186 |
* really anywhere.
|
187 |
*
|
188 |
+
* @notice Does not work in Gutenberg as widget's markup is loaded
|
189 |
+
* via the REST API and React.
|
190 |
*
|
191 |
* @return void
|
192 |
*/
|
src/Widget/Category.php
CHANGED
@@ -48,8 +48,9 @@ class Category extends Widget_Abstract {
|
|
48 |
*/
|
49 |
public function __construct() {
|
50 |
$widget_ops = [
|
51 |
-
'classname'
|
52 |
-
'description'
|
|
|
53 |
];
|
54 |
$control_ops = [
|
55 |
'width' => wp_is_mobile() ? false : 620,
|
@@ -107,6 +108,19 @@ class Category extends Widget_Abstract {
|
|
107 |
}
|
108 |
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
/**
|
111 |
* Display options.
|
112 |
*
|
@@ -218,13 +232,18 @@ class Category extends Widget_Abstract {
|
|
218 |
name="<?php echo esc_attr( $widget->get_field_name( self::EACH_CATEGORY_DISPLAY ) ); ?>"
|
219 |
class="advanced-sidebar-menu-block-field"
|
220 |
>
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
228 |
</select>
|
229 |
</p>
|
230 |
</div>
|
48 |
*/
|
49 |
public function __construct() {
|
50 |
$widget_ops = [
|
51 |
+
'classname' => 'advanced-sidebar-menu advanced-sidebar-category',
|
52 |
+
'description' => __( 'Creates a menu of all the categories using the child/parent relationship', 'advanced-sidebar-menu' ),
|
53 |
+
'show_instance_in_rest' => true,
|
54 |
];
|
55 |
$control_ops = [
|
56 |
'width' => wp_is_mobile() ? false : 620,
|
108 |
}
|
109 |
|
110 |
|
111 |
+
/**
|
112 |
+
* Get list of display each single post's category options.
|
113 |
+
*
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public static function get_display_each_options() {
|
117 |
+
return [
|
118 |
+
\Advanced_Sidebar_Menu\Menus\Category::EACH_WIDGET => __( 'In a new widget', 'advanced-sidebar-menu' ),
|
119 |
+
\Advanced_Sidebar_Menu\Menus\Category::EACH_LIST => __( 'In another list in the same widget', 'advanced-sidebar-menu' ),
|
120 |
+
];
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
/**
|
125 |
* Display options.
|
126 |
*
|
232 |
name="<?php echo esc_attr( $widget->get_field_name( self::EACH_CATEGORY_DISPLAY ) ); ?>"
|
233 |
class="advanced-sidebar-menu-block-field"
|
234 |
>
|
235 |
+
<?php
|
236 |
+
foreach ( static::get_display_each_options() as $value => $label ) {
|
237 |
+
?>
|
238 |
+
<option
|
239 |
+
value="<?php echo esc_attr( $value ); ?>"
|
240 |
+
<?php selected( $value, $instance[ self::EACH_CATEGORY_DISPLAY ] ); ?>
|
241 |
+
>
|
242 |
+
<?php echo esc_html( $label ); ?>
|
243 |
+
</option>
|
244 |
+
<?php
|
245 |
+
}
|
246 |
+
?>
|
247 |
</select>
|
248 |
</p>
|
249 |
</div>
|
src/Widget/Page.php
CHANGED
@@ -44,8 +44,9 @@ class Page extends Widget_Abstract {
|
|
44 |
*/
|
45 |
public function __construct() {
|
46 |
$widget_ops = [
|
47 |
-
'classname'
|
48 |
-
'description'
|
|
|
49 |
];
|
50 |
$control_ops = [
|
51 |
'width' => wp_is_mobile() ? false : 620,
|
@@ -100,6 +101,25 @@ class Page extends Widget_Abstract {
|
|
100 |
}
|
101 |
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
/**
|
104 |
* Display options.
|
105 |
*
|
@@ -196,32 +216,22 @@ class Page extends Widget_Abstract {
|
|
196 |
public function box_order( array $instance, $widget ) {
|
197 |
?>
|
198 |
<div class="advanced-sidebar-menu-column-box">
|
199 |
-
|
200 |
<p>
|
201 |
<label for="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>">
|
202 |
<?php esc_html_e( 'Order by', 'advanced-sidebar-menu' ); ?>
|
203 |
</label>
|
204 |
<select
|
205 |
id="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>"
|
206 |
-
name="<?php echo esc_attr( $widget->get_field_name( self::ORDER_BY ) ); ?>"
|
|
|
207 |
<?php
|
208 |
-
|
209 |
-
'advanced-sidebar-menu/widget/page/order-by-options',
|
210 |
-
[
|
211 |
-
'menu_order' => 'Page Order',
|
212 |
-
'post_title' => 'Title',
|
213 |
-
'post_date' => 'Published Date',
|
214 |
-
]
|
215 |
-
);
|
216 |
-
|
217 |
-
foreach ( $order_by as $key => $order ) {
|
218 |
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $instance[ self::ORDER_BY ], $key, false ), esc_html( $order ) );
|
219 |
}
|
220 |
?>
|
221 |
</select>
|
222 |
</p>
|
223 |
<?php do_action( 'advanced-sidebar-menu/widget/page/order-box', $instance, $widget ); ?>
|
224 |
-
|
225 |
</div>
|
226 |
<?php
|
227 |
}
|
44 |
*/
|
45 |
public function __construct() {
|
46 |
$widget_ops = [
|
47 |
+
'classname' => 'advanced-sidebar-menu',
|
48 |
+
'description' => __( 'Creates a menu of all the pages using the child/parent relationship', 'advanced-sidebar-menu' ),
|
49 |
+
'show_instance_in_rest' => true,
|
50 |
];
|
51 |
$control_ops = [
|
52 |
'width' => wp_is_mobile() ? false : 620,
|
101 |
}
|
102 |
|
103 |
|
104 |
+
/**
|
105 |
+
* Get available options to order the pages by.
|
106 |
+
*
|
107 |
+
* @since 9.0.0
|
108 |
+
*
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
public static function get_order_by_options() {
|
112 |
+
return (array) apply_filters(
|
113 |
+
'advanced-sidebar-menu/widget/page/order-by-options',
|
114 |
+
[
|
115 |
+
'menu_order' => __( 'Page Order', 'advanced-sidebar-menu' ),
|
116 |
+
'post_title' => __( 'Title', 'advanced-sidebar-menu' ),
|
117 |
+
'post_date' => __( 'Published Date', 'advanced-sidebar-menu' ),
|
118 |
+
]
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
/**
|
124 |
* Display options.
|
125 |
*
|
216 |
public function box_order( array $instance, $widget ) {
|
217 |
?>
|
218 |
<div class="advanced-sidebar-menu-column-box">
|
|
|
219 |
<p>
|
220 |
<label for="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>">
|
221 |
<?php esc_html_e( 'Order by', 'advanced-sidebar-menu' ); ?>
|
222 |
</label>
|
223 |
<select
|
224 |
id="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>"
|
225 |
+
name="<?php echo esc_attr( $widget->get_field_name( self::ORDER_BY ) ); ?>"
|
226 |
+
>
|
227 |
<?php
|
228 |
+
foreach ( static::get_order_by_options() as $key => $order ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
printf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $instance[ self::ORDER_BY ], $key, false ), esc_html( $order ) );
|
230 |
}
|
231 |
?>
|
232 |
</select>
|
233 |
</p>
|
234 |
<?php do_action( 'advanced-sidebar-menu/widget/page/order-box', $instance, $widget ); ?>
|
|
|
235 |
</div>
|
236 |
<?php
|
237 |
}
|
src/Widget/Widget_Abstract.php
CHANGED
@@ -59,8 +59,6 @@ abstract class Widget_Abstract extends \WP_Widget {
|
|
59 |
* which controls this.
|
60 |
* @param bool $reverse - hide on check instead of show on check.
|
61 |
*
|
62 |
-
* @todo Convert all uses of this method to supply the $element_key
|
63 |
-
*
|
64 |
* @return void
|
65 |
*/
|
66 |
public function hide_element( $controlling_checkbox, $element_key = null, $reverse = false ) {
|
59 |
* which controls this.
|
60 |
* @param bool $reverse - hide on check instead of show on check.
|
61 |
*
|
|
|
|
|
62 |
* @return void
|
63 |
*/
|
64 |
public function hide_element( $controlling_checkbox, $element_key = null, $reverse = false ) {
|