diff --git a/plugins/wp-react-custom-multilang/.gitignore b/plugins/wp-react-custom-multilang/.gitignore deleted file mode 100644 index 0830907eb..000000000 --- a/plugins/wp-react-custom-multilang/.gitignore +++ /dev/null @@ -1 +0,0 @@ -assets/blocks/language-switcher/node_modules \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/README.md b/plugins/wp-react-custom-multilang/README.md deleted file mode 100644 index 0f043420c..000000000 --- a/plugins/wp-react-custom-multilang/README.md +++ /dev/null @@ -1,207 +0,0 @@ -# [WP Multilang](https://wordpress.org/plugins/wp-multilang/) - -Multilingual plugin for WordPress. - -## Description - -**WP Multilang** is a multilingual plugin for WordPress. - -Translation for any post types, taxonomies, meta fields, options, text fields in miltimedia files, menus, titles and text fields in widgets. - -[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium Features](https://wp-multilang.com/#features) - -New Features of the plugin WP Multilang: -* Support full site editor for block based themes -* Support block based widgets -* Support different feature image for each language -* Support Smart Custom Fields Plugin -* Auto Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-auto-translate-your-website-contents-using-wp-multilang/) -* Support URL Slug Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/) -* Support Base Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-taxonomy-bases-such-as-categories-and-tags-into-selective-languages-using-the-base-translation-option/) - -Features of the plugin WP Multilang: -* 100% free. -* Translation at PHP. -* Compatible with REST. -* Support configuration for translate multidimensional arrays in options, meta fields, post content. -* Support multisite. -* Support WordPress in a sub-folder. -* Separate menu items, posts, terms, widgets, comments per language. -* Many filters for dynamic applying translation settings. -* No duplicate posts, terms, menus, widgets. -* No sub-domain for each language version. -* No additional tables in database. -* Possibility set many languages with one localization. For example, for localization in the region. -* Possibility to set custom locale for html(If installed locale is en_US, you can set locale like: en, en-UK, en-AU etc. Without installation another localization) -* Possibility for add new languages for any user with capability `manage_options`. -* Exist the role "Translator" for editing posts, terms. It can not publish or delete. -* No limits by languages or by possibilities. - -**WP Multilang** compatible out of the box with the plugins: -* Elementor ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-elementor-using-wp-multilang/) -* Divi Builder ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-divi-builder-using-wp-multilang/) -* ACF, ACF Pro -* WooCommerce -* WooCommerce Customizer -* Gutenberg -* Yoast Seo -* Contact Form 7 (added mail tag [_language] for send user language in mail) -* WPBakery Visual Composer -* Page Builder by SiteOrigin -* NextGEN Gallery -* All in One SEO Pack -* MailChimp for WordPress -* Newsletter -* Maps Builder -* Max Mega Menu -* MasterSlider -* WP-PageNavi -* BuddyPress -* Meta Slider -* TablePress -* Download Monitor (Redefine templates for links in your theme and translate link texts) -* Better Search -* Rank Math SEO (thanks for @pratikmts) -* WPGraphQL (Add lang to the query parameters in URL. Eg: lang=en) -* Smart Custom Fields -* Team – Team Members Showcase Plugin -* Schema & Structured Data for WP & AMP - -Supports configuration via json. - -Add in the root of your theme or plugin file `wpm-config.json` settings. - -Sample configurations can be viewed in a configuration file in a folder configs in the root of the plugin. - -Configuration is updated after switching a theme off/on or after update any plugin. - -The plugin has filters for dynamic applying configuration for translate. - -For disabling translation set `null` into the desired configuration. -For example, you should turn off translation for a post type `post`. -There are two ways: - -1. In json. - Create the root of the subject, or the roots of its plugin file `wpm-config.json` with: - ``` - { - "post_types": { - "post": null - } - } - ``` - -2. Through the filter. - Add in functions.php - ```php - add_filter( 'wpm_post_post_config', '__return_null' ); - ``` -To enable translation pass an empty array in php `array()` or empty object in json `{}`. - -Supports translation multidimensional array of options, meta fields and post_content. -Supports the removal of established localizations. -Supports translation via GET parameter. Add in the GET parameter `lang` code desired language. -Supports clean database of translations when removing the plugin. Translations are only removed from the built-in tables. -Supports import term translations from qTranslate(by Soft79). -Supports automatically redirect to the user's browser language, if he visits for the first time. - -Ideal for developers. - -For display language switcher in any place add the code to your template `if ( function_exists ( 'wpm_language_switcher' ) ) wpm_language_switcher ();` -Function accepts two parameters: -$type - 'list', 'dropdown', 'select'. Default - 'list'. -$show - 'flag', 'name', 'both'. Default - 'both'. - -Or using the shortcode `wpm_lang_switcher`. It accept two not necessary parameters 'type' and 'show'. - -Available features for translation: -`wpm_translate_url( $url, $language = '' );` - translate url -`wpm_translate_string( $string, $language = '' );` - translate multilingual string -`wpm_translate_value( $value, $language = '' );` - translate multidimensional array with multilingual strings - -Update translation occurs at PHP. Therefore plugin has high adaptability, compatibility and easily integrates with other plugins. This is what distinguishes it among similar. - -Available translation html tags by JS for strings what do not have WP filters before output. - -Add your tags in config: -``` -"admin_html_tags": { - "admin_screen_id": { - "attribute": [ - "selector" - ] - } -} -``` -Where: -`admin_screen_id` - admin screen id. -`attribute` - attribute what need to translate. Available 'text' - for translate text node, 'value' - for translate form values. Or other tag attribute, like 'title', 'alt'. -`selector` - css selector for search needed tag. Each selector is a new array item. - -If You need to add translation for multidimentional array for repeated elements You can use custom tag 'wpm_each' for set config to each element in array. -Example, add config for each item 'title' in custom post field array: -``` -"post_fields": { - "custom_field": { - "wpm_each": { - "title": {} - } - } -} -``` - -For set translation uses the syntax: -`[:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:]` - -Added shortcode for translate text in any place: -`[wpm_translate][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` - -If You translate text in established language, add lang parameter: -`[wpm_translate lang="de"][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` - -Support translating from syntax qTranslate-X, WPGlobus etc. - -Compatible with REST-API. -Support transfer the required translation through option `lang` in the GET request to REST. -Has the ability to keep recording the target language through the transmission parameter `lang` in the request. - -Migration from qTranslate-X - -1. Before installing/uninstalling, make database backup. -2. Deactivate qTranslate-X. -3. Install and activate WP Multilang. -4. Create in root of your theme file ‘wpm-config.json’. -5. Add all needed post types, taxonomies, options, fields to ‘wpm-config.json’. Setting from qTranslate-X not importing. -6. Import term names from qTranslate. -7. Check that everything is okay. -8. If everything is okay, remove qTranslate-X. If not, make screenshots of errors, restore database from backup and add support issue with your screenshots and description of errors. - -Warning -Not compatible with: -- WP Maintenance - -Known issues -Function 'get_page_by_title' not working, because in title field are stored titles for all languages. Use function 'wpm_get_page_by_title( $title )' as solution. - -NOTE: Because plugins have different ways of storing data, WP Multilang is not compatible with every single plugin out-of-the-box (mostly page builders). This may result in texts not being translatable or translations not being saved. Most of these issues can be resolved using the integration options (wpm-config.json or filters) of WP Multilang. - -Please try WP Multilang in a test-environment before activating it on an existing production site and always make a backup before activating! - -[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium](https://wp-multilang.com/) - -Support - -We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://wp-multilang.com/contact-us/) where you can ask us questions and get help about your WP Multilang related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked. - -Bug Reports - -Bug reports for WP Multilang are [welcomed on GitHub](https://github.com/ahmedkaludi/wp-multilang/issues). Please note GitHub is not a support forum, and issues that aren't properly qualified as bugs will be closed. - -Installation -1. Upload the plugin files to the `/wp-content/plugins/wp-multilang` directory, or install the plugin through the WordPress plugins screen directly. -2. Activate the plugin through the 'Plugins' screen in WordPress. -3. Adjust languages on WP Multilang Settings page. - -Upgrade Notice - -Before installing or uninstalling make the site database backup before. \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/.editorconfig b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/.editorconfig index b5df0fc52..b88745393 100644 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/.editorconfig +++ b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/.editorconfig @@ -1,18 +1,18 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -# WordPress Coding Standards -# https://make.wordpress.org/core/handbook/coding-standards/ - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = tab - -[*.{yml,yaml}] -indent_style = space -indent_size = 2 +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-block-style.css b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-block-style.css index 9f1195c34..7ab689c2d 100644 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-block-style.css +++ b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-block-style.css @@ -1,5 +1,58 @@ -.wp-block-post-content .wpm-language-switcher{ - left: 0px; - text-align: left; - margin-left: 0px !important; -} \ No newline at end of file +.wp-block-post-content .wpm-language-switcher{ + left: 0px; + text-align: left; + margin-left: 0px !important; +} +.interface-interface-skeleton__body .interface-navigable-region{ + z-index: 1; +} +.wpm-switcher-list { + list-style: none; + margin-bottom: 0; + padding-left: 0; } + .wpm-switcher-list li a, + .wpm-switcher-list li > span { + color: #333333; } + .wpm-switcher-list li a:hover, + .wpm-switcher-list li > span:hover { + color: #000; } + .wpm-switcher-list li a img, + .wpm-switcher-list li > span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-list li.active a, + .wpm-switcher-list li.active > span { + color: #000; } + +.wpm-switcher-dropdown { + list-style: none; + margin-bottom: 0; + padding-left: 0; + position: relative; } + .wpm-switcher-dropdown a img, + .wpm-switcher-dropdown span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-dropdown a { + color: #333333; } + .wpm-switcher-dropdown a:hover { + color: #000; } + .wpm-switcher-dropdown .wpm-language-dropdown { + display: none; + left: 0; + list-style: none; + margin-bottom: 0; + margin-left: 0; + padding-left: 0; + position: absolute; + top: 100%; } + .wpm-switcher-dropdown > li { + position: relative; } + .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { + display: block; } + .wpm-switcher-dropdown .wpm-item-language-main > span:hover { + cursor: pointer; } + +.wpm-languages.menu-item > a img { + display: inline-block; + margin-right: 5px; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-editor-style.css b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-editor-style.css index a6baaa37c..675e3c041 100644 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-editor-style.css +++ b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/css/wpm-editor-style.css @@ -1,50 +1,50 @@ -.wpm-switcher-list { - list-style: none; - margin-bottom: 0; - padding-left: 0; } - .wpm-switcher-list li a, - .wpm-switcher-list li > span { - color: #333333; } - .wpm-switcher-list li a:hover, - .wpm-switcher-list li > span:hover { - color: #000; } - .wpm-switcher-list li a img, - .wpm-switcher-list li > span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-list li.active a, - .wpm-switcher-list li.active > span { - color: #000; } - -.wpm-switcher-dropdown { - list-style: none; - margin-bottom: 0; - padding-left: 0; - position: relative; } - .wpm-switcher-dropdown a img, - .wpm-switcher-dropdown span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-dropdown a { - color: #333333; } - .wpm-switcher-dropdown a:hover { - color: #000; } - .wpm-switcher-dropdown .wpm-language-dropdown { - display: none; - left: 0; - list-style: none; - margin-bottom: 0; - margin-left: 0; - padding-left: 0; - position: absolute; - top: 100%; } - .wpm-switcher-dropdown > li { - position: relative; } - .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { - display: block; } - .wpm-switcher-dropdown .wpm-item-language-main > span:hover { - cursor: pointer; } - -.wpm-languages.menu-item > a img { - display: inline-block; +.wpm-switcher-list { + list-style: none; + margin-bottom: 0; + padding-left: 0; } + .wpm-switcher-list li a, + .wpm-switcher-list li > span { + color: #333333; } + .wpm-switcher-list li a:hover, + .wpm-switcher-list li > span:hover { + color: #000; } + .wpm-switcher-list li a img, + .wpm-switcher-list li > span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-list li.active a, + .wpm-switcher-list li.active > span { + color: #000; } + +.wpm-switcher-dropdown { + list-style: none; + margin-bottom: 0; + padding-left: 0; + position: relative; } + .wpm-switcher-dropdown a img, + .wpm-switcher-dropdown span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-dropdown a { + color: #333333; } + .wpm-switcher-dropdown a:hover { + color: #000; } + .wpm-switcher-dropdown .wpm-language-dropdown { + display: none; + left: 0; + list-style: none; + margin-bottom: 0; + margin-left: 0; + padding-left: 0; + position: absolute; + top: 100%; } + .wpm-switcher-dropdown > li { + position: relative; } + .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { + display: block; } + .wpm-switcher-dropdown .wpm-item-language-main > span:hover { + cursor: pointer; } + +.wpm-languages.menu-item > a img { + display: inline-block; margin-right: 5px; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.js index 34800fc6c..8e9395ea9 100644 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.js +++ b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.js @@ -1,63 +1,63 @@ -jQuery(document).ready(function($){ - if($('.wp-block-wpm-language-switcher').length > 0 && $('.wp-block-wpm-language-switcher .wpm-language-switcher').length > 0){ - let switcherDiv = $('.wp-block-wpm-language-switcher') - let findUl = $(switcherDiv).find('ul'); - - let selectSwitcher = switcherDiv.find('.wpm-switcher-select'); - - if(findUl.length > 0 || selectSwitcher.length > 0){ - - let nonce = wpm_localize_data.wpm_block_switch_nonce; - - $.ajax({ - type: 'POST', - url: wpm_localize_data.ajax_url, - dataType: "json", - data: { - action: 'wpm_block_lang_switcher', - current_url: wpm_localize_data.current_url, - security:wpm_localize_data.wpm_block_switch_nonce - }, - success:function(response){ - if(findUl.length > 0){ - $('.wp-block-wpm-language-switcher .wpm-language-switcher a').each(function(i, e){ - var lang = $(this).data('lang'); - - let langUrl = ''; - - $.each(response, function(bi, be){ - if(lang == bi){ - langUrl = be; - } - }); - - $(this).attr('href', langUrl); - }); - } - - if(selectSwitcher.length > 0){ - $('.wp-block-wpm-language-switcher .wpm-language-switcher option').each(function(i, e){ - var lang = $(this).data('lang'); - - let langUrl = ''; - - $.each(response, function(bi, be){ - if(lang == bi){ - langUrl = be; - } - }); - - $(this).attr('value', langUrl); - - }); - } - } - }); - } - } - - $(document).on('change', '.wp-block-wpm-language-switcher .wpm-switcher-select', function(e){ - let selectedOpt = $(this).val(); - window.location.href = selectedOpt; - }); +jQuery(document).ready(function($){ + if($('.wpm-language-switcher').length > 0){ + let switcherDiv = $('.wpm-language-switcher') + let findUl = $(switcherDiv).find('ul'); + + let selectSwitcher = switcherDiv.find('.wpm-switcher-select'); + + if(findUl.length > 0 || selectSwitcher.length > 0){ + + let nonce = wpm_localize_data.wpm_block_switch_nonce; + + $.ajax({ + type: 'POST', + url: wpm_localize_data.ajax_url, + dataType: "json", + data: { + action: 'wpm_block_lang_switcher', + current_url: wpm_localize_data.current_url, + security:wpm_localize_data.wpm_block_switch_nonce + }, + success:function(response){ + if(findUl.length > 0){ + $('.wpm-language-switcher a').each(function(i, e){ + var lang = $(this).data('lang'); + + let langUrl = ''; + + $.each(response, function(bi, be){ + if(lang == bi){ + langUrl = be; + } + }); + + $(this).attr('href', langUrl); + }); + } + + if(selectSwitcher.length > 0){ + $('.wpm-language-switcher option').each(function(i, e){ + var lang = $(this).data('lang'); + + let langUrl = ''; + + $.each(response, function(bi, be){ + if(lang == bi){ + langUrl = be; + } + }); + + $(this).attr('value', langUrl); + + }); + } + } + }); + } + } + + $(document).on('change', '.wpm-language-switcher .wpm-switcher-select', function(e){ + let selectedOpt = $(this).val(); + window.location.href = selectedOpt; + }); }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.min.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.min.js index 8f2bac3c4..6d4d90a06 100644 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.min.js +++ b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/js/switcher-block.min.js @@ -1 +1 @@ -jQuery(document).ready(function(t){if(t(".wp-block-wpm-language-switcher").length>0&&t(".wp-block-wpm-language-switcher .wpm-language-switcher").length>0){let e=t(".wp-block-wpm-language-switcher"),a=t(e).find("ul"),c=e.find(".wpm-switcher-select");(a.length>0||c.length>0)&&(wpm_localize_data.wpm_block_switch_nonce,t.ajax({type:"POST",url:wpm_localize_data.ajax_url,dataType:"json",data:{action:"wpm_block_lang_switcher",current_url:wpm_localize_data.current_url,security:wpm_localize_data.wpm_block_switch_nonce},success:function(e){a.length>0&&t(".wp-block-wpm-language-switcher .wpm-language-switcher a").each(function(a,c){var n=t(this).data("lang");let l="";t.each(e,function(t,e){n==t&&(l=e)}),t(this).attr("href",l)}),c.length>0&&t(".wp-block-wpm-language-switcher .wpm-language-switcher option").each(function(a,c){var n=t(this).data("lang");let l="";t.each(e,function(t,e){n==t&&(l=e)}),t(this).attr("value",l)})}}))}t(document).on("change",".wp-block-wpm-language-switcher .wpm-switcher-select",function(e){let a=t(this).val();window.location.href=a})}); \ No newline at end of file +jQuery(document).ready(function(t){if(t(".wpm-language-switcher").length>0){let e=t(".wpm-language-switcher"),n=t(e).find("ul"),a=e.find(".wpm-switcher-select");(n.length>0||a.length>0)&&(wpm_localize_data.wpm_block_switch_nonce,t.ajax({type:"POST",url:wpm_localize_data.ajax_url,dataType:"json",data:{action:"wpm_block_lang_switcher",current_url:wpm_localize_data.current_url,security:wpm_localize_data.wpm_block_switch_nonce},success:function(e){n.length>0&&t(".wpm-language-switcher a").each(function(n,a){var c=t(this).data("lang");let l="";t.each(e,function(t,e){c==t&&(l=e)}),t(this).attr("href",l)}),a.length>0&&t(".wpm-language-switcher option").each(function(n,a){var c=t(this).data("lang");let l="";t.each(e,function(t,e){c==t&&(l=e)}),t(this).attr("value",l)})}}))}t(document).on("change",".wpm-language-switcher .wpm-switcher-select",function(e){let n=t(this).val();window.location.href=n})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package-lock.json b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package-lock.json deleted file mode 100644 index dea00c3b8..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package-lock.json +++ /dev/null @@ -1,18358 +0,0 @@ -{ - "name": "language-switcher", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "language-switcher", - "version": "0.1.0", - "license": "GPL-2.0-or-later", - "devDependencies": { - "@wordpress/scripts": "^27.9.0", - "css-loader": "^7.1.2", - "style-loader": "^4.0.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/eslint-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.7.tgz", - "integrity": "sha512-SO5E3bVxDuxyNxM5agFv480YA2HO6ohZbGxbazZdIk3KQOPOGVNw6q78I9/lbviIf95eq6tPozeYnJLbjnC8IA==", - "dev": true, - "dependencies": { - "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", - "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz", - "integrity": "sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz", - "integrity": "sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "regexpu-core": "^5.3.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz", - "integrity": "sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", - "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz", - "integrity": "sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-wrap-function": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz", - "integrity": "sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", - "@babel/helper-optimise-call-expression": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", - "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz", - "integrity": "sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz", - "integrity": "sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz", - "integrity": "sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", - "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz", - "integrity": "sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", - "integrity": "sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", - "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", - "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", - "integrity": "sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", - "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", - "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz", - "integrity": "sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", - "integrity": "sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", - "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz", - "integrity": "sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", - "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/template": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz", - "integrity": "sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", - "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", - "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", - "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", - "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", - "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", - "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz", - "integrity": "sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", - "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", - "integrity": "sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", - "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", - "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", - "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz", - "integrity": "sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz", - "integrity": "sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", - "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", - "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", - "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", - "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", - "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", - "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", - "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", - "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz", - "integrity": "sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", - "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", - "integrity": "sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", - "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", - "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.24.7.tgz", - "integrity": "sha512-7LidzZfUXyfZ8/buRW6qIIHBY8wAZ1OrY9c/wTr8YhZ6vMPo+Uc/CVFLYY1spZrEQlD4w5u8wjqk5NQ3OVqQKA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.24.7.tgz", - "integrity": "sha512-H/Snz9PFxKsS1JLI4dJLtnJgCJRoo0AUm3chP6NYr+9En1JMKloheEiLIhlp5MDVznWo+H3AAC1Mc8lmUEpsgg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.24.7.tgz", - "integrity": "sha512-+Dj06GDZEFRYvclU6k4bme55GKBEWUmByM/eoKuqg4zTNQHiApWRhQph5fxQB2wAEFvRzL1tOEj1RJ19wJrhoA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.24.7.tgz", - "integrity": "sha512-QG9EnzoGn+Qar7rxuW+ZOsbWOt56FvvI93xInqsZDC5fsekx1AlIO4KIJ5M+D0p0SqSH156EpmZyXq630B8OlQ==", - "dev": true, - "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz", - "integrity": "sha512-PLgBVk3fzbmEjBJ/u8kFzOqS9tUeDjiaWud/rRym/yjCo/M9cASPlnrd2ZmmZpQT40fOOrvR8jh+n8jikrOhNA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", - "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "regenerator-transform": "^0.15.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", - "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.7.tgz", - "integrity": "sha512-YqXjrk4C+a1kZjewqt+Mmu2UuV1s07y8kqcUf4qYLnoqemhR4gRQikhdAhSVJioMjVTu6Mo6pAbaypEA3jY6fw==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.1", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", - "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", - "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", - "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", - "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz", - "integrity": "sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz", - "integrity": "sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-typescript": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", - "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", - "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", - "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", - "integrity": "sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.7.tgz", - "integrity": "sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.7", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.7", - "@babel/plugin-transform-async-generator-functions": "^7.24.7", - "@babel/plugin-transform-async-to-generator": "^7.24.7", - "@babel/plugin-transform-block-scoped-functions": "^7.24.7", - "@babel/plugin-transform-block-scoping": "^7.24.7", - "@babel/plugin-transform-class-properties": "^7.24.7", - "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.24.7", - "@babel/plugin-transform-computed-properties": "^7.24.7", - "@babel/plugin-transform-destructuring": "^7.24.7", - "@babel/plugin-transform-dotall-regex": "^7.24.7", - "@babel/plugin-transform-duplicate-keys": "^7.24.7", - "@babel/plugin-transform-dynamic-import": "^7.24.7", - "@babel/plugin-transform-exponentiation-operator": "^7.24.7", - "@babel/plugin-transform-export-namespace-from": "^7.24.7", - "@babel/plugin-transform-for-of": "^7.24.7", - "@babel/plugin-transform-function-name": "^7.24.7", - "@babel/plugin-transform-json-strings": "^7.24.7", - "@babel/plugin-transform-literals": "^7.24.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", - "@babel/plugin-transform-member-expression-literals": "^7.24.7", - "@babel/plugin-transform-modules-amd": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", - "@babel/plugin-transform-modules-systemjs": "^7.24.7", - "@babel/plugin-transform-modules-umd": "^7.24.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", - "@babel/plugin-transform-new-target": "^7.24.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", - "@babel/plugin-transform-numeric-separator": "^7.24.7", - "@babel/plugin-transform-object-rest-spread": "^7.24.7", - "@babel/plugin-transform-object-super": "^7.24.7", - "@babel/plugin-transform-optional-catch-binding": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7", - "@babel/plugin-transform-parameters": "^7.24.7", - "@babel/plugin-transform-private-methods": "^7.24.7", - "@babel/plugin-transform-private-property-in-object": "^7.24.7", - "@babel/plugin-transform-property-literals": "^7.24.7", - "@babel/plugin-transform-regenerator": "^7.24.7", - "@babel/plugin-transform-reserved-words": "^7.24.7", - "@babel/plugin-transform-shorthand-properties": "^7.24.7", - "@babel/plugin-transform-spread": "^7.24.7", - "@babel/plugin-transform-sticky-regex": "^7.24.7", - "@babel/plugin-transform-template-literals": "^7.24.7", - "@babel/plugin-transform-typeof-symbol": "^7.24.7", - "@babel/plugin-transform-unicode-escapes": "^7.24.7", - "@babel/plugin-transform-unicode-property-regex": "^7.24.7", - "@babel/plugin-transform-unicode-regex": "^7.24.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.4", - "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.31.0", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", - "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/preset-react": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.24.7.tgz", - "integrity": "sha512-AAH4lEkpmzFWrGVlHaxJB7RLH21uPQ9+He+eFLWHmF9IuFQVugz8eAsamaW0DXRrTfco5zj1wWtpdcXJUOfsag==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-transform-react-display-name": "^7.24.7", - "@babel/plugin-transform-react-jsx": "^7.24.7", - "@babel/plugin-transform-react-jsx-development": "^7.24.7", - "@babel/plugin-transform-react-pure-annotations": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", - "integrity": "sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", - "@babel/plugin-transform-typescript": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "dev": true - }, - "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@csstools/selector-specificity": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", - "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.0.10" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", - "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", - "dev": true, - "dependencies": { - "comment-parser": "1.4.1", - "esquery": "^1.5.0", - "jsdoc-type-pratt-parser": "~4.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "dev": true - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", - "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", - "dev": true - }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { - "version": "5.1.1-v1", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", - "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", - "dev": true, - "dependencies": { - "eslint-scope": "5.1.1" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/@playwright/test": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.1.tgz", - "integrity": "sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q==", - "dev": true, - "peer": true, - "dependencies": { - "playwright": "1.44.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@pmmmwh/react-refresh-webpack-plugin": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.15.tgz", - "integrity": "sha512-LFWllMA55pzB9D34w/wXUCf8+c+IYKuJDgxiZ3qMhl64KRMBHYM1I3VdGaD2BV5FNPV2/S2596bppxHbv2ZydQ==", - "dev": true, - "dependencies": { - "ansi-html": "^0.0.9", - "core-js-pure": "^3.23.3", - "error-stack-parser": "^2.0.6", - "html-entities": "^2.1.0", - "loader-utils": "^2.0.4", - "schema-utils": "^4.2.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">= 10.13" - }, - "peerDependencies": { - "@types/webpack": "4.x || 5.x", - "react-refresh": ">=0.10.0 <1.0.0", - "sockjs-client": "^1.4.0", - "type-fest": ">=0.17.0 <5.0.0", - "webpack": ">=4.43.0 <6.0.0", - "webpack-dev-server": "3.x || 4.x || 5.x", - "webpack-hot-middleware": "2.x", - "webpack-plugin-serve": "0.x || 1.x" - }, - "peerDependenciesMeta": { - "@types/webpack": { - "optional": true - }, - "sockjs-client": { - "optional": true - }, - "type-fest": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - }, - "webpack-hot-middleware": { - "optional": true - }, - "webpack-plugin-serve": { - "optional": true - } - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.25", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", - "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", - "dev": true - }, - "node_modules/@puppeteer/browsers": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.4.6.tgz", - "integrity": "sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==", - "dev": true, - "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.0", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "dependencies": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry/core": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", - "integrity": "sha512-tOfZ/umqB2AcHPGbIrsFLcvApdTm9ggpi/kQZFkej7kMphjT+SGBiQfYtjyg9jcRW+ilAR4JXC9BGKsdEQ+8Vw==", - "dev": true, - "dependencies": { - "@sentry/hub": "6.19.7", - "@sentry/minimal": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/core/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@sentry/hub": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.19.7.tgz", - "integrity": "sha512-y3OtbYFAqKHCWezF0EGGr5lcyI2KbaXW2Ik7Xp8Mu9TxbSTuwTe4rTntwg8ngPjUQU3SUHzgjqVB8qjiGqFXCA==", - "dev": true, - "dependencies": { - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/hub/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@sentry/minimal": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz", - "integrity": "sha512-wcYmSJOdvk6VAPx8IcmZgN08XTXRwRtB1aOLZm+MVHjIZIhHoBGZJYTVQS/BWjldsamj2cX3YGbGXNunaCfYJQ==", - "dev": true, - "dependencies": { - "@sentry/hub": "6.19.7", - "@sentry/types": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/minimal/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@sentry/node": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-6.19.7.tgz", - "integrity": "sha512-gtmRC4dAXKODMpHXKfrkfvyBL3cI8y64vEi3fDD046uqYcrWdgoQsffuBbxMAizc6Ez1ia+f0Flue6p15Qaltg==", - "dev": true, - "dependencies": { - "@sentry/core": "6.19.7", - "@sentry/hub": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/node/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@sentry/types": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz", - "integrity": "sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/utils": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.19.7.tgz", - "integrity": "sha512-z95ECmE3i9pbWoXQrD/7PgkBAzJYR+iXtPuTkpBjDKs86O3mT+PXOT3BAn79w2wkn7/i3vOGD2xVr1uiMl26dA==", - "dev": true, - "dependencies": { - "@sentry/types": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/utils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "dev": true - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "dev": true - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", - "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", - "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", - "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", - "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", - "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", - "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-preset": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", - "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", - "dev": true, - "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", - "@svgr/babel-plugin-transform-svg-component": "8.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/core": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", - "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "camelcase": "^6.2.0", - "cosmiconfig": "^8.1.3", - "snake-case": "^3.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", - "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.21.3", - "entities": "^4.4.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/plugin-jsx": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", - "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "@svgr/hast-util-to-babel-ast": "8.0.0", - "svg-parser": "^2.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" - } - }, - "node_modules/@svgr/plugin-svgo": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-8.1.0.tgz", - "integrity": "sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA==", - "dev": true, - "dependencies": { - "cosmiconfig": "^8.1.3", - "deepmerge": "^4.3.1", - "svgo": "^3.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" - } - }, - "node_modules/@svgr/webpack": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-8.1.0.tgz", - "integrity": "sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@babel/plugin-transform-react-constant-elements": "^7.21.3", - "@babel/preset-env": "^7.20.2", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.21.0", - "@svgr/core": "8.1.0", - "@svgr/plugin-jsx": "8.1.0", - "@svgr/plugin-svgo": "8.1.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@tannin/compile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@tannin/compile/-/compile-1.1.0.tgz", - "integrity": "sha512-n8m9eNDfoNZoxdvWiTfW/hSPhehzLJ3zW7f8E7oT6mCROoMNWCB4TYtv041+2FMAxweiE0j7i1jubQU4MEC/Gg==", - "dev": true, - "dependencies": { - "@tannin/evaluate": "^1.2.0", - "@tannin/postfix": "^1.1.0" - } - }, - "node_modules/@tannin/evaluate": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@tannin/evaluate/-/evaluate-1.2.0.tgz", - "integrity": "sha512-3ioXvNowbO/wSrxsDG5DKIMxC81P0QrQTYai8zFNY+umuoHWRPbQ/TuuDEOju9E+jQDXmj6yI5GyejNuh8I+eg==", - "dev": true - }, - "node_modules/@tannin/plural-forms": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@tannin/plural-forms/-/plural-forms-1.1.0.tgz", - "integrity": "sha512-xl9R2mDZO/qiHam1AgMnAES6IKIg7OBhcXqy6eDsRCdXuxAFPcjrej9HMjyCLE0DJ/8cHf0i5OQTstuBRhpbHw==", - "dev": true, - "dependencies": { - "@tannin/compile": "^1.1.0" - } - }, - "node_modules/@tannin/postfix": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@tannin/postfix/-/postfix-1.1.0.tgz", - "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==", - "dev": true - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", - "dev": true - }, - "node_modules/@trysound/sax": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", - "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/bonjour": { - "version": "3.5.13", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", - "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", - "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", - "dev": true, - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", - "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", - "dev": true, - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true - }, - "node_modules/@types/http-proxy": { - "version": "1.17.14", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", - "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, - "node_modules/@types/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.14.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.4.tgz", - "integrity": "sha512-1ChboN+57suCT2t/f8lwtPY/k3qTpuD/qnqQuYoBg6OQOcPyaw7PiZVdGpaZYAvhDDtqrt0oAaM8+oSu1xsUGw==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", - "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.15", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", - "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, - "node_modules/@types/send": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", - "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-index": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", - "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", - "dev": true, - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.7", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", - "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*", - "@types/send": "*" - } - }, - "node_modules/@types/sockjs": { - "version": "0.3.36", - "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", - "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/source-list-map": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.6.tgz", - "integrity": "sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==", - "dev": true - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true - }, - "node_modules/@types/tapable": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.12.tgz", - "integrity": "sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==", - "dev": true - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "node_modules/@types/uglify-js": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz", - "integrity": "sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/@types/uglify-js/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@types/webpack": { - "version": "4.41.38", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz", - "integrity": "sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/tapable": "^1", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "anymatch": "^3.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/@types/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.7.3" - } - }, - "node_modules/@types/webpack/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true - }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "dev": true, - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@wordpress/api-fetch": { - "version": "6.55.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.55.0.tgz", - "integrity": "sha512-1HrCUsJdeRY5Y0IjplotINwqMRO81e7O7VhBScuKk7iOuDm/E1ioKv2uLGnPNWziYu+Zf025byxOqVzXDyM2gw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.58.0", - "@wordpress/url": "^3.59.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/babel-plugin-import-jsx-pragma": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.41.0.tgz", - "integrity": "sha512-hYxj2Uobxk86ctlfaJou9v13XqXZ30yx4ZwRNu5cH5/LWXe2MIXBTPv7dUk6wqN/qFOjsFvP9jCB0NsW6MnkrA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@babel/core": "^7.12.9" - } - }, - "node_modules/@wordpress/babel-preset-default": { - "version": "7.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.42.0.tgz", - "integrity": "sha512-AWSxWuEuzazt/nWomKiaVhYQeXuqxTniPCKhvks58wB3P4UXvSe3hRnO+nujz20IuxIk2xHT6x47HgpDZy30jw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-runtime": "^7.16.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-typescript": "^7.16.0", - "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.41.0", - "@wordpress/browserslist-config": "^5.41.0", - "@wordpress/warning": "^2.58.0", - "browserslist": "^4.21.10", - "core-js": "^3.31.0", - "react": "^18.3.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@wordpress/base-styles": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.49.0.tgz", - "integrity": "sha512-yFRYqNtd26ULZ0oAHhCu/IcaA0XHI3E7kRCKajZqUvyRQj7YprXnpD3o0/pnwvF6ZFTXzCX8pXHjUc2TIv97ig==", - "dev": true - }, - "node_modules/@wordpress/browserslist-config": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.41.0.tgz", - "integrity": "sha512-J7ejzzDpPZddVIiq2YiK8J/pNTJDy3X1s+5ZtwkwklCxBMZJurxf9pEhtbaf7us0Q6c1j8Ubv7Fpx3lqk2ypxA==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@wordpress/dependency-extraction-webpack-plugin": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.9.0.tgz", - "integrity": "sha512-hXbCkbG1XES47t7hFSETRrLfaRSPyQPlCnhlCx7FfhYFD0wh1jVArApXX5dD+A6wTrayXX/a16MpfaNqE662XA==", - "dev": true, - "dependencies": { - "json2php": "^0.0.7" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.26.0.tgz", - "integrity": "sha512-4KFyQ3IsYIJaIvOQ1qhAHhRISs9abNToF/bktfMNxQiEJsmbNn7lq/IbaY+shqwdBWVg8TQtLcL4MpSl0ISaxQ==", - "dev": true, - "dependencies": { - "@wordpress/api-fetch": "^6.55.0", - "@wordpress/keycodes": "^3.58.0", - "@wordpress/url": "^3.59.0", - "change-case": "^4.1.2", - "form-data": "^4.0.0", - "get-port": "^5.1.1", - "lighthouse": "^10.4.0", - "mime": "^3.0.0", - "web-vitals": "^3.5.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@playwright/test": ">=1" - } - }, - "node_modules/@wordpress/eslint-plugin": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", - "integrity": "sha512-5eGpXEwaZsKbEh9040nVr4ggmrpPmltP+Ie4iGruWvCme6ZIFYw70CyWEV8S102IkqjH/BaH6d+CWg8tN7sc/g==", - "dev": true, - "dependencies": { - "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.42.0", - "@wordpress/prettier-config": "^3.15.0", - "cosmiconfig": "^7.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-jsdoc": "^46.4.6", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-playwright": "^0.15.3", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-react": "^7.27.0", - "eslint-plugin-react-hooks": "^4.3.0", - "globals": "^13.12.0", - "requireindex": "^1.2.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6.14.4" - }, - "peerDependencies": { - "@babel/core": ">=7", - "eslint": ">=8", - "prettier": ">=3", - "typescript": ">=4" - }, - "peerDependenciesMeta": { - "prettier": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@wordpress/eslint-plugin/node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@wordpress/eslint-plugin/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@wordpress/eslint-plugin/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@wordpress/hooks": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.58.0.tgz", - "integrity": "sha512-9LB0ZHnZRQlORttux9t/xbAskF+dk2ujqzPGsVzc92mSKpQP3K2a5Wy74fUnInguB1vLUNHT6nrNdkVom5qX1Q==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/i18n": { - "version": "4.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.58.0.tgz", - "integrity": "sha512-VfvS3BWv/RDjRKD6PscIcvYfWKnGJcI/DEqyDgUMhxCM6NRwoL478CsUKTiGJIymeyRodNRfprdcF086DpGKYw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.58.0", - "gettext-parser": "^1.3.1", - "memize": "^2.1.0", - "sprintf-js": "^1.1.1", - "tannin": "^1.2.0" - }, - "bin": { - "pot-to-php": "tools/pot-to-php.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/jest-console": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.29.0.tgz", - "integrity": "sha512-/9PZJhyszdRX4mka7t1WzoooM+Q/DwC4jkNVtJxqci5lbL3Lrhy1cCJGCgMr1n/9w+zs7eLmExFBvV4v44iyNw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "jest-matcher-utils": "^29.6.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "jest": ">=29" - } - }, - "node_modules/@wordpress/jest-preset-default": { - "version": "11.29.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.29.0.tgz", - "integrity": "sha512-7LA0ZS5t0Thn7xrdwPL3hLgjB9LKloneGhMwnnDUTgJP330lyfdDfJ+O6Lnz3iL+bg68mkA3AzrT9Fs9f3WKww==", - "dev": true, - "dependencies": { - "@wordpress/jest-console": "^7.29.0", - "babel-jest": "^29.6.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@babel/core": ">=7", - "jest": ">=29" - } - }, - "node_modules/@wordpress/keycodes": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.58.0.tgz", - "integrity": "sha512-Q/LRKpx8ndzuHlkxSQ2BD+NTYYKQPIneNNMng8hTAfyU7RFwXpqj06HpeOFGh4XIdPKCs/8hmucoLJRmmLmZJA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.58.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/npm-package-json-lint-config": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.43.0.tgz", - "integrity": "sha512-XSb7AdDC7yGTBVYeRM4oqmOygEB+/+tk7lobLIGDmlZJs+M3F/NUvQq0Vcas1pojq2fyPYTUwOlu81ga33fNwQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "npm-package-json-lint": ">=6.0.0" - } - }, - "node_modules/@wordpress/postcss-plugins-preset": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.42.0.tgz", - "integrity": "sha512-5xmKF7IUsqS5JcmJlHKHq7RaR6ZpaLj3n9c+X0X0/Oo7ZCIGp6WeDQngx13sH4NJoKXrZ9g4n1rbzhEKeo/Wtg==", - "dev": true, - "dependencies": { - "@wordpress/base-styles": "^4.49.0", - "autoprefixer": "^10.2.5" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/@wordpress/prettier-config": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.15.0.tgz", - "integrity": "sha512-exC2rkEioTt//AnzPRyaaFv8FNYIvamPDytNol5bKQ6Qh65QSdZZE9V+GtRCrIPL7/Bq6xba03XuRVxl9TjtJg==", - "dev": true, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "prettier": ">=3" - } - }, - "node_modules/@wordpress/scripts": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.9.0.tgz", - "integrity": "sha512-ohiDHMnfTTBTi7qS7AVJZUi1dxwg0k3Aav1a8CzUoOE8YoT8tvMQ3W89H9XgqMgMTWUCdgTUBYLTJTivfVVbXQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.16.0", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", - "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.42.0", - "@wordpress/browserslist-config": "^5.41.0", - "@wordpress/dependency-extraction-webpack-plugin": "^5.9.0", - "@wordpress/e2e-test-utils-playwright": "^0.26.0", - "@wordpress/eslint-plugin": "^18.1.0", - "@wordpress/jest-preset-default": "^11.29.0", - "@wordpress/npm-package-json-lint-config": "^4.43.0", - "@wordpress/postcss-plugins-preset": "^4.42.0", - "@wordpress/prettier-config": "^3.15.0", - "@wordpress/stylelint-config": "^21.41.0", - "adm-zip": "^0.5.9", - "babel-jest": "^29.6.2", - "babel-loader": "^8.2.3", - "browserslist": "^4.21.10", - "chalk": "^4.0.0", - "check-node-version": "^4.1.0", - "clean-webpack-plugin": "^3.0.0", - "copy-webpack-plugin": "^10.2.0", - "cross-spawn": "^5.1.0", - "css-loader": "^6.2.0", - "cssnano": "^6.0.1", - "cwd": "^0.10.0", - "dir-glob": "^3.0.1", - "eslint": "^8.3.0", - "expect-puppeteer": "^4.4.0", - "fast-glob": "^3.2.7", - "filenamify": "^4.2.0", - "jest": "^29.6.2", - "jest-dev-server": "^9.0.1", - "jest-environment-jsdom": "^29.6.2", - "jest-environment-node": "^29.6.2", - "markdownlint-cli": "^0.31.1", - "merge-deep": "^3.0.3", - "mini-css-extract-plugin": "^2.5.1", - "minimist": "^1.2.0", - "npm-package-json-lint": "^6.4.0", - "npm-packlist": "^3.0.0", - "postcss": "^8.4.5", - "postcss-loader": "^6.2.1", - "prettier": "npm:wp-prettier@3.0.3", - "puppeteer-core": "^13.2.0", - "react-refresh": "^0.14.0", - "read-pkg-up": "^7.0.1", - "resolve-bin": "^0.4.0", - "rtlcss-webpack-plugin": "^4.0.7", - "sass": "^1.35.2", - "sass-loader": "^12.1.0", - "source-map-loader": "^3.0.0", - "stylelint": "^14.2.0", - "terser-webpack-plugin": "^5.3.9", - "url-loader": "^4.1.1", - "webpack": "^5.88.2", - "webpack-bundle-analyzer": "^4.9.1", - "webpack-cli": "^5.1.4", - "webpack-dev-server": "^4.15.1" - }, - "bin": { - "wp-scripts": "bin/wp-scripts.js" - }, - "engines": { - "node": ">=18", - "npm": ">=6.14.4" - }, - "peerDependencies": { - "@playwright/test": "^1.43.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" - } - }, - "node_modules/@wordpress/scripts/node_modules/css-loader": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", - "integrity": "sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.33", - "postcss-modules-extract-imports": "^3.1.0", - "postcss-modules-local-by-default": "^4.0.5", - "postcss-modules-scope": "^3.2.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "@rspack/core": { - "optional": true - }, - "webpack": { - "optional": true - } - } - }, - "node_modules/@wordpress/scripts/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@wordpress/stylelint-config": { - "version": "21.41.0", - "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.41.0.tgz", - "integrity": "sha512-2wxFu8ICeRGF3Lxz7H7o2SU1u6pTI4mjuog39DgtCNb+v+f6yhgREDuNQEeti3Svb0rjj63AJ7r2CqLZk+EQIQ==", - "dev": true, - "dependencies": { - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-recommended-scss": "^5.0.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "stylelint": "^14.2" - } - }, - "node_modules/@wordpress/url": { - "version": "3.59.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.59.0.tgz", - "integrity": "sha512-GxvoMjYCav0w4CiX0i0h3qflrE/9rhLIZg5aPCQjbrBdwTxYR3Exfw0IJYcmVaTKXQOUU8fOxlDxULsbLmKe9w==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.0", - "remove-accents": "^0.5.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@wordpress/warning": { - "version": "2.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.58.0.tgz", - "integrity": "sha512-9bZlORhyMY2nbWozeyC5kqJsFzEPP4DCLhGmjtbv+YWGHttUrxUZEfrKdqO+rUODA8rP5zeIly1nCQOUnkw4Lg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "deprecated": "Use your platform's native atob() and btoa() methods instead", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", - "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", - "dev": true, - "dependencies": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/adm-zip": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.14.tgz", - "integrity": "sha512-DnyqqifT4Jrcvb8USYjp6FHtBpEIz1mnXu6pTRHZ0RL69LbQYiO+0lDFg5+OKA7U29oWSs3a/i8fhn8ZcceIWg==", - "dev": true, - "engines": { - "node": ">=12.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true, - "peerDependencies": { - "ajv": ">=5.0.0" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-html": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.9.tgz", - "integrity": "sha512-ozbS3LuenHVxNRh/wdnN16QapUHzauqSomAl1jwwJRRsGwFwtj644lIhxfWu0Fy0acCij2+AEgHvjscq3dlVXg==", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "bin": { - "ansi-html": "bin/ansi-html" - } - }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "bin": { - "ansi-html": "bin/ansi-html" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/argparse/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ast-types": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", - "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", - "dev": true, - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/autoprefixer": { - "version": "10.4.19", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", - "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-lite": "^1.0.30001599", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axe-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", - "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, - "node_modules/b4a": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", - "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==", - "dev": true - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-loader": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", - "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", - "dev": true, - "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 8.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, - "node_modules/babel-loader/node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", - "semver": "^6.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", - "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1", - "core-js-compat": "^3.36.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", - "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "integrity": "sha512-zeCYxDePWYAT/DfmQWIHsMSFW2vv45UIwIAMjGvQVsTd47RwsiRH0uK1yzyWZ7LDBKdhnGDPM6NYEO5CZyhPrg==", - "dev": true, - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - } - }, - "node_modules/babel-runtime/node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bare-events": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.4.2.tgz", - "integrity": "sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==", - "dev": true, - "optional": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/bonjour-service": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", - "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "multicast-dns": "^7.2.5" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/camelcase-keys/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/capital-case": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", - "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/change-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", - "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/check-node-version": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.2.1.tgz", - "integrity": "sha512-YYmFYHV/X7kSJhuN/QYHUu998n/TRuDe8UenM3+m5NrkiH670lb9ILqHIvBencvJc4SDh+XcbXMR4b+TtubJiw==", - "dev": true, - "dependencies": { - "chalk": "^3.0.0", - "map-values": "^1.0.1", - "minimist": "^1.2.0", - "object-filter": "^1.0.2", - "run-parallel": "^1.1.4", - "semver": "^6.3.0" - }, - "bin": { - "check-node-version": "bin.js" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "node_modules/check-node-version/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/chrome-launcher": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", - "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "escape-string-regexp": "^4.0.0", - "is-wsl": "^2.2.0", - "lighthouse-logger": "^1.0.0" - }, - "bin": { - "print-chrome-path": "bin/print-chrome-path.js" - }, - "engines": { - "node": ">=12.13.0" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", - "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", - "dev": true - }, - "node_modules/clean-webpack-plugin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", - "integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==", - "dev": true, - "dependencies": { - "@types/webpack": "^4.4.31", - "del": "^4.1.1" - }, - "engines": { - "node": ">=8.9.0" - }, - "peerDependencies": { - "webpack": "*" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clone-deep": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", - "integrity": "sha512-we+NuQo2DHhSl+DP6jlUiAhyAjBQrYnpOk15rN6c6JSPScjiCLh8IbSU+VTcph6YS3o7mASE8a0+gbZ7ChLpgg==", - "dev": true, - "dependencies": { - "for-own": "^0.1.3", - "is-plain-object": "^2.0.1", - "kind-of": "^3.0.2", - "lazy-cache": "^1.0.3", - "shallow-clone": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colord": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/configstore/node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, - "node_modules/copy-webpack-plugin": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz", - "integrity": "sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg==", - "dev": true, - "dependencies": { - "fast-glob": "^3.2.7", - "glob-parent": "^6.0.1", - "globby": "^12.0.2", - "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" - }, - "engines": { - "node": ">= 12.20.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/array-union": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", - "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/copy-webpack-plugin/node_modules/globby": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", - "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", - "dev": true, - "dependencies": { - "array-union": "^3.0.1", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.7", - "ignore": "^5.1.9", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/copy-webpack-plugin/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/core-js": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", - "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", - "dev": true, - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", - "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-pure": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.1.tgz", - "integrity": "sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA==", - "dev": true, - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "dependencies": { - "node-fetch": "2.6.7" - } - }, - "node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "node_modules/cross-spawn/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/cross-spawn/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/csp_evaluator": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/csp_evaluator/-/csp_evaluator-1.1.1.tgz", - "integrity": "sha512-N3ASg0C4kNPUaNxt1XAvzHIVuzdtr8KLgfk1O8WDyimp1GisPAHESupArO2ieHk9QWbrJ/WkQODyh21Ps/xhxw==", - "dev": true - }, - "node_modules/css-declaration-sorter": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", - "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.0.9" - } - }, - "node_modules/css-functions-list": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", - "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", - "dev": true, - "engines": { - "node": ">=12 || >=16" - } - }, - "node_modules/css-loader": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", - "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.33", - "postcss-modules-extract-imports": "^3.1.0", - "postcss-modules-local-by-default": "^4.0.5", - "postcss-modules-scope": "^3.2.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "@rspack/core": "0.x || 1.x", - "webpack": "^5.27.0" - }, - "peerDependenciesMeta": { - "@rspack/core": { - "optional": true - }, - "webpack": { - "optional": true - } - } - }, - "node_modules/css-loader/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cssnano": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", - "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", - "dev": true, - "dependencies": { - "cssnano-preset-default": "^6.1.2", - "lilconfig": "^3.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/cssnano" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/cssnano-preset-default": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", - "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "css-declaration-sorter": "^7.2.0", - "cssnano-utils": "^4.0.2", - "postcss-calc": "^9.0.1", - "postcss-colormin": "^6.1.0", - "postcss-convert-values": "^6.1.0", - "postcss-discard-comments": "^6.0.2", - "postcss-discard-duplicates": "^6.0.3", - "postcss-discard-empty": "^6.0.3", - "postcss-discard-overridden": "^6.0.2", - "postcss-merge-longhand": "^6.0.5", - "postcss-merge-rules": "^6.1.1", - "postcss-minify-font-values": "^6.1.0", - "postcss-minify-gradients": "^6.0.3", - "postcss-minify-params": "^6.1.0", - "postcss-minify-selectors": "^6.0.4", - "postcss-normalize-charset": "^6.0.2", - "postcss-normalize-display-values": "^6.0.2", - "postcss-normalize-positions": "^6.0.2", - "postcss-normalize-repeat-style": "^6.0.2", - "postcss-normalize-string": "^6.0.2", - "postcss-normalize-timing-functions": "^6.0.2", - "postcss-normalize-unicode": "^6.1.0", - "postcss-normalize-url": "^6.0.2", - "postcss-normalize-whitespace": "^6.0.2", - "postcss-ordered-values": "^6.0.2", - "postcss-reduce-initial": "^6.1.0", - "postcss-reduce-transforms": "^6.0.2", - "postcss-svgo": "^6.0.3", - "postcss-unique-selectors": "^6.0.4" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/cssnano-utils": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", - "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "dev": true, - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "dev": true - }, - "node_modules/cssom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", - "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", - "dev": true - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - }, - "node_modules/cwd": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", - "integrity": "sha512-YGZxdTTL9lmLkCUTpg4j0zQ7IhRB5ZmqNBbGCl3Tg6MP/d5/6sY7L5mmTjzbc6JKgVZYiqTQTNhPFsbXNGlRaA==", - "dev": true, - "dependencies": { - "find-pkg": "^0.1.2", - "fs-exists-sync": "^0.1.0" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true - }, - "node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", - "dev": true, - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", - "dev": true, - "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/del": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", - "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", - "dev": true, - "dependencies": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/del/node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", - "dev": true, - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del/node_modules/globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", - "dev": true, - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del/node_modules/globby/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true - }, - "node_modules/devtools-protocol": { - "version": "0.0.1155343", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1155343.tgz", - "integrity": "sha512-oD9vGBV2wTc7fAzAM6KC0chSgs234V8+qDEeK+mcbRj2UvcuA7lgBztGi/opj/iahcXD3BSj8Ymvib628yy9FA==", - "dev": true - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dns-packet": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", - "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", - "dev": true, - "dependencies": { - "@leichtgewicht/ip-codec": "^2.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", - "dev": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", - "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/envinfo": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", - "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/error-stack-parser": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", - "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", - "dev": true, - "dependencies": { - "stackframe": "^1.3.4" - } - }, - "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", - "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", - "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", - "dev": true - }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^5.10.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", - "jest": "*" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-jest/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-jest/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "46.10.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", - "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", - "dev": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.41.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.3.4", - "escape-string-regexp": "^4.0.0", - "esquery": "^1.5.0", - "is-builtin-module": "^3.2.1", - "semver": "^7.5.4", - "spdx-expression-parse": "^4.0.0" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", - "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.23.2", - "aria-query": "^5.3.0", - "array-includes": "^3.1.7", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "=4.7.0", - "axobject-query": "^3.2.1", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.15", - "hasown": "^2.0.0", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-playwright": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.15.3.tgz", - "integrity": "sha512-LQMW5y0DLK5Fnpya7JR1oAYL2/7Y9wDiYw6VZqlKqcRGSgjbVKNqxraphk7ra1U3Bb5EK444xMgUlQPbMg2M1g==", - "dev": true, - "peerDependencies": { - "eslint": ">=7", - "eslint-plugin-jest": ">=25" - }, - "peerDependenciesMeta": { - "eslint-plugin-jest": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.34.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.2.tgz", - "integrity": "sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.3", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.19", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.8", - "object.fromentries": "^2.0.8", - "object.hasown": "^1.1.4", - "object.values": "^1.2.0", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-scope/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/execa/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/execa/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/execa/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expand-tilde": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", - "integrity": "sha512-rtmc+cjLZqnu9dSYosX9EWmSJhTwpACgJQTfj4hgg2JjOD/6SIQalZrt4a3aQeh++oNxkazcaxrhPUj6+g5G/Q==", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect-puppeteer": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/expect-puppeteer/-/expect-puppeteer-4.4.0.tgz", - "integrity": "sha512-6Ey4Xy2xvmuQu7z7YQtMsaMV0EHJRpVxIDOd5GRrm04/I3nkTKIutELfECsLp6le+b3SSa3cXhPiw6PgqzxYWA==", - "dev": true - }, - "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", - "dev": true, - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.2", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.6.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/filenamify": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz", - "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==", - "dev": true, - "dependencies": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.1", - "trim-repeated": "^1.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-file-up": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", - "integrity": "sha512-mBxmNbVyjg1LQIIpgO8hN+ybWBgDQK8qjht+EbrTCGmmPV/sc7RF1i9stPTD6bpvXZywBdrwRYxhSdJv867L6A==", - "dev": true, - "dependencies": { - "fs-exists-sync": "^0.1.0", - "resolve-dir": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/find-parent-dir": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.1.tgz", - "integrity": "sha512-o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A==", - "dev": true - }, - "node_modules/find-pkg": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", - "integrity": "sha512-0rnQWcFwZr7eO0513HahrWafsc3CTFioEB7DRiEYCUM/70QXSY8f3mCST17HXLcPvEhzH/Ty/Bxd72ZZsr/yvw==", - "dev": true, - "dependencies": { - "find-file-up": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/find-process": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/find-process/-/find-process-1.4.7.tgz", - "integrity": "sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "commander": "^5.1.0", - "debug": "^4.1.1" - }, - "bin": { - "find-process": "bin/find-process.js" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha512-SKmowqGTJoPzLO1T0BBJpkfp3EMacCMOuH40hOUbrbzElVktk4DioXVM99QkLCyKoiuOmyjgcWMpVz2xjE7LZw==", - "dev": true, - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "patreon", - "url": "https://github.com/sponsors/rawify" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/fs-exists-sync": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fs-extra/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/fs-monkey": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", - "integrity": "sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-port": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", - "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stdin": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", - "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-uri": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", - "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", - "dev": true, - "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4", - "fs-extra": "^11.2.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/gettext-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.4.0.tgz", - "integrity": "sha512-sedZYLHlHeBop/gZ1jdg59hlUEcpcZJofLq2JFwJT1zTqAU3l2wFv6IsuwFHGqbiT9DWzMUW4/em2+hspnmMMA==", - "dev": true, - "dependencies": { - "encoding": "^0.1.12", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/global-modules": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "integrity": "sha512-JeXuCbvYzYXcwE6acL9V2bAOeSIGl4dD+iwLY9iUx2VBJJ80R18HCn+JCwHM9Oegdfya3lEkGCdaRkSyc10hDA==", - "dev": true, - "dependencies": { - "global-prefix": "^0.1.4", - "is-windows": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "integrity": "sha512-gOPiyxcD9dJGCEArAhF4Hd0BAqvAe/JzERP7tYumE4yIkmIedPUVXcJFWbV3/p/ovIIvKjkrTk+f1UVkq7vvbw==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.0", - "ini": "^1.3.4", - "is-windows": "^0.2.0", - "which": "^1.2.12" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globjoin": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", - "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", - "dev": true - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true - }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/header-case": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", - "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", - "dev": true, - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/hpack.js/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/hpack.js/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/hpack.js/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/hpack.js/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/html-entities": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", - "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ] - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "dev": true - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-link-header": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.3.tgz", - "integrity": "sha512-3cZ0SRL8fb9MUlU3mKM61FcQvPfXx2dBrZW3Vbg5CXa8jFlK8OaEpePenLe1oEXQduhz8b0QjsqfS59QP4AJDQ==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", - "dev": true, - "dependencies": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-walk": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", - "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/ignore-walk/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/image-ssim": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/image-ssim/-/image-ssim-0.2.0.tgz", - "integrity": "sha512-W7+sO6/yhxy83L0G7xR8YAc5Z5QFtYEXXRV6EaE8tuYBZJnA3gVgp3q7X7muhLZVodeb9UfvjSbwt9VJwjIYAg==", - "dev": true - }, - "node_modules/immutable": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", - "dev": true - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/intl-messageformat": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-4.4.0.tgz", - "integrity": "sha512-z+Bj2rS3LZSYU4+sNitdHrwnBhr0wO80ZJSW8EzKDBowwUe3Q/UsvgCGjrwa+HPzoGCLEb9HAjfJgo4j2Sac8w==", - "dev": true, - "dependencies": { - "intl-messageformat-parser": "^1.8.1" - } - }, - "node_modules/intl-messageformat-parser": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.8.1.tgz", - "integrity": "sha512-IMSCKVf0USrM/959vj3xac7s8f87sc+80Y/ipBzdKy4ifBv5Gsj2tZ41EAaURVg01QU71fYr77uA8Meh6kELbg==", - "deprecated": "We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser", - "dev": true - }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dev": true, - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/ipaddr.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", - "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/irregular-plurals": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", - "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, - "dependencies": { - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", - "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", - "dev": true, - "dependencies": { - "is-path-inside": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-in-cwd/node_modules/is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", - "dev": true, - "dependencies": { - "path-is-inside": "^1.0.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-windows": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", - "integrity": "sha512-n67eJYmXbniZB7RF4I/FTjK1s6RPOCTxhYrVYLRaCt3lF0mpWZPKr3T2LSZAqyjQsxR2qMmGYXXzK0YWwcPM1Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-dev-server": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-9.0.2.tgz", - "integrity": "sha512-Zc/JB0IlNNrpXkhBw+h86cGrde/Mey52KvF+FER2eyrtYJTHObOwW7Iarxm3rPyTKby5+3Y2QZtl8pRz/5GCxg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "cwd": "^0.10.0", - "find-process": "^1.4.7", - "prompts": "^2.4.2", - "spawnd": "^9.0.2", - "tree-kill": "^1.2.2", - "wait-on": "^7.2.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", - "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/joi": { - "version": "17.13.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.1.tgz", - "integrity": "sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" - } - }, - "node_modules/jpeg-js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", - "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==", - "dev": true - }, - "node_modules/js-library-detector": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.7.0.tgz", - "integrity": "sha512-c80Qupofp43y4cJ7+8TTDN/AsDwLi5oOm/plBrWI+iQt485vKXCco+yVmOwEgdo9VOdsYTuV0UlTeetVPTriXA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true - }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", - "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", - "dev": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json2php": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/json2php/-/json2php-0.0.7.tgz", - "integrity": "sha512-dnSoUiLAoVaMXxFsVi4CrPVYMKOuDBXTghXSmMINX44RZ8WM9cXlY7UqrQnlAcODCVO7FV3+8t/5nDKAjimLfg==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonfile/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/klona": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", - "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/known-css-properties": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz", - "integrity": "sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==", - "dev": true - }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/launch-editor": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.7.0.tgz", - "integrity": "sha512-KAc66u6LxWL8MifQ94oG3YGKYWDwz/Gi0T15lN//GaQoZe08vQGFJxrXkPAeu50UXgvJPPaRKVGuP1TRUm/aHQ==", - "dev": true, - "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" - } - }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lighthouse": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-10.4.0.tgz", - "integrity": "sha512-XQWHEWkJ8YxSPsxttBJORy5+hQrzbvGkYfeP3fJjyYKioWkF2MXfFqNK4ZuV4jL8pBu7Z91qnQP6In0bq1yXww==", - "dev": true, - "dependencies": { - "@sentry/node": "^6.17.4", - "axe-core": "4.7.2", - "chrome-launcher": "^0.15.2", - "configstore": "^5.0.1", - "csp_evaluator": "1.1.1", - "devtools-protocol": "0.0.1155343", - "enquirer": "^2.3.6", - "http-link-header": "^1.1.1", - "intl-messageformat": "^4.4.0", - "jpeg-js": "^0.4.4", - "js-library-detector": "^6.6.0", - "lighthouse-logger": "^1.4.1", - "lighthouse-stack-packs": "1.11.0", - "lodash": "^4.17.21", - "lookup-closest-locale": "6.2.0", - "metaviewport-parser": "0.3.0", - "open": "^8.4.0", - "parse-cache-control": "1.0.1", - "ps-list": "^8.0.0", - "puppeteer-core": "^20.8.0", - "robots-parser": "^3.0.0", - "semver": "^5.3.0", - "speedline-core": "^1.4.3", - "third-party-web": "^0.23.3", - "ws": "^7.0.0", - "yargs": "^17.3.1", - "yargs-parser": "^21.0.0" - }, - "bin": { - "chrome-debug": "core/scripts/manual-chrome-launcher.js", - "lighthouse": "cli/index.js", - "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" - }, - "engines": { - "node": ">=16.16" - } - }, - "node_modules/lighthouse-logger": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", - "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", - "dev": true, - "dependencies": { - "debug": "^2.6.9", - "marky": "^1.2.2" - } - }, - "node_modules/lighthouse-logger/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/lighthouse-logger/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/lighthouse-stack-packs": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.11.0.tgz", - "integrity": "sha512-sRr0z1S/I26VffRLq9KJsKtLk856YrJlNGmcJmbLX8dFn3MuzVPUbstuChEhqnSxZb8TZmVfthuXuwhG9vRoSw==", - "dev": true - }, - "node_modules/lighthouse/node_modules/axe-core": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", - "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/lighthouse/node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/lighthouse/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/lighthouse/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/lighthouse/node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", - "dev": true, - "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" - }, - "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/lighthouse/node_modules/puppeteer-core/node_modules/chromium-bidi": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", - "integrity": "sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==", - "dev": true, - "dependencies": { - "mitt": "3.0.0" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, - "node_modules/lighthouse/node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", - "dev": true - }, - "node_modules/lighthouse/node_modules/puppeteer-core/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/lighthouse/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/lighthouse/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/lighthouse/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/lighthouse/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/lighthouse/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", - "dev": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lookup-closest-locale": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/lookup-closest-locale/-/lookup-closest-locale-6.2.0.tgz", - "integrity": "sha512-/c2kL+Vnp1jnV6K6RpDTHK3dgg0Tu2VVp+elEiJpjfS1UyY7AjOYHohRug6wT0OpoX2qFgNORndE9RqesfVxWQ==", - "dev": true - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/map-values": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-values/-/map-values-1.0.1.tgz", - "integrity": "sha512-BbShUnr5OartXJe1GeccAWtfro11hhgNJg6G9/UtWKjVGvV5U4C09cg5nk8JUevhXODaXY+hQ3xxMUKSs62ONQ==", - "dev": true - }, - "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdown-it/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/markdown-it/node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/markdownlint": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.25.1.tgz", - "integrity": "sha512-AG7UkLzNa1fxiOv5B+owPsPhtM4D6DoODhsJgiaNg1xowXovrYgOnLqAgOOFQpWOlHFVQUzjMY5ypNNTeov92g==", - "dev": true, - "dependencies": { - "markdown-it": "12.3.2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/markdownlint-cli": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.31.1.tgz", - "integrity": "sha512-keIOMwQn+Ch7MoBwA+TdkyVMuxAeZFEGmIIlvwgV0Z1TGS5MxPnRr29XCLhkNzCHU+uNKGjU+VEjLX+Z9kli6g==", - "dev": true, - "dependencies": { - "commander": "~9.0.0", - "get-stdin": "~9.0.0", - "glob": "~7.2.0", - "ignore": "~5.2.0", - "js-yaml": "^4.1.0", - "jsonc-parser": "~3.0.0", - "markdownlint": "~0.25.1", - "markdownlint-rule-helpers": "~0.16.0", - "minimatch": "~3.0.5", - "run-con": "~1.2.10" - }, - "bin": { - "markdownlint": "markdownlint.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/markdownlint-cli/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/markdownlint-cli/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/markdownlint-cli/node_modules/commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/markdownlint-cli/node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/markdownlint-cli/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/markdownlint-cli/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/markdownlint-rule-helpers": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz", - "integrity": "sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==", - "dev": true - }, - "node_modules/marky": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", - "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", - "dev": true - }, - "node_modules/mathml-tag-names": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", - "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", - "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", - "dev": true, - "dependencies": { - "fs-monkey": "^1.0.4" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/memize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/memize/-/memize-2.1.0.tgz", - "integrity": "sha512-yywVJy8ctVlN5lNPxsep5urnZ6TTclwPEyigM9M3Bi8vseJBOfqNrGWN/r8NzuIt3PovM323W04blJfGQfQSVg==", - "dev": true - }, - "node_modules/meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", - "dev": true, - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/meow/node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/meow/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge-deep": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", - "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "clone-deep": "^0.2.4", - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/metaviewport-parser": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/metaviewport-parser/-/metaviewport-parser-0.3.0.tgz", - "integrity": "sha512-EoYJ8xfjQ6kpe9VbVHvZTZHiOl4HL1Z18CrZ+qahvLXT7ZO4YTC2JMyt5FaUp9JJp6J4Ybb/z7IsCXZt86/QkQ==", - "dev": true - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/mini-css-extract-plugin": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz", - "integrity": "sha512-Zs1YsZVfemekSZG+44vBsYTLQORkPMwnlv+aehcxK/NLKC+EGhDB39/YePYYqx/sTk6NnYpuqikhSn7+JIevTA==", - "dev": true, - "dependencies": { - "schema-utils": "^4.0.0", - "tapable": "^2.2.1" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minimist-options/node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/minimist-options/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", - "dev": true - }, - "node_modules/mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==", - "dev": true, - "dependencies": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mixin-object/node_modules/for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha512-F0to7vbBSHP8E3l6dCjxNOLuSFAACIxFy3UehTUlG7svlXi37HHsDkyVcHo0Pq8QwrE+pXvWSVX3ZT1T9wAZ9g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/multicast-dns": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", - "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", - "dev": true, - "dependencies": { - "dns-packet": "^5.2.2", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "dev": true, - "engines": { - "node": ">= 6.13.0" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", - "dev": true, - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true - }, - "node_modules/npm-package-json-lint": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-6.4.0.tgz", - "integrity": "sha512-cuXAJJB1Rdqz0UO6w524matlBqDBjcNt7Ru+RDIu4y6RI1gVqiWBnylrK8sPRk81gGBA0X8hJbDXolVOoTc+sA==", - "dev": true, - "dependencies": { - "ajv": "^6.12.6", - "ajv-errors": "^1.0.1", - "chalk": "^4.1.2", - "cosmiconfig": "^8.0.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "ignore": "^5.2.0", - "is-plain-obj": "^3.0.0", - "jsonc-parser": "^3.2.0", - "log-symbols": "^4.1.0", - "meow": "^9.0.0", - "plur": "^4.0.0", - "semver": "^7.3.8", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1", - "type-fest": "^3.2.0", - "validate-npm-package-name": "^5.0.0" - }, - "bin": { - "npmPkgJsonLint": "dist/cli.js" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" - } - }, - "node_modules/npm-package-json-lint/node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, - "node_modules/npm-package-json-lint/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm-package-json-lint/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-packlist": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", - "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", - "dev": true, - "dependencies": { - "glob": "^7.1.6", - "ignore-walk": "^4.0.1", - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - }, - "bin": { - "npm-packlist": "bin/index.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/nwsapi": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", - "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==", - "dev": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-filter": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-filter/-/object-filter-1.0.2.tgz", - "integrity": "sha512-NahvP2vZcy1ZiiYah30CEPw0FpDcSkSePJBMpzl5EQgCmISijiGuJm3SPYp7U+Lf2TljyaIw3E5EgkEx/TNEVA==", - "dev": true - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.hasown": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dev": true, - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pac-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", - "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", - "dev": true, - "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.2" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", - "dev": true, - "dependencies": { - "degenerator": "^5.0.0", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "dev": true - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", - "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/playwright": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.1.tgz", - "integrity": "sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg==", - "dev": true, - "peer": true, - "dependencies": { - "playwright-core": "1.44.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.44.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.1.tgz", - "integrity": "sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA==", - "dev": true, - "peer": true, - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/plur": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", - "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", - "dev": true, - "dependencies": { - "irregular-plurals": "^3.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-calc": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", - "integrity": "sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.2.2" - } - }, - "node_modules/postcss-colormin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.1.0.tgz", - "integrity": "sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0", - "colord": "^2.9.3", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-convert-values": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.1.0.tgz", - "integrity": "sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-comments": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", - "integrity": "sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-duplicates": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.3.tgz", - "integrity": "sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-empty": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.3.tgz", - "integrity": "sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-overridden": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.2.tgz", - "integrity": "sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-loader": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz", - "integrity": "sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==", - "dev": true, - "dependencies": { - "cosmiconfig": "^7.0.0", - "klona": "^2.0.5", - "semver": "^7.3.5" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "postcss": "^7.0.0 || ^8.0.1", - "webpack": "^5.0.0" - } - }, - "node_modules/postcss-loader/node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-loader/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-media-query-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", - "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", - "dev": true - }, - "node_modules/postcss-merge-longhand": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.5.tgz", - "integrity": "sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0", - "stylehacks": "^6.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-merge-rules": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.1.1.tgz", - "integrity": "sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0", - "cssnano-utils": "^4.0.2", - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-font-values": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.1.0.tgz", - "integrity": "sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-gradients": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.3.tgz", - "integrity": "sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==", - "dev": true, - "dependencies": { - "colord": "^2.9.3", - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-params": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.1.0.tgz", - "integrity": "sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-selectors": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.4.tgz", - "integrity": "sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", - "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-normalize-charset": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", - "integrity": "sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-display-values": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.2.tgz", - "integrity": "sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-positions": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.2.tgz", - "integrity": "sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-repeat-style": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.2.tgz", - "integrity": "sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-string": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.2.tgz", - "integrity": "sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-timing-functions": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.2.tgz", - "integrity": "sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-unicode": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.1.0.tgz", - "integrity": "sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-url": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.2.tgz", - "integrity": "sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-whitespace": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.2.tgz", - "integrity": "sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-ordered-values": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.2.tgz", - "integrity": "sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==", - "dev": true, - "dependencies": { - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-reduce-initial": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.1.0.tgz", - "integrity": "sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-reduce-transforms": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.2.tgz", - "integrity": "sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", - "dev": true - }, - "node_modules/postcss-safe-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", - "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", - "dev": true, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.3.3" - } - }, - "node_modules/postcss-scss": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", - "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss-scss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.4.29" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz", - "integrity": "sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-svgo": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.3.tgz", - "integrity": "sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0", - "svgo": "^3.2.0" - }, - "engines": { - "node": "^14 || ^16 || >= 18" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-unique-selectors": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.4.tgz", - "integrity": "sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "name": "wp-prettier", - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-3.0.3.tgz", - "integrity": "sha512-X4UlrxDTH8oom9qXlcjnydsjAOD2BmB6yFmvS4Z2zdTzqqpRWb+fbqrH412+l+OUXmbzJlSXjlMFYPgYG12IAA==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "node_modules/ps-list": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.1.tgz", - "integrity": "sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", - "dev": true, - "dependencies": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.981744", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.5.0" - }, - "engines": { - "node": ">=10.18.1" - } - }, - "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", - "dev": true - }, - "node_modules/puppeteer-core/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "dev": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true - }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", - "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", - "dev": true, - "dependencies": { - "@babel/regjsgen": "^0.8.0", - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/remove-accents": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.5.0.tgz", - "integrity": "sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requireindex": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", - "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", - "dev": true, - "engines": { - "node": ">=0.10.5" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-bin": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/resolve-bin/-/resolve-bin-0.4.3.tgz", - "integrity": "sha512-9u8TMpc+SEHXxQXblXHz5yRvRZERkCZimFN9oz85QI3uhkh7nqfjm6OGTLg+8vucpXGcY4jLK6WkylPmt7GSvw==", - "dev": true, - "dependencies": { - "find-parent-dir": "~0.3.0" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-dir": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "integrity": "sha512-QxMPqI6le2u0dCLyiGzgy92kjkkL6zO0XyvHzjdTNH3zM6e5Hz3BwG6+aEyNgiQ5Xz6PwTwgQEj3U50dByPKIA==", - "dev": true, - "dependencies": { - "expand-tilde": "^1.2.2", - "global-modules": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/robots-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.0.1.tgz", - "integrity": "sha512-s+pyvQeIKIZ0dx5iJiQk1tPLJAWln39+MI5jtM8wnyws+G5azk+dMnMX0qfbqNetKKNgcWWOdi0sfm+FbQbgdQ==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/rtlcss": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-3.5.0.tgz", - "integrity": "sha512-wzgMaMFHQTnyi9YOwsx9LjOxYXJPzS8sYnFaKm6R5ysvTkwzHiB0vxnbHwchHQT65PTdBjDG21/kQBWI7q9O7A==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.3.11", - "strip-json-comments": "^3.1.1" - }, - "bin": { - "rtlcss": "bin/rtlcss.js" - } - }, - "node_modules/rtlcss-webpack-plugin": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/rtlcss-webpack-plugin/-/rtlcss-webpack-plugin-4.0.7.tgz", - "integrity": "sha512-ouSbJtgcLBBQIsMgarxsDnfgRqm/AS4BKls/mz/Xb6HSl+PdEzefTR+Wz5uWQx4odoX0g261Z7yb3QBz0MTm0g==", - "dev": true, - "dependencies": { - "babel-runtime": "~6.25.0", - "rtlcss": "^3.5.0" - } - }, - "node_modules/rtlcss/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rtlcss/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rtlcss/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-con": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.12.tgz", - "integrity": "sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~3.0.0", - "minimist": "^1.2.8", - "strip-json-comments": "~3.1.1" - }, - "bin": { - "run-con": "cli.js" - } - }, - "node_modules/run-con/node_modules/ini": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-loader": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz", - "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", - "dev": true, - "dependencies": { - "klona": "^2.0.4", - "neo-async": "^2.6.2" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "sass": "^1.3.0", - "sass-embedded": "*", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - } - } - }, - "node_modules/saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dev": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true - }, - "node_modules/selfsigned": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", - "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", - "dev": true, - "dependencies": { - "@types/node-forge": "^1.3.0", - "node-forge": "^1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/sentence-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", - "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/serve-index/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/serve-index/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "node_modules/serve-index/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.1", - "kind-of": "^2.0.1", - "lazy-cache": "^0.2.3", - "mixin-object": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shallow-clone/node_modules/kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha512-0u8i1NZ/mg0b+W3MGGw5I7+6Eib2nx72S/QvXa0hYjEkjTknYmEYQJwGu3mLC0BrhtJjtQafTkyRUQ75Kx0LVg==", - "dev": true, - "dependencies": { - "is-buffer": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shallow-clone/node_modules/lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha512-gkX52wvU/R8DVMMt78ATVPFMJqfW8FPz1GZ1sVHBVQHmu/WvhIWE4cE1GBzhJNFicDeYhnwp6Rl35BcAIM3YOQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "dev": true, - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "dev": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/sockjs": { - "version": "0.3.24", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", - "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", - "dev": true, - "dependencies": { - "faye-websocket": "^0.11.3", - "uuid": "^8.3.2", - "websocket-driver": "^0.7.4" - } - }, - "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "dev": true, - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.1", - "debug": "^4.3.4", - "socks": "^2.7.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/socks-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-3.0.2.tgz", - "integrity": "sha512-BokxPoLjyl3iOrgkWaakaxqnelAJSS+0V+De0kKIq6lyWrXuiPgYTGp6z3iHmqljKAaLXwZa+ctD8GccRJeVvg==", - "dev": true, - "dependencies": { - "abab": "^2.0.5", - "iconv-lite": "^0.6.3", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawnd": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/spawnd/-/spawnd-9.0.2.tgz", - "integrity": "sha512-nl8DVHEDQ57IcKakzpjanspVChkMpGLuVwMR/eOn9cXE55Qr6luD2Kn06sA0ootRMdgrU4tInN6lA6ohTNvysw==", - "dev": true, - "dependencies": { - "signal-exit": "^4.1.0", - "tree-kill": "^1.2.2" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/spawnd/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-correct/node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", - "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", - "dev": true - }, - "node_modules/spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "node_modules/speedline-core": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/speedline-core/-/speedline-core-1.4.3.tgz", - "integrity": "sha512-DI7/OuAUD+GMpR6dmu8lliO2Wg5zfeh+/xsdyJZCzd8o5JgFUjCeLsBDuZjIQJdwXS3J0L/uZYrELKYqx+PXog==", - "dev": true, - "dependencies": { - "@types/node": "*", - "image-ssim": "^0.2.0", - "jpeg-js": "^0.4.1" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stackframe": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", - "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==", - "dev": true - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", - "dev": true, - "dependencies": { - "fast-fifo": "^1.3.2", - "queue-tick": "^1.0.1", - "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", - "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", - "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-outer/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/style-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", - "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", - "dev": true, - "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.27.0" - } - }, - "node_modules/style-search": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", - "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==", - "dev": true - }, - "node_modules/stylehacks": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.1.1.tgz", - "integrity": "sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0", - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/stylelint": { - "version": "14.16.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.16.1.tgz", - "integrity": "sha512-ErlzR/T3hhbV+a925/gbfc3f3Fep9/bnspMiJPorfGEmcBbXdS+oo6LrVtoUZ/w9fqD6o6k7PtUlCOsCRdjX/A==", - "dev": true, - "dependencies": { - "@csstools/selector-specificity": "^2.0.2", - "balanced-match": "^2.0.0", - "colord": "^2.9.3", - "cosmiconfig": "^7.1.0", - "css-functions-list": "^3.1.0", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^6.0.1", - "global-modules": "^2.0.0", - "globby": "^11.1.0", - "globjoin": "^0.1.4", - "html-tags": "^3.2.0", - "ignore": "^5.2.1", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "is-plain-object": "^5.0.0", - "known-css-properties": "^0.26.0", - "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.19", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", - "supports-hyperlinks": "^2.3.0", - "svg-tags": "^1.0.0", - "table": "^6.8.1", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^4.0.2" - }, - "bin": { - "stylelint": "bin/stylelint.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" - } - }, - "node_modules/stylelint-config-recommended": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", - "dev": true, - "peerDependencies": { - "stylelint": "^14.0.0" - } - }, - "node_modules/stylelint-config-recommended-scss": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz", - "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==", - "dev": true, - "dependencies": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^6.0.0", - "stylelint-scss": "^4.0.0" - }, - "peerDependencies": { - "stylelint": "^14.0.0" - } - }, - "node_modules/stylelint-scss": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz", - "integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==", - "dev": true, - "dependencies": { - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0" - }, - "peerDependencies": { - "stylelint": "^14.5.1 || ^15.0.0" - } - }, - "node_modules/stylelint/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "dev": true - }, - "node_modules/stylelint/node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stylelint/node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylelint/node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylelint/node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stylelint/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svg-parser": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", - "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", - "dev": true - }, - "node_modules/svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", - "dev": true - }, - "node_modules/svgo": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", - "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", - "dev": true, - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^5.1.0", - "css-tree": "^2.3.1", - "css-what": "^6.1.0", - "csso": "^5.0.5", - "picocolors": "^1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/svgo" - } - }, - "node_modules/svgo/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/synckit": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", - "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", - "dev": true, - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/table": { - "version": "6.8.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", - "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/tannin": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tannin/-/tannin-1.2.0.tgz", - "integrity": "sha512-U7GgX/RcSeUETbV7gYgoz8PD7Ni4y95pgIP/Z6ayI3CfhSujwKEBlGFTCRN+Aqnuyf4AN2yHL+L8x+TCGjb9uA==", - "dev": true, - "dependencies": { - "@tannin/plural-forms": "^1.1.0" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.31.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", - "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/terser-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/text-decoder": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.0.tgz", - "integrity": "sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/third-party-web": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.23.4.tgz", - "integrity": "sha512-kwYnSZRhEvv0SBW2fp8SBBKRglMoBjV8xz6C31m0ewqOtknB5UL+Ihg+M81hyFY5ldkZuGWPb+e4GVDkzf/gYg==", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "node_modules/thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-repeated/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/upper-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", - "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/upper-case-first": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", - "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url-loader": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", - "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", - "dev": true, - "dependencies": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.27", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "file-loader": "*", - "webpack": "^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "file-loader": { - "optional": true - } - } - }, - "node_modules/url-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", - "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/validate-npm-package-name": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", - "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dev": true, - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/wait-on": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.2.0.tgz", - "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==", - "dev": true, - "dependencies": { - "axios": "^1.6.1", - "joi": "^17.11.0", - "lodash": "^4.17.21", - "minimist": "^1.2.8", - "rxjs": "^7.8.1" - }, - "bin": { - "wait-on": "bin/wait-on" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/web-vitals": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.2.tgz", - "integrity": "sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg==", - "dev": true - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/webpack": { - "version": "5.92.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz", - "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", - "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "0.5.7", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", - "opener": "^1.5.2", - "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/webpack-cli/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/webpack-cli/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-cli/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-cli/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/webpack-dev-middleware": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", - "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", - "dev": true, - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.3", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/webpack-dev-server": { - "version": "4.15.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz", - "integrity": "sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==", - "dev": true, - "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/serve-static": "^1.13.10", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.5", - "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.0.11", - "chokidar": "^3.5.3", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^2.0.0", - "default-gateway": "^6.0.3", - "express": "^4.17.3", - "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.3", - "ipaddr.js": "^2.0.1", - "launch-editor": "^2.6.0", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "rimraf": "^3.0.2", - "schema-utils": "^4.0.0", - "selfsigned": "^2.1.1", - "serve-index": "^1.9.1", - "sockjs": "^0.3.24", - "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.4", - "ws": "^8.13.0" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - }, - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-dev-server/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-merge/node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-merge/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webpack-merge/node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", - "dev": true, - "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package.json b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package.json deleted file mode 100644 index 058da0e25..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "language-switcher", - "version": "0.1.0", - "description": "Example block scaffolded with Create Block tool.", - "author": "The WordPress Contributors", - "license": "GPL-2.0-or-later", - "main": "build/index.js", - "scripts": { - "build": "wp-scripts build", - "format": "wp-scripts format", - "lint:css": "wp-scripts lint-style", - "lint:js": "wp-scripts lint-js", - "packages-update": "wp-scripts packages-update", - "plugin-zip": "wp-scripts plugin-zip", - "start": "wp-scripts start" - }, - "devDependencies": { - "@wordpress/scripts": "^27.9.0", - "css-loader": "^7.1.2", - "style-loader": "^4.0.0" - } -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/block.json b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/block.json deleted file mode 100644 index a8e80858d..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/block.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://schemas.wp.org/trunk/block.json", - "apiVersion": 3, - "name": "wpm/language-switcher", - "version": "0.1.0", - "title": "Language Switcher", - "category": "widgets", - "icon": "smiley", - "description": "Example block scaffolded with Create Block tool.", - "example": {}, - "supports": { - "html": false - }, - "textdomain": "language-switcher", - "editorScript": "file:./index.js", - "editorStyle": "file:./index.css", - "style": "file:./style-index.css", - "viewScript": "file:./view.js" -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/edit.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/edit.js deleted file mode 100644 index 8b154e3ae..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/edit.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Retrieves the translation of text. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ - */ -import { __ } from '@wordpress/i18n'; - -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. - * Those files can contain any CSS code that gets applied to the editor. - * - * @see https://www.npmjs.com/package/@wordpress/scripts#using-css - */ -import './editor.scss'; - -/** - * The edit function describes the structure of your block in the context of the - * editor. This represents what the editor will render when the block is used. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit - * - * @return {Element} Element to render. - */ -export default function Edit() { - return ( -

- { __( - 'Language Switcher – hello from the editor!', - 'language-switcher' - ) } -

- ); -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.css b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.css deleted file mode 100644 index ad71e6a70..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.css +++ /dev/null @@ -1,56 +0,0 @@ -/** - * The following styles get applied inside the editor only. - * - * Replace them with your own styles or remove the file completely. - */ - - .wpm-switcher-list { - list-style: none; - margin-bottom: 0; - padding-left: 0; } - .wpm-switcher-list li a, - .wpm-switcher-list li > span { - color: #333333; } - .wpm-switcher-list li a:hover, - .wpm-switcher-list li > span:hover { - color: #000; } - .wpm-switcher-list li a img, - .wpm-switcher-list li > span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-list li.active a, - .wpm-switcher-list li.active > span { - color: #000; } - -.wpm-switcher-dropdown { - list-style: none; - margin-bottom: 0; - padding-left: 0; - position: relative; } - .wpm-switcher-dropdown a img, - .wpm-switcher-dropdown span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-dropdown a { - color: #333333; } - .wpm-switcher-dropdown a:hover { - color: #000; } - .wpm-switcher-dropdown .wpm-language-dropdown { - display: none; - left: 0; - list-style: none; - margin-bottom: 0; - margin-left: 0; - padding-left: 0; - position: absolute; - top: 100%; } - .wpm-switcher-dropdown > li { - position: relative; } - .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { - display: block; } - .wpm-switcher-dropdown .wpm-item-language-main > span:hover { - cursor: pointer; } - -.wpm-languages.menu-item > a img { - display: inline-block; - margin-right: 5px; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.js deleted file mode 100644 index 6cd5dddc9..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/index.js +++ /dev/null @@ -1,287 +0,0 @@ -/** - * WordPress dependencies - */ -import { registerBlockType } from '@wordpress/blocks'; -import { useBlockProps, RichText, InspectorControls } from '@wordpress/block-editor'; -import { PanelBody, SelectControl } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; - -// Register the block -registerBlockType( 'wpm/language-switcher', { - title: "Language Switcher", - icon: "translation", - keywords: ['Lang', 'Language Switcher', 'Switcher', 'Language', 'Translate'], - parent: [ 'core/navigation', 'core/post-content', 'core/group' ], - attributes: { - switchType: { - type: 'string', - default: 'dropdown', - }, - switchShow: { - type: 'string', - default: 'both', - } - }, - edit: function (props) { - - var attributes = props.attributes; - - const { attributes: { mySelect }, setAttributes } = props; - - const typeOptions = [ { label: __('Drop Down', 'wp-multilang'), value: 'dropdown' }, - { label: __('List', 'wp-multilang'), value: 'list' }, - { label: __('Select', 'wp-multilang'), value: 'select' }, - ]; - - const showOptions = [ { label: __('Both', 'wp-multilang'), value: 'both' }, - { label: __('Flag', 'wp-multilang'), value: 'flag' }, - { label: __('Name', 'wp-multilang'), value: 'name' }, - ]; - - const lang = wpmLanguageSwitcher.lang; - const languages = wpmLanguageSwitcher.languages; - - const baseFlagUrl = wpmLanguageSwitcher.flag_url - const defaultFlag = baseFlagUrl + languages[lang].flag; - const defaultLang = languages[lang].name; - - const currentURL = window.location.href; - const convertlangArray = Object.keys(languages); - - - const renderDropdownSwitcher = () => { - let ulClass = "wpm-language-switcher wpm-switcher-dropdown"; - let liClass = "wpm-item-language-main wpm-item-language-en"; - - return ( - - ); - } - - const renderListSwitcher = () => { - return ( - - ) - } - - const renderSelectSwitcher = () => { - return ( - - ) - } - - const langSwitcher = () => { - if(attributes.switchType == 'dropdown'){ - return renderDropdownSwitcher(); - }else if(attributes.switchType == 'list'){ - return renderListSwitcher(); - }else if(attributes.switchType == 'select'){ - return renderSelectSwitcher(); - } - }; - - return ( - <> - - - setAttributes({ switchType: value })} - /> - - setAttributes({ switchShow: value })} - /> - - - -
- {langSwitcher()} -
- - ) - }, - save: function (props) { - - var attributes = props.attributes; - - const typeOptions = [ { label: __('Drop Down', 'wp-multilang'), value: 'dropdown' }, - { label: __('List', 'wp-multilang'), value: 'list' }, - { label: __('Select', 'wp-multilang'), value: 'select' }, - ]; - - const showOptions = [ { label: __('Both', 'wp-multilang'), value: 'both' }, - { label: __('Flag', 'wp-multilang'), value: 'flag' }, - { label: __('Name', 'wp-multilang'), value: 'name' }, - ]; - - const lang = wpmLanguageSwitcher.lang; - const languages = wpmLanguageSwitcher.languages; - - const baseFlagUrl = wpmLanguageSwitcher.flag_url - const defaultFlag = baseFlagUrl + languages[lang].flag; - const defaultLang = languages[lang].name; - - const currentURL = window.location.href; - const convertlangArray = Object.keys(languages); - - - const renderDropdownSwitcher = () => { - let ulClass = "wpm-language-switcher wpm-switcher-dropdown"; - let liClass = "wpm-item-language-main wpm-item-language-en"; - - return ( - - ); - } - - const renderListSwitcher = () => { - return ( - - ) - } - - const renderSelectSwitcher = () => { - return ( - - ) - } - - const langSwitcher = () => { - if(attributes.switchType == 'dropdown'){ - return renderDropdownSwitcher(); - }else if(attributes.switchType == 'list'){ - return renderListSwitcher(); - }else if(attributes.switchType == 'select'){ - return renderSelectSwitcher(); - } - }; - - return ( -
- {langSwitcher()} -
- ) - }, -} ); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/save.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/save.js deleted file mode 100644 index eb12abdaa..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/save.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * The save function defines the way in which the different attributes should - * be combined into the final markup, which is then serialized by the block - * editor into `post_content`. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save - * - * @return {Element} Element to render. - */ -export default function save() { - return ( -

- { 'Language Switcher – hello from the saved content!' } -

- ); -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/style.scss b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/style.scss deleted file mode 100644 index 2e86985ab..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/style.scss +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The following styles get applied both on the front of your site - * and in the editor. - * - * Replace them with your own styles or remove the file completely. - */ - -.wp-block-create-block-language-switcher { - background-color: #21759b; - color: #fff; - padding: 2px; -} diff --git a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/view.js b/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/view.js deleted file mode 100644 index a44693107..000000000 --- a/plugins/wp-react-custom-multilang/assets/blocks/language-switcher/src/view.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Use this file for JavaScript code that you want to run in the front-end - * on posts/pages that contain this block. - * - * When this file is defined as the value of the `viewScript` property - * in `block.json` it will be enqueued on the front end of the site. - * - * Example: - * - * ```js - * { - * "viewScript": "file:./view.js" - * } - * ``` - * - * If you're not making any changes to this file because your project doesn't need any - * JavaScript running in the front-end, then you should delete this file and remove - * the `viewScript` property from `block.json`. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script - */ - -/* eslint-disable no-console */ -console.log( 'Hello World! (from create-block-language-switcher block)' ); -/* eslint-enable no-console */ diff --git a/plugins/wp-react-custom-multilang/assets/scripts/add-lang-to-customizer.js b/plugins/wp-react-custom-multilang/assets/scripts/add-lang-to-customizer.js index c6abc0892..34face281 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/add-lang-to-customizer.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/add-lang-to-customizer.js @@ -1,36 +1,36 @@ -/** - * Code from https://github.com/xwp/wp-customizer-blank-slate - * - * Learn more at: https://make.xwp.co/2016/09/11/resetting-the-customizer-to-a-blank-slate/ - * Copyright (c) 2016 XWP (https://make.xwp.co/) - */ -/* global wp, jQuery */ -/* exported PluginCustomizer */ -var WPMLang = (function (api, $) { - 'use strict'; - - var component = { - data: { - url: null - } - }; - - /** - * Initialize functionality. - * - * @param {object} home Args. - * @param {string} home.url Preview URL. - * @returns {void} - */ - component.init = function init(home) { - _.extend(component.data, home); - if (!home || !home.url) { - throw new Error('Missing args'); - } - - api.bind('ready', function () { - api.previewer.previewUrl.set(home.url); - }); - }; - return component; -}(wp.customize, jQuery) ); +/** + * Code from https://github.com/xwp/wp-customizer-blank-slate + * + * Learn more at: https://make.xwp.co/2016/09/11/resetting-the-customizer-to-a-blank-slate/ + * Copyright (c) 2016 XWP (https://make.xwp.co/) + */ +/* global wp, jQuery */ +/* exported PluginCustomizer */ +var WPMLang = (function (api, $) { + 'use strict'; + + var component = { + data: { + url: null + } + }; + + /** + * Initialize functionality. + * + * @param {object} home Args. + * @param {string} home.url Preview URL. + * @returns {void} + */ + component.init = function init(home) { + _.extend(component.data, home); + if (!home || !home.url) { + throw new Error('Missing args'); + } + + api.bind('ready', function () { + api.previewer.previewUrl.set(home.url); + }); + }; + return component; +}(wp.customize, jQuery) ); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/additional-settings.js b/plugins/wp-react-custom-multilang/assets/scripts/additional-settings.js index f44e5bba7..d2eef30f9 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/additional-settings.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/additional-settings.js @@ -1,81 +1,81 @@ -( function( $ ) { - "use strict"; - - $( function() { - - $('#wpm_installed_localizations').on('init_localizations', function(){ - if ($(this).val()) { - $('#delete_localization').prop('disabled', false); - } else { - $('#delete_localization').prop('disabled', true); - } - }); - - $('#delete_localization').click(function(){ - - if (confirm(wpm_additional_settings_params.confirm_question)) { - - var locale = $('#wpm_installed_localizations').val(); - var button = $(this); - - var data = { - action: 'wpm_delete_localization', - locale: locale, - security: wpm_additional_settings_params.delete_localization_nonce - }; - - $.ajax({ - url: wpm_additional_settings_params.ajax_url, - type: 'post', - data: data, - dataType: 'json', - beforeSend: function() { - button.prop('disabled', true).after(''); - }, - success: function (json) { - button.next().remove(); - if (json.success) { - button.after('' + json.data + ''); - $('#wpm_installed_localizations option[value="' + locale + '"]').remove(); - } else { - button.after('' + json.data + ''); - } - }, - complete: function() { - $('#wpm_installed_localizations').trigger('init_localizations'); - }, - error: function (xhr, ajaxOptions, thrownError) { - alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); - } - }); - } - }); - - $('#qtx_import').click(function(){ - var button = $(this); - - var data = { - action: 'wpm_qtx_import', - security: wpm_additional_settings_params.qtx_import_nonce - }; - - $.ajax({ - url: wpm_additional_settings_params.ajax_url, - type: 'post', - data: data, - dataType: 'json', - beforeSend: function() { - button.prop('disabled', true).after(''); - }, - success: function (json) { - button.next().remove(); - button.after('' + json + ''); - }, - error: function (xhr, ajaxOptions, thrownError) { - alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); - } - }); - }); - - }); -})( jQuery ); +( function( $ ) { + "use strict"; + + $( function() { + + $('#wpm_installed_localizations').on('init_localizations', function(){ + if ($(this).val()) { + $('#delete_localization').prop('disabled', false); + } else { + $('#delete_localization').prop('disabled', true); + } + }); + + $('#delete_localization').click(function(){ + + if (confirm(wpm_additional_settings_params.confirm_question)) { + + var locale = $('#wpm_installed_localizations').val(); + var button = $(this); + + var data = { + action: 'wpm_delete_localization', + locale: locale, + security: wpm_additional_settings_params.delete_localization_nonce + }; + + $.ajax({ + url: wpm_additional_settings_params.ajax_url, + type: 'post', + data: data, + dataType: 'json', + beforeSend: function() { + button.prop('disabled', true).after(''); + }, + success: function (json) { + button.next().remove(); + if (json.success) { + button.after('' + json.data + ''); + $('#wpm_installed_localizations option[value="' + locale + '"]').remove(); + } else { + button.after('' + json.data + ''); + } + }, + complete: function() { + $('#wpm_installed_localizations').trigger('init_localizations'); + }, + error: function (xhr, ajaxOptions, thrownError) { + alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); + } + }); + } + }); + + $('#qtx_import').click(function(){ + var button = $(this); + + var data = { + action: 'wpm_qtx_import', + security: wpm_additional_settings_params.qtx_import_nonce + }; + + $.ajax({ + url: wpm_additional_settings_params.ajax_url, + type: 'post', + data: data, + dataType: 'json', + beforeSend: function() { + button.prop('disabled', true).after(''); + }, + success: function (json) { + button.next().remove(); + button.after('' + json + ''); + }, + error: function (xhr, ajaxOptions, thrownError) { + alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); + } + }); + }); + + }); +})( jQuery ); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.js b/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.js new file mode 100644 index 000000000..2f877e45f --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.js @@ -0,0 +1,157 @@ +/** + * Openai scripts + * @since 2.4.23 + * */ + +jQuery(document).ready(function($){ + + let wpmpProBtn = ' This Feature requires the Premium Version'; + let wpmOpenAINote = ' Please configure OpenAI settings'; + let wpmLicenseKeyError = ' Your license key is inactive or expired'; + + // Validate openai key + $(document).on('click', '#wpm-validate-openai-key', function(e) { + e.preventDefault(); + const rawSecretKey = $('#wpm-openai-secretkey').val(); + const secretKey = rawSecretKey.trim(); + if ( secretKey.length === 0 ) { + $('#wpm-secret-key-error').show(); + return; + } + provider = 'openai'; + + $('#wpm-secret-key-error').hide(); + $('#wpm-prompt-error').hide(); + $('.wpm-openai-api-success-note').hide(); + $('.wpm-openai-api-error-note').hide(); + $('.wpm-openai-provider-note').hide(); + $(this).addClass('updating-message'); + $.ajax({ + url: ajaxurl, + type: 'POST', + data: {action: 'wpm_validate_secret_key', provider: provider, secret_key: secretKey, security: wpm_openai_params.wpmpro_openai_nonce}, + success: function(response) { + $('#wpm-validate-openai-key').removeClass('updating-message'); + if ( response.success ) { + const models = response.data.models; + + let optionsHtml = ''; + $.each(models, function(index, value) { + optionsHtml += ``; + }); + $('#wpm-hide-openai-models-wrapper').show(); + $('#wpm-openai-models').html(optionsHtml); + $('.wpm-openai-api-success-note').show(); + $('.wpm-openai-api-success-note').text( response.data.message ); + } else { + if ( response.data && response.data.message ) { + $('.wpm-openai-api-error-note').show(); + $('.wpm-openai-api-error-note').text( response.data.message ); + } + } + } + }); + }); + + $(document).on('click', '#wpm-save-openai-settings', function(e) { + e.preventDefault(); + + $('#wpm-secret-key-error').hide(); + $('#wpm-prompt-error').hide(); + let provider = $('#wpm-ai-provider').val(); + let providerExists = false; + const aiApiProviders = wpm_openai_params.ai_api_providers; + + if (provider in aiApiProviders) { + providerExists = true; + } + + let model = ''; + const prompt = $('#wpm-openai-prompt').val(); + if ( $('#wpm-openai-models').length > 0 ) { + model = $('#wpm-openai-models').val(); + if ( model ) { + model = model.trim(); + } + } + let enabled = '0'; + if ( $('#wpm_openai_integration').is(':checked') ) { + enabled = '1'; + } + + let deeplEnabled = '0'; + if ( $('#wpm_deepl_integration').is(':checked') ) { + deeplEnabled = '1'; + } + + let deeplSecretKey = $('#wpm-deepl-secretkey').val(); + let deeplApiPlan = $('#wpm-deepl-api-plan').val(); + + let $button = $('#wpm-save-openai-settings'); + + if ( providerExists ) { + // if ( model.length === 0 ) { + // alert('Please validate api key and select model'); + // return; + // } + + $($button).prop('disabled', true).text('Saving Changes...'); + + $.ajax({ + url: ajaxurl, + type: 'POST', + data: { + action: 'wpm_save_openai_settings', + provider: provider, + model: model, + prompt: prompt, + wpm_openai_integration: enabled, + wpm_deepl_integration: deeplEnabled, + wpm_deepl_secret_key: deeplSecretKey, + wpm_deepl_api_plan: deeplApiPlan, + security: wpm_openai_params.wpmpro_openai_nonce}, + success: function(response) { + if (!response.success) { + $('#wpm-prompt-error') + .text(response.data.message) + .show(); + + $button.prop('disabled', false).text('Save Changes'); + return; + } + window.location.reload(true); + }, + error: function() { + alert('Something went wrong. Please try again.'); + $button.prop('disabled', false).text('Save Changes'); + } + }); + + + }else{ + alert('Please select provider'); + return; + } + }) + + $(document).on('click', '#wpm_openai_integration', function(e) { + if($(this).is(':checked')) { + const provider = 'openai'; + $('.wpm-openai-children').show(); + if( wpm_openai_params.ai_settings.model.length === 0) { + $('#wpm-hide-openai-models-wrapper').hide(); + } + }else{ + $('.wpm-openai-children').hide(); + } + }); + + $(document).on('click', '#wpm_deepl_integration', function(e) { + if($(this).is(':checked')) { + $('.wpm-deepl-children').show(); + }else{ + $('.wpm-deepl-children').hide(); + } + }); + +}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.min.js b/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.min.js new file mode 100644 index 000000000..415e5cc52 --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/admin-openai.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(e){e(document).on("click","#wpm-validate-openai-key",function(p){p.preventDefault();let i=e("#wpm-openai-secretkey").val(),a=i.trim();if(0===a.length){e("#wpm-secret-key-error").show();return}provider="openai",e("#wpm-secret-key-error").hide(),e("#wpm-prompt-error").hide(),e(".wpm-openai-api-success-note").hide(),e(".wpm-openai-api-error-note").hide(),e(".wpm-openai-provider-note").hide(),e(this).addClass("updating-message"),e.ajax({url:ajaxurl,type:"POST",data:{action:"wpm_validate_secret_key",provider:provider,secret_key:a,security:wpm_openai_params.wpmpro_openai_nonce},success:function(p){if(e("#wpm-validate-openai-key").removeClass("updating-message"),p.success){let i=p.data.models,a="";e.each(i,function(e,p){a+=``}),e("#wpm-hide-openai-models-wrapper").show(),e("#wpm-openai-models").html(a),e(".wpm-openai-api-success-note").show(),e(".wpm-openai-api-success-note").text(p.data.message)}else p.data&&p.data.message&&(e(".wpm-openai-api-error-note").show(),e(".wpm-openai-api-error-note").text(p.data.message))}})}),e(document).on("click","#wpm-save-openai-settings",function(p){p.preventDefault(),e("#wpm-secret-key-error").hide(),e("#wpm-prompt-error").hide();let i=e("#wpm-ai-provider").val(),a=!1,t=wpm_openai_params.ai_api_providers;i in t&&(a=!0);let o="",n=e("#wpm-openai-prompt").val();e("#wpm-openai-models").length>0&&(o=e("#wpm-openai-models").val())&&(o=o.trim());let r="0";e("#wpm_openai_integration").is(":checked")&&(r="1");let s="0";e("#wpm_deepl_integration").is(":checked")&&(s="1");let m=e("#wpm-deepl-secretkey").val(),d=e("#wpm-deepl-api-plan").val(),l=e("#wpm-save-openai-settings");if(a)e(l).prop("disabled",!0).text("Saving Changes..."),e.ajax({url:ajaxurl,type:"POST",data:{action:"wpm_save_openai_settings",provider:i,model:o,prompt:n,wpm_openai_integration:r,wpm_deepl_integration:s,wpm_deepl_secret_key:m,wpm_deepl_api_plan:d,security:wpm_openai_params.wpmpro_openai_nonce},success:function(p){if(!p.success){e("#wpm-prompt-error").text(p.data.message).show(),l.prop("disabled",!1).text("Save Changes");return}window.location.reload(!0)},error:function(){alert("Something went wrong. Please try again."),l.prop("disabled",!1).text("Save Changes")}});else{alert("Please select provider");return}}),e(document).on("click","#wpm_openai_integration",function(p){e(this).is(":checked")?(e(".wpm-openai-children").show(),0===wpm_openai_params.ai_settings.model.length&&e("#wpm-hide-openai-models-wrapper").hide()):e(".wpm-openai-children").hide()}),e(document).on("click","#wpm_deepl_integration",function(p){e(this).is(":checked")?e(".wpm-deepl-children").show():e(".wpm-deepl-children").hide()})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/customizer.js b/plugins/wp-react-custom-multilang/assets/scripts/customizer.js index 5794edee3..c787d6bbf 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/customizer.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/customizer.js @@ -1,10 +1,10 @@ -(function ($) { - "use strict"; - - $(function () { - if ($('#wpm-language-switcher').length === 0) { - var language_switcher = wp.template('wpm-ls-customizer'); - $('#customize-header-actions').append(language_switcher); - } - }); -})(jQuery, wp); +(function ($) { + "use strict"; + + $(function () { + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template('wpm-ls-customizer'); + $('#customize-header-actions').append(language_switcher); + } + }); +})(jQuery, wp); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.js b/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.js index 59ae317d8..35a7a92fd 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.js @@ -1,10 +1,10 @@ -(function ($) { - "use strict"; - - $(function () { - if ($('#wpm-language-switcher').length === 0) { - var language_switcher = wp.template('wpm-ls'); - $('#wpbody-content > .wrap').prepend(language_switcher); - } - }); -})(jQuery, wp); +(function ($) { + "use strict"; + + $(function () { + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template('wpm-ls'); + $('#wpbody-content > .wrap').first().prepend(language_switcher); + } + }); +})(jQuery, wp); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.min.js b/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.min.js index 54a1747ba..a58405915 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.min.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/language-switcher.min.js @@ -1 +1 @@ -(function(a){a(function(){if(a("#wpm-language-switcher").length===0){var b=wp.template("wpm-ls");a("#wpbody-content > .wrap").prepend(b)}})})(jQuery,wp); \ No newline at end of file +!function(t){"use strict";t(function(){if(0===t("#wpm-language-switcher").length){var e=wp.template("wpm-ls");t("#wpbody-content > .wrap").first().prepend(e)}})}(jQuery,wp); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/languages.js b/plugins/wp-react-custom-multilang/assets/scripts/languages.js index 23fe918a1..8470a8bc4 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/languages.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/languages.js @@ -1,83 +1,83 @@ -(function ($) { - "use strict"; - - function formatState (item) { - if (!item.id) { - return item.text; - } - return $(' ' + item.text + ''); - } - - $(function () { - - $(document).on('click', '.delete-language', function () { - - var button = $(this); - - if (confirm(wpm_languages_params.confirm_question)) { - - var data = { - action: 'wpm_delete_lang', - language: button.data('language'), - security: wpm_languages_params.delete_lang_nonce - }; - - $.ajax({ - url: wpm_languages_params.ajax_url, - type: 'post', - data: data, - complete: function () { - button.parent().parents('.postbox').fadeOut('slow', function () { - $(this).remove(); - $('.language-order').each(function(i){ - $(this).text(i+1); - }); - wpm_lang_count--; - }); - }, - error: function (xhr, ajaxOptions, thrownError) { - alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); - } - }); - } - }); - - $("#wpm-languages").sortable({ - update: function(){ - $('.language-order').each(function(i){ - $(this).text(i+1); - }); - } - }); - - $('#add_lang').click(function () { - var t_language = wp.template('wpm-add-lang'); - var data = { - count: wpm_lang_count - }; - $('#wpm-languages').append(t_language(data)); - $(".wpm-flags").trigger('init_select2'); - wpm_lang_count++; - }); - - - $(document).on('click', '.handlediv', function(){ - $(this).parent().toggleClass('closed'); - }); - - $(document).on('keypress, keyup', '.postbox input[name$="[name]"]', function(){ - var text = $(this).val(); - $(this).parents('.postbox').find('h2 .language-order+span').text(text); - }); - - $(document).on('init_select2', '.wpm-flags', function(){ - $(this).select2({ - templateResult: formatState, - templateSelection: formatState - }); - }); - - $(".wpm-flags").trigger('init_select2'); - - }); -}(jQuery)); +(function ($) { + "use strict"; + + function formatState (item) { + if (!item.id) { + return item.text; + } + return $(' ' + item.text + ''); + } + + $(function () { + + $(document).on('click', '.delete-language', function () { + + var button = $(this); + + if (confirm(wpm_languages_params.confirm_question)) { + + var data = { + action: 'wpm_delete_lang', + language: button.data('language'), + security: wpm_languages_params.delete_lang_nonce + }; + + $.ajax({ + url: wpm_languages_params.ajax_url, + type: 'post', + data: data, + complete: function () { + button.parent().parents('.postbox').fadeOut('slow', function () { + $(this).remove(); + $('.language-order').each(function(i){ + $(this).text(i+1); + }); + wpm_lang_count--; + }); + }, + error: function (xhr, ajaxOptions, thrownError) { + alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); + } + }); + } + }); + + $("#wpm-languages").sortable({ + update: function(){ + $('.language-order').each(function(i){ + $(this).text(i+1); + }); + } + }); + + $('#add_lang').click(function () { + var t_language = wp.template('wpm-add-lang'); + var data = { + count: wpm_lang_count + }; + $('#wpm-languages').append(t_language(data)); + $(".wpm-flags").trigger('init_select2'); + wpm_lang_count++; + }); + + + $(document).on('click', '.handlediv', function(){ + $(this).parent().toggleClass('closed'); + }); + + $(document).on('keypress, keyup', '.postbox input[name$="[name]"]', function(){ + var text = $(this).val(); + $(this).parents('.postbox').find('h2 .language-order+span').text(text); + }); + + $(document).on('init_select2', '.wpm-flags', function(){ + $(this).select2({ + templateResult: formatState, + templateSelection: formatState + }); + }); + + $(".wpm-flags").trigger('init_select2'); + + }); +}(jQuery)); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/premium-settings.js b/plugins/wp-react-custom-multilang/assets/scripts/premium-settings.js index f772674da..ccbdde2fb 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/premium-settings.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/premium-settings.js @@ -1,12 +1,12 @@ -jQuery(document).ready(function($){ - let proBtn = ' This Compatibility requires the Premium Version'; - - $(document).on('change', '.wpm_free_compatibilities', function(e){ - e.preventDefault(); - if($(this).is(':checked')){ - $(this).after(proBtn); - }else{ - $('.wpm-pro-free-btn').remove(); - } - }); +jQuery(document).ready(function($){ + let proBtn = ' This Compatibility requires the Premium Version'; + + $(document).on('change', '.wpm_free_compatibilities', function(e){ + e.preventDefault(); + if($(this).is(':checked')){ + $(this).after(proBtn); + }else{ + $('.wpm-pro-free-btn').remove(); + } + }); }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/reset-settings.js b/plugins/wp-react-custom-multilang/assets/scripts/reset-settings.js index fe0d7f6fd..30330c2c5 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/reset-settings.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/reset-settings.js @@ -1,36 +1,36 @@ -/** - * Js file for handling reset setting related operations - * @since 2.4.15 - * */ -jQuery(document).ready(function($){ - - $(document).on('click', '#wpm-reset-settings-btn', function(e) { - - if ( confirm(wpm_reset_settings_params.wpm_confirm_reset ) ) { - - e.preventDefault(); - let button = $(this); - - let data = { - action: 'wpm_reset_settings', - security: wpm_reset_settings_params.wpm_reset_settings_nonce, - } - - $.ajax({ - - url: wpm_reset_settings_params.ajax_url, - type: 'post', - data: data, - beforeSend: function() { - button.prop('disabled', true).after(''); - }, - success: function( response ) { - window.location.reload(true); - } - - }); - } - - }); - +/** + * Js file for handling reset setting related operations + * @since 2.4.15 + * */ +jQuery(document).ready(function($){ + + $(document).on('click', '#wpm-reset-settings-btn', function(e) { + + if ( confirm(wpm_reset_settings_params.wpm_confirm_reset ) ) { + + e.preventDefault(); + let button = $(this); + + let data = { + action: 'wpm_reset_settings', + security: wpm_reset_settings_params.wpm_reset_settings_nonce, + } + + $.ajax({ + + url: wpm_reset_settings_params.ajax_url, + type: 'post', + data: data, + beforeSend: function() { + button.prop('disabled', true).after(''); + }, + success: function( response ) { + window.location.reload(true); + } + + }); + } + + }); + }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/settings.js b/plugins/wp-react-custom-multilang/assets/scripts/settings.js index bb6ce8415..492356f6f 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/settings.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/settings.js @@ -1,52 +1,52 @@ -( function( $ ) { - "use strict"; - - $( function() { - var changed = false; - - $( 'input, textarea, select, checkbox' ).change( function() { - changed = true; - }); - - $( '.wpm-nav-tab-wrapper a' ).click( function() { - if ( changed ) { - window.onbeforeunload = function() { - return wpm_settings_params.nav_warning; - }; - } else { - window.onbeforeunload = ''; - } - }); - - $( '.submit input' ).click( function() { - window.onbeforeunload = ''; - }); - - }); - - /** - * Code to hide newsletter of settings page - * */ - $(document).on('click', '.wpm_newsletter_hide', function(e){ - jQuery('.wpm-newsletter-wrapper').css("display", "none"); - var form = jQuery(this); - jQuery.post(ajaxurl, {action:'wpm_newsletter_hide_form',wpm_admin_settings_nonce:wpm_settings_params.wpm_admin_settings_nonce}, - function(data) {} - ); - return true; - }); - - /** - * Submit newsletter form - * */ - $(document).on('submit', '#wpm_settings_newsletter', function(e){ - // $('#wpm_settings_newsletter').submit(function(e){ - var form = jQuery(this); - var email = form.find('input[name="newsletter-email"]').val(); - jQuery.post(ajaxurl, {action:'wpm_settings_newsletter_submit',email:email,wpm_admin_settings_nonce:wpm_settings_params.wpm_admin_settings_nonce}, - function(data) {} - ); - return true; - }); - -})( jQuery ); +( function( $ ) { + "use strict"; + + $( function() { + var changed = false; + + $( 'input, textarea, select, checkbox' ).change( function() { + changed = true; + }); + + $( '.wpm-nav-tab-wrapper a' ).click( function() { + if ( changed ) { + window.onbeforeunload = function() { + return wpm_settings_params.nav_warning; + }; + } else { + window.onbeforeunload = ''; + } + }); + + $( '.submit input' ).click( function() { + window.onbeforeunload = ''; + }); + + }); + + /** + * Code to hide newsletter of settings page + * */ + $(document).on('click', '.wpm_newsletter_hide', function(e){ + jQuery('.wpm-newsletter-wrapper').css("display", "none"); + var form = jQuery(this); + jQuery.post(ajaxurl, {action:'wpm_newsletter_hide_form',wpm_admin_settings_nonce:wpm_settings_params.wpm_admin_settings_nonce}, + function(data) {} + ); + return true; + }); + + /** + * Submit newsletter form + * */ + $(document).on('submit', '#wpm_settings_newsletter', function(e){ + // $('#wpm_settings_newsletter').submit(function(e){ + var form = jQuery(this); + var email = form.find('input[name="newsletter-email"]').val(); + jQuery.post(ajaxurl, {action:'wpm_settings_newsletter_submit',email:email,wpm_admin_settings_nonce:wpm_settings_params.wpm_admin_settings_nonce}, + function(data) {} + ); + return true; + }); + +})( jQuery ); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/support-settings.js b/plugins/wp-react-custom-multilang/assets/scripts/support-settings.js index 2e34666df..c9688a9d6 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/support-settings.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/support-settings.js @@ -1,55 +1,55 @@ -jQuery(document).ready(function($){ - - $(document).on('click', '#wpm-send-support-query', function(e){ - e.preventDefault(); - var message = $("#wpm_query_message").val(); - var email = $("#wp_query_email").val(); - - if($.trim(message) !='' && $.trim(email) !='' && wpmIsEmail(email) == true){ - $(this).text('Sending...'); - $.ajax({ - type: "POST", - url:wpm_support_settings_params.ajax_url, - dataType: "json", - data:{action:"wpm_send_query_message",message:message,email:email,security:wpm_support_settings_params.support_nonce}, - success:function(response){ - if(response['status'] =='t'){ - $(".wpm-query-success").show(); - $(".wpm-query-error").hide(); - }else{ - $(".wpm-query-success").hide(); - $(".wpm-query-error").show(); - } - $('#wpm-send-support-query').text('Send Support Request'); - }, - error: function(response){ - $('#wpm-send-support-query').text('Send Support Request'); - } - }); - }else{ - - if($.trim(message) =='' && $.trim(email) ==''){ - alert('Please enter the message and email'); - }else{ - - if($.trim(message) == ''){ - alert('Please enter the message'); - } - if($.trim(email) == ''){ - alert('Please enter the email'); - } - if(wpmIsEmail(email) == false){ - alert('Please enter a valid email'); - } - - } - - } - }); - - function wpmIsEmail(email) { - var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; - return regex.test(email); - } - +jQuery(document).ready(function($){ + + $(document).on('click', '#wpm-send-support-query', function(e){ + e.preventDefault(); + var message = $("#wpm_query_message").val(); + var email = $("#wp_query_email").val(); + + if($.trim(message) !='' && $.trim(email) !='' && wpmIsEmail(email) == true){ + $(this).text('Sending...'); + $.ajax({ + type: "POST", + url:wpm_support_settings_params.ajax_url, + dataType: "json", + data:{action:"wpm_send_query_message",message:message,email:email,security:wpm_support_settings_params.support_nonce}, + success:function(response){ + if(response['status'] =='t'){ + $(".wpm-query-success").show(); + $(".wpm-query-error").hide(); + }else{ + $(".wpm-query-success").hide(); + $(".wpm-query-error").show(); + } + $('#wpm-send-support-query').text('Send Support Request'); + }, + error: function(response){ + $('#wpm-send-support-query').text('Send Support Request'); + } + }); + }else{ + + if($.trim(message) =='' && $.trim(email) ==''){ + alert('Please enter the message and email'); + }else{ + + if($.trim(message) == ''){ + alert('Please enter the message'); + } + if($.trim(email) == ''){ + alert('Please enter the email'); + } + if(wpmIsEmail(email) == false){ + alert('Please enter a valid email'); + } + + } + + } + }); + + function wpmIsEmail(email) { + var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; + return regex.test(email); + } + }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/translator.js b/plugins/wp-react-custom-multilang/assets/scripts/translator.js index 885c9ca78..83f4b79c0 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/translator.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/translator.js @@ -1,94 +1,94 @@ -String.prototype.xsplit = function (_regEx) { - // Most browsers can do this properly, so let them work, they'll do it faster - if ('a~b'.split(/(~)/).length === 3) { - return this.split(_regEx); - } - - if (!_regEx.global) { - _regEx = new RegExp(_regEx.source, 'g' + (_regEx.ignoreCase ? 'i' : '')); - } - - // IE (and any other browser that can't capture the delimiter) - // will, unfortunately, have to be slowed down - var start = 0, arr = []; - var result; - while ((result = _regEx.exec(this)) !== null) { - arr.push(this.slice(start, result.index)); - if (result.length > 1) arr.push(result[1]); - start = _regEx.lastIndex; - } - if (start < this.length) arr.push(this.slice(start)); - if (start === this.length) arr.push(''); //delim at the end - return arr; -}; - -var wpm_translator = { - - string_to_ml_array: function (text) { - - if (Object.prototype.toString.call(text) !== '[object String]') { - return text; - } - - var split_regex = /(\[:[a-z-]+\]|\[:\])/gi; - var blocks = text.xsplit(split_regex); - - if (typeof blocks !== 'object' || !Object.keys(blocks).length) - return text; - - if (Object.keys(blocks).length === 1) { - return blocks[0]; - } - - var results = {}, - languages = wpm_translator_params.languages; - - languages.forEach(function(item){ - results[item] = ''; - }); - - var lang = blocks.length === 1 ? wpm_translator_params.default_language : ''; - - blocks.forEach(function(block, index) { - if (index % 2 === 1) { - lang = block.replace(/\[|\]|:/g,''); - } else if (lang in results) { - results[lang] += block.trim(); - } - }); - - return results; - }, - - - translate_string: function (string, language) { - - var strings = wpm_translator.string_to_ml_array(string); - - if (typeof strings !== 'object' || !Object.keys(strings).length) { - return string; - } - - var languages = wpm_translator_params.languages; - - if (language) { - if (!!languages[language]) { - return strings[language]; - } - - return ''; - } - - language = wpm_translator_params.language; - - if (!strings[language].length && wpm_translator_params.show_untranslated_strings === "yes") { - return strings[wpm_translator_params.default_language]; - } - - if (!!strings[language]) { - return strings[language]; - } - - return ''; - } -}; +String.prototype.xsplit = function (_regEx) { + // Most browsers can do this properly, so let them work, they'll do it faster + if ('a~b'.split(/(~)/).length === 3) { + return this.split(_regEx); + } + + if (!_regEx.global) { + _regEx = new RegExp(_regEx.source, 'g' + (_regEx.ignoreCase ? 'i' : '')); + } + + // IE (and any other browser that can't capture the delimiter) + // will, unfortunately, have to be slowed down + var start = 0, arr = []; + var result; + while ((result = _regEx.exec(this)) !== null) { + arr.push(this.slice(start, result.index)); + if (result.length > 1) arr.push(result[1]); + start = _regEx.lastIndex; + } + if (start < this.length) arr.push(this.slice(start)); + if (start === this.length) arr.push(''); //delim at the end + return arr; +}; + +var wpm_translator = { + + string_to_ml_array: function (text) { + + if (Object.prototype.toString.call(text) !== '[object String]') { + return text; + } + + var split_regex = /(\[:[a-z-]+\]|\[:\])/gi; + var blocks = text.xsplit(split_regex); + + if (typeof blocks !== 'object' || !Object.keys(blocks).length) + return text; + + if (Object.keys(blocks).length === 1) { + return blocks[0]; + } + + var results = {}, + languages = wpm_translator_params.languages; + + languages.forEach(function(item){ + results[item] = ''; + }); + + var lang = blocks.length === 1 ? wpm_translator_params.default_language : ''; + + blocks.forEach(function(block, index) { + if (index % 2 === 1) { + lang = block.replace(/\[|\]|:/g,''); + } else if (lang in results) { + results[lang] += block.trim(); + } + }); + + return results; + }, + + + translate_string: function (string, language) { + + var strings = wpm_translator.string_to_ml_array(string); + + if (typeof strings !== 'object' || !Object.keys(strings).length) { + return string; + } + + var languages = wpm_translator_params.languages; + + if (language) { + if (!!languages[language]) { + return strings[language]; + } + + return ''; + } + + language = wpm_translator_params.language; + + if (!strings[language].length && wpm_translator_params.show_untranslated_strings === "yes") { + return strings[wpm_translator_params.default_language]; + } + + if (!!strings[language]) { + return strings[language]; + } + + return ''; + } +}; diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.js index 0aac231f7..96dd7eace 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.js @@ -1,32 +1,15 @@ -/** - * Auto Translation related script - * @since 2.4.11 - * */ -jQuery(document).ready(function($){ - - let proBtn = ' This Feature requires the Premium Version'; - - $(document).on('change', '.wpm-free-translation-cb', function(e){ - e.preventDefault(); - if($(this).is(':checked')){ - $("label[for='" + $(this).attr('id') + "']").after(proBtn); - }else{ - $('.wpm-upgrade-to-pro-note').remove(); - } - }); - - $(document).on('click', '#wpmpro-translate', function(e){ - $(this).css('display', 'inline'); - $('.wpm-upgrade-to-pro-note').remove(); - $(this).after(proBtn); - }); - - $(document).on('click', '#wpm_string_translation, #wpm_base_translation', function(e) { - if($(this).is(':checked')){ - $(this).parent().after(proBtn); - }else{ - $('.wpm-upgrade-to-pro-note').remove(); - } - }); - +/** + * Auto Translation related script + * @since 2.4.11 + * */ +jQuery(document).ready(function($){ + + $(document).on('click', '#wpm_string_translation, #wpm_base_translation, #wpm_auto_slug_translation', function(e) { + if($(this).is(':checked')){ + $(this).parent().after(proBtn); + }else{ + $('.wpm-upgrade-to-pro-note').remove(); + } + }); + }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.min.js index acbf86243..72d6f379a 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.min.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-autotranslation-script.min.js @@ -1 +1 @@ -jQuery(document).ready(function(t){let e=' This Feature requires the Premium Version';t(document).on("change",".wpm-free-translation-cb",function(n){n.preventDefault(),t(this).is(":checked")?t("label[for='"+t(this).attr("id")+"']").after(e):t(".wpm-upgrade-to-pro-note").remove()}),t(document).on("click","#wpmpro-translate",function(n){t(this).css("display","inline"),t(".wpm-upgrade-to-pro-note").remove(),t(this).after(e)}),t(document).on("click","#wpm_string_translation, #wpm_base_translation",function(n){t(this).is(":checked")?t(this).parent().after(e):t(".wpm-upgrade-to-pro-note").remove()})}); \ No newline at end of file +jQuery(document).ready(function(t){t(document).on("click","#wpm_string_translation, #wpm_base_translation, #wpm_auto_slug_translation",function(n){t(this).is(":checked")?t(this).parent().after(proBtn):t(".wpm-upgrade-to-pro-note").remove()})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.js new file mode 100644 index 000000000..2a991e4ce --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.js @@ -0,0 +1,46 @@ +jQuery(document).ready(function($){ + + var t = this; + + $(document).on('click', '#doaction, #doaction2', function(e){ + + t.bulkButtonId = $( this ).attr( 'id' ); + var name = t.bulkButtonId.substr( 2 ); + + if ( 'wpm_translate_action' === $( 'select[name="' + name + '"]' ).val() ) { + e.preventDefault(); + + if ( typeof inlineEditPost !== 'undefined' ) { // Not available for media. + inlineEditPost.revert(); // Close Bulk edit and Quick edit if open. + } + + $( '#wpm-translate-tr td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); + $( 'table.widefat tbody' ).prepend( $( '#wpm-translate-tr' ) ).prepend( '' ); + + }else{ + $( '#wpm-translate-tr' ).find( '.cancel' ).trigger( 'click' ); + } + + }); + + // Cancel the bulk translation form + $( '#wpm-translate-tr' ).on('click', '.cancel', function(){ + $( '#wpm-translate-tr' ).siblings( '.hidden' ).remove(); + $( '#wpm-bulk-translate' ).append( $( '#wpm-translate-tr' ) ); + $( '#' + t.bulkButtonId ).trigger( 'focus' ); + }); + + // Clean DOM in case of file download + $( '#posts-filter' ).on('submit', function () { + $( '.settings-error' ).remove(); + setTimeout( + function () { + $( 'input[type=checkbox]:checked' ).attr( 'checked', false ); + $( '#wpm-translate-tr' ).find( '.cancel' ).trigger( 'click' ); + }, + 500 + ); + } + ); + +}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.min.js new file mode 100644 index 000000000..f88eb5aef --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-bulk-translate.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(t){var e=this;t(document).on("click","#doaction, #doaction2",function(n){e.bulkButtonId=t(this).attr("id"),"wpm_translate_action"===t('select[name="'+e.bulkButtonId.substr(2)+'"]').val()?(n.preventDefault(),"undefined"!=typeof inlineEditPost&&inlineEditPost.revert(),t("#wpm-translate-tr td").attr("colspan",t("th:visible, td:visible",".widefat:first thead").length),t("table.widefat tbody").prepend(t("#wpm-translate-tr")).prepend('')):t("#wpm-translate-tr").find(".cancel").trigger("click")}),t("#wpm-translate-tr").on("click",".cancel",function(){t("#wpm-translate-tr").siblings(".hidden").remove(),t("#wpm-bulk-translate").append(t("#wpm-translate-tr")),t("#"+e.bulkButtonId).trigger("focus")}),t("#posts-filter").on("submit",function(){t(".settings-error").remove(),setTimeout(function(){t("input[type=checkbox]:checked").attr("checked",!1),t("#wpm-translate-tr").find(".cancel").trigger("click")},500)})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.js new file mode 100644 index 000000000..f7ecc35ad --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.js @@ -0,0 +1,20 @@ +/** + * This script is only for Autolink Manager plugin page layout compatibility + */ +(function ($) { + "use strict"; + + $(function () { + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template('wpm-ls'); + $('#wpbody-content').prepend(language_switcher); + var switcher = $('#wpm-language-switcher'); + if (switcher.length > 0) { + switcher.css({ + 'position': 'static', + 'margin-bottom': '20px' + }); + } + } + }); +})(jQuery); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.min.js new file mode 100644 index 000000000..5fb6d1585 --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-daext-autolinks.min.js @@ -0,0 +1 @@ +!function(t){"use strict";t(function(){if(0===t("#wpm-language-switcher").length){var e=wp.template("wpm-ls");t("#wpbody-content").prepend(e);var i=t("#wpm-language-switcher");i.length>0&&i.css({position:"static","margin-bottom":"20px"})}})}(jQuery); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.js index 1869e43b8..e7e9c3254 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.js @@ -1,81 +1,59 @@ -var strict; - -jQuery(document).ready(function ($) { - /** - * DEACTIVATION FEEDBACK FORM - */ - // show overlay when clicked on "deactivate" - wpm_deactivate_link = $('.wp-admin.plugins-php tr[data-slug="wp-multilang"] .row-actions .deactivate a'); - wpm_deactivate_link_url = wpm_deactivate_link.attr('href'); - - wpm_deactivate_link.click(function (e) { - e.preventDefault(); - // only show feedback form once per 30 days - var c_value = wpm_admin_get_cookie("wpm_hide_deactivate_feedback"); - - if (c_value === undefined) { - $('#wpm-reloaded-feedback-overlay').show(); - } else { - // click on the link - window.location.href = wpm_deactivate_link_url; - } - }); - // show text fields - $('#wpm-reloaded-feedback-content input[type="radio"]').click(function () { - // show text field if there is one - var inputValue = $(this).attr("value"); - var targetBox = $("." + inputValue); - $(".mb-box").not(targetBox).hide(); - $(targetBox).show(); - }); - // send form or close it - $('#wpm-reloaded-feedback-content .button').click(function (e) { - e.preventDefault(); - // set cookie for 30 days - var exdate = new Date(); - exdate.setSeconds(exdate.getSeconds() + 2592000); - document.cookie = "wpm_hide_deactivate_feedback=1; expires=" + exdate.toUTCString() + "; path=/"; - - $('#wpm-reloaded-feedback-overlay').hide(); - if ('wpm-reloaded-feedback-submit' === this.id) { - // Send form data - $.ajax({ - type: 'POST', - url: ajaxurl, - dataType: 'json', - data: { - action: 'wpm_send_feedback', - data: $('#wpm-reloaded-feedback-content form').serialize() - }, - complete: function (MLHttpRequest, textStatus, errorThrown) { - // deactivate the plugin and close the popup - $('#wpm-reloaded-feedback-overlay').remove(); - window.location.href = wpm_deactivate_link_url; - - } - }); - } else { - $('#wpm-reloaded-feedback-overlay').remove(); - window.location.href = wpm_deactivate_link_url; - } - }); - // close form without doing anything - $('.wpm-feedback-not-deactivate').click(function (e) { - $('#wpm-reloaded-feedback-overlay').hide(); - }); - - function wpm_admin_get_cookie (name) { - var i, x, y, wpm_cookies = document.cookie.split( ";" ); - for (i = 0; i < wpm_cookies.length; i++) - { - x = wpm_cookies[i].substr( 0, wpm_cookies[i].indexOf( "=" ) ); - y = wpm_cookies[i].substr( wpm_cookies[i].indexOf( "=" ) + 1 ); - x = x.replace( /^\s+|\s+$/g, "" ); - if (x === name) - { - return unescape( y ); - } - } -} - +var strict; + +jQuery(document).ready(function ($) { + /** + * DEACTIVATION FEEDBACK FORM + */ + // show overlay when clicked on "deactivate" + wpm_deactivate_link = $('.wp-admin.plugins-php tr[data-slug="wp-multilang"] .row-actions .deactivate a'); + wpm_deactivate_link_url = wpm_deactivate_link.attr('href'); + + wpm_deactivate_link.click(function (e) { + e.preventDefault(); + $('#wpm-reloaded-feedback-overlay').show(); + + }); + + // show text fields + $('#wpm-reloaded-feedback-content input[type="radio"]').click(function () { + // show text field if there is one + var inputValue = $(this).attr("value"); + var targetBox = $("." + inputValue); + $(".mb-box").not(targetBox).hide(); + $(targetBox).show(); + }); + + // send form or close it + $('#wpm-reloaded-feedback-content .button').click(function (e) { + e.preventDefault(); + + $('#wpm-reloaded-feedback-overlay').hide(); + if ('wpm-reloaded-feedback-submit' === this.id) { + // Send form data + $.ajax({ + type: 'POST', + url: ajaxurl, + dataType: 'json', + data: { + action: 'wpm_deactivate_plugin', + data: $('#wpm-reloaded-feedback-content form').serialize() + }, + complete: function (MLHttpRequest, textStatus, errorThrown) { + // deactivate the plugin and close the popup + $('#wpm-reloaded-feedback-overlay').remove(); + window.location.href = wpm_deactivate_link_url; + + } + }); + } else { + $('#wpm-reloaded-feedback-overlay').remove(); + window.location.href = wpm_deactivate_link_url; + } + }); + + // close form without doing anything + $('.wpm-feedback-not-deactivate').click(function (e) { + $('#wpm-reloaded-feedback-overlay').hide(); + }); + }); // document ready \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.min.js index fe4a7fa03..4533fb759 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.min.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-feedback-script.min.js @@ -1 +1 @@ -var strict;jQuery(document).ready(function(e){wpm_deactivate_link_url=(wpm_deactivate_link=e('.wp-admin.plugins-php tr[data-slug="wp-multilang"] .row-actions .deactivate a')).attr("href"),wpm_deactivate_link.click(function(a){a.preventDefault(),void 0===function e(a){var t,d,o,c=document.cookie.split(";");for(t=0;t 0 ) { - // This change is for Forminator plugin as .wrap class is not present inside #wpbody-content id - $('#wpbody-content').prepend(language_switcher); - } - } - }); +/** + * This script is only for forminator plugin + * @since 2.4.16 + * */ +(function ($) { + "use strict"; + + $(function () { + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template('wpm-ls'); + if ( $('#wpbody-content').length > 0 ) { + // This change is for Forminator plugin as .wrap class is not present inside #wpbody-content id + $('#wpbody-content').prepend(language_switcher); + } + } + }); })(jQuery, wp); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-newsletter-script.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-newsletter-script.js index a1921b348..2d8f273c8 100644 --- a/plugins/wp-react-custom-multilang/assets/scripts/wpm-newsletter-script.js +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-newsletter-script.js @@ -1,134 +1,134 @@ -jQuery(document).ready(function($){ - if(wpm_localize_data.do_tour){ - var content = '

'+wpm_localize_data.using_wpm+'

'; - content += '

'+wpm_localize_data.do_you_want+' '+wpm_localize_data.wpm_update+' '+wpm_localize_data.before_others+'

'; - content += ''; - content += '
'; - content += '
'; - content += '
'; - content += '
'; - content += ''; - content += ''; - content += ''; - content += ''; - content += '
'; - content += '
'; - content += '
'; - content += ''; - content += ''; - content += '

'; - content += '
'; - content += '
'; - content += '
'; - - $(document).on("submit", "#wpm-news-letter-form", function(e){ - e.preventDefault(); - - var $form = $(this), - name = $form.find('input[name="wpm_subscriber_name"]').val(), - email = $form.find('input[name="wpm_subscriber_email"]').val(); - website = $form.find('input[name="wpm_subscriber_website"]').val(); - - $.post(wpm_localize_data.ajax_url, - {action:'wpm_subscribe_to_news_letter', - wpm_security_nonce:wpm_localize_data.wpm_security_nonce, - name:name, email:email, website:website }, - function(data) { - - if(data) - { - if(data=="Some fields are missing.") - { - $("#wpm-news-letter-status").text(""); - $("#wpm-news-letter-status").css("color", "red"); - } - else if(data=="Invalid email address.") - { - $("#wpm-news-letter-status").text(""); - $("#wpm-news-letter-status").css("color", "red"); - } - else if(data=="Invalid list ID.") - { - $("#wpm-news-letter-status").text(""); - $("#wpm-news-letter-status").css("color", "red"); - } - else if(data=="Already subscribed.") - { - $("#wpm-news-letter-status").text(""); - $("#wpm-news-letter-status").css("color", "red"); - } - else - { - $("#wpm-news-letter-status").text("You're subscribed!"); - $("#wpm-news-letter-status").css("color", "green"); - } - } - else - { - alert("Sorry, unable to subscribe. Please try again later!"); - } - } - ); - }); - - var setup; - var wp_pointers_tour_opts = { - content:content, - position:{ - edge:"top", - align:"left" - } - }; - - wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, { - buttons: function (event, t) { - button= jQuery ('
' + wpm_localize_data.button1 + ''); - button_2= jQuery ('#pointer-close.button'); - button.bind ('click.pointer', function () { - t.element.pointer ('close'); - }); - button_2.on('click', function() { - setTimeout(function(){ - t.element.pointer ('close'); - }, 3000); - - } ); - return button; - }, - close: function () { - $.post (wpm_localize_data.ajax_url, { - pointer: 'wpm_subscribe_pointer', - action: 'dismiss-wp-pointer' - }); - }, - show: function(event, t){ - t.pointer.css({'left':'170px', 'top':'360px'}); - } - }); - setup = function () { - $(wpm_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open'); - if (wpm_localize_data.button2) { - jQuery ('#pointer-close').after ('' + wpm_localize_data.button2+ ''); - jQuery ('#pointer-primary').click (function () { - wpm_localize_data.function_name; - }); - jQuery ('#pointer-close').click (function () { - $.post (wpm_localize_data.ajax_url, { - pointer: 'wpm_subscribe_pointer', - action: 'dismiss-wp-pointer' - }); - }); - } - }; - if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) { - $(window).bind('load.wp-pointers', setup); - } - else { - setup (); - } - - } +jQuery(document).ready(function($){ + if(wpm_localize_data.do_tour){ + var content = '

'+wpm_localize_data.using_wpm+'

'; + content += '

'+wpm_localize_data.do_you_want+' '+wpm_localize_data.wpm_update+' '+wpm_localize_data.before_others+'

'; + content += ''; + content += '
'; + content += '
'; + content += '
'; + content += '
'; + content += ''; + content += ''; + content += ''; + content += ''; + content += '
'; + content += '
'; + content += '
'; + content += ''; + content += ''; + content += '

'; + content += '
'; + content += '
'; + content += '
'; + + $(document).on("submit", "#wpm-news-letter-form", function(e){ + e.preventDefault(); + + var $form = $(this), + name = $form.find('input[name="wpm_subscriber_name"]').val(), + email = $form.find('input[name="wpm_subscriber_email"]').val(); + website = $form.find('input[name="wpm_subscriber_website"]').val(); + + $.post(wpm_localize_data.ajax_url, + {action:'wpm_subscribe_to_news_letter', + wpm_security_nonce:wpm_localize_data.wpm_security_nonce, + name:name, email:email, website:website }, + function(data) { + + if(data) + { + if(data=="Some fields are missing.") + { + $("#wpm-news-letter-status").text(""); + $("#wpm-news-letter-status").css("color", "red"); + } + else if(data=="Invalid email address.") + { + $("#wpm-news-letter-status").text(""); + $("#wpm-news-letter-status").css("color", "red"); + } + else if(data=="Invalid list ID.") + { + $("#wpm-news-letter-status").text(""); + $("#wpm-news-letter-status").css("color", "red"); + } + else if(data=="Already subscribed.") + { + $("#wpm-news-letter-status").text(""); + $("#wpm-news-letter-status").css("color", "red"); + } + else + { + $("#wpm-news-letter-status").text("You're subscribed!"); + $("#wpm-news-letter-status").css("color", "green"); + } + } + else + { + alert("Sorry, unable to subscribe. Please try again later!"); + } + } + ); + }); + + var setup; + var wp_pointers_tour_opts = { + content:content, + position:{ + edge:"top", + align:"left" + } + }; + + wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, { + buttons: function (event, t) { + button= jQuery ('' + wpm_localize_data.button1 + ''); + button_2= jQuery ('#pointer-close.button'); + button.bind ('click.pointer', function () { + t.element.pointer ('close'); + }); + button_2.on('click', function() { + setTimeout(function(){ + t.element.pointer ('close'); + }, 3000); + + } ); + return button; + }, + close: function () { + $.post (wpm_localize_data.ajax_url, { + pointer: 'wpm_subscribe_pointer', + action: 'dismiss-wp-pointer' + }); + }, + show: function(event, t){ + t.pointer.css({'left':'170px', 'top':'360px'}); + } + }); + setup = function () { + $(wpm_localize_data.displayID).pointer(wp_pointers_tour_opts).pointer('open'); + if (wpm_localize_data.button2) { + jQuery ('#pointer-close').after ('' + wpm_localize_data.button2+ ''); + jQuery ('#pointer-primary').click (function () { + wpm_localize_data.function_name; + }); + jQuery ('#pointer-close').click (function () { + $.post (wpm_localize_data.ajax_url, { + pointer: 'wpm_subscribe_pointer', + action: 'dismiss-wp-pointer' + }); + }); + } + }; + if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) { + $(window).bind('load.wp-pointers', setup); + } + else { + setup (); + } + + } }); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.js new file mode 100644 index 000000000..7bb33c50b --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.js @@ -0,0 +1,14 @@ +/** + * @since 2.4.31 + * */ +(function ($) { + "use strict"; + + $(function () { + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template('wpm-ls'); + $('#wpbody-content').prepend(language_switcher); + document.getElementById('wpm-language-switcher').style.setProperty('position', 'static', 'important'); + } + }); +})(jQuery, wp); diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.min.js new file mode 100644 index 000000000..8b546422f --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpm-yoast-seo.min.js @@ -0,0 +1 @@ +!function(t){"use strict";t(function(){if(0===t("#wpm-language-switcher").length){var e=wp.template("wpm-ls");t("#wpbody-content").prepend(e),document.getElementById("wpm-language-switcher").style.setProperty("position","static","important")}})}(jQuery,wp); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.js b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.js new file mode 100644 index 000000000..ac30f46cf --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.js @@ -0,0 +1,293 @@ +/** + * Js code for singular auto translation + * @since 1.10 + * */ +jQuery(document).ready(function($){ + + /** + * Auto translate single post on click with batch processing + * @since 1.10 + * */ + $(document).on('click', '#wpm-auto-translate-btn', function(e){ + + const aiSettings = wpmpro_ats_localize_data.ai_settings; + const selectedProvider = aiSettings.api_provider; + const isProActive = wpmpro_ats_localize_data.is_pro_active; + + if ( !isProActive ) { + + // Provider must be selected + if ( !selectedProvider ) { + return false; + } + + // Provider integration must be enabled + const integrationKey = `wpm_${selectedProvider}_integration`; + + if ( + !aiSettings[integrationKey] || + aiSettings[integrationKey] === '0' + ) { + return false; + } + + // OpenAI requires a model, DeepL does not + if ( + selectedProvider === 'openai' && + ( !aiSettings.model || aiSettings.model.length === 0 ) + ) { + return false; + } + } + + if ( + isProActive && + wpmpro_ats_localize_data.license_status !== 'active' + ) { + return false; + } + + //ask for conformation + if ( !confirm( wpmpro_ats_localize_data.confirmation_message ) ) { + return false; + } + + let postId = $('#wpm-current-post-id').val(); + let $button = $(this); + $button.prop('disabled', true).text('Analyzing content...'); + + // First, get the total node count + $.ajax({ + type: "POST", + url: ajaxurl, + data: { + action: "wpm_get_translation_node_count", + post_id: postId, + source: wpmpro_ats_localize_data.source_language, + target: wpmpro_ats_localize_data.target_language, + wpmpro_autotranslate_singular_nonce: wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce, + }, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + dataType: "json", + timeout: 30000, // 30 seconds timeout + success: function (response) { + console.log('Node count response:', response); + + if (response && response.success && response.data && response.data.total_nodes) { + const totalNodes = response.data.total_nodes; + console.log(`Found ${totalNodes} text nodes to translate`); + + if (totalNodes <= 150) { + // Use original single translation for small content + console.log('Content has 150 or fewer nodes, using single translation'); + performSingleTranslation(postId, $button); + } else { + // Use batch processing for large content + console.log(`Content has ${totalNodes} nodes, using batch processing`); + performBatchTranslation(postId, totalNodes, $button); + } + } else { + console.warn('Could not determine node count, falling back to single translation'); + performSingleTranslation(postId, $button); + } + }, + error: function (xhr, status, error) { + console.error('Node count AJAX Error:', {xhr: xhr, status: status, error: error}); + console.warn('Could not get node count, falling back to single translation'); + performSingleTranslation(postId, $button); + }, + }); + + }); + + /** + * Perform single translation (original method) + */ + function performSingleTranslation(postId, $button) { + $button.text('Translating...'); + $.ajax({ + type: "POST", + url: ajaxurl, + data: { + action: "wpm_singlular_auto_translate", + post_id: postId, + source: wpmpro_ats_localize_data.source_language, + target: wpmpro_ats_localize_data.target_language, + wpmpro_autotranslate_singular_nonce: wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce, + }, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + dataType: "json", + timeout: 600000, // 10 minutes timeout + success: function (response) { + console.log('Single translation response:', response); + $button.prop('disabled', false).text('Auto translate'); + if (response && response.status) { + alert(response.message || 'Translation completed successfully'); + } else { + alert('Translation is taking time it will continue in background, please check the page in a few minutes.'); + } + location.reload() + }, + error: function (xhr, status, error) { + console.error('Single translation AJAX Error:', {xhr: xhr, status: status, error: error}); + $button.prop('disabled', false).text('Auto translate'); + if (status === 'timeout') { + alert('Translation request timed out after 10 minutes. The translation may still be processing in the background. Please check the page in a few minutes.'); + } else if (xhr.status === 404) { + alert('Translation is taking time it will continue in background, please check the page in a few minutes.'); + } else if (xhr.status === 500) { + alert('Server error (500). Please check the server logs.'); + } else { + alert('Translation failed: ' + (xhr.responseText || error || 'Unknown error')); + } + }, + }); + } + + /** + * Perform batch translation for large content + */ + function performBatchTranslation(postId, totalNodes, $button) { + const batchSize = 100; // Process 100 nodes at a time + const totalBatches = Math.ceil(totalNodes / batchSize); + let currentBatch = 0; + let completedBatches = 0; + + console.log(`Starting batch translation: ${totalBatches} batches of ${batchSize} nodes each`); + + function processNextBatch() { + if (currentBatch >= totalBatches) { + // All batches completed + console.log('All batches completed successfully'); + $button.prop('disabled', false).text('Auto translate'); + alert(`Translation completed successfully! Processed ${totalNodes} text nodes in ${totalBatches} batches.`); + location.reload(); + return; + } + + const batchStart = currentBatch * batchSize; + const progress = Math.round((completedBatches / totalBatches) * 100); + + $button.text(`Translating batch ${currentBatch + 1}/${totalBatches} (${progress}%)`); + + console.log(`Processing batch ${currentBatch + 1}/${totalBatches}: nodes ${batchStart}-${Math.min(batchStart + batchSize - 1, totalNodes - 1)}`); + + $.ajax({ + type: "POST", + url: ajaxurl, + data: { + action: "wpm_process_batch_translation", + post_id: postId, + source: wpmpro_ats_localize_data.source_language, + target: wpmpro_ats_localize_data.target_language, + batch_start: batchStart, + batch_size: batchSize, + wpmpro_autotranslate_singular_nonce: wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce, + }, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + dataType: "json", + timeout: 120000, // 2 minutes timeout per batch + success: function (response) { + console.log(`Batch ${currentBatch + 1} response:`, response); + completedBatches++; + currentBatch++; + + if (response && response.status) { + console.log(`Batch ${currentBatch} completed successfully`); + // Small delay before next batch + setTimeout(processNextBatch, 1000); + } else { + console.warn(`Batch ${currentBatch} failed:`, response.message || 'Unknown error'); + // Continue with next batch even if this one failed + currentBatch++; + setTimeout(processNextBatch, 2000); + } + }, + error: function (xhr, status, error) { + console.error(`Batch ${currentBatch + 1} AJAX Error:`, {xhr: xhr, status: status, error: error}); + completedBatches++; + currentBatch++; + + if (status === 'timeout') { + console.warn(`Batch ${currentBatch} timed out, continuing with next batch`); + } else { + console.warn(`Batch ${currentBatch} failed with error: ${error}, continuing with next batch`); + } + + // Continue with next batch even on error + setTimeout(processNextBatch, 2000); + }, + }); + } + + // Start the batch processing + processNextBatch(); + } + + /** + * Auto translate single term on click + * @since 1.10 + * */ + $(document).on('click', '#wpm-auto-translate-term-btn', function(e){ + + const selectedProvider = wpmpro_ats_localize_data.ai_settings.api_provider; + + if( ! wpmpro_ats_localize_data.is_pro_active && ( wpmpro_ats_localize_data.ai_settings.wpm_openai_integration.length === 0 || wpmpro_ats_localize_data.ai_settings.wpm_openai_integration == '0' ) ) { + return false; + } + if( ! wpmpro_ats_localize_data.is_pro_active && ( selectedProvider.length === 0 || wpmpro_ats_localize_data.ai_settings.model.length === 0 ) ) { + return false + } + + if ( ( wpmpro_ats_localize_data.is_pro_active ) && wpmpro_ats_localize_data.license_status !== 'active' ) { + return false; + } + + //ask for conformation + if ( !confirm( wpmpro_ats_localize_data.confirmation_message ) ) { + return false; + } + + //ask for conformation + if ( !confirm( wpmpro_ats_localize_data.confirmation_message ) ) { + return false; + } + + $(this).addClass('update-message'); + $.ajax({ + type: "POST", + url: ajaxurl, + data: { + action: "wpm_singlular_auto_translate_term", + tag_id: wpmpro_ats_localize_data.tag_id, + source: wpmpro_ats_localize_data.source_language, + target: wpmpro_ats_localize_data.target_language, + wpmpro_autotranslate_singular_nonce: wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce, + }, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + dataType: "json", + success: function (response) { + if (response.status) { + alert(response.message); + } else { + alert(response.message); + } + location.reload() + }, + error: function (response) { + alert(response.message); + }, + }); + + }); + + +}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.min.js new file mode 100644 index 000000000..4ab0420a2 --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate-singular.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(t){function e(e,a){a.text("Translating..."),t.ajax({type:"POST",url:ajaxurl,data:{action:"wpm_singlular_auto_translate",post_id:e,source:wpmpro_ats_localize_data.source_language,target:wpmpro_ats_localize_data.target_language,wpmpro_autotranslate_singular_nonce:wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce},headers:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",timeout:6e5,success:function(t){console.log("Single translation response:",t),a.prop("disabled",!1).text("Auto translate"),t&&t.status?alert(t.message||"Translation completed successfully"):alert("Translation is taking time it will continue in background, please check the page in a few minutes."),location.reload()},error:function(t,e,n){console.error("Single translation AJAX Error:",{xhr:t,status:e,error:n}),a.prop("disabled",!1).text("Auto translate"),"timeout"===e?alert("Translation request timed out after 10 minutes. The translation may still be processing in the background. Please check the page in a few minutes."):404===t.status?alert("Translation is taking time it will continue in background, please check the page in a few minutes."):500===t.status?alert("Server error (500). Please check the server logs."):alert("Translation failed: "+(t.responseText||n||"Unknown error"))}})}t(document).on("click","#wpm-auto-translate-btn",function(a){let n=wpmpro_ats_localize_data.ai_settings,o=n.api_provider,s=wpmpro_ats_localize_data.is_pro_active;if(!s){if(!o)return!1;let r=`wpm_${o}_integration`;if(!n[r]||"0"===n[r]||"openai"===o&&(!n.model||0===n.model.length))return!1}if(s&&"active"!==wpmpro_ats_localize_data.license_status||!confirm(wpmpro_ats_localize_data.confirmation_message))return!1;let i=t("#wpm-current-post-id").val(),l=t(this);l.prop("disabled",!0).text("Analyzing content..."),t.ajax({type:"POST",url:ajaxurl,data:{action:"wpm_get_translation_node_count",post_id:i,source:wpmpro_ats_localize_data.source_language,target:wpmpro_ats_localize_data.target_language,wpmpro_autotranslate_singular_nonce:wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce},headers:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",timeout:3e4,success:function(a){if(console.log("Node count response:",a),a&&a.success&&a.data&&a.data.total_nodes){let n=a.data.total_nodes;console.log(`Found ${n} text nodes to translate`),n<=150?(console.log("Content has 150 or fewer nodes, using single translation"),e(i,l)):(console.log(`Content has ${n} nodes, using batch processing`),function e(a,n,o){let s=Math.ceil(n/100),r=0,i=0;console.log(`Starting batch translation: ${s} batches of 100 nodes each`),!function e(){if(r>=s){console.log("All batches completed successfully"),o.prop("disabled",!1).text("Auto translate"),alert(`Translation completed successfully! Processed ${n} text nodes in ${s} batches.`),location.reload();return}let l=100*r,c=Math.round(i/s*100);o.text(`Translating batch ${r+1}/${s} (${c}%)`),console.log(`Processing batch ${r+1}/${s}: nodes ${l}-${Math.min(l+100-1,n-1)}`),t.ajax({type:"POST",url:ajaxurl,data:{action:"wpm_process_batch_translation",post_id:a,source:wpmpro_ats_localize_data.source_language,target:wpmpro_ats_localize_data.target_language,batch_start:l,batch_size:100,wpmpro_autotranslate_singular_nonce:wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce},headers:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",timeout:12e4,success:function(t){console.log(`Batch ${r+1} response:`,t),i++,r++,t&&t.status?(console.log(`Batch ${r} completed successfully`),setTimeout(e,1e3)):(console.warn(`Batch ${r} failed:`,t.message||"Unknown error"),r++,setTimeout(e,2e3))},error:function(t,a,n){console.error(`Batch ${r+1} AJAX Error:`,{xhr:t,status:a,error:n}),i++,r++,"timeout"===a?console.warn(`Batch ${r} timed out, continuing with next batch`):console.warn(`Batch ${r} failed with error: ${n}, continuing with next batch`),setTimeout(e,2e3)}})}()}(i,n,l))}else console.warn("Could not determine node count, falling back to single translation"),e(i,l)},error:function(t,a,n){console.error("Node count AJAX Error:",{xhr:t,status:a,error:n}),console.warn("Could not get node count, falling back to single translation"),e(i,l)}})}),t(document).on("click","#wpm-auto-translate-term-btn",function(e){let a=wpmpro_ats_localize_data.ai_settings.api_provider;if(!wpmpro_ats_localize_data.is_pro_active&&(0===wpmpro_ats_localize_data.ai_settings.wpm_openai_integration.length||"0"==wpmpro_ats_localize_data.ai_settings.wpm_openai_integration)||!wpmpro_ats_localize_data.is_pro_active&&(0===a.length||0===wpmpro_ats_localize_data.ai_settings.model.length)||wpmpro_ats_localize_data.is_pro_active&&"active"!==wpmpro_ats_localize_data.license_status||!confirm(wpmpro_ats_localize_data.confirmation_message)||!confirm(wpmpro_ats_localize_data.confirmation_message))return!1;t(this).addClass("update-message"),t.ajax({type:"POST",url:ajaxurl,data:{action:"wpm_singlular_auto_translate_term",tag_id:wpmpro_ats_localize_data.tag_id,source:wpmpro_ats_localize_data.source_language,target:wpmpro_ats_localize_data.target_language,wpmpro_autotranslate_singular_nonce:wpmpro_ats_localize_data.wpmpro_autotranslate_singular_nonce},headers:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",success:function(t){t.status,alert(t.message),location.reload()},error:function(t){alert(t.message)}})})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.js b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.js new file mode 100644 index 000000000..cfee1ffe3 --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.js @@ -0,0 +1,775 @@ +let total_loop = 1; +let translationInProgress = false; +let progressDoneCalled = false; + +let proBtn = ' This Feature requires the Premium Version'; +let openAINote = ' Please configure OpenAI settings'; +let licenseKeyError = ' Your license key is inactive or expired'; + +jQuery(document).ready(function($){ + + $('#wpmpro-what-all-opt').change(() => { + + const selectedProvider = wpmpro_autotranslate_localize_data.ai_settings.api_provider; + + let qs = document.querySelectorAll('.wpmpro-what-list'); + + if($('#wpmpro-what-all-opt').is(':checked')) { + + for (let index = 0; index < qs.length; index++) { + const element = qs[index]; + element.checked = true; + + if ( ( wpmpro_autotranslate_localize_data.is_pro_active && wpmpro_autotranslate_localize_data.license_status === 'active' ) + || ( selectedProvider === 'openai' && wpmpro_autotranslate_localize_data.ai_settings.model.length > 0 ) ) { + // Show exclude wrapper for this item + const excludeWrapper = $(element).closest('li').find('.exclude-wrapper'); + if (excludeWrapper.length > 0) { + excludeWrapper.show(); + } + } + } + // $('.wpmpro-what-list').each(function() { + // if ( wpmpro_autotranslate_localize_data.is_pro_active && wpmpro_autotranslate_localize_data.license_status !== 'active' ) { + // $(this).next('label').after(licenseKeyError); + // } + // }); + + } else { + + for (let index = 0; index < qs.length; index++) { + const element = qs[index]; + element.checked = false; + + // Hide exclude wrapper for this item + const excludeWrapper = $(element).closest('li').find('.exclude-wrapper'); + if (excludeWrapper.length > 0) { + excludeWrapper.hide(); + } + + $('.wpmpro-what-list').each(function() { + $(this).next('label').next('span.wpm-upgrade-to-pro-note').remove(); + }); + } + + } + + }); + + $(document).on('change', '.wpmpro-what-list', function(){ + let total_len = 0; + let checked_len = 0; + const selectedProvider = wpmpro_autotranslate_localize_data.ai_settings.api_provider; + + // Show/hide exclude wrapper + const excludeWrapper = $(this).closest('li').find('.exclude-wrapper'); + if ($(this).is(':checked')) { + // if ( wpmpro_autotranslate_localize_data.is_pro_active && wpmpro_autotranslate_localize_data.license_status !== 'active' ) { + // $(this).next('label').after(licenseKeyError); + // } + if ( ( wpmpro_autotranslate_localize_data.is_pro_active && wpmpro_autotranslate_localize_data.license_status === 'active' ) + || ( selectedProvider === 'openai' && wpmpro_autotranslate_localize_data.ai_settings.model.length > 0 ) ) { + excludeWrapper.show(); + } + } else { + $("label[for='" + $(this).attr('id') + "']").next('span.wpm-upgrade-to-pro-note').remove(); + excludeWrapper.hide(); + } + + $(".wpmpro-what-list").each(function(e){ + total_len = total_len+1; + }); + + $(".wpmpro-what-list:checked").each(function(e){ + checked_len = checked_len+1; + }); + + if(total_len==checked_len){ + if(document.getElementById('wpmpro-what-all-opt')){ + document.getElementById('wpmpro-what-all-opt').checked = true; + } + }else{ + if(document.getElementById('wpmpro-what-all-opt')){ + document.getElementById('wpmpro-what-all-opt').checked = false; + } + } + }); + + // Initialize Select2 for exclude selects + function initializeSelect2() { + if (typeof $.fn.select2 === 'undefined') { + console.warn('Select2 not loaded yet, retrying in 100ms...'); + setTimeout(initializeSelect2, 100); + return; + } + + $('.exclude-select').each(function() { + const $select = $(this); + const postType = $select.data('type'); + + + if ($select.hasClass('select2-hidden-accessible')) { + return; + } + + try { + $select.select2({ + placeholder: 'Search items to exclude...', + minimumInputLength: 2, + width: '100%', + dropdownParent: $select.parent(), + ajax: { + url: wpmpro_autotranslate_localize_data.ajax_url, + dataType: 'json', + delay: 250, + data: function(params) { + const requestData = { + action: 'wpmpro_search_items', + search: params.term, + type: postType, + _wpnonce: wpmpro_autotranslate_localize_data.nonce + }; + console.log('Select2 AJAX request data:', requestData); + return requestData; + }, + processResults: function(data) { + console.log('Select2 AJAX response:', data); + + + if (data && data.success && data.data) { + + return { + results: data.data || [] + }; + } else if (Array.isArray(data)) { + + return { + results: data + }; + } else if (data && data.data) { + + return { + results: data.data + }; + } + + console.warn('Unexpected response format:', data); + return { + results: [] + }; + }, + cache: true, + error: function(xhr, status, error) { + console.error('Select2 AJAX error:', {xhr, status, error}); + } + } + }); + } catch (e) { + console.error('Select2 initialization error:', e); + } + }); + } + + if (typeof $.fn.select2 !== 'undefined') { + initializeSelect2(); + } else { + + $(window).on('load', function() { + setTimeout(initializeSelect2, 100); + }); + } + + $("#wpmpro-translate").on("click", async function () { + + $('#wpmpro-translation-error-message').hide(); + let target_langs = []; + const selectedProvider = wpmpro_autotranslate_localize_data.ai_settings.api_provider; + const isAutoReforce = wpmpro_autotranslate_localize_data.allow_auto_override; + $(".wpmpro-language-cb").each(function () { + if ($(this).is(":checked")) { + target_langs.push($(this).val()); + } + }); + + let what_arr = []; + let excluded_items = {}; + $(".wpmpro-what-list").each(function () { + if ($(this).is(":checked")) { + const type = $(this).val(); + what_arr.push(type); + + + const $excludeSelect = $(this).closest('li').find('.exclude-select'); + if ($excludeSelect.length > 0) { + const excludedValues = $excludeSelect.val(); + if (excludedValues && excludedValues.length) { + excluded_items[type] = excludedValues; + } + } + + const excludedValues = $(this).closest('li').find('.exclude-select').val(); + if (excludedValues && excludedValues.length) { + excluded_items[type] = excludedValues; + } + } + }); + + if (target_langs.length === 0) { + alert("Please select language to translate"); + return false; + } + + if (what_arr.length === 0) { + alert("Please select what you want to translate"); + return false; + } + + if ( isAutoReforce === 'yes' ) { + if ( ! confirm( wpmpro_autotranslate_localize_data.confirmation_message ) ) { + return false; + } + } + + const aiSettings = wpmpro_autotranslate_localize_data.ai_settings; + + if ( ! wpmpro_autotranslate_localize_data.is_pro_active ) { + + // Check selected provider exists + if ( selectedProvider.length === 0 ) { + return false; + } + + // Dynamic integration key check + const integrationKey = `wpm_${selectedProvider}_integration`; + + if ( + ! aiSettings[integrationKey] || + aiSettings[integrationKey].length === 0 || + aiSettings[integrationKey] === '0' + ) { + return false; + } + + // Model required only for OpenAI + if ( + selectedProvider === 'openai' && + ( ! aiSettings.model || aiSettings.model.length === 0 ) + ) { + return false; + } + } + + if ( + wpmpro_autotranslate_localize_data.is_pro_active && + wpmpro_autotranslate_localize_data.license_status !== 'active' + ) { + return false; + } + + // Prevent multiple simultaneous translations + if (translationInProgress) { + console.warn('⚠️ Translation already in progress - ignoring request'); + return false; + } + + // Check AI quota before translating + const aiQuotaStatus = await wpmHandleAITranslationCheck(selectedProvider); + + if (!aiQuotaStatus) { + return false; + } + + translationInProgress = true; + progressDoneCalled = false; + + console.log('🚀 Starting translation process...'); + + $("#wpmpro-parent-progress-bar").css({ display: "block" }); + $("#wpmpro-translate").css({ display: "none" }); + $("#wpmpro-translate-hide").css({ display: "block" }); + + let total_counts = { + post: wpmpro_autotranslate_localize_data.published_post_count, + page: wpmpro_autotranslate_localize_data.total_pages, + product: wpmpro_autotranslate_localize_data.total_product, + category: wpmpro_autotranslate_localize_data.total_categories, + post_tag: wpmpro_autotranslate_localize_data.total_tags, + product_cat: wpmpro_autotranslate_localize_data.total_product_categories, + }; + + // Total translations tracking + let total_translations = 0; + let completed_translations = 0; + + for (let post_type of what_arr) { + const total_count = total_counts[post_type] || 0; + total_translations += total_count * target_langs.length; + } + + // Process all post types sequentially to avoid conflicts + let all_failed_items = []; + let total_success = 0; + let total_errors = 0; + let total_processed = 0; + + for (let post_type of what_arr) { + const total_count = total_counts[post_type] || 0; + console.log('total_count ', total_count); + if (total_count > 0) { + console.log(`🔄 Starting translation for post type: ${post_type} (${total_count} items)`); + + const result = await handleProcessTypes(target_langs, post_type, total_count, total_translations, excluded_items, (completed) => { + completed_translations += completed; + const cal_per = Math.round((completed_translations / total_translations) * 100); + $("#wpmpro-child-progress-bar").css({ width: cal_per + "%" }); + const progress_msg = `Translating: ${post_type} in ${target_langs.join(',')} (${completed_translations} / ${total_translations}) (${cal_per}%)`; + $("#wpmpro-progress_count").html(progress_msg); + $("#wpmpro-translate-hide").html(`Translating (${cal_per}%)`); + }); + + // Collect results + total_success += result.success; + total_errors += result.errors; + total_processed += result.processed; + all_failed_items = all_failed_items.concat(result.failed_items || []); + + console.log(`✅ Completed translation for post type: ${post_type}`); + } + } + + // Retry failed items if any + if (all_failed_items.length > 0) { + console.log(`🔄 Retrying ${all_failed_items.length} failed items...`); + $("#wpmpro-progress_count").html(`Retrying ${all_failed_items.length} failed items...`); + + let retry_success = 0; + let retry_failed = 0; + + for (let failed_item of all_failed_items) { + if (failed_item.retryable) { + console.log(`🔄 Retrying page ${failed_item.page}, language ${failed_item.lang} for ${failed_item.post_type}`); + + try { + const retry_result = await handleProcessTranslation( + failed_item.page, + failed_item.lang, + failed_item.post_type, + total_counts[failed_item.post_type] || 0, + excluded_items, + 0 // Reset retry count for retry attempt + ); + + if (retry_result && retry_result.success === true) { + retry_success++; + console.log(`✓ Retry successful: page ${failed_item.page}, language ${failed_item.lang}`); + } else { + retry_failed++; + console.warn(`✗ Retry failed: page ${failed_item.page}, language ${failed_item.lang} - ${retry_result?.error || 'Unknown error'}`); + } + } catch (error) { + retry_failed++; + console.error(`✗ Retry exception: page ${failed_item.page}, language ${failed_item.lang}`, error); + } + + // Small delay between retry attempts + await new Promise(resolve => setTimeout(resolve, 500)); + } + } + + // Update final counts + total_success += retry_success; + total_errors = total_errors - retry_success + retry_failed; + + console.log(`🎯 Retry completed: ${retry_success} successful, ${retry_failed} still failed`); + } + + // Only call progressDone after ALL post types are completed + console.log('🎉 All post types completed - calling progressDone()'); + progressDone(total_success, total_errors, total_processed); + }); + + async function handleProcessTypes(target_langs, post_type, total_count, total_translations, excluded_items, updateProgress) { + let processed_count = 0; + let success_count = 0; + let error_count = 0; + let timeout_count = 0; + let retry_count = 0; + let failed_items = []; // Track failed items for retry + + console.log(`🚀 Starting translation for post type: ${post_type} with ${total_count} items`); + + for (let lang of target_langs) { + console.log(`🌐 Starting translation for language: ${lang}`); + + for (let page = 1; page <= total_count; page++) { + console.log(`📄 Processing page ${page} of ${total_count} for language ${lang}`); + + try { + const result = await handleProcessTranslation(page, lang, post_type, total_count, excluded_items); + processed_count++; + updateProgress(1); + + // Ensure result is valid + if (!result || typeof result !== 'object') { + console.warn(`⚠️ Invalid result for page ${page}, language ${lang} - treating as success`); + success_count++; + } else if (result.success === true) { + success_count++; + console.log(`✓ Success: page ${page}, language ${lang} - ${result.message || 'No message'}`); + } else { + error_count++; + if (result.error && result.error.includes && result.error.includes('timeout')) { + timeout_count++; + } + if (result.retryable === true) { + retry_count++; + } + console.warn(`✗ Failed: page ${page}, language ${lang} - ${result.error || 'Unknown error'}`); + + // Add to failed items for retry + failed_items.push({ + page: page, + lang: lang, + post_type: post_type, + error: result.error || 'Unknown error', + retryable: result.retryable === true + }); + } + + // Update progress message with current status + const currentProgress = Math.round((processed_count / total_translations) * 100); + const statusMessage = `Translating: ${post_type} in ${lang} (${processed_count}/${total_translations}) (${currentProgress}%) - Success: ${success_count}, Errors: ${error_count}, Timeouts: ${timeout_count}`; + $("#wpmpro-progress_count").html(statusMessage); + + // Add a small delay between requests to prevent overwhelming the server + await new Promise(resolve => setTimeout(resolve, 300)); + + } catch (error) { + error_count++; + processed_count++; + updateProgress(1); + console.error(`✗ Exception processing page ${page}, language ${lang}:`, error); + + // Add to failed items for retry + failed_items.push({ + page: page, + lang: lang, + post_type: post_type, + error: error.message || 'Exception occurred', + retryable: true + }); + + // Update progress message even on exception + const currentProgress = Math.round((processed_count / total_translations) * 100); + const statusMessage = `Translating: ${post_type} in ${lang} (${processed_count}/${total_translations}) (${currentProgress}%) - Success: ${success_count}, Errors: ${error_count}, Exceptions: ${error_count - success_count}`; + $("#wpmpro-progress_count").html(statusMessage); + } + } + + console.log(`✅ Completed language ${lang} for post type ${post_type}`); + } + + console.log(`🎯 Translation completed for ${post_type}. Processed: ${processed_count}, Success: ${success_count}, Errors: ${error_count}, Timeouts: ${timeout_count}, Retries: ${retry_count}`); + + // Show final summary + const summaryMessage = `Completed: ${post_type} - Success: ${success_count}, Errors: ${error_count}, Timeouts: ${timeout_count}`; + console.log(summaryMessage); + + // Return completion status with failed items + return { + processed: processed_count, + success: success_count, + errors: error_count, + timeouts: timeout_count, + retries: retry_count, + failed_items: failed_items + }; + } + + function handleProcessTranslation(page, target_lang, post_type, total_count, excluded_items, retryCount = 0) { + return new Promise((resolve) => { + if (page > total_count) { + resolve({success: false, error: 'Page out of range'}); + return; + } + + const maxRetries = 2; + const baseTimeout = 30000; // 30 seconds base timeout + const timeout = baseTimeout + (retryCount * 15000); // Increase timeout with retries + + console.log(`Processing page ${page} (attempt ${retryCount + 1}/${maxRetries + 1}) with timeout ${timeout}ms`); + + $.ajax({ + type: "POST", + url: wpmpro_autotranslate_localize_data.ajax_url, + data: { + action: "wpm_do_auto_translate", + post_type: post_type, + offset: page, + source: wpmpro_autotranslate_localize_data.source_language, + excluded_items: JSON.stringify(excluded_items), + target: target_lang, + allow_auto_override: wpmpro_autotranslate_localize_data.allow_auto_override, + wpmpro_autotranslate_nonce: wpmpro_autotranslate_localize_data.wpmpro_autotranslate_nonce, + }, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + dataType: "json", + timeout: timeout, + success: function (response) { + console.log('Translation response for page', page, ':', response); + + // Handle empty or null responses + if (!response || response === null || response === undefined) { + console.warn('Empty response for page', page, '- treating as success to continue'); + resolve({success: true, message: 'Empty response - continuing'}); + return; + } + + // Handle different response formats + if (typeof response === 'object' && response !== null) { + if (response.status === true || response.success === true) { + console.log('✓ Translation successful for page', page, '-', response.message || 'No message'); + resolve({success: true, message: response.message || 'Translation completed'}); + } else { + console.warn('✗ Translation failed for page', page, ':', response.message || 'Unknown error'); + // Even if translation failed, continue to next page + resolve({success: true, message: 'Failed but continuing - ' + (response.message || 'Unknown error')}); + } + } else { + console.warn('Unexpected response format for page', page, ':', response, '- treating as success'); + resolve({success: true, message: 'Unexpected response format - continuing'}); + } + }, + error: function (xhr, status, error) { + const isTimeout = status === 'timeout'; + const isAbort = status === 'abort'; + + console.error('AJAX error for page', page, ':', { + status: status, + error: error, + isTimeout: isTimeout, + isAbort: isAbort, + responseText: xhr.responseText ? xhr.responseText.substring(0, 200) : 'No response', + readyState: xhr.readyState, + statusText: xhr.statusText + }); + + // Try to parse response as JSON even on error + let parsedResponse = null; + try { + if (xhr.responseText && xhr.responseText.trim() !== '') { + parsedResponse = JSON.parse(xhr.responseText); + if (parsedResponse && parsedResponse.status === true) { + console.log('✓ Translation successful despite error status'); + resolve({success: true, message: 'Translation completed despite error'}); + return; + } + } + } catch (e) { + console.warn('Could not parse error response as JSON:', e.message); + } + + // Determine if we should retry + const shouldRetry = retryCount < maxRetries && (isTimeout || (xhr.status >= 500 && xhr.status < 600)); + + if (shouldRetry) { + console.log(`🔄 Retrying page ${page} in 2 seconds... (attempt ${retryCount + 2})`); + setTimeout(() => { + handleProcessTranslation(page, target_lang, post_type, total_count, excluded_items, retryCount + 1) + .then(resolve); + }, 2000); + } else { + const errorMessage = isTimeout ? 'Request timeout' : + isAbort ? 'Request aborted' : + `HTTP ${xhr.status}: ${xhr.statusText}`; + console.warn(`⚠️ Final failure for page ${page}: ${errorMessage} - continuing to next page`); + // Always continue to next page, even on final failure + resolve({success: true, message: `Failed: ${errorMessage} but continuing`}); + } + }, + }); + }); + } + + function progressDone(successCount = 0, errorCount = 0, processedCount = 0){ + // Prevent multiple calls to progressDone + if (progressDoneCalled) { + console.warn('⚠️ progressDone() already called - ignoring duplicate call'); + return; + } + + progressDoneCalled = true; + translationInProgress = false; + + console.log('🏁 progressDone() called - finalizing translation process'); + + let cal_per = 100; + $("#wpmpro-child-progress-bar").css({'width':cal_per+'%'}); + $("#wpmpro-progress_count").html('Translation completed (100%)'); + $("#wpmpro-translate").css({'display':'block'}); + $("#wpmpro-translate-hide").css({'display':'none'}); + $("#wpmpro-translate-hide").html('Translating (0%)'); + $("#wpmpro-parent-progress-bar").css({'display':'none'}); + + // Create detailed completion message with statistics + let messageClass = 'd4edda'; + let borderClass = 'c3e6cb'; + let textClass = '155724'; + let titleText = '✓ Translation Process Completed'; + + if (errorCount > 0) { + messageClass = errorCount > successCount ? 'f8d7da' : 'fff3cd'; + borderClass = errorCount > successCount ? 'f5c6cb' : 'ffeaa7'; + textClass = errorCount > successCount ? '721c24' : '856404'; + titleText = errorCount > successCount ? '⚠️ Translation Process Completed with Errors' : '✓ Translation Process Completed with Some Issues'; + } + + const completionMessage = ` +
+

${titleText}

+
+

📊 Final Statistics:

+
    +
  • ✅ Successfully translated: ${successCount} items
  • +
  • ❌ Failed translations: ${errorCount} items
  • +
  • 📝 Total processed: ${processedCount} items
  • +
+
+

+ ${errorCount > 0 ? + 'Some translations failed. Check the browser console for detailed error information.' : + 'All translations completed successfully!' + } +

+

+ You can close this message or refresh the page to see updated content. +

+
+ `; + + $("#wpmpro-translation-success-message").html(completionMessage); + $("#wpmpro-translation-success-message").css({'display':'block'}); + + // Log final completion with statistics + console.log('🎉 Translation process completed!'); + console.log(`📊 Final Results: ${successCount} successful, ${errorCount} failed, ${processedCount} total processed`); + + if (errorCount > 0) { + console.warn(`⚠️ ${errorCount} translations failed. Check the detailed logs above for error information.`); + } else { + console.log('✅ All translations completed successfully!'); + } + + } + + function timeUnits( ms ) { + + if ( !Number.isInteger(ms) ) { + return null + } + + const allocate = msUnit => { + const units = Math.trunc(ms / msUnit) + ms -= units * msUnit + return units + } + + return { + hours: allocate(3600000), + minutes: allocate(60000), + seconds: allocate(1000), + ms: ms // remainder + } + + } + + function processTime( newtime ) { + + let hours = newtime.hours; + let minutes = newtime.minutes; + let seconds = newtime.seconds; + let ms = newtime.ms; + let build_time_format = ''; + + if(hours>0){ + build_time_format = hours+' hour(s) '; + } + + if(minutes>0){ + build_time_format += minutes+' minute(s) '; + } + + if(minutes==0){ + build_time_format = ''; + } + + if(minutes==0 || seconds>0 || ms>0){ + build_time_format = ' Less than a minute'; + } + + build_time_format +=' remaing...'; + return build_time_format; + + } + + // Handle Ajax request to check quota + async function wpmHandleAITranslationCheck(selectedProvider) { + let openAIStatus = true; + + const requiresModel = selectedProvider === 'openai'; + const aiSettings = wpmpro_autotranslate_localize_data.ai_settings; + const integrationKey = `wpm_${selectedProvider}_integration`; + + if ( + !wpmpro_autotranslate_localize_data.is_pro_active && + aiSettings[integrationKey] === '1' && + ( !requiresModel || aiSettings.model.length > 0 ) + ) { + + $("#wpmpro-translate").hide(); + $("#wpmpro-translate-hide").show(); + + try { + const response = await wpmCheckAIQuota(selectedProvider); + + if (response.status === false) { + $('#wpmpro-translation-error-message').show(); + $('#wpm-ai-translate-error').text('AI Translation Error: ' + response.message); + $("#wpmpro-translate").show(); + $("#wpmpro-translate-hide").hide(); + openAIStatus = false; + } + + } catch(err) { + console.error("Quota check failed:", err); + openAIStatus = false; + } + } + + return openAIStatus; + } + + // Check AI quota through ajax + function wpmCheckAIQuota(selectedProvider) { + return new Promise(function(resolve, reject) { + jQuery.ajax({ + type: "POST", + url: wpmpro_autotranslate_localize_data.ajax_url, + data: { + action: "wpm_check_ai_platform_quota", + provider: selectedProvider, + wpmpro_autotranslate_nonce: wpmpro_autotranslate_localize_data.wpmpro_autotranslate_nonce + }, + success: function(response) { + resolve(response); + }, + error: function(xhr) { + reject(xhr); + } + }); + }); + } + +}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.min.js b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.min.js new file mode 100644 index 000000000..ccf5d7866 --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/scripts/wpmpro-autotranslate.min.js @@ -0,0 +1,19 @@ +let total_loop=1,translationInProgress=!1,progressDoneCalled=!1,proBtn=' This Feature requires the
Premium Version',openAINote=' Please configure OpenAI settings',licenseKeyError=' Your license key is inactive or expired';jQuery(document).ready(function(e){function t(){if(void 0===e.fn.select2){console.warn("Select2 not loaded yet, retrying in 100ms..."),setTimeout(t,100);return}e(".exclude-select").each(function(){let t=e(this),s=t.data("type");if(!t.hasClass("select2-hidden-accessible"))try{t.select2({placeholder:"Search items to exclude...",minimumInputLength:2,width:"100%",dropdownParent:t.parent(),ajax:{url:wpmpro_autotranslate_localize_data.ajax_url,dataType:"json",delay:250,data:function(e){let t={action:"wpmpro_search_items",search:e.term,type:s,_wpnonce:wpmpro_autotranslate_localize_data.nonce};return console.log("Select2 AJAX request data:",t),t},processResults:function(e){return(console.log("Select2 AJAX response:",e),e&&e.success&&e.data)?{results:e.data||[]}:Array.isArray(e)?{results:e}:e&&e.data?{results:e.data}:(console.warn("Unexpected response format:",e),{results:[]})},cache:!0,error:function(e,t,s){console.error("Select2 AJAX error:",{xhr:e,status:t,error:s})}}})}catch(r){console.error("Select2 initialization error:",r)}})}async function s(t,s,a,o,n,l){let i=0,p=0,c=0,g=0,u=0,d=[];for(let m of(console.log(`🚀 Starting translation for post type: ${s} with ${a} items`),t)){console.log(`🌐 Starting translation for language: ${m}`);for(let $=1;$<=a;$++){console.log(`📄 Processing page ${$} of ${a} for language ${m}`);try{let f=await r($,m,s,a,n);i++,l(1),f&&"object"==typeof f?!0===f.success?(p++,console.log(`✓ Success: page ${$}, language ${m} - ${f.message||"No message"}`)):(c++,f.error&&f.error.includes&&f.error.includes("timeout")&&g++,!0===f.retryable&&u++,console.warn(`✗ Failed: page ${$}, language ${m} - ${f.error||"Unknown error"}`),d.push({page:$,lang:m,post_type:s,error:f.error||"Unknown error",retryable:!0===f.retryable})):(console.warn(`⚠️ Invalid result for page ${$}, language ${m} - treating as success`),p++);let h=Math.round(i/o*100),w=`Translating: ${s} in ${m} (${i}/${o}) (${h}%) - Success: ${p}, Errors: ${c}, Timeouts: ${g}`;e("#wpmpro-progress_count").html(w),await new Promise(e=>setTimeout(e,300))}catch(y){c++,i++,l(1),console.error(`✗ Exception processing page ${$}, language ${m}:`,y),d.push({page:$,lang:m,post_type:s,error:y.message||"Exception occurred",retryable:!0});let x=Math.round(i/o*100),_=`Translating: ${s} in ${m} (${i}/${o}) (${x}%) - Success: ${p}, Errors: ${c}, Exceptions: ${c-p}`;e("#wpmpro-progress_count").html(_)}}console.log(`✅ Completed language ${m} for post type ${s}`)}console.log(`🎯 Translation completed for ${s}. Processed: ${i}, Success: ${p}, Errors: ${c}, Timeouts: ${g}, Retries: ${u}`);let T=`Completed: ${s} - Success: ${p}, Errors: ${c}, Timeouts: ${g}`;return console.log(T),{processed:i,success:p,errors:c,timeouts:g,retries:u,failed_items:d}}function r(t,s,a,o,n,l=0){return new Promise(i=>{if(t>o){i({success:!1,error:"Page out of range"});return}let p=3e4+15e3*l;console.log(`Processing page ${t} (attempt ${l+1}/3) with timeout ${p}ms`),e.ajax({type:"POST",url:wpmpro_autotranslate_localize_data.ajax_url,data:{action:"wpm_do_auto_translate",post_type:a,offset:t,source:wpmpro_autotranslate_localize_data.source_language,excluded_items:JSON.stringify(n),target:s,allow_auto_override:wpmpro_autotranslate_localize_data.allow_auto_override,wpmpro_autotranslate_nonce:wpmpro_autotranslate_localize_data.wpmpro_autotranslate_nonce},headers:{"Content-Type":"application/x-www-form-urlencoded"},dataType:"json",timeout:p,success:function(e){if(console.log("Translation response for page",t,":",e),!e||null==e){console.warn("Empty response for page",t,"- treating as success to continue"),i({success:!0,message:"Empty response - continuing"});return}"object"==typeof e&&null!==e?!0===e.status||!0===e.success?(console.log("✓ Translation successful for page",t,"-",e.message||"No message"),i({success:!0,message:e.message||"Translation completed"})):(console.warn("✗ Translation failed for page",t,":",e.message||"Unknown error"),i({success:!0,message:"Failed but continuing - "+(e.message||"Unknown error")})):(console.warn("Unexpected response format for page",t,":",e,"- treating as success"),i({success:!0,message:"Unexpected response format - continuing"}))},error:function(e,p,c){let g="timeout"===p,u="abort"===p;console.error("AJAX error for page",t,":",{status:p,error:c,isTimeout:g,isAbort:u,responseText:e.responseText?e.responseText.substring(0,200):"No response",readyState:e.readyState,statusText:e.statusText});let d=null;try{if(e.responseText&&""!==e.responseText.trim()&&(d=JSON.parse(e.responseText))&&!0===d.status){console.log("✓ Translation successful despite error status"),i({success:!0,message:"Translation completed despite error"});return}}catch(m){console.warn("Could not parse error response as JSON:",m.message)}let $=l<2&&(g||e.status>=500&&e.status<600);if($)console.log(`🔄 Retrying page ${t} in 2 seconds... (attempt ${l+2})`),setTimeout(()=>{r(t,s,a,o,n,l+1).then(i)},2e3);else{let f=g?"Request timeout":u?"Request aborted":`HTTP ${e.status}: ${e.statusText}`;console.warn(`⚠️ Final failure for page ${t}: ${f} - continuing to next page`),i({success:!0,message:`Failed: ${f} but continuing`})}}})})}function a(e){if(!Number.isInteger(e))return null;let t=t=>{let s=Math.trunc(e/t);return e-=s*t,s};return{hours:t(36e5),minutes:t(6e4),seconds:t(1e3),ms:e}}function o(e){let t=e.hours,s=e.minutes,r=e.seconds,a=e.ms,o="";return t>0&&(o=t+" hour(s) "),s>0&&(o+=s+" minute(s) "),0==s&&(o=""),(0==s||r>0||a>0)&&(o=" Less than a minute"),o+=" remaing..."}async function n(t){let s=!0,r=wpmpro_autotranslate_localize_data.ai_settings,a=`wpm_${t}_integration`;if(!wpmpro_autotranslate_localize_data.is_pro_active&&"1"===r[a]&&("openai"!==t||r.model.length>0)){e("#wpmpro-translate").hide(),e("#wpmpro-translate-hide").show();try{var o;let n=await (o=t,new Promise(function(e,t){jQuery.ajax({type:"POST",url:wpmpro_autotranslate_localize_data.ajax_url,data:{action:"wpm_check_ai_platform_quota",provider:o,wpmpro_autotranslate_nonce:wpmpro_autotranslate_localize_data.wpmpro_autotranslate_nonce},success:function(t){e(t)},error:function(e){t(e)}})}));!1===n.status&&(e("#wpmpro-translation-error-message").show(),e("#wpm-ai-translate-error").text("AI Translation Error: "+n.message),e("#wpmpro-translate").show(),e("#wpmpro-translate-hide").hide(),s=!1)}catch(l){console.error("Quota check failed:",l),s=!1}}return s}e("#wpmpro-what-all-opt").change(()=>{let t=wpmpro_autotranslate_localize_data.ai_settings.api_provider,s=document.querySelectorAll(".wpmpro-what-list");if(e("#wpmpro-what-all-opt").is(":checked"))for(let r=0;r0){let o=e(a).closest("li").find(".exclude-wrapper");o.length>0&&o.show()}}else for(let n=0;n0&&i.hide(),e(".wpmpro-what-list").each(function(){e(this).next("label").next("span.wpm-upgrade-to-pro-note").remove()})}}),e(document).on("change",".wpmpro-what-list",function(){let t=0,s=0,r=wpmpro_autotranslate_localize_data.ai_settings.api_provider,a=e(this).closest("li").find(".exclude-wrapper");e(this).is(":checked")?(wpmpro_autotranslate_localize_data.is_pro_active&&"active"===wpmpro_autotranslate_localize_data.license_status||"openai"===r&&wpmpro_autotranslate_localize_data.ai_settings.model.length>0)&&a.show():(e("label[for='"+e(this).attr("id")+"']").next("span.wpm-upgrade-to-pro-note").remove(),a.hide()),e(".wpmpro-what-list").each(function(e){t+=1}),e(".wpmpro-what-list:checked").each(function(e){s+=1}),t==s?document.getElementById("wpmpro-what-all-opt")&&(document.getElementById("wpmpro-what-all-opt").checked=!0):document.getElementById("wpmpro-what-all-opt")&&(document.getElementById("wpmpro-what-all-opt").checked=!1)}),void 0!==e.fn.select2?t():e(window).on("load",function(){setTimeout(t,100)}),e("#wpmpro-translate").on("click",async function(){e("#wpmpro-translation-error-message").hide();let t=[],a=wpmpro_autotranslate_localize_data.ai_settings.api_provider,o=wpmpro_autotranslate_localize_data.allow_auto_override;e(".wpmpro-language-cb").each(function(){e(this).is(":checked")&&t.push(e(this).val())});let l=[],i={};if(e(".wpmpro-what-list").each(function(){if(e(this).is(":checked")){let t=e(this).val();l.push(t);let s=e(this).closest("li").find(".exclude-select");if(s.length>0){let r=s.val();r&&r.length&&(i[t]=r)}let a=e(this).closest("li").find(".exclude-select").val();a&&a.length&&(i[t]=a)}}),0===t.length)return alert("Please select language to translate"),!1;if(0===l.length)return alert("Please select what you want to translate"),!1;if("yes"===o&&!confirm(wpmpro_autotranslate_localize_data.confirmation_message))return!1;let p=wpmpro_autotranslate_localize_data.ai_settings;if(!wpmpro_autotranslate_localize_data.is_pro_active){if(0===a.length)return!1;let c=`wpm_${a}_integration`;if(!p[c]||0===p[c].length||"0"===p[c]||"openai"===a&&(!p.model||0===p.model.length))return!1}if(wpmpro_autotranslate_localize_data.is_pro_active&&"active"!==wpmpro_autotranslate_localize_data.license_status)return!1;if(translationInProgress)return console.warn("⚠️ Translation already in progress - ignoring request"),!1;let g=await n(a);if(!g)return!1;translationInProgress=!0,progressDoneCalled=!1,console.log("\uD83D\uDE80 Starting translation process..."),e("#wpmpro-parent-progress-bar").css({display:"block"}),e("#wpmpro-translate").css({display:"none"}),e("#wpmpro-translate-hide").css({display:"block"});let u={post:wpmpro_autotranslate_localize_data.published_post_count,page:wpmpro_autotranslate_localize_data.total_pages,product:wpmpro_autotranslate_localize_data.total_product,category:wpmpro_autotranslate_localize_data.total_categories,post_tag:wpmpro_autotranslate_localize_data.total_tags,product_cat:wpmpro_autotranslate_localize_data.total_product_categories},d=0,m=0;for(let $ of l){let f=u[$]||0;d+=f*t.length}let h=[],w=0,y=0,x=0;for(let _ of l){let T=u[_]||0;if(console.log("total_count ",T),T>0){console.log(`🔄 Starting translation for post type: ${_} (${T} items)`);let b=await s(t,_,T,d,i,s=>{m+=s;let r=Math.round(m/d*100);e("#wpmpro-child-progress-bar").css({width:r+"%"});let a=`Translating: ${_} in ${t.join(",")} (${m} / ${d}) (${r}%)`;e("#wpmpro-progress_count").html(a),e("#wpmpro-translate-hide").html(`Translating (${r}%)`)});w+=b.success,y+=b.errors,x+=b.processed,h=h.concat(b.failed_items||[]),console.log(`✅ Completed translation for post type: ${_}`)}}if(h.length>0){console.log(`🔄 Retrying ${h.length} failed items...`),e("#wpmpro-progress_count").html(`Retrying ${h.length} failed items...`);let v=0,k=0;for(let S of h)if(S.retryable){console.log(`🔄 Retrying page ${S.page}, language ${S.lang} for ${S.post_type}`);try{let P=await r(S.page,S.lang,S.post_type,u[S.post_type]||0,i,0);P&&!0===P.success?(v++,console.log(`✓ Retry successful: page ${S.page}, language ${S.lang}`)):(k++,console.warn(`✗ Retry failed: page ${S.page}, language ${S.lang} - ${P?.error||"Unknown error"}`))}catch(A){k++,console.error(`✗ Retry exception: page ${S.page}, language ${S.lang}`,A)}await new Promise(e=>setTimeout(e,500))}w+=v,y=y-v+k,console.log(`🎯 Retry completed: ${v} successful, ${k} still failed`)}console.log("\uD83C\uDF89 All post types completed - calling progressDone()"),function t(s=0,r=0,a=0){if(progressDoneCalled){console.warn("⚠️ progressDone() already called - ignoring duplicate call");return}progressDoneCalled=!0,translationInProgress=!1,console.log("\uD83C\uDFC1 progressDone() called - finalizing translation process"),e("#wpmpro-child-progress-bar").css({width:"100%"}),e("#wpmpro-progress_count").html("Translation completed (100%)"),e("#wpmpro-translate").css({display:"block"}),e("#wpmpro-translate-hide").css({display:"none"}),e("#wpmpro-translate-hide").html("Translating (0%)"),e("#wpmpro-parent-progress-bar").css({display:"none"});let o="d4edda",n="c3e6cb",l="155724",i="✓ Translation Process Completed";r>0&&(o=r>s?"f8d7da":"fff3cd",n=r>s?"f5c6cb":"ffeaa7",l=r>s?"721c24":"856404",i=r>s?"⚠️ Translation Process Completed with Errors":"✓ Translation Process Completed with Some Issues");let p=` +
+

${i}

+
+

📊 Final Statistics:

+
    +
  • ✅ Successfully translated: ${s} items
  • +
  • ❌ Failed translations: ${r} items
  • +
  • 📝 Total processed: ${a} items
  • +
+
+

+ ${r>0?"Some translations failed. Check the browser console for detailed error information.":"All translations completed successfully!"} +

+

+ You can close this message or refresh the page to see updated content. +

+
+ `;e("#wpmpro-translation-success-message").html(p),e("#wpmpro-translation-success-message").css({display:"block"}),console.log("\uD83C\uDF89 Translation process completed!"),console.log(`📊 Final Results: ${s} successful, ${r} failed, ${a} total processed`),r>0?console.warn(`⚠️ ${r} translations failed. Check the detailed logs above for error information.`):console.log("✅ All translations completed successfully!")}(w,y,x)})}); \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.css b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.css index eda8c90d3..c16e60892 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.css +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.css @@ -1,315 +1,414 @@ -.wpm-language-switcher { - left: 48px; - padding-right: 0; - text-align: center; -} -.wpm-language-switcher:before { - display: none; -} -.wpm-language-switcher * { - box-sizing: border-box; -} -.wpm-language-switcher:hover .lang-dropdown { - display: block; -} -.wpm-language-switcher .lang-dropdown { - display: none; -} -.wpm-language-switcher .lang-main { - line-height: 41px; -} -.wpm-language-switcher .lang-main img { - position: relative; - top: -1px; -} - -.lang-dropdown { - background-color: #fff; -} -.lang-dropdown ul { - margin-bottom: 0; - margin-top: 0; -} -.lang-dropdown li { - margin-bottom: 0; -} -.lang-dropdown li a { - display: block; -} -.lang-dropdown li a:hover { - background-color: #f3f3f5; -} - -#wp-admin-bar-wpm-language-switcher-default .ab-item { - height: 32px !important; - line-height: 32px !important; -} -#wp-admin-bar-wpm-language-switcher-default .ab-item .ab-label { - color: #eee !important; -} -#wp-admin-bar-wpm-language-switcher-default .ab-item:hover .ab-label, #wp-admin-bar-wpm-language-switcher-default .ab-item:focus .ab-label { - color: #00b9eb !important; -} - -@media screen and (max-width: 782px) { - #wp-toolbar > ul > #wp-admin-bar-wpm-language-switcher { - display: block; - } - #wp-admin-bar-wpm-language-switcher-default .ab-item { - min-width: 20px !important; - padding: 0 !important; - } - #wp-admin-bar-wpm-language-switcher-default .ab-icon { - line-height: 20px !important; - } - #wp-admin-bar-wpm-language-switcher .ab-icon { - line-height: 20px !important; - } - .language-switcher { - padding-top: 0; - } - .language-switcher a { - margin-top: 0 !important; - } - .edit-post-header-toolbar .wpm-language-switcher{ - left: 10px; - margin-left: 0px !important; - } -} -.language-switcher { - left: 0; - position: absolute; - top: 0; -} - -.screen-meta-toggle { - z-index: 1; -} - -.wpm-languages .language-status { - position: absolute; - top: 5px; - right: 40px; - font-size: 13px; - line-height: 26px; - height: 28px; - display: inline-block; -} -.wpm-languages .language-order { - font-weight: 400; - display: inline-block; - width: 20px; - height: 20px; - line-height: 20px; - border: 1px solid #ccc; - border-radius: 50px; - margin-right: 10px; - text-align: center; -} -.wpm-languages .prefix { - font-weight: 400; - margin-left: 5px; -} - -.wp-core-ui .button-link.delete-language { - color: #f00; -} - -.wpm-languages { - max-width: 600px; -} - -.wpm-flags { - width: 160px; -} - -.select2-results__option img, -.select2-selection__rendered img { - margin-right: 5px; - margin-left: 5px; -} - -.languagechecklist li { - margin: 0; - padding: 0; - line-height: 22px; - word-wrap: break-word; -} - -#customize-controls .wpm-language-switcher { - display: block; - position: absolute; - top: 0; - width: 45px; - height: 41px; - padding: 0 2px 0 0; - background-color: #eee; - border: none; - border-top: 4px solid #eee; - border-right: 1px solid #ddd; - color: #444; - cursor: pointer; - transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background 0.15s ease-in-out; - box-sizing: content-box; -} -#customize-controls .wpm-language-switcher:hover, #customize-controls .wpm-language-switcher:focus { - background-color: #fff; - color: #0073aa; - border-top-color: #0073aa; - outline: none; - box-shadow: none; -} - -.edit-post-header-toolbar, .edit-widgets-header__navigable-toolbar-wrapper, .edit-site-layout__header-container { - margin-left: 48px !important; -} -.edit-post-header-toolbar .wpm-language-switcher, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher, .edit-site-layout__header-container .wpm-language-switcher { - position: absolute; - left: 10px; -} -.edit-post-header-toolbar .wpm-language-switcher .lang-main, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main, .edit-site-layout__header-container .wpm-language-switcher .lang-main { - padding-left: 10px; - padding-right: 10px; - line-height: 36px; -} -.edit-post-header-toolbar .wpm-language-switcher .lang-main img, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main img, .edit-site-layout__header-container .wpm-language-switcher .lang-main img { - top: 2px; -} -.edit-post-header-toolbar .lang-dropdown, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown, .edit-site-layout__header-container .lang-dropdown { - position: absolute; - top: 100%; - left: 0; - background-color: #fff; - border: 1px solid #ccc; - z-index: 1; -} -.edit-post-header-toolbar .lang-dropdown ul, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul, .edit-site-layout__header-container .lang-dropdown ul { - list-style: none; -} -.edit-post-header-toolbar .lang-dropdown ul a, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a, .edit-site-layout__header-container .lang-dropdown ul a { - padding: 10px; - display: block; -} -.edit-post-header-toolbar .lang-dropdown ul a:hover, .edit-post-header-toolbar .lang-dropdown ul a:focus, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:hover, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:focus, .edit-site-layout__header-container .lang-dropdown ul a:hover, .edit-site-layout__header-container .lang-dropdown ul a:focus { - background-color: #ccc; -} - -.gutenberg .languagechecklist { - list-style: none !important; -} - -.js-wpm-action + .spinner { - float: none; -} -.js-wpm-action + .success { - color: #46b450; - font-style: italic; - display: inline-block; - margin-left: 10px; - line-height: 26px; - font-weight: 700; -} -.js-wpm-action + .error { - color: #f00; - font-style: italic; - display: inline-block; - margin-left: 10px; - line-height: 26px; - font-weight: 700; -} - -#delete_localization + .spinner, -#qts_import + .spinner { - vertical-align: top; -} - -.wrap.wpm .hidden_option { - display: none; -} - -.column-languages { - width: 100px; -} - -.wpm-support-label { - margin-top: 4px; - float: left; - width: 70px; - font-size: 14px; -} - -.wpm-star-mark { - color: #f00; - margin-left: 4px; - font-weight: bold; -} - -.wpm-hide { - display: none; -} - -.wpm-query-success { - color: #46b450; -} - -.wpm-query-error { - color: #f00; -} - -/** - * Upgrade to pro button design changes - * */ -.wpm-upgrade-pro-btn, .wpm-upgrade-pro-btn:hover{ - background-color: #0099E7; - color:#fff; - border: 1px solid #0099E7; - font-weight: 500; -} - -#wpm-auto-translation-free-note{ - padding: 12px 10px 15px 10px !important; - background-color: #fff; - width: 470px; - margin-top: 20px; - border-radius: 7px; - color: #000; - text-align: center; - border: 1px solid #0099E7; - font-size: 16px; -} - -.wpm-premium-btn{ - text-decoration: none; - margin-left: 13px; - color: #fff !important; - font-weight: 500; - padding: 7px 20px 9px 20px; - background: #0099E7; - border-radius: 40px; - font-size: 15px; -} - -.wpm-premium-btn:focus{ - outline: none !important; - box-shadow: none !important; - color: #fff; -} - -.wpm-premium-btn:hover{ - color: #fff; -} - -.wpm-cursor-pointer:hover { - cursor: pointer; -} - -.wpm-free-translation-cb{ - margin-right: 15px !important; -} - -.wpm-upgrade-to-pro-note, .wpm-pro-free-btn { - font-weight: 500; - font-size: 14px; -} - -/*# sourceMappingURL=admin.css.map */ +.wpm-language-switcher { + left: 48px; + padding-right: 0; + text-align: center; +} +.wpm-language-switcher:before { + display: none; +} +.wpm-language-switcher * { + box-sizing: border-box; +} +.wpm-language-switcher:hover .lang-dropdown { + display: block; +} +.wpm-language-switcher .lang-dropdown { + display: none; +} +.wpm-language-switcher .lang-main { + line-height: 41px; +} +.wpm-language-switcher .lang-main img { + position: relative; + top: -1px; +} + +.lang-dropdown { + background-color: #fff; +} +.lang-dropdown ul { + margin-bottom: 0; + margin-top: 0; +} +.lang-dropdown li { + margin-bottom: 0; +} +.lang-dropdown li a { + display: block; +} +.lang-dropdown li a:hover { + background-color: #f3f3f5; +} + +#wp-admin-bar-wpm-language-switcher-default .ab-item { + height: 32px !important; + line-height: 32px !important; +} +#wp-admin-bar-wpm-language-switcher-default .ab-item .ab-label { + color: #eee !important; +} +#wp-admin-bar-wpm-language-switcher-default .ab-item:hover .ab-label, #wp-admin-bar-wpm-language-switcher-default .ab-item:focus .ab-label { + color: #00b9eb !important; +} + +@media screen and (max-width: 782px) { + #wp-toolbar > ul > #wp-admin-bar-wpm-language-switcher { + display: block; + } + #wp-admin-bar-wpm-language-switcher-default .ab-item { + min-width: 20px !important; + padding: 0 !important; + } + #wp-admin-bar-wpm-language-switcher-default .ab-icon { + line-height: 20px !important; + } + #wp-admin-bar-wpm-language-switcher .ab-icon { + line-height: 20px !important; + } + .language-switcher { + padding-top: 0; + } + .language-switcher a { + margin-top: 0 !important; + } + .edit-post-header-toolbar .wpm-language-switcher{ + left: 10px; + margin-left: 0px !important; + } +} +.language-switcher { + left: 0; + position: absolute; + top: 0; +} + +.screen-meta-toggle { + z-index: 1; +} + +.wpm-languages .language-status { + position: absolute; + top: 5px; + right: 40px; + font-size: 13px; + line-height: 26px; + height: 28px; + display: inline-block; +} +.wpm-languages .language-order { + font-weight: 400; + display: inline-block; + width: 20px; + height: 20px; + line-height: 20px; + border: 1px solid #ccc; + border-radius: 50px; + margin-right: 10px; + text-align: center; +} +.wpm-languages .prefix { + font-weight: 400; + margin-left: 5px; +} + +.wp-core-ui .button-link.delete-language { + color: #f00; +} + +.wpm-languages { + max-width: 600px; +} + +.wpm-flags { + width: 160px; +} + +.select2-results__option img, +.select2-selection__rendered img { + margin-right: 5px; + margin-left: 5px; +} + +.languagechecklist li { + margin: 0; + padding: 0; + line-height: 22px; + word-wrap: break-word; +} + +#customize-controls .wpm-language-switcher { + display: block; + position: absolute; + top: 0; + width: 45px; + height: 41px; + padding: 0 2px 0 0; + background-color: #eee; + border: none; + border-top: 4px solid #eee; + border-right: 1px solid #ddd; + color: #444; + cursor: pointer; + transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background 0.15s ease-in-out; + box-sizing: content-box; +} +#customize-controls .wpm-language-switcher:hover, #customize-controls .wpm-language-switcher:focus { + background-color: #fff; + color: #0073aa; + border-top-color: #0073aa; + outline: none; + box-shadow: none; +} + +.edit-post-header-toolbar, .edit-widgets-header__navigable-toolbar-wrapper { + margin-left: 48px !important; +} +.edit-post-header-toolbar .wpm-language-switcher, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher { + position: absolute; + left: 10px; +} +.edit-site-site-hub .wpm-language-switcher{ + position: relative; + left: 0px; +} +.edit-post-header-toolbar .wpm-language-switcher .lang-main, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main, .edit-site-site-hub .wpm-language-switcher .lang-main { + padding-left: 10px; + padding-right: 10px; + line-height: 36px; +} +.edit-post-header-toolbar .wpm-language-switcher .lang-main img, .edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main img, .edit-site-site-hub .wpm-language-switcher .lang-main img { + top: 2px; +} +.edit-post-header-toolbar .lang-dropdown, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown, .edit-site-site-hub .lang-dropdown { + position: absolute; + top: 100%; + left: 0; + background-color: #fff; + border: 1px solid #ccc; + z-index: 1; +} +.edit-post-header-toolbar .lang-dropdown ul, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul, .edit-site-site-hub .lang-dropdown ul { + list-style: none; +} +.edit-post-header-toolbar .lang-dropdown ul a, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a, .edit-site-site-hub .lang-dropdown ul a { + padding: 10px; + display: block; +} +.edit-post-header-toolbar .lang-dropdown ul a:hover, .edit-post-header-toolbar .lang-dropdown ul a:focus, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:hover, .edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:focus, .edit-site-site-hub .lang-dropdown ul a:hover, .edit-site-site-hub .lang-dropdown ul a:focus { + background-color: #ccc; +} + +.gutenberg .languagechecklist { + list-style: none !important; +} + +.js-wpm-action + .spinner { + float: none; +} +.js-wpm-action + .success { + color: #46b450; + font-style: italic; + display: inline-block; + margin-left: 10px; + line-height: 26px; + font-weight: 700; +} +.js-wpm-action + .error { + color: #f00; + font-style: italic; + display: inline-block; + margin-left: 10px; + line-height: 26px; + font-weight: 700; +} + +#delete_localization + .spinner, +#qts_import + .spinner { + vertical-align: top; +} + +.wrap.wpm .hidden_option { + display: none; +} + +.column-languages { + width: 100px; +} + +.wpm-support-label { + margin-top: 4px; + float: left; + width: 70px; + font-size: 14px; +} + +.wpm-star-mark { + color: #f00; + margin-left: 4px; + font-weight: bold; +} + +.wpm-hide { + display: none; +} + +.wpm-query-success { + color: #46b450; +} + +.wpm-query-error { + color: #f00; +} + +/** + * Upgrade to pro button design changes + * */ +.wpm-upgrade-pro-btn, .wpm-upgrade-pro-btn:hover{ + background-color: #0099E7; + color:#fff; + border: 1px solid #0099E7; + font-weight: 500; +} + +#wpm-auto-translation-free-note{ + padding: 12px 10px 15px 10px !important; + background-color: #fff; + width: 470px; + margin-top: 20px; + border-radius: 7px; + color: #000; + text-align: center; + border: 1px solid #0099E7; + font-size: 16px; +} + +.wpm-premium-btn{ + text-decoration: none; + margin-left: 13px; + color: #fff !important; + font-weight: 500; + padding: 7px 20px 9px 20px; + background: #0099E7; + border-radius: 40px; + font-size: 15px; +} + +.wpm-premium-btn:focus{ + outline: none !important; + box-shadow: none !important; + color: #fff; +} + +.wpm-premium-btn:hover{ + color: #fff; +} + +.wpm-cursor-pointer:hover { + cursor: pointer; +} + +.wpm-free-translation-cb{ + margin-right: 15px !important; +} + +.wpm-upgrade-to-pro-note, .wpm-pro-free-btn { + font-weight: 500; + font-size: 14px; +} +.wpm-post-type-table td{ + padding: 0px; +} +.wpm-post-type-table td label:hover{ + cursor: pointer; +} + +/* Auto-translate layout styles */ +.wpm-auto-translate-item { + display: flex; + align-items: flex-start; + gap: 20px; + margin-bottom: 15px; +} + +.wpm-auto-translate-item .wpm-checkbox-section { + flex: 0 0 auto; +} + +.wpm-auto-translate-item .wpm-checkbox-section h4 { + margin: 0; + padding: 0; + line-height: 1.4; + width: auto; +} + +.wpm-auto-translate-item .wpm-checkbox-section label{ + width: 150px; + display: inline-block; +} + +.wpm-auto-translate-item .wpm-exclude-section { + flex: 1; +} + +.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper { + display: flex; + flex-direction: column; + gap: 5px; + background: #f9f9f9; + padding: 10px; + border-radius: 4px; + border: 1px solid #e1e1e1; +} + +.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .wpm-exclude-label { + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: #555; + margin: 0; + margin-bottom: 5px; + font-weight: 500; +} + +.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .exclude-select { + min-width: 200px; + border: 1px solid #ddd; + border-radius: 3px; +} + +/* Ensure proper spacing for items without exclude sections */ +.wpm-auto-translate-item + li { + margin-top: 10px; +} + +/* Ensure proper alignment for the "All" option */ +.wpm-auto-translate-item:first-of-type { + margin-top: 0; +} + +#wpmpro-translation-error-message{ + background: #edd6d4; + border: 1px solid #e6c8c3; + color: #3c434a; + padding: 15px; + border-radius: 4px; + margin: 10px 0; +} + +#wpmpro-translation-error-message h4{ + color: #e41a1a; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + .wpm-auto-translate-item { + flex-direction: column; + gap: 10px; + } + + .wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .exclude-select { + min-width: 100%; + } +} + +/*# sourceMappingURL=admin.css.map */ diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.min.css b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.min.css index 32c50e201..6151546db 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.min.css +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.min.css @@ -1 +1 @@ -.wpm-language-switcher{left:48px;padding-right:0;text-align:center}.wpm-hide,.wpm-language-switcher .lang-dropdown,.wpm-language-switcher:before,.wrap.wpm .hidden_option{display:none}.wpm-language-switcher *{box-sizing:border-box}.lang-dropdown li a,.wpm-language-switcher:hover .lang-dropdown{display:block}.wpm-language-switcher .lang-main{line-height:41px}.wpm-language-switcher .lang-main img{position:relative;top:-1px}.lang-dropdown{background-color:#fff}.lang-dropdown ul{margin-bottom:0;margin-top:0}.lang-dropdown li{margin-bottom:0}.lang-dropdown li a:hover{background-color:#f3f3f5}#wp-admin-bar-wpm-language-switcher-default .ab-item{height:32px!important;line-height:32px!important}#wp-admin-bar-wpm-language-switcher-default .ab-item .ab-label{color:#eee!important}#wp-admin-bar-wpm-language-switcher-default .ab-item:focus .ab-label,#wp-admin-bar-wpm-language-switcher-default .ab-item:hover .ab-label{color:#00b9eb!important}@media screen and (max-width:782px){#wp-toolbar>ul>#wp-admin-bar-wpm-language-switcher{display:block}#wp-admin-bar-wpm-language-switcher-default .ab-item{min-width:20px!important;padding:0!important}#wp-admin-bar-wpm-language-switcher .ab-icon,#wp-admin-bar-wpm-language-switcher-default .ab-icon{line-height:20px!important}.language-switcher{padding-top:0}.language-switcher a{margin-top:0!important}.edit-post-header-toolbar .wpm-language-switcher{left:10px;margin-left:0!important}}.language-switcher{left:0;position:absolute;top:0}.screen-meta-toggle{z-index:1}.wpm-languages .language-status{position:absolute;top:5px;right:40px;font-size:13px;line-height:26px;height:28px;display:inline-block}.wpm-languages .language-order{font-weight:400;display:inline-block;width:20px;height:20px;line-height:20px;border:1px solid #ccc;border-radius:50px;margin-right:10px;text-align:center}.wpm-languages .prefix{font-weight:400;margin-left:5px}.js-wpm-action+.error,.js-wpm-action+.success{font-style:italic;display:inline-block;margin-left:10px;line-height:26px;font-weight:700}.wp-core-ui .button-link.delete-language,.wpm-query-error{color:red}.wpm-languages{max-width:600px}.wpm-flags{width:160px}.select2-results__option img,.select2-selection__rendered img{margin-right:5px;margin-left:5px}.languagechecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}#customize-controls .wpm-language-switcher{display:block;position:absolute;top:0;width:45px;height:41px;padding:0 2px 0 0;background-color:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;color:#444;cursor:pointer;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;box-sizing:content-box}#customize-controls .wpm-language-switcher:focus,#customize-controls .wpm-language-switcher:hover{background-color:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;box-shadow:none}.edit-post-header-toolbar,.edit-site-layout__header-container,.edit-widgets-header__navigable-toolbar-wrapper{margin-left:48px!important}.edit-post-header-toolbar .wpm-language-switcher,.edit-site-layout__header-container .wpm-language-switcher,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher{position:absolute;left:10px}.edit-post-header-toolbar .wpm-language-switcher .lang-main,.edit-site-layout__header-container .wpm-language-switcher .lang-main,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main{padding-left:10px;padding-right:10px;line-height:36px}.edit-post-header-toolbar .wpm-language-switcher .lang-main img,.edit-site-layout__header-container .wpm-language-switcher .lang-main img,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main img{top:2px}.edit-post-header-toolbar .lang-dropdown,.edit-site-layout__header-container .lang-dropdown,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown{position:absolute;top:100%;left:0;background-color:#fff;border:1px solid #ccc;z-index:1}.edit-post-header-toolbar .lang-dropdown ul,.edit-site-layout__header-container .lang-dropdown ul,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul{list-style:none}.edit-post-header-toolbar .lang-dropdown ul a,.edit-site-layout__header-container .lang-dropdown ul a,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a{padding:10px;display:block}.edit-post-header-toolbar .lang-dropdown ul a:focus,.edit-post-header-toolbar .lang-dropdown ul a:hover,.edit-site-layout__header-container .lang-dropdown ul a:focus,.edit-site-layout__header-container .lang-dropdown ul a:hover,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:focus,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:hover{background-color:#ccc}.gutenberg .languagechecklist{list-style:none!important}.js-wpm-action+.spinner{float:none}.js-wpm-action+.success{color:#46b450}.js-wpm-action+.error{color:red}#delete_localization+.spinner,#qts_import+.spinner{vertical-align:top}.column-languages{width:100px}.wpm-support-label{margin-top:4px;float:left;width:70px;font-size:14px}.wpm-star-mark{color:red;margin-left:4px;font-weight:700}.wpm-query-success{color:#46b450}.wpm-upgrade-pro-btn,.wpm-upgrade-pro-btn:hover{background-color:#0099e7;color:#fff;border:1px solid #0099e7;font-weight:500}#wpm-auto-translation-free-note{padding:12px 10px 15px!important;background-color:#fff;width:470px;margin-top:20px;border-radius:7px;color:#000;text-align:center;border:1px solid #0099e7;font-size:16px}.wpm-premium-btn{text-decoration:none;margin-left:13px;color:#fff!important;font-weight:500;padding:7px 20px 9px;background:#0099e7;border-radius:40px;font-size:15px}.wpm-premium-btn:focus{outline:0!important;box-shadow:none!important;color:#fff}.wpm-premium-btn:hover{color:#fff}.wpm-cursor-pointer:hover{cursor:pointer}.wpm-free-translation-cb{margin-right:15px!important}.wpm-upgrade-to-pro-note,.wpm-pro-free-btn{font-weight:500;font-size:14px} \ No newline at end of file +.wpm-language-switcher{left:48px;padding-right:0;text-align:center}.wpm-hide,.wpm-language-switcher .lang-dropdown,.wpm-language-switcher:before,.wrap.wpm .hidden_option{display:none}.wpm-language-switcher *{box-sizing:border-box}.lang-dropdown li a,.wpm-language-switcher:hover .lang-dropdown{display:block}.wpm-language-switcher .lang-main{line-height:41px}.wpm-language-switcher .lang-main img{position:relative;top:-1px}.lang-dropdown{background-color:#fff}.lang-dropdown ul{margin-bottom:0;margin-top:0}.lang-dropdown li{margin-bottom:0}.lang-dropdown li a:hover{background-color:#f3f3f5}#wp-admin-bar-wpm-language-switcher-default .ab-item{height:32px!important;line-height:32px!important}#wp-admin-bar-wpm-language-switcher-default .ab-item .ab-label{color:#eee!important}#wp-admin-bar-wpm-language-switcher-default .ab-item:focus .ab-label,#wp-admin-bar-wpm-language-switcher-default .ab-item:hover .ab-label{color:#00b9eb!important}@media screen and (max-width:782px){#wp-toolbar>ul>#wp-admin-bar-wpm-language-switcher{display:block}#wp-admin-bar-wpm-language-switcher-default .ab-item{min-width:20px!important;padding:0!important}#wp-admin-bar-wpm-language-switcher .ab-icon,#wp-admin-bar-wpm-language-switcher-default .ab-icon{line-height:20px!important}.language-switcher{padding-top:0}.language-switcher a{margin-top:0!important}.edit-post-header-toolbar .wpm-language-switcher{left:10px;margin-left:0!important}}.language-switcher{left:0;position:absolute;top:0}.screen-meta-toggle{z-index:1}.wpm-languages .language-status{position:absolute;top:5px;right:40px;font-size:13px;line-height:26px;height:28px;display:inline-block}.wpm-languages .language-order{font-weight:400;display:inline-block;width:20px;height:20px;line-height:20px;border:1px solid #ccc;border-radius:50px;margin-right:10px;text-align:center}.wpm-languages .prefix{font-weight:400;margin-left:5px}.js-wpm-action+.error,.js-wpm-action+.success{font-style:italic;margin-left:10px;line-height:26px;font-weight:700;display:inline-block}.wp-core-ui .button-link.delete-language,.wpm-query-error{color:red}.wpm-languages{max-width:600px}.wpm-flags{width:160px}.select2-results__option img,.select2-selection__rendered img{margin-right:5px;margin-left:5px}.languagechecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}#customize-controls .wpm-language-switcher{display:block;position:absolute;top:0;width:45px;height:41px;padding:0 2px 0 0;background-color:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;color:#444;cursor:pointer;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;box-sizing:content-box}#customize-controls .wpm-language-switcher:focus,#customize-controls .wpm-language-switcher:hover{background-color:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;box-shadow:none}.edit-post-header-toolbar,.edit-widgets-header__navigable-toolbar-wrapper{margin-left:48px!important}.edit-post-header-toolbar .wpm-language-switcher,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher{position:absolute;left:10px}.edit-site-site-hub .wpm-language-switcher{position:relative;left:0}.edit-post-header-toolbar .wpm-language-switcher .lang-main,.edit-site-site-hub .wpm-language-switcher .lang-main,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main{padding-left:10px;padding-right:10px;line-height:36px}.edit-post-header-toolbar .wpm-language-switcher .lang-main img,.edit-site-site-hub .wpm-language-switcher .lang-main img,.edit-widgets-header__navigable-toolbar-wrapper .wpm-language-switcher .lang-main img{top:2px}.edit-post-header-toolbar .lang-dropdown,.edit-site-site-hub .lang-dropdown,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown{position:absolute;top:100%;left:0;background-color:#fff;border:1px solid #ccc;z-index:1}.edit-post-header-toolbar .lang-dropdown ul,.edit-site-site-hub .lang-dropdown ul,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul{list-style:none}.edit-post-header-toolbar .lang-dropdown ul a,.edit-site-site-hub .lang-dropdown ul a,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a{padding:10px;display:block}.edit-post-header-toolbar .lang-dropdown ul a:focus,.edit-post-header-toolbar .lang-dropdown ul a:hover,.edit-site-site-hub .lang-dropdown ul a:focus,.edit-site-site-hub .lang-dropdown ul a:hover,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:focus,.edit-widgets-header__navigable-toolbar-wrapper .lang-dropdown ul a:hover{background-color:#ccc}.gutenberg .languagechecklist{list-style:none!important}.js-wpm-action+.spinner{float:none}.js-wpm-action+.success{color:#46b450}.js-wpm-action+.error{color:red}#delete_localization+.spinner,#qts_import+.spinner{vertical-align:top}.column-languages{width:100px}.wpm-support-label{margin-top:4px;float:left;width:70px;font-size:14px}.wpm-star-mark{color:red;margin-left:4px;font-weight:700}.wpm-query-success{color:#46b450}.wpm-upgrade-pro-btn,.wpm-upgrade-pro-btn:hover{background-color:#0099e7;color:#fff;border:1px solid #0099e7;font-weight:500}#wpm-auto-translation-free-note{padding:12px 10px 15px!important;background-color:#fff;width:470px;margin-top:20px;border-radius:7px;color:#000;text-align:center;border:1px solid #0099e7;font-size:16px}.wpm-premium-btn{text-decoration:none;margin-left:13px;color:#fff!important;font-weight:500;padding:7px 20px 9px;background:#0099e7;border-radius:40px;font-size:15px}.wpm-premium-btn:focus{outline:0!important;box-shadow:none!important;color:#fff}.wpm-premium-btn:hover{color:#fff}.wpm-cursor-pointer:hover,.wpm-post-type-table td label:hover{cursor:pointer}.wpm-free-translation-cb{margin-right:15px!important}.wpm-pro-free-btn,.wpm-upgrade-to-pro-note{font-weight:500;font-size:14px}.wpm-post-type-table td{padding:0}.wpm-auto-translate-item{display:flex;align-items:flex-start;gap:20px;margin-bottom:15px}.wpm-auto-translate-item .wpm-checkbox-section{flex:0 0 auto}.wpm-auto-translate-item .wpm-checkbox-section h4{margin:0;padding:0;line-height:1.4;width:auto}.wpm-auto-translate-item .wpm-checkbox-section label{width:150px;display:inline-block}.wpm-auto-translate-item .wpm-exclude-section{flex:1}.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper{display:flex;flex-direction:column;gap:5px;background:#f9f9f9;padding:10px;border-radius:4px;border:1px solid #e1e1e1}.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .wpm-exclude-label{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#555;margin:0 0 5px;font-weight:500}.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .exclude-select{min-width:200px;border:1px solid #ddd;border-radius:3px}.wpm-auto-translate-item+li{margin-top:10px}.wpm-auto-translate-item:first-of-type{margin-top:0}#wpmpro-translation-error-message{background:#edd6d4;border:1px solid #e6c8c3;color:#3c434a;padding:15px;border-radius:4px;margin:10px 0}#wpmpro-translation-error-message h4{color:#e41a1a}@media (max-width:768px){.wpm-auto-translate-item{flex-direction:column;gap:10px}.wpm-auto-translate-item .wpm-exclude-section .exclude-wrapper .exclude-select{min-width:100%}} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.scss index cb7323971..66f97cea6 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/admin.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/admin.scss @@ -1,33 +1,33 @@ -@import "common/variables"; -@import "components/lang-switcher"; -@import "components/languages-list"; -@import "components/language-metabox"; -@import "layouts/customizer"; -@import "layouts/gutenberg"; -@import "layouts/settings"; -@import "layouts/table"; - -.wpm-support-label{ - margin-top: 4px; - float: left; - width: 70px; - font-size: 14px; -} - -.wpm-star-mark{ - color: $red; - margin-left: 4px; - font-weight: bold; -} - -.wpm-hide{ - display: none; -} - -.wpm-query-success{ - color: $green; -} - -.wpm-query-error{ - color: $red; +@import "common/variables"; +@import "components/lang-switcher"; +@import "components/languages-list"; +@import "components/language-metabox"; +@import "layouts/customizer"; +@import "layouts/gutenberg"; +@import "layouts/settings"; +@import "layouts/table"; + +.wpm-support-label{ + margin-top: 4px; + float: left; + width: 70px; + font-size: 14px; +} + +.wpm-star-mark{ + color: $red; + margin-left: 4px; + font-weight: bold; +} + +.wpm-hide{ + display: none; +} + +.wpm-query-success{ + color: $green; +} + +.wpm-query-error{ + color: $red; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/common/_variables.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/common/_variables.scss index f39ce2412..0be490995 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/common/_variables.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/common/_variables.scss @@ -1,8 +1,8 @@ -// Colors -$brand-primary: #0073aa; -$bg-color: #eee; -$hover-color: #f3f3f5; -$red: #dc3232; -$white: #fff; -$green: #46b450; -$red: #f00; +// Colors +$brand-primary: #0073aa; +$bg-color: #eee; +$hover-color: #f3f3f5; +$red: #dc3232; +$white: #fff; +$green: #46b450; +$red: #f00; diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_lang-switcher.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_lang-switcher.scss index 64c66f8bd..5267cb6da 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_lang-switcher.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_lang-switcher.scss @@ -1,118 +1,118 @@ -.wpm-language-switcher { - left: 48px; - padding-right: 0; - text-align: center; - - &:before { - display: none; - } - - * { - box-sizing: border-box; - } - - &:hover { - - .lang-dropdown { - display: block; - } - } - - .lang-dropdown { - display: none; - } - - .lang-main { - line-height: 41px; - - img { - position: relative; - top: -1px; - } - } -} - -.lang-dropdown { - background-color: $white; - - ul { - margin-bottom: 0; - margin-top: 0; - } - - li { - margin-bottom: 0; - - a { - display: block; - - &:hover { - background-color: $hover-color; - } - } - } -} - -#wp-admin-bar-wpm-language-switcher-default { - - .ab-item { - height: 32px !important; - line-height: 32px !important; - - .ab-label { - color: #eee !important; - } - - &:hover, - &:focus { - - .ab-label { - color: #00b9eb !important; - } - } - } -} - -@media screen and (max-width: 782px) { - - #wp-toolbar > ul > #wp-admin-bar-wpm-language-switcher { - display: block; - } - - #wp-admin-bar-wpm-language-switcher-default { - - .ab-item { - min-width: 20px !important; - padding: 0 !important; - } - - .ab-icon { - line-height: 20px !important; - } - } - - #wp-admin-bar-wpm-language-switcher { - - .ab-icon { - line-height: 20px !important; - } - } - - .language-switcher { - padding-top: 0; - - a { - margin-top: 0 !important; - } - } -} - -.language-switcher { - left: 0; - position: absolute; - top: 0; -} - -.screen-meta-toggle { - z-index: 1; -} +.wpm-language-switcher { + left: 48px; + padding-right: 0; + text-align: center; + + &:before { + display: none; + } + + * { + box-sizing: border-box; + } + + &:hover { + + .lang-dropdown { + display: block; + } + } + + .lang-dropdown { + display: none; + } + + .lang-main { + line-height: 41px; + + img { + position: relative; + top: -1px; + } + } +} + +.lang-dropdown { + background-color: $white; + + ul { + margin-bottom: 0; + margin-top: 0; + } + + li { + margin-bottom: 0; + + a { + display: block; + + &:hover { + background-color: $hover-color; + } + } + } +} + +#wp-admin-bar-wpm-language-switcher-default { + + .ab-item { + height: 32px !important; + line-height: 32px !important; + + .ab-label { + color: #eee !important; + } + + &:hover, + &:focus { + + .ab-label { + color: #00b9eb !important; + } + } + } +} + +@media screen and (max-width: 782px) { + + #wp-toolbar > ul > #wp-admin-bar-wpm-language-switcher { + display: block; + } + + #wp-admin-bar-wpm-language-switcher-default { + + .ab-item { + min-width: 20px !important; + padding: 0 !important; + } + + .ab-icon { + line-height: 20px !important; + } + } + + #wp-admin-bar-wpm-language-switcher { + + .ab-icon { + line-height: 20px !important; + } + } + + .language-switcher { + padding-top: 0; + + a { + margin-top: 0 !important; + } + } +} + +.language-switcher { + left: 0; + position: absolute; + top: 0; +} + +.screen-meta-toggle { + z-index: 1; +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_language-metabox.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_language-metabox.scss index 54206696f..5fc4fef5b 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_language-metabox.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_language-metabox.scss @@ -1,9 +1,9 @@ -.languagechecklist { - - li { - margin: 0; - padding: 0; - line-height: 22px; - word-wrap: break-word; - } -} +.languagechecklist { + + li { + margin: 0; + padding: 0; + line-height: 22px; + word-wrap: break-word; + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_languages-list.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_languages-list.scss index 05b5029d6..722b2d8bb 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/components/_languages-list.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/components/_languages-list.scss @@ -1,50 +1,50 @@ -.wpm-languages { - - .language-status { - position: absolute; - top: 5px; - right: 40px; - font-size: 13px; - line-height: 26px; - height: 28px; - display: inline-block; - } - - .language-order { - font-weight: 400; - display: inline-block; - width: 20px; - height: 20px; - line-height: 20px; - border: 1px solid #ccc; - border-radius: 50px; - margin-right: 10px; - text-align: center; - } - - .prefix { - font-weight: 400; - margin-left: 5px; - } -} - -.wp-core-ui .button-link.delete-language { - color: $red; -} - -.wpm-languages { - max-width: 600px; -} - -.wpm-flags { - width: 160px; -} - -.select2-results__option, -.select2-selection__rendered { - - img { - margin-right: 5px; - margin-left: 5px; - } -} +.wpm-languages { + + .language-status { + position: absolute; + top: 5px; + right: 40px; + font-size: 13px; + line-height: 26px; + height: 28px; + display: inline-block; + } + + .language-order { + font-weight: 400; + display: inline-block; + width: 20px; + height: 20px; + line-height: 20px; + border: 1px solid #ccc; + border-radius: 50px; + margin-right: 10px; + text-align: center; + } + + .prefix { + font-weight: 400; + margin-left: 5px; + } +} + +.wp-core-ui .button-link.delete-language { + color: $red; +} + +.wpm-languages { + max-width: 600px; +} + +.wpm-flags { + width: 160px; +} + +.select2-results__option, +.select2-selection__rendered { + + img { + margin-right: 5px; + margin-left: 5px; + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_customizer.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_customizer.scss index b980433f4..981d0c950 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_customizer.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_customizer.scss @@ -1,28 +1,28 @@ -#customize-controls { - - .wpm-language-switcher { - display: block; - position: absolute; - top: 0; - width: 45px; - height: 41px; - padding: 0 2px 0 0; - background-color: #eee; - border: none; - border-top: 4px solid #eee; - border-right: 1px solid #ddd; - color: #444; - cursor: pointer; - transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background 0.15s ease-in-out; - box-sizing: content-box; - - &:hover, - &:focus { - background-color: #fff; - color: #0073aa; - border-top-color: #0073aa; - outline: none; - box-shadow: none; - } - } -} +#customize-controls { + + .wpm-language-switcher { + display: block; + position: absolute; + top: 0; + width: 45px; + height: 41px; + padding: 0 2px 0 0; + background-color: #eee; + border: none; + border-top: 4px solid #eee; + border-right: 1px solid #ddd; + color: #444; + cursor: pointer; + transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background 0.15s ease-in-out; + box-sizing: content-box; + + &:hover, + &:focus { + background-color: #fff; + color: #0073aa; + border-top-color: #0073aa; + outline: none; + box-shadow: none; + } + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_gutenberg.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_gutenberg.scss index 8c3d15c38..ecc130123 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_gutenberg.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_gutenberg.scss @@ -1,48 +1,48 @@ -.edit-post-header-toolbar, .edit-widgets-header__navigable-toolbar-wrapper { - margin-left: 48px !important; - - .wpm-language-switcher { - position: absolute; - left: 10px !important; - - .lang-main { - padding-left: 10px; - padding-right: 10px; - line-height: 36px; - - img { - top: 2px; - } - } - } - - .lang-dropdown { - position: absolute; - top: 100%; - left: 0; - background-color: #fff; - border: 1px solid #ccc; - z-index: 1; - - ul { - list-style: none; - - a { - padding: 10px; - display: block; - - &:hover, - &:focus { - background-color: #ccc; - } - } - } - } -} - -.gutenberg { - - .languagechecklist { - list-style: none !important; - } -} +.edit-post-header-toolbar, .edit-widgets-header__navigable-toolbar-wrapper { + margin-left: 48px !important; + + .wpm-language-switcher { + position: absolute; + left: 10px !important; + + .lang-main { + padding-left: 10px; + padding-right: 10px; + line-height: 36px; + + img { + top: 2px; + } + } + } + + .lang-dropdown { + position: absolute; + top: 100%; + left: 0; + background-color: #fff; + border: 1px solid #ccc; + z-index: 1; + + ul { + list-style: none; + + a { + padding: 10px; + display: block; + + &:hover, + &:focus { + background-color: #ccc; + } + } + } + } +} + +.gutenberg { + + .languagechecklist { + list-style: none !important; + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_settings.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_settings.scss index fee310aea..292284d31 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_settings.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_settings.scss @@ -1,39 +1,39 @@ -.js-wpm-action { - - + .spinner { - float: none; - } - - + .success { - color: $green; - font-style: italic; - display: inline-block; - margin-left: 10px; - line-height: 26px; - font-weight: 700; - } - - + .error { - color: $red; - font-style: italic; - display: inline-block; - margin-left: 10px; - line-height: 26px; - font-weight: 700; - } -} - -#delete_localization, -#qts_import { - - + .spinner { - vertical-align: top; - } -} - -.wrap.wpm { - - .hidden_option { - display: none; - } -} +.js-wpm-action { + + + .spinner { + float: none; + } + + + .success { + color: $green; + font-style: italic; + display: inline-block; + margin-left: 10px; + line-height: 26px; + font-weight: 700; + } + + + .error { + color: $red; + font-style: italic; + display: inline-block; + margin-left: 10px; + line-height: 26px; + font-weight: 700; + } +} + +#delete_localization, +#qts_import { + + + .spinner { + vertical-align: top; + } +} + +.wrap.wpm { + + .hidden_option { + display: none; + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_table.scss b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_table.scss index dfc1b4a24..9f45b0d20 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_table.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/layouts/_table.scss @@ -1,3 +1,3 @@ -.column-languages { - width: 100px; -} +.column-languages { + width: 100px; +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.css new file mode 100644 index 000000000..3d0c8184f --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.css @@ -0,0 +1,3 @@ +.wpm-bulk-translate-save .button { + margin-right: 20px; +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.min.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.min.css new file mode 100644 index 000000000..c1623335d --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-bulk-translate.min.css @@ -0,0 +1 @@ +.wpm-bulk-translate-save .button{margin-right:20px} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-feedback-style.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-feedback-style.css index 61747f59f..15fc242ba 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-feedback-style.css +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-feedback-style.css @@ -1,42 +1,42 @@ -/* makebetter admin css*/ - -/** - PLUGINS ADMIN PAGE -*/ -#wpm-reloaded-feedback-overlay { - /* Height & width depends on how you want to reveal the overlay (see JS below) */ - height: 100%; - width: 100%; - position: fixed; /* Stay in place */ - z-index: 10000; /* Sit on top */ - left: 0; - top: 0; - background-color: rgb(120,120,120); /* Black fallback color */ - background-color: rgba(0,0,0, 0.5); /* Black w/opacity */ -} -#wpm-reloaded-feedback-content { - position: relative; - top: 25%; /* 25% from the top */ - width: 500px; - max-width: 100%; - margin: auto; - margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */ - max-height: 50%; - padding: 20px; - background-color: #fff; - overflow-y: auto; -} -.mb-box{display: none;width:100%;} -.wpm-feedback-not-deactivate { display: block; text-align: right; } - -#wpm-reloaded-feedback-content h3{ - margin:5px; - font-size: 1em; -} - -@media screen and (max-width:400px){ - #wpm-reloaded-feedback-content { - padding:0px; - padding-bottom:50px; - } +/* makebetter admin css*/ + +/** + PLUGINS ADMIN PAGE +*/ +#wpm-reloaded-feedback-overlay { + /* Height & width depends on how you want to reveal the overlay (see JS below) */ + height: 100%; + width: 100%; + position: fixed; /* Stay in place */ + z-index: 10000; /* Sit on top */ + left: 0; + top: 0; + background-color: rgb(120,120,120); /* Black fallback color */ + background-color: rgba(0,0,0, 0.5); /* Black w/opacity */ +} +#wpm-reloaded-feedback-content { + position: relative; + top: 25%; /* 25% from the top */ + width: 500px; + max-width: 100%; + margin: auto; + margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */ + max-height: 50%; + padding: 20px; + background-color: #fff; + overflow-y: auto; +} +.mb-box{display: none;width:100%;} +.wpm-feedback-not-deactivate { display: block; text-align: right; } + +#wpm-reloaded-feedback-content h3{ + margin:5px; + font-size: 1em; +} + +@media screen and (max-width:400px){ + #wpm-reloaded-feedback-content { + padding:0px; + padding-bottom:50px; + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-forminator.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-forminator.css index 41c293b0f..200bfde81 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-forminator.css +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-forminator.css @@ -1,7 +1,7 @@ -/** - * This CSS is only for forminator plugin - * @since 2.4.16 - * */ -.wpmudev-forminator-forminator-cform, .wpmudev-forminator-forminator-poll, .wpmudev-forminator-forminator-quiz, .wpmudev-forminator-forminator-poll-wizard, .wpmudev-forminator-forminator-cform-wizard, .wpmudev-forminator-forminator-knowledge-wizard, .wpmudev-forminator-forminator-entries{ - margin-top: 50px !important; +/** + * This CSS is only for forminator plugin + * @since 2.4.16 + * */ +.wpmudev-forminator-forminator-cform, .wpmudev-forminator-forminator-poll, .wpmudev-forminator-forminator-quiz, .wpmudev-forminator-forminator-poll-wizard, .wpmudev-forminator-forminator-cform-wizard, .wpmudev-forminator-forminator-knowledge-wizard, .wpmudev-forminator-forminator-entries{ + margin-top: 50px !important; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.css new file mode 100644 index 000000000..ca117dc8b --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.css @@ -0,0 +1,49 @@ +.wpm-opeai-provider-note{ + margin-left: 50px; + font-weight: 500; + display: none; +} + +#wpm-secret-key-error, #wpm-prompt-error{ + display: none; + color: red; + font-weight: 400; + margin-top: 5px; +} + +.wpm-openai-api-success-note{ + display: none; + color: green; + font-weight: 600; + margin-top: 5px; +} + +.wpm-openai-api-error-note{ + display: none; + color: red; + font-weight: 600; + margin-top: 5px; +} + +.wpm-openai-provider-note{ + font-weight: 500; + margin-left: 50px; +} + +#wpm-save-openai-settings-td{ + padding-left: 0px; +} + +.wpm-pl-20{ + padding-left: 20px !important; +} + +.wpm-coming-soon{ + padding:4px 12px; + background:#0099E7; + color:#fff; + border-radius:20px; + font-size:12px; + font-weight:600; + box-shadow:0 2px 5px rgba(0,0,0,0.15); +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.min.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.min.css new file mode 100644 index 000000000..211cc7b4a --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpm-openai.min.css @@ -0,0 +1 @@ +.wpm-opeai-provider-note{margin-left:50px;font-weight:500;display:none}#wpm-prompt-error,#wpm-secret-key-error{display:none;color:red;font-weight:400;margin-top:5px}.wpm-openai-api-success-note{display:none;color:green;font-weight:600;margin-top:5px}.wpm-openai-api-error-note{display:none;color:red;font-weight:600;margin-top:5px}.wpm-openai-provider-note{font-weight:500;margin-left:50px}#wpm-save-openai-settings-td{padding-left:0}.wpm-pl-20{padding-left:20px!important}.wpm-coming-soon{padding:4px 12px;background:#0099e7;color:#fff;border-radius:20px;font-size:12px;font-weight:600;box-shadow:0 2px 5px rgba(0,0,0,.15)} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.css new file mode 100644 index 000000000..fb7877cba --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.css @@ -0,0 +1,7 @@ +#wpm-auto-translate-btn p, #wpm-auto-translate-term-btn p{ + margin: 5px; +} +#wpm-auto-translate-btn p:before, #wpm-auto-translate-term-btn p:before{ + color: #fff; + animation: rotation 2s infinite linear; +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.min.css b/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.min.css new file mode 100644 index 000000000..2611a5a0b --- /dev/null +++ b/plugins/wp-react-custom-multilang/assets/styles/admin/wpmpro-autotranslate-singular.min.css @@ -0,0 +1 @@ +#wpm-auto-translate-btn p,#wpm-auto-translate-term-btn p{margin:5px}#wpm-auto-translate-btn p:before,#wpm-auto-translate-term-btn p:before{color:#fff;animation:2s linear infinite rotation} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/common/_variables.scss b/plugins/wp-react-custom-multilang/assets/styles/common/_variables.scss index f07477ec1..84d06b4ac 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/common/_variables.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/common/_variables.scss @@ -1,4 +1,4 @@ -// Colors -$brand-primary: #0073aa; -$white: #fff; -$black: #000; +// Colors +$brand-primary: #0073aa; +$white: #fff; +$black: #000; diff --git a/plugins/wp-react-custom-multilang/assets/styles/components/_lang-switcher.scss b/plugins/wp-react-custom-multilang/assets/styles/components/_lang-switcher.scss index 71f5fadc1..e1aeb4756 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/components/_lang-switcher.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/components/_lang-switcher.scss @@ -1,87 +1,87 @@ -.wpm-switcher-list { - list-style: none; - margin-bottom: 0; - padding-left: 0; - - li { - - a, - > span { - color: lighten($black, 20%); - - &:hover { - color: $black; - } - - img { - display: inline-block; - margin-right: 3px; - } - } - - &.active { - - a, - > span { - color: $black; - } - } - } -} - -.wpm-switcher-dropdown { - list-style: none; - margin-bottom: 0; - padding-left: 0; - position: relative; - - a, - span { - - img { - display: inline-block; - margin-right: 3px; - } - } - - a { - color: lighten($black, 20%); - - &:hover { - color: $black; - } - } - - .wpm-language-dropdown { - display: none; - left: 0; - list-style: none; - margin-bottom: 0; - margin-left: 0; - padding-left: 0; - position: absolute; - top: 100%; - } - - > li { - position: relative; - - &:hover { - - .wpm-language-dropdown { - display: block; - } - } - } - - .wpm-item-language-main { - - > span { - - &:hover { - cursor: pointer; - } - } - } -} - +.wpm-switcher-list { + list-style: none; + margin-bottom: 0; + padding-left: 0; + + li { + + a, + > span { + color: lighten($black, 20%); + + &:hover { + color: $black; + } + + img { + display: inline-block; + margin-right: 3px; + } + } + + &.active { + + a, + > span { + color: $black; + } + } + } +} + +.wpm-switcher-dropdown { + list-style: none; + margin-bottom: 0; + padding-left: 0; + position: relative; + + a, + span { + + img { + display: inline-block; + margin-right: 3px; + } + } + + a { + color: lighten($black, 20%); + + &:hover { + color: $black; + } + } + + .wpm-language-dropdown { + display: none; + left: 0; + list-style: none; + margin-bottom: 0; + margin-left: 0; + padding-left: 0; + position: absolute; + top: 100%; + } + + > li { + position: relative; + + &:hover { + + .wpm-language-dropdown { + display: block; + } + } + } + + .wpm-item-language-main { + + > span { + + &:hover { + cursor: pointer; + } + } + } +} + diff --git a/plugins/wp-react-custom-multilang/assets/styles/components/_menu.scss b/plugins/wp-react-custom-multilang/assets/styles/components/_menu.scss index 311ee1fcd..a62e674b7 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/components/_menu.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/components/_menu.scss @@ -1,13 +1,13 @@ -.wpm-languages { - - &.menu-item { - - > a { - - img { - display: inline-block; - margin-right: 5px; - } - } - } -} +.wpm-languages { + + &.menu-item { + + > a { + + img { + display: inline-block; + margin-right: 5px; + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/assets/styles/main.css b/plugins/wp-react-custom-multilang/assets/styles/main.css index f3944f625..a91ab9a27 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/main.css +++ b/plugins/wp-react-custom-multilang/assets/styles/main.css @@ -1,58 +1,58 @@ -.wpm-switcher-list { - list-style: none; - margin-bottom: 0; - padding-left: 0; } - .wpm-switcher-list li a, - .wpm-switcher-list li > span { - color: #333333; } - .wpm-switcher-list li a:hover, - .wpm-switcher-list li > span:hover { - color: #000; } - .wpm-switcher-list li a img, - .wpm-switcher-list li > span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-list li.active a, - .wpm-switcher-list li.active > span { - color: #000; } - -.wpm-switcher-dropdown { - list-style: none; - margin-bottom: 0; - padding-left: 0; - position: relative; } - .wpm-switcher-dropdown a img, - .wpm-switcher-dropdown span img { - display: inline-block; - margin-right: 3px; } - .wpm-switcher-dropdown a { - color: #333333; } - .wpm-switcher-dropdown a:hover { - color: #000; } - .wpm-switcher-dropdown .wpm-language-dropdown { - display: none; - left: 0; - list-style: none; - margin-bottom: 0; - margin-left: 0; - padding-left: 0; - position: absolute; - top: 100%; - z-index: 1; - } - .wpm-switcher-dropdown > li { - position: relative; } - .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { - display: block; } - .wpm-switcher-dropdown .wpm-item-language-main > span:hover { - cursor: pointer; } - -.wpm-languages.menu-item > a img { - display: inline-block; - margin-right: 5px; } - -.wpm-language-switcher br, .wpm-language-switcher p{ - display: none; -} - +.wpm-switcher-list { + list-style: none; + margin-bottom: 0; + padding-left: 0; } + .wpm-switcher-list li a, + .wpm-switcher-list li > span { + color: #333333; } + .wpm-switcher-list li a:hover, + .wpm-switcher-list li > span:hover { + color: #000; } + .wpm-switcher-list li a img, + .wpm-switcher-list li > span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-list li.active a, + .wpm-switcher-list li.active > span { + color: #000; } + +.wpm-switcher-dropdown { + list-style: none; + margin-bottom: 0; + padding-left: 0; + position: relative; } + .wpm-switcher-dropdown a img, + .wpm-switcher-dropdown span img { + display: inline-block; + margin-right: 3px; } + .wpm-switcher-dropdown a { + color: #333333; } + .wpm-switcher-dropdown a:hover { + color: #000; } + .wpm-switcher-dropdown .wpm-language-dropdown { + display: none; + left: 0; + list-style: none; + margin-bottom: 0; + margin-left: 0; + padding-left: 0; + position: absolute; + top: 100%; + z-index: 1; + } + .wpm-switcher-dropdown > li { + position: relative; } + .wpm-switcher-dropdown > li:hover .wpm-language-dropdown { + display: block; } + .wpm-switcher-dropdown .wpm-item-language-main > span:hover { + cursor: pointer; } + +.wpm-languages.menu-item > a img { + display: inline-block; + margin-right: 5px; } + +.wpm-language-switcher br, .wpm-language-switcher p{ + display: none; +} + /*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/main.css.map b/plugins/wp-react-custom-multilang/assets/styles/main.css.map index 1c5896ca3..40c66d1e1 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/main.css.map +++ b/plugins/wp-react-custom-multilang/assets/styles/main.css.map @@ -1,12 +1,12 @@ -{ - "version": 3, - "file": "main.css", - "sources": [ - "main.scss", - "common/_variables.scss", - "components/_lang-switcher.scss", - "components/_menu.scss" - ], - "names": [], - "mappings": "AEAA,AAAA,cAAc,CAAC;EACd,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC,GA0Bf;EA7BD,AAOE,cAPY,CAKb,EAAE,CAED,CAAC;EAPH,cAAc,CAKb,EAAE,GAGC,IAAI,CAAC;IACN,KAAK,EAAE,OAAoB,GAU3B;IAnBH,AAWG,cAXW,CAKb,EAAE,CAED,CAAC,AAIC,MAAM;IAXV,cAAc,CAKb,EAAE,GAGC,IAAI,AAGJ,MAAM,CAAC;MACP,KAAK,EDTD,IAAI,GCUR;IAbJ,AAeG,cAfW,CAKb,EAAE,CAED,CAAC,CAQA,GAAG;IAfN,cAAc,CAKb,EAAE,GAGC,IAAI,CAOL,GAAG,CAAC;MACH,OAAO,EAAE,YAAY;MACrB,YAAY,EAAE,GAAG,GACjB;EAlBJ,AAuBG,cAvBW,CAKb,EAAE,AAgBA,OAAO,CAEP,CAAC;EAvBJ,cAAc,CAKb,EAAE,AAgBA,OAAO,GAGL,IAAI,CAAC;IACN,KAAK,EDtBD,IAAI,GCuBR;;AAKJ,AAAA,kBAAkB,CAAC;EAClB,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,EAAE,QAAQ,GAkDlB;EAtDD,AASE,kBATgB,CAMjB,CAAC,CAGA,GAAG;EATL,kBAAkB,CAOjB,IAAI,CAEH,GAAG,CAAC;IACH,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,GAAG,GACjB;EAZH,AAeC,kBAfiB,CAejB,CAAC,CAAC;IACD,KAAK,EAAE,OAAoB,GAK3B;IArBF,AAkBE,kBAlBgB,CAejB,CAAC,AAGC,MAAM,CAAC;MACP,KAAK,ED/CA,IAAI,GCgDT;EApBH,AAuBC,kBAvBiB,CAuBjB,kBAAkB,CAAC;IAClB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,CAAC;IACP,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,CAAC;IAChB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI,GACT;EAhCF,AAkCC,kBAlCiB,GAkCf,EAAE,CAAC;IACJ,QAAQ,EAAE,QAAQ,GAQlB;IA3CF,AAuCG,kBAvCe,GAkCf,EAAE,AAGF,MAAM,CAEN,kBAAkB,CAAC;MAClB,OAAO,EAAE,KAAK,GACd;EAzCJ,AAiDG,kBAjDe,CA6CjB,mBAAmB,GAEhB,IAAI,AAEJ,MAAM,CAAC;IACP,MAAM,EAAE,OAAO,GACf;;AClFJ,AAMG,cANW,AAEZ,UAAU,GAER,CAAC,CAEF,GAAG,CAAC;EACH,OAAO,EAAE,YAAY;EACrB,YAAY,EAAE,GAAG,GACjB" +{ + "version": 3, + "file": "main.css", + "sources": [ + "main.scss", + "common/_variables.scss", + "components/_lang-switcher.scss", + "components/_menu.scss" + ], + "names": [], + "mappings": "AEAA,AAAA,cAAc,CAAC;EACd,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC,GA0Bf;EA7BD,AAOE,cAPY,CAKb,EAAE,CAED,CAAC;EAPH,cAAc,CAKb,EAAE,GAGC,IAAI,CAAC;IACN,KAAK,EAAE,OAAoB,GAU3B;IAnBH,AAWG,cAXW,CAKb,EAAE,CAED,CAAC,AAIC,MAAM;IAXV,cAAc,CAKb,EAAE,GAGC,IAAI,AAGJ,MAAM,CAAC;MACP,KAAK,EDTD,IAAI,GCUR;IAbJ,AAeG,cAfW,CAKb,EAAE,CAED,CAAC,CAQA,GAAG;IAfN,cAAc,CAKb,EAAE,GAGC,IAAI,CAOL,GAAG,CAAC;MACH,OAAO,EAAE,YAAY;MACrB,YAAY,EAAE,GAAG,GACjB;EAlBJ,AAuBG,cAvBW,CAKb,EAAE,AAgBA,OAAO,CAEP,CAAC;EAvBJ,cAAc,CAKb,EAAE,AAgBA,OAAO,GAGL,IAAI,CAAC;IACN,KAAK,EDtBD,IAAI,GCuBR;;AAKJ,AAAA,kBAAkB,CAAC;EAClB,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,CAAC;EAChB,YAAY,EAAE,CAAC;EACf,QAAQ,EAAE,QAAQ,GAkDlB;EAtDD,AASE,kBATgB,CAMjB,CAAC,CAGA,GAAG;EATL,kBAAkB,CAOjB,IAAI,CAEH,GAAG,CAAC;IACH,OAAO,EAAE,YAAY;IACrB,YAAY,EAAE,GAAG,GACjB;EAZH,AAeC,kBAfiB,CAejB,CAAC,CAAC;IACD,KAAK,EAAE,OAAoB,GAK3B;IArBF,AAkBE,kBAlBgB,CAejB,CAAC,AAGC,MAAM,CAAC;MACP,KAAK,ED/CA,IAAI,GCgDT;EApBH,AAuBC,kBAvBiB,CAuBjB,kBAAkB,CAAC;IAClB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,CAAC;IACP,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,CAAC;IAChB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI,GACT;EAhCF,AAkCC,kBAlCiB,GAkCf,EAAE,CAAC;IACJ,QAAQ,EAAE,QAAQ,GAQlB;IA3CF,AAuCG,kBAvCe,GAkCf,EAAE,AAGF,MAAM,CAEN,kBAAkB,CAAC;MAClB,OAAO,EAAE,KAAK,GACd;EAzCJ,AAiDG,kBAjDe,CA6CjB,mBAAmB,GAEhB,IAAI,AAEJ,MAAM,CAAC;IACP,MAAM,EAAE,OAAO,GACf;;AClFJ,AAMG,cANW,AAEZ,UAAU,GAER,CAAC,CAEF,GAAG,CAAC;EACH,OAAO,EAAE,YAAY;EACrB,YAAY,EAAE,GAAG,GACjB" } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/main.scss b/plugins/wp-react-custom-multilang/assets/styles/main.scss index f458b6a27..72ad9469a 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/main.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/main.scss @@ -1,3 +1,3 @@ -@import "common/variables"; -@import "components/lang-switcher"; -@import "components/menu"; +@import "common/variables"; +@import "components/lang-switcher"; +@import "components/menu"; diff --git a/plugins/wp-react-custom-multilang/assets/styles/notices.css b/plugins/wp-react-custom-multilang/assets/styles/notices.css index b4d963a7c..99101901f 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/notices.css +++ b/plugins/wp-react-custom-multilang/assets/styles/notices.css @@ -1,7 +1,7 @@ -.wpm-message { - position: relative; } - -.wpm-message-close { - text-decoration: none; } - +.wpm-message { + position: relative; } + +.wpm-message-close { + text-decoration: none; } + /*# sourceMappingURL=notices.css.map */ \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/notices.css.map b/plugins/wp-react-custom-multilang/assets/styles/notices.css.map index 683415243..4bc5080ee 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/notices.css.map +++ b/plugins/wp-react-custom-multilang/assets/styles/notices.css.map @@ -1,11 +1,11 @@ -{ - "version": 3, - "file": "notices.css", - "sources": [ - "notices.scss", - "common/_variables.scss", - "notices/_core.scss" - ], - "names": [], - "mappings": "AEAA,AAAA,YAAY,CAAC;EACZ,QAAQ,EAAE,QAAQ,GAClB;;AAED,AAAA,kBAAkB,CAAC;EAClB,eAAe,EAAE,IAAI,GACrB" +{ + "version": 3, + "file": "notices.css", + "sources": [ + "notices.scss", + "common/_variables.scss", + "notices/_core.scss" + ], + "names": [], + "mappings": "AEAA,AAAA,YAAY,CAAC;EACZ,QAAQ,EAAE,QAAQ,GAClB;;AAED,AAAA,kBAAkB,CAAC;EAClB,eAAe,EAAE,IAAI,GACrB" } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/assets/styles/notices.scss b/plugins/wp-react-custom-multilang/assets/styles/notices.scss index 445ae260e..db41b4a3f 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/notices.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/notices.scss @@ -1,2 +1,2 @@ -@import "common/variables"; -@import "notices/core"; +@import "common/variables"; +@import "notices/core"; diff --git a/plugins/wp-react-custom-multilang/assets/styles/notices/_core.scss b/plugins/wp-react-custom-multilang/assets/styles/notices/_core.scss index 92e9bd924..1fd3ee5e2 100644 --- a/plugins/wp-react-custom-multilang/assets/styles/notices/_core.scss +++ b/plugins/wp-react-custom-multilang/assets/styles/notices/_core.scss @@ -1,7 +1,7 @@ -.wpm-message { - position: relative; -} - -.wpm-message-close { - text-decoration: none; -} +.wpm-message { + position: relative; +} + +.wpm-message-close { + text-decoration: none; +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/advanced-ads.json b/plugins/wp-react-custom-multilang/configs/plugins/advanced-ads.json new file mode 100644 index 000000000..732ab6daa --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/advanced-ads.json @@ -0,0 +1,12 @@ +{ + "post_types": { + "advanced_ads": {}, + "advanced_ads_plcmnt": {} + }, + "post_fields":{ + "advanced_ads_ad_options": {}, + "type": {}, + "item": {}, + "options": {} + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/all-in-one-seo-pack.json b/plugins/wp-react-custom-multilang/configs/plugins/all-in-one-seo-pack.json index 6d0b0a60f..bf1a626a5 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/all-in-one-seo-pack.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/all-in-one-seo-pack.json @@ -1,52 +1,52 @@ -{ - "post_fields": { - "_aioseop_title": {}, - "_aioseop_description": {}, - "_aioseop_keywords": {}, - "_aioseo_title": {}, - "_aioseo_description": {}, - "_aioseo_twitter_title": {}, - "_aioseo_twitter_description": {}, - "_aioseo_og_title": {}, - "_aioseo_og_description": {}, - "_aioseo_og_article_section": {}, - "_aioseo_og_article_tags": {} - }, - "term_fields": { - "_aioseop_title": {}, - "_aioseop_description": {}, - "_aioseop_keywords": {}, - "_aioseo_title": {}, - "_aioseo_description": {}, - "_aioseo_twitter_title": {}, - "_aioseo_twitter_description": {}, - "_aioseo_og_title": {}, - "_aioseo_og_description": {}, - "_aioseo_og_article_section": {}, - "_aioseo_og_article_tags": {} - }, - "admin_pages": [ - "toplevel_page_all-in-one-seo-pack/aioseop_class" - ], - "options": { - "aioseop_options": { - "aiosp_home_title" : {}, - "aiosp_home_description" : {}, - "aiosp_home_keywords" : {}, - "aiosp_home_page_title_format" : {}, - "aiosp_category_title_format" : {}, - "aiosp_archive_title_format" : {}, - "aiosp_date_title_format" : {}, - "aiosp_author_title_format" : {}, - "aiosp_tag_title_format" : {}, - "aiosp_search_title_format" : {}, - "aiosp_description_format" : {}, - "aiosp_404_title_format" : {}, - "aiosp_paged_format" : {}, - "aiosp_post_meta_tags" : {}, - "aiosp_page_meta_tags" : {}, - "aiosp_front_meta_tags" : {}, - "aiosp_home_meta_tags" : {} - } - } -} +{ + "post_fields": { + "_aioseop_title": {}, + "_aioseop_description": {}, + "_aioseop_keywords": {}, + "_aioseo_title": {}, + "_aioseo_description": {}, + "_aioseo_twitter_title": {}, + "_aioseo_twitter_description": {}, + "_aioseo_og_title": {}, + "_aioseo_og_description": {}, + "_aioseo_og_article_section": {}, + "_aioseo_og_article_tags": {} + }, + "term_fields": { + "_aioseop_title": {}, + "_aioseop_description": {}, + "_aioseop_keywords": {}, + "_aioseo_title": {}, + "_aioseo_description": {}, + "_aioseo_twitter_title": {}, + "_aioseo_twitter_description": {}, + "_aioseo_og_title": {}, + "_aioseo_og_description": {}, + "_aioseo_og_article_section": {}, + "_aioseo_og_article_tags": {} + }, + "admin_pages": [ + "toplevel_page_all-in-one-seo-pack/aioseop_class" + ], + "options": { + "aioseop_options": { + "aiosp_home_title" : {}, + "aiosp_home_description" : {}, + "aiosp_home_keywords" : {}, + "aiosp_home_page_title_format" : {}, + "aiosp_category_title_format" : {}, + "aiosp_archive_title_format" : {}, + "aiosp_date_title_format" : {}, + "aiosp_author_title_format" : {}, + "aiosp_tag_title_format" : {}, + "aiosp_search_title_format" : {}, + "aiosp_description_format" : {}, + "aiosp_404_title_format" : {}, + "aiosp_paged_format" : {}, + "aiosp_post_meta_tags" : {}, + "aiosp_page_meta_tags" : {}, + "aiosp_front_meta_tags" : {}, + "aiosp_home_meta_tags" : {} + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/basepress.json b/plugins/wp-react-custom-multilang/configs/plugins/basepress.json new file mode 100644 index 000000000..d7c813dcc --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/basepress.json @@ -0,0 +1,20 @@ +{ + "post_types": { + "knowledgebase": {} + }, + "taxonomies": { + "knowledgebase_cat": {} + }, + "admin_pages": [ + "knowledgebase_page_basepress_manage_kbs", + "knowledgebase_page_basepress_sections" + ], + "term_fields": { + "icon": {}, + "image": { + "image_url": {}, + "image_width": {}, + "image_height": {} + } + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/bbpress.json b/plugins/wp-react-custom-multilang/configs/plugins/bbpress.json new file mode 100644 index 000000000..5bd822846 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/bbpress.json @@ -0,0 +1,10 @@ +{ + "post_types": { + "forum": {}, + "topic": {}, + "reply": {} + }, + "taxonomies": { + "topic-tag" : {} + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/better-search.json b/plugins/wp-react-custom-multilang/configs/plugins/better-search.json index d5af5bdf6..2ff164fe1 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/better-search.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/better-search.json @@ -1,13 +1,13 @@ -{ - "admin_pages": [ - "settings_page_bsearch_options" - ], - "options": { - "ald_bsearch_settings": { - "title": {}, - "title_daily": {}, - "heatmap_before": {}, - "heatmap_after": {} - } - } -} +{ + "admin_pages": [ + "settings_page_bsearch_options" + ], + "options": { + "ald_bsearch_settings": { + "title": {}, + "title_daily": {}, + "heatmap_before": {}, + "heatmap_after": {} + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/betterdocs.json b/plugins/wp-react-custom-multilang/configs/plugins/betterdocs.json new file mode 100644 index 000000000..28e94d3a4 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/betterdocs.json @@ -0,0 +1,18 @@ +{ + "post_types": { + "docs": {}, + "betterdocs_faq": {} + }, + "taxonomies": { + "doc_category" : {}, + "doc_tag" : {}, + "betterdocs_faq_category" : {} + }, + "term_fields": { + "doc_category_image-id" : {} + }, + "admin_pages": [ + "betterdocs_page_betterdocs-faq", + "betterdocs_page_betterdocs-admin" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/buddypress.json b/plugins/wp-react-custom-multilang/configs/plugins/buddypress.json index 99a8ebcde..df4a53f83 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/buddypress.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/buddypress.json @@ -1,24 +1,24 @@ -{ - "post_types": { - "bp-email": {} - }, - "options": { - "bp_email_options": { - "footer_text": {} - } - }, - "admin_pages": [ - "users_page_bp-profile-setup" - ], - "admin_html_tags": { - "users_page_bp-profile-setup": { - "text": [ - ".field-wrapper .description", - "#description" - ], - "value": [ - "#title" - ] - } - } -} +{ + "post_types": { + "bp-email": {} + }, + "options": { + "bp_email_options": { + "footer_text": {} + } + }, + "admin_pages": [ + "users_page_bp-profile-setup" + ], + "admin_html_tags": { + "users_page_bp-profile-setup": { + "text": [ + ".field-wrapper .description", + "#description" + ], + "value": [ + "#title" + ] + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/bylaw-plus.json b/plugins/wp-react-custom-multilang/configs/plugins/bylaw-plus.json index 99aba33dd..c8c4af371 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/bylaw-plus.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/bylaw-plus.json @@ -1,6 +1,6 @@ -{ - "post_types": { - "wdt_headers": {}, - "wdt_footers": {} - } +{ + "post_types": { + "wdt_headers": {}, + "wdt_footers": {} + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/contact-form-7.json b/plugins/wp-react-custom-multilang/configs/plugins/contact-form-7.json index 6b2546b89..dd4483a98 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/contact-form-7.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/contact-form-7.json @@ -1,44 +1,44 @@ -{ - "post_types": { - "wpcf7_contact_form": {} - }, - "post_fields": { - "_form": {}, - "_mail": { - "body" : {}, - "subject" : {} - }, - "_mail_2": { - "body" : {}, - "subject" : {} - }, - "_messages": { - "mail_sent_ok" : {}, - "mail_sent_ng" : {}, - "validation_error" : {}, - "spam" : {}, - "accept_terms" : {}, - "invalid_required" : {}, - "invalid_too_long" : {}, - "invalid_too_short" : {}, - "invalid_date" : {}, - "date_too_early" : {}, - "date_too_late" : {}, - "upload_failed" : {}, - "upload_file_type_invalid" : {}, - "upload_file_too_large" : {}, - "upload_failed_php_error" : {}, - "invalid_number" : {}, - "number_too_small" : {}, - "number_too_large" : {}, - "quiz_answer_not_correct" : {}, - "captcha_not_match" : {}, - "invalid_email" : {}, - "invalid_url" : {}, - "invalid_tel" : {} - } - }, - "admin_pages": [ - "toplevel_page_wpcf7" - ] -} +{ + "post_types": { + "wpcf7_contact_form": {} + }, + "post_fields": { + "_form": {}, + "_mail": { + "body" : {}, + "subject" : {} + }, + "_mail_2": { + "body" : {}, + "subject" : {} + }, + "_messages": { + "mail_sent_ok" : {}, + "mail_sent_ng" : {}, + "validation_error" : {}, + "spam" : {}, + "accept_terms" : {}, + "invalid_required" : {}, + "invalid_too_long" : {}, + "invalid_too_short" : {}, + "invalid_date" : {}, + "date_too_early" : {}, + "date_too_late" : {}, + "upload_failed" : {}, + "upload_file_type_invalid" : {}, + "upload_file_too_large" : {}, + "upload_failed_php_error" : {}, + "invalid_number" : {}, + "number_too_small" : {}, + "number_too_large" : {}, + "quiz_answer_not_correct" : {}, + "captcha_not_match" : {}, + "invalid_email" : {}, + "invalid_url" : {}, + "invalid_tel" : {} + } + }, + "admin_pages": [ + "toplevel_page_wpcf7" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/daext-autolinks-manager.json b/plugins/wp-react-custom-multilang/configs/plugins/daext-autolinks-manager.json new file mode 100644 index 000000000..1c2fd2c3a --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/daext-autolinks-manager.json @@ -0,0 +1,8 @@ +{ + "admin_pages": [ + "autolinks_page_daextam-categories", + "autolinks_page_daextam-autolinks", + "autolinks_page_daextam-dashboard", + "toplevel_page_daextam-dashboard" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/download-monitor.json b/plugins/wp-react-custom-multilang/configs/plugins/download-monitor.json index 3cb08b009..86326c52c 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/download-monitor.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/download-monitor.json @@ -1,15 +1,15 @@ -{ - "post_types": { - "dlm_download":{} - }, - "taxonomies": { - "dlm_download_category": {}, - "dlm_download_tag": {} - }, - "options": { - "dlm_no_access_error": {} - }, - "admin_pages": [ - "dlm_download_page_download-monitor-settings" - ] -} +{ + "post_types": { + "dlm_download":{} + }, + "taxonomies": { + "dlm_download_category": {}, + "dlm_download_tag": {} + }, + "options": { + "dlm_no_access_error": {} + }, + "admin_pages": [ + "dlm_download_page_download-monitor-settings" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/fluentform.json b/plugins/wp-react-custom-multilang/configs/plugins/fluentform.json new file mode 100644 index 000000000..5d61c98b7 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/fluentform.json @@ -0,0 +1,13 @@ +{ + "admin_pages": [ + "toplevel_page_fluent_forms", + "fluent-forms_page_fluent_forms_all_entries", + "fluent-forms_page_fluent_forms_reports", + "fluent-forms_page_fluent_forms_payment_entries", + "fluent-forms_page_fluent_forms_settings", + "fluent-forms_page_fluent_forms_transfer", + "fluent-forms_page_fluent_forms_smtp", + "fluent-forms_page_fluent_forms_add_ons", + "fluent-forms_page_fluent_forms_docs" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/forminator.json b/plugins/wp-react-custom-multilang/configs/plugins/forminator.json index 420733208..6c3c3c403 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/forminator.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/forminator.json @@ -1,19 +1,19 @@ -{ - "post_types": { - "forminator_forms": {}, - "forminator_polls": {}, - "forminator_quizzes": {} - }, - "post_fields": { - "forminator_form_meta": {} - }, - "admin_pages": [ - "forminator_page_forminator-cform", - "forminator_page_forminator-poll", - "forminator_page_forminator-quiz", - "forminator_page_forminator-poll-wizard", - "forminator_page_forminator-cform-wizard", - "forminator_page_forminator-knowledge-wizard", - "forminator_page_forminator-entries" - ] +{ + "post_types": { + "forminator_forms": {}, + "forminator_polls": {}, + "forminator_quizzes": {} + }, + "post_fields": { + "forminator_form_meta": {} + }, + "admin_pages": [ + "forminator_page_forminator-cform", + "forminator_page_forminator-poll", + "forminator_page_forminator-quiz", + "forminator_page_forminator-poll-wizard", + "forminator_page_forminator-cform-wizard", + "forminator_page_forminator-knowledge-wizard", + "forminator_page_forminator-entries" + ] } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/frontend-post-submission-manager-lite.json b/plugins/wp-react-custom-multilang/configs/plugins/frontend-post-submission-manager-lite.json new file mode 100644 index 000000000..fc181318c --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/frontend-post-submission-manager-lite.json @@ -0,0 +1,5 @@ +{ + "admin_pages": [ + "toplevel_page_fpsm" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/gamipress.json b/plugins/wp-react-custom-multilang/configs/plugins/gamipress.json new file mode 100644 index 000000000..287610f1a --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/gamipress.json @@ -0,0 +1,33 @@ +{ + "post_types": { + "points-type": {}, + "points-award": {}, + "points-deduct": {}, + "achievement-type": {}, + "rank-type": {} + }, + "post_fields":{ + "_gamipress_plural_name": {} + }, + "options": { + "gamipress_settings": { + "twitter_achievement_text": {}, + "twitter_rank_text": {}, + "email_from_name": {}, + "email_footer_text": {}, + "achievement_earned_email_subject": {}, + "achievement_earned_email_content": {}, + "step_completed_email_subject": {}, + "step_completed_email_content": {}, + "points_award_completed_email_subject": {}, + "points_award_completed_email_content": {}, + "rank_earned_email_subject": {}, + "rank_earned_email_content": {}, + "rank_requirement_completed_email_subject": {}, + "rank_requirement_completed_email_content": {} + } + }, + "admin_pages": [ + "gamipress_page_gamipress_settings" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/google-maps-builder.json b/plugins/wp-react-custom-multilang/configs/plugins/google-maps-builder.json index a28a0a8f0..a47029827 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/google-maps-builder.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/google-maps-builder.json @@ -1,13 +1,13 @@ -{ - "post_fields": { - "gmb_markers_group": { - "wpm_each": { - "title": {}, - "description": {} - } - } - }, - "admin_pages": [ - "google_maps" - ] -} +{ + "post_fields": { + "gmb_markers_group": { + "wpm_each": { + "title": {}, + "description": {} + } + } + }, + "admin_pages": [ + "google_maps" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/gravityforms.json b/plugins/wp-react-custom-multilang/configs/plugins/gravityforms.json new file mode 100644 index 000000000..30bcdb4d7 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/gravityforms.json @@ -0,0 +1,6 @@ +{ + "admin_pages": [ + "toplevel_page_gf_edit_forms", + "forms_page_gf_new_form" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/internal-links.json b/plugins/wp-react-custom-multilang/configs/plugins/internal-links.json new file mode 100644 index 000000000..eb108f0d4 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/internal-links.json @@ -0,0 +1,5 @@ +{ + "post_fields":{ + "ilj_linkdefinition": {} + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/js_composer.json b/plugins/wp-react-custom-multilang/configs/plugins/js_composer.json index 3d1606f59..1ed3341c5 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/js_composer.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/js_composer.json @@ -1,5 +1,5 @@ -{ - "post_fields": { - "_wpb_post_custom_seo_settings": {} - } +{ + "post_fields": { + "_wpb_post_custom_seo_settings": {} + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/mailchimp-for-wp.json b/plugins/wp-react-custom-multilang/configs/plugins/mailchimp-for-wp.json index a22db7e7a..9fed7f1f7 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/mailchimp-for-wp.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/mailchimp-for-wp.json @@ -1,23 +1,23 @@ -{ - "post_fields": { - "text_subscribed": {}, - "text_invalid_email": {}, - "text_required_field_missing": {}, - "text_already_subscribed": {}, - "text_error": {}, - "text_unsubscribed": {}, - "text_not_subscribed": {}, - "text_no_lists_selected": {} - }, - "admin_pages": [ - "mailchimp-for-wp_page_mailchimp-for-wp-integrations", - "mailchimp-for-wp_page_mailchimp-for-wp-forms" - ], - "options": { - "mc4wp_integrations": { - "wpm_each": { - "label": {} - } - } - } -} +{ + "post_fields": { + "text_subscribed": {}, + "text_invalid_email": {}, + "text_required_field_missing": {}, + "text_already_subscribed": {}, + "text_error": {}, + "text_unsubscribed": {}, + "text_not_subscribed": {}, + "text_no_lists_selected": {} + }, + "admin_pages": [ + "mailchimp-for-wp_page_mailchimp-for-wp-integrations", + "mailchimp-for-wp_page_mailchimp-for-wp-forms" + ], + "options": { + "mc4wp_integrations": { + "wpm_each": { + "label": {} + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/megamenu.json b/plugins/wp-react-custom-multilang/configs/plugins/megamenu.json index 5baa7d8f6..59ce26cf2 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/megamenu.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/megamenu.json @@ -1,12 +1,12 @@ -{ - "options": { - "megamenu_toggle_blocks": { - "wpm_each": { - "wpm_each": { - "closed_text": {}, - "open_text": {} - } - } - } - } -} +{ + "options": { + "megamenu_toggle_blocks": { + "wpm_each": { + "wpm_each": { + "closed_text": {}, + "open_text": {} + } + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/ml-slider.json b/plugins/wp-react-custom-multilang/configs/plugins/ml-slider.json index a6036076d..ffcf3cf27 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/ml-slider.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/ml-slider.json @@ -1,19 +1,19 @@ -{ - "post_types": { - "ml-slide": { - "post_title": null, - "post_content": null - }, - "ml-slider": { - "post_content": null, - "post_excerpt": null - } - }, - "post_fields": { - "ml-slider_title": {}, - "ml-slider_url": {} - }, - "admin_pages": [ - "toplevel_page_metaslider" - ] -} +{ + "post_types": { + "ml-slide": { + "post_title": null, + "post_content": null + }, + "ml-slider": { + "post_content": null, + "post_excerpt": null + } + }, + "post_fields": { + "ml-slider_title": {}, + "ml-slider_url": {} + }, + "admin_pages": [ + "toplevel_page_metaslider" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/newsletter.json b/plugins/wp-react-custom-multilang/configs/plugins/newsletter.json index 0b25fa123..f5891d9f9 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/newsletter.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/newsletter.json @@ -1,82 +1,82 @@ -{ - "options": { - "newsletter": { - "profile_text": {}, - "profile_email_changed": {}, - "profile_error": {}, - "error_text": {}, - "subscription_text": {}, - "confirmation_text": {}, - "confirmation_subject": {}, - "confirmation_message": {}, - "confirmed_text": {}, - "confirmed_subject": {}, - "confirmed_message": {}, - "unsubscription_text": {}, - "unsubscription_error_text": {}, - "unsubscribed_text": {}, - "unsubscribed_subject": {}, - "unsubscribed_message": {}, - "profile_saved": {} - }, - "newsletter_profile": { - "email": {}, - "email_error": {}, - "name": {}, - "name_error": {}, - "surname": {}, - "surname_error": {}, - "sex": {}, - "privacy": {}, - "privacy_error": {}, - "subscribe": {}, - "save": {}, - "title_female": {}, - "title_male": {}, - "title_none": {}, - "sex_male": {}, - "sex_female": {}, - "sex_none": {}, - "profile_error": {} - }, - "newsletter_wp": { - "subscribe_label": {} - }, - "newsletter_subscription_template": { - "template": {} - }, - "newsletter_lock": { - "message": {} - }, - "newsletter_main": { - "sender_name": {}, - "header_title": {}, - "header_sub": {}, - "footer_title": {}, - "footer_contact": {}, - "footer_legal": {} - }, - "newsletter_forms": { - "wpm_each": {} - } - }, - "widgets": { - "newsletterwidgetminimal": { - "button": {} - } - }, - "admin_pages": [ - "newsletter_page_newsletter_subscription_options", - "admin_page_newsletter_wp_index", - "admin_page_newsletter_subscription_profile", - "admin_page_newsletter_subscription_unsubscription", - "admin_page_newsletter_subscription_lists", - "admin_page_newsletter_lock_index", - "admin_page_newsletter_subscription_forms", - "admin_page_newsletter_subscription_template", - "newsletter_page_newsletter_main_main", - "admin_page_newsletter_main_info", - "newsletter_page_newsletter_wpusers_index", - "newsletter_page_newsletter_lock_index" - ] -} +{ + "options": { + "newsletter": { + "profile_text": {}, + "profile_email_changed": {}, + "profile_error": {}, + "error_text": {}, + "subscription_text": {}, + "confirmation_text": {}, + "confirmation_subject": {}, + "confirmation_message": {}, + "confirmed_text": {}, + "confirmed_subject": {}, + "confirmed_message": {}, + "unsubscription_text": {}, + "unsubscription_error_text": {}, + "unsubscribed_text": {}, + "unsubscribed_subject": {}, + "unsubscribed_message": {}, + "profile_saved": {} + }, + "newsletter_profile": { + "email": {}, + "email_error": {}, + "name": {}, + "name_error": {}, + "surname": {}, + "surname_error": {}, + "sex": {}, + "privacy": {}, + "privacy_error": {}, + "subscribe": {}, + "save": {}, + "title_female": {}, + "title_male": {}, + "title_none": {}, + "sex_male": {}, + "sex_female": {}, + "sex_none": {}, + "profile_error": {} + }, + "newsletter_wp": { + "subscribe_label": {} + }, + "newsletter_subscription_template": { + "template": {} + }, + "newsletter_lock": { + "message": {} + }, + "newsletter_main": { + "sender_name": {}, + "header_title": {}, + "header_sub": {}, + "footer_title": {}, + "footer_contact": {}, + "footer_legal": {} + }, + "newsletter_forms": { + "wpm_each": {} + } + }, + "widgets": { + "newsletterwidgetminimal": { + "button": {} + } + }, + "admin_pages": [ + "newsletter_page_newsletter_subscription_options", + "admin_page_newsletter_wp_index", + "admin_page_newsletter_subscription_profile", + "admin_page_newsletter_subscription_unsubscription", + "admin_page_newsletter_subscription_lists", + "admin_page_newsletter_lock_index", + "admin_page_newsletter_subscription_forms", + "admin_page_newsletter_subscription_template", + "newsletter_page_newsletter_main_main", + "admin_page_newsletter_main_info", + "newsletter_page_newsletter_wpusers_index", + "newsletter_page_newsletter_lock_index" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/nextgen-gallery.json b/plugins/wp-react-custom-multilang/configs/plugins/nextgen-gallery.json index 1be18aad3..2d6039407 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/nextgen-gallery.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/nextgen-gallery.json @@ -1,12 +1,12 @@ -{ - "post_types": { - "displayed_gallery": {} - }, - "options": { - "ngg_options": { - "relatedHeading": {}, - "galTextSlide": {}, - "galTextGallery": {} - } - } -} +{ + "post_types": { + "displayed_gallery": {} + }, + "options": { + "ngg_options": { + "relatedHeading": {}, + "galTextSlide": {}, + "galTextGallery": {} + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/publishpress-authors.json b/plugins/wp-react-custom-multilang/configs/plugins/publishpress-authors.json new file mode 100644 index 000000000..344308f9a --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/publishpress-authors.json @@ -0,0 +1,13 @@ +{ + "post_types": { + "ppma_boxes": {}, + "ppmacf_field": {} + }, + "post_fields":{ + "ppmacf_description": {}, + "ppma_boxes_layout_meta_value": { + "title_text": {}, + "title_text_plural": {} + } + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/schema-and-structured-data-for-wp.json b/plugins/wp-react-custom-multilang/configs/plugins/schema-and-structured-data-for-wp.json index c90622e2a..1e5d8821a 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/schema-and-structured-data-for-wp.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/schema-and-structured-data-for-wp.json @@ -1,12 +1,14 @@ -{ - "post_types": { - "saswp": {} - }, - "post_fields": { - "saswp_meta_list_val": {}, - "saswp_taxonomy_term": {}, - "saswp_fixed_text": {}, - "saswp_custom_meta_field": {}, - "saswp_schema_template_field": {} - } +{ + "post_types": { + "saswp": {} + }, + "post_fields": { + "saswp_meta_list_val": {}, + "saswp_taxonomy_term": {}, + "saswp_fixed_text": {}, + "saswp_custom_meta_field": {}, + "saswp_schema_template_field": {}, + "saswp_reviewer_name": {}, + "saswp_review_text": {} + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/seo-by-rank-math.json b/plugins/wp-react-custom-multilang/configs/plugins/seo-by-rank-math.json index 03a93104d..b2e3ca8d7 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/seo-by-rank-math.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/seo-by-rank-math.json @@ -1,85 +1,103 @@ -{ - "post_fields": { - "rank_math_seo_score": {}, - "rank_math_title": {}, - "rank_math_description": {}, - "rank_math_focus_keyword": {}, - "rank_math_permalink": {}, - "rank_math_primary_category": {}, - "rank_math_robots": {}, - "rank_math_rich_snippet": {}, - "rank_math_twitter_title": {}, - "rank_math_twitter_description": {}, - "rank_math_snippet_name": {}, - "rank_math_snippet_desc": {}, - "rank_math_snippet_article_type": {}, - "rank_math_facebook_title": {}, - "rank_math_facebook_description": {}, - "rank_math_facebook_enable_image_overlay": {}, - "rank_math_facebook_image_id": {}, - "rank_math_facebook_image": {}, - "rank_math_twitter_use_facebook": {}, - "rank_math_twitter_card_type": {}, - "rank_math_twitter_enable_image_overlay": {}, - "rank_math_twitter_image_id": {}, - "rank_math_twitter_image": {}, - "rank_math_twitter_image_overlay": {}, - "rank_math_canonical_url": {}, - "rank_math_breadcrumb_title": {}, - "redirection_header_code": {}, - "redirection_url_to": {} - }, - "admin_pages": [ - "toplevel_page_rank-math" - ], - "options": { - "rank-math-options-titles": { - "homepage_title" : {}, - "homepage_description" : {}, - "homepage_custom_robots" : {}, - "author_archive_title" : {}, - "author_archive_description" : {}, - "author_robots" : {}, - "date_archive_title" : {}, - "date_archive_description" : {}, - "search_title" : {}, - "404_title" : {} - }, - "rank-math-options-general": { - "breadcrumbs_home_label" : {}, - "breadcrumbs_archive_format" : {}, - "breadcrumbs_search_format" : {}, - "breadcrumbs_404_label" : {} - } - }, - "term_fields": { - "rank_math_seo_score": {}, - "rank_math_title": {}, - "rank_math_description": {}, - "rank_math_focus_keyword": {}, - "rank_math_permalink": {}, - "rank_math_primary_category": {}, - "rank_math_robots": {}, - "rank_math_rich_snippet": {}, - "rank_math_twitter_title": {}, - "rank_math_twitter_description": {}, - "rank_math_snippet_name": {}, - "rank_math_snippet_desc": {}, - "rank_math_snippet_article_type": {}, - "rank_math_facebook_title": {}, - "rank_math_facebook_description": {}, - "rank_math_facebook_enable_image_overlay": {}, - "rank_math_facebook_image_id": {}, - "rank_math_facebook_image": {}, - "rank_math_twitter_use_facebook": {}, - "rank_math_twitter_card_type": {}, - "rank_math_twitter_enable_image_overlay": {}, - "rank_math_twitter_image_id": {}, - "rank_math_twitter_image": {}, - "rank_math_twitter_image_overlay": {}, - "rank_math_canonical_url": {}, - "rank_math_breadcrumb_title": {}, - "redirection_header_code": {}, - "redirection_url_to": {} - } -} +{ + "post_fields": { + "rank_math_seo_score": {}, + "rank_math_title": {}, + "rank_math_description": {}, + "rank_math_focus_keyword": {}, + "rank_math_permalink": {}, + "rank_math_primary_category": {}, + "rank_math_robots": {}, + "rank_math_rich_snippet": {}, + "rank_math_twitter_title": {}, + "rank_math_twitter_description": {}, + "rank_math_snippet_name": {}, + "rank_math_snippet_desc": {}, + "rank_math_snippet_article_type": {}, + "rank_math_facebook_title": {}, + "rank_math_facebook_description": {}, + "rank_math_facebook_enable_image_overlay": {}, + "rank_math_facebook_image_id": {}, + "rank_math_facebook_image": {}, + "rank_math_twitter_use_facebook": {}, + "rank_math_twitter_card_type": {}, + "rank_math_twitter_enable_image_overlay": {}, + "rank_math_twitter_image_id": {}, + "rank_math_twitter_image": {}, + "rank_math_twitter_image_overlay": {}, + "rank_math_canonical_url": {}, + "rank_math_breadcrumb_title": {}, + "redirection_header_code": {}, + "redirection_url_to": {} + }, + "admin_pages": [ + "toplevel_page_rank-math", + "rank-math_page_rank-math-options-titles" + ], + "options": { + "rank-math-options-titles": { + "homepage_title" : {}, + "homepage_description" : {}, + "homepage_custom_robots" : {}, + "author_archive_title" : {}, + "author_archive_description" : {}, + "author_robots" : {}, + "date_archive_title" : {}, + "date_archive_description" : {}, + "search_title" : {}, + "404_title" : {}, + "pt_post_title": {}, + "pt_post_description": {}, + "pt_product_title": {}, + "pt_product_description": {}, + "pt_page_title": {}, + "pt_page_description": {}, + "tax_category_title": {}, + "tax_category_description": {}, + "tax_post_tag_title": {}, + "tax_post_tag_description": {}, + "tax_product_tag_title": {}, + "tax_product_tag_description": {}, + "tax_product_brand_title": {}, + "tax_product_brand_description": {}, + "tax_product_cat_title": {}, + "tax_product_cat_description": {} + + }, + "rank-math-options-general": { + "breadcrumbs_home_label" : {}, + "breadcrumbs_archive_format" : {}, + "breadcrumbs_search_format" : {}, + "breadcrumbs_404_label" : {} + } + }, + "term_fields": { + "rank_math_seo_score": {}, + "rank_math_title": {}, + "rank_math_description": {}, + "rank_math_focus_keyword": {}, + "rank_math_permalink": {}, + "rank_math_primary_category": {}, + "rank_math_robots": {}, + "rank_math_rich_snippet": {}, + "rank_math_twitter_title": {}, + "rank_math_twitter_description": {}, + "rank_math_snippet_name": {}, + "rank_math_snippet_desc": {}, + "rank_math_snippet_article_type": {}, + "rank_math_facebook_title": {}, + "rank_math_facebook_description": {}, + "rank_math_facebook_enable_image_overlay": {}, + "rank_math_facebook_image_id": {}, + "rank_math_facebook_image": {}, + "rank_math_twitter_use_facebook": {}, + "rank_math_twitter_card_type": {}, + "rank_math_twitter_enable_image_overlay": {}, + "rank_math_twitter_image_id": {}, + "rank_math_twitter_image": {}, + "rank_math_twitter_image_overlay": {}, + "rank_math_canonical_url": {}, + "rank_math_breadcrumb_title": {}, + "redirection_header_code": {}, + "redirection_url_to": {} + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/siteorigin-panels.json b/plugins/wp-react-custom-multilang/configs/plugins/siteorigin-panels.json index dc429dc74..952511c2a 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/siteorigin-panels.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/siteorigin-panels.json @@ -1,116 +1,116 @@ -{ - "post_fields": { - "panels_data": { - "widgets": { - "wpm_each": { - "title": {}, - "widget_title": {}, - "sub_title": {}, - "alt": {}, - "text": {}, - "label": {}, - "markers": { - "marker_positions": { - "wpm_each": { - "info": {} - } - } - }, - "attributes": { - "title": {} - }, - "button": { - "text": {}, - "attributes": { - "title": {} - } - }, - "settings": { - "default_subject": {}, - "subject_prefix": {}, - "success_message": {}, - "submit_text": {}, - "required_field_indicator_message": {} - }, - "fields": { - "wpm_each": { - "label": {}, - "description": {}, - "required": { - "missing_message": {} - } - } - }, - "features": { - "wpm_each": { - "icon_title": {}, - "title": {}, - "text": {}, - "more_text": {} - } - }, - "frames": { - "wpm_each": { - "content": {} - } - }, - "images": { - "wpm_each": { - "title": {} - } - }, - "networks": { - "wpm_each": { - "icon_title": {} - } - }, - "testimonials": { - "wpm_each": { - "name": {}, - "location": {}, - "text": {} - } - }, - "headline": { - "text": {} - }, - "sub_headline": { - "text": {} - }, - "columns": { - "wpm_each": { - "title": {}, - "subtitle": {}, - "image_title": {}, - "image_alt": {}, - "button": {}, - "features": { - "wpm_each": { - "text": {}, - "hover": {} - } - } - } - }, - "panels": { - "wpm_each": { - "title": {}, - "content_text": {} - } - }, - "tabs": { - "wpm_each": { - "title": {}, - "content_text": {} - } - }, - "items": { - "wpm_each": { - "title": {} - } - } - } - } - } - } -} +{ + "post_fields": { + "panels_data": { + "widgets": { + "wpm_each": { + "title": {}, + "widget_title": {}, + "sub_title": {}, + "alt": {}, + "text": {}, + "label": {}, + "markers": { + "marker_positions": { + "wpm_each": { + "info": {} + } + } + }, + "attributes": { + "title": {} + }, + "button": { + "text": {}, + "attributes": { + "title": {} + } + }, + "settings": { + "default_subject": {}, + "subject_prefix": {}, + "success_message": {}, + "submit_text": {}, + "required_field_indicator_message": {} + }, + "fields": { + "wpm_each": { + "label": {}, + "description": {}, + "required": { + "missing_message": {} + } + } + }, + "features": { + "wpm_each": { + "icon_title": {}, + "title": {}, + "text": {}, + "more_text": {} + } + }, + "frames": { + "wpm_each": { + "content": {} + } + }, + "images": { + "wpm_each": { + "title": {} + } + }, + "networks": { + "wpm_each": { + "icon_title": {} + } + }, + "testimonials": { + "wpm_each": { + "name": {}, + "location": {}, + "text": {} + } + }, + "headline": { + "text": {} + }, + "sub_headline": { + "text": {} + }, + "columns": { + "wpm_each": { + "title": {}, + "subtitle": {}, + "image_title": {}, + "image_alt": {}, + "button": {}, + "features": { + "wpm_each": { + "text": {}, + "hover": {} + } + } + } + }, + "panels": { + "wpm_each": { + "title": {}, + "content_text": {} + } + }, + "tabs": { + "wpm_each": { + "title": {}, + "content_text": {} + } + }, + "items": { + "wpm_each": { + "title": {} + } + } + } + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/smart-custom-fields.json b/plugins/wp-react-custom-multilang/configs/plugins/smart-custom-fields.json index 99e3ded83..9fec36b49 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/smart-custom-fields.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/smart-custom-fields.json @@ -1,8 +1,8 @@ -{ - "post_types": { - "smart-custom-fields": {} - }, - "post_fields": { - "smart-cf-setting": {} - } +{ + "post_types": { + "smart-custom-fields": {} + }, + "post_fields": { + "smart-cf-setting": {} + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/strong-testimonials.json b/plugins/wp-react-custom-multilang/configs/plugins/strong-testimonials.json new file mode 100644 index 000000000..a566768a5 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/strong-testimonials.json @@ -0,0 +1,22 @@ +{ + "post_types": { + "wpm-testimonial": {} + }, + "post_fields": { + "client_name": {}, + "email": {}, + "company_name": {}, + "company_website": {}, + "star_rating": {} + }, + "taxonomies": { + "wpm-testimonial-category" : {} + }, + "options": { + "wpmtst_custom_forms": {}, + "wpmtst_form_options": {} + }, + "admin_pages": [ + "wpm-testimonial_page_testimonial-fields" + ] +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/tablepress.json b/plugins/wp-react-custom-multilang/configs/plugins/tablepress.json index 9e25a566e..f44e2634f 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/tablepress.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/tablepress.json @@ -1,11 +1,11 @@ -{ - "post_types": { - "tablepress_table": { - "post_content": null - } - }, - "admin_pages": [ - "tablepress_list", - "tablepress_edit" - ] -} +{ + "post_types": { + "tablepress_table": { + "post_content": null + } + }, + "admin_pages": [ + "tablepress_list", + "tablepress_edit" + ] +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/tlp-team.json b/plugins/wp-react-custom-multilang/configs/plugins/tlp-team.json index d9a373274..a2ad16bf0 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/tlp-team.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/tlp-team.json @@ -1,33 +1,33 @@ -{ - "post_types": { - "team": {}, - "team-sc": {} - }, - "post_fields": { - "short_bio": {}, - "experience_year": {}, - "email": {}, - "telephone": {}, - "mobile": {}, - "fax": {}, - "web_url": {}, - "location": {}, - "ttp_custom_detail_url": {}, - "social": {}, - "ttp_column": {}, - "layout": {}, - "layout_type": {}, - "ttl_image_column": {}, - "ttp_carousel_speed": {}, - "ttp_carousel_autoplay_timeout": {}, - "image_style": {}, - "ttp_image_size": {}, - "character_limit": {}, - "ttp_after_short_desc_text": {}, - "ttp_read_more_btn_text": {} - }, - "taxonomies": { - "team_designation" : {}, - "team_department": {} - } +{ + "post_types": { + "team": {}, + "team-sc": {} + }, + "post_fields": { + "short_bio": {}, + "experience_year": {}, + "email": {}, + "telephone": {}, + "mobile": {}, + "fax": {}, + "web_url": {}, + "location": {}, + "ttp_custom_detail_url": {}, + "social": {}, + "ttp_column": {}, + "layout": {}, + "layout_type": {}, + "ttl_image_column": {}, + "ttp_carousel_speed": {}, + "ttp_carousel_autoplay_timeout": {}, + "image_style": {}, + "ttp_image_size": {}, + "character_limit": {}, + "ttp_after_short_desc_text": {}, + "ttp_read_more_btn_text": {} + }, + "taxonomies": { + "team_designation" : {}, + "team_department": {} + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/ultimate-member.json b/plugins/wp-react-custom-multilang/configs/plugins/ultimate-member.json new file mode 100644 index 000000000..32e5756cd --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/ultimate-member.json @@ -0,0 +1,43 @@ +{ + "post_types": { + "um_form": {} + }, + "post_fields": { + "_um_custom_fields": {}, + "_um_register_primary_btn_word": {}, + "_um_register_secondary_btn_word": {}, + "_um_register_use_gdpr_toggle_show": {}, + "_um_register_use_gdpr_toggle_hide": {}, + "_um_register_use_gdpr_agreement": {}, + "_um_register_use_gdpr_error_text": {}, + "_um_login_primary_btn_word": {}, + "_um_login_secondary_btn_word": {}, + "_um_profile_primary_btn_word": {}, + "_um_profile_secondary_btn_word": {} + }, + "admin_pages": [ + "ultimate-member_page_um_options" + ], + "options": { + "um_options": { + "profile_title": {}, + "profile_desc": {}, + "delete_account_text": {}, + "restricted_access_post_title": {}, + "restricted_access_message": {}, + "welcome_email_sub": {}, + "checkmail_email_sub": {}, + "pending_email_sub": {}, + "approved_email_sub": {}, + "inactive_email_sub": {}, + "deletion_email_sub": {}, + "resetpw_email_sub": {}, + "changedpw_email_sub": {}, + "changedaccount_email_sub": {}, + "notification_new_user_sub": {}, + "notification_review_sub": {}, + "notification_deletion_sub": {}, + "suspicious-activity_sub": {} + } + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/configs/plugins/woocommerce-customizer.json b/plugins/wp-react-custom-multilang/configs/plugins/woocommerce-customizer.json index 6cd0c7228..63da5d5f2 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/woocommerce-customizer.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/woocommerce-customizer.json @@ -1,25 +1,25 @@ -{ - "options": { - "wc_customizer_active_customizations": { - "add_to_cart_text": {}, - "variable_add_to_cart_text": {}, - "grouped_add_to_cart_text": {}, - "out_of_stock_add_to_cart_text": {}, - "loop_sale_flash_text": {}, - "woocommerce_product_description_tab_title": {}, - "woocommerce_product_additional_information_tab_title": {}, - "woocommerce_product_description_heading": {}, - "woocommerce_product_additional_information_heading": {}, - "single_add_to_cart_text": {}, - "single_sale_flash_text": {}, - "woocommerce_checkout_must_be_logged_in_message": {}, - "woocommerce_checkout_coupon_message": {}, - "woocommerce_checkout_login_message": {}, - "woocommerce_create_account_default_checked": {}, - "woocommerce_order_button_text": {}, - "woocommerce_countries_tax_or_vat": {}, - "woocommerce_countries_inc_tax_or_vat": {}, - "woocommerce_countries_ex_tax_or_vat": {} - } - } -} +{ + "options": { + "wc_customizer_active_customizations": { + "add_to_cart_text": {}, + "variable_add_to_cart_text": {}, + "grouped_add_to_cart_text": {}, + "out_of_stock_add_to_cart_text": {}, + "loop_sale_flash_text": {}, + "woocommerce_product_description_tab_title": {}, + "woocommerce_product_additional_information_tab_title": {}, + "woocommerce_product_description_heading": {}, + "woocommerce_product_additional_information_heading": {}, + "single_add_to_cart_text": {}, + "single_sale_flash_text": {}, + "woocommerce_checkout_must_be_logged_in_message": {}, + "woocommerce_checkout_coupon_message": {}, + "woocommerce_checkout_login_message": {}, + "woocommerce_create_account_default_checked": {}, + "woocommerce_order_button_text": {}, + "woocommerce_countries_tax_or_vat": {}, + "woocommerce_countries_inc_tax_or_vat": {}, + "woocommerce_countries_ex_tax_or_vat": {} + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/woocommerce.json b/plugins/wp-react-custom-multilang/configs/plugins/woocommerce.json index 8774d8852..38af3d3a2 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/woocommerce.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/woocommerce.json @@ -1,137 +1,146 @@ -{ - "post_types": { - "product": {}, - "product_variation": {}, - "shop_coupon": { - "post_title": null, - "post_content": null - } - }, - "post_fields": { - "_button_text": {}, - "_purchase_note": {}, - "_variation_description": {}, - "_product_attributes": { - "size" : { - "name" : {}, - "value" : {} - } - } - }, - "taxonomies": { - "product_cat" : {}, - "product_tag" : {}, - "product_shipping_class" : {} - }, - "admin_pages": [ - "woocommerce_page_wc-settings", - "product_page_product_attributes" - ], - "options": { - "woocommerce_registration_privacy_policy_text": {}, - "woocommerce_checkout_privacy_policy_text": {}, - "woocommerce_store_address": {}, - "woocommerce_store_address_2": {}, - "woocommerce_store_city": {}, - "woocommerce_email_footer_text": {}, - "woocommerce_demo_store_notice": {}, - "woocommerce_price_thousand_sep": {}, - "woocommerce_price_decimal_sep": {}, - "woocommerce_price_display_suffix": {}, - "woocommerce_email_from_name": {}, - "woocommerce_new_order_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_completed_order_settings": { - "subject" : {}, - "heading" : {}, - "subject_downloadable" : {}, - "heading_downloadable" : {}, - "additional_content" : {} - }, - "woocommerce_customer_invoice_settings": { - "subject" : {}, - "heading" : {}, - "subject_paid" : {}, - "heading_paid" : {}, - "additional_content" : {} - }, - "woocommerce_customer_new_account_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_note_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_reset_password_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_processing_order_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_cancelled_order_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_failed_order_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_on_hold_order_settings": { - "subject" : {}, - "heading" : {}, - "additional_content" : {} - }, - "woocommerce_customer_refunded_order_settings": { - "subject_full" : {}, - "heading_full" : {}, - "subject_partial" : {}, - "heading_partial" : {}, - "additional_content" : {} - }, - "woocommerce_paypal_settings": { - "title" : {}, - "description" : {}, - "instructions" : {} - }, - "woocommerce_cheque_settings": { - "title" : {}, - "description" : {}, - "instructions" : {} - }, - "woocommerce_bacs_settings": { - "title" : {}, - "description" : {}, - "instructions" : {} - }, - "woocommerce_cod_settings": { - "title" : {}, - "description" : {}, - "instructions" : {} - }, - "woocommerce_bacs_accounts": { - "wpm_each": { - "account_name": {}, - "bank_name": {} - } - } - }, - "admin_html_tags": { - "product_page_product_attributes": { - "value": [ - "#attribute_label" - ] - } - } -} +{ + "post_types": { + "product": {}, + "product_variation": {}, + "shop_coupon": { + "post_title": null, + "post_content": null + } + }, + "post_fields": { + "_button_text": {}, + "_purchase_note": {}, + "_variation_description": {}, + "_product_attributes": { + "size" : { + "name" : {}, + "value" : {} + } + }, + "_product_image_gallery": {} + }, + "taxonomies": { + "product_cat" : {}, + "product_tag" : {}, + "product_shipping_class" : {}, + "product_brand" : {} + }, + "admin_pages": [ + "woocommerce_page_wc-settings", + "product_page_product_attributes" + ], + "options": { + "woocommerce_registration_privacy_policy_text": {}, + "woocommerce_checkout_privacy_policy_text": {}, + "woocommerce_store_address": {}, + "woocommerce_store_address_2": {}, + "woocommerce_store_city": {}, + "woocommerce_email_footer_text": {}, + "woocommerce_demo_store_notice": {}, + "woocommerce_price_thousand_sep": {}, + "woocommerce_price_decimal_sep": {}, + "woocommerce_price_display_suffix": {}, + "woocommerce_email_from_name": {}, + "woocommerce_new_order_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_completed_order_settings": { + "subject" : {}, + "heading" : {}, + "subject_downloadable" : {}, + "heading_downloadable" : {}, + "additional_content" : {} + }, + "woocommerce_customer_invoice_settings": { + "subject" : {}, + "heading" : {}, + "subject_paid" : {}, + "heading_paid" : {}, + "additional_content" : {} + }, + "woocommerce_customer_new_account_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_note_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_reset_password_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_processing_order_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_cancelled_order_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_failed_order_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_on_hold_order_settings": { + "subject" : {}, + "heading" : {}, + "additional_content" : {} + }, + "woocommerce_customer_refunded_order_settings": { + "subject_full" : {}, + "heading_full" : {}, + "subject_partial" : {}, + "heading_partial" : {}, + "additional_content" : {} + }, + "woocommerce_paypal_settings": { + "title" : {}, + "description" : {}, + "instructions" : {} + }, + "woocommerce_cheque_settings": { + "title" : {}, + "description" : {}, + "instructions" : {} + }, + "woocommerce_bacs_settings": { + "title" : {}, + "description" : {}, + "instructions" : {} + }, + "woocommerce_cod_settings": { + "title" : {}, + "description" : {}, + "instructions" : {} + }, + "woocommerce_bacs_accounts": { + "wpm_each": { + "account_name": {}, + "bank_name": {} + } + }, + "woocommerce_pickup_location_settings": { + "title" : {} + }, + "wooccm_checkout_order_notes_label" : {}, + "wooccm_checkout_order_notes_placeholder" : {}, + "wooccm_checkout_checkout_form_before_message" : {}, + "wooccm_checkout_checkout_form_after_message" : {} + }, + "admin_html_tags": { + "product_page_product_attributes": { + "value": [ + "#attribute_label" + ] + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/wordpress-seo.json b/plugins/wp-react-custom-multilang/configs/plugins/wordpress-seo.json index a73756c6d..0e76bc376 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/wordpress-seo.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/wordpress-seo.json @@ -1,75 +1,76 @@ -{ - "post_fields": { - "_yoast_wpseo_content_score": {}, - "_yoast_wpseo_title": {}, - "_yoast_wpseo_bctitle": {}, - "_yoast_wpseo_metadesc": {}, - "_yoast_wpseo_metakeywords": {}, - "_yoast_wpseo_focuskw": {}, - "_yoast_wpseo_opengraph-title": {}, - "_yoast_wpseo_opengraph-description": {}, - "_yoast_wpseo_twitter-title": {}, - "_yoast_wpseo_twitter-description": {}, - "_yoast_wpseo_schema_page_type": {}, - "_yoast_wpseo_schema_article_type": {}, - "_yoast_wpseo_opengraph-image": {}, - "_yoast_wpseo_opengraph-image-id": {}, - "_yoast_wpseo_twitter-image": {}, - "_yoast_wpseo_twitter-image-id": {}, - "_yoast_wpseo_canonical": {} - }, - "admin_pages": [ - "seo_page_wpseo_titles", - "seo_page_wpseo_advanced" - ], - "options": { - "wpseo_titles": { - "title-home-wpseo" : {}, - "metadesc-home-wpseo" : {}, - "metakey-home-wpseo" : {}, - "title-author-wpseo" : {}, - "metadesc-author-wpseo" : {}, - "metakey-author-wpseo" : {}, - "title-archive-wpseo" : {}, - "metadesc-archive-wpseo" : {}, - "title-search-wpseo" : {}, - "title-404-wpseo" : {}, - "breadcrumbs-home" : {}, - "breadcrumbs-prefix" : {}, - "breadcrumbs-archiveprefix" : {}, - "breadcrumbs-searchprefix" : {}, - "breadcrumbs-404crumb" : {}, - "rssbefore" : {}, - "rssafter" : {} - }, - "wpseo_internallinks": { - "breadcrumbs-home" : {}, - "breadcrumbs-prefix" : {}, - "breadcrumbs-archiveprefix" : {}, - "breadcrumbs-searchprefix" : {}, - "breadcrumbs-404crumb" : {} - }, - "wpseo_rss": { - "rssbefore" : {}, - "rssafter" : {} - }, - "wpseo_taxonomy_meta" : { - "wpm_each" : { - "wpm_each" : { - "wpseo_title" : {}, - "wpseo_desc" : {}, - "wpseo_focuskw" : {}, - "wpseo_content_score" : {}, - "wpseo_opengraph-title" : {}, - "wpseo_opengraph-description" : {}, - "wpseo_twitter-title" : {}, - "wpseo_twitter-description" : {}, - "wpseo_opengraph-image" : {}, - "wpseo_opengraph-image-id" : {}, - "wpseo_twitter-image" : {}, - "wpseo_twitter-image-id" : {} - } - } - } - } -} +{ + "post_fields": { + "_yoast_wpseo_content_score": {}, + "_yoast_wpseo_title": {}, + "_yoast_wpseo_bctitle": {}, + "_yoast_wpseo_metadesc": {}, + "_yoast_wpseo_metakeywords": {}, + "_yoast_wpseo_focuskw": {}, + "_yoast_wpseo_opengraph-title": {}, + "_yoast_wpseo_opengraph-description": {}, + "_yoast_wpseo_twitter-title": {}, + "_yoast_wpseo_twitter-description": {}, + "_yoast_wpseo_schema_page_type": {}, + "_yoast_wpseo_schema_article_type": {}, + "_yoast_wpseo_opengraph-image": {}, + "_yoast_wpseo_opengraph-image-id": {}, + "_yoast_wpseo_twitter-image": {}, + "_yoast_wpseo_twitter-image-id": {}, + "_yoast_wpseo_canonical": {} + }, + "admin_pages": [ + "seo_page_wpseo_titles", + "seo_page_wpseo_advanced", + "seo_page_wpseo_page_settings" + ], + "options": { + "wpseo_titles": { + "title-home-wpseo" : {}, + "metadesc-home-wpseo" : {}, + "metakey-home-wpseo" : {}, + "title-author-wpseo" : {}, + "metadesc-author-wpseo" : {}, + "metakey-author-wpseo" : {}, + "title-archive-wpseo" : {}, + "metadesc-archive-wpseo" : {}, + "title-search-wpseo" : {}, + "title-404-wpseo" : {}, + "breadcrumbs-home" : {}, + "breadcrumbs-prefix" : {}, + "breadcrumbs-archiveprefix" : {}, + "breadcrumbs-searchprefix" : {}, + "breadcrumbs-404crumb" : {}, + "rssbefore" : {}, + "rssafter" : {} + }, + "wpseo_internallinks": { + "breadcrumbs-home" : {}, + "breadcrumbs-prefix" : {}, + "breadcrumbs-archiveprefix" : {}, + "breadcrumbs-searchprefix" : {}, + "breadcrumbs-404crumb" : {} + }, + "wpseo_rss": { + "rssbefore" : {}, + "rssafter" : {} + }, + "wpseo_taxonomy_meta" : { + "wpm_each" : { + "wpm_each" : { + "wpseo_title" : {}, + "wpseo_desc" : {}, + "wpseo_focuskw" : {}, + "wpseo_content_score" : {}, + "wpseo_opengraph-title" : {}, + "wpseo_opengraph-description" : {}, + "wpseo_twitter-title" : {}, + "wpseo_twitter-description" : {}, + "wpseo_opengraph-image" : {}, + "wpseo_opengraph-image-id" : {}, + "wpseo_twitter-image" : {}, + "wpseo_twitter-image-id" : {} + } + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/wp-pagenavi.json b/plugins/wp-react-custom-multilang/configs/plugins/wp-pagenavi.json index 904a83c3f..798339463 100644 --- a/plugins/wp-react-custom-multilang/configs/plugins/wp-pagenavi.json +++ b/plugins/wp-react-custom-multilang/configs/plugins/wp-pagenavi.json @@ -1,18 +1,18 @@ -{ - "admin_pages": [ - "settings_page_pagenavi" - ], - "options": { - "pagenavi_options": { - "pages_text": {}, - "current_text": {}, - "page_text": {}, - "first_text": {}, - "last_text": {}, - "prev_text": {}, - "next_text": {}, - "dotleft_text": {}, - "dotright_text": {} - } - } -} +{ + "admin_pages": [ + "settings_page_pagenavi" + ], + "options": { + "pagenavi_options": { + "pages_text": {}, + "current_text": {}, + "page_text": {}, + "first_text": {}, + "last_text": {}, + "prev_text": {}, + "next_text": {}, + "dotleft_text": {}, + "dotright_text": {} + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/wp-seopress.json b/plugins/wp-react-custom-multilang/configs/plugins/wp-seopress.json new file mode 100644 index 000000000..366ba8120 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/wp-seopress.json @@ -0,0 +1,87 @@ +{ + "post_fields": { + "_seopress_titles_title": {}, + "_seopress_titles_desc": {}, + "_seopress_social_fb_title": {}, + "_seopress_social_fb_desc": {}, + "_seopress_social_fb_img": {}, + "_seopress_social_twitter_title": {}, + "_seopress_social_twitter_desc": {}, + "_seopress_social_twitter_img": {}, + "_seopress_canonical_url": {}, + "_seopress_robots_index": {}, + "_seopress_robots_follow": {}, + "_seopress_robots": {}, + "_seopress_target_kw": {}, + "_seopress_analysis_data": {}, + "_seopress_redirections_enabled": {}, + "_seopress_redirections_type": {}, + "_seopress_redirections_value": {} + }, + "term_fields": { + "_seopress_titles_tax_title": {}, + "_seopress_titles_tax_desc": {}, + "_seopress_social_fb_title": {}, + "_seopress_social_fb_desc": {}, + "_seopress_social_fb_img": {}, + "_seopress_social_twitter_title": {}, + "_seopress_social_twitter_desc": {}, + "_seopress_social_twitter_img": {}, + "_seopress_target_kw": {}, + "_seopress_analysis_data": {} + }, + "admin_pages": [ + "seopress-option-titles", + "seopress-option-social", + "seopress-option-advanced", + "seopress-option-breadcrumbs", + "seopress-option-rss" + ], + "options": { + "seopress_titles_option_name": { + "seopress_titles_home_site_title": {}, + "seopress_titles_home_site_desc": {}, + "seopress_titles_author_title": {}, + "seopress_titles_author_desc": {}, + "seopress_titles_date_title": {}, + "seopress_titles_date_desc": {}, + "seopress_titles_search_title": {}, + "seopress_titles_404_title": {} + }, + "seopress_social_option_name": { + "seopress_social_accounts_facebook": {}, + "seopress_social_accounts_twitter": {}, + "seopress_social_og_img": {}, + "seopress_social_twitter_card": {} + }, + "seopress_advanced_option_name": { + "seopress_advanced_robots": {}, + "seopress_advanced_canonical": {} + }, + "seopress_breadcrumbs_option_name": { + "seopress_breadcrumb_home_title": {}, + "seopress_breadcrumb_prefix": {}, + "seopress_breadcrumb_archive_title": {}, + "seopress_breadcrumb_search_title": {}, + "seopress_breadcrumb_404_title": {} + }, + "seopress_rss_option_name": { + "seopress_rss_before_content": {}, + "seopress_rss_after_content": {} + }, + "seopress_taxonomy_option_name": { + "each_tax": { + "seopress_titles_tax_title": {}, + "seopress_titles_tax_desc": {}, + "seopress_social_fb_title": {}, + "seopress_social_fb_desc": {}, + "seopress_social_fb_img": {}, + "seopress_social_twitter_title": {}, + "seopress_social_twitter_desc": {}, + "seopress_social_twitter_img": {}, + "seopress_target_kw": {}, + "seopress_analysis_data": {} + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/configs/plugins/ymc-smart-filter.json b/plugins/wp-react-custom-multilang/configs/plugins/ymc-smart-filter.json new file mode 100644 index 000000000..b38492396 --- /dev/null +++ b/plugins/wp-react-custom-multilang/configs/plugins/ymc-smart-filter.json @@ -0,0 +1,16 @@ +{ + "post_fields": { + "ymc_post_elements": { + "button_text_all": {}, + "button_text": {} + }, + "ymc_empty_post_result": {}, + "ymc_search_text_button": {}, + "ymc_search_placeholder": {}, + "ymc_pagination_elements": { + "prev_btn_text": {}, + "next_btn_text": {}, + "load_btn_text": {} + } + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/core-config.json b/plugins/wp-react-custom-multilang/core-config.json index 47f073a42..ec567b3a8 100644 --- a/plugins/wp-react-custom-multilang/core-config.json +++ b/plugins/wp-react-custom-multilang/core-config.json @@ -1,62 +1,73 @@ -{ - "post_types": { - "page": {}, - "post": {}, - "wp_block": {}, - "attachment": {}, - "nav_menu_item": { - "attr_title": {}, - "title": {} - }, - "any": {}, - "customize_changeset": null, - "revision": null, - "wp_template": {}, - "wp_template_part": {}, - "wp_navigation": {}, - "wp_global_styles": {} - }, - "post_fields": { - "_wp_attachment_image_alt": {}, - "_thumbnail_id":{} - }, - "taxonomies": { - "category" : {}, - "post_tag" : {} - }, - "term_fields": {}, - "user_fields": {}, - "comment_fields": {}, - "admin_pages": [ - "upload", - "nav-menus", - "options-general", - "widgets", - "settings-network", - "site-settings-network" - ], - "options": { - "blogname": {}, - "blogdescription": {}, - "site_logo": {} - }, - "site_options": { - "site_name": {}, - "welcome_email": {}, - "first_post": {}, - "welcome_user_email": {}, - "first_page": {}, - "first_comment": {} - }, - "widgets": { - "media_image": { - "caption": {}, - "alt": {}, - "image_title": {} - }, - "custom_html": { - "content": {} - } - }, - "admin_html_tags": {} -} +{ + "post_types": { + "page": {}, + "post": {}, + "wp_block": {}, + "attachment": {}, + "nav_menu_item": { + "attr_title": {}, + "title": {} + }, + "any": {}, + "customize_changeset": null, + "revision": null, + "wp_template": {}, + "wp_template_part": {}, + "wp_navigation": {}, + "wp_global_styles": {}, + "woodmart_layout": {}, + "cms_block": {}, + "al_product": {}, + "saswp_reviews": {}, + "saswp-collections": {} + }, + "post_fields": { + "_wp_attachment_image_alt": {}, + "_thumbnail_id":{} + }, + "taxonomies": { + "category" : {}, + "post_tag" : {}, + "al_product-cat" : {}, + "brand-category" : {} + }, + "term_fields": {}, + "user_fields": { + "dokan_profile_settings" : { + "vendor_biography" : {} + } + }, + "comment_fields": {}, + "admin_pages": [ + "upload", + "nav-menus", + "options-general", + "widgets", + "settings-network", + "site-settings-network" + ], + "options": { + "blogname": {}, + "blogdescription": {}, + "site_logo": {} + }, + "site_options": { + "site_name": {}, + "welcome_email": {}, + "first_post": {}, + "welcome_user_email": {}, + "first_page": {}, + "first_comment": {} + }, + "widgets": { + "media_image": { + "caption": {}, + "alt": {}, + "image_title": {} + }, + "custom_html": { + "content": {} + } + }, + "admin_html_tags": {} +} diff --git a/plugins/wp-react-custom-multilang/flags/cy.png b/plugins/wp-react-custom-multilang/flags/cy.png index 9a1db813f..80a885a16 100644 Binary files a/plugins/wp-react-custom-multilang/flags/cy.png and b/plugins/wp-react-custom-multilang/flags/cy.png differ diff --git a/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-object.php b/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-object.php index 4591022d0..47df63f0d 100644 --- a/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-object.php +++ b/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-object.php @@ -1,460 +1,523 @@ -object_type ) { - - case 'post': - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return $value; - } - - break; - - case 'term': - $term = get_term( $object_id ); - if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { - return $value; - } - } - - if ( ! $meta_key ) { - - $meta_cache = wp_cache_get( $object_id, $this->object_type . '_meta' ); - - if ( ! $meta_cache ) { - $meta_cache = update_meta_cache( $this->object_type, array( $object_id ) ); - $meta_cache = $meta_cache[ $object_id ]; - } - - return wpm_translate_value( $meta_cache ); - } - - $config = wpm_get_config(); - $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); - - if ( ! isset( $object_fields_config[ $meta_key ] ) ) { - if($meta_key == 'wp_yoast_notifications'){ - if($value == null){ - return ''; - } - } - return $value; - } - - $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], false, $object_id ); - $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $object_id ); - - if ( null === $meta_config ) { - return $value; - } - - $column = sanitize_key( $this->object_type . '_id' ); - $id_column = 'user' === $this->object_type ? 'umeta_id' : 'meta_id'; - $meta_values = wp_cache_get( $object_id, $this->object_type . '_' . $meta_key . '_wpm_meta' ); - $values = array(); - - if ( ! $meta_values ) { - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery - $meta_values = $wpdb->get_results( $wpdb->prepare( "SELECT {$id_column}, meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d;", $meta_key, $object_id ), ARRAY_A ); - - wp_cache_set( $object_id, $meta_values, $this->object_type . '_' . $meta_key . '_wpm_meta' ); - } - - if ( $meta_values ) { - - foreach ( $meta_values as $meta_field ) { - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value - $meta_field['meta_value'] = maybe_unserialize( $meta_field['meta_value'] ); - if ( wpm_is_ml_value( $meta_field['meta_value'] ) ) { - $value = wpm_translate_value( $meta_field['meta_value'] ); - } else { - $value = $meta_field['meta_value']; - } - - $value = apply_filters( 'wpm_get_meta_value', $value, $meta_key ); - $value = apply_filters( "wpm_get_{$meta_key}_meta_value", $value ); - $value = apply_filters( "wpm_get_{$this->object_type}_meta_{$meta_key}_value", $value ); - $value = apply_filters( "wpm_unslash_form_meta_value", $value, $meta_key); - - $values[] = $value; - } - } - - if ( $values ) { - return $values; - } - - return null; - } - - /** - * Save meta with translations - * - * @param $check - * @param $object_id - * @param $meta_key - * @param $meta_value - * @param $prev_value - * - * @return bool - */ - public function update_meta_field( $check, $object_id, $meta_key, $meta_value, $prev_value ) { - global $wpdb; - - switch ( $this->object_type ) { - - case 'post': - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return $check; - } - - break; - - case 'term': - $term = get_term( $object_id ); - if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { - return $check; - } - } - - $config = wpm_get_config(); - $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); - $object_fields_config = apply_filters( "wpm_modify_woocommerce_product_attributes_config", $object_fields_config, $meta_key, $meta_value, $object_id); - - if ( ! isset( $object_fields_config[ $meta_key ] ) ) { - return $check; - } - - $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], $meta_value, $object_id ); - $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $meta_value, $object_id ); - - if ( null === $meta_config ) { - return $check; - } - - $table = $wpdb->{$this->object_table}; - $column = sanitize_key( $this->object_type . '_id' ); - $id_column = 'user' === $this->object_type ? 'umeta_id' : 'meta_id'; - $meta_value = apply_filters( 'wpm_update_meta_value', $meta_value, $meta_key ); - $meta_value = apply_filters( "wpm_update_{$meta_key}_meta_value", $meta_value ); - $meta_value = apply_filters( "wpm_update_{$this->object_type}_meta_{$meta_key}_value", $meta_value ); - - if ( empty( $prev_value ) ) { - - if ( wpm_is_ml_value( $meta_value ) ) { - $old_value = array(); - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $old_results = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d;", $meta_key, $object_id ), ARRAY_A ); - if ( $old_results ) { - $old_value[0] = maybe_unserialize( $old_results[0]['meta_value'] ); - } - } else { - $old_value = get_metadata( $this->object_type, $object_id, $meta_key ); - } - - if ( count( $old_value ) === 1 ) { - if ( $old_value[0] === $meta_value ) { - return false; - } - } - } - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ); - if ( empty( $meta_ids ) ) { - return add_metadata( $this->object_type, $object_id, $meta_key, $meta_value ); - } - - $_meta_value = $meta_value; - - if ( ! wpm_is_ml_value( $meta_value ) ) { - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d LIMIT 1;", $meta_key, $object_id ) ); - $old_value = maybe_unserialize( $old_value ); - $old_value = apply_filters( "wpm_filter_old_{$meta_key}_meta_value", $old_value, $meta_value, $meta_config ); - $meta_value = wpm_set_new_value( $old_value, $meta_value, $meta_config ); - $meta_value = apply_filters( "wpm_filter_new_{$meta_key}_meta_value", $meta_value, $old_value, $meta_config ); - } - - $meta_value = maybe_serialize( $meta_value ); - $data = compact( 'meta_value' ); - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key - $where = array( $column => $object_id, 'meta_key' => $meta_key ); - - if ( ! empty( $prev_value ) ) { - - if ( ! wpm_is_ml_value( $prev_value ) ) { - $like = '%' . $wpdb->esc_like( esc_sql( $prev_value ) ) . '%'; - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $prev_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d AND meta_value LIKE %s LIMIT 1", $meta_key, $object_id, $like ) ); - } - - $prev_value = maybe_serialize( $prev_value ); - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value - $where['meta_value'] = $prev_value; - } - - foreach ( $meta_ids as $meta_id ) { - /** - * Fires immediately before updating metadata of a specific type. - * - * The dynamic portion of the hook, `$meta_type`, refers to the meta - * object type (comment, post, or user). - * - * @since 2.9.0 - * - * @param int $meta_id ID of the metadata entry to update. - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( "update_{$this->object_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value ); - - if ( 'post' === $this->object_type ) { - /** - * Fires immediately before updating a post's metadata. - * - * @since 2.9.0 - * - * @param int $meta_id ID of metadata entry to update. - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value ); - } - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $result = $wpdb->update( $table, $data, $where ); - - if ( ! $result ) { - return false; - } - - wp_cache_delete( $object_id, $this->object_type . '_' . $meta_key . '_wpm_meta' ); - - foreach ( $meta_ids as $meta_id ) { - /** - * Fires immediately after updating metadata of a specific type. - * - * The dynamic portion of the hook, `$meta_type`, refers to the meta - * object type (comment, post, or user). - * - * @since 2.9.0 - * - * @param int $meta_id ID of updated metadata entry. - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( "updated_{$this->object_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value ); - - if ( 'post' === $this->object_type ) { - /** - * Fires immediately after updating a post's metadata. - * - * @since 2.9.0 - * - * @param int $meta_id ID of updated metadata entry. - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value ); - } - } - - return true; - } - - /** - * Add new meta for translation - * - * @param $check null|mixed - * @param $object_id int - * @param $meta_key - * @param $meta_value mixed - * @param $unique bool - * - * @return mixed - */ - public function add_meta_field( $check, $object_id, $meta_key, $meta_value, $unique ) { - global $wpdb; - - if ( null !== $check ) { - return $check; - } - - switch ( $this->object_type ) { - - case 'post': - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return $check; - } - break; - - case 'term': - $term = get_term( $object_id ); - if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { - return $check; - } - } - - $config = wpm_get_config(); - $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); - - if ( ! isset( $object_fields_config[ $meta_key ] ) ) { - return $check; - } - - $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], $meta_value, $object_id ); - $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $meta_value, $object_id ); - - if ( null === $meta_config ) { - return $check; - } - - $table = $wpdb->{$this->object_table}; - $column = sanitize_key( $this->object_type . '_id' ); - $meta_value = apply_filters( 'wpm_add_meta_value', $meta_value, $meta_key ); - $meta_value = apply_filters( "wpm_add_{$meta_key}_meta_value", $meta_value ); - $meta_value = apply_filters( "wpm_add_{$this->object_type}_meta_{$meta_key}_value", $meta_value ); - - if ( ! wpm_is_ml_value( $meta_value ) ) { - $meta_value = wpm_set_new_value( array(), $meta_value, $meta_config ); - } - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - if ( $unique && $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) - ) { - return false; - } - - $_meta_value = $meta_value; - $meta_value = maybe_serialize( $meta_value ); - - /** - * Fires immediately before meta of a specific type is added. - * - * The dynamic portion of the hook, `$meta_type`, refers to the meta - * object type (comment, post, or user). - * - * @since 3.1.0 - * - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( "add_{$this->object_type}_meta", $object_id, $meta_key, $_meta_value ); - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.SlowDBQuery.slow_db_query_meta_key - $result = $wpdb->insert( $table, array( - $column => $object_id, - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key - 'meta_key' => $meta_key, - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value - 'meta_value' => $meta_value, - ) ); - - if ( ! $result ) { - return false; - } - - $mid = (int) $wpdb->insert_id; - - wp_cache_delete( $object_id, $this->object_type . '_meta' ); - - /** - * Fires immediately after meta of a specific type is added. - * - * The dynamic portion of the hook, `$meta_type`, refers to the meta - * object type (comment, post, or user). - * - * @since 2.9.0 - * - * @param int $mid The meta ID after successful update. - * @param int $object_id Object ID. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - */ - do_action( "added_{$this->object_type}_meta", $mid, $object_id, $meta_key, $_meta_value ); - - return $mid; - } - - /** - * Delete meta field - * - * @param $meta_ids - * @param $object_id - * @param $meta_key - */ - public function delete_meta_field( $meta_ids, $object_id, $meta_key ) { - - switch ( $this->object_type ) { - - case 'post': - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return; - } - break; - - case 'term': - $term = get_term( $object_id ); - if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { - return; - } - } - - $config = wpm_get_config(); - $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); - - if ( ! isset( $object_fields_config[ $meta_key ] ) || null === $object_fields_config[ $meta_key ] ) { - return; - } - - wp_cache_delete( $object_id, $this->object_type . '_' . $meta_key . '_wpm_meta' ); - } -} +object_type ) { + + case 'post': + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return $value; + } + + break; + + case 'term': + $cache_key = 'wpm_get_term_meta_field_'.$object_id; + $term = wp_cache_get( $cache_key ); + if ( false === $term ) { + $term = get_term( $object_id ); + wp_cache_set( $cache_key, $term ); + } + if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { + return $value; + } + } + + if ( ! $meta_key ) { + + $meta_cache = wp_cache_get( $object_id, $this->object_type . '_meta' ); + + if ( ! $meta_cache ) { + $meta_cache = update_meta_cache( $this->object_type, array( $object_id ) ); + $meta_cache = $meta_cache[ $object_id ]; + } + + return wpm_translate_value( $meta_cache ); + } + + $config = wpm_get_config(); + $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); + + if ( ! isset( $object_fields_config[ $meta_key ] ) ) { + if($meta_key == 'wp_yoast_notifications'){ + if($value == null){ + return ''; + } + } + return $value; + } + + $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], false, $object_id ); + $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $object_id ); + + if ( null === $meta_config ) { + return $value; + } + + $column = sanitize_key( $this->object_type . '_id' ); + $id_column = 'user' === $this->object_type ? 'umeta_id' : 'meta_id'; + $cache_key = 'wpm_meta_field_'.$meta_key.'_'.$object_id.'_'.$id_column; + $meta_values = wp_cache_get( $cache_key ); + $values = array(); + + if ( false === $meta_values ) { + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery + $meta_values = $wpdb->get_results( $wpdb->prepare( "SELECT {$id_column}, meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d;", $meta_key, $object_id ), ARRAY_A ); + + wp_cache_set( $cache_key, $meta_values ); + } + + if ( $meta_values ) { + + foreach ( $meta_values as $meta_field ) { + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value + $meta_field['meta_value'] = maybe_unserialize( $meta_field['meta_value'] ); + if ( wpm_is_ml_value( $meta_field['meta_value'] ) ) { + $value = wpm_translate_value( $meta_field['meta_value'] ); + } else { + $value = $meta_field['meta_value']; + } + + $value = apply_filters( 'wpm_get_meta_value', $value, $meta_key ); + $value = apply_filters( "wpm_get_{$meta_key}_meta_value", $value ); + $value = apply_filters( "wpm_get_{$this->object_type}_meta_{$meta_key}_value", $value ); + $value = apply_filters( "wpm_unslash_form_meta_value", $value, $meta_key); + + $values[] = $value; + } + } + + // If original meta doesn't exist but _translate version does, create original meta from default language + // Only apply this fix for Oxygen Builder when it's active + if ( empty( $values ) && $meta_key === '_ct_builder_json' ) { + // Check if Oxygen Builder is active + $is_oxygen_active = false; + + // Check for Oxygen Builder class or constant + if ( class_exists( 'CT_Component' ) || defined( 'CT_VERSION' ) ) { + $is_oxygen_active = true; + } else { + // Check if Oxygen Builder plugin is active + if ( ! function_exists( 'is_plugin_active' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + $is_oxygen_active = is_plugin_active( 'oxygen/functions.php' ); + } + + // Only proceed if Oxygen Builder is active + if ( $is_oxygen_active ) { + $translate_key = $meta_key . '_translate'; + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $translate_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d LIMIT 1;", $translate_key, $object_id ) ); + + if ( ! empty( $translate_value ) ) { + $translate_value = maybe_unserialize( $translate_value ); + $default_lang = wpm_get_default_language(); + + // Extract default language value from translate version (which is base64 encoded) + if ( wpm_is_ml_value( $translate_value ) ) { + $default_value_encoded = wpm_translate_string( $translate_value, $default_lang ); + // Base64 decode the value + $default_value = base64_decode( $default_value_encoded, true ); + } else { + // If not multilingual, try to decode if it's base64 encoded + $default_value = base64_decode( $translate_value, true ); + if ( false === $default_value ) { + $default_value = $translate_value; + } + } + + // Create the original meta with default language value + if ( ! empty( $default_value ) ) { + add_metadata( $this->object_type, $object_id, $meta_key, $default_value ); + wp_cache_delete( $cache_key ); + + // Return the default value + $value = apply_filters( 'wpm_get_meta_value', $default_value, $meta_key ); + $value = apply_filters( "wpm_get_{$meta_key}_meta_value", $value ); + $value = apply_filters( "wpm_get_{$this->object_type}_meta_{$meta_key}_value", $value ); + $value = apply_filters( "wpm_unslash_form_meta_value", $value, $meta_key); + + return array( $value ); + } + } + } + } + + if ( $values ) { + return $values; + } + + return null; + } + + /** + * Save meta with translations + * + * @param $check + * @param $object_id + * @param $meta_key + * @param $meta_value + * @param $prev_value + * + * @return bool + */ + public function update_meta_field( $check, $object_id, $meta_key, $meta_value, $prev_value ) { + global $wpdb; + + switch ( $this->object_type ) { + + case 'post': + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return $check; + } + + break; + + case 'term': + $term = get_term( $object_id ); + if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { + return $check; + } + } + + $config = wpm_get_config(); + $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); + $object_fields_config = apply_filters( "wpm_modify_woocommerce_product_attributes_config", $object_fields_config, $meta_key, $meta_value, $object_id); + + if ( ! isset( $object_fields_config[ $meta_key ] ) ) { + return $check; + } + + $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], $meta_value, $object_id ); + $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $meta_value, $object_id ); + + if ( null === $meta_config ) { + return $check; + } + + $table = $wpdb->{$this->object_table}; + $column = sanitize_key( $this->object_type . '_id' ); + $id_column = 'user' === $this->object_type ? 'umeta_id' : 'meta_id'; + $meta_value = apply_filters( 'wpm_update_meta_value', $meta_value, $meta_key ); + $meta_value = apply_filters( "wpm_update_{$meta_key}_meta_value", $meta_value ); + $meta_value = apply_filters( "wpm_update_{$this->object_type}_meta_{$meta_key}_value", $meta_value ); + + if ( empty( $prev_value ) ) { + + if ( wpm_is_ml_value( $meta_value ) ) { + $old_value = array(); + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $old_results = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d;", $meta_key, $object_id ), ARRAY_A ); + if ( $old_results ) { + $old_value[0] = maybe_unserialize( $old_results[0]['meta_value'] ); + } + } else { + $old_value = get_metadata( $this->object_type, $object_id, $meta_key ); + } + + if ( count( $old_value ) === 1 ) { + if ( $old_value[0] === $meta_value ) { + return false; + } + } + } + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ); + if ( empty( $meta_ids ) ) { + return add_metadata( $this->object_type, $object_id, $meta_key, $meta_value ); + } + + $_meta_value = $meta_value; + + if ( ! wpm_is_ml_value( $meta_value ) ) { + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d LIMIT 1;", $meta_key, $object_id ) ); + $old_value = maybe_unserialize( $old_value ); + $old_value = apply_filters( "wpm_filter_old_{$meta_key}_meta_value", $old_value, $meta_value, $meta_config ); + $meta_value = wpm_set_new_value( $old_value, $meta_value, $meta_config ); + $meta_value = apply_filters( "wpm_filter_new_{$meta_key}_meta_value", $meta_value, $old_value, $meta_config ); + } + + $meta_value = maybe_serialize( $meta_value ); + $data = compact( 'meta_value' ); + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key + $where = array( $column => $object_id, 'meta_key' => $meta_key ); + + if ( ! empty( $prev_value ) ) { + + if ( ! wpm_is_ml_value( $prev_value ) ) { + $like = '%' . $wpdb->esc_like( esc_sql( $prev_value ) ) . '%'; + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $prev_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->{$this->object_table}} WHERE meta_key = %s AND {$column} = %d AND meta_value LIKE %s LIMIT 1", $meta_key, $object_id, $like ) ); + } + + $prev_value = maybe_serialize( $prev_value ); + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value + $where['meta_value'] = $prev_value; + } + + foreach ( $meta_ids as $meta_id ) { + /** + * Fires immediately before updating metadata of a specific type. + * + * The dynamic portion of the hook, `$meta_type`, refers to the meta + * object type (comment, post, or user). + * + * @since 2.9.0 + * + * @param int $meta_id ID of the metadata entry to update. + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( "update_{$this->object_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value ); + + if ( 'post' === $this->object_type ) { + /** + * Fires immediately before updating a post's metadata. + * + * @since 2.9.0 + * + * @param int $meta_id ID of metadata entry to update. + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value ); + } + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $result = $wpdb->update( $table, $data, $where ); + + if ( ! $result ) { + return false; + } + + wp_cache_delete( $object_id, $this->object_type . '_' . $meta_key . '_wpm_meta' ); + + foreach ( $meta_ids as $meta_id ) { + /** + * Fires immediately after updating metadata of a specific type. + * + * The dynamic portion of the hook, `$meta_type`, refers to the meta + * object type (comment, post, or user). + * + * @since 2.9.0 + * + * @param int $meta_id ID of updated metadata entry. + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( "updated_{$this->object_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value ); + + if ( 'post' === $this->object_type ) { + /** + * Fires immediately after updating a post's metadata. + * + * @since 2.9.0 + * + * @param int $meta_id ID of updated metadata entry. + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value ); + } + } + + return true; + } + + /** + * Add new meta for translation + * + * @param $check null|mixed + * @param $object_id int + * @param $meta_key + * @param $meta_value mixed + * @param $unique bool + * + * @return mixed + */ + public function add_meta_field( $check, $object_id, $meta_key, $meta_value, $unique ) { + global $wpdb; + + if ( null !== $check ) { + return $check; + } + + switch ( $this->object_type ) { + + case 'post': + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return $check; + } + break; + + case 'term': + $term = get_term( $object_id ); + if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { + return $check; + } + } + + $config = wpm_get_config(); + $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); + + if ( ! isset( $object_fields_config[ $meta_key ] ) ) { + return $check; + } + + $meta_config = apply_filters( "wpm_{$meta_key}_meta_config", $object_fields_config[ $meta_key ], $meta_value, $object_id ); + $meta_config = apply_filters( "wpm_{$this->object_type}_meta_{$meta_key}_config", $meta_config, $meta_value, $object_id ); + + if ( null === $meta_config ) { + return $check; + } + + $table = $wpdb->{$this->object_table}; + $column = sanitize_key( $this->object_type . '_id' ); + $meta_value = apply_filters( 'wpm_add_meta_value', $meta_value, $meta_key ); + $meta_value = apply_filters( "wpm_add_{$meta_key}_meta_value", $meta_value ); + $meta_value = apply_filters( "wpm_add_{$this->object_type}_meta_{$meta_key}_value", $meta_value ); + + if ( ! wpm_is_ml_value( $meta_value ) ) { + $meta_value = wpm_set_new_value( array(), $meta_value, $meta_config ); + } + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + if ( $unique && $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) + ) { + return false; + } + + $_meta_value = $meta_value; + $meta_value = maybe_serialize( $meta_value ); + + /** + * Fires immediately before meta of a specific type is added. + * + * The dynamic portion of the hook, `$meta_type`, refers to the meta + * object type (comment, post, or user). + * + * @since 3.1.0 + * + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( "add_{$this->object_type}_meta", $object_id, $meta_key, $_meta_value ); + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.SlowDBQuery.slow_db_query_meta_key + $result = $wpdb->insert( $table, array( + $column => $object_id, + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key + 'meta_key' => $meta_key, + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value + 'meta_value' => $meta_value, + ) ); + + if ( ! $result ) { + return false; + } + + $mid = (int) $wpdb->insert_id; + + wp_cache_delete( $object_id, $this->object_type . '_meta' ); + + /** + * Fires immediately after meta of a specific type is added. + * + * The dynamic portion of the hook, `$meta_type`, refers to the meta + * object type (comment, post, or user). + * + * @since 2.9.0 + * + * @param int $mid The meta ID after successful update. + * @param int $object_id Object ID. + * @param string $meta_key Meta key. + * @param mixed $meta_value Meta value. + */ + do_action( "added_{$this->object_type}_meta", $mid, $object_id, $meta_key, $_meta_value ); + + return $mid; + } + + /** + * Delete meta field + * + * @param $meta_ids + * @param $object_id + * @param $meta_key + */ + public function delete_meta_field( $meta_ids, $object_id, $meta_key ) { + + switch ( $this->object_type ) { + + case 'post': + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return; + } + break; + + case 'term': + $term = get_term( $object_id ); + if ( ! $term || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { + return; + } + } + + $config = wpm_get_config(); + $object_fields_config = apply_filters( "wpm_{$this->object_type}_fields_config", $config[ "{$this->object_type}_fields" ] ); + + if ( ! isset( $object_fields_config[ $meta_key ] ) || null === $object_fields_config[ $meta_key ] ) { + return; + } + + wp_cache_delete( $object_id, $this->object_type . '_' . $meta_key . '_wpm_meta' ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-widget.php b/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-widget.php index 9e0232a4b..1e826d40a 100644 --- a/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-widget.php +++ b/plugins/wp-react-custom-multilang/includes/abstracts/abstract-wpm-widget.php @@ -1,275 +1,275 @@ - $this->widget_cssclass, - 'description' => $this->widget_description, - 'customize_selective_refresh' => true, - ); - - parent::__construct( $this->widget_id, $this->widget_name, $widget_ops ); - - add_action( 'save_post', array( $this, 'flush_widget_cache' ) ); - add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) ); - add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) ); - } - - /** - * Get cached widget. - * - * @param array $args - * @return bool true if the widget is cached otherwise false - */ - public function get_cached_widget( $args ) { - - $cache = wp_cache_get( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), 'widget' ); - - if ( ! is_array( $cache ) ) { - $cache = array(); - } - - if ( isset( $cache[ $args['widget_id'] ] ) ) { - echo esc_html( $cache[ $args['widget_id'] ] ); - return true; - } - - return false; - } - - /** - * Cache the widget. - * - * @param array $args - * @param string $content - * @return string the content that was cached - */ - public function cache_widget( $args, $content ) { - wp_cache_set( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), array( $args['widget_id'] => $content ), 'widget' ); - - return $content; - } - - /** - * Flush the cache. - */ - public function flush_widget_cache() { - wp_cache_delete( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), 'widget' ); - } - - /** - * Output the html at the start of a widget. - * - * @param array $args - * @param $instance - */ - public function widget_start( $args, $instance ) { - echo wp_kses( $args['before_widget'], wp_kses_allowed_html('post') ); - - if ( $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ) ) { - echo wp_kses( $args['before_title'], wp_kses_allowed_html('post') ) . esc_html( $title ) . wp_kses( $args['after_title'], wp_kses_allowed_html('post') ); - } - } - - /** - * Output the html at the end of a widget. - * - * @param array $args - */ - public function widget_end( $args ) { - echo wp_kses( $args['after_widget'], wp_kses_allowed_html('post') ); - } - - /** - * Updates a particular instance of a widget. - * - * @see WP_Widget->update - * @param array $new_instance - * @param array $old_instance - * @return array - */ - public function update( $new_instance, $old_instance ) { - - $instance = $old_instance; - - if ( empty( $this->settings ) ) { - return $instance; - } - - // Loop settings and get values to save. - foreach ( $this->settings as $key => $setting ) { - if ( ! isset( $setting['type'] ) ) { - continue; - } - - // Format the value based on settings type. - switch ( $setting['type'] ) { - case 'number' : - $instance[ $key ] = absint( $new_instance[ $key ] ); - - if ( isset( $setting['min'] ) && '' !== $setting['min'] ) { - $instance[ $key ] = max( $instance[ $key ], $setting['min'] ); - } - - if ( isset( $setting['max'] ) && '' !== $setting['max'] ) { - $instance[ $key ] = min( $instance[ $key ], $setting['max'] ); - } - break; - case 'textarea' : - $instance[ $key ] = wp_kses( trim( wp_unslash( $new_instance[ $key ] ) ), wp_kses_allowed_html( 'post' ) ); - break; - case 'checkbox' : - $instance[ $key ] = empty( $new_instance[ $key ] ) ? 0 : 1; - break; - default: - $instance[ $key ] = sanitize_text_field( $new_instance[ $key ] ); - break; - } - - /** - * Sanitize the value of a setting. - */ - $instance[ $key ] = apply_filters( 'wpm_widget_settings_sanitize_option', $instance[ $key ], $new_instance, $key, $setting ); - } - - $this->flush_widget_cache(); - - return $instance; - } - - /** - * Outputs the settings update form. - * - * @see WP_Widget->form - * @param array $instance - * - * @return null|string - */ - public function form( $instance ) { - - if ( empty( $this->settings ) ) { - return; - } - - foreach ( $this->settings as $key => $setting ) { - - $class = isset( $setting['class'] ) ? $setting['class'] : ''; - $value = isset( $instance[ $key ] ) ? $instance[ $key ] : $setting['std']; - $field_id = $this->get_field_id( $key ); - $field_name = $this->get_field_name( $key ); - - switch ( $setting['type'] ) { - - case 'text' : - ?> -

- - -

- -

- - -

- -

- - -

- -

- - - - - -

- -

- /> - -

- $this->widget_cssclass, + 'description' => $this->widget_description, + 'customize_selective_refresh' => true, + ); + + parent::__construct( $this->widget_id, $this->widget_name, $widget_ops ); + + add_action( 'save_post', array( $this, 'flush_widget_cache' ) ); + add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) ); + add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) ); + } + + /** + * Get cached widget. + * + * @param array $args + * @return bool true if the widget is cached otherwise false + */ + public function get_cached_widget( $args ) { + + $cache = wp_cache_get( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), 'widget' ); + + if ( ! is_array( $cache ) ) { + $cache = array(); + } + + if ( isset( $cache[ $args['widget_id'] ] ) ) { + echo esc_html( $cache[ $args['widget_id'] ] ); + return true; + } + + return false; + } + + /** + * Cache the widget. + * + * @param array $args + * @param string $content + * @return string the content that was cached + */ + public function cache_widget( $args, $content ) { + wp_cache_set( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), array( $args['widget_id'] => $content ), 'widget' ); + + return $content; + } + + /** + * Flush the cache. + */ + public function flush_widget_cache() { + wp_cache_delete( apply_filters( 'wpm_cached_widget_id', $this->widget_id ), 'widget' ); + } + + /** + * Output the html at the start of a widget. + * + * @param array $args + * @param $instance + */ + public function widget_start( $args, $instance ) { + echo wp_kses( $args['before_widget'], wp_kses_allowed_html('post') ); + + if ( $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ) ) { + echo wp_kses( $args['before_title'], wp_kses_allowed_html('post') ) . esc_html( $title ) . wp_kses( $args['after_title'], wp_kses_allowed_html('post') ); + } + } + + /** + * Output the html at the end of a widget. + * + * @param array $args + */ + public function widget_end( $args ) { + echo wp_kses( $args['after_widget'], wp_kses_allowed_html('post') ); + } + + /** + * Updates a particular instance of a widget. + * + * @see WP_Widget->update + * @param array $new_instance + * @param array $old_instance + * @return array + */ + public function update( $new_instance, $old_instance ) { + + $instance = $old_instance; + + if ( empty( $this->settings ) ) { + return $instance; + } + + // Loop settings and get values to save. + foreach ( $this->settings as $key => $setting ) { + if ( ! isset( $setting['type'] ) ) { + continue; + } + + // Format the value based on settings type. + switch ( $setting['type'] ) { + case 'number' : + $instance[ $key ] = absint( $new_instance[ $key ] ); + + if ( isset( $setting['min'] ) && '' !== $setting['min'] ) { + $instance[ $key ] = max( $instance[ $key ], $setting['min'] ); + } + + if ( isset( $setting['max'] ) && '' !== $setting['max'] ) { + $instance[ $key ] = min( $instance[ $key ], $setting['max'] ); + } + break; + case 'textarea' : + $instance[ $key ] = wp_kses( trim( wp_unslash( $new_instance[ $key ] ) ), wp_kses_allowed_html( 'post' ) ); + break; + case 'checkbox' : + $instance[ $key ] = empty( $new_instance[ $key ] ) ? 0 : 1; + break; + default: + $instance[ $key ] = sanitize_text_field( $new_instance[ $key ] ); + break; + } + + /** + * Sanitize the value of a setting. + */ + $instance[ $key ] = apply_filters( 'wpm_widget_settings_sanitize_option', $instance[ $key ], $new_instance, $key, $setting ); + } + + $this->flush_widget_cache(); + + return $instance; + } + + /** + * Outputs the settings update form. + * + * @see WP_Widget->form + * @param array $instance + * + * @return null|string + */ + public function form( $instance ) { + + if ( empty( $this->settings ) ) { + return; + } + + foreach ( $this->settings as $key => $setting ) { + + $class = isset( $setting['class'] ) ? $setting['class'] : ''; + $value = isset( $instance[ $key ] ) ? $instance[ $key ] : $setting['std']; + $field_id = $this->get_field_id( $key ); + $field_name = $this->get_field_name( $key ); + + switch ( $setting['type'] ) { + + case 'text' : + ?> +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + + + + +

+ +

+ /> + +

+ id : ''; - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - // Register scripts - wp_register_script( 'select2', wpm_asset_path( 'scripts/select2.4.0.5.min.js' ), array( 'jquery' ), '4.0.5', true ); - wp_register_script( 'wpm_languages', wpm_asset_path( 'scripts/languages' . $suffix . '.js' ), array( - 'wp-util', - 'jquery-ui-sortable', - 'select2', - ), WPM_VERSION, true ); - - wp_register_script( 'wpm_language_switcher', wpm_asset_path( 'scripts/language-switcher' . $suffix . '.js' ), array( 'wp-util' ), WPM_VERSION, true ); - wp_register_script( 'wpm_language_switcher_customizer', wpm_asset_path( 'scripts/customizer' . $suffix . '.js' ), array( 'wp-util' ), WPM_VERSION, true ); - wp_register_script( 'wpm_translator', wpm_asset_path( 'scripts/translator' . $suffix . '.js' ), array(), WPM_VERSION, true ); - - $translator_params = array( - 'languages' => array_keys( wpm_get_languages() ), - 'default_language' => wpm_get_default_language(), - 'language' => wpm_get_language(), - 'show_untranslated_strings' => get_option( 'wpm_show_untranslated_strings', 'yes' ), - ); - wp_localize_script( 'wpm_translator', 'wpm_translator_params', $translator_params ); - wp_register_script( 'wpm_additional_settings', wpm_asset_path( 'scripts/additional-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_register_script( 'wpm_support_settings', wpm_asset_path( 'scripts/support-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_register_script( 'wpm_premium_settings', wpm_asset_path( 'scripts/premium-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_register_script( 'wpm_reset_settings', wpm_asset_path( 'scripts/reset-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - - $script = " - (function( $ ) { - $(function () { - $(document).ready(function(){ - $('form').each(function(){ - var form = $(this); - var input = $(''); - if (form.find('input#lang').length === 0) { - form.append(input); - } - }); - }); - }); - })( jQuery ); - "; - - wp_add_inline_script( 'wpm_language_switcher', $script ); - wp_add_inline_script( 'wpm_language_switcher_customizer', $script ); - - if ( null === $screen ) { - return; - } - - if ( 'customize' === $screen_id ) { - - $languages = wpm_get_languages(); - if ( count( $languages ) > 1 ) { - wp_enqueue_script( 'wpm_language_switcher_customizer' ); - add_action( 'admin_print_footer_scripts', 'wpm_admin_language_switcher_customizer' ); - } - } - - $show_switcher = false; - - if ( ( ( $screen_id === $screen->post_type ) || ( 'edit-' . $screen->post_type === $screen_id ) ) && $screen->post_type && null !== wpm_get_post_config( $screen->post_type ) ) { - $show_switcher = true; - } - - if ( ( 'edit-' . $screen->taxonomy === $screen_id ) && $screen->taxonomy && null !== wpm_get_taxonomy_config( $screen->taxonomy ) ) { - $show_switcher = true; - } - - $config = wpm_get_config(); - $admin_pages_config = (array) apply_filters( 'wpm_admin_pages', $config['admin_pages'] ); - - if ( in_array( $screen_id, $admin_pages_config, true ) ) { - $show_switcher = true; - } - - if ( $show_switcher ) { - $this->set_language_switcher(); - - $admin_html_tags = apply_filters( 'wpm_admin_html_tags', $config['admin_html_tags'] ); - - if ( ! empty( $admin_html_tags[ $screen_id ] ) ) { - wp_enqueue_script( 'wpm_translator' ); - $js_code = ''; - foreach ( ( array ) $admin_html_tags[ $screen_id ] as $attr => $selector ) { - $js_code .= '$( "' . implode( ', ', $selector ) . '" ).each( function () {'; - if ( 'text' === $attr ) { - $js_code .= '$(this).text(wpm_translator.translate_string($(this).text()));'; - } elseif ( 'value' === $attr ) { - $js_code .= '$(this).val(wpm_translator.translate_string($(this).val()));'; - } else { - $js_code .= '$(this).attr("' . $attr . '", wpm_translator.translate_string($(this).attr("' . $attr . '")));'; - } - $js_code .= '} );'; - } - wpm_enqueue_js( $js_code ); - } - } - - if ( 'options-general' === $screen_id ) { - wpm_enqueue_js( "$('#WPLANG').parents('tr').hide();" ); - } - } - - /** - * Display language switcher for edit posts, taxonomies, options - */ - public function set_language_switcher() { - - $languages = wpm_get_languages(); - if ( count( $languages ) <= 1 ) { - return; - } - - wp_enqueue_script( 'wpm_language_switcher' ); - - add_action( 'admin_head', static function () { - ?> - - id : ''; - - if ( null === $screen || ! $screen->post_type || ( $screen_id !== $screen->post_type ) || null === wpm_get_post_config( $screen->post_type ) || ( function_exists( 'use_block_editor_for_post_type' ) && ! use_block_editor_for_post_type( $screen->post_type ) ) ) { - return; - } - - if ( count( wpm_get_languages() ) <= 1 ) { - return; - } - - $script = $this->render_language_switcher(500); - - wp_add_inline_script( 'wp-edit-post', $script ); - add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); - } - - /** - * Add language switcher - * @since 2.4.9 - * */ - public function add_language_switcher_block_theme(){ - $screen = get_current_screen(); - if(is_object($screen) && !empty($screen)){ - $screen_id = $screen ? $screen->id : ''; - $block_editor = $screen ? $screen->is_block_editor : ''; - if ( $screen_id == 'site-editor' && $block_editor == 1){ - if ( count( wpm_get_languages() ) <= 1 ) { - return; - } - - $script = $this->render_language_switcher(4000); - - wp_add_inline_script( 'wp-edit-site', $script ); - add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); - } - } - } - - /** - * Display language switcher on theme site editor - * @since 2.4.9 - * */ - public function render_language_switcher($interval = 2000){ - $script = " - (function( $ ) { - - var wpm_site_editor_lang_switcher_deferred = ''; - - $(window).on('pageshow',function(){ - if ($('#wpm-language-switcher').length === 0) { - var language_switcher = wp.template( 'wpm-ls-customizer' ); - - var wpm_add_language_switcher_deferred = function() { - var toolbar = $('.edit-post-header-toolbar'); - if(toolbar.length) { - toolbar.prepend(language_switcher); - - wpm_change_switcher_margin(); - } - } - window.setTimeout(wpm_add_language_switcher_deferred, ".esc_js( $interval )."); - - wpm_site_editor_lang_switcher_deferred = function() { - var SiteToolBar = $('.edit-site-layout__header-container .edit-site-site-hub__site-view-link'); - - if(SiteToolBar.length) { - SiteToolBar.before(language_switcher); - - $('.edit-site-layout__header-container .wpm-language-switcher').css({'left': '67%'}); - } - } - - window.setTimeout(wpm_site_editor_lang_switcher_deferred, 5000); - } - }); - - $(document).on('click', '.components-menu-item__button', function(e){ - let firstChild = $(this).find('.components-menu-item__info-wrapper'); - if(firstChild.length > 0){ - let secondChild = firstChild.find('.components-menu-item__item'); - if(secondChild.length > 0){ - if(secondChild.text() == 'Fullscreen mode'){ - wpm_change_switcher_margin(); - } - } - } - }); - - function wpm_change_switcher_margin(){ - if($('body').hasClass('is-fullscreen-mode')){ - $('.wpm-language-switcher').css({'margin-left': '75px'}); - }else{ - $('.wpm-language-switcher').css({'margin-left': '10px'}); - } - } - - $(document).on('click', '#wpm-language-switcher .lang-dropdown a', function(){ - var lang = $(this).data('lang'); - var url = document.location.origin + document.location.pathname; - var query = document.location.search; - var href = ''; - if (query.search(/edit_lang=/i) !== -1) { - href = url + query.replace(/edit_lang=[a-z]{2,4}((-[a-z]{2,4})?)*/i, 'edit_lang=' + lang) + document.location.hash; - } else { - if(query.indexOf('?')==-1){ - query = '?'; - } - - href = url + query + '&edit_lang=' + lang + document.location.hash; - } - $(this).attr('href', href); - }); - - $(document).on('click', '.edit-site-sidebar-button', function(e){ - if ($('#wpm-language-switcher').length === 0) { - var language_switcher = wp.template( 'wpm-ls-customizer' ); - var toolbar = $('.edit-post-header-toolbar'); - if(toolbar.length) { - toolbar.prepend(language_switcher); - - wpm_change_switcher_margin(); - } - } - }); - - - var wpm_site_editor_on_canvas_click = function() { - if($('.edit-site-visual-editor__editor-canvas').length > 0 ){ - var iframe = $('.edit-site-visual-editor__editor-canvas')[0]; - var iframeBody = $(iframe.contentWindow.document.body); - - iframeBody.on('click', function() { - if($('.edit-site-visual-editor').length > 0){ - if($('.edit-site-visual-editor').hasClass('is-view-mode')){ - $('.wpm-language-switcher').css({'left': '75px'}); - } - } - }); - } - - $(document).on('click', '.edit-site-site-hub__view-mode-toggle-container', function(e){ - if($('.wpm-language-switcher').length > 0){ - $('.wpm-language-switcher').css({'left': '67%'}); - - $('.edit-site-layout__header-container .wpm-language-switcher').remove(); - - window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); - - }else{ - window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); - } - }); - } - - window.setTimeout(wpm_site_editor_on_canvas_click , 5000); - - $(window).on('popstate', function(event) { - if($('.edit-site-layout').length > 0){ - if($('.wpm-language-switcher').length > 0){ - $('.wpm-language-switcher').css({'left': '67%'}); - - $('.edit-site-layout__header-container .wpm-language-switcher').remove(); - - window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); - }else{ - window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); - } - } - }); - - })( jQuery ); - "; - return $script; - } -} +id : ''; + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + // Register scripts + wp_register_script( 'select2', wpm_asset_path( 'scripts/select2.4.0.5.min.js' ), array( 'jquery' ), '4.0.5', true ); + wp_register_script( 'wpm_languages', wpm_asset_path( 'scripts/languages' . $suffix . '.js' ), array( + 'wp-util', + 'jquery-ui-sortable', + 'select2', + ), WPM_VERSION, true ); + + wp_register_script( 'wpm_language_switcher', wpm_asset_path( 'scripts/language-switcher' . $suffix . '.js' ), array( 'wp-util' ), WPM_VERSION, true ); + wp_register_script( 'wpm_language_switcher_customizer', wpm_asset_path( 'scripts/customizer' . $suffix . '.js' ), array( 'wp-util' ), WPM_VERSION, true ); + wp_register_script( 'wpm_translator', wpm_asset_path( 'scripts/translator' . $suffix . '.js' ), array(), WPM_VERSION, true ); + + $translator_params = array( + 'languages' => array_keys( wpm_get_languages() ), + 'default_language' => wpm_get_default_language(), + 'language' => wpm_get_language(), + 'show_untranslated_strings' => get_option( 'wpm_show_untranslated_strings', 'yes' ), + ); + wp_localize_script( 'wpm_translator', 'wpm_translator_params', $translator_params ); + wp_register_script( 'wpm_additional_settings', wpm_asset_path( 'scripts/additional-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_register_script( 'wpm_support_settings', wpm_asset_path( 'scripts/support-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_register_script( 'wpm_premium_settings', wpm_asset_path( 'scripts/premium-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_register_script( 'wpm_reset_settings', wpm_asset_path( 'scripts/reset-settings' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + + $script = " + (function( $ ) { + $(function () { + $(document).ready(function(){ + $('form').each(function(){ + var form = $(this); + var input = $(''); + if (form.find('input#lang').length === 0) { + form.append(input); + } + }); + }); + }); + })( jQuery ); + "; + + wp_add_inline_script( 'wpm_language_switcher', $script ); + wp_add_inline_script( 'wpm_language_switcher_customizer', $script ); + + if ( null === $screen ) { + return; + } + + if ( 'customize' === $screen_id ) { + + $languages = wpm_get_languages(); + if ( count( $languages ) > 1 ) { + wp_enqueue_script( 'wpm_language_switcher_customizer' ); + add_action( 'admin_print_footer_scripts', 'wpm_admin_language_switcher_customizer' ); + } + } + + $show_switcher = false; + + if ( ( ( $screen_id === $screen->post_type ) || ( 'edit-' . $screen->post_type === $screen_id ) ) && $screen->post_type && null !== wpm_get_post_config( $screen->post_type ) ) { + $show_switcher = true; + } + + if ( ( 'edit-' . $screen->taxonomy === $screen_id ) && $screen->taxonomy && null !== wpm_get_taxonomy_config( $screen->taxonomy ) ) { + $show_switcher = true; + } + + if ( 'edit-comments' === $screen_id ) { + $show_switcher = true; + } + + $config = wpm_get_config(); + $admin_pages_config = (array) apply_filters( 'wpm_admin_pages', $config['admin_pages'] ); + + if ( in_array( $screen_id, $admin_pages_config, true ) ) { + $show_switcher = true; + } + + if ( $show_switcher ) { + $this->set_language_switcher(); + + $admin_html_tags = apply_filters( 'wpm_admin_html_tags', $config['admin_html_tags'] ); + + if ( ! empty( $admin_html_tags[ $screen_id ] ) ) { + wp_enqueue_script( 'wpm_translator' ); + $js_code = ''; + foreach ( ( array ) $admin_html_tags[ $screen_id ] as $attr => $selector ) { + $js_code .= '$( "' . implode( ', ', $selector ) . '" ).each( function () {'; + if ( 'text' === $attr ) { + $js_code .= '$(this).text(wpm_translator.translate_string($(this).text()));'; + } elseif ( 'value' === $attr ) { + $js_code .= '$(this).val(wpm_translator.translate_string($(this).val()));'; + } else { + $js_code .= '$(this).attr("' . $attr . '", wpm_translator.translate_string($(this).attr("' . $attr . '")));'; + } + $js_code .= '} );'; + } + wpm_enqueue_js( $js_code ); + } + } + + if ( 'options-general' === $screen_id ) { + wpm_enqueue_js( "$('#WPLANG').parents('tr').hide();" ); + } + } + + /** + * Display language switcher for edit posts, taxonomies, options + */ + public function set_language_switcher() { + + $languages = wpm_get_languages(); + if ( count( $languages ) <= 1 ) { + return; + } + + wp_enqueue_script( 'wpm_language_switcher' ); + + add_action( 'admin_head', static function () { + ?> + + id : ''; + + if ( null === $screen || ! $screen->post_type || ( $screen_id !== $screen->post_type ) || null === wpm_get_post_config( $screen->post_type ) || ( function_exists( 'use_block_editor_for_post_type' ) && ! use_block_editor_for_post_type( $screen->post_type ) ) ) { + return; + } + + if ( count( wpm_get_languages() ) <= 1 ) { + return; + } + + $script = $this->render_language_switcher(500); + + wp_add_inline_script( 'wp-edit-post', $script ); + add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); + } + + /** + * Add language switcher + * @since 2.4.9 + * */ + public function add_language_switcher_block_theme(){ + $screen = get_current_screen(); + if(is_object($screen) && !empty($screen)){ + $screen_id = $screen ? $screen->id : ''; + $block_editor = $screen ? $screen->is_block_editor : ''; + if ( $screen_id == 'site-editor' && $block_editor == 1){ + if ( count( wpm_get_languages() ) <= 1 ) { + return; + } + + $script = $this->render_language_switcher(4000); + + wp_add_inline_script( 'wp-edit-site', $script ); + add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); + } + } + } + + /** + * Display language switcher on theme site editor + * @since 2.4.9 + * */ + public function render_language_switcher($interval = 2000){ + global $wp_version; + $current_wp_version = isset( $wp_version ) ? $wp_version : ( function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '0' ); + + $script = " + (function( $ ) { + + var wpm_site_editor_lang_switcher_deferred = ''; + + $(window).on('pageshow',function(){ + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template( 'wpm-ls-customizer' ); + + var wpm_add_language_switcher_deferred = function() { + var toolbar = $('.edit-post-header-toolbar'); + if(toolbar.length) { + toolbar.prepend(language_switcher); + + wpm_change_switcher_margin(); + } + } + window.setTimeout(wpm_add_language_switcher_deferred, ".esc_js( $interval )."); + + wpm_site_editor_lang_switcher_deferred = function() { + var SiteToolBar = $('.edit-site-site-hub .edit-site-site-hub__title'); + + if(SiteToolBar.length) { + SiteToolBar.before(language_switcher); + } + } + + window.setTimeout(wpm_site_editor_lang_switcher_deferred, 5000); + } + }); + + $(document).on('click', '.components-menu-item__button', function(e){ + let firstChild = $(this).find('.components-menu-item__info-wrapper'); + if(firstChild.length > 0){ + let secondChild = firstChild.find('.components-menu-item__item'); + if(secondChild.length > 0){ + if(secondChild.text() == 'Fullscreen mode'){ + wpm_change_switcher_margin(); + } + } + } + }); + + function wpm_change_switcher_margin(){ + // Use the WordPress version (injected from PHP) to detect WP 7.1+. + // In WP 7.1 the + inserter became the first flex child at 0px inside the toolbar, + // overlapping the absolutely-positioned flag at left:10px. + // Fix: add padding-left to the toolbar so + shifts right of the flag. + var wpmWpVersion = parseFloat('".esc_js( $current_wp_version )."'); + if (wpmWpVersion >= 7.1) { + $('.wpm-language-switcher').css({'left': '3%'}); + } else { + // WP 7.0 and earlier — original behaviour, completely unchanged + if($('body').hasClass('is-fullscreen-mode')){ + $('.wpm-language-switcher').css({'margin-left': '75px'}); + }else{ + $('.wpm-language-switcher').css({'margin-left': '10px'}); + } + } + } + + $(document).on('click', '#wpm-language-switcher .lang-dropdown a', function(){ + var lang = $(this).data('lang'); + var url = document.location.origin + document.location.pathname; + var query = document.location.search; + var href = ''; + if(query.length == 0){ + href = url + '?edit_lang=' + lang + document.location.hash; + }else{ + href = url + query + '&edit_lang=' + lang + document.location.hash; + } + $(this).attr('href', href); + }); + + $(document).on('click', '.edit-site-sidebar-button', function(e){ + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template( 'wpm-ls-customizer' ); + var toolbar = $('.edit-post-header-toolbar'); + if(toolbar.length) { + toolbar.prepend(language_switcher); + + wpm_change_switcher_margin(); + } + } + }); + + + var wpm_site_editor_on_canvas_click = function() { + if($('.edit-site-visual-editor__editor-canvas').length > 0 ){ + var iframe = $('.edit-site-visual-editor__editor-canvas')[0]; + var iframeBody = $(iframe.contentWindow.document.body); + + iframeBody.on('click', function() { + if($('.edit-site-visual-editor').length > 0){ + if($('.edit-site-visual-editor').hasClass('is-view-mode')){ + $('.wpm-language-switcher').css({'left': '75px'}); + } + } + }); + } + + $(document).on('click', '.edit-site-site-hub__view-mode-toggle-container', function(e){ + if($('.wpm-language-switcher').length > 0){ + $('.wpm-language-switcher').css({'left': '67%'}); + + $('.edit-site-site-hub .wpm-language-switcher').remove(); + + window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); + + }else{ + window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); + } + }); + } + + window.setTimeout(wpm_site_editor_on_canvas_click , 5000); + + $(window).on('popstate', function(event) { + if($('.edit-site-layout').length > 0){ + if($('.wpm-language-switcher').length > 0){ + $('.wpm-language-switcher').css({'left': '67%'}); + + $('.edit-site-site-hub .wpm-language-switcher').remove(); + + window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); + }else{ + window.setTimeout(wpm_site_editor_lang_switcher_deferred, 500); + } + } + }); + + })( jQuery ); + "; + return $script; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-bulk-translate.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-bulk-translate.php new file mode 100644 index 000000000..be72ad1dd --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-bulk-translate.php @@ -0,0 +1,1748 @@ +current_screen) && + isset($this->current_screen->base) && + in_array($this->current_screen->base, ["edit", "upload"]) + ) { + $suffix = defined("SCRIPT_DEBUG") && SCRIPT_DEBUG ? "" : ".min"; + + wp_register_script( + "wpm-bulk-translate", + wpm_asset_path("scripts/wpm-bulk-translate" . $suffix . ".js"), + ["jquery"], + WPM_VERSION, + true + ); + + $translator_params = [ + "ajax_url" => admin_url("admin-ajax.php"), + "wpm_bulk_translate_security_nonce" => wp_create_nonce( + "wpm_bulk_translate_security_nonce" + ), + ]; + + wp_localize_script( + "wpm-bulk-translate", + "wpm_bulk_translate_params", + $translator_params + ); + + wp_enqueue_script("wpm-bulk-translate"); + + wp_enqueue_style( + "wpm-bulk-translate-style", + wpm_asset_path( + "styles/admin/wpm-bulk-translate" . $suffix . ".css" + ), + [], + WPM_VERSION + ); + } + } + + /** + * Initialize bulk action hooks + * $current_screen object + * @since 2.4.17 + * */ + public function init($current_screen) + { + $this->current_screen = $current_screen; + add_filter("bulk_actions-{$current_screen->id}", [$this, "add_action"]); + add_filter( + "handle_bulk_actions-{$current_screen->id}", + [$this, "handle_bulk_action"], + 10, + 2 + ); + add_action("admin_footer", [$this, "display_form"]); + add_action("admin_notices", [$this, "display_notices"]); + if ("edit" === $current_screen->base) { + add_filter("wp_redirect", [$this, "parse_request_before_redirect"]); + } + } + + /** + * Add translate action in dropdown + * @param $actions array + * @return $actions array + * @since 2.4.17 + * */ + public function add_action($actions) + { + $actions["wpm_translate_action"] = __("WPM Translate", "wp-multilang"); + return $actions; + } + + /** + * Handle translate action + * @param $sendback string + * @param $action string + * @since 2.4.17 + * */ + public function handle_bulk_action($sendback, $action) + { + if ("wpm_translate_action" !== $action) { + return $sendback; + } + + check_admin_referer("wpm_bulk_translate", "_wpm_bulk_translate_nonce"); + + $query_args = $this->parse_bulk_request($_GET); // Errors returned by this method are already handled by `parse_request_before_redirect()`. + if (!is_wp_error($query_args)) { + $error = $this->perform_bulk_action( + $query_args["item_ids"], + $query_args["wpm_bt_file_format"] + ); + + if ( ! empty( $error ) ) { + $this->add_settings_error($error); + } + } + + return $sendback; + } + + /** + * Render bulk action form + * @since 2.4.17 + * */ + public function display_form() + { + if ( + is_object($this->current_screen) && + !empty($this->current_screen->id) && + in_array($this->current_screen->id, $this->screens_array) + ) { + require_once __DIR__ . + "/views/bulk-translate/template-bulk-translate.php"; + } + } + + /** + * Parse the bulk translate request + * @since 2.4.17 + * */ + public function parse_bulk_request($request) + { + $args = []; + + $screens_content_keys = [ + "upload" => "media", + "edit" => "post", + ]; + + if ( + !empty($this->current_screen) && + isset($screens_content_keys[$this->current_screen->base]) + ) { + $item_key = $screens_content_keys[$this->current_screen->base]; + + if (isset($request[$item_key]) && is_array($request[$item_key])) { + $args["item_ids"] = array_filter( + array_map("absint", $request[$item_key]) + ); + } + } + + if (empty($args["item_ids"])) { + return new \WP_Error( + "wpm_no_items_selected", + esc_html__( + "No item has been selected. Please make sure to select at least one item to be translated.", + "wp-multilang" + ) + ); + } + + $args["wpm_bt_file_format"] = sanitize_key( + $request["wpm_bt_file_format"] + ); + + return $args; + } + + /** + * Handle the errors if no post is selected + * @since 2.4.17 + * */ + public function parse_request_before_redirect($sendback) + { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- As this is nonce so sanitization not required + if ( !isset($_GET["action"], $_REQUEST["_wpm_bulk_translate_nonce"]) || "wpm_translate_action" !== $_GET["action"] || !wp_verify_nonce( $_REQUEST["_wpm_bulk_translate_nonce"], "wpm_bulk_translate" + ) + ) { + return $sendback; + } + + $error = $this->parse_bulk_request($_GET); + + if (is_wp_error($error)) { + $this->add_settings_error($error); + } + + return $sendback; + } + + /** + * Add errors to transient + * @param $error WP_Error + * @since 2.4.17 + * */ + private function add_settings_error(\WP_Error $error) + { + if (!$error->has_errors()) { + return; + } + + $this->add_errors($error); + + set_transient( + "wpm_bulk_translate_errors_" . get_current_user_id(), + get_settings_errors("wpm_bulk_errors") + ); + } + + /** + * Add new settings error + * @param $error WP_Error + * @since 2.4.17 + * */ + public function add_errors($error) + { + if (!$error->has_errors()) { + return; + } + + foreach ($error->get_error_codes() as $error_code) { + // Extract the "error" type. + $data = $error->get_error_data($error_code); + $type = empty($data) || !is_string($data) ? "error" : $data; + + $message = wp_kses( + implode("
", $error->get_error_messages($error_code)), + [ + "a" => ["href"], + "br" => [], + "code" => [], + "em" => [], + ] + ); + + add_settings_error("wpm_bulk_errors", $error_code, $message, $type); + } + } + + /** + * Display bulk translate error + * @since 2.4.17 + * */ + public function display_notices() + { + $transient_name = "wpm_bulk_translate_errors_" . get_current_user_id(); + + /** @var string[][] */ + $notices = get_transient($transient_name); + + if (empty($notices)) { + return; + } + + foreach ($notices as $notice) { + /* + * Unpacking operator `...` supports string-keyed associative array only since PHP 8.0.0. + */ + add_settings_error(...array_values($notice)); + } + + settings_errors("wpm_bulk_errors"); + delete_transient($transient_name); + } + + /** + * Perform bulk export action + * @param $post_ids array + * @param $file_type string + * @since 2.4.17 + * */ + public function perform_bulk_action($post_ids, $file_type) + { + check_admin_referer("wpm_bulk_translate", "_wpm_bulk_translate_nonce"); + + $default_lang = wpm_get_default_language(); + $current_lang = wpm_get_language(); + $languages = wpm_get_languages(); + + if ($default_lang == $current_lang) { + return new \WP_Error( + "invalid-target-languages", + __( + "Error: Source and destination languages cannot be same.", + "wp-multilang" + ) + ); + } + + $explode_file_type = explode("_", $file_type); + $extension = ""; + $version = ""; + if (isset($explode_file_type[0])) { + $extension = $explode_file_type[0]; + } + if (isset($explode_file_type[1])) { + $version = str_replace("-", "", $explode_file_type[1]); + } + + $posts = get_posts([ + "post__in" => $post_ids, + "post_type" => [ 'post', 'page', 'product' ], // Include both posts and pages + "posts_per_page" => count($post_ids), + "orderby" => "post__in", + "ignore_sticky_posts" => true, + "update_post_meta_cache" => false, + "update_post_term_cache" => false, + "post_status" => "any", + ]); + + if (!empty($posts) && is_array($posts)) { + $xliff_content = ""; + + // foreach ($posts as $post) { + + switch ($version) { + case "20": + $xliff_content = $this->generate_xliff_20( + $posts, + $languages, + $default_lang, + $current_lang + ); + + break; + + case "21": + $xliff_content = $this->generate_xliff_21( + $posts, + $languages, + $default_lang, + $current_lang + ); + + break; + + default: + // 1.2 + + $xliff_content = $this->generate_xliff_12( + $posts, + $languages, + $default_lang, + $current_lang + ); + + break; + + // } + } + + // Code to download single file + + $source_lang = $languages[$default_lang]["locale"]; + $target_lang = $languages[$current_lang]["locale"]; + $file_name = + $source_lang . + "_" . + $target_lang . + "_" . + gmdate("Y-m-d_H-i-s") . + ".xliff"; + + header("Content-Type: application/xml"); + header( + 'Content-Disposition: attachment; filename="' . $file_name . '"' + ); + header("Content-Length: " . strlen($xliff_content)); + + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Reason: escaping is already done above. + echo $xliff_content; + + exit(); + } + } + + /** + * Format data to use in xliff file format creation + * @param $post WP_Post + * @param $languages array + * @param $default_lang string + * @param $current_lang string + * @since 2.4.17 + * */ + public function format_xliff_data( + $posts, + $languages, + $default_lang, + $current_lang + ) { + $data = []; + + foreach ($posts as $key => $post) { + $data[$key]["id"] = $post->ID; + $data[$key]["post_type"] = $post->post_type; + $data[$key]["source_lang"] = str_replace( + "_", + "-", + $languages[$default_lang]["locale"] + ); + $data[$key]["target_lang"] = str_replace( + "_", + "-", + $languages[$current_lang]["locale"] + ); + $data[$key]["original"] = + "WP Multilang |" . WPM_VERSION . "|" . get_home_url(); + + $source_post_title = wpm_translate_string( + $post->post_title, + $default_lang + ); + $target_post_title = ""; + if (strpos($post->post_title, "[:]") !== false) { + $target_post_title = wpm_translate_string( + $post->post_title, + $current_lang + ); + if (!empty($target_post_title)) { + $target_post_title = ""; + } + } + + $data[$key]["source_post_title"] = $source_post_title; + $data[$key]["target_post_title"] = $target_post_title; + + $source_content = wpm_translate_string( + $post->post_content, + $default_lang + ); + $target_content = ""; + if (strpos($post->post_content, "[:]") !== false) { + $target_content = wpm_translate_string( + $post->post_content, + $current_lang + ); + if (!empty($target_content)) { + $target_content = ""; + } + } else { + } + $data[$key]["source_content"] = $source_content; + $data[$key]["target_content"] = $target_content; + + $terms = []; + $post_terms = wp_get_post_categories($post->ID); + if (!empty($post_terms) && is_array($post_terms)) { + foreach ($post_terms as $post_term) { + $term = get_term($post_term); + if (is_object($term) && isset($term->term_id)) { + $terms[] = [ + "term_id" => $term->term_id, + "name" => $term->name, + ]; + } + } + } + $data[$key]["terms"] = $terms; + + // Add postmeta fields if filter is used + $postmeta_keys = apply_filters("wpm_xliff_postmeta_keys", [], $post); + if (!empty($postmeta_keys) && is_array($postmeta_keys)) { + global $wpdb; + $data[$key]["postmeta"] = []; + + foreach ($postmeta_keys as $meta_key) { + // Special handling for Oxygen Builder's _ct_builder_json + $is_oxygen_meta = false; + $translate_key = $meta_key . '_translate'; + $original_value = 0; + + if ( $meta_key === '_ct_builder_json' || $meta_key === '_ct_builder_shortcodes' ) { + // Check if Oxygen Builder is active + $is_oxygen_active = false; + if ( class_exists( 'CT_Component' ) || defined( 'CT_VERSION' ) ) { + $is_oxygen_active = true; + } else { + if ( ! function_exists( 'is_plugin_active' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + $is_oxygen_active = is_plugin_active( 'oxygen/functions.php' ); + } + + if ( $is_oxygen_active ) { + $is_oxygen_meta = true; + // Read from _translate version for Oxygen Builder + $result = $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", + $post->ID, + $translate_key + ), + ARRAY_A + ); + + // If Translate version is not available take default + if ( empty( $result ) ) { + $result = $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", + $post->ID, + $meta_key + ), + ARRAY_A + ); + $original_value = 1; + } + } + } + + // If not Oxygen meta or Oxygen not active, use normal logic + if ( ! $is_oxygen_meta ) { + $result = $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", + $post->ID, + $meta_key + ), + ARRAY_A + ); + } + + if ( + is_array($result) && + !empty($result[0]) && + is_array($result[0]) && + !empty($result[0]["meta_value"]) && + is_string($result[0]["meta_value"]) + ) { + $meta_array = []; + $meta_array["key"] = $meta_key; + + if ( $is_oxygen_meta ) { + // For Oxygen Builder, extract and base64 decode the values + $translate_value = $result[0]["meta_value"]; + $source_value = ''; + if ( $original_value == 1 ) { + $clean_json = $translate_value; + $clean_json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $clean_json); + $source_value = $clean_json; + }else{ + // Get source value (base64 decoded) + $source_encoded = wpm_translate_string( $translate_value, $default_lang ); + $source_value = base64_decode( $source_encoded, true ); + if ( false === $source_value ) { + $source_value = $source_encoded; + } + } + + // For builder data render + if ( $meta_key === '_ct_builder_json' ) { + $json_array = json_decode( $source_value, true ); + + if ( json_last_error() === JSON_ERROR_NONE ) { + $texts = []; + $this->extract_oxygen_texts( $json_array, $texts ); + + if ( ! empty( $texts ) ) { + foreach ( $texts as $text_item ) { + + $data[$key]["postmeta"][] = [ + "key" => $meta_key . "::" . $text_item['id'], + "source_value" => $text_item['text'], + "target_value" => "", + ]; + } + } + + } + } + + // For shortcode data render + if ( $meta_key === '_ct_builder_shortcodes' ) { + + $texts = $this->extract_oxygen_shortcodes_texts( $source_value ); + + if ( ! empty( $texts ) ) { + + foreach ( $texts as $index => $item ) { + + $data[$key]["postmeta"][] = [ + "key" => $meta_key . "::" . $item['id'], + "source_value" => $item['text'], + "target_value" => "" + ]; + } + } + + } + + + // Get target value (base64 decoded) + $target_encoded = wpm_translate_string( $translate_value, $current_lang ); + $target_value = base64_decode( $target_encoded, true ); + if ( false === $target_value ) { + $target_value = $target_encoded; + } + $meta_array["target_value"] = ""; + if ($meta_array["source_value"] !== $target_value) { + $meta_array["target_value"] = $target_value; + } + } else { + // Normal postmeta handling + $meta_array["source_value"] = wpm_translate_string( + $result[0]["meta_value"], + $default_lang + ); + $target_value = wpm_translate_string( + $result[0]["meta_value"], + $current_lang + ); + $meta_array["target_value"] = ""; + if ($meta_array["source_value"] !== $target_value) { + $meta_array["target_value"] = $target_value; + } + } + + $data[$key]["postmeta"][] = $meta_array; + } + } + } + } + + $data = apply_filters("wpm_filter_xliff_data", $data, $post); + return $data; + } + + /** + * Generate translation file version 1.2 + * @param $post WP_Post + * @param $languages array + * @param $default_lang string + * @param $current_lang string + * @since 2.4.17 + * */ + public function generate_xliff_12( + $posts, + $languages, + $default_lang, + $current_lang + ) { + $original = get_home_url(); + $product_version = WPM_VERSION; + $unit_id = 1; + + $formatted_data = $this->format_xliff_data( + $posts, + $languages, + $default_lang, + $current_lang + ); + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template = << + + + +XLIFF; + + foreach ($formatted_data as $key => $data) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + {$data["target_post_title"]} + + +XLIFF; + + $unit_id++; + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + {$data["target_content"]} + +XLIFF; + $unit_id++; + + if ( is_array( $data['acf'] ) && ! empty( $data['acf'] ) ) { + foreach ( $data['acf'] as $acf ) { + if ( is_array( $acf ) && ! empty( $acf['source_value'] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + +XLIFF; + $unit_id++; + } + } + } + + if ( is_array( $data['postmeta'] ) && ! empty( $data['postmeta'] ) ) { + foreach ( $data['postmeta'] as $postmeta ) { + if ( is_array( $postmeta ) && ! empty( $postmeta['source_value'] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + +XLIFF; + $unit_id++; + } + } + } + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << +XLIFF; + + } + + foreach ($formatted_data as $key => $data) { + if (!empty($data["terms"])) { + foreach ($data["terms"] as $tkey => $term) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + + + +XLIFF; + + $unit_id++; + } + } + } + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + +XLIFF; + + return $xliff_template; + } + + /** + * Generate translation file version 20 + * @param $post WP_Post + * @param $languages array + * @param $default_lang string + * @param $current_lang string + * @since 2.4.17 + * */ + public function generate_xliff_20( + $posts, + $languages, + $default_lang, + $current_lang + ) { + $formatted_data = $this->format_xliff_data( + $posts, + $languages, + $default_lang, + $current_lang + ); + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template = << + + +XLIFF; + + $xliff_template .= $this->render_xliff_groups($formatted_data); + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + +XLIFF; + + return $xliff_template; + } + + /** + * Generate translation file version 21 + * @param $post WP_Post + * @param $languages array + * @param $default_lang string + * @param $current_lang string + * @since 2.4.17 + * */ + public function generate_xliff_21( + $posts, + $languages, + $default_lang, + $current_lang + ) { + $formatted_data = $this->format_xliff_data( + $posts, + $languages, + $default_lang, + $current_lang + ); + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template = << + + +XLIFF; + + $xliff_template .= $this->render_xliff_groups($formatted_data); + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + +XLIFF; + + return $xliff_template; + } + + /** + * Prepare xliff group content + * @param $formatted_data array + * @return $xliff_template string + * @since 2.4.17 + * */ + public function render_xliff_groups($formatted_data) + { + $group_id = 1; + $unit_id = 1; + $xliff_template = ""; + + foreach ($formatted_data as $key => $data) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << +XLIFF; + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + {$data["target_post_title"]} + + +XLIFF; + + $unit_id++; + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + {$data["target_content"]} + + +XLIFF; + + $unit_id++; + + if ( is_array( $data['acf'] ) && isset( $data['acf'] ) ) { + foreach ( $data['acf'] as $acf ) { + if ( is_array( $acf ) && ! empty( $acf['source_value'] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + + + +XLIFF; + $unit_id++; + } + } + } + + if ( is_array( $data['postmeta'] ) && ! empty( $data['postmeta'] ) ) { + foreach ( $data['postmeta'] as $postmeta ) { + if ( is_array( $postmeta ) && ! empty( $postmeta['source_value'] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + + + +XLIFF; + $unit_id++; + } + } + } + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << +XLIFF; + + $group_id++; + } + + foreach ($formatted_data as $key => $data) { + if (!empty($data["terms"])) { + foreach ($data["terms"] as $tkey => $term) { + // phpcs:ignore PluginCheck.CodeAnalysis.Heredoc.NotAllowed -- It's a XLIFF file generator + $xliff_template .= << + + + + + + + +XLIFF; + $group_id++; + $unit_id++; + } + } + } + + return $xliff_template; + } + + /** + * Import translation from xliff file + * @param $value array + * @since 2.4.17 + * */ + public function render_import_translations($value) + { + ?> + + +

+ + +

+

"> + + + + +
+

+

+ + + add_settings_error($error); + } + return; + } + + if (isset($_POST["wpm_import_xliff_btn"])) { + $btn_text = sanitize_text_field( + wp_unslash($_POST["wpm_import_xliff_btn"]) + ); + if ($btn_text == "Import xliff data") { + if ( + !empty($_FILES["wpm_import_xliff_file"]) && + !empty($_FILES["wpm_import_xliff_file"]["tmp_name"]) + ) { + $file_name = isset( $_FILES["wpm_import_xliff_file"]["name"] ) ? $_FILES["wpm_import_xliff_file"]["name"] : ''; + $extension = pathinfo($file_name, PATHINFO_EXTENSION); + $filepath = sanitize_text_field( + $_FILES["wpm_import_xliff_file"]["tmp_name"] + ); + + if ($extension === "xliff") { + $error = $this->import_data_from_file($filepath); + if (is_wp_error($error)) { + $this->add_settings_error($error); + } + } + } + } + } + } + + /** + * Import data from xliff file + * @param $filepath string + * @since 2.4.17 + * */ + public function import_data_from_file($filepath) + { + global $wpdb; + $post_data = []; + $target_lang = ""; + $file_contents = file_get_contents($filepath); + if (false === $file_contents) { + return new \WP_Error( + "wpm_import_file_contents_error", + __( + "Something went wrong during the file import.", + "wp-multilang" + ) + ); + } + + libxml_use_internal_errors(true); + $dom = new \DOMDocument("1.0", "UTF-8"); + $isxml = $dom->loadHTML( + $file_contents, + LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD + ); + libxml_clear_errors(); + + if ($isxml) { + $dom->load($filepath); + $xliff_tag = $dom->getElementsByTagName("xliff"); + if (is_object($xliff_tag) && !empty($xliff_tag->length)) { + foreach ($xliff_tag as $xliff) { + $version = $xliff->getAttribute("version"); + $target_lang = $xliff->getAttribute("trgLang"); + $file_tags = $xliff->getElementsByTagName("file"); + + foreach ($file_tags as $file_tag) { + if (is_object($file_tag) && !empty($file_tag)) { + if (empty($target_lang)) { + $target_lang = $file_tag->getAttribute( + "target-language" + ); + } + + switch ($version) { + case "1.2": + $post_data = $this->xml_to_array_1_2( + $file_tag + ); + break; + + case "2.0": + case "2.1": + $post_data = $this->xml_to_array_2_1( + $file_tag + ); + break; + } + } + } + } + } + } + + if ( + is_array($post_data) && + !empty($post_data) && + !empty($target_lang) + ) { + $lang = explode("-", $target_lang)[0]; + $languages = wpm_get_languages(); + + if (array_key_exists($lang, $languages)) { + foreach ($post_data as $post_id => $post) { + $title = ""; + $content = ""; + $get_post = get_post($post_id); + if (!empty($post["post_title"])) { + $post_title = $get_post->post_title; + $title = wpm_set_new_value( + $post_title, + $post["post_title"], + [], + $lang + ); + } + if (!empty($post["post_content"])) { + $post_content = $get_post->post_content; + $content = wpm_set_new_value( + $post_content, + $post["post_content"], + [], + $lang + ); + } + + if (!empty($title) && !empty($content)) { + $update_data = [ + "ID" => $post_id, + "post_title" => $title, + "post_content" => $content, + ]; + + wp_update_post($update_data); + } else if (!empty($title)) { + $update_data = [ + "ID" => $post_id, + "post_title" => $title, + ]; + + wp_update_post($update_data); + }else if (!empty($content)) { + $update_data = [ + "ID" => $post_id, + "post_content" => $content, + ]; + + wp_update_post($update_data); + } + + if ( ! empty( $post["postmeta"] ) && is_array( $post["postmeta"] ) ) { + foreach ( $post["postmeta"] as $meta_key => $meta_value ) { + + // Special handling for Oxygen Builder's _ct_builder_json + if ( strpos( $meta_key, '_ct_builder_json::' ) === 0 || strpos( $meta_key, '_ct_builder_shortcodes::' ) === 0 ) { + $origin_meta_key = $meta_key; + if ( strpos( $meta_key, '_ct_builder_json::' ) === 0 ) { + $meta_key = '_ct_builder_json'; + } + + if ( strpos( $meta_key, '_ct_builder_shortcodes::' ) === 0 ) { + $meta_key = '_ct_builder_shortcodes'; + } + + // Check if Oxygen Builder is active + $is_oxygen_active = false; + if ( class_exists( 'CT_Component' ) || defined( 'CT_VERSION' ) ) { + $is_oxygen_active = true; + } else { + if ( ! function_exists( 'is_plugin_active' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + $is_oxygen_active = is_plugin_active( 'oxygen/functions.php' ); + } + + if ( $is_oxygen_active ) { + // For Oxygen Builder, update _ct_builder_json_translate instead + $translate_key = $meta_key . '_translate'; + $original_value = 0; + + $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $post_id, $translate_key ), ARRAY_A ); + + // If translation not available then get the default builder value + if ( empty( $result ) ) { + $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $post_id, $meta_key ), ARRAY_A ); + $original_value = 1; + } + + if ( is_array( $result ) && isset( $result[0] ) && is_array( $result[0] ) ) { + // Get existing translate value + $existing_translate_value = $result[0]['meta_value']; + $original_builder_value = $existing_translate_value; + + // Base64 encode the imported value + $base64_encoded_value = base64_encode( $meta_value ); + $decode_existing_translate_value = ''; + $decode_existing_translate_value = ''; + if ( ! empty( $existing_translate_value ) && is_string( $existing_translate_value ) ) { + if ( $original_value == 1 ) { + $clean_json = $existing_translate_value; + $clean_json = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $clean_json); + $decode_existing_translate_value = $clean_json; + $original_builder_value = base64_encode( $clean_json ); + + }else{ + $decode_existing_translate_value = base64_decode( wpm_translate_string( $existing_translate_value, $lang ) ); + } + + // If current language is empty then fallback to default language + if ( empty( $decode_existing_translate_value ) ) { + $decode_existing_translate_value = base64_decode( wpm_translate_string( $existing_translate_value ) ); + } + + if ( $meta_key === '_ct_builder_json' && ! empty( $decode_existing_translate_value ) ) { + $decode_existing_translate_value = json_decode( $decode_existing_translate_value, true ); + $this->replace_oxygen_texts($decode_existing_translate_value, $origin_meta_key, $meta_value); + $decode_existing_translate_value = base64_encode( wp_json_encode( $decode_existing_translate_value ) ); + } + + if ( $meta_key === '_ct_builder_shortcodes' && ! empty( $decode_existing_translate_value ) ) { + if ( ! empty( $decode_existing_translate_value ) && is_string( $decode_existing_translate_value ) ) { + $lookup_id = str_replace( '_ct_builder_shortcodes::', '', $origin_meta_key ); + + $decode_existing_translate_value = $this->replace_oxygen_shortcode_text_by_id( + $decode_existing_translate_value, + $lookup_id, + $meta_value + ); + + $decode_existing_translate_value = base64_encode( $decode_existing_translate_value ); + + } + + } + + $encode_existing_translate_value = $original_value == 1 ? $original_builder_value : $existing_translate_value; + + // Update the translate meta with language markers + $updated_meta = wpm_set_new_value( $encode_existing_translate_value, $decode_existing_translate_value, [], $lang ); + update_post_meta( $post_id, $translate_key, $updated_meta ); + } + + // Also ensure the original meta exists + $original_result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $post_id, $meta_key ), ARRAY_A ); + + if ( empty( $original_result ) ) { + // Create original meta with default language value + $default_lang = wpm_get_default_language(); + if ( wpm_is_ml_value( $updated_meta ) ) { + $default_value_encoded = wpm_translate_string( $updated_meta, $default_lang ); + $default_value = base64_decode( $default_value_encoded, true ); + if ( false !== $default_value ) { + update_post_meta( $post_id, $meta_key, $default_value ); + } + } + } + } else { + // Create new translate meta + $base64_encoded_value = base64_encode( $meta_value ); + $new_translate_value = '[:' . $lang . ']' . $base64_encoded_value . '[:]'; + update_post_meta( $post_id, $translate_key, $new_translate_value ); + + // Create original meta with default language value + $default_lang = wpm_get_default_language(); + if ( $lang === $default_lang ) { + update_post_meta( $post_id, $meta_key, $meta_value ); + } + } + + continue; // Skip the normal processing below + } + }else{ + // Normal postmeta import for other meta keys + $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $post_id, $meta_key ), ARRAY_A ); + + if ( is_array( $result ) && isset( $result[0] ) && is_array( $result[0] ) ) { + // Update existing postmeta + if ( isset( $result[0]['meta_value'] ) && is_string( $result[0]['meta_value'] ) ) { + $existing_value = $result[0]['meta_value']; + $updated_meta = wpm_set_new_value( $existing_value, $meta_value, [], $lang ); + update_post_meta( $post_id, $meta_key, $updated_meta ); + } + } + } + + } + } + } + return new \WP_Error( + "wpm_import_posts_success", + __("Post Translation updated", "wp-multilang"), + "success" + ); + } else { + return new \WP_Error( + "wpm_import_file_contents_error", + __( + 'Error: You are trying to import a file in a language which doesn\'t exist on your site', + "wp-multilang" + ) + ); + } + } else { + return new \WP_Error( + "wpm_import_file_contents_error", + __( + 'Error: You are trying to import a file in a language which doesn\'t exist on your site', + "wp-multilang" + ) + ); + } + } + + /** + * Convert xml data into an array for xliff 1.2 version + * @param $file_tag Document object + * @since 2.4.17 + * @return $post_data array + * */ + public function xml_to_array_1_2($file_tag) + { + $post_data = []; + $post_id = ""; + + $body_tag = $file_tag->getElementsByTagName("body"); + if (is_object($body_tag) && !empty($body_tag->length)) { + foreach ($body_tag as $body) { + $group_tag = $body->getElementsByTagName("group"); + if (is_object($group_tag) && !empty($group_tag->length)) { + foreach ($group_tag as $group) { + $group_attr = []; + foreach ($group->attributes as $attr) { + $group_attr[$attr->name] = $attr->value; + } + + if ( + is_array($group_attr) && + !empty($group_attr["restype"]) + ) { + if ( + $group_attr["restype"] == "x-post" && + !empty($group_attr["resname"]) + ) { + $post_id = intval($group_attr["resname"]); + if ($post_id > 0) { + $trans_unit = $group->getElementsByTagName( + "trans-unit" + ); + if ( + is_object($trans_unit) && + !empty($trans_unit->length) + ) { + foreach ($trans_unit as $trans) { + $restype = $trans->getAttribute( + "restype" + ); + $resname = $trans->getAttribute( + "resname" + ); + if ($restype == "x-post_title") { + $target = $trans->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + $post_data[$post_id][ + "post_title" + ] = sanitize_text_field( + $target->item(0) + ->nodeValue + ); + } + } elseif ( + $restype == "x-post_content" + ) { + $target = $trans->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + $post_data[$post_id][ + "post_content" + ] = sanitize_text_field( + $target->item(0) + ->nodeValue + ); + } + }elseif ( + $restype == "x-acf" + ) { + $target = $trans->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + foreach ($target as $targetNode) { + if ( ! empty( $targetNode->nodeValue ) && is_string( $targetNode->nodeValue ) ) { + $post_data[$post_id]['postmeta'][$resname] = sanitize_text_field( wp_unslash( $targetNode->nodeValue ) ); + } + } + } + } elseif ( + $restype == "x-postmeta" + ) { + $target = $trans->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + foreach ($target as $targetNode) { + if ( ! empty( $targetNode->nodeValue ) && is_string( $targetNode->nodeValue ) ) { + $post_data[$post_id]['postmeta'][$resname] = sanitize_text_field( wp_unslash( $targetNode->nodeValue ) ); + } + } + } + } + } + } + } + } + } + } + } + } + } + + return $post_data; + } + + /** + * Convert xml data into an array for xliff 2.0 & 2.1 version + * @param $file_tag Document object + * @since 2.4.17 + * @return $post_data array + * */ + public function xml_to_array_2_1($file_tag) + { + $post_data = []; + $post_id = ""; + + $group_tag = $file_tag->getElementsByTagName("group"); + if (is_object($group_tag) && !empty($group_tag->length)) { + foreach ($group_tag as $group) { + $group_attr = []; + foreach ($group->attributes as $attr) { + $group_attr[$attr->name] = $attr->value; + } + + if ( + !empty($group_attr["type"]) && + $group_attr["type"] == "x:post" + ) { + $post_id = intval($group_attr["name"]); + $units = $group->getElementsByTagName("unit"); + if (is_object($units) && !empty($units->length)) { + foreach ($units as $unit) { + $unit_type = $unit->getAttribute("type"); + $segments = $unit->getElementsByTagName("segment"); + $unit_name = $unit->getAttribute( "name" ); + if (is_object($segments) && !empty($segments)) { + if ($unit_type == "x:post_title") { + foreach ($segments as $segment) { + $target = $segment->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + $post_data[$post_id][ + "post_title" + ] = sanitize_text_field( + $target->item(0)->nodeValue + ); + } + } + } elseif ($unit_type == "x:post_content") { + foreach ($segments as $segment) { + $target = $segment->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + $post_data[$post_id][ + "post_content" + ] = $target->item(0)->nodeValue; + } + } + } elseif ($unit_type == "x:acf") { + foreach ($segments as $segment) { + $target = $segment->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + foreach ($target as $targetNode) { + if ( ! empty( $targetNode->nodeValue ) && is_string( $targetNode->nodeValue ) ) { + $post_data[$post_id]['postmeta'][$unit_name] = sanitize_text_field( wp_unslash( $targetNode->nodeValue ) ); + } + } + } + } + } elseif ($unit_type == "x:postmeta") { + foreach ($segments as $segment) { + $target = $segment->getElementsByTagName( + "target" + ); + if ( + is_object($target) && + !empty($target->item(0)) + ) { + foreach ($target as $targetNode) { + if ( ! empty( $targetNode->nodeValue ) && is_string( $targetNode->nodeValue ) ) { + $post_data[$post_id]['postmeta'][$unit_name] = sanitize_text_field( wp_unslash( $targetNode->nodeValue ) ); + } + } + } + } + } + } + } + } + } + } + } + + return $post_data; + } + + /** + * Extract the content of oxygen builder from json + * @param $json array + * @param $results array call by referece + * @return $results array + * @since 2.4.27 + * */ + private function extract_oxygen_texts( $json, &$results = [] ) { + + if ( is_array( $json ) ) { + foreach ( $json as $key => $value ) { + + if ( $key === 'ct_content' && is_string( $value ) ) { + $parent_id = isset( $json['ct_parent'] ) ? $json['ct_parent'] : 0; + $id = isset( $json['ct_id'] ) ? $json['ct_id'] : 0; + if ( $parent_id > 0 || $id > 0 ) { + $id = $parent_id . '_' . $id; + $results[] = [ + 'id' => $id, + 'text' => $value, + ]; + } + } + + if ( is_array( $value ) ) { + $this->extract_oxygen_texts( $value, $results ); + } + } + } + + return $results; + } + + /** + * Replace oxygen texts for _ct_builder + * @param $json array pass by reference + * @param $key text + * @param $replace_value text + * @since 2.4.27 + * */ + private function replace_oxygen_texts( &$json, $key, $replace_value ) { + + $parts = explode( '::', $key ); + + if ( empty( $parts[1] ) ) { + return; + } + + list( $parent_id, $id ) = array_pad( explode( '_', $parts[1] ), 2, 0 ); + + $parent_id = intval( $parent_id ); + $id = intval( $id ); + + if ( ! is_array( $json ) ) { + return; + } + + foreach ( $json as &$node ) { + + if ( is_array( $node ) ) { + + // Check inside options array + if ( + isset( $node['options']['ct_id'], $node['options']['ct_parent'] ) && + intval( $node['options']['ct_id'] ) === $id && + intval( $node['options']['ct_parent'] ) === $parent_id + ) { + + // Replace only ct_content + if ( isset( $node['options']['ct_content'] ) ) { + $node['options']['ct_content'] = $replace_value; + return; // stop after first match + } + } + + // Continue recursion + $this->replace_oxygen_texts( $node, $key, $replace_value ); + } + } + } + + /** + * Extract shortcode texts and return them into an array + * @param $content shortcode text + * @return $results array + * @since 2.4.27 + * */ + private function extract_oxygen_shortcodes_texts( $content ) { + + $results = []; + + // Only match text-carrying Oxygen elements + $pattern = '/\[(ct_text_block|ct_headline|ct_link_text)([^\]]*)\]([\s\S]*?)\[\/\1\]/'; + + if ( preg_match_all( $pattern, $content, $matches, PREG_SET_ORDER ) ) { + + foreach ( $matches as $match ) { + + $attrs = $match[2]; + $inner = trim( $match[3] ); + + if ( $inner === '' ) { + continue; + } + + // Extract ct_options JSON + if ( preg_match("/ct_options='([^']+)'/", $attrs, $opt_match) ) { + + $opts = json_decode( $opt_match[1], true ); + + if ( isset($opts['ct_parent'], $opts['ct_id']) ) { + + $results[] = [ + 'id' => $opts['ct_parent'] . '_' . $opts['ct_id'], + 'text' => $inner + ]; + } + } + } + } + + return $results; + } + + /** + * Replace oxygen shortcode inner text by ct_parent + ct_id + * @param string $content Full shortcode string + * @param string $lookup_id Example: 2_7 + * @param string $translated Translated text + * @return string + * @since 2.4.27 + */ + private function replace_oxygen_shortcode_text_by_id( + $content, + $lookup_id, + $translated + ) { + + $pattern = '/\[(ct_text_block|ct_headline|ct_link_text)([^\]]*)\]([\s\S]*?)\[\/\1\]/'; + + return preg_replace_callback( + + $pattern, + + function( $match ) use ( $lookup_id, $translated ) { + + $attrs = $match[2]; + + // Extract ct_options + if ( preg_match("/ct_options='([^']+)'/", $attrs, $opt_match) ) { + + $opts = json_decode( $opt_match[1], true ); + + if ( isset($opts['ct_parent'], $opts['ct_id']) ) { + + $current_id = $opts['ct_parent'] . '_' . $opts['ct_id']; + + // Exact match + if ( $current_id === $lookup_id ) { + + return '[' . $match[1] . $attrs . ']' + . $translated + . '[/' . $match[1] . ']'; + } + } + } + + // No change + return $match[0]; + }, + + $content + ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-customizer.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-customizer.php index 311f7249b..5c997ae33 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-customizer.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-customizer.php @@ -1,52 +1,52 @@ - $url ) ) ) ); - } - - public function load_available_items_query($items, $type, $object) { - if (($type === 'post_type' && null !== wpm_get_post_config($object)) || ($type === 'taxonomy' && null !== wpm_get_taxonomy_config($object))) { - foreach ($items as &$item) { - $item['title'] = wpm_translate_string( $item['title'] ); - } - } - return $items; - } -} + $url ) ) ) ); + } + + public function load_available_items_query($items, $type, $object) { + if (($type === 'post_type' && null !== wpm_get_post_config($object)) || ($type === 'taxonomy' && null !== wpm_get_taxonomy_config($object))) { + foreach ($items as &$item) { + $item['title'] = wpm_translate_string( $item['title'] ); + } + } + return $items; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-edit-menus.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-edit-menus.php index 66adcace4..79a9c1ef4 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-edit-menus.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-edit-menus.php @@ -1,123 +1,123 @@ -languages ) ) { - $languages = get_post_meta( $item->ID, '_languages', true ); - $item->languages = is_array( $languages ) ? $languages : array(); - } - - return $item; - } - - /** - * Add custom fields to menu item. - * - * @param int $item_id - * @param object $item - * - * @see http://web.archive.org/web/20141021012233/http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items - * @see https://core.trac.wordpress.org/ticket/18584 - */ - public function menu_item_custom_fields( $item_id, $item ) { - - $_key = 'languages'; - $key = sprintf( 'menu-item-%s', $_key ); - $id = sprintf( 'edit-%s-%s', $key, $item_id ); - $name = sprintf( '%s[%s]', $_key, $item_id ); - $value = $item->languages; - $class = sprintf( 'field-%s', $_key ); - $languages = wpm_get_lang_option(); - $i = 0; - ?> -

-
- $language ) { if ( ! $language['enable'] ) continue; ?> -
- -

- languages ) ) { + $languages = get_post_meta( $item->ID, '_languages', true ); + $item->languages = is_array( $languages ) ? $languages : array(); + } + + return $item; + } + + /** + * Add custom fields to menu item. + * + * @param int $item_id + * @param object $item + * + * @see http://web.archive.org/web/20141021012233/http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items + * @see https://core.trac.wordpress.org/ticket/18584 + */ + public function menu_item_custom_fields( $item_id, $item ) { + + $_key = 'languages'; + $key = sprintf( 'menu-item-%s', $_key ); + $id = sprintf( 'edit-%s-%s', $key, $item_id ); + $name = sprintf( '%s[%s]', $_key, $item_id ); + $value = $item->languages; + $class = sprintf( 'field-%s', $_key ); + $languages = wpm_get_lang_option(); + $i = 0; + ?> +

+
+ $language ) { if ( ! $language['enable'] ) continue; ?> +
+ +

+ array( - 'handler' => 'wpm-language-switcher-js-reg', - 'local_var' => 'wpmLanguageSwitcher', - 'block_name' => 'language-switcher', - 'render_func' => 'render_language_switcher', - 'editor' => 'wpm-lang-switcher-block-editor', - 'local' => array() - ) - ); - - /** - * This is class constructer to use all the hooks and filters used in this class - */ - public function __construct() { - foreach ($this->blocks as $key => $value) { - $this->blocks[$key]['path'] = wpm_asset_path( 'blocks/language-switcher/build/index.js' ); - } - - add_action( 'enqueue_block_editor_assets', array( $this, 'register_admin_assets' ) ); - // add_action('init', array($this, 'register_wpm_blocks')); - add_action('admin_init', array($this, 'add_editor_styles')); - $this->register_wpm_blocks(); - } - - public function register_wpm_blocks(){ - - if ( !function_exists( 'register_block_type' ) ) { - // no Gutenberg, Abort - return; - } - - if($this->blocks){ - - foreach($this->blocks as $block){ - - register_block_type( 'wpm/'.$block['block_name'], array( - 'editor_style' => $block['editor'] - ) ); - - } - - } - } - - public function register_admin_assets(){ - global $pagenow; - - if ( !function_exists( 'register_block_type' ) ) { - // no Gutenberg, Abort - return; - } - - if(function_exists('get_current_screen')){ - $current_screen = get_current_screen(); - - if(is_object($current_screen)){ - if(!empty($current_screen->post_type) && !empty($current_screen->is_block_editor) ){ - if(($current_screen->post_type == 'page' || $current_screen->post_type == 'post') && $current_screen->is_block_editor == 1){ - - $filename = '/assets/blocks/language-switcher/css/wpm-block-style.css'; - $css_style_path = wpm()->plugin_url().$filename; - - wp_register_style( - 'wpm-lang-switcher-block-editor', - $css_style_path, - array( 'wp-edit-blocks' ), - WPM_VERSION - ); - } - } - } - } - - if($this->blocks){ - - foreach($this->blocks as $key => $block){ - - if ( $pagenow == 'widgets.php' && version_compare( $GLOBALS['wp_version'], '5.8.0', '>=' ) ) { - - wp_register_script( - $block['handler'], - $block['path'], - array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-edit-widgets' ), - WPM_VERSION, - true - ); - - } else { - - wp_register_script( - $block['handler'], - $block['path'], - array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' ), - WPM_VERSION, - true - ); - - } - - if($key == 'language_switcher'){ - $block['local']['languages'] = wpm_get_languages(); - $block['local']['lang'] = wpm_get_language(); - $block['local']['flag_url'] = wpm_get_flag_url(); - } - - wp_localize_script( $block['handler'], $block['local_var'], $block['local'] ); - - wp_enqueue_script( $block['handler'] ); - } - } - } - - /** - * Function to add style to site editor in admin panel - * @since 2.4.9 - * */ - public function add_editor_styles(){ - $filename = '/assets/blocks/language-switcher/css/wpm-editor-style.css'; - $css_style_path = wpm()->plugin_url().$filename; - - add_editor_style( - $css_style_path - ); - } -} + array( + 'handler' => 'wpm-language-switcher-js-reg', + 'local_var' => 'wpmLanguageSwitcher', + 'block_name' => 'language-switcher', + 'render_func' => 'render_language_switcher', + 'editor' => 'wpm-lang-switcher-block-editor', + 'local' => array() + ) + ); + + /** + * This is class constructer to use all the hooks and filters used in this class + */ + public function __construct() { + foreach ($this->blocks as $key => $value) { + $this->blocks[$key]['path'] = wpm_asset_path( 'blocks/language-switcher/build/index.js' ); + } + + add_action( 'enqueue_block_editor_assets', array( $this, 'register_admin_assets' ) ); + // add_action('init', array($this, 'register_wpm_blocks')); + add_action('admin_init', array($this, 'add_editor_styles')); + $this->register_wpm_blocks(); + } + + public function register_wpm_blocks(){ + + if ( !function_exists( 'register_block_type' ) ) { + // no Gutenberg, Abort + return; + } + + if($this->blocks){ + + foreach($this->blocks as $block){ + + register_block_type( 'wpm/'.$block['block_name'], array( + 'api_version' => 3, + 'editor_style' => $block['editor'] + ) ); + + } + + } + } + + public function register_admin_assets(){ + global $pagenow; + + if ( !function_exists( 'register_block_type' ) ) { + // no Gutenberg, Abort + return; + } + + if(function_exists('get_current_screen')){ + $current_screen = get_current_screen(); + + if(is_object($current_screen)){ + if(!empty($current_screen->post_type) && !empty($current_screen->is_block_editor) ){ + if ( ( null !== wpm_get_post_config( $current_screen->post_type ) ) && $current_screen->is_block_editor == 1){ + + $filename = '/assets/blocks/language-switcher/css/wpm-block-style.css'; + $css_style_path = wpm()->plugin_url().$filename; + + wp_register_style( + 'wpm-lang-switcher-block-editor', + $css_style_path, + array( 'wp-edit-blocks' ), + WPM_VERSION + ); + } + } + } + } + + if($this->blocks){ + + foreach($this->blocks as $key => $block){ + + if ( $pagenow == 'widgets.php' && version_compare( $GLOBALS['wp_version'], '5.8.0', '>=' ) ) { + + wp_register_script( + $block['handler'], + $block['path'], + array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-edit-widgets' ), + WPM_VERSION, + true + ); + + } else { + + wp_register_script( + $block['handler'], + $block['path'], + array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' ), + WPM_VERSION, + true + ); + + } + + if($key == 'language_switcher'){ + $block['local']['languages'] = wpm_get_languages(); + $block['local']['lang'] = wpm_get_language(); + $block['local']['flag_url'] = wpm_get_flag_url(); + } + + wp_localize_script( $block['handler'], $block['local_var'], $block['local'] ); + + wp_enqueue_script( $block['handler'] ); + } + } + } + + /** + * Function to add style to site editor in admin panel + * @since 2.4.9 + * */ + public function add_editor_styles(){ + $filename = '/assets/blocks/language-switcher/css/wpm-editor-style.css'; + $css_style_path = wpm()->plugin_url().$filename; + + add_editor_style( + $css_style_path + ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-menus.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-menus.php index 0232d0664..ba86c9dad 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-menus.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-menus.php @@ -1,299 +1,299 @@ - Menus > Pages. - add_action( 'admin_head-nav-menus.php', array( $this, 'add_nav_menu_meta_boxes' ) ); - add_filter( 'wp_edit_nav_menu_walker', array( $this, 'filter_walker' ) ); - add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'menu_item_languages_setting' ), 5, 2 ); - add_action( 'wp_update_nav_menu_item', array( $this, 'update_nav_menu_item' ), 10, 2 ); - } - - - /** - * Replace default menu editor walker with ours - * - * We don't actually replace the default walker. We're still using it and - * only injecting some HTMLs. - * - * @wp_hook filter wp_edit_nav_menu_walker - * - * @param $class_name - * - * @return string Walker class name - */ - public static function filter_walker( $class_name ) { - if ( ! has_action( 'wp_nav_menu_item_custom_fields') ) { - return 'WPM\Includes\Libraries\WPM_Walker_Nav_Menu_Edit'; - } - - return $class_name; - } - - /** - * Add language switcher to admin - * - * @param \WP_Admin_Bar $wp_admin_bar - */ - public function admin_bar_menu( \WP_Admin_Bar $wp_admin_bar ) { - - if ( ! get_current_user_id() ) { - return; - } - - $installed_translations = wpm_get_installed_languages(); - - if ( count( $installed_translations ) <= 1 ) { - return; - } - - $user_language = wpm_get_user_language(); - $languages = wpm_get_languages(); - $available_translations = wpm_get_available_translations(); - - if ( isset( $languages[ $user_language ] ) ) { - $wp_admin_bar->add_menu( array( - 'id' => 'wpm-language-switcher', - 'parent' => 'top-secondary', - 'title' => '' . - // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function - ( $languages ? '' : '' ) . '' . $available_translations[ get_locale() ]['native_name'] . '', - ) ); - } - - foreach ( $installed_translations as $locale ) { - - if ( get_locale() === $locale ) { - continue; - } - - $code = ''; - $language = array(); - $add = false; - - foreach ( $languages as $code => $language ) { - if ( isset( $language['translation'] ) && ( $language['translation'] == $locale ) ) { - $add = true; - break; - } - } - - if ( $add ) { - $native_name = ''; - if( ! empty( $available_translations[$locale]['native_name'] ) ) { - $native_name = $available_translations[$locale]['native_name']; - } - - $wp_admin_bar->add_menu( array( - 'parent' => 'wpm-language-switcher', - 'id' => 'wpm-language-' . $code, - // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function - 'title' => '' . '' . '' . '' . esc_html( $native_name ) . '', - 'href' => wpm_translate_current_url( $code ), - ) ); - } - } - } - - - /** - * Add menu item. - */ - public function settings_menu() { - $settings_page = add_menu_page( __( 'WP Multilang Settings', 'wp-multilang' ), __( 'WP Multilang', 'wp-multilang' ), 'manage_options', 'wpm-settings', array( $this, 'settings_page' ), 'dashicons-admin-site-alt3' ); - - add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) ); - } - - /** - * Load settings. - */ - public function settings_page_init() { - global $current_tab, $current_section; - - // Include settings pages - WPM_Admin_Settings::get_settings_pages(); - - // Get current tab/section - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( $_GET['tab'] ); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] ); - - // Save settings if data has been posted - // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.NonceVerification.Missing - if ( ! empty( $_POST ) ) { - WPM_Admin_Settings::save(); - } - - // Add any posted messages - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['wpm_error'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - WPM_Admin_Settings::add_error( stripslashes( $_GET['wpm_error'] ) ); - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['wpm_message'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - WPM_Admin_Settings::add_message( stripslashes( $_GET['wpm_message'] ) ); - } - } - - /** - * Init the settings page. - */ - public function settings_page() { - WPM_Admin_Settings::output(); - } - - - /** - * Add custom nav meta box. - * - * Adapted from http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/. - */ - public function add_nav_menu_meta_boxes() { - add_meta_box( 'wpm_endpoints_nav_link', __( 'Languages', 'wp-multilang' ), array( $this, 'nav_menu_links' ), 'nav-menus', 'side', 'low' ); - } - - /** - * Output menu link. - */ - public function nav_menu_links() { - global $_nav_menu_placeholder; - $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; - ?> -
-
-
    -
  • - - - - - -
  • -
-
-

- - - - -

-
- url ) { - return; - } - - $_key = 'languages_type'; - $key = sprintf( 'menu-item-%s', $_key ); - $id = sprintf( 'edit-%s-%s', $key, $item_id ); - $name = sprintf( '%s[%s]', $_key, $item_id ); - $value = get_post_meta( $item_id, '_menu_item_languages_type', true ); - $class = sprintf( 'field-%s', $_key ); - - $type_options = array( - 'inline' => esc_html__( 'Inline', 'wp-multilang' ), - 'single' => esc_html__( 'Single', 'wp-multilang' ), - 'dropdown' => esc_html__( 'Dropdown', 'wp-multilang' ), - 'toggler' => esc_html__( 'Toggler', 'wp-multilang' ), - ); - ?> -

- - -

- esc_html__( 'Both', 'wp-multilang' ), - 'flag' => esc_html__( 'Flag', 'wp-multilang' ), - 'name' => esc_html__( 'Name', 'wp-multilang' ), - ); - ?> -

- - -

- Menus > Pages. + add_action( 'admin_head-nav-menus.php', array( $this, 'add_nav_menu_meta_boxes' ) ); + add_filter( 'wp_edit_nav_menu_walker', array( $this, 'filter_walker' ) ); + add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'menu_item_languages_setting' ), 5, 2 ); + add_action( 'wp_update_nav_menu_item', array( $this, 'update_nav_menu_item' ), 10, 2 ); + } + + + /** + * Replace default menu editor walker with ours + * + * We don't actually replace the default walker. We're still using it and + * only injecting some HTMLs. + * + * @wp_hook filter wp_edit_nav_menu_walker + * + * @param $class_name + * + * @return string Walker class name + */ + public static function filter_walker( $class_name ) { + if ( ! has_action( 'wp_nav_menu_item_custom_fields') ) { + return 'WPM\Includes\Libraries\WPM_Walker_Nav_Menu_Edit'; + } + + return $class_name; + } + + /** + * Add language switcher to admin + * + * @param \WP_Admin_Bar $wp_admin_bar + */ + public function admin_bar_menu( \WP_Admin_Bar $wp_admin_bar ) { + + if ( ! get_current_user_id() ) { + return; + } + + $installed_translations = wpm_get_installed_languages(); + + if ( count( $installed_translations ) <= 1 ) { + return; + } + + $user_language = wpm_get_user_language(); + $languages = wpm_get_languages(); + $available_translations = wpm_get_available_translations(); + + if ( isset( $languages[ $user_language ] ) ) { + $wp_admin_bar->add_menu( array( + 'id' => 'wpm-language-switcher', + 'parent' => 'top-secondary', + 'title' => '' . + // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function + ( $languages ? '' : '' ) . '' . $available_translations[ get_locale() ]['native_name'] . '', + ) ); + } + + foreach ( $installed_translations as $locale ) { + + if ( get_locale() === $locale ) { + continue; + } + + $code = ''; + $language = array(); + $add = false; + + foreach ( $languages as $code => $language ) { + if ( isset( $language['translation'] ) && ( $language['translation'] == $locale ) ) { + $add = true; + break; + } + } + + if ( $add ) { + $native_name = ''; + if( ! empty( $available_translations[$locale]['native_name'] ) ) { + $native_name = $available_translations[$locale]['native_name']; + } + + $wp_admin_bar->add_menu( array( + 'parent' => 'wpm-language-switcher', + 'id' => 'wpm-language-' . $code, + // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function + 'title' => '' . '' . '' . '' . esc_html( $native_name ) . '', + 'href' => wpm_translate_current_url( $code ), + ) ); + } + } + } + + + /** + * Add menu item. + */ + public function settings_menu() { + $settings_page = add_menu_page( __( 'WP Multilang Settings', 'wp-multilang' ), __( 'WP Multilang', 'wp-multilang' ), 'manage_options', 'wpm-settings', array( $this, 'settings_page' ), 'dashicons-admin-site-alt3' ); + + add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) ); + } + + /** + * Load settings. + */ + public function settings_page_init() { + global $current_tab, $current_section; + + // Include settings pages + WPM_Admin_Settings::get_settings_pages(); + + // Get current tab/section + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( $_GET['tab'] ); + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] ); + + // Save settings if data has been posted + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.NonceVerification.Missing + if ( ! empty( $_POST ) ) { + WPM_Admin_Settings::save(); + } + + // Add any posted messages + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['wpm_error'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + WPM_Admin_Settings::add_error( stripslashes( $_GET['wpm_error'] ) ); + } + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['wpm_message'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + WPM_Admin_Settings::add_message( stripslashes( $_GET['wpm_message'] ) ); + } + } + + /** + * Init the settings page. + */ + public function settings_page() { + WPM_Admin_Settings::output(); + } + + + /** + * Add custom nav meta box. + * + * Adapted from http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/. + */ + public function add_nav_menu_meta_boxes() { + add_meta_box( 'wpm_endpoints_nav_link', __( 'Languages', 'wp-multilang' ), array( $this, 'nav_menu_links' ), 'nav-menus', 'side', 'low' ); + } + + /** + * Output menu link. + */ + public function nav_menu_links() { + global $_nav_menu_placeholder; + $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; + ?> +
+
+
    +
  • + + + + + +
  • +
+
+

+ + + + +

+
+ url ) { + return; + } + + $_key = 'languages_type'; + $key = sprintf( 'menu-item-%s', $_key ); + $id = sprintf( 'edit-%s-%s', $key, $item_id ); + $name = sprintf( '%s[%s]', $_key, $item_id ); + $value = get_post_meta( $item_id, '_menu_item_languages_type', true ); + $class = sprintf( 'field-%s', $_key ); + + $type_options = array( + 'inline' => esc_html__( 'Inline', 'wp-multilang' ), + 'single' => esc_html__( 'Single', 'wp-multilang' ), + 'dropdown' => esc_html__( 'Dropdown', 'wp-multilang' ), + 'toggler' => esc_html__( 'Toggler', 'wp-multilang' ), + ); + ?> +

+ + +

+ esc_html__( 'Both', 'wp-multilang' ), + 'flag' => esc_html__( 'Flag', 'wp-multilang' ), + 'name' => esc_html__( 'Name', 'wp-multilang' ), + ); + ?> +

+ + +

+ '; - - foreach ( $errors as $error ) { - echo '

' . wp_kses_post( $error ) . '

'; - } - - echo ''; - - // Clear - delete_option( 'wpm_meta_box_errors' ); - } - } - - /** - * Add WPM Meta boxes. - * - * @param string $post_type - */ - public function add_meta_boxes( $post_type ) { - $screen = get_current_screen(); - $screen_id = $screen ? $screen->id : ''; - - if ( ( 'attachment' !== $post_type ) && null !== wpm_get_post_config( $post_type ) ) { - add_meta_box( "wpm-{$post_type}-languages", __( 'Languages', 'wp-multilang' ), __NAMESPACE__ . '\Meta_Boxes\WPM_Meta_Box_Post_Languages::output', $post_type, 'side' ); - } - - // Comment languages. - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( 'comment' === $screen_id && isset( $_GET['c'] ) ) { - add_meta_box( 'wpm-comment-languages', __( 'Languages', 'wp-multilang' ), __NAMESPACE__ . '\Meta_Boxes\WPM_Meta_Box_Comment_Languages::output', 'comment', 'normal' ); - } - } - - /** - * Check if we're saving, the trigger an action based on the post type. - * - * @param int $post_id - * @param \WP_Post $post - */ - public function save_meta_boxes( $post_id, $post ) { - // $post_id and $post are required - if ( empty( $post_id ) || null === $post || self::$saved_meta_boxes ) { - return; - } - - // Dont' save meta boxes for revisions or autosaves - if ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) { - return; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason sanitization not needed for nonce - if ( empty( $_POST['wpm_meta_nonce'] ) || ! wp_verify_nonce( $_POST['wpm_meta_nonce'], 'wpm_save_data' ) ) { - return; - } - - // Check the post being saved == the $post_id to prevent triggering this call for other save_post events - if ( empty( $_POST['post_ID'] ) || (int) $_POST['post_ID'] !== $post_id ) { - return; - } - - // Check user has permission to edit - if ( ! current_user_can( 'edit_post', $post_id ) ) { - return; - } - - self::$saved_meta_boxes = true; - - do_action( 'wpm_process_meta', $post_id, $post ); - do_action( 'wpm_process_' . $post->post_type . '_meta', $post_id, $post ); - } -} +'; + + foreach ( $errors as $error ) { + echo '

' . wp_kses_post( $error ) . '

'; + } + + echo ''; + + // Clear + delete_option( 'wpm_meta_box_errors' ); + } + } + + /** + * Add WPM Meta boxes. + * + * @param string $post_type + */ + public function add_meta_boxes( $post_type ) { + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + + if ( ( 'attachment' !== $post_type ) && null !== wpm_get_post_config( $post_type ) ) { + add_meta_box( "wpm-{$post_type}-languages", __( 'Languages', 'wp-multilang' ), __NAMESPACE__ . '\Meta_Boxes\WPM_Meta_Box_Post_Languages::output', $post_type, 'side' ); + } + + // Comment languages. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( 'comment' === $screen_id && isset( $_GET['c'] ) ) { + add_meta_box( 'wpm-comment-languages', __( 'Languages', 'wp-multilang' ), __NAMESPACE__ . '\Meta_Boxes\WPM_Meta_Box_Comment_Languages::output', 'comment', 'normal' ); + } + + $current_lang = wpm_get_language(); + $default_lang = wpm_get_default_language(); + + if ( ( 'attachment' !== $post_type ) && null !== wpm_get_post_config( $post_type ) && ( $current_lang !== $default_lang ) ) { + add_meta_box( "wpm-{$post_type}-auto_translate", esc_html__( 'Auto Translation', 'wp-multilang' ), array( __NAMESPACE__ . '\Settings\WPM_Settings_Auto_Translate_Pro', 'auto_translate_metabox_output' ), $post_type, 'side' ); + } + } + + /** + * Check if we're saving, the trigger an action based on the post type. + * + * @param int $post_id + * @param \WP_Post $post + */ + public function save_meta_boxes( $post_id, $post ) { + // $post_id and $post are required + if ( empty( $post_id ) || null === $post || self::$saved_meta_boxes ) { + return; + } + + // Dont' save meta boxes for revisions or autosaves + if ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) { + return; + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason sanitization not needed for nonce + if ( empty( $_POST['wpm_meta_nonce'] ) || ! wp_verify_nonce( $_POST['wpm_meta_nonce'], 'wpm_save_data' ) ) { + return; + } + + // Check the post being saved == the $post_id to prevent triggering this call for other save_post events + if ( empty( $_POST['post_ID'] ) || (int) $_POST['post_ID'] !== $post_id ) { + return; + } + + // Check user has permission to edit + if ( ! current_user_can( 'edit_post', $post_id ) ) { + return; + } + + self::$saved_meta_boxes = true; + + do_action( 'wpm_process_meta', $post_id, $post ); + do_action( 'wpm_process_' . $post->post_type . '_meta', $post_id, $post ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-newsletter.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-newsletter.php index a88b1d7b0..b619cadb8 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-newsletter.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-newsletter.php @@ -1,78 +1,78 @@ - esc_html__( 'Thanks for using WP Multilang!', 'wp-multilang' ), - 'do_you_want' => esc_html__( 'Do you want the latest on ', 'wp-multilang' ), - 'wpm_update' => esc_html__( 'WP Multilang update', 'wp-multilang' ), - 'before_others' => esc_html__( ' before others and some best resources on monetization in a single email? - Free just for users of WP Multilang!', 'wp-multilang' ), - 'wpm_security_nonce' => wp_create_nonce( 'wpm_security_nonce' ), - 'ajax_url' => admin_url( 'admin-ajax.php' ) - ); - - $script_data = apply_filters('wpm_localize_filter',$script_data,'wpm_localize_data'); - - wp_register_script( 'wpm-newsletter-script', wpm_asset_path( 'scripts/wpm-newsletter-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_localize_script( 'wpm-newsletter-script', 'wpm_localize_data', $script_data ); - wp_enqueue_script( 'wpm-newsletter-script' ); - } - - public function wpm_add_localize_footer_data($object, $object_name){ - - $dismissed = explode (',', get_user_meta (wp_get_current_user()->ID, 'dismissed_wp_pointers', true)); - $do_tour = !in_array ('wpm_subscribe_pointer', $dismissed); - - if ($do_tour) { - wp_enqueue_style ('wp-pointer'); - wp_enqueue_script ('wp-pointer'); - } - - if($object_name == 'wpm_localize_data'){ - - global $current_user; - $tour = array (); - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : ''; - - if (!array_key_exists($tab, $tour)) { - - $object['do_tour'] = $do_tour; - $object['get_home_url'] = get_home_url(); - $object['current_user_email'] = $current_user->user_email; - $object['current_user_name'] = $current_user->display_name; - $object['displayID'] = '#menu-settings'; - $object['button1'] = esc_html__('No Thanks', 'wp-multilang'); - $object['button2'] = false; - $object['function_name'] = ''; - } - - } - return $object; - } + esc_html__( 'Thanks for using WP Multilang!', 'wp-multilang' ), + 'do_you_want' => esc_html__( 'Do you want the latest on ', 'wp-multilang' ), + 'wpm_update' => esc_html__( 'WP Multilang update', 'wp-multilang' ), + 'before_others' => esc_html__( ' before others and some best resources on monetization in a single email? - Free just for users of WP Multilang!', 'wp-multilang' ), + 'wpm_security_nonce' => wp_create_nonce( 'wpm_security_nonce' ), + 'ajax_url' => admin_url( 'admin-ajax.php' ) + ); + + $script_data = apply_filters('wpm_localize_filter',$script_data,'wpm_localize_data'); + + wp_register_script( 'wpm-newsletter-script', wpm_asset_path( 'scripts/wpm-newsletter-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_localize_script( 'wpm-newsletter-script', 'wpm_localize_data', $script_data ); + wp_enqueue_script( 'wpm-newsletter-script' ); + } + + public function wpm_add_localize_footer_data($object, $object_name){ + + $dismissed = explode (',', get_user_meta (wp_get_current_user()->ID, 'dismissed_wp_pointers', true)); + $do_tour = !in_array ('wpm_subscribe_pointer', $dismissed); + + if ($do_tour) { + wp_enqueue_style ('wp-pointer'); + wp_enqueue_script ('wp-pointer'); + } + + if($object_name == 'wpm_localize_data'){ + + global $current_user; + $tour = array (); + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : ''; + + if (!array_key_exists($tab, $tour)) { + + $object['do_tour'] = $do_tour; + $object['get_home_url'] = get_home_url(); + $object['current_user_email'] = $current_user->user_email; + $object['current_user_name'] = $current_user->display_name; + $object['displayID'] = '#menu-settings'; + $object['button1'] = esc_html__('No Thanks', 'wp-multilang'); + $object['button2'] = false; + $object['function_name'] = ''; + } + + } + return $object; + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-notices.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-notices.php index cf3e23e6d..659930542 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-notices.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-notices.php @@ -1,194 +1,194 @@ - callback. - * @var array - */ - private static $core_notices = array( - 'update' => 'update_notice', - ); - - /** - * Constructor. - */ - public static function init() { - self::$notices = get_option( 'wpm_admin_notices', array() ); - - add_action( 'wp_loaded', array( __CLASS__, 'hide_notices' ) ); - add_action( 'shutdown', array( __CLASS__, 'store_notices' ) ); - - if ( current_user_can( 'manage_translations' ) ) { - add_action( 'admin_print_styles', array( __CLASS__, 'add_notices' ) ); - } - } - - /** - * Store notices to DB - */ - public static function store_notices() { - update_option( 'wpm_admin_notices', self::get_notices() ); - } - - /** - * Get notices - * @return array - */ - public static function get_notices() { - return self::$notices; - } - - /** - * Remove all notices. - */ - public static function remove_all_notices() { - self::$notices = array(); - } - - /** - * Show a notice. - * @param string $name - */ - public static function add_notice( $name ) { - self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) ); - - } - - /** - * Remove a notice from being displayed. - * @param string $name - */ - public static function remove_notice( $name ) { - self::$notices = array_diff( self::get_notices(), array( $name ) ); - delete_option( 'wpm_admin_notice_' . $name ); - } - - /** - * See if a notice is being shown. - * @param string $name - * @return boolean - */ - public static function has_notice( $name ) { - return in_array( $name, self::get_notices(), true ); - } - - /** - * Hide a notice if the GET variable is set. - */ - public static function hide_notices() { - if ( isset( $_GET['wpm-hide-notice'], $_GET['_wpm_notice_nonce'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( ! wp_verify_nonce( $_GET['_wpm_notice_nonce'], 'wpm_hide_notices_nonce' ) ) { - wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'wp-multilang' ) ); - } - - if ( ! current_user_can( 'manage_translations' ) ) { - wp_die( esc_html__( 'Cheatin’ huh?', 'wp-multilang' ) ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $hide_notice = sanitize_text_field( $_GET['wpm-hide-notice'] ); - self::remove_notice( $hide_notice ); - do_action( 'wpm_hide_' . $hide_notice . '_notice' ); - } - } - - /** - * Add notices + styles if needed. - */ - public static function add_notices() { - $notices = self::get_notices(); - - if ( ! empty( $notices ) ) { - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - wp_enqueue_style( 'wpm-notices', plugins_url( '/assets/styles/notices' . $suffix . '.css', WPM_PLUGIN_FILE ), array(), WPM_VERSION ); - - foreach ( $notices as $notice ) { - if ( ! empty( self::$core_notices[ $notice ] ) && apply_filters( 'wpm_show_admin_notice', true, $notice ) ) { - add_action( 'admin_notices', array( __CLASS__, self::$core_notices[ $notice ] ) ); - } else { - add_action( 'admin_notices', array( __CLASS__, 'output_custom_notices' ) ); - } - } - } - } - - /** - * Add a custom notice. - * - * @param string $name - * @param string $notice_html - * @param string $type - */ - public static function add_custom_notice( $name, $notice_html, $type = 'success' ) { - self::add_notice( $name ); - $notice = array( - 'notice_html' => wp_kses_post( $notice_html ), - 'type' => $type, - ); - update_option( 'wpm_admin_notice_' . $name, $notice ); - } - - /** - * Output any stored custom notices. - */ - public static function output_custom_notices() { - $notices = self::get_notices(); - - if ( ! empty( $notices ) ) { - foreach ( $notices as $notice ) { - if ( empty( self::$core_notices[ $notice ] ) ) { - $notice_html = get_option( 'wpm_admin_notice_' . $notice ); - - if ( $notice_html ) { - include 'views/html-notice-custom.php'; - } - } - } - } - } - - /** - * If we need to update, include a message with the update button. - */ - public static function update_notice() { - if ( version_compare( get_option( 'wpm_db_version' ), WPM_VERSION, '<' ) ) { - $updater = new WPM_Background_Updater(); - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['do_update_wpm'] ) || $updater->is_updating() ) { - include 'views/html-notice-updating.php'; - } else { - include 'views/html-notice-update.php'; - } - } else { - include 'views/html-notice-updated.php'; - } - } -} - - - + callback. + * @var array + */ + private static $core_notices = array( + 'update' => 'update_notice', + ); + + /** + * Constructor. + */ + public static function init() { + self::$notices = get_option( 'wpm_admin_notices', array() ); + + add_action( 'wp_loaded', array( __CLASS__, 'hide_notices' ) ); + add_action( 'shutdown', array( __CLASS__, 'store_notices' ) ); + + if ( current_user_can( 'manage_translations' ) ) { + add_action( 'admin_print_styles', array( __CLASS__, 'add_notices' ) ); + } + } + + /** + * Store notices to DB + */ + public static function store_notices() { + update_option( 'wpm_admin_notices', self::get_notices() ); + } + + /** + * Get notices + * @return array + */ + public static function get_notices() { + return self::$notices; + } + + /** + * Remove all notices. + */ + public static function remove_all_notices() { + self::$notices = array(); + } + + /** + * Show a notice. + * @param string $name + */ + public static function add_notice( $name ) { + self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) ); + + } + + /** + * Remove a notice from being displayed. + * @param string $name + */ + public static function remove_notice( $name ) { + self::$notices = array_diff( self::get_notices(), array( $name ) ); + delete_option( 'wpm_admin_notice_' . $name ); + } + + /** + * See if a notice is being shown. + * @param string $name + * @return boolean + */ + public static function has_notice( $name ) { + return in_array( $name, self::get_notices(), true ); + } + + /** + * Hide a notice if the GET variable is set. + */ + public static function hide_notices() { + if ( isset( $_GET['wpm-hide-notice'], $_GET['_wpm_notice_nonce'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( ! wp_verify_nonce( $_GET['_wpm_notice_nonce'], 'wpm_hide_notices_nonce' ) ) { + wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'wp-multilang' ) ); + } + + if ( ! current_user_can( 'manage_translations' ) ) { + wp_die( esc_html__( 'Cheatin’ huh?', 'wp-multilang' ) ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $hide_notice = sanitize_text_field( $_GET['wpm-hide-notice'] ); + self::remove_notice( $hide_notice ); + do_action( 'wpm_hide_' . $hide_notice . '_notice' ); + } + } + + /** + * Add notices + styles if needed. + */ + public static function add_notices() { + $notices = self::get_notices(); + + if ( ! empty( $notices ) ) { + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_style( 'wpm-notices', plugins_url( '/assets/styles/notices' . $suffix . '.css', WPM_PLUGIN_FILE ), array(), WPM_VERSION ); + + foreach ( $notices as $notice ) { + if ( ! empty( self::$core_notices[ $notice ] ) && apply_filters( 'wpm_show_admin_notice', true, $notice ) ) { + add_action( 'admin_notices', array( __CLASS__, self::$core_notices[ $notice ] ) ); + } else { + add_action( 'admin_notices', array( __CLASS__, 'output_custom_notices' ) ); + } + } + } + } + + /** + * Add a custom notice. + * + * @param string $name + * @param string $notice_html + * @param string $type + */ + public static function add_custom_notice( $name, $notice_html, $type = 'success' ) { + self::add_notice( $name ); + $notice = array( + 'notice_html' => wp_kses_post( $notice_html ), + 'type' => $type, + ); + update_option( 'wpm_admin_notice_' . $name, $notice ); + } + + /** + * Output any stored custom notices. + */ + public static function output_custom_notices() { + $notices = self::get_notices(); + + if ( ! empty( $notices ) ) { + foreach ( $notices as $notice ) { + if ( empty( self::$core_notices[ $notice ] ) ) { + $notice_html = get_option( 'wpm_admin_notice_' . $notice ); + + if ( $notice_html ) { + include 'views/html-notice-custom.php'; + } + } + } + } + } + + /** + * If we need to update, include a message with the update button. + */ + public static function update_notice() { + if ( version_compare( get_option( 'wpm_db_version' ), WPM_VERSION, '<' ) ) { + $updater = new WPM_Background_Updater(); + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['do_update_wpm'] ) || $updater->is_updating() ) { + include 'views/html-notice-updating.php'; + } else { + include 'views/html-notice-update.php'; + } + } else { + include 'views/html-notice-updated.php'; + } + } +} + + + diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-posts.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-posts.php index 886f17b38..107ca00ea 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-posts.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-posts.php @@ -1,161 +1,165 @@ - esc_html__( 'Languages', 'wp-multilang' ) ); - - if ( isset( $columns['title'] ) ) { - return wpm_array_insert_after( $columns, 'title', $language ); - } - - if ( isset( $columns['name'] ) ) { - return wpm_array_insert_after( $columns, 'name', $language ); - } - - $columns = array_merge( $columns, $language ); - - return $columns; - } - - - /** - * Output language columns for post types. - * - * @param string $column - */ - public function render_language_column( $column ) { - - if ( 'languages' === $column ) { - - $post = wpm_untranslate_post( get_post() ); - $output = array(); - $text = $post->post_title . $post->post_content; - $strings = wpm_value_to_ml_array( $text ); - $languages = wpm_get_lang_option(); - - foreach ( $languages as $code => $language ) { - if ( isset( $strings[ $code ] ) && ! empty( $strings[ $code ] ) ) { - // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function - $output[] = '' . esc_attr( $language['name'] ) . ''; - } - } - - if ( ! empty( $output ) ) { - $implode_output = implode( ' ', $output ); - echo wp_kses( $implode_output, wp_kses_allowed_html('post') ); - } - } - } - - - /** - * Add indicator for editing post - * - * @param \WP_Post $post - */ - public function add_lang_indicator( $post ) { - - if ( null === wpm_get_post_config( $post->post_type ) && ( wpm_is_ml_string( $post->post_title ) || wpm_is_ml_value( $post->post_content ) ) ) { - - $languages = wpm_get_languages(); - $language = wpm_get_language(); - - ?> -
- - - <?php echo esc_attr( $languages[ $language ]['name'] ) ; ?> - - - -
- esc_html__( 'Languages', 'wp-multilang' ) ); + + if ( isset( $columns['title'] ) ) { + return wpm_array_insert_after( $columns, 'title', $language ); + } + + if ( isset( $columns['name'] ) ) { + return wpm_array_insert_after( $columns, 'name', $language ); + } + + $columns = array_merge( $columns, $language ); + + return $columns; + } + + + /** + * Output language columns for post types. + * + * @param string $column + */ + public function render_language_column( $column ) { + + if ( 'languages' === $column ) { + + $post = wpm_untranslate_post( get_post() ); + $output = array(); + $text = $post->post_title . $post->post_content; + $strings = wpm_value_to_ml_array( $text ); + $languages = wpm_get_lang_option(); + + $post_edit_link = get_edit_post_link( $post->ID ); + + foreach ( $languages as $code => $language ) { + if ( isset( $strings[ $code ] ) && ! empty( $strings[ $code ] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function + $edit_link_with_param = add_query_arg( 'edit_lang', $code, $post_edit_link ); + + $output[] = '
' . esc_attr( $language['name'] ) . ''; + } + } + + if ( ! empty( $output ) ) { + $implode_output = implode( ' ', $output ); + echo wp_kses( $implode_output, wp_kses_allowed_html('post') ); + } + } + } + + + /** + * Add indicator for editing post + * + * @param \WP_Post $post + */ + public function add_lang_indicator( $post ) { + + if ( null === wpm_get_post_config( $post->post_type ) && ( wpm_is_ml_string( $post->post_title ) || wpm_is_ml_value( $post->post_content ) ) ) { + + $languages = wpm_get_languages(); + $language = wpm_get_language(); + + ?> +
+ + + <?php echo esc_attr( $languages[ $language ]['name'] ) ; ?> + + + +
+ detect_qtranslate() ) { - /* translators: %s: notice message */ - WPM_Admin_Notices::add_custom_notice( 'qtranslate_active', esc_html( sprintf( __( '%s is active. Please deactivate it.', 'wp-multilang' ), $qtranslate ), 'error' ) ); - } - } - - - /** - * Detects whether qTranslate or qTranslate-X is active. - * Returns the name of the plugin if it's detected, false otherwise. - * - * @return bool|string Either false or the plugin name - */ - private function detect_qtranslate() { - if ( defined( 'QTX_VERSION' ) ) { - return 'qTranslate-X'; - } - if ( defined( 'QT_SUPPORTED_WP_VERSION' ) ) { - return 'qTranslate'; - } - - return false; - } - -} +detect_qtranslate() ) { + /* translators: %s: notice message */ + WPM_Admin_Notices::add_custom_notice( 'qtranslate_active', esc_html( sprintf( __( '%s is active. Please deactivate it.', 'wp-multilang' ), $qtranslate ), 'error' ) ); + } + } + + + /** + * Detects whether qTranslate or qTranslate-X is active. + * Returns the name of the plugin if it's detected, false otherwise. + * + * @return bool|string Either false or the plugin name + */ + private function detect_qtranslate() { + if ( defined( 'QTX_VERSION' ) ) { + return 'qTranslate-X'; + } + if ( defined( 'QT_SUPPORTED_WP_VERSION' ) ) { + return 'qTranslate'; + } + + return false; + } + +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-settings.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-settings.php index 74a5838b0..3f6ec8794 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-settings.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-settings.php @@ -1,658 +1,710 @@ - 0 ) { - foreach ( self::$errors as $error ) { - echo '

' . esc_html( $error ) . '

'; - } - } elseif ( count( self::$messages ) > 0 ) { - foreach ( self::$messages as $message ) { - echo '

' . esc_html( $message ) . '

'; - } - } - } - - /** - * Settings page. - * - * Handles the display of the main WP Multilang settings page in admin. - */ - public static function output() { - global $current_section, $current_tab; - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - do_action( 'wpm_settings_start' ); - - wp_enqueue_script( 'wpm_settings', wpm_asset_path( 'scripts/settings' . $suffix . '.js' ), array( 'jquery' ), wpm()->version, true ); - - wp_localize_script( 'wpm_settings', 'wpm_settings_params', array( - 'nav_warning' => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'wp-multilang' ), - 'wpm_admin_settings_nonce' => wp_create_nonce( 'wpm_admin_settings_nonce' ) - ) ); - - // Get tabs for the settings page - $tabs = apply_filters( 'wpm_settings_tabs_array', array() ); - - include __DIR__ . '/views/html-admin-settings.php'; - } - - /** - * Get a setting from the settings API. - * - * @param string $option_name - * @param mixed $default - * - * @return mixed - */ - public static function get_option( $option_name, $default = '' ) { - // Array value - if ( strstr( $option_name, '[' ) ) { - - parse_str( $option_name, $option_array ); - - // Option name is first key - $option_name = current( array_keys( $option_array ) ); - - // Get value - $option_values = get_option( $option_name, '' ); - - $key = key( $option_array[ $option_name ] ); - - if ( isset( $option_values[ $key ] ) ) { - $option_value = $option_values[ $key ]; - } else { - $option_value = null; - } - - // Single value - } else { - $option_value = get_option( $option_name, null ); - } - - if ( is_array( $option_value ) ) { - $option_value = array_map( 'stripslashes', $option_value ); - } elseif ( ! is_null( $option_value ) ) { - $option_value = stripslashes( $option_value ); - } - - return ( null === $option_value ) ? $default : $option_value; - } - - /** - * Output admin fields. - * - * Loops though the WP Multilang options array and outputs each field. - * - * @param array[] $options Opens array to output - */ - public static function output_fields( $options ) { - foreach ( $options as $value ) { - if ( ! isset( $value['type'] ) ) { - continue; - } - if ( ! isset( $value['id'] ) ) { - $value['id'] = ''; - } - if ( ! isset( $value['title'] ) ) { - $value['title'] = isset( $value['name'] ) ? $value['name'] : ''; - } - if ( ! isset( $value['class'] ) ) { - $value['class'] = ''; - } - if ( ! isset( $value['css'] ) ) { - $value['css'] = ''; - } - if ( ! isset( $value['default'] ) ) { - $value['default'] = ''; - } - if ( ! isset( $value['desc'] ) ) { - $value['desc'] = ''; - } - if ( ! isset( $value['desc_tip'] ) ) { - $value['desc_tip'] = false; - } - if ( ! isset( $value['placeholder'] ) ) { - $value['placeholder'] = ''; - } - - // Custom attribute handling - $custom_attributes = array(); - - if ( ! empty( $value['custom_attributes'] ) && is_array( $value['custom_attributes'] ) ) { - foreach ( $value['custom_attributes'] as $attribute => $attribute_value ) { - $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"'; - } - } - - // Description handling - $field_description = self::get_field_description( $value ); - extract( $field_description ); - - // Switch based on type - switch ( $value['type'] ) { - - // Section Titles - case 'title': - if ( ! empty( $value['title'] ) ) { - echo '

' . esc_html( $value['title'] ) . '

'; - } - if ( ! empty( $value['desc'] ) ) { - $description_escaped = wpautop( wptexturize( wp_kses_post( $value['desc'] ) ) ); - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Reason Already escaped above - echo $description_escaped; - } - echo '' . "\n\n"; - if ( ! empty( $value['id'] ) ) { - do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) ); - } - break; - - // Section Ends - case 'sectionend': - if ( ! empty( $value['id'] ) ) { - do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) . '_end' ); - } - echo '
'; - if ( ! empty( $value['id'] ) ) { - do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) . '_after' ); - } - break; - - // Standard text inputs and subtypes like 'number' - case 'text': - case 'email': - case 'number': - case 'password' : - $option_value = self::get_option( $value['id'], $value['default'] ); - - ?> - - - - - - - /> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - -
- -
- - - - - -
- - - -
- ' . wp_kses_post( $description ) . '

'; - } elseif ( $description && $value['type'] === 'checkbox' ) { - $description = wp_kses_post( $description ); - } elseif ( $description ) { - $description = '' . wp_kses_post( $description ) . ''; - } - - if ( $tooltip_html && $value['type'] === 'checkbox' ) { - $tooltip_html = '

' . $tooltip_html . '

'; - } elseif ( $tooltip_html ) { - $tooltip_html = wpm_help_tip( $tooltip_html ); - } - - return array( - 'description' => $description, - 'tooltip_html' => $tooltip_html, - ); - } - - /** - * Save admin fields. - * - * Loops though the WP Multilang options array and outputs each field. - * - * @param array $options Options array to output - * @param array $data Optional. Data to use for saving. Defaults to $_POST. - * @return bool - */ - public static function save_fields( $options, $data = null ) { - if ( null === $data ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing - $data = $_POST; - } - - if ( empty( $data ) ) { - return false; - } - - // Options to update will be stored here and saved later. - $update_options = array(); - - // Loop options and get values to save. - foreach ( $options as $option ) { - if ( ! isset( $option['id'], $option['type'] ) ) { - continue; - } - - // Get posted value. - if ( strpos($option['id'], '[') !== false ) { - parse_str( $option['id'], $option_name_array ); - $option_name = current( array_keys( $option_name_array ) ); - $setting_name = key( $option_name_array[ $option_name ] ); - $raw_value = isset( $data[ $option_name ][ $setting_name ] ) ? wp_unslash( $data[ $option_name ][ $setting_name ] ) : null; - } else { - $option_name = $option['id']; - $setting_name = ''; - $raw_value = isset( $data[ $option['id'] ] ) ? wp_unslash( $data[ $option['id'] ] ) : null; - } - - // Format the value based on option type. - switch ( $option['type'] ) { - case 'checkbox' : - $value = '1' === $raw_value || 'yes' === $raw_value ? 'yes' : 'no'; - break; - case 'textarea' : - $value = wp_kses_post( trim( $raw_value ) ); - break; - case 'multiselect' : - $value = array_filter( array_map( 'wpm_clean', (array) $raw_value ) ); - break; - case 'select': - $allowed_values = empty( $option['options'] ) ? array() : array_keys( $option['options'] ); - if ( empty( $option['default'] ) && empty( $allowed_values ) ) { - $value = null; - break; - } - $default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] ); - $value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default; - break; - default : - $value = wpm_clean( $raw_value ); - break; - } - - /** - * Sanitize the value of an option. - */ - $value = apply_filters( 'wpm_admin_settings_sanitize_option', $value, $option, $raw_value ); - - /** - * Sanitize the value of an option by option name. - */ - $value = apply_filters( "wpm_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value ); - - if ( null === $value ) { - continue; - } - - // Check if option is an array and handle that differently to single values. - if ( $option_name && $setting_name ) { - if ( ! isset( $update_options[ $option_name ] ) ) { - $update_options[ $option_name ] = get_option( $option_name, array() ); - } - if ( ! is_array( $update_options[ $option_name ] ) ) { - $update_options[ $option_name ] = array(); - } - $update_options[ $option_name ][ $setting_name ] = $value; - } else { - $update_options[ $option_name ] = $value; - } - } - - // Save all options in our array. - foreach ( $update_options as $name => $value ) { - update_option( $name, $value ); - } - - return true; - } -} + 0 ) { + foreach ( self::$errors as $error ) { + echo '

' . esc_html( $error ) . '

'; + } + } elseif ( count( self::$messages ) > 0 ) { + foreach ( self::$messages as $message ) { + echo '

' . esc_html( $message ) . '

'; + } + } + } + + /** + * Settings page. + * + * Handles the display of the main WP Multilang settings page in admin. + */ + public static function output() { + global $current_section, $current_tab; + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + do_action( 'wpm_settings_start' ); + + wp_enqueue_script( 'wpm_settings', wpm_asset_path( 'scripts/settings' . $suffix . '.js' ), array( 'jquery' ), wpm()->version, true ); + + wp_localize_script( 'wpm_settings', 'wpm_settings_params', array( + 'nav_warning' => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'wp-multilang' ), + 'wpm_admin_settings_nonce' => wp_create_nonce( 'wpm_admin_settings_nonce' ) + ) ); + + // Get tabs for the settings page + $tabs = apply_filters( 'wpm_settings_tabs_array', array() ); + + include __DIR__ . '/views/html-admin-settings.php'; + } + + /** + * Get a setting from the settings API. + * + * @param string $option_name + * @param mixed $default + * + * @return mixed + */ + public static function get_option( $option_name, $default = '' ) { + // Array value + if ( strstr( $option_name, '[' ) ) { + + parse_str( $option_name, $option_array ); + + // Option name is first key + $option_name = current( array_keys( $option_array ) ); + + // Get value + $option_values = get_option( $option_name, '' ); + + $key = key( $option_array[ $option_name ] ); + + if ( isset( $option_values[ $key ] ) ) { + $option_value = $option_values[ $key ]; + } else { + $option_value = null; + } + + // Single value + } else { + $option_value = get_option( $option_name, null ); + } + + if ( is_array( $option_value ) ) { + $option_value = array_map( 'stripslashes', $option_value ); + } elseif ( ! is_null( $option_value ) ) { + $option_value = stripslashes( $option_value ); + } + + return ( null === $option_value ) ? $default : $option_value; + } + + /** + * Output admin fields. + * + * Loops though the WP Multilang options array and outputs each field. + * + * @param array[] $options Opens array to output + */ + public static function output_fields( $options ) { + foreach ( $options as $value ) { + if ( ! isset( $value['type'] ) ) { + continue; + } + if ( ! isset( $value['id'] ) ) { + $value['id'] = ''; + } + if ( ! isset( $value['title'] ) ) { + $value['title'] = isset( $value['name'] ) ? $value['name'] : ''; + } + if ( ! isset( $value['class'] ) ) { + $value['class'] = ''; + } + if ( ! isset( $value['css'] ) ) { + $value['css'] = ''; + } + if ( ! isset( $value['default'] ) ) { + $value['default'] = ''; + } + if ( ! isset( $value['desc'] ) ) { + $value['desc'] = ''; + } + if ( ! isset( $value['desc_tip'] ) ) { + $value['desc_tip'] = false; + } + if ( ! isset( $value['placeholder'] ) ) { + $value['placeholder'] = ''; + } + + // Custom attribute handling + $custom_attributes = array(); + + if ( ! empty( $value['custom_attributes'] ) && is_array( $value['custom_attributes'] ) ) { + foreach ( $value['custom_attributes'] as $attribute => $attribute_value ) { + $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"'; + } + } + + // Description handling + $field_description = self::get_field_description( $value ); + extract( $field_description ); + + // Switch based on type + switch ( $value['type'] ) { + + // Section Titles + case 'title': + if ( ! empty( $value['title'] ) ) { + echo '

' . esc_html( $value['title'] ) . '

'; + } + if ( ! empty( $value['desc'] ) ) { + $description_escaped = wpautop( wptexturize( wp_kses_post( $value['desc'] ) ) ); + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Reason Already escaped above + echo $description_escaped; + } + echo '' . "\n\n"; + if ( ! empty( $value['id'] ) ) { + do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) ); + } + break; + + // Section Ends + case 'sectionend': + if ( ! empty( $value['id'] ) ) { + do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) . '_end' ); + } + echo '
'; + if ( ! empty( $value['id'] ) ) { + do_action( 'wpm_settings_' . sanitize_title( $value['id'] ) . '_after' ); + } + break; + + // Standard text inputs and subtypes like 'number' + case 'text': + case 'email': + case 'number': + case 'password' : + $option_value = self::get_option( $value['id'], $value['default'] ); + + ?> + + + + + + + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ +
+ + + + + +
+ + + +
+ + + + + + + + $option ) { + + $field_id = $value['id'].'['.$opt_key.']'; + $checked = ''; + ?> + + + + +
+ + > + + > + + +
+ + + value===== "; print_r($value); die; + + break; + + // Default: run an action + default: + do_action( 'wpm_admin_field_' . $value['type'], $value ); + break; + } + } + } + + /** + * Helper function to get the formatted description and tip HTML for a + * given form field. Plugins can call this when implementing their own custom + * settings types. + * + * @param array $value The form field value array + * @return array The description and tip as a 2 element array + */ + public static function get_field_description( $value ) { + $description = ''; + $tooltip_html = ''; + + if ( true === $value['desc_tip'] ) { + $tooltip_html = $value['desc']; + } elseif ( ! empty( $value['desc_tip'] ) ) { + $description = $value['desc']; + $tooltip_html = $value['desc_tip']; + } elseif ( ! empty( $value['desc'] ) ) { + $description = $value['desc']; + } + + if ( $description && in_array( $value['type'], array( 'textarea', 'radio' ) ) ) { + $description = '

' . wp_kses_post( $description ) . '

'; + } elseif ( $description && $value['type'] === 'checkbox' ) { + $description = wp_kses_post( $description ); + } elseif ( $description ) { + $description = '' . wp_kses_post( $description ) . ''; + } + + if ( $tooltip_html && $value['type'] === 'checkbox' ) { + $tooltip_html = '

' . $tooltip_html . '

'; + } elseif ( $tooltip_html ) { + $tooltip_html = wpm_help_tip( $tooltip_html ); + } + + return array( + 'description' => $description, + 'tooltip_html' => $tooltip_html, + ); + } + + /** + * Save admin fields. + * + * Loops though the WP Multilang options array and outputs each field. + * + * @param array $options Options array to output + * @param array $data Optional. Data to use for saving. Defaults to $_POST. + * @return bool + */ + public static function save_fields( $options, $data = null ) { + if ( null === $data ) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing + $data = $_POST; + } + + if ( empty( $data ) ) { + return false; + } + + // Options to update will be stored here and saved later. + $update_options = array(); + + // Loop options and get values to save. + foreach ( $options as $option ) { + if ( ! isset( $option['id'], $option['type'] ) ) { + continue; + } + + // Get posted value. + if ( strpos($option['id'], '[') !== false ) { + parse_str( $option['id'], $option_name_array ); + $option_name = current( array_keys( $option_name_array ) ); + $setting_name = key( $option_name_array[ $option_name ] ); + $raw_value = isset( $data[ $option_name ][ $setting_name ] ) ? wp_unslash( $data[ $option_name ][ $setting_name ] ) : null; + } else { + $option_name = $option['id']; + $setting_name = ''; + $raw_value = isset( $data[ $option['id'] ] ) ? wp_unslash( $data[ $option['id'] ] ) : null; + } + + // Format the value based on option type. + switch ( $option['type'] ) { + case 'checkbox' : + $value = '1' === $raw_value || 'yes' === $raw_value ? 'yes' : 'no'; + break; + case 'textarea' : + $value = wp_kses_post( trim( $raw_value ) ); + break; + case 'multiselect' : + $value = array_filter( array_map( 'wpm_clean', (array) $raw_value ) ); + break; + case 'select': + $allowed_values = empty( $option['options'] ) ? array() : array_keys( $option['options'] ); + if ( empty( $option['default'] ) && empty( $allowed_values ) ) { + $value = null; + break; + } + $default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] ); + $value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default; + break; + default : + $value = wpm_clean( $raw_value ); + break; + } + + /** + * Sanitize the value of an option. + */ + $value = apply_filters( 'wpm_admin_settings_sanitize_option', $value, $option, $raw_value ); + + /** + * Sanitize the value of an option by option name. + */ + $value = apply_filters( "wpm_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value ); + + if ( null === $value ) { + continue; + } + + // Check if option is an array and handle that differently to single values. + if ( $option_name && $setting_name ) { + if ( ! isset( $update_options[ $option_name ] ) ) { + $update_options[ $option_name ] = get_option( $option_name, array() ); + } + if ( ! is_array( $update_options[ $option_name ] ) ) { + $update_options[ $option_name ] = array(); + } + $update_options[ $option_name ][ $setting_name ] = $value; + } else { + $update_options[ $option_name ] = $value; + } + } + + // Save all options in our array. + foreach ( $update_options as $name => $value ) { + update_option( $name, $value ); + } + + return true; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-taxonomies.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-taxonomies.php index 03fe4f5c6..ccbbda8d2 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-taxonomies.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-admin-taxonomies.php @@ -1,189 +1,217 @@ - esc_html__( 'Languages', 'wp-multilang' ) ) ); - } - - - /** - * Output language columns for taxonomies. - * - * @param $columns - * @param $column - * @param $term_id - * - * @return string - */ - public function render_language_column( $columns, $column, $term_id ) { - - if ( 'languages' === $column ) { - remove_filter( 'get_term', 'wpm_translate_term', 5 ); - $term = get_term( $term_id ); - add_filter( 'get_term', 'wpm_translate_term', 5, 2 ); - $output = array(); - $text = $term->name . $term->description; - $strings = wpm_value_to_ml_array( $text ); - $languages = wpm_get_lang_option(); - - foreach ( $languages as $code => $language ) { - if ( isset( $strings[ $code ] ) && ! empty( $strings[ $code ] ) ) { - // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function - $output[] = '' . esc_attr( $language['name'] ) . ''; - } - } - - if ( ! empty( $output ) ) { - $columns .= implode( ' ', $output ); - } - } - - return $columns; - } - - - /** - * Add languages to insert term form - */ - public function add_taxonomy_fields() { - - $languages = wpm_get_languages(); - $i = 0; - ?> -
-

- $language ) { ?> - - -
- term_id, '_languages', true ); - - if ( ! is_array( $term_languages ) ) { - $term_languages = array(); - } - - $languages = wpm_get_languages(); - $i = 0; - ?> - - - - - - - esc_html__( 'Languages', 'wp-multilang' ) ) ); + } + + + /** + * Output language columns for taxonomies. + * + * @param $columns + * @param $column + * @param $term_id + * + * @return string + */ + public function render_language_column( $columns, $column, $term_id ) { + + if ( 'languages' === $column ) { + remove_filter( 'get_term', 'wpm_translate_term', 5 ); + $term = get_term( $term_id ); + add_filter( 'get_term', 'wpm_translate_term', 5, 2 ); + $output = array(); + $text = $term->name . $term->description; + $strings = wpm_value_to_ml_array( $text ); + $languages = wpm_get_lang_option(); + + foreach ( $languages as $code => $language ) { + if ( isset( $strings[ $code ] ) && ! empty( $strings[ $code ] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function + $output[] = '' . esc_attr( $language['name'] ) . ''; + } + } + + if ( ! empty( $output ) ) { + $columns .= implode( ' ', $output ); + } + } + + return $columns; + } + + + /** + * Add languages to insert term form + */ + public function add_taxonomy_fields() { + + $languages = wpm_get_languages(); + $i = 0; + ?> +
+

+ $language ) { ?> + + +
+ term_id, '_languages', true ); + + if ( ! is_array( $term_languages ) ) { + $term_languages = array(); + } + + $languages = wpm_get_languages(); + $i = 0; + ?> + + + + + + + + + + + +
+ + + + id_base ) ) { - return; - } - - $instance = wp_parse_args( (array) $instance, array( 'languages' => array() ) ); - $languages = wpm_get_languages(); - $i = 0; - ?> -

-
- $language ) { ?> -
- -

- id_base ) ) { + return; + } + + $instance = wp_parse_args( (array) $instance, array( 'languages' => array() ) ); + $languages = wpm_get_languages(); + $i = 0; + ?> +

+
+ $language ) { ?> +
+ +

+ id ) ) { - // Change the footer text - if ( ! get_option( 'wpm_admin_footer_text_rated' ) ) { - $footer_text = sprintf( - /* translators: 1: WP Multilang 2:: five stars */ - __( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'wp-multilang' ), - sprintf( '%s', esc_html__( 'WP Multilang', 'wp-multilang' ) ), - '★★★★★' - ); - wpm_enqueue_js( " - $('a.wpm-rating-link').click( function() { - $.post('" . esc_js( wpm()->ajax_url() ) . "', {action: 'wpm_rated'}); - $(this).parent().text($(this).data('rated')); - }); - " ); - } else { - $footer_text = esc_html__( 'Thank you for translating with WP Multilang.', 'wp-multilang' ); - } - } - - return $footer_text; - } -} +id ) ) { + // Change the footer text + if ( ! get_option( 'wpm_admin_footer_text_rated' ) ) { + $footer_text = sprintf( + /* translators: 1: WP Multilang 2:: five stars */ + __( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'wp-multilang' ), + sprintf( '%s', esc_html__( 'WP Multilang', 'wp-multilang' ) ), + '★★★★★' + ); + wpm_enqueue_js( " + $('a.wpm-rating-link').click( function() { + $.post('" . esc_js( wpm()->ajax_url() ) . "', {action: 'wpm_rated'}); + $(this).parent().text($(this).data('rated')); + }); + " ); + } else { + $footer_text = esc_html__( 'Thank you for translating with WP Multilang.', 'wp-multilang' ); + } + } + + return $footer_text; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-deepl.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-deepl.php new file mode 100644 index 000000000..862cfd309 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-deepl.php @@ -0,0 +1,237 @@ + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + +

+ +

+ + + + array( + 'Authorization' => 'DeepL-Auth-Key ' . $api_key, + 'Content-Type' => 'application/json', + ), + 'timeout' => 15, + ); + + $response = wp_remote_get( $url, $args ); + + if ( is_wp_error( $response ) ) { + return $response; + } + + $status_code = wp_remote_retrieve_response_code( $response ); + $response_data = json_decode( wp_remote_retrieve_body( $response ), true ); + + + if ( $status_code !== 200 ) { + $msg = isset( $response_data['message'] ) ? $response_data['message'] : 'Failed to retrieve usage.'; + return new WP_Error( 'deepl_usage_error', 'DeepL Error (' . $status_code . '): ' . $msg ); + } + + if ( + isset( $response_data['character_count'] ) && isset( $response_data['character_limit'] ) && + $response_data['character_count'] < $response_data['character_limit'] + ) { + $api_resp['status'] = true; + } else { + $api_resp['status'] = false; + } + + return $api_resp; + + } + + /** + * API request to translate content into respected language + * @param $string string + * @param $source string + * @param $target target + * @param $settings array + * @return $string translated string + * @since 2.4.30 + * */ + public static function translate_content( $string, $source, $target, $settings ) { + + $api_key = isset( $settings[ 'deepl_secret_key' ] ) ? $settings[ 'deepl_secret_key' ] : ''; + $api_plan = isset( $settings[ 'deepl_api_plan' ] ) ? $settings[ 'deepl_api_plan' ] : ''; + + if ( empty( $api_key ) || empty( $api_plan ) ) { + throw new \Exception( 'missing_key', 'API Key is required to check quota.' ); + return $string; + } + + $url = ( $api_plan === 'pro' ) ? self::PRO_END_POINT : self::FREE_END_POINT; + $url = $url . '/translate'; + + // Prepare request body with support for advanced HTML tag safety handling + $body = array( + 'text' => array( $string ), + 'target_lang' => strtoupper( $target ), + 'source_lang' => strtoupper( $source ), + 'tag_handling' => 'html' // Instructs DeepL to ignore HTML tags and structure safely + ); + + $args = array( + 'body' => json_encode( $body ), + 'headers' => array( + 'Authorization' => 'DeepL-Auth-Key ' . $api_key, + 'Content-Type' => 'application/json', + ), + 'timeout' => 30, + ); + + $response = wp_remote_post( $url, $args ); + + if ( is_wp_error( $response ) ) { + throw new \Exception( esc_html( $response->get_error_message() ) ); + return $string; + } + + $status_code = wp_remote_retrieve_response_code( $response ); + $response_data = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( $status_code !== 200 ) { + $error_message = isset( $response_data['message'] ) ? $response_data['message'] : 'Unknown DeepL HTTP error API event.'; + throw new \Exception( 'deepl_api_failure', 'DeepL Error Code (' . $status_code . '): ' . $error_message ); + return $string; + } + + if ( isset( $response_data['translations'][0]['text'] ) ) { + $translated_text = $response_data['translations'][0]['text']; + + return $translated_text; + } + + return $string; + + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-openai.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-openai.php new file mode 100644 index 000000000..9d104c5d3 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-openai.php @@ -0,0 +1,181 @@ + false, "message" => "Please check your secret key" ]; + + if ( ! empty( $_POST['secret_key'] ) ) { + $api_key = sanitize_text_field( wp_unslash( $_POST['secret_key'] ) ); + $provider = 'openai'; + + $api_url = WPM_Settings_AI_Integration::get_provider_endpoint( $provider ); + $end_point = $api_url . 'models'; + + $response = wp_remote_get( $end_point, [ + 'headers' => [ + 'Authorization' => 'Bearer ' . $api_key, + ], + 'timeout' => 20, + 'sslverify' => true, + ]); + + if ( is_wp_error( $response ) ) { + throw new \Exception( esc_html__( 'API Request WP Error: ', 'wp-multilang' ) . esc_html( $response->get_error_message() ) ); + } + + $response_code = wp_remote_retrieve_response_code( $response ); + $response_body = wp_remote_retrieve_body( $response ); + $decoded_body = json_decode( $response_body, true ); + + if ( $response_code !== 200 ) { + $error_message = '(Code: ' . $response_code . '): '; + $error_details = isset( $decoded_body['error']['message'] ) ? $decoded_body['error']['message'] : $response_body; + // Truncate long error messages from API + if ( strlen( $error_details ) > 500 ) { + $error_details = substr( $error_details, 0, 500 ) . '... (truncated)'; + } + $error_message .= $error_details; + throw new \Exception( esc_html( $error_message ) ); + } + + $models_data = null; + if ( isset( $decoded_body['data'] ) && is_array( $decoded_body['data'] ) ) { + $models_data = $decoded_body['data']; + } elseif ( is_array($decoded_body ) && ( empty($decoded_body ) || isset( $decoded_body[0]['id'] ) || ( isset( $decoded_body[0] ) && is_string( $decoded_body[0] ) ) ) ) { + // Handle cases where the response is directly an array of models (objects with 'id' or strings) + $models_data = $decoded_body; + } else { + throw new \Exception( esc_html__( 'Invalid model data structure in API response. Body: ', 'wp-multilang' ) . esc_html( substr( $response_body, 0, 200 ) ) ); + } + + $models = []; + if ( is_array( $models_data ) ) { + foreach ( $models_data as $m ) { + if ( is_array( $m ) && isset( $m['id'] ) && is_string( $m['id'] ) ) { + $models[] = $m['id']; + } elseif ( is_string( $m ) ) { // Handle cases where models are just an array of strings + $models[] = $m; + } + } + } + + $models = array_filter( array_unique( $models ) ); // Ensure unique and remove empty + sort( $models ); + + return [ + 'message' => esc_html__ ( 'Key validated successfully.', 'wp-multilang' ), + 'models' => $models, + 'api_key' => $api_key, + 'provider' => $provider, + ]; + + }else{ + throw new \InvalidArgumentException( esc_html__( 'Please enter valid API credentials for ', 'wp-multilang' ) . esc_html( $provider_key ) ); + } + + } + + /** + * @param $string string + * @param $source string + * @param $source string + * @return $string string + * @since 2.4.23 + * */ + public static function translate_content( $string, $source, $target, $settings ) { + + $provider = WPM_Settings_AI_Integration::get_api_providers(); + $provider = $provider['openai']; + + // Correct endpoint for GPT-4.1 + $endpoint = 'https://api.openai.com/v1/responses'; + + $api_key = $settings['api_keys']['openai']; + $model = $settings['model']; + $prompt = ! empty( $settings['api_prompt'] ) ? $settings['api_prompt'] : WPM_OPENAI_PROMPT; + + $prompt = str_replace( ['{{source_language}}', '{{target_language}}'], [$source, $target], $prompt ); + + // Correct request format for Responses API + $body = [ + 'model' => $model, + 'input' => [ + [ + 'role' => 'system', + 'content' => $prompt + ], + [ + 'role' => 'user', + 'content' => $string + ] + ] + ]; + + // Send request + $response = wp_remote_post( $endpoint, [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Authorization' => 'Bearer ' . $api_key, + ], + 'body' => json_encode( $body ), + 'timeout' => 30, + ]); + + if ( is_wp_error( $response ) ) { + throw new \Exception( esc_html( $response->get_error_message() ) ); + return $string; + } + + $data = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( is_array( $data ) && ! empty( $data['error'] ) && is_array( $data['error'] ) && ! empty( $data['error']['message'] ) ) { + throw new \Exception( esc_html( $data['error']['message'] ) ); + } + + // Correct response path for Responses API + if ( isset($data['output'][0]['content'][0]['text']) ) { + return $data['output'][0]['content'][0]['text']; + } + + return $string; + } + + /** + * Check if API is working fine at first, if yes then send it for further translation + * @since 2.4.23 + * */ + public static function check_ai_platform_quota() { + + $api_settings = WPM_Settings_AI_Integration::get_openai_settings(); + $api_resp['status'] = false; + $api_resp['message'] = ''; + + try{ + $response = self::translate_content( 'Hi', 'en', 'hi', $api_settings ); + $api_resp['status'] = true; + }catch ( \Throwable $e ) { + $api_resp['message'] = $e->getMessage(); + } + + return $api_resp; + + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-reset-settings.php b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-reset-settings.php index 6a3d411f6..c9ea9855f 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/class-wpm-reset-settings.php +++ b/plugins/wp-react-custom-multilang/includes/admin/class-wpm-reset-settings.php @@ -1,308 +1,340 @@ -get_results( $wpdb->prepare( "SELECT ID, " . implode( ', ', $fields ) . " FROM {$wpdb->posts} WHERE post_type = '%s';", esc_sql( $post_type ) ) ); - - foreach ( $results as $result ) { - - $args = array(); - $new_result = wpm_translate_object( $result, $default_language ); - - foreach ( get_object_vars( $new_result ) as $key => $content ) { - if ( 'ID' == $key ) { - continue; - } - - $args[ $key ] = $content; - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->posts, $args, array( 'ID' => $result->ID ) ); - } - } - - $taxonomies = get_taxonomies(); - - foreach ( $taxonomies as $taxonomy ) { - - if ( is_null( wpm_get_taxonomy_config( $taxonomy ) ) ) { - continue; - } - - //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedSimplePlaceholder, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( $wpdb->prepare( "SELECT t.term_id, `name`, description FROM {$wpdb->terms} t LEFT JOIN {$wpdb->term_taxonomy} tt ON t.term_id = tt.term_id WHERE tt.taxonomy = '%s';", esc_sql( $taxonomy ) ) ); - - foreach ( $results as $result ) { - - $result = wpm_translate_object( $result, $default_language ); - $description = $result->description; - $name = $result->name; - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_id' => $result->term_id ) ); - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->terms, compact( 'name' ), array( 'term_id' => $result->term_id ) ); - } - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_%';" ); - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_site_transient_%';" ); - - foreach ( $config as $key => $item_config ) { - - switch ( $key ) { - - case 'post_fields': - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->delete( $wpdb->postmeta, array( 'meta_key' => '_languages' ) ); - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); - foreach ( $results as $result ) { - $meta_value = $result->meta_value; - - if ( is_serialized_string( $meta_value ) ) { - $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); - } - - if ( isJSON( $meta_value ) ) { - $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $meta_value ) ) { - $meta_value = wpm_translate_string( $meta_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->postmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); - } - - break; - - case 'term_fields': - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->delete( $wpdb->termmeta, array( 'meta_key' => '_languages' ) ); - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->termmeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); - - foreach ( $results as $result ) { - $meta_value = $result->meta_value; - - if ( is_serialized_string( $meta_value ) ) { - $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); - } - - if ( isJSON( $meta_value ) ) { - $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $meta_value ) ) { - $meta_value = wpm_translate_string( $meta_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->termmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); - } - - break; - - case 'comment_fields': - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->delete( $wpdb->commentmeta, array( 'meta_key' => '_languages' ) ); - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->commentmeta} WHERE meta_value LIKE '%s' OR meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); - - foreach ( $results as $result ) { - $meta_value = $result->meta_value; - - if ( is_serialized_string( $meta_value ) ) { - $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); - } - - if ( isJSON( $meta_value ) ) { - $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $meta_value ) ) { - $meta_value = wpm_translate_string( $meta_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->commentmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); - } - - break; - - case 'user_fields': - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT umeta_id, meta_value FROM {$wpdb->usermeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); - - foreach ( $results as $result ) { - $meta_value = $result->meta_value; - - if ( is_serialized_string( $meta_value ) ) { - $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); - } - - if ( isJSON( $meta_value ) ) { - $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $meta_value ) ) { - $meta_value = wpm_translate_string( $meta_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->usermeta, compact( 'meta_value' ), array( 'umeta_id' => $result->umeta_id ) ); - } - - break; - - case 'options': - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT option_id, option_value FROM {$wpdb->options} WHERE option_value LIKE '%![:__!]%' ESCAPE '!' OR option_value LIKE '%{:__}%' OR option_value LIKE '%%';" ); - - foreach ( $results as $result ) { - $option_value = $result->option_value; - - if ( is_serialized_string( $option_value ) ) { - $option_value = serialize( wpm_translate_value( unserialize( $option_value ), $default_language ) ); - } - - if ( isJSON( $option_value ) ) { - $option_value = wp_json_encode( wpm_translate_value( json_decode( $option_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $option_value ) ) { - $option_value = wpm_translate_string( $option_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->options, compact( 'option_value' ), array( 'option_id' => $result->option_id ) ); - } - - break; - - case 'site_options': - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->sitemeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); - - foreach ( $results as $result ) { - $meta_value = $result->meta_value; - - if ( is_serialized_string( $meta_value ) ) { - $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); - } - - if ( isJSON( $meta_value ) ) { - $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); - } - - if ( wpm_is_ml_string( $meta_value ) ) { - $meta_value = wpm_translate_string( $meta_value, $default_language ); - } - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin - $wpdb->update( $wpdb->sitemeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); - } - - break; - } // End switch(). - } // End foreach(). - - // Clear any cached data that has been removed - wp_cache_flush(); - } - +get_results( $wpdb->prepare( "SELECT ID, " . implode( ', ', $fields ) . " FROM {$wpdb->posts} WHERE post_type = '%s';", esc_sql( $post_type ) ) ); + + foreach ( $results as $result ) { + + $args = array(); + $new_result = wpm_translate_object( $result, $default_language ); + + foreach ( get_object_vars( $new_result ) as $key => $content ) { + if ( 'ID' == $key ) { + continue; + } + + $args[ $key ] = $content; + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->posts, $args, array( 'ID' => $result->ID ) ); + } + } + + $taxonomies = get_taxonomies(); + + foreach ( $taxonomies as $taxonomy ) { + + if ( is_null( wpm_get_taxonomy_config( $taxonomy ) ) ) { + continue; + } + + //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedSimplePlaceholder, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( $wpdb->prepare( "SELECT t.term_id, `name`, description FROM {$wpdb->terms} t LEFT JOIN {$wpdb->term_taxonomy} tt ON t.term_id = tt.term_id WHERE tt.taxonomy = '%s';", esc_sql( $taxonomy ) ) ); + + foreach ( $results as $result ) { + + $result = wpm_translate_object( $result, $default_language ); + $description = $result->description; + $name = $result->name; + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_id' => $result->term_id ) ); + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->terms, compact( 'name' ), array( 'term_id' => $result->term_id ) ); + } + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_%';" ); + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_site_transient_%';" ); + + foreach ( $config as $key => $item_config ) { + + switch ( $key ) { + + case 'post_fields': + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->delete( $wpdb->postmeta, array( 'meta_key' => '_languages' ) ); + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); + foreach ( $results as $result ) { + $meta_value = $result->meta_value; + + if ( is_serialized_string( $meta_value ) ) { + $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); + } + + if ( isJSON( $meta_value ) ) { + $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $meta_value ) ) { + $meta_value = wpm_translate_string( $meta_value, $default_language ); + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->postmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); + } + + break; + + case 'term_fields': + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->delete( $wpdb->termmeta, array( 'meta_key' => '_languages' ) ); + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->termmeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); + + foreach ( $results as $result ) { + $meta_value = $result->meta_value; + + if ( is_serialized_string( $meta_value ) ) { + $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); + } + + if ( isJSON( $meta_value ) ) { + $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $meta_value ) ) { + $meta_value = wpm_translate_string( $meta_value, $default_language ); + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->termmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); + } + + break; + + case 'comment_fields': + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->delete( $wpdb->commentmeta, array( 'meta_key' => '_languages' ) ); + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->commentmeta} WHERE meta_value LIKE '%s' OR meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); + + foreach ( $results as $result ) { + $meta_value = $result->meta_value; + + if ( is_serialized_string( $meta_value ) ) { + $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); + } + + if ( isJSON( $meta_value ) ) { + $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $meta_value ) ) { + $meta_value = wpm_translate_string( $meta_value, $default_language ); + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->commentmeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); + } + + break; + + case 'user_fields': + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT umeta_id, meta_value FROM {$wpdb->usermeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); + + foreach ( $results as $result ) { + $meta_value = $result->meta_value; + + if ( is_serialized_string( $meta_value ) ) { + $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); + } + + if ( isJSON( $meta_value ) ) { + $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $meta_value ) ) { + $meta_value = wpm_translate_string( $meta_value, $default_language ); + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->usermeta, compact( 'meta_value' ), array( 'umeta_id' => $result->umeta_id ) ); + } + + break; + + case 'options': + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT option_id, option_value FROM {$wpdb->options} WHERE option_value LIKE '%![:__!]%' ESCAPE '!' OR option_value LIKE '%{:__}%' OR option_value LIKE '%%';" ); + + foreach ( $results as $result ) { + $option_value = $result->option_value; + + if ( is_serialized_string( $option_value ) ) { + $option_value = serialize( wpm_translate_value( unserialize( $option_value ), $default_language ) ); + } + + if ( isJSON( $option_value ) ) { + $option_value = wp_json_encode( wpm_translate_value( json_decode( $option_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $option_value ) ) { + $check_value = maybe_unserialize( $option_value ); + if ( is_array( $check_value ) || is_object( $check_value ) ) { + $option_value = serialize( wpm_translate_value( unserialize( $option_value ), $default_language ) ); + }else{ + $option_value = wpm_translate_string( $option_value, $default_language ); + } + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->options, compact( 'option_value' ), array( 'option_id' => $result->option_id ) ); + } + + /** + * Delete custom options stored by WP-Multilang plgin + * @since 2.4.17 + * */ + $delete_options = array( 'gf_display_meta_' ); + + // Prepare the LIKE conditions for the query + $like_clauses = array_map( function($prefix) use ($wpdb ) { + return $wpdb->prepare( "option_name LIKE %s", $prefix . '%' ); + }, $delete_options); + // Join the conditions with OR + $where_clause = implode( ' OR ', $like_clauses ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $custom_options = $wpdb->get_results( "SELECT * FROM {$wpdb->options} WHERE $where_clause" ); + + if ( ! empty( $custom_options ) && is_array( $custom_options ) ) { + foreach ( $custom_options as $gf_options ) { + if ( is_object( $gf_options ) && isset( $gf_options->option_id ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_id=$gf_options->option_id" ); + } + } + } + + break; + + case 'site_options': + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $results = $wpdb->get_results( "SELECT meta_id, meta_value FROM {$wpdb->sitemeta} WHERE meta_value LIKE '%![:__!]%' ESCAPE '!' OR meta_value LIKE '%{:__}%' OR meta_value LIKE '%%';" ); + + foreach ( $results as $result ) { + $meta_value = $result->meta_value; + + if ( is_serialized_string( $meta_value ) ) { + $meta_value = serialize( wpm_translate_value( unserialize( $meta_value ), $default_language ) ); + } + + if ( isJSON( $meta_value ) ) { + $meta_value = wp_json_encode( wpm_translate_value( json_decode( $meta_value, true ), $default_language ) ); + } + + if ( wpm_is_ml_string( $meta_value ) ) { + $meta_value = wpm_translate_string( $meta_value, $default_language ); + } + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Reason We are just cleaning the data that has been changed by our plugin + $wpdb->update( $wpdb->sitemeta, compact( 'meta_value' ), array( 'meta_id' => $result->meta_id ) ); + } + + break; + } // End switch(). + } // End foreach(). + + // Clear any cached data that has been removed + wp_cache_flush(); + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php b/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php index e24ddd5d6..3a66728cd 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php +++ b/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php @@ -1,79 +1,79 @@ -comment_ID, '_languages', true ); - - if ( ! is_array( $comment_languages ) ) { - $comment_languages = array(); - } - - $languages = wpm_get_languages(); - $i = 0; - ?> -

- - comment_post_ID, 'wpm_comment_count' ); - - // Return regular value after updating - return $location; - } -} +comment_ID, '_languages', true ); + + if ( ! is_array( $comment_languages ) ) { + $comment_languages = array(); + } + + $languages = wpm_get_languages(); + $i = 0; + ?> +

+ + comment_post_ID, 'wpm_comment_count' ); + + // Return regular value after updating + return $location; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php b/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php index ea46b7903..718d99ccd 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php +++ b/plugins/wp-react-custom-multilang/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php @@ -1,63 +1,63 @@ -ID, '_languages', true ); - - if ( ! is_array( $post_languages ) ) { - $post_languages = array(); - } - - $languages = wpm_get_languages(); - $i = 0; - ?> -

- - ID, '_languages', true ); + + if ( ! is_array( $post_languages ) ) { + $post_languages = array(); + } + + $languages = wpm_get_languages(); + $i = 0; + ?> +

+ + id = 'additional'; - $this->label = esc_html__( 'Additional', 'wp-multilang' ); - - parent::__construct(); - - add_action( 'wpm_admin_field_localizations', array( $this, 'localizations' ) ); - add_action( 'wpm_admin_field_qtx_import', array( $this, 'qtx_import' ) ); - } - - /** - * Get settings array. - * - * @return array - */ - public function get_settings() { - - // Hide the save button - $GLOBALS['hide_save_button'] = true; - - $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( - - array( 'title' => esc_html__( 'Actions', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'additional_options' ), - - array( - 'title' => esc_html__( 'Installed localizations', 'wp-multilang' ), - 'id' => 'wpm_installed_localizations', - 'type' => 'localizations', - ), - - array( - 'title' => esc_html__( 'qTranslate import', 'wp-multilang' ), - 'id' => 'wpm_qtx_import', - 'type' => 'qtx_import', - ), - - array( 'type' => 'sectionend', 'id' => 'additional_options' ), - - ) ); - - return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); - } - - /** - * Output the settings. - */ - public function output() { - - $main_params = array( - 'plugin_url' => wpm()->plugin_url(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'delete_localization_nonce' => wp_create_nonce( 'delete-localization' ), - 'qtx_import_nonce' => wp_create_nonce( 'qtx-import' ), - 'confirm_question' => esc_html__( 'Are you sure you want to delete this localization?', 'wp-multilang' ), - ); - wp_localize_script( 'wpm_additional_settings', 'wpm_additional_settings_params', $main_params ); - wp_enqueue_script( 'wpm_additional_settings' ); - - parent::output(); - } - - /** - * Get localizations field - * - * @param $value - */ - public function localizations( $value ) { - - $installed_localizations = wpm_get_installed_languages(); - $available_translations = wpm_get_available_translations(); - $options = get_option( 'wpm_languages', array() ); - $active = 0; - ?> - - -

- - -

- - -

-

- - - - - -

- - -

- -

-

- - - id = 'additional'; + $this->label = esc_html__( 'Additional', 'wp-multilang' ); + + parent::__construct(); + + add_action( 'wpm_admin_field_localizations', array( $this, 'localizations' ) ); + add_action( 'wpm_admin_field_qtx_import', array( $this, 'qtx_import' ) ); + } + + /** + * Get settings array. + * + * @return array + */ + public function get_settings() { + + // Hide the save button + $GLOBALS['hide_save_button'] = true; + + $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( + + array( 'title' => esc_html__( 'Actions', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'additional_options' ), + + array( + 'title' => esc_html__( 'Installed localizations', 'wp-multilang' ), + 'id' => 'wpm_installed_localizations', + 'type' => 'localizations', + ), + + array( + 'title' => esc_html__( 'qTranslate import', 'wp-multilang' ), + 'id' => 'wpm_qtx_import', + 'type' => 'qtx_import', + ), + + array( + 'title' => esc_html__( 'Import Translations', 'wp-multilang' ), + 'id' => 'wpm_import_translations', + 'type' => 'import_translations', + ), + + array( 'type' => 'sectionend', 'id' => 'additional_options' ), + + ) ); + + return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); + } + + /** + * Output the settings. + */ + public function output() { + + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'delete_localization_nonce' => wp_create_nonce( 'delete-localization' ), + 'qtx_import_nonce' => wp_create_nonce( 'qtx-import' ), + 'confirm_question' => esc_html__( 'Are you sure you want to delete this localization?', 'wp-multilang' ), + ); + wp_localize_script( 'wpm_additional_settings', 'wpm_additional_settings_params', $main_params ); + wp_enqueue_script( 'wpm_additional_settings' ); + + parent::output(); + } + + /** + * Get localizations field + * + * @param $value + */ + public function localizations( $value ) { + + $installed_localizations = wpm_get_installed_languages(); + $available_translations = wpm_get_available_translations(); + $options = get_option( 'wpm_languages', array() ); + $active = 0; + ?> + + +

+ + +

+ + +

+

+ + + + + +

+ + +

+ +

+

+ + + id = 'ai_integration'; + $this->label = esc_html__( 'AI Integration', 'wp-multilang' ); + + parent::__construct(); + + add_action( 'admin_enqueue_scripts', array( $this, 'load_admin_scripts_and_styles' ) ); + add_action( 'wpm_openai_settings', array( $this,'output' ) ); + } + + /** + * Get API configurations + * @since 2.4.23 + * */ + public static function get_openai_settings() { + + $defaults = [ + 'api_keys' => [], + 'api_provider' => '', + 'model' => '', + 'api_prompt' => WPM_OPENAI_PROMPT, + 'api_available_models' => [], + 'deepl_secret_key' => '', + 'deepl_api_plan' => '', + ]; + $ai_settings = get_option( 'wpm_openai_settings', $defaults ); + $ai_settings['wpm_openai_integration'] = get_option( 'wpm_openai_integration' ); + return $ai_settings; + + } + + /** + * Return api privider details + * @since 2.4.23 + * */ + public static function get_api_providers(){ + + return [ + 'openai' => [ + 'name' => 'OpenAI', + 'endpoint' => 'https://api.openai.com/v1/', + 'url' => 'https://platform.openai.com/' + ], + 'deepl' => [ + 'name' => 'DeepL', + 'endpoint' => 'https://api-free.deepl.com/v2/', + 'url' => 'https://www.deepl.com/pro-api', + ], + ]; + + } + + /** + * Get provider endpoint URL + * @since 2.4.23 + * */ + public static function get_provider_endpoint( $provider ){ + + $providers = self::get_api_providers(); + + return $providers[$provider]['endpoint']; + + } + + /** + * Load admin scripts and styles + * @since 2.4.23 + * */ + public function load_admin_scripts_and_styles( $hook ) { + + if ( $hook === 'toplevel_page_wpm-settings' ) { + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_register_script( 'wpm_openai', wpm_asset_path( 'scripts/admin-openai' . $suffix . '.js' ), array(), WPM_VERSION, true ); + $translator_params = array( + 'languages' => array_keys( wpm_get_languages() ), + 'default_language' => wpm_get_default_language(), + 'language' => wpm_get_language(), + 'wpmpro_openai_nonce' => wp_create_nonce( 'wpmpro-openai-nonce' ), + 'is_pro_active' => wpm_is_pro_active(), + 'ai_api_providers' => self::get_api_providers(), + ); + $translator_params = WPM_Settings_Auto_Translate_Pro::filter_js_params( $translator_params ); + wp_localize_script( 'wpm_openai', 'wpm_openai_params', $translator_params ); + wp_enqueue_script( 'wpm_openai' ); + + wp_enqueue_style( 'wpm-openai-css', wpm_asset_path( 'styles/admin/wpm-openai' . $suffix . '.css' ), array(), WPM_VERSION ); + + } + + } + + public function output() { + + $GLOBALS['hide_save_button'] = true; + + $providers = self::get_api_providers(); + $ai_settings = self::get_openai_settings(); + + $provider = $ai_settings['api_provider']; + $secret_key = ''; + $prompt = WPM_OPENAI_PROMPT; + if ( ! empty( $ai_settings['api_keys'] ) && ! empty( $ai_settings['api_keys']['openai'] ) ) { + $secret_key = $ai_settings['api_keys']['openai']; + } + if ( ! empty( $ai_settings['api_prompt'] ) ) { + $prompt = $ai_settings['api_prompt']; + } + $models = []; + if ( ! empty( $ai_settings['api_available_models'] ) && ! empty( $ai_settings['api_available_models']['openai'] ) ) { + $models = $ai_settings['api_available_models']['openai']; + } + $selected_model = ''; + if ( ! empty( $ai_settings['model'] ) ) { + $selected_model = $ai_settings['model']; + } + + $wpm_openai_integration = get_option( 'wpm_openai_integration', '0' ); + + $hide_class = ''; + $hide_child = 'wpm-hide'; + if ( $ai_settings['api_provider'] === 'multilang' || empty( $ai_settings['api_provider'] ) || empty( $ai_settings['model'] ) || empty( $models ) ) { + $hide_class = 'wpm-hide'; + } + + if ( $wpm_openai_integration === '1' ) + $hide_child = ''; + ?> +
+

+

AI Integration Docs', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs' ) ) ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +
+ +
+
+ + + + + +
+
+
+
+ + + +
+ + + +

{{source_language}} {{target_language}},

+
+
+ + +
+ + + + 🚀 Coming Soon + +
+
+ + +
+ + + + 🚀 Coming Soon + +
+
+ +
+
+ sprintf( + 'Prompt must contain the placeholder: %s', + $placeholder + ) + ] ); + + return; + } + } + + if ( $provider !== 'multilang' ) { + $model = sanitize_text_field( wp_unslash( $_POST['model'] ) ); + } + + $deepl_secret_key = isset( $_POST['wpm_deepl_secret_key'] ) ? sanitize_text_field( wp_unslash( $_POST['wpm_deepl_secret_key'] ) ) : ''; + $deepl_api_plan = isset( $_POST['wpm_deepl_api_plan'] ) ? sanitize_text_field( wp_unslash( $_POST['wpm_deepl_api_plan'] ) ) : 'free'; + $deepl_plans = array( 'free', 'pro' ); + if ( ! in_array( $deepl_api_plan, $deepl_plans ) ) { + $deepl_api_plan = 'free'; + } + + $api_settings = self::get_openai_settings(); + + $api_settings['api_provider'] = $provider; + $api_settings['model'] = $model; + $api_settings['api_prompt'] = $prompt; + $api_settings['deepl_secret_key'] = $deepl_secret_key; + $api_settings['deepl_api_plan'] = $deepl_api_plan; + + update_option( 'wpm_openai_settings', $api_settings ); + + $wpm_openai_integration = isset( $_POST['wpm_openai_integration'] ) ? sanitize_text_field( wp_unslash( $_POST['wpm_openai_integration'] ) ) : '0'; + update_option( 'wpm_openai_integration', $wpm_openai_integration ); + + $wpm_deepl_integration = isset( $_POST['wpm_deepl_integration'] ) ? sanitize_text_field( wp_unslash( $_POST['wpm_deepl_integration'] ) ) : '0'; + update_option( 'wpm_deepl_integration', $wpm_deepl_integration ); + + $deepl_settings = + + wp_send_json_success( [ + 'message' => 'Settings saved successfully.' + ] ); + + } + + /** + * Check quota + * @since 2.4.23 + * */ + public static function check_ai_platform_quota() { + + $response['status'] = false; + $response['message'] = ''; + + $api_resp = []; + + $provider = sanitize_text_field( wp_unslash( $_POST['provider'] ) ); + $api_settings = self::get_openai_settings(); + $api_key = ''; + if ( ! empty( $api_settings['api_keys'] ) && is_array( $api_settings['api_keys'] ) && ! empty( $api_settings['api_keys']['openai'] ) ) { + $api_key = $api_settings['api_keys']['openai']; + } + + if ( empty( $api_key ) ) { + return $response; + } + + switch( $provider ) { + + case 'openai': + $api_resp = WPM_OpenAI::check_ai_platform_quota( $api_key ); + break; + + } + + return $api_resp; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate-pro.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate-pro.php new file mode 100644 index 000000000..209064a72 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate-pro.php @@ -0,0 +1,1857 @@ + admin_url( 'admin-ajax.php' ), + 'ajaxurl' => admin_url( 'admin-ajax.php' ), // Also provide ajaxurl for compatibility + 'source_language' => function_exists('wpm_get_default_language') ? wpm_get_default_language() : 'en', + 'target_language' => function_exists('wpm_get_language') ? wpm_get_language() : 'en', + 'post_id' => get_the_ID(), + 'tag_id' => $tag_id, + 'wpmpro_autotranslate_singular_nonce' => wp_create_nonce( 'wpmpro-autotranslate-singular-nonce' ), + ); + + $main_params = self::filter_js_params( $main_params ); + + wp_register_script('wpmpro-singular-autotranslate', wpm_asset_path( 'scripts/wpmpro-autotranslate-singular' . $suffix . '.js' ), array('jquery', 'select2'), WPM_VERSION); + wp_localize_script( 'wpmpro-singular-autotranslate', 'wpmpro_ats_localize_data', $main_params ); + + wp_enqueue_style('wpmpro-singular-autotranslate', wpm_asset_path( 'styles/admin/wpmpro-autotranslate-singular' . $suffix . '.css' ), array(), WPM_VERSION); + + } + } + + /** + * Localize and enqueue script + * @param $main_params Array this action hook is called in core plugin + * @since 1.4 + * */ + public function get_localize_data( $main_params ){ + $main_params = self::filter_js_params( $main_params ); + wp_localize_script( 'wpmpro-autotranslate', 'wpmpro_autotranslate_localize_data', $main_params ); + wp_enqueue_script( 'wpmpro-autotranslate' ); + } + + + /** + * Add license status to js params + * @param $main_params array + * @return $main_params array + * @since 1.10 + * */ + public static function filter_js_params( $main_params ){ + + $main_params['license_status'] = ''; + $license = get_option( 'wpmpro_upgrade_license' ); + $main_params['confirmation_message'] = esc_html__( 'Are you sure you want to auto translate this content? It will overwrite the existing content for the current language.', 'wp-multilang' ); + $main_params['nonce'] = wp_create_nonce('wpmpro_search_items'); + if ( is_array( $license ) && ! empty( $license['pro'] ) && is_array( $license['pro'] ) && ! empty( $license['pro']['license_key_status'] ) ){ + $main_params['license_status'] = $license['pro']['license_key_status']; + } + + $ai_settings = WPM_Settings_AI_Integration::get_openai_settings(); + $main_params['ai_settings'] = $ai_settings; + + + $main_params['is_pro_active'] = wpm_is_pro_active(); + $main_params = apply_filters( 'wpm_filter_autotranslate_localize_data', $main_params ); + + return $main_params; + + } + + /** + * Auto translate meta box callback function + * @param $post WP_post object + * @since 1.10 + * */ + public static function auto_translate_metabox_output( $post ) { + + wp_enqueue_script( 'wpmpro-singular-autotranslate' ); + + + ?> +
+

+ + +
+ + true, 'message'=>esc_html__('Batch processed','wp-multilang')); + + if ( $post && isset($post->ID) ) { + + $post_arr = array(); + $should_update = false; + + $post_title = $post->post_title; + $post_content = $post->post_content; + $post_excerpt = $post->post_excerpt; + + $is_title_exist = wpm_ml_check_language_string( $post_title, $target ); + + // Check if we should translate title (either doesn't exist OR override is true) + if ( $is_title_exist === false ) { + $is_src_title_exist = wpm_ml_check_language_string( $post_title, $source ); + + if( $is_src_title_exist === false ) { + $post_title = '[:'.$source.']'.$post_title.'[:]'; + } + // Get the source title and translate it + $source_title = wpm_ml_get_language_string( $post_title, $source ); + $new_title = wpm_ml_auto_translate_content( $source_title, $source, $target, $batch_start, $batch_size ); + $new_slug = $new_title; + + $new_title = '[:'.$target.']'.$new_title.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_title)) { + $post->post_title = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_title, $post_title); + } else { + // No existing target language, append to the end + $post->post_title = str_replace('[:]', $new_title, $post_title); + } + + $should_update = true; + + self::auto_translate_slug( $post->ID, $target, $post->post_type, $new_slug ); + } + + $is_content_exist = wpm_ml_check_language_string($post_content,$target); + + // Check if we should translate content (either doesn't exist OR override is true) + if ( $is_content_exist === false ) { + $is_src_content_exist = wpm_ml_check_language_string($post_content,$source); + + if ( $is_src_content_exist === false ) { + $post_content = '[:'.$source.']'.$post_content.'[:]'; + } + + $source_content = wpm_ml_get_language_string($post_content,$source); + $new_content = wpm_ml_auto_translate_content($source_content,$source,$target, $batch_start, $batch_size); + + $new_content = '[:'.$target.']'.$new_content.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_content)) { + $post->post_content = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_content, $post_content); + } else { + // No existing target language, append to the end + $post->post_content = str_replace('[:]', $new_content, $post_content); + } + + $should_update = true; + } + + if($post_excerpt){ + $is_excerpt_exist = wpm_ml_check_language_string( $post_excerpt, $target ); + + // Check if we should translate excerpt (either doesn't exist OR override is true) + if ( $is_excerpt_exist === false ) { + $is_src_excerpt_exist = wpm_ml_check_language_string($post_excerpt,$source); + + if ( $is_src_excerpt_exist === false ) { + $post_excerpt = '[:'.$source.']'.$post_excerpt.'[:]'; + } + + $source_excerpt = wpm_ml_get_language_string($post_excerpt,$source); + $new_excerpt = wpm_ml_auto_translate_content($source_excerpt,$source,$target, $batch_start, $batch_size); + + $new_excerpt = '[:'.$target.']'.$new_excerpt.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_excerpt)) { + $post->post_excerpt = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_excerpt, $post_excerpt); + } else { + // No existing target language, append to the end + $post->post_excerpt = str_replace('[:]', $new_excerpt, $post_excerpt); + } + + $should_update = true; + } + } + + if ( $batch_start === 0 && function_exists( 'acf_get_field' ) ) { + self::auto_translate_acf_fields( $post->ID, $source, $target, true ); + } + + $post_arr = array( + 'ID' => $post->ID, + 'post_title' => $post->post_title, + 'post_content' => $post->post_content + ); + if($post->post_excerpt){ + $post_arr['post_excerpt'] = $post->post_excerpt; + } + + if ( $should_update == true ) { + + $result = wp_update_post( $post_arr ); + + if ( is_wp_error( $result ) ) { + // Handle error. + $error_message = $result->get_error_message(); + $response = array('status'=>false, 'message'=>$error_message); + } elseif ( $result === 0 ) { + $response = array('status'=>false, 'message'=>esc_html__('Translation can not be updated','wp-multilang')); + } else { + $message = esc_html__('Batch translation updated successfully','wp-multilang'); + $response = array('status'=>true, 'message'=>$message); + } + } else { + $response = array('status'=>false, 'message'=>esc_html__('No updates needed','wp-multilang')); + } + } + + return $response; + } + + /** + * Auto translate post data + * @param $post WP_Post + * @param $source string + * @param $target string + * @return $response array + * @since 1.10 + * */ + public static function is_slug_exists( $post_id, $current_lang ){ + global $wpdb; + $table_name = $wpdb->prefix.WPM_SLUG_TABLE; + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $count = $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM {$table_name} WHERE slug_id = %d AND language = %s", $post_id, $current_lang ) ); + return $count; + } + public static function auto_translate( $post, $source, $target, $override = false ){ + + $response = array('status'=>true, 'message'=>esc_html__('Already Processed','wp-multilang')); + + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- This function does not handle any form submission so nonce not needed here. + if (isset($_POST['excluded_items']) && !empty($_POST['excluded_items'])) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This function does not handle any form submission so nonce not needed here. + $excluded_items = json_decode(stripslashes($_POST['excluded_items']), true); + $post_type = get_post_type($post); + + if (isset($excluded_items[$post_type]) && in_array($post->ID, $excluded_items[$post_type])) { + $response['status'] = false; + $response['message'] = esc_html__('Item excluded from translation', 'wp-multilang'); + return $response; + } + } + + if ( $post && isset($post->ID) ) { + + $post_arr = array(); + $should_update = false; + + $post_title = $post->post_title; + $post_content = $post->post_content; + $post_excerpt = $post->post_excerpt; + + + $is_title_exist = wpm_ml_check_language_string( $post_title, $target ); + + + // Check if we should translate title (either doesn't exist OR override is true) + if ( $is_title_exist === false || $override === true ) { + $is_src_title_exist = wpm_ml_check_language_string( $post_title, $source ); + + if( $is_src_title_exist === false ) { + $post_title = '[:'.$source.']'.$post_title.'[:]'; + } + // Get the source title and translate it + $source_title = wpm_ml_get_language_string( $post_title, $source ); + $new_title = wpm_ml_auto_translate_content( $source_title, $source, $target ); + $new_slug = $new_title; + + // If override is true and content exists, remove existing target language content first + if ( $override === true && $is_title_exist === true ) { + $pattern = '/\[:'.$target.'\][^\[]*(?:\[:\])?/'; + $post->post_title = preg_replace($pattern, '', $post_title); + // Ensure we have proper structure before adding new translation + if (strpos($post->post_title, '[:]') === false) { + $post->post_title = $post->post_title . '[:]'; + } + $post->post_title = str_replace('[:]', '[:'.$target.']'.$new_title.'[:]', $post->post_title); + }else{ + $new_title = '[:'.$target.']'.$new_title.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_title)) { + $post->post_title = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_title, $post_title); + } else { + // No existing target language, append to the end + $post->post_title = str_replace('[:]', $new_title, $post_title); + } + } + + + + $should_update = true; + + self::auto_translate_slug( $post->ID, $target, $post->post_type, $new_slug ); + + } + + $is_content_exist = wpm_ml_check_language_string($post_content,$target); + + // Check if we should translate content (either doesn't exist OR override is true) + if ( $is_content_exist === false || $override === true ) { + $is_src_content_exist = wpm_ml_check_language_string($post_content,$source); + + if ( $is_src_content_exist === false ) { + $post_content = '[:'.$source.']'.$post_content.'[:]'; + } + + $source_content = wpm_ml_get_language_string($post_content,$source); + $new_content = wpm_ml_auto_translate_content($source_content,$source,$target); + + + + // If override is true and content exists, remove existing target language content first + if ( $override === true && $is_content_exist === true ) { + $pattern = '/\[:'.$target.'\][^\[]*(?:\[:\])?/'; + $post->post_content = preg_replace($pattern, '', $post_content); + // Ensure we have proper structure before adding new translation + if (strpos($post->post_content, '[:]') === false) { + $post->post_content = $post->post_content . '[:]'; + } + $post->post_content = str_replace('[:]', '[:'.$target.']'.$new_content.'[:]', $post->post_content); + }else{ + $new_content = '[:'.$target.']'.$new_content.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_content)) { + $post->post_content = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_content, $post_content); + } else { + // No existing target language, append to the end + $post->post_content = str_replace('[:]', $new_content, $post_content); + } + } + + $should_update = true; + } + + if($post_excerpt){ + $is_excerpt_exist = wpm_ml_check_language_string( $post_excerpt, $target ); + + // Check if we should translate excerpt (either doesn't exist OR override is true) + if ( $is_excerpt_exist === false || $override === true ) { + $is_src_excerpt_exist = wpm_ml_check_language_string($post_excerpt,$source); + + if ( $is_src_excerpt_exist === false ) { + $post_excerpt = '[:'.$source.']'.$post_excerpt.'[:]'; + } + + $source_excerpt = wpm_ml_get_language_string($post_excerpt,$source); + $new_excerpt = wpm_ml_auto_translate_content($source_excerpt,$source,$target); + + + // If override is true and content exists, remove existing target language content first + if ( $override === true && $is_excerpt_exist === true ) { + $pattern = '/\[:'.$target.'\][^\[]*(?:\[:\])?/'; + $post->post_excerpt = preg_replace($pattern, '', $post_excerpt); + // Ensure we have proper structure before adding new translation + if (strpos($post->post_excerpt, '[:]') === false) { + $post->post_excerpt = $post->post_excerpt . '[:]'; + } + $post->post_excerpt = str_replace('[:]', '[:'.$target.']'.$new_excerpt.'[:]', $post->post_excerpt); + }else{ + $new_excerpt = '[:'.$target.']'.$new_excerpt.'[:]'; + // Check if there's already a [:target] section to replace + if (preg_match('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $post_excerpt)) { + $post->post_excerpt = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', $new_excerpt, $post_excerpt); + } else { + // No existing target language, append to the end + $post->post_excerpt = str_replace('[:]', $new_excerpt, $post_excerpt); + } + } + + $should_update = true; + } + } + + if ( class_exists( '\Elementor\Plugin' ) ) { + + // DEBUG: Log Elementor processing start + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== ELEMENTOR PROCESSING START ===\n"; + $debug_entry .= "Post ID: {$post->ID} | Source: {$source} | Target: {$target} | Override: " . ($override ? 'Yes' : 'No') . "\n"; + + $meta_keys = [ + '_elementor_data', + '_elementor_template', + '_elementor_element_cache', + ]; + + foreach ($meta_keys as $meta_key) { + $data = get_post_meta($post->ID, $meta_key, true); + $debug_entry .= "Processing meta key: {$meta_key}\n"; + $debug_entry .= "Data exists: " . (!empty($data) ? 'Yes' : 'No') . " | Length: " . (empty($data) ? 0 : strlen($data)) . "\n"; + + if( !$data ) { + $debug_entry .= "Skipping {$meta_key} - no data\n"; + continue; + } + + $data_translate = get_post_meta($post->ID, $meta_key . '_translate', true); + $is_data_exists = wpm_ml_check_language_string($data_translate, $target); + + $debug_entry .= "Translate meta exists: " . (!empty($data_translate) ? 'Yes' : 'No') . " | Length: " . (empty($data_translate) ? 0 : strlen($data_translate)) . "\n"; + $debug_entry .= "Target data exists: " . ($is_data_exists ? 'Yes' : 'No') . "\n"; + + // Check if we should translate meta data (either doesn't exist OR override is true) + if ($is_data_exists === false || $override === true) { + + $debug_entry .= "Will translate {$meta_key}\n"; + + $is_src_data_exists = wpm_ml_check_language_string($data_translate, $source); + $debug_entry .= "Source data exists: " . ($is_src_data_exists ? 'Yes' : 'No') . "\n"; + + // Get source data - if it exists in translated structure, use that, otherwise use original data + if ($is_src_data_exists === true) { + $source_data = wpm_ml_get_language_string($data_translate, $source); + if (base64_decode($source_data, true) !== false) { + $source_data = base64_decode($source_data); + } + $debug_entry .= "Using existing source data from translate meta\n"; + } else { + $source_data = $data; + // If source data doesn't exist in proper format, create it + $data_translate = '[:' . $source . ']' . base64_encode($source_data) . '[:]'; + $debug_entry .= "Using original data and creating translate meta structure\n"; + } + + $textToTranslate = []; + $translated_source = $source_data; + if($meta_key == '_elementor_data' || $meta_key == '_elementor_template' || $meta_key == '_elementor_element_cache') { + $data_array = json_decode($source_data, true); + $debug_entry .= "JSON decode successful: " . ($data_array ? 'Yes' : 'No') . "\n"; + if ($data_array) { + self::extractTextFields($data_array,$textToTranslate); + $debug_entry .= "Text fields extracted: " . count($textToTranslate) . "\n"; + + // Filter out untranslatable strings before batching + $filterable = array(); + $filter_keys = array(); + foreach ( $textToTranslate as $key => $text ) { + if ( ! wpm_ml_is_untranslatable( $text ) ) { + $filterable[] = $text; + $filter_keys[] = $key; + } + } + + $debug_entry .= "Translatable fields after filtering: " . count($filterable) . "\n"; + + // Batch translate all Elementor text fields at once + $translated_batch = wpm_ml_batch_translate( $filterable, $source, $target ); + + // Map translations back and apply str_replace on the source JSON + foreach ( $filter_keys as $i => $orig_key ) { + $text = $textToTranslate[ $orig_key ]; + $trabs = isset( $translated_batch[ $i ] ) ? $translated_batch[ $i ] : $text; + + $debug_entry .= "Text: '{$text}' -> Translation: '{$trabs}'\n"; + + if ( $trabs != 'false' && $trabs !== $text ) { + if ( preg_match( '/<[^<]+>/', $translated_source ) === 1 ) { + $original_unescaped = stripslashes( $text ); + $translated_unescaped = stripslashes( $trabs ); + + $original_json = json_encode( $text, JSON_UNESCAPED_SLASHES ); + $translated_json = json_encode( $trabs, JSON_UNESCAPED_SLASHES ); + + $patterns = [ + $text, + $original_unescaped, + $original_json, + json_encode( $text ) + ]; + $replacements = [ + $trabs, + $translated_unescaped, + $translated_json, + json_encode( $trabs ) + ]; + $translated_source = str_replace( $patterns, $replacements, $translated_source ); + } else { + $translated_source = str_replace( '"' . $text . '"', '"' . $trabs . '"', $translated_source ); + } + } + } + + if( $meta_key == '_elementor_element_cache' ){ + delete_post_meta($post->ID, $meta_key); + $debug_entry .= "Deleted element cache meta\n"; + } + + } + }else { + $translated_source = wpm_ml_auto_translate_content($source_data, $source, $target); + $debug_entry .= "Direct translation applied\n"; + } + + $debug_entry .= "Translation result: " . ($translated_source != false ? 'Success' : 'Failed') . "\n"; + + if ($translated_source != false) { + $translated_source = '[:' . $target . ']' . base64_encode( $translated_source ) . '[:]'; + + // If override is true and data exists, remove existing target language content first + if ( $override === true && $is_data_exists !== false ) { + $pattern = '/\[:'.$target.'\][^\[]*(?:\[:\])?/'; + $data_translate = preg_replace($pattern, '', $data_translate); + $debug_entry .= "Removed existing target language content\n"; + $debug_entry .= "After removal: " . substr($data_translate, 0, 100) . "...\n"; + } + + // Ensure we have proper structure before adding new translation + if (strpos($data_translate, '[:]') === false) { + // If no [:], add it at the end + $data_translate = $data_translate . '[:]'; + } + + $new_data_string = str_replace('[:]', $translated_source, $data_translate); + $debug_entry .= "Final Elementor data string: " . substr($new_data_string, 0, 100) . "...\n"; + + // DEBUG: Check if the new data string is valid + $debug_entry .= "New data string length: " . strlen($new_data_string) . "\n"; + $debug_entry .= "New data string preview: " . substr($new_data_string, 0, 200) . "...\n"; + + // DEBUG: Check if the meta key exists + $existing_meta = get_post_meta($post->ID, $meta_key . '_translate', true); + $debug_entry .= "Existing meta length: " . strlen($existing_meta) . "\n"; + + // DEBUG: Try to update the meta + $update_result = update_post_meta( + $post->ID, + $meta_key . '_translate', + $new_data_string + ); + + $debug_entry .= "Meta update result: " . ($update_result ? 'Success' : 'Failed') . "\n"; + + // DEBUG: If update failed, try to get the error + if (!$update_result) { + global $wpdb; + $debug_entry .= "Last database error: " . $wpdb->last_error . "\n"; + + // Try to insert instead of update + $insert_result = add_post_meta($post->ID, $meta_key . '_translate', $new_data_string, true); + $debug_entry .= "Insert attempt result: " . ($insert_result ? 'Success' : 'Failed') . "\n"; + + if (!$insert_result) { + // Try to delete and re-insert + delete_post_meta($post->ID, $meta_key . '_translate'); + $insert_result = add_post_meta($post->ID, $meta_key . '_translate', $new_data_string, true); + $debug_entry .= "Delete and re-insert result: " . ($insert_result ? 'Success' : 'Failed') . "\n"; + } + + // Update the result for the should_update flag + $update_result = $insert_result; + } + + // Set should_update flag to true since we updated meta data + $should_update = true; + } + + } else { + $debug_entry .= "Skipping translation for {$meta_key} - target data exists and override is false\n"; + } + + $debug_entry .= "---\n"; + } + + $debug_entry .= "=== ELEMENTOR PROCESSING END ===\n\n"; + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + } + + /* + Bricks auto translation + */ + if ( class_exists( '\Bricks\Frontend' ) ) { + + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== BRICKS PROCESSING START ===\n"; + $debug_entry .= "Post ID: {$post->ID} | Source: {$source} | Target: {$target} | Override: " . ($override ? 'Yes' : 'No') . "\n"; + + // Bricks stores content in these meta keys + $bricks_meta_keys = [ + '_bricks_page_content_2', + ]; + + foreach ( $bricks_meta_keys as $meta_key ) { + $data = get_post_meta( $post->ID, $meta_key, true ); + + global $wpdb; + $raw_meta_value = $wpdb->get_var( + $wpdb->prepare( + "SELECT meta_value + FROM $wpdb->postmeta + WHERE meta_key = %s + AND post_id = %d", + $meta_key, + $post->ID + ) + ); + if ( is_serialized( $raw_meta_value ) ) { + $data = maybe_unserialize( $raw_meta_value ); + } + + $debug_entry .= "Processing meta key: {$meta_key}\n"; + $debug_entry .= "Data exists: " . (!empty($data) ? 'Yes' : 'No') . " | Length: " . (empty($data) ? 0 : strlen(maybe_serialize($data))) . "\n"; + + if ( empty($data) ) { + $debug_entry .= "Skipping {$meta_key} - no data\n"; + continue; + } + + // Bricks data may be stored as serialized array or JSON string + if ( is_string($data) ) { + $data_array = json_decode( $data, true ); + if ( json_last_error() !== JSON_ERROR_NONE ) { + $data_array = maybe_unserialize( $data ); + } + } else { + $data_array = $data; // already unserialized by get_post_meta + } + + $debug_entry .= "Parsed to array: " . (is_array($data_array) ? 'Yes (' . count($data_array) . ' elements)' : 'No') . "\n"; + + if ( ! is_array($data_array) ) { + $debug_entry .= "Skipping {$meta_key} - could not parse to array\n"; + continue; + } + + // Re-serialize to string for the translate meta storage (consistent with Elementor approach) + $data_string = wp_json_encode( $data_array ); + + $data_translate = get_post_meta( $post->ID, $meta_key . '_translate', true ); + $is_data_exists = wpm_ml_check_language_string( $data_translate, $target ); + + $debug_entry .= "Translate meta exists: " . (!empty($data_translate) ? 'Yes' : 'No') . "\n"; + $debug_entry .= "Target data exists: " . ($is_data_exists ? 'Yes' : 'No') . "\n"; + + if ( $is_data_exists === false || $override === true ) { + + $debug_entry .= "Will translate {$meta_key}\n"; + + $is_src_data_exists = wpm_ml_check_language_string( $data_translate, $source ); + $debug_entry .= "Source data exists: " . ($is_src_data_exists ? 'Yes' : 'No') . "\n"; + + if ( $is_src_data_exists === true ) { + $source_data = wpm_ml_get_language_string( $data_translate, $source ); + + if ( base64_decode($source_data, true) !== false ) { + $source_data = base64_decode( $source_data ); + } + $source_data = maybe_unserialize($source_data); + $source_data = wp_json_encode( $source_data ); + + $debug_entry .= "Using existing source data from translate meta\n"; + } else { + $source_data = $data_string; + // $source_data = json_decode( $source_data, true ); + // $source_data = maybe_serialize( $source_data ); + + $data_translate = '[:' . $source . ']' . base64_encode($raw_meta_value) . '[:]'; + $debug_entry .= "Using original data and creating translate meta structure\n"; + } + + // Extract text fields from Bricks flat array structure + $textToTranslate = []; + if ( is_string($source_data) ) { + $source_array = json_decode( $source_data, true ); + if ( json_last_error() !== JSON_ERROR_NONE ) { + $source_array = maybe_unserialize( $source_data ); + } + } + + if ( is_array($source_array) ) { + self::extractBricksTextFields( $source_array, $textToTranslate ); + $debug_entry .= "Bricks text fields extracted: " . count($textToTranslate) . "\n"; + } + + // DO NOT stripslashes on the raw JSON — it corrupts escape sequences inside string values. + // Work directly on the decoded array, re-encode cleanly at the end. + $source_array_to_translate = json_decode( $source_data, true ); + if ( json_last_error() !== JSON_ERROR_NONE || ! is_array($source_array_to_translate) ) { + $source_array_to_translate = maybe_unserialize( $source_data ); + } + + // Translate in-place on the decoded array, then re-encode once at the end. + // This avoids all string-replacement fragility against JSON-encoded HTML. + if ( is_array($source_array_to_translate) ) { + self::translateBricksTextFieldsInArray( $source_array_to_translate, $source, $target ); + $translated_source = wp_json_encode( $source_array_to_translate, JSON_UNESCAPED_UNICODE ); + } else { + // Fallback: could not decode, skip translation + $translated_source = false; + } + + // Batch-translate extracted Bricks text fields for JSON str_replace + $bricks_plain = array(); + $bricks_html = array(); + $bricks_plain_k = array(); + $bricks_html_k = array(); + + foreach ( $textToTranslate as $key => $text ) { + if ( empty( trim( $text ) ) || wpm_ml_is_untranslatable( $text ) ) { + continue; + } + if ( preg_match( '/<[^>]+>/', $text ) ) { + $bricks_html[] = $text; + $bricks_html_k[] = $key; + } else { + $bricks_plain[] = $text; + $bricks_plain_k[] = $key; + } + } + + // Batch plain-text fields + $bricks_plain_translated = array(); + if ( ! empty( $bricks_plain ) ) { + $bricks_plain_translated = wpm_ml_batch_translate( $bricks_plain, $source, $target ); + } + + // Build a full translation map: original_key => translated_text + $bricks_tr_map = array(); + foreach ( $bricks_plain_k as $pi => $orig_key ) { + $bricks_tr_map[ $orig_key ] = isset( $bricks_plain_translated[ $pi ] ) ? $bricks_plain_translated[ $pi ] : $textToTranslate[ $orig_key ]; + } + // HTML fields still need tag-aware processing (done individually) + foreach ( $bricks_html_k as $orig_key ) { + $text = $textToTranslate[ $orig_key ]; + $trabs = self::translateBricksTextField( $text, $source, $target ); + $bricks_tr_map[ $orig_key ] = $trabs; + } + + // Apply translations via str_replace on the JSON string + foreach ( $bricks_tr_map as $orig_key => $trabs ) { + $text = $textToTranslate[ $orig_key ]; + if ( $trabs == 'false' || empty( $trabs ) || $trabs === $text ) { + continue; + } + + if ( preg_match( '/<[^>]+>/', $text ) ) { + $original_json = json_encode( $text, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); + $translated_json = json_encode( $trabs, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); + $text_amp = str_replace( '&', '&', $text ); + $trabs_amp = str_replace( '&', '&', $trabs ); + $amp_json = json_encode( $text_amp, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); + $amp_trabs = json_encode( $trabs_amp, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); + + $translated_source = str_replace( + [ $text, $original_json, $text_amp, $amp_json ], + [ $trabs, $translated_json, $trabs_amp, $amp_trabs ], + $translated_source + ); + } else { + $translated_source = str_replace( + '"' . $text . '"', + '"' . $trabs . '"', + $translated_source + ); + } + } + + $debug_entry .= "Translation result: " . ($translated_source != false ? 'Success' : 'Failed') . "\n"; + + if ( $translated_source != false ) { + if ( ! is_serialized( $translated_source ) ) { + + $translated_source = json_decode( $translated_source, true ); + $translated_source = maybe_serialize($translated_source); + } + + $translated_source_encoded = '[:' . $target . ']' . base64_encode($translated_source) . '[:]'; + + if ( $override === true && $is_data_exists !== false ) { + $pattern = '/\[:' . $target . '\][^\[]*(?:\[:\])?/'; + $data_translate = preg_replace($pattern, '', $data_translate); + $debug_entry .= "Removed existing target language content\n"; + } + + if ( strpos($data_translate, '[:]') === false ) { + $data_translate = $data_translate . '[:]'; + } + + $new_data_string = str_replace('[:]', $translated_source_encoded, $data_translate); + + $debug_entry .= "New data string length: " . strlen($new_data_string) . "\n"; + + $update_result = update_post_meta( + $post->ID, + $meta_key . '_translate', + $new_data_string + ); + + $debug_entry .= "Meta update result: " . ($update_result ? 'Success' : 'Failed') . "\n"; + + if ( ! $update_result ) { + global $wpdb; + $debug_entry .= "Last database error: " . $wpdb->last_error . "\n"; + + $insert_result = add_post_meta($post->ID, $meta_key . '_translate', $new_data_string, true); + $debug_entry .= "Insert attempt result: " . ($insert_result ? 'Success' : 'Failed') . "\n"; + + if ( ! $insert_result ) { + delete_post_meta($post->ID, $meta_key . '_translate'); + $insert_result = add_post_meta($post->ID, $meta_key . '_translate', $new_data_string, true); + $debug_entry .= "Delete and re-insert result: " . ($insert_result ? 'Success' : 'Failed') . "\n"; + } + + $update_result = $insert_result; + } + + if ( $update_result ) { + $should_update = true; + } + } + + } else { + $debug_entry .= "Skipping translation for {$meta_key} - target data exists and override is false\n"; + } + + $debug_entry .= "---\n"; + } + + $debug_entry .= "=== BRICKS PROCESSING END ===\n\n"; + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + } + + // DEBUG: Check for Rank Math and other SEO meta fields + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== SEO META PROCESSING START ===\n"; + $debug_entry .= "Post ID: {$post->ID} | Source: {$source} | Target: {$target} | Override: " . ($override ? 'Yes' : 'No') . "\n"; + $debug_entry .= "=== LANGUAGE DETECTION DEBUG ===\n"; + + // Get all post meta + $all_metas = get_post_meta($post->ID); + + // Check for Rank Math meta fields + $rank_math_metas = array(); + $seo_metas = array(); + + foreach ($all_metas as $meta_key => $meta_value) { + if (strpos($meta_key, 'rank_math') === 0) { + $rank_math_metas[$meta_key] = is_array($meta_value) ? $meta_value[0] : $meta_value; + } + if (strpos($meta_key, '_yoast') === 0 || strpos($meta_key, 'rank_math') === 0 || strpos($meta_key, '_seopress') === 0) { + $seo_metas[$meta_key] = is_array($meta_value) ? $meta_value[0] : $meta_value; + } + } + + $debug_entry .= "Rank Math meta count: " . count($rank_math_metas) . "\n"; + $debug_entry .= "SEO meta count: " . count($seo_metas) . "\n"; + + // Check if Rank Math is active + $rank_math_active = defined('RANK_MATH_VERSION'); + $debug_entry .= "Rank Math active: " . ($rank_math_active ? 'Yes' : 'No') . "\n"; + + // Process Rank Math meta fields for translation (batched) + if ($rank_math_active && !empty($rank_math_metas)) { + $debug_entry .= "Processing Rank Math metas for translation...\n"; + + $rank_math_translatable_keys = array( + 'rank_math_title', + 'rank_math_description' + ); + + // PASS 1: Collect source texts that need translation + $rm_to_translate = array(); // meta_key => source_data + $rm_meta_values = array(); // meta_key => current meta_value (with language structure) + + foreach ($rank_math_translatable_keys as $meta_key) { + if ( ! isset($rank_math_metas[$meta_key]) ) { + continue; + } + + $meta_value = $rank_math_metas[$meta_key]; + $target_exists = wpm_ml_check_language_string($meta_value, $target); + $debug_entry .= "Processing {$meta_key} | Target exists: " . ($target_exists ? 'Yes' : 'No') . "\n"; + + if ($target_exists !== false && $override !== true) { + $debug_entry .= "Skipping {$meta_key} - target exists and override is false\n---\n"; + continue; + } + + $source_exists = wpm_ml_check_language_string($meta_value, $source); + if ($source_exists === true) { + $source_data = wpm_ml_get_language_string($meta_value, $source); + } else { + $source_data = $meta_value; + $target_exists_in_original = wpm_ml_check_language_string($meta_value, $target); + if ($target_exists_in_original) { + $source_data = wpm_ml_get_language_string($meta_value, $target); + $meta_value = '[:' . $source . ']' . $source_data . '[:]'; + } else { + if ($source === 'en' && $target === 'zh' && preg_match('/[\x{4e00}-\x{9fff}]/u', $source_data)) { + $debug_entry .= "Content appears to be Chinese already - skipping\n---\n"; + continue; + } elseif ($source === 'zh' && $target === 'en' && !preg_match('/[\x{4e00}-\x{9fff}]/u', $source_data) && preg_match('/[a-zA-Z]/', $source_data)) { + $debug_entry .= "Content appears to be English already - skipping\n---\n"; + continue; + } + if ( ! empty(trim($source_data)) ) { + $meta_value = '[:' . $source . ']' . $source_data . '[:]'; + } else { + $debug_entry .= "Skipping - source data is empty for {$meta_key}\n---\n"; + continue; + } + } + } + + if (empty(trim($source_data)) || preg_match('/^_+$/', trim($source_data))) { + $debug_entry .= "Skipping - source data is empty or underscores for {$meta_key}\n---\n"; + continue; + } + + $rm_to_translate[$meta_key] = $source_data; + $rm_meta_values[$meta_key] = $meta_value; + } + + // PASS 2: Batch-translate all collected Rank Math source texts + if ( ! empty($rm_to_translate) ) { + $rm_keys = array_keys($rm_to_translate); + $rm_texts = array_values($rm_to_translate); + + $debug_entry .= "Batch-translating " . count($rm_texts) . " Rank Math fields\n"; + $rm_translated = wpm_ml_batch_translate( $rm_texts, $source, $target ); + + // PASS 3: Apply translations and update meta + foreach ( $rm_keys as $i => $meta_key ) { + $translated_data = isset($rm_translated[$i]) ? $rm_translated[$i] : ''; + $meta_value = $rm_meta_values[$meta_key]; + $target_exists = wpm_ml_check_language_string($rank_math_metas[$meta_key], $target); + + $debug_entry .= "{$meta_key}: Translation " . ($translated_data ? 'Success' : 'Failed') . "\n"; + + if ( $translated_data && $translated_data !== false && trim($translated_data) !== '' ) { + $translated_data = '[:' . $target . ']' . $translated_data . '[:]'; + + if ( $override === true && $target_exists === true ) { + $pattern = '/\[:' . $target . '\][^\[]*(?:\[:\])?/'; + $meta_value = preg_replace($pattern, '', $meta_value); + } + + if (strpos($meta_value, '[:]') === false) { + $meta_value = $meta_value . '[:]'; + } + + $new_meta_value = str_replace('[:]', $translated_data, $meta_value); + $update_result = update_post_meta($post->ID, $meta_key, $new_meta_value); + + if ( ! $update_result ) { + delete_post_meta($post->ID, $meta_key); + $update_result = add_post_meta($post->ID, $meta_key, $new_meta_value, true); + } + + if ($update_result) { + $should_update = true; + $debug_entry .= "{$meta_key} translation saved successfully\n"; + } + } + $debug_entry .= "---\n"; + } + } + + if (isset($rank_math_metas['rank_math_schema_Service'])) { + $debug_entry .= "Skipping rank_math_schema_Service - excluded to prevent serialization errors\n---\n"; + } + } + + // Check for other SEO plugins + $yoast_active = defined('WPSEO_VERSION'); + $seopress_active = defined('SEOPRESS_VERSION'); + $debug_entry .= "Yoast SEO active: " . ($yoast_active ? 'Yes' : 'No') . "\n"; + $debug_entry .= "SEOPress active: " . ($seopress_active ? 'Yes' : 'No') . "\n"; + + if ( $seopress_active ) { + + global $wpdb; + + $all_metas = $wpdb->get_results( + $wpdb->prepare( + "SELECT meta_key, meta_value + FROM $wpdb->postmeta + WHERE post_id = %d", + $post->ID + ), + ARRAY_A + ); + + if ( ! empty( $all_metas ) && is_array( $all_metas ) ){ + + $seopress_translatable_keys = [ + '_seopress_titles_title', + '_seopress_titles_desc', + '_seopress_social_fb_title', + '_seopress_social_fb_desc', + '_seopress_social_twitter_title', + '_seopress_social_twitter_desc', + ]; + + // PASS 1: Collect all translatable text parts across all SEOPress fields + $sp_collect = array(); // [ [ 'meta_key' => key, 'parts' => [...], 'translatable_indices' => [...], 'source_texts' => [...] ], ... ] + + foreach ( $all_metas as $seop_key => $seop_meta_value ) { + if ( strpos( $seop_meta_value['meta_key'], '_seopress' ) !== 0 || empty( $seop_meta_value['meta_value'] ) ) { + continue; + } + if ( ! in_array( $seop_meta_value['meta_key'], $seopress_translatable_keys ) ) { + continue; + } + + $meta_value = $seop_meta_value['meta_value']; + $meta_key = $seop_meta_value['meta_key']; + + if ( ! is_string( $meta_value ) || is_serialized( $meta_value ) || self::isJson( $meta_value ) ) { + continue; + } + + $target_exists = wpm_ml_check_language_string( $meta_value, $target ); + $source_data = ''; + $should_process = false; + + if ( $target_exists === false || $override === true ) { + $source_exists = wpm_ml_check_language_string( $meta_value, $source ); + if ( $source_exists === true ) { + $source_data = wpm_ml_get_language_string( $meta_value, $source ); + } else { + $source_data = $meta_value; + $target_exists_in_original = wpm_ml_check_language_string( $meta_value, $target ); + if ( $target_exists_in_original ) { + $source_data = wpm_ml_get_language_string( $meta_value, $target ); + } + } + $should_process = true; + } + if ( $target_exists === true && $override === true ) { + $source_data = wpm_ml_get_language_string( $meta_value, $source ); + $should_process = true; + } + + if ( $should_process && ! empty( $source_data ) ) { + $parts = preg_split( + '/(%%[^%]+%%)/', + $source_data, + -1, + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY + ); + + $translatable_indices = array(); + $source_texts = array(); + + foreach ( $parts as $pi => $part ) { + $part = trim( $part ); + if ( ! empty( $part ) && ! preg_match( '/%%[^%]+%%/', $part ) && ! wpm_ml_is_untranslatable( $part ) ) { + $translatable_indices[] = $pi; + $source_texts[] = $part; + } + } + + if ( ! empty( $source_texts ) ) { + $sp_collect[] = array( + 'meta_key' => $meta_key, + 'parts' => $parts, + 'translatable_indices' => $translatable_indices, + 'source_texts' => $source_texts, + ); + } + } + } + + // PASS 2: Flatten all source texts and batch-translate + if ( ! empty( $sp_collect ) ) { + $sp_all_texts = array(); + $sp_offsets = array(); // track where each field's texts start in the flat array + + foreach ( $sp_collect as $entry ) { + $sp_offsets[] = count( $sp_all_texts ); + $sp_all_texts = array_merge( $sp_all_texts, $entry['source_texts'] ); + } + + $sp_translated = wpm_ml_batch_translate( $sp_all_texts, $source, $target ); + + // PASS 3: Reassemble and save + foreach ( $sp_collect as $ci => $entry ) { + $offset = $sp_offsets[ $ci ]; + $parts = $entry['parts']; + + foreach ( $entry['translatable_indices'] as $ti => $part_idx ) { + $translated = isset( $sp_translated[ $offset + $ti ] ) ? $sp_translated[ $offset + $ti ] : trim( $parts[ $part_idx ] ); + $parts[ $part_idx ] = $translated; + } + + $result = ''; + foreach ( $parts as $part ) { + $part = trim( $part ); + if ( empty( $part ) ) { + $result .= ' '; + } else { + $result .= $part . ' '; + } + } + + if ( ! empty( $result ) ) { + update_post_meta( $post->ID, $entry['meta_key'], trim( $result ) ); + } + } + } + + } + + } + + + $debug_entry .= "=== SEO META PROCESSING END ===\n\n"; + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + + // ACF Auto Translation + if ( function_exists( 'acf_get_field' ) ) { + self::auto_translate_acf_fields( $post->ID, $source, $target, $override ); + } + + $post_arr = array( + 'ID' => $post->ID, + 'post_title' => $post->post_title, + 'post_content' => $post->post_content + ); + if($post->post_excerpt){ + $post_arr['post_excerpt'] = $post->post_excerpt; + } + + if ( $should_update == true ) { + + // DEBUG: Log before update + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== POST UPDATE START ===\n"; + $debug_entry .= "Post ID: {$post->ID} | Should update: Yes\n"; + $debug_entry .= "Post title: " . $post->post_title . "\n"; + $debug_entry .= "Post content length: " . strlen($post->post_content) . "\n"; + $debug_entry .= "Post excerpt: " . ($post->post_excerpt ? $post->post_excerpt : 'None') . "\n"; + + $result = wp_update_post( $post_arr ); + + $debug_entry .= "Update result: " . ($result ? 'Success' : 'Failed') . "\n"; + if (is_wp_error($result)) { + $debug_entry .= "Error message: " . $result->get_error_message() . "\n"; + } + + if ( is_wp_error( $result ) ) { + // Handle error. + $error_message = $result->get_error_message(); + $response = array('status'=>false, 'message'=>$error_message); + $debug_entry .= "Response: Error - {$error_message}\n"; + } elseif ( $result === 0 ) { + $response = array('status'=>false, 'message'=>esc_html__('Translation can not be updated','wp-multilang')); + $debug_entry .= "Response: Error - Translation can not be updated\n"; + } else { + $message = esc_html__('Translation updated successfully','wp-multilang'); + $response = array('status'=>true, 'message'=>$message); + $debug_entry .= "Response: Success - {$message}\n"; + } + + $debug_entry .= "=== POST UPDATE END ===\n\n"; + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + } else { + // DEBUG: Log why no update + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== NO UPDATE REASON ===\n"; + $debug_entry .= "Post ID: {$post->ID} | Should update: No\n"; + $debug_entry .= "This means no content was translated or updated\n"; + $debug_entry .= "Check Elementor and SEO meta processing above for details\n"; + $debug_entry .= "=== END NO UPDATE REASON ===\n\n"; + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + + $response = array('status'=>false, 'message'=>esc_html__('No updates needed','wp-multilang')); + } + } + + return $response; + } + + /** + * Auto translate term data + * @param $term WP_Term + * @param $source string + * @param $target string + * @return $response array + * @since 1.10 + * */ + public static function auto_translate_term( $term, $source, $target, $override = false ) { + $response = array('status'=>true, 'message'=>esc_html__('Already Processed','wp-multilang')); + + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- This function does not handle any form submission so nonce not needed here. + if (isset($_POST['excluded_items']) && !empty($_POST['excluded_items'])) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This function does not handle any form submission so nonce not needed here. + $excluded_items = json_decode(stripslashes($_POST['excluded_items']), true); + + if (isset($excluded_items[$term->taxonomy]) && in_array($term->term_id, $excluded_items[$term->taxonomy])) { + $response['status'] = false; + $response['message'] = esc_html__('Term excluded from translation', 'wp-multilang'); + return $response; + } + } + + if ( is_object( $term ) && isset( $term->name ) && isset( $term->description ) ) { + + $should_update = false; + $term_arr = array(); + $term_name = $term->name; + $term_desc = $term->description; + + $is_title_exist = wpm_ml_check_language_string( $term_name, $target ); + + // Check if we should translate title (either doesn't exist OR override is true) + if ( $is_title_exist === false || $override === true ) { + $is_src_title_exist = wpm_ml_check_language_string( $term_name, $source ); + + if( $is_src_title_exist === false ) { + $term_name = '[:'.$source.']'.$term_name.'[:]'; + } + + $source_title = wpm_ml_get_language_string( $term_name, $source ); + $new_title = wpm_ml_auto_translate_content( $source_title, $source, $target ); + $new_slug = $new_title; + + // If override is true and content exists, remove existing target language content first + if ( $override === true && $is_title_exist === true ) { + $pattern = '/\[:'.$target.'\][^\[]*(?:\[:\])?/'; + $term->name = preg_replace( $pattern, '[:'.$target.']'.$new_title , $term_name ); + }else{ + $new_title = '[:'.$target.']'.$new_title.'[:]'; + $term->name = str_replace( '[:]', $new_title, $term_name ); + } + + $should_update = true; + + self::auto_translate_slug( $term->term_id, $target, $term->taxonomy, $new_slug ); + + } + + $is_content_exist = wpm_ml_check_language_string( $term_desc,$target ); + + + // Check if we should translate content (either doesn't exist OR override is true) + if ( $is_content_exist === false || $override === true ) { + $is_src_content_exist = wpm_ml_check_language_string( $term_desc,$source ); + + if ( $is_src_content_exist === false ) { + $term_desc = '[:'.$source.']'.$term_desc.'[:]'; + } + + $source_content = wpm_ml_get_language_string( $term_desc, $source ); + $new_content = wpm_ml_auto_translate_content( $source_content, $source, $target ); + + // If override is true and content exists, remove existing target language content first + if ( $override === true && $is_content_exist === true ) { + $term->description = preg_replace('/\[:'.$target.'\][^\[]*(?:\[:\])?/', '[:'.$target.']'.$new_content, $term_desc); + }else{ + $new_content = '[:'.$target.']'.$new_content.'[:]'; + $term->description = str_replace( '[:]',$new_content,$term_desc ); + } + + $should_update = true; + } + + $term_arr = array( + 'name' => $term->name, + 'description' => $term->description, + ); + + if ( $should_update == true ) { + + remove_filter( 'pre_term_description', 'wp_filter_kses' ); + remove_filter( 'term_description', 'wp_kses_data' ); + + $result = wp_update_term( $term->term_id, $term->taxonomy, $term_arr ); + + add_filter( 'pre_term_description', 'wp_filter_kses' ); + add_filter( 'term_description', 'wp_kses_data' ); + + if ( is_wp_error( $result ) ) { + // Handle error. + $error_message = $result->get_error_message(); + $response = array( 'status'=>false, 'message'=>$error_message ); + } elseif ( $result === 0 ) { + $response = array( 'status'=>false, 'message'=>esc_html__( 'Translation can not be updated','wp-multilang' ) ); + } else { + $response = array( 'status'=>true, 'message'=>esc_html__( 'Translation updated successfully','wp-multilang' ) ); + } + + } + + } + + return $response; + } + + /** + * Translate extra text fields + * @param $data array + * @param $texts array + * @return $texts array + * @since 1.10 + * */ + public static function extractTextFields( &$data, &$texts = [] ) { + static $keys_of_interest = null; + if ( $keys_of_interest === null ) { + $keys_of_interest = array_flip( [ 'title', 'title_text', 'editor', 'description_text', 'text', 'item_title', 'item_desc', 'item_text' ] ); + } + + if ( is_array( $data ) ) { + foreach ( $data as $key => &$value ) { + if ( isset( $keys_of_interest[ $key ] ) && is_string( $value ) && ! empty( $value ) ) { + $texts[] = $value; + } + if ( is_array( $value ) || is_object( $value ) ) { + self::extractTextFields( $value, $texts ); + } + } + } elseif ( is_object( $data ) ) { + foreach ( $data as $key => &$value ) { + if ( isset( $keys_of_interest[ $key ] ) && is_string( $value ) && ! empty( $value ) ) { + $texts[] = $value; + } + if ( is_array( $value ) || is_object( $value ) ) { + self::extractTextFields( $value, $texts ); + } + } + } + + return $texts; + } + + /** + * Display license status message + * @since 1.10 + * */ + public function display_message(){ + + $params = array(); + $params = self::filter_js_params( $params ); + + $provider = ! empty( $params['ai_settings']['api_provider'] ) ? $params['ai_settings']['api_provider'] : ''; + $integration_key = 'wpm_' . $provider . '_integration'; + + if ( wpm_is_pro_active() && $params['license_status'] !== 'active' ) { + + ?> +

+ +

+ +

+ prefix.WPM_SLUG_TABLE; + $new_slug = str_replace(' ','-',$new_slug); + // Save translated slug in postmeta for the target language + $data_exists = self::is_slug_exists( $slug_id, $target ); + if ( empty( $data_exists ) ) { + + $insert_data['slug_id'] = $slug_id; + $insert_data['slug'] = $new_slug; + $insert_data['language'] = $target; + $insert_data['type'] = $type; + $insert_data['created_at'] = gmdate( 'Y-m-d H:i:s' ); + $insert_data['updated_at'] = gmdate( 'Y-m-d H:i:s' ); + + $wpdb->insert( $slug_table_name, $insert_data ); + + } else { + $where['slug_id'] = $slug_id; + $where['language'] = $target; + $update_data['slug'] = $new_slug; + $update_data['updated_at'] = gmdate( 'Y-m-d H:i:s' ); + $wpdb->update( $slug_table_name, $update_data, $where ); + } + } + + } + + /** + * Extract translatable text fields from Bricks builder flat element array. + * Bricks stores a flat array of elements, each with: id, name, parent, children, settings. + * Text lives inside $element['settings'] at various keys depending on widget type. + * @param $elements array + * @param $textToTranslate array - pass by reference + * @since 2.4.28 + */ + protected static function extractBricksTextFields( array $elements, array &$textToTranslate ): void { + + // These settings keys contain plain translatable text (no HTML) + $plain_text_keys = [ + 'text', // heading, text-basic, button, text-link + 'title', // list items, accordion items + 'subtitle', // accordion items + 'meta', // list items + 'prefix', // animated-typing + 'suffix', // animated-typing + 'label', // form fields + 'placeholder',// form fields + 'successMessage', + 'emailSubject', + 'fromName', + 'emailErrorMessage', + 'mailchimpPendingMessage', + 'mailchimpErrorMessage', + 'sendgridErrorMessage', + ]; + + // These settings keys contain HTML (rich text) + $html_text_keys = [ + 'content', // accordion content, tab content + ]; + + foreach ( $elements as $element ) { + if ( empty($element['settings']) || ! is_array($element['settings']) ) { + continue; + } + + $settings = $element['settings']; + + // --- Direct plain text keys --- + foreach ( $plain_text_keys as $key ) { + if ( ! empty($settings[$key]) && is_string($settings[$key]) ) { + $textToTranslate[] = $settings[$key]; + } + } + + // --- Direct HTML/rich text keys --- + foreach ( $html_text_keys as $key ) { + if ( ! empty($settings[$key]) && is_string($settings[$key]) ) { + $textToTranslate[] = $settings[$key]; + } + } + + // --- Nested: accordion items [ {title, subtitle, content} ] --- + if ( ! empty($settings['accordions']) && is_array($settings['accordions']) ) { + foreach ( $settings['accordions'] as $accordion ) { + foreach ( ['title', 'subtitle', 'content'] as $k ) { + if ( ! empty($accordion[$k]) && is_string($accordion[$k]) ) { + $textToTranslate[] = $accordion[$k]; + } + } + } + } + + // --- Nested: list items [ {title, meta} ] --- + if ( ! empty($settings['items']) && is_array($settings['items']) ) { + foreach ( $settings['items'] as $item ) { + // testimonials: name, title, content + // list: title, meta + foreach ( ['title', 'meta', 'name', 'content'] as $k ) { + if ( ! empty($item[$k]) && is_string($item[$k]) ) { + $textToTranslate[] = $item[$k]; + } + } + } + } + + // --- Nested: tabs [ {title, content} ] --- + if ( ! empty($settings['tabs']) && is_array($settings['tabs']) ) { + foreach ( $settings['tabs'] as $tab ) { + foreach ( ['title', 'content'] as $k ) { + if ( ! empty($tab[$k]) && is_string($tab[$k]) ) { + $textToTranslate[] = $tab[$k]; + } + } + } + } + + // --- Nested: animated-typing strings [ {text} ] --- + if ( ! empty($settings['strings']) && is_array($settings['strings']) ) { + foreach ( $settings['strings'] as $string_item ) { + if ( ! empty($string_item['text']) && is_string($string_item['text']) ) { + $textToTranslate[] = $string_item['text']; + } + } + } + + // --- Nested: form fields [ {label, placeholder} ] --- + if ( ! empty($settings['fields']) && is_array($settings['fields']) ) { + foreach ( $settings['fields'] as $field ) { + foreach ( ['label', 'placeholder'] as $k ) { + if ( ! empty($field[$k]) && is_string($field[$k]) ) { + $textToTranslate[] = $field[$k]; + } + } + } + } + } + + // Deduplicate to avoid translating the same string multiple times + $textToTranslate = array_values( array_unique($textToTranslate) ); + } + + /** + * Recursively walk a decoded Bricks element array and translate text fields in-place. + * Works on the PHP array directly — no JSON string replacement needed. + * + * @param array $elements Decoded Bricks elements array (modified in-place) + * @param string $source Source language code + * @param string $target Target language code + * @since 2.4.29 + */ +protected static function translateBricksTextFieldsInArray( array &$elements, string $source, string $target ): void { + + $plain_text_keys = [ + 'text', 'title', 'subtitle', 'meta', 'prefix', 'suffix', + 'label', 'placeholder', 'successMessage', 'emailSubject', + 'fromName', 'emailErrorMessage', 'mailchimpPendingMessage', + 'mailchimpErrorMessage', 'sendgridErrorMessage', + ]; + + $html_text_keys = [ 'content' ]; + $all_text_keys = array_merge( $plain_text_keys, $html_text_keys ); + + // PASS 1: Collect all translatable text values and record their locations + $collect = array(); // [ [ 'text' => string, 'path' => [...] ], ... ] + + foreach ( $elements as $ei => &$element ) { + if ( empty($element['settings']) || ! is_array($element['settings']) ) { + continue; + } + $settings = &$element['settings']; + + foreach ( $all_text_keys as $key ) { + if ( isset($settings[$key]) && is_string($settings[$key]) && trim($settings[$key]) !== '' && ! wpm_ml_is_untranslatable($settings[$key]) ) { + $collect[] = array( 'text' => $settings[$key], 'ref' => array( &$settings, $key ) ); + } + } + + $nested_groups = array( + 'accordions' => array( 'title', 'subtitle', 'content' ), + 'items' => array( 'title', 'meta', 'name', 'content' ), + 'tabs' => array( 'title', 'content' ), + 'strings' => array( 'text' ), + 'fields' => array( 'label', 'placeholder' ), + ); + + foreach ( $nested_groups as $group_key => $sub_keys ) { + if ( ! empty($settings[$group_key]) && is_array($settings[$group_key]) ) { + foreach ( $settings[$group_key] as &$nested_item ) { + foreach ( $sub_keys as $k ) { + if ( ! empty($nested_item[$k]) && is_string($nested_item[$k]) && ! wpm_ml_is_untranslatable($nested_item[$k]) ) { + $collect[] = array( 'text' => $nested_item[$k], 'ref' => array( &$nested_item, $k ) ); + } + } + } + unset($nested_item); + } + } + } + unset($element); + + if ( empty($collect) ) { + return; + } + + // PASS 2: Extract plain-text items for batching; HTML items need per-item handling + $plain_indices = array(); + $plain_texts = array(); + + foreach ( $collect as $i => $entry ) { + if ( ! preg_match( '/<[^>]+>/', $entry['text'] ) ) { + $plain_indices[] = $i; + $plain_texts[] = $entry['text']; + } + } + + // Batch-translate all plain text in one shot + $plain_translated = array(); + if ( ! empty($plain_texts) ) { + $plain_translated = wpm_ml_batch_translate( $plain_texts, $source, $target ); + } + + // Write plain translations back + foreach ( $plain_indices as $pi => $collect_idx ) { + $translated = isset( $plain_translated[$pi] ) ? $plain_translated[$pi] : $collect[$collect_idx]['text']; + $ref = &$collect[$collect_idx]['ref']; + $ref[0][$ref[1]] = $translated; + } + + // Translate HTML items individually (they need tag-aware processing) + foreach ( $collect as $i => $entry ) { + if ( in_array( $i, $plain_indices, true ) ) { + continue; + } + $translated = self::translateBricksTextField( $entry['text'], $source, $target ); + $ref = &$collect[$i]['ref']; + $ref[0][$ref[1]] = $translated; + } +} + +/** + * Translate a single text value — handles both plain text and HTML strings. + * For HTML: splits on tags, translates each text node, reassembles. + * + * @param string $text Original value (plain or HTML) + * @param string $source Source language code + * @param string $target Target language code + * @return string Translated value (same format as input) + * @since 2.4.29 + */ +protected static function translateBricksTextField( string $text, string $source, string $target ): string { + + if ( trim($text) === '' || wpm_ml_is_untranslatable($text) ) { + return $text; + } + + // Plain text — no tags at all + if ( ! preg_match('/<[^>]+>/', $text) ) { + $translated = wpm_ml_auto_fetch_translation( $text, $source, $target ); + return ( $translated && $translated !== 'false' ) ? $translated : $text; + } + + // HTML text — decode entities, split on tags, batch-translate all text nodes at once + $decoded = html_entity_decode( $text, ENT_QUOTES | ENT_HTML5, 'UTF-8' ); + $parts = preg_split( '/(<[^>]*>)/s', $decoded, -1, PREG_SPLIT_DELIM_CAPTURE ); + + // Collect translatable text-node indices + $text_indices = array(); + $text_values = array(); + foreach ( $parts as $i => $part ) { + if ( ! preg_match('/^<[^>]*>$/', $part) && trim($part) !== '' && ! wpm_ml_is_untranslatable($part) ) { + $text_indices[] = $i; + $text_values[] = trim($part); + } + } + + if ( ! empty($text_values) ) { + $translated_values = wpm_ml_batch_translate( $text_values, $source, $target ); + foreach ( $text_indices as $ti => $part_idx ) { + $parts[$part_idx] = isset($translated_values[$ti]) ? $translated_values[$ti] : $parts[$part_idx]; + } + } + + $result = implode( '', $parts ); + + if ( strpos($text, '&') !== false ) { + $result = str_replace( '&', '&', $result ); + } + + return $result; +} + + +/** + * Check is string is a json data + * @param $string string + * @return boolean + * @since 2.4.29 + * */ +public static function isJson( $string ) { + + if ( ! is_string( $string ) ) { + return false; + } + + json_decode( $string ); + + return json_last_error() === JSON_ERROR_NONE; +} + + /** + * Auto translate ACF fields for a post + * @param int $post_id + * @param string $source + * @param string $target + * @param boolean $override + * @return boolean + * @since 2.4.32 + * */ + public static function auto_translate_acf_fields( $post_id, $source, $target, $override = false ) { + if ( ! function_exists( 'acf_get_field' ) ) { + return false; + } + + $all_metas = get_post_meta( $post_id ); + if ( ! is_array( $all_metas ) ) { + return false; + } + + $acf_updated = false; + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== ACF DYNAMIC PROCESSING START ===\n"; + $debug_entry .= "Post ID: {$post_id} | Source: {$source} | Target: {$target} | Override: " . ($override ? 'Yes' : 'No') . "\n"; + + foreach ( $all_metas as $meta_key => $meta_values ) { + if ( strpos( $meta_key, '_' ) === 0 ) { + continue; + } + + $ref_key = '_' . $meta_key; + if ( isset( $all_metas[ $ref_key ] ) ) { + $field_key = is_array( $all_metas[ $ref_key ] ) ? $all_metas[ $ref_key ][0] : $all_metas[ $ref_key ]; + if ( strpos( $field_key, 'field_' ) === 0 ) { + $acf_field = acf_get_field( $field_key ); + if ( $acf_field && in_array( $acf_field['type'], array( 'text', 'textarea', 'wysiwyg' ) ) ) { + $debug_entry .= "Processing ACF Field: {$meta_key} ({$field_key}) of type {$acf_field['type']}\n"; + + global $wpdb; + $raw_meta_value = $wpdb->get_var( + $wpdb->prepare( + "SELECT meta_value + FROM $wpdb->postmeta + WHERE meta_key = %s + AND post_id = %d", + $meta_key, + $post_id + ) + ); + + if ( $raw_meta_value ) { + $is_meta_exist = wpm_ml_check_language_string( $raw_meta_value, $target ); + + if ( $is_meta_exist === false || $override === true ) { + $is_src_meta_exist = wpm_ml_check_language_string( $raw_meta_value, $source ); + + if ( $is_src_meta_exist === false ) { + $raw_meta_value = '[:' . $source . ']' . $raw_meta_value . '[:]'; + } + + $source_meta_val = wpm_ml_get_language_string( $raw_meta_value, $source ); + + if ( ! empty( trim( $source_meta_val ) ) ) { + $new_meta_val = wpm_ml_auto_translate_content( $source_meta_val, $source, $target, 0, 99999 ); + $debug_entry .= "Original: '{$source_meta_val}' -> Translated: '{$new_meta_val}'\n"; + + if ( $new_meta_val && $new_meta_val !== $source_meta_val ) { + if ( $override === true && $is_meta_exist === true ) { + $pattern = '/\[:' . $target . '\][^\[]*(?:\[:\])?/'; + $raw_meta_value = preg_replace( $pattern, '', $raw_meta_value ); + if ( strpos( $raw_meta_value, '[:]' ) === false ) { + $raw_meta_value = $raw_meta_value . '[:]'; + } + $raw_meta_value = str_replace( '[:]', '[:' . $target . ']' . $new_meta_val . '[:]', $raw_meta_value ); + } else { + $new_meta_val_wrapped = '[:' . $target . ']' . $new_meta_val . '[:]'; + if ( preg_match( '/\[:' . $target . '\][^\[]*(?:\[:\])?/', $raw_meta_value ) ) { + $raw_meta_value = preg_replace( '/\[:' . $target . '\][^\[]*(?:\[:\])?/', $new_meta_val_wrapped, $raw_meta_value ); + } else { + $raw_meta_value = str_replace( '[:]', $new_meta_val_wrapped, $raw_meta_value ); + } + } + + $update_result = update_post_meta( $post_id, $meta_key, $raw_meta_value ); + $debug_entry .= "Update result: " . ($update_result ? 'Success' : 'Failed') . "\n"; + + if ( $update_result ) { + $acf_updated = true; + } + } + } + } else { + $debug_entry .= "Skipping field {$meta_key} - target translation already exists and override is false\n"; + } + } + } + } + } + } + + $debug_entry .= "=== ACF DYNAMIC PROCESSING END ===\n\n"; + file_put_contents( $debug_file, $debug_entry, FILE_APPEND | LOCK_EX ); + + return $acf_updated; + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate.php index f0fea057c..6be17dc0c 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-auto-translate.php @@ -1,94 +1,110 @@ -id = 'autotranslate'; - $this->label = __( 'Auto translate', 'wp-multilang' ); - - parent::__construct(); - - add_action( 'wpm_admin_field_autotranslate', array( $this, 'get_autotranslate' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_translation_script' ) ); - } - - public function enqueue_translation_script( $hook ){ - if( $hook === 'toplevel_page_wpm-settings' && ! defined( 'WP_MULTILANG_PRO_VERSION' ) ){ - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - $dir_path = plugin_dir_url(__DIR__); - wp_enqueue_script( 'wpm_translation_settings', wpm_asset_path( 'scripts/wpm-autotranslation-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - } - } - - /** - * Get settings array. - * - * @return array - */ - - public function get_settings() { - - $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( - - array( - 'title' => __( 'Auto Translate', 'wp-multilang' ), - 'type' => 'title', - /* translators: %s: url */ - 'desc' => sprintf( __( 'Read Auto Translate Docs', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-auto-translate-your-website-contents-using-wp-multilang/' ) ), - 'id' => 'autotranslate_options', - ), - - array( - 'title' => __( 'List Of Languages', 'wp-multilang' ), - 'id' => 'wpm_autotranslate', - 'type' => 'autotranslate', - ), - - array( - 'type' => 'sectionend', - 'id' => 'autotranslate_options', - ), - - ) ); - - return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); - } - - /** - * Render autotranslate UI - * - * @param $value - * @since 2.4.11 - */ - public function get_autotranslate( $value ) { - - $GLOBALS['hide_save_button'] = true; - - $languages = get_option( 'wpm_languages', array() ); - $flags = wpm_get_flags(); - - include_once __DIR__ . '/views/html-auto-translate.php'; - } - -} +id = 'autotranslate'; + $this->label = __( 'Auto translate', 'wp-multilang' ); + + parent::__construct(); + + add_action( 'wpm_admin_field_autotranslate', array( $this, 'get_autotranslate' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_translation_script' ) ); + } + + public function enqueue_translation_script( $hook ){ + if( $hook === 'toplevel_page_wpm-settings' && ! defined( 'WP_MULTILANG_PRO_VERSION' ) ){ + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + $dir_path = plugin_dir_url(__DIR__); + + wp_register_script( 'wpm_translation_settings', wpm_asset_path( 'scripts/wpm-autotranslation-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + + // Generate and localize data for autotranslate script + $main_params = array( + 'source_language' => function_exists('wpm_get_user_language') ? wpm_get_user_language() : 'en', + 'target_language' => function_exists('wpm_get_language') ? wpm_get_language() : 'en', + 'is_pro_active' => wpm_is_pro_active(), + 'wpmpro_autotranslate_nonce' => wp_create_nonce('wpmpro-autotranslate-nonce'), + + ); + + $main_params = WPM_Settings_Auto_Translate_Pro::filter_js_params( $main_params ); + + wp_localize_script('wpm_translation_settings', 'wpm_autotranslate_localize_data', $main_params); + wp_enqueue_script( 'wpm_translation_settings' ); + } + } + + /** + * Get settings array. + * + * @return array + */ + + public function get_settings() { + + $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( + + array( + 'title' => __( 'Auto Translate', 'wp-multilang' ), + 'type' => 'title', + /* translators: %s: url */ + 'desc' => sprintf( __( 'Read Auto Translate Docs', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-auto-translate-your-website-contents-using-wp-multilang/' ) ), + 'id' => 'autotranslate_options', + ), + + array( + 'title' => __( 'List Of Languages', 'wp-multilang' ), + 'id' => 'wpm_autotranslate', + 'type' => 'autotranslate', + ), + + array( + 'type' => 'sectionend', + 'id' => 'autotranslate_options', + ), + + ) ); + + return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); + } + + /** + * Render autotranslate UI + * + * @param $value + * @since 2.4.11 + */ + public function get_autotranslate( $value ) { + + $GLOBALS['hide_save_button'] = true; + + $languages = get_option( 'wpm_languages', array() ); + $flags = wpm_get_flags(); + + include_once __DIR__ . '/views/html-auto-translate.php'; + } + +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-general.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-general.php index 1df80d390..9060487e7 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-general.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-general.php @@ -1,252 +1,303 @@ -id = 'general'; - $this->label = esc_html__( 'General', 'wp-multilang' ); - - parent::__construct(); - - add_filter( 'wpm_general_settings', array( $this, 'add_uninstall_setting' ) ); - add_action( 'wpm_update_options_general', array( $this, 'update_wplang' ) ); - add_filter( 'wpm_disable_translation_options', array( $this, 'unset_translation_options' ) ); - add_filter( 'wpm_general_settings', array( $this, 'add_reset_settings' ) ); - add_action( 'wpm_admin_field_reset_settings', array( $this, 'reset_settings' ) ); - } - - /** - * Get settings array. - * - * @return array - */ - public function get_settings() { - - $languages = wpm_get_languages(); - - $language_options = array(); - foreach ( $languages as $code => $language ) { - $language_options[ $code ] = $language['name']; - } - - $settings = apply_filters( 'wpm_general_settings', array( - - array( - 'title' => esc_html__( 'General options', 'wp-multilang' ), - 'type' => 'title', - /* translators: %s: url */ - 'desc' => sprintf( __( 'Read Google guidelines before.', 'wp-multilang' ), esc_url( 'https://support.google.com/webmasters/answer/182192?hl=' . wpm_get_user_language() ) ), - 'id' => 'general_options' - ), - - array( - 'title' => esc_html__( 'Site Language', 'wp-multilang' ), - 'desc' => esc_html__( 'Set default site language.', 'wp-multilang' ), - 'id' => 'wpm_site_language', - 'default' => wpm_get_default_language(), - 'type' => 'select', - 'class' => 'wpm-enhanced-select', - 'css' => 'min-width: 350px;', - 'options' => $language_options, - ), - - array( - 'title' => esc_html__( 'Show untranslated', 'wp-multilang' ), - 'desc' => esc_html__( 'Show untranslated strings on language by default.', 'wp-multilang' ), - 'id' => 'wpm_show_untranslated_strings', - 'default' => 'yes', - 'type' => 'checkbox', - ), - - array( - 'title' => esc_html__( 'Browser redirect', 'wp-multilang' ), - 'desc' => esc_html__( 'Use redirect to user browser language in first time.', 'wp-multilang' ), - 'id' => 'wpm_use_redirect', - 'default' => 'no', - 'type' => 'checkbox', - ), - - array( - 'title' => esc_html__( 'Use prefix', 'wp-multilang' ), - 'desc' => esc_html__( 'Use prefix for language by default.', 'wp-multilang' ), - 'id' => 'wpm_use_prefix', - 'default' => 'no', - 'type' => 'checkbox', - ), - - array( - 'title' => esc_html__( 'Slug Translation', 'wp-multilang' ), - /* translators: %s: url */ - 'desc' => sprintf( __( 'Translate posts, pages, custom posts, categories and custom taxonomies slug. Learn More', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/' ) ), - 'id' => 'wpm_string_translation', - 'default' => 'no', - 'type' => 'checkbox', - ), - - array( - 'title' => esc_html__( 'Base Translation', 'wp-multilang' ), - /* translators: %s: url */ - 'desc' => sprintf( __( 'Translate Categories, Product categories, Tags and Custom Taxonomies base. Learn More', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-translate-taxonomy-bases-such-as-categories-and-tags-into-selective-languages-using-the-base-translation-option/' ) ), - 'id' => 'wpm_base_translation', - 'default' => 'no', - 'type' => 'checkbox', - ), - - array( 'type' => 'sectionend', 'id' => 'general_options' ), - - ) ); - - return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); - } - - /** - * Add uninstall settings only for Super Admin - * - * @param $settings - * - * @return array - */ - public function add_uninstall_setting( $settings ) { - - if ( ! is_multisite() || ( is_main_site() ) ) { - $settings[] = array( - 'title' => esc_html__( 'Uninstalling', 'wp-multilang' ), - 'type' => 'title', - 'desc' => '', - 'id' => 'uninstall_options', - ); - - $settings[] = array( - 'title' => esc_html__( 'Delete translations', 'wp-multilang' ), - 'desc' => esc_html__( 'Delete translations when uninstalling plugin ( some translations may not be deleted and you must delete them manually ).', 'wp-multilang' ), - 'id' => 'wpm_uninstall_translations', - 'default' => 'no', - 'type' => 'checkbox', - ); - - $settings[] = array( 'type' => 'sectionend', 'id' => 'uninstall_options' ); - } - - return $settings; - } - - /** - * Save settings. - */ - public function save() { - $settings = $this->get_settings(); - $settings = apply_filters( 'wpm_disable_translation_options', $settings ); - WPM_Admin_Settings::save_fields( $settings ); - } - - /** - * Update WPLANG option - */ - public function update_wplang() { - $value = WPM_Admin_Settings::get_option( 'wpm_site_language' ); - $languages = wpm_get_languages(); - $locale = $languages[ $value ]['translation']; - update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); - } - - /** - * Don't save string translation and base translations if pro is not active - * @param $settings Array - * @return $settings Array - * @since 2.4.12 - * */ - public function unset_translation_options( $settings ){ - - $unset_keys = array( 'wpm_string_translation', 'wpm_base_translation' ); - - if( ! defined('WP_MULTILANG_PRO_VERSION') ) { - if( ! empty( $settings ) && is_array( $settings ) ) { - foreach ($settings as $key => $value) { - if( ! empty( $value['id'] ) && in_array($value['id'], $unset_keys) ) { - unset($settings[$key]); - } - } - // Rearrange array keys - $settings = array_values($settings); - } - } - - return $settings; - } - - /** - * Add reset settings options - * @param $settings Array - * @return $settings Array - * @since 2.4.15 - * */ - public function add_reset_settings( $settings ){ - $settings[] = array( - 'title' => esc_html__( 'Reset', 'wp-multilang' ), - 'type' => 'title', - 'id' => 'wpm-reset-settings' - ); - - $settings[] = array( - 'title' => esc_html__( 'Reset Settings', 'wp-multilang' ), - 'id' => 'wpm-reset-settings-btn', - 'type' => 'reset_settings', - ); - - $settings[] = array( 'type' => 'sectionend', 'id' => 'wpm-reset-settings' ); - - return $settings; - } - - /** - * Render reset settings button - * @param $value Array - * @since 2.4.15 - * */ - public function reset_settings( $value ){ - - $main_params = array( - 'plugin_url' => wpm()->plugin_url(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'wpm_reset_settings_nonce' => wp_create_nonce( 'wpm-reset-settings' ), - 'wpm_confirm_reset' => esc_html__( 'Are you sure ? You can not undo once press ok button.', 'wp-multilang' ), - ); - wp_localize_script( 'wpm_reset_settings', 'wpm_reset_settings_params', $main_params ); - wp_enqueue_script( 'wpm_reset_settings' ); - - ?> - - -

- - -

- -

-

- - - id = 'general'; + $this->label = esc_html__( 'General', 'wp-multilang' ); + + parent::__construct(); + + add_filter( 'wpm_general_settings', array( $this, 'add_uninstall_setting' ) ); + add_action( 'wpm_update_options_general', array( $this, 'update_wplang' ) ); + add_filter( 'wpm_disable_translation_options', array( $this, 'unset_translation_options' ) ); + add_filter( 'wpm_general_settings', array( $this, 'add_reset_settings' ) ); + add_action( 'wpm_admin_field_reset_settings', array( $this, 'reset_settings' ) ); + add_filter( 'wpm_general_settings', array( $this, 'add_cpt_settings' ) ); + } + + /** + * Get settings array. + * + * @return array + */ + public function get_settings() { + + $languages = wpm_get_languages(); + + $language_options = array(); + foreach ( $languages as $code => $language ) { + $language_options[ $code ] = $language['name']; + } + + $settings = apply_filters( 'wpm_general_settings', array( + + array( + 'title' => esc_html__( 'General options', 'wp-multilang' ), + 'type' => 'title', + /* translators: %s: url */ + 'desc' => sprintf( __( 'Read Google guidelines before.', 'wp-multilang' ), esc_url( 'https://support.google.com/webmasters/answer/182192?hl=' . wpm_get_user_language() ) ), + 'id' => 'general_options' + ), + + array( + 'title' => esc_html__( 'Site Language', 'wp-multilang' ), + 'desc' => esc_html__( 'Set default site language.', 'wp-multilang' ), + 'id' => 'wpm_site_language', + 'default' => wpm_get_default_language(), + 'type' => 'select', + 'class' => 'wpm-enhanced-select', + 'css' => 'min-width: 350px;', + 'options' => $language_options, + ), + + array( + 'title' => esc_html__( 'Show untranslated', 'wp-multilang' ), + 'desc' => esc_html__( 'Show untranslated strings on language by default.', 'wp-multilang' ), + 'id' => 'wpm_show_untranslated_strings', + 'default' => 'yes', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Browser redirect', 'wp-multilang' ), + 'desc' => esc_html__( 'Use redirect to user browser language in first time.', 'wp-multilang' ), + 'id' => 'wpm_use_redirect', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Use prefix', 'wp-multilang' ), + 'desc' => esc_html__( 'Use prefix for language by default.', 'wp-multilang' ), + 'id' => 'wpm_use_prefix', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Force Auto Retranslation', 'wp-multilang' ), + 'desc' => esc_html__( 'This will allow users to force auto re-translation for a specific language.', 'wp-multilang' ), + 'id' => 'wpm_allow_auto_override', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Slug Translation', 'wp-multilang' ), + /* translators: %s: url */ + 'desc' => sprintf( __( 'Translate posts, pages, custom posts, categories and custom taxonomies slug. Learn More', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/' ) ), + 'id' => 'wpm_string_translation', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Auto Slug Translation', 'wp-multilang' ), + /* translators: %s: url */ + 'desc' => sprintf( __( 'This translates the slug automatically when you auto translate any post, page etc. Learn More', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/' ) ), + 'id' => 'wpm_auto_slug_translation', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( + 'title' => esc_html__( 'Base Translation', 'wp-multilang' ), + /* translators: %s: url */ + 'desc' => sprintf( __( 'Translate Categories, Product categories, Tags and Custom Taxonomies base. Learn More', 'wp-multilang' ), esc_url( 'https://wp-multilang.com/docs/knowledge-base/how-to-translate-taxonomy-bases-such-as-categories-and-tags-into-selective-languages-using-the-base-translation-option/' ) ), + 'id' => 'wpm_base_translation', + 'default' => 'no', + 'type' => 'checkbox', + ), + + array( 'type' => 'sectionend', 'id' => 'general_options' ), + + ) ); + + return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); + } + + /** + * Add uninstall settings only for Super Admin + * + * @param $settings + * + * @return array + */ + public function add_uninstall_setting( $settings ) { + + if ( ! is_multisite() || ( is_main_site() ) ) { + $settings[] = array( + 'title' => esc_html__( 'Uninstalling', 'wp-multilang' ), + 'type' => 'title', + 'desc' => '', + 'id' => 'uninstall_options', + ); + + $settings[] = array( + 'title' => esc_html__( 'Delete translations', 'wp-multilang' ), + 'desc' => esc_html__( 'Delete translations when uninstalling plugin ( some translations may not be deleted and you must delete them manually ).', 'wp-multilang' ), + 'id' => 'wpm_uninstall_translations', + 'default' => 'no', + 'type' => 'checkbox', + ); + + $settings[] = array( 'type' => 'sectionend', 'id' => 'uninstall_options' ); + } + + return $settings; + } + + /** + * Save settings. + */ + public function save() { + $settings = $this->get_settings(); + $settings = apply_filters( 'wpm_disable_translation_options', $settings ); + WPM_Admin_Settings::save_fields( $settings ); + } + + /** + * Update WPLANG option + */ + public function update_wplang() { + $value = WPM_Admin_Settings::get_option( 'wpm_site_language' ); + $languages = wpm_get_languages(); + $locale = $languages[ $value ]['translation']; + update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); + } + + /** + * Don't save string translation and base translations if pro is not active + * @param $settings Array + * @return $settings Array + * @since 2.4.12 + * */ + public function unset_translation_options( $settings ){ + + $unset_keys = array( 'wpm_string_translation', 'wpm_base_translation', 'wpm_auto_slug_translation' ); + + if( ! defined('WP_MULTILANG_PRO_VERSION') ) { + if( ! empty( $settings ) && is_array( $settings ) ) { + foreach ($settings as $key => $value) { + if( ! empty( $value['id'] ) && in_array($value['id'], $unset_keys) ) { + unset($settings[$key]); + } + } + // Rearrange array keys + $settings = array_values($settings); + } + } + + return $settings; + } + + /** + * Add reset settings options + * @param $settings Array + * @return $settings Array + * @since 2.4.15 + * */ + public function add_reset_settings( $settings ){ + $settings[] = array( + 'title' => esc_html__( 'Reset', 'wp-multilang' ), + 'type' => 'title', + 'id' => 'wpm-reset-settings' + ); + + $settings[] = array( + 'title' => esc_html__( 'Reset Settings', 'wp-multilang' ), + 'id' => 'wpm-reset-settings-btn', + 'type' => 'reset_settings', + ); + + $settings[] = array( 'type' => 'sectionend', 'id' => 'wpm-reset-settings' ); + + return $settings; + } + + /** + * Render reset settings button + * @param $value Array + * @since 2.4.15 + * */ + public function reset_settings( $value ){ + + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'wpm_reset_settings_nonce' => wp_create_nonce( 'wpm-reset-settings' ), + 'wpm_confirm_reset' => esc_html__( 'Are you sure ? You can not undo once press ok button.', 'wp-multilang' ), + ); + wp_localize_script( 'wpm_reset_settings', 'wpm_reset_settings_params', $main_params ); + wp_enqueue_script( 'wpm_reset_settings' ); + + ?> + + +

+ + +

+ +

+

+ + + esc_html__( 'Activate Multilingual Support for Post Types', 'wp-multilang' ), + 'type' => 'title', + 'id' => 'wpm-cpt-settings' + ); + + $settings[] = array( + 'title' => esc_html__( 'Post Types', 'wp-multilang' ), + 'desc' => esc_html__( 'Select custom post types for translation', 'wp-multilang' ), + 'id' => 'wpm_custom_post_types', + 'type' => 'checkboxgroup', + 'options' => $post_types, + ); + + $settings[] = array( 'type' => 'sectionend', 'id' => 'wpm-cpt-settings' ); + + return $settings; + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-languages.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-languages.php index e28e0a46b..4e0672a4d 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-languages.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-languages.php @@ -1,149 +1,149 @@ -id = 'languages'; - $this->label = esc_html__( 'Languages', 'wp-multilang' ); - - parent::__construct(); - - add_action( 'wpm_admin_field_languages', array( $this, 'get_languages' ) ); - } - - /** - * Get settings array. - * - * @return array - */ - public function get_settings() { - - $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( - - array( 'title' => esc_html__( 'Languages', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'languages_options' ), - - array( - 'title' => esc_html__( 'Installed languages', 'wp-multilang' ), - 'id' => 'wpm_languages', - 'type' => 'languages', - ), - - array( 'type' => 'sectionend', 'id' => 'languages_options' ), - - ) ); - - return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); - } - - /** - * Get languages field - * - * @param $value - */ - public function get_languages( $value ) { - - $main_params = array( - 'plugin_url' => wpm()->plugin_url(), - 'flags_dir' => wpm_get_flags_dir(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'delete_lang_nonce' => wp_create_nonce( 'delete-lang' ), - 'confirm_question' => esc_html__( 'Are you sure you want to delete this language?', 'wp-multilang' ), - ); - wp_localize_script( 'wpm_languages', 'wpm_languages_params', $main_params ); - - wp_enqueue_script( 'wpm_languages' ); - wp_enqueue_style( 'select2' ); - - $languages = get_option( 'wpm_languages', array() ); - $flags = wpm_get_flags(); - - include_once __DIR__ . '/views/html-languages.php'; - } - - /** - * Save settings. - */ - public function save() { - - if ( $value = wpm_get_post_data_by_key( 'wpm_languages' ) ) { - - $option_name = 'wpm_languages'; - $languages = array(); - $error = false; - $translations = wpm_get_available_translations(); - $installed_languages = wpm_get_installed_languages(); - - foreach ( $installed_languages as $installed_language ) { - if ( isset( $translations[ $installed_language ] ) ) { - unset( $translations[ $installed_language ] ); - } - } - - foreach ( $value as $item ) { - - if ( empty( $item['code'] ) || empty( $item['locale'] ) ) { - $error = true; - break; - } - - $code = wpm_sanitize_lang_slug( $item['code'] ); - - if ( ! $code ) { - $error = true; - break; - } - - $languages[ $code ] = array( - 'enable' => $item['enable'] ? 1 : 0, - 'locale' => $item['locale'], - 'name' => $item['name'], - 'translation' => $item['translation'] ?: 'en_US', - 'date' => $item['date'], - 'time' => $item['time'], - 'flag' => $item['flag'], - ); - - if ( isset( $translations[ $item['translation'] ] ) && wp_can_install_language_pack() && current_user_can( 'install_languages' ) ) { - wp_download_language_pack( $item['translation'] ); - WPM_Admin_Notices::add_custom_notice( - $option_name . '_lang_pack_installed', - __( 'New language pack successfully installed', 'wp-multilang' ) - ); - } - } - - if ( $error ) { - return; - } - - $languages = apply_filters( 'wpm_save_languages', $languages, $value ); - $locale = $languages[ wpm_get_default_language() ]['translation']; - update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); - $user_locale = $languages[ wpm_get_user_language() ]['translation']; - update_user_meta( get_current_user_id(), 'locale', $user_locale ); - - - update_option( $option_name, $languages ); - }// End if(). - } -} +id = 'languages'; + $this->label = esc_html__( 'Languages', 'wp-multilang' ); + + parent::__construct(); + + add_action( 'wpm_admin_field_languages', array( $this, 'get_languages' ) ); + } + + /** + * Get settings array. + * + * @return array + */ + public function get_settings() { + + $settings = apply_filters( 'wpm_' . $this->id . '_settings', array( + + array( 'title' => esc_html__( 'Languages', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'languages_options' ), + + array( + 'title' => esc_html__( 'Installed languages', 'wp-multilang' ), + 'id' => 'wpm_languages', + 'type' => 'languages', + ), + + array( 'type' => 'sectionend', 'id' => 'languages_options' ), + + ) ); + + return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); + } + + /** + * Get languages field + * + * @param $value + */ + public function get_languages( $value ) { + + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'flags_dir' => wpm_get_flags_dir(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'delete_lang_nonce' => wp_create_nonce( 'delete-lang' ), + 'confirm_question' => esc_html__( 'Are you sure you want to delete this language?', 'wp-multilang' ), + ); + wp_localize_script( 'wpm_languages', 'wpm_languages_params', $main_params ); + + wp_enqueue_script( 'wpm_languages' ); + wp_enqueue_style( 'select2' ); + + $languages = get_option( 'wpm_languages', array() ); + $flags = wpm_get_flags(); + + include_once __DIR__ . '/views/html-languages.php'; + } + + /** + * Save settings. + */ + public function save() { + + if ( $value = wpm_get_post_data_by_key( 'wpm_languages' ) ) { + + $option_name = 'wpm_languages'; + $languages = array(); + $error = false; + $translations = wpm_get_available_translations(); + $installed_languages = wpm_get_installed_languages(); + + foreach ( $installed_languages as $installed_language ) { + if ( isset( $translations[ $installed_language ] ) ) { + unset( $translations[ $installed_language ] ); + } + } + + foreach ( $value as $item ) { + + if ( empty( $item['code'] ) || empty( $item['locale'] ) ) { + $error = true; + break; + } + + $code = wpm_sanitize_lang_slug( $item['code'] ); + + if ( ! $code ) { + $error = true; + break; + } + + $languages[ $code ] = array( + 'enable' => $item['enable'] ? 1 : 0, + 'locale' => $item['locale'], + 'name' => $item['name'], + 'translation' => $item['translation'] ?: 'en_US', + 'date' => $item['date'], + 'time' => $item['time'], + 'flag' => $item['flag'], + ); + + if ( isset( $translations[ $item['translation'] ] ) && wp_can_install_language_pack() && current_user_can( 'install_languages' ) ) { + wp_download_language_pack( $item['translation'] ); + WPM_Admin_Notices::add_custom_notice( + $option_name . '_lang_pack_installed', + __( 'New language pack successfully installed', 'wp-multilang' ) + ); + } + } + + if ( $error ) { + return; + } + + $languages = apply_filters( 'wpm_save_languages', $languages, $value ); + $locale = $languages[ wpm_get_default_language() ]['translation']; + update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); + $user_locale = $languages[ wpm_get_user_language() ]['translation']; + update_user_meta( get_current_user_id(), 'locale', $user_locale ); + + + update_option( $option_name, $languages ); + }// End if(). + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-page.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-page.php index 51a5f20f1..aae55a659 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-page.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-page.php @@ -1,138 +1,138 @@ -id, array( $this, 'output_sections' ) ); - add_action( 'wpm_settings_' . $this->id, array( $this, 'output' ) ); - add_action( 'wpm_settings_save_' . $this->id, array( $this, 'save' ) ); - } - - /** - * Get settings page ID. - * @return string - */ - public function get_id() { - return $this->id; - } - - /** - * Get settings page label. - * @return string - */ - public function get_label() { - return $this->label; - } - - /** - * Add this page to settings. - * - * @param array $pages - * - * @return mixed - */ - public function add_settings_page( $pages ) { - $pages[ $this->id ] = $this->label; - - return $pages; - } - - /** - * Get settings array. - * - * @return array - */ - public function get_settings() { - return apply_filters( 'wpm_get_settings_' . $this->id, array() ); - } - - /** - * Get sections. - * - * @return array - */ - public function get_sections() { - return apply_filters( 'wpm_get_sections_' . $this->id, array() ); - } - - /** - * Output sections. - */ - public function output_sections() { - global $current_section; - - $sections = $this->get_sections(); - - if ( empty( $sections ) || 1 === sizeof( $sections ) ) { - return; - } - - echo '
'; - } - - /** - * Output the settings. - */ - public function output() { - $settings = $this->get_settings(); - - WPM_Admin_Settings::output_fields( $settings ); - } - - /** - * Save settings. - */ - public function save() { - global $current_section; - - $settings = $this->get_settings(); - WPM_Admin_Settings::save_fields( $settings ); - - if ( $current_section ) { - do_action( 'wpm_update_options_' . $this->id . '_' . $current_section ); - } - } -} +id, array( $this, 'output_sections' ) ); + add_action( 'wpm_settings_' . $this->id, array( $this, 'output' ) ); + add_action( 'wpm_settings_save_' . $this->id, array( $this, 'save' ) ); + } + + /** + * Get settings page ID. + * @return string + */ + public function get_id() { + return $this->id; + } + + /** + * Get settings page label. + * @return string + */ + public function get_label() { + return $this->label; + } + + /** + * Add this page to settings. + * + * @param array $pages + * + * @return mixed + */ + public function add_settings_page( $pages ) { + $pages[ $this->id ] = $this->label; + + return $pages; + } + + /** + * Get settings array. + * + * @return array + */ + public function get_settings() { + return apply_filters( 'wpm_get_settings_' . $this->id, array() ); + } + + /** + * Get sections. + * + * @return array + */ + public function get_sections() { + return apply_filters( 'wpm_get_sections_' . $this->id, array() ); + } + + /** + * Output sections. + */ + public function output_sections() { + global $current_section; + + $sections = $this->get_sections(); + + if ( empty( $sections ) || 1 === sizeof( $sections ) ) { + return; + } + + echo '
'; + } + + /** + * Output the settings. + */ + public function output() { + $settings = $this->get_settings(); + + WPM_Admin_Settings::output_fields( $settings ); + } + + /** + * Save settings. + */ + public function save() { + global $current_section; + + $settings = $this->get_settings(); + WPM_Admin_Settings::save_fields( $settings ); + + if ( $current_section ) { + do_action( 'wpm_update_options_' . $this->id . '_' . $current_section ); + } + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-premium.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-premium.php index 54ceb4be3..18e984e27 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-premium.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-premium.php @@ -1,95 +1,102 @@ -id = 'premium'; - $this->label = esc_html__( 'Compatibility', 'wp-multilang' ); - - parent::__construct(); - } - - /** - * Get settings array. - * - * @return array - */ - public function get_settings() { - - /** - * enqueue js - * */ - $main_params = array( - 'plugin_url' => wpm()->plugin_url(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'premium_nonce' => wp_create_nonce( 'premium-localization' ), - ); - wp_localize_script( 'wpm_premium_settings', 'wpm_premium_settings_params', $main_params ); - wp_enqueue_script( 'wpm_premium_settings' ); - - $section_note = array( 'title' => '', 'type' => 'section_note', 'desc' => __('If you can’t find your compatibility with WP Multilang, then we’ll make the integration. Contact Us', 'wp-multilang')); - - $compat_Settings['compat'] = array( - array( - 'title' => esc_html__( 'Elementor', 'wp-multilang' ), - 'class' => 'wpm_free_compatibilities', - 'id' => 'wpm_elementor_compatibility_free', - 'default' => 'no', - 'type' => 'checkbox', - ), - array( - 'title' => esc_html__( 'Divi Builder', 'wp-multilang' ), - 'class' => 'wpm_free_compatibilities', - 'id' => 'wpm_divi_compatibility_free', - 'default' => 'no', - 'type' => 'checkbox', - ) - ); - if(defined('WP_MULTILANG_PRO_VERSION')){ - $compat_Settings = apply_filters('wpm_premium_settings_pro', array()); - $section_note = array(); - } - - $setting_array[] = array( 'title' => esc_html__( 'Compatibility', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'premium_features' ); - foreach ($compat_Settings['compat'] as $cs_key => $cs_value) { - $setting_array[] = $cs_value; - } - $setting_array[] = array( 'type' => 'sectionend', 'id' => 'premium_features' ); - $setting_array[] = $section_note; - - $settings = apply_filters( 'wpm_' . $this->id . '_settings', $setting_array ); - - return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); - } - - /** - * Save settings. - */ - public function save() { - if(defined('WP_MULTILANG_PRO_VERSION')){ - $settings = $this->get_settings(); - - WPM_Admin_Settings::save_fields( $settings ); - } - } -} +id = 'premium'; + $this->label = esc_html__( 'Compatibility', 'wp-multilang' ); + + parent::__construct(); + } + + /** + * Get settings array. + * + * @return array + */ + public function get_settings() { + + /** + * enqueue js + * */ + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'premium_nonce' => wp_create_nonce( 'premium-localization' ), + ); + wp_localize_script( 'wpm_premium_settings', 'wpm_premium_settings_params', $main_params ); + wp_enqueue_script( 'wpm_premium_settings' ); + + $section_note = array( 'title' => '', 'type' => 'section_note', 'desc' => __('If you can’t find your compatibility with WP Multilang, then we’ll make the integration. Contact Us', 'wp-multilang')); + + $compat_Settings['compat'] = array( + array( + 'title' => esc_html__( 'Elementor', 'wp-multilang' ), + 'class' => 'wpm_free_compatibilities', + 'id' => 'wpm_elementor_compatibility_free', + 'default' => 'no', + 'type' => 'checkbox', + ), + array( + 'title' => esc_html__( 'Divi Builder', 'wp-multilang' ), + 'class' => 'wpm_free_compatibilities', + 'id' => 'wpm_divi_compatibility_free', + 'default' => 'no', + 'type' => 'checkbox', + ), + array( + 'title' => esc_html__( 'Bricks Builder', 'wp-multilang' ), + 'class' => 'wpm_free_compatibilities', + 'id' => 'wpm_bricks_compatibility_free', + 'default' => 'no', + 'type' => 'checkbox', + ) + ); + if(defined('WP_MULTILANG_PRO_VERSION')){ + $compat_Settings = apply_filters('wpm_premium_settings_pro', array()); + $section_note = array(); + } + + $setting_array[] = array( 'title' => esc_html__( 'Compatibility', 'wp-multilang' ), 'type' => 'title', 'desc' => '', 'id' => 'premium_features' ); + foreach ($compat_Settings['compat'] as $cs_key => $cs_value) { + $setting_array[] = $cs_value; + } + $setting_array[] = array( 'type' => 'sectionend', 'id' => 'premium_features' ); + $setting_array[] = $section_note; + + $settings = apply_filters( 'wpm_' . $this->id . '_settings', $setting_array ); + + return apply_filters( 'wpm_get_settings_' . $this->id, $settings ); + } + + /** + * Save settings. + */ + public function save() { + if(defined('WP_MULTILANG_PRO_VERSION')){ + $settings = $this->get_settings(); + + WPM_Admin_Settings::save_fields( $settings ); + } + } +} diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-support.php b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-support.php index e6e11ca20..802da4db8 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-support.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/class-wpm-settings-support.php @@ -1,37 +1,72 @@ -id = 'support'; - $this->label = esc_html__( 'Help & Support', 'wp-multilang' ); - - parent::__construct(); - } - - /** - * Output the settings. - */ - public function output() { - $GLOBALS['hide_save_button'] = true; - } -} +id = 'support'; + $this->label = esc_html__( 'Help & Support', 'wp-multilang' ); + + parent::__construct(); + } + + /** + * Output the settings. + */ + public function output() { + + $GLOBALS['hide_save_button'] = true; + + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'support_nonce' => wp_create_nonce( 'support-localization' ), + ); + wp_localize_script( 'wpm_support_settings', 'wpm_support_settings_params', $main_params ); + wp_enqueue_script( 'wpm_support_settings' ); + + ?> +
+

team@magazine3.in.

+ +
+ +
+ + +
+
+ id = 'upgradetopro'; - $this->label = esc_html__( 'Upgrade to Pro', 'wp-multilang' ); - - parent::__construct(); - } +id = 'upgradetopro'; + $this->label = esc_html__( 'Upgrade to Pro', 'wp-multilang' ); + + parent::__construct(); + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-auto-translate.php b/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-auto-translate.php index 14efba207..b17115444 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-auto-translate.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-auto-translate.php @@ -1,128 +1,239 @@ - -
-
-

-
- -
-

- -
- - - - - -
- - -
- -
- - admin_url( 'admin-ajax.php' ), - 'total_record' => $total_record, - 'published_post_count' => $published_post_count, - 'total_pages' => $total_pages, - 'total_product' => $total_product, - 'source_language' => $source_language, - 'wpmpro_autotranslate_nonce' => wp_create_nonce( 'wpmpro-autotranslate-nonce' ), -); -do_action( 'wpmpro_autotranslate_enqueue_script', $main_params ); + +
+
+

+
+ +
+

+ +
+ + + + + + + +
+ + +
+ + +
+ + admin_url( 'admin-ajax.php' ), + 'total_record' => $total_record, + 'published_post_count' => $published_post_count, + 'total_pages' => $total_pages, + 'total_product' => $total_product, + 'total_categories' => $total_categories, + 'total_tags' => $total_tags, + 'total_product_categories' => $total_product_categories, + 'allow_auto_override' => get_option( 'wpm_allow_auto_override', 'no' ), + 'confirmation_message' => esc_html__( 'This will initiate the translation process. Any existing translation for this language will be overwritten. Would you like to proceed?', 'wp-multilang' ), + 'source_language' => function_exists('wpm_get_user_language') ? wpm_get_user_language() : 'en', + 'target_language' => function_exists('wpm_get_language') ? wpm_get_language() : 'en', + 'is_pro_active' => wpm_is_pro_active(), + 'wpmpro_autotranslate_nonce' => wp_create_nonce( 'wpmpro-autotranslate-nonce' ), +); +$main_params = apply_filters( 'wpm_localize_autotranslate_params', $main_params ); +do_action( 'wpmpro_autotranslate_enqueue_script', $main_params ); diff --git a/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-languages.php b/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-languages.php index 8ab7b94a3..79240f6bc 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-languages.php +++ b/plugins/wp-react-custom-multilang/includes/admin/settings/views/html-languages.php @@ -1,210 +1,210 @@ - - - - - - -
-
- $language ) { ?> - -
- -
- - - - - -
-

- - - [:] -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - title="" disabled="disabled"> - - - -
- -
- -
- 'wpm_languages[' . $i . '][translation]', - 'id' => 'wpm_languages[' . $i . '][translation]', - 'selected' => $language['translation'], - 'languages' => get_available_languages(), - 'show_available_translations' => current_user_can( 'install_languages' ), - ) ); - ?> -
- -
- -
- -
- -
-
-
- -
-
- - -

- -

- - + + + + + + +
+
+ $language ) { ?> + +
+ +
+ + + + + +
+

+ + + [:] +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + title="" disabled="disabled"> + + + +
+ +
+ +
+ 'wpm_languages[' . $i . '][translation]', + 'id' => 'wpm_languages[' . $i . '][translation]', + 'selected' => $language['translation'], + 'languages' => get_available_languages(), + 'show_available_translations' => current_user_can( 'install_languages' ), + ) ); + ?> +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ + +

+ +

+ + diff --git a/plugins/wp-react-custom-multilang/includes/admin/tracking/class-wpm-feedback-form.php b/plugins/wp-react-custom-multilang/includes/admin/tracking/class-wpm-feedback-form.php index b42229951..40140c3b4 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/tracking/class-wpm-feedback-form.php +++ b/plugins/wp-react-custom-multilang/includes/admin/tracking/class-wpm-feedback-form.php @@ -1,109 +1,101 @@ -wpm_is_plugins_page()) { - add_filter( 'admin_footer', array($this, 'wpm_add_deactivation_feedback_modal' ) ); - add_action( 'admin_enqueue_scripts', array($this, 'wpm_enqueue_deactivation_feedback_js' )); - } - } - - /** - * Check is current page is a plugin page - * @since 2.4.6 - * */ - public function wpm_is_plugins_page() - { - global $pagenow; - - return ( 'plugins.php' === $pagenow ); - } - - /** - * Feedback form modal template - * @since 2.4.6 - * */ - public function wpm_add_deactivation_feedback_modal() - { - $current_user = wp_get_current_user(); - $email = ''; - if(is_object($current_user) && isset($current_user->user_email)){ - $email = trim( $current_user->user_email ); - } - - $reasons = array( - 1 => '
  • ', - 2 => '
  • ', - 3 => '
  • -
  • ', - 4 => '
  • -
  • ', - 5 => '
  • -
  • ', - 6 => '
  • -
  • ', - ); - shuffle($reasons); - - ?> - - - - wpm()->plugin_url(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'feedback_nonce' => wp_create_nonce( 'feedback-localization' ), - ); - wp_register_script( 'wpm-feedback-script', wpm_asset_path( 'scripts/wpm-feedback-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_localize_script( 'wpm-feedback-script', 'wpm_feedback_params', $main_params ); - wp_enqueue_script( 'wpm-feedback-script' ); - - wp_enqueue_style( 'wpm-feedback-css', wpm_asset_path( 'styles/admin/wpm-feedback-style' . $suffix . '.css' ), array(), WPM_VERSION ); - } +wpm_is_plugins_page()) { + add_filter( 'admin_footer', array($this, 'wpm_add_deactivation_feedback_modal' ) ); + add_action( 'admin_enqueue_scripts', array($this, 'wpm_enqueue_deactivation_feedback_js' )); + } + } + + /** + * Check is current page is a plugin page + * @since 2.4.6 + * */ + public function wpm_is_plugins_page() + { + global $pagenow; + + return ( 'plugins.php' === $pagenow ); + } + + /** + * Feedback form modal template + * @since 2.4.6 + * */ + public function wpm_add_deactivation_feedback_modal() + { + $current_user = wp_get_current_user(); + $uninstall_opt = get_option( 'wpm_uninstall_translations', 'no' ); + ?> + + + + wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'feedback_nonce' => wp_create_nonce( 'feedback-localization' ), + ); + wp_register_script( 'wpm-feedback-script', wpm_asset_path( 'scripts/wpm-feedback-script' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_localize_script( 'wpm-feedback-script', 'wpm_feedback_params', $main_params ); + wp_enqueue_script( 'wpm-feedback-script' ); + + wp_enqueue_style( 'wpm-feedback-css', wpm_asset_path( 'styles/admin/wpm-feedback-style' . $suffix . '.css' ), array(), WPM_VERSION ); + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/views/bulk-translate/template-bulk-translate.php b/plugins/wp-react-custom-multilang/includes/admin/views/bulk-translate/template-bulk-translate.php new file mode 100644 index 000000000..2a42cf00c --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/admin/views/bulk-translate/template-bulk-translate.php @@ -0,0 +1,44 @@ + +
    + + + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    +

    + + + +

    +
    +
    +
    \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/admin/views/html-admin-settings.php b/plugins/wp-react-custom-multilang/includes/admin/views/html-admin-settings.php index a92953131..0370943bf 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/views/html-admin-settings.php +++ b/plugins/wp-react-custom-multilang/includes/admin/views/html-admin-settings.php @@ -1,117 +1,117 @@ - -
    -

    -
    - -

    - -

    - -

    - -
    - '.esc_html__( 'Upgrade to PRO', 'wp-multilang').''; - // } - ?> - - -

    - -
    - - - -
    - - -
    -
    - -
    - - -
    -

    -
    -
    -

    -
    - - - -
    - -
    -
    - +
    +

    +
    + +

    + +

    + +

    + +
    + '.esc_html__( 'Upgrade to PRO', 'wp-multilang').''; + // } + ?> + + +

    + +
    + + + +
    + + +
    +
    + +
    + + +
    +

    +
    +
    +

    +
    + + + +
    + +
    +
    + -
    - - -
    + +
    + + +
    diff --git a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-update.php b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-update.php index 826c9cdcf..f1b7fb20e 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-update.php +++ b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-update.php @@ -1,19 +1,19 @@ - -
    -

    –

    -

    -
    - + +
    +

    –

    +

    +
    + diff --git a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updated.php b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updated.php index 5513b5712..692a34bfa 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updated.php +++ b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updated.php @@ -1,15 +1,15 @@ - -
    - - -

    -
    + +
    + + +

    +
    diff --git a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updating.php b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updating.php index 14fbe00fb..10d8531a2 100644 --- a/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updating.php +++ b/plugins/wp-react-custom-multilang/includes/admin/views/html-notice-updating.php @@ -1,13 +1,13 @@ - -
    -

    –

    -
    + +
    +

    –

    +
    diff --git a/plugins/wp-react-custom-multilang/includes/class-wp-multilang.php b/plugins/wp-react-custom-multilang/includes/class-wp-multilang.php index c168b6dce..ca6c3c69d 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wp-multilang.php +++ b/plugins/wp-react-custom-multilang/includes/class-wp-multilang.php @@ -1,247 +1,252 @@ -define_constants(); - $this->includes(); - $this->init_hooks(); - - do_action( 'wpm_loaded' ); - } - - /** - * Hook into actions and filters. - */ - private function init_hooks() { - register_activation_hook( __FILE__, array( 'WPM\Includes\WPM_Install', 'install' ) ); - add_action( 'init', array( $this, 'init' ), 0 ); - add_action( 'after_setup_theme', array( $this, 'translate_options' ), 1 ); - } - - /** - * Define WPM Constants. - */ - private function define_constants() { - $this->define( 'WPM_ABSPATH', dirname( WPM_PLUGIN_FILE ) . '/' ); - $this->define( 'WPM_PLUGIN_BASENAME', plugin_basename( WPM_PLUGIN_FILE ) ); - $this->define( 'WPM_VERSION', $this->version ); - } - - /** - * Define constant if not already set. - * - * @param string $name - * @param string|bool $value - */ - private function define( $name, $value ) { - if ( ! defined( $name ) ) { - define( $name, $value ); - } - } - - /** - * What type of request is this? - * - * @param string $type admin, ajax, cron or frontend. - * - * @return bool - */ - private function is_request( $type ) { - switch ( $type ) { - case 'admin': - return is_admin(); - case 'ajax': - return wp_doing_ajax(); - case 'cron': - return defined( 'DOING_CRON' ); - case 'frontend': - return ( ! is_admin() || wp_doing_ajax() ) && ! defined( 'DOING_CRON' ); - default: - return false; - } - } - - /** - * Include required core files used in admin and on the frontend. - */ - public function includes() { - /** - * Core classes. - */ - include_once WPM_ABSPATH . 'includes/wpm-core-functions.php'; - include_once WPM_ABSPATH . 'includes/wpm-widget-functions.php'; - - WPM_Install::init(); - $this->setup = new WPM_Setup(); - - if ( $this->is_request( 'frontend' ) ) { - WPM_Frontend_Scripts::init(); // Frontend Scripts - } - } - - /** - * Translate options - */ - public function translate_options() { - new WPM_Options(); - - if ( is_multisite() ) { - new WPM_Site_Options(); - } - } - - /** - * Init Multilang when WordPress Initialises. - */ - public function init() { - // Before init action. - do_action( 'before_wpm_init' ); - - // Set up localisation. - $this->load_plugin_textdomain(); - - WPM_AJAX::init(); - new WPM_REST_Settings(); - new WPM_Menus(); - new WPM_Posts(); - new WPM_Taxonomies(); - new WPM_Widgets(); - new WPM_Users(); - new WPM_Comments(); - new WPM_Shortcodes(); - - if ( $this->is_request( 'admin' ) ) { - new Admin\WPM_Admin(); - } - - // Init action. - do_action( 'wpm_init' ); - } - - /** - * Load Localisation files. - * - * Note: the first-loaded translation file overrides any following ones if the same translation is present. - */ - public function load_plugin_textdomain() { - load_plugin_textdomain( 'wp-multilang', false, plugin_basename( dirname( WPM_PLUGIN_FILE ) ) . '/languages' ); - } - - /** - * Get the plugin url. - * @return string - */ - public function plugin_url() { - return untrailingslashit( plugins_url( '/', WPM_PLUGIN_FILE ) ); - } - - /** - * Get the plugin path. - * @return string - */ - public function plugin_path() { - return untrailingslashit( plugin_dir_path( WPM_PLUGIN_FILE ) ); - } - - /** - * Get the templates path. - * @return string - */ - public function template_path() { - return $this->plugin_path() . '/templates/'; - } - - /** - * Get the flags path. - * @return string - */ - public function flags_dir() { - return $this->plugin_url() . '/flags/'; - } - - /** - * Get the flags path. - * @return string - */ - public function flags_path() { - return $this->plugin_path() . '/flags/'; - } - - /** - * Get Ajax URL. - * @return string - */ - public function ajax_url() { - return admin_url( 'admin-ajax.php', 'relative' ); - } -} +define_constants(); + $this->includes(); + $this->init_hooks(); + + do_action( 'wpm_loaded' ); + } + + /** + * Hook into actions and filters. + */ + private function init_hooks() { + register_activation_hook( __FILE__, array( 'WPM\Includes\WPM_Install', 'install' ) ); + add_action( 'init', array( $this, 'init' ), 0 ); + add_action( 'after_setup_theme', array( $this, 'translate_options' ), 1 ); + } + + /** + * Define WPM Constants. + */ + private function define_constants() { + $this->define( 'WPM_ABSPATH', dirname( WPM_PLUGIN_FILE ) . '/' ); + $this->define( 'WPM_PLUGIN_BASENAME', plugin_basename( WPM_PLUGIN_FILE ) ); + $this->define( 'WPM_VERSION', $this->version ); + $this->define( 'WPM_OPENAI_PROMPT', 'You are a professional translator that translates text from {{source_language}} to {{target_language}}.' ); + } + + /** + * Define constant if not already set. + * + * @param string $name + * @param string|bool $value + */ + private function define( $name, $value ) { + if ( ! defined( $name ) ) { + define( $name, $value ); + } + } + + /** + * What type of request is this? + * + * @param string $type admin, ajax, cron or frontend. + * + * @return bool + */ + private function is_request( $type ) { + switch ( $type ) { + case 'admin': + return is_admin(); + case 'ajax': + return wp_doing_ajax(); + case 'cron': + return defined( 'DOING_CRON' ); + case 'frontend': + return ( ! is_admin() || wp_doing_ajax() ) && ! defined( 'DOING_CRON' ); + default: + return false; + } + } + + /** + * Include required core files used in admin and on the frontend. + */ + public function includes() { + /** + * Core classes. + */ + include_once WPM_ABSPATH . 'includes/wpm-core-functions.php'; + include_once WPM_ABSPATH . 'includes/wpm-widget-functions.php'; + + WPM_Install::init(); + $this->setup = new WPM_Setup(); + + if ( $this->is_request( 'frontend' ) ) { + WPM_Frontend_Scripts::init(); // Frontend Scripts + } + } + + /** + * Translate options + */ + public function translate_options() { + new WPM_Options(); + + if ( is_multisite() ) { + new WPM_Site_Options(); + } + } + + /** + * Init Multilang when WordPress Initialises. + */ + public function init() { + // Before init action. + do_action( 'before_wpm_init' ); + + // Set up localisation. + $this->load_plugin_textdomain(); + + WPM_AJAX::init(); + new WPM_REST_Settings(); + new WPM_Menus(); + new WPM_Posts(); + new WPM_Taxonomies(); + new WPM_Widgets(); + new WPM_Users(); + new WPM_Comments(); + new WPM_Shortcodes(); + new WPM_Custom_Post_Types(); + if( class_exists( 'WPM\Includes\Admin\Settings\WPM_Settings_Auto_Translate_Pro' ) ) { + new \WPM\Includes\Admin\Settings\WPM_Settings_Auto_Translate_Pro(); + } + + if ( $this->is_request( 'admin' ) ) { + new Admin\WPM_Admin(); + } + + // Init action. + do_action( 'wpm_init' ); + } + + /** + * Load Localisation files. + * + * Note: the first-loaded translation file overrides any following ones if the same translation is present. + */ + public function load_plugin_textdomain() { + load_plugin_textdomain( 'wp-multilang', false, plugin_basename( dirname( WPM_PLUGIN_FILE ) ) . '/languages' ); + } + + /** + * Get the plugin url. + * @return string + */ + public function plugin_url() { + return untrailingslashit( plugins_url( '/', WPM_PLUGIN_FILE ) ); + } + + /** + * Get the plugin path. + * @return string + */ + public function plugin_path() { + return untrailingslashit( plugin_dir_path( WPM_PLUGIN_FILE ) ); + } + + /** + * Get the templates path. + * @return string + */ + public function template_path() { + return $this->plugin_path() . '/templates/'; + } + + /** + * Get the flags path. + * @return string + */ + public function flags_dir() { + return $this->plugin_url() . '/flags/'; + } + + /** + * Get the flags path. + * @return string + */ + public function flags_path() { + return $this->plugin_path() . '/flags/'; + } + + /** + * Get Ajax URL. + * @return string + */ + public function ajax_url() { + return admin_url( 'admin-ajax.php', 'relative' ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-ajax.php b/plugins/wp-react-custom-multilang/includes/class-wpm-ajax.php index f36672ef3..dc381f7dd 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-ajax.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-ajax.php @@ -1,426 +1,1171 @@ -hide_errors(); - } - } - - /** - * Send headers for WPM Ajax Requests - */ - private static function wpm_ajax_headers() { - send_origin_headers(); - @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); - @header( 'X-Robots-Tag: noindex' ); - send_nosniff_header(); - nocache_headers(); - status_header( 200 ); - } - - /** - * Check for WPM Ajax request and fire action. - */ - public static function do_wpm_ajax() { - global $wp_query; - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( ! empty( $_GET['wpm-ajax'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- this is a dependent function and its all security measurament is done wherever it has been used. - $wp_query->set( 'wpm-ajax', sanitize_text_field( $_GET['wpm-ajax'] ) ); - } - - if ( $action = $wp_query->get( 'wpm-ajax' ) ) { - self::wpm_ajax_headers(); - do_action( 'wpm_ajax_' . sanitize_text_field( $action ) ); - die(); - } - } - - /** - * Hook in methods - uses WordPress ajax handlers (admin-ajax). - */ - public static function add_ajax_events() { - $ajax_events = array( - 'delete_lang' => false, - 'delete_localization' => false, - 'qtx_import' => false, - 'rated' => false, - 'subscribe_to_news_letter' => false, - 'newsletter_hide_form' => false, - 'settings_newsletter_submit' => false, - 'block_lang_switcher' => true, - 'reset_settings' => true - ); - - foreach ( $ajax_events as $ajax_event => $nopriv ) { - add_action( 'wp_ajax_wpm_' . $ajax_event, array( __CLASS__, $ajax_event ) ); - - if ( $nopriv ) { - add_action( 'wp_ajax_nopriv_wpm_' . $ajax_event, array( __CLASS__, $ajax_event ) ); - - // GP AJAX can be used for frontend ajax requests - add_action( 'wpm_ajax_' . $ajax_event, array( __CLASS__, $ajax_event ) ); - } - } - } - - /** - * Remove installed language files and option - */ - public static function delete_lang() { - - check_ajax_referer( 'delete-lang', 'security' ); - - $language = wpm_get_post_data_by_key( 'language' ); - $options = wpm_get_lang_option(); - - if ( ! $language || ! isset( $options[ $language ] ) || ( wpm_get_user_language() === $language ) || ( wpm_get_default_language() === $language ) ) { - return; - } - - unset( $options[ $language ] ); - - global $wpdb; - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: using WP bulit in function updates the option of current language which does not work for our plugin in this case - $wpdb->update( $wpdb->options, array( 'option_value' => maybe_serialize( $options ) ), array( 'option_name' => 'wpm_languages' ) ); - - die(); - } - - /** - * Remove installed language files and option - */ - public static function delete_localization() { - - check_ajax_referer( 'delete-localization', 'security' ); - - $locale = wpm_get_post_data_by_key( 'locale' ); - $options = wpm_get_lang_option(); - - if ( ! $locale ) { - wp_send_json_error( __( 'No locale sending', 'wp-multilang' ) ); - } - - foreach ( $options as $language ) { - if ( $language['translation'] == $locale ) { - wp_send_json_error( __( 'Localization using', 'wp-multilang' ) ); - } - } - - $files_delete = array(); - $installed_plugin_translations = wp_get_installed_translations( 'plugins' ); - - foreach ( $installed_plugin_translations as $plugin => $translation ) { - if ( isset( $translation[ $locale ] ) ) { - $files_delete[] = WP_LANG_DIR . '/plugins/' . $plugin . '-' . $locale . '.mo'; - $files_delete[] = WP_LANG_DIR . '/plugins/' . $plugin . '-' . $locale . '.po'; - } - } - - $installed_themes_translations = wp_get_installed_translations( 'themes' ); - - foreach ( $installed_themes_translations as $theme => $translation ) { - if ( isset( $translation[ $locale ] ) ) { - $files_delete[] = WP_LANG_DIR . '/themes/' . $theme . '-' . $locale . '.mo'; - $files_delete[] = WP_LANG_DIR . '/themes/' . $theme . '-' . $locale . '.po'; - } - } - - $installed_core_translations = wp_get_installed_translations( 'core' ); - - foreach ( $installed_core_translations as $wp_file => $translation ) { - if ( isset( $translation[ $locale ] ) ) { - $files_delete[] = WP_LANG_DIR . '/' . $wp_file . '-' . $locale . '.mo'; - $files_delete[] = WP_LANG_DIR . '/' . $wp_file . '-' . $locale . '.po'; - } - } - - $files_delete[] = WP_LANG_DIR . '/' . $locale . '.po'; - $files_delete[] = WP_LANG_DIR . '/' . $locale . '.mo'; - - foreach ( $files_delete as $file ) { - wp_delete_file( $file ); - } - - wp_send_json_success( esc_html__( 'Localization deleted', 'wp-multilang' ) ); - } - - /** - * Import translations for terms from qTranslate - * - * @author Soft79 - */ - public static function qtx_import() { - - check_ajax_referer( 'qtx-import', 'security' ); - - $term_count = 0; - - if ( $qtranslate_terms = get_option( 'qtranslate_term_name', array() ) ) { - - $taxonomies = get_taxonomies(); - $terms = get_terms( array('taxonomy' => $taxonomies, 'hide_empty' => false ) ); - - foreach ( $terms as $term ) { - $original = $term->name; - - //Translation available? - if ( ! isset( $qtranslate_terms[ $original ] ) ) { - continue; - } - - //Translate the name - $strings = wpm_value_to_ml_array( $original ); - foreach ( $qtranslate_terms[ $original ] as $code => $translation ) { - $strings = wpm_set_language_value( $strings, $translation, array(), $code ); - } - - //Update the name - $term->name = wpm_ml_value_to_string( $strings ); - if ( $term->name !== $original ) { - $result = wp_update_term( $term->term_id, $term->taxonomy, array( 'name' => $term->name ) ); - if ( ! is_wp_error( $result ) ) { - $term_count++; - } - } - } - - delete_option( 'qtranslate_term_name' ); - } - - /* translators: %d: This will get the number of term counts. */ - wp_send_json( sprintf( __( '%d terms were imported successfully.', 'wp-multilang' ), $term_count ) ); - } - - /** - * Triggered when clicking the rating footer. - */ - public static function rated() { - if ( ! current_user_can( 'manage_translations' ) ) { - wp_die( -1 ); - } - update_option( 'wpm_admin_footer_text_rated', 1 ); - wp_die(); - } - - - /** - * Triggered when any newsletter subscribe button is clicked - * @since 2.4.7 - * */ - public static function subscribe_to_news_letter(){ - - if(!current_user_can('manage_options')){ - wp_die( -1 ); - } - - if ( ! isset( $_POST['wpm_security_nonce'] ) ){ - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( !wp_verify_nonce( $_POST['wpm_security_nonce'], 'wpm_security_nonce' ) ){ - wp_die( -1 ); - } - - $name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : ''; - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $email = isset( $_POST['email'] ) ? sanitize_email( $_POST['email'] ) : ''; - $website = isset( $_POST['website'] ) ? sanitize_text_field( wp_unslash( $_POST['website'] ) ) : ''; - - if($email){ - - $api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe'; - - $api_params = array( - 'name' => $name, - 'email' => $email, - 'website' => $website, - 'type' => 'wpmultilang', - ); - - wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); - - }else{ - echo esc_html__('Email id required', 'wp-multilang'); - } - - wp_die(); - } - - /** - * Triggered when clicked on close button of newsletter form present in settings - * @since 2.4.7 - * */ - public static function newsletter_hide_form(){ - if(!current_user_can('manage_options')){ - wp_die( -1 ); - } - - if ( ! isset( $_POST['wpm_admin_settings_nonce'] ) ){ - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( ! wp_verify_nonce( $_POST['wpm_admin_settings_nonce'], 'wpm_admin_settings_nonce' ) ) { - wp_die( -1 ); - } - - update_option( 'wpm_hide_newsletter', 'yes' , false); - - echo wp_json_encode(array('status'=>200, 'message'=>esc_html__('Submitted ','wp-multilang'))); - - wp_die(); - } - - /** - * Triggered when clicked on subscribe button of newsletter form present in settings - * @since 2.4.7 - * */ - public static function settings_newsletter_submit(){ - if(!current_user_can('manage_options')){ - wp_die( -1 ); - } - - if ( ! isset( $_POST['wpm_admin_settings_nonce'] ) ){ - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( !wp_verify_nonce( $_POST['wpm_admin_settings_nonce'], 'wpm_admin_settings_nonce' ) ){ - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( isset ( $_POST['email'] ) && ! empty( $_POST['email'] ) ){ - global $current_user; - $api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe'; - $api_params = array( - 'name' => sanitize_text_field($current_user->display_name), - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - 'email'=> sanitize_email( $_POST['email'] ), - 'website'=> sanitize_url( get_site_url() ), - 'type'=> 'wpmultilang' - ); - - $response = wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); - if ( !is_wp_error( $response ) ) { - $response = wp_remote_retrieve_body( $response ); - echo wp_json_encode(array('status'=>200, 'message'=>esc_html__('Submitted ','wp-multilang'), 'response'=> $response)); - }else{ - echo wp_json_encode(array('status'=>500, 'message'=>esc_html__('No response from API','wp-multilang'))); - } - wp_die(); - } - } - - /** - * Prepare url to change the href of block language switcher - * @since 2.4.9 - * */ - public static function block_lang_switcher(){ - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( ! isset( $_POST['security'] ) ){ - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( !wp_verify_nonce( $_POST['security'], 'wpm_ajax_security_nonce' ) ) { - wp_die( -1 ); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if( empty( $_POST['current_url'] ) ) { - wp_die( -1 ); - } - - $all_languages = wpm_get_languages(); - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $current_url = sanitize_url($_POST['current_url']); - - $translated_urls = array(); - if(!empty($all_languages) && is_array($all_languages)){ - foreach ($all_languages as $al_key => $al_value) { - $translated_urls[$al_key] = wpm_translate_url( $current_url, $al_key ); - } - } - - echo wp_json_encode($translated_urls); - wp_die(); - } - - /** - * Reset plugin settings to default - * @since 2.4.15 - * */ - public static function reset_settings() { - - check_ajax_referer( 'wpm-reset-settings', 'security' ); - - if ( ! current_user_can( 'manage_options' ) ) { - wp_die( -1 ); - } - - $reset_obj = new WPM_Reset_Settings(); - $reset_obj->reset_settings(); - - wp_die(); - - } -} +hide_errors(); + } + } + + /** + * Send headers for WPM Ajax Requests + */ + private static function wpm_ajax_headers() { + send_origin_headers(); + @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); + @header( 'X-Robots-Tag: noindex' ); + send_nosniff_header(); + nocache_headers(); + status_header( 200 ); + } + + /** + * Check for WPM Ajax request and fire action. + */ + public static function do_wpm_ajax() { + global $wp_query; + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( ! empty( $_GET['wpm-ajax'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- this is a dependent function and its all security measurament is done wherever it has been used. + $wp_query->set( 'wpm-ajax', sanitize_text_field( $_GET['wpm-ajax'] ) ); + } + + if ( $action = $wp_query->get( 'wpm-ajax' ) ) { + self::wpm_ajax_headers(); + do_action( 'wpm_ajax_' . sanitize_text_field( $action ) ); + die(); + } + } + + /** + * Hook in methods - uses WordPress ajax handlers (admin-ajax). + */ + public static function add_ajax_events() { + $ajax_events = array( + 'delete_lang' => false, + 'delete_localization' => false, + 'qtx_import' => false, + 'rated' => false, + 'send_query_message' => false, + 'deactivate_plugin' => false, + 'subscribe_to_news_letter' => false, + 'newsletter_hide_form' => false, + 'settings_newsletter_submit' => false, + 'block_lang_switcher' => true, + 'reset_settings' => true, + 'validate_secret_key' => false, + 'save_openai_settings' => false, + 'do_auto_translate' => false, + 'singlular_auto_translate' => false, + 'singlular_auto_translate_term' => false, + 'get_translation_node_count' => false, + 'process_batch_translation' => false, + 'check_ai_platform_quota' => false, + ); + + foreach ( $ajax_events as $ajax_event => $nopriv ) { + add_action( 'wp_ajax_wpm_' . $ajax_event, array( __CLASS__, $ajax_event ) ); + + if ( $nopriv ) { + add_action( 'wp_ajax_nopriv_wpm_' . $ajax_event, array( __CLASS__, $ajax_event ) ); + + // GP AJAX can be used for frontend ajax requests + add_action( 'wpm_ajax_' . $ajax_event, array( __CLASS__, $ajax_event ) ); + } + } + + // Add direct AJAX action for wpmpro_search_items + add_action( 'wp_ajax_wpmpro_search_items', array( __CLASS__, 'wpmpro_search_items' ) ); + + // Add direct AJAX action for bulk auto translate + add_action( 'wp_ajax_wpm_do_auto_translate', array( __CLASS__, 'do_auto_translate' ) ); + } + + /** + * Remove installed language files and option + */ + public static function delete_lang() { + + check_ajax_referer( 'delete-lang', 'security' ); + + $language = wpm_get_post_data_by_key( 'language' ); + $options = wpm_get_lang_option(); + + if ( ! $language || ! isset( $options[ $language ] ) || ( wpm_get_user_language() === $language ) || ( wpm_get_default_language() === $language ) ) { + return; + } + + unset( $options[ $language ] ); + + global $wpdb; + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: using WP bulit in function updates the option of current language which does not work for our plugin in this case + $wpdb->update( $wpdb->options, array( 'option_value' => maybe_serialize( $options ) ), array( 'option_name' => 'wpm_languages' ) ); + + die(); + } + + /** + * Remove installed language files and option + */ + public static function delete_localization() { + + check_ajax_referer( 'delete-localization', 'security' ); + + $locale = wpm_get_post_data_by_key( 'locale' ); + $options = wpm_get_lang_option(); + + if ( ! $locale ) { + wp_send_json_error( __( 'No locale sending', 'wp-multilang' ) ); + } + + foreach ( $options as $language ) { + if ( $language['translation'] == $locale ) { + wp_send_json_error( __( 'Localization using', 'wp-multilang' ) ); + } + } + + $files_delete = array(); + $installed_plugin_translations = wp_get_installed_translations( 'plugins' ); + + foreach ( $installed_plugin_translations as $plugin => $translation ) { + if ( isset( $translation[ $locale ] ) ) { + $files_delete[] = WP_LANG_DIR . '/plugins/' . $plugin . '-' . $locale . '.mo'; + $files_delete[] = WP_LANG_DIR . '/plugins/' . $plugin . '-' . $locale . '.po'; + } + } + + $installed_themes_translations = wp_get_installed_translations( 'themes' ); + + foreach ( $installed_themes_translations as $theme => $translation ) { + if ( isset( $translation[ $locale ] ) ) { + $files_delete[] = WP_LANG_DIR . '/themes/' . $theme . '-' . $locale . '.mo'; + $files_delete[] = WP_LANG_DIR . '/themes/' . $theme . '-' . $locale . '.po'; + } + } + + $installed_core_translations = wp_get_installed_translations( 'core' ); + + foreach ( $installed_core_translations as $wp_file => $translation ) { + if ( isset( $translation[ $locale ] ) ) { + $files_delete[] = WP_LANG_DIR . '/' . $wp_file . '-' . $locale . '.mo'; + $files_delete[] = WP_LANG_DIR . '/' . $wp_file . '-' . $locale . '.po'; + } + } + + $files_delete[] = WP_LANG_DIR . '/' . $locale . '.po'; + $files_delete[] = WP_LANG_DIR . '/' . $locale . '.mo'; + + foreach ( $files_delete as $file ) { + wp_delete_file( $file ); + } + + wp_send_json_success( esc_html__( 'Localization deleted', 'wp-multilang' ) ); + } + + /** + * Import translations for terms from qTranslate + * + * @author Soft79 + */ + public static function qtx_import() { + + check_ajax_referer( 'qtx-import', 'security' ); + + $term_count = 0; + + if ( $qtranslate_terms = get_option( 'qtranslate_term_name', array() ) ) { + + $taxonomies = get_taxonomies(); + $terms = get_terms( array('taxonomy' => $taxonomies, 'hide_empty' => false ) ); + + foreach ( $terms as $term ) { + $original = $term->name; + + //Translation available? + if ( ! isset( $qtranslate_terms[ $original ] ) ) { + continue; + } + + //Translate the name + $strings = wpm_value_to_ml_array( $original ); + foreach ( $qtranslate_terms[ $original ] as $code => $translation ) { + $strings = wpm_set_language_value( $strings, $translation, array(), $code ); + } + + //Update the name + $term->name = wpm_ml_value_to_string( $strings ); + if ( $term->name !== $original ) { + $result = wp_update_term( $term->term_id, $term->taxonomy, array( 'name' => $term->name ) ); + if ( ! is_wp_error( $result ) ) { + $term_count++; + } + } + } + + delete_option( 'qtranslate_term_name' ); + } + + /* translators: %d: This will get the number of term counts. */ + wp_send_json( sprintf( __( '%d terms were imported successfully.', 'wp-multilang' ), $term_count ) ); + } + + /** + * Triggered when clicking the rating footer. + */ + public static function rated() { + if ( ! current_user_can( 'manage_translations' ) ) { + wp_die( -1 ); + } + update_option( 'wpm_admin_footer_text_rated', 1 ); + wp_die(); + } + + /** + * Triggered when any support query is sent from Help & Support tab + * @since 2.4.2 + * */ + public static function send_query_message() + { + check_ajax_referer( 'support-localization', 'security' ); + + if ( ! current_user_can( 'manage_translations' ) ) { + wp_die( -1 ); + } + + if ( isset( $_POST['message'] ) && isset( $_POST['email'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $message = sanitize_textarea_field( $_POST['message'] ); + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $email = sanitize_email( $_POST['email'] ); + + if(function_exists('wp_get_current_user')){ + + $user = wp_get_current_user(); + + $message = '

    '.esc_html($message).'



    '.'Query from WP Multilang plugin support tab'; + + $user_data = $user->data; + $user_email = $user_data->user_email; + + if($email){ + $user_email = $email; + } + //php mailer variables + $sendto = 'team@magazine3.in'; + $subject = "WP Multilang Query"; + + $headers[] = 'Content-Type: text/html; charset=UTF-8'; + $headers[] = 'From: '. esc_attr($user_email); + $headers[] = 'Reply-To: ' . esc_attr($user_email); + // Load WP components, no themes. + + $sent = wp_mail($sendto, $subject, $message, $headers); + + if($sent){ + + echo wp_json_encode(array('status'=>'t')); + + }else{ + + echo wp_json_encode(array('status'=>'f')); + + } + + } + } + + wp_die(); + } + + /** + * Trigger when delete translation check box checked from popup modal when deactivating the plugin + * @since 2.4.17 + * */ + public static function deactivate_plugin() + { + // if ( ! current_user_can( 'manage_translations' ) ) { + // wp_die( -1 ); + // } + + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Security measurament is done below in this function with nonce key wpm_feedback_nonce. + if( isset( $_POST['data'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: Sanitization is handled below in this function + parse_str( $_POST['data'], $data ); + } + + if ( ! isset( $data['wpm_deactivate_plugin_nonce'] ) ) { + wp_die( -1 ); + } + + if ( ! wp_verify_nonce( $data['wpm_deactivate_plugin_nonce'], 'wpm_deactivate_plugin_nonce' ) ) { + wp_die( -1 ); + } + + // Reset translation data + if ( ! empty( $data['wpm_uninstall_translations'] ) ) { + + if ( class_exists('WPM\Includes\Admin\WPM_Reset_Settings') ) { + + \WPM\Includes\Admin\WPM_Reset_Settings::wpm_uninstall_translations_data(); + } + + } + + wp_die(); + } + + /** + * Triggered when any newsletter subscribe button is clicked + * @since 2.4.7 + * */ + public static function subscribe_to_news_letter(){ + + if(!current_user_can('manage_options')){ + wp_die( -1 ); + } + + if ( ! isset( $_POST['wpm_security_nonce'] ) ){ + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( !wp_verify_nonce( $_POST['wpm_security_nonce'], 'wpm_security_nonce' ) ){ + wp_die( -1 ); + } + + $name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : ''; + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash + $email = isset( $_POST['email'] ) ? sanitize_email( $_POST['email'] ) : ''; + $website = isset( $_POST['website'] ) ? sanitize_text_field( wp_unslash( $_POST['website'] ) ) : ''; + + if($email){ + + $api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe'; + + $api_params = array( + 'name' => $name, + 'email' => $email, + 'website' => $website, + 'type' => 'wpmultilang', + ); + + wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); + + }else{ + echo esc_html__('Email id required', 'wp-multilang'); + } + + wp_die(); + } + + /** + * Triggered when clicked on close button of newsletter form present in settings + * @since 2.4.7 + * */ + public static function newsletter_hide_form(){ + if(!current_user_can('manage_options')){ + wp_die( -1 ); + } + + if ( ! isset( $_POST['wpm_admin_settings_nonce'] ) ){ + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( ! wp_verify_nonce( $_POST['wpm_admin_settings_nonce'], 'wpm_admin_settings_nonce' ) ) { + wp_die( -1 ); + } + + update_option( 'wpm_hide_newsletter', 'yes' , false); + + echo wp_json_encode(array('status'=>200, 'message'=>esc_html__('Submitted ','wp-multilang'))); + + wp_die(); + } + + /** + * Triggered when clicked on subscribe button of newsletter form present in settings + * @since 2.4.7 + * */ + public static function settings_newsletter_submit(){ + if(!current_user_can('manage_options')){ + wp_die( -1 ); + } + + if ( ! isset( $_POST['wpm_admin_settings_nonce'] ) ){ + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( !wp_verify_nonce( $_POST['wpm_admin_settings_nonce'], 'wpm_admin_settings_nonce' ) ){ + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( isset ( $_POST['email'] ) && ! empty( $_POST['email'] ) ){ + global $current_user; + $api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe'; + $api_params = array( + 'name' => sanitize_text_field($current_user->display_name), + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + 'email'=> sanitize_email( $_POST['email'] ), + 'website'=> sanitize_url( get_site_url() ), + 'type'=> 'wpmultilang' + ); + + $response = wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); + if ( !is_wp_error( $response ) ) { + $response = wp_remote_retrieve_body( $response ); + echo wp_json_encode(array('status'=>200, 'message'=>esc_html__('Submitted ','wp-multilang'), 'response'=> $response)); + }else{ + echo wp_json_encode(array('status'=>500, 'message'=>esc_html__('No response from API','wp-multilang'))); + } + wp_die(); + } + } + + /** + * Prepare url to change the href of block language switcher + * @since 2.4.9 + * */ + public static function block_lang_switcher(){ + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( ! isset( $_POST['security'] ) ){ + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( !wp_verify_nonce( $_POST['security'], 'wpm_ajax_security_nonce' ) ) { + wp_die( -1 ); + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if( empty( $_POST['current_url'] ) ) { + wp_die( -1 ); + } + + $all_languages = wpm_get_languages(); + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $current_url = sanitize_url($_POST['current_url']); + + $translated_urls = array(); + if(!empty($all_languages) && is_array($all_languages)){ + foreach ($all_languages as $al_key => $al_value) { + $translated_urls[$al_key] = wpm_translate_url( $current_url, $al_key ); + } + } + + echo wp_json_encode($translated_urls); + wp_die(); + } + + /** + * Reset plugin settings to default + * @since 2.4.15 + * */ + public static function reset_settings() { + + check_ajax_referer( 'wpm-reset-settings', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + $reset_obj = new WPM_Reset_Settings(); + $reset_obj->reset_settings(); + + wp_die(); + + } + + /** + * Validate API secret key + * @since 2.4.23 + * */ + public static function validate_secret_key() { + + check_ajax_referer( 'wpmpro-openai-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + try { + $result = WPM_OpenAI::validate_secret_key(); + if ( ! empty( $result['models'] ) ) { + $models = $result['models']; + $provider = $result['provider']; + + $api_settings = WPM_Settings_AI_Integration::get_openai_settings(); + $api_settings['api_keys'][$provider] = $result['api_key']; + $api_settings['api_provider'] = $provider; + $api_settings['api_available_models'][$provider] = $models; + + update_option( 'wpm_openai_settings', $api_settings ); + + wp_send_json_success( $result ); + } + + } catch (\Exception $e) { + wp_send_json_error(['message' => 'API Validation failed: ' . $e->getMessage()]); + } + + } + + /** + * Save openai settings + * @since 2.4.23 + * */ + public static function save_openai_settings() { + + check_ajax_referer( 'wpmpro-openai-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + WPM_Settings_AI_Integration::save_settings(); + } + + + /** + * Process batch translation + * @since 1.10 + * */ + public static function process_batch_translation(){ + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + if ( ! isset( $_POST['wpmpro_autotranslate_singular_nonce'] ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'security nonce not found', 'wp-multilang' ) ) ); + } + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_singular_nonce'], 'wpmpro-autotranslate-singular-nonce' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'security nonce not verify', 'wp-multilang' ) ) ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'not authorized', 'wp-multilang' ) ) ); + } + + if ( ! empty( $_POST['post_id'] ) && ! empty( $_POST['source'] ) && ! empty( $_POST['target'] ) && isset( $_POST['batch_start'] ) && isset( $_POST['batch_size'] ) ) { + + $post_id = intval( $_POST['post_id'] ); + $batch_start = intval( $_POST['batch_start'] ); + $batch_size = intval( $_POST['batch_size'] ); + + if ( $post_id <= 0 ) { + wp_send_json_error( array( 'message' => esc_html__( 'Not a valid post', 'wp-multilang' ) ) ); + } + + $source = sanitize_text_field( wp_unslash( $_POST['source'] ) ); + $target = sanitize_text_field( wp_unslash( $_POST['target'] ) ); + $post = get_post( $post_id ); + + if ( ! $post ) { + wp_send_json_error( array( 'message' => esc_html__( 'Post not found', 'wp-multilang' ) ) ); + } + + $response = WPM_Settings_Auto_Translate_Pro::auto_translate_batch( $post, $source, $target, $batch_start, $batch_size ); + + wp_send_json( $response ); + } else { + wp_send_json_error( array( 'message' => esc_html__( 'Missing required parameters', 'wp-multilang' ) ) ); + } + } + + /** + * Auto translate single post, product, page custom post types + * @since 1.10 + * */ + public static function singlular_auto_translate(){ + + // Set longer execution time and prevent timeouts + set_time_limit(1200); // Increased to 20 minutes + ini_set('max_input_time', 1200); + ini_set('default_socket_timeout', 120); + + // Send headers to prevent browser timeout + header('Content-Type: application/json'); + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + + + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_singular_nonce'], 'wpmpro-autotranslate-singular-nonce' ) ) { + echo esc_html__( 'security nonce not verify', 'wp-multilang' ); + wp_die(); + } + + if ( ! current_user_can( 'manage_options' ) ) { + echo esc_html__( 'not authorized', 'wp-multilang' ); + wp_die(); + } + + if ( ! empty( $_POST['post_id'] ) && ! empty( $_POST['source'] ) && ! empty( $_POST['target'] ) ) { + + $post_id = intval( $_POST['post_id'] ); + if ( $post_id <= 0 ) { + echo esc_html__( 'Not a valid post', 'wp-multilang' ); + wp_die(); + } + + $source = sanitize_text_field( wp_unslash( $_POST['source'] ) ); + $target = sanitize_text_field( wp_unslash( $_POST['target'] ) ); + $post = get_post( $post_id ); + $post_type = get_post_type( $post_id ); + $response = array(); + + // DEBUG: Start comprehensive debugging + $debug_log = array(); + $debug_log['timestamp'] = current_time('mysql'); + $debug_log['post_id'] = $post_id; + $debug_log['post_type'] = $post_type; + $debug_log['source_lang'] = $source; + $debug_log['target_lang'] = $target; + $debug_log['post_title'] = $post->post_title; + $debug_log['post_content_length'] = strlen($post->post_content); + + // DEBUG: Check Elementor data + $elementor_data = get_post_meta($post_id, '_elementor_data', true); + $debug_log['has_elementor_data'] = !empty($elementor_data); + $debug_log['elementor_data_length'] = $elementor_data ? strlen($elementor_data) : 0; + + // DEBUG: Check Elementor translate meta + $elementor_translate = get_post_meta($post_id, '_elementor_data_translate', true); + $debug_log['has_elementor_translate'] = !empty($elementor_translate); + $debug_log['elementor_translate_length'] = $elementor_translate ? strlen($elementor_translate) : 0; + + // DEBUG: Check for Rank Math meta fields + $rank_math_metas = array(); + $all_metas = get_post_meta($post_id); + foreach ($all_metas as $meta_key => $meta_value) { + if (strpos($meta_key, 'rank_math') === 0) { + $rank_math_metas[$meta_key] = is_array($meta_value) ? $meta_value[0] : $meta_value; + } + } + $debug_log['rank_math_metas'] = $rank_math_metas; + $debug_log['rank_math_meta_count'] = count($rank_math_metas); + + // DEBUG: Check for other SEO meta fields + $seo_metas = array(); + foreach ($all_metas as $meta_key => $meta_value) { + if (strpos($meta_key, '_yoast') === 0 || strpos($meta_key, 'rank_math') === 0 || strpos($meta_key, 'seopress') === 0) { + $seo_metas[$meta_key] = is_array($meta_value) ? $meta_value[0] : $meta_value; + } + } + $debug_log['seo_metas'] = $seo_metas; + $debug_log['seo_meta_count'] = count($seo_metas); + + // DEBUG: Check if Elementor is active + $debug_log['elementor_active'] = class_exists('\Elementor\Plugin'); + $debug_log['elementor_version'] = defined('ELEMENTOR_VERSION') ? ELEMENTOR_VERSION : 'Not defined'; + + // DEBUG: Check if Rank Math is active + $debug_log['rank_math_active'] = defined('RANK_MATH_VERSION'); + $debug_log['rank_math_version'] = defined('RANK_MATH_VERSION') ? RANK_MATH_VERSION : 'Not defined'; + + // DEBUG: Log current post meta structure + $debug_log['all_meta_keys'] = array_keys($all_metas); + $debug_log['meta_keys_count'] = count($all_metas); + + try { + switch( $post_type ) { + + case 'saswp_reviews': + $response = \WPM\Includes\Integrations\WPM_Schema_Saswp::auto_translate( $post, $source, $target ); + break; + + default: + $response = WPM_Settings_Auto_Translate_Pro::auto_translate( $post, $source, $target , true); + break; + + } + } catch (Exception $e) { + $response = array('status' => false, 'message' => 'Translation failed: ' . $e->getMessage()); + $debug_log['exception'] = $e->getMessage(); + } + + // DEBUG: Log response details + $debug_log['response'] = $response; + + // DEBUG: Check post meta after translation + $post_meta_after = get_post_meta($post_id); + $elementor_data_after = get_post_meta($post_id, '_elementor_data', true); + $elementor_translate_after = get_post_meta($post_id, '_elementor_data_translate', true); + + $debug_log['elementor_data_after_length'] = $elementor_data_after ? strlen($elementor_data_after) : 0; + $debug_log['elementor_translate_after_length'] = $elementor_translate_after ? strlen($elementor_translate_after) : 0; + $debug_log['elementor_data_changed'] = ($elementor_data !== $elementor_data_after); + $debug_log['elementor_translate_changed'] = ($elementor_translate !== $elementor_translate_after); + + // DEBUG: Check rank math metas after translation + $rank_math_metas_after = array(); + foreach ($post_meta_after as $meta_key => $meta_value) { + if (strpos($meta_key, 'rank_math') === 0) { + $rank_math_metas_after[$meta_key] = is_array($meta_value) ? $meta_value[0] : $meta_value; + } + } + $debug_log['rank_math_metas_after'] = $rank_math_metas_after; + $debug_log['rank_math_metas_changed'] = ($rank_math_metas !== $rank_math_metas_after); + + // DEBUG: Write debug log to file + $debug_file = WP_CONTENT_DIR . '/wpm_debug_translation.log'; + $debug_entry = "=== TRANSLATION DEBUG - " . current_time('Y-m-d H:i:s') . " ===\n"; + $debug_entry .= "Post ID: {$post_id} | Type: {$post_type} | Source: {$source} | Target: {$target}\n"; + $debug_entry .= "Elementor Active: " . ($debug_log['elementor_active'] ? 'Yes' : 'No') . " | Version: " . $debug_log['elementor_version'] . "\n"; + $debug_entry .= "Rank Math Active: " . ($debug_log['rank_math_active'] ? 'Yes' : 'No') . " | Version: " . $debug_log['rank_math_version'] . "\n"; + $debug_entry .= "Has Elementor Data: " . ($debug_log['has_elementor_data'] ? 'Yes' : 'No') . " | Length: " . $debug_log['elementor_data_length'] . "\n"; + $debug_entry .= "Has Elementor Translate: " . ($debug_log['has_elementor_translate'] ? 'Yes' : 'No') . " | Length: " . $debug_log['elementor_translate_length'] . "\n"; + $debug_entry .= "Rank Math Meta Count: " . $debug_log['rank_math_meta_count'] . "\n"; + $debug_entry .= "SEO Meta Count: " . $debug_log['seo_meta_count'] . "\n"; + $debug_entry .= "Elementor Data Changed: " . ($debug_log['elementor_data_changed'] ? 'Yes' : 'No') . "\n"; + $debug_entry .= "Elementor Translate Changed: " . ($debug_log['elementor_translate_changed'] ? 'Yes' : 'No') . "\n"; + $debug_entry .= "Rank Math Metas Changed: " . ($debug_log['rank_math_metas_changed'] ? 'Yes' : 'No') . "\n"; + $debug_entry .= "Note: rank_math_schema_Service is excluded from translation to prevent serialization errors\n"; + $debug_entry .= "Note: rank_math_title and rank_math_description are translated directly in original meta fields\n"; + $debug_entry .= "Response: " . json_encode($response) . "\n"; + $debug_entry .= "All Meta Keys: " . implode(', ', $debug_log['all_meta_keys']) . "\n"; + $debug_entry .= "Rank Math Metas: " . json_encode($rank_math_metas) . "\n"; + $debug_entry .= "Rank Math Metas After: " . json_encode($rank_math_metas_after) . "\n"; + $debug_entry .= "=== END DEBUG ===\n\n"; + + file_put_contents($debug_file, $debug_entry, FILE_APPEND | LOCK_EX); + + // Ensure we have a valid response + if (empty($response) || !is_array($response)) { + $response = array('status' => false, 'message' => 'Translation completed but no response generated'); + } + + // Ensure we're sending proper JSON + header('Content-Type: application/json'); + wp_send_json($response); + wp_die(); + } + + } + + public static function singlular_auto_translate_term(){ + + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_singular_nonce'], 'wpmpro-autotranslate-singular-nonce' ) ) { + echo esc_html__( 'security nonce not verify', 'wp-multilang' ); + wp_die(); + } + + if ( ! current_user_can( 'manage_options' ) ) { + echo esc_html__( 'not authorized', 'wp-multilang' ); + wp_die(); + } + + if ( ! empty( $_POST['tag_id'] ) && ! empty( $_POST['source'] ) && ! empty( $_POST['target'] ) ) { + + global $wpdb; + + $tag_id = intval( $_POST['tag_id'] ); + if ( $tag_id <= 0 ) { + echo esc_html__( 'Not a vlid post', 'wp-multilang' ); + wp_die(); + } + + $source = sanitize_text_field( wp_unslash( $_POST['source'] ) ); + $target = sanitize_text_field( wp_unslash( $_POST['target'] ) ); + + $query = $wpdb->prepare(" + SELECT tt.*, t.* + FROM {$wpdb->term_taxonomy} AS tt + INNER JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id + WHERE tt.term_id = %d + ", $tag_id + ); + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Prepare already applied above + $term = $wpdb->get_row( $query ); + if ( is_object( $term ) && ! empty( $term ) ) { + $response = WPM_Settings_Auto_Translate_Pro::auto_translate_term( $term, $source, $target, true ); + } + + wp_send_json($response); + wp_die(); + } + } + + /** + * Auto translate single post, product, page custom post types + * @since 1.10 + * */ + /** + * Search items for exclusion list + */ + public static function wpmpro_search_items() { + // Check nonce - handle both _wpnonce and nonce parameters + $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : (isset($_REQUEST['nonce']) ? $_REQUEST['nonce'] : ''); + if (!wp_verify_nonce($nonce, 'wpmpro_search_items')) { + wp_send_json_error('Invalid nonce'); + } + + if (!current_user_can('manage_options')) { + wp_send_json_error('Unauthorized'); + } + + $search = isset($_GET['search']) ? sanitize_text_field($_GET['search']) : ''; + $type = isset($_GET['type']) ? sanitize_text_field($_GET['type']) : ''; + $results = array(); + + switch ($type) { + case 'post': + case 'page': + case 'product': + $args = array( + 'post_type' => $type, + 'post_status' => 'publish', + 's' => $search, + 'posts_per_page' => 10 + ); + $query = new \WP_Query($args); + foreach ($query->posts as $post) { + $results[] = array( + 'id' => $post->ID, + 'text' => $post->post_title + ); + } + break; + + case 'category': + case 'post_tag': + case 'product_cat': + $args = array( + 'taxonomy' => $type, + 'hide_empty' => false, + 'search' => $search, + 'number' => 10 + ); + $terms = get_terms($args); + if (!is_wp_error($terms)) { + foreach ($terms as $term) { + $results[] = array( + 'id' => $term->term_id, + 'text' => $term->name + ); + } + } + break; + } + + wp_send_json($results); + } + + /** + * Get total node count for batch translation + * @since 1.10 + * */ + public static function get_translation_node_count(){ + + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_singular_nonce'], 'wpmpro-autotranslate-singular-nonce' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'security nonce not verify', 'wp-multilang' ) ) ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'not authorized', 'wp-multilang' ) ) ); + } + + if ( ! empty( $_POST['post_id'] ) && ! empty( $_POST['source'] ) && ! empty( $_POST['target'] ) ) { + + $post_id = intval( $_POST['post_id'] ); + if ( $post_id <= 0 ) { + wp_send_json_error( array( 'message' => esc_html__( 'Not a valid post', 'wp-multilang' ) ) ); + } + + $source = sanitize_text_field( wp_unslash( $_POST['source'] ) ); + $target = sanitize_text_field( wp_unslash( $_POST['target'] ) ); + $post = get_post( $post_id ); + + if ( ! $post ) { + wp_send_json_error( array( 'message' => esc_html__( 'Post not found', 'wp-multilang' ) ) ); + } + + // Get source content + $post_title = $post->post_title; + $post_content = $post->post_content; + $post_excerpt = $post->post_excerpt; + + $is_title_exist = wpm_ml_check_language_string( $post_title, $target ); + $is_content_exist = wpm_ml_check_language_string( $post_content, $target ); + $is_excerpt_exist = wpm_ml_check_language_string( $post_excerpt, $target ); + + $total_nodes = 0; + + // Count nodes in title + if ( $is_title_exist === false ) { + $is_src_title_exist = wpm_ml_check_language_string( $post_title, $source ); + if( $is_src_title_exist === false ) { + $post_title = '[:'.$source.']'.$post_title.'[:]'; + } + $source_title = wpm_ml_get_language_string( $post_title, $source ); + $title_nodes = wpm_ml_auto_translate_content( $source_title, $source, $target, 0, 0 ); + if ( is_array( $title_nodes ) && isset( $title_nodes['total_nodes'] ) ) { + $total_nodes += $title_nodes['total_nodes']; + } + } + + // Count nodes in content + if ( $is_content_exist === false ) { + $is_src_content_exist = wpm_ml_check_language_string( $post_content, $source ); + if ( $is_src_content_exist === false ) { + $post_content = '[:'.$source.']'.$post_content.'[:]'; + } + $source_content = wpm_ml_get_language_string( $post_content, $source ); + $content_nodes = wpm_ml_auto_translate_content( $source_content, $source, $target, 0, 0 ); + if ( is_array( $content_nodes ) && isset( $content_nodes['total_nodes'] ) ) { + $total_nodes += $content_nodes['total_nodes']; + } + } + + // Count nodes in excerpt + if ( $is_excerpt_exist === false && $post_excerpt ) { + $is_src_excerpt_exist = wpm_ml_check_language_string( $post_excerpt, $source ); + if ( $is_src_excerpt_exist === false ) { + $post_excerpt = '[:'.$source.']'.$post_excerpt.'[:]'; + } + $source_excerpt = wpm_ml_get_language_string( $post_excerpt, $source ); + $excerpt_nodes = wpm_ml_auto_translate_content( $source_excerpt, $source, $target, 0, 0 ); + if ( is_array( $excerpt_nodes ) && isset( $excerpt_nodes['total_nodes'] ) ) { + $total_nodes += $excerpt_nodes['total_nodes']; + } + } + + /* translators: %d: User display name. */ + wp_send_json_success( array( + 'total_nodes' => $total_nodes, + 'message' => sprintf( esc_html__( 'Found %d text nodes to translate', 'wp-multilang' ), $total_nodes ) + ) ); + } else { + wp_send_json_error( array( 'message' => esc_html__( 'Missing required parameters', 'wp-multilang' ) ) ); + } + } + + /** + * Auto Translation + * @since 1.4 + * */ + public static function do_auto_translate() { + + // Set longer execution time and prevent timeouts + set_time_limit(120); // 2 minutes + ini_set('max_input_time', 120); + ini_set('default_socket_timeout', 120); + + // Send headers to prevent browser timeout + header('Content-Type: application/json'); + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_nonce'], 'wpmpro-autotranslate-nonce' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'security nonce not verify', 'wp-multilang' ) ) ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'not authorized', 'wp-multilang' ) ) ); + } + + if ( ! isset( $_POST['post_type'] ) || ! isset( $_POST['offset'] ) || ! isset( $_POST['source'] ) || ! isset( $_POST['target'] ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'Some parameters are missing', 'wp-multilang' ) ) ); + } + + $post_type = sanitize_text_field( $_POST['post_type'] ); + $offset = intval( $_POST['offset'] ) - 1; + $source = sanitize_text_field( $_POST['source'] ); + $target = sanitize_text_field( $_POST['target'] ); + $response = array('status'=>false, 'message'=>esc_html__('No content found to translate','wp-multilang')); + $category_array = array( 'category', 'post_tag', 'product_cat' ); // Supported categories + $override = false; + + if ( ! empty( $_POST['allow_auto_override'] ) ) { + $allow_auto_override = sanitize_text_field( wp_unslash( $_POST['allow_auto_override'] ) ); + if ( $allow_auto_override === 'yes' ) { + $override = true; + } + } + + try { + if ( ! in_array( $post_type, $category_array ) ) { + $posts = get_posts( array( + 'post_type' => $post_type, + 'post_status' => 'publish', + 'posts_per_page' => 1, + 'offset' => $offset, + 'orderby' => 'ID', + 'order' => 'ASC', + ) + ); + + if ( empty( $posts ) ) { + $response = array('status'=>true, 'message'=>esc_html__('No posts found at this offset - continuing to next','wp-multilang')); + } else { + foreach($posts as $post) { + if ( $post && isset($post->ID) ) { + // Bulk auto-translate should NOT override existing translations + $response = WPM_Settings_Auto_Translate_Pro::auto_translate( $post, $source, $target, $override ); + break; // Only process one post per request + } + } + + // Ensure we always have a response + if ( !isset($response) || empty($response) ) { + $response = array('status'=>true, 'message'=>esc_html__('Post processed but no translation needed','wp-multilang')); + } + } + } else if ( in_array( $post_type, $category_array ) ) { + + global $wpdb; + + $terms = get_terms( + array( + 'taxonomy' => $post_type, + 'hide_empty' => false, // Set to true if you only want tags that are assigned to posts / products + 'number' => 1, + 'offset' => $offset, + 'orderby' => 'term_id', + 'order' => 'ASC' + ) + ); + if ( ! empty( $terms ) && is_array( $terms ) ) { + foreach ( $terms as $term ) { + if ( is_object( $term ) && isset( $term->term_id ) ) { + + // Here we could have passed $term as a parameter but this has translated name, so auto_translate_term function needs raw name and description so writing manual query is necessary here + $query = $wpdb->prepare(" + SELECT tt.*, t.* + FROM {$wpdb->term_taxonomy} AS tt + INNER JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id + WHERE tt.term_id = %d + ", $term->term_id + ); + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Prepare already applied above + $raw_term = $wpdb->get_row( $query ); + + if ( is_object( $raw_term ) && isset( $raw_term->term_id ) ) { + // Bulk auto-translate should NOT override existing translations + $response = WPM_Settings_Auto_Translate_Pro::auto_translate_term( $raw_term, $source, $target, $override ); + break; // Only process one term per request + } + } + } + + // Ensure we always have a response + if ( !isset($response) || empty($response) ) { + $response = array('status'=>true, 'message'=>esc_html__('Term processed but no translation needed','wp-multilang')); + } + } else { + $response = array('status'=>true, 'message'=>esc_html__('No terms found at this offset - continuing to next','wp-multilang')); + } + + } + } catch ( Exception $e ) { + $response = array('status'=>false, 'message'=>esc_html__('Translation failed: ','wp-multilang') . $e->getMessage()); + } + + // Ensure response is always valid + if ( !isset($response) || !is_array($response) ) { + $response = array('status'=>true, 'message'=>esc_html__('Request processed successfully','wp-multilang')); + } + + // Add debugging information + $response['debug'] = array( + 'post_type' => $post_type, + 'offset' => $offset + 1, + 'source' => $source, + 'target' => $target, + 'override' => false, // Bulk auto-translate never overrides existing translations + 'timestamp' => current_time('mysql') + ); + + wp_send_json($response); + } + + /** + * Check ai platform api key quota + * @since 2.4.23 + * */ + public static function check_ai_platform_quota() { + + if ( ! wp_verify_nonce( $_POST['wpmpro_autotranslate_nonce'], 'wpmpro-autotranslate-nonce' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'security nonce not verify', 'wp-multilang' ) ) ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => esc_html__( 'not authorized', 'wp-multilang' ) ) ); + } + + $response['status'] = false; + $response['message'] = ''; + + $provider = isset( $_POST['provider'] ) ? sanitize_text_field( wp_unslash( $_POST['provider'] ) ) : ''; + if ( empty( $provider ) ) { + wp_send_json( $response ); + } + + if ( $provider === 'openai' ) { + $response = WPM_Settings_AI_Integration::check_ai_platform_quota(); + }else if( $provider === 'deepl' ) { + $response = WPM_Deepl::check_quota(); + } + + wp_send_json($response); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-background-updater.php b/plugins/wp-react-custom-multilang/includes/class-wpm-background-updater.php index e76936d84..29caea97a 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-background-updater.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-background-updater.php @@ -1,101 +1,101 @@ -is_process_running() ) { - // Background process already running. - return; - } - - if ( $this->is_queue_empty() ) { - // No data to process. - $this->clear_scheduled_event(); - return; - } - - $this->handle(); - } - - /** - * Schedule fallback event. - */ - protected function schedule_event() { - if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) { - wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier ); - } - } - - /** - * Is the updater running? - * @return boolean - */ - public function is_updating() { - return false === $this->is_queue_empty(); - } - - /** - * Task - * - * Override this method to perform any actions required on each - * queue item. Return the modified item for further processing - * in the next pass through. Or, return false to remove the - * item from the queue. - * - * @param string $callback Update callback function - * @return mixed - */ - protected function task( $callback ) { - wpm_maybe_define_constant( 'WPM_UPDATING', true ); - - include_once __DIR__ . '/wpm-update-functions.php'; - - if ( is_callable( $callback ) ) { - call_user_func( $callback ); - } - - return false; - } - - /** - * Complete - * - * Override if applicable, but ensure that the below actions are - * performed, or, call parent::complete(). - */ - protected function complete() { - WPM_Install::update_db_version(); - parent::complete(); - } -} +is_process_running() ) { + // Background process already running. + return; + } + + if ( $this->is_queue_empty() ) { + // No data to process. + $this->clear_scheduled_event(); + return; + } + + $this->handle(); + } + + /** + * Schedule fallback event. + */ + protected function schedule_event() { + if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) { + wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier ); + } + } + + /** + * Is the updater running? + * @return boolean + */ + public function is_updating() { + return false === $this->is_queue_empty(); + } + + /** + * Task + * + * Override this method to perform any actions required on each + * queue item. Return the modified item for further processing + * in the next pass through. Or, return false to remove the + * item from the queue. + * + * @param string $callback Update callback function + * @return mixed + */ + protected function task( $callback ) { + wpm_maybe_define_constant( 'WPM_UPDATING', true ); + + include_once __DIR__ . '/wpm-update-functions.php'; + + if ( is_callable( $callback ) ) { + call_user_func( $callback ); + } + + return false; + } + + /** + * Complete + * + * Override if applicable, but ensure that the below actions are + * performed, or, call parent::complete(). + */ + protected function complete() { + WPM_Install::update_db_version(); + parent::complete(); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-comments.php b/plugins/wp-react-custom-multilang/includes/class-wpm-comments.php index 0c7f05027..49396e2ab 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-comments.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-comments.php @@ -1,137 +1,205 @@ -object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); - add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); - add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); - add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); - } - - /** - * Separate comments py languages - * - * @param $query object WP_Comment_Query - * - * @return object WP_Comment_Query - */ - public function filter_comments_by_language( $query ) { - - if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { - return $query; - } - - $lang = get_query_var( 'lang' ); - - if ( ! $lang ) { - $lang = wpm_get_user_language(); - } - - if ( 'all' !== $lang ) { - $meta_query = array( - array( - 'relation' => 'OR', - array( - 'key' => '_languages', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_languages', - 'value' => serialize( $lang ), - 'compare' => 'LIKE', - ), - ), - ); - - if ( isset( $query->query_vars['meta_query'] ) ) { - $meta_query = wp_parse_args( $query->query_vars['meta_query'], $meta_query ); - } - - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query - $query->query_vars['meta_query'] = $meta_query; - } - - return $query; - } - - public function fix_comment_count( $count, $post_id ) { - - if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { - return $count; - } - - $lang = get_query_var( 'lang' ); - - if ( ! $lang ) { - $lang = wpm_get_user_language(); - } - - $count_array = wp_cache_get( $post_id, 'wpm_comment_count' ); - - if ( isset( $count_array[ $lang ] ) ) { - return $count_array[ $lang ]; - } else { - $count_array = array(); - } - - global $wpdb; - - $meta_query = array( - array( - 'relation' => 'OR', - array( - 'key' => '_languages', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_languages', - 'value' => serialize( $lang ), - 'compare' => 'LIKE', - ), - ), - ); - - $meta_sql = get_meta_sql( $meta_query, 'comment', $wpdb->comments, 'comment_ID' ); - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery - $count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} {$meta_sql['join']} WHERE comment_post_ID = %d AND comment_approved = '1' {$meta_sql['where']};", $post_id ) ); - - $count_array[ $lang ] = $count; - wp_cache_add( $post_id, $count_array, 'wpm_comment_count' ); - - return $count; - } -} +object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); + add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); + add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); + add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); + add_filter( "wp_update_{$this->object_type}_data", array( $this, 'save_translated_comment' ), 10, 3 ); + add_filter( "get_{$this->object_type}", array( $this, 'translate_comment' ) ); + } + + /** + * Separate comments py languages + * + * @param $query object WP_Comment_Query + * + * @return object WP_Comment_Query + */ + public function filter_comments_by_language( $query ) { + + if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { + return $query; + } + + $lang = get_query_var( 'lang' ); + + if ( ! $lang ) { + $lang = wpm_get_user_language(); + } + + if ( 'all' !== $lang ) { + $meta_query = array( + array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => serialize( $lang ), + 'compare' => 'LIKE', + ), + ), + ); + + if ( isset( $query->query_vars['meta_query'] ) ) { + $meta_query = wp_parse_args( $query->query_vars['meta_query'], $meta_query ); + } + + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query + $query->query_vars['meta_query'] = $meta_query; + } + + return $query; + } + + public function fix_comment_count( $count, $post_id ) { + + if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { + return $count; + } + + $lang = get_query_var( 'lang' ); + + if ( ! $lang ) { + $lang = wpm_get_user_language(); + } + + $count_array = wp_cache_get( $post_id, 'wpm_comment_count' ); + + if ( isset( $count_array[ $lang ] ) ) { + return $count_array[ $lang ]; + } else { + $count_array = array(); + } + + global $wpdb; + + $meta_query = array( + array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => serialize( $lang ), + 'compare' => 'LIKE', + ), + ), + ); + + $meta_sql = get_meta_sql( $meta_query, 'comment', $wpdb->comments, 'comment_ID' ); + + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery + $count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} {$meta_sql['join']} WHERE comment_post_ID = %d AND comment_approved = '1' {$meta_sql['where']};", $post_id ) ); + + $count_array[ $lang ] = $count; + wp_cache_add( $post_id, $count_array, 'wpm_comment_count' ); + + return $count; + } + + /** + * Translate Comment data and store it in a comment meta table + * @param $commentdata array + * @return $commentdata array + * @since 2.4.17 + * */ + public function save_translated_comment( $data, $old_data, $commentarr ){ + + if ( is_admin() ) { + + if ( is_array( $data ) && isset( $data['comment_content'] ) && is_array( $old_data ) && isset( $old_data['comment_content'] ) ) { + $current_language = wpm_get_language(); + $default_language = wpm_get_default_language(); + $languages = wpm_get_languages(); + + // Comment has not been edited in default language, then store old comment only + $updated_comment = $data['comment_content']; + if ( $current_language !== $default_language) { + $data['comment_content'] = $old_data['comment_content']; + } + + if ( ! empty( $languages ) && is_array( $languages ) && array_key_exists( $current_language, $languages ) ) { + + $comment_id = $data['comment_ID']; + $comment_meta = get_comment_meta( $comment_id, '_wpm_translated_comments', true ); + + if ( empty( $comment_meta ) ) { + $comment_meta = array(); + } + + if ( empty( $comment_meta ) && $current_language !== $default_language ) { + $comment_meta[$default_language] = $old_data['comment_content']; + } + + $comment_meta[$current_language] = $updated_comment; + update_comment_meta( $comment_id, '_wpm_translated_comments', $comment_meta ); + + } + } + + } + return $data; + } + + /** + * Translate comment content + * @param $_comment WP_Comment + * @return $_comment WP_Comment + * @since 2.4.17 + * */ + public function translate_comment( $_comment ) { + + if ( is_object( $_comment ) && isset( $_comment->comment_ID ) ) { + + $current_language = wpm_get_language(); + $comment_id = $_comment->comment_ID; + + $comment_meta = get_comment_meta( $comment_id, '_wpm_translated_comments', true ); + if ( is_array( $comment_meta ) && isset( $comment_meta[$current_language] ) ) { + $_comment->comment_content = $comment_meta[$current_language]; + } + } + + return $_comment; + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-config.php b/plugins/wp-react-custom-multilang/includes/class-wpm-config.php index f5008e54f..f67e62961 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-config.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-config.php @@ -1,128 +1,128 @@ - $pd ) { - if ( is_plugin_active( $pf ) ) { - $plugin_slug = dirname( $pf ); - self::$active_plugins[] = $plugin_slug; - $config_file = WP_PLUGIN_DIR . '/' . $plugin_slug . '/wpm-config.json'; - if ( trim( $plugin_slug, '\/.' ) && file_exists( $config_file ) ) { - self::$config_files[ $plugin_slug ] = $config_file; - } - } - } - - foreach ( wp_get_mu_plugins() as $mup ) { - $plugin_dir_name = dirname( $mup ); - $plugin_base_name = basename( $mup, '.php' ); - self::$active_plugins[] = $plugin_base_name; - $plugin_sub_dir = $plugin_dir_name . '/' . $plugin_base_name; - if ( file_exists( $plugin_sub_dir . '/wpm-config.json' ) ) { - $config_file = $plugin_sub_dir . '/wpm-config.json'; - self::$config_files[ $plugin_base_name ] = $config_file; - } - } - } - - /** - * Load configs from WPM - */ - public static function load_core_configs() { - $plugins_config_path = WPM_ABSPATH . 'configs/plugins/'; - foreach ( glob( $plugins_config_path . '*.json' ) as $config_file ) { - $config_name = pathinfo( $config_file, PATHINFO_FILENAME ); - if ( ! isset( $config_files[ $config_name ] ) && in_array( $config_name, self::$active_plugins, true ) ) { - self::$config_files[ $config_name ] = $config_file; - } - } - - $theme_name = get_template(); - $theme_config_file = WPM_ABSPATH . 'configs/themes/' . $theme_name . '.json'; - if ( file_exists( $theme_config_file ) ) { - self::$config_files[ 'theme_' . $theme_name ] = $theme_config_file; - } - - self::$config_files = apply_filters('wpmpro_load_core_configs', self::$config_files, self::$active_plugins); - } - - /** - * Load configs from current theme - */ - public static function load_theme_config() { - - $config_file = get_template_directory() . '/wpm-config.json'; - if ( file_exists( $config_file ) ) { - self::$config_files[ 'theme_' . get_template() ] = $config_file; - } - - if ( get_template_directory() !== get_stylesheet_directory() ) { - $config_file = get_stylesheet_directory() . '/wpm-config.json'; - if ( file_exists( $config_file ) ) { - self::$config_files[ 'theme_' . get_stylesheet() ] = $config_file; - } - } - } - - /** - * Parsing config files to config array - */ - public static function parse_config_files() { - - $config_files = apply_filters( 'wpm_json_files', self::$config_files ); - - foreach ( $config_files as $name => $file ) { - - $file = apply_filters( "wpm_{$name}_json_file", $file ); - - if ( $file && is_readable( $file ) ) { - - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents --Reason We are just loading the plugin static file to get the contents. - $config = json_decode( file_get_contents( $file ), true ); - - if ( is_array( $config ) && ! empty( $config ) ) { - self::$config = wpm_array_merge_recursive( self::$config, $config ); - } - } - } - } -} + $pd ) { + if ( is_plugin_active( $pf ) ) { + $plugin_slug = dirname( $pf ); + self::$active_plugins[] = $plugin_slug; + $config_file = WP_PLUGIN_DIR . '/' . $plugin_slug . '/wpm-config.json'; + if ( trim( $plugin_slug, '\/.' ) && file_exists( $config_file ) ) { + self::$config_files[ $plugin_slug ] = $config_file; + } + } + } + + foreach ( wp_get_mu_plugins() as $mup ) { + $plugin_dir_name = dirname( $mup ); + $plugin_base_name = basename( $mup, '.php' ); + self::$active_plugins[] = $plugin_base_name; + $plugin_sub_dir = $plugin_dir_name . '/' . $plugin_base_name; + if ( file_exists( $plugin_sub_dir . '/wpm-config.json' ) ) { + $config_file = $plugin_sub_dir . '/wpm-config.json'; + self::$config_files[ $plugin_base_name ] = $config_file; + } + } + } + + /** + * Load configs from WPM + */ + public static function load_core_configs() { + $plugins_config_path = WPM_ABSPATH . 'configs/plugins/'; + foreach ( glob( $plugins_config_path . '*.json' ) as $config_file ) { + $config_name = pathinfo( $config_file, PATHINFO_FILENAME ); + if ( ! isset( $config_files[ $config_name ] ) && in_array( $config_name, self::$active_plugins, true ) ) { + self::$config_files[ $config_name ] = $config_file; + } + } + + $theme_name = get_template(); + $theme_config_file = WPM_ABSPATH . 'configs/themes/' . $theme_name . '.json'; + if ( file_exists( $theme_config_file ) ) { + self::$config_files[ 'theme_' . $theme_name ] = $theme_config_file; + } + + self::$config_files = apply_filters('wpmpro_load_core_configs', self::$config_files, self::$active_plugins); + } + + /** + * Load configs from current theme + */ + public static function load_theme_config() { + + $config_file = get_template_directory() . '/wpm-config.json'; + if ( file_exists( $config_file ) ) { + self::$config_files[ 'theme_' . get_template() ] = $config_file; + } + + if ( get_template_directory() !== get_stylesheet_directory() ) { + $config_file = get_stylesheet_directory() . '/wpm-config.json'; + if ( file_exists( $config_file ) ) { + self::$config_files[ 'theme_' . get_stylesheet() ] = $config_file; + } + } + } + + /** + * Parsing config files to config array + */ + public static function parse_config_files() { + + $config_files = apply_filters( 'wpm_json_files', self::$config_files ); + + foreach ( $config_files as $name => $file ) { + + $file = apply_filters( "wpm_{$name}_json_file", $file ); + + if ( $file && is_readable( $file ) ) { + + // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents --Reason We are just loading the plugin static file to get the contents. + $config = json_decode( file_get_contents( $file ), true ); + + if ( is_array( $config ) && ! empty( $config ) ) { + self::$config = wpm_array_merge_recursive( self::$config, $config ); + } + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-custom-types.php b/plugins/wp-react-custom-multilang/includes/class-wpm-custom-types.php new file mode 100644 index 000000000..4bcfd1cae --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-custom-types.php @@ -0,0 +1,75 @@ + $post_type ) { + if ( isset( $config[ $key ] ) ) { + $updated_config[ $key ] = $config[ $key ]; + }else{ + $updated_config[ $key ] = array(); + } + } + + return $updated_config; + } + + return $config; + + } + + + /** + * Check if post type support is enabled on settings page + * @param $post WP_Post + * @return boolean + * @since 2.4.18 + * */ + public static function validate_post_type_support( $post ) { + + if ( is_object( $post ) && ! empty( $post->post_type ) ) { + + $post_types = WPM_Admin_Settings::get_option( 'wpm_custom_post_types' ); + + if ( ! empty( $post_types ) && is_array( $post_types ) ) { + + if ( ! array_key_exists( $post->post_type, $post_types ) ) { + return true; + } + + } + } + + return false; + + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-frontend-scripts.php b/plugins/wp-react-custom-multilang/includes/class-wpm-frontend-scripts.php index de3daf0bc..77979d085 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-frontend-scripts.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-frontend-scripts.php @@ -1,201 +1,201 @@ - array( - 'src' => wpm_asset_path( 'styles/main' . $suffix . '.css' ), - 'deps' => '', - 'version' => WPM_VERSION, - 'media' => 'all', - ), - ); - - return $styles; - } - - /** - * Register a script for use. - * - * @uses wp_register_script() - * @access private - * - * @param string $handle - * @param string $path - * @param string[] $deps - * @param string $version - * @param boolean $in_footer - */ - private static function register_script( $handle, $path, $deps = array( 'jquery' ), $version = WPM_VERSION, $in_footer = true ) { - self::$scripts[] = $handle; - wp_register_script( $handle, $path, $deps, $version, $in_footer ); - } - - /** - * Register a style for use. - * - * @uses wp_register_style() - * @access private - * - * @param string $handle - * @param string $path - * @param string[] $deps - * @param string $version - * @param string $media - */ - private static function register_style( $handle, $path, $deps = array(), $version = WPM_VERSION, $media = 'all' ) { - self::$styles[] = $handle; - wp_register_style( $handle, $path, $deps, $version, $media ); - } - - /** - * Register and enqueue a styles for use. - * - * @uses wp_enqueue_style() - * @access private - * - * @param string $handle - * @param string $path - * @param string[] $deps - * @param string $version - * @param string $media - */ - private static function enqueue_style( $handle, $path = '', $deps = array(), $version = WPM_VERSION, $media = 'all' ) { - if ( ! in_array( $handle, self::$styles, true ) && $path ) { - self::register_style( $handle, $path, $deps, $version, $media ); - } - wp_enqueue_style( $handle ); - } - - /** - * Register/queue frontend scripts. - */ - public static function load_scripts() { - - if ( ! did_action( 'before_wpm_init' ) ) { - return; - } - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - // CSS Styles - if ( $enqueue_styles = self::get_styles() ) { - foreach ( $enqueue_styles as $handle => $args ) { - self::enqueue_style( $handle, $args['src'], $args['deps'], $args['version'], $args['media'] ); - } - } - } - - /** - * Localize a WPM script once. - * @access private - * - * @param string $handle - */ - private static function localize_script( $handle ) { - if ( ! in_array( $handle, self::$wp_localize_scripts, true ) && wp_script_is( $handle ) && ( $data = self::get_script_data( $handle ) ) ) { - $name = str_replace( '-', '_', $handle ) . '_params'; - self::$wp_localize_scripts[] = $handle; - wp_localize_script( $handle, $name, apply_filters( $name, $data ) ); - } - } - - /** - * Return data for script handles. - * @access private - * - * @param string $handle - * - * @return array|bool - */ - private static function get_script_data( $handle ) { - - /*switch ( $handle ) { - - }*/ - - return false; - } - - /** - * Localize scripts only when enqueued. - */ - public static function localize_printed_scripts() { - foreach ( self::$scripts as $handle ) { - self::localize_script( $handle ); - } - } - - /** - * Change link of anchor tag href attribute when switcher is added on site editor or through post or page block - * @since 2.4.9 - * */ - public static function wpm_block_script(){ - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - $script_data = array( - 'wpm_block_switch_nonce' => wp_create_nonce( 'wpm_ajax_security_nonce' ), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'current_url' => wpm_get_current_url() - ); - - $filename = '/assets/blocks/language-switcher/js/switcher-block' . $suffix . '.js'; - $css_style_path = wpm()->plugin_url().$filename; - - wp_register_script( 'wpm-switcher-block-script', $css_style_path, array('jquery'), WPM_VERSION, true ); - wp_localize_script( 'wpm-switcher-block-script', 'wpm_localize_data', $script_data ); - wp_enqueue_script( 'wpm-switcher-block-script' ); - } -} + array( + 'src' => wpm_asset_path( 'styles/main' . $suffix . '.css' ), + 'deps' => '', + 'version' => WPM_VERSION, + 'media' => 'all', + ), + ); + + return $styles; + } + + /** + * Register a script for use. + * + * @uses wp_register_script() + * @access private + * + * @param string $handle + * @param string $path + * @param string[] $deps + * @param string $version + * @param boolean $in_footer + */ + private static function register_script( $handle, $path, $deps = array( 'jquery' ), $version = WPM_VERSION, $in_footer = true ) { + self::$scripts[] = $handle; + wp_register_script( $handle, $path, $deps, $version, $in_footer ); + } + + /** + * Register a style for use. + * + * @uses wp_register_style() + * @access private + * + * @param string $handle + * @param string $path + * @param string[] $deps + * @param string $version + * @param string $media + */ + private static function register_style( $handle, $path, $deps = array(), $version = WPM_VERSION, $media = 'all' ) { + self::$styles[] = $handle; + wp_register_style( $handle, $path, $deps, $version, $media ); + } + + /** + * Register and enqueue a styles for use. + * + * @uses wp_enqueue_style() + * @access private + * + * @param string $handle + * @param string $path + * @param string[] $deps + * @param string $version + * @param string $media + */ + private static function enqueue_style( $handle, $path = '', $deps = array(), $version = WPM_VERSION, $media = 'all' ) { + if ( ! in_array( $handle, self::$styles, true ) && $path ) { + self::register_style( $handle, $path, $deps, $version, $media ); + } + wp_enqueue_style( $handle ); + } + + /** + * Register/queue frontend scripts. + */ + public static function load_scripts() { + + if ( ! did_action( 'before_wpm_init' ) ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + // CSS Styles + if ( $enqueue_styles = self::get_styles() ) { + foreach ( $enqueue_styles as $handle => $args ) { + self::enqueue_style( $handle, $args['src'], $args['deps'], $args['version'], $args['media'] ); + } + } + } + + /** + * Localize a WPM script once. + * @access private + * + * @param string $handle + */ + private static function localize_script( $handle ) { + if ( ! in_array( $handle, self::$wp_localize_scripts, true ) && wp_script_is( $handle ) && ( $data = self::get_script_data( $handle ) ) ) { + $name = str_replace( '-', '_', $handle ) . '_params'; + self::$wp_localize_scripts[] = $handle; + wp_localize_script( $handle, $name, apply_filters( $name, $data ) ); + } + } + + /** + * Return data for script handles. + * @access private + * + * @param string $handle + * + * @return array|bool + */ + private static function get_script_data( $handle ) { + + /*switch ( $handle ) { + + }*/ + + return false; + } + + /** + * Localize scripts only when enqueued. + */ + public static function localize_printed_scripts() { + foreach ( self::$scripts as $handle ) { + self::localize_script( $handle ); + } + } + + /** + * Change link of anchor tag href attribute when switcher is added on site editor or through post or page block + * @since 2.4.9 + * */ + public static function wpm_block_script(){ + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + $script_data = array( + 'wpm_block_switch_nonce' => wp_create_nonce( 'wpm_ajax_security_nonce' ), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'current_url' => wpm_get_current_url() + ); + + $filename = '/assets/blocks/language-switcher/js/switcher-block' . $suffix . '.js'; + $css_style_path = wpm()->plugin_url().$filename; + + wp_register_script( 'wpm-switcher-block-script', $css_style_path, array('jquery'), WPM_VERSION, true ); + wp_localize_script( 'wpm-switcher-block-script', 'wpm_localize_data', $script_data ); + wp_enqueue_script( 'wpm-switcher-block-script' ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-install.php b/plugins/wp-react-custom-multilang/includes/class-wpm-install.php index 11e5d0e17..3f305413a 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-install.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-install.php @@ -1,435 +1,435 @@ - array( - 'wpm_update_178_datetime_format', - 'wpm_update_178_db_version', - ), - '1.8.0' => array( - 'wpm_update_180_flags', - 'wpm_update_180_db_version', - ), - '2.0.0' => array( - 'wpm_update_200_options', - 'wpm_update_200_db_version', - ), - '2.1.0' => array( - 'wpm_update_210_delete_config', - 'wpm_update_210_db_version', - ), - '2.1.1' => array( - 'wpm_update_211_change_options', - 'wpm_update_211_db_version', - ), - '2.1.4' => array( - 'wpm_update_214_change_syntax', - 'wpm_update_214_db_version', - ), - ); - - /** - * Background update class. - * - * @var object - */ - private static $background_updater; - - /** - * Hook in tabs. - */ - public static function init() { - add_action( 'init', array( __CLASS__, 'check_version' ), 5 ); - add_action( 'init', array( __CLASS__, 'init_background_updater' ), 5 ); - add_action( 'admin_init', array( __CLASS__, 'install_actions' ) ); - add_filter( 'plugin_action_links_' . WPM_PLUGIN_BASENAME, array( __CLASS__, 'plugin_action_links' ) ); - } - - /** - * Init background updates - */ - public static function init_background_updater() { - self::$background_updater = new WPM_Background_Updater(); - } - - /** - * Check WPM version and run the updater is required. - * - * This check is done on all requests and runs if he versions do not match. - */ - public static function check_version() { - if ( get_option( 'wpm_version' ) !== wpm()->version ) { - self::install(); - do_action( 'wpm_updated' ); - } - } - - /** - * Install actions when a update button is clicked within the admin area. - * - * This function is hooked into admin_init to affect admin only. - */ - public static function install_actions() { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['do_update_wpm'] ) ) { - self::update(); - WPM_Admin_Notices::add_notice( 'update' ); - } - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['force_update_wpm'] ) ) { - do_action( 'wp_wpm_updater_cron' ); - wp_safe_redirect( admin_url( 'admin.php?page=wpm-settings' ) ); - exit; - } - } - - /** - * Install WPM. - */ - public static function install() { - if ( ! is_blog_installed() ) { - return; - } - - // Check if we are not already running this routine. - if ( 'yes' === get_transient( 'wpm_installing' ) ) { - return; - } - - // If we made it till here nothing is running yet, lets set the transient now. - set_transient( 'wpm_installing', 'yes', MINUTE_IN_SECONDS * 10 ); - wpm_maybe_define_constant( 'WPM_INSTALLING', true ); - - self::remove_admin_notices(); - self::create_options(); - self::create_roles(); - WPM_Config::load_config_run(); - self::update_wpm_version(); - self::maybe_update_db_version(); - - delete_transient( 'wpm_installing' ); - - // Trigger action - do_action( 'wpm_flush_rewrite_rules' ); - do_action( 'wpm_installed' ); - } - - /** - * Reset any notices added to admin. - * - * @since 2.0.0 - */ - private static function remove_admin_notices() { - WPM_Admin_Notices::init(); - WPM_Admin_Notices::remove_all_notices(); - } - - /** - * Is a DB update needed? - * - * @since 1.7.8 - * - * @return boolean - */ - private static function needs_db_update() { - $current_db_version = get_option( 'wpm_db_version', null ); - $updates = self::get_db_update_callbacks(); - - return ( null !== $current_db_version ) && version_compare( $current_db_version, max( array_keys( $updates ) ), '<' ); - } - - /** - * See if we need to show or run database updates during install. - * - * @since 1.7.8 - */ - private static function maybe_update_db_version() { - if ( self::needs_db_update() ) { - if ( apply_filters( 'wpm_enable_auto_update_db', false ) ) { - self::init_background_updater(); - self::update(); - } else { - WPM_Admin_Notices::add_notice( 'update' ); - } - } else { - self::update_db_version(); - } - } - - /** - * Update WPM version to current. - */ - private static function update_wpm_version() { - - /* fix for update */ - if ( $old_version = get_option( 'wpm_version' ) ) { - if ( version_compare( $old_version, '1.7.7', 'le' ) ) { - add_option( 'wpm_db_version', '1.7.7' ); - } - } - - delete_option( 'wpm_version' ); - add_option( 'wpm_version', wpm()->version ); - } - - /** - * Get list of DB update callbacks. - * - * @since 1.7.8 - * - * @return array - */ - public static function get_db_update_callbacks() { - return self::$db_updates; - } - - /** - * Push all needed DB updates to the queue for processing. - * - * @since 1.7.8 - */ - private static function update() { - $current_db_version = get_option( 'wpm_db_version' ); - $update_queued = false; - - foreach ( self::get_db_update_callbacks() as $version => $update_callbacks ) { - if ( version_compare( $current_db_version, $version, '<' ) ) { - foreach ( $update_callbacks as $update_callback ) { - self::$background_updater->push_to_queue( $update_callback ); - $update_queued = true; - } - } - } - - if ( $update_queued ) { - self::$background_updater->save()->dispatch(); - } - } - - /** - * Update DB version to current. - * - * @since 1.7.8 - * - * @param string $version - */ - public static function update_db_version( $version = null ) { - delete_option( 'wpm_db_version' ); - add_option( 'wpm_db_version', null === $version ? wpm()->version : $version ); - } - - /** - * Default options. - * - * Sets up the default options used on the settings page. - */ - private static function create_options() { - - $settings = WPM_Admin_Settings::get_settings_pages(); - - foreach ( $settings as $section ) { - if ( ! method_exists( $section, 'get_settings' ) ) { - continue; - } - $subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) ); - - foreach ( $subsections as $subsection ) { - foreach ( $section->get_settings( $subsection ) as $value ) { - if ( isset( $value['default'], $value['id'] ) ) { - $autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true; - add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) ); - } - } - } - } - - $languages = array(); - $available_translations = wpm_get_available_translations(); - $installed_languages = wpm_get_installed_languages(); - if(!empty($installed_languages) && is_array($installed_languages)){ - foreach ( $installed_languages as $locale ) { - $code = ''; $name = ''; - $flag = explode( '_', strtolower( $locale ) ); - if( ! empty( $available_translations[ $locale ] ) && is_array($available_translations[ $locale ])){ - if(isset($available_translations[ $locale ]['iso']) && is_array($available_translations[ $locale ]['iso'])){ - $code = sanitize_title( current( $available_translations[ $locale ]['iso'] ) ); - } - if(isset($available_translations[ $locale ]['native_name'])){ - $name = sanitize_text_field($available_translations[ $locale ]['native_name']); - } - } - $languages[ $code ] = array( - 'enable' => 1, - 'locale' => $locale, - 'name' => $name, - 'translation' => $locale, - 'date' => '', - 'time' => '', - 'flag' => ( isset( $flag[1] ) ? $flag[1] : $flag[0] ) . '.png', - ); - } - } - - add_option( 'wpm_languages', $languages ); - } - - - /** - * Create roles and capabilities. - */ - public static function create_roles() { - global $wp_roles; - - if ( ! class_exists( 'WP_Roles' ) ) { - return; - } - - if ( ! isset( $wp_roles ) ) { - $wp_roles = new \WP_Roles(); - } - - $capabilities = array( - 'level_7' => true, - 'level_6' => true, - 'level_5' => true, - 'level_4' => true, - 'level_3' => true, - 'level_2' => true, - 'level_1' => true, - 'level_0' => true, - 'read' => true, - 'read_private_pages' => true, - 'read_private_posts' => true, - 'edit_posts' => true, - 'edit_pages' => true, - 'edit_published_posts' => true, - 'edit_published_pages' => true, - 'edit_private_pages' => true, - 'edit_private_posts' => true, - 'edit_others_posts' => true, - 'edit_others_pages' => true, - 'manage_categories' => true, - 'manage_links' => true, - 'upload_files' => true, - ); - - // Translator role - $result = add_role( 'translator', __( 'Translator', 'wp-multilang' ), $capabilities ); - - if ( null === $result ) { - $translator = get_role( 'translator' ); - - foreach ( $capabilities as $cap => $value ) { - $translator->add_cap( $cap ); - } - } - - $capabilities = self::get_core_capabilities(); - - foreach ( $capabilities as $cap_group ) { - foreach ( $cap_group as $cap ) { - $wp_roles->add_cap( 'translator', $cap ); - } - } - - $wp_roles->add_cap( 'administrator', 'manage_translations' ); - } - - /** - * Get capabilities for WP Multilang - these are assigned to translator during installation or reset. - * - * @return array - */ - private static function get_core_capabilities() { - $capabilities = array(); - - $capabilities['core'] = array( - 'manage_translations', - ); - - $capability_types = apply_filters( 'wpm_role_translator_capability_types', array() ); - - foreach ( $capability_types as $capability_type ) { - - $capabilities[ $capability_type ] = array( - // Post type - "edit_{$capability_type}", - "read_{$capability_type}", - "edit_{$capability_type}s", - "edit_others_{$capability_type}s", - "read_private_{$capability_type}s", - "edit_private_{$capability_type}s", - "edit_published_{$capability_type}s", - - // Terms - "manage_{$capability_type}_terms", - "edit_{$capability_type}_terms", - ); - } - - return apply_filters( 'wpm_role_translator_capabilities', $capabilities ); - } - - - /** - * wpm_remove_roles function. - */ - public static function remove_roles() { - global $wp_roles; - - if ( ! class_exists( 'WP_Roles' ) ) { - return; - } - - if ( ! isset( $wp_roles ) ) { - $wp_roles = new \WP_Roles(); - } - - $capabilities = self::get_core_capabilities(); - - foreach ( $capabilities as $cap_group ) { - foreach ( $cap_group as $cap ) { - $wp_roles->remove_cap( 'translator', $cap ); - } - } - - $wp_roles->remove_cap( 'administrator', 'manage_translations' ); - - remove_role( 'translator' ); - } - - /** - * Show action links on the plugin screen. - * - * @param mixed $links Plugin Action links - * - * @return array - */ - public static function plugin_action_links( $links ) { - $action_links = array( - 'settings' => '' . esc_html__( 'Settings', 'wp-multilang' ) . '', - ); - - return array_merge( $action_links, $links ); - } -} + array( + 'wpm_update_178_datetime_format', + 'wpm_update_178_db_version', + ), + '1.8.0' => array( + 'wpm_update_180_flags', + 'wpm_update_180_db_version', + ), + '2.0.0' => array( + 'wpm_update_200_options', + 'wpm_update_200_db_version', + ), + '2.1.0' => array( + 'wpm_update_210_delete_config', + 'wpm_update_210_db_version', + ), + '2.1.1' => array( + 'wpm_update_211_change_options', + 'wpm_update_211_db_version', + ), + '2.1.4' => array( + 'wpm_update_214_change_syntax', + 'wpm_update_214_db_version', + ), + ); + + /** + * Background update class. + * + * @var object + */ + private static $background_updater; + + /** + * Hook in tabs. + */ + public static function init() { + add_action( 'init', array( __CLASS__, 'check_version' ), 5 ); + add_action( 'init', array( __CLASS__, 'init_background_updater' ), 5 ); + add_action( 'admin_init', array( __CLASS__, 'install_actions' ) ); + add_filter( 'plugin_action_links_' . WPM_PLUGIN_BASENAME, array( __CLASS__, 'plugin_action_links' ) ); + } + + /** + * Init background updates + */ + public static function init_background_updater() { + self::$background_updater = new WPM_Background_Updater(); + } + + /** + * Check WPM version and run the updater is required. + * + * This check is done on all requests and runs if he versions do not match. + */ + public static function check_version() { + if ( get_option( 'wpm_version' ) !== wpm()->version ) { + self::install(); + do_action( 'wpm_updated' ); + } + } + + /** + * Install actions when a update button is clicked within the admin area. + * + * This function is hooked into admin_init to affect admin only. + */ + public static function install_actions() { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['do_update_wpm'] ) ) { + self::update(); + WPM_Admin_Notices::add_notice( 'update' ); + } + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['force_update_wpm'] ) ) { + do_action( 'wp_wpm_updater_cron' ); + wp_safe_redirect( admin_url( 'admin.php?page=wpm-settings' ) ); + exit; + } + } + + /** + * Install WPM. + */ + public static function install() { + if ( ! is_blog_installed() ) { + return; + } + + // Check if we are not already running this routine. + if ( 'yes' === get_transient( 'wpm_installing' ) ) { + return; + } + + // If we made it till here nothing is running yet, lets set the transient now. + set_transient( 'wpm_installing', 'yes', MINUTE_IN_SECONDS * 10 ); + wpm_maybe_define_constant( 'WPM_INSTALLING', true ); + + self::remove_admin_notices(); + self::create_options(); + self::create_roles(); + WPM_Config::load_config_run(); + self::update_wpm_version(); + self::maybe_update_db_version(); + + delete_transient( 'wpm_installing' ); + + // Trigger action + do_action( 'wpm_flush_rewrite_rules' ); + do_action( 'wpm_installed' ); + } + + /** + * Reset any notices added to admin. + * + * @since 2.0.0 + */ + private static function remove_admin_notices() { + WPM_Admin_Notices::init(); + WPM_Admin_Notices::remove_all_notices(); + } + + /** + * Is a DB update needed? + * + * @since 1.7.8 + * + * @return boolean + */ + private static function needs_db_update() { + $current_db_version = get_option( 'wpm_db_version', null ); + $updates = self::get_db_update_callbacks(); + + return ( null !== $current_db_version ) && version_compare( $current_db_version, max( array_keys( $updates ) ), '<' ); + } + + /** + * See if we need to show or run database updates during install. + * + * @since 1.7.8 + */ + private static function maybe_update_db_version() { + if ( self::needs_db_update() ) { + if ( apply_filters( 'wpm_enable_auto_update_db', false ) ) { + self::init_background_updater(); + self::update(); + } else { + WPM_Admin_Notices::add_notice( 'update' ); + } + } else { + self::update_db_version(); + } + } + + /** + * Update WPM version to current. + */ + private static function update_wpm_version() { + + /* fix for update */ + if ( $old_version = get_option( 'wpm_version' ) ) { + if ( version_compare( $old_version, '1.7.7', 'le' ) ) { + add_option( 'wpm_db_version', '1.7.7' ); + } + } + + delete_option( 'wpm_version' ); + add_option( 'wpm_version', wpm()->version ); + } + + /** + * Get list of DB update callbacks. + * + * @since 1.7.8 + * + * @return array + */ + public static function get_db_update_callbacks() { + return self::$db_updates; + } + + /** + * Push all needed DB updates to the queue for processing. + * + * @since 1.7.8 + */ + private static function update() { + $current_db_version = get_option( 'wpm_db_version' ); + $update_queued = false; + + foreach ( self::get_db_update_callbacks() as $version => $update_callbacks ) { + if ( version_compare( $current_db_version, $version, '<' ) ) { + foreach ( $update_callbacks as $update_callback ) { + self::$background_updater->push_to_queue( $update_callback ); + $update_queued = true; + } + } + } + + if ( $update_queued ) { + self::$background_updater->save()->dispatch(); + } + } + + /** + * Update DB version to current. + * + * @since 1.7.8 + * + * @param string $version + */ + public static function update_db_version( $version = null ) { + delete_option( 'wpm_db_version' ); + add_option( 'wpm_db_version', null === $version ? wpm()->version : $version ); + } + + /** + * Default options. + * + * Sets up the default options used on the settings page. + */ + private static function create_options() { + + $settings = WPM_Admin_Settings::get_settings_pages(); + + foreach ( $settings as $section ) { + if ( ! method_exists( $section, 'get_settings' ) ) { + continue; + } + $subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) ); + + foreach ( $subsections as $subsection ) { + foreach ( $section->get_settings( $subsection ) as $value ) { + if ( isset( $value['default'], $value['id'] ) ) { + $autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true; + add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) ); + } + } + } + } + + $languages = array(); + $available_translations = wpm_get_available_translations(); + $installed_languages = wpm_get_installed_languages(); + if(!empty($installed_languages) && is_array($installed_languages)){ + foreach ( $installed_languages as $locale ) { + $code = ''; $name = ''; + $flag = explode( '_', strtolower( $locale ) ); + if( ! empty( $available_translations[ $locale ] ) && is_array($available_translations[ $locale ])){ + if(isset($available_translations[ $locale ]['iso']) && is_array($available_translations[ $locale ]['iso'])){ + $code = sanitize_title( current( $available_translations[ $locale ]['iso'] ) ); + } + if(isset($available_translations[ $locale ]['native_name'])){ + $name = sanitize_text_field($available_translations[ $locale ]['native_name']); + } + } + $languages[ $code ] = array( + 'enable' => 1, + 'locale' => $locale, + 'name' => $name, + 'translation' => $locale, + 'date' => '', + 'time' => '', + 'flag' => ( isset( $flag[1] ) ? $flag[1] : $flag[0] ) . '.png', + ); + } + } + + add_option( 'wpm_languages', $languages ); + } + + + /** + * Create roles and capabilities. + */ + public static function create_roles() { + global $wp_roles; + + if ( ! class_exists( 'WP_Roles' ) ) { + return; + } + + if ( ! isset( $wp_roles ) ) { + $wp_roles = new \WP_Roles(); + } + + $capabilities = array( + 'level_7' => true, + 'level_6' => true, + 'level_5' => true, + 'level_4' => true, + 'level_3' => true, + 'level_2' => true, + 'level_1' => true, + 'level_0' => true, + 'read' => true, + 'read_private_pages' => true, + 'read_private_posts' => true, + 'edit_posts' => true, + 'edit_pages' => true, + 'edit_published_posts' => true, + 'edit_published_pages' => true, + 'edit_private_pages' => true, + 'edit_private_posts' => true, + 'edit_others_posts' => true, + 'edit_others_pages' => true, + 'manage_categories' => true, + 'manage_links' => true, + 'upload_files' => true, + ); + + // Translator role + $result = add_role( 'translator', __( 'Translator', 'wp-multilang' ), $capabilities ); + + if ( null === $result ) { + $translator = get_role( 'translator' ); + + foreach ( $capabilities as $cap => $value ) { + $translator->add_cap( $cap ); + } + } + + $capabilities = self::get_core_capabilities(); + + foreach ( $capabilities as $cap_group ) { + foreach ( $cap_group as $cap ) { + $wp_roles->add_cap( 'translator', $cap ); + } + } + + $wp_roles->add_cap( 'administrator', 'manage_translations' ); + } + + /** + * Get capabilities for WP Multilang - these are assigned to translator during installation or reset. + * + * @return array + */ + private static function get_core_capabilities() { + $capabilities = array(); + + $capabilities['core'] = array( + 'manage_translations', + ); + + $capability_types = apply_filters( 'wpm_role_translator_capability_types', array() ); + + foreach ( $capability_types as $capability_type ) { + + $capabilities[ $capability_type ] = array( + // Post type + "edit_{$capability_type}", + "read_{$capability_type}", + "edit_{$capability_type}s", + "edit_others_{$capability_type}s", + "read_private_{$capability_type}s", + "edit_private_{$capability_type}s", + "edit_published_{$capability_type}s", + + // Terms + "manage_{$capability_type}_terms", + "edit_{$capability_type}_terms", + ); + } + + return apply_filters( 'wpm_role_translator_capabilities', $capabilities ); + } + + + /** + * wpm_remove_roles function. + */ + public static function remove_roles() { + global $wp_roles; + + if ( ! class_exists( 'WP_Roles' ) ) { + return; + } + + if ( ! isset( $wp_roles ) ) { + $wp_roles = new \WP_Roles(); + } + + $capabilities = self::get_core_capabilities(); + + foreach ( $capabilities as $cap_group ) { + foreach ( $cap_group as $cap ) { + $wp_roles->remove_cap( 'translator', $cap ); + } + } + + $wp_roles->remove_cap( 'administrator', 'manage_translations' ); + + remove_role( 'translator' ); + } + + /** + * Show action links on the plugin screen. + * + * @param mixed $links Plugin Action links + * + * @return array + */ + public static function plugin_action_links( $links ) { + $action_links = array( + 'settings' => '' . esc_html__( 'Settings', 'wp-multilang' ) . '', + ); + + return array_merge( $action_links, $links ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-menus.php b/plugins/wp-react-custom-multilang/includes/class-wpm-menus.php index 05a28944d..f47a5fbf4 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-menus.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-menus.php @@ -1,284 +1,284 @@ -post_type ) ) { - if ( 'nav_menu_item' === $menu_item->post_type ) { - - if ( 'post_type' === $menu_item->type ) { - - $object = get_post_type_object( $menu_item->object ); - - if ( $object ) { - $menu_item->type_label = $object->labels->singular_name; - } else { - $menu_item->type_label = $menu_item->object; - } - - $original_object = get_post( $menu_item->object_id ); - - /** This filter is documented in wp-includes/post-template.php */ - $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID ); - - if ( '' === $original_title ) { - /* translators: %d: ID of a post */ - $original_title = sprintf( __( '#%d (no title)', 'wp-multilang' ), $original_object->ID ); - } - - $menu_item->title = '' === $menu_item->post_title ? $original_title : $menu_item->post_title; - - } elseif ( 'post_type_archive' === $menu_item->type ) { - - $object = get_post_type_object( $menu_item->object ); - - if ( $object ) { - $menu_item->title = '' === $menu_item->post_title ? $object->labels->archives : $menu_item->post_title; - } else { - $menu_item->_invalid = true; - } - - $menu_item->type_label = esc_html__( 'Post Type Archive', 'wp-multilang' ); - $menu_item->url = get_post_type_archive_link( $menu_item->object ); - - } elseif ( 'taxonomy' === $menu_item->type ) { - - $object = get_taxonomy( $menu_item->object ); - - if ( $object ) { - $menu_item->type_label = $object->labels->singular_name; - } else { - $menu_item->type_label = $menu_item->object; - } - - $original_title = get_term_field( 'name', $menu_item->object_id, $menu_item->object, 'raw' ); - - if ( is_wp_error( $original_title ) ) { - $original_title = false; - } - - $menu_item->title = '' === $menu_item->post_title ? $original_title : $menu_item->post_title; - - } else { - - $menu_item->type_label = esc_html__( 'Custom Link', 'wp-multilang' ); - $menu_item->title = $menu_item->post_title; - }// End if(). - - $menu_item->attr_title = ! isset( $menu_item->attr_title ) ? apply_filters( 'nav_menu_attr_title', $menu_item->post_excerpt ) : $menu_item->attr_title; - if ( ! isset( $menu_item->description ) ) { - $menu_item->description = apply_filters( 'nav_menu_description', wp_trim_words( $menu_item->post_content, 200 ) ); - } - } else { - - $object = get_post_type_object( $menu_item->post_type ); - $menu_item->object = $object->name; - $menu_item->type_label = $object->labels->singular_name; - - if ( '' === $menu_item->post_title ) { - /* translators: %d: ID of a post */ - $menu_item->post_title = sprintf( __( '#%d (no title)', 'wp-multilang' ), $menu_item->ID ); - } - - $menu_item->title = $menu_item->post_title; - - /** This filter is documented in wp-includes/nav-menu.php */ - $menu_item->attr_title = apply_filters( 'nav_menu_attr_title', '' ); - - /** This filter is documented in wp-includes/nav-menu.php */ - $menu_item->description = apply_filters( 'nav_menu_description', '' ); - }// End if(). - } elseif ( isset( $menu_item->taxonomy ) ) { - - $object = get_taxonomy( $menu_item->taxonomy ); - $menu_item->type_label = $object->labels->singular_name; - - $menu_item->title = $menu_item->name; - $menu_item->attr_title = ''; - $menu_item->description = get_term_field( 'description', $menu_item->term_id, $menu_item->taxonomy ); - - }// End if(). - - /* translators: %d: This will get menu item id */ - $menu_item->title = '' === $menu_item->title ? sprintf( __( '#%d (no title)', 'wp-multilang' ), $menu_item->ID ) : $menu_item->title; - - return $menu_item; - } - - - /** - * Translation custom menu link - * - * @param $menu_item - * - * @return mixed - */ - public function translate_menu_url( $menu_item ) { - - if ( 'custom' === $menu_item->object && ! is_admin() ) { - $menu_item->url = wpm_translate_url( $menu_item->url ); - } - - return $menu_item; - } - - /** - * Add languages to menu - * - * @param $items - * - * @return string - */ - public function add_languages_to_menu( $items ) { - - foreach ( $items as $key => $item ) { - - if ( '#wpm-languages' === $item->url ) { - - $languages = wpm_get_languages(); - $count_languages = count( $languages ); - $lang = wpm_get_language(); - $new_items = array(); - $show_type = get_post_meta( $item->ID, '_menu_item_languages_show', true ); - $item_type = get_post_meta( $item->ID, '_menu_item_languages_type', true ); - $i = 1; - $was_current = false; - $first_lang = null; - - foreach ( $languages as $code => $language ) { - $new_item = new \stdClass(); - $new_item->ID = 'language-' . $code; - $new_item->db_id = 'language-' . $code; - $new_item->classes = $item->classes; - $new_item->type = 'language'; - $new_item->menu_item_parent = $item->menu_item_parent; - $new_item->parent_submenu_type = $item->parent_submenu_type; - $new_item->xfn = ''; - $new_item->target = ''; - $language_title = ''; - - if ( $lang === $code ) { - $was_current = true; - $new_item->classes[] = 'active-language'; - $new_item->url = '#'; - $new_item->current = true; - } else { - $new_item->url = esc_url( wpm_translate_current_url( $code ) ); - $new_item->current = false; - } - - if ( ( ( 'flag' === $show_type ) || ( 'both' === $show_type ) ) && ( $language['flag'] ) ) { - // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function - $language_title = '' . esc_attr( $language['name'] ) . ''; - } - - if ( ( 'name' === $show_type ) || ( 'both' === $show_type ) ) { - $language_title .= '' . esc_html( $language['name'] ) . ''; - } - - $new_item->title = $language_title; - - if ( 'dropdown' === $item_type ) { - if ( $lang === $code ) { - $new_item->classes[] = 'menu-item-has-children'; - } else { - $new_item->menu_item_parent = 'language-' . $lang; - } - } - - if ( 'single' === $item_type ) { - if ( 1 === $i ) { - $first_lang = $new_item; - } - - if ( ( $i === $count_languages ) && ( $lang === $code ) && $first_lang ) { - $new_items[] = $first_lang; - break; - } - - if ( $lang !== $code && $was_current ) { - $new_items[] = $new_item; - break; - } - - $i++; - continue; - } - - $new_items[] = $new_item; - }// End foreach(). - - $items = wpm_array_insert_after( $items, $key, $new_items ); - $sorted_array = array(); - - foreach ( $items as $k => $v ) { - $order = $k + 1; - $v->menu_order = $order; - $sorted_array[ $order ] = $v; - } - - $items = $sorted_array; - unset( $items[ $key ] ); - break; - }// End if(). - }// End foreach(). - - return $items; - } -} +post_type ) ) { + if ( 'nav_menu_item' === $menu_item->post_type ) { + + if ( 'post_type' === $menu_item->type ) { + + $object = get_post_type_object( $menu_item->object ); + + if ( $object ) { + $menu_item->type_label = $object->labels->singular_name; + } else { + $menu_item->type_label = $menu_item->object; + } + + $original_object = get_post( $menu_item->object_id ); + + /** This filter is documented in wp-includes/post-template.php */ + $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID ); + + if ( '' === $original_title ) { + /* translators: %d: ID of a post */ + $original_title = sprintf( __( '#%d (no title)', 'wp-multilang' ), $original_object->ID ); + } + + $menu_item->title = '' === $menu_item->post_title ? $original_title : $menu_item->post_title; + + } elseif ( 'post_type_archive' === $menu_item->type ) { + + $object = get_post_type_object( $menu_item->object ); + + if ( $object ) { + $menu_item->title = '' === $menu_item->post_title ? $object->labels->archives : $menu_item->post_title; + } else { + $menu_item->_invalid = true; + } + + $menu_item->type_label = esc_html__( 'Post Type Archive', 'wp-multilang' ); + $menu_item->url = get_post_type_archive_link( $menu_item->object ); + + } elseif ( 'taxonomy' === $menu_item->type ) { + + $object = get_taxonomy( $menu_item->object ); + + if ( $object ) { + $menu_item->type_label = $object->labels->singular_name; + } else { + $menu_item->type_label = $menu_item->object; + } + + $original_title = get_term_field( 'name', $menu_item->object_id, $menu_item->object, 'raw' ); + + if ( is_wp_error( $original_title ) ) { + $original_title = false; + } + + $menu_item->title = '' === $menu_item->post_title ? $original_title : $menu_item->post_title; + + } else { + + $menu_item->type_label = esc_html__( 'Custom Link', 'wp-multilang' ); + $menu_item->title = $menu_item->post_title; + }// End if(). + + $menu_item->attr_title = ! isset( $menu_item->attr_title ) ? apply_filters( 'nav_menu_attr_title', $menu_item->post_excerpt ) : $menu_item->attr_title; + if ( ! isset( $menu_item->description ) ) { + $menu_item->description = apply_filters( 'nav_menu_description', wp_trim_words( $menu_item->post_content, 200 ) ); + } + } else { + + $object = get_post_type_object( $menu_item->post_type ); + $menu_item->object = $object->name; + $menu_item->type_label = $object->labels->singular_name; + + if ( '' === $menu_item->post_title ) { + /* translators: %d: ID of a post */ + $menu_item->post_title = sprintf( __( '#%d (no title)', 'wp-multilang' ), $menu_item->ID ); + } + + $menu_item->title = $menu_item->post_title; + + /** This filter is documented in wp-includes/nav-menu.php */ + $menu_item->attr_title = apply_filters( 'nav_menu_attr_title', '' ); + + /** This filter is documented in wp-includes/nav-menu.php */ + $menu_item->description = apply_filters( 'nav_menu_description', '' ); + }// End if(). + } elseif ( isset( $menu_item->taxonomy ) ) { + + $object = get_taxonomy( $menu_item->taxonomy ); + $menu_item->type_label = $object->labels->singular_name; + + $menu_item->title = $menu_item->name; + $menu_item->attr_title = ''; + $menu_item->description = get_term_field( 'description', $menu_item->term_id, $menu_item->taxonomy ); + + }// End if(). + + /* translators: %d: This will get menu item id */ + $menu_item->title = '' === $menu_item->title ? sprintf( __( '#%d (no title)', 'wp-multilang' ), $menu_item->ID ) : $menu_item->title; + + return $menu_item; + } + + + /** + * Translation custom menu link + * + * @param $menu_item + * + * @return mixed + */ + public function translate_menu_url( $menu_item ) { + + if ( 'custom' === $menu_item->object && ! is_admin() ) { + $menu_item->url = wpm_translate_url( $menu_item->url ); + } + + return $menu_item; + } + + /** + * Add languages to menu + * + * @param $items + * + * @return string + */ + public function add_languages_to_menu( $items ) { + + foreach ( $items as $key => $item ) { + + if ( '#wpm-languages' === $item->url ) { + + $languages = wpm_get_languages(); + $count_languages = count( $languages ); + $lang = wpm_get_language(); + $new_items = array(); + $show_type = get_post_meta( $item->ID, '_menu_item_languages_show', true ); + $item_type = get_post_meta( $item->ID, '_menu_item_languages_type', true ); + $i = 1; + $was_current = false; + $first_lang = null; + + foreach ( $languages as $code => $language ) { + $new_item = new \stdClass(); + $new_item->ID = 'language-' . $code; + $new_item->db_id = 'language-' . $code; + $new_item->classes = $item->classes; + $new_item->type = 'language'; + $new_item->menu_item_parent = $item->menu_item_parent; + $new_item->parent_submenu_type = $item->parent_submenu_type; + $new_item->xfn = ''; + $new_item->target = ''; + $language_title = ''; + + if ( $lang === $code ) { + $was_current = true; + $new_item->classes[] = 'active-language'; + $new_item->url = '#'; + $new_item->current = true; + } else { + $new_item->url = esc_url( wpm_translate_current_url( $code ) ); + $new_item->current = false; + } + + if ( ( ( 'flag' === $show_type ) || ( 'both' === $show_type ) ) && ( $language['flag'] ) ) { + // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function + $language_title = '' . esc_attr( $language['name'] ) . ''; + } + + if ( ( 'name' === $show_type ) || ( 'both' === $show_type ) ) { + $language_title .= '' . esc_html( $language['name'] ) . ''; + } + + $new_item->title = $language_title; + + if ( 'dropdown' === $item_type ) { + if ( $lang === $code ) { + $new_item->classes[] = 'menu-item-has-children'; + } else { + $new_item->menu_item_parent = 'language-' . $lang; + } + } + + if ( 'single' === $item_type ) { + if ( 1 === $i ) { + $first_lang = $new_item; + } + + if ( ( $i === $count_languages ) && ( $lang === $code ) && $first_lang ) { + $new_items[] = $first_lang; + break; + } + + if ( $lang !== $code && $was_current ) { + $new_items[] = $new_item; + break; + } + + $i++; + continue; + } + + $new_items[] = $new_item; + }// End foreach(). + + $items = wpm_array_insert_after( $items, $key, $new_items ); + $sorted_array = array(); + + foreach ( $items as $k => $v ) { + $order = $k + 1; + $v->menu_order = $order; + $sorted_array[ $order ] = $v; + } + + $items = $sorted_array; + unset( $items[ $key ] ); + break; + }// End if(). + }// End foreach(). + + return $items; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-options.php b/plugins/wp-react-custom-multilang/includes/class-wpm-options.php index c2ce115e3..35b550f7c 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-options.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-options.php @@ -1,105 +1,108 @@ -options_config = $config['options']; - - foreach ( $this->options_config as $key => $option ) { - add_filter( "option_{$key}", 'wpm_translate_value', 5 ); - add_action( "add_option_{$key}", 'update_option', 99, 2 ); - add_filter( "pre_update_option_{$key}", array( $this, 'wpm_update_option' ), 99, 3 ); - } - - add_action( 'admin_enqueue_scripts', array( $this, 'customizer_style' ), 99 ); - } - - - /** - * Update options with translate - * - * @param $value - * @param $old_value - * @param $option - * - * @return array|bool|mixed|string - */ - public function wpm_update_option( $value, $old_value, $option ) { - - if ( wpm_is_ml_value( $value ) ) { - return $value; - } - - $this->options_config[ $option ] = apply_filters( "wpm_option_{$option}_config", isset( $this->options_config[ $option ] ) ? $this->options_config[ $option ] : null ); - - if ( null === $this->options_config[ $option ] ) { - return $value; - } - - remove_filter( "option_{$option}", 'wpm_translate_value', 5 ); - $old_value = get_option( $option ); - add_filter( "option_{$option}", 'wpm_translate_value', 5 ); - $value = wpm_set_new_value( $old_value, $value, $this->options_config[ $option ] ); - - return $value; - } - - /** - * Add inline css for proper positioning of astra theme - * @since 2.4.16 - */ - public function customizer_style() { - - $screen = get_current_screen(); - $screen_id = $screen ? $screen->id : ''; - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - if ( $screen_id == 'customize' ) { - - if ( ! function_exists( 'wp_get_theme' ) ) { - require_once ABSPATH . 'wp-includes/theme.php'; - } - - $active_theme = wp_get_theme(); - $active_theme_name = ''; - if ( ! empty( $active_theme ) && is_object( $active_theme ) ) { - $active_theme_name = $active_theme->get( 'Name' ); - } - - if ( $active_theme_name == 'Astra' ) { - - $custom_css = " - #customize-controls .wpm-language-switcher{ - margin-left: 45px; - }"; - - wp_add_inline_style( 'wpm_language_switcher', $custom_css ); - - } - } - } -} +options_config = $config['options']; + + foreach ( $this->options_config as $key => $option ) { + add_filter( "option_{$key}", 'wpm_translate_value', 5 ); + add_action( "add_option_{$key}", 'update_option', 99, 2 ); + add_filter( "pre_update_option_{$key}", array( $this, 'wpm_update_option' ), 99, 3 ); + } + + add_action( 'admin_enqueue_scripts', array( $this, 'customizer_style' ), 99 ); + } + + + /** + * Update options with translate + * + * @param $value + * @param $old_value + * @param $option + * + * @return array|bool|mixed|string + */ + public function wpm_update_option( $value, $old_value, $option ) { + + if ( wpm_is_ml_value( $value ) ) { + return $value; + } + + $this->options_config[ $option ] = apply_filters( "wpm_option_{$option}_config", isset( $this->options_config[ $option ] ) ? $this->options_config[ $option ] : null ); + + if ( null === $this->options_config[ $option ] ) { + return $value; + } + + $original_value = $value; + + remove_filter( "option_{$option}", 'wpm_translate_value', 5 ); + $old_value = get_option( $option ); + add_filter( "option_{$option}", 'wpm_translate_value', 5 ); + $value = wpm_set_new_value( $old_value, $value, $this->options_config[ $option ] ); + $value = apply_filters( "wpm_update_{$option}_option", $value, $original_value, $option, $old_value ); + + return $value; + } + + /** + * Add inline css for proper positioning of astra theme + * @since 2.4.16 + */ + public function customizer_style() { + + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + if ( $screen_id == 'customize' ) { + + if ( ! function_exists( 'wp_get_theme' ) ) { + require_once ABSPATH . 'wp-includes/theme.php'; + } + + $active_theme = wp_get_theme(); + $active_theme_name = ''; + if ( ! empty( $active_theme ) && is_object( $active_theme ) ) { + $active_theme_name = $active_theme->get( 'Name' ); + } + + if ( $active_theme_name == 'Astra' ) { + + $custom_css = " + #customize-controls .wpm-language-switcher{ + margin-left: 45px; + }"; + + wp_add_inline_style( 'wpm_language_switcher', $custom_css ); + + } + } + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-posts.php b/plugins/wp-react-custom-multilang/includes/class-wpm-posts.php index 3fa814a2e..6f185a78f 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-posts.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-posts.php @@ -1,362 +1,460 @@ -object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); - add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); - add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); - add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); - add_action( 'wp', array( $this, 'translate_queried_object' ), 5 ); - add_filter( 'wp_insert_post_data', array( $this, 'save_post' ), 99, 2 ); - add_filter( 'wp_insert_attachment_data', array( $this, 'save_post' ), 99, 2 ); - add_filter( 'wp_get_attachment_link', array( $this, 'translate_attachment_link' ), 5 ); - add_filter( 'render_block', array( $this, 'wpm_render_post_block' ), 10, 2); - add_filter( 'rest_post_dispatch', array( $this, 'wpm_rest_post_dispatch' ), 10, 3); - - // Block editor filter for saving the post data - add_filter( 'wpm_filter_block_editor_post_data', array( $this, 'wpm_filter_block_editor_post_data_clbk' ), 10, 2 ); - } - - - /** - * Translate all posts - * - * @param $posts - * - * @return array - */ - public function translate_posts( $posts ) { - foreach ( $posts as &$post ) { - $post = wpm_translate_post( $post ); - } - - return $posts; - } - - /** - * Separate posts py languages - * - * @param $query object WP_Query - * - * @return object WP_Query - */ - public function filter_posts_by_language( $query ) { - - if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { - return $query; - } - - if ( isset( $query->query_vars['post_type'] ) && ! empty( $query->query_vars['post_type'] ) ) { - $post_type = $query->query_vars['post_type']; - if ( is_string( $post_type ) && null === wpm_get_post_config( $post_type ) ) { - return $query; - } - } - - $lang = get_query_var( 'lang' ); - - if ( ! $lang ) { - $lang = wpm_get_user_language(); - } - - if ( 'all' !== $lang ) { - $lang_meta_query = array( - array( - 'relation' => 'OR', - array( - 'key' => '_languages', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_languages', - 'value' => serialize( $lang ), - 'compare' => 'LIKE', - ), - ), - ); - - if ( isset( $query->query_vars['meta_query'] ) ) { - $lang_meta_query = wp_parse_args( $query->query_vars['meta_query'], $lang_meta_query ); - } - - $query->set( 'meta_query', $lang_meta_query ); - } - - return $query; - } - - - /** - * Translate queried object in global $wp_query - */ - public function translate_queried_object() { - global $wp_query; - - if ( ( $post = $wp_query->queried_object ) && ( is_singular() || is_home() ) ) { - if ( null !== wpm_get_post_config( $post->post_type ) ) { - $wp_query->queried_object = wpm_translate_post( $post ); - } - } - } - - - /** - * Update post with translation - * - * @param $data - * @param $postarr - * - * @return mixed - */ - public function save_post( $data, $postarr ) { - - if ( 'auto-draft' === $data['post_status'] ) { - return $data; - } - - $post_config = wpm_get_post_config( $data['post_type'] ); - - if ( null === $post_config ) { - return $data; - } - - if ( 'attachment' !== $data['post_type'] ) { - - if ( 'trash' === $postarr['post_status'] ) { - return $data; - } - - // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['action'] ) && 'untrash' === $_GET['action'] ) { - return $data; - } - } - - $post_id = isset( $data['ID'] ) ? wpm_clean( $data['ID'] ) : ( isset( $postarr['ID'] ) ? wpm_clean( $postarr['ID'] ) : 0 ); - - $post_content = isset($data['post_content'])?$data['post_content']:''; - - foreach ( $data as $key => $content ) { - if ( isset( $post_config[ $key ] ) ) { - - $post_field_config = apply_filters( "wpm_post_{$data['post_type']}_field_{$key}_config", $post_config[ $key ], $content ); - $post_field_config = apply_filters( "wpm_post_field_{$key}_config", $post_field_config, $content ); - - if ( $post_id ) { - $old_value = apply_filters( 'wpm_filter_block_editor_post_data', $key, $post_id ); - } else { - $old_value = ''; - } - - if ( ! wpm_is_ml_value( $data[ $key ] ) ) { - $data[ $key ] = wpm_set_new_value( $old_value, $data[ $key ], $post_field_config ); - } - } - } - - if ( 'nav_menu_item' === $data['post_type'] ) { - $screen = get_current_screen(); - - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['action'] ) && 'update' === $_POST['action'] && ( $screen && 'nav-menus' === $screen->id ) ) { - // hack to get wp to create a post object when too many properties are empty - if ( '' === $data['post_title'] && '' === $data['post_content'] ) { - $data['post_content'] = ' '; - } - } - } - - if('wp_global_styles' === $data['post_type']){ - - $pcontent = $data['post_content']; - if(!empty($pcontent) && is_string($pcontent)){ - $pos = strpos($pcontent, '[:]'); - if($pos === false){ - $decode_pcontent = json_decode($pcontent); - if(is_object($decode_pcontent) && (isset($decode_pcontent->settings) || isset($decode_pcontent->styles) || isset($decode_pcontent->isGlobalStylesUserThemeJSON))){ - if(!empty($post_content)){ - $current_language = wpm_get_language(); - $data['post_content'] = '[:'.$current_language.']'.$post_content.'[:]'; - } - } - } - } - } - - if ( empty( $data['post_name'] ) ) { - $data['post_name'] = sanitize_title( wpm_translate_value( $data['post_title'] ) ); - } - - return $data; - } - - - /** - * Translate attachment link - * - * @param string $link - * - * @return string - */ - public function translate_attachment_link( $link ) { - $text = wp_strip_all_tags( $link ); - $translated_text = wpm_translate_string( $text ); - - return str_replace( $text, $translated_text, $link ); - } - - /** - * Translate block content - * - * @param string $context - * @param array $block - * - * @return string $context - * @since 2.4.4 - */ - public function wpm_render_post_block($context, $block) - { - if(isset($block['blockName'])){ - if ( $block['blockName'] === 'core/block' && ! empty( $block['attrs']['ref'] ) ) { - if(!empty($context) && is_string($context)){ - $context = wpm_translate_string($context); - } - } - } - return $context; - } - - /** - * Translate global style post content for full site editor - * @since 2.4.9 - * */ - public function wpm_rest_post_dispatch( $result, $server, $request ) { - if( ! empty( $result->data ) && is_array( $result->data ) ) { - - if( isset( $result->data['settings'] ) && $result->data['styles'] ) { - - if( ! empty( $result->data['id'] ) ) { - - $style_id = $result->data['id']; - - if( $style_id > 0 ) { - - $get_style = get_post( $style_id ); - - if( ! empty( $get_style ) && is_object( $get_style ) ) { - - if( ! empty( $get_style->post_content ) ) { - - if( $get_style->post_type == 'wp_global_styles' ) { - - $translate_object = wpm_translate_object( $get_style ); - $raw_config = json_decode( $translate_object->post_content, true ); - $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON']; - - if ( $is_global_styles_user_theme_json ) { - - $config = ( new \WP_Theme_JSON( $raw_config, 'custom' ) )->get_raw_data(); - if( ! empty( $config['settings'] ) ) { - - $result->data['settings'] = $config['settings']; - } - - if( ! empty( $config['styles'] ) ) { - - $result->data['styles'] = $config['styles']; - - } - - } - - } - - } - - } - - } - - } - - } - - } - - return $result; - } - - /** - * post_title & post_excerpt and not getting translated in gutenberg editor if more than two languages are added - * this filter helps to get raw data for post_title and post_excerpt keys to solve the gutenberg editor issue - * https://github.com/ahmedkaludi/wp-multilang/issues/78 - * @param $key String - * @param $post_id Integer - * @return $old_value String - * @since 2.4.13 - * */ - public function wpm_filter_block_editor_post_data_clbk( $key, $post_id ) { - - if ( ! function_exists( 'use_block_editor_for_post' ) ) { - require_once ABSPATH . 'wp-includes/post.php'; - } - - // Check if current post is being edited in gutenberg block editor - $is_block_editor = use_block_editor_for_post( $post_id ); - - $raw_keys = array( 'post_title', 'post_excerpt' ); - $old_value = get_post_field( $key, $post_id, 'edit' ); - - if ( $is_block_editor ) { - if ( in_array( $key, $raw_keys ) ) { - $old_value = get_post_field( $key, $post_id, 'raw' ); - } - } - - return $old_value; - } -} +object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); + add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); + add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); + add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); + add_action( 'wp', array( $this, 'translate_queried_object' ), 5 ); + add_filter( 'wp_insert_post_data', array( $this, 'save_post' ), 99, 2 ); + add_filter( 'wp_insert_attachment_data', array( $this, 'save_post' ), 99, 2 ); + add_filter( 'wp_get_attachment_link', array( $this, 'translate_attachment_link' ), 5 ); + add_filter( 'render_block', array( $this, 'wpm_render_post_block' ), 10, 2); + add_filter( 'rest_post_dispatch', array( $this, 'wpm_rest_post_dispatch' ), 10, 3); + add_filter( 'rest_post_dispatch', array( $this, 'translate_block_nav_url' ), 10, 3); + add_filter('block_parser_class', function () { + return 'WPM\\Includes\\WPM_WP_Block_Parser'; + }); + // Block editor filter for saving the post data + add_filter( 'wpm_filter_block_editor_post_data', array( $this, 'wpm_filter_block_editor_post_data_clbk' ), 10, 2 ); + + // Translate raw post content for divi builder + add_filter( 'et_fb_load_raw_post_content', [ $this, 'translate_divi_post_content' ], 10, 2 ); + } + + + /** + * Translate all posts + * + * @param $posts + * + * @return array + */ + public function translate_posts( $posts ) { + foreach ( $posts as &$post ) { + + if(!function_exists('wp_get_theme')){ + require_once ABSPATH . 'wp-includes/theme.php'; + } + + $active_theme = wp_get_theme(); + $active_theme_name = ''; + if ( ! empty( $active_theme ) && is_object( $active_theme ) ) { + $active_theme_name = $active_theme->get( 'Name' ); + } + + if ( $active_theme_name == 'Pinnacle' && isset( $post->post_type ) && $post->post_type == 'page' ) { + $post = $post; + }else{ + $post = wpm_translate_post( $post ); + } + + } + + return $posts; + } + + /** + * Separate posts py languages + * + * @param $query object WP_Query + * + * @return object WP_Query + */ + public function filter_posts_by_language( $query ) { + + if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { + return $query; + } + + if ( isset( $query->query_vars['post_type'] ) && ! empty( $query->query_vars['post_type'] ) ) { + $post_type = $query->query_vars['post_type']; + if ( is_string( $post_type ) && null === wpm_get_post_config( $post_type ) ) { + return $query; + } + } + + /** + * If language is not selected from language meta box for category then return as it is + * Solution to ticket no #149 + * @since 2.4.19 + * */ + if ( is_category() || is_archive() || ( function_exists( 'is_product_category' ) && is_product_category() ) ) { + + $queried_obj = get_queried_object(); + if ( is_object( $queried_obj ) && isset( $queried_obj->term_id ) ) { + $is_lang_exists = get_term_meta( $queried_obj->term_id, '_languages', true ); + if ( empty( $is_lang_exists ) ) { + return $query; + } + } + + } + + $lang = get_query_var( 'lang' ); + + if ( ! $lang ) { + $lang = wpm_get_user_language(); + } + + if ( 'all' !== $lang ) { + $lang_meta_query = array( + array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => serialize( $lang ), + 'compare' => 'LIKE', + ), + ), + ); + + if ( isset( $query->query_vars['meta_query'] ) ) { + $lang_meta_query = wp_parse_args( $query->query_vars['meta_query'], $lang_meta_query ); + } + + $query->set( 'meta_query', $lang_meta_query ); + } + + return $query; + } + + + /** + * Translate queried object in global $wp_query + */ + public function translate_queried_object() { + global $wp_query; + + if ( ( $post = $wp_query->queried_object ) && ( is_singular() || is_home() ) ) { + if ( null !== wpm_get_post_config( $post->post_type ) ) { + $wp_query->queried_object = wpm_translate_post( $post ); + } + } + } + + + /** + * Update post with translation + * + * @param $data + * @param $postarr + * + * @return mixed + */ + public function save_post( $data, $postarr ) { + + if ( 'auto-draft' === $data['post_status'] ) { + return $data; + } + + $post_config = wpm_get_post_config( $data['post_type'] ); + + if ( null === $post_config ) { + return $data; + } + + if ( 'attachment' !== $data['post_type'] ) { + + if ( 'trash' === $postarr['post_status'] ) { + return $data; + } + + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['action'] ) && 'untrash' === $_GET['action'] ) { + return $data; + } + } + + if ( ! empty( $data['post_type'] ) && $data['post_type'] === 'customize_changeset' ) { + return $data; + } + + $post_id = isset( $data['ID'] ) ? wpm_clean( $data['ID'] ) : ( isset( $postarr['ID'] ) ? wpm_clean( $postarr['ID'] ) : 0 ); + + $post_content = isset($data['post_content'])?$data['post_content']:''; + + foreach ( $data as $key => $content ) { + if ( isset( $post_config[ $key ] ) ) { + + $post_field_config = apply_filters( "wpm_post_{$data['post_type']}_field_{$key}_config", $post_config[ $key ], $content ); + $post_field_config = apply_filters( "wpm_post_field_{$key}_config", $post_field_config, $content ); + + if ( $post_id ) { + $old_value = apply_filters( 'wpm_filter_block_editor_post_data', $key, $post_id ); + } else { + $old_value = ''; + } + + if ( ! wpm_is_ml_value( $data[ $key ] ) ) { + $data[ $key ] = wpm_set_new_value( $old_value, $data[ $key ], $post_field_config ); + } else { + $data[ $key ] = wp_slash( wp_unslash( $data[ $key ] ) ); + } + } + } + + /* Only touch Divi's save-verification when this save is genuinely + * coming from the Divi Visual Builder's own AJAX save action, AND + * the content WPM wrapped is actual Divi builder markup. + * Fix for the ticket #268 + */ + $is_divi_fb_ajax_save = ( + defined( 'DOING_AJAX' ) && DOING_AJAX + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- read-only check, actual nonce verification already done by et_fb_ajax_save() itself. + && isset( $_POST['action'] ) && 'et_fb_ajax_save' === $_POST['action'] + && isset( $post_content ) && strpos( $post_content, '[et_pb_' ) !== false + ); + + if ( $is_divi_fb_ajax_save ) { + add_filter( 'et_fb_ajax_save_verification_result', '__return_true' ); + } + + if ( 'nav_menu_item' === $data['post_type'] ) { + $screen = get_current_screen(); + + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['action'] ) && 'update' === $_POST['action'] && ( $screen && 'nav-menus' === $screen->id ) ) { + // hack to get wp to create a post object when too many properties are empty + if ( '' === $data['post_title'] && '' === $data['post_content'] ) { + $data['post_content'] = ' '; + } + } + } + + if('wp_global_styles' === $data['post_type']){ + + $pcontent = $data['post_content']; + if(!empty($pcontent) && is_string($pcontent)){ + $pos = strpos($pcontent, '[:]'); + if($pos === false){ + $decode_pcontent = json_decode($pcontent); + if(is_object($decode_pcontent) && (isset($decode_pcontent->settings) || isset($decode_pcontent->styles) || isset($decode_pcontent->isGlobalStylesUserThemeJSON))){ + if(!empty($post_content)){ + $current_language = wpm_get_language(); + $data['post_content'] = '[:'.$current_language.']'.$post_content.'[:]'; + } + } + } + } + } + + if ( empty( $data['post_name'] ) ) { + $data['post_name'] = sanitize_title( wpm_translate_value( $data['post_title'] ) ); + } + + return $data; + } + + + /** + * Translate attachment link + * + * @param string $link + * + * @return string + */ + public function translate_attachment_link( $link ) { + $text = wp_strip_all_tags( $link ); + $translated_text = wpm_translate_string( $text ); + + return str_replace( $text, $translated_text, $link ); + } + + /** + * Translate block content + * + * @param string $context + * @param array $block + * + * @return string $context + * @since 2.4.4 + */ + public function wpm_render_post_block($context, $block) + { + if(isset($block['blockName'])){ + if ( $block['blockName'] === 'core/block' && ! empty( $block['attrs']['ref'] ) ) { + if(!empty($context) && is_string($context)){ + $context = wpm_translate_string($context); + } + } + } + return $context; + } + + /** + * Translate global style post content for full site editor + * @since 2.4.9 + * */ + public function wpm_rest_post_dispatch( $result, $server, $request ) { + if( ! empty( $result->data ) && is_array( $result->data ) ) { + + if( isset( $result->data['settings'] ) && $result->data['styles'] ) { + + if( ! empty( $result->data['id'] ) ) { + + $style_id = $result->data['id']; + + if( $style_id > 0 ) { + + $get_style = get_post( $style_id ); + + if( ! empty( $get_style ) && is_object( $get_style ) ) { + + if( ! empty( $get_style->post_content ) ) { + + if( $get_style->post_type == 'wp_global_styles' ) { + + $translate_object = wpm_translate_object( $get_style ); + $raw_config = json_decode( $translate_object->post_content, true ); + $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON']; + + if ( $is_global_styles_user_theme_json ) { + + $config = ( new \WP_Theme_JSON( $raw_config, 'custom' ) )->get_raw_data(); + if( ! empty( $config['settings'] ) ) { + + $result->data['settings'] = $config['settings']; + } + + if( ! empty( $config['styles'] ) ) { + + $result->data['styles'] = $config['styles']; + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return $result; + } + + /** + * post_title & post_excerpt and not getting translated in gutenberg editor if more than two languages are added + * this filter helps to get raw data for post_title and post_excerpt keys to solve the gutenberg editor issue + * https://github.com/ahmedkaludi/wp-multilang/issues/78 + * @param $key String + * @param $post_id Integer + * @return $old_value String + * @since 2.4.13 + * */ + public function wpm_filter_block_editor_post_data_clbk( $key, $post_id ) { + + if ( ! function_exists( 'use_block_editor_for_post' ) ) { + require_once ABSPATH . 'wp-includes/post.php'; + } + + // Check if current post is being edited in gutenberg block editor + $is_block_editor = use_block_editor_for_post( $post_id ); + + do_action( 'wpm_clear_blockeditor_post_data_cache', $post_id, $is_block_editor ); + + $raw_keys = array( 'post_title', 'post_excerpt' ); + $old_value = get_post_field( $key, $post_id, 'edit' ); + + if ( $is_block_editor ) { + if ( in_array( $key, $raw_keys ) ) { + $old_value = get_post_field( $key, $post_id, 'raw' ); + } + } + + return $old_value; + } + + /** + * Transate the block editor navigation block url for page + * @param $result WP_HTTP_Response + * @param $server WP_REST_Server + * @param $request WP_REST_Request + * @return $result WP_HTTP_Response + * @since 2.4.18 + * */ + public function translate_block_nav_url( $result, $server, $request ) { + + if ( is_object( $result ) && ! empty( $result->data ) && is_array( $result->data ) ) { + + foreach ( $result->data as $key => $value ) { + + if ( is_array( $value ) && ! empty( $value['subtype'] ) && ! empty( $value['url'] ) && $value['subtype'] == 'page' ) { + $result->data[$key]['url'] = wpm_translate_url( $value['url'] ); + } + + } + + } + return $result; + + } + + public function translate_divi_post_content( $post_content, $post_id ) { + + if ( ! empty( $post_content ) && is_string( $post_content ) ) { + $post_content = wpm_translate_string( $post_content ); + } + + return $post_content; + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-rest-settings.php b/plugins/wp-react-custom-multilang/includes/class-wpm-rest-settings.php index 71ecc5e52..eba71c743 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-rest-settings.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-rest-settings.php @@ -1,234 +1,241 @@ - __( 'Site Language', 'wp-multilang' ), - 'type' => 'string', - 'default' => false, - 'show_in_rest' => array( - 'name' => 'site_language', - ), - ) ); - - $language_options = apply_filters( 'wpm_rest_schema_languages', array( - 'enable' => array( - 'type' => 'boolean', - ), - 'code' => array( - 'type' => 'string', - ), - 'locale' => array( - 'type' => 'string', - ), - 'name' => array( - 'type' => 'string', - ), - 'translation' => array( - 'type' => 'string', - ), - 'date' => array( - 'type' => 'string', - ), - 'time' => array( - 'type' => 'string', - ), - 'flag' => array( - 'type' => 'string', - ), - )); - - register_setting( 'wpm-settings', 'wpm_languages', array( - 'description' => __( 'Multilingual Settings', 'wp-multilang' ), - 'default' => array(), - 'show_in_rest' => array( - 'name' => 'multilingual_settings', - 'schema' => array( - 'type' => 'array', - 'items' => array( - 'type' => 'object', - 'properties' => $language_options, - ), - ), - ), - ) ); - } - - /** - * Ges site languages - * - * @since 1.8.0 - * - * @param $value - * @param $name - * @param $args - * - * @return array - */ - public function get_languages_setting( $value, $name, $args ) { - - if ( 'multilingual_settings' !== $name ) { - return $value; - } - - $languages = get_option( $args['option_name'], $args['schema']['default'] ); - $format_languages = array(); - - foreach ( $languages as $locale => $language ) { - $language['locale'] = $locale; - $format_languages[] = $language; - } - - return $format_languages; - } - - /** - * Save WPM languages - * - * @param $updated - * @param $name - * @param $request - * - * @return bool - * - */ - public function update_languages_setting( $updated, $name, $request ) { - - if ( 'multilingual_settings' !== $name || ! current_user_can( 'manage_options' ) ) { - return $updated; - } - - $request = wpm_clean( $request ); - $languages = array(); - - if ( $request ) { - $error = false; - $translations = wpm_get_available_translations(); - $installed_languages = wpm_get_installed_languages(); - - foreach ( $installed_languages as $installed_language ) { - if ( isset( $translations[ $installed_language ] ) ) { - unset( $translations[ $installed_language ] ); - } - } - - foreach ( $request as $item ) { - - if ( empty( $item['code'] ) || empty( $item['locale'] ) ) { - $error = true; - break; - } - - $code = wpm_sanitize_lang_slug( $item['code'] ); - - if ( ! $code ) { - break; - } - - $languages[ $code ] = array( - 'enable' => $item['enable'] ? 1 : 0, - 'locale' => $item['locale'], - 'name' => $item['name'], - 'translation' => $item['translation'] ?: 'en_US', - 'date' => $item['date'], - 'time' => $item['time'], - 'flag' => $item['flag'], - ); - - if ( isset( $translations[ $item['translation'] ] ) && wp_can_install_language_pack() && ( ! is_multisite() || is_super_admin() ) ) { - wp_download_language_pack( $item['translation'] ); - } - } - - - if ( ! $error ) { - $languages = apply_filters( 'wpm_save_languages', $languages, $request ); - $locale = $languages[ wpm_get_default_language() ]['translation']; - update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); - update_option( 'wpm_languages', $languages ); - } - }// End if(). - - return true; - } - - - /** - * Save site language - * - * @since 2.0.0 - * - * @param $updated - * @param $name - * @param $request - * - * @return mixed - */ - public function update_site_language_setting( $updated, $name, $request ) { - - if ( 'site_language' !== $name || ! current_user_can( 'manage_options' ) ) { - return $updated; - } - - $request = wpm_clean( $request ); - $languages = wpm_get_languages(); - $locale = $languages[ $request ]['translation']; - - if ( $languages ) { - update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); - } - - return $updated; - } - - /** - * Translate gutenberg block post or page url of editor when post is created or updated - * @since 2.4.8 - * */ - public function update_post_or_page_url($response, $post, $request){ - if(is_object($response) && isset($response->data)){ - - $response_data = $response->data; - - if(is_array($response_data) && isset($response_data['type']) && ($response_data['type'] == 'post' || $response_data['type'] == 'page')){ - - if(isset($response_data['link'])){ - $response->data['link'] = wpm_translate_url($response_data['link']); - } - - } - - } - return $response; - } -} + __( 'Site Language', 'wp-multilang' ), + 'type' => 'string', + 'default' => false, + 'show_in_rest' => array( + 'name' => 'site_language', + ), + ) ); + + $language_options = apply_filters( 'wpm_rest_schema_languages', array( + 'enable' => array( + 'type' => 'boolean', + ), + 'code' => array( + 'type' => 'string', + ), + 'locale' => array( + 'type' => 'string', + ), + 'name' => array( + 'type' => 'string', + ), + 'translation' => array( + 'type' => 'string', + ), + 'date' => array( + 'type' => 'string', + ), + 'time' => array( + 'type' => 'string', + ), + 'flag' => array( + 'type' => 'string', + ), + )); + + register_setting( 'wpm-settings', 'wpm_languages', array( + 'description' => __( 'Multilingual Settings', 'wp-multilang' ), + 'default' => array(), + 'show_in_rest' => array( + 'name' => 'multilingual_settings', + 'schema' => array( + 'type' => 'array', + 'items' => array( + 'type' => 'object', + 'properties' => $language_options, + ), + ), + ), + ) ); + } + + /** + * Ges site languages + * + * @since 1.8.0 + * + * @param $value + * @param $name + * @param $args + * + * @return array + */ + public function get_languages_setting( $value, $name, $args ) { + + if ( 'multilingual_settings' !== $name ) { + return $value; + } + + $languages = get_option( $args['option_name'], $args['schema']['default'] ); + $format_languages = array(); + + foreach ( $languages as $locale => $language ) { + $language['locale'] = $locale; + $format_languages[] = $language; + } + + return $format_languages; + } + + /** + * Save WPM languages + * + * @param $updated + * @param $name + * @param $request + * + * @return bool + * + */ + public function update_languages_setting( $updated, $name, $request ) { + + if ( 'multilingual_settings' !== $name || ! current_user_can( 'manage_options' ) ) { + return $updated; + } + + $request = wpm_clean( $request ); + $languages = array(); + + if ( $request ) { + $error = false; + $translations = wpm_get_available_translations(); + $installed_languages = wpm_get_installed_languages(); + + foreach ( $installed_languages as $installed_language ) { + if ( isset( $translations[ $installed_language ] ) ) { + unset( $translations[ $installed_language ] ); + } + } + + foreach ( $request as $item ) { + + if ( empty( $item['code'] ) || empty( $item['locale'] ) ) { + $error = true; + break; + } + + $code = wpm_sanitize_lang_slug( $item['code'] ); + + if ( ! $code ) { + break; + } + + $languages[ $code ] = array( + 'enable' => $item['enable'] ? 1 : 0, + 'locale' => $item['locale'], + 'name' => $item['name'], + 'translation' => $item['translation'] ?: 'en_US', + 'date' => $item['date'], + 'time' => $item['time'], + 'flag' => $item['flag'], + ); + + if ( isset( $translations[ $item['translation'] ] ) && wp_can_install_language_pack() && ( ! is_multisite() || is_super_admin() ) ) { + wp_download_language_pack( $item['translation'] ); + } + } + + + if ( ! $error ) { + $languages = apply_filters( 'wpm_save_languages', $languages, $request ); + $locale = $languages[ wpm_get_default_language() ]['translation']; + update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); + update_option( 'wpm_languages', $languages ); + } + }// End if(). + + return true; + } + + + /** + * Save site language + * + * @since 2.0.0 + * + * @param $updated + * @param $name + * @param $request + * + * @return mixed + */ + public function update_site_language_setting( $updated, $name, $request ) { + + if ( 'site_language' !== $name || ! current_user_can( 'manage_options' ) ) { + return $updated; + } + + $request = wpm_clean( $request ); + $languages = wpm_get_languages(); + $locale = $languages[ $request ]['translation']; + + if ( $languages ) { + update_option( 'WPLANG', 'en_US' !== $locale ? $locale : '' ); + } + + return $updated; + } + + /** + * Translate gutenberg block post or page url of editor when post is created or updated + * @since 2.4.8 + * */ + public function update_post_or_page_url($response, $post, $request){ + if(is_object($response) && isset($response->data)){ + + $response_data = $response->data; + + if(is_array($response_data) && isset($response_data['type']) && ($response_data['type'] == 'post' || $response_data['type'] == 'page')){ + + if(isset($response_data['link'])){ + $response->data['link'] = wpm_translate_url($response_data['link']); + } + + // Get latest thumbnail ID directly from request param + $featured_media = $request->get_param( 'featured_media' ); + if ( ! empty( $featured_media ) && ! empty( $response_data['featured_media'] ) ) { + // Override response with the latest selected image + $response->data['featured_media'] = (int) $featured_media; + } + + } + + } + return $response; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-setup.php b/plugins/wp-react-custom-multilang/includes/class-wpm-setup.php index 6609e0761..15bd30b28 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-setup.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-setup.php @@ -1,877 +1,887 @@ -original_home_url ) { - $this->original_home_url = untrailingslashit( home_url() ); - } - - return $this->original_home_url; - } - - /** - * Get original request url - * - * @since 1.7.0 - * - * @return string - */ - private function get_original_request_uri() { - return $this->original_request_uri ?: '/'; - } - - /** - * Get site request url - * - * @since 2.0.1 - * - * @return string - */ - private function get_site_request_uri() { - if ( ! $this->site_request_uri ) { - $original_uri = $this->get_original_request_uri(); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['lang'] ) ) { - $site_request_uri = $original_uri; - if ( $url_lang = $this->get_lang_from_url() ) { - $site_request_uri = str_replace( '/' . $url_lang . '/', '/', $original_uri ); - } - } else { - $site_request_uri = str_replace( home_url(), '', $this->get_original_home_url() . $original_uri ); - } - - $this->site_request_uri = $site_request_uri ?: '/'; - } - - return $this->site_request_uri ; - } - - /** - * Get installed languages - * - * @return array - */ - public function get_installed_languages() { - if ( ! $this->installed_languages ) { - $this->installed_languages = wp_parse_args( get_available_languages(), array( 'en_US' ) ); - } - - return $this->installed_languages; - } - - /** - * Get enables languages. Add installed languages to options. - * - * @return array - */ - public function get_languages() { - if ( ! $this->languages ) { - $options = self::get_option( 'languages', array() ); - $languages = array(); - - if ( version_compare( self::get_option( 'version' ), - '2.0.0', - '<' ) ) { - return array(); - } - - foreach ( $options as $code => $language ) { - if ( $language['enable'] ) { - $languages[ $code ] = $language; - } - } - - $this->languages = $languages; - } - - return $this->languages; - } - - /** - * Get site locale from options - * - * @return string - */ - public function get_default_locale() { - if ( ! $this->default_locale ) { - $option_lang = get_option( 'WPLANG' ); - $this->default_locale = $option_lang ?: 'en_US'; - } - - return $this->default_locale; - } - - /** - * Get site language - * - * @since 2.0.0 - * - * @return string - */ - public function get_default_language() { - if ( ! $this->default_language ) { - $default_language = self::get_option( 'site_language', false ); - - if ( ! $default_language ) { - $locale = explode( '_', $this->get_default_locale() ); - $default_language = $locale[0]; - } - - $this->default_language = $default_language; - } - - return $this->default_language; - } - - /** - * Set site locale - * - * @since 2.0.0 - * - * @param $locale - * - * @return mixed - */ - public function set_locale( $locale ) { - - $languages = $this->get_languages(); - - if ( ! $languages ) { - return $locale; - } - - if ( isset( $languages[ $this->get_user_language() ] ) ) { - return $languages[ $this->get_user_language() ]['translation']; - } - - return $this->get_default_locale(); - } - - /** - * Get user language - * - * @return string - */ - public function get_user_language() { - if ( ! $this->user_language ) { - $this->user_language = $this->set_user_language(); - } - - return $this->user_language; - } - - /** - * Set user language for frontend from url or browser - * Set admin language from cookie or url - */ - private function set_user_language() { - - if ( defined( 'WP_CLI' ) ) { - return $this->get_default_language(); - } - - $languages = $this->get_languages(); - $url = ''; - $user_language = ''; - - require_once ABSPATH . WPINC . '/pluggable.php'; - - if ( ! is_admin() ) { - $url = wpm_get_current_url(); - } - - if ( is_front_ajax() ) { - $url = wp_get_raw_referer(); - add_filter( 'get_user_metadata', array( $this, 'set_user_locale' ), 10, 4 ); - } - - if ( $url ) { - $this->original_request_uri = str_replace( set_url_scheme( $this->get_original_home_url() ), '', $url ); - - if ( $url_lang = $this->get_lang_from_url() ) { - $user_language = $url_lang; - } - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_REQUEST['lang'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- this is a dependent function and its all security measurament is done wherever it has been used. - $lang = wpm_clean( $_REQUEST['lang'] ); - if ( isset( $languages[ $lang ] ) ) { - $user_language = $lang; - - if ( is_admin() && ! is_front_ajax() ) { - nocache_headers(); - update_user_meta( get_current_user_id(), 'user_lang', $lang ); - update_user_meta( get_current_user_id(), 'locale', $languages[ $lang ]['translation'] ); - } - } else { - if ( ! is_admin() ) { - add_action( 'template_redirect', array( $this, 'set_not_found' ) ); - } - } - } else { - if ( is_admin() && ! is_front_ajax() ) { - if ( $user_meta_language = get_user_meta( get_current_user_id(), 'user_lang', true ) ) { - if ( isset( $languages[ $user_meta_language ] ) ) { - $user_language = $user_meta_language; - } - } else { - update_user_meta( get_current_user_id(), 'user_lang', $this->get_default_language() ); - update_user_meta( get_current_user_id(), 'locale', $this->get_default_locale() ); - } - } elseif ( ! is_admin() && preg_match( '/^.*\.php$/i', wp_parse_url( $url, PHP_URL_PATH ) ) ) { - if ( isset( $_COOKIE['language'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $user_language = wpm_clean( $_COOKIE['language'] ); - } - } - } - - if ( ! $user_language || ! isset( $languages[ $user_language ] ) ) { - $user_language = $this->get_default_language(); - } - - return $user_language; - } - - /** - * Redirect to default language - */ - public function redirect_default_url() { - $user_language = $this->get_user_language(); - $default_language = $this->get_default_language(); - $url_lang = $this->get_lang_from_url(); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( ! isset( $_GET['lang'] ) ) { - if ( self::get_option( 'use_prefix', 'no' ) === 'yes' ) { - if ( ! $url_lang ) { - wp_safe_redirect( home_url( $this->get_original_request_uri() ) ); - exit; - } - } else { - if ( $url_lang && $user_language === $default_language ) { - wp_safe_redirect( home_url( preg_replace( '!^/' . $url_lang . '(/|$)!i', '/', $this->get_original_request_uri() ) ) ); - exit; - } - } - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['lang'] ) && ! empty( $_GET['lang'] ) && $url_lang ) { - wp_safe_redirect( $this->get_original_home_url() . $this->get_site_request_uri() ); - exit; - } - } - - /** - * Fix redirect when using lang param in $_GET - * - * @since 2.1.5 - * - * @param string $redirect_url - * - * @return string - */ - public function fix_canonical_redirect( $redirect_url ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['lang'] ) && ! empty( $_GET['lang'] ) ) { - $redirect_url = str_replace( home_url(), $this->get_original_home_url(), $redirect_url ); - } - - return $redirect_url; - } - - /** - * Get available translations - * - * @return array - */ - public function get_translations() { - if ( ! $this->translations ) { - require_once ABSPATH . 'wp-admin/includes/translation-install.php'; - $available_translations = wp_get_available_translations(); - $available_translations['en_US'] = array( - 'native_name' => 'English (US)', - 'iso' => array( 'en' ), - ); - - $this->translations = $available_translations; - } - - return $this->translations; - } - - /** - * Get config from options - * - * @return array - */ - public function get_config() { - - if ( ! $this->config ) { - if ( ! $config = wp_cache_get( 'config', 'wpm' ) ) { - WPM_Config::load_config_run(); - $config = WPM_Config::$config; - } - - $this->config = $config; - } - - $config = apply_filters( 'wpm_load_config', $this->config ); - $config['options'] = apply_filters( 'wpm_options_config', $config['options'] ); - - if ( is_multisite() ) { - $config['site_options'] = apply_filters( 'wpm_site_options_config', $config['site_options'] ); - } else { - unset( $config['site_options'] ); - } - - return $config; - } - - /** - * Add lang slug to home url - * - * @param $value - * - * @return string - */ - public function set_home_url( $value ) { - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( ! $value || ! $this->user_language || ! did_action( 'wpm_init' ) || ( ! empty( $_GET['lang'] ) && ! did_action( 'parse_request' ) ) || ( is_admin() && ! is_front_ajax() ) ) { - return $value; - } - - $user_language = wpm_get_user_language(); - $default_language = wpm_get_default_language(); - - if ( ( ( $user_language !== $default_language ) || ( self::get_option( 'use_prefix', 'no' ) === 'yes' ) ) && get_option( 'permalink_structure' ) ) { - $value .= '/' . $user_language; - } - - return $value; - } - - /** - * Load integration classes - */ - public function load_integrations() { - - do_action( 'wpm_integrations_init' ); - - $integrations = apply_filters( 'wpm_integrations', array( - 'advanced-custom-fields' => __NAMESPACE__ . '\Integrations\WPM_Acf', - 'advanced-custom-fields-pro' => __NAMESPACE__ . '\Integrations\WPM_Acf', - 'all-in-one-seo-pack' => __NAMESPACE__ . '\Integrations\WPM_AIOSP', - 'better-search' => __NAMESPACE__ . '\Integrations\WPM_Better_Search', - 'buddypress' => __NAMESPACE__ . '\Integrations\WPM_BuddyPress', - 'contact-form-7' => __NAMESPACE__ . '\Integrations\WPM_CF7', - 'js_composer' => __NAMESPACE__ . '\Integrations\WPM_VC', - 'mailchimp-for-wp' => __NAMESPACE__ . '\Integrations\WPM_MailChimp_For_WP', - 'masterslider' => __NAMESPACE__ . '\Integrations\WPM_Masterslider', - 'megamenu' => __NAMESPACE__ . '\Integrations\WPM_Megamenu', - 'newsletter' => __NAMESPACE__ . '\Integrations\WPM_Newsletter', - 'nextgen-gallery' => __NAMESPACE__ . '\Integrations\WPM_NGG', - 'siteorigin-panels' => __NAMESPACE__ . '\Integrations\WPM_PBSO', - 'tablepress' => __NAMESPACE__ . '\Integrations\WPM_Tablepress', - 'woocommerce' => __NAMESPACE__ . '\Integrations\WPM_WooCommerce', - 'wordpress-seo' => __NAMESPACE__ . '\Integrations\WPM_Yoast_Seo', - 'seo-by-rank-math' => __NAMESPACE__ . '\Integrations\WPM_Rank_Math', - 'bylaw-plus' => __NAMESPACE__ . '\Integrations\WPM_Bylaw_Plus', - 'smart-custom-fields' => __NAMESPACE__ . '\Integrations\WPM_SCF', - 'schema-and-structured-data-for-wp' => __NAMESPACE__ . '\Integrations\WPM_Schema_Saswp', - 'tlp-team' => __NAMESPACE__ . '\Integrations\WPM_Team', - 'forminator' => __NAMESPACE__ . '\Integrations\WPM_Forminator', - ) ); - - $active_plugins = wp_cache_get( 'active_plugins', 'wpm' ); - - if ( is_array( $active_plugins ) ) { - foreach ( $active_plugins as $plugin ) { - if ( ! empty( $integrations[ $plugin ] ) ) { - $integration = apply_filters( "wpm_{$plugin}_integration", $integrations[ $plugin ] ); - new $integration(); - } - } - } - - /** - * Create new object of active theme - * @since 2.4.10 - * */ - if(!function_exists('wp_get_theme')){ - require_once ABSPATH . 'wp-includes/theme.php'; - } - - $active_theme = wp_get_theme(); - $active_theme_name = ''; - if(!empty($active_theme) && is_object($active_theme)){ - $active_theme_name = $active_theme->get('Name'); - } - - if ( is_array( $integrations ) && array_key_exists($active_theme_name, $integrations)) { - $integration = apply_filters( "wpm_{$active_theme_name}_integration", $integrations[ $active_theme_name ] ); - if(class_exists($integration)){ - new $integration(); - } - } - } - - /** - * Set 404 headers for not available language - */ - public function set_not_found() { - global $wp_query; - $wp_query->set_404(); - status_header( 404 ); - nocache_headers(); - } - - /** - * Add 'lang' param to allow params - * - * @param $public_query_vars - * - * @return array - */ - public function set_lang_var( $public_query_vars ) { - $public_query_vars[] = 'lang'; - - return $public_query_vars; - } - - /** - * Add query var 'lang' in global request - * - * @param $request - * - * @return object WP - */ - public function setup_query_var( $request ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['lang'] ) || ( isset( $request->query_vars['paged'] ) && count( $request->query_vars ) === 1 ) || ( '/' === wp_parse_url( $this->get_site_request_uri(), PHP_URL_PATH ) ) ) { - return $request; - } - - $request->query_vars['lang'] = $this->get_user_language(); - - return $request; - } - - /** - * Fix home page if isset 'lang' GET parameter - * - * @param $query_vars - * - * @return array - */ - public function set_home_page( $query_vars ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['lang'] ) && ( ( '/' === wp_parse_url( $this->get_site_request_uri(), PHP_URL_PATH ) ) || ( count( $query_vars ) === 2 && isset( $query_vars['paged'] ) ) ) ) { - unset( $query_vars['lang'] ); - } - - return $query_vars; - } - - /** - * Redirect to browser language - */ - public function redirect_to_user_language() { - - if ( ! defined( 'WP_CLI' ) && ! is_admin() ) { - $user_language = $this->get_user_language(); - - if ( ! isset( $_COOKIE['language'] ) ) { - - wpm_setcookie( 'language', $user_language, time() + YEAR_IN_SECONDS ); - - if ( self::get_option( 'use_redirect', 'no' ) === 'yes' ) { - - $browser_language = $this->get_browser_language(); - - if ( $browser_language && ( $browser_language !== $user_language ) ) { - wp_safe_redirect( wpm_translate_current_url( $browser_language ) ); - exit; - } - } - } else { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( wpm_clean( $_COOKIE['language'] ) !== $user_language ) { - wpm_setcookie( 'language', $user_language, time() + YEAR_IN_SECONDS ); - do_action( 'wpm_changed_language' ); - } - } // End if(). - } // End if(). - } - - /** - * Detect browser language - * - * @return string - */ - private function get_browser_language() { - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( ! isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) || ! $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) { - return ''; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if ( ! preg_match_all( '#([^;,]+)(;[^,0-9]*([0-9\.]+)[^,]*)?#i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches, PREG_SET_ORDER ) ) { - return ''; - } - - $detect = ''; - $prefered_languages = array(); - $priority = 1.0; - - foreach ( $matches as $match ) { - if ( ! isset( $match[3] ) ) { - $pr = $priority; - $priority -= 0.001; - } else { - $pr = (float)$match[3]; - } - $prefered_languages[ str_replace( '-', '_', $match[1] ) ] = $pr; - } - - arsort( $prefered_languages, SORT_NUMERIC ); - - $browser_languages = array_keys( $prefered_languages ); - $languages = $this->get_languages(); - - foreach ( $browser_languages as $browser_language ) { - foreach ( $languages as $key => $value ) { - if ( ! $locale = $value['locale'] ) { - $locale = $value['translation']; - } - - $locale = str_replace( '-', '_', $locale ); - - if ( $browser_language === $locale || wpm_sanitize_lang_slug( $browser_language ) === $key ) { - $detect = $key; - break 2; - } - } - } - - return $detect; - } - - /** - * Set user locale for AJAX front requests - * - * @param $check - * @param $object_id - * @param $meta_key - * @param $single - * - * @return array|string - */ - public function set_user_locale( $check, $object_id, $meta_key, $single ) { - if ( 'locale' === $meta_key ) { - if ( $single ) { - $check = get_locale(); - } else { - $check = array( get_locale() ); - } - } - - return $check; - } - - /** - * Fix REST url - * - * @param $url - * - * @return string - */ - public function fix_rest_url( $url ) { - if ( ! self::get_option( 'use_prefix', 'no' ) === 'yes' && wpm_get_language() != wpm_get_default_language() ) { - $url = str_replace( '/' . wpm_get_language() . '/', '/', $url ); - } - - return $url; - } - - /** - * Set date format for current language - * - * @since 1.8.0 - * - * @param $value - * - * @return string - */ - public function set_date_format( $value ) { - - require_once ABSPATH . 'wp-admin/includes/screen.php'; - - if ( is_admin() && ! is_front_ajax() ) { - $screen = get_current_screen(); - if ( $screen && 'options-general' === $screen->id ) { - return $value; - } - } - - if ( defined( 'REST_REQUEST' ) && ( '/wp/v2/settings' === $GLOBALS['wp']->query_vars['rest_route'] ) ) { - return $value; - } - - $languages = $this->get_languages(); - $user_language = $this->get_user_language(); - - if ( ! empty( $languages[ $user_language ]['date'] ) ) { - return $languages[ $user_language ]['date']; - } - - return $value; - } - - /** - * Set time format for current language - * - * @since 1.8.0 - * - * @param $value - * - * @return string - */ - public function set_time_format( $value ) { - - require_once ABSPATH . 'wp-admin/includes/screen.php'; - - if ( is_admin() && ! is_front_ajax() ) { - $screen = get_current_screen(); - if ( $screen && 'options-general' === $screen->id ) { - return $value; - } - } - - if ( defined( 'REST_REQUEST' ) && ( '/wp/v2/settings' === $GLOBALS['wp']->query_vars['rest_route'] ) ) { - return $value; - } - - $languages = $this->get_languages(); - $user_language = $this->get_user_language(); - - if ( ! empty( $languages[ $user_language ]['time'] ) ) { - return $languages[ $user_language ]['time']; - } - - return $value; - } - - /** - * Set locale for html - * - * @since 2.0.0 - * - * @param $translation - * @param $text - * - * @return mixed - */ - public function set_html_locale( $translation, $text ) { - - if ( 'html_lang_attribute' === $text ) { - $languages = $this->get_languages(); - $user_language = $this->get_user_language(); - - if ( $languages && isset( $languages[ $user_language ] ) && $languages[ $user_language ]['locale'] ) { - $translation = $languages[ $user_language ]['locale']; - } else { - $translation = get_locale(); - } - } - - return $translation; - } - - /** - * Get lang from url - * - * @since 2.0.3 - * - * @return string - */ - private function get_lang_from_url() { - if ( ! $this->url_language ) { - $url_lang = ''; - $parts = explode( '/', ltrim( trailingslashit( $this->get_original_request_uri() ), '/' ) ); - $lang = $parts[0]; - - if ( isset( $this->languages[ $lang ] ) ) { - $url_lang = $lang; - } - - $this->url_language = $url_lang; - } - - return $this->url_language; - } -} +original_home_url ) { + $this->original_home_url = untrailingslashit( home_url() ); + } + + return $this->original_home_url; + } + + /** + * Get original request url + * + * @since 1.7.0 + * + * @return string + */ + private function get_original_request_uri() { + return $this->original_request_uri ?: '/'; + } + + /** + * Get site request url + * + * @since 2.0.1 + * + * @return string + */ + private function get_site_request_uri() { + if ( ! $this->site_request_uri ) { + $original_uri = $this->get_original_request_uri(); + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['lang'] ) ) { + $site_request_uri = $original_uri; + if ( $url_lang = $this->get_lang_from_url() ) { + $site_request_uri = str_replace( '/' . $url_lang . '/', '/', $original_uri ); + } + } else { + $site_request_uri = str_replace( home_url(), '', $this->get_original_home_url() . $original_uri ); + } + + $this->site_request_uri = $site_request_uri ?: '/'; + } + + return $this->site_request_uri ; + } + + /** + * Get installed languages + * + * @return array + */ + public function get_installed_languages() { + if ( ! $this->installed_languages ) { + $this->installed_languages = wp_parse_args( get_available_languages(), array( 'en_US' ) ); + } + + return $this->installed_languages; + } + + /** + * Get enables languages. Add installed languages to options. + * + * @return array + */ + public function get_languages() { + if ( ! $this->languages ) { + $options = self::get_option( 'languages', array() ); + $languages = array(); + + if ( version_compare( self::get_option( 'version' ), + '2.0.0', + '<' ) ) { + return array(); + } + + foreach ( $options as $code => $language ) { + if ( $language['enable'] ) { + $languages[ $code ] = $language; + } + } + + $this->languages = $languages; + } + + return $this->languages; + } + + /** + * Get site locale from options + * + * @return string + */ + public function get_default_locale() { + if ( ! $this->default_locale ) { + $option_lang = get_option( 'WPLANG' ); + $this->default_locale = $option_lang ?: 'en_US'; + } + + return $this->default_locale; + } + + /** + * Get site language + * + * @since 2.0.0 + * + * @return string + */ + public function get_default_language() { + if ( ! $this->default_language ) { + $default_language = self::get_option( 'site_language', false ); + + if ( ! $default_language ) { + $locale = explode( '_', $this->get_default_locale() ); + $default_language = $locale[0]; + } + + $this->default_language = $default_language; + } + + return $this->default_language; + } + + /** + * Set site locale + * + * @since 2.0.0 + * + * @param $locale + * + * @return mixed + */ + public function set_locale( $locale ) { + + $languages = $this->get_languages(); + + if ( ! $languages ) { + return $locale; + } + + if ( isset( $languages[ $this->get_user_language() ] ) ) { + return $languages[ $this->get_user_language() ]['translation']; + } + + return $this->get_default_locale(); + } + + /** + * Get user language + * + * @return string + */ + public function get_user_language() { + if ( ! $this->user_language ) { + $this->user_language = $this->set_user_language(); + } + + return $this->user_language; + } + + /** + * Set user language for frontend from url or browser + * Set admin language from cookie or url + */ + private function set_user_language() { + + if ( defined( 'WP_CLI' ) ) { + return $this->get_default_language(); + } + + $languages = $this->get_languages(); + $url = ''; + $user_language = ''; + + require_once ABSPATH . WPINC . '/pluggable.php'; + + if ( ! is_admin() ) { + $url = wpm_get_current_url(); + } + + if ( is_front_ajax() ) { + $url = wp_get_raw_referer(); + add_filter( 'get_user_metadata', array( $this, 'set_user_locale' ), 10, 4 ); + } + + if ( $url ) { + $this->original_request_uri = str_replace( set_url_scheme( $this->get_original_home_url() ), '', $url ); + + if ( $url_lang = $this->get_lang_from_url() ) { + $user_language = $url_lang; + } + } + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_REQUEST['lang'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- this is a dependent function and its all security measurament is done wherever it has been used. + $lang = wpm_clean( $_REQUEST['lang'] ); + if ( isset( $languages[ $lang ] ) ) { + $user_language = $lang; + + if ( is_admin() && ! is_front_ajax() ) { + nocache_headers(); + update_user_meta( get_current_user_id(), 'user_lang', $lang ); + update_user_meta( get_current_user_id(), 'locale', $languages[ $lang ]['translation'] ); + } + } else { + if ( ! is_admin() ) { + add_action( 'template_redirect', array( $this, 'set_not_found' ) ); + } + } + } else { + if ( is_admin() && ! is_front_ajax() ) { + if ( $user_meta_language = get_user_meta( get_current_user_id(), 'user_lang', true ) ) { + if ( isset( $languages[ $user_meta_language ] ) ) { + $user_language = $user_meta_language; + } + } else { + update_user_meta( get_current_user_id(), 'user_lang', $this->get_default_language() ); + update_user_meta( get_current_user_id(), 'locale', $this->get_default_locale() ); + } + } elseif ( ! is_admin() && preg_match( '/^.*\.php$/i', wp_parse_url( $url, PHP_URL_PATH ) ) ) { + if ( isset( $_COOKIE['language'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $user_language = wpm_clean( $_COOKIE['language'] ); + } + } + } + + if ( ! $user_language || ! isset( $languages[ $user_language ] ) ) { + $user_language = $this->get_default_language(); + } + + return $user_language; + } + + /** + * Redirect to default language + */ + public function redirect_default_url() { + $user_language = $this->get_user_language(); + $default_language = $this->get_default_language(); + $url_lang = $this->get_lang_from_url(); + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( ! isset( $_GET['lang'] ) ) { + if ( self::get_option( 'use_prefix', 'no' ) === 'yes' ) { + if ( ! $url_lang ) { + wp_safe_redirect( home_url( $this->get_original_request_uri() ) ); + exit; + } + } else { + if ( $url_lang && $user_language === $default_language ) { + wp_safe_redirect( home_url( preg_replace( '!^/' . $url_lang . '(/|$)!i', '/', $this->get_original_request_uri() ) ) ); + exit; + } + } + } + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['lang'] ) && ! empty( $_GET['lang'] ) && $url_lang ) { + wp_safe_redirect( $this->get_original_home_url() . $this->get_site_request_uri() ); + exit; + } + } + + /** + * Fix redirect when using lang param in $_GET + * + * @since 2.1.5 + * + * @param string $redirect_url + * + * @return string + */ + public function fix_canonical_redirect( $redirect_url ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['lang'] ) && ! empty( $_GET['lang'] ) ) { + $redirect_url = str_replace( home_url(), $this->get_original_home_url(), $redirect_url ); + } + + return $redirect_url; + } + + /** + * Get available translations + * + * @return array + */ + public function get_translations() { + if ( ! $this->translations ) { + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + $available_translations = wp_get_available_translations(); + $available_translations['en_US'] = array( + 'native_name' => 'English (US)', + 'iso' => array( 'en' ), + ); + + $this->translations = $available_translations; + } + + return $this->translations; + } + + /** + * Get config from options + * + * @return array + */ + public function get_config() { + + if ( ! $this->config ) { + if ( ! $config = wp_cache_get( 'config', 'wpm' ) ) { + WPM_Config::load_config_run(); + $config = WPM_Config::$config; + } + + $this->config = $config; + } + + $config = apply_filters( 'wpm_load_config', $this->config ); + $config['options'] = apply_filters( 'wpm_options_config', $config['options'] ); + + if ( is_multisite() ) { + $config['site_options'] = apply_filters( 'wpm_site_options_config', $config['site_options'] ); + } else { + unset( $config['site_options'] ); + } + + return $config; + } + + /** + * Add lang slug to home url + * + * @param $value + * + * @return string + */ + public function set_home_url( $value ) { + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( ! $value || ! $this->user_language || ! did_action( 'wpm_init' ) || ( ! empty( $_GET['lang'] ) && ! did_action( 'parse_request' ) ) || ( is_admin() && ! is_front_ajax() ) ) { + return $value; + } + + $user_language = wpm_get_user_language(); + $default_language = wpm_get_default_language(); + + if ( ( ( $user_language !== $default_language ) || ( self::get_option( 'use_prefix', 'no' ) === 'yes' ) ) && get_option( 'permalink_structure' ) ) { + $value .= '/' . $user_language; + } + + return $value; + } + + /** + * Load integration classes + */ + public function load_integrations() { + + do_action( 'wpm_integrations_init' ); + + $integrations = apply_filters( 'wpm_integrations', array( + 'advanced-custom-fields' => __NAMESPACE__ . '\Integrations\WPM_Acf', + 'advanced-custom-fields-pro' => __NAMESPACE__ . '\Integrations\WPM_Acf', + 'secure-custom-fields' => __NAMESPACE__ . '\Integrations\WPM_Acf', + 'all-in-one-seo-pack' => __NAMESPACE__ . '\Integrations\WPM_AIOSP', + 'better-search' => __NAMESPACE__ . '\Integrations\WPM_Better_Search', + 'buddypress' => __NAMESPACE__ . '\Integrations\WPM_BuddyPress', + 'contact-form-7' => __NAMESPACE__ . '\Integrations\WPM_CF7', + 'js_composer' => __NAMESPACE__ . '\Integrations\WPM_VC', + 'mailchimp-for-wp' => __NAMESPACE__ . '\Integrations\WPM_MailChimp_For_WP', + 'masterslider' => __NAMESPACE__ . '\Integrations\WPM_Masterslider', + 'megamenu' => __NAMESPACE__ . '\Integrations\WPM_Megamenu', + 'newsletter' => __NAMESPACE__ . '\Integrations\WPM_Newsletter', + 'nextgen-gallery' => __NAMESPACE__ . '\Integrations\WPM_NGG', + 'siteorigin-panels' => __NAMESPACE__ . '\Integrations\WPM_PBSO', + 'tablepress' => __NAMESPACE__ . '\Integrations\WPM_Tablepress', + 'woocommerce' => __NAMESPACE__ . '\Integrations\WPM_WooCommerce', + 'wordpress-seo' => __NAMESPACE__ . '\Integrations\WPM_Yoast_Seo', + 'seo-by-rank-math' => __NAMESPACE__ . '\Integrations\WPM_Rank_Math', + 'bylaw-plus' => __NAMESPACE__ . '\Integrations\WPM_Bylaw_Plus', + 'smart-custom-fields' => __NAMESPACE__ . '\Integrations\WPM_SCF', + 'schema-and-structured-data-for-wp' => __NAMESPACE__ . '\Integrations\WPM_Schema_Saswp', + 'tlp-team' => __NAMESPACE__ . '\Integrations\WPM_Team', + 'forminator' => __NAMESPACE__ . '\Integrations\WPM_Forminator', + 'fluentform' => __NAMESPACE__ . '\Integrations\WPM_Fluentform', + 'gravityforms' => __NAMESPACE__ . '\Integrations\WPM_Gravityforms', + 'ultimate-member' => __NAMESPACE__ . '\Integrations\WPM_Ultimate_Member', + 'advanced-ads' => __NAMESPACE__ . '\Integrations\WPM_Advanced_Ads', + 'strong-testimonials' => __NAMESPACE__ . '\Integrations\WPM_Strong_Testimonials', + 'internal-links' => __NAMESPACE__ . '\Integrations\WPM_Internal_Links', + 'daext-autolinks-manager' => __NAMESPACE__ . '\Integrations\WPM_Daext_Autolinks_Manager', + 'frontend-post-submission-manager-lite' => __NAMESPACE__ . '\Integrations\WPM_Fpsml', + 'UX4G Government Block Theme' => __NAMESPACE__ . '\Integrations\WPM_UX4G_Theme', + ) ); + + $active_plugins = wp_cache_get( 'active_plugins', 'wpm' ); + + if ( is_array( $active_plugins ) ) { + foreach ( $active_plugins as $plugin ) { + if ( ! empty( $integrations[ $plugin ] ) ) { + $integration = apply_filters( "wpm_{$plugin}_integration", $integrations[ $plugin ] ); + new $integration(); + } + } + } + + /** + * Create new object of active theme + * @since 2.4.10 + * */ + if(!function_exists('wp_get_theme')){ + require_once ABSPATH . 'wp-includes/theme.php'; + } + + $active_theme = wp_get_theme(); + $active_theme_name = ''; + if(!empty($active_theme) && is_object($active_theme)){ + $active_theme_name = $active_theme->get('Name'); + } + + if ( is_array( $integrations ) && array_key_exists($active_theme_name, $integrations)) { + $integration = apply_filters( "wpm_{$active_theme_name}_integration", $integrations[ $active_theme_name ] ); + if(class_exists($integration)){ + new $integration(); + } + } + } + + /** + * Set 404 headers for not available language + */ + public function set_not_found() { + global $wp_query; + $wp_query->set_404(); + status_header( 404 ); + nocache_headers(); + } + + /** + * Add 'lang' param to allow params + * + * @param $public_query_vars + * + * @return array + */ + public function set_lang_var( $public_query_vars ) { + $public_query_vars[] = 'lang'; + + return $public_query_vars; + } + + /** + * Add query var 'lang' in global request + * + * @param $request + * + * @return object WP + */ + public function setup_query_var( $request ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['lang'] ) || ( isset( $request->query_vars['paged'] ) && count( $request->query_vars ) === 1 ) || ( '/' === wp_parse_url( $this->get_site_request_uri(), PHP_URL_PATH ) ) ) { + return $request; + } + + $request->query_vars['lang'] = $this->get_user_language(); + + return $request; + } + + /** + * Fix home page if isset 'lang' GET parameter + * + * @param $query_vars + * + * @return array + */ + public function set_home_page( $query_vars ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['lang'] ) && ( ( '/' === wp_parse_url( $this->get_site_request_uri(), PHP_URL_PATH ) ) || ( count( $query_vars ) === 2 && isset( $query_vars['paged'] ) ) ) ) { + unset( $query_vars['lang'] ); + } + + return $query_vars; + } + + /** + * Redirect to browser language + */ + public function redirect_to_user_language() { + + if ( ! defined( 'WP_CLI' ) && ! is_admin() ) { + $user_language = $this->get_user_language(); + + if ( ! isset( $_COOKIE['language'] ) ) { + + wpm_setcookie( 'language', $user_language, time() + YEAR_IN_SECONDS ); + + if ( self::get_option( 'use_redirect', 'no' ) === 'yes' ) { + + $browser_language = $this->get_browser_language(); + + if ( $browser_language && ( $browser_language !== $user_language ) ) { + wp_safe_redirect( wpm_translate_current_url( $browser_language ) ); + exit; + } + } + } else { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( wpm_clean( $_COOKIE['language'] ) !== $user_language ) { + wpm_setcookie( 'language', $user_language, time() + YEAR_IN_SECONDS ); + do_action( 'wpm_changed_language' ); + } + } // End if(). + } // End if(). + } + + /** + * Detect browser language + * + * @return string + */ + private function get_browser_language() { + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( ! isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) || ! $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) { + return ''; + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if ( ! preg_match_all( '#([^;,]+)(;[^,0-9]*([0-9\.]+)[^,]*)?#i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches, PREG_SET_ORDER ) ) { + return ''; + } + + $detect = ''; + $prefered_languages = array(); + $priority = 1.0; + + foreach ( $matches as $match ) { + if ( ! isset( $match[3] ) ) { + $pr = $priority; + $priority -= 0.001; + } else { + $pr = (float)$match[3]; + } + $prefered_languages[ str_replace( '-', '_', $match[1] ) ] = $pr; + } + + arsort( $prefered_languages, SORT_NUMERIC ); + + $browser_languages = array_keys( $prefered_languages ); + $languages = $this->get_languages(); + + foreach ( $browser_languages as $browser_language ) { + foreach ( $languages as $key => $value ) { + if ( ! $locale = $value['locale'] ) { + $locale = $value['translation']; + } + + $locale = str_replace( '-', '_', $locale ); + + if ( $browser_language === $locale || wpm_sanitize_lang_slug( $browser_language ) === $key ) { + $detect = $key; + break 2; + } + } + } + + return $detect; + } + + /** + * Set user locale for AJAX front requests + * + * @param $check + * @param $object_id + * @param $meta_key + * @param $single + * + * @return array|string + */ + public function set_user_locale( $check, $object_id, $meta_key, $single ) { + if ( 'locale' === $meta_key ) { + if ( $single ) { + $check = get_locale(); + } else { + $check = array( get_locale() ); + } + } + + return $check; + } + + /** + * Fix REST url + * + * @param $url + * + * @return string + */ + public function fix_rest_url( $url ) { + if ( ! self::get_option( 'use_prefix', 'no' ) === 'yes' && wpm_get_language() != wpm_get_default_language() ) { + $url = str_replace( '/' . wpm_get_language() . '/', '/', $url ); + } + + return $url; + } + + /** + * Set date format for current language + * + * @since 1.8.0 + * + * @param $value + * + * @return string + */ + public function set_date_format( $value ) { + + require_once ABSPATH . 'wp-admin/includes/screen.php'; + + if ( is_admin() && ! is_front_ajax() ) { + $screen = get_current_screen(); + if ( $screen && 'options-general' === $screen->id ) { + return $value; + } + } + + if ( defined( 'REST_REQUEST' ) && ( '/wp/v2/settings' === $GLOBALS['wp']->query_vars['rest_route'] ) ) { + return $value; + } + + $languages = $this->get_languages(); + $user_language = $this->get_user_language(); + + if ( ! empty( $languages[ $user_language ]['date'] ) ) { + return $languages[ $user_language ]['date']; + } + + return $value; + } + + /** + * Set time format for current language + * + * @since 1.8.0 + * + * @param $value + * + * @return string + */ + public function set_time_format( $value ) { + + require_once ABSPATH . 'wp-admin/includes/screen.php'; + + if ( is_admin() && ! is_front_ajax() ) { + $screen = get_current_screen(); + if ( $screen && 'options-general' === $screen->id ) { + return $value; + } + } + + if ( defined( 'REST_REQUEST' ) && ( '/wp/v2/settings' === $GLOBALS['wp']->query_vars['rest_route'] ) ) { + return $value; + } + + $languages = $this->get_languages(); + $user_language = $this->get_user_language(); + + if ( ! empty( $languages[ $user_language ]['time'] ) ) { + return $languages[ $user_language ]['time']; + } + + return $value; + } + + /** + * Set locale for html + * + * @since 2.0.0 + * + * @param $translation + * @param $text + * + * @return mixed + */ + public function set_html_locale( $translation, $text ) { + + if ( 'html_lang_attribute' === $text ) { + $languages = $this->get_languages(); + $user_language = $this->get_user_language(); + + if ( $languages && isset( $languages[ $user_language ] ) && $languages[ $user_language ]['locale'] ) { + $translation = $languages[ $user_language ]['locale']; + } else { + $translation = get_locale(); + } + } + + return $translation; + } + + /** + * Get lang from url + * + * @since 2.0.3 + * + * @return string + */ + private function get_lang_from_url() { + if ( ! $this->url_language ) { + $url_lang = ''; + $parts = explode( '/', ltrim( trailingslashit( $this->get_original_request_uri() ), '/' ) ); + $lang = $parts[0]; + + if ( isset( $this->languages[ $lang ] ) ) { + $url_lang = $lang; + } + + $this->url_language = $url_lang; + } + + return $this->url_language; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-shortcodes.php b/plugins/wp-react-custom-multilang/includes/class-wpm-shortcodes.php index e1a886c30..f40c5e69c 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-shortcodes.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-shortcodes.php @@ -1,57 +1,57 @@ - 'list', - 'show' => 'both' - ), $atts ); - - return wpm_get_language_switcher( $atts['type'], $atts['show'] ); - } - - /** - * Shorcode for using with uncompatible plugins - * - * @param array $atts - * @param string $content - * - * @return string - */ - - public function translate_via_shortcode( $atts, $content ) { - $atts = shortcode_atts( array( - 'lang' => wpm_get_language() - ), $atts ); - - return wpm_translate_string($content, $atts['lang']); - } -} + 'list', + 'show' => 'both' + ), $atts ); + + return wpm_get_language_switcher( $atts['type'], $atts['show'] ); + } + + /** + * Shorcode for using with uncompatible plugins + * + * @param array $atts + * @param string $content + * + * @return string + */ + + public function translate_via_shortcode( $atts, $content ) { + $atts = shortcode_atts( array( + 'lang' => wpm_get_language() + ), $atts ); + + return wpm_translate_string($content, $atts['lang']); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-site-options.php b/plugins/wp-react-custom-multilang/includes/class-wpm-site-options.php index d74efa9ae..33f78ba3c 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-site-options.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-site-options.php @@ -1,105 +1,105 @@ -site_options_config = $config['site_options']; - - foreach ( $this->site_options_config as $key => $option ) { - add_filter( "site_option_{$key}", 'wpm_translate_value', 5 ); - add_filter( "pre_update_site_option_{$key}", array( $this, 'wpm_update_site_option' ), 99, 3 ); - add_filter( "pre_add_site_option_{$key}", array( $this, 'wpm_add_site_option' ), 99, 2 ); - } - } - - - /** - * Translate network name - * - * @param $_network - * - * @return mixed - */ - public function translate_network_name( $_network ) { - $_network->site_name = wpm_translate_string( $_network->site_name ); - - return $_network; - } - - - /** - * Update site options with translate - * - * @param $value - * @param $old_value - * @param $option - * - * @return array|bool|mixed|string - */ - public function wpm_update_site_option( $value, $old_value, $option ) { - - if ( wpm_is_ml_value( $value ) ) { - return $value; - } - - $this->site_options_config[ $option ] = apply_filters( "wpm_site_option_{$option}_config", isset( $this->site_options_config[ $option ] ) ? $this->site_options_config[ $option ] : null ); - - if ( null === $this->site_options_config[ $option ] ) { - return $value; - } - - remove_filter( "site_option_{$option}", 'wpm_translate_value', 5 ); - $old_value = get_site_option( $option ); - add_filter( "site_option_{$option}", 'wpm_translate_value', 5 ); - $value = wpm_set_new_value( $old_value, $value, $this->site_options_config[ $option ] ); - - return $value; - } - - - /** - * Add site options with translate - * - * @param mixed $value - * @param string $option - * - * @return array|bool|mixed|string - */ - public function wpm_add_site_option( $value, $option ) { - - if ( wpm_is_ml_value( $value ) ) { - return $value; - } - - $this->site_options_config[ $option ] = apply_filters( "wpm_site_option_{$option}_config", isset( $this->site_options_config[ $option ] ) ? $this->site_options_config[ $option ] : null ); - - if ( null === $this->site_options_config[ $option ] ) { - return $value; - } - - $value = wpm_set_new_value( array(), $value, $this->site_options_config[ $option ] ); - - return $value; - } -} +site_options_config = $config['site_options']; + + foreach ( $this->site_options_config as $key => $option ) { + add_filter( "site_option_{$key}", 'wpm_translate_value', 5 ); + add_filter( "pre_update_site_option_{$key}", array( $this, 'wpm_update_site_option' ), 99, 3 ); + add_filter( "pre_add_site_option_{$key}", array( $this, 'wpm_add_site_option' ), 99, 2 ); + } + } + + + /** + * Translate network name + * + * @param $_network + * + * @return mixed + */ + public function translate_network_name( $_network ) { + $_network->site_name = wpm_translate_string( $_network->site_name ); + + return $_network; + } + + + /** + * Update site options with translate + * + * @param $value + * @param $old_value + * @param $option + * + * @return array|bool|mixed|string + */ + public function wpm_update_site_option( $value, $old_value, $option ) { + + if ( wpm_is_ml_value( $value ) ) { + return $value; + } + + $this->site_options_config[ $option ] = apply_filters( "wpm_site_option_{$option}_config", isset( $this->site_options_config[ $option ] ) ? $this->site_options_config[ $option ] : null ); + + if ( null === $this->site_options_config[ $option ] ) { + return $value; + } + + remove_filter( "site_option_{$option}", 'wpm_translate_value', 5 ); + $old_value = get_site_option( $option ); + add_filter( "site_option_{$option}", 'wpm_translate_value', 5 ); + $value = wpm_set_new_value( $old_value, $value, $this->site_options_config[ $option ] ); + + return $value; + } + + + /** + * Add site options with translate + * + * @param mixed $value + * @param string $option + * + * @return array|bool|mixed|string + */ + public function wpm_add_site_option( $value, $option ) { + + if ( wpm_is_ml_value( $value ) ) { + return $value; + } + + $this->site_options_config[ $option ] = apply_filters( "wpm_site_option_{$option}_config", isset( $this->site_options_config[ $option ] ) ? $this->site_options_config[ $option ] : null ); + + if ( null === $this->site_options_config[ $option ] ) { + return $value; + } + + $value = wpm_set_new_value( array(), $value, $this->site_options_config[ $option ] ); + + return $value; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-taxonomies.php b/plugins/wp-react-custom-multilang/includes/class-wpm-taxonomies.php index cf9bacd85..50c615c14 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-taxonomies.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-taxonomies.php @@ -1,315 +1,496 @@ -object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); - add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); - add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); - add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); - add_filter( 'pre_insert_term', array( $this, 'pre_insert_term' ), 5, 2 ); - add_filter( 'wp_insert_term_data', array( $this, 'insert_term' ), 99, 3 ); - add_action( 'created_term', array( $this, 'insert_description' ), 99, 3 ); - add_filter( 'wp_update_term_data', array( $this, 'update_term' ), 99, 4 ); - add_action( 'edited_term_taxonomy', array( $this, 'update_description' ), 5, 2 ); - add_filter( 'get_terms_args', array( $this, 'get_term_by_name' ), 99, 2 ); - } - - - /** - * Translate all terms - * - * @param $terms - * - * @return array - */ - public function translate_terms( $terms ) { - foreach ( $terms as &$term ) { - if ( is_object( $term ) ) { - $term = wpm_translate_term( $term, $term->taxonomy ); - } else { - $term = wpm_translate_value( $term ); - } - } - - return $terms; - } - - - /** - * Separate taxonomies by language - * - * @param $args - * @param $taxonomies - * - * @return mixed - */ - public function filter_terms_by_language( $args, $taxonomies ) { - - if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { - return $args; - } - - if ( ! empty( $taxonomies ) ) { - - if ( count( $taxonomies ) === 1 ) { - $taxonomy = current( $taxonomies ); - if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { - return $args; - } - } - } - - if ( isset( $args['lang'] ) && ! empty( $args['lang'] ) ) { - $lang = $args['lang']; - } else { - $lang = wpm_get_language(); - } - - if ( 'all' !== $lang ) { - $lang_meta_query = array( - array( - 'relation' => 'OR', - array( - 'key' => '_languages', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_languages', - 'value' => serialize( $lang ), - 'compare' => 'LIKE', - ), - ), - ); - - if ( isset( $args['meta_query'] ) ) { - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query - $args['meta_query'] = wp_parse_args( $args['meta_query'], $lang_meta_query ); - } else { - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query - $args['meta_query'] = $lang_meta_query; - } - } - - return $args; - } - - - /** - * Check if isset taxonomies in current language - * - * @param $term - * @param $taxonomy - * - * @return string - */ - public function pre_insert_term( $term, $taxonomy ) { - global $wpdb; - - if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { - return $term; - } - - $name = wp_unslash( $term ); - $slug = sanitize_title( $name ); - $like = '%' . $wpdb->esc_like( esc_sql( '[:' . wpm_get_language() . ']' . $name . '[:' ) ) . '%'; - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $results = $wpdb->get_results( $wpdb->prepare( "SELECT t.term_id, t.name, t.slug FROM {$wpdb->terms} AS t INNER JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND ( t.name LIKE %s OR t.slug = %s );", $taxonomy, $like, $slug ) ); - - foreach ( $results as $result ) { - $ml_term = wpm_translate_string( $result->name ); - if ( ( $ml_term === $name || $result->slug === $slug ) && ! is_taxonomy_hierarchical( $taxonomy ) ) { - return new \WP_Error( 'term_exists', esc_html__( 'A term with the name provided already exists in this taxonomy.', 'wp-multilang' ), $result->term_id ); - } - } - - return $term; - } - - - /** - * Translate inserted term - * - * @param $data - * @param $taxonomy - * @param $args - * - * @return mixed - */ - public function insert_term( $data, $taxonomy, $args ) { - - $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); - - if ( null === $taxonomy_config ) { - return $data; - } - - if ( ! wpm_is_ml_value( $data['name'] ) ) { - $data['name'] = wpm_set_new_value( array(), $data['name'], $taxonomy_config['name'] ); - } - - $this->description = array( - 'new' => $args['description'], - ); - - return $data; - } - - - /** - * Update inserted description for term - * - * @param $term_id - * @param $tt_id - * @param $taxonomy - */ - public function insert_description( $term_id, $tt_id, $taxonomy ) { - - $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); - - if ( null === $taxonomy_config || ! $this->description ) { - return; - } - - $value = $this->description['new']; - - if ( wpm_is_ml_value( $value ) ) { - return; - } - - $description = wpm_set_new_value( array(), $value, $taxonomy_config['description'] ); - - global $wpdb; - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_taxonomy_id' => $tt_id ) ); - } - - - /** - * Save taxonomies with translation - * - * @param $data - * @param $term_id - * @param $taxonomy - * @param $args - * - * @return mixed - */ - public function update_term( $data, $term_id, $taxonomy, $args ) { - - $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); - - if ( null === $taxonomy_config ) { - return $data; - } - - remove_filter( 'get_term', 'wpm_translate_term', 5 ); - $old_name = get_term_field( 'name', $term_id, $taxonomy, 'edit' ); - $old_description = get_term_field( 'description', $term_id, $taxonomy, 'edit' ); - add_filter( 'get_term', 'wpm_translate_term', 5, 2 ); - - if ( ! wpm_is_ml_value( $data['name'] ) ) { - $data['name'] = wpm_set_new_value( $old_name, $data['name'], $taxonomy_config['name'] ); - } - - $this->description = array( - 'old' => $old_description, - 'new' => $args['description'], - ); - - return $data; - } - - - /** - * Fix for saving taxonomy description - * - * @param $tt_id - * @param $taxonomy - */ - public function update_description( $tt_id, $taxonomy ) { - - $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); - - if ( null === $taxonomy_config || ! $this->description ) { - return; - } - - $value = $this->description['new']; - - if ( wpm_is_ml_value( $value ) ) { - return; - } - - $description = wpm_set_new_value( $this->description['old'], $value, $taxonomy_config['description'] ); - - global $wpdb; - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: using WP bulit in function updates the data of term_taxonomy of current language which does not work for our plugin in this case - $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_taxonomy_id' => $tt_id ) ); - } - - /** - * Set name__like for getting terms by name - * - * @since 2.1.1 - * - * @param $args - * @param $taxonomies - * - * @return mixed - */ - public function get_term_by_name( $args, $taxonomies ) { - - if ( ! empty( $args['name'] ) && empty( $args['name__like'] ) ) { - $taxonomy = current( $taxonomies ); - if ( null !== wpm_get_taxonomy_config( $taxonomy ) ) { - $args['name__like'] = '[:' . wpm_get_language() . ']' . $args['name'] . '[:'; - $args['name'] = ''; - } - } - - return $args; - } -} +object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); + add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); + add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); + add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); + add_filter( 'pre_insert_term', array( $this, 'pre_insert_term' ), 5, 2 ); + add_filter( 'wp_insert_term_data', array( $this, 'insert_term' ), 99, 3 ); + add_action( 'created_term', array( $this, 'insert_description' ), 99, 3 ); + add_filter( 'wp_update_term_data', array( $this, 'update_term' ), 99, 4 ); + add_action( 'edited_term_taxonomy', array( $this, 'update_description' ), 5, 2 ); + add_filter( 'get_terms_args', array( $this, 'get_term_by_name' ), 99, 2 ); + add_action( 'pre_get_posts', array( $this, 'filter_posts_by_language_cat_posts' ), 99 ); + } + + + // ========================================================================= + // ADDED METHODS — fix for raw [:en:]...[:] labels in Gutenberg block inserter + // Root cause: WordPress sets WP_Taxonomy->label (singular, used by REST 'name' + // field) as a one-time copy of ->labels->name at registration. WPM translated + // ->labels but never synced ->label, so the raw syntax leaked into REST responses + // which Gutenberg reads to build block variation titles in the inserter panel. + // ========================================================================= + + /** + * Translate taxonomy labels registered with multilingual strings. + * Fires immediately after each register_taxonomy() call (priority 99). + * + * THE KEY FIX: after translating ->labels, also sync ->label (the singular + * shortcut property that the REST API reads for the 'name' field). + */ + public function translate_registered_taxonomy_labels( $taxonomy, $object_type, $args ) { + global $wp_taxonomies; + + if ( empty( $wp_taxonomies[ $taxonomy ] ) || empty( $wp_taxonomies[ $taxonomy ]->labels ) ) { + return; + } + + // Translate all strings inside the labels object + $wp_taxonomies[ $taxonomy ]->labels = $this->translate_labels_object( $wp_taxonomies[ $taxonomy ]->labels ); + + // Sync ->label (used by REST 'name' field) with the now-translated ->labels->name + if ( ! empty( $wp_taxonomies[ $taxonomy ]->labels->name ) ) { + $wp_taxonomies[ $taxonomy ]->label = $wp_taxonomies[ $taxonomy ]->labels->name; + } + } + + /** + * Translate labels for any taxonomies registered before WPM attached its hook + * (runs at init priority 99, after all plugins have registered their taxonomies). + */ + public function translate_registered_taxonomies_labels() { + global $wp_taxonomies; + + if ( empty( $wp_taxonomies ) || ! is_array( $wp_taxonomies ) ) { + return; + } + + foreach ( array_keys( $wp_taxonomies ) as $taxonomy ) { + $this->translate_registered_taxonomy_labels( $taxonomy, array(), array() ); + } + } + + /** + * Translate taxonomy labels in live REST responses (covers Gutenberg follow-up + * fetches made after the initial page load, e.g. context=edit requests). + */ + public function translate_rest_taxonomy( $response, $taxonomy, $request ) { + if ( ! empty( $response->data['labels'] ) && is_array( $response->data['labels'] ) ) { + $response->data['labels'] = $this->translate_labels_array( $response->data['labels'] ); + } + + if ( ! empty( $response->data['name'] ) ) { + $response->data['name'] = $this->translate_label_string( $response->data['name'] ); + } + + return $response; + } + + /** + * Translate all string properties of a labels stdClass object. + */ + private function translate_labels_object( $labels ) { + foreach ( get_object_vars( $labels ) as $key => $label ) { + if ( is_string( $label ) ) { + $labels->$key = $this->translate_label_string( $label ); + } + } + + return $labels; + } + + /** + * Translate all string values of a labels array. + */ + private function translate_labels_array( $labels ) { + foreach ( $labels as $key => $label ) { + if ( is_string( $label ) ) { + $labels[ $key ] = $this->translate_label_string( $label ); + } + } + + return $labels; + } + + /** + * Translate a single [:en]...[:] multilingual label string to the current language. + */ + private function translate_label_string( $label ) { + if ( ! wpm_is_ml_string( $label ) ) { + return $label; + } + + $labels = wpm_string_to_ml_array( $label ); + + if ( ! is_array( $labels ) || empty( $labels ) ) { + return $label; + } + + $language = wpm_get_language(); + + if ( isset( $labels[ $language ] ) && '' !== $labels[ $language ] ) { + return $labels[ $language ]; + } + + $default_language = wpm_get_default_language(); + + return isset( $labels[ $default_language ] ) ? $labels[ $default_language ] : ''; + } + + // ========================================================================= + // END ADDED METHODS + // ========================================================================= + + + /** + * Translate all terms + * + * @param $terms + * + * @return array + */ + public function translate_terms( $terms ) { + foreach ( $terms as &$term ) { + if ( is_object( $term ) ) { + $term = wpm_translate_term( $term, $term->taxonomy ); + } else { + $term = wpm_translate_value( $term ); + } + } + + return $terms; + } + + + /** + * Separate taxonomies by language + * + * @param $args + * @param $taxonomies + * + * @return mixed + */ + public function filter_terms_by_language( $args, $taxonomies ) { + + if ( defined( 'DOING_CRON' ) || ( is_admin() && ! is_front_ajax() ) ) { + return $args; + } + + if ( ! empty( $taxonomies ) ) { + + if ( count( $taxonomies ) === 1 ) { + $taxonomy = current( $taxonomies ); + if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { + return $args; + } + } + } + + if ( isset( $args['lang'] ) && ! empty( $args['lang'] ) ) { + $lang = $args['lang']; + } else { + $lang = wpm_get_language(); + } + + if ( 'all' !== $lang ) { + $lang_meta_query = array( + array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => serialize( $lang ), + 'compare' => 'LIKE', + ), + ), + ); + + if ( isset( $args['meta_query'] ) ) { + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query + $args['meta_query'] = wp_parse_args( $args['meta_query'], $lang_meta_query ); + } else { + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query + $args['meta_query'] = $lang_meta_query; + } + } + + return $args; + } + + + /** + * Check if isset taxonomies in current language + * + * @param $term + * @param $taxonomy + * + * @return string + */ + public function pre_insert_term( $term, $taxonomy ) { + global $wpdb; + + if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { + return $term; + } + + $name = wp_unslash( $term ); + $slug = sanitize_title( $name ); + $like = '%' . $wpdb->esc_like( esc_sql( '[:' . wpm_get_language() . ']' . $name . '[:' ) ) . '%'; + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $results = $wpdb->get_results( $wpdb->prepare( "SELECT t.term_id, t.name, t.slug FROM {$wpdb->terms} AS t INNER JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND ( t.name LIKE %s OR t.slug = %s );", $taxonomy, $like, $slug ) ); + + foreach ( $results as $result ) { + $ml_term = wpm_translate_string( $result->name ); + if ( ( $ml_term === $name || $result->slug === $slug ) && ! is_taxonomy_hierarchical( $taxonomy ) ) { + return new \WP_Error( 'term_exists', esc_html__( 'A term with the name provided already exists in this taxonomy.', 'wp-multilang' ), $result->term_id ); + } + } + + return $term; + } + + + /** + * Translate inserted term + * + * @param $data + * @param $taxonomy + * @param $args + * + * @return mixed + */ + public function insert_term( $data, $taxonomy, $args ) { + + $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); + + if ( null === $taxonomy_config ) { + return $data; + } + + if ( ! wpm_is_ml_value( $data['name'] ) ) { + $data['name'] = wpm_set_new_value( array(), $data['name'], $taxonomy_config['name'] ); + } + + $this->description = array( + 'new' => $args['description'], + ); + + return $data; + } + + + /** + * Update inserted description for term + * + * @param $term_id + * @param $tt_id + * @param $taxonomy + */ + public function insert_description( $term_id, $tt_id, $taxonomy ) { + + $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); + + if ( null === $taxonomy_config || ! $this->description ) { + return; + } + + $value = $this->description['new']; + + if ( wpm_is_ml_value( $value ) ) { + return; + } + + $description = wpm_set_new_value( array(), $value, $taxonomy_config['description'] ); + if ( ! empty( $description ) ) { + $description = wp_unslash( $description ); + } + global $wpdb; + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_taxonomy_id' => $tt_id ) ); + } + + + /** + * Save taxonomies with translation + * + * @param $data + * @param $term_id + * @param $taxonomy + * @param $args + * + * @return mixed + */ + public function update_term( $data, $term_id, $taxonomy, $args ) { + + $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); + + if ( null === $taxonomy_config ) { + return $data; + } + + remove_filter( 'get_term', 'wpm_translate_term', 5 ); + $old_name = get_term_field( 'name', $term_id, $taxonomy, 'edit' ); + $old_description = get_term_field( 'description', $term_id, $taxonomy, 'edit' ); + add_filter( 'get_term', 'wpm_translate_term', 5, 2 ); + + if ( ! wpm_is_ml_value( $data['name'] ) ) { + $data['name'] = wpm_set_new_value( $old_name, $data['name'], $taxonomy_config['name'] ); + } + + $this->description = array( + 'old' => $old_description, + 'new' => $args['description'], + ); + + return $data; + } + + + /** + * Fix for saving taxonomy description + * + * @param $tt_id + * @param $taxonomy + */ + public function update_description( $tt_id, $taxonomy ) { + + $taxonomy_config = wpm_get_taxonomy_config( $taxonomy ); + + if ( null === $taxonomy_config || ! $this->description ) { + return; + } + + $value = $this->description['new']; + + if ( wpm_is_ml_value( $value ) ) { + return; + } + + $old_value = isset( $this->description['old'] ) ? $this->description['old'] : array(); + + $description = wpm_set_new_value( $old_value, $value, $taxonomy_config['description'] ); + if ( ! empty( $description ) ) { + $description = wp_unslash( $description ); + } + global $wpdb; + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: using WP bulit in function updates the data of term_taxonomy of current language which does not work for our plugin in this case + $wpdb->update( $wpdb->term_taxonomy, compact( 'description' ), array( 'term_taxonomy_id' => $tt_id ) ); + } + + /** + * Set name__like for getting terms by name + * + * @since 2.1.1 + * + * @param $args + * @param $taxonomies + * + * @return mixed + */ + public function get_term_by_name( $args, $taxonomies ) { + + if ( ! empty( $args['name'] ) && empty( $args['name__like'] ) ) { + $taxonomy = current( $taxonomies ); + if ( null !== wpm_get_taxonomy_config( $taxonomy ) ) { + $term_name = $args['name']; + if ( is_array( $term_name ) && ! empty( $term_name[0] ) ) { + $term_name = $term_name[0]; + } + $args['name__like'] = '[:' . wpm_get_language() . ']' . $term_name . '[:'; + $args['name'] = ''; + } + } + + return $args; + } + + /** + * Display language respective posts or products on archive page + * @param $query + * @return $query + * @since 2.4.26 + * */ + public function filter_posts_by_language_cat_posts( $query ) { + + if ( is_admin() ) { + return; + } + + if ( ! is_category() && ! is_tag() && ! is_tax() && ! ( function_exists( 'is_product_category' ) && is_product_category() ) ) { + return; + } + + $lang = get_query_var( 'lang' ); + if ( ! $lang ) { + $lang = wpm_get_user_language(); + } + + if ( 'all' === $lang ) { + return; + } + + $meta_query = (array) $query->get( 'meta_query' ); + + $meta_query[] = array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => '"' . $lang . '"', + 'compare' => 'LIKE', + ), + ); + + $query->set( 'meta_query', $meta_query ); + } + +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-users.php b/plugins/wp-react-custom-multilang/includes/class-wpm-users.php index 44e1a0d81..4fcad2052 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-users.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-users.php @@ -1,40 +1,40 @@ -object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); - add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); - add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); - add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); - } -} +object_type}_metadata", array( $this, 'get_meta_field' ), 5, 3 ); + add_filter( "update_{$this->object_type}_metadata", array( $this, 'update_meta_field' ), 99, 5 ); + add_filter( "add_{$this->object_type}_metadata", array( $this, 'add_meta_field' ), 99, 5 ); + add_action( "delete_{$this->object_type}_metadata", array( $this, 'delete_meta_field' ), 99, 3 ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/class-wpm-widgets.php b/plugins/wp-react-custom-multilang/includes/class-wpm-widgets.php index ad4e52d21..f734ae894 100644 --- a/plugins/wp-react-custom-multilang/includes/class-wpm-widgets.php +++ b/plugins/wp-react-custom-multilang/includes/class-wpm-widgets.php @@ -1,39 +1,39 @@ - null, - 'post_excerpt' => null, - ); - } - - return $config; - } - - - /** - * Save field object with translation - * - * @param $field - * - * @return array|bool|string - */ - public function update_field( $field ) { - - $old_field = maybe_unserialize( get_post_field( 'post_content', $field['ID'], 'edit' ) ); - - if ( ! $old_field ) { - return $field; - } - - $old_field = wpm_array_merge_recursive( $field, $old_field ); - $old_field = wpm_value_to_ml_array( $old_field ); - $field_name = get_post_field( 'post_title', $field['ID'], 'edit' ); - $old_field['label'] = wpm_value_to_ml_array( $field_name ); - - $default_config = array( - 'label' => array(), - 'placeholder' => array(), - 'instructions' => array(), - ); - - $acf_field_config = apply_filters( "wpm_acf_field_{$field['type']}_config", $default_config ); - $acf_field_config = apply_filters( "wpm_acf_field_name_{$field['name']}_config", $acf_field_config ); - - $new_field = wpm_set_language_value( $old_field, $field, $acf_field_config ); - $field = wpm_array_merge_recursive( $field, $new_field ); - $field = wpm_ml_value_to_string( $field ); - - return $field; - } - - /** - * Add translate config for text fields. - * - * @param $config - * - * @return array - */ - public function add_text_field_config( $config ) { - $config['default_value'] = array(); - - return $config; - } - - - /** - * Save value with translation - * - * @param $value - * @param $post_id - * @param $field - * - * @return array|bool|string - */ - public function update_value( $value, $post_id, $field ) { - - if ( wpm_is_ml_value( $value ) ) { - return $value; - } - - $info = acf_get_post_id_info( $post_id ); - - switch ( $info['type'] ) { - - case 'post': - $post_type = get_post_type( $info['id'] ); - if ( ! $post_type || null === wpm_get_post_config( $post_type ) ) { - return $value; - } - - break; - - case 'term': - $term = get_term( $info['id'] ); - if ( ! $term || is_wp_error( $term ) || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { - return $value; - } - } - - $acf_field_config = apply_filters( "wpm_acf_{$info['type']}_config", null, $value, $post_id, $field ); - $acf_field_config = apply_filters( "wpm_acf_{$field['type']}_config", $acf_field_config, $value, $post_id, $field ); - $acf_field_config = apply_filters( "wpm_acf_name_{$field['_name']}_config", $acf_field_config, $value, $post_id, $field ); - - if ( null === $acf_field_config ) { - return $value; - } - - remove_filter( 'acf/load_value', 'wpm_translate_value', 6 ); - $old_value = get_field( $field['name'], $post_id, false ); - add_filter( 'acf/load_value', 'wpm_translate_value', 6 ); - - $value = wpm_set_new_value( $old_value, $value, $acf_field_config ); - - return $value; - } -} + null, + 'post_excerpt' => null, + ); + } + + return $config; + } + + + /** + * Save field object with translation + * + * @param $field + * + * @return array|bool|string + */ + public function update_field( $field ) { + + $old_field = maybe_unserialize( get_post_field( 'post_content', $field['ID'], 'edit' ) ); + + if ( ! $old_field && ! is_array( $old_field ) ) { + return $field; + } + + if ( ! empty( $old_field ) && is_string( $old_field ) ) { + $old_field = wpm_translate_string( $old_field ); + $old_field = maybe_unserialize( $old_field ); + if ( ! is_array( $old_field ) ) { + return $field; + } + } + + $old_field = wpm_array_merge_recursive( $field, $old_field ); + $old_field = wpm_value_to_ml_array( $old_field ); + $field_name = get_post_field( 'post_title', $field['ID'], 'edit' ); + $old_field['label'] = wpm_value_to_ml_array( $field_name ); + + $default_config = array( + 'label' => array(), + 'placeholder' => array(), + 'instructions' => array(), + ); + + $acf_field_config = apply_filters( "wpm_acf_field_{$field['type']}_config", $default_config ); + $acf_field_config = apply_filters( "wpm_acf_field_name_{$field['name']}_config", $acf_field_config ); + + $new_field = wpm_set_language_value( $old_field, $field, $acf_field_config ); + $field = wpm_array_merge_recursive( $field, $new_field ); + $field = wpm_ml_value_to_string( $field ); + + return $field; + } + + /** + * Add translate config for text fields. + * + * @param $config + * + * @return array + */ + public function add_text_field_config( $config ) { + $config['default_value'] = array(); + + return $config; + } + + + /** + * Save value with translation + * + * @param $value + * @param $post_id + * @param $field + * + * @return array|bool|string + */ + public function update_value( $value, $post_id, $field ) { + + if ( wpm_is_ml_value( $value ) ) { + return $value; + } + + $info = acf_get_post_id_info( $post_id ); + + // ACF is added as a block in post content then find that block + if ( strpos( $post_id, 'block_' ) === 0 && is_array( $info ) ) { + $info['type'] = 'block'; + } + + switch ( $info['type'] ) { + + case 'post': + $post_type = get_post_type( $info['id'] ); + if ( ! $post_type || null === wpm_get_post_config( $post_type ) ) { + return $value; + } + + break; + + case 'term': + $term = get_term( $info['id'] ); + if ( ! $term || is_wp_error( $term ) || null === wpm_get_taxonomy_config( $term->taxonomy ) ) { + return $value; + } + + break; + + case 'block': + + $post_type = get_post_type( $info['id'] ); + if ( ! $post_type || null === wpm_get_post_config( $post_type ) ) { + return $value; + } + + break; + + } + + $acf_field_config = apply_filters( "wpm_acf_{$info['type']}_config", null, $value, $post_id, $field ); + $acf_field_config = apply_filters( "wpm_acf_{$field['type']}_config", $acf_field_config, $value, $post_id, $field ); + $acf_field_config = apply_filters( "wpm_acf_name_{$field['_name']}_config", $acf_field_config, $value, $post_id, $field ); + + if ( null === $acf_field_config ) { + return $value; + } + + remove_filter( 'acf/load_value', 'wpm_translate_value', 6 ); + $old_value = get_field( $field['name'], $post_id, false ); + add_filter( 'acf/load_value', 'wpm_translate_value', 6 ); + + $value = wpm_set_new_value( $old_value, $value, $acf_field_config ); + + return $value; + } + + /** + * Add dynamic option pages to config + * @param $config array + * @return $config array + * @since 2.4.19 + * */ + public function add_dynamic_pages( $config ) { + + $posts = get_posts([ + 'post_type' => 'acf-ui-options-page', + 'post_status' => 'publish', + 'numberposts' => -1, // Get all published posts + ]); + + if ( ! empty( $posts ) && is_array( $posts ) ) { + foreach ( $posts as $option_page ) { + if ( is_object( $option_page ) && ! empty( $option_page->post_content ) ) { + $content = maybe_unserialize( wpm_translate_string( $option_page->post_content ) ); + if ( is_array( $content ) && ! empty( $content['menu_slug'] ) ) { + $parent = $content['parent_slug']; + $page_id = 'toplevel_page_' . $content['menu_slug']; + $config[] = $page_id; + + // If page is assigned to any of the menus the get the proper base to add it into the config + if ( $parent != 'none' ) { + + if ( $parent == 'options-general.php' ) { + $page_id = 'settings_page_' . $content['menu_slug']; + } else if( $parent == 'tools.php' ) { + $page_id = 'tools_page_' . $content['menu_slug']; + }else{ + + // If parent is assigned other than settings and tools menu then get the correct base for this + $parse_parent = wp_parse_url( $parent, PHP_URL_QUERY ); + parse_str( $parse_parent, $params ); + if ( is_array( $params ) && ! empty( $params['post_type'] ) ) { + $delimiter = strpos( $params['post_type'], '-' ) !== false ? '-' : '_'; + if ( ! empty( $delimiter ) ) { + $base = explode( $delimiter, $params['post_type'] )[0]; + $page_id = $base . '_' . 'page_' . $content['menu_slug']; + } + } + + } + + } + + $config[] = $page_id; + } + } + } + } + + return $config; + + } + + /** + * Get acf field and value and add it into data for export + * @param $data array + * @param $post WP_Post + * @return $data array + * @since 2.4.21 + * */ + public function add_acf_fields_to_export( $data, $post ) { + // Get ACF fields + if ( function_exists( 'get_fields' ) && ! empty( $data ) ) { + + global $wpdb; + $default_lang = wpm_get_default_language(); + $current_lang = wpm_get_language(); + + foreach ( $data as $key => $value ) { + if ( is_array( $value ) && ! empty( $value['id'] ) ) { + $acf_fields = get_fields( $value['id'] ); + if( ! empty( $acf_fields ) ) { + foreach ( $acf_fields as $field_key => $field ) { + + if ( is_string( $field ) ) { + + $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $value['id'], $field_key ), ARRAY_A ); + + if ( is_array( $result ) && ! empty( $result[0] ) && is_array( $result[0] ) ) { + if ( ! empty( $result[0]['meta_value'] ) && is_string( $result[0]['meta_value'] ) ) { + + $field_array = array(); + $field_array['key'] = $field_key; + $field_array['source_value'] = wpm_translate_string( $result[0]['meta_value'], $default_lang ); + $target_value = wpm_translate_string( $result[0]['meta_value'], $current_lang ); + $field_array['target_value'] = ''; + if ( $field_array['source_value'] !== $target_value ) { + $field_array['target_value'] = $target_value; + } + $data[$key]['acf'][] = $field_array; + + } + } + + } else if( is_array( $field ) && ! empty( $field[0] ) ) { + // Repeater fields + foreach ( $field as $r_key => $repeater ) { + + foreach ( $repeater as $rs_key => $sub_repeater ) { + $repeater_key = $field_key . '_' . $r_key . '_' . $rs_key; + $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $value['id'], $repeater_key ), ARRAY_A ); + + if ( is_array( $result ) && ! empty( $result[0] ) && is_array( $result[0] ) ) { + + if ( is_string( $result[0]['meta_value'] ) ) { + $field_array = array(); + $field_array['key'] = $repeater_key; + $field_array['source_value'] = wpm_translate_string( $result[0]['meta_value'], $default_lang ); + $target_value = wpm_translate_string( $result[0]['meta_value'], $current_lang ); + $field_array['target_value'] = ''; + if ( $field_array['source_value'] !== $target_value ) { + $field_array['target_value'] = $target_value; + } + $data[$key]['acf'][] = $field_array; + } + + } + + } + + + } + } + + } + } + + } + } + + } + + return $data; + } + + /** + * Translate the validate field + * @param $field array + * @return $field array + * @since 2.4.28 + * */ + public function translate_validate_field( $field ) { + + if ( ! empty( $field ) && is_array( $field ) && ! empty( $field[0] ) ) { + + $translate_field_content = (array) acf_maybe_unserialize( wpm_translate_value( $field[0] ) ); + + // Unset the unwanted array field generated by ACF + unset( $field[0] ); + + if ( is_array( $translate_field_content ) ) { + $field = array_merge( $field, $translate_field_content ); + } + + } + + return $field; + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-advanced-ads.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-advanced-ads.php new file mode 100644 index 000000000..0a7680a87 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-advanced-ads.php @@ -0,0 +1,249 @@ + array( + 'set_ad_options_field_value', + 'get_ad_options_field_value' + ), + self::ADVANCED_ADS_TYPE => array( + 'set_type_field_value', + 'get_type_field_value' + ), + self::ADVANCED_ADS_ITEM => array( + 'set_item_field_value', + 'get_item_field_value' + ), + self::ADVANCED_ADS_OPTIONS => array( + 'set_options_field_value', + 'get_options_field_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array( $this, 'config' ), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array( $this, $callbacks[0] ), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array( $this, $callbacks[0] ), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array( $this, $callbacks[1] ), 10, 1 ); + } + + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.23 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.23 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.23 + */ + private function get_value( $key, $value ) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_ad_options_field_value( $value ) { + $key = self::ADVANCED_ADS_AD_OPTIONS; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_ad_options_field_value( $value ) { + + $key = self::ADVANCED_ADS_AD_OPTIONS; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_type_field_value( $value ) { + $key = self::ADVANCED_ADS_TYPE; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_type_field_value( $value ) { + + $key = self::ADVANCED_ADS_TYPE; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_item_field_value( $value ) { + $key = self::ADVANCED_ADS_ITEM; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_item_field_value( $value ) { + + $key = self::ADVANCED_ADS_ITEM; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_options_field_value( $value ) { + $key = self::ADVANCED_ADS_OPTIONS; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_options_field_value( $value ) { + + $key = self::ADVANCED_ADS_OPTIONS; + return $this->get_value( $key, $value ); + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-aiosp.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-aiosp.php index 58265daa2..cb64eb807 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-aiosp.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-aiosp.php @@ -1,511 +1,511 @@ - '', - '_aioseop_description' => '', - '_aioseop_keywords' => '', - ); - - /** - * WPM_AIOSP constructor. - */ - public function __construct() { - add_filter( 'wpm_option_aioseop_options_config', array( $this, 'set_posts_config' ) ); - add_filter( 'delete_post_metadata', array( $this, 'save_old_fields' ), 10, 5 ); - add_filter( 'add_post_metadata', array( $this, 'update_old_fields' ), 10, 4 ); - add_filter( 'init', array( $this, 'translate_options' ) ); - add_filter( 'aioseo_get_post', array($this, 'aioseo_filter_post_data' )); - add_filter( 'aioseo_get_term', array($this, 'aioseo_filter_post_data' )); - add_action( 'aioseo_insert_post', array($this, 'save_schema_post_meta_data' ) ); - add_action( 'aioseo_insert_term', array($this, 'save_schema_term_meta_data' ) ); - - // AIOSP Sitemap do not support simple tag in sitemap like "xhtml:link" what needed in multilingual sitemap - //add_filter( 'aiosp_sitemap_xml_namespace', array( $this, 'add_namespace' ) ); - } - - /** - * Translate options array on init. - */ - public function translate_options() { - global $aioseop_options; - $aioseop_options = wpm_translate_value( $aioseop_options ); - } - - /** - * Add dynamically title setting for post types - * - * @param array $option_config - * - * @return array - */ - public function set_posts_config( $option_config ) { - - $post_types = get_post_types( array(), 'names' ); - - foreach ( $post_types as $post_type ) { - - if ( null === wpm_get_post_config( $post_type ) ) { - continue; - } - - $option_config[ "aiosp_{$post_type}_title_format" ] = array(); - } - - return $option_config; - } - - /** - * Save old translation before deleting - * - * @param $check - * @param $object_id - * @param $meta_key - * @param $meta_value - * @param $delete_all - * - * @return mixed - */ - public function save_old_fields( $check, $object_id, $meta_key, $meta_value, $delete_all ) { - - if ( $delete_all ) { - return $check; - } - - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return $check; - } - - if ( isset( $this->meta_fields[ $meta_key ] ) ) { - global $wpdb; - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d;", $meta_key, $object_id ) ); - - if ( $old_value ) { - $this->meta_fields[ $meta_key ] = $old_value; - } - } - - return $check; - } - - /** - * Add field with new and old translations - * - * @param $check - * @param $object_id - * @param $meta_key - * @param $meta_value - * - * @return bool|int - */ - public function update_old_fields( $check, $object_id, $meta_key, $meta_value ) { - global $wpdb; - - if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { - return $check; - } - - if ( ! empty( $this->meta_fields[ $meta_key ] ) ) { - - $meta_value = wpm_set_new_value( $this->meta_fields[ $meta_key ], $meta_value ); - $meta_value = maybe_serialize( $meta_value ); - - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $result = $wpdb->insert( $wpdb->postmeta, array( - 'post_id' => $object_id, - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key - 'meta_key' => $meta_key, - //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value - 'meta_value' => $meta_value, - ) ); - - if ( ! $result ) { - return false; - } - - $mid = (int) $wpdb->insert_id; - - wp_cache_delete( $object_id, 'post_meta' ); - - return $mid; - } - - return $check; - } - - /** - * Add namespace to sitemap - * - * @since 2.0.0 - * - * @param $namespace - * - * @return mixed - */ - public function add_namespace( $namespace ) { - $namespace['xmlns:xhtml'] = 'http://www.w3.org/1999/xhtml'; - - return $namespace; - } - - /** - * Update all in one seo meta description field value in aioseo_posts table for posts - * @since 2.4.4 - * */ - public function aioseo_filter_post_data( $post ) { - global $wpdb; - // if(is_singular()){ - if ( is_object( $post ) ) { - - $is_post = 0; - $is_term = 0; - - $post_id = 0; - if ( isset( $post->post_id ) ) { - $post_id = $post->post_id; - $is_post = 1; - }else if ( isset( $post->term_id ) ) { - $post_id = $post->term_id; - $is_term = 1; - } - if ( isset( $post->title ) && isset( $post->description ) && $post_id > 0 ) { - $current_lang = wpm_get_language(); - - $table_name = $wpdb->prefix . 'postmeta'; - if ( $is_term == 1 ) { - $table_name = $wpdb->prefix . 'termmeta'; - } - - $meta_key_array = array('_aioseo_title', '_aioseo_description', '_aioseo_twitter_title', '_aioseo_twitter_description', '_aioseo_og_title', '_aioseo_og_description', '_aioseo_wpm_schema', '_aioseo_wpm_canonical_url', '_aioseo_wpm_og_video', '_aioseo_og_article_section', '_aioseo_og_article_tags', '_aioseo_wpm_keyphrases', '_aioseo_wpm_og_object_type', '_aioseo_wpm_twitter_card', '_aioseo_wpm_og_image_type', '_aioseo_wpm_og_image_url', '_aioseo_wpm_og_image_custom_url', '_aioseo_wpm_og_custom_url', '_aioseo_wpm_twitter_image_type', '_aioseo_wpm_twitter_image_url', '_aioseo_wpm_twitter_image_custom_url'); - - // Get _aioseo_description and _aioseo_title values from table - //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $post_meta_result = array(); - if ( $is_post == 1 ) { - // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching - $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); - }else if ( $is_term == 1 ) { - // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching - $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->termmeta} WHERE term_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); - } - - if ( is_array( $post_meta_result ) && count( $post_meta_result ) > 0 ) { - foreach ( $post_meta_result as $pmr_key => $pmr_value ) { - if ( ! empty( $pmr_value ) && is_object( $pmr_value ) ) { - if ( isset( $pmr_value->post_id ) || isset( $pmr_value->term_id ) ) { - if($pmr_value->meta_key == '_aioseo_title'){ - $post->title = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_description'){ - $post->description = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_twitter_title'){ - $post->twitter_title = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_twitter_description'){ - $post->twitter_description = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_og_title'){ - $post->og_title = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_og_description'){ - $post->og_description = wpm_translate_string($pmr_value->meta_value, $current_lang); - } - if($pmr_value->meta_key == '_aioseo_wpm_schema'){ - - $schema_data = $pmr_value->meta_value; - if ( ! empty( $schema_data ) && is_string( $schema_data ) ) { - $schema_data = maybe_unserialize( base64_decode( wpm_translate_value( $schema_data ) , true ) ); - - if ( ! empty( $schema_data ) && is_string( $schema_data ) ) { - $post->schema = json_decode( $schema_data ); - } - } - } - if($pmr_value->meta_key == '_aioseo_wpm_canonical_url'){ - $post->canonical_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_og_video'){ - $post->og_video = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_og_article_section'){ - $post->og_article_section = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_og_article_tags'){ - - $tags = array(); - $article_tags = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - if ( ! empty( $article_tags ) ) { - $article_tags = explode( ',', $article_tags ); - if ( ! empty( $article_tags ) && is_array( $article_tags ) ) { - foreach ( $article_tags as $article_tag ) { - $tag = array( - 'label' => $article_tag, - 'value' => $article_tag, - ); - $tags[] = $tag; - - } - } - } - if ( ! empty( $tags ) ) { - $post->og_article_tags = wp_json_encode( $tags ); - } - - } - if($pmr_value->meta_key == '_aioseo_wpm_keyphrases'){ - - $keyphrases = $pmr_value->meta_value; - if ( ! empty( $keyphrases ) && is_string( $keyphrases ) ) { - $keyphrases = maybe_unserialize( base64_decode( wpm_translate_value( $keyphrases ) , true ) ); - if ( ! empty( $keyphrases ) && is_string( $keyphrases ) ) { - if ( isset( $post->keyphrases ) && is_object( $post->keyphrases ) ) { - $post->keyphrases = json_decode( $keyphrases ); - }else{ - $post->keyphrases = $keyphrases; - } - } - } - } - if($pmr_value->meta_key == '_aioseo_wpm_og_object_type'){ - $post->og_object_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_twitter_card'){ - $post->twitter_card = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_og_image_type'){ - $post->og_image_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_og_image_url'){ - $post->og_image_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_og_image_custom_url'){ - $post->og_image_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_og_custom_url'){ - $post->og_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_type'){ - $post->twitter_image_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_url'){ - $post->twitter_image_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_custom_url'){ - $post->twitter_image_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); - } - - } - } - } - } - } - } - return $post; - } - - /** - * Create custom meta key and store data - * @param $key string - * @param $data mixed - * @param $id integer - * @param $type string - * @since 2.4.16 - * */ - public function create_post_custom_meta_key( $key, $db_value, $id, $type, $obj_type ){ - - switch ( $type ){ - - case 'text': - - $current_value = ''; - if ( $obj_type == 'post' ) { - $current_value = get_post_meta( $id, $key, true ); - }else if ( $obj_type == 'term' ) { - $current_value = get_term_meta( $id, $key, true ); - } - - if ( empty( $current_value ) ) { - $current_value = $db_value; - } - - if ( $obj_type == 'post' ) { - update_post_meta( $id, $key, wpm_set_new_value( $current_value, $db_value ) ); - }else if( $obj_type == 'term' ) { - update_term_meta( $id, $key, wpm_set_new_value( $current_value, $db_value ) ); - } - - break; - - case 'serialize': - - $current_value = ''; - if ( $obj_type == 'post' ) { - $current_value = get_post_meta( $id, $key, true ); - }else if ( $obj_type == 'term' ) { - $current_value = get_term_meta( $id, $key, true ); - } - - if ( is_object( $db_value ) ) { - $db_value = maybe_serialize( $db_value ); - } - - if ( empty( $current_value ) ) { - $current_value = base64_encode( $db_value ); - } - - if ( $obj_type == 'post' ) { - update_post_meta( $id, $key, wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - } else if( $obj_type == 'term' ) { - update_term_meta( $id, $key, wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - } - - break; - - } - - } - - /** - * Create post meta for schema and store data into it - * @param post_id int - * @since 2.4.16 - * */ - public function save_schema_post_meta_data( $post_id ) { - - if ( $post_id > 0 ) { - - global $wpdb; - - $table = $wpdb->prefix.'aioseo_posts'; - //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $post_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE post_id = %d" , $post_id ) ); - - if ( ! empty( $post_data ) && is_object($post_data) ) { - - $this->save_aiseo_meta_fields( $post_data, 'post', $post_id ); - - } - - } - - } - - /** - * Save term post meta fields - * @param $post_id int - * @since 2.4.16 - * */ - public function save_schema_term_meta_data( $post_id ){ - - if ( $post_id > 0 ) { - - global $wpdb; - - $table = $wpdb->prefix.'aioseo_terms'; - //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $term_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE term_id = %d" , $post_id ) ); - - if ( ! empty( $term_data ) && is_object($term_data) ) { - - $this->save_aiseo_meta_fields( $term_data, 'term', $post_id ); - - } - - } - - } - - /** - * Save term post and term meta fields - * @param $post_id int - * @param $obj_type string - * @since 2.4.16 - * */ - public function save_aiseo_meta_fields( $post_data, $obj_type, $post_id ){ - - if ( isset( $post_data->schema ) ) { - - $key = '_aioseo_wpm_schema'; - $this->create_post_custom_meta_key( $key, $post_data->schema, $post_id, 'serialize', $obj_type ); - } - - if ( isset( $post_data->canonical_url ) ) { - $key = '_aioseo_wpm_canonical_url'; - $this->create_post_custom_meta_key( $key, $post_data->canonical_url, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->og_video ) ) { - $key = '_aioseo_wpm_og_video'; - $this->create_post_custom_meta_key( $key, $post_data->og_video, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->keyphrases ) ) { - $key = '_aioseo_wpm_keyphrases'; - $this->create_post_custom_meta_key( $key, $post_data->keyphrases, $post_id, 'serialize', $obj_type ); - } - - if ( isset( $post_data->og_object_type ) ) { - $key = '_aioseo_wpm_og_object_type'; - $this->create_post_custom_meta_key( $key, $post_data->og_object_type, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->twitter_card ) ) { - $key = '_aioseo_wpm_twitter_card'; - $this->create_post_custom_meta_key( $key, $post_data->twitter_card, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->og_image_type ) ) { - $key = '_aioseo_wpm_og_image_type'; - $this->create_post_custom_meta_key( $key, $post_data->og_image_type, $post_id, 'text', $obj_type ); - } - if ( isset( $post_data->og_image_url ) ) { - $key = '_aioseo_wpm_og_image_url'; - $this->create_post_custom_meta_key( $key, $post_data->og_image_url, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->og_image_custom_url ) ) { - $key = '_aioseo_wpm_og_image_custom_url'; - $this->create_post_custom_meta_key( $key, $post_data->og_image_custom_url, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->og_custom_url ) ) { - $key = '_aioseo_wpm_og_custom_url'; - $this->create_post_custom_meta_key( $key, $post_data->og_custom_url, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->twitter_image_type ) ) { - $key = '_aioseo_wpm_twitter_image_type'; - $this->create_post_custom_meta_key( $key, $post_data->twitter_image_type, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->twitter_image_url ) ) { - $key = '_aioseo_wpm_twitter_image_url'; - $this->create_post_custom_meta_key( $key, $post_data->twitter_image_url, $post_id, 'text', $obj_type ); - } - - if ( isset( $post_data->twitter_image_custom_url ) ) { - $key = '_aioseo_wpm_twitter_image_custom_url'; - $this->create_post_custom_meta_key( $key, $post_data->twitter_image_custom_url, $post_id, 'text', $obj_type ); - } - - } -} + '', + '_aioseop_description' => '', + '_aioseop_keywords' => '', + ); + + /** + * WPM_AIOSP constructor. + */ + public function __construct() { + add_filter( 'wpm_option_aioseop_options_config', array( $this, 'set_posts_config' ) ); + add_filter( 'delete_post_metadata', array( $this, 'save_old_fields' ), 10, 5 ); + add_filter( 'add_post_metadata', array( $this, 'update_old_fields' ), 10, 4 ); + add_filter( 'init', array( $this, 'translate_options' ) ); + add_filter( 'aioseo_get_post', array($this, 'aioseo_filter_post_data' )); + add_filter( 'aioseo_get_term', array($this, 'aioseo_filter_post_data' )); + add_action( 'aioseo_insert_post', array($this, 'save_schema_post_meta_data' ) ); + add_action( 'aioseo_insert_term', array($this, 'save_schema_term_meta_data' ) ); + + // AIOSP Sitemap do not support simple tag in sitemap like "xhtml:link" what needed in multilingual sitemap + //add_filter( 'aiosp_sitemap_xml_namespace', array( $this, 'add_namespace' ) ); + } + + /** + * Translate options array on init. + */ + public function translate_options() { + global $aioseop_options; + $aioseop_options = wpm_translate_value( $aioseop_options ); + } + + /** + * Add dynamically title setting for post types + * + * @param array $option_config + * + * @return array + */ + public function set_posts_config( $option_config ) { + + $post_types = get_post_types( array(), 'names' ); + + foreach ( $post_types as $post_type ) { + + if ( null === wpm_get_post_config( $post_type ) ) { + continue; + } + + $option_config[ "aiosp_{$post_type}_title_format" ] = array(); + } + + return $option_config; + } + + /** + * Save old translation before deleting + * + * @param $check + * @param $object_id + * @param $meta_key + * @param $meta_value + * @param $delete_all + * + * @return mixed + */ + public function save_old_fields( $check, $object_id, $meta_key, $meta_value, $delete_all ) { + + if ( $delete_all ) { + return $check; + } + + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return $check; + } + + if ( isset( $this->meta_fields[ $meta_key ] ) ) { + global $wpdb; + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d;", $meta_key, $object_id ) ); + + if ( $old_value ) { + $this->meta_fields[ $meta_key ] = $old_value; + } + } + + return $check; + } + + /** + * Add field with new and old translations + * + * @param $check + * @param $object_id + * @param $meta_key + * @param $meta_value + * + * @return bool|int + */ + public function update_old_fields( $check, $object_id, $meta_key, $meta_value ) { + global $wpdb; + + if ( null === wpm_get_post_config( get_post_type( $object_id ) ) ) { + return $check; + } + + if ( ! empty( $this->meta_fields[ $meta_key ] ) ) { + + $meta_value = wpm_set_new_value( $this->meta_fields[ $meta_key ], $meta_value ); + $meta_value = maybe_serialize( $meta_value ); + + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $result = $wpdb->insert( $wpdb->postmeta, array( + 'post_id' => $object_id, + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key + 'meta_key' => $meta_key, + //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value + 'meta_value' => $meta_value, + ) ); + + if ( ! $result ) { + return false; + } + + $mid = (int) $wpdb->insert_id; + + wp_cache_delete( $object_id, 'post_meta' ); + + return $mid; + } + + return $check; + } + + /** + * Add namespace to sitemap + * + * @since 2.0.0 + * + * @param $namespace + * + * @return mixed + */ + public function add_namespace( $namespace ) { + $namespace['xmlns:xhtml'] = 'http://www.w3.org/1999/xhtml'; + + return $namespace; + } + + /** + * Update all in one seo meta description field value in aioseo_posts table for posts + * @since 2.4.4 + * */ + public function aioseo_filter_post_data( $post ) { + global $wpdb; + // if(is_singular()){ + if ( is_object( $post ) ) { + + $is_post = 0; + $is_term = 0; + + $post_id = 0; + if ( isset( $post->post_id ) ) { + $post_id = $post->post_id; + $is_post = 1; + }else if ( isset( $post->term_id ) ) { + $post_id = $post->term_id; + $is_term = 1; + } + if ( isset( $post->title ) && isset( $post->description ) && $post_id > 0 ) { + $current_lang = wpm_get_language(); + + $table_name = $wpdb->prefix . 'postmeta'; + if ( $is_term == 1 ) { + $table_name = $wpdb->prefix . 'termmeta'; + } + + $meta_key_array = array('_aioseo_title', '_aioseo_description', '_aioseo_twitter_title', '_aioseo_twitter_description', '_aioseo_og_title', '_aioseo_og_description', '_aioseo_wpm_schema', '_aioseo_wpm_canonical_url', '_aioseo_wpm_og_video', '_aioseo_og_article_section', '_aioseo_og_article_tags', '_aioseo_wpm_keyphrases', '_aioseo_wpm_og_object_type', '_aioseo_wpm_twitter_card', '_aioseo_wpm_og_image_type', '_aioseo_wpm_og_image_url', '_aioseo_wpm_og_image_custom_url', '_aioseo_wpm_og_custom_url', '_aioseo_wpm_twitter_image_type', '_aioseo_wpm_twitter_image_url', '_aioseo_wpm_twitter_image_custom_url'); + + // Get _aioseo_description and _aioseo_title values from table + //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $post_meta_result = array(); + if ( $is_post == 1 ) { + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching + $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); + }else if ( $is_term == 1 ) { + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching + $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->termmeta} WHERE term_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); + } + + if ( is_array( $post_meta_result ) && count( $post_meta_result ) > 0 ) { + foreach ( $post_meta_result as $pmr_key => $pmr_value ) { + if ( ! empty( $pmr_value ) && is_object( $pmr_value ) ) { + if ( isset( $pmr_value->post_id ) || isset( $pmr_value->term_id ) ) { + if($pmr_value->meta_key == '_aioseo_title'){ + $post->title = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_description'){ + $post->description = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_twitter_title'){ + $post->twitter_title = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_twitter_description'){ + $post->twitter_description = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_og_title'){ + $post->og_title = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_og_description'){ + $post->og_description = wpm_translate_string($pmr_value->meta_value, $current_lang); + } + if($pmr_value->meta_key == '_aioseo_wpm_schema'){ + + $schema_data = $pmr_value->meta_value; + if ( ! empty( $schema_data ) && is_string( $schema_data ) ) { + $schema_data = maybe_unserialize( base64_decode( wpm_translate_value( $schema_data ) , true ) ); + + if ( ! empty( $schema_data ) && is_string( $schema_data ) ) { + $post->schema = json_decode( $schema_data ); + } + } + } + if($pmr_value->meta_key == '_aioseo_wpm_canonical_url'){ + $post->canonical_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_og_video'){ + $post->og_video = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_og_article_section'){ + $post->og_article_section = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_og_article_tags'){ + + $tags = array(); + $article_tags = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + if ( ! empty( $article_tags ) ) { + $article_tags = explode( ',', $article_tags ); + if ( ! empty( $article_tags ) && is_array( $article_tags ) ) { + foreach ( $article_tags as $article_tag ) { + $tag = array( + 'label' => $article_tag, + 'value' => $article_tag, + ); + $tags[] = $tag; + + } + } + } + if ( ! empty( $tags ) ) { + $post->og_article_tags = wp_json_encode( $tags ); + } + + } + if($pmr_value->meta_key == '_aioseo_wpm_keyphrases'){ + + $keyphrases = $pmr_value->meta_value; + if ( ! empty( $keyphrases ) && is_string( $keyphrases ) ) { + $keyphrases = maybe_unserialize( base64_decode( wpm_translate_value( $keyphrases ) , true ) ); + if ( ! empty( $keyphrases ) && is_string( $keyphrases ) ) { + if ( isset( $post->keyphrases ) && is_object( $post->keyphrases ) ) { + $post->keyphrases = json_decode( $keyphrases ); + }else{ + $post->keyphrases = $keyphrases; + } + } + } + } + if($pmr_value->meta_key == '_aioseo_wpm_og_object_type'){ + $post->og_object_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_twitter_card'){ + $post->twitter_card = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_og_image_type'){ + $post->og_image_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_og_image_url'){ + $post->og_image_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_og_image_custom_url'){ + $post->og_image_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_og_custom_url'){ + $post->og_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_type'){ + $post->twitter_image_type = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_url'){ + $post->twitter_image_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + if($pmr_value->meta_key == '_aioseo_wpm_twitter_image_custom_url'){ + $post->twitter_image_custom_url = wpm_translate_string( $pmr_value->meta_value, $current_lang ); + } + + } + } + } + } + } + } + return $post; + } + + /** + * Create custom meta key and store data + * @param $key string + * @param $data mixed + * @param $id integer + * @param $type string + * @since 2.4.16 + * */ + public function create_post_custom_meta_key( $key, $db_value, $id, $type, $obj_type ){ + + switch ( $type ){ + + case 'text': + + $current_value = ''; + if ( $obj_type == 'post' ) { + $current_value = get_post_meta( $id, $key, true ); + }else if ( $obj_type == 'term' ) { + $current_value = get_term_meta( $id, $key, true ); + } + + if ( empty( $current_value ) ) { + $current_value = $db_value; + } + + if ( $obj_type == 'post' ) { + update_post_meta( $id, $key, wpm_set_new_value( $current_value, $db_value ) ); + }else if( $obj_type == 'term' ) { + update_term_meta( $id, $key, wpm_set_new_value( $current_value, $db_value ) ); + } + + break; + + case 'serialize': + + $current_value = ''; + if ( $obj_type == 'post' ) { + $current_value = get_post_meta( $id, $key, true ); + }else if ( $obj_type == 'term' ) { + $current_value = get_term_meta( $id, $key, true ); + } + + if ( is_object( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + if ( empty( $current_value ) ) { + $current_value = base64_encode( $db_value ); + } + + if ( $obj_type == 'post' ) { + update_post_meta( $id, $key, wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + } else if( $obj_type == 'term' ) { + update_term_meta( $id, $key, wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + } + + break; + + } + + } + + /** + * Create post meta for schema and store data into it + * @param post_id int + * @since 2.4.16 + * */ + public function save_schema_post_meta_data( $post_id ) { + + if ( $post_id > 0 ) { + + global $wpdb; + + $table = $wpdb->prefix.'aioseo_posts'; + //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $post_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE post_id = %d" , $post_id ) ); + + if ( ! empty( $post_data ) && is_object($post_data) ) { + + $this->save_aiseo_meta_fields( $post_data, 'post', $post_id ); + + } + + } + + } + + /** + * Save term post meta fields + * @param $post_id int + * @since 2.4.16 + * */ + public function save_schema_term_meta_data( $post_id ){ + + if ( $post_id > 0 ) { + + global $wpdb; + + $table = $wpdb->prefix.'aioseo_terms'; + //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $term_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE term_id = %d" , $post_id ) ); + + if ( ! empty( $term_data ) && is_object($term_data) ) { + + $this->save_aiseo_meta_fields( $term_data, 'term', $post_id ); + + } + + } + + } + + /** + * Save term post and term meta fields + * @param $post_id int + * @param $obj_type string + * @since 2.4.16 + * */ + public function save_aiseo_meta_fields( $post_data, $obj_type, $post_id ){ + + if ( isset( $post_data->schema ) ) { + + $key = '_aioseo_wpm_schema'; + $this->create_post_custom_meta_key( $key, $post_data->schema, $post_id, 'serialize', $obj_type ); + } + + if ( isset( $post_data->canonical_url ) ) { + $key = '_aioseo_wpm_canonical_url'; + $this->create_post_custom_meta_key( $key, $post_data->canonical_url, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->og_video ) ) { + $key = '_aioseo_wpm_og_video'; + $this->create_post_custom_meta_key( $key, $post_data->og_video, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->keyphrases ) ) { + $key = '_aioseo_wpm_keyphrases'; + $this->create_post_custom_meta_key( $key, $post_data->keyphrases, $post_id, 'serialize', $obj_type ); + } + + if ( isset( $post_data->og_object_type ) ) { + $key = '_aioseo_wpm_og_object_type'; + $this->create_post_custom_meta_key( $key, $post_data->og_object_type, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->twitter_card ) ) { + $key = '_aioseo_wpm_twitter_card'; + $this->create_post_custom_meta_key( $key, $post_data->twitter_card, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->og_image_type ) ) { + $key = '_aioseo_wpm_og_image_type'; + $this->create_post_custom_meta_key( $key, $post_data->og_image_type, $post_id, 'text', $obj_type ); + } + if ( isset( $post_data->og_image_url ) ) { + $key = '_aioseo_wpm_og_image_url'; + $this->create_post_custom_meta_key( $key, $post_data->og_image_url, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->og_image_custom_url ) ) { + $key = '_aioseo_wpm_og_image_custom_url'; + $this->create_post_custom_meta_key( $key, $post_data->og_image_custom_url, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->og_custom_url ) ) { + $key = '_aioseo_wpm_og_custom_url'; + $this->create_post_custom_meta_key( $key, $post_data->og_custom_url, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->twitter_image_type ) ) { + $key = '_aioseo_wpm_twitter_image_type'; + $this->create_post_custom_meta_key( $key, $post_data->twitter_image_type, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->twitter_image_url ) ) { + $key = '_aioseo_wpm_twitter_image_url'; + $this->create_post_custom_meta_key( $key, $post_data->twitter_image_url, $post_id, 'text', $obj_type ); + } + + if ( isset( $post_data->twitter_image_custom_url ) ) { + $key = '_aioseo_wpm_twitter_image_custom_url'; + $this->create_post_custom_meta_key( $key, $post_data->twitter_image_custom_url, $post_id, 'text', $obj_type ); + } + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-better-search.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-better-search.php index e0ff47c7e..48a9ae3fc 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-better-search.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-better-search.php @@ -1,64 +1,64 @@ -post_excerpt; - } - if ( '' == $content ) { - $content = get_post( $id )->post_content; - } - - $content = wpm_translate_string( $content ); - $output = wp_strip_all_tags( strip_shortcodes( $content ) ); - - if ( $excerpt_length > 0 ) { - $output = wp_trim_words( $output, $excerpt_length ); - } - - return $output; - } -} +post_excerpt; + } + if ( '' == $content ) { + $content = get_post( $id )->post_content; + } + + $content = wpm_translate_string( $content ); + $output = wp_strip_all_tags( strip_shortcodes( $content ) ); + + if ( $excerpt_length > 0 ) { + $output = wp_trim_words( $output, $excerpt_length ); + } + + return $output; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-buddypress.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-buddypress.php index c30ab35e4..8daac4b0c 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-buddypress.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-buddypress.php @@ -1,211 +1,211 @@ -get_post_object(); - $untranslated_post = wpm_untranslate_post( $post ); - $lang = get_user_meta( $to, 'wpm_lang', true ); - $translated_post = wpm_translate_object( $untranslated_post, $lang ); - $email->set_post_object( $translated_post ); - - return $email; - } - - - /** - * Translate activity meta value - * - * @param $value - * - * @return array|mixed|string - */ - public function translate_meta_value( $value ) { - if ( ! is_admin() ) { - $value = wpm_translate_value( $value ); - } - - return $value; - } - - - /** - * Untranslate field group name and set new lang value before saving - * - * @param string $name - * @param integer $field_group_id - * - * @return string - */ - public function save_group_name( $name, $field_group_id ) { - - if ( ! $this->field_group ) { - $this->field_group = xprofile_get_field_group( $field_group_id ); - } - - $name = wpm_set_new_value( $this->field_group->name, $name ); - - return $name; - } - - - /** - * Untranslate field group description and set new lang value before saving - * - * @param string $description - * - * @return string - */ - public function save_group_description( $description ) { - $description = wpm_set_new_value( $this->field_group->description, $description ); - - return $description; - } - - - /** - * Untranslate field name and set new lang value before saving - * - * @param string $name - * @param integer $field_id - * - * @return string - */ - public function save_field_name( $name, $field_id ) { - - if ( ! $this->field ) { - $this->field = xprofile_get_field( $field_id ); - } - - $name = wpm_set_new_value( $this->field->name, $name ); - - return $name; - } - - - /** - * Untranslate field description and set new lang value before saving - * - * @param string $description - * - * @return string - */ - public function save_field_description( $description ) { - $description = wpm_set_new_value( $this->field->description, $description ); - - return $description; - } - - /** - * Remove translate filter before display options in admin - * - * @param array $children - * - * @return array - */ - public function remove_filter( $children ) { - remove_filter( 'attribute_escape', 'wpm_attribute_escape', 5 ); - - return $children; - } -} +get_post_object(); + $untranslated_post = wpm_untranslate_post( $post ); + $lang = get_user_meta( $to, 'wpm_lang', true ); + $translated_post = wpm_translate_object( $untranslated_post, $lang ); + $email->set_post_object( $translated_post ); + + return $email; + } + + + /** + * Translate activity meta value + * + * @param $value + * + * @return array|mixed|string + */ + public function translate_meta_value( $value ) { + if ( ! is_admin() ) { + $value = wpm_translate_value( $value ); + } + + return $value; + } + + + /** + * Untranslate field group name and set new lang value before saving + * + * @param string $name + * @param integer $field_group_id + * + * @return string + */ + public function save_group_name( $name, $field_group_id ) { + + if ( ! $this->field_group ) { + $this->field_group = xprofile_get_field_group( $field_group_id ); + } + + $name = wpm_set_new_value( $this->field_group->name, $name ); + + return $name; + } + + + /** + * Untranslate field group description and set new lang value before saving + * + * @param string $description + * + * @return string + */ + public function save_group_description( $description ) { + $description = wpm_set_new_value( $this->field_group->description, $description ); + + return $description; + } + + + /** + * Untranslate field name and set new lang value before saving + * + * @param string $name + * @param integer $field_id + * + * @return string + */ + public function save_field_name( $name, $field_id ) { + + if ( ! $this->field ) { + $this->field = xprofile_get_field( $field_id ); + } + + $name = wpm_set_new_value( $this->field->name, $name ); + + return $name; + } + + + /** + * Untranslate field description and set new lang value before saving + * + * @param string $description + * + * @return string + */ + public function save_field_description( $description ) { + $description = wpm_set_new_value( $this->field->description, $description ); + + return $description; + } + + /** + * Remove translate filter before display options in admin + * + * @param array $children + * + * @return array + */ + public function remove_filter( $children ) { + remove_filter( 'attribute_escape', 'wpm_attribute_escape', 5 ); + + return $children; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-bylaw-plus.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-bylaw-plus.php index aca8c2bbf..1f0697ecf 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-bylaw-plus.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-bylaw-plus.php @@ -1,28 +1,28 @@ -title())){ - $wpcf7->set_title( wpm_translate_string( $wpcf7->title() ) ); - } - } - - /** - * Unslash meta data with _form key - * @since 2.4.8 - * */ - public function unslash_cf7_form_meta_value($meta_value, $meta_key){ - if($meta_key == '_form' && is_string($meta_value)){ - $meta_value = wp_unslash($meta_value); - } - return $meta_value; - } -} +title())){ + $wpcf7->set_title( wpm_translate_string( $wpcf7->title() ) ); + } + } + + /** + * Unslash meta data with _form key + * @since 2.4.8 + * */ + public function unslash_cf7_form_meta_value($meta_value, $meta_key){ + if($meta_key == '_form' && is_string($meta_value)){ + $meta_value = wp_unslash($meta_value); + } + return $meta_value; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-daext-autolinks-manager.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-daext-autolinks-manager.php new file mode 100644 index 000000000..7d96abb11 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-daext-autolinks-manager.php @@ -0,0 +1,420 @@ + wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'wpm_daext_autolinks_nonce' => wp_create_nonce( 'wpm-daext-autolinks-localization' ), + ); + + wp_register_script( 'wpm-daext-autolinks-script', wpm_asset_path( 'scripts/wpm-daext-autolinks' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_localize_script( 'wpm-daext-autolinks-script', 'wpm_daext_autolinks_params', $main_params ); + wp_enqueue_script( 'wpm-daext-autolinks-script' ); + } + } + + /** + * Intercept form submissions to store translations in options + */ + public function intercept_form_submissions() { + if ( ! is_admin() || ! isset( $_GET['page'] ) ) { + return; + } + + global $wpdb; + + $current_lang = wpm_get_language(); + $default_lang = wpm_get_default_language(); + + if ( $_GET['page'] === 'daextam-categories' && ( isset( $_POST['form_submitted'] ) || isset( $_POST['update_id'] ) ) ) { + $update_id = isset( $_POST['update_id'] ) ? intval( $_POST['update_id'], 10 ) : null; + + if ( $update_id ) { + $existing = $wpdb->get_row( $wpdb->prepare( "SELECT name, description FROM {$wpdb->prefix}daextam_category WHERE category_id = %d", $update_id ), ARRAY_A ); + if ( $existing ) { + if ( $current_lang !== $default_lang ) { + $option_key = "wpm_daextam_category_{$update_id}_translate"; + $translations = get_option( $option_key, array() ); + if ( ! is_array( $translations ) ) { + $translations = array(); + } + + if ( isset( $_POST['name'] ) ) { + $translations['name'][ $current_lang ] = sanitize_text_field( wp_unslash( $_POST['name'] ) ); + $_POST['name'] = $existing['name']; // Revert to keep DB clean + } + if ( isset( $_POST['description'] ) ) { + $translations['description'][ $current_lang ] = sanitize_text_field( wp_unslash( $_POST['description'] ) ); + $_POST['description'] = $existing['description']; // Revert to keep DB clean + } + + update_option( $option_key, $translations ); + } + } + } + } + + if ( $_GET['page'] === 'daextam-autolinks' && ( isset( $_POST['form_submitted'] ) || isset( $_POST['update_id'] ) ) ) { + $update_id = isset( $_POST['update_id'] ) ? intval( $_POST['update_id'], 10 ) : null; + + if ( $update_id ) { + $existing = $wpdb->get_row( $wpdb->prepare( "SELECT name, keyword, title, url FROM {$wpdb->prefix}daextam_autolink WHERE autolink_id = %d", $update_id ), ARRAY_A ); + if ( $existing ) { + if ( $current_lang !== $default_lang ) { + $option_key = "wpm_daextam_autolink_{$update_id}_translate"; + $translations = get_option( $option_key, array() ); + if ( ! is_array( $translations ) ) { + $translations = array(); + } + + $fields = array( 'name', 'keyword', 'title', 'url' ); + foreach ( $fields as $field ) { + if ( isset( $_POST[ $field ] ) ) { + if ( $field === 'url' ) { + $translations[ $field ][ $current_lang ] = esc_url_raw( wp_unslash( $_POST[ $field ] ) ); + } else { + $translations[ $field ][ $current_lang ] = sanitize_text_field( wp_unslash( $_POST[ $field ] ) ); + } + $_POST[ $field ] = $existing[ $field ]; // Revert to keep DB clean + } + } + + update_option( $option_key, $translations ); + } + } + } + } + } + + /** + * Wrap global $wpdb on Autolink Manager admin screens + */ + public function admin_db_wrapper() { + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + $pages = array( 'autolinks_page_daextam-categories', 'autolinks_page_daextam-autolinks', 'autolinks_page_daextam-dashboard', 'toplevel_page_daextam-dashboard' ); + + if ( in_array( $screen_id, $pages, true ) ) { + global $wpdb; + $wpdb = new WPM_WPDB_Wrapper( $wpdb ); + } + } + + /** + * Wrap global $wpdb during REST API requests + */ + public function rest_db_wrapper() { + global $wpdb; + $wpdb = new WPM_WPDB_Wrapper( $wpdb ); + } + + /** + * Enable wrapper before autolink replacement + */ + public function add_autolinks_translation_wrapper( $content ) { + global $wpdb; + $this->original_wpdb = $wpdb; + $wpdb = new WPM_WPDB_Wrapper( $wpdb ); + return $content; + } + + /** + * Disable wrapper after autolink replacement + */ + public function remove_autolinks_translation_wrapper( $content ) { + global $wpdb; + if ( $this->original_wpdb && $wpdb instanceof WPM_WPDB_Wrapper ) { + // Copy all updated properties back to the original wpdb instance + $wpdb->sync_properties_back(); + $wpdb = $this->original_wpdb; + $this->original_wpdb = null; + } + return $content; + } +} + +/** + * Custom wpdb wrapper class to translate Category & Autolink results dynamically from options + */ +class WPM_WPDB_Wrapper extends \wpdb { + private $real_wpdb; + private static $autolink_translations_cache = null; + private static $category_translations_cache = null; + + public function __construct( $real_wpdb ) { + $this->real_wpdb = $real_wpdb; + $this->sync_properties(); + } + + /** + * Synchronize properties from real_wpdb to this wrapper + */ + private function sync_properties() { + foreach ( get_object_vars( $this->real_wpdb ) as $key => $val ) { + if ( $key !== 'result' ) { + $this->$key = $val; + } + } + + // Translate last_result if it is set + if ( is_array( $this->last_result ) && ! empty( $this->last_result ) ) { + $current_lang = wpm_get_language(); + $default_lang = wpm_get_default_language(); + + if ( $current_lang !== $default_lang ) { + $query = $this->last_query; + if ( stripos( $query, 'daextam_category' ) !== false ) { + foreach ( $this->last_result as $key => $row ) { + $has_id = is_array( $row ) ? isset( $row['category_id'] ) : isset( $row->category_id ); + if ( ! $has_id ) { + continue; + } + $id = is_array( $row ) ? $row['category_id'] : $row->category_id; + $translations = $this->get_category_translations( $id ); + if ( is_array( $translations ) && ! empty( $translations ) ) { + if ( is_array( $row ) ) { + if ( isset( $translations['name'][ $current_lang ] ) && ! empty( $translations['name'][ $current_lang ] ) ) { + $this->last_result[ $key ]['name'] = $translations['name'][ $current_lang ]; + } + if ( isset( $translations['description'][ $current_lang ] ) && ! empty( $translations['description'][ $current_lang ] ) ) { + $this->last_result[ $key ]['description'] = $translations['description'][ $current_lang ]; + } + } else if ( is_object( $row ) ) { + if ( isset( $translations['name'][ $current_lang ] ) && ! empty( $translations['name'][ $current_lang ] ) ) { + $row->name = $translations['name'][ $current_lang ]; + } + if ( isset( $translations['description'][ $current_lang ] ) && ! empty( $translations['description'][ $current_lang ] ) ) { + $row->description = $translations['description'][ $current_lang ]; + } + } + } + } + } elseif ( stripos( $query, 'daextam_autolink' ) !== false ) { + foreach ( $this->last_result as $key => $row ) { + $has_id = is_array( $row ) ? isset( $row['autolink_id'] ) : isset( $row->autolink_id ); + if ( ! $has_id ) { + continue; + } + $id = is_array( $row ) ? $row['autolink_id'] : $row->autolink_id; + $translations = $this->get_autolink_translations( $id ); + if ( is_array( $translations ) && ! empty( $translations ) ) { + $fields = array( 'name', 'keyword', 'title', 'url' ); + foreach ( $fields as $field ) { + if ( is_array( $row ) ) { + if ( isset( $translations[ $field ][ $current_lang ] ) && ! empty( $translations[ $field ][ $current_lang ] ) ) { + $this->last_result[ $key ][ $field ] = $translations[ $field ][ $current_lang ]; + } + } else if ( is_object( $row ) ) { + if ( isset( $translations[ $field ][ $current_lang ] ) && ! empty( $translations[ $field ][ $current_lang ] ) ) { + $row->$field = $translations[ $field ][ $current_lang ]; + } + } + } + } + } + } + } + + // Post titles in daextam_statistic must always be cleaned/translated, even for the default language + $query = $this->last_query; + if ( stripos( $query, 'daextam_statistic' ) !== false ) { + foreach ( $this->last_result as $key => $row ) { + if ( is_array( $row ) ) { + if ( isset( $row['post_title'] ) ) { + $this->last_result[ $key ]['post_title'] = wpm_translate_string( $row['post_title'] ); + } + } else if ( is_object( $row ) ) { + if ( isset( $row->post_title ) ) { + $row->post_title = wpm_translate_string( $row->post_title ); + } + } + } + } + } + } + + /** + * Synchronize properties back to the real_wpdb instance + */ + public function sync_properties_back() { + foreach ( get_object_vars( $this ) as $key => $val ) { + if ( $key !== 'real_wpdb' && $key !== 'result' && $key !== 'dbh' ) { + $this->real_wpdb->$key = $val; + } + } + } + + public function prepare( $query, ...$args ) { + return $this->real_wpdb->prepare( $query, ...$args ); + } + + public function query( $query ) { + $result = $this->real_wpdb->query( $query ); + $this->sync_properties(); + return $result; + } + + private function get_category_translations( $id ) { + if ( self::$category_translations_cache === null ) { + $real_wpdb = $this->real_wpdb; + $results = $real_wpdb->get_results( + "SELECT option_name, option_value FROM {$real_wpdb->prefix}options WHERE option_name LIKE 'wpm_daextam_category_%_translate'", + ARRAY_A + ); + self::$category_translations_cache = array(); + if ( is_array( $results ) ) { + foreach ( $results as $row ) { + if ( preg_match( '/wpm_daextam_category_(\d+)_translate/', $row['option_name'], $matches ) ) { + $category_id = intval( $matches[1] ); + self::$category_translations_cache[ $category_id ] = maybe_unserialize( $row['option_value'] ); + } + } + } + } + return isset( self::$category_translations_cache[ $id ] ) ? self::$category_translations_cache[ $id ] : array(); + } + + private function get_autolink_translations( $id ) { + if ( self::$autolink_translations_cache === null ) { + $real_wpdb = $this->real_wpdb; + $results = $real_wpdb->get_results( + "SELECT option_name, option_value FROM {$real_wpdb->prefix}options WHERE option_name LIKE 'wpm_daextam_autolink_%_translate'", + ARRAY_A + ); + self::$autolink_translations_cache = array(); + if ( is_array( $results ) ) { + foreach ( $results as $row ) { + if ( preg_match( '/wpm_daextam_autolink_(\d+)_translate/', $row['option_name'], $matches ) ) { + $autolink_id = intval( $matches[1] ); + self::$autolink_translations_cache[ $autolink_id ] = maybe_unserialize( $row['option_value'] ); + } + } + } + } + return isset( self::$autolink_translations_cache[ $id ] ) ? self::$autolink_translations_cache[ $id ] : array(); + } + + public function get_results( $query = null, $output = OBJECT ) { + if ( $query === null ) { + return $this->last_result; + } + + $results = $this->real_wpdb->get_results( $query, $output ); + $this->sync_properties(); + + // Translate $results directly to return it in the correct format + if ( is_array( $results ) && ! empty( $results ) ) { + $current_lang = wpm_get_language(); + $default_lang = wpm_get_default_language(); + + if ( $current_lang !== $default_lang ) { + if ( stripos( $query, 'daextam_category' ) !== false ) { + foreach ( $results as $key => $row ) { + $has_id = is_array( $row ) ? isset( $row['category_id'] ) : isset( $row->category_id ); + if ( ! $has_id ) { + continue; + } + $id = is_array( $row ) ? $row['category_id'] : $row->category_id; + $translations = $this->get_category_translations( $id ); + if ( is_array( $translations ) && ! empty( $translations ) ) { + if ( is_array( $row ) ) { + if ( isset( $translations['name'][ $current_lang ] ) && ! empty( $translations['name'][ $current_lang ] ) ) { + $results[ $key ]['name'] = $translations['name'][ $current_lang ]; + } + if ( isset( $translations['description'][ $current_lang ] ) && ! empty( $translations['description'][ $current_lang ] ) ) { + $results[ $key ]['description'] = $translations['description'][ $current_lang ]; + } + } else if ( is_object( $row ) ) { + if ( isset( $translations['name'][ $current_lang ] ) && ! empty( $translations['name'][ $current_lang ] ) ) { + $row->name = $translations['name'][ $current_lang ]; + } + if ( isset( $translations['description'][ $current_lang ] ) && ! empty( $translations['description'][ $current_lang ] ) ) { + $row->description = $translations['description'][ $current_lang ]; + } + } + } + } + } elseif ( stripos( $query, 'daextam_autolink' ) !== false ) { + foreach ( $results as $key => $row ) { + $has_id = is_array( $row ) ? isset( $row['autolink_id'] ) : isset( $row->autolink_id ); + if ( ! $has_id ) { + continue; + } + $id = is_array( $row ) ? $row['autolink_id'] : $row->autolink_id; + $translations = $this->get_autolink_translations( $id ); + if ( is_array( $translations ) && ! empty( $translations ) ) { + $fields = array( 'name', 'keyword', 'title', 'url' ); + foreach ( $fields as $field ) { + if ( is_array( $row ) ) { + if ( isset( $translations[ $field ][ $current_lang ] ) && ! empty( $translations[ $field ][ $current_lang ] ) ) { + $results[ $key ][ $field ] = $translations[ $field ][ $current_lang ]; + } + } else if ( is_object( $row ) ) { + if ( isset( $translations[ $field ][ $current_lang ] ) && ! empty( $translations[ $field ][ $current_lang ] ) ) { + $row->$field = $translations[ $field ][ $current_lang ]; + } + } + } + } + } + } + } + + if ( stripos( $query, 'daextam_statistic' ) !== false ) { + foreach ( $results as $key => $row ) { + if ( is_array( $row ) ) { + if ( isset( $row['post_title'] ) ) { + $results[ $key ]['post_title'] = wpm_translate_string( $row['post_title'] ); + } + } else if ( is_object( $row ) ) { + if ( isset( $row->post_title ) ) { + $row->post_title = wpm_translate_string( $row->post_title ); + } + } + } + } + } + + return $results; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fluentform.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fluentform.php new file mode 100644 index 000000000..f9f49d45d --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fluentform.php @@ -0,0 +1,411 @@ +id ) ? absint( $form->id ) : 0; + + if ( ! $form_id || ! is_array( $data ) ) { + return; + } + + if ( isset( $data['title'] ) ) { + $old_title = isset( $form->title ) ? $form->title : ''; + $this->set_value( self::WPM_FORM_TITLE . $form_id, $data['title'], $old_title ); + } + + if ( isset( $data['form_fields'] ) ) { + $old_fields = isset( $form->form_fields ) ? $form->form_fields : ''; + $this->set_value( self::WPM_FORM_FIELDS . $form_id, $data['form_fields'], $old_fields ); + } + } + + /** + * Store Fluent Forms fields before saving into custom tables. + * + * @param string $form_fields Form fields JSON. + * @param int $form_id Form ID. + * @return string + * @since 2.4.29 + */ + public function store_form_fields( $form_fields, $form_id ) { + + $form_id = absint( $form_id ); + + if ( $form_id ) { + $this->set_value( self::WPM_FORM_FIELDS . $form_id, $form_fields, $this->get_form_column( $form_id, 'form_fields' ) ); + } + + return $form_fields; + } + + /** + * Store Fluent Forms settings before saving into custom tables. + * + * @param int $form_id Form ID. + * @param array $data Request data. + * @since 2.4.29 + */ + public function store_form_settings( $form_id, $data ) { + + $form_id = absint( $form_id ); + + if ( ! $form_id || ! is_array( $data ) ) { + return; + } + + if ( isset( $data['formSettings'] ) ) { + $value = $data['formSettings']; + if ( is_string( $value ) ) { + $decoded = json_decode( $value, true ); + $value = is_array( $decoded ) ? $decoded : $value; + } + $this->set_value( self::WPM_FORM_SETTINGS . $form_id, $value, $this->get_form_meta_value( $form_id, 'formSettings' ) ); + } + + if ( isset( $data['meta_key'], $data['value'] ) && 'formSettings' === $data['meta_key'] ) { + $value = $data['value']; + if ( is_string( $value ) ) { + $decoded = json_decode( $value, true ); + $value = is_array( $decoded ) ? $decoded : $value; + } + $this->set_value( self::WPM_FORM_SETTINGS . $form_id, $value, $this->get_form_meta_value( $form_id, 'formSettings' ) ); + } + } + + /** + * Render Fluent Forms data in current language. + * + * @param object $form Fluent Forms form object. + * @return object + * @since 2.4.29 + */ + public function render_form_data( $form ) { + + $form_id = isset( $form->id ) ? absint( $form->id ) : 0; + + if ( ! $form_id ) { + return $form; + } + + $title = $this->get_value( self::WPM_FORM_TITLE . $form_id, '' ); + if ( '' !== $title ) { + $form->title = $title; + } elseif ( isset( $form->title ) ) { + $form->title = wpm_translate_string( $form->title ); + } + + $fields = $this->get_value( self::WPM_FORM_FIELDS . $form_id, '' ); + if ( is_string( $fields ) && '' !== $fields ) { + $fields = json_decode( $fields, true ); + } + + if ( is_array( $fields ) ) { + $form->fields = $fields; + } elseif ( isset( $form->fields ) && is_array( $form->fields ) ) { + $form->fields = wpm_translate_value( $form->fields ); + } + + $settings = $this->get_value( self::WPM_FORM_SETTINGS . $form_id, '' ); + if ( is_array( $settings ) ) { + $form->settings = $settings; + } elseif ( isset( $form->settings ) && is_array( $form->settings ) ) { + $form->settings = wpm_translate_value( $form->settings ); + } + + return $form; + } + + /** + * Render Fluent Forms editor vars in current language. + * + * @param array $data Editor vars. + * @return array + * @since 2.4.29 + */ + public function render_editor_vars( $data ) { + + $form_id = isset( $data['form_id'] ) ? absint( $data['form_id'] ) : 0; + + if ( ! $form_id || empty( $data['form'] ) || ! is_object( $data['form'] ) ) { + return $data; + } + + $form = $this->render_form_data( $data['form'] ); + + if ( isset( $form->fields ) && is_array( $form->fields ) ) { + $form->form_fields = wp_json_encode( $form->fields ); + } + + $data['form'] = $form; + + return $data; + } + + /** + * Render settings ajax response in current language. + * + * @param array $settings Settings response. + * @param int $form_id Form ID. + * @return array + * @since 2.4.29 + */ + public function render_form_settings_ajax( $settings, $form_id ) { + + $value = $this->get_value( self::WPM_FORM_SETTINGS . absint( $form_id ), '' ); + + if ( is_array( $value ) && isset( $settings['generalSettings'] ) ) { + $settings['generalSettings'] = $value; + } elseif ( isset( $settings['generalSettings'] ) && is_array( $settings['generalSettings'] ) ) { + $settings['generalSettings'] = wpm_translate_value( $settings['generalSettings'] ); + } + + return $settings; + } + + /** + * Render meta key response in current language. + * + * @param array $result Meta response. + * @param int $form_id Form ID. + * @param string $meta_key Meta key. + * @return array + * @since 2.4.29 + */ + public function render_meta_key_settings_response( $result, $form_id, $meta_key ) { + + if ( 'formSettings' !== $meta_key || ! is_array( $result ) ) { + return $result; + } + + $value = $this->get_value( self::WPM_FORM_SETTINGS . absint( $form_id ), '' ); + + foreach ( $result as $item ) { + if ( is_object( $item ) && isset( $item->value ) ) { + $item->value = is_array( $value ) ? $value : wpm_translate_value( $item->value ); + } + } + + return $result; + } + + /** + * Render confirmation in current language. + * + * @param array $confirmation Confirmation data. + * @param array $form_data Form data. + * @param object $form Form object. + * @param int $insert_id Entry ID. + * @return array + * @since 2.4.29 + */ + public function render_submission_confirmation( $confirmation, $form_data, $form, $insert_id = 0 ) { + + if ( is_array( $confirmation ) ) { + $confirmation = wpm_translate_value( $confirmation ); + } + + return $confirmation; + } + + /** + * Set translate value in base64. + * + * @param string $key Option key. + * @param mixed $value Option value. + * @return mixed + * @since 2.4.29 + */ + private function set_value( $key, $value, $old_value = '' ) { + + $current_value = get_option( "{$key}_translate", '' ); + + if ( empty( $current_value ) ) { + $current_value = $old_value ? $old_value : get_option( $key, '' ); + + if ( ! empty( $current_value ) ) { + if ( is_array( $current_value ) || is_object( $current_value ) ) { + $current_value = maybe_serialize( $current_value ); + } + $current_value = base64_encode( $current_value ); + } + } + + $db_value = $value; + if ( is_array( $db_value ) || is_object( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_option( $key, $db_value ); + update_option( "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + return $value; + } + + /** + * Get value from Fluent Forms table. + * + * @param int $form_id Form ID. + * @param string $column Column name. + * @return string + * @since 2.4.29 + */ + private function get_form_column( $form_id, $column ) { + + global $wpdb; + + if ( ! in_array( $column, array( 'title', 'form_fields' ), true ) ) { + return ''; + } + + $table = $wpdb->prefix . 'fluentform_forms'; + + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Fluent Forms stores form data in a custom table. + return (string) $wpdb->get_var( $wpdb->prepare( "SELECT {$column} FROM {$table} WHERE id = %d", $form_id ) ); + } + + /** + * Get value from Fluent Forms meta table. + * + * @param int $form_id Form ID. + * @param string $meta_key Meta key. + * @return mixed + * @since 2.4.29 + */ + private function get_form_meta_value( $form_id, $meta_key ) { + + global $wpdb; + + $table = $wpdb->prefix . 'fluentform_form_meta'; + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Fluent Forms stores form meta in a custom table. + $value = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM {$table} WHERE form_id = %d AND meta_key = %s LIMIT 1", $form_id, $meta_key ) ); + + if ( is_string( $value ) ) { + $decoded = json_decode( $value, true ); + if ( is_array( $decoded ) ) { + return $decoded; + } + } + + return $value; + } + + /** + * Get translate value from base64. + * + * @param string $key Option key. + * @param mixed $default Default value. + * @return mixed + * @since 2.4.29 + */ + private function get_value( $key, $default = '' ) { + + $tr_value = base64_decode( wpm_translate_value( get_option( "{$key}_translate", '' ) ), true ); + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + } + + return $default; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-forminator.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-forminator.php index 3cc94e5d4..acdc4106e 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-forminator.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-forminator.php @@ -1,194 +1,194 @@ - array( - 'set_form_meta_value', - 'get_form_meta_value' - ), - ); - - //Install meta Filters - foreach ($meta_keys as $meta_key => $callbacks) { - - add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); - add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); - } - - add_action( 'admin_enqueue_scripts', array( $this, 'add_lang_switcher_script'), 99 ); - - } - - /** - * load scripts and styles for forminator plugin - * - * @param $hook_suffix - * @since 2.4.16 - */ - public function add_lang_switcher_script( $hook_suffix ) { - - $pages = array( 'forminator_page_forminator-cform', 'forminator_page_forminator-poll', 'forminator_page_forminator-quiz', 'forminator_page_forminator-poll-wizard', 'forminator_page_forminator-cform-wizard', 'forminator_page_forminator-knowledge-wizard', 'forminator_page_forminator-entries' ); - - if ( in_array( $hook_suffix, $pages ) ) { - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - $main_params = array( - 'plugin_url' => wpm()->plugin_url(), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'wpm_forminator_nonce' => wp_create_nonce( 'wpm-forminator-localization' ), - ); - - wp_register_script( 'wpm-forminator-script', wpm_asset_path( 'scripts/wpm-forminator' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); - wp_localize_script( 'wpm-forminator-script', 'wpm_forminator_params', $main_params ); - wp_enqueue_script( 'wpm-forminator-script' ); - - wp_enqueue_style( 'wpm-forminator-css', wpm_asset_path( 'styles/admin/wpm-forminator' . $suffix . '.css' ), array(), WPM_VERSION ); - - } - - } - - /** - * Config meta keys - * - * @param $config - * @param $meta_value - * @param $object_id - * @return mixed - * @since 2.4.16 - */ - public function config( $config, $meta_value, $object_id ) { - - $this->object_id = $object_id; - - return $config; - } - - /** - * Set meta translate in base64 - * - * @param $key - * @param $value - * @return mixed - * @since 2.4.15 - */ - private function set_value( $key, $value ) { - - global $wpdb; - - if ( ! $this->object_id ) { - return $value; - } - - $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); - - // If translate data is not present then get default value - if ( empty( $current_value ) ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query - $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); - - if ( ! empty( $current_value ) ) { - - $current_value = base64_encode( $current_value ); - - } - - } - - $db_value = $value; - if ( is_array( $db_value ) ) { - $db_value = maybe_serialize( $db_value ); - } - - update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - - $this->object_id = 0; - - return $value; - } - - /** - * Get meta translate from base64 - * - * @param $key - * @param $value - * @return false|string - * @since 2.4.16 - */ - private function get_value($key, $value) { - - if ( ! $this->object_id ) { - return $value; - } - - $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); - - $this->object_id = 0; - - if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { - return maybe_unserialize( $tr_value ); - }else{ - return $value; - } - - } - - /** - * Set meta value data - * - * @param $value - * @return mixed - * @since 2.4.16 - */ - public function set_form_meta_value( $value ) { - - $key = self::WPM_FORM_META; - - return $this->set_value( $key, $value ); - } - - /** - * Get meta value data - * - * @param $value - * @return false|string - * @since 2.4.16 - */ - public function get_form_meta_value( $value ) { - - $key = self::WPM_FORM_META; - - return $this->get_value( $key, $value ); - } - + array( + 'set_form_meta_value', + 'get_form_meta_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + + add_action( 'admin_enqueue_scripts', array( $this, 'add_lang_switcher_script'), 99 ); + + } + + /** + * load scripts and styles for forminator plugin + * + * @param $hook_suffix + * @since 2.4.16 + */ + public function add_lang_switcher_script( $hook_suffix ) { + + $pages = array( 'forminator_page_forminator-cform', 'forminator_page_forminator-poll', 'forminator_page_forminator-quiz', 'forminator_page_forminator-poll-wizard', 'forminator_page_forminator-cform-wizard', 'forminator_page_forminator-knowledge-wizard', 'forminator_page_forminator-entries' ); + + if ( in_array( $hook_suffix, $pages ) ) { + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + $main_params = array( + 'plugin_url' => wpm()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'wpm_forminator_nonce' => wp_create_nonce( 'wpm-forminator-localization' ), + ); + + wp_register_script( 'wpm-forminator-script', wpm_asset_path( 'scripts/wpm-forminator' . $suffix . '.js' ), array( 'jquery' ), WPM_VERSION, true ); + wp_localize_script( 'wpm-forminator-script', 'wpm_forminator_params', $main_params ); + wp_enqueue_script( 'wpm-forminator-script' ); + + wp_enqueue_style( 'wpm-forminator-css', wpm_asset_path( 'styles/admin/wpm-forminator' . $suffix . '.css' ), array(), WPM_VERSION ); + + } + + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.16 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.15 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.16 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.16 + */ + public function set_form_meta_value( $value ) { + + $key = self::WPM_FORM_META; + + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.16 + */ + public function get_form_meta_value( $value ) { + + $key = self::WPM_FORM_META; + + return $this->get_value( $key, $value ); + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fpsml.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fpsml.php new file mode 100644 index 000000000..b03992983 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-fpsml.php @@ -0,0 +1,373 @@ +prefix . 'fpsm_forms'; + $form_rows = $wpdb->get_results( "SELECT * FROM {$form_table}" ); + + if ( ! empty( $form_rows ) ) { + foreach ( $form_rows as $row ) { + if ( isset( $translations[ $row->form_id ][ $lang ] ) ) { + $t = $translations[ $row->form_id ][ $lang ]; + + // Keep original values for restore. + $this->temp_restores[] = array( + 'form_id' => $row->form_id, + 'form_title' => $row->form_title, + 'form_details' => $row->form_details, + ); + + // Merge translated text fields only. + $details_array = maybe_unserialize( $row->form_details ); + $merged = isset( $t['form_details'] ) && is_array( $t['form_details'] ) + ? $this->merge_translatable_fields( $details_array, $t['form_details'] ) + : $details_array; + + // Temporarily write translations to DB. + $wpdb->update( + $form_table, + array( + 'form_title' => isset( $t['form_title'] ) ? $t['form_title'] : $row->form_title, + 'form_details' => maybe_serialize( $merged ), + ), + array( 'form_id' => $row->form_id ) + ); + } + } + } + } + + /** + * Restore original English values back to the DB after the page callback renders. + */ + public function maybe_restore_translations_after_admin_render() { + if ( ! empty( $this->temp_restores ) ) { + global $wpdb; + $form_table = $wpdb->prefix . 'fpsm_forms'; + foreach ( $this->temp_restores as $restore ) { + $wpdb->update( + $form_table, + array( + 'form_title' => $restore['form_title'], + 'form_details' => $restore['form_details'], + ), + array( 'form_id' => $restore['form_id'] ) + ); + } + $this->temp_restores = array(); + } + } + + // ========================================================================= + // Admin Form Save Interception + // ========================================================================= + + /** + * Intercept the FPSML admin AJAX form save for non-default languages. + * + * For the default language: return early - let the original FPSML handler + * write everything to the DB as normal. + * + * For non-default languages: save only the translated text content into the + * `wpm_fpsml_translations` option. Update only non-translatable DB columns + * (alias, status) so the DB table row stays clean in default-language values. + */ + public function intercept_admin_form_save() { + if ( empty( $_POST['form_data'] ) ) { + return; + } + + $form_data = array(); + parse_str( wp_unslash( $_POST['form_data'] ), $form_data ); + + // Read the language from the hidden `edit_lang` input WP-Multilang injects. + $lang = isset( $form_data['edit_lang'] ) ? sanitize_text_field( $form_data['edit_lang'] ) : wpm_get_language(); + $default_language = wpm_get_default_language(); + $languages = wpm_get_languages(); + + // Bail if the language code is not registered in WP-Multilang. + if ( ! isset( $languages[ $lang ] ) ) { + return; + } + + // Default language: let original FPSML handler run. + if ( $lang === $default_language ) { + return; + } + + // --- Non-default language save --- + $form_id = intval( $form_data['form_id'] ?? 0 ); + $form_title = sanitize_text_field( $form_data['form_title'] ?? '' ); + $form_alias = sanitize_key( $form_data['form_alias'] ?? '' ); + $form_status = ! empty( $form_data['form_status'] ) ? 1 : 0; + + if ( ! $form_id ) { + return; + } + + // Persist all form_details (contains all translatable text fields). + $all_translations = get_option( 'wpm_fpsml_translations', array() ); + $all_translations[ $form_id ][ $lang ] = array( + 'form_title' => $form_title, + 'form_details' => $form_data['form_details'] ?? array(), + ); + update_option( 'wpm_fpsml_translations', $all_translations ); + + // Update only non-translatable structural columns in DB. + global $wpdb; + $wpdb->update( + $wpdb->prefix . 'fpsm_forms', + array( + 'form_alias' => $form_alias, + 'form_status' => $form_status, + ), + array( 'form_id' => $form_id ) + ); + + // Return success response and stop further processing. + die( wp_json_encode( array( + 'status' => 200, + 'message' => esc_html__( 'Form updated successfully.', 'frontend-post-submission-manager-lite' ), + ) ) ); + } + + // ========================================================================= + // Frontend Shortcode - Translation Injection + // ========================================================================= + + /** + * Replace the default `[fpsm]` shortcode with our translation-aware wrapper. + */ + public function override_shortcode() { + remove_shortcode( 'fpsm' ); + add_shortcode( 'fpsm', array( $this, 'fpsm_shortcode_with_translations' ) ); + } + + /** + * Render the `[fpsm]` shortcode, merging translated text values into the + * form_details before passing them to the FPSML view layer. + * + * @param array $atts Shortcode attributes. + * @return string HTML output. + */ + public function fpsm_shortcode_with_translations( $atts ) { + if ( empty( $atts['alias'] ) ) { + return ''; + } + + global $fpsml_library_obj; + + if ( ! isset( $fpsml_library_obj ) || ! is_object( $fpsml_library_obj ) ) { + return ''; + } + + $alias = sanitize_text_field( $atts['alias'] ); + $form_row = $fpsml_library_obj->get_form_row_by_alias( $alias ); + + if ( empty( $form_row ) ) { + return esc_html__( 'Form not available for this alias.', 'frontend-post-submission-manager-lite' ); + } + + $lang = wpm_get_language(); + $default_language = wpm_get_default_language(); + + // Merge translations for non-default languages. + if ( $lang !== $default_language ) { + $all_translations = get_option( 'wpm_fpsml_translations', array() ); + if ( isset( $all_translations[ $form_row->form_id ][ $lang ] ) ) { + $t = $all_translations[ $form_row->form_id ][ $lang ]; + $details = maybe_unserialize( $form_row->form_details ); + + if ( ! empty( $t['form_title'] ) ) { + $form_row->form_title = $t['form_title']; + } + + if ( isset( $t['form_details'] ) && is_array( $t['form_details'] ) ) { + $details = $this->merge_translatable_fields( $details, $t['form_details'] ); + $form_row->form_details = maybe_serialize( $details ); + } + } + } + + $form_details = maybe_unserialize( $form_row->form_details ); + $GLOBALS['fpsml_form_details'] = $form_details; + $GLOBALS['fpsml_form_alias'] = $alias; + + // Enqueue assets using the existing FPSML_Shortcode instance. + global $fpsml_shortcode_obj; + if ( isset( $fpsml_shortcode_obj ) && is_object( $fpsml_shortcode_obj ) ) { + $fpsml_shortcode_obj->register_frontend_assets(); + } elseif ( class_exists( 'FPSML_Shortcode' ) ) { + $sc = new \FPSML_Shortcode(); + $sc->register_frontend_assets(); + } + + ob_start(); + include FPSML_PATH . '/includes/views/frontend/form-shortcode.php'; + return ob_get_clean(); + } + + // ========================================================================= + // Helpers + // ========================================================================= + + /** + * Merge only the user-visible (translatable) text fields from a language + * translation array over the original form_details array. + * + * Structural/system fields (post_status, post_author, redirection_type, + * show_on_form, required, layout templates, captcha keys, etc.) are + * intentionally excluded so only human-readable text is overwritten. + * + * @param array $original Original form_details array from the DB. + * @param array $translation Translated form_details array for the target language. + * @return array Merged result. + */ + private function merge_translatable_fields( array $original, array $translation ) { + // --- basic tab text fields --- + foreach ( array( 'validation_error_message', 'form_success_message' ) as $key ) { + if ( ! empty( $translation['basic'][ $key ] ) ) { + $original['basic'][ $key ] = $translation['basic'][ $key ]; + } + } + + // --- form tab: per-field text keys --- + $field_text_keys = array( + 'field_label', + 'field_note', + 'required_error_message', + 'character_limit_error_message', + 'upload_button_label', + 'file_extension_error_message', + 'max_size_error_message', + 'first_option_label', + ); + + if ( isset( $translation['form']['fields'] ) && is_array( $translation['form']['fields'] ) ) { + foreach ( $translation['form']['fields'] as $field_key => $field_trans ) { + if ( ! is_array( $field_trans ) ) { + continue; + } + foreach ( $field_text_keys as $key ) { + if ( ! empty( $field_trans[ $key ] ) ) { + $original['form']['fields'][ $field_key ][ $key ] = $field_trans[ $key ]; + } + } + } + } + + // --- form tab: submit button label --- + if ( ! empty( $translation['form']['submit_button_label'] ) ) { + $original['form']['submit_button_label'] = $translation['form']['submit_button_label']; + } + + // --- security tab text fields --- + foreach ( array( 'captcha_label', 'error_message' ) as $key ) { + if ( ! empty( $translation['security'][ $key ] ) ) { + $original['security'][ $key ] = $translation['security'][ $key ]; + } + } + + // --- login tab text fields --- + $login_text_keys = array( + 'login_form_title', + 'username_label', + 'password_label', + 'login_button_label', + 'remember_me_label', + 'login_error_message', + 'login_note', + 'login_message', + 'login_link_label', + ); + + foreach ( $login_text_keys as $key ) { + if ( ! empty( $translation['login'][ $key ] ) ) { + $original['login'][ $key ] = $translation['login'][ $key ]; + } + } + + // --- notification tab text fields --- + $notification_types = array( 'admin', 'post_publish' ); + $notification_text_keys = array( 'subject', 'from_name', 'notification_message' ); + + foreach ( $notification_types as $type ) { + if ( isset( $translation['notification'][ $type ] ) && is_array( $translation['notification'][ $type ] ) ) { + foreach ( $notification_text_keys as $key ) { + if ( ! empty( $translation['notification'][ $type ][ $key ] ) ) { + $original['notification'][ $type ][ $key ] = $translation['notification'][ $type ][ $key ]; + } + } + } + } + + return $original; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-gravityforms.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-gravityforms.php new file mode 100644 index 000000000..c345db12b --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-gravityforms.php @@ -0,0 +1,90 @@ + 0 ) { + + $option_key = 'gf_display_meta_'.$form_id; + $get_option_value = get_option( $option_key ); + $get_option_value = wpm_translate_value( $get_option_value); + + if ( ! empty( $get_option_value ) && is_string( $get_option_value ) ) { + + $get_option_value = maybe_unserialize( base64_decode( $get_option_value, true ) ); + if ( is_array( $get_option_value ) ) { + + if ( ! empty( $form['title'] ) && ! empty( $get_option_value['title'] ) ) { + $form['title'] = $get_option_value['title']; + } + if ( ! empty( $form['description'] ) && ! empty( $get_option_value['description'] ) ) { + $form['description'] = $get_option_value['description']; + } + if ( ! empty( $form['fields'] ) && ! empty( $get_option_value['fields'] ) ) { + $form['fields'] = $get_option_value['fields']; + } + + } + + } + + } + + + return $form; + + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-internal-links.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-internal-links.php new file mode 100644 index 000000000..3be0d6808 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-internal-links.php @@ -0,0 +1,299 @@ + array( + 'set_form_meta_value', + 'get_form_meta_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + + + add_filter( 'the_content', [ $this, 'replace_links' ], 999 ); + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.26 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.26 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.26 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.26 + */ + public function set_form_meta_value( $value ) { + + $key = self::WPM_LINK_DEFINITATION; + + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.26 + */ + public function get_form_meta_value( $value ) { + + $key = self::WPM_LINK_DEFINITATION; + + return $this->get_value( $key, $value ); + } + + + /** + * Replace link index with tag + * @param $content post content + * @return $content + * @since 2.4.27 + * */ + public function replace_links( $content ) { + + global $post; + + $post_id = 0; + if ( ! empty( $post ) && is_object( $post ) ) { + $post_id = isset( $post->ID ) ? $post->ID : 0; + } + + if ( $post_id === 0 ) { + return $content; + } + + $get_links = $this->get_interlink_rules( $post_id ); + + if ( ! empty( $get_links ) ) { + + foreach ( $get_links as $link ) { + if ( ! empty( $link ) && is_object( $link ) ) { + + $translate_key = self::WPM_LINK_DEFINITATION.'_translate'; + $keywords = get_post_meta( $link->link_to , $translate_key, true ); + if ( ! empty( $keywords ) && is_string( $keywords ) ) { + $translated_keyword = wpm_translate_string( $keywords, wpm_get_language() ); + + if ( ! empty( $translated_keyword ) ) { + $translated_keyword = maybe_unserialize( base64_decode( $translated_keyword, true ) ); + if ( is_array( $translated_keyword ) ) { + foreach ( $translated_keyword as $keyword ) { + + if ( empty( $keyword ) ) { + continue; + } + + $rule = new \stdClass(); + $rule->pattern = $keyword; + $rule->value = $link->link_to; + $rule->type = 'post'; + $generate_link = $this->generate_link( $rule, $keyword ); + + $content = str_replace( $keyword, $generate_link, $content ); + } + + } + } + } + + } + } + + } + + return $content; + } + + /** + * Get internal links of the post + * @param $id int + * @param $type string + * @since 2.4.27 + * Reference class: ILJ\Database\Linkindex Function: getRules() + * */ + public function get_interlink_rules( $id, $type = 'post' ) { + + if (!is_numeric($id)) { + return array(); + } + + $table_name = 'ilj_linkindex'; + + global $wpdb; + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Already prepared + $query = $wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . $table_name . ' linkindex WHERE linkindex.link_from = %d AND linkindex.type_from = %s', $id, $type); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared -- Direct query is necessary, caching is not applicable for real-time data. + return $wpdb->get_results($query); + + } + + /** + * Get link template + * @since 2.4.27 + * Reference class: ILJ\Core\LinkBuilder Function: getLinkTemplate() + * */ + private function get_link_template() { + $default_template = \ILJ\Core\Options\LinkOutputInternal::getDefault(); + $template = Options::getOption(\ILJ\Core\Options\LinkOutputInternal::getKey()); + + if ('' == $template) { + return $default_template; + } + return wp_specialchars_decode($template, \ENT_QUOTES); + } + + /** + * Generate Link based on template + * @param $link_rule object + * @param $anchor text + * @return $link html element + * @since 2.4.27 + * Reference class: ILJ\Core\LinkBuilder Function: generateLink() + * */ + private function generate_link($link_rule, $anchor) { + $template = $this->get_link_template(); + $nofollow = (bool) Options::getOption(\ILJ\Core\Options\InternalNofollow::getKey()); + $link_attrs = array(); + + if ('post' == $link_rule->type) { + if (get_post_status($link_rule->value) != 'publish') { + return false; + } + $url = get_the_permalink($link_rule->value); + } + + $link = str_replace('{{url}}', (isset($url) ? $url : '#'), $template); + $link = str_replace('{{anchor}}', $anchor, $link); + + $check_nofollow = true; + + if ($check_nofollow && $nofollow) { + $link = str_replace('content_type) { + // // If the content is json, the link should be escaped before replacement. + // $link = trim(wp_json_encode($link), '"'); + // } + + return $link; + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-mailchimp-for-wp.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-mailchimp-for-wp.php index 907c93e3f..d1f6315da 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-mailchimp-for-wp.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-mailchimp-for-wp.php @@ -1,28 +1,28 @@ -get_slider( $slider_id ); - $old_params = json_decode( base64_decode( $old_slider['params'] ), true ); - $params = json_decode( base64_decode( $msp_data ), true ); - - if ( isset( $params['MSPanel.Slide'] ) ) { - - $slider_config = array( - 'info' => array(), - 'bgAlt' => array(), - 'bgTitle' => array(), - 'linkTitle' => array() - ); - - foreach ( $params['MSPanel.Slide'] as $key => $slide ) { - $slide = json_decode( $slide, true ); - if ( $old_params && is_array( $old_params ) && $old_params['MSPanel.Slide'] ) { - foreach ( $old_params['MSPanel.Slide'] as $old_slide ) { - $old_slide = json_decode( $old_slide, true ); - if ( $slide['id'] === $old_slide['id'] ) { - $slide = wpm_set_new_value( $old_slide, $slide, $slider_config ); - } - } - } else { - if ( ! wpm_is_ml_value( $slide ) ) { - $slide = wpm_set_new_value( array(), $slide, $slider_config ); - } - } - $params['MSPanel.Slide'][ $key ] = wp_json_encode( $slide ); - } - } - - if ( isset( $params['MSPanel.Base'] ) ) { - - $layer_config = array( - 'title' => array(), - 'content' => array() - ); - - foreach ( $params['MSPanel.Base'] as $key => $layer ) { - $layer = json_decode( $layer, true ); - if ( $old_params && is_array( $old_params ) && $old_params['MSPanel.Base'] ) { - foreach ( $old_params['MSPanel.Base'] as $old_layer ) { - $old_layer = json_decode( $old_layer, true ); - if ( $layer['id'] === $old_layer['id'] ) { - $layer = wpm_set_new_value( $old_layer, $layer, $layer_config ); - } - } - } else { - if ( ! wpm_is_ml_value( $layer ) ) { - $layer = wpm_set_new_value( array(), $layer, $layer_config ); - } - } - $params['MSPanel.Base'][ $key ] = wp_json_encode( $layer ); - } - } - - $_REQUEST['msp_data'] = base64_encode( wp_json_encode( $params ) ); - } - - - /** - * Translate slider - */ - public function translate_slider() { - global $wp_scripts; - - $data = $wp_scripts->get_data( 'jquery-core', 'data' ); - $data_array = explode( "\n", $data ); - $slider_data = ''; - - foreach ( $data_array as $key => $item ) { - if ( strpos( $item, '__MSP_DATA' ) ) { - $slider_data = str_replace( 'var __MSP_DATA = ', '', substr( $item, 0, - 1 ) ); - unset( $data_array[ $key ] ); - break; - } - } - - if ( $slider_data && $slider_data !== 'null' ) { - $slider_data = json_decode( base64_decode( $slider_data ), true ); - - if ( ! empty( $slider_data ) ) { - if ( isset( $slider_data['MSPanel.Slide'] ) ) { - foreach ( $slider_data['MSPanel.Slide'] as $key => $slide ) { - $slide = json_decode( $slide, true ); - $slide = wpm_translate_value( $slide ); - $slider_data['MSPanel.Slide'][ $key ] = wp_json_encode( $slide ); - } - } - - if ( isset( $slider_data['MSPanel.Base'] ) ) { - foreach ( $slider_data['MSPanel.Base'] as $key => $layer ) { - $layer = json_decode( $layer, true ); - $layer = wpm_translate_value( $layer ); - $slider_data['MSPanel.Base'][ $key ] = wp_json_encode( $layer ); - } - } - } - - $data_array[] = 'var __MSP_DATA = "' . base64_encode( wp_json_encode( $slider_data ) ) . '";'; - $data = implode( "\n", $data_array ); - $wp_scripts->add_data( 'jquery-core', 'data', $data ); - } - } - - - /** - * Add language_switcher - * - * @param $config - * - * @return array - */ - public function add_language_switcher( $config ) { - $screen = get_current_screen(); - $screen_id = $screen ? $screen->id : ''; - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( $screen_id === 'toplevel_page_masterslider' && isset( $_GET['slider_id'] ) ) { - $config[] = 'toplevel_page_masterslider'; - } - - return $config; - } - - /** - * Add access to master slider for translator - * - * @since 2.0.0 - * - * @param $capabilities - * - * @return array - */ - public function add_core_capabilities( $capabilities ) { - $capabilities['core'][] = 'access_masterslider'; - - return $capabilities; - } -} +get_slider( $slider_id ); + $old_params = json_decode( base64_decode( $old_slider['params'] ), true ); + $params = json_decode( base64_decode( $msp_data ), true ); + + if ( isset( $params['MSPanel.Slide'] ) ) { + + $slider_config = array( + 'info' => array(), + 'bgAlt' => array(), + 'bgTitle' => array(), + 'linkTitle' => array() + ); + + foreach ( $params['MSPanel.Slide'] as $key => $slide ) { + $slide = json_decode( $slide, true ); + if ( $old_params && is_array( $old_params ) && $old_params['MSPanel.Slide'] ) { + foreach ( $old_params['MSPanel.Slide'] as $old_slide ) { + $old_slide = json_decode( $old_slide, true ); + if ( $slide['id'] === $old_slide['id'] ) { + $slide = wpm_set_new_value( $old_slide, $slide, $slider_config ); + } + } + } else { + if ( ! wpm_is_ml_value( $slide ) ) { + $slide = wpm_set_new_value( array(), $slide, $slider_config ); + } + } + $params['MSPanel.Slide'][ $key ] = wp_json_encode( $slide ); + } + } + + if ( isset( $params['MSPanel.Layer'] ) ) { + + $layer_config = array( + 'title' => array(), + 'content' => array() + ); + + foreach ( $params['MSPanel.Layer'] as $key => $layer ) { + $layer = json_decode( $layer, true ); + if ( $old_params && is_array( $old_params ) && $old_params['MSPanel.Layer'] ) { + foreach ( $old_params['MSPanel.Layer'] as $old_layer ) { + $old_layer = json_decode( $old_layer, true ); + if ( $layer['id'] === $old_layer['id'] ) { + $layer = wpm_set_new_value( $old_layer, $layer, $layer_config ); + } + } + } else { + if ( ! wpm_is_ml_value( $layer ) ) { + $layer = wpm_set_new_value( array(), $layer, $layer_config ); + } + } + $params['MSPanel.Layer'][ $key ] = wp_json_encode( $layer ); + } + } + + $_REQUEST['msp_data'] = base64_encode( wp_json_encode( $params ) ); + } + + + /** + * Translate slider + */ + public function translate_slider() { + global $wp_scripts; + + $data = $wp_scripts->get_data( 'jquery-core', 'data' ); + $data_array = explode( "\n", $data ); + $slider_data = ''; + + foreach ( $data_array as $key => $item ) { + if ( strpos( $item, '__MSP_DATA' ) ) { + $slider_data = str_replace( 'var __MSP_DATA = ', '', substr( $item, 0, - 1 ) ); + unset( $data_array[ $key ] ); + break; + } + } + + if ( $slider_data && $slider_data !== 'null' ) { + $slider_data = json_decode( base64_decode( $slider_data ), true ); + + if ( ! empty( $slider_data ) ) { + if ( isset( $slider_data['MSPanel.Slide'] ) ) { + foreach ( $slider_data['MSPanel.Slide'] as $key => $slide ) { + $slide = json_decode( $slide, true ); + $slide = wpm_translate_value( $slide ); + $slider_data['MSPanel.Slide'][ $key ] = wp_json_encode( $slide ); + } + } + + if ( isset( $slider_data['MSPanel.Layer'] ) ) { + foreach ( $slider_data['MSPanel.Layer'] as $key => $layer ) { + $layer = json_decode( $layer, true ); + $layer = wpm_translate_value( $layer ); + $slider_data['MSPanel.Layer'][ $key ] = wp_json_encode( $layer ); + } + } + } + + $data_array[] = 'var __MSP_DATA = "' . base64_encode( wp_json_encode( $slider_data ) ) . '";'; + $data = implode( "\n", $data_array ); + $wp_scripts->add_data( 'jquery-core', 'data', $data ); + } + } + + + /** + * Add language_switcher + * + * @param $config + * + * @return array + */ + public function add_language_switcher( $config ) { + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( $screen_id === 'toplevel_page_masterslider' && isset( $_GET['slider_id'] ) ) { + $config[] = 'toplevel_page_masterslider'; + } + + return $config; + } + + /** + * Add access to master slider for translator + * + * @since 2.0.0 + * + * @param $capabilities + * + * @return array + */ + public function add_core_capabilities( $capabilities ) { + $capabilities['core'][] = 'access_masterslider'; + + return $capabilities; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-megamenu.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-megamenu.php index 9ed3eb6f7..89340383e 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-megamenu.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-megamenu.php @@ -1,73 +1,73 @@ -id : ''; - - if ( 'admin_page_newsletter_emails_edit' === $screen_id ) { - remove_filter( 'wpm_attribute_escape', 'wpm_escaping_text', 5 ); - remove_filter( 'esc_textarea', 'wpm_escaping_text', 5 ); - remove_filter( 'esc_html', 'wpm_escaping_text', 5 ); - wpm_show_notice(); - } - } - - - /** - * Translate options - */ - public function translate_options() { - if(class_exists('NewsletterSubscription') && isset(\NewsletterSubscription::instance()->options)){ - \NewsletterSubscription::instance()->options = wpm_translate_value( \NewsletterSubscription::instance()->options ); - } - if(class_exists('Newsletter') && isset(\Newsletter::instance()->options)){ - \Newsletter::instance()->options = wpm_translate_value( \Newsletter::instance()->options ); - } - - /** - * Compatibility with extension WP Users Integration - */ - if ( class_exists( 'NewsletterWpUsers' ) ) { - \NewsletterWpUsers::$instance->options = wpm_translate_value( \NewsletterWpUsers::$instance->options ); - } - - /** - * Compatibility with extension Locked Content - */ - if ( class_exists( 'NewsletterLock' ) ) { - \NewsletterLock::$instance->options = wpm_translate_value( \NewsletterLock::$instance->options ); - } - } - - - public function save_profile_20( $data ) { - if(is_object($data) && isset($data->profile_20)){ - $data->profile_20 = wpm_get_language(); - }else if(is_array($data) && isset($data['profile_20'])){ - $data['profile_20'] = wpm_get_language(); - } - - return $data; - } - - - public function translate_email( $text, $user ) { - - if ( is_object( $user ) && $user->profile_20 ) { - $text = wpm_translate_string( $text, $user->profile_20 ); - } - - return $text; - } -} +id : ''; + + if ( 'admin_page_newsletter_emails_edit' === $screen_id ) { + remove_filter( 'wpm_attribute_escape', 'wpm_escaping_text', 5 ); + remove_filter( 'esc_textarea', 'wpm_escaping_text', 5 ); + remove_filter( 'esc_html', 'wpm_escaping_text', 5 ); + wpm_show_notice(); + } + } + + + /** + * Translate options + */ + public function translate_options() { + if(class_exists('NewsletterSubscription') && isset(\NewsletterSubscription::instance()->options)){ + \NewsletterSubscription::instance()->options = wpm_translate_value( \NewsletterSubscription::instance()->options ); + } + if(class_exists('Newsletter') && isset(\Newsletter::instance()->options)){ + \Newsletter::instance()->options = wpm_translate_value( \Newsletter::instance()->options ); + } + + /** + * Compatibility with extension WP Users Integration + */ + if ( class_exists( 'NewsletterWpUsers' ) ) { + \NewsletterWpUsers::$instance->options = wpm_translate_value( \NewsletterWpUsers::$instance->options ); + } + + /** + * Compatibility with extension Locked Content + */ + if ( class_exists( 'NewsletterLock' ) ) { + \NewsletterLock::$instance->options = wpm_translate_value( \NewsletterLock::$instance->options ); + } + } + + + public function save_profile_20( $data ) { + if(is_object($data) && isset($data->profile_20)){ + $data->profile_20 = wpm_get_language(); + }else if(is_array($data) && isset($data['profile_20'])){ + $data['profile_20'] = wpm_get_language(); + } + + return $data; + } + + + public function translate_email( $text, $user ) { + + if ( is_object( $user ) && $user->profile_20 ) { + $text = wpm_translate_string( $text, $user->profile_20 ); + } + + return $text; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ngg.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ngg.php index 9423662f3..a7904d071 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ngg.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ngg.php @@ -1,247 +1,247 @@ - 'name', 'album_desc' => 'albumdesc' ); - $data = array(); - - foreach ( $fields as $key => $field ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. - if( isset( $_POST[ $key ] ) ) { - $data[ $key ] = sanitize_text_field( wp_unslash( $_POST[ $key ] ) ); - } - } - - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_POST['act_album'] ) && $album = \C_Album_Mapper::get_instance()->find( wpm_clean( $_POST['act_album'] ) ) ) { - foreach ( $data as $key => $value ) { - if ( ! wpm_is_ml_string( $value ) ) { - $_POST[ $key ] = wpm_set_new_value( $album->{$fields[ $key ]}, $value ); - } - } - } - } - - if ( isset( $_POST['page'] ) && 'manage-images' === $_POST['page'] ) { - - if ( isset( $_POST['updatepictures'] ) ) { - - check_admin_referer( 'ngg_updategallery' ); - - if ( ! isset( $_GET['s'] ) ) { - - $fields = array( 'title', 'galdesc' ); - $data = array(); - - foreach ( $fields as $field ) { - if( isset( $_POST[ $field ] ) ) { - $data[ $field ] = sanitize_text_field( wp_unslash( $_POST[ $field ] ) ); - } - } - - // Update the gallery - $mapper = \C_Gallery_Mapper::get_instance(); - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_GET['gid'] ) && $entity = $mapper->find( wpm_clean( $_GET['gid'] ) ) ) { - foreach ( $data as $key => $value ) { - if ( ! wpm_is_ml_string( $value ) ) { - $_POST[ $key ] = wpm_set_new_value( $entity->$key, $value ); - } - } - } - } - - $image_mapper = \C_Image_Mapper::get_instance(); - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if( isset( $_POST['images'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. - foreach ( $_POST['images'] as $pid => $image ) { - - $data = array(); - - if ( isset( $image['description'] ) ) { - $data['description'] = stripslashes( $image['description'] ); - } - if ( isset( $image['alttext'] ) ) { - $data['alttext'] = stripslashes( $image['alttext'] ); - } - - $old_image = $image_mapper->find( $pid ); - - // Update all fields - foreach ( $data as $key => $value ) { - if ( ! wpm_is_ml_string( $value ) ) { - $_POST['images'][ $pid ][ $key ] = wpm_set_new_value( $old_image->$key, $value ); - } - } - } - } - }// End if(). - }// End if(). - } - - - /** - * Add pages for display language switcher - * - * @param $pages_config - * - * @return array - */ - public function add_admin_pages( $pages_config ) { - - $screen = get_current_screen(); - $screen_id = $screen ? $screen->id : ''; - - $admin_pages = array( - '_page_nggallery-manage-gallery', - '_page_nggallery-manage-album', - '_page_ngg_display_settings', - ); - - foreach ( $admin_pages as $admin_page ) { - if ( strpos( $screen_id, $admin_page ) !== false ) { - $pages_config[] = $screen_id; - } - } - - return $pages_config; - } - - - /** - * Translate some field without PHP filters by javascript for displaying - * - * @param array $admin_html_tags - * - * @return array - */ - public function add_admin_html_tags( $admin_html_tags ) { - $screen = get_current_screen(); - $screen_id = $screen ? $screen->id : ''; - - $admin_pages = array( - '_page_nggallery-manage-gallery', - '_page_nggallery-manage-album', - ); - - foreach ( $admin_pages as $admin_page ) { - if ( strpos( $screen_id, $admin_page ) !== false ) { - - $html_tags = array(); - - if ( '_page_nggallery-manage-album' === $admin_page ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['act_album'] ) ) { - $html_tags = array( - 'value' => array( - '#album_name', - '#album_desc', - ) - ); - } - } - - if ( '_page_nggallery-manage-gallery' === $admin_page ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && ( isset( $_POST['page'] ) && 'manage-images' === $_POST['page'] ) && isset( $_POST['updatepictures'] ) ) { - $html_tags = array( - 'value' => array( - '#gallery_title', - '#gallery_description', - ) - ); - } - } - - $admin_html_tags[ $screen_id ] = $html_tags; - } - } - - return $admin_html_tags; - } - - - /** - * Translate gallery fields before display - * - * @param $fields - * - * @return mixed - */ - public function filter_fields( $fields ) { - - $translate_fields = array( - 'title', - 'description', - ); - - foreach ( $translate_fields as $field ) { - if ( isset( $fields['left'][ $field ] ) ) { - $fields['left'][ $field ]['callback'][0]->gallery = $this->translate_gallery_object( $fields['left'][ $field ]['callback'][0]->gallery ); - } - } - - return $fields; - } - - - /** - * Translate gallery object for displaying - * - * @param $object - * - * @return mixed - */ - public function translate_gallery_object( $object ) { - - foreach ( get_object_vars( $object ) as $key => $content ) { - switch ( $key ) { - case 'title': - case 'galdesc': - case 'alttext': - case 'description': - $object->$key = wpm_translate_string( $content ); - break; - } - } - - return $object; - } -} + 'name', 'album_desc' => 'albumdesc' ); + $data = array(); + + foreach ( $fields as $key => $field ) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. + if( isset( $_POST[ $key ] ) ) { + $data[ $key ] = sanitize_text_field( wp_unslash( $_POST[ $key ] ) ); + } + } + + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_POST['act_album'] ) && $album = \C_Album_Mapper::get_instance()->find( wpm_clean( $_POST['act_album'] ) ) ) { + foreach ( $data as $key => $value ) { + if ( ! wpm_is_ml_string( $value ) ) { + $_POST[ $key ] = wpm_set_new_value( $album->{$fields[ $key ]}, $value ); + } + } + } + } + + if ( isset( $_POST['page'] ) && 'manage-images' === $_POST['page'] ) { + + if ( isset( $_POST['updatepictures'] ) ) { + + check_admin_referer( 'ngg_updategallery' ); + + if ( ! isset( $_GET['s'] ) ) { + + $fields = array( 'title', 'galdesc' ); + $data = array(); + + foreach ( $fields as $field ) { + if( isset( $_POST[ $field ] ) ) { + $data[ $field ] = sanitize_text_field( wp_unslash( $_POST[ $field ] ) ); + } + } + + // Update the gallery + $mapper = \C_Gallery_Mapper::get_instance(); + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_GET['gid'] ) && $entity = $mapper->find( wpm_clean( $_GET['gid'] ) ) ) { + foreach ( $data as $key => $value ) { + if ( ! wpm_is_ml_string( $value ) ) { + $_POST[ $key ] = wpm_set_new_value( $entity->$key, $value ); + } + } + } + } + + $image_mapper = \C_Image_Mapper::get_instance(); + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if( isset( $_POST['images'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Reason unslash not needed because data is not getting stored in database, it's just being used. + foreach ( $_POST['images'] as $pid => $image ) { + + $data = array(); + + if ( isset( $image['description'] ) ) { + $data['description'] = stripslashes( $image['description'] ); + } + if ( isset( $image['alttext'] ) ) { + $data['alttext'] = stripslashes( $image['alttext'] ); + } + + $old_image = $image_mapper->find( $pid ); + + // Update all fields + foreach ( $data as $key => $value ) { + if ( ! wpm_is_ml_string( $value ) ) { + $_POST['images'][ $pid ][ $key ] = wpm_set_new_value( $old_image->$key, $value ); + } + } + } + } + }// End if(). + }// End if(). + } + + + /** + * Add pages for display language switcher + * + * @param $pages_config + * + * @return array + */ + public function add_admin_pages( $pages_config ) { + + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + + $admin_pages = array( + '_page_nggallery-manage-gallery', + '_page_nggallery-manage-album', + '_page_ngg_display_settings', + ); + + foreach ( $admin_pages as $admin_page ) { + if ( strpos( $screen_id, $admin_page ) !== false ) { + $pages_config[] = $screen_id; + } + } + + return $pages_config; + } + + + /** + * Translate some field without PHP filters by javascript for displaying + * + * @param array $admin_html_tags + * + * @return array + */ + public function add_admin_html_tags( $admin_html_tags ) { + $screen = get_current_screen(); + $screen_id = $screen ? $screen->id : ''; + + $admin_pages = array( + '_page_nggallery-manage-gallery', + '_page_nggallery-manage-album', + ); + + foreach ( $admin_pages as $admin_page ) { + if ( strpos( $screen_id, $admin_page ) !== false ) { + + $html_tags = array(); + + if ( '_page_nggallery-manage-album' === $admin_page ) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['act_album'] ) ) { + $html_tags = array( + 'value' => array( + '#album_name', + '#album_desc', + ) + ); + } + } + + if ( '_page_nggallery-manage-gallery' === $admin_page ) { + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && ( isset( $_POST['page'] ) && 'manage-images' === $_POST['page'] ) && isset( $_POST['updatepictures'] ) ) { + $html_tags = array( + 'value' => array( + '#gallery_title', + '#gallery_description', + ) + ); + } + } + + $admin_html_tags[ $screen_id ] = $html_tags; + } + } + + return $admin_html_tags; + } + + + /** + * Translate gallery fields before display + * + * @param $fields + * + * @return mixed + */ + public function filter_fields( $fields ) { + + $translate_fields = array( + 'title', + 'description', + ); + + foreach ( $translate_fields as $field ) { + if ( isset( $fields['left'][ $field ] ) ) { + $fields['left'][ $field ]['callback'][0]->gallery = $this->translate_gallery_object( $fields['left'][ $field ]['callback'][0]->gallery ); + } + } + + return $fields; + } + + + /** + * Translate gallery object for displaying + * + * @param $object + * + * @return mixed + */ + public function translate_gallery_object( $object ) { + + foreach ( get_object_vars( $object ) as $key => $content ) { + switch ( $key ) { + case 'title': + case 'galdesc': + case 'alttext': + case 'description': + $object->$key = wpm_translate_string( $content ); + break; + } + } + + return $object; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-pbso.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-pbso.php index 2e764636a..5c360a57d 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-pbso.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-pbso.php @@ -1,125 +1,125 @@ - $widget ) { - if ( isset( $widget['frames'] ) ) { - foreach ( $widget['frames'] as $_key => $frame ) { - if ( ! empty( $frame['content'] ) ) { - - if ( isJSON( $frame['content'] ) ) { - $frame['content'] = json_decode( $frame['content'], true ); - } - - if ( ! empty( $frame['content']['widgets'] )) { - $meta_value['widgets'][ $key ]['frames'][ $_key ]['content'] = $this->formatting_updated_value( $frame['content'] ); - } - } - } - } - } - } - - return $meta_value; - } - - /** - * Filter old values recursively - * - * @param $old_value - * @param $meta_value - * - * @return mixed - */ - public function filter_old_value( $old_value, $meta_value ) { - - $new_old_value = $meta_value; - $new_old_value['widgets'] = array(); - - foreach ( $meta_value['widgets'] as $key => $widget ) { - foreach ( $old_value['widgets'] as $_widget ) { - if ( $widget['panels_info']['widget_id'] === $_widget['panels_info']['widget_id'] ) { - $new_old_value['widgets'][ $key ] = $_widget; - if ( ! empty( $widget['frames'] ) ) { - foreach ( $widget['frames'] as $_key => $frame ) { - if ( ! empty( $frame['content'] ) && isset( $frame['content']['widgets'] ) ) { - foreach ( $_widget['frames'] as $_frame ) { - $new_old_value['widgets'][ $key ]['frames'][ $_key ]['content'] = $this->filter_old_value( $_frame['content'], $frame['content'] ); - } - } - } - } - } - } - } - - return $new_old_value; - } - - /** - * Add config for values recursively - * - * @param $config - * @param array $meta_value - * - * @return array - */ - public function add_recursive_config( $config, $meta_value ) { - - if ( is_array( $meta_value ) && isset( $meta_value['widgets'] ) ) { - foreach ( $meta_value['widgets'] as $widget ) { - if ( isset( $widget['frames'] ) ) { - foreach ( $widget['frames'] as $frame ) { - if ( ! empty( $frame['content'] ) ) { - if ( isJSON( $frame['content'] ) ) { - $frame['content'] = json_decode( $frame['content'], true ); - } - - if ( ! empty( $frame['content']['widgets'] ) ) { - $config['widgets']['wpm_each']['frames']['wpm_each']['content'] = $this->add_recursive_config( $config, $frame['content'] ); - } - } - } - } - } - } - - return $config; - } -} + $widget ) { + if ( isset( $widget['frames'] ) ) { + foreach ( $widget['frames'] as $_key => $frame ) { + if ( ! empty( $frame['content'] ) ) { + + if ( isJSON( $frame['content'] ) ) { + $frame['content'] = json_decode( $frame['content'], true ); + } + + if ( ! empty( $frame['content']['widgets'] )) { + $meta_value['widgets'][ $key ]['frames'][ $_key ]['content'] = $this->formatting_updated_value( $frame['content'] ); + } + } + } + } + } + } + + return $meta_value; + } + + /** + * Filter old values recursively + * + * @param $old_value + * @param $meta_value + * + * @return mixed + */ + public function filter_old_value( $old_value, $meta_value ) { + + $new_old_value = $meta_value; + $new_old_value['widgets'] = array(); + + foreach ( $meta_value['widgets'] as $key => $widget ) { + foreach ( $old_value['widgets'] as $_widget ) { + if ( $widget['panels_info']['widget_id'] === $_widget['panels_info']['widget_id'] ) { + $new_old_value['widgets'][ $key ] = $_widget; + if ( ! empty( $widget['frames'] ) ) { + foreach ( $widget['frames'] as $_key => $frame ) { + if ( ! empty( $frame['content'] ) && isset( $frame['content']['widgets'] ) ) { + foreach ( $_widget['frames'] as $_frame ) { + $new_old_value['widgets'][ $key ]['frames'][ $_key ]['content'] = $this->filter_old_value( $_frame['content'], $frame['content'] ); + } + } + } + } + } + } + } + + return $new_old_value; + } + + /** + * Add config for values recursively + * + * @param $config + * @param array $meta_value + * + * @return array + */ + public function add_recursive_config( $config, $meta_value ) { + + if ( is_array( $meta_value ) && isset( $meta_value['widgets'] ) ) { + foreach ( $meta_value['widgets'] as $widget ) { + if ( isset( $widget['frames'] ) ) { + foreach ( $widget['frames'] as $frame ) { + if ( ! empty( $frame['content'] ) ) { + if ( isJSON( $frame['content'] ) ) { + $frame['content'] = json_decode( $frame['content'], true ); + } + + if ( ! empty( $frame['content']['widgets'] ) ) { + $config['widgets']['wpm_each']['frames']['wpm_each']['content'] = $this->add_recursive_config( $config, $frame['content'] ); + } + } + } + } + } + } + + return $config; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-rank-math.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-rank-math.php index c23c572ea..e37ec246d 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-rank-math.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-rank-math.php @@ -1,451 +1,475 @@ - array(), - "pt_{$post_type}_description" => array(), - "pt_{$post_type}_default_rich_snippet" => array(), - "pt_{$post_type}_default_snippet_name" => array(), - "pt_{$post_type}_default_snippet_desc" => array(), - "pt_{$post_type}_default_article_type" => array(), - "pt_{$post_type}_custom_robots" => array(), - "pt_{$post_type}_link_suggestions" => array(), - "pt_{$post_type}_ls_use_fk" => array(), - "pt_{$post_type}_primary_taxonomy" => array(), - "pt_{$post_type}_add_meta_box" => array(), - "pt_{$post_type}_bulk_editing" => array(), - ); - - $option_config = wpm_array_merge_recursive( $option_post_config, $option_config ); - } - - $taxonomies = get_taxonomies(); - - foreach ( $taxonomies as $taxonomy ) { - - if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { - continue; - } - - $option_taxonomy_config = array( - "tax_{$taxonomy}_title" => array(), - "tax_{$taxonomy}_description" => array(), - "tax_{$taxonomy}_custom_robots" => array(), - "tax_{$taxonomy}_robots" => array(), - "tax_{$taxonomy}_add_meta_box" => array(), - "remove_{$taxonomy}_snippet_data" => array(), - ); - - $option_config = wpm_array_merge_recursive( $option_taxonomy_config, $option_config ); - } - - return $option_config; - } - - /** - * Add filter for each type - * - * @param $type - * - * @return mixed - */ - public function add_filter_for_maps( $type ) { - add_filter( "rank_math/sitemap/{$type}_urlset", array( $this, 'add_namespace_to_xml' ) ); - return $type; - } - - /** - * Add namespace for xmlns:xhtml - * - * @param $urlset - * - * @return mixed - */ - public function add_namespace_to_xml( $urlset ) { - $urlset = str_replace( - array( - 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd', - 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"' - ), - array( - 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd', - 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml"' - ), - $urlset ); - - return $urlset; - } - - /** - * Add separating by language to url - * - * @param array $url - * @param string $type - * @param object $object - * - * @return array - */ - public function add_lang_to_url( $url, $type, $object ) { - - $languages = array(); - - switch ( $type ) { - case 'post': - $languages = get_post_meta( $object->ID, '_languages', true ); - break; - case 'term': - $languages = get_term_meta( $object->term_id, '_languages', true ); - break; - } - - if ( $languages ) { - $url['languages'] = $languages; - } - - return $url; - } - - /** - * Add alternate links to sitemap - * - * @param string $output - * @param array $url - * - * @return string - */ - public function add_alternate_sitemaplinks( $output, $url ) { - $loc = $output; - $new_output = ''; - - foreach ( wpm_get_languages() as $code => $language ) { - - if ( isset( $url['languages'] ) && ! in_array( $code, $url['languages'] ) ) { - continue; - } - - $alternate = array(); - $new_loc = str_replace( $url['loc'], esc_url( wpm_translate_url( $url['loc'], $code ) ), $loc ); - - foreach ( wpm_get_languages() as $key => $lg ) { - if ( isset( $url['languages'] ) && ! in_array( $key, $url['languages'] ) ) { - continue; - } - - $alternate[ $key ] = sprintf( "\t\n\t", esc_attr( wpm_sanitize_lang_slug( $lg['locale'] ) ), esc_url( wpm_translate_url( $url['loc'], $key ) ) ); - } - - $alternate = apply_filters( 'wpm_sitemap_alternate_links', $alternate, $url['loc'], $code ); - $new_loc = str_replace( '', implode( '', $alternate ) . '', $new_loc ); - $new_output .= $new_loc; - } - - return $new_output; - } - - /** - * Translate the schema markup as respective of there language - * @param $schemas array - * @param $json_ld object - * @return $schemas array - * @since 2.4.16 - * */ - public function modify_schema_json_ld( $schemas, $json_ld ) { - - global $wpdb; - $flag = 0; - if ( ! empty( $schemas ) && is_array( $schemas ) && is_object( $json_ld ) ) { - - $post_id = 0; - if ( ! empty( $json_ld->post_id ) ) { - $post_id = $json_ld->post_id; - } - - $current_lang = wpm_get_language(); - - foreach ( $schemas as $schema_key => $schema ) { - - if ( is_array( $schema ) && ! empty( $schema['@type'] ) && strpos( $schema_key, 'schema-' ) !== false ) { - - $translated_key = '_wpm_rank_math_schema_'.$schema['@type']; - $translated_schema = ''; - - if ( $post_id > 0 ) { - $translated_schema = get_post_meta( $post_id, $translated_key, true ); - }else{ - $meta_id = absint( str_replace( 'schema-', '', $schema_key ) ); - if ( $meta_id > 0 ) { - - $cache_key = 'wpm_rankmath_term_meta_'.$meta_id; - $term_meta = wp_cache_get( $cache_key ); - if ( $term_meta === false ){ - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $term_meta = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->termmeta} WHERE meta_id = %d", $meta_id ) ); - wp_cache_set( $cache_key, $term_meta ); - } - if ( is_object( $term_meta ) && ! empty( $term_meta->term_id ) ) { - $translated_schema = get_term_meta( $term_meta->term_id, $translated_key, true ); - } - } - } - - if ( ! empty( $translated_schema ) && is_string( $translated_schema ) ) { - - $translated_schema = maybe_unserialize( base64_decode( wpm_translate_value( $translated_schema ) , true ) ); - - if ( is_array( $translated_schema ) && ! empty( $translated_schema['@type'] ) && $schema['@type'] == $translated_schema['@type'] ) { - $schemas[$schema_key] = $translated_schema; - $flag = 1; - } - - } - - } - - } - - } - - if ( $flag == 1 ) { - $schemas = $json_ld->replace_variables( $schemas, [], $schemas ); - $schemas = $json_ld->filter( $schemas, $json_ld, $schemas ); - } - - return $schemas; - - } - - /** - * Insert schema translation into db - * @param $object_id int - * @param $schemas array - * @param $object_type string - * @since 2.4.16 - * */ - public function modify_schema_meta_data( $object_id, $schemas, $object_type ) { - - if ( ! empty( $schemas ) && is_array( $schemas ) ) { - - foreach ( $schemas as $id => $schema ) { - - $schema = $this->sanitize_schema_type( $schema ); - $type = is_array( $schema['@type'] ) ? $schema['@type'][0] : $schema['@type']; - $meta_key = '_wpm_rank_math_schema_' . $type; - $schema = wp_kses_post_deep( $schema ); - - switch ( $object_type ) { - - case 'post': - - $current_value = get_post_meta( $object_id, $meta_key, true ); - - if ( is_array( $schema ) || is_object( $schema ) ) { - $schema = maybe_serialize( $schema ); - } - - if ( empty( $current_value ) ) { - $current_value = base64_encode( $schema ); - } - - update_post_meta( $object_id, $meta_key, wpm_set_new_value( $current_value, base64_encode( $schema ) ) ); - - break; - - case 'term': - - $current_value = get_term_meta( $object_id, $meta_key, true ); - - if ( is_array( $schema ) || is_object( $schema ) ) { - $schema = maybe_serialize( $schema ); - } - - if ( empty( $current_value ) ) { - $current_value = base64_encode( $schema ); - } - - update_term_meta( $object_id, $meta_key, wpm_set_new_value( $current_value, base64_encode( $schema ) ) ); - - break; - - } - } - } - - } - - /** - * Sanitize schema data - * @param $schema array - * @return $schema array - * @since 2.4.16 - * */ - public function sanitize_schema_type( $schema ) { - - if ( ! isset( $schema['@type'] ) ) { - return $schema; - } - - if ( ! is_array( $schema['@type'] ) ) { - // Sanitize single type. - $schema['@type'] = preg_replace( '/[^a-zA-Z0-9]/', '', $schema['@type'] ); - return $schema; - } - - // Sanitize each type. - foreach ( $schema['@type'] as $key => $type ) { - $schema['@type'][ $key ] = preg_replace( '/[^a-zA-Z0-9]/', '', $type ); - } - - return $schema; - - } - - /** - * Delete schema by meta id - * @param $delete bool - * @param $meta_id int - * @return $delete bool - * @since 2.4.16 - * */ - public function delete_schema( $delete, $meta_id ) { - - $get_meta_data = get_metadata_by_mid( 'post', $meta_id ); - - if ( is_object( $get_meta_data ) && ! empty( $get_meta_data->meta_key ) && strpos( $get_meta_data->meta_key, 'rank_math_schema_' ) !== false && ! empty( $get_meta_data->post_id ) ) { - - $id = $get_meta_data->post_id; - $this->delete_schema_metadata( $meta_id, 'post', $id, $get_meta_data->meta_key ); - - } - - return $delete; - } - - /** - * Delete schema by meta id - * @param $meta_id bool - * @param $object_type int - * @param $id int - * @param $meta_key int - * @since 2.4.16 - * */ - public function delete_schema_metadata( $meta_id, $object_type, $id, $meta_key ){ - - $translated_key = '_wpm_'.$meta_key; - - switch ( $object_type ) { - - case 'post': - - $meta_data = get_post_meta( $id ); - if ( ! empty( $meta_data ) && is_array( $meta_data ) ) { - if ( array_key_exists( $translated_key , $meta_data ) ) { - delete_post_meta( $id, $translated_key ); - } - } - - break; - - } - - } - - /** - * Translate schema data on admin panel schema tab - * @param $data array - * @return $data array - * @since 2.4.16 - * */ - public function modify_json_data( $data ){ - - if ( is_array( $data ) && ! empty( $data['schemas'] ) && is_array( $data['schemas'] ) ) { - - if ( ! empty( $data['objectID'] ) && $data['objectType'] ) { - - $id = $data['objectID']; - $type = $data['objectType']; - - foreach ( $data['schemas'] as $schema_key => $schema ) { - - if ( is_array( $schema ) && ! empty( $schema['@type'] ) ) { - - $translated_key = '_wpm_rank_math_schema_'.$schema['@type']; - $meta_data = array(); - if ( $type == 'post' ) { - $meta_data = get_post_meta( $id ); - } - if ( $type == 'term' ) { - $meta_data = get_term_meta( $id ); - } - - if ( ! empty( $meta_data ) && is_array( $meta_data ) ) { - - if ( array_key_exists( $translated_key , $meta_data ) ) { - - if ( is_array( $meta_data[$translated_key] ) && ! empty( $meta_data[$translated_key][0] ) && is_string( $meta_data[$translated_key][0] ) ) { - $translated_schema = maybe_unserialize( base64_decode( $meta_data[$translated_key][0], true) ); - if ( ! empty( $translated_schema ) && is_array( $translated_schema ) ) { - $data['schemas'][$schema_key] = $translated_schema; - } - } - - } - - } - - } - - } - } - } - - return $data; - - } - + array(), + "pt_{$post_type}_description" => array(), + "pt_{$post_type}_default_rich_snippet" => array(), + "pt_{$post_type}_default_snippet_name" => array(), + "pt_{$post_type}_default_snippet_desc" => array(), + "pt_{$post_type}_default_article_type" => array(), + "pt_{$post_type}_custom_robots" => array(), + "pt_{$post_type}_link_suggestions" => array(), + "pt_{$post_type}_ls_use_fk" => array(), + "pt_{$post_type}_primary_taxonomy" => array(), + "pt_{$post_type}_add_meta_box" => array(), + "pt_{$post_type}_bulk_editing" => array(), + ); + + $option_config = wpm_array_merge_recursive( $option_post_config, $option_config ); + } + + $taxonomies = get_taxonomies(); + + foreach ( $taxonomies as $taxonomy ) { + + if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { + continue; + } + + $option_taxonomy_config = array( + "tax_{$taxonomy}_title" => array(), + "tax_{$taxonomy}_description" => array(), + "tax_{$taxonomy}_custom_robots" => array(), + "tax_{$taxonomy}_robots" => array(), + "tax_{$taxonomy}_add_meta_box" => array(), + "remove_{$taxonomy}_snippet_data" => array(), + ); + + $option_config = wpm_array_merge_recursive( $option_taxonomy_config, $option_config ); + } + + return $option_config; + } + + /** + * Add filter for each type + * + * @param $type + * + * @return mixed + */ + public function add_filter_for_maps( $type ) { + add_filter( "rank_math/sitemap/{$type}_urlset", array( $this, 'add_namespace_to_xml' ) ); + return $type; + } + + /** + * Add namespace for xmlns:xhtml + * + * @param $urlset + * + * @return mixed + */ + public function add_namespace_to_xml( $urlset ) { + $urlset = str_replace( + array( + 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd', + 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"' + ), + array( + 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd', + 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml"' + ), + $urlset ); + + return $urlset; + } + + /** + * Add separating by language to url + * + * @param array $url + * @param string $type + * @param object $object + * + * @return array + */ + public function add_lang_to_url( $url, $type, $object ) { + + $languages = array(); + + switch ( $type ) { + case 'post': + $languages = get_post_meta( $object->ID, '_languages', true ); + break; + case 'term': + $languages = get_term_meta( $object->term_id, '_languages', true ); + break; + } + + if ( $languages ) { + $url['languages'] = $languages; + } + + return $url; + } + + /** + * Add alternate links to sitemap + * + * @param string $output + * @param array $url + * + * @return string + */ + public function add_alternate_sitemaplinks( $output, $url ) { + $loc = $output; + $new_output = ''; + + foreach ( wpm_get_languages() as $code => $language ) { + + if ( isset( $url['languages'] ) && ! in_array( $code, $url['languages'] ) ) { + continue; + } + + $alternate = array(); + $new_loc = str_replace( $url['loc'], esc_url( wpm_translate_url( $url['loc'], $code ) ), $loc ); + + foreach ( wpm_get_languages() as $key => $lg ) { + if ( isset( $url['languages'] ) && ! in_array( $key, $url['languages'] ) ) { + continue; + } + + $alternate[ $key ] = sprintf( "\t\n\t", esc_attr( wpm_sanitize_lang_slug( $lg['locale'] ) ), esc_url( wpm_translate_url( $url['loc'], $key ) ) ); + } + + $alternate = apply_filters( 'wpm_sitemap_alternate_links', $alternate, $url['loc'], $code ); + $new_loc = str_replace( '', implode( '', $alternate ) . '', $new_loc ); + $new_output .= $new_loc; + } + + return $new_output; + } + + /** + * Translate the schema markup as respective of there language + * @param $schemas array + * @param $json_ld object + * @return $schemas array + * @since 2.4.16 + * */ + public function modify_schema_json_ld( $schemas, $json_ld ) { + + global $wpdb; + $flag = 0; + if ( ! empty( $schemas ) && is_array( $schemas ) && is_object( $json_ld ) ) { + + $post_id = 0; + if ( ! empty( $json_ld->post_id ) ) { + $post_id = $json_ld->post_id; + } + + $current_lang = wpm_get_language(); + + foreach ( $schemas as $schema_key => $schema ) { + + if ( is_array( $schema ) && ! empty( $schema['@type'] ) && strpos( $schema_key, 'schema-' ) !== false ) { + + $translated_key = '_wpm_rank_math_schema_'.$schema['@type']; + $translated_schema = ''; + + if ( $post_id > 0 ) { + $translated_schema = get_post_meta( $post_id, $translated_key, true ); + }else{ + $meta_id = absint( str_replace( 'schema-', '', $schema_key ) ); + if ( $meta_id > 0 ) { + + $cache_key = 'wpm_rankmath_term_meta_'.$meta_id; + $term_meta = wp_cache_get( $cache_key ); + if ( $term_meta === false ){ + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $term_meta = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->termmeta} WHERE meta_id = %d", $meta_id ) ); + wp_cache_set( $cache_key, $term_meta ); + } + if ( is_object( $term_meta ) && ! empty( $term_meta->term_id ) ) { + $translated_schema = get_term_meta( $term_meta->term_id, $translated_key, true ); + } + } + } + + if ( ! empty( $translated_schema ) && is_string( $translated_schema ) ) { + + $translated_schema = maybe_unserialize( base64_decode( wpm_translate_value( $translated_schema ) , true ) ); + + if ( is_array( $translated_schema ) && ! empty( $translated_schema['@type'] ) && $schema['@type'] == $translated_schema['@type'] ) { + $schemas[$schema_key] = $translated_schema; + $flag = 1; + } + + } + + } + + } + + } + + if ( $flag == 1 ) { + $schemas = $json_ld->replace_variables( $schemas, [], $schemas ); + $schemas = $json_ld->filter( $schemas, $json_ld, $schemas ); + } + + return $schemas; + + } + + /** + * Insert schema translation into db + * @param $object_id int + * @param $schemas array + * @param $object_type string + * @since 2.4.16 + * */ + public function modify_schema_meta_data( $object_id, $schemas, $object_type ) { + + if ( ! empty( $schemas ) && is_array( $schemas ) ) { + + foreach ( $schemas as $id => $schema ) { + + $schema = $this->sanitize_schema_type( $schema ); + $type = is_array( $schema['@type'] ) ? $schema['@type'][0] : $schema['@type']; + $meta_key = '_wpm_rank_math_schema_' . $type; + $schema = wp_kses_post_deep( $schema ); + + switch ( $object_type ) { + + case 'post': + + $current_value = get_post_meta( $object_id, $meta_key, true ); + + if ( is_array( $schema ) || is_object( $schema ) ) { + $schema = maybe_serialize( $schema ); + } + + if ( empty( $current_value ) ) { + $current_value = base64_encode( $schema ); + } + + update_post_meta( $object_id, $meta_key, wpm_set_new_value( $current_value, base64_encode( $schema ) ) ); + + break; + + case 'term': + + $current_value = get_term_meta( $object_id, $meta_key, true ); + + if ( is_array( $schema ) || is_object( $schema ) ) { + $schema = maybe_serialize( $schema ); + } + + if ( empty( $current_value ) ) { + $current_value = base64_encode( $schema ); + } + + update_term_meta( $object_id, $meta_key, wpm_set_new_value( $current_value, base64_encode( $schema ) ) ); + + break; + + } + } + } + + } + + /** + * Sanitize schema data + * @param $schema array + * @return $schema array + * @since 2.4.16 + * */ + public function sanitize_schema_type( $schema ) { + + if ( ! isset( $schema['@type'] ) ) { + return $schema; + } + + if ( ! is_array( $schema['@type'] ) ) { + // Sanitize single type. + $schema['@type'] = preg_replace( '/[^a-zA-Z0-9]/', '', $schema['@type'] ); + return $schema; + } + + // Sanitize each type. + foreach ( $schema['@type'] as $key => $type ) { + $schema['@type'][ $key ] = preg_replace( '/[^a-zA-Z0-9]/', '', $type ); + } + + return $schema; + + } + + /** + * Delete schema by meta id + * @param $delete bool + * @param $meta_id int + * @return $delete bool + * @since 2.4.16 + * */ + public function delete_schema( $delete, $meta_id ) { + + $get_meta_data = get_metadata_by_mid( 'post', $meta_id ); + + if ( is_object( $get_meta_data ) && ! empty( $get_meta_data->meta_key ) && strpos( $get_meta_data->meta_key, 'rank_math_schema_' ) !== false && ! empty( $get_meta_data->post_id ) ) { + + $id = $get_meta_data->post_id; + $this->delete_schema_metadata( $meta_id, 'post', $id, $get_meta_data->meta_key ); + + } + + return $delete; + } + + /** + * Delete schema by meta id + * @param $meta_id bool + * @param $object_type int + * @param $id int + * @param $meta_key int + * @since 2.4.16 + * */ + public function delete_schema_metadata( $meta_id, $object_type, $id, $meta_key ){ + + $translated_key = '_wpm_'.$meta_key; + + switch ( $object_type ) { + + case 'post': + + $meta_data = get_post_meta( $id ); + if ( ! empty( $meta_data ) && is_array( $meta_data ) ) { + if ( array_key_exists( $translated_key , $meta_data ) ) { + delete_post_meta( $id, $translated_key ); + } + } + + break; + + } + + } + + /** + * Translate schema data on admin panel schema tab + * @param $data array + * @return $data array + * @since 2.4.16 + * */ + public function modify_json_data( $data ){ + + if ( is_array( $data ) && ! empty( $data['schemas'] ) && is_array( $data['schemas'] ) ) { + + if ( ! empty( $data['objectID'] ) && $data['objectType'] ) { + + $id = $data['objectID']; + $type = $data['objectType']; + + foreach ( $data['schemas'] as $schema_key => $schema ) { + + if ( is_array( $schema ) && ! empty( $schema['@type'] ) ) { + + $translated_key = '_wpm_rank_math_schema_'.$schema['@type']; + $meta_data = array(); + if ( $type == 'post' ) { + $meta_data = get_post_meta( $id ); + } + if ( $type == 'term' ) { + $meta_data = get_term_meta( $id ); + } + + if ( ! empty( $meta_data ) && is_array( $meta_data ) ) { + + if ( array_key_exists( $translated_key , $meta_data ) ) { + + if ( is_array( $meta_data[$translated_key] ) && ! empty( $meta_data[$translated_key][0] ) && is_string( $meta_data[$translated_key][0] ) ) { + $translated_schema = maybe_unserialize( base64_decode( $meta_data[$translated_key][0], true) ); + if ( ! empty( $translated_schema ) && is_array( $translated_schema ) ) { + $data['schemas'][$schema_key] = $translated_schema; + } + } + + } + + } + + } + + } + } + } + + return $data; + + } + + /** + * Translate variables + * @param $vars array + * @return $vars array + * @since 2.4.21 + * */ + public function translate_variables( $vars ) { + + if ( is_array( $vars ) && ! empty( $vars ) ) { + + foreach ( $vars as $key => $value ) { + if ( is_array( $value ) && ! empty( $value['example'] ) ) { + if ( $key === 'title' || $key === 'seo_title' || $key === 'user_description' ) { + $vars[$key]['example'] = wpm_translate_value( $value['example'] ); + } + } + } + + } + + return $vars; + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-scf.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-scf.php index 8cd5ea5b4..383a9a250 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-scf.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-scf.php @@ -1,687 +1,687 @@ - array( - 'set_data_value', - 'get_data_value' - ), - ); - - //Install meta Filters - foreach ($meta_keys as $meta_key => $callbacks) { - - add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); - add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); - } - - add_action( 'add_meta_boxes', array( $this, 'translate_metabox_title' ), 100, 2 ); - - // Hooks for Posts and pages - add_filter( 'get_post_metadata', array( $this, 'translate_meta_data' ), 100, 5 ); - add_action( 'added_post_meta', array( $this, 'added_post_meta' ), 10, 4 ); - add_action( 'save_post_smart-custom-fields', array( $this, 'clear_post_meta_cache' ), 10, 5 ); - - // Hooks for Term - add_action( 'added_term_meta', array( $this, 'added_term_meta' ), 10, 4 ); - add_filter( 'get_term_metadata', array( $this, 'translate_term_meta_data' ), 100, 5 ); - - } - - - /** - * Set meta translate in base64 - * - * @param $key - * @param $value - * @return mixed - * @since 2.4.14 - */ - private function set_value( $key, $value ) { - - if ( ! $this->object_id ) { - return $value; - } - - $update_value = $value; - - $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); - - if ( ( ! empty( $update_value ) && is_array( $update_value ) ) ) { - - $translate_cur_val = $current_value; - if ( is_string( $translate_cur_val ) ) { - $translate_cur_val = json_decode( base64_decode( wpm_translate_string($current_value), true ), true ); - } - - foreach ( $update_value as $u_key => $u_value ) { - - if ( is_array( $u_value ) && ! empty( $u_value['fields'] ) && is_array( $u_value['fields'] ) ) { - - foreach ( $u_value['fields'] as $f_key => $f_value ) { - - if ( is_array( $f_value ) && ! empty( $f_value['label'] ) ) { - - if ( ! empty( $translate_cur_val[$u_key]['fields'][$f_key]['label'] ) ) { - - $update_value[$u_key]['fields'][$f_key]['label'] = wpm_set_new_value( $translate_cur_val[$u_key]['fields'][$f_key]['label'], $f_value['label'] ); - - }else { - $update_value[$u_key]['fields'][$f_key]['label'] = wpm_set_new_value( '', $f_value['label'] ); - } - - } - - } - - } - - } - - if ( is_array( $update_value ) ) { - $update_value = base64_encode( wp_json_encode($update_value ) ); - } - } - - update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, $update_value ) ); - - $this->object_id = 0; - - return $value; - } - - /** - * Get meta translate from base64 - * - * @param $key - * @param $value - * @return false|string - * @since 2.4.14 - */ - private function get_value($key, $value) { - - if ( ! $this->object_id ) { - return $value; - } - - $tr_value = wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ); - if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { - $tr_value = base64_decode( $tr_value, true ); - } - - $this->object_id = 0; - - if ( ! empty( $tr_value ) ) { - return $tr_value; - }else{ - return $value; - } - - } - - - /** - * Config meta keys - * - * @param $config - * @param $meta_value - * @param $object_id - * @return mixed - * @since 2.4.14 - */ - public function config($config, $meta_value, $object_id) { - - $this->object_id = $object_id; - - return $config; - } - - /** - * Set meta value data - * - * @param $value - * @return mixed - * @since 2.4.14 - */ - public function set_data_value( $value ) { - - $key = self::SMART_CF_SETTINGS; - - return $this->set_value($key, $value); - } - - /** - * Get meta value data - * - * @param $value - * @return false|string - * @since 2.4.14 - */ - public function get_data_value( $value ) { - - $key = self::SMART_CF_SETTINGS; - - $value = $this->get_value( $key, $value ); - - if ( ! empty( $value ) && is_string( $value ) ) { - $value = json_decode( $this->get_value( $key, $value ), true ); - } - - return $value; - } - - /** - * Translate MetaBox Title on admin editor page - * - * @param $post_type - * @param $post - * @since 2.4.14 - */ - public function translate_metabox_title( $post_type, $post ){ - - global $wp_meta_boxes; - - if ( is_array( $wp_meta_boxes ) && - ( ! empty( $wp_meta_boxes[$post_type]) && is_array( $wp_meta_boxes[$post_type] ) ) && - ( ! empty( $wp_meta_boxes[$post_type]['normal'] ) && is_array( $wp_meta_boxes[$post_type]['normal'] ) ) && - ( ! empty( $wp_meta_boxes[$post_type]['normal']['default'] ) && is_array( $wp_meta_boxes[$post_type]['normal']['default'] ) ) ) { - - $default_meta_box = $wp_meta_boxes[$post_type]['normal']['default']; - foreach ( $default_meta_box as $key => $value ) { - - $prefix = 'smart-cf'; - if ( is_array( $value ) && ! empty( $value['title'] ) && strpos( $key, $prefix ) !== false ) { - $wp_meta_boxes[$post_type]['normal']['default'][$key]['title'] = wpm_translate_string( $value['title'] ); - } - } - - } - - } - - /** - * Get All SCF field names - * @return $dynamic_meta_fields array - * @since 2.4.14 - */ - public function get_group_field_names( $post ){ - - $dynamic_meta_fields = array(); - - if ( is_object( $post ) ) { - - if ( class_exists( 'SCF' ) ) { - $settings = \SCF::get_settings( $post ); - if ( is_array( $settings ) && ! empty( $settings ) ) { - foreach ( $settings as $setting ) { - $groups = $setting->get_groups(); - foreach ( $groups as $group ) { - $fields = $group->get_fields(); - foreach ( $fields as $field ) { - $field_name = $field->get( 'name' ); - $dynamic_meta_fields[$field_name] = array( 'is_repeatable' => $group->is_repeatable() ); - } - } - } - } - } - - } - - return $dynamic_meta_fields; - - } - - /** - * Get translation data for SCF fields - * @since 2.4.14 - */ - public function translate_meta_data( $value, $object_id, $meta_key, $single, $meta_type ) { - - global $post; - $translate_key = $this->prefix.$meta_key; - $lang = wpm_get_language(); - - $parent_id = wp_get_post_parent_id( $object_id ); - if ( ! empty( $parent_id ) ) { - $object_id = $parent_id; - } - - $settings = array(); - if ( is_object( $post ) && ! empty( $post->ID ) ) { - $settings = $this->get_settings( $post ); - } - - if ( ! empty( $settings ) && is_array( $settings ) ) { - - $setting_fields = $this->get_setting_fields( $settings ); - $check_scf_field = $this->is_scf_field( $setting_fields, $meta_key ); - - if( ! empty( $check_scf_field ) ) { - - // Using built-in function get_post_meta is causing infinite loop here, so written custom query to get the meta data - $get_value = $this->get_post_meta( $object_id, $translate_key ); - - if ( ! empty( $get_value ) && is_array( $get_value ) ) { - - if ( isset( $get_value[0] ) && is_object( $get_value[0] ) && isset( $get_value[0]->meta_value ) ) { - - if ( ! empty( $get_value[0]->meta_value ) && is_string( $get_value[0]->meta_value ) ) { - - $get_value = maybe_unserialize($get_value[0]->meta_value); - if ( ! empty( $get_value ) && is_array( $get_value ) && isset( $get_value[$lang] ) ) { - if ( is_string( $get_value[$lang] ) ) { - $value[0] = $get_value[$lang]; - }else{ - if ( ! empty( $check_scf_field['is_repeatable'] ) ) { - $value = $get_value[$lang]; - } - } - } - - } - } - - } - } - } - - return $value; - - } - - /** - * Get translation data for SCF fields - * @since 2.4.14 - */ - public function translate_term_meta_data( $value, $object_id, $meta_key, $single, $meta_type ) { - - $translate_key = $this->prefix.$meta_key; - $lang = wpm_get_language(); - - $term = get_term( $object_id ); - - $settings = array(); - if ( is_object( $term ) && ! empty( $term->term_id ) ) { - $settings = $this->get_settings( $term ); - } - - if ( ! empty( $settings ) && is_array( $settings ) ) { - - $setting_fields = $this->get_setting_fields( $settings ); - $check_scf_field = $this->is_scf_field( $setting_fields, $meta_key ); - - if( ! empty( $check_scf_field ) ) { - - // Using built-in function get_post_meta is causing infinite loop here, so written custom query to get the meta data - $get_value = $this->get_term_meta( $object_id, $translate_key ); - - if ( ! empty( $get_value ) && is_array( $get_value ) ) { - - if ( isset( $get_value[0] ) && is_object( $get_value[0] ) && isset( $get_value[0]->meta_value ) ) { - - if ( ! empty( $get_value[0]->meta_value ) && is_string( $get_value[0]->meta_value ) ) { - - $get_value = maybe_unserialize($get_value[0]->meta_value); - if ( ! empty( $get_value ) && is_array( $get_value ) && isset( $get_value[$lang] ) ) { - if ( is_string( $get_value[$lang] ) ) { - $value[0] = $get_value[$lang]; - }else{ - if ( ! empty( $check_scf_field['is_repeatable'] ) ) { - $value = $get_value[$lang]; - } - } - } - - } - } - - } - } - - } - - return $value; - - } - - /** - * Get post meta data from table - * @param $post_id integer - * @param $meta_key string - * @return $meta_value array - * @since 2.4.14 - */ - public function get_post_meta( $post_id, $meta_key ){ - - global $wpdb; - - $cache_data = false; - $cache_key = $post_id.$meta_key; - $cache_group = 'wpm_scf'; - - if ( $meta_key == self::SMART_CF_SETTINGS ) { - $cache_data = wp_cache_get( $cache_key, $cache_group ); - $meta_value = $cache_data; - } - - if ( $cache_data == false ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason This code is already called under added_post_meta hook, which is causing the infinite loop, so using manul query to get the results - $meta_value = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d ORDER BY meta_id", $meta_key, $post_id ) ); - - if ( $meta_key == self::SMART_CF_SETTINGS ) { - wp_cache_set( $cache_key, $meta_value, $cache_group ); - } - - } - - return $meta_value; - } - - /** - * Get term meta data from table - * @param $term_id integer - * @param $meta_key string - * @return $meta_value array - * @since 2.4.14 - */ - public function get_term_meta( $term_id, $meta_key ){ - - global $wpdb; - - $meta_value = false; - $cache_key = 'wpm_scf_term_'.$post_id.'_'.$meta_key; - $cache_group = 'wpm_scf'; - - $cache_data = wp_cache_get( $cache_key, $cache_group ); - $meta_value = $cache_data; - - if ( $meta_value == false ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason This code is already called under added_post_meta hook, which is causing the infinite loop, so using manul query to get the results - $meta_value = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->termmeta} WHERE meta_key = %s AND term_id = %d ORDER BY meta_id", $meta_key, $term_id ) ); - wp_cache_set( $cache_key, $meta_value, $cache_group ); - - } - - return $meta_value; - - } - - /** - * Update the translated fields - * @param $mid integer - * @param $object_id integer - * @param $meta_key string - * @param $_meta_value mixed - * @since 2.4.14 - */ - public function added_post_meta( $mid, $object_id, $meta_key, $_meta_value ){ - - global $post; - - $dynamic_meta_fields = $this->get_group_field_names( $post ); - - if ( ! empty( $dynamic_meta_fields ) && array_key_exists($meta_key, $dynamic_meta_fields) ) { - - $parent_id = wp_get_post_parent_id( $object_id ); - if ( ! empty( $parent_id ) ) { - $object_id = $parent_id; - } - - $translate_key = $this->prefix.$meta_key; - $lang = wpm_get_language(); - $updated_data = get_post_meta( $object_id, $translate_key, true ); - if ( empty( $updated_data ) ) { - $updated_data = array(); - } - - if ( ! empty( $dynamic_meta_fields[$meta_key]['is_repeatable'] ) ) { - - $data = array(); - $get_meta = $this->get_post_meta( $object_id, $meta_key ); - if ( ! empty( $get_meta ) && is_array( $get_meta ) ) { - foreach ( $get_meta as $gkey => $gvalue ) { - if ( is_object( $gvalue ) && isset( $gvalue->meta_value ) ) { - $data[] = $gvalue->meta_value; - } - } - } - - if ( is_array( $data ) ) { - - $updated_data[$lang] = $data; - } - - }else{ - if ( empty( $updated_data ) ) { - - $updated_data[$lang] = $_meta_value; - - }else if ( is_array( $updated_data ) ) { - - $updated_data[$lang] = $_meta_value; - - } - - } - - update_post_meta( $object_id, $translate_key, $updated_data ); - } - - } - - /** - * Update the translated fields - * @param $mid integer - * @param $object_id integer - * @param $meta_key string - * @param $_meta_value mixed - * @since 2.4.14 - */ - public function added_term_meta( $mid, $object_id, $meta_key, $_meta_value ){ - - $term = get_term( $object_id ); - - $dynamic_meta_fields = $this->get_group_field_names( $term ); - - if ( ! empty( $dynamic_meta_fields ) && array_key_exists($meta_key, $dynamic_meta_fields) ) { - - $translate_key = $this->prefix.$meta_key; - $lang = wpm_get_language(); - $updated_data = get_term_meta( $object_id, $translate_key, true ); - if ( empty( $updated_data ) ) { - $updated_data = array(); - } - - if ( ! empty( $dynamic_meta_fields[$meta_key]['is_repeatable'] ) ) { - - $data = array(); - $get_meta = $this->get_term_meta( $object_id, $meta_key ); - if ( ! empty( $get_meta ) && is_array( $get_meta ) ) { - foreach ( $get_meta as $gkey => $gvalue ) { - if ( is_object( $gvalue ) && isset( $gvalue->meta_value ) ) { - $data[] = $gvalue->meta_value; - } - } - } - - if ( is_array( $data ) ) { - - $updated_data[$lang] = $data; - } - - }else{ - if ( empty( $updated_data ) ) { - - $updated_data[$lang] = $_meta_value; - - }else if ( is_array( $updated_data ) ) { - - $updated_data[$lang] = $_meta_value; - - } - - } - - update_term_meta( $object_id, $translate_key, $updated_data ); - - } - - } - - /** - * Get SCF field keys - * @param $wp_object integer - * @return $settings array - * @since 2.4.14 - */ - public function get_settings( $wp_object ){ - - $settings = array(); - - if ( ! empty( $wp_object ) && is_object( $wp_object ) && class_exists( 'Smart_Custom_Fields_Meta' ) ) { - - $meta = new \Smart_Custom_Fields_Meta( $wp_object ); - - $id = $meta->get_id(); - $type = $meta->get_type( false ); - $types = $meta->get_types( false ); - $meta_type = $meta->get_meta_type(); - - // IF the post that has custom field settings according to post ID, - // don't display because the post ID would change in preview. - // So if in preview, re-getting post ID from original post (parent of the preview). - if ( 'post' === $meta_type && 'revision' === $wp_object->post_type ) { - $wp_object = get_post( $wp_object->post_parent ); - } - - $settings_posts = array(); - if ( class_exists( 'SCF' ) ) { - $settings_posts = \SCF::get_settings_posts( $wp_object ); - } - - - if ( ! empty( $settings_posts ) && is_array( $settings_posts ) ) { - - foreach ( $settings_posts as $sp_key => $setting_post ) { - - if ( is_object( $setting_post ) && ! empty( $setting_post->ID ) ) { - - $setting_meta = $this->get_post_meta( $setting_post->ID, self::SMART_CF_SETTINGS ); - - if ( is_array( $setting_meta ) && ! empty( $setting_meta[0] ) && ! empty( $setting_meta[0]->meta_value ) && is_string( $setting_meta[0]->meta_value ) ) { - $setting_meta = maybe_unserialize( $setting_meta[0]->meta_value ); - if ( ! empty( $setting_meta ) && is_array( $setting_meta ) ) { - - if ( empty( $settings ) ) { - $settings = $setting_meta; - }else{ - $settings = array_merge( $settings, $setting_meta ); - } - - } - } - } - } - - } - } - - return $settings; - } - - /** - * Filter the settings and and return on fields - * @param $settings array - * @return $fields array - * @since 2.4.14 - */ - public function get_setting_fields( $settings ){ - - $fields = array(); - - if ( ! empty( $settings ) && is_array( $settings ) ) { - foreach ( $settings as $set_key => $set_value ) { - $data = array(); - $data['field_name'] = ''; - $data['is_repeatable'] = ''; - - if ( ! empty( $set_value['fields'] ) && ! empty( $set_value['fields'][0] ) && ! empty( $set_value['fields'][0]['name'] ) ) { - $data['field_name'] = $set_value['fields'][0]['name']; - } - - $data['is_repeatable'] = isset( $set_value['repeat'] ) ? $set_value['repeat'] : ''; - $fields[] = $data; - } - } - - return $fields; - } - - /** - * Check if current post meta key is a SCF field - * @param $fields array - * @param $key string - * @return $match array - * @since 2.4.14 - */ - public function is_scf_field( $fields, $key ){ - - $match = array(); - foreach ($fields as $fkey => $field) { - if ( $field['field_name'] == $key ) { - $match = $field; - break; - } - } - - return $match; - } - - /** - * Clear post meta cache once SCF post is saved - * @param $post_id integer - * @param $post WP_Post - * @param $update bool - * @since 2.4.14 - * */ - public function clear_post_meta_cache( $post_id, $post, $update ){ - - $cache_key = $post_id.self::SMART_CF_SETTINGS; - $cache_group = 'wpm_scf'; - wp_cache_delete( $cache_key, $cache_group ); - } - + array( + 'set_data_value', + 'get_data_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + + add_action( 'add_meta_boxes', array( $this, 'translate_metabox_title' ), 100, 2 ); + + // Hooks for Posts and pages + add_filter( 'get_post_metadata', array( $this, 'translate_meta_data' ), 100, 5 ); + add_action( 'added_post_meta', array( $this, 'added_post_meta' ), 10, 4 ); + add_action( 'save_post_smart-custom-fields', array( $this, 'clear_post_meta_cache' ), 10, 5 ); + + // Hooks for Term + add_action( 'added_term_meta', array( $this, 'added_term_meta' ), 10, 4 ); + add_filter( 'get_term_metadata', array( $this, 'translate_term_meta_data' ), 100, 5 ); + + } + + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.14 + */ + private function set_value( $key, $value ) { + + if ( ! $this->object_id ) { + return $value; + } + + $update_value = $value; + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + if ( ( ! empty( $update_value ) && is_array( $update_value ) ) ) { + + $translate_cur_val = $current_value; + if ( is_string( $translate_cur_val ) ) { + $translate_cur_val = json_decode( base64_decode( wpm_translate_string($current_value), true ), true ); + } + + foreach ( $update_value as $u_key => $u_value ) { + + if ( is_array( $u_value ) && ! empty( $u_value['fields'] ) && is_array( $u_value['fields'] ) ) { + + foreach ( $u_value['fields'] as $f_key => $f_value ) { + + if ( is_array( $f_value ) && ! empty( $f_value['label'] ) ) { + + if ( ! empty( $translate_cur_val[$u_key]['fields'][$f_key]['label'] ) ) { + + $update_value[$u_key]['fields'][$f_key]['label'] = wpm_set_new_value( $translate_cur_val[$u_key]['fields'][$f_key]['label'], $f_value['label'] ); + + }else { + $update_value[$u_key]['fields'][$f_key]['label'] = wpm_set_new_value( '', $f_value['label'] ); + } + + } + + } + + } + + } + + if ( is_array( $update_value ) ) { + $update_value = base64_encode( wp_json_encode($update_value ) ); + } + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, $update_value ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.14 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ); + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + $tr_value = base64_decode( $tr_value, true ); + } + + $this->object_id = 0; + + if ( ! empty( $tr_value ) ) { + return $tr_value; + }else{ + return $value; + } + + } + + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.14 + */ + public function config($config, $meta_value, $object_id) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.14 + */ + public function set_data_value( $value ) { + + $key = self::SMART_CF_SETTINGS; + + return $this->set_value($key, $value); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.14 + */ + public function get_data_value( $value ) { + + $key = self::SMART_CF_SETTINGS; + + $value = $this->get_value( $key, $value ); + + if ( ! empty( $value ) && is_string( $value ) ) { + $value = json_decode( $this->get_value( $key, $value ), true ); + } + + return $value; + } + + /** + * Translate MetaBox Title on admin editor page + * + * @param $post_type + * @param $post + * @since 2.4.14 + */ + public function translate_metabox_title( $post_type, $post ){ + + global $wp_meta_boxes; + + if ( is_array( $wp_meta_boxes ) && + ( ! empty( $wp_meta_boxes[$post_type]) && is_array( $wp_meta_boxes[$post_type] ) ) && + ( ! empty( $wp_meta_boxes[$post_type]['normal'] ) && is_array( $wp_meta_boxes[$post_type]['normal'] ) ) && + ( ! empty( $wp_meta_boxes[$post_type]['normal']['default'] ) && is_array( $wp_meta_boxes[$post_type]['normal']['default'] ) ) ) { + + $default_meta_box = $wp_meta_boxes[$post_type]['normal']['default']; + foreach ( $default_meta_box as $key => $value ) { + + $prefix = 'smart-cf'; + if ( is_array( $value ) && ! empty( $value['title'] ) && strpos( $key, $prefix ) !== false ) { + $wp_meta_boxes[$post_type]['normal']['default'][$key]['title'] = wpm_translate_string( $value['title'] ); + } + } + + } + + } + + /** + * Get All SCF field names + * @return $dynamic_meta_fields array + * @since 2.4.14 + */ + public function get_group_field_names( $post ){ + + $dynamic_meta_fields = array(); + + if ( is_object( $post ) ) { + + if ( class_exists( 'SCF' ) ) { + $settings = \SCF::get_settings( $post ); + if ( is_array( $settings ) && ! empty( $settings ) ) { + foreach ( $settings as $setting ) { + $groups = $setting->get_groups(); + foreach ( $groups as $group ) { + $fields = $group->get_fields(); + foreach ( $fields as $field ) { + $field_name = $field->get( 'name' ); + $dynamic_meta_fields[$field_name] = array( 'is_repeatable' => $group->is_repeatable() ); + } + } + } + } + } + + } + + return $dynamic_meta_fields; + + } + + /** + * Get translation data for SCF fields + * @since 2.4.14 + */ + public function translate_meta_data( $value, $object_id, $meta_key, $single, $meta_type ) { + + global $post; + $translate_key = $this->prefix.$meta_key; + $lang = wpm_get_language(); + + $parent_id = wp_get_post_parent_id( $object_id ); + if ( ! empty( $parent_id ) ) { + $object_id = $parent_id; + } + + $settings = array(); + if ( is_object( $post ) && ! empty( $post->ID ) ) { + $settings = $this->get_settings( $post ); + } + + if ( ! empty( $settings ) && is_array( $settings ) ) { + + $setting_fields = $this->get_setting_fields( $settings ); + $check_scf_field = $this->is_scf_field( $setting_fields, $meta_key ); + + if( ! empty( $check_scf_field ) ) { + + // Using built-in function get_post_meta is causing infinite loop here, so written custom query to get the meta data + $get_value = $this->get_post_meta( $object_id, $translate_key ); + + if ( ! empty( $get_value ) && is_array( $get_value ) ) { + + if ( isset( $get_value[0] ) && is_object( $get_value[0] ) && isset( $get_value[0]->meta_value ) ) { + + if ( ! empty( $get_value[0]->meta_value ) && is_string( $get_value[0]->meta_value ) ) { + + $get_value = maybe_unserialize($get_value[0]->meta_value); + if ( ! empty( $get_value ) && is_array( $get_value ) && isset( $get_value[$lang] ) ) { + if ( is_string( $get_value[$lang] ) ) { + $value[0] = $get_value[$lang]; + }else{ + if ( ! empty( $check_scf_field['is_repeatable'] ) ) { + $value = $get_value[$lang]; + } + } + } + + } + } + + } + } + } + + return $value; + + } + + /** + * Get translation data for SCF fields + * @since 2.4.14 + */ + public function translate_term_meta_data( $value, $object_id, $meta_key, $single, $meta_type ) { + + $translate_key = $this->prefix.$meta_key; + $lang = wpm_get_language(); + + $term = get_term( $object_id ); + + $settings = array(); + if ( is_object( $term ) && ! empty( $term->term_id ) ) { + $settings = $this->get_settings( $term ); + } + + if ( ! empty( $settings ) && is_array( $settings ) ) { + + $setting_fields = $this->get_setting_fields( $settings ); + $check_scf_field = $this->is_scf_field( $setting_fields, $meta_key ); + + if( ! empty( $check_scf_field ) ) { + + // Using built-in function get_post_meta is causing infinite loop here, so written custom query to get the meta data + $get_value = $this->get_term_meta( $object_id, $translate_key ); + + if ( ! empty( $get_value ) && is_array( $get_value ) ) { + + if ( isset( $get_value[0] ) && is_object( $get_value[0] ) && isset( $get_value[0]->meta_value ) ) { + + if ( ! empty( $get_value[0]->meta_value ) && is_string( $get_value[0]->meta_value ) ) { + + $get_value = maybe_unserialize($get_value[0]->meta_value); + if ( ! empty( $get_value ) && is_array( $get_value ) && isset( $get_value[$lang] ) ) { + if ( is_string( $get_value[$lang] ) ) { + $value[0] = $get_value[$lang]; + }else{ + if ( ! empty( $check_scf_field['is_repeatable'] ) ) { + $value = $get_value[$lang]; + } + } + } + + } + } + + } + } + + } + + return $value; + + } + + /** + * Get post meta data from table + * @param $post_id integer + * @param $meta_key string + * @return $meta_value array + * @since 2.4.14 + */ + public function get_post_meta( $post_id, $meta_key ){ + + global $wpdb; + + $cache_data = false; + $cache_key = $post_id.$meta_key; + $cache_group = 'wpm_scf'; + + if ( $meta_key == self::SMART_CF_SETTINGS ) { + $cache_data = wp_cache_get( $cache_key, $cache_group ); + $meta_value = $cache_data; + } + + if ( $cache_data == false ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason This code is already called under added_post_meta hook, which is causing the infinite loop, so using manul query to get the results + $meta_value = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d ORDER BY meta_id", $meta_key, $post_id ) ); + + if ( $meta_key == self::SMART_CF_SETTINGS ) { + wp_cache_set( $cache_key, $meta_value, $cache_group ); + } + + } + + return $meta_value; + } + + /** + * Get term meta data from table + * @param $term_id integer + * @param $meta_key string + * @return $meta_value array + * @since 2.4.14 + */ + public function get_term_meta( $term_id, $meta_key ){ + + global $wpdb; + + $meta_value = false; + $cache_key = 'wpm_scf_term_'.$post_id.'_'.$meta_key; + $cache_group = 'wpm_scf'; + + $cache_data = wp_cache_get( $cache_key, $cache_group ); + $meta_value = $cache_data; + + if ( $meta_value == false ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason This code is already called under added_post_meta hook, which is causing the infinite loop, so using manul query to get the results + $meta_value = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->termmeta} WHERE meta_key = %s AND term_id = %d ORDER BY meta_id", $meta_key, $term_id ) ); + wp_cache_set( $cache_key, $meta_value, $cache_group ); + + } + + return $meta_value; + + } + + /** + * Update the translated fields + * @param $mid integer + * @param $object_id integer + * @param $meta_key string + * @param $_meta_value mixed + * @since 2.4.14 + */ + public function added_post_meta( $mid, $object_id, $meta_key, $_meta_value ){ + + global $post; + + $dynamic_meta_fields = $this->get_group_field_names( $post ); + + if ( ! empty( $dynamic_meta_fields ) && array_key_exists($meta_key, $dynamic_meta_fields) ) { + + $parent_id = wp_get_post_parent_id( $object_id ); + if ( ! empty( $parent_id ) ) { + $object_id = $parent_id; + } + + $translate_key = $this->prefix.$meta_key; + $lang = wpm_get_language(); + $updated_data = get_post_meta( $object_id, $translate_key, true ); + if ( empty( $updated_data ) ) { + $updated_data = array(); + } + + if ( ! empty( $dynamic_meta_fields[$meta_key]['is_repeatable'] ) ) { + + $data = array(); + $get_meta = $this->get_post_meta( $object_id, $meta_key ); + if ( ! empty( $get_meta ) && is_array( $get_meta ) ) { + foreach ( $get_meta as $gkey => $gvalue ) { + if ( is_object( $gvalue ) && isset( $gvalue->meta_value ) ) { + $data[] = $gvalue->meta_value; + } + } + } + + if ( is_array( $data ) ) { + + $updated_data[$lang] = $data; + } + + }else{ + if ( empty( $updated_data ) ) { + + $updated_data[$lang] = $_meta_value; + + }else if ( is_array( $updated_data ) ) { + + $updated_data[$lang] = $_meta_value; + + } + + } + + update_post_meta( $object_id, $translate_key, $updated_data ); + } + + } + + /** + * Update the translated fields + * @param $mid integer + * @param $object_id integer + * @param $meta_key string + * @param $_meta_value mixed + * @since 2.4.14 + */ + public function added_term_meta( $mid, $object_id, $meta_key, $_meta_value ){ + + $term = get_term( $object_id ); + + $dynamic_meta_fields = $this->get_group_field_names( $term ); + + if ( ! empty( $dynamic_meta_fields ) && array_key_exists($meta_key, $dynamic_meta_fields) ) { + + $translate_key = $this->prefix.$meta_key; + $lang = wpm_get_language(); + $updated_data = get_term_meta( $object_id, $translate_key, true ); + if ( empty( $updated_data ) ) { + $updated_data = array(); + } + + if ( ! empty( $dynamic_meta_fields[$meta_key]['is_repeatable'] ) ) { + + $data = array(); + $get_meta = $this->get_term_meta( $object_id, $meta_key ); + if ( ! empty( $get_meta ) && is_array( $get_meta ) ) { + foreach ( $get_meta as $gkey => $gvalue ) { + if ( is_object( $gvalue ) && isset( $gvalue->meta_value ) ) { + $data[] = $gvalue->meta_value; + } + } + } + + if ( is_array( $data ) ) { + + $updated_data[$lang] = $data; + } + + }else{ + if ( empty( $updated_data ) ) { + + $updated_data[$lang] = $_meta_value; + + }else if ( is_array( $updated_data ) ) { + + $updated_data[$lang] = $_meta_value; + + } + + } + + update_term_meta( $object_id, $translate_key, $updated_data ); + + } + + } + + /** + * Get SCF field keys + * @param $wp_object integer + * @return $settings array + * @since 2.4.14 + */ + public function get_settings( $wp_object ){ + + $settings = array(); + + if ( ! empty( $wp_object ) && is_object( $wp_object ) && class_exists( 'Smart_Custom_Fields_Meta' ) ) { + + $meta = new \Smart_Custom_Fields_Meta( $wp_object ); + + $id = $meta->get_id(); + $type = $meta->get_type( false ); + $types = $meta->get_types( false ); + $meta_type = $meta->get_meta_type(); + + // IF the post that has custom field settings according to post ID, + // don't display because the post ID would change in preview. + // So if in preview, re-getting post ID from original post (parent of the preview). + if ( 'post' === $meta_type && 'revision' === $wp_object->post_type ) { + $wp_object = get_post( $wp_object->post_parent ); + } + + $settings_posts = array(); + if ( class_exists( 'SCF' ) ) { + $settings_posts = \SCF::get_settings_posts( $wp_object ); + } + + + if ( ! empty( $settings_posts ) && is_array( $settings_posts ) ) { + + foreach ( $settings_posts as $sp_key => $setting_post ) { + + if ( is_object( $setting_post ) && ! empty( $setting_post->ID ) ) { + + $setting_meta = $this->get_post_meta( $setting_post->ID, self::SMART_CF_SETTINGS ); + + if ( is_array( $setting_meta ) && ! empty( $setting_meta[0] ) && ! empty( $setting_meta[0]->meta_value ) && is_string( $setting_meta[0]->meta_value ) ) { + $setting_meta = maybe_unserialize( $setting_meta[0]->meta_value ); + if ( ! empty( $setting_meta ) && is_array( $setting_meta ) ) { + + if ( empty( $settings ) ) { + $settings = $setting_meta; + }else{ + $settings = array_merge( $settings, $setting_meta ); + } + + } + } + } + } + + } + } + + return $settings; + } + + /** + * Filter the settings and and return on fields + * @param $settings array + * @return $fields array + * @since 2.4.14 + */ + public function get_setting_fields( $settings ){ + + $fields = array(); + + if ( ! empty( $settings ) && is_array( $settings ) ) { + foreach ( $settings as $set_key => $set_value ) { + $data = array(); + $data['field_name'] = ''; + $data['is_repeatable'] = ''; + + if ( ! empty( $set_value['fields'] ) && ! empty( $set_value['fields'][0] ) && ! empty( $set_value['fields'][0]['name'] ) ) { + $data['field_name'] = $set_value['fields'][0]['name']; + } + + $data['is_repeatable'] = isset( $set_value['repeat'] ) ? $set_value['repeat'] : ''; + $fields[] = $data; + } + } + + return $fields; + } + + /** + * Check if current post meta key is a SCF field + * @param $fields array + * @param $key string + * @return $match array + * @since 2.4.14 + */ + public function is_scf_field( $fields, $key ){ + + $match = array(); + foreach ($fields as $fkey => $field) { + if ( $field['field_name'] == $key ) { + $match = $field; + break; + } + } + + return $match; + } + + /** + * Clear post meta cache once SCF post is saved + * @param $post_id integer + * @param $post WP_Post + * @param $update bool + * @since 2.4.14 + * */ + public function clear_post_meta_cache( $post_id, $post, $update ){ + + $cache_key = $post_id.self::SMART_CF_SETTINGS; + $cache_group = 'wpm_scf'; + wp_cache_delete( $cache_key, $cache_group ); + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-schema-and-structured-data.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-schema-and-structured-data.php index d319dbf53..a77da3e7b 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-schema-and-structured-data.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-schema-and-structured-data.php @@ -1,434 +1,570 @@ - array( - 'set_meta_list_value', - 'get_meta_list_value' - ), - self::WPM_SASWP_TAXONOMY_TERM => array( - 'set_taxonomy_term_value', - 'get_taxonomy_term_value' - ), - self::WPM_SASWP_FIXED_TEXT => array( - 'set_fixed_text_value', - 'get_fixed_text_value' - ), - self::WPM_SASWP_CUSTOM_META_FIELD => array( - 'set_custom_meta_value', - 'get_custom_meta_value' - ), - self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD => array( - 'set_template_field_value', - 'get_template_field_value' - ), - ); - - //Install meta Filters - foreach ($meta_keys as $meta_key => $callbacks) { - - add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); - add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); - } - - } - - /** - * Config meta keys - * - * @param $config - * @param $meta_value - * @param $object_id - * @return mixed - * @since 2.4.15 - */ - public function config( $config, $meta_value, $object_id ) { - - $this->object_id = $object_id; - - return $config; - } - - /** - * Load schema post meta keys to config array - * @since 2.4.15 - */ - public function load_config( $config ) { - - global $wpdb; - $schema_config = array(); - - // Get schema types ids - $schema_id_array = json_decode( get_transient( 'saswp_transient_schema_ids' ), true ); - - if ( ! $schema_id_array ) { - $schema_id_array = saswp_get_saved_schema_ids(); - } - - $is_term = 0; - $id = 0; - $post_type = ''; - - // Get the post or term id when you are in a editor page - if ( is_admin() ) { - - // Get Post id from edit post/page - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - if ( ! empty( $_GET['post'] ) ){ - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - $id = intval( wp_unslash( $_GET['post'] ) ); - $post_type = get_post_type( $id ); - } - // get term id from edit page - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - if ( ! empty( $_REQUEST['tag_ID'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - $id = intval( wp_unslash( $_REQUEST['tag_ID'] ) ); - $is_term = 1; - } - // Get schema id from schema edit page - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - if ( ! empty( $_REQUEST['post_ID'] ) ){ - // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check - $id = intval( wp_unslash( $_REQUEST['post_ID'] ) ); - $post_type = get_post_type( $id ); - } - } else{ - - // Get the post or term id when you are on frontend - $query_obj = get_queried_object(); - if ( is_object( $query_obj ) ) { - if ( ! empty( $query_obj->ID ) ) { - $id = $query_obj->ID; - }else if( ! empty( $query_obj->term_id ) ) { - $id = $query_obj->term_id; - $is_term = 1; - } - } - - } - - if ( ! empty( $schema_id_array ) && is_array( $schema_id_array ) ) { - - foreach ( $schema_id_array as $schema_id ) { - - if ( $schema_id > 0 && $id > 0 ) { - - $is_modify_enabled = 0; - $modified_key = 'saswp_modify_this_schema_'.$schema_id; - - if ( $is_term == 1 ) { - - $cache_key = 'wpm_schema_get_term_'.$modified_key.'_'.$id; - $termmeta_value = wp_cache_get( $cache_key ); - if ( false === $termmeta_value ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query - $termmeta_value = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->termmeta} WHERE term_id = %d AND meta_key = %s", $id, $modified_key ) ); - wp_cache_set( $cache_key, $termmeta_value ); - } - if ( is_object( $termmeta_value ) && isset( $termmeta_value->meta_value ) ) { - $is_modify_enabled = $termmeta_value->meta_value; - } - - }else { - - $cache_key = 'wpm_schema_get_post_'.$modified_key.'_'.$id; - $postmeta_value = wp_cache_get( $cache_key ); - if ( false === $postmeta_value ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query - $postmeta_value = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $id, $modified_key ) ); - wp_cache_set( $cache_key, $postmeta_value ); - } - if ( is_object( $postmeta_value ) && isset( $postmeta_value->meta_value ) ) { - $is_modify_enabled = $postmeta_value->meta_value; - } - - } - - if ( $is_modify_enabled == 1 || $post_type == 'saswp' || $post_type == 'saswp_template' ) { - - // Get schema type - $key = 'schema_type'; - - $cache_key = 'wpm_schema_get_schema_meta_'.$schema_id; - $schema_meta = wp_cache_get( $cache_key ); - - if ( false === $schema_meta ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query - $schema_meta = $wpdb->get_results( $wpdb->prepare( "SELECT meta_key FROM {$wpdb->postmeta} WHERE post_id = %d", $schema_id ) ); - wp_cache_set( $cache_key, $schema_meta ); - } - - if ( ! empty( $schema_meta ) && is_array( $schema_meta ) ) { - - foreach ( $schema_meta as $meta_key => $meta_value ) { - - if ( is_object( $meta_value ) && isset ( $meta_value->meta_key ) && ! array_key_exists( $meta_value->meta_key, $config ) ) { - - $find = '_'.$schema_id; - - if ( strpos( $meta_value->meta_key, $find ) !== false ) { - $config[$meta_value->meta_key] = array(); - } - - } - - } - - } - } - } - - } - } - - return $config; - - } - - /** - * Set meta translate in base64 - * - * @param $key - * @param $value - * @return mixed - * @since 2.4.15 - */ - private function set_value( $key, $value ) { - - global $wpdb; - - if ( ! $this->object_id ) { - return $value; - } - - $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); - - // If translate data is not present then get default value - if ( empty( $current_value ) ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Using built function doesn't work in our case, so added manual query - $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); - - if ( ! empty( $current_value ) ) { - - $current_value = base64_encode( $current_value ); - - } - - } - - $db_value = $value; - if ( is_array( $db_value ) ) { - $db_value = maybe_serialize( $db_value ); - } - - update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - - $this->object_id = 0; - - return $value; - } - - /** - * Get meta translate from base64 - * - * @param $key - * @param $value - * @return false|string - * @since 2.4.15 - */ - private function get_value($key, $value) { - - if ( ! $this->object_id ) { - return $value; - } - - $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); - - $this->object_id = 0; - - if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { - return maybe_unserialize( $tr_value ); - }else{ - return $value; - } - - } - - /** - * Set meta value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_meta_list_value( $value ) { - - $key = self::WPM_SASWP_META_LIST_VAL; - - return $this->set_value( $key, $value ); - } - - /** - * Get meta value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_meta_list_value( $value ) { - - $key = self::WPM_SASWP_META_LIST_VAL; - - return $this->get_value( $key, $value ); - } - - /** - * Set taxonomy term value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_taxonomy_term_value( $value ) { - - $key = self::WPM_SASWP_TAXONOMY_TERM; - - return $this->set_value( $key, $value ); - } - - /** - * Get taxonomy term value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_taxonomy_term_value( $value ) { - - $key = self::WPM_SASWP_TAXONOMY_TERM; - - return $this->get_value( $key, $value ); - } - - /** - * Set fixed text value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_fixed_text_value( $value ) { - - $key = self::WPM_SASWP_FIXED_TEXT; - - return $this->set_value( $key, $value ); - } - - /** - * Get fixed text value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_fixed_text_value( $value ) { - - $key = self::WPM_SASWP_FIXED_TEXT; - - return $this->get_value( $key, $value ); - } - - /** - * Set fixed text value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_custom_meta_value( $value ) { - - $key = self::WPM_SASWP_CUSTOM_META_FIELD; - - return $this->set_value( $key, $value ); - } - - /** - * Get fixed text value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_custom_meta_value( $value ) { - - $key = self::WPM_SASWP_CUSTOM_META_FIELD; - - return $this->get_value( $key, $value ); - } - - /** - * Set fixed text value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_template_field_value( $value ) { - - $key = self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD; - - return $this->set_value( $key, $value ); - } - - /** - * Get fixed text value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_template_field_value( $value ) { - - $key = self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD; - - return $this->get_value( $key, $value ); - } - + array( + 'set_meta_list_value', + 'get_meta_list_value' + ), + self::WPM_SASWP_TAXONOMY_TERM => array( + 'set_taxonomy_term_value', + 'get_taxonomy_term_value' + ), + self::WPM_SASWP_FIXED_TEXT => array( + 'set_fixed_text_value', + 'get_fixed_text_value' + ), + self::WPM_SASWP_CUSTOM_META_FIELD => array( + 'set_custom_meta_value', + 'get_custom_meta_value' + ), + self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD => array( + 'set_template_field_value', + 'get_template_field_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.15 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Load schema post meta keys to config array + * @since 2.4.15 + */ + public function load_config( $config ) { + + global $wpdb; + $schema_config = array(); + + // Get schema types ids + $schema_id_array = json_decode( get_transient( 'saswp_transient_schema_ids' ), true ); + + if ( ! $schema_id_array ) { + $schema_id_array = $this->get_saved_schema_ids(); + } + + $is_term = 0; + $id = 0; + $post_type = ''; + + // Get the post or term id when you are in a editor page + if ( is_admin() ) { + + // Get Post id from edit post/page + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + if ( ! empty( $_GET['post'] ) ){ + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + $id = intval( wp_unslash( $_GET['post'] ) ); + $post_type = get_post_type( $id ); + } + // get term id from edit page + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + if ( ! empty( $_REQUEST['tag_ID'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + $id = intval( wp_unslash( $_REQUEST['tag_ID'] ) ); + $is_term = 1; + } + // Get schema id from schema edit page + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + if ( ! empty( $_REQUEST['post_ID'] ) ){ + // phpcs:ignore WordPress.Security.NonceVerification.Recommended --Reason Not a form submission data just accessing the values for conditional check + $id = intval( wp_unslash( $_REQUEST['post_ID'] ) ); + $post_type = get_post_type( $id ); + } + } else{ + + // Get the post or term id when you are on frontend + $query_obj = get_queried_object(); + if ( is_object( $query_obj ) ) { + if ( ! empty( $query_obj->ID ) ) { + $id = $query_obj->ID; + }else if( ! empty( $query_obj->term_id ) ) { + $id = $query_obj->term_id; + $is_term = 1; + } + } + + } + + if ( ! empty( $schema_id_array ) && is_array( $schema_id_array ) ) { + + foreach ( $schema_id_array as $schema_id ) { + + if ( $schema_id > 0 && $id > 0 ) { + + $is_modify_enabled = 0; + $modified_key = 'saswp_modify_this_schema_'.$schema_id; + + if ( $is_term == 1 ) { + + $cache_key = 'wpm_schema_get_term_'.$modified_key.'_'.$id; + $termmeta_value = wp_cache_get( $cache_key ); + if ( false === $termmeta_value ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query + $termmeta_value = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->termmeta} WHERE term_id = %d AND meta_key = %s", $id, $modified_key ) ); + wp_cache_set( $cache_key, $termmeta_value ); + } + if ( is_object( $termmeta_value ) && isset( $termmeta_value->meta_value ) ) { + $is_modify_enabled = $termmeta_value->meta_value; + } + + }else { + + $cache_key = 'wpm_schema_get_post_'.$modified_key.'_'.$id; + $postmeta_value = wp_cache_get( $cache_key ); + if ( false === $postmeta_value ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query + $postmeta_value = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $id, $modified_key ) ); + wp_cache_set( $cache_key, $postmeta_value ); + } + if ( is_object( $postmeta_value ) && isset( $postmeta_value->meta_value ) ) { + $is_modify_enabled = $postmeta_value->meta_value; + } + + } + + if ( $is_modify_enabled == 1 || $post_type == 'saswp' || $post_type == 'saswp_template' ) { + + // Get schema type + $key = 'schema_type'; + + $cache_key = 'wpm_schema_get_schema_meta_'.$schema_id; + $schema_meta = wp_cache_get( $cache_key ); + + if ( false === $schema_meta ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Using built function doesn't work in our case, so added manual query + $schema_meta = $wpdb->get_results( $wpdb->prepare( "SELECT meta_key FROM {$wpdb->postmeta} WHERE post_id = %d", $schema_id ) ); + wp_cache_set( $cache_key, $schema_meta ); + } + + if ( ! empty( $schema_meta ) && is_array( $schema_meta ) ) { + + foreach ( $schema_meta as $meta_key => $meta_value ) { + + if ( is_object( $meta_value ) && isset ( $meta_value->meta_key ) && ! array_key_exists( $meta_value->meta_key, $config ) ) { + + $find = '_'.$schema_id; + + if ( strpos( $meta_value->meta_key, $find ) !== false ) { + $config[$meta_value->meta_key] = array(); + } + + } + + } + + } + } + } + + } + } + + return $config; + + } + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.15 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.15 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_meta_list_value( $value ) { + + $key = self::WPM_SASWP_META_LIST_VAL; + + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_meta_list_value( $value ) { + + $key = self::WPM_SASWP_META_LIST_VAL; + + return $this->get_value( $key, $value ); + } + + /** + * Set taxonomy term value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_taxonomy_term_value( $value ) { + + $key = self::WPM_SASWP_TAXONOMY_TERM; + + return $this->set_value( $key, $value ); + } + + /** + * Get taxonomy term value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_taxonomy_term_value( $value ) { + + $key = self::WPM_SASWP_TAXONOMY_TERM; + + return $this->get_value( $key, $value ); + } + + /** + * Set fixed text value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_fixed_text_value( $value ) { + + $key = self::WPM_SASWP_FIXED_TEXT; + + return $this->set_value( $key, $value ); + } + + /** + * Get fixed text value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_fixed_text_value( $value ) { + + $key = self::WPM_SASWP_FIXED_TEXT; + + return $this->get_value( $key, $value ); + } + + /** + * Set fixed text value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_custom_meta_value( $value ) { + + $key = self::WPM_SASWP_CUSTOM_META_FIELD; + + return $this->set_value( $key, $value ); + } + + /** + * Get fixed text value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_custom_meta_value( $value ) { + + $key = self::WPM_SASWP_CUSTOM_META_FIELD; + + return $this->get_value( $key, $value ); + } + + /** + * Set fixed text value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_template_field_value( $value ) { + + $key = self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD; + + return $this->set_value( $key, $value ); + } + + /** + * Get fixed text value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_template_field_value( $value ) { + + $key = self::WPM_SASWP_SCHEMA_TEMPLATE_FIELD; + + return $this->get_value( $key, $value ); + } + + /** + * Auto translate saswp_reviews post type data + * @param $post WP_Post + * @param $source string + * @param $target string + * @return $response array + * @since 1.10 + * */ + public static function auto_translate( $post, $source, $target ){ + + global $wpdb; + $response = array('status'=>true, 'message'=>esc_html__('Already Processed','wp-multilang')); + + if ( $post && isset( $post->ID ) ) { + + $post_id = $post->ID; + $post_arr = array(); + $should_update = false; + + $post_title = $post->post_title; + + $is_title_exist = wpm_ml_check_language_string( $post_title, $target ); + + + if ( $is_title_exist === false ) { + + $is_src_title_exist = wpm_ml_check_language_string( $post_title, $source ); + + if( $is_src_title_exist === false ) { + $post_title = '[:'.$source.']'.$post_title.'[:]'; + } + + $source_title = wpm_ml_get_language_string( $post_title, $source ); + $new_title = wpm_ml_auto_translate_content( $source_title, $source, $target ); + + $new_title = '[:'.$target.']'.$new_title.'[:]'; + $new_title_string = str_replace('[:]',$new_title,$post_title); + $post->post_title = $new_title_string; + $should_update = true; + + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $post_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key IN ('saswp_reviewer_name', 'saswp_review_text') ", $post_id ) ); + + if ( is_array( $post_meta ) && ! empty( $post_meta ) ) { + + foreach ( $post_meta as $meta ) { + + if ( is_object( $meta ) && isset( $meta->meta_value ) ) { + + $val = $meta->meta_value; + $is_val_exists = wpm_ml_check_language_string( $val, $target ); + if ( $is_val_exists === false ) { + + $is_src_val_exist = wpm_ml_check_language_string( $val, $source ); + + if( $is_src_val_exist === false ) { + $val = '[:'.$source.']'.$val.'[:]'; + } + $source_val = wpm_ml_get_language_string( $val, $source ); + $new_val = wpm_ml_auto_translate_content( $source_val, $source, $target ); + + $new_val = '[:'.$target.']'.$new_val.'[:]'; + $new_val_string = str_replace('[:]',$new_val,$val); + + update_post_meta( $post_id, $meta->meta_key, $new_val_string ); + } + + } + + } + + } + + $post_arr = array( + 'ID' => $post->ID, + 'post_title' => $post->post_title, + + ); + if ( $should_update == true ) { + $result = wp_update_post( $post_arr ); + + if ( is_wp_error( $result ) ) { + // Handle error. + $error_message = $result->get_error_message(); + $response = array('status'=>false, 'message'=>$error_message); + } elseif ( $result === 0 ) { + $response = array('status'=>false, 'message'=>esc_html__('Translation can not be updated','wp-multilang')); + } else { + $response = array('status'=>true, 'message'=>esc_html__('Translation updated successfully','wp-multilang')); + } + } + + } + + return $response; + } + + /** + * Get published schema ids + * @since 2.4.21 + * Solution for ticket https://github.com/ahmedkaludi/wp-multilang/issues/189 + * */ + public function get_saved_schema_ids() { + global $wpdb; + + $cache_key = 'wpm_published_schema_ids'; + $schema_id_array = wp_cache_get( $cache_key ); + + if ( false === $schema_id_array ) { + + $schema_id_array = []; + + $sql = $wpdb->prepare( + "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_status = %s", + 'saswp', + 'publish' + ); + + $published_schemas = $wpdb->get_results( $sql ); + + if ( ! empty( $published_schemas ) && is_array( $published_schemas ) ) { + foreach ( $published_schemas as $schema ) { + if ( isset( $schema->ID ) ) { + $schema_id_array[] = (int) $schema->ID; + } + } + } + + wp_cache_set( $cache_key, $schema_id_array ); + } + + return $schema_id_array; + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-strong-testimonials.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-strong-testimonials.php new file mode 100644 index 000000000..22ebfb9a1 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-strong-testimonials.php @@ -0,0 +1,101 @@ + array( + 'set_option_value', + 'get_option_value' + ), + self::FORM_OPTION => array( + 'set_option_value', + 'get_option_value' + ), + ); + + foreach ($options as $option_key => $callbacks) { + add_filter( "wpm_update_{$option_key}_option", array( $this, $callbacks[0] ), 10, 4 ); + add_filter( "option_{$option_key}", array( $this, $callbacks[1] ), 10, 2 ); + } + + } + + /** + * Set option value + * @param $value mixed + * @param $key string + * @return $value mixed + * @since 2.4.23 + * */ + public function set_option_value( $value, $original_value, $key, $old_value ) { + + global $wpdb; + + $translated_key = $key . '_translate'; + + $current_value = get_option( $translated_key ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT option_value FROM {$wpdb->options} WHERE option_name = %s", $key ) ); + + if ( ! empty( $current_value ) ) { + $current_value = base64_encode( $current_value ); + } + } + + $db_value = $original_value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_option( $translated_key, wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + return $old_value; + + } + + /** + * Get option translated value + * @param $value mixed + * @param $key string + * @return $value mixed + * @since 2.4.23 + * */ + public function get_option_value( $value, $key ){ + + $tr_value = base64_decode( wpm_translate_value( get_option( "{$key}_translate" ) ), true ); + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-tablepress.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-tablepress.php index 43c9c587c..f69624ee3 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-tablepress.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-tablepress.php @@ -1,73 +1,73 @@ - array( - 'wpm_each' => array(), - ), - ); - - $old_table = json_decode( get_post_field( 'post_content', wpm_clean( $postarr['ID'] ), 'edit' ), true ); - $new_table = json_decode( stripslashes_from_strings_only( $data['post_content'] ), true ); - $value = wpm_set_new_value( $old_table, $new_table, $options ); - $data['post_content'] = addslashes_gpc( wp_json_encode( $value ) ); - - return $data; - } -} + array( + 'wpm_each' => array(), + ), + ); + + $old_table = json_decode( get_post_field( 'post_content', wpm_clean( $postarr['ID'] ), 'edit' ), true ); + $new_table = json_decode( stripslashes_from_strings_only( $data['post_content'] ), true ); + $value = wpm_set_new_value( $old_table, $new_table, $options ); + $data['post_content'] = addslashes_gpc( wp_json_encode( $value ) ); + + return $data; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-team.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-team.php index 1841a8606..70e681ddb 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-team.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-team.php @@ -1,195 +1,195 @@ - array( - 'set_team_post_social_value', - 'get_team_post_social_value' - ), - self::WPM_TEAM_SHORT_CODE_COLUMN => array( - 'set_team_short_code_column_value', - 'get_team_short_code_column_value' - ), - ); - - //Install meta Filters - foreach ($meta_keys as $meta_key => $callbacks) { - - add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); - add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); - } - - } - - /** - * Config meta keys - * - * @param $config - * @param $meta_value - * @param $object_id - * @return mixed - * @since 2.4.15 - */ - public function config( $config, $meta_value, $object_id ) { - - $this->object_id = $object_id; - - return $config; - } - - /** - * Set meta translate in base64 - * - * @param $key - * @param $value - * @return mixed - * @since 2.4.15 - */ - private function set_value( $key, $value ) { - - global $wpdb; - - if ( ! $this->object_id ) { - return $value; - } - - $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); - - // If translate data is not present then get default value - if ( empty( $current_value ) ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query - $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); - - if ( ! empty( $current_value ) ) { - - $current_value = base64_encode( $current_value ); - - } - - } - - $db_value = $value; - if ( is_array( $db_value ) ) { - $db_value = maybe_serialize( $db_value ); - } - - update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - - $this->object_id = 0; - - return $value; - } - - /** - * Get meta translate from base64 - * - * @param $key - * @param $value - * @return false|string - * @since 2.4.15 - */ - private function get_value($key, $value) { - - if ( ! $this->object_id ) { - return $value; - } - - $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); - - $this->object_id = 0; - - if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { - return maybe_unserialize( $tr_value ); - }else{ - return $value; - } - - } - - /** - * Set meta value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_team_post_social_value( $value ) { - - $key = self::WPM_TEAM_POST_SOCIAL; - - return $this->set_value( $key, $value ); - } - - /** - * Get meta value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_team_post_social_value( $value ) { - - $key = self::WPM_TEAM_POST_SOCIAL; - - return $this->get_value( $key, $value ); - } - - /** - * Set shortcode meta column value - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_team_short_code_column_value( $value ) { - - $key = self::WPM_TEAM_SHORT_CODE_COLUMN; - - return $this->set_value( $key, $value ); - } - - /** - * Get shortcode meta value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_team_short_code_column_value( $value ) { - - $key = self::WPM_TEAM_SHORT_CODE_COLUMN; - - return $this->get_value( $key, $value ); - } - + array( + 'set_team_post_social_value', + 'get_team_post_social_value' + ), + self::WPM_TEAM_SHORT_CODE_COLUMN => array( + 'set_team_short_code_column_value', + 'get_team_short_code_column_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.15 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.15 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.15 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_team_post_social_value( $value ) { + + $key = self::WPM_TEAM_POST_SOCIAL; + + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_team_post_social_value( $value ) { + + $key = self::WPM_TEAM_POST_SOCIAL; + + return $this->get_value( $key, $value ); + } + + /** + * Set shortcode meta column value + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_team_short_code_column_value( $value ) { + + $key = self::WPM_TEAM_SHORT_CODE_COLUMN; + + return $this->set_value( $key, $value ); + } + + /** + * Get shortcode meta value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_team_short_code_column_value( $value ) { + + $key = self::WPM_TEAM_SHORT_CODE_COLUMN; + + return $this->get_value( $key, $value ); + } + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ultimate-member.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ultimate-member.php new file mode 100644 index 000000000..c92d16c17 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ultimate-member.php @@ -0,0 +1,422 @@ + array( + 'set_custom_field_value', + 'get_custom_field_value' + ), + self::UTM_REGISTER_PRIMARY_WORD => array( + 'set_primary_field_value', + 'get_primary_field_value' + ), + self::UTM_REGISTER_SECONDARY_WORD => array( + 'set_secondary_field_value', + 'get_secondary_field_value' + ), + self::UTM_LOGIN_PRIMARY_WORD => array( + 'set_login_primary_field_value', + 'get_login_primary_field_value' + ), + self::UTM_LOGIN_SECONDARY_WORD => array( + 'set_login_secondary_field_value', + 'get_login_secondary_field_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array( $this, 'config' ), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array( $this, $callbacks[0] ), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array( $this, $callbacks[0] ), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array( $this, $callbacks[1] ), 10, 1 ); + } + + add_filter( 'um_register_form_button_one', array( $this, 'filter_form_button_one' ), 10, 2 ); + add_filter( 'um_register_form_button_two', array( $this, 'filter_form_button_two' ), 10, 2 ); + add_filter( 'um_login_form_button_one', array( $this, 'filter_login_form_button_one' ), 10, 2 ); + add_filter( 'um_login_form_button_two', array( $this, 'filter_login_form_button_two' ), 10, 2 ); + + // Translate each um_options sub-key at read time via UM's own per-option filter. + // This runs after get_option('um_options') so translations are applied cleanly + // at the point UM reads each individual option, without affecting saved DB values. + foreach ( self::UM_TRANSLATABLE_OPTIONS as $option_key ) { + add_filter( "um_get_option_filter__{$option_key}", array( $this, 'translate_um_option' ), 10, 1 ); + } + + // Translate raw multilingual strings inside the options array to plain strings + // before WPM's native pre_update filter check to prevent the merger from being bypassed. + add_filter( 'pre_update_option_um_options', array( $this, 'clean_um_options_before_save' ), 10, 1 ); + } + + /** + * Translate in-memory raw multilingual strings inside um_options to the active language + * before WPM's native pre_update_option filter runs, to ensure it doesn't bypass merging. + * + * @param array $value The array being saved. + * @return array The cleaned array with only plain strings for translatable fields. + */ + public function clean_um_options_before_save( $value ) { + if ( ! is_array( $value ) ) { + return $value; + } + + foreach ( self::UM_TRANSLATABLE_OPTIONS as $key ) { + if ( isset( $value[ $key ] ) && is_string( $value[ $key ] ) ) { + $value[ $key ] = wpm_translate_string( $value[ $key ] ); + } + } + + return $value; + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.23 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Translate a um_options sub-key string via wpm_translate_string. + * Hooked onto um_get_option_filter__{$option_id} so it runs when UM reads individual options. + * + * @param mixed $value The raw stored value (may contain [:en]...[:] multilingual tags). + * @return mixed Translated string for the current language. + */ + public function translate_um_option( $value ) { + if ( is_string( $value ) && wpm_is_ml_value( $value ) ) { + return wpm_translate_string( $value ); + } + return $value; + } + + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.23 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.23 + */ + private function get_value( $key, $value ) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_custom_field_value( $value ) { + $key = self::UTM_CUSTOM_FIELDS; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_custom_field_value( $value ) { + + $key = self::UTM_CUSTOM_FIELDS; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_primary_field_value( $value ) { + $key = self::UTM_REGISTER_PRIMARY_WORD; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_primary_field_value( $value ) { + $key = self::UTM_REGISTER_PRIMARY_WORD; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_secondary_field_value( $value ) { + $key = self::UTM_REGISTER_SECONDARY_WORD; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_secondary_field_value( $value ) { + + $key = self::UTM_REGISTER_SECONDARY_WORD; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_login_primary_field_value( $value ) { + $key = self::UTM_LOGIN_PRIMARY_WORD; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_login_primary_field_value( $value ) { + $key = self::UTM_LOGIN_PRIMARY_WORD; + return $this->get_value( $key, $value ); + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.23 + */ + public function set_login_secondary_field_value( $value ) { + $key = self::UTM_LOGIN_SECONDARY_WORD; + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.23 + */ + public function get_login_secondary_field_value( $value ) { + $key = self::UTM_LOGIN_SECONDARY_WORD; + return $this->get_value( $key, $value ); + } + + /** + * Filter register primary button text + * @param $btn_word string + * @param $args array + * @return $btn_word string + * @since 2.4.23 + * */ + public function filter_form_button_one( $btn_word, $args ) { + $key = self::UTM_LOGIN_SECONDARY_WORD; + if ( is_array( $args ) && ! empty( $args['form_id'] ) ) { + $this->object_id = $args['form_id']; + $btn_word = $this->get_value( $key, $btn_word ); + } + + return $btn_word; + + } + + /** + * Filter register secondary button text + * @param $btn_word string + * @param $args array + * @return $btn_word string + * @since 2.4.23 + * */ + public function filter_form_button_two( $btn_word, $args ) { + $key = self::UTM_REGISTER_SECONDARY_WORD; + if ( is_array( $args ) && ! empty( $args['form_id'] ) ) { + $this->object_id = $args['form_id']; + $btn_word = $this->get_value( $key, $btn_word ); + } + + return $btn_word; + + } + + /** + * Filter loginp rimary text + * @param $btn_word string + * @param $args array + * @return $btn_word string + * @since 2.4.23 + * */ + public function filter_login_form_button_one( $btn_word, $args ) { + $key = self::UTM_LOGIN_PRIMARY_WORD; + if ( is_array( $args ) && ! empty( $args['form_id'] ) ) { + $this->object_id = $args['form_id']; + $btn_word = $this->get_value( $key, $btn_word ); + } + + return $btn_word; + + } + + /** + * Filter login secondary text + * @param $btn_word string + * @param $args array + * @return $btn_word string + * @since 2.4.23 + * */ + public function filter_login_form_button_two( $btn_word, $args ) { + $key = self::UTM_LOGIN_SECONDARY_WORD; + if ( is_array( $args ) && ! empty( $args['form_id'] ) ) { + $this->object_id = $args['form_id']; + $btn_word = $this->get_value( $key, $btn_word ); + } + + return $btn_word; + + } +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ux4g-theme.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ux4g-theme.php new file mode 100644 index 000000000..46c2d6dc5 --- /dev/null +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-ux4g-theme.php @@ -0,0 +1,55 @@ +get_route(); + if ( preg_match( '#^/wp/v2/(?P[^/]+)/(?P\d+)$#', $route, $matches ) ) { + $post_id = (int) $matches['id']; + if ( $post_id > 0 ) { + clean_post_cache( $post_id ); + } + } + + return $result; + } + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-vc.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-vc.php index e87bf6973..33e450e64 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-vc.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-vc.php @@ -1,239 +1,239 @@ - array( - 'set_wpb_post_seo_value', - 'get_wpb_post_seo_value' - ), - ); - - //Install meta Filters - foreach ($meta_keys as $meta_key => $callbacks) { - - add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); - add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); - add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); - } - } - - - /** - * Add lang param to url - * - * @param $link - * - * @return string - */ - public function append_lang_to_url( $link ) { - return add_query_arg( 'lang', wpm_get_language(), $link ); - } - - public function enqueue_js_frontend() { - wpm_enqueue_js( " - $( '#vc_vendor_wpm_langs_front' ).change( function () { - vc.closeActivePanel(); - $( '#vc_logo' ).addClass( 'vc_ui-wp-spinner' ); - window.location.href = $( this ).val(); - } ); - - var nativeGetContent = vc.ShortcodesBuilder.prototype.getContent; - vc.ShortcodesBuilder.prototype.getContent = function () { - var content = nativeGetContent(); - $( '#content' ).val( content ); - return content; - }; - " ); - } - - /** - * Generate language switcher - * - * @return string - */ - public function generate_select_frontend() { - $output = ''; - $output .= ''; - - return $output; - } - - /** - * Add menu item - * - * @param $list - * - * @return array - */ - public function nav_controls_frontend( $list ) { - if ( is_array( $list ) ) { - $list[] = array( 'wpm', '
  • ' . $this->generate_select_frontend() . '
  • ' ); - } - - return $list; - } - - /** - * Generate edit link - * - * @param $link - * - * @return string - */ - public function render_edit_button_link( $link ) { - return add_query_arg( 'edit_lang', wpm_get_language(), $link ); - } - - /** - * Config meta keys - * - * @param $config - * @param $meta_value - * @param $object_id - * @return mixed - * @since 2.4.15 - */ - public function config( $config, $meta_value, $object_id ) { - - $this->object_id = $object_id; - - return $config; - } - - /** - * Set meta translate in base64 - * - * @param $key - * @param $value - * @return mixed - * @since 2.4.15 - */ - private function set_value( $key, $value ) { - - global $wpdb; - - if ( ! $this->object_id ) { - return $value; - } - - $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); - - // If translate data is not present then get default value - if ( empty( $current_value ) ) { - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query - $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); - - if ( ! empty( $current_value ) ) { - - $current_value = base64_encode( $current_value ); - - } - - } - - $db_value = $value; - if ( is_array( $db_value ) ) { - $db_value = maybe_serialize( $db_value ); - } - - update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); - - $this->object_id = 0; - - return $value; - } - - /** - * Get meta translate from base64 - * - * @param $key - * @param $value - * @return false|string - * @since 2.4.15 - */ - private function get_value($key, $value) { - - if ( ! $this->object_id ) { - return $value; - } - - $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); - - $this->object_id = 0; - - if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { - return maybe_unserialize( $tr_value ); - }else{ - return $value; - } - - } - - /** - * Set meta value data - * - * @param $value - * @return mixed - * @since 2.4.15 - */ - public function set_wpb_post_seo_value( $value ) { - - $key = self::WPM_WPB_POST_CUSTOM_SEO_SETTINGS; - - return $this->set_value( $key, $value ); - } - - /** - * Get meta value data - * - * @param $value - * @return false|string - * @since 2.4.15 - */ - public function get_wpb_post_seo_value( $value ) { - - $key = self::WPM_WPB_POST_CUSTOM_SEO_SETTINGS; - - return $this->get_value( $key, $value ); - } -} + array( + 'set_wpb_post_seo_value', + 'get_wpb_post_seo_value' + ), + ); + + //Install meta Filters + foreach ($meta_keys as $meta_key => $callbacks) { + + add_filter( "wpm_{$meta_key}_meta_config", array($this, 'config'), 10, 3 ); + add_filter( "wpm_add_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_update_{$meta_key}_meta_value", array($this, $callbacks[0]), 10, 1 ); + add_filter( "wpm_get_{$meta_key}_meta_value", array($this, $callbacks[1]), 10, 1 ); + } + } + + + /** + * Add lang param to url + * + * @param $link + * + * @return string + */ + public function append_lang_to_url( $link ) { + return add_query_arg( 'lang', wpm_get_language(), $link ); + } + + public function enqueue_js_frontend() { + wpm_enqueue_js( " + $( '#vc_vendor_wpm_langs_front' ).change( function () { + vc.closeActivePanel(); + $( '#vc_logo' ).addClass( 'vc_ui-wp-spinner' ); + window.location.href = $( this ).val(); + } ); + + var nativeGetContent = vc.ShortcodesBuilder.prototype.getContent; + vc.ShortcodesBuilder.prototype.getContent = function () { + var content = nativeGetContent(); + $( '#content' ).val( content ); + return content; + }; + " ); + } + + /** + * Generate language switcher + * + * @return string + */ + public function generate_select_frontend() { + $output = ''; + $output .= ''; + + return $output; + } + + /** + * Add menu item + * + * @param $list + * + * @return array + */ + public function nav_controls_frontend( $list ) { + if ( is_array( $list ) ) { + $list[] = array( 'wpm', '
  • ' . $this->generate_select_frontend() . '
  • ' ); + } + + return $list; + } + + /** + * Generate edit link + * + * @param $link + * + * @return string + */ + public function render_edit_button_link( $link ) { + return add_query_arg( 'edit_lang', wpm_get_language(), $link ); + } + + /** + * Config meta keys + * + * @param $config + * @param $meta_value + * @param $object_id + * @return mixed + * @since 2.4.15 + */ + public function config( $config, $meta_value, $object_id ) { + + $this->object_id = $object_id; + + return $config; + } + + /** + * Set meta translate in base64 + * + * @param $key + * @param $value + * @return mixed + * @since 2.4.15 + */ + private function set_value( $key, $value ) { + + global $wpdb; + + if ( ! $this->object_id ) { + return $value; + } + + $current_value = get_post_meta( $this->object_id, "{$key}_translate", true ); + + // If translate data is not present then get default value + if ( empty( $current_value ) ) { + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason Using built function doesn't work in our case, so added manual query + $current_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d", $key, $this->object_id ) ); + + if ( ! empty( $current_value ) ) { + + $current_value = base64_encode( $current_value ); + + } + + } + + $db_value = $value; + if ( is_array( $db_value ) ) { + $db_value = maybe_serialize( $db_value ); + } + + update_post_meta( $this->object_id, "{$key}_translate", wpm_set_new_value( $current_value, base64_encode( $db_value ) ) ); + + $this->object_id = 0; + + return $value; + } + + /** + * Get meta translate from base64 + * + * @param $key + * @param $value + * @return false|string + * @since 2.4.15 + */ + private function get_value($key, $value) { + + if ( ! $this->object_id ) { + return $value; + } + + $tr_value = base64_decode( wpm_translate_value( get_post_meta( $this->object_id, "{$key}_translate", true ) ), true ); + + $this->object_id = 0; + + if ( ! empty( $tr_value ) && is_string( $tr_value ) ) { + return maybe_unserialize( $tr_value ); + }else{ + return $value; + } + + } + + /** + * Set meta value data + * + * @param $value + * @return mixed + * @since 2.4.15 + */ + public function set_wpb_post_seo_value( $value ) { + + $key = self::WPM_WPB_POST_CUSTOM_SEO_SETTINGS; + + return $this->set_value( $key, $value ); + } + + /** + * Get meta value data + * + * @param $value + * @return false|string + * @since 2.4.15 + */ + public function get_wpb_post_seo_value( $value ) { + + $key = self::WPM_WPB_POST_CUSTOM_SEO_SETTINGS; + + return $this->get_value( $key, $value ); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-woocommerce.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-woocommerce.php index 9394b1e1f..647ac4470 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-woocommerce.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-woocommerce.php @@ -1,554 +1,580 @@ -get_instance_option_key(), array() ); - - $setting_config = array( - 'title' => array(), - ); - - $settings = wpm_set_new_value( $old_settings, $settings, $setting_config ); - - return $settings; - } - - /** - * Translate methods for zone - * - * @param array $methods - * - * @return array - */ - public function translate_zone_shipping_methods( $methods ) { - - foreach ( $methods as &$method ) { - $method->title = wpm_translate_string( $method->title ); - } - - return $methods; - } - - /** - * Remove translation result query for products in shortcode - * - * @param array $query_args - * - * @return array - */ - public function remove_filter( $query_args ) { - - //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters --Reason This is not a global code, this works only on some woocoomerce hooks. - $query_args['suppress_filters'] = true; - - return $query_args; - } - - /** - * Add capability for translating products for user role - * - * @since 2.0.0 - * - * @param array $types - * - * @return array - */ - public function add_capabilities_types( $types ) { - - $types[] = 'product'; - - return $types; - } - - /** - * Set attribute taxonomies for translate - * - * @param $taxonomies_config - * - * @return array - */ - public function add_attribute_taxonomies( $taxonomies_config ) { - - if ( ! $this->attribute_taxonomies_config ) { - - if ( ! $attribute_taxonomies = get_transient( 'wc_attribute_taxonomies' ) ) { - $attribute_taxonomies = array(); - } - - foreach ( $attribute_taxonomies as $tax ) { - if ( $name = wc_attribute_taxonomy_name( $tax->attribute_name ) ) { - $this->attribute_taxonomies_config[ $name ] = array(); - } - } - } - - return wpm_array_merge_recursive( $this->attribute_taxonomies_config, $taxonomies_config ); - - } - - /** - * Translate attribute taxonomies - * - * @param $attribute_taxonomies - * - * @return mixed - */ - public function translate_attribute_taxonomies( $attribute_taxonomies ) { - - foreach ( $attribute_taxonomies as &$tax ) { - $tax->attribute_label = wpm_translate_string( $tax->attribute_label ); - } - - return $attribute_taxonomies; - } - - /** - * Filter action for save and add attribute taxonomies - */ - public function set_translation_for_attribute_taxonomies() { - $action = ''; - - // Action to perform: add, edit, delete or none - //phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. - if ( ! empty( $_POST['add_new_attribute'] ) ) { - $action = 'add'; - //phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used - } elseif ( ! empty( $_POST['save_attribute'] ) && ! empty( $_GET['edit'] ) ) { - $action = 'edit'; - } - - switch ( $action ) { - case 'add': - $this->process_add_attribute(); - break; - case 'edit': - $this->process_edit_attribute(); - break; - } - } - - /** - * Add new attribute with translate - */ - private function process_add_attribute() { - check_admin_referer( 'woocommerce-add-new_attribute' ); - - $label = ''; - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function - if ( isset( $_POST['attribute_label'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function - $label = wpm_set_new_value( '', wc_clean( stripslashes( $_POST['attribute_label'] ) ) ); - } - - $_POST['attribute_label'] = $label; - } - - /** - * Save new attribute with translate - */ - private function process_edit_attribute() { - - $attribute_id = isset( $_GET['edit'] ) ? absint( $_GET['edit'] ) : ''; - check_admin_referer( 'woocommerce-save-attribute_' . $attribute_id ); - - $label = ''; - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function - if ( isset( $_POST['attribute_label'] ) ) { - $attribute = wc_get_attribute( $attribute_id ); - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function - $label = wpm_set_new_value( $attribute->name, wc_clean( stripslashes( $_POST['attribute_label'] ) ) ); - } - - $_POST['attribute_label'] = $label; - } - - /** - * - * @param $count - * @param $product \WC_Product - * - * @return null|string - */ - public function fix_product_review_count( $count, $product ) { - - if ( ( is_admin() && ! is_front_ajax() ) || defined( 'DOING_CRON' ) ) { - return $count; - } - - $lang = get_query_var( 'lang' ); - - if ( ! $lang ) { - $lang = wpm_get_user_language(); - } - - $count_array = wp_cache_get( $product->get_id(), 'wpm_comment_count' ); - - if ( $count_array ) { - if ( isset( $count_array[ $lang ] ) ) { - return $count_array[ $lang ]; - } - } else { - $count_array = array(); - } - - global $wpdb; - - $meta_query = array( - array( - 'relation' => 'OR', - array( - 'key' => '_languages', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_languages', - 'value' => serialize( $lang ), - 'compare' => 'LIKE', - ), - ), - ); - - $meta_sql = get_meta_sql( $meta_query, 'comment', $wpdb->comments, 'comment_ID' ); - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery - $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT( DISTINCT({$wpdb->comments}.comment_ID) ) FROM {$wpdb->comments} {$meta_sql['join']} WHERE comment_parent = 0 AND comment_post_ID = %d AND comment_approved = '1' {$meta_sql['where']}", $product->get_id() ) ); - - $count_array[ $lang ] = $count; - wp_cache_add( $product->get_id(), $count_array, 'wpm_comment_count' ); - - return $count; - } - - /** - * Remove filters when product is duplication - */ - public function remove_filters() { - remove_filter( 'woocommerce_product_get_name', 'wpm_translate_string' ); - remove_filter( 'woocommerce_product_get_description', 'wpm_translate_string' ); - remove_filter( 'woocommerce_product_get_short_description', 'wpm_translate_string' ); - remove_filter( 'woocommerce_product_title', 'wpm_translate_string' ); - } - - /** - * Translate response data for REST Requests - * - * @param $response - * @param $object - * @param $request - * - * @return object - */ - public function translate_rest_object( $response, $object, $request ) { - - if ( 'view' !== $request['context'] ) { - $response->data = wpm_translate_value( $response->data ); - } - - if ( isset( $response->data['meta_data'] ) && is_array( $response->data['meta_data'] ) ) { - - foreach ( $response->data['meta_data'] as $meta_data ) { - - if ( is_string( $meta_data->value ) ) { - $meta_value = wpm_translate_string( trim( $meta_data->value, '"' ) ); - } else { - $meta_value = wpm_translate_value( $meta_data->value ); - } - - $meta_data->value = $meta_value; - $meta_data->apply_changes(); - } - } - - return $response; - } - - public function modify_product_attributes($object_fields_config, $meta_key, $meta_value, $product_id){ - - $attribute_key = array(); - - if($meta_key == '_product_attributes'){ - - if(function_exists('wc_get_product')){ - - $product = wc_get_product($product_id); - if ( $product->get_type() == 'simple' || $product->get_type() == 'variable' ){ - if(isset($object_fields_config[$meta_key]) && is_array($object_fields_config[$meta_key])){ - if(is_array($meta_value) && !empty($meta_value)){ - $attr_array = array(); - foreach ($object_fields_config[$meta_key] as $ofc_key => $ofc_value) { - $attr_array = $ofc_value; - } - foreach ($meta_value as $key => $value) { - $attribute_key[] = $key; - $object_fields_config[$meta_key][$key] = $attr_array; - } - } - } - } - } - } - - return $object_fields_config; - } - - /** - * Translate attribute term name - * @param $term WP_Term - * @param $taxonomy string - * @return $term WP_Term - * @since 2.4.14 - * */ - public function translate_product_variation_metadata( $term, $taxonomy ){ - - if ( is_object( $term ) && ! empty( $term->name ) && strpos( $taxonomy, 'pa_' ) !== false ) { - $term->name = wpm_translate_string( $term->name ); - } - - return $term; - } - - /** - * Translate filter attribute widget name - * @param $result WP_HTTP_Response - * @param $server WP_REST_Server - * @param $request WP_REST_Request - * @return $result WP_HTTP_Response - * @since 2.4.11 - * */ - public function wpm_translate_filter_attribute_widget( $result, $server, $request ){ - - if( ! empty( $result->data ) && is_array( $result->data ) ) { - - foreach ($result->data as $r_key => $attribute) { - - if( ! empty( $attribute ) && is_array( $attribute ) ) { - - // Check if current response is of product attribute or not - if( ! empty( $attribute['name'] ) && is_string( $attribute['name'] ) ){ - $result->data[ $r_key ]['name'] = wpm_translate_string( $attribute['name'] ); - } - - } - - } - - } - - return $result; - } - - /** - * Translate variation attribute meta data - * @param $variation Object - * @param $product_id Integer - * @since 2.4.14 - * */ - public function translate_variation_attribute( $variation, $product_id ){ - - if ( ! empty( $variation ) && is_object( $variation ) ) { - - global $wpdb; - - $lang = wpm_get_language(); - - $variation_id = $variation->get_id(); - - $old_variation = new \WC_Product_Variation( $variation_id ); - $old_attributes = $old_variation->get_attributes(); - - $attributes = $variation->get_attributes(); - - if ( ! empty( $attributes ) && is_array( $attributes ) ) { - - foreach ($attributes as $key => $value) { - - $attr_key = 'attribute_'.$key; - - if ( isset( $old_attributes[$key] ) ) { - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d LIMIT 1;", $attr_key, $variation_id ) ); - $old_value = maybe_unserialize( $old_value ); - - $attributes[$key] = wpm_set_new_value( $old_value, $value ); - } - } - } - - $variation->set_attributes( $attributes ); - - } - } - - /** - * Translate dropdown attribute arguments on single product page - * @param $args Array - * @return $args Array - * @since 2.4.14 - * */ - public function translate_variation_attribute_options_args( $args ) { - - if ( ! empty( $args['options'] ) && is_array( $args['options'] ) ) { - - $args['options'] = wpm_translate_value( $args['options'] ); - - }else if ( empty( $args['options'] ) && ! empty( $args['attribute'] ) && ! empty( $args['product'] ) && is_object( $args['product'] ) ) { - - $product = $args['product']; - $attribute = strtolower( $args['attribute'] ); - $attribute = str_replace( ' ', '-', $attribute ); - - if ( $product->is_type( 'variable' ) ) { - - // Get all variation IDs - $variation_ids = $product->get_children(); - - if ( ! empty( $variation_ids ) && is_array( $variation_ids ) ) { - foreach ($variation_ids as $key => $variation_id) { - - // Get the variation product - $variation = new \WC_Product_Variation( $variation_id ); - - if ( ! empty( $variation ) && is_object( $variation ) ) { - // Get Attributes - $attributes = $variation->get_attributes(); - if ( ! empty( $attributes ) && is_array( $attributes ) ) { - foreach ($attributes as $a_key => $a_val) { - - if ( $a_key == $attribute ) { - $args['options'][] = wpm_translate_string( $a_val ); - } - } - } - } - } - } - - } - } - - if ( ! empty( $args['options'] ) ){ - $args['options'] = array_unique( $args['options'] ); - } - - return $args; - } -} +get_instance_option_key(), array() ); + + $setting_config = array( + 'title' => array(), + ); + + $settings = wpm_set_new_value( $old_settings, $settings, $setting_config ); + + return $settings; + } + + /** + * Translate methods for zone + * + * @param array $methods + * + * @return array + */ + public function translate_zone_shipping_methods( $methods ) { + + foreach ( $methods as &$method ) { + $method->title = wpm_translate_string( $method->title ); + } + + return $methods; + } + + /** + * Remove translation result query for products in shortcode + * + * @param array $query_args + * + * @return array + */ + public function remove_filter( $query_args ) { + + //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters --Reason This is not a global code, this works only on some woocoomerce hooks. + $query_args['suppress_filters'] = true; + + return $query_args; + } + + /** + * Add capability for translating products for user role + * + * @since 2.0.0 + * + * @param array $types + * + * @return array + */ + public function add_capabilities_types( $types ) { + + $types[] = 'product'; + + return $types; + } + + /** + * Set attribute taxonomies for translate + * + * @param $taxonomies_config + * + * @return array + */ + public function add_attribute_taxonomies( $taxonomies_config ) { + + if ( ! $this->attribute_taxonomies_config ) { + + if ( ! $attribute_taxonomies = get_transient( 'wc_attribute_taxonomies' ) ) { + $attribute_taxonomies = array(); + } + + foreach ( $attribute_taxonomies as $tax ) { + if ( $name = wc_attribute_taxonomy_name( $tax->attribute_name ) ) { + $this->attribute_taxonomies_config[ $name ] = array(); + } + } + } + + return wpm_array_merge_recursive( $this->attribute_taxonomies_config, $taxonomies_config ); + + } + + /** + * Translate attribute taxonomies + * + * @param $attribute_taxonomies + * + * @return mixed + */ + public function translate_attribute_taxonomies( $attribute_taxonomies ) { + + foreach ( $attribute_taxonomies as &$tax ) { + $tax->attribute_label = wpm_translate_string( $tax->attribute_label ); + } + + return $attribute_taxonomies; + } + + /** + * Filter action for save and add attribute taxonomies + */ + public function set_translation_for_attribute_taxonomies() { + $action = ''; + + // Action to perform: add, edit, delete or none + //phpcs:ignore WordPress.Security.NonceVerification.Missing -- this is a dependent function and its all security measurament is done wherever it has been used. + if ( ! empty( $_POST['add_new_attribute'] ) ) { + $action = 'add'; + //phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- this is a dependent function and its all security measurament is done wherever it has been used + } elseif ( ! empty( $_POST['save_attribute'] ) && ! empty( $_GET['edit'] ) ) { + $action = 'edit'; + } + + switch ( $action ) { + case 'add': + $this->process_add_attribute(); + break; + case 'edit': + $this->process_edit_attribute(); + break; + } + } + + /** + * Add new attribute with translate + */ + private function process_add_attribute() { + check_admin_referer( 'woocommerce-add-new_attribute' ); + + $label = ''; + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function + if ( isset( $_POST['attribute_label'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function + $label = wpm_set_new_value( '', wc_clean( stripslashes( $_POST['attribute_label'] ) ) ); + } + + $_POST['attribute_label'] = $label; + } + + /** + * Save new attribute with translate + */ + private function process_edit_attribute() { + + $attribute_id = isset( $_GET['edit'] ) ? absint( $_GET['edit'] ) : ''; + check_admin_referer( 'woocommerce-save-attribute_' . $attribute_id ); + + $label = ''; + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function + if ( isset( $_POST['attribute_label'] ) ) { + $attribute = wc_get_attribute( $attribute_id ); + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitization is handled below in wc_clean() function + $label = wpm_set_new_value( $attribute->name, wc_clean( stripslashes( $_POST['attribute_label'] ) ) ); + } + + $_POST['attribute_label'] = $label; + } + + /** + * + * @param $count + * @param $product \WC_Product + * + * @return null|string + */ + public function fix_product_review_count( $count, $product ) { + + if ( ( is_admin() && ! is_front_ajax() ) || defined( 'DOING_CRON' ) ) { + return $count; + } + + $lang = get_query_var( 'lang' ); + + if ( ! $lang ) { + $lang = wpm_get_user_language(); + } + + $count_array = wp_cache_get( $product->get_id(), 'wpm_comment_count' ); + + if ( $count_array ) { + if ( isset( $count_array[ $lang ] ) ) { + return $count_array[ $lang ]; + } + } else { + $count_array = array(); + } + + global $wpdb; + + $meta_query = array( + array( + 'relation' => 'OR', + array( + 'key' => '_languages', + 'compare' => 'NOT EXISTS', + ), + array( + 'key' => '_languages', + 'value' => serialize( $lang ), + 'compare' => 'LIKE', + ), + ), + ); + + $meta_sql = get_meta_sql( $meta_query, 'comment', $wpdb->comments, 'comment_ID' ); + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery + $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT( DISTINCT({$wpdb->comments}.comment_ID) ) FROM {$wpdb->comments} {$meta_sql['join']} WHERE comment_parent = 0 AND comment_post_ID = %d AND comment_approved = '1' {$meta_sql['where']}", $product->get_id() ) ); + + $count_array[ $lang ] = $count; + wp_cache_add( $product->get_id(), $count_array, 'wpm_comment_count' ); + + return $count; + } + + /** + * Remove filters when product is duplication + */ + public function remove_filters() { + remove_filter( 'woocommerce_product_get_name', 'wpm_translate_string' ); + remove_filter( 'woocommerce_product_get_description', 'wpm_translate_string' ); + remove_filter( 'woocommerce_product_get_short_description', 'wpm_translate_string' ); + remove_filter( 'woocommerce_product_title', 'wpm_translate_string' ); + } + + /** + * Translate response data for REST Requests + * + * @param $response + * @param $object + * @param $request + * + * @return object + */ + public function translate_rest_object( $response, $object, $request ) { + + if ( 'view' !== $request['context'] ) { + $response->data = wpm_translate_value( $response->data ); + } + + if ( isset( $response->data['meta_data'] ) && is_array( $response->data['meta_data'] ) ) { + + foreach ( $response->data['meta_data'] as $meta_data ) { + + if ( is_string( $meta_data->value ) ) { + $meta_value = wpm_translate_string( trim( $meta_data->value, '"' ) ); + } else { + $meta_value = wpm_translate_value( $meta_data->value ); + } + + $meta_data->value = $meta_value; + $meta_data->apply_changes(); + } + } + + return $response; + } + + public function modify_product_attributes($object_fields_config, $meta_key, $meta_value, $product_id){ + + $attribute_key = array(); + + if($meta_key == '_product_attributes'){ + + if(function_exists('wc_get_product')){ + + $product = wc_get_product($product_id); + if ( $product->get_type() == 'simple' || $product->get_type() == 'variable' ){ + if(isset($object_fields_config[$meta_key]) && is_array($object_fields_config[$meta_key])){ + if(is_array($meta_value) && !empty($meta_value)){ + $attr_array = array(); + foreach ($object_fields_config[$meta_key] as $ofc_key => $ofc_value) { + $attr_array = $ofc_value; + } + foreach ($meta_value as $key => $value) { + $attribute_key[] = $key; + $object_fields_config[$meta_key][$key] = $attr_array; + } + } + } + } + } + } + + return $object_fields_config; + } + + /** + * Translate attribute term name + * @param $term WP_Term + * @param $taxonomy string + * @return $term WP_Term + * @since 2.4.14 + * */ + public function translate_product_variation_metadata( $term, $taxonomy ){ + + if ( is_object( $term ) && ! empty( $term->name ) && strpos( $taxonomy, 'pa_' ) !== false ) { + $term->name = wpm_translate_string( $term->name ); + } + + return $term; + } + + /** + * Translate filter attribute widget name + * @param $result WP_HTTP_Response + * @param $server WP_REST_Server + * @param $request WP_REST_Request + * @return $result WP_HTTP_Response + * @since 2.4.11 + * */ + public function wpm_translate_filter_attribute_widget( $result, $server, $request ){ + + if( ! empty( $result->data ) && is_array( $result->data ) ) { + + foreach ($result->data as $r_key => $attribute) { + + if( ! empty( $attribute ) && is_array( $attribute ) ) { + + // Check if current response is of product attribute or not + if( ! empty( $attribute['name'] ) && is_string( $attribute['name'] ) ){ + $result->data[ $r_key ]['name'] = wpm_translate_string( $attribute['name'] ); + } + + } + + } + + } + + return $result; + } + + /** + * Translate variation attribute meta data + * @param $variation Object + * @param $product_id Integer + * @since 2.4.14 + * */ + public function translate_variation_attribute( $variation, $product_id ){ + + if ( ! empty( $variation ) && is_object( $variation ) ) { + + global $wpdb; + + $lang = wpm_get_language(); + + $variation_id = $variation->get_id(); + + $old_variation = new \WC_Product_Variation( $variation_id ); + $old_attributes = $old_variation->get_attributes(); + + $attributes = $variation->get_attributes(); + + if ( ! empty( $attributes ) && is_array( $attributes ) ) { + + foreach ($attributes as $key => $value) { + + $attr_key = 'attribute_'.$key; + + if ( isset( $old_attributes[$key] ) ) { + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $old_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id = %d LIMIT 1;", $attr_key, $variation_id ) ); + $old_value = maybe_unserialize( $old_value ); + + $attributes[$key] = wpm_set_new_value( $old_value, $value ); + } + } + } + + $variation->set_attributes( $attributes ); + + } + } + + /** + * Translate dropdown attribute arguments on single product page + * @param $args Array + * @return $args Array + * @since 2.4.14 + * */ + public function translate_variation_attribute_options_args( $args ) { + + if ( ! empty( $args['options'] ) && is_array( $args['options'] ) ) { + + $args['options'] = wpm_translate_value( $args['options'] ); + + }else if ( empty( $args['options'] ) && ! empty( $args['attribute'] ) && ! empty( $args['product'] ) && is_object( $args['product'] ) ) { + + $product = $args['product']; + $attribute = strtolower( $args['attribute'] ); + $attribute = str_replace( ' ', '-', $attribute ); + + if ( $product->is_type( 'variable' ) ) { + + // Get all variation IDs + $variation_ids = $product->get_children(); + + if ( ! empty( $variation_ids ) && is_array( $variation_ids ) ) { + foreach ($variation_ids as $key => $variation_id) { + + // Get the variation product + $variation = new \WC_Product_Variation( $variation_id ); + + if ( ! empty( $variation ) && is_object( $variation ) ) { + // Get Attributes + $attributes = $variation->get_attributes(); + if ( ! empty( $attributes ) && is_array( $attributes ) ) { + foreach ($attributes as $a_key => $a_val) { + + if ( $a_key == $attribute ) { + $args['options'][] = wpm_translate_string( $a_val ); + } + } + } + } + } + } + + } + } + + if ( ! empty( $args['options'] ) ){ + $args['options'] = array_unique( $args['options'] ); + } + + return $args; + } + + /** + * Modify product export data while export + * @param $value string + * @param $product WC_Product + * @return $value string + * @since 2.4.17 + * */ + public function modify_product_export_data( $value, $product, $column_id ) { + + if ( $column_id == 'name') { + return $product->get_name(); + }else if ( $column_id == 'short_description') { + return $product->get_short_description(); + }else if ( $column_id == 'description') { + return $product->get_description(); + } + + return $value; + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo-presenters.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo-presenters.php index 0faeb5280..f3638e7cd 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo-presenters.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo-presenters.php @@ -1,57 +1,57 @@ -locale = $locale; - } - - /** - * Returns the meta Opengraph alternate locale meta tag - * - * @return string - * @since 2.4.5 - */ - public function present() { - return sprintf( '', esc_attr( $this->get() ) ); - } - - /** - * Returns the alternate locale - * - * @return string - * @since 2.4.5 - */ - public function get() { - return $this->locale; - } +locale = $locale; + } + + /** + * Returns the meta Opengraph alternate locale meta tag + * + * @return string + * @since 2.4.5 + */ + public function present() { + return sprintf( '', esc_attr( $this->get() ) ); + } + + /** + * Returns the alternate locale + * + * @return string + * @since 2.4.5 + */ + public function get() { + return $this->locale; + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo.php b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo.php index d80decb6f..76ae4626c 100644 --- a/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo.php +++ b/plugins/wp-react-custom-multilang/includes/integrations/class-wpm-yoast-seo.php @@ -1,682 +1,702 @@ -=') ) { - add_action( 'wp_after_insert_post', array($this, 'update_yoast_post_meta_tags')); - add_action( 'saved_term', array($this, 'update_yoast_term_meta_tags'), 10, 5); - } - add_filter( 'wpseo_metadesc', array( $this, 'translate_metadesc' ) ); - - - $options = \WPSEO_Options::get_option( 'wpseo_social' ); - - if ( true === $options['opengraph'] ) { - add_action( 'wpm_language_settings', array( $this, 'set_opengraph_locale' ), 10, 2 ); - add_filter( 'wpm_rest_schema_languages', array( $this, 'add_schema_to_rest' ) ); - add_filter( 'wpm_save_languages', array( $this, 'save_languages' ), 10, 2 ); - add_filter( 'wpseo_locale', array( $this, 'add_opengraph_locale' ) ); - add_filter( 'wpseo_opengraph_image', array($this, 'wpm_translate_opengraph_image' ) ); - add_filter( 'wpseo_twitter_image', array($this, 'wpm_translate_twitter_image' ) ); - if(defined('WPSEO_VERSION') && version_compare(WPSEO_VERSION, '14.0', '<') ) { - add_action( 'wpseo_opengraph', array( $this, 'add_alternate_opengraph_locale' ), 40 ); - }else { - add_filter( 'wpseo_frontend_presenters', array( $this, 'add_wpseo_frontend_presenters' ) ); - } - } - } - - /** - * Translate canonical URL - * @since 2.4.10 - * @param $canonical String - * @return $canonical String - * */ - public function seo_canonical_translation( $canonical ) { - - return wpm_translate_url($canonical); - } - - /** - * Add dynamically title setting for post types - * - * @param array $option_config - * - * @return array - */ - public function set_posts_config( $option_config ) { - - $post_types = get_post_types( array(), 'names' ); - - foreach ( $post_types as $post_type ) { - - if ( null === wpm_get_post_config( $post_type ) ) { - continue; - } - - $option_post_config = array( - "title-{$post_type}" => array(), - "metadesc-{$post_type}" => array(), - "metakey-{$post_type}" => array(), - "title-ptarchive-{$post_type}" => array(), - "metadesc-ptarchive-{$post_type}" => array(), - ); - - $option_config = wpm_array_merge_recursive( $option_post_config, $option_config ); - } - - $taxonomies = get_taxonomies(); - - foreach ( $taxonomies as $taxonomy ) { - - if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { - continue; - } - - $option_taxonomy_config = array( - "title-tax-{$taxonomy}" => array(), - "metadesc-tax-{$taxonomy}" => array(), - ); - - $option_config = wpm_array_merge_recursive( $option_taxonomy_config, $option_config ); - } - - return $option_config; - } - - /** - * Translate page title - * - * @param $title - * - * @return string - */ - public function translate_title( $title ) { - $separator = wpseo_replace_vars( '%%sep%%', array() ); - $separator = ' ' . trim( $separator ) . ' '; - $titles_part = explode( $separator, $title ); - $titles_part = wpm_translate_value( $titles_part ); - $title = implode( $separator, $titles_part ); - - return $title; - } - - /** - * Add filter for each type - * - * @param $type - * - * @return mixed - */ - public function add_filter_for_maps( $type ) { - add_filter( "wpseo_sitemap_{$type}_urlset", array( $this, 'add_namespace_to_xml' ) ); - return $type; - } - - /** - * Add namespace for xmlns:xhtml - * - * @param $urlset - * - * @return mixed - */ - public function add_namespace_to_xml( $urlset ) { - $urlset = str_replace( - array( - 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd', - 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"' - ), - array( - 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd', - 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml"' - ), - $urlset ); - - return $urlset; - } - - /** - * Add separating by language to url - * - * @param array $url - * @param string $type - * @param object $object - * - * @return array - */ - public function add_lang_to_url( $url, $type, $object ) { - - $languages = array(); - - switch ( $type ) { - case 'post': - $languages = get_post_meta( $object->ID, '_languages', true ); - break; - case 'term': - $languages = get_term_meta( $object->term_id, '_languages', true ); - break; - } - - if ( $languages ) { - $url['languages'] = $languages; - } - - return $url; - } - - /** - * Add alternate links to sitemap - * - * @param string $output - * @param array $url - * - * @return string - */ - public function add_alternate_sitemaplinks( $output, $url ) { - $loc = $output; - $new_output = ''; - - foreach ( wpm_get_languages() as $code => $language ) { - - if ( isset( $url['languages'] ) && ! in_array( $code, $url['languages'] ) ) { - continue; - } - - $alternate = array(); - $new_loc = str_replace( $url['loc'], esc_url( wpm_translate_url( $url['loc'], $code ) ), $loc ); - - foreach ( wpm_get_languages() as $key => $lg ) { - if ( isset( $url['languages'] ) && ! in_array( $key, $url['languages'] ) ) { - continue; - } - - $alternate[ $key ] = sprintf( "\t\n\t", esc_attr( wpm_sanitize_lang_slug( $lg['locale'] ) ), esc_url( wpm_translate_url( $url['loc'], $key ) ) ); - } - - $alternate = apply_filters( 'wpm_sitemap_alternate_links', $alternate, $url['loc'], $code ); - $new_loc = str_replace( '', implode( '', $alternate ) . '', $new_loc ); - $new_output .= $new_loc; - } - return $new_output; - } - - /** - * Set locale for opengraph - * - * @since 2.0.3 - * - * @param $count - * @param $lang - */ - public function set_opengraph_locale( $lang, $count ) { - $options = get_option( 'wpm_languages', array() ); - $value = ''; - - if ( isset( $options[ $lang ]['wpseo_og_locale'] ) ) { - $value = $options[ $lang ]['wpseo_og_locale']; - } - ?> - - - - -

    - - - 'string' ); - - return $schema; - } - - /** - * Save languages - * - * @since 2.0.3 - * - * @param $languages - * @param $request - * - * @return mixed - */ - public function save_languages( $languages, $request ) { - foreach ( $request as $value ) { - if ( isset( $languages[ $value['code'] ], $value['wpseo_og_locale'] ) ) { - $languages[ $value['code'] ]['wpseo_og_locale'] = $value['wpseo_og_locale']; - } - } - - return $languages; - } - - /** - * Set locale for opengraph - * - * @since 2.0.0 - * - * @param $locale - * - * @return string - */ - public function add_opengraph_locale( $locale ) { - $languages = wpm_get_languages(); - $user_language = wpm_get_language(); - - if ( ! empty( $languages[ $user_language ]['wpseo_og_locale'] ) ) { - $locale = $languages[ $user_language ]['wpseo_og_locale']; - } - - return $locale; - } - - /** - * Set alternate locale for opengraph - * - * @since 2.2.0 - */ - public function add_alternate_opengraph_locale() { - global $wpseo_og; - - $languages = array(); - - if ( is_singular() ) { - $languages = get_post_meta( get_the_ID(), '_languages', true ); - } elseif ( is_category() || is_tax() || is_tag() ) { - $languages = get_term_meta( get_queried_object_id(), '_languages', true ); - } - - foreach ( wpm_get_languages() as $code => $language ) { - - if ( ( $languages && ! isset( $languages[ $code ] ) ) || $code === wpm_get_language() ) { - continue; - } - - if ( ! empty( $language['wpseo_og_locale'] ) && null !== $wpseo_og ) { - $wpseo_og->og_tag( 'og:locale:alternate', $language['wpseo_og_locale'] ); - } - } - } - - /** - * Update yoast meta description field value in yoast_indexable table for posts - * @since 2.4.3 - * */ - public function update_yoast_post_meta_tags() - { - global $wpdb; - - $update_array_values = array(); - - $yoast_table_name = $wpdb->prefix . 'yoast_indexable'; - - // Check if yoast_indexable table exists - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $table_exists = $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $yoast_table_name ) ); - - if ($table_exists) { - $post_id = get_the_ID(); - if($post_id){ - $table_name = $wpdb->prefix . 'postmeta'; - - $meta_key_array = array('_yoast_wpseo_title', '_yoast_wpseo_metadesc', '_yoast_wpseo_opengraph-title','_yoast_wpseo_opengraph-description', '_yoast_wpseo_twitter-title', '_yoast_wpseo_twitter-description', '_yoast_wpseo_focuskw', '_yoast_wpseo_schema_page_type', '_yoast_wpseo_schema_article_type', '_yoast_wpseo_opengraph-image', '_yoast_wpseo_opengraph-image-id', '_yoast_wpseo_twitter-image', '_yoast_wpseo_twitter-image-id', '_yoast_wpseo_canonical'); - - // Get _yoast_wpseo_metadesc and _yoast_wpseo_title values from table - //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: Making use of built in functions fetched data of current language - $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); - if(!empty($post_meta_result) && is_array($post_meta_result) && count($post_meta_result) > 0){ - - // Fetch post data from yoast_indexable table - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $result = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}yoast_indexable WHERE object_id = %d", $post_id)); - if(!empty($result) && is_object($result)){ - if(isset($result->object_id)){ - // Loop through the values - foreach ($post_meta_result as $pmr_key => $pmr_value){ - if(!empty($pmr_value) && is_object($pmr_value)){ - if(isset($pmr_value->post_id)){ - $key_name = $pmr_value->meta_key; - $meta_value = $pmr_value->meta_value; - - // Check if data in post meta and yoast_indexable table are not same - if($key_name == '_yoast_wpseo_title' && $result->title !== $meta_value){ - $update_array_values['title'] = sanitize_text_field($meta_value); - }else if($key_name == '_yoast_wpseo_metadesc' && $result->description !== $meta_value){ - $update_array_values['description'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_opengraph-title' && $result->open_graph_title !== $meta_value){ - $update_array_values['open_graph_title'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_opengraph-description' && $result->open_graph_description !== $meta_value){ - $update_array_values['open_graph_description'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_twitter-title' && $result->twitter_title !== $meta_value){ - $update_array_values['twitter_title'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_twitter-description' && $result->twitter_description !== $meta_value){ - $update_array_values['twitter_description'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_focuskw' && $result->primary_focus_keyword !== $meta_value){ - // $update_array_values['primary_focus_keyword'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_schema_page_type' && $result->schema_page_type !== $meta_value){ - $update_array_values['schema_page_type'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_schema_article_type' && $result->schema_article_type !== $meta_value){ - $update_array_values['schema_article_type'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_opengraph-image' && $result->open_graph_image !== $meta_value){ - $update_array_values['open_graph_image'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_opengraph-image-id' && $result->open_graph_image_id !== $meta_value){ - $update_array_values['open_graph_image_id'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_twitter-image' && $result->twitter_image !== $meta_value){ - $update_array_values['twitter_image'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_twitter-image-id' && $result->twitter_image_id !== $meta_value){ - $update_array_values['twitter_image_id'] = sanitize_textarea_field($meta_value); - }else if($key_name == '_yoast_wpseo_canonical' && $result->canonical !== $meta_value){ - $update_array_values['canonical'] = sanitize_textarea_field($meta_value); - } - } - } - } - - if(!empty($update_array_values)){ - // Update the title and description field values of yoast_indexable table - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $post_id)); - } - } - } - } // post_meta_result if end - } - } // table_exists if end - } - - /** - * Update yoast meta description field value in yoast_indexable table for terms - * @since 2.4.3 - * */ - public function update_yoast_term_meta_tags($term_id, $tt_id, $taxonomy, $update, $args) - { - global $wpdb; - $update_array_values = array(); - - $yoast_table_name = $wpdb->prefix . 'yoast_indexable'; - - // Check if yoast_indexable table exists - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: As per requirement, We have to use the direct query. - $table_exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $yoast_table_name) ); - - if ($table_exists) { - $table_name = $wpdb->prefix . 'options'; - - // Get _yoast_wpseo_metadesc and _yoast_wpseo_title values from options table - $option_name = 'wpseo_taxonomy_meta'; - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $option_result = $wpdb->get_row($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix}yoast_indexable WHERE option_name = %s", $option_name )); - - if(is_object($option_result) && isset($option_result->option_value)){ - if(!empty($option_result->option_value) && is_string($option_result->option_value)){ - $option_result_value = unserialize($option_result->option_value); - - if(!empty($option_result_value) && is_array($option_result_value)){ - if(isset($option_result_value[$taxonomy]) && is_array($option_result_value[$taxonomy])){ - $category_array = $option_result_value[$taxonomy]; - if(isset($category_array[$term_id]) && is_array($category_array[$term_id])){ - $term_option_details = $category_array[$term_id]; - - if(isset($term_option_details['wpseo_desc'])){ - $update_array_values['description'] = sanitize_textarea_field($term_option_details['wpseo_desc']); - } - if(isset($term_option_details['wpseo_title'])){ - $update_array_values['title'] = sanitize_text_field($term_option_details['wpseo_title']); - } - if(isset($term_option_details['wpseo_opengraph-title'])){ - $update_array_values['open_graph_title'] = sanitize_text_field($term_option_details['wpseo_opengraph-title']); - } - if(isset($term_option_details['wpseo_opengraph-description'])){ - $update_array_values['open_graph_description'] = sanitize_text_field($term_option_details['wpseo_opengraph-description']); - } - if(isset($term_option_details['wpseo_twitter-title'])){ - $update_array_values['twitter_title'] = sanitize_text_field($term_option_details['wpseo_twitter-title']); - } - if(isset($term_option_details['wpseo_twitter-description'])){ - $update_array_values['twitter_description'] = sanitize_text_field($term_option_details['wpseo_twitter-description']); - } - if(isset($term_option_details['wpseo_focuskw'])){ - $update_array_values['primary_focus_keyword'] = sanitize_text_field($term_option_details['wpseo_focuskw']); - } - if(isset($term_option_details['wpseo_opengraph-image'])){ - $update_array_values['open_graph_image'] = sanitize_text_field($term_option_details['wpseo_opengraph-image']); - } - if(isset($term_option_details['wpseo_opengraph-image-id'])){ - $update_array_values['open_graph_image_id'] = sanitize_text_field($term_option_details['wpseo_opengraph-image-id']); - } - if(isset($term_option_details['wpseo_twitter-image'])){ - $update_array_values['twitter_image'] = sanitize_text_field($term_option_details['wpseo_twitter-image']); - } - if(isset($term_option_details['wpseo_twitter-image-id'])){ - $update_array_values['twitter_image_id'] = sanitize_text_field($term_option_details['wpseo_twitter-image-id']); - } - - // Update the title and description field values of yoast_indexable table - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $term_id)); - } - } - } - } - } // option_result if end - } // table_exists if end - } - - /** - * Update yoast opengraph url - * @since 2.4.4 - * @param $url String - * @return $url String - * */ - public function update_opengraph_url($url) - { - if(!is_admin()){ - $url = get_permalink(); - } - return $url; - } - - /** - * Adds opengraph support for translations - * - * @since 2.4.5 - * - * @param array $presenters An array of objects implementing Abstract_Indexable_Presenter - * @return array - */ - public function add_wpseo_frontend_presenters( $presenters ) { - $_presenters = array(); - - foreach ( $presenters as $presenter ) { - $_presenters[] = $presenter; - - if ( get_class($presenter) == 'Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter' ) { - - foreach ( $this->get_ogp_alternate_languages() as $lang ) { - $_presenters[] = new WPM_Yoast_Seo_Presenters( $lang ); - } - } - } - - return $_presenters; - } - - /** - * Get alternate language codes for Opengraph - * - * @since 2.4.5 - * - * @return array - */ - protected function get_ogp_alternate_languages() { - $alternates = array(); - - foreach ( wpm_get_languages() as $code => $language ) { - if ( $code !== wpm_get_language() && ! empty( $language['locale'] ) ) { - $alternates[] = $language['locale']; - } - } - - // There is a risk that 2 languages have the same Facebook locale. So let's make sure to output each locale only once. - return array_unique( $alternates ); - } - - /** - * Translate opengraph image - * - * @since 2.4.6 - * - * @param $image String - * - * @return $image String - */ - public function wpm_translate_opengraph_image($image) - { - $id = 0; - $type = ''; - if(is_singular()){ - $id = get_the_ID(); - $type = get_post_type(); - }else if(is_archive() || (function_exists('is_product_category') && is_product_category())) { - $cat_obj = get_queried_object(); - if( is_object( $cat_obj ) && isset( $cat_obj->term_id ) ) { - $id = $cat_obj->term_id; - $type = $cat_obj->taxonomy; - } - } - - if($id > 0){ - $result = $this->wpm_get_yoast_data( $id, 'open_graph_image', $type ); - - if(is_object($result) && isset($result->open_graph_image)){ - - if(!empty($result->open_graph_image) && is_string($result->open_graph_image)){ - $image = wpm_translate_value($result->open_graph_image); - } - } - } - return $image; - } - - /** - * Translate twitter image - * - * @since 2.4.6 - * - * @param $image String - * - * @return $image String - */ - public function wpm_translate_twitter_image($image) - { - $id = 0; - $type = ''; - if(is_singular()){ - $id = get_the_ID(); - $type = get_post_type(); - }else if(is_archive() || (function_exists('is_product_category') && is_product_category())) { - $cat_obj = get_queried_object(); - if( is_object( $cat_obj ) && isset( $cat_obj->term_id ) ) { - $id = $cat_obj->term_id; - $type = $cat_obj->taxonomy; - } - } - - if($id > 0){ - $result = $this->wpm_get_yoast_data( $id, 'twitter_image', $type ); - - if(is_object($result) && isset($result->twitter_image)){ - - if(!empty($result->twitter_image) && is_string($result->twitter_image)){ - $image = wpm_translate_value($result->twitter_image); - } - } - } - return $image; - } - - /** - * Get data from yoast_indexable table - * - * @since 2.4.6 - * - * @param $object_id Integer - * @param $field_name String - * - * @return $result Object - */ - public function wpm_get_yoast_data( $object_id, $field_name, $type = '' ) - { - global $wpdb; - - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: As per requirement, We have to use the direct query. - $result = $wpdb->get_row($wpdb->prepare("SELECT {$field_name} FROM {$wpdb->prefix}yoast_indexable WHERE object_id = %d AND object_sub_type = %s", $object_id, $type )); - return $result; - } - - /** - * Translate yoast schema graph - * - * @since 2.4.6 - * - * @param $schema_data Array - * - * @return $schema_data Array - * */ - public function wpm_translate_schema_graph($schema_data, $context){ - if(!empty($schema_data) && is_array($schema_data)){ - $schema_data = wpm_translate_value($schema_data); - } - return $schema_data; - } - - public function translate_metadesc( $description ){ - - global $post; - - if( is_object( $post ) && ! empty( $post->ID ) ) { - - $description = get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true ); - } - return $description; - } +=') ) { + add_action( 'wp_after_insert_post', array($this, 'update_yoast_post_meta_tags')); + add_action( 'saved_term', array($this, 'update_yoast_term_meta_tags'), 10, 5); + } + add_filter( 'wpseo_metadesc', array( $this, 'translate_metadesc' ) ); + + + $options = \WPSEO_Options::get_option( 'wpseo_social' ); + + if ( true === $options['opengraph'] ) { + add_action( 'wpm_language_settings', array( $this, 'set_opengraph_locale' ), 10, 2 ); + add_filter( 'wpm_rest_schema_languages', array( $this, 'add_schema_to_rest' ) ); + add_filter( 'wpm_save_languages', array( $this, 'save_languages' ), 10, 2 ); + add_filter( 'wpseo_locale', array( $this, 'add_opengraph_locale' ) ); + add_filter( 'wpseo_opengraph_image', array($this, 'wpm_translate_opengraph_image' ) ); + add_filter( 'wpseo_twitter_image', array($this, 'wpm_translate_twitter_image' ) ); + if(defined('WPSEO_VERSION') && version_compare(WPSEO_VERSION, '14.0', '<') ) { + add_action( 'wpseo_opengraph', array( $this, 'add_alternate_opengraph_locale' ), 40 ); + }else { + add_filter( 'wpseo_frontend_presenters', array( $this, 'add_wpseo_frontend_presenters' ) ); + } + } + + add_action( 'admin_enqueue_scripts', [ $this, 'render_language_switcher' ] ); + } + + /** + * Translate canonical URL + * @since 2.4.10 + * @param $canonical String + * @return $canonical String + * */ + public function seo_canonical_translation( $canonical ) { + + return wpm_translate_url($canonical); + } + + /** + * Add dynamically title setting for post types + * + * @param array $option_config + * + * @return array + */ + public function set_posts_config( $option_config ) { + + $post_types = get_post_types( array(), 'names' ); + + foreach ( $post_types as $post_type ) { + + if ( null === wpm_get_post_config( $post_type ) ) { + continue; + } + + $option_post_config = array( + "title-{$post_type}" => array(), + "metadesc-{$post_type}" => array(), + "metakey-{$post_type}" => array(), + "title-ptarchive-{$post_type}" => array(), + "metadesc-ptarchive-{$post_type}" => array(), + ); + + $option_config = wpm_array_merge_recursive( $option_post_config, $option_config ); + } + + $taxonomies = get_taxonomies(); + + foreach ( $taxonomies as $taxonomy ) { + + if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { + continue; + } + + $option_taxonomy_config = array( + "title-tax-{$taxonomy}" => array(), + "metadesc-tax-{$taxonomy}" => array(), + ); + + $option_config = wpm_array_merge_recursive( $option_taxonomy_config, $option_config ); + } + + return $option_config; + } + + /** + * Translate page title + * + * @param $title + * + * @return string + */ + public function translate_title( $title ) { + + $title = wpm_translate_value( $title ); + + return $title; + } + + /** + * Add filter for each type + * + * @param $type + * + * @return mixed + */ + public function add_filter_for_maps( $type ) { + add_filter( "wpseo_sitemap_{$type}_urlset", array( $this, 'add_namespace_to_xml' ) ); + return $type; + } + + /** + * Add namespace for xmlns:xhtml + * + * @param $urlset + * + * @return mixed + */ + public function add_namespace_to_xml( $urlset ) { + $urlset = str_replace( + array( + 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd', + 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"' + ), + array( + 'http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd', + 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml"' + ), + $urlset ); + + return $urlset; + } + + /** + * Add separating by language to url + * + * @param array $url + * @param string $type + * @param object $object + * + * @return array + */ + public function add_lang_to_url( $url, $type, $object ) { + + $languages = array(); + + switch ( $type ) { + case 'post': + $languages = get_post_meta( $object->ID, '_languages', true ); + break; + case 'term': + $languages = get_term_meta( $object->term_id, '_languages', true ); + break; + } + + if ( $languages ) { + $url['languages'] = $languages; + } + + return $url; + } + + /** + * Add alternate links to sitemap + * + * @param string $output + * @param array $url + * + * @return string + */ + public function add_alternate_sitemaplinks( $output, $url ) { + $loc = $output; + $new_output = ''; + + foreach ( wpm_get_languages() as $code => $language ) { + + if ( isset( $url['languages'] ) && ! in_array( $code, $url['languages'] ) ) { + continue; + } + + $alternate = array(); + $new_loc = str_replace( $url['loc'], esc_url( wpm_translate_url( $url['loc'], $code ) ), $loc ); + + foreach ( wpm_get_languages() as $key => $lg ) { + if ( isset( $url['languages'] ) && ! in_array( $key, $url['languages'] ) ) { + continue; + } + + $alternate[ $key ] = sprintf( "\t\n\t", esc_attr( wpm_sanitize_lang_slug( $lg['locale'] ) ), esc_url( wpm_translate_url( $url['loc'], $key ) ) ); + } + + $alternate = apply_filters( 'wpm_sitemap_alternate_links', $alternate, $url['loc'], $code ); + $new_loc = str_replace( '', implode( '', $alternate ) . '', $new_loc ); + $new_output .= $new_loc; + } + return $new_output; + } + + /** + * Set locale for opengraph + * + * @since 2.0.3 + * + * @param $count + * @param $lang + */ + public function set_opengraph_locale( $lang, $count ) { + $options = get_option( 'wpm_languages', array() ); + $value = ''; + + if ( isset( $options[ $lang ]['wpseo_og_locale'] ) ) { + $value = $options[ $lang ]['wpseo_og_locale']; + } + ?> + + + + +

    + + + 'string' ); + + return $schema; + } + + /** + * Save languages + * + * @since 2.0.3 + * + * @param $languages + * @param $request + * + * @return mixed + */ + public function save_languages( $languages, $request ) { + foreach ( $request as $value ) { + if ( isset( $languages[ $value['code'] ], $value['wpseo_og_locale'] ) ) { + $languages[ $value['code'] ]['wpseo_og_locale'] = $value['wpseo_og_locale']; + } + } + + return $languages; + } + + /** + * Set locale for opengraph + * + * @since 2.0.0 + * + * @param $locale + * + * @return string + */ + public function add_opengraph_locale( $locale ) { + $languages = wpm_get_languages(); + $user_language = wpm_get_language(); + + if ( ! empty( $languages[ $user_language ]['wpseo_og_locale'] ) ) { + $locale = $languages[ $user_language ]['wpseo_og_locale']; + } + + return $locale; + } + + /** + * Set alternate locale for opengraph + * + * @since 2.2.0 + */ + public function add_alternate_opengraph_locale() { + global $wpseo_og; + + $languages = array(); + + if ( is_singular() ) { + $languages = get_post_meta( get_the_ID(), '_languages', true ); + } elseif ( is_category() || is_tax() || is_tag() ) { + $languages = get_term_meta( get_queried_object_id(), '_languages', true ); + } + + foreach ( wpm_get_languages() as $code => $language ) { + + if ( ( $languages && ! isset( $languages[ $code ] ) ) || $code === wpm_get_language() ) { + continue; + } + + if ( ! empty( $language['wpseo_og_locale'] ) && null !== $wpseo_og ) { + $wpseo_og->og_tag( 'og:locale:alternate', $language['wpseo_og_locale'] ); + } + } + } + + /** + * Update yoast meta description field value in yoast_indexable table for posts + * @since 2.4.3 + * */ + public function update_yoast_post_meta_tags() + { + global $wpdb; + + $update_array_values = array(); + + $yoast_table_name = $wpdb->prefix . 'yoast_indexable'; + + // Check if yoast_indexable table exists + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $table_exists = $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $yoast_table_name ) ); + + if ($table_exists) { + $post_id = get_the_ID(); + if($post_id){ + $table_name = $wpdb->prefix . 'postmeta'; + + $meta_key_array = array('_yoast_wpseo_title', '_yoast_wpseo_metadesc', '_yoast_wpseo_opengraph-title','_yoast_wpseo_opengraph-description', '_yoast_wpseo_twitter-title', '_yoast_wpseo_twitter-description', '_yoast_wpseo_focuskw', '_yoast_wpseo_schema_page_type', '_yoast_wpseo_schema_article_type', '_yoast_wpseo_opengraph-image', '_yoast_wpseo_opengraph-image-id', '_yoast_wpseo_twitter-image', '_yoast_wpseo_twitter-image-id', '_yoast_wpseo_canonical'); + + // Get _yoast_wpseo_metadesc and _yoast_wpseo_title values from table + //phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration,WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: Making use of built in functions fetched data of current language + $post_meta_result = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d AND (meta_key IN('".implode("','", $meta_key_array)."') )", $post_id )); + if(!empty($post_meta_result) && is_array($post_meta_result) && count($post_meta_result) > 0){ + + // Fetch post data from yoast_indexable table + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $result = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}yoast_indexable WHERE object_id = %d", $post_id)); + if(!empty($result) && is_object($result)){ + if(isset($result->object_id)){ + // Loop through the values + foreach ($post_meta_result as $pmr_key => $pmr_value){ + if(!empty($pmr_value) && is_object($pmr_value)){ + if(isset($pmr_value->post_id)){ + $key_name = $pmr_value->meta_key; + $meta_value = $pmr_value->meta_value; + + // Check if data in post meta and yoast_indexable table are not same + if($key_name == '_yoast_wpseo_title' && $result->title !== $meta_value){ + $update_array_values['title'] = sanitize_text_field($meta_value); + }else if($key_name == '_yoast_wpseo_metadesc' && $result->description !== $meta_value){ + $update_array_values['description'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_opengraph-title' && $result->open_graph_title !== $meta_value){ + $update_array_values['open_graph_title'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_opengraph-description' && $result->open_graph_description !== $meta_value){ + $update_array_values['open_graph_description'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_twitter-title' && $result->twitter_title !== $meta_value){ + $update_array_values['twitter_title'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_twitter-description' && $result->twitter_description !== $meta_value){ + $update_array_values['twitter_description'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_focuskw' && $result->primary_focus_keyword !== $meta_value){ + // $update_array_values['primary_focus_keyword'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_schema_page_type' && $result->schema_page_type !== $meta_value){ + $update_array_values['schema_page_type'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_schema_article_type' && $result->schema_article_type !== $meta_value){ + $update_array_values['schema_article_type'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_opengraph-image' && $result->open_graph_image !== $meta_value){ + $update_array_values['open_graph_image'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_opengraph-image-id' && $result->open_graph_image_id !== $meta_value){ + $update_array_values['open_graph_image_id'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_twitter-image' && $result->twitter_image !== $meta_value){ + $update_array_values['twitter_image'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_twitter-image-id' && $result->twitter_image_id !== $meta_value){ + $update_array_values['twitter_image_id'] = sanitize_textarea_field($meta_value); + }else if($key_name == '_yoast_wpseo_canonical' && $result->canonical !== $meta_value){ + $update_array_values['canonical'] = sanitize_textarea_field($meta_value); + } + } + } + } + + if(!empty($update_array_values)){ + // Update the title and description field values of yoast_indexable table + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $post_id)); + } + } + } + } // post_meta_result if end + } + } // table_exists if end + } + + /** + * Update yoast meta description field value in yoast_indexable table for terms + * @since 2.4.3 + * */ + public function update_yoast_term_meta_tags($term_id, $tt_id, $taxonomy, $update, $args) + { + global $wpdb; + $update_array_values = array(); + + $yoast_table_name = $wpdb->prefix . 'yoast_indexable'; + + // Check if yoast_indexable table exists + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: As per requirement, We have to use the direct query. + $table_exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $yoast_table_name) ); + + if ($table_exists) { + $table_name = $wpdb->prefix . 'options'; + + // Get _yoast_wpseo_metadesc and _yoast_wpseo_title values from options table + $option_name = 'wpseo_taxonomy_meta'; + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $option_result = $wpdb->get_row($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name = %s", $option_name )); + + if(is_object($option_result) && isset($option_result->option_value)){ + if(!empty($option_result->option_value) && is_string($option_result->option_value)){ + $option_result_value = unserialize($option_result->option_value); + + if(!empty($option_result_value) && is_array($option_result_value)){ + if(isset($option_result_value[$taxonomy]) && is_array($option_result_value[$taxonomy])){ + $category_array = $option_result_value[$taxonomy]; + if(isset($category_array[$term_id]) && is_array($category_array[$term_id])){ + $term_option_details = $category_array[$term_id]; + + if(isset($term_option_details['wpseo_desc'])){ + $update_array_values['description'] = sanitize_textarea_field($term_option_details['wpseo_desc']); + } + if(isset($term_option_details['wpseo_title'])){ + $update_array_values['title'] = sanitize_text_field($term_option_details['wpseo_title']); + } + if(isset($term_option_details['wpseo_opengraph-title'])){ + $update_array_values['open_graph_title'] = sanitize_text_field($term_option_details['wpseo_opengraph-title']); + } + if(isset($term_option_details['wpseo_opengraph-description'])){ + $update_array_values['open_graph_description'] = sanitize_text_field($term_option_details['wpseo_opengraph-description']); + } + if(isset($term_option_details['wpseo_twitter-title'])){ + $update_array_values['twitter_title'] = sanitize_text_field($term_option_details['wpseo_twitter-title']); + } + if(isset($term_option_details['wpseo_twitter-description'])){ + $update_array_values['twitter_description'] = sanitize_text_field($term_option_details['wpseo_twitter-description']); + } + if(isset($term_option_details['wpseo_focuskw'])){ + $update_array_values['primary_focus_keyword'] = sanitize_text_field($term_option_details['wpseo_focuskw']); + } + if(isset($term_option_details['wpseo_opengraph-image'])){ + $update_array_values['open_graph_image'] = sanitize_text_field($term_option_details['wpseo_opengraph-image']); + } + if(isset($term_option_details['wpseo_opengraph-image-id'])){ + $update_array_values['open_graph_image_id'] = sanitize_text_field($term_option_details['wpseo_opengraph-image-id']); + } + if(isset($term_option_details['wpseo_twitter-image'])){ + $update_array_values['twitter_image'] = sanitize_text_field($term_option_details['wpseo_twitter-image']); + } + if(isset($term_option_details['wpseo_twitter-image-id'])){ + $update_array_values['twitter_image_id'] = sanitize_text_field($term_option_details['wpseo_twitter-image-id']); + } + + // Update the title and description field values of yoast_indexable table + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $term_id, 'object_type' => 'term')); + } + } + } + } + } // option_result if end + } // table_exists if end + } + + /** + * Update yoast opengraph url + * @since 2.4.4 + * @param $url String + * @return $url String + * */ + public function update_opengraph_url($url) + { + if(!is_admin()){ + $url = get_permalink(); + } + return $url; + } + + /** + * Adds opengraph support for translations + * + * @since 2.4.5 + * + * @param array $presenters An array of objects implementing Abstract_Indexable_Presenter + * @return array + */ + public function add_wpseo_frontend_presenters( $presenters ) { + $_presenters = array(); + + foreach ( $presenters as $presenter ) { + $_presenters[] = $presenter; + + if ( get_class($presenter) == 'Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter' ) { + + foreach ( $this->get_ogp_alternate_languages() as $lang ) { + $_presenters[] = new WPM_Yoast_Seo_Presenters( $lang ); + } + } + } + + return $_presenters; + } + + /** + * Get alternate language codes for Opengraph + * + * @since 2.4.5 + * + * @return array + */ + protected function get_ogp_alternate_languages() { + $alternates = array(); + + foreach ( wpm_get_languages() as $code => $language ) { + if ( $code !== wpm_get_language() && ! empty( $language['locale'] ) ) { + $alternates[] = $language['locale']; + } + } + + // There is a risk that 2 languages have the same Facebook locale. So let's make sure to output each locale only once. + return array_unique( $alternates ); + } + + /** + * Translate opengraph image + * + * @since 2.4.6 + * + * @param $image String + * + * @return $image String + */ + public function wpm_translate_opengraph_image($image) + { + $id = 0; + $type = ''; + if(is_singular()){ + $id = get_the_ID(); + $type = get_post_type(); + }else if(is_archive() || (function_exists('is_product_category') && is_product_category())) { + $cat_obj = get_queried_object(); + if( is_object( $cat_obj ) && isset( $cat_obj->term_id ) ) { + $id = $cat_obj->term_id; + $type = $cat_obj->taxonomy; + } + } + + if($id > 0){ + $result = $this->wpm_get_yoast_data( $id, 'open_graph_image', $type ); + + if(is_object($result) && isset($result->open_graph_image)){ + + if(!empty($result->open_graph_image) && is_string($result->open_graph_image)){ + $image = wpm_translate_value($result->open_graph_image); + } + } + } + return $image; + } + + /** + * Translate twitter image + * + * @since 2.4.6 + * + * @param $image String + * + * @return $image String + */ + public function wpm_translate_twitter_image($image) + { + $id = 0; + $type = ''; + if(is_singular()){ + $id = get_the_ID(); + $type = get_post_type(); + }else if(is_archive() || (function_exists('is_product_category') && is_product_category())) { + $cat_obj = get_queried_object(); + if( is_object( $cat_obj ) && isset( $cat_obj->term_id ) ) { + $id = $cat_obj->term_id; + $type = $cat_obj->taxonomy; + } + } + + if($id > 0){ + $result = $this->wpm_get_yoast_data( $id, 'twitter_image', $type ); + + if(is_object($result) && isset($result->twitter_image)){ + + if(!empty($result->twitter_image) && is_string($result->twitter_image)){ + $image = wpm_translate_value($result->twitter_image); + } + } + } + return $image; + } + + /** + * Get data from yoast_indexable table + * + * @since 2.4.6 + * + * @param $object_id Integer + * @param $field_name String + * + * @return $result Object + */ + public function wpm_get_yoast_data( $object_id, $field_name, $type = '' ) + { + global $wpdb; + + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching --Reason: As per requirement, We have to use the direct query. + $result = $wpdb->get_row($wpdb->prepare("SELECT {$field_name} FROM {$wpdb->prefix}yoast_indexable WHERE object_id = %d AND object_sub_type = %s", $object_id, $type )); + return $result; + } + + /** + * Translate yoast schema graph + * + * @since 2.4.6 + * + * @param $schema_data Array + * + * @return $schema_data Array + * */ + public function wpm_translate_schema_graph($schema_data, $context){ + if(!empty($schema_data) && is_array($schema_data)){ + $schema_data = wpm_translate_value($schema_data); + } + return $schema_data; + } + + public function translate_metadesc( $description ){ + + global $post; + + if( is_object( $post ) && ! empty( $post->ID ) ) { + + $desc = get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true ); + if ( ! empty( $desc ) ) { + $description = $desc; + } + } + return $description; + } + + /** + * Function to load the yoast seo script + * @param $hook string + * @since 2.4.31 + * */ + public function render_language_switcher( $hook ) { + + if ( $hook === 'seo_page_wpseo_page_settings' ) { + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_register_script( 'wpm-yoast-seo-script', wpm_asset_path( 'scripts/wpm-yoast-seo' . $suffix . '.js' ), array( 'jquery', 'wp-util', 'wpm_language_switcher' ), WPM_VERSION, true ); + wp_enqueue_script( 'wpm-yoast-seo-script' ); + + } + + } } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-async-request.php b/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-async-request.php index e628b3253..e551c8bec 100644 --- a/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-async-request.php +++ b/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-async-request.php @@ -1,160 +1,160 @@ -identifier = $this->prefix . '_' . $this->action; - - add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) ); - add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) ); - } - - /** - * Set data used during the request - * - * @param array $data Data. - * - * @return $this - */ - public function data( $data ) { - $this->data = $data; - - return $this; - } - - /** - * Dispatch the async request - * - * @return array|WP_Error - */ - public function dispatch() { - $url = add_query_arg( $this->get_query_args(), $this->get_query_url() ); - $args = $this->get_post_args(); - - return wp_remote_post( esc_url_raw( $url ), $args ); - } - - /** - * Get query args - * - * @return array - */ - protected function get_query_args() { - if ( property_exists( $this, 'query_args' ) ) { - return $this->query_args; - } - - return array( - 'action' => $this->identifier, - 'nonce' => wp_create_nonce( $this->identifier ), - ); - } - - /** - * Get query URL - * - * @return string - */ - protected function get_query_url() { - if ( property_exists( $this, 'query_url' ) ) { - return $this->query_url; - } - - return admin_url( 'admin-ajax.php' ); - } - - /** - * Get post args - * - * @return array - */ - protected function get_post_args() { - if ( property_exists( $this, 'post_args' ) ) { - return $this->post_args; - } - - return array( - 'timeout' => 0.01, - 'blocking' => false, - 'body' => $this->data, - 'cookies' => $_COOKIE, - 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), - ); - } - - /** - * Maybe handle - * - * Check for correct nonce and pass to handler. - */ - public function maybe_handle() { - // Don't lock up other requests while processing - session_write_close(); - - check_ajax_referer( $this->identifier, 'nonce' ); - - $this->handle(); - - wp_die(); - } - - /** - * Handle - * - * Override this method to perform any actions required - * during the async request. - */ - abstract protected function handle(); -} +identifier = $this->prefix . '_' . $this->action; + + add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) ); + add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) ); + } + + /** + * Set data used during the request + * + * @param array $data Data. + * + * @return $this + */ + public function data( $data ) { + $this->data = $data; + + return $this; + } + + /** + * Dispatch the async request + * + * @return array|WP_Error + */ + public function dispatch() { + $url = add_query_arg( $this->get_query_args(), $this->get_query_url() ); + $args = $this->get_post_args(); + + return wp_remote_post( esc_url_raw( $url ), $args ); + } + + /** + * Get query args + * + * @return array + */ + protected function get_query_args() { + if ( property_exists( $this, 'query_args' ) ) { + return $this->query_args; + } + + return array( + 'action' => $this->identifier, + 'nonce' => wp_create_nonce( $this->identifier ), + ); + } + + /** + * Get query URL + * + * @return string + */ + protected function get_query_url() { + if ( property_exists( $this, 'query_url' ) ) { + return $this->query_url; + } + + return admin_url( 'admin-ajax.php' ); + } + + /** + * Get post args + * + * @return array + */ + protected function get_post_args() { + if ( property_exists( $this, 'post_args' ) ) { + return $this->post_args; + } + + return array( + 'timeout' => 0.01, + 'blocking' => false, + 'body' => $this->data, + 'cookies' => $_COOKIE, + 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), + ); + } + + /** + * Maybe handle + * + * Check for correct nonce and pass to handler. + */ + public function maybe_handle() { + // Don't lock up other requests while processing + session_write_close(); + + check_ajax_referer( $this->identifier, 'nonce' ); + + $this->handle(); + + wp_die(); + } + + /** + * Handle + * + * Override this method to perform any actions required + * during the async request. + */ + abstract protected function handle(); +} diff --git a/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-background-process.php b/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-background-process.php index 189813402..b85d22fe1 100644 --- a/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-background-process.php +++ b/plugins/wp-react-custom-multilang/includes/libraries/abstract-wp-background-process.php @@ -1,505 +1,505 @@ -cron_hook_identifier = $this->identifier . '_cron'; - $this->cron_interval_identifier = $this->identifier . '_cron_interval'; - - add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) ); - add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) ); - } - - /** - * Dispatch - * - * @access public - * @return void - */ - public function dispatch() { - // Schedule the cron healthcheck. - $this->schedule_event(); - - // Perform remote post. - return parent::dispatch(); - } - - /** - * Push to queue - * - * @param mixed $data Data. - * - * @return $this - */ - public function push_to_queue( $data ) { - $this->data[] = $data; - - return $this; - } - - /** - * Save queue - * - * @return $this - */ - public function save() { - $key = $this->generate_key(); - - if ( ! empty( $this->data ) ) { - update_site_option( $key, $this->data ); - } - - return $this; - } - - /** - * Update queue - * - * @param string $key Key. - * @param array $data Data. - * - * @return $this - */ - public function update( $key, $data ) { - if ( ! empty( $data ) ) { - update_site_option( $key, $data ); - } - - return $this; - } - - /** - * Delete queue - * - * @param string $key Key. - * - * @return $this - */ - public function delete( $key ) { - delete_site_option( $key ); - - return $this; - } - - /** - * Generate key - * - * Generates a unique key based on microtime. Queue items are - * given a unique key so that they can be merged upon save. - * - * @param int $length Length. - * - * @return string - */ - protected function generate_key( $length = 64 ) { - $unique = md5( microtime() . wp_rand() ); - $prepend = $this->identifier . '_batch_'; - - return substr( $prepend . $unique, 0, $length ); - } - - /** - * Maybe process queue - * - * Checks whether data exists within the queue and that - * the process is not already running. - */ - public function maybe_handle() { - // Don't lock up other requests while processing - session_write_close(); - - if ( $this->is_process_running() ) { - // Background process already running. - wp_die(); - } - - if ( $this->is_queue_empty() ) { - // No data to process. - wp_die(); - } - - check_ajax_referer( $this->identifier, 'nonce' ); - - $this->handle(); - - wp_die(); - } - - /** - * Is queue empty - * - * @return bool - */ - protected function is_queue_empty() { - global $wpdb; - - $table = $wpdb->options; - $column = 'option_name'; - - if ( is_multisite() ) { - $table = $wpdb->sitemeta; - $column = 'meta_key'; - } - - $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; - - $cache_key = 'wpm_options_'.$column.'_key'; - $count = wp_cache_get($cache_key); - if(false === $count){ - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Cannot query by column name which is dynamic - $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->options} WHERE {$column} LIKE %s", $key ) ); - wp_cache_set( $cache_key, $count ); - } - - return ( $count > 0 ) ? false : true; - } - - /** - * Is process running - * - * Check whether the current process is already running - * in a background process. - */ - protected function is_process_running() { - if ( get_site_transient( $this->identifier . '_process_lock' ) ) { - // Process already running. - return true; - } - - return false; - } - - /** - * Lock process - * - * Lock the process so that multiple instances can't run simultaneously. - * Override if applicable, but the duration should be greater than that - * defined in the time_exceeded() method. - */ - protected function lock_process() { - $this->start_time = time(); // Set start time of current process. - - $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute - $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration ); - - set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration ); - } - - /** - * Unlock process - * - * Unlock the process so that other instances can spawn. - * - * @return $this - */ - protected function unlock_process() { - delete_site_transient( $this->identifier . '_process_lock' ); - - return $this; - } - - /** - * Get batch - * - * @return \stdClass Return the first batch from the queue - */ - protected function get_batch() { - global $wpdb; - - $table = $wpdb->options; - $column = 'option_name'; - $key_column = 'option_id'; - $value_column = 'option_value'; - - if ( is_multisite() ) { - $table = $wpdb->sitemeta; - $column = 'meta_key'; - $key_column = 'meta_id'; - $value_column = 'meta_value'; - } - - $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; - - $cache_key = 'wpm_options_batch_'.$column.'_key'; - $query = wp_cache_get($cache_key); - if(false === $count){ - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Cannot query by column name which is dynamic - $query = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE {$column} LIKE %s ORDER BY {$key_column} ASC LIMIT 1", $key ) ); - wp_cache_set( $cache_key, $query ); - } - - $batch = new \stdClass(); - $batch->key = $query->$column; - $batch->data = maybe_unserialize( $query->$value_column ); - - return $batch; - } - - /** - * Handle - * - * Pass each queue item to the task handler, while remaining - * within server memory and time limit constraints. - */ - protected function handle() { - $this->lock_process(); - - do { - $batch = $this->get_batch(); - - foreach ( $batch->data as $key => $value ) { - $task = $this->task( $value ); - - if ( false !== $task ) { - $batch->data[ $key ] = $task; - } else { - unset( $batch->data[ $key ] ); - } - - if ( $this->time_exceeded() || $this->memory_exceeded() ) { - // Batch limits reached. - break; - } - } - - // Update or delete current batch. - if ( ! empty( $batch->data ) ) { - $this->update( $batch->key, $batch->data ); - } else { - $this->delete( $batch->key ); - } - } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() ); - - $this->unlock_process(); - - // Start next batch or complete process. - if ( ! $this->is_queue_empty() ) { - $this->dispatch(); - } else { - $this->complete(); - } - } - - /** - * Memory exceeded - * - * Ensures the batch process never exceeds 90% - * of the maximum WordPress memory. - * - * @return bool - */ - protected function memory_exceeded() { - $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory - $current_memory = memory_get_usage( true ); - $return = false; - - if ( $current_memory >= $memory_limit ) { - $return = true; - } - - return apply_filters( $this->identifier . '_memory_exceeded', $return ); - } - - /** - * Get memory limit - * - * @return int - */ - protected function get_memory_limit() { - if ( function_exists( 'ini_get' ) ) { - $memory_limit = ini_get( 'memory_limit' ); - } else { - // Sensible default. - $memory_limit = '128M'; - } - - if ( ! $memory_limit || -1 === intval( $memory_limit ) ) { - // Unlimited, set to 32GB. - $memory_limit = '32000M'; - } - - return intval( $memory_limit ) * 1024 * 1024; - } - - /** - * Time exceeded. - * - * Ensures the batch never exceeds a sensible time limit. - * A timeout limit of 30s is common on shared hosting. - * - * @return bool - */ - protected function time_exceeded() { - $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds - $return = false; - - if ( time() >= $finish ) { - $return = true; - } - - return apply_filters( $this->identifier . '_time_exceeded', $return ); - } - - /** - * Complete. - * - * Override if applicable, but ensure that the below actions are - * performed, or, call parent::complete(). - */ - protected function complete() { - // Unschedule the cron healthcheck. - $this->clear_scheduled_event(); - } - - /** - * Schedule cron healthcheck - * - * @access public - * @param mixed $schedules Schedules. - * @return mixed - */ - public function schedule_cron_healthcheck( $schedules ) { - $interval = apply_filters( $this->identifier . '_cron_interval', 5 ); - - if ( property_exists( $this, 'cron_interval' ) ) { - $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval_identifier ); - } - - // Adds every 5 minutes to the existing schedules. - $schedules[ $this->identifier . '_cron_interval' ] = array( - 'interval' => MINUTE_IN_SECONDS * $interval, - /* translators: %d: This will get the number of minutes. */ - 'display' => sprintf( __( 'Every %d minutes', 'wp-multilang' ), $interval ), - ); - - return $schedules; - } - - /** - * Handle cron healthcheck - * - * Restart the background process if not already running - * and data exists in the queue. - */ - public function handle_cron_healthcheck() { - if ( $this->is_process_running() ) { - // Background process already running. - exit; - } - - if ( $this->is_queue_empty() ) { - // No data to process. - $this->clear_scheduled_event(); - exit; - } - - $this->handle(); - - exit; - } - - /** - * Schedule event - */ - protected function schedule_event() { - if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) { - wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier ); - } - } - - /** - * Clear scheduled event - */ - protected function clear_scheduled_event() { - $timestamp = wp_next_scheduled( $this->cron_hook_identifier ); - - if ( $timestamp ) { - wp_unschedule_event( $timestamp, $this->cron_hook_identifier ); - } - } - - /** - * Cancel Process - * - * Stop processing queue items, clear cronjob and delete batch. - * - */ - public function cancel_process() { - if ( ! $this->is_queue_empty() ) { - $batch = $this->get_batch(); - - $this->delete( $batch->key ); - - wp_clear_scheduled_hook( $this->cron_hook_identifier ); - } - - } - - /** - * Task - * - * Override this method to perform any actions required on each - * queue item. Return the modified item for further processing - * in the next pass through. Or, return false to remove the - * item from the queue. - * - * @param mixed $item Queue item to iterate over. - * - * @return mixed - */ - abstract protected function task( $item ); - -} +cron_hook_identifier = $this->identifier . '_cron'; + $this->cron_interval_identifier = $this->identifier . '_cron_interval'; + + add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) ); + add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) ); + } + + /** + * Dispatch + * + * @access public + * @return void + */ + public function dispatch() { + // Schedule the cron healthcheck. + $this->schedule_event(); + + // Perform remote post. + return parent::dispatch(); + } + + /** + * Push to queue + * + * @param mixed $data Data. + * + * @return $this + */ + public function push_to_queue( $data ) { + $this->data[] = $data; + + return $this; + } + + /** + * Save queue + * + * @return $this + */ + public function save() { + $key = $this->generate_key(); + + if ( ! empty( $this->data ) ) { + update_site_option( $key, $this->data ); + } + + return $this; + } + + /** + * Update queue + * + * @param string $key Key. + * @param array $data Data. + * + * @return $this + */ + public function update( $key, $data ) { + if ( ! empty( $data ) ) { + update_site_option( $key, $data ); + } + + return $this; + } + + /** + * Delete queue + * + * @param string $key Key. + * + * @return $this + */ + public function delete( $key ) { + delete_site_option( $key ); + + return $this; + } + + /** + * Generate key + * + * Generates a unique key based on microtime. Queue items are + * given a unique key so that they can be merged upon save. + * + * @param int $length Length. + * + * @return string + */ + protected function generate_key( $length = 64 ) { + $unique = md5( microtime() . wp_rand() ); + $prepend = $this->identifier . '_batch_'; + + return substr( $prepend . $unique, 0, $length ); + } + + /** + * Maybe process queue + * + * Checks whether data exists within the queue and that + * the process is not already running. + */ + public function maybe_handle() { + // Don't lock up other requests while processing + session_write_close(); + + if ( $this->is_process_running() ) { + // Background process already running. + wp_die(); + } + + if ( $this->is_queue_empty() ) { + // No data to process. + wp_die(); + } + + check_ajax_referer( $this->identifier, 'nonce' ); + + $this->handle(); + + wp_die(); + } + + /** + * Is queue empty + * + * @return bool + */ + protected function is_queue_empty() { + global $wpdb; + + $table = $wpdb->options; + $column = 'option_name'; + + if ( is_multisite() ) { + $table = $wpdb->sitemeta; + $column = 'meta_key'; + } + + $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; + + $cache_key = 'wpm_options_'.$column.'_key'; + $count = wp_cache_get($cache_key); + if(false === $count){ + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Cannot query by column name which is dynamic + $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->options} WHERE {$column} LIKE %s", $key ) ); + wp_cache_set( $cache_key, $count ); + } + + return ( $count > 0 ) ? false : true; + } + + /** + * Is process running + * + * Check whether the current process is already running + * in a background process. + */ + protected function is_process_running() { + if ( get_site_transient( $this->identifier . '_process_lock' ) ) { + // Process already running. + return true; + } + + return false; + } + + /** + * Lock process + * + * Lock the process so that multiple instances can't run simultaneously. + * Override if applicable, but the duration should be greater than that + * defined in the time_exceeded() method. + */ + protected function lock_process() { + $this->start_time = time(); // Set start time of current process. + + $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute + $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration ); + + set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration ); + } + + /** + * Unlock process + * + * Unlock the process so that other instances can spawn. + * + * @return $this + */ + protected function unlock_process() { + delete_site_transient( $this->identifier . '_process_lock' ); + + return $this; + } + + /** + * Get batch + * + * @return \stdClass Return the first batch from the queue + */ + protected function get_batch() { + global $wpdb; + + $table = $wpdb->options; + $column = 'option_name'; + $key_column = 'option_id'; + $value_column = 'option_value'; + + if ( is_multisite() ) { + $table = $wpdb->sitemeta; + $column = 'meta_key'; + $key_column = 'meta_id'; + $value_column = 'meta_value'; + } + + $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; + + $cache_key = 'wpm_options_batch_'.$column.'_key'; + $query = wp_cache_get($cache_key); + if(false === $count){ + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason Cannot query by column name which is dynamic + $query = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$table} WHERE {$column} LIKE %s ORDER BY {$key_column} ASC LIMIT 1", $key ) ); + wp_cache_set( $cache_key, $query ); + } + + $batch = new \stdClass(); + $batch->key = $query->$column; + $batch->data = maybe_unserialize( $query->$value_column ); + + return $batch; + } + + /** + * Handle + * + * Pass each queue item to the task handler, while remaining + * within server memory and time limit constraints. + */ + protected function handle() { + $this->lock_process(); + + do { + $batch = $this->get_batch(); + + foreach ( $batch->data as $key => $value ) { + $task = $this->task( $value ); + + if ( false !== $task ) { + $batch->data[ $key ] = $task; + } else { + unset( $batch->data[ $key ] ); + } + + if ( $this->time_exceeded() || $this->memory_exceeded() ) { + // Batch limits reached. + break; + } + } + + // Update or delete current batch. + if ( ! empty( $batch->data ) ) { + $this->update( $batch->key, $batch->data ); + } else { + $this->delete( $batch->key ); + } + } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() ); + + $this->unlock_process(); + + // Start next batch or complete process. + if ( ! $this->is_queue_empty() ) { + $this->dispatch(); + } else { + $this->complete(); + } + } + + /** + * Memory exceeded + * + * Ensures the batch process never exceeds 90% + * of the maximum WordPress memory. + * + * @return bool + */ + protected function memory_exceeded() { + $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory + $current_memory = memory_get_usage( true ); + $return = false; + + if ( $current_memory >= $memory_limit ) { + $return = true; + } + + return apply_filters( $this->identifier . '_memory_exceeded', $return ); + } + + /** + * Get memory limit + * + * @return int + */ + protected function get_memory_limit() { + if ( function_exists( 'ini_get' ) ) { + $memory_limit = ini_get( 'memory_limit' ); + } else { + // Sensible default. + $memory_limit = '128M'; + } + + if ( ! $memory_limit || -1 === intval( $memory_limit ) ) { + // Unlimited, set to 32GB. + $memory_limit = '32000M'; + } + + return intval( $memory_limit ) * 1024 * 1024; + } + + /** + * Time exceeded. + * + * Ensures the batch never exceeds a sensible time limit. + * A timeout limit of 30s is common on shared hosting. + * + * @return bool + */ + protected function time_exceeded() { + $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds + $return = false; + + if ( time() >= $finish ) { + $return = true; + } + + return apply_filters( $this->identifier . '_time_exceeded', $return ); + } + + /** + * Complete. + * + * Override if applicable, but ensure that the below actions are + * performed, or, call parent::complete(). + */ + protected function complete() { + // Unschedule the cron healthcheck. + $this->clear_scheduled_event(); + } + + /** + * Schedule cron healthcheck + * + * @access public + * @param mixed $schedules Schedules. + * @return mixed + */ + public function schedule_cron_healthcheck( $schedules ) { + $interval = apply_filters( $this->identifier . '_cron_interval', 5 ); + + if ( property_exists( $this, 'cron_interval' ) ) { + $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval_identifier ); + } + + // Adds every 5 minutes to the existing schedules. + $schedules[ $this->identifier . '_cron_interval' ] = array( + 'interval' => MINUTE_IN_SECONDS * $interval, + /* translators: %d: This will get the number of minutes. */ + 'display' => sprintf( __( 'Every %d minutes', 'wp-multilang' ), $interval ), + ); + + return $schedules; + } + + /** + * Handle cron healthcheck + * + * Restart the background process if not already running + * and data exists in the queue. + */ + public function handle_cron_healthcheck() { + if ( $this->is_process_running() ) { + // Background process already running. + exit; + } + + if ( $this->is_queue_empty() ) { + // No data to process. + $this->clear_scheduled_event(); + exit; + } + + $this->handle(); + + exit; + } + + /** + * Schedule event + */ + protected function schedule_event() { + if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) { + wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier ); + } + } + + /** + * Clear scheduled event + */ + protected function clear_scheduled_event() { + $timestamp = wp_next_scheduled( $this->cron_hook_identifier ); + + if ( $timestamp ) { + wp_unschedule_event( $timestamp, $this->cron_hook_identifier ); + } + } + + /** + * Cancel Process + * + * Stop processing queue items, clear cronjob and delete batch. + * + */ + public function cancel_process() { + if ( ! $this->is_queue_empty() ) { + $batch = $this->get_batch(); + + $this->delete( $batch->key ); + + wp_clear_scheduled_hook( $this->cron_hook_identifier ); + } + + } + + /** + * Task + * + * Override this method to perform any actions required on each + * queue item. Return the modified item for further processing + * in the next pass through. Or, return false to remove the + * item from the queue. + * + * @param mixed $item Queue item to iterate over. + * + * @return mixed + */ + abstract protected function task( $item ); + +} diff --git a/plugins/wp-react-custom-multilang/includes/libraries/class-wpm-walker-nav-menu-edit.php b/plugins/wp-react-custom-multilang/includes/libraries/class-wpm-walker-nav-menu-edit.php index 7e29238c3..67d4e5781 100644 --- a/plugins/wp-react-custom-multilang/includes/libraries/class-wpm-walker-nav-menu-edit.php +++ b/plugins/wp-react-custom-multilang/includes/libraries/class-wpm-walker-nav-menu-edit.php @@ -1,85 +1,85 @@ - - */ -class WPM_Walker_Nav_Menu_Edit extends \Walker_Nav_Menu_Edit { - - /** - * Start the element output. - * - * We're injecting our custom fields after the div.submitbox - * - * @see Walker_Nav_Menu::start_el() - * @since 0.1.0 - * @since 0.2.0 Update regex pattern to support WordPress 4.7's markup. - * - * @param string $output Passed by reference. Used to append additional content. - * @param object $item Menu item data object. - * @param int $depth Depth of menu item. Used for padding. - * @param array $args Menu item args. - * @param int $id Nav menu ID. - */ - function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { - $item_output = ''; - - parent::start_el( $item_output, $item, $depth, $args, $id ); - - $output .= preg_replace( - // NOTE: Check this regex from time to time! - '/(?=<(fieldset|p)[^>]+class="[^"]*field-move)/', - $this->get_fields( $item, $depth, $args ), - $item_output - ); - } - - - /** - * Get custom fields - * - * @access protected - * @since 0.1.0 - * @uses add_action() Calls 'menu_item_custom_fields' hook - * - * @param object $item Menu item data object. - * @param int $depth Depth of menu item. Used for padding. - * @param array $args Menu item args. - * @param int $id Nav menu ID. - * - * @return string Form fields - */ - protected function get_fields( $item, $depth, $args = array(), $id = 0 ) { - ob_start(); - - /** - * Get menu item custom fields from plugins/themes - * - * @since 0.1.0 - * @since 1.0.0 Pass correct parameters. - * - * @param int $item_id Menu item ID. - * @param object $item Menu item data object. - * @param int $depth Depth of menu item. Used for padding. - * @param array $args Menu item args. - * @param int $id Nav menu ID. - * - * @return string Custom fields HTML. - */ - do_action( 'wp_nav_menu_item_custom_fields', $item->ID, $item, $depth, $args, $id ); - - return ob_get_clean(); - } -} + + */ +class WPM_Walker_Nav_Menu_Edit extends \Walker_Nav_Menu_Edit { + + /** + * Start the element output. + * + * We're injecting our custom fields after the div.submitbox + * + * @see Walker_Nav_Menu::start_el() + * @since 0.1.0 + * @since 0.2.0 Update regex pattern to support WordPress 4.7's markup. + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $item Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param array $args Menu item args. + * @param int $id Nav menu ID. + */ + function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { + $item_output = ''; + + parent::start_el( $item_output, $item, $depth, $args, $id ); + + $output .= preg_replace( + // NOTE: Check this regex from time to time! + '/(?=<(fieldset|p)[^>]+class="[^"]*field-move)/', + $this->get_fields( $item, $depth, $args ), + $item_output + ); + } + + + /** + * Get custom fields + * + * @access protected + * @since 0.1.0 + * @uses add_action() Calls 'menu_item_custom_fields' hook + * + * @param object $item Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param array $args Menu item args. + * @param int $id Nav menu ID. + * + * @return string Form fields + */ + protected function get_fields( $item, $depth, $args = array(), $id = 0 ) { + ob_start(); + + /** + * Get menu item custom fields from plugins/themes + * + * @since 0.1.0 + * @since 1.0.0 Pass correct parameters. + * + * @param int $item_id Menu item ID. + * @param object $item Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param array $args Menu item args. + * @param int $id Nav menu ID. + * + * @return string Custom fields HTML. + */ + do_action( 'wp_nav_menu_item_custom_fields', $item->ID, $item, $depth, $args, $id ); + + return ob_get_clean(); + } +} diff --git a/plugins/wp-react-custom-multilang/includes/widgets/class-wpm-widget-language-switcher.php b/plugins/wp-react-custom-multilang/includes/widgets/class-wpm-widget-language-switcher.php index 1db3e2939..6d34a4eca 100644 --- a/plugins/wp-react-custom-multilang/includes/widgets/class-wpm-widget-language-switcher.php +++ b/plugins/wp-react-custom-multilang/includes/widgets/class-wpm-widget-language-switcher.php @@ -1,80 +1,80 @@ -widget_cssclass = 'wpm widget_language_switcher'; - $this->widget_description = esc_html__( 'Display language switcher.', 'wp-multilang' ); - $this->widget_id = 'wpm_language_switcher'; - $this->widget_name = esc_html__( 'Language Switcher', 'wp-multilang' ); - $this->settings = array( - 'title' => array( - 'type' => 'text', - 'std' => esc_html__( 'Languages', 'wp-multilang' ), - 'label' => esc_html__( 'Title', 'wp-multilang' ), - ), - 'show' => array( - 'type' => 'select', - 'std' => 'both', - 'options' => array( - 'both' => esc_html__( 'Both', 'wp-multilang' ), - 'flag' => esc_html__( 'Flag', 'wp-multilang' ), - 'name' => esc_html__( 'Name', 'wp-multilang' ), - ), - 'label' => esc_html__( 'Show', 'wp-multilang' ), - ), - 'type' => array( - 'type' => 'select', - 'std' => 'list', - 'options' => array( - 'list' => esc_html__( 'List', 'wp-multilang' ), - 'dropdown' => esc_html__( 'Dropdown', 'wp-multilang' ), - 'select' => esc_html__( 'Select', 'wp-multilang' ), - ), - 'label' => esc_html__( 'Switcher Type', 'wp-multilang' ), - ), - ); - parent::__construct(); - } - - /** - * Display language switcher - * - * @param array $args - * @param array $instance - */ - public function widget( $args, $instance ) { - - ob_start(); - - $this->widget_start( $args, $instance ); - - wpm_language_switcher( $instance['type'], $instance['show'] ); - - $this->widget_end( $args ); - - $content_escaped = ob_get_clean(); - - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- all html inside this variable already escaped above in wpm_language_switcher() function - echo $content_escaped; - - } -} +widget_cssclass = 'wpm widget_language_switcher'; + $this->widget_description = esc_html__( 'Display language switcher.', 'wp-multilang' ); + $this->widget_id = 'wpm_language_switcher'; + $this->widget_name = esc_html__( 'Language Switcher', 'wp-multilang' ); + $this->settings = array( + 'title' => array( + 'type' => 'text', + 'std' => esc_html__( 'Languages', 'wp-multilang' ), + 'label' => esc_html__( 'Title', 'wp-multilang' ), + ), + 'show' => array( + 'type' => 'select', + 'std' => 'both', + 'options' => array( + 'both' => esc_html__( 'Both', 'wp-multilang' ), + 'flag' => esc_html__( 'Flag', 'wp-multilang' ), + 'name' => esc_html__( 'Name', 'wp-multilang' ), + ), + 'label' => esc_html__( 'Show', 'wp-multilang' ), + ), + 'type' => array( + 'type' => 'select', + 'std' => 'list', + 'options' => array( + 'list' => esc_html__( 'List', 'wp-multilang' ), + 'dropdown' => esc_html__( 'Dropdown', 'wp-multilang' ), + 'select' => esc_html__( 'Select', 'wp-multilang' ), + ), + 'label' => esc_html__( 'Switcher Type', 'wp-multilang' ), + ), + ); + parent::__construct(); + } + + /** + * Display language switcher + * + * @param array $args + * @param array $instance + */ + public function widget( $args, $instance ) { + + ob_start(); + + $this->widget_start( $args, $instance ); + + wpm_language_switcher( $instance['type'], $instance['show'] ); + + $this->widget_end( $args ); + + $content_escaped = ob_get_clean(); + + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- all html inside this variable already escaped above in wpm_language_switcher() function + echo $content_escaped; + + } +} diff --git a/plugins/wp-react-custom-multilang/includes/wpm-config-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-config-functions.php index a9866f357..eba75438e 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-config-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-config-functions.php @@ -1,92 +1,92 @@ -setup->get_config(); -} - -/** - * Get post type config - * - * @param $post_type - * - * @return array - */ -function wpm_get_post_config( $post_type ) { - $config = wpm_get_config(); - $posts_config = apply_filters( 'wpm_posts_config', $config['post_types'] ); - $post_config = apply_filters( "wpm_post_{$post_type}_config", isset( $posts_config[ $post_type ] ) ? $posts_config[ $post_type ] : null ); - - if ( null !== $post_config ) { - $default_fields = array( - 'post_title' => array(), - 'post_excerpt' => array(), - 'post_content' => array(), - ); - - $post_config = wpm_array_merge_recursive( $default_fields, $post_config ); - } - - return $post_config; -} - -/** - * Get taxonomy config - * - * @param $taxonomy - * - * @return array - */ -function wpm_get_taxonomy_config( $taxonomy ) { - $config = wpm_get_config(); - $taxonomies_config = apply_filters( 'wpm_taxonomies_config', (array) $config['taxonomies'] ); - $taxonomy_config = apply_filters( "wpm_taxonomy_{$taxonomy}_config", isset( $taxonomies_config[ $taxonomy ] ) ? $taxonomies_config[ $taxonomy ] : null ); - - if ( null !== $taxonomy_config ) { - $default_fields = array( - 'name' => array(), - 'description' => array(), - ); - - $taxonomy_config = wpm_array_merge_recursive( $default_fields, $taxonomy_config ); - } - - return $taxonomy_config; -} - -/** - * Get widget config - * - * @param $widget - * - * @return array - */ -function wpm_get_widget_config( $widget ) { - $config = wpm_get_config(); - $widgets_config = apply_filters( 'wpm_widgets_config', $config['widgets'] ); - $widget_config = apply_filters( "wpm_widget_{$widget}_config", array_key_exists( $widget, $widgets_config ) ? $widgets_config[ $widget ] : array() ); - - if ( null !== $widget_config ) { - - $default_fields = array( - 'title' => array(), - 'text' => array(), - 'content' => array(), - ); - - $widget_config = wpm_array_merge_recursive( $default_fields, $widget_config ); - } - - return $widget_config; +setup->get_config(); +} + +/** + * Get post type config + * + * @param $post_type + * + * @return array + */ +function wpm_get_post_config( $post_type ) { + $config = wpm_get_config(); + $posts_config = apply_filters( 'wpm_posts_config', $config['post_types'] ); + $post_config = apply_filters( "wpm_post_{$post_type}_config", isset( $posts_config[ $post_type ] ) ? $posts_config[ $post_type ] : null ); + + if ( null !== $post_config ) { + $default_fields = array( + 'post_title' => array(), + 'post_excerpt' => array(), + 'post_content' => array(), + ); + + $post_config = wpm_array_merge_recursive( $default_fields, $post_config ); + } + + return $post_config; +} + +/** + * Get taxonomy config + * + * @param $taxonomy + * + * @return array + */ +function wpm_get_taxonomy_config( $taxonomy ) { + $config = wpm_get_config(); + $taxonomies_config = apply_filters( 'wpm_taxonomies_config', (array) $config['taxonomies'] ); + $taxonomy_config = apply_filters( "wpm_taxonomy_{$taxonomy}_config", isset( $taxonomies_config[ $taxonomy ] ) ? $taxonomies_config[ $taxonomy ] : null ); + + if ( null !== $taxonomy_config ) { + $default_fields = array( + 'name' => array(), + 'description' => array(), + ); + + $taxonomy_config = wpm_array_merge_recursive( $default_fields, $taxonomy_config ); + } + + return $taxonomy_config; +} + +/** + * Get widget config + * + * @param $widget + * + * @return array + */ +function wpm_get_widget_config( $widget ) { + $config = wpm_get_config(); + $widgets_config = apply_filters( 'wpm_widgets_config', $config['widgets'] ); + $widget_config = apply_filters( "wpm_widget_{$widget}_config", array_key_exists( $widget, $widgets_config ) ? $widgets_config[ $widget ] : array() ); + + if ( null !== $widget_config ) { + + $default_fields = array( + 'title' => array(), + 'text' => array(), + 'content' => array(), + ); + + $widget_config = wpm_array_merge_recursive( $default_fields, $widget_config ); + } + + return $widget_config; } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/wpm-core-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-core-functions.php index ce492fa28..0064aa2d2 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-core-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-core-functions.php @@ -1,537 +1,567 @@ -template_path(); - - // Look in yourtheme/slug-name.php and yourtheme/wp-multilang/slug-name.php - if ( $name ) { - $template = locate_template( array( "{$slug}-{$name}.php", "wp-multilang/{$slug}-{$name}.php" ) ); - } - - // If a custom path was defined, check that next - if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}-{$name}.php" ) ) { - $template = trailingslashit( $custom_dir ) . "{$slug}-{$name}.php"; - } - - // Get default slug-name.php - if ( ! $template && $name && file_exists( $template_path . "{$slug}-{$name}.php" ) ) { - $template = $template_path . "{$slug}-{$name}.php"; - } - - // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/wp-multilang/slug.php - if ( ! $template ) { - $template = locate_template( array( "{$slug}.php", "wp-multilang/{$slug}.php" ) ); - } - - // If a custom path was defined, check that next - if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}.php" ) ) { - $template = trailingslashit( $custom_dir ) . "{$slug}.php"; - } - - // Get default slug-name.php - if ( ! $template && file_exists( $template_path . "{$slug}.php" ) ) { - $template = $template_path . "{$slug}.php"; - } - - // Allow 3rd party plugin filter template file from their plugin - $template = apply_filters( 'wpm_get_template_part', $template, $slug, $name ); - - // Load template if we've found one - if ( $template ) { - - // Extract args if there are any - if ( is_array( $args ) && count( $args ) > 0 ) { - extract( $args ); - } - - do_action( 'wpm_before_template_part', $template, $slug, $name, $custom_dir, $args ); - - ob_start(); - - include( $template ); - - do_action( 'wpm_after_template_part', $template, $slug, $name, $custom_dir, $args ); - - return ob_get_clean(); - } -} - -/** - * Load assets - * - * @param $filename - * - * @return string - */ -function wpm_asset_path( $filename ) { - $dist_path = str_replace( array( 'http:', 'https:' ), '', wpm()->plugin_url() ) . '/assets/'; - $directory = dirname( $filename ) . '/'; - $file = basename( $filename ); - - return $dist_path . $directory . $file; -} - -/** - * Queue some JavaScript code to be output in the footer. - * - * @param string $code - */ -function wpm_enqueue_js( $code ) { - global $wpm_queued_js; - - if ( empty( $wpm_queued_js ) ) { - $wpm_queued_js = ''; - } - - $wpm_queued_js .= "\n" . $code . "\n"; -} - -/** - * Output any queued javascript code in the footer. - */ -function wpm_print_js() { - global $wpm_queued_js; - - if ( ! empty( $wpm_queued_js ) ) { - // Sanitize. - $wpm_queued_js = wp_check_invalid_utf8( $wpm_queued_js ); - $wpm_queued_js = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", $wpm_queued_js ); - $wpm_queued_js = str_replace( "\r", '', $wpm_queued_js ); - - $js_escaped = "\n\n"; - - /** - * game_portal_queued_js filter. - * - * @param string $js JavaScript code. - */ - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - echo $js_escaped; - - unset( $wpm_queued_js ); - } -} - -/** - * Set a cookie - wrapper for setcookie using WP constants. - * - * @param string $name Name of the cookie being set. - * @param string $value Value of the cookie. - * @param integer $expire Expiry of the cookie. - * @param bool $secure Whether the cookie should be served only over https. - */ -function wpm_setcookie( $name, $value, $expire = 0, $secure = false ) { - if ( ! headers_sent() ) { - setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', '', $secure ); - if ( COOKIEPATH != SITECOOKIEPATH ) { - setcookie( $name, $value, $expire, SITECOOKIEPATH, '', $secure ); - } - } elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - headers_sent( $file, $line ); - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.PHP.DevelopmentFunctions.error_log_trigger_error - trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); - } -} - - -/** - * Get current url from $_SERVER - * - * @return string - */ -function wpm_get_current_url() { - $url = ''; - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Reason unslash not needed because data is not getting stored in database, it's just being used. - if( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Reason unslash not needed because data is not getting stored in database, it's just being used. - $url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); - } - - return $url; -} - - -/** - * Get current url from $_SERVER and translate it - * - * @param string $lang - * - * @return string - */ -function wpm_translate_current_url( $lang = '' ) { - $url = wpm_get_current_url(); - - if ( ! $lang ) { - $lang = wpm_get_language(); - } - - $url = wpm_translate_url( $url, $lang ); - - return apply_filters( 'wpm_get_current_url', $url, $lang ); -} - -/** - * Get original home url - * - * @see WPM_Setup::get_original_home_url() - * - * @since 1.7.0 - * - * @return string - */ -function wpm_get_orig_home_url() { - $home_url = wpm()->setup->get_original_home_url(); - - return apply_filters( 'wpm_get_original_home_url', $home_url ); -} - - -/** - * Translate escaping text - * - * @param string $string - * - * @return string - */ -function wpm_escaping_text( $string ) { - - if ( ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' === $_SERVER['REQUEST_METHOD'] ) || ! is_admin() ) { - $string = wpm_translate_string( $string ); - } - - return $string; -} - -/** - * Translate attributes if it is json string - * - * @param $string - * - * @return string - */ -function wpm_attribute_escape( $string ) { - if ( ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' === $_SERVER['REQUEST_METHOD'] ) || ! is_admin() ) { - $string = wp_specialchars_decode( $string, ENT_QUOTES ); - - if ( isJSON( $string ) ) { - $array = json_decode( $string, true ); - $array = wpm_translate_value( $array ); - $string = wp_json_encode( $array ); - } else { - $string = wpm_translate_string( $string ); - } - - $string = _wp_specialchars( $string, ENT_QUOTES ); - } - - return $string; -} - -add_filter( 'attribute_escape', 'wpm_attribute_escape', 5 ); -add_filter( 'esc_textarea', 'wpm_escaping_text', 5 ); -add_filter( 'esc_html', 'wpm_escaping_text', 5 ); -add_filter( 'localization', 'wpm_translate_string', 5 ); -add_filter( 'gettext', 'wpm_translate_string', 5 ); - -if ( ! function_exists( 'remove_class_filter' ) ) { - /** - * Remove Class Filter Without Access to Class Object - * - * In order to use the core WordPress remove_filter() on a filter added with the callback - * to a class, you either have to have access to that class object, or it has to be a call - * to a static method. This method allows you to remove filters with a callback to a class - * you don't have access to. - * - * Works with WordPress 1.2+ (4.7+ support added 9-19-2016) - * Updated 2-27-2017 to use internal WordPress removal for 4.7+ (to prevent PHP warnings output) - * - * @param string $tag Filter to remove - * @param string $class_name Class name for the filter's callback - * @param string $method_name Method name for the filter's callback - * @param int $priority Priority of the filter (default 10) - * - * @return bool Whether the function is removed. - */ - function remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) { - global $wp_filter; - // Check that filter actually exists first - if ( ! isset( $wp_filter[ $tag ] ) ) { - return false; - } - /** - * If filter config is an object, means we're using WordPress 4.7+ and the config is no longer - * a simple array, rather it is an object that implements the ArrayAccess interface. - * - * To be backwards compatible, we set $callbacks equal to the correct array as a reference (so $wp_filter is updated) - * - * @see https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/ - */ - if ( is_object( $wp_filter[ $tag ] ) && isset( $wp_filter[ $tag ]->callbacks ) ) { - // Create $fob object from filter tag, to use below - $fob = $wp_filter[ $tag ]; - $callbacks = &$wp_filter[ $tag ]->callbacks; - } else { - $callbacks = &$wp_filter[ $tag ]; - } - // Exit if there aren't any callbacks for specified priority - if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) { - return false; - } - // Loop through each filter for the specified priority, looking for our class & method - foreach ( (array) $callbacks[ $priority ] as $filter_id => $filter ) { - // Filter should always be an array - array( $this, 'method' ), if not goto next - if ( ! isset( $filter['function'] ) || ! is_array( $filter['function'] ) ) { - continue; - } - // If first value in array is not an object, it can't be a class - if ( ! is_object( $filter['function'][0] ) ) { - continue; - } - // Method doesn't match the one we're looking for, goto next - if ( $filter['function'][1] !== $method_name ) { - continue; - } - // Method matched, now let's check the Class - if ( get_class( $filter['function'][0] ) === $class_name ) { - // WordPress 4.7+ use core remove_filter() since we found the class object - if ( isset( $fob ) ) { - // Handles removing filter, reseting callback priority keys mid-iteration, etc. - $fob->remove_filter( $tag, $filter['function'], $priority ); - } else { - // Use legacy removal process (pre 4.7) - unset( $callbacks[ $priority ][ $filter_id ] ); - // and if it was the only filter in that priority, unset that priority - if ( empty( $callbacks[ $priority ] ) ) { - unset( $callbacks[ $priority ] ); - } - // and if the only filter for that tag, set the tag to an empty array - if ( empty( $callbacks ) ) { - $callbacks = array(); - } - // Remove this filter from merged_filters, which specifies if filters have been sorted - unset( $GLOBALS['merged_filters'][ $tag ] ); - } - return true; - } - } - - return false; - } -} - -if ( ! function_exists( 'remove_class_action' ) ) { - /** - * Remove Class Action Without Access to Class Object - * - * In order to use the core WordPress remove_action() on an action added with the callback - * to a class, you either have to have access to that class object, or it has to be a call - * to a static method. This method allows you to remove actions with a callback to a class - * you don't have access to. - * - * Works with WordPress 1.2+ (4.7+ support added 9-19-2016) - * - * @param string $tag Action to remove - * @param string $class_name Class name for the action's callback - * @param string $method_name Method name for the action's callback - * @param int $priority Priority of the action (default 10) - * - * @return bool Whether the function is removed. - */ - function remove_class_action( $tag, $class_name = '', $method_name = '', $priority = 10 ) { - return remove_class_filter( $tag, $class_name, $method_name, $priority ); - } -} - -/** - * Define a constant if it is not already defined. - * - * @since 1.8.0 - * @param string $name Constant name. - * @param string $value Value. - */ -function wpm_maybe_define_constant( $name, $value ) { - if ( ! defined( $name ) ) { - define( $name, $value ); - } -} - -/** - * Get an item of post data if set, otherwise return a default value. - * - * @since 1.8.0 - * @param string $key - * @param string $default - * @return mixed value sanitized by wpm_clean - */ -function wpm_get_post_data_by_key( $key, $default = '' ) { - //phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized --Reason: Sanitization is handled below in wpm_clean() function - $post_val = isset( $_POST[ $key ] ) ? $_POST[ $key ] : null; - return wpm_clean( wpm_get_var( $post_val, $default ) ); -} - -/** - * Get data if set, otherwise return a default value or null. Prevents notices when data is not set. - * - * @since 1.8.0 - * @param mixed $var - * @param string $default - * @return mixed value sanitized by wpm_clean - */ -function wpm_get_var( &$var, $default = null ) { - return isset( $var ) ? $var : $default; -} - -/** - * Delete expired transients. - * - * Deletes all expired transients. The multi-table delete syntax is used. - * to delete the transient record from table a, and the corresponding. - * transient_timeout record from table b. - * - * Based on code inside core's upgrade_network() function. - * - * @since 1.8.0 - * - * @return int Number of transients that were cleared. - */ -function wpm_delete_expired_transients() { - global $wpdb; - - $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b - WHERE a.option_name LIKE %s - AND a.option_name NOT LIKE %s - AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) ) - AND b.option_value < %d"; - //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $rows = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', time() ) ); - - $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b - WHERE a.option_name LIKE %s - AND a.option_name NOT LIKE %s - AND b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) ) - AND b.option_value < %d"; - //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $rows2 = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); - - return absint( $rows + $rows2 ); -} -add_action( 'wpm_installed', 'wpm_delete_expired_transients' ); - -/** - * Display a WP Multilang help tip. - * - * @since 2.1.1 - * - * @param string $tip Help tip text - * @param bool $allow_html Allow sanitized HTML if true or escape - * @return string - */ -function wpm_help_tip( $tip, $allow_html = false ) { - if ( $allow_html ) { - $tip = wpm_sanitize_tooltip( $tip ); - } else { - $tip = esc_attr( $tip ); - } - - return ''; -} - -/** - * Get post by title - * - * @param $page_title - * @param string $output - * @param string $post_type - * - * @return array|null|WP_Post - */ -function wpm_get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) { - global $wpdb; - - $like = '%' . $wpdb->esc_like( esc_sql( '[:' . wpm_get_language() . ']' . $page_title . '[:' ) ) . '%'; - - if ( is_array( $post_type ) ) { - $post_type = esc_sql( $post_type ); - $post_type_in_string = "'" . implode( "','", $post_type ) . "'"; - //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $sql = $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_title LIKE %s AND post_type IN ($post_type_in_string)", $like ); - } else { - $sql = $wpdb->prepare( " - SELECT ID, post_title - FROM $wpdb->posts - WHERE post_title LIKE %s - AND post_type = %s - ", $like, $post_type ); - } - - $cache_key = 'wpm_page_title_key'; - $page = wp_cache_get($cache_key); - if(false === $page ){ - //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery - $page = $wpdb->get_var( $sql ); - wp_cache_set( $cache_key, $page ); - } - - if ( $page ) { - return get_post( $page, $output ); - } -} - -if ( ! function_exists( 'is_admin_url' ) ) { - /** - * Check if is admin url - * - * @param $url - * - * @return bool - */ - function is_admin_url( $url ) { - return ! strpos( $url, 'wp-admin/' ) === false; - } -} - -if ( ! function_exists( 'is_front_ajax' ) ) { - /** - * Check if it is ajax from front - * - * @return bool - */ - function is_front_ajax() { - return wp_doing_ajax() && ( $referrer = wp_get_raw_referer() ) && ! is_admin_url( $referrer ) ; - } -} +template_path(); + + // Look in yourtheme/slug-name.php and yourtheme/wp-multilang/slug-name.php + if ( $name ) { + $template = locate_template( array( "{$slug}-{$name}.php", "wp-multilang/{$slug}-{$name}.php" ) ); + } + + // If a custom path was defined, check that next + if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}-{$name}.php" ) ) { + $template = trailingslashit( $custom_dir ) . "{$slug}-{$name}.php"; + } + + // Get default slug-name.php + if ( ! $template && $name && file_exists( $template_path . "{$slug}-{$name}.php" ) ) { + $template = $template_path . "{$slug}-{$name}.php"; + } + + // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/wp-multilang/slug.php + if ( ! $template ) { + $template = locate_template( array( "{$slug}.php", "wp-multilang/{$slug}.php" ) ); + } + + // If a custom path was defined, check that next + if ( ! $template && $custom_dir && file_exists( trailingslashit( $custom_dir ) . "{$slug}.php" ) ) { + $template = trailingslashit( $custom_dir ) . "{$slug}.php"; + } + + // Get default slug-name.php + if ( ! $template && file_exists( $template_path . "{$slug}.php" ) ) { + $template = $template_path . "{$slug}.php"; + } + + // Allow 3rd party plugin filter template file from their plugin + $template = apply_filters( 'wpm_get_template_part', $template, $slug, $name ); + + // Load template if we've found one + if ( $template ) { + + // Extract args if there are any + if ( is_array( $args ) && count( $args ) > 0 ) { + extract( $args ); + } + + do_action( 'wpm_before_template_part', $template, $slug, $name, $custom_dir, $args ); + + ob_start(); + + include( $template ); + + do_action( 'wpm_after_template_part', $template, $slug, $name, $custom_dir, $args ); + + return ob_get_clean(); + } +} + +/** + * Load assets + * + * @param $filename + * + * @return string + */ +function wpm_asset_path( $filename ) { + $dist_path = str_replace( array( 'http:', 'https:' ), '', wpm()->plugin_url() ) . '/assets/'; + $directory = dirname( $filename ) . '/'; + $file = basename( $filename ); + + return $dist_path . $directory . $file; +} + +/** + * Queue some JavaScript code to be output in the footer. + * + * @param string $code + */ +function wpm_enqueue_js( $code ) { + global $wpm_queued_js; + + if ( empty( $wpm_queued_js ) ) { + $wpm_queued_js = ''; + } + + $wpm_queued_js .= "\n" . $code . "\n"; +} + +/** + * Output any queued javascript code in the footer. + */ +function wpm_print_js() { + global $wpm_queued_js; + + if ( ! empty( $wpm_queued_js ) ) { + // Sanitize. + $wpm_queued_js = wp_check_invalid_utf8( $wpm_queued_js ); + $wpm_queued_js = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", $wpm_queued_js ); + $wpm_queued_js = str_replace( "\r", '', $wpm_queued_js ); + + $js_escaped = "\n\n"; + + /** + * game_portal_queued_js filter. + * + * @param string $js JavaScript code. + */ + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo $js_escaped; + + unset( $wpm_queued_js ); + } +} + +/** + * Set a cookie - wrapper for setcookie using WP constants. + * + * @param string $name Name of the cookie being set. + * @param string $value Value of the cookie. + * @param integer $expire Expiry of the cookie. + * @param bool $secure Whether the cookie should be served only over https. + */ +function wpm_setcookie( $name, $value, $expire = 0, $secure = false ) { + if ( ! headers_sent() ) { + setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', '', $secure ); + if ( COOKIEPATH != SITECOOKIEPATH ) { + setcookie( $name, $value, $expire, SITECOOKIEPATH, '', $secure ); + } + } elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + headers_sent( $file, $line ); + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.PHP.DevelopmentFunctions.error_log_trigger_error + trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); + } +} + + +/** + * Get current url from $_SERVER + * + * @return string + */ +function wpm_get_current_url() { + $url = ''; + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Reason unslash not needed because data is not getting stored in database, it's just being used. + if( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Reason unslash not needed because data is not getting stored in database, it's just being used. + $url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + } + + return $url; +} + + +/** + * Get current url from $_SERVER and translate it + * + * @param string $lang + * + * @return string + */ +function wpm_translate_current_url( $lang = '' ) { + $url = wpm_get_current_url(); + + if ( ! $lang ) { + $lang = wpm_get_language(); + } + + $url = wpm_translate_url( $url, $lang ); + + return apply_filters( 'wpm_get_current_url', $url, $lang ); +} + +/** + * Get original home url + * + * @see WPM_Setup::get_original_home_url() + * + * @since 1.7.0 + * + * @return string + */ +function wpm_get_orig_home_url() { + $home_url = wpm()->setup->get_original_home_url(); + + return apply_filters( 'wpm_get_original_home_url', $home_url ); +} + + +/** + * Translate escaping text + * + * @param string $string + * + * @return string + */ +function wpm_escaping_text( $string ) { + + if ( ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' === $_SERVER['REQUEST_METHOD'] ) || ! is_admin() ) { + $string = wpm_translate_string( $string ); + } + + return $string; +} + +/** + * Translate attributes if it is json string + * + * @param $string + * + * @return string + */ +function wpm_attribute_escape( $string ) { + if ( ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' === $_SERVER['REQUEST_METHOD'] ) || ! is_admin() ) { + $string = wp_specialchars_decode( $string, ENT_QUOTES ); + + if ( isJSON( $string ) ) { + $array = json_decode( $string, true ); + $array = wpm_translate_value( $array ); + $string = wp_json_encode( $array ); + } else { + $string = wpm_translate_string( $string ); + } + + $string = _wp_specialchars( $string, ENT_QUOTES ); + } + + return $string; +} + +add_filter( 'attribute_escape', 'wpm_attribute_escape', 5 ); +add_filter( 'esc_textarea', 'wpm_escaping_text', 5 ); +add_filter( 'esc_html', 'wpm_escaping_text', 5 ); +add_filter( 'localization', 'wpm_translate_string', 5 ); +add_filter( 'gettext', 'wpm_translate_string', 5 ); + +if ( ! function_exists( 'remove_class_filter' ) ) { + /** + * Remove Class Filter Without Access to Class Object + * + * In order to use the core WordPress remove_filter() on a filter added with the callback + * to a class, you either have to have access to that class object, or it has to be a call + * to a static method. This method allows you to remove filters with a callback to a class + * you don't have access to. + * + * Works with WordPress 1.2+ (4.7+ support added 9-19-2016) + * Updated 2-27-2017 to use internal WordPress removal for 4.7+ (to prevent PHP warnings output) + * + * @param string $tag Filter to remove + * @param string $class_name Class name for the filter's callback + * @param string $method_name Method name for the filter's callback + * @param int $priority Priority of the filter (default 10) + * + * @return bool Whether the function is removed. + */ + function remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) { + global $wp_filter; + // Check that filter actually exists first + if ( ! isset( $wp_filter[ $tag ] ) ) { + return false; + } + /** + * If filter config is an object, means we're using WordPress 4.7+ and the config is no longer + * a simple array, rather it is an object that implements the ArrayAccess interface. + * + * To be backwards compatible, we set $callbacks equal to the correct array as a reference (so $wp_filter is updated) + * + * @see https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/ + */ + if ( is_object( $wp_filter[ $tag ] ) && isset( $wp_filter[ $tag ]->callbacks ) ) { + // Create $fob object from filter tag, to use below + $fob = $wp_filter[ $tag ]; + $callbacks = &$wp_filter[ $tag ]->callbacks; + } else { + $callbacks = &$wp_filter[ $tag ]; + } + // Exit if there aren't any callbacks for specified priority + if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) { + return false; + } + // Loop through each filter for the specified priority, looking for our class & method + foreach ( (array) $callbacks[ $priority ] as $filter_id => $filter ) { + // Filter should always be an array - array( $this, 'method' ), if not goto next + if ( ! isset( $filter['function'] ) || ! is_array( $filter['function'] ) ) { + continue; + } + // If first value in array is not an object, it can't be a class + if ( ! is_object( $filter['function'][0] ) ) { + continue; + } + // Method doesn't match the one we're looking for, goto next + if ( $filter['function'][1] !== $method_name ) { + continue; + } + // Method matched, now let's check the Class + if ( get_class( $filter['function'][0] ) === $class_name ) { + // WordPress 4.7+ use core remove_filter() since we found the class object + if ( isset( $fob ) ) { + // Handles removing filter, reseting callback priority keys mid-iteration, etc. + $fob->remove_filter( $tag, $filter['function'], $priority ); + } else { + // Use legacy removal process (pre 4.7) + unset( $callbacks[ $priority ][ $filter_id ] ); + // and if it was the only filter in that priority, unset that priority + if ( empty( $callbacks[ $priority ] ) ) { + unset( $callbacks[ $priority ] ); + } + // and if the only filter for that tag, set the tag to an empty array + if ( empty( $callbacks ) ) { + $callbacks = array(); + } + // Remove this filter from merged_filters, which specifies if filters have been sorted + unset( $GLOBALS['merged_filters'][ $tag ] ); + } + return true; + } + } + + return false; + } +} + +if ( ! function_exists( 'remove_class_action' ) ) { + /** + * Remove Class Action Without Access to Class Object + * + * In order to use the core WordPress remove_action() on an action added with the callback + * to a class, you either have to have access to that class object, or it has to be a call + * to a static method. This method allows you to remove actions with a callback to a class + * you don't have access to. + * + * Works with WordPress 1.2+ (4.7+ support added 9-19-2016) + * + * @param string $tag Action to remove + * @param string $class_name Class name for the action's callback + * @param string $method_name Method name for the action's callback + * @param int $priority Priority of the action (default 10) + * + * @return bool Whether the function is removed. + */ + function remove_class_action( $tag, $class_name = '', $method_name = '', $priority = 10 ) { + return remove_class_filter( $tag, $class_name, $method_name, $priority ); + } +} + +/** + * Define a constant if it is not already defined. + * + * @since 1.8.0 + * @param string $name Constant name. + * @param string $value Value. + */ +function wpm_maybe_define_constant( $name, $value ) { + if ( ! defined( $name ) ) { + define( $name, $value ); + } +} + +/** + * Get an item of post data if set, otherwise return a default value. + * + * @since 1.8.0 + * @param string $key + * @param string $default + * @return mixed value sanitized by wpm_clean + */ +function wpm_get_post_data_by_key( $key, $default = '' ) { + //phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized --Reason: Sanitization is handled below in wpm_clean() function + $post_val = isset( $_POST[ $key ] ) ? $_POST[ $key ] : null; + return wpm_clean( wpm_get_var( $post_val, $default ) ); +} + +/** + * Get data if set, otherwise return a default value or null. Prevents notices when data is not set. + * + * @since 1.8.0 + * @param mixed $var + * @param string $default + * @return mixed value sanitized by wpm_clean + */ +function wpm_get_var( &$var, $default = null ) { + return isset( $var ) ? $var : $default; +} + +/** + * Delete expired transients. + * + * Deletes all expired transients. The multi-table delete syntax is used. + * to delete the transient record from table a, and the corresponding. + * transient_timeout record from table b. + * + * Based on code inside core's upgrade_network() function. + * + * @since 1.8.0 + * + * @return int Number of transients that were cleared. + */ +function wpm_delete_expired_transients() { + global $wpdb; + + $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b + WHERE a.option_name LIKE %s + AND a.option_name NOT LIKE %s + AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) ) + AND b.option_value < %d"; + //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $rows = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', time() ) ); + + $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b + WHERE a.option_name LIKE %s + AND a.option_name NOT LIKE %s + AND b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) ) + AND b.option_value < %d"; + //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $rows2 = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); + + return absint( $rows + $rows2 ); +} +add_action( 'wpm_installed', 'wpm_delete_expired_transients' ); + +/** + * Display a WP Multilang help tip. + * + * @since 2.1.1 + * + * @param string $tip Help tip text + * @param bool $allow_html Allow sanitized HTML if true or escape + * @return string + */ +function wpm_help_tip( $tip, $allow_html = false ) { + if ( $allow_html ) { + $tip = wpm_sanitize_tooltip( $tip ); + } else { + $tip = esc_attr( $tip ); + } + + return ''; +} + +/** + * Get post by title + * + * @param $page_title + * @param string $output + * @param string $post_type + * + * @return array|null|WP_Post + */ +function wpm_get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) { + global $wpdb; + + $like = '%' . $wpdb->esc_like( esc_sql( '[:' . wpm_get_language() . ']' . $page_title . '[:' ) ) . '%'; + + if ( is_array( $post_type ) ) { + $post_type = esc_sql( $post_type ); + $post_type_in_string = "'" . implode( "','", $post_type ) . "'"; + //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $sql = $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_title LIKE %s AND post_type IN ($post_type_in_string)", $like ); + } else { + $sql = $wpdb->prepare( " + SELECT ID, post_title + FROM $wpdb->posts + WHERE post_title LIKE %s + AND post_type = %s + ", $like, $post_type ); + } + + $cache_key = 'wpm_page_title_key'; + $page = wp_cache_get($cache_key); + if(false === $page ){ + //phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery + $page = $wpdb->get_var( $sql ); + wp_cache_set( $cache_key, $page ); + } + + if ( $page ) { + return get_post( $page, $output ); + } +} + +if ( ! function_exists( 'is_admin_url' ) ) { + /** + * Check if is admin url + * + * @param $url + * + * @return bool + */ + function is_admin_url( $url ) { + return ! strpos( $url, 'wp-admin/' ) === false; + } +} + +if ( ! function_exists( 'is_front_ajax' ) ) { + /** + * Check if it is ajax from front + * + * @return bool + */ + function is_front_ajax() { + return wp_doing_ajax() && ( $referrer = wp_get_raw_referer() ) && ! is_admin_url( $referrer ) ; + } +} + +/** + * Get custom post types + * @return $cpt array + * @since 2.4.18 + * */ +function wpm_get_custom_post_types() { + + $cpt_array = array(); + $custom_post_types = get_post_types( array(), 'objects' ); + + if ( ! empty( $custom_post_types ) && is_array( $custom_post_types ) ) { + + // Remove these post types from array + $unset_cpt = array( 'saswp_reviews_server', 'saswp_server_rvs_loc', 'saswp_rvs_location', ); + $exclude_types = apply_filters( 'wpm_exclude_post_types', $unset_cpt ); + + foreach ( $custom_post_types as $key => $cpt ) { + if ( in_array( $cpt->name, $exclude_types ) ) { + unset( $custom_post_types[ $cpt->name ] ); + }else{ + $cpt_array[ $cpt->name ] = $cpt->label; + } + } + + } + + return $cpt_array; + +} \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/wpm-formatting-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-formatting-functions.php index 9c326dabf..789c0cea4 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-formatting-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-formatting-functions.php @@ -1,192 +1,192 @@ - & $value ) { - if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) { - $merged[ $key ] = wpm_array_merge_recursive( $merged[ $key ], $value ); - } elseif ( is_numeric( $key ) ) { - if ( ! in_array( $value, $merged, true ) ) { - $merged[] = $value; - } - } else { - $merged[ $key ] = $value; - } - } - - return $merged; -} - -/** - * Diff multidimensional array - * - * @param $array1 - * @param $array2 - * - * @return array - */ -function wpm_array_diff_recursive( $array1, $array2 ) { - $result = array(); - foreach ( $array1 as $key => $val ) { - if ( isset( $array2[ $key ] ) ) { - if ( is_array( $val ) && $array2[ $key ] ) { - if ( $result_item = wpm_array_diff_recursive( $val, $array2[ $key ] ) ) { - $result[ $key ] = $result_item; - } - } - } else { - $result[ $key ] = $val; - } - } - - return $result; -} - -/** - * Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended - * to the end of the array. - * - * @param array $array - * @param string $key - * @param array $new - * - * @return array - */ -function wpm_array_insert_after( array $array, $key, array $new ) { - $keys = array_keys( $array ); - $index = array_search( $key, $keys ); - $pos = false === $index ? count( $array ) : $index + 1; - return array_merge( array_slice( $array, 0, $pos ), $new, array_slice( $array, $pos ) ); -} - -/** - * Sanitize a string destined to be a tooltip. - * - * @since 2.1.1 Tooltips are encoded with htmlspecialchars to prevent XSS. Should not be used in conjunction with esc_attr() - * @param string $var - * @return string - */ -function wpm_sanitize_tooltip( $var ) { - return htmlspecialchars( wp_kses( html_entity_decode( $var ), array( - 'br' => array(), - 'em' => array(), - 'strong' => array(), - 'small' => array(), - 'span' => array(), - 'ul' => array(), - 'li' => array(), - 'ol' => array(), - 'p' => array(), - ) ) ); -} - -/** - * Formatting language slug - * - * @param string $slag - * - * @return string - */ -function wpm_sanitize_lang_slug( $slag ) { - $slag = str_replace( '_', '-', strtolower( sanitize_title( $slag ) ) ); - - return $slag; -} - -/** - * Filter fields in config for safe requests to base for post - * - * @since 2.1.1 - * - * @param $fields - * - * @return array - */ -function wpm_filter_post_config_fields( $fields ) { - - $default_fields = array( - 'post_author', - 'post_date', - 'post_date_gmt', - 'post_content', - 'post_title', - 'post_excerpt', - 'post_status', - 'comment_status', - 'ping_status', - 'post_password', - 'post_name', - 'to_ping', - 'pinged', - 'post_modified', - 'post_modified_gmt', - 'post_content_filtered', - 'post_parent', - 'guid', - 'menu_order', - 'post_type', - 'post_mime_type', - 'comment_count', - ); - - return array_intersect( $default_fields, $fields ); -} - -/** - * Strip protocol from url - * - * @param $url - * - * @return string - */ -function wpm_strip_protocol( $url ) { - - // strip the protical - return preg_replace( '#^https?://#i', '', $url ); -} - -/** - * Check if is JSON string - */ -if ( ! function_exists( 'isJSON' ) ) { - function isJSON( $string ) { - return is_string( $string ) && is_array( json_decode( $string, true ) ) && ( json_last_error() == JSON_ERROR_NONE ) ? true : false; - } -} + & $value ) { + if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) { + $merged[ $key ] = wpm_array_merge_recursive( $merged[ $key ], $value ); + } elseif ( is_numeric( $key ) ) { + if ( ! in_array( $value, $merged, true ) ) { + $merged[] = $value; + } + } else { + $merged[ $key ] = $value; + } + } + + return $merged; +} + +/** + * Diff multidimensional array + * + * @param $array1 + * @param $array2 + * + * @return array + */ +function wpm_array_diff_recursive( $array1, $array2 ) { + $result = array(); + foreach ( $array1 as $key => $val ) { + if ( isset( $array2[ $key ] ) ) { + if ( is_array( $val ) && $array2[ $key ] ) { + if ( $result_item = wpm_array_diff_recursive( $val, $array2[ $key ] ) ) { + $result[ $key ] = $result_item; + } + } + } else { + $result[ $key ] = $val; + } + } + + return $result; +} + +/** + * Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended + * to the end of the array. + * + * @param array $array + * @param string $key + * @param array $new + * + * @return array + */ +function wpm_array_insert_after( array $array, $key, array $new ) { + $keys = array_keys( $array ); + $index = array_search( $key, $keys ); + $pos = false === $index ? count( $array ) : $index + 1; + return array_merge( array_slice( $array, 0, $pos ), $new, array_slice( $array, $pos ) ); +} + +/** + * Sanitize a string destined to be a tooltip. + * + * @since 2.1.1 Tooltips are encoded with htmlspecialchars to prevent XSS. Should not be used in conjunction with esc_attr() + * @param string $var + * @return string + */ +function wpm_sanitize_tooltip( $var ) { + return htmlspecialchars( wp_kses( html_entity_decode( $var ), array( + 'br' => array(), + 'em' => array(), + 'strong' => array(), + 'small' => array(), + 'span' => array(), + 'ul' => array(), + 'li' => array(), + 'ol' => array(), + 'p' => array(), + ) ) ); +} + +/** + * Formatting language slug + * + * @param string $slag + * + * @return string + */ +function wpm_sanitize_lang_slug( $slag ) { + $slag = str_replace( '_', '-', strtolower( sanitize_title( $slag ) ) ); + + return $slag; +} + +/** + * Filter fields in config for safe requests to base for post + * + * @since 2.1.1 + * + * @param $fields + * + * @return array + */ +function wpm_filter_post_config_fields( $fields ) { + + $default_fields = array( + 'post_author', + 'post_date', + 'post_date_gmt', + 'post_content', + 'post_title', + 'post_excerpt', + 'post_status', + 'comment_status', + 'ping_status', + 'post_password', + 'post_name', + 'to_ping', + 'pinged', + 'post_modified', + 'post_modified_gmt', + 'post_content_filtered', + 'post_parent', + 'guid', + 'menu_order', + 'post_type', + 'post_mime_type', + 'comment_count', + ); + + return array_intersect( $default_fields, $fields ); +} + +/** + * Strip protocol from url + * + * @param $url + * + * @return string + */ +function wpm_strip_protocol( $url ) { + + // strip the protical + return preg_replace( '#^https?://#i', '', $url ); +} + +/** + * Check if is JSON string + */ +if ( ! function_exists( 'isJSON' ) ) { + function isJSON( $string ) { + return is_string( $string ) && is_array( json_decode( $string, true ) ) && ( json_last_error() == JSON_ERROR_NONE ) ? true : false; + } +} diff --git a/plugins/wp-react-custom-multilang/includes/wpm-language-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-language-functions.php index 2e647255a..77260ee09 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-language-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-language-functions.php @@ -1,146 +1,146 @@ -setup->get_languages(); -} - -/** - * Get user language - * - * @see WPM_Setup::get_user_language() - * - * @return string - */ -function wpm_get_user_language() { - return wpm()->setup->get_user_language(); -} - -/** - * Get default locale - * - * @see WPM_Setup::get_default_locale() - * - * @return string - */ -function wpm_get_default_locale() { - return wpm()->setup->get_default_locale(); -} - -/** - * Get site language - * - * @since 2.0.0 - * - * @see WPM_Setup::get_default_language() - * - * @return string - */ -function wpm_get_default_language() { - return wpm()->setup->get_default_language(); -} - -/** - * Get options - * - * @see WPM_Setup::get_options() - * - * @return array - */ -function wpm_get_lang_option() { - if ( version_compare( WPM_Setup::get_option( 'version' ), '2.0.0', '<' ) ) { - return array(); - } - - return WPM_Setup::get_option( 'languages' ); -} - -/** - * Get installed languages - * - * @see WPM_Setup::get_installed_languages() - * - * @return array - */ -function wpm_get_installed_languages() { - return wpm()->setup->get_installed_languages(); -} - -/** - * Get available translation - * - * @see WPM_Setup::get_translations() - * - * @return array - */ -function wpm_get_available_translations() { - return wpm()->setup->get_translations(); -} - -/** - * Get language for translation - * - * @since 1.7.0 - * - * @return string - */ -function wpm_get_language() { - - $referrer = wp_get_raw_referer(); - - if ( ( defined( 'REST_REQUEST' ) && isset( $_SERVER['REQUEST_METHOD'] ) && ( 'GET' !== $_SERVER['REQUEST_METHOD'] || is_admin_url( $referrer ) ) ) || is_admin() ) { - - $languages = wpm_get_languages(); - //phpcs:ignore WordPress.Security.NonceVerification.Recommended - $query = $_REQUEST; - - if ( wp_doing_ajax() ) { - if ( $referrer && ! is_front_ajax() ) { - $query = wp_parse_url( $referrer, PHP_URL_QUERY ); - if(is_string($query)){ - parse_str($query, $query); - } - } else { - return apply_filters('wpm_get_language_from_url', wpm_get_user_language()); - } - } - - if ( isset( $query['edit_lang'], $languages [ wpm_clean( $query['edit_lang'] ) ] ) ) { - $lang = wpm_clean( $query['edit_lang'] ); - } else { - $edit_lang = get_user_meta( get_current_user_id(), 'edit_lang', true ); - if ( $edit_lang && isset( $languages[ $edit_lang ] ) ) { - $lang = $edit_lang; - } else { - $lang = wpm_get_user_language(); - } - } - - } else { - $lang = apply_filters('wpm_get_language_from_url', wpm_get_user_language()); - } - - return $lang; -} +setup->get_languages(); +} + +/** + * Get user language + * + * @see WPM_Setup::get_user_language() + * + * @return string + */ +function wpm_get_user_language() { + return wpm()->setup->get_user_language(); +} + +/** + * Get default locale + * + * @see WPM_Setup::get_default_locale() + * + * @return string + */ +function wpm_get_default_locale() { + return wpm()->setup->get_default_locale(); +} + +/** + * Get site language + * + * @since 2.0.0 + * + * @see WPM_Setup::get_default_language() + * + * @return string + */ +function wpm_get_default_language() { + return wpm()->setup->get_default_language(); +} + +/** + * Get options + * + * @see WPM_Setup::get_options() + * + * @return array + */ +function wpm_get_lang_option() { + if ( version_compare( WPM_Setup::get_option( 'version' ), '2.0.0', '<' ) ) { + return array(); + } + + return WPM_Setup::get_option( 'languages' ); +} + +/** + * Get installed languages + * + * @see WPM_Setup::get_installed_languages() + * + * @return array + */ +function wpm_get_installed_languages() { + return wpm()->setup->get_installed_languages(); +} + +/** + * Get available translation + * + * @see WPM_Setup::get_translations() + * + * @return array + */ +function wpm_get_available_translations() { + return wpm()->setup->get_translations(); +} + +/** + * Get language for translation + * + * @since 1.7.0 + * + * @return string + */ +function wpm_get_language() { + + $referrer = wp_get_raw_referer(); + + if ( ( defined( 'REST_REQUEST' ) && isset( $_SERVER['REQUEST_METHOD'] ) && ( 'GET' !== $_SERVER['REQUEST_METHOD'] || is_admin_url( $referrer ) ) ) || is_admin() ) { + + $languages = wpm_get_languages(); + //phpcs:ignore WordPress.Security.NonceVerification.Recommended + $query = $_REQUEST; + + if ( wp_doing_ajax() ) { + if ( $referrer && ! is_front_ajax() ) { + $query = wp_parse_url( $referrer, PHP_URL_QUERY ); + if(is_string($query)){ + parse_str($query, $query); + } + } else { + return apply_filters('wpm_get_language_from_url', wpm_get_user_language()); + } + } + + if ( isset( $query['edit_lang'], $languages [ wpm_clean( $query['edit_lang'] ) ] ) ) { + $lang = wpm_clean( $query['edit_lang'] ); + } else { + $edit_lang = get_user_meta( get_current_user_id(), 'edit_lang', true ); + if ( $edit_lang && isset( $languages[ $edit_lang ] ) ) { + $lang = $edit_lang; + } else { + $lang = wpm_get_user_language(); + } + } + + } else { + $lang = apply_filters('wpm_get_language_from_url', wpm_get_user_language()); + } + + return $lang; +} diff --git a/plugins/wp-react-custom-multilang/includes/wpm-template-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-template-functions.php index 359ae2109..fd73f0439 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-template-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-template-functions.php @@ -1,474 +1,482 @@ -flags_path() ); -} - - -/** - * Get flags dir url - * - * @return string - */ -function wpm_get_flags_dir() { - return apply_filters( 'wpm_flags_dir', wpm()->flags_dir() ); -} - - -/** - * Get flag url - * - * @param string $filename - * - * @return string - */ -function wpm_get_flag_url( $filename = '' ) { - return wpm_get_flags_dir() . $filename; -} - - -/** - * Display language switcher in templates - * - * @param string $type - * @param string $show - * - * @return string - * @internal param array $args - * - */ -function wpm_get_language_switcher( $type = 'list', $show = 'both' ) { - - $languages = wpm_get_languages(); - - if ( count( $languages ) <= 1 ) { - return ''; - } - - $vars = array( - 'languages' => wpm_get_languages(), - 'lang' => wpm_get_language(), - 'type' => $type, - 'show' => $show, - ); - - switch ( $type ) { - - case 'dropdown': - $template = wpm_get_template( 'language-switcher', $type, '', $vars ); - break; - - case 'select': - $template = wpm_get_template( 'language-switcher', $type, '', $vars ); - break; - - default: - $template = wpm_get_template( 'language-switcher', $type, '', $vars ); - } - - return $template; -} - - -/** - * Display language switcher - * - * @param string $type - * @param string $show - * - * @internal param array $args - */ -function wpm_language_switcher( $type = 'list', $show = 'both' ) { - echo wp_kses( wpm_get_language_switcher( $type, $show ), wpm_lang_switcher_allowed_html() ); -} - - -/** - * Translate page titles - */ -add_filter( 'document_title_parts', 'wpm_translate_value', 5 ); - - -/** - * Add meta params to 'head' - */ -function wpm_set_alternate_links() { - $languages = array(); - - if ( is_single() ) { - $languages = get_post_meta( get_the_ID(), '_languages', true ); - } - - if ( is_category() || is_tag() || is_tax() ) { - $languages = get_term_meta( get_queried_object_id(), '_languages', true ); - } - - $hreflangs = array(); - - foreach ( wpm_get_languages() as $code => $language ) { - - if ( $languages && ! in_array( $code, $languages, true ) ) { - continue; - } - - if ( wpm_get_default_language() === $code ) { - $hreflangs['x-default'] = sprintf( "\n", esc_url( wpm_translate_current_url( $code ) ) ); - } - - $hreflangs[ $code ] = sprintf( "\n", esc_attr( wpm_sanitize_lang_slug( $language['locale'] ) ), esc_url( wpm_translate_current_url( $code ) ) ); - } - - $hreflangs = apply_filters( 'wpm_alternate_links', $hreflangs, wpm_get_current_url() ); - - $hreflangs_escaped = implode( '', $hreflangs ); - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- all html inside this variable already escaped above in $hreflangs_escaped variable - echo $hreflangs_escaped; -} - -add_action( 'wp_head', 'wpm_set_alternate_links' ); - - -/** - * Fix for generation image. - * use get_post - * - * @param $html - * @param $attr - * @param $content - * - * @return string - */ -function wpm_media_image( $html, $attr, $content ) { - - $atts = shortcode_atts( array( - 'id' => '', - 'align' => 'alignnone', - 'width' => '', - 'caption' => '', - 'class' => '', - ), $attr, 'caption' ); - - $atts['caption'] = wpm_translate_string( $atts['caption'] ); - $atts['width'] = (int) $atts['width']; - if ( $atts['width'] < 1 || empty( $atts['caption'] ) ) { - return $content; - } - - if ( ! empty( $atts['id'] ) ) { - $atts['id'] = 'id="' . esc_attr( sanitize_html_class( $atts['id'] ) ) . '" '; - } - - $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] ); - - $html5 = current_theme_supports( 'html5', 'caption' ); - // HTML5 captions never added the extra 10px to the image width - $width = $html5 ? $atts['width'] : ( 10 + $atts['width'] ); - - /** - * Filters the width of an image's caption. - * - * By default, the caption is 10 pixels greater than the width of the image, - * to prevent post content from running up against a floated image. - * - * @since 3.7.0 - * - * @see img_caption_shortcode() - * - * @param int $width Width of the caption in pixels. To remove this inline style, - * return zero. - * @param array $atts Attributes of the caption shortcode. - * @param string $content The image element, possibly wrapped in a hyperlink. - */ - $caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content ); - - $style = ''; - if ( $caption_width ) { - $style = 'style="width: ' . (int) $caption_width . 'px" '; - } - - if ( $html5 ) { - $html .= '
    ' . do_shortcode( $content ) . '
    ' . $atts['caption'] . '
    '; - } else { - $html .= '
    ' . do_shortcode( $content ) . '

    ' . $atts['caption'] . '

    '; - } - - return $html; -} - -add_filter( 'img_caption_shortcode', 'wpm_media_image', 10, 3 ); - - -/** - * Redeclare gallery code for translate caption text - * - * @param string $html - * @param array $attr - * @param $instance - * - * @return string - */ -function wpm_media_gallery( $html, $attr, $instance ) { - $post = get_post(); - $html5 = current_theme_supports( 'html5', 'gallery' ); - $atts = shortcode_atts( array( - 'order' => 'ASC', - 'orderby' => 'menu_order ID', - 'id' => $post ? $post->ID : 0, - 'itemtag' => $html5 ? 'figure' : 'dl', - 'icontag' => $html5 ? 'div' : 'dt', - 'captiontag' => $html5 ? 'figcaption' : 'dd', - 'columns' => 3, - 'size' => 'thumbnail', - 'include' => '', - //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude - 'exclude' => '', - 'link' => '' - ), $attr, 'gallery' ); - - $id = (int)$atts['id']; - - if ( ! empty( $atts['include'] ) ) { - $_attachments = get_posts( array( 'include' => $atts['include'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); - - $attachments = array(); - foreach ( $_attachments as $key => $val ) { - $attachments[$val->ID] = wpm_translate_post( $_attachments[$key] ); - } - //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude - } elseif ( ! empty( $atts['exclude'] ) ) { - //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude - $attachments = get_children( array( 'post_parent' => $id, 'exclude' => $atts['exclude'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); - } else { - $attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); - } - - if ( empty( $attachments ) ) { - return ''; - } - - if ( is_feed() ) { - $output = "\n"; - foreach ( $attachments as $att_id => $attachment ) { - $output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n"; - } - return $output; - } - - $itemtag = tag_escape( $atts['itemtag'] ); - $captiontag = tag_escape( $atts['captiontag'] ); - $icontag = tag_escape( $atts['icontag'] ); - $valid_tags = wp_kses_allowed_html( 'post' ); - if ( ! isset( $valid_tags[ $itemtag ] ) ) { - $itemtag = 'dl'; - } - if ( ! isset( $valid_tags[ $captiontag ] ) ) { - $captiontag = 'dd'; - } - if ( ! isset( $valid_tags[ $icontag ] ) ) { - $icontag = 'dt'; - } - - $columns = (int)$atts['columns']; - $itemwidth = $columns > 0 ? floor(100/$columns) : 100; - $float = is_rtl() ? 'right' : 'left'; - - $selector = "gallery-{$instance}"; - - $gallery_style = ''; - - /** - * Filters whether to print default gallery styles. - * - * @since 3.1.0 - * - * @param bool $print Whether to print default gallery styles. - * Defaults to false if the theme supports HTML5 galleries. - * Otherwise, defaults to true. - */ - if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) { - $gallery_style = " - \n\t\t"; - } - - $size_class = sanitize_html_class( $atts['size'] ); - $gallery_div = "\n"; - - return $output; -} - -add_filter( 'post_gallery', 'wpm_media_gallery', 10, 3 ); - - -/** - * Add lang class to body - * - * @param array $classes - * - * @return array - */ -function wpm_add_body_class( $classes ) { - $classes[] = 'language-' . wpm_get_language(); - - return $classes; -} - -add_filter( 'body_class', 'wpm_add_body_class' ); - - -/** - * Display language switcher in admin - */ -function wpm_admin_language_switcher() { - - $args = array( - 'languages' => wpm_get_languages(), - 'lang' => wpm_get_language(), - ); - - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Escaping is done in the respective template file - echo wpm_get_template( 'admin-language-switcher', '', '', $args ); -} - - -/** - * Display language switcher in customizer - */ -function wpm_admin_language_switcher_customizer() { - - $args = array( - 'languages' => wpm_get_languages(), - 'lang' => wpm_get_language(), - ); - - //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Escaping is done in the respective template file - echo wpm_get_template( 'admin-language-switcher', 'customizer', '', $args ); -} - - -/** - * Get flag list - * - * @since 2.0.0 - * - * @return array - */ -function wpm_get_flags() { - $flags = array(); - $flags_path = wpm_get_flags_path(); - if ( $dir_handle = @opendir( $flags_path ) ) { - while ( false !== ( $file = readdir( $dir_handle ) ) ) { - if ( preg_match( "/\.(jpeg|jpg|gif|png|svg)$/i", $file ) ) { - $flags[] = $file; - } - } - sort( $flags ); - } - - return $flags; -} - - -/** - * Show notice for strings that cant`t be translated for displaying in admin. - * - * @param bool $echo - * - * @return string - */ -function wpm_show_notice( $echo = true ) { - ?> - -
    -

    - - [:en]Text on english[:de]Text auf Deutsch[:] -

    -
    - - flags_path() ); +} + + +/** + * Get flags dir url + * + * @return string + */ +function wpm_get_flags_dir() { + return apply_filters( 'wpm_flags_dir', wpm()->flags_dir() ); +} + + +/** + * Get flag url + * + * @param string $filename + * + * @return string + */ +function wpm_get_flag_url( $filename = '' ) { + return wpm_get_flags_dir() . $filename; +} + + +/** + * Display language switcher in templates + * + * @param string $type + * @param string $show + * + * @return string + * @internal param array $args + * + */ +function wpm_get_language_switcher( $type = 'list', $show = 'both' ) { + + $languages = wpm_get_languages(); + + if ( count( $languages ) <= 1 ) { + return ''; + } + + if ( ! in_array( $type, array( 'list', 'dropdown', 'select' ), true ) ) { + $type = 'list'; + } + + if ( ! in_array( $show, array( 'both', 'flag', 'name' ), true ) ) { + $show = 'both'; + } + + $vars = array( + 'languages' => wpm_get_languages(), + 'lang' => wpm_get_language(), + 'type' => $type, + 'show' => $show, + ); + + switch ( $type ) { + + case 'dropdown': + $template = wpm_get_template( 'language-switcher', $type, '', $vars ); + break; + + case 'select': + $template = wpm_get_template( 'language-switcher', $type, '', $vars ); + break; + + default: + $template = wpm_get_template( 'language-switcher', $type, '', $vars ); + } + + return $template; +} + + +/** + * Display language switcher + * + * @param string $type + * @param string $show + * + * @internal param array $args + */ +function wpm_language_switcher( $type = 'list', $show = 'both' ) { + echo wp_kses( wpm_get_language_switcher( $type, $show ), wpm_lang_switcher_allowed_html() ); +} + + +/** + * Translate page titles + */ +add_filter( 'document_title_parts', 'wpm_translate_value', 5 ); + + +/** + * Add meta params to 'head' + */ +function wpm_set_alternate_links() { + $languages = array(); + + if ( is_single() ) { + $languages = get_post_meta( get_the_ID(), '_languages', true ); + } + + if ( is_category() || is_tag() || is_tax() ) { + $languages = get_term_meta( get_queried_object_id(), '_languages', true ); + } + + $hreflangs = array(); + + foreach ( wpm_get_languages() as $code => $language ) { + + if ( $languages && ! in_array( $code, $languages, true ) ) { + continue; + } + + if ( wpm_get_default_language() === $code ) { + $hreflangs['x-default'] = sprintf( "\n", esc_url( wpm_translate_current_url( $code ) ) ); + } + + $hreflangs[ $code ] = sprintf( "\n", esc_attr( wpm_sanitize_lang_slug( $language['locale'] ) ), esc_url( wpm_translate_current_url( $code ) ) ); + } + + $hreflangs = apply_filters( 'wpm_alternate_links', $hreflangs, wpm_get_current_url() ); + + $hreflangs_escaped = implode( '', $hreflangs ); + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- all html inside this variable already escaped above in $hreflangs_escaped variable + echo $hreflangs_escaped; +} + +add_action( 'wp_head', 'wpm_set_alternate_links' ); + + +/** + * Fix for generation image. + * use get_post + * + * @param $html + * @param $attr + * @param $content + * + * @return string + */ +function wpm_media_image( $html, $attr, $content ) { + + $atts = shortcode_atts( array( + 'id' => '', + 'align' => 'alignnone', + 'width' => '', + 'caption' => '', + 'class' => '', + ), $attr, 'caption' ); + + $atts['caption'] = wpm_translate_string( $atts['caption'] ); + $atts['width'] = (int) $atts['width']; + if ( $atts['width'] < 1 || empty( $atts['caption'] ) ) { + return $content; + } + + if ( ! empty( $atts['id'] ) ) { + $atts['id'] = 'id="' . esc_attr( sanitize_html_class( $atts['id'] ) ) . '" '; + } + + $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] ); + + $html5 = current_theme_supports( 'html5', 'caption' ); + // HTML5 captions never added the extra 10px to the image width + $width = $html5 ? $atts['width'] : ( 10 + $atts['width'] ); + + /** + * Filters the width of an image's caption. + * + * By default, the caption is 10 pixels greater than the width of the image, + * to prevent post content from running up against a floated image. + * + * @since 3.7.0 + * + * @see img_caption_shortcode() + * + * @param int $width Width of the caption in pixels. To remove this inline style, + * return zero. + * @param array $atts Attributes of the caption shortcode. + * @param string $content The image element, possibly wrapped in a hyperlink. + */ + $caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content ); + + $style = ''; + if ( $caption_width ) { + $style = 'style="width: ' . (int) $caption_width . 'px" '; + } + + if ( $html5 ) { + $html .= '
    ' . do_shortcode( $content ) . '
    ' . $atts['caption'] . '
    '; + } else { + $html .= '
    ' . do_shortcode( $content ) . '

    ' . $atts['caption'] . '

    '; + } + + return $html; +} + +add_filter( 'img_caption_shortcode', 'wpm_media_image', 10, 3 ); + + +/** + * Redeclare gallery code for translate caption text + * + * @param string $html + * @param array $attr + * @param $instance + * + * @return string + */ +function wpm_media_gallery( $html, $attr, $instance ) { + $post = get_post(); + $html5 = current_theme_supports( 'html5', 'gallery' ); + $atts = shortcode_atts( array( + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + 'id' => $post ? $post->ID : 0, + 'itemtag' => $html5 ? 'figure' : 'dl', + 'icontag' => $html5 ? 'div' : 'dt', + 'captiontag' => $html5 ? 'figcaption' : 'dd', + 'columns' => 3, + 'size' => 'thumbnail', + 'include' => '', + //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude + 'exclude' => '', + 'link' => '' + ), $attr, 'gallery' ); + + $id = (int)$atts['id']; + + if ( ! empty( $atts['include'] ) ) { + $_attachments = get_posts( array( 'include' => $atts['include'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); + + $attachments = array(); + foreach ( $_attachments as $key => $val ) { + $attachments[$val->ID] = wpm_translate_post( $_attachments[$key] ); + } + //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude + } elseif ( ! empty( $atts['exclude'] ) ) { + //phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude + $attachments = get_children( array( 'post_parent' => $id, 'exclude' => $atts['exclude'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); + } else { + $attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) ); + } + + if ( empty( $attachments ) ) { + return ''; + } + + if ( is_feed() ) { + $output = "\n"; + foreach ( $attachments as $att_id => $attachment ) { + $output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n"; + } + return $output; + } + + $itemtag = tag_escape( $atts['itemtag'] ); + $captiontag = tag_escape( $atts['captiontag'] ); + $icontag = tag_escape( $atts['icontag'] ); + $valid_tags = wp_kses_allowed_html( 'post' ); + if ( ! isset( $valid_tags[ $itemtag ] ) ) { + $itemtag = 'dl'; + } + if ( ! isset( $valid_tags[ $captiontag ] ) ) { + $captiontag = 'dd'; + } + if ( ! isset( $valid_tags[ $icontag ] ) ) { + $icontag = 'dt'; + } + + $columns = (int)$atts['columns']; + $itemwidth = $columns > 0 ? floor(100/$columns) : 100; + $float = is_rtl() ? 'right' : 'left'; + + $selector = "gallery-{$instance}"; + + $gallery_style = ''; + + /** + * Filters whether to print default gallery styles. + * + * @since 3.1.0 + * + * @param bool $print Whether to print default gallery styles. + * Defaults to false if the theme supports HTML5 galleries. + * Otherwise, defaults to true. + */ + if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) { + $gallery_style = " + \n\t\t"; + } + + $size_class = sanitize_html_class( $atts['size'] ); + $gallery_div = "\n"; + + return $output; +} + +add_filter( 'post_gallery', 'wpm_media_gallery', 10, 3 ); + + +/** + * Add lang class to body + * + * @param array $classes + * + * @return array + */ +function wpm_add_body_class( $classes ) { + $classes[] = 'language-' . wpm_get_language(); + + return $classes; +} + +add_filter( 'body_class', 'wpm_add_body_class' ); + + +/** + * Display language switcher in admin + */ +function wpm_admin_language_switcher() { + + $args = array( + 'languages' => wpm_get_languages(), + 'lang' => wpm_get_language(), + ); + + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Escaping is done in the respective template file + echo wpm_get_template( 'admin-language-switcher', '', '', $args ); +} + + +/** + * Display language switcher in customizer + */ +function wpm_admin_language_switcher_customizer() { + + $args = array( + 'languages' => wpm_get_languages(), + 'lang' => wpm_get_language(), + ); + + //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Escaping is done in the respective template file + echo wpm_get_template( 'admin-language-switcher', 'customizer', '', $args ); +} + + +/** + * Get flag list + * + * @since 2.0.0 + * + * @return array + */ +function wpm_get_flags() { + $flags = array(); + $flags_path = wpm_get_flags_path(); + if ( $dir_handle = @opendir( $flags_path ) ) { + while ( false !== ( $file = readdir( $dir_handle ) ) ) { + if ( preg_match( "/\.(jpeg|jpg|gif|png|svg)$/i", $file ) ) { + $flags[] = $file; + } + } + sort( $flags ); + } + + return $flags; +} + + +/** + * Show notice for strings that cant`t be translated for displaying in admin. + * + * @param bool $echo + * + * @return string + */ +function wpm_show_notice( $echo = true ) { + ?> + +
    +

    + + [:en]Text on english[:de]Text auf Deutsch[:] +

    +
    + + $item ) { - $result[ $k ] = wpm_translate_value( $item, $language ); - } - - return $result; - } - - return wpm_translate_string( $value, $language ); -} - -/** - * Transform multilingual string to multilingual array - * - * @param $string - * - * @return array|mixed|string - */ -function wpm_string_to_ml_array( $string ) { - if ( ! is_string( $string ) || $string === '' || is_serialized_string( $string ) || isJSON( $string ) ) { - return $string; - } - - $string = apply_filters( 'wpm_filter_string_to_ml_array', $string ); - $blocks = preg_split( '#\[:([a-z-]*)\]#im', $string, - 1, PREG_SPLIT_DELIM_CAPTURE ); - - if ( empty( $blocks ) ) { - return $string; - } - - $languages = wpm_get_lang_option(); - $result = array_fill_keys( array_keys( $languages ), '' ); - $language = count( $blocks ) === 1 ? wpm_get_default_language() : ''; - - foreach ( $blocks as $idx => $block ) { - // Every odd block contains the language of '[:language]'. - if ( $idx % 2 === 1 ) { - $language = $block; - } elseif ( isset( $result[ $language ] ) ) { - $result[ $language ] .= $block; - } - } - - return array_map( 'trim', $result ); -} - -/** - * Transform multidimensional array with multilingual strings to multidimensional array with multilingual arrays - * - * @param $value - * - * @return array|mixed|string - */ -function wpm_value_to_ml_array( $value ) { - if ( is_array( $value ) ) { - return array_map( 'wpm_value_to_ml_array', $value ); - } - - return wpm_string_to_ml_array( $value ); -} - -function wpm_ml_array_to_string( $strings ) { - - $string = ''; - - if ( ! wpm_is_ml_array( $strings ) ) { - return $string; - } - - $languages = wpm_get_lang_option(); - foreach ( $strings as $key => $value ) { - if ( ( '' !== $value ) && isset( $languages[ $key ] ) ) { - if ( wpm_is_ml_string( $value ) ) { - $string = wpm_translate_string( $string ); - } - $string .= '[:' . $key . ']' . trim( $value ); - } - } - - /* foreach ($languages as $key => $value) { - if(isset($strings[$key]) && $strings[$key]=="" && isset($strings['en']) && $strings['en']!=""){ - $trans_content = trim( $strings['en'] ); - $trans_content = wpm_ml_auto_translate_content($trans_content,'en',$key); - $string .= '[:' . $key . ']' . $trans_content; - } - } */ - if ( $string ) { - $string .= '[:]'; - } - return $string; -} - -/** - * Transform multidimensional array with multilingual arrays to multidimensional array with multilingual strings - * - * @param $value - * - * @return array|string - */ -function wpm_ml_value_to_string( $value ) { - - if ( is_array( $value ) && ! empty( $value ) ) { - - if ( wpm_is_ml_array( $value ) ) { - return wpm_ml_array_to_string( $value ); - } - - return array_map( 'wpm_ml_value_to_string', $value ); - } - - return $value; -} - -/** - * Set new value to multidimensional array with multilingual arrays by config - * - * @param $localize_array - * @param mixed $value - * @param array $config - * @param string $lang - * - * @return array|bool - */ -function wpm_set_language_value( $localize_array, $value, $config = array(), $lang = '' ) { - $languages = wpm_get_languages(); - $new_value = array(); - - if ( ! $lang || ! isset( $languages[ $lang ] ) ) { - $lang = wpm_get_language(); - } - - if ( is_array( $value ) && null !== $config ) { - foreach ( $value as $key => $item ) { - if ( isset( $config['wpm_each'] ) ) { - $config_key = $config['wpm_each']; - } else { - $config_key = ( isset( $config[ $key ] ) ? $config[ $key ] : null ); - } - - if ( ! isset( $localize_array[ $key ] ) ) { - $localize_array[ $key ] = array(); - } - - $new_value[ $key ] = wpm_set_language_value( $localize_array[ $key ], $value[ $key ], $config_key, $lang ); - } - } else { - if ( null !== $config && ! is_bool( $value ) ) { - - if ( wpm_is_ml_string( $value ) ) { - $value = wpm_translate_string( $value ); - } - - if ( wpm_is_ml_array( $localize_array ) ) { - $new_value = $localize_array; - $new_value[ $lang ] = $value; - } else { - if ( isJSON( $value ) || is_serialized_string( $value ) ) { - $new_value = $value; - } else { - $result = array_fill_keys( array_keys( $languages ), '' ); - $result[ $lang ] = $value; - $new_value = $result; - } - } - } else { - $new_value = $value; - } - }// End if(). - - return $new_value; -} - - -/** - * Translate WP object - * - * @param $object - * @param string $lang - * - * @return mixed - */ -function wpm_translate_object( $object, $lang = '' ) { - - foreach ( get_object_vars( $object ) as $key => $content ) { - switch ( $key ) { - case 'attr_title': - case 'post_title': - case 'name': - case 'title': - $object->$key = wpm_translate_string( $content, $lang ); - break; - case 'post_excerpt': - case 'description': - case 'post_content': - if ( is_serialized_string( $content ) ) { - $object->$key = serialize( wpm_translate_value( unserialize( $content ), $lang ) ); - break; - } - - if ( isJSON( $content ) ) { - $object->$key = wp_json_encode( wpm_translate_value( json_decode( $content, true ), $lang ) ); - break; - } - - if ( wpm_is_ml_string( $content ) ) { - $object->$key = wpm_translate_string( $content, $lang ); - break; - } - } - } - - return $object; -} - - -/** - * Translate post - * - * @param $post - * - * @param string $lang - * - * @return object WP_Post - */ -function wpm_translate_post( $post, $lang = '' ) { - - if ( ! is_object( $post ) || null === wpm_get_post_config( $post->post_type ) ) { - return $post; - } - - return wpm_translate_object( $post, $lang ); -} - - -/** - * Translate term - * - * @param $term - * - * @param $taxonomy - * - * @param string $lang - * - * @return object WP_Term - */ -function wpm_translate_term( $term, $taxonomy, $lang = '' ) { - - if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { - return $term; - } - - if ( is_object( $term ) ) { - return wpm_translate_object( $term, $lang ); - } - - if ( is_array( $term ) ) { - return wpm_translate_value( $term, $lang ); - } - - return $term; -} - - -/** - * Untranslate WP_Post object - * - * @param $post - * - * @return mixed - */ -function wpm_untranslate_post( $post ) { - if ( $post instanceof WP_Post ) { - global $wpdb; - $cache_key = 'wpm_posts_by_id_key'; - $orig_post = wp_cache_get($cache_key); - if( false === $orig_post ){ - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $orig_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->posts} WHERE ID = %d;", $post->ID ) ); - wp_cache_set( $cache_key, $orig_post ); - } - foreach ( get_object_vars( $post ) as $key => $content ) { - switch ( $key ) { - case 'post_title': - case 'post_content': - case 'post_excerpt': - $post->$key = $orig_post->$key; - break; - } - } - } - - return $post; -} - -/** - * Check if array is multilingual - * - * @param $array - * - * @return bool - */ -function wpm_is_ml_array( $array ) { - - if ( ! is_array( $array ) || wp_is_numeric_array( $array ) ) { - return false; - } - - $languages = wpm_get_lang_option(); - - foreach ( $array as $key => $item ) { - if ( ! isset( $languages[ $key ] ) ) { - return false; - } - } - - return true; -} - -/** - * Check if string is multilingual - * - * @param $string - * - * @return bool - */ -function wpm_is_ml_string( $string ) { - if ( ! is_string( $string ) || is_serialized_string( $string ) || isJSON( $string ) ) { - return false; - } - - return preg_match( '#\[:[a-z-]+\]#im', $string ); -} - -/** - * Check if value with multilingual strings - * - * @param $value - * - * @return bool - */ -function wpm_is_ml_value( $value ) { - - if ( is_array( $value ) && ! empty( $value ) ) { - foreach ( $value as $item ) { - if ( wpm_is_ml_value( $item ) ) { - return true; - } - } - - return false; - } - - return wpm_is_ml_string( $value ); -} - -/** - * Set new data to value - * - * @param $old_value - * @param $new_value - * @param array $config - * @param string $lang - * - * @return array|bool|string - */ -function wpm_set_new_value( $old_value, $new_value, $config = array(), $lang = '' ) { - - if ( is_bool( $new_value ) ) { - return $new_value; - } - - if ( is_serialized_string( $old_value ) || isJSON( $old_value ) ) { - return $old_value; - } - - $old_value = wpm_value_to_ml_array( $old_value ); - - if ( wpm_is_ml_array( $old_value ) ) { - foreach ($old_value as $key => $lang_value) { - if ( strpos($lang_value, '{"') || strpos($lang_value, ':{"') || strpos($lang_value, '""') || strpos($lang_value, '":"') ) { - $old_value[ $key ] = wp_slash( $lang_value ); - } - } - } - - $value = wpm_set_language_value( $old_value, $new_value, $config, $lang ); - $value = wpm_ml_value_to_string( $value ); - - return $value; -} - -/** - * Filter content if WP Githun MD plugin is active and string contains any tags - * https://github.com/ahmedkaludi/wp-multilang/issues/99 - * @param $string string - * @return $string string - * @since 2.4.14 - * */ -add_filter( 'wpm_filter_string_to_ml_array', 'wpm_filter_string_for_github_md_plugin' ); -function wpm_filter_string_for_github_md_plugin( $string ) { - - $flag = 0; - - if ( in_array( 'githuber-md/githuber-md.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ), true ) ) ) { - // Check if string contains tag and it's post markdown option is enabled - if ( strpos( $string, '' ) !== false ) { - $flag = 1; - } - } - - if ( $flag == 0 ) { - $string = htmlspecialchars_decode( $string ); - } - - return $string; + $item ) { + $result[ $k ] = wpm_translate_value( $item, $language ); + } + + return $result; + } + + return wpm_translate_string( $value, $language ); +} + +/** + * Transform multilingual string to multilingual array + * + * @param $string + * + * @return array|mixed|string + */ +function wpm_string_to_ml_array( $string ) { + if ( ! is_string( $string ) || $string === '' || is_serialized_string( $string ) || isJSON( $string ) ) { + return $string; + } + + $string = apply_filters( 'wpm_filter_string_to_ml_array', $string ); + $blocks = preg_split( '#\[:([a-z-]*)\]#im', $string, - 1, PREG_SPLIT_DELIM_CAPTURE ); + + if ( empty( $blocks ) ) { + return $string; + } + + $languages = wpm_get_lang_option(); + $result = array_fill_keys( array_keys( $languages ), '' ); + $language = count( $blocks ) === 1 ? wpm_get_default_language() : ''; + + foreach ( $blocks as $idx => $block ) { + // Every odd block contains the language of '[:language]'. + if ( $idx % 2 === 1 ) { + $language = $block; + } elseif ( isset( $result[ $language ] ) ) { + $result[ $language ] .= $block; + } + } + + return array_map( 'trim', $result ); +} + +/** + * Transform multidimensional array with multilingual strings to multidimensional array with multilingual arrays + * + * @param $value + * + * @return array|mixed|string + */ +function wpm_value_to_ml_array( $value ) { + if ( is_array( $value ) ) { + return array_map( 'wpm_value_to_ml_array', $value ); + } + + return wpm_string_to_ml_array( $value ); +} + +function wpm_ml_array_to_string( $strings ) { + + $string = ''; + + if ( ! wpm_is_ml_array( $strings ) ) { + return $string; + } + + $languages = wpm_get_lang_option(); + foreach ( $strings as $key => $value ) { + if ( ( '' !== $value ) && isset( $languages[ $key ] ) ) { + if ( wpm_is_ml_string( $value ) ) { + $string = wpm_translate_string( $string ); + } + $string .= '[:' . $key . ']' . trim( $value ); + } + } + + /* foreach ($languages as $key => $value) { + if(isset($strings[$key]) && $strings[$key]=="" && isset($strings['en']) && $strings['en']!=""){ + $trans_content = trim( $strings['en'] ); + $trans_content = wpm_ml_auto_translate_content($trans_content,'en',$key); + $string .= '[:' . $key . ']' . $trans_content; + } + } */ + if ( $string ) { + $string .= '[:]'; + } + return $string; +} + +/** + * Transform multidimensional array with multilingual arrays to multidimensional array with multilingual strings + * + * @param $value + * + * @return array|string + */ +function wpm_ml_value_to_string( $value ) { + + if ( is_array( $value ) && ! empty( $value ) ) { + + if ( wpm_is_ml_array( $value ) ) { + return wpm_ml_array_to_string( $value ); + } + + return array_map( 'wpm_ml_value_to_string', $value ); + } + + return $value; +} + +/** + * Set new value to multidimensional array with multilingual arrays by config + * + * @param $localize_array + * @param mixed $value + * @param array $config + * @param string $lang + * + * @return array|bool + */ +function wpm_set_language_value( $localize_array, $value, $config = array(), $lang = '' ) { + $languages = wpm_get_languages(); + $new_value = array(); + + if ( ! $lang || ! isset( $languages[ $lang ] ) ) { + $lang = wpm_get_language(); + } + + if ( is_array( $value ) && null !== $config ) { + foreach ( $value as $key => $item ) { + if ( isset( $config['wpm_each'] ) ) { + $config_key = $config['wpm_each']; + } else { + $config_key = ( isset( $config[ $key ] ) ? $config[ $key ] : null ); + } + + if ( ! isset( $localize_array[ $key ] ) ) { + $localize_array[ $key ] = array(); + } + + $new_value[ $key ] = wpm_set_language_value( $localize_array[ $key ], $value[ $key ], $config_key, $lang ); + } + } else { + if ( null !== $config && ! is_bool( $value ) ) { + + if ( wpm_is_ml_string( $value ) ) { + $value = wpm_translate_string( $value ); + } + + if ( wpm_is_ml_array( $localize_array ) ) { + $new_value = $localize_array; + $new_value[ $lang ] = $value; + } else { + if ( isJSON( $value ) || is_serialized_string( $value ) ) { + $new_value = $value; + } else { + $result = array_fill_keys( array_keys( $languages ), '' ); + $result[ $lang ] = $value; + $new_value = $result; + } + } + } else { + $new_value = $value; + } + }// End if(). + + return $new_value; +} + + +/** + * Translate WP object + * + * @param $object + * @param string $lang + * + * @return mixed + */ +function wpm_translate_object( $object, $lang = '' ) { + + foreach ( get_object_vars( $object ) as $key => $content ) { + switch ( $key ) { + case 'attr_title': + case 'post_title': + case 'name': + case 'title': + $object->$key = wpm_translate_string( $content, $lang ); + break; + case 'post_excerpt': + case 'description': + case 'post_content': + if ( is_serialized_string( $content ) ) { + $object->$key = serialize( wpm_translate_value( unserialize( $content ), $lang ) ); + break; + } + + if ( isJSON( $content ) ) { + $object->$key = wp_json_encode( wpm_translate_value( json_decode( $content, true ), $lang ) ); + break; + } + + if ( wpm_is_ml_string( $content ) ) { + $object->$key = wpm_translate_string( $content, $lang ); + break; + } + } + } + + return $object; +} + + +/** + * Translate post + * + * @param $post + * + * @param string $lang + * + * @return object WP_Post + */ +function wpm_translate_post( $post, $lang = '' ) { + + if ( ! is_object( $post ) || null === wpm_get_post_config( $post->post_type ) ) { + return $post; + } + + return wpm_translate_object( $post, $lang ); +} + + +/** + * Translate term + * + * @param $term + * + * @param $taxonomy + * + * @param string $lang + * + * @return object WP_Term + */ +function wpm_translate_term( $term, $taxonomy, $lang = '' ) { + + if ( null === wpm_get_taxonomy_config( $taxonomy ) ) { + return $term; + } + + if ( is_object( $term ) ) { + return wpm_translate_object( $term, $lang ); + } + + if ( is_array( $term ) ) { + return wpm_translate_value( $term, $lang ); + } + + return $term; +} + + +/** + * Untranslate WP_Post object + * + * @param $post + * + * @return mixed + */ +function wpm_untranslate_post( $post ) { + if ( $post instanceof WP_Post ) { + global $wpdb; + $cache_key = 'wpm_posts_by_id_key_'.$post->ID; + $orig_post = wp_cache_get($cache_key); + if( false === $orig_post ){ + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $orig_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->posts} WHERE ID = %d;", $post->ID ) ); + wp_cache_set( $cache_key, $orig_post ); + } + foreach ( get_object_vars( $post ) as $key => $content ) { + switch ( $key ) { + case 'post_title': + case 'post_content': + case 'post_excerpt': + $post->$key = $orig_post->$key; + break; + } + } + } + + return $post; +} + +/** + * Check if array is multilingual + * + * @param $array + * + * @return bool + */ +function wpm_is_ml_array( $array ) { + + if ( ! is_array( $array ) || wp_is_numeric_array( $array ) ) { + return false; + } + + $languages = wpm_get_lang_option(); + + foreach ( $array as $key => $item ) { + if ( ! isset( $languages[ $key ] ) ) { + return false; + } + } + + return true; +} + +/** + * Check if string is multilingual + * + * @param $string + * + * @return bool + */ +function wpm_is_ml_string( $string ) { + if ( ! is_string( $string ) || is_serialized_string( $string ) || isJSON( $string ) ) { + return false; + } + + return preg_match( '#\[:[a-z-]+\]#im', $string ); +} + +/** + * Check if value with multilingual strings + * + * @param $value + * + * @return bool + */ +function wpm_is_ml_value( $value ) { + + if ( is_array( $value ) && ! empty( $value ) ) { + foreach ( $value as $item ) { + if ( wpm_is_ml_value( $item ) ) { + return true; + } + } + + return false; + } + + return wpm_is_ml_string( $value ); +} + +/** + * Set new data to value + * + * @param $old_value + * @param $new_value + * @param array $config + * @param string $lang + * + * @return array|bool|string + */ +/** + * Recursively sanitize arrays and strings using wp_kses_post. + * + * @param mixed $value + * @return mixed + */ +function wpm_kses_post_deep( $value ) { + if ( is_array( $value ) ) { + return array_map( 'wpm_kses_post_deep', $value ); + } + + return is_string( $value ) ? wp_kses_post( $value ) : $value; +} + +function wpm_set_new_value( $old_value, $new_value, $config = array(), $lang = '' ) { + + if ( is_bool( $new_value ) ) { + return $new_value; + } + + if ( is_serialized_string( $old_value ) || isJSON( $old_value ) ) { + return $old_value; + } + + if ( function_exists( 'current_user_can' ) && ! current_user_can( 'unfiltered_html' ) ) { + $new_value = wpm_kses_post_deep( $new_value ); + } + + $old_value = wpm_value_to_ml_array( $old_value ); + + if ( wpm_is_ml_array( $old_value ) ) { + $is_post_save = doing_filter( 'wp_insert_post_data' ) || doing_filter( 'wp_insert_attachment_data' ); + foreach ($old_value as $key => $lang_value) { + if ( is_string( $lang_value ) ) { + if ( $is_post_save || strpos($lang_value, '{"') || strpos($lang_value, ':{"') || strpos($lang_value, '""') || strpos($lang_value, '":"') ) { + $old_value[ $key ] = wp_slash( $lang_value ); + } + } + } + } + + $value = wpm_set_language_value( $old_value, $new_value, $config, $lang ); + $value = wpm_ml_value_to_string( $value ); + + return $value; +} + +/** + * Filter content if WP Githun MD plugin is active and string contains any tags + * https://github.com/ahmedkaludi/wp-multilang/issues/99 + * @param $string string + * @return $string string + * @since 2.4.14 + * */ +add_filter( 'wpm_filter_string_to_ml_array', 'wpm_filter_string_for_github_md_plugin' ); +function wpm_filter_string_for_github_md_plugin( $string ) { + + if ( in_array( 'githuber-md/githuber-md.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ), true ) ) ) { + // Check if string contains tag and it's post markdown option is enabled + if ( strpos( $string, '' ) !== false ) { + return $string; + } + } + + // Checks if any html attribute contains json data and skips + if ( in_array( 'slider-blocks/slider-blocks.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ), true ) ) ) { + if ( preg_match( '/=\s*["\'][^"\']*"/i', $string ) ) { + $string = str_replace( + [ '&', ''', '<', '>' ], + [ '&', "'", '<', '>' ], + $string + ); + return $string; + } + } + return $string; +} + + +/** + * Transform multilingual array to multilingual string + * + * @param $strings + * + * @return string + * @since 1.4 + */ +if ( ! function_exists( 'wpm_ml_get_language_string' ) ) { + function wpm_ml_get_language_string( $string,$source ) { + if( preg_match( '/\[:'.$source.'\](.*?)\[:/si', $string, $matches ) ) { + if( isset( $matches[1] ) ) { + $string = $matches[1]; + } + } + return $string; + } +} + +if ( ! function_exists( 'wpm_ml_check_language_string' ) ) { + function wpm_ml_check_language_string( $string, $source ) { + $is_exist = false; + if( preg_match( '/\[:'.$source.'\](.*?)\[:/si', $string ) ) { + $is_exist = true; + } + return $is_exist; + } +} + +if ( ! function_exists( 'wpm_ml_log_message' ) ) { + function wpm_ml_log_message( $message, $level = 'info' ) { + $log_file = WP_CONTENT_DIR . '/wpm_translation.log'; + $timestamp = current_time('Y-m-d H:i:s'); + $log_entry = "[{$timestamp}] [{$level}] {$message}" . PHP_EOL; + file_put_contents( $log_file, $log_entry, FILE_APPEND | LOCK_EX ); + } +} + +if ( ! function_exists( 'wpm_ml_is_untranslatable' ) ) { + /** + * Check if a string doesn't need translation (numbers, symbols, template tags, etc.) + * + * @param string $string + * @return bool + * @since 2.4.30 + */ + function wpm_ml_is_untranslatable( $string ) { + $trimmed = trim( $string ); + if ( $trimmed === '' ) return true; + if ( preg_match( '/^[\d\s.,+\-:;\/\\\\]+$/', $trimmed ) ) return true; + if ( mb_strlen( $trimmed ) <= 1 ) return true; + if ( preg_match( '/^\{[^}]+\}$/', $trimmed ) ) return true; + if ( preg_match( '/^[㎡㎥㎏℃℉%°²³]+$/u', $trimmed ) ) return true; + return false; + } +} + +if ( ! function_exists( 'wpm_ml_batch_translate' ) ) { + /** + * Translate an array of strings in a single API call using a separator. + * Falls back to individual calls if the API doesn't preserve the separator. + * + * @param array $strings Indexed array of strings to translate. + * @param string $source Source language code. + * @param string $target Target language code. + * @return array Indexed array of translated strings (same order/count as input). + * @since 2.4.30 + */ + function wpm_ml_batch_translate( array $strings, $source, $target ) { + if ( empty( $strings ) ) { + return $strings; + } + + $separator = "\n|||WPM_SEP|||\n"; + $max_batch_len = 8000; + + $batches = array(); + $current = array(); + $current_len = 0; + + foreach ( $strings as $s ) { + $add_len = strlen( $s ) + strlen( $separator ); + if ( $current_len + $add_len > $max_batch_len && ! empty( $current ) ) { + $batches[] = $current; + $current = array(); + $current_len = 0; + } + $current[] = $s; + $current_len += $add_len; + } + if ( ! empty( $current ) ) { + $batches[] = $current; + } + + $all_translated = array(); + + foreach ( $batches as $batch ) { + $combined = implode( $separator, $batch ); + $translated = wpm_ml_auto_fetch_translation( $combined, $source, $target ); + + if ( $translated && $translated !== 'false' ) { + $parts = explode( '|||WPM_SEP|||', $translated ); + $parts = array_map( 'trim', $parts ); + + if ( count( $parts ) === count( $batch ) ) { + foreach ( $parts as $i => $p ) { + $all_translated[] = ( $p !== '' && $p !== 'false' ) ? $p : $batch[ $i ]; + } + } else { + wpm_ml_log_message( sprintf( + 'Batch separator mismatch: expected %d, got %d. Falling back to individual calls.', + count( $batch ), count( $parts ) + ), 'warning' ); + foreach ( $batch as $single ) { + $t = wpm_ml_auto_fetch_translation( $single, $source, $target ); + $all_translated[] = ( $t && $t !== 'false' ) ? $t : $single; + } + } + } else { + foreach ( $batch as $single ) { + $t = wpm_ml_auto_fetch_translation( $single, $source, $target ); + $all_translated[] = ( $t && $t !== 'false' ) ? $t : $single; + } + } + } + + return $all_translated; + } +} + +if ( ! function_exists( 'wpm_ml_auto_translate_content' ) ) { + function wpm_ml_auto_translate_content( $string, $source, $target, $batch_start = 0, $batch_size = 100 ) { + if ( $string == "" ) { + return $string; + } + + libxml_use_internal_errors( true ); + + // Plain text (no HTML tags) + if ( preg_match( '/<[^>]+>/', $string ) !== 1 ) { + + if ( wpm_ml_is_untranslatable( $string ) ) { + return $string; + } + + $words = explode( ' ', $string ); + $chunks = array_chunk( $words, 500 ); + + if ( count( $chunks ) <= 1 ) { + $t_text = wpm_ml_auto_fetch_translation( $string, $source, $target ); + return $t_text ? $t_text : $string; + } + + $chunk_strings = array_map( function( $chunk ) { + return implode( ' ', $chunk ); + }, $chunks ); + + wpm_ml_log_message( sprintf( 'Plain-text batching: %d chunks via batch_translate', count( $chunk_strings ) ) ); + $translated_chunks = wpm_ml_batch_translate( $chunk_strings, $source, $target ); + return implode( ' ', $translated_chunks ); + } + + // HTML content + $dom = new DOMDocument( '1.0', 'UTF-8' ); + $isHTML = $dom->loadHTML( '' . $string, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD ); + libxml_clear_errors(); + + if ( ! $isHTML ) { + return $string; + } + + $xpath = new DOMXPath( $dom ); + $text_nodes = $xpath->query( '//text()[normalize-space() and not(ancestor::script or ancestor::style or ancestor::noscript or ancestor::iframe)]' ); + $total_nodes = $text_nodes->length; + + if ( $batch_start === 0 && $batch_size === 0 ) { + return array( 'total_nodes' => $total_nodes ); + } + + $enable_logging = apply_filters( 'wpm_ml_translation_debug_log', true ); + wpm_ml_log_message( sprintf( 'HTML batching: %d total text nodes', $total_nodes ) ); + + // Collect all translatable text nodes in one pass + $translatable_keys = array(); + $translatable_texts = array(); + $original_values = array(); + $node_count = 0; + $collected = 0; + + foreach ( $text_nodes as $key => $node ) { + $node_count++; + + if ( $node_count <= $batch_start ) { + continue; + } + if ( $collected >= $batch_size ) { + break; + } + + $node_value = is_string( $node->nodeValue ) ? $node->nodeValue : ''; + $source_text = wpm_ml_remove_special_characters( $node_value ); + + if ( wpm_ml_is_untranslatable( $source_text ) ) { + continue; + } + + $translatable_keys[] = $key; + $translatable_texts[] = $source_text; + $original_values[] = $node_value; + $collected++; + } + + if ( empty( $translatable_texts ) ) { + $final_html = $dom->saveHTML(); + return str_replace( '', '', $final_html ); + } + + wpm_ml_log_message( sprintf( 'Sending %d text nodes in batched API call(s) (skipped %d untranslatable)', + count( $translatable_texts ), $total_nodes - count( $translatable_texts ) ) ); + + // Translate all collected texts in batched API calls + try { + $translated_texts = wpm_ml_batch_translate( $translatable_texts, $source, $target ); + } catch ( \Throwable $e ) { + if ( $enable_logging ) { + wpm_ml_log_message( sprintf( 'Batch translation error: %s', $e->getMessage() ), 'error' ); + } + $translated_texts = $translatable_texts; + } + + // Map translations back to DOM nodes + foreach ( $translatable_keys as $i => $dom_key ) { + $translated = isset( $translated_texts[ $i ] ) ? $translated_texts[ $i ] : $original_values[ $i ]; + $translated = wpm_ml_add_special_characters( $translated ); + + foreach ( $text_nodes as $nk => $node ) { + if ( $nk === $dom_key ) { + $node->nodeValue = $translated; + break; + } + } + } + + $final_html = $dom->saveHTML(); + if ( strpos( $final_html, '' ) === 0 ) { + $final_html = str_replace( '', '', $final_html ); + } + return $final_html; + } +} + +if ( ! function_exists( 'wpm_ml_auto_fetch_translation' ) ) { + function wpm_ml_auto_fetch_translation( $string, $source, $target ) { + + if( $string == "" || $source == $target || $source == "" || $target == "" ) { + return false; + } + + + if ( wpm_is_pro_active() ) { + $string = apply_filters( 'wpmpro_auto_translate_content', $string, $source, $target ); + return $string; + } + + $ai_settings = array(); + $ai_settings = WPM_Settings_AI_Integration::get_openai_settings(); + $enable_logging = apply_filters( 'wpm_ml_translation_debug_log', true ); + + switch ( $ai_settings['api_provider'] ) { + + case 'openai': + + if ( ! empty( $ai_settings['api_keys']['openai'] ) ) { + try { + $string = WPM_OpenAI::translate_content( $string, $source, $target, $ai_settings ); + } catch ( \Throwable $e ) { + if ( $enable_logging ) { + wpm_ml_log_message( sprintf('Error in openAI translation: %s', $e->getMessage()), 'error' ); + } + } + } + + break; + + case 'deepl': + + if ( ! empty( $ai_settings['deepl_secret_key'] ) ) { + try { + $string = WPM_Deepl::translate_content( $string, $source, $target, $ai_settings ); + } catch ( \Throwable $e ) { + if ( $enable_logging ) { + wpm_ml_log_message( sprintf('Error in openAI translation: %s', $e->getMessage()), 'error' ); + } + } + } + + break; + + } + + return $string; + + } +} + +if ( ! function_exists( 'wpm_ml_remove_special_characters' ) ) { + function wpm_ml_remove_special_characters( $string = '' ){ + if( $string ){ + + $find = ['|']; + + $tokens = ['_PIPE_TOKEN_']; + + $stringWithToken = str_replace( $find, $tokens, $string ); + + return $stringWithToken; + } + + return ''; + } +} + +if ( ! function_exists( 'wpm_ml_add_special_characters' ) ) { + function wpm_ml_add_special_characters( $string = '' ){ + if( $string ){ + + $tokens = ['_PIPE_TOKEN_']; + + $replace = ['|']; + + $stringWithoutToken = str_replace( $tokens, $replace, $string ); + + return $stringWithoutToken; + + } + + return ''; + } +} + +function wpm_is_pro_active(){ + + $is_active = is_plugin_active( 'wp-multilang-pro/wp-multilang-pro.php' ); + return $is_active; + } \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/includes/wpm-update-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-update-functions.php index dd1731113..90a1fd2e0 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-update-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-update-functions.php @@ -1,183 +1,183 @@ - $language ) { - $language['date'] = $language['date'] ? $language['date'] : ''; - $language['time'] = $language['time'] ? $language['time'] : ''; - $updated_languages[ $locale ] = $language; - } - - update_option( 'wpm_languages', $updated_languages ); - WPM_Setup::set_option( 'languages', $updated_languages ); -} - -/** - * Update DB Version. - */ -function wpm_update_178_db_version() { - WPM_Install::update_db_version( '1.7.8' ); -} - -/** - * Update language flag - */ -function wpm_update_180_flags() { - $updated_languages = array(); - - foreach ( wpm_get_languages() as $locale => $language ) { - $language['flag'] = $language['flag'] . '.png'; - $updated_languages[ $locale ] = $language; - } - - update_option( 'wpm_languages', $updated_languages ); - WPM_Setup::set_option( 'languages', $updated_languages ); -} - -/** - * Update DB Version. - */ -function wpm_update_180_db_version() { - WPM_Install::update_db_version( '1.8.0' ); -} - -/** - * Update language flag - */ -function wpm_update_200_options() { - - $updated_languages = array(); - - foreach ( get_option( 'wpm_languages', array() ) as $locale => $language ) { - if ( isset( $language['slug'] ) ) { - $code = $language['slug']; - $updated_languages[ $code ] = array( - 'enable' => $language['enable'], - 'locale' => $locale, - 'name' => $language['name'], - 'translation' => $locale, - 'date' => $language['date'], - 'time' => $language['time'], - 'flag' => $language['flag'], - ); - } - } - - if ( $updated_languages ) { - update_option( 'wpm_languages', $updated_languages ); - WPM_Setup::set_option( 'languages', $updated_languages ); - } -} - -/** - * Update DB Version. - */ -function wpm_update_200_db_version() { - WPM_Install::update_db_version( '2.0.0' ); -} - -/** - * Delete configs from base. Move configs to cache. - */ -function wpm_update_210_delete_config() { - delete_option( 'wpm_config' ); -} - -/** - * Update DB Version. - */ -function wpm_update_210_db_version() { - WPM_Install::update_db_version( '2.1.0' ); -} - -/** - * Change options value. - */ -function wpm_update_211_change_options() { - $options = array( - 'wpm_show_untranslated_strings', - 'wpm_use_redirect', - 'wpm_use_prefix', - 'wpm_uninstall_translations', - ); - - foreach ( $options as $option ) { - $value = get_option( $option ); - update_option( $option, 1 == $value ? 'yes' : 'no' ); - } -} - -/** - * Update DB Version. - */ -function wpm_update_211_db_version() { - WPM_Install::update_db_version( '2.1.1' ); -} - -/** - * Change syntax for term and post title. - */ -function wpm_update_214_change_syntax() { - global $wpdb; - - //Replace '' and '{:xx}' by '[:xx]'. - $adjust_syntax = function( $value ) { - $value = preg_replace('##im', '[$1]', $value ); - $value = preg_replace('#{(:[a-z-]*)}#im', '[$1]', $value ); - return $value; - }; - - $cache_key = 'wpm_post_title_cache_key'; - $results = wp_cache_get( $cache_key ); - if ( false === $results ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason since we are getting the all translated data using wordpress core function will get only translated language data. - $results = $wpdb->get_results( "SELECT ID, post_title FROM {$wpdb->posts} WHERE post_title LIKE '%{:__}%' OR post_title LIKE '%%';" ); - wp_cache_set( $cache_key, $results ); - } - - foreach ( $results as $result ) { - $post_title = $adjust_syntax( $result->post_title ); - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $wpdb->update( $wpdb->posts, array( 'post_title' => $post_title ), array( 'ID' => $result->ID ) ); - } - - $cache_key = 'wpm_term_name_cache_key'; - $results = wp_cache_get( $cache_key ); - if ( false === $results ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason since we are getting the all translated data using wordpress core function will get only translated language data. - $results = $wpdb->get_results( "SELECT term_id, `name` FROM {$wpdb->terms} WHERE `name` LIKE '%{:__}%' OR `name` LIKE '%%';" ); - wp_cache_set( $cache_key, $results ); - } - - foreach ( $results as $result ) { - $name = $adjust_syntax( $result->name ); - //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - $wpdb->update( $wpdb->terms, array( 'name' => $name ), array( 'term_id' => $result->term_id ) ); - } -} - -/** - * Update DB Version. - */ -function wpm_update_214_db_version() { - WPM_Install::update_db_version( '2.1.4' ); -} + $language ) { + $language['date'] = $language['date'] ? $language['date'] : ''; + $language['time'] = $language['time'] ? $language['time'] : ''; + $updated_languages[ $locale ] = $language; + } + + update_option( 'wpm_languages', $updated_languages ); + WPM_Setup::set_option( 'languages', $updated_languages ); +} + +/** + * Update DB Version. + */ +function wpm_update_178_db_version() { + WPM_Install::update_db_version( '1.7.8' ); +} + +/** + * Update language flag + */ +function wpm_update_180_flags() { + $updated_languages = array(); + + foreach ( wpm_get_languages() as $locale => $language ) { + $language['flag'] = $language['flag'] . '.png'; + $updated_languages[ $locale ] = $language; + } + + update_option( 'wpm_languages', $updated_languages ); + WPM_Setup::set_option( 'languages', $updated_languages ); +} + +/** + * Update DB Version. + */ +function wpm_update_180_db_version() { + WPM_Install::update_db_version( '1.8.0' ); +} + +/** + * Update language flag + */ +function wpm_update_200_options() { + + $updated_languages = array(); + + foreach ( get_option( 'wpm_languages', array() ) as $locale => $language ) { + if ( isset( $language['slug'] ) ) { + $code = $language['slug']; + $updated_languages[ $code ] = array( + 'enable' => $language['enable'], + 'locale' => $locale, + 'name' => $language['name'], + 'translation' => $locale, + 'date' => $language['date'], + 'time' => $language['time'], + 'flag' => $language['flag'], + ); + } + } + + if ( $updated_languages ) { + update_option( 'wpm_languages', $updated_languages ); + WPM_Setup::set_option( 'languages', $updated_languages ); + } +} + +/** + * Update DB Version. + */ +function wpm_update_200_db_version() { + WPM_Install::update_db_version( '2.0.0' ); +} + +/** + * Delete configs from base. Move configs to cache. + */ +function wpm_update_210_delete_config() { + delete_option( 'wpm_config' ); +} + +/** + * Update DB Version. + */ +function wpm_update_210_db_version() { + WPM_Install::update_db_version( '2.1.0' ); +} + +/** + * Change options value. + */ +function wpm_update_211_change_options() { + $options = array( + 'wpm_show_untranslated_strings', + 'wpm_use_redirect', + 'wpm_use_prefix', + 'wpm_uninstall_translations', + ); + + foreach ( $options as $option ) { + $value = get_option( $option ); + update_option( $option, 1 == $value ? 'yes' : 'no' ); + } +} + +/** + * Update DB Version. + */ +function wpm_update_211_db_version() { + WPM_Install::update_db_version( '2.1.1' ); +} + +/** + * Change syntax for term and post title. + */ +function wpm_update_214_change_syntax() { + global $wpdb; + + //Replace '' and '{:xx}' by '[:xx]'. + $adjust_syntax = function( $value ) { + $value = preg_replace('##im', '[$1]', $value ); + $value = preg_replace('#{(:[a-z-]*)}#im', '[$1]', $value ); + return $value; + }; + + $cache_key = 'wpm_post_title_cache_key'; + $results = wp_cache_get( $cache_key ); + if ( false === $results ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason since we are getting the all translated data using wordpress core function will get only translated language data. + $results = $wpdb->get_results( "SELECT ID, post_title FROM {$wpdb->posts} WHERE post_title LIKE '%{:__}%' OR post_title LIKE '%%';" ); + wp_cache_set( $cache_key, $results ); + } + + foreach ( $results as $result ) { + $post_title = $adjust_syntax( $result->post_title ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $wpdb->update( $wpdb->posts, array( 'post_title' => $post_title ), array( 'ID' => $result->ID ) ); + } + + $cache_key = 'wpm_term_name_cache_key'; + $results = wp_cache_get( $cache_key ); + if ( false === $results ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery --Reason since we are getting the all translated data using wordpress core function will get only translated language data. + $results = $wpdb->get_results( "SELECT term_id, `name` FROM {$wpdb->terms} WHERE `name` LIKE '%{:__}%' OR `name` LIKE '%%';" ); + wp_cache_set( $cache_key, $results ); + } + + foreach ( $results as $result ) { + $name = $adjust_syntax( $result->name ); + //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->update( $wpdb->terms, array( 'name' => $name ), array( 'term_id' => $result->term_id ) ); + } +} + +/** + * Update DB Version. + */ +function wpm_update_214_db_version() { + WPM_Install::update_db_version( '2.1.4' ); +} diff --git a/plugins/wp-react-custom-multilang/includes/wpm-widget-block-editor.php b/plugins/wp-react-custom-multilang/includes/wpm-widget-block-editor.php index 719a88998..bb3a7682a 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-widget-block-editor.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-widget-block-editor.php @@ -1,79 +1,79 @@ -id_base ); - - if ( null === $widget_config ) { - return $instance; - } - - $instance = wpm_set_new_value( $old_instance, $new_instance, $widget_config ); - - return $instance; -} - - -/** - * Update translated text in widget block editor - * @since 2.4.5 - */ -add_filter('rest_prepare_widget', 'wpm_translate_widget_block_in_editor',10,3); - -function wpm_translate_widget_block_in_editor($response, $widget, $request){ - if(is_object($response) && isset($response->data)){ - $data = $response->data; - if(is_array($data)){ - if(isset($data['instance']) && isset($data['instance']['raw']) && isset($data['instance']['raw']['content'])){ - $content = $data['instance']['raw']['content']; - $content = wpm_translate_value($content); - $response->data['instance']['raw']['content'] = $content; - } - - } - - } - return $response; -} - -add_action('enqueue_block_editor_assets', 'add_language_switcher_to_widget'); -function add_language_switcher_to_widget() -{ - $screen = get_current_screen(); - if(is_object($screen) && isset($screen->id)){ - $screen_id = $screen->id; - if($screen_id == 'widgets'){ - $script = " - (function( $ ) { - $(window).on('pageshow',function(){ - if ($('#wpm-language-switcher').length === 0) { - var language_switcher = wp.template( 'wpm-ls-customizer' ); - if($('.edit-widgets-header__title').length > 0 ){ - $('.edit-widgets-header__title').before(language_switcher); - } - } - }); - })( jQuery ); - "; - wp_add_inline_script( 'wp-edit-widgets', $script ); - add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); - } - } -} +id_base ); + + if ( null === $widget_config ) { + return $instance; + } + + $instance = wpm_set_new_value( $old_instance, $new_instance, $widget_config ); + + return $instance; +} + + +/** + * Update translated text in widget block editor + * @since 2.4.5 + */ +add_filter('rest_prepare_widget', 'wpm_translate_widget_block_in_editor',10,3); + +function wpm_translate_widget_block_in_editor($response, $widget, $request){ + if(is_object($response) && isset($response->data)){ + $data = $response->data; + if(is_array($data)){ + if(isset($data['instance']) && isset($data['instance']['raw']) && isset($data['instance']['raw']['content'])){ + $content = $data['instance']['raw']['content']; + $content = wpm_translate_value($content); + $response->data['instance']['raw']['content'] = $content; + } + + } + + } + return $response; +} + +add_action('enqueue_block_editor_assets', 'add_language_switcher_to_widget'); +function add_language_switcher_to_widget() +{ + $screen = get_current_screen(); + if(is_object($screen) && isset($screen->id)){ + $screen_id = $screen->id; + if($screen_id == 'widgets'){ + $script = " + (function( $ ) { + $(window).on('pageshow',function(){ + if ($('#wpm-language-switcher').length === 0) { + var language_switcher = wp.template( 'wpm-ls-customizer' ); + if($('.edit-widgets-header__title').length > 0 ){ + $('.edit-widgets-header__title').before(language_switcher); + } + } + }); + })( jQuery ); + "; + wp_add_inline_script( 'wp-edit-widgets', $script ); + add_action( 'admin_footer', 'wpm_admin_language_switcher_customizer' ); + } + } +} diff --git a/plugins/wp-react-custom-multilang/includes/wpm-widget-functions.php b/plugins/wp-react-custom-multilang/includes/wpm-widget-functions.php index 9f95fcd5e..5f2f44b64 100644 --- a/plugins/wp-react-custom-multilang/includes/wpm-widget-functions.php +++ b/plugins/wp-react-custom-multilang/includes/wpm-widget-functions.php @@ -1,48 +1,48 @@ -\n" -"Language: bg_BG\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-WPHeader: wp-multilang.php\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" -"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" -"X-Poedit-SearchPath-0: .\n" -"X-Poedit-SearchPathExcluded-0: *.js\n" -"X-Poedit-SearchPathExcluded-1: .idea\n" -"X-Poedit-SearchPathExcluded-2: assets\n" -"X-Poedit-SearchPathExcluded-3: vendor\n" - -#: includes/admin/class-wpm-admin-edit-menus.php:38 -#: includes/admin/class-wpm-admin-menus.php:160 -#: includes/admin/class-wpm-admin-menus.php:175 -#: includes/admin/class-wpm-admin-menus.php:178 -#: includes/admin/class-wpm-admin-meta-boxes.php:101 -#: includes/admin/class-wpm-admin-meta-boxes.php:106 -#: includes/admin/class-wpm-admin-posts.php:80 -#: includes/admin/class-wpm-admin-taxonomies.php:66 -#: includes/admin/settings/class-wpm-settings-languages.php:27 -#: includes/admin/settings/class-wpm-settings-languages.php:43 -#: includes/widgets/class-wpm-widget-language-switcher.php:31 -msgid "Languages" -msgstr "Езици" - -#: includes/admin/class-wpm-admin-edit-menus.php:116 -msgid "Show item only in:" -msgstr "Показвай елемента само в:" - -#: includes/admin/class-wpm-admin-menus.php:113 -msgid "WP Multilang Settings" -msgstr "WP Multilang настройки" - -#. Plugin Name of the plugin/theme -#: includes/admin/class-wpm-admin-menus.php:113 -#: includes/admin/class-wpm-admin.php:90 -msgid "WP Multilang" -msgstr "WP Multilang" - -#: includes/admin/class-wpm-admin-menus.php:186 -msgid "Add to menu" -msgstr "Добавяне към менюто" - -#: includes/admin/class-wpm-admin-menus.php:214 -msgid "Inline" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:215 -msgid "Single" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:216 -#: includes/widgets/class-wpm-widget-language-switcher.php:49 -msgid "Dropdown" -msgstr "Падащо" - -#: includes/admin/class-wpm-admin-menus.php:220 -msgid "Languages menu item type" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:236 -#: includes/widgets/class-wpm-widget-language-switcher.php:38 -msgid "Both" -msgstr "И двете" - -#: includes/admin/class-wpm-admin-menus.php:237 -#: includes/admin/settings/views/html-languages.php:92 -#: includes/admin/settings/views/html-languages.php:94 -#: includes/admin/settings/views/html-languages.php:182 -#: includes/admin/settings/views/html-languages.php:184 -#: includes/widgets/class-wpm-widget-language-switcher.php:39 -msgid "Flag" -msgstr "Знаме" - -#: includes/admin/class-wpm-admin-menus.php:238 -#: includes/admin/settings/views/html-languages.php:38 -#: includes/admin/settings/views/html-languages.php:40 -#: includes/admin/settings/views/html-languages.php:132 -#: includes/admin/settings/views/html-languages.php:134 -#: includes/widgets/class-wpm-widget-language-switcher.php:40 -msgid "Name" -msgstr "Име" - -#: includes/admin/class-wpm-admin-menus.php:242 -#: includes/widgets/class-wpm-widget-language-switcher.php:42 -msgid "Show" -msgstr "Покажи" - -#: includes/admin/class-wpm-admin-notices.php:104 -#: includes/admin/class-wpm-admin-settings.php:66 -msgid "Action failed. Please refresh the page and retry." -msgstr "Действието е неуспешно. Моля, обновете страницата и опитайте отново." - -#: includes/admin/class-wpm-admin-notices.php:108 -#: includes/class-wp-multilang.php:61 includes/class-wp-multilang.php:68 -msgid "Cheatin’ huh?" -msgstr "" - -#: includes/admin/class-wpm-admin-posts.php:138 -msgid "Current edit language:" -msgstr "Текущ език на редактиране:" - -#: includes/admin/class-wpm-admin-qtranslate.php:31 -#, php-format -msgid "%s is active. Please deactivate it." -msgstr "%s е активен. Моля, деактивирайте го." - -#: includes/admin/class-wpm-admin-settings.php:74 -msgid "Your settings have been saved." -msgstr "Настройките ви са записани." - -#: includes/admin/class-wpm-admin-settings.php:126 -msgid "The changes you made will be lost if you navigate away from this page." -msgstr "" -"Промените, които сте направили, ще бъдат загубени, ако се придвижвате далеч " -"от тази страница." - -#: includes/admin/class-wpm-admin-taxonomies.php:114 -#: includes/admin/class-wpm-admin-taxonomies.php:140 -msgid "Show term only in:" -msgstr "Показвай израза само в:" - -#: includes/admin/class-wpm-admin-widgets.php:74 -msgid "Show widget only in:" -msgstr "Показвай widget само в:" - -#: includes/admin/class-wpm-admin.php:89 -#, php-format -msgid "" -"If you like %1$s please leave us a %2$s rating. A huge thanks in advance!" -msgstr "" -"Ако искате %1$s Моля, оценeте ни с оценка %2$s. Огромно Благодаря " -"предварително!" - -#: includes/admin/class-wpm-admin.php:91 -msgid "Thanks :)" -msgstr "Благодаря! :-)" - -#: includes/admin/class-wpm-admin.php:100 -msgid "Thank you for translating with WP Multilang." -msgstr "Благодаря ви за работата с WP Multilang.." - -#: includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php:37 -msgid "Show comment only in:" -msgstr "" - -#: includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php:36 -msgid "Show post only in:" -msgstr "Покажи публикацията само в:" - -#: includes/admin/settings/class-wpm-settings-additional.php:26 -msgid "Additional" -msgstr "Допълнителни" - -#: includes/admin/settings/class-wpm-settings-additional.php:46 -msgid "Actions" -msgstr "Действия" - -#: includes/admin/settings/class-wpm-settings-additional.php:49 -#: includes/admin/settings/class-wpm-settings-additional.php:103 -msgid "Installed localizations" -msgstr "Инсталирани локализации" - -#: includes/admin/settings/class-wpm-settings-additional.php:55 -msgid "qTranslate import" -msgstr "qTranslate import" - -#: includes/admin/settings/class-wpm-settings-additional.php:77 -msgid "Are you sure you want to delete this localization?" -msgstr "Наистина ли искате да изтриете този език?" - -#: includes/admin/settings/class-wpm-settings-additional.php:121 -msgid "Delete localization" -msgstr "Изтриване на локализация" - -#: includes/admin/settings/class-wpm-settings-additional.php:123 -msgid "Delete unused not built-in language pack" -msgstr "Изтрий неизползвания невграден езиков пакет" - -#: includes/admin/settings/class-wpm-settings-additional.php:149 -msgid "Import" -msgstr "импортиране" - -#: includes/admin/settings/class-wpm-settings-additional.php:151 -msgid "Import names for terms from qTranslate." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:27 -msgid "General" -msgstr "Общи" - -#: includes/admin/settings/class-wpm-settings-general.php:52 -msgid "General options" -msgstr "Общи настройки" - -#: includes/admin/settings/class-wpm-settings-general.php:54 -#, php-format -msgid "Read
    Google guidelines before." -msgstr "Read Google guidelines before." - -#: includes/admin/settings/class-wpm-settings-general.php:59 -#: includes/class-wpm-rest-settings.php:34 -msgid "Site Language" -msgstr "Език на сайта" - -#: includes/admin/settings/class-wpm-settings-general.php:60 -msgid "Set default site language." -msgstr "Задаване на език по подразбиране" - -#: includes/admin/settings/class-wpm-settings-general.php:70 -msgid "Show untranslated" -msgstr "Показване на непреведени" - -#: includes/admin/settings/class-wpm-settings-general.php:71 -msgid "Show untranslated strings on language by default." -msgstr "Показвай непреведените низове в езика по подразбиране" - -#: includes/admin/settings/class-wpm-settings-general.php:78 -msgid "Browser redirect" -msgstr "Пренасочване на браузъра" - -#: includes/admin/settings/class-wpm-settings-general.php:79 -msgid "Use redirect to user browser language in first time." -msgstr "" -"Използвайте пренасочване към езика на браузъра на потребителя първия път" - -#: includes/admin/settings/class-wpm-settings-general.php:86 -msgid "Use prefix" -msgstr "Използване на префикс" - -#: includes/admin/settings/class-wpm-settings-general.php:87 -msgid "Use prefix for language by default." -msgstr "Използвайте префикс за език по подразбиране." - -#: includes/admin/settings/class-wpm-settings-general.php:111 -msgid "Uninstalling" -msgstr "Деинсталиране" - -#: includes/admin/settings/class-wpm-settings-general.php:118 -msgid "Delete translations" -msgstr "Изтриване на преводи" - -#: includes/admin/settings/class-wpm-settings-general.php:119 -msgid "" -"Delete translations when uninstalling plugin (some translations may not be " -"deleted and you must delete them manually)." -msgstr "" -"Изтриване на преводите при деинсталиране на приставката (някои преводи може " -"да не се изтрият и да ги изтриете ръчно)." - -#: includes/admin/settings/class-wpm-settings-languages.php:46 -msgid "Installed languages" -msgstr "Езици" - -#: includes/admin/settings/class-wpm-settings-languages.php:70 -msgid "Are you sure you want to delete this language?" -msgstr "Наистина ли искате да изтриете този език?" - -#: includes/admin/settings/class-wpm-settings-languages.php:130 -msgid "New language pack successfully installed" -msgstr "Нов езиков пакет инсталиран" - -#: includes/admin/settings/views/html-languages.php:25 -msgid "Current" -msgstr "Текущ" - -#: includes/admin/settings/views/html-languages.php:27 -msgid "Default" -msgstr "По подразбиране" - -#: includes/admin/settings/views/html-languages.php:44 -#: includes/admin/settings/views/html-languages.php:47 -#: includes/admin/settings/views/html-languages.php:138 -#: includes/admin/settings/views/html-languages.php:141 -msgid "Enable" -msgstr "Активиране" - -#: includes/admin/settings/views/html-languages.php:54 -#: includes/admin/settings/views/html-languages.php:56 -#: includes/admin/settings/views/html-languages.php:145 -#: includes/admin/settings/views/html-languages.php:147 -msgid "Language Code (ISO 639-1)*" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:60 -#: includes/admin/settings/views/html-languages.php:62 -#: includes/admin/settings/views/html-languages.php:151 -#: includes/admin/settings/views/html-languages.php:153 -msgid "Locale *" -msgstr "Locale *" - -#: includes/admin/settings/views/html-languages.php:66 -#: includes/admin/settings/views/html-languages.php:157 -msgid "Translation" -msgstr "Превод" - -#: includes/admin/settings/views/html-languages.php:80 -#: includes/admin/settings/views/html-languages.php:82 -#: includes/admin/settings/views/html-languages.php:170 -#: includes/admin/settings/views/html-languages.php:172 -msgid "Date Format" -msgstr "Формат на датата" - -#: includes/admin/settings/views/html-languages.php:86 -#: includes/admin/settings/views/html-languages.php:88 -#: includes/admin/settings/views/html-languages.php:176 -#: includes/admin/settings/views/html-languages.php:178 -msgid "Time Format" -msgstr "Времеви формат" - -#: includes/admin/settings/views/html-languages.php:95 -#: includes/admin/settings/views/html-languages.php:185 -msgid "— Select —" -msgstr "— Избери —" - -#: includes/admin/settings/views/html-languages.php:107 -#: includes/admin/settings/views/html-languages.php:196 -msgid "Delete" -msgstr "Изтрий" - -#: includes/admin/settings/views/html-languages.php:204 -msgid "Add language" -msgstr "Добавяне на език" - -#: includes/admin/views/html-notice-custom.php:12 -#: includes/admin/views/html-notice-updated.php:12 -msgid "Dismiss" -msgstr "Отхвърли" - -#: includes/admin/views/html-notice-update.php:12 -#: includes/admin/views/html-notice-updating.php:12 -msgid "WP Multilang data update" -msgstr "WP Multilang актуализиране на данните" - -#: includes/admin/views/html-notice-update.php:12 -msgid "We need to update your site database to the latest version." -msgstr "Трябва да актуализираме базата данни на сайта Ви до последната версия." - -#: includes/admin/views/html-notice-update.php:13 -msgid "Run the updater" -msgstr "Пуснете актуализатора" - -#: includes/admin/views/html-notice-update.php:17 -msgid "" -"It is strongly recommended that you backup your database before proceeding. " -"Are you sure you wish to run the updater now?" -msgstr "" -"Силно се препоръчва да архивирате базата данни, преди да продължите. " -"Наистина ли искате да стартирате актуализатора сега?" - -#: includes/admin/views/html-notice-updated.php:14 -msgid "" -"WP Multilang data update complete. Thank you for updating to the latest " -"version!" -msgstr "" -"WP Multilang актуализирането на данните е завършено. Благодарим Ви, че " -"актуализирате най-новата версия!" - -#: includes/admin/views/html-notice-updating.php:12 -msgid "Your database is being updated in the background." -msgstr "Вашата база данни се обновява във фонов режим." - -#: includes/admin/views/html-notice-updating.php:12 -msgid "Taking a while? Click here to run it now." -msgstr "Отне известно време? Кликнете тук, за да го стартирате сега." - -#: includes/class-wpm-ajax.php:145 -msgid "No locale sending" -msgstr "Няма изпращане на локал" - -#: includes/class-wpm-ajax.php:150 -msgid "Localization using" -msgstr "" - -#: includes/class-wpm-ajax.php:189 -msgid "Localization deleted" -msgstr "Изтриване на локализация" - -#: includes/class-wpm-ajax.php:284 -#, php-format -msgid "%d terms were imported successfully." -msgstr "%d термините бяха импортирани успешно." - -#: includes/class-wpm-install.php:327 -msgid "Translator" -msgstr "Преводач" - -#: includes/class-wpm-install.php:420 -msgid "View WP Multilang settings" -msgstr "Преглед на WP Multilang настройки" - -#: includes/class-wpm-install.php:420 -msgid "Settings" -msgstr "Настройки" - -#: includes/class-wpm-menus.php:78 includes/class-wpm-menus.php:132 -#: includes/class-wpm-menus.php:154 -#, php-format -msgid "#%d (no title)" -msgstr "#%d (no title)" - -#: includes/class-wpm-menus.php:93 -msgid "Post Type Archive" -msgstr "Публикувай тип Архив" - -#: includes/class-wpm-menus.php:116 -msgid "Custom Link" -msgstr "Потребителска връзка" - -#: includes/class-wpm-rest-settings.php:70 -msgid "Multilingual Settings" -msgstr "Многоезични настройки" - -#: includes/class-wpm-taxonomies.php:161 -msgid "A term with the name provided already exists in this taxonomy." -msgstr "В тази таксономия вече съществува термин с даденото име." - -#: includes/integrations/class-wpm-yoast-seo.php:224 -#: includes/integrations/class-wpm-yoast-seo.php:226 -msgid "Yoast SEO Opengraph Locale" -msgstr "Yoast SEO Opengraph Locale" - -#: includes/integrations/class-wpm-yoast-seo.php:226 -msgid "Opengraph Locale" -msgstr "Opengraph Locale" - -#: includes/integrations/class-wpm-yoast-seo.php:227 -msgid "Locale must be with country domain. Like en_US" -msgstr "Locale must be with country domain. Like en_US" - -#: includes/libraries/abstract-wp-background-process.php:422 -#, php-format -msgid "Every %d minutes" -msgstr "Всеки %d минути" - -#: includes/widgets/class-wpm-widget-language-switcher.php:25 -msgid "Display language switcher." -msgstr "Езиков превключвател" - -#: includes/widgets/class-wpm-widget-language-switcher.php:27 -#: templates/language-switcher-select.php:1 -msgid "Language Switcher" -msgstr "Езиков превключвател" - -#: includes/widgets/class-wpm-widget-language-switcher.php:32 -msgid "Title" -msgstr "Заглавие" - -#: includes/widgets/class-wpm-widget-language-switcher.php:48 -msgid "List" -msgstr "Списък" - -#: includes/widgets/class-wpm-widget-language-switcher.php:50 -msgid "Select" -msgstr "Избери" - -#: includes/widgets/class-wpm-widget-language-switcher.php:52 -msgid "Switcher Type" -msgstr "Превключвател на въвеждане" - -#: includes/wpm-template-functions.php:457 -#, php-format -msgid "For multilingual string, use syntax like %s." -msgstr "" - -#. Plugin URI of the plugin/theme -msgid "https://github.com/VaLeXaR/wp-multilang" -msgstr "" - -#. Description of the plugin/theme -msgid "Multilingual plugin for WordPress" -msgstr "" - -#. Author of the plugin/theme -msgid "Valentyn Riaboshtan" -msgstr "Valentyn Riaboshtan" - -#~ msgid "Set default translation" -#~ msgstr "Задаване на превод по подразбиране" - -#~ msgid "Set %s by default" -#~ msgstr "Задаване %s по подразбиране" - -#~ msgid "" -#~ "Set default translation for all posts, taxonomies, fields and options " -#~ "that available in config and not be translated before.
    WARNING:" -#~ " Changes are not reversible. Make a backup of the site database " -#~ "before starting." -#~ msgstr "" -#~ "Задаване на превод по подразбиране за всички публикации, класификации, " -#~ "полета и опции, които са налични в Config и не се превежда преди това. " -#~ "
    Предупреждение: промени са НЕОБРАТИМИ. Преди да " -#~ "започнете, направете резервно копие на базата данни на сайта." - -#~ msgid "Update finished" -#~ msgstr "Актуализацията завърши" - -#~ msgid "Language Code *" -#~ msgstr "Language Code *" - -#~ msgid "Localisation using" -#~ msgstr "използвана локализация" +msgid "" +msgstr "" +"Project-Id-Version: WP Multilang\n" +"POT-Creation-Date: 2018-03-09 15:43+0200\n" +"PO-Revision-Date: 2018-03-09 15:43+0200\n" +"Last-Translator: \n" +"Language-Team: EliasHol74 \n" +"Language: bg_BG\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-WPHeader: wp-multilang.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SearchPathExcluded-1: .idea\n" +"X-Poedit-SearchPathExcluded-2: assets\n" +"X-Poedit-SearchPathExcluded-3: vendor\n" + +#: includes/admin/class-wpm-admin-edit-menus.php:38 +#: includes/admin/class-wpm-admin-menus.php:160 +#: includes/admin/class-wpm-admin-menus.php:175 +#: includes/admin/class-wpm-admin-menus.php:178 +#: includes/admin/class-wpm-admin-meta-boxes.php:101 +#: includes/admin/class-wpm-admin-meta-boxes.php:106 +#: includes/admin/class-wpm-admin-posts.php:80 +#: includes/admin/class-wpm-admin-taxonomies.php:66 +#: includes/admin/settings/class-wpm-settings-languages.php:27 +#: includes/admin/settings/class-wpm-settings-languages.php:43 +#: includes/widgets/class-wpm-widget-language-switcher.php:31 +msgid "Languages" +msgstr "Езици" + +#: includes/admin/class-wpm-admin-edit-menus.php:116 +msgid "Show item only in:" +msgstr "Показвай елемента само в:" + +#: includes/admin/class-wpm-admin-menus.php:113 +msgid "WP Multilang Settings" +msgstr "WP Multilang настройки" + +#. Plugin Name of the plugin/theme +#: includes/admin/class-wpm-admin-menus.php:113 +#: includes/admin/class-wpm-admin.php:90 +msgid "WP Multilang" +msgstr "WP Multilang" + +#: includes/admin/class-wpm-admin-menus.php:186 +msgid "Add to menu" +msgstr "Добавяне към менюто" + +#: includes/admin/class-wpm-admin-menus.php:214 +msgid "Inline" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:215 +msgid "Single" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:216 +#: includes/widgets/class-wpm-widget-language-switcher.php:49 +msgid "Dropdown" +msgstr "Падащо" + +#: includes/admin/class-wpm-admin-menus.php:220 +msgid "Languages menu item type" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:236 +#: includes/widgets/class-wpm-widget-language-switcher.php:38 +msgid "Both" +msgstr "И двете" + +#: includes/admin/class-wpm-admin-menus.php:237 +#: includes/admin/settings/views/html-languages.php:92 +#: includes/admin/settings/views/html-languages.php:94 +#: includes/admin/settings/views/html-languages.php:182 +#: includes/admin/settings/views/html-languages.php:184 +#: includes/widgets/class-wpm-widget-language-switcher.php:39 +msgid "Flag" +msgstr "Знаме" + +#: includes/admin/class-wpm-admin-menus.php:238 +#: includes/admin/settings/views/html-languages.php:38 +#: includes/admin/settings/views/html-languages.php:40 +#: includes/admin/settings/views/html-languages.php:132 +#: includes/admin/settings/views/html-languages.php:134 +#: includes/widgets/class-wpm-widget-language-switcher.php:40 +msgid "Name" +msgstr "Име" + +#: includes/admin/class-wpm-admin-menus.php:242 +#: includes/widgets/class-wpm-widget-language-switcher.php:42 +msgid "Show" +msgstr "Покажи" + +#: includes/admin/class-wpm-admin-notices.php:104 +#: includes/admin/class-wpm-admin-settings.php:66 +msgid "Action failed. Please refresh the page and retry." +msgstr "Действието е неуспешно. Моля, обновете страницата и опитайте отново." + +#: includes/admin/class-wpm-admin-notices.php:108 +#: includes/class-wp-multilang.php:61 includes/class-wp-multilang.php:68 +msgid "Cheatin’ huh?" +msgstr "" + +#: includes/admin/class-wpm-admin-posts.php:138 +msgid "Current edit language:" +msgstr "Текущ език на редактиране:" + +#: includes/admin/class-wpm-admin-qtranslate.php:31 +#, php-format +msgid "%s is active. Please deactivate it." +msgstr "%s е активен. Моля, деактивирайте го." + +#: includes/admin/class-wpm-admin-settings.php:74 +msgid "Your settings have been saved." +msgstr "Настройките ви са записани." + +#: includes/admin/class-wpm-admin-settings.php:126 +msgid "The changes you made will be lost if you navigate away from this page." +msgstr "" +"Промените, които сте направили, ще бъдат загубени, ако се придвижвате далеч " +"от тази страница." + +#: includes/admin/class-wpm-admin-taxonomies.php:114 +#: includes/admin/class-wpm-admin-taxonomies.php:140 +msgid "Show term only in:" +msgstr "Показвай израза само в:" + +#: includes/admin/class-wpm-admin-widgets.php:74 +msgid "Show widget only in:" +msgstr "Показвай widget само в:" + +#: includes/admin/class-wpm-admin.php:89 +#, php-format +msgid "" +"If you like %1$s please leave us a %2$s rating. A huge thanks in advance!" +msgstr "" +"Ако искате %1$s Моля, оценeте ни с оценка %2$s. Огромно Благодаря " +"предварително!" + +#: includes/admin/class-wpm-admin.php:91 +msgid "Thanks :)" +msgstr "Благодаря! :-)" + +#: includes/admin/class-wpm-admin.php:100 +msgid "Thank you for translating with WP Multilang." +msgstr "Благодаря ви за работата с WP Multilang.." + +#: includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php:37 +msgid "Show comment only in:" +msgstr "" + +#: includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php:36 +msgid "Show post only in:" +msgstr "Покажи публикацията само в:" + +#: includes/admin/settings/class-wpm-settings-additional.php:26 +msgid "Additional" +msgstr "Допълнителни" + +#: includes/admin/settings/class-wpm-settings-additional.php:46 +msgid "Actions" +msgstr "Действия" + +#: includes/admin/settings/class-wpm-settings-additional.php:49 +#: includes/admin/settings/class-wpm-settings-additional.php:103 +msgid "Installed localizations" +msgstr "Инсталирани локализации" + +#: includes/admin/settings/class-wpm-settings-additional.php:55 +msgid "qTranslate import" +msgstr "qTranslate import" + +#: includes/admin/settings/class-wpm-settings-additional.php:77 +msgid "Are you sure you want to delete this localization?" +msgstr "Наистина ли искате да изтриете този език?" + +#: includes/admin/settings/class-wpm-settings-additional.php:121 +msgid "Delete localization" +msgstr "Изтриване на локализация" + +#: includes/admin/settings/class-wpm-settings-additional.php:123 +msgid "Delete unused not built-in language pack" +msgstr "Изтрий неизползвания невграден езиков пакет" + +#: includes/admin/settings/class-wpm-settings-additional.php:149 +msgid "Import" +msgstr "импортиране" + +#: includes/admin/settings/class-wpm-settings-additional.php:151 +msgid "Import names for terms from qTranslate." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:27 +msgid "General" +msgstr "Общи" + +#: includes/admin/settings/class-wpm-settings-general.php:52 +msgid "General options" +msgstr "Общи настройки" + +#: includes/admin/settings/class-wpm-settings-general.php:54 +#, php-format +msgid "Read Google guidelines before." +msgstr "Read Google guidelines before." + +#: includes/admin/settings/class-wpm-settings-general.php:59 +#: includes/class-wpm-rest-settings.php:34 +msgid "Site Language" +msgstr "Език на сайта" + +#: includes/admin/settings/class-wpm-settings-general.php:60 +msgid "Set default site language." +msgstr "Задаване на език по подразбиране" + +#: includes/admin/settings/class-wpm-settings-general.php:70 +msgid "Show untranslated" +msgstr "Показване на непреведени" + +#: includes/admin/settings/class-wpm-settings-general.php:71 +msgid "Show untranslated strings on language by default." +msgstr "Показвай непреведените низове в езика по подразбиране" + +#: includes/admin/settings/class-wpm-settings-general.php:78 +msgid "Browser redirect" +msgstr "Пренасочване на браузъра" + +#: includes/admin/settings/class-wpm-settings-general.php:79 +msgid "Use redirect to user browser language in first time." +msgstr "" +"Използвайте пренасочване към езика на браузъра на потребителя първия път" + +#: includes/admin/settings/class-wpm-settings-general.php:86 +msgid "Use prefix" +msgstr "Използване на префикс" + +#: includes/admin/settings/class-wpm-settings-general.php:87 +msgid "Use prefix for language by default." +msgstr "Използвайте префикс за език по подразбиране." + +#: includes/admin/settings/class-wpm-settings-general.php:111 +msgid "Uninstalling" +msgstr "Деинсталиране" + +#: includes/admin/settings/class-wpm-settings-general.php:118 +msgid "Delete translations" +msgstr "Изтриване на преводи" + +#: includes/admin/settings/class-wpm-settings-general.php:119 +msgid "" +"Delete translations when uninstalling plugin (some translations may not be " +"deleted and you must delete them manually)." +msgstr "" +"Изтриване на преводите при деинсталиране на приставката (някои преводи може " +"да не се изтрият и да ги изтриете ръчно)." + +#: includes/admin/settings/class-wpm-settings-languages.php:46 +msgid "Installed languages" +msgstr "Езици" + +#: includes/admin/settings/class-wpm-settings-languages.php:70 +msgid "Are you sure you want to delete this language?" +msgstr "Наистина ли искате да изтриете този език?" + +#: includes/admin/settings/class-wpm-settings-languages.php:130 +msgid "New language pack successfully installed" +msgstr "Нов езиков пакет инсталиран" + +#: includes/admin/settings/views/html-languages.php:25 +msgid "Current" +msgstr "Текущ" + +#: includes/admin/settings/views/html-languages.php:27 +msgid "Default" +msgstr "По подразбиране" + +#: includes/admin/settings/views/html-languages.php:44 +#: includes/admin/settings/views/html-languages.php:47 +#: includes/admin/settings/views/html-languages.php:138 +#: includes/admin/settings/views/html-languages.php:141 +msgid "Enable" +msgstr "Активиране" + +#: includes/admin/settings/views/html-languages.php:54 +#: includes/admin/settings/views/html-languages.php:56 +#: includes/admin/settings/views/html-languages.php:145 +#: includes/admin/settings/views/html-languages.php:147 +msgid "Language Code (ISO 639-1)*" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:60 +#: includes/admin/settings/views/html-languages.php:62 +#: includes/admin/settings/views/html-languages.php:151 +#: includes/admin/settings/views/html-languages.php:153 +msgid "Locale *" +msgstr "Locale *" + +#: includes/admin/settings/views/html-languages.php:66 +#: includes/admin/settings/views/html-languages.php:157 +msgid "Translation" +msgstr "Превод" + +#: includes/admin/settings/views/html-languages.php:80 +#: includes/admin/settings/views/html-languages.php:82 +#: includes/admin/settings/views/html-languages.php:170 +#: includes/admin/settings/views/html-languages.php:172 +msgid "Date Format" +msgstr "Формат на датата" + +#: includes/admin/settings/views/html-languages.php:86 +#: includes/admin/settings/views/html-languages.php:88 +#: includes/admin/settings/views/html-languages.php:176 +#: includes/admin/settings/views/html-languages.php:178 +msgid "Time Format" +msgstr "Времеви формат" + +#: includes/admin/settings/views/html-languages.php:95 +#: includes/admin/settings/views/html-languages.php:185 +msgid "— Select —" +msgstr "— Избери —" + +#: includes/admin/settings/views/html-languages.php:107 +#: includes/admin/settings/views/html-languages.php:196 +msgid "Delete" +msgstr "Изтрий" + +#: includes/admin/settings/views/html-languages.php:204 +msgid "Add language" +msgstr "Добавяне на език" + +#: includes/admin/views/html-notice-custom.php:12 +#: includes/admin/views/html-notice-updated.php:12 +msgid "Dismiss" +msgstr "Отхвърли" + +#: includes/admin/views/html-notice-update.php:12 +#: includes/admin/views/html-notice-updating.php:12 +msgid "WP Multilang data update" +msgstr "WP Multilang актуализиране на данните" + +#: includes/admin/views/html-notice-update.php:12 +msgid "We need to update your site database to the latest version." +msgstr "Трябва да актуализираме базата данни на сайта Ви до последната версия." + +#: includes/admin/views/html-notice-update.php:13 +msgid "Run the updater" +msgstr "Пуснете актуализатора" + +#: includes/admin/views/html-notice-update.php:17 +msgid "" +"It is strongly recommended that you backup your database before proceeding. " +"Are you sure you wish to run the updater now?" +msgstr "" +"Силно се препоръчва да архивирате базата данни, преди да продължите. " +"Наистина ли искате да стартирате актуализатора сега?" + +#: includes/admin/views/html-notice-updated.php:14 +msgid "" +"WP Multilang data update complete. Thank you for updating to the latest " +"version!" +msgstr "" +"WP Multilang актуализирането на данните е завършено. Благодарим Ви, че " +"актуализирате най-новата версия!" + +#: includes/admin/views/html-notice-updating.php:12 +msgid "Your database is being updated in the background." +msgstr "Вашата база данни се обновява във фонов режим." + +#: includes/admin/views/html-notice-updating.php:12 +msgid "Taking a while? Click here to run it now." +msgstr "Отне известно време? Кликнете тук, за да го стартирате сега." + +#: includes/class-wpm-ajax.php:145 +msgid "No locale sending" +msgstr "Няма изпращане на локал" + +#: includes/class-wpm-ajax.php:150 +msgid "Localization using" +msgstr "" + +#: includes/class-wpm-ajax.php:189 +msgid "Localization deleted" +msgstr "Изтриване на локализация" + +#: includes/class-wpm-ajax.php:284 +#, php-format +msgid "%d terms were imported successfully." +msgstr "%d термините бяха импортирани успешно." + +#: includes/class-wpm-install.php:327 +msgid "Translator" +msgstr "Преводач" + +#: includes/class-wpm-install.php:420 +msgid "View WP Multilang settings" +msgstr "Преглед на WP Multilang настройки" + +#: includes/class-wpm-install.php:420 +msgid "Settings" +msgstr "Настройки" + +#: includes/class-wpm-menus.php:78 includes/class-wpm-menus.php:132 +#: includes/class-wpm-menus.php:154 +#, php-format +msgid "#%d (no title)" +msgstr "#%d (no title)" + +#: includes/class-wpm-menus.php:93 +msgid "Post Type Archive" +msgstr "Публикувай тип Архив" + +#: includes/class-wpm-menus.php:116 +msgid "Custom Link" +msgstr "Потребителска връзка" + +#: includes/class-wpm-rest-settings.php:70 +msgid "Multilingual Settings" +msgstr "Многоезични настройки" + +#: includes/class-wpm-taxonomies.php:161 +msgid "A term with the name provided already exists in this taxonomy." +msgstr "В тази таксономия вече съществува термин с даденото име." + +#: includes/integrations/class-wpm-yoast-seo.php:224 +#: includes/integrations/class-wpm-yoast-seo.php:226 +msgid "Yoast SEO Opengraph Locale" +msgstr "Yoast SEO Opengraph Locale" + +#: includes/integrations/class-wpm-yoast-seo.php:226 +msgid "Opengraph Locale" +msgstr "Opengraph Locale" + +#: includes/integrations/class-wpm-yoast-seo.php:227 +msgid "Locale must be with country domain. Like en_US" +msgstr "Locale must be with country domain. Like en_US" + +#: includes/libraries/abstract-wp-background-process.php:422 +#, php-format +msgid "Every %d minutes" +msgstr "Всеки %d минути" + +#: includes/widgets/class-wpm-widget-language-switcher.php:25 +msgid "Display language switcher." +msgstr "Езиков превключвател" + +#: includes/widgets/class-wpm-widget-language-switcher.php:27 +#: templates/language-switcher-select.php:1 +msgid "Language Switcher" +msgstr "Езиков превключвател" + +#: includes/widgets/class-wpm-widget-language-switcher.php:32 +msgid "Title" +msgstr "Заглавие" + +#: includes/widgets/class-wpm-widget-language-switcher.php:48 +msgid "List" +msgstr "Списък" + +#: includes/widgets/class-wpm-widget-language-switcher.php:50 +msgid "Select" +msgstr "Избери" + +#: includes/widgets/class-wpm-widget-language-switcher.php:52 +msgid "Switcher Type" +msgstr "Превключвател на въвеждане" + +#: includes/wpm-template-functions.php:457 +#, php-format +msgid "For multilingual string, use syntax like %s." +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "https://github.com/VaLeXaR/wp-multilang" +msgstr "" + +#. Description of the plugin/theme +msgid "Multilingual plugin for WordPress" +msgstr "" + +#. Author of the plugin/theme +msgid "Valentyn Riaboshtan" +msgstr "Valentyn Riaboshtan" + +#~ msgid "Set default translation" +#~ msgstr "Задаване на превод по подразбиране" + +#~ msgid "Set %s by default" +#~ msgstr "Задаване %s по подразбиране" + +#~ msgid "" +#~ "Set default translation for all posts, taxonomies, fields and options " +#~ "that available in config and not be translated before.
    WARNING:" +#~ " Changes are not reversible. Make a backup of the site database " +#~ "before starting." +#~ msgstr "" +#~ "Задаване на превод по подразбиране за всички публикации, класификации, " +#~ "полета и опции, които са налични в Config и не се превежда преди това. " +#~ "
    Предупреждение: промени са НЕОБРАТИМИ. Преди да " +#~ "започнете, направете резервно копие на базата данни на сайта." + +#~ msgid "Update finished" +#~ msgstr "Актуализацията завърши" + +#~ msgid "Language Code *" +#~ msgstr "Language Code *" + +#~ msgid "Localisation using" +#~ msgstr "използвана локализация" diff --git a/plugins/wp-react-custom-multilang/languages/wp-multilang.pot b/plugins/wp-react-custom-multilang/languages/wp-multilang.pot index 2d7fc07f8..7c0066dd6 100644 --- a/plugins/wp-react-custom-multilang/languages/wp-multilang.pot +++ b/plugins/wp-react-custom-multilang/languages/wp-multilang.pot @@ -1,480 +1,480 @@ -#, fuzzy -msgid "" -msgstr "" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -"Project-Id-Version: WP Multilang\n" -"POT-Creation-Date: 2018-03-09 15:43+0200\n" -"PO-Revision-Date: 2017-05-22 12:43+0300\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.4\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-WPHeader: wp-multilang.php\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" -"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" -"X-Poedit-SearchPath-0: .\n" -"X-Poedit-SearchPathExcluded-0: *.js\n" -"X-Poedit-SearchPathExcluded-1: .idea\n" -"X-Poedit-SearchPathExcluded-2: assets\n" -"X-Poedit-SearchPathExcluded-3: vendor\n" - -#: includes/admin/class-wpm-admin-edit-menus.php:38 -#: includes/admin/class-wpm-admin-menus.php:160 -#: includes/admin/class-wpm-admin-menus.php:175 -#: includes/admin/class-wpm-admin-menus.php:178 -#: includes/admin/class-wpm-admin-meta-boxes.php:101 -#: includes/admin/class-wpm-admin-meta-boxes.php:106 -#: includes/admin/class-wpm-admin-posts.php:80 -#: includes/admin/class-wpm-admin-taxonomies.php:66 -#: includes/admin/settings/class-wpm-settings-languages.php:27 -#: includes/admin/settings/class-wpm-settings-languages.php:43 -#: includes/widgets/class-wpm-widget-language-switcher.php:31 -msgid "Languages" -msgstr "" - -#: includes/admin/class-wpm-admin-edit-menus.php:116 -msgid "Show item only in:" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:113 -msgid "WP Multilang Settings" -msgstr "" - -#. Plugin Name of the plugin/theme -#: includes/admin/class-wpm-admin-menus.php:113 -#: includes/admin/class-wpm-admin.php:90 -msgid "WP Multilang" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:186 -msgid "Add to menu" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:214 -msgid "Inline" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:215 -msgid "Single" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:216 -#: includes/widgets/class-wpm-widget-language-switcher.php:49 -msgid "Dropdown" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:220 -msgid "Languages menu item type" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:236 -#: includes/widgets/class-wpm-widget-language-switcher.php:38 -msgid "Both" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:237 -#: includes/admin/settings/views/html-languages.php:92 -#: includes/admin/settings/views/html-languages.php:94 -#: includes/admin/settings/views/html-languages.php:182 -#: includes/admin/settings/views/html-languages.php:184 -#: includes/widgets/class-wpm-widget-language-switcher.php:39 -msgid "Flag" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:238 -#: includes/admin/settings/views/html-languages.php:38 -#: includes/admin/settings/views/html-languages.php:40 -#: includes/admin/settings/views/html-languages.php:132 -#: includes/admin/settings/views/html-languages.php:134 -#: includes/widgets/class-wpm-widget-language-switcher.php:40 -msgid "Name" -msgstr "" - -#: includes/admin/class-wpm-admin-menus.php:242 -#: includes/widgets/class-wpm-widget-language-switcher.php:42 -msgid "Show" -msgstr "" - -#: includes/admin/class-wpm-admin-notices.php:104 -#: includes/admin/class-wpm-admin-settings.php:66 -msgid "Action failed. Please refresh the page and retry." -msgstr "" - -#: includes/admin/class-wpm-admin-notices.php:108 -#: includes/class-wp-multilang.php:61 includes/class-wp-multilang.php:68 -msgid "Cheatin’ huh?" -msgstr "" - -#: includes/admin/class-wpm-admin-posts.php:138 -msgid "Current edit language:" -msgstr "" - -#: includes/admin/class-wpm-admin-qtranslate.php:31 -#, php-format -msgid "%s is active. Please deactivate it." -msgstr "" - -#: includes/admin/class-wpm-admin-settings.php:74 -msgid "Your settings have been saved." -msgstr "" - -#: includes/admin/class-wpm-admin-settings.php:126 -msgid "" -"The changes you made will be lost if you navigate away from this page." -msgstr "" - -#: includes/admin/class-wpm-admin-taxonomies.php:114 -#: includes/admin/class-wpm-admin-taxonomies.php:140 -msgid "Show term only in:" -msgstr "" - -#: includes/admin/class-wpm-admin-widgets.php:74 -msgid "Show widget only in:" -msgstr "" - -#: includes/admin/class-wpm-admin.php:89 -#, php-format -msgid "" -"If you like %1$s please leave us a %2$s rating. A huge thanks in advance!" -msgstr "" - -#: includes/admin/class-wpm-admin.php:91 -msgid "Thanks :)" -msgstr "" - -#: includes/admin/class-wpm-admin.php:100 -msgid "Thank you for translating with WP Multilang." -msgstr "" - -#: includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php:37 -msgid "Show comment only in:" -msgstr "" - -#: includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php:36 -msgid "Show post only in:" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:26 -msgid "Additional" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:46 -msgid "Actions" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:49 -#: includes/admin/settings/class-wpm-settings-additional.php:103 -msgid "Installed localizations" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:55 -msgid "qTranslate import" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:77 -msgid "Are you sure you want to delete this localization?" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:121 -msgid "Delete localization" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:123 -msgid "Delete unused not built-in language pack" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:149 -msgid "Import" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-additional.php:151 -msgid "Import names for terms from qTranslate." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:27 -msgid "General" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:52 -msgid "General options" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:54 -#, php-format -msgid "Read Google guidelines before." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:59 -#: includes/class-wpm-rest-settings.php:34 -msgid "Site Language" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:60 -msgid "Set default site language." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:70 -msgid "Show untranslated" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:71 -msgid "Show untranslated strings on language by default." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:78 -msgid "Browser redirect" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:79 -msgid "Use redirect to user browser language in first time." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:86 -msgid "Use prefix" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:87 -msgid "Use prefix for language by default." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:111 -msgid "Uninstalling" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:118 -msgid "Delete translations" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-general.php:119 -msgid "" -"Delete translations when uninstalling plugin (some translations may not be " -"deleted and you must delete them manually)." -msgstr "" - -#: includes/admin/settings/class-wpm-settings-languages.php:46 -msgid "Installed languages" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-languages.php:70 -msgid "Are you sure you want to delete this language?" -msgstr "" - -#: includes/admin/settings/class-wpm-settings-languages.php:130 -msgid "New language pack successfully installed" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:25 -msgid "Current" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:27 -msgid "Default" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:44 -#: includes/admin/settings/views/html-languages.php:47 -#: includes/admin/settings/views/html-languages.php:138 -#: includes/admin/settings/views/html-languages.php:141 -msgid "Enable" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:54 -#: includes/admin/settings/views/html-languages.php:56 -#: includes/admin/settings/views/html-languages.php:145 -#: includes/admin/settings/views/html-languages.php:147 -msgid "Language Code (ISO 639-1)*" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:60 -#: includes/admin/settings/views/html-languages.php:62 -#: includes/admin/settings/views/html-languages.php:151 -#: includes/admin/settings/views/html-languages.php:153 -msgid "Locale *" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:66 -#: includes/admin/settings/views/html-languages.php:157 -msgid "Translation" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:80 -#: includes/admin/settings/views/html-languages.php:82 -#: includes/admin/settings/views/html-languages.php:170 -#: includes/admin/settings/views/html-languages.php:172 -msgid "Date Format" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:86 -#: includes/admin/settings/views/html-languages.php:88 -#: includes/admin/settings/views/html-languages.php:176 -#: includes/admin/settings/views/html-languages.php:178 -msgid "Time Format" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:95 -#: includes/admin/settings/views/html-languages.php:185 -msgid "— Select —" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:107 -#: includes/admin/settings/views/html-languages.php:196 -msgid "Delete" -msgstr "" - -#: includes/admin/settings/views/html-languages.php:204 -msgid "Add language" -msgstr "" - -#: includes/admin/views/html-notice-custom.php:12 -#: includes/admin/views/html-notice-updated.php:12 -msgid "Dismiss" -msgstr "" - -#: includes/admin/views/html-notice-update.php:12 -#: includes/admin/views/html-notice-updating.php:12 -msgid "WP Multilang data update" -msgstr "" - -#: includes/admin/views/html-notice-update.php:12 -msgid "We need to update your site database to the latest version." -msgstr "" - -#: includes/admin/views/html-notice-update.php:13 -msgid "Run the updater" -msgstr "" - -#: includes/admin/views/html-notice-update.php:17 -msgid "" -"It is strongly recommended that you backup your database before " -"proceeding. Are you sure you wish to run the updater now?" -msgstr "" - -#: includes/admin/views/html-notice-updated.php:14 -msgid "" -"WP Multilang data update complete. Thank you for updating to the latest " -"version!" -msgstr "" - -#: includes/admin/views/html-notice-updating.php:12 -msgid "Your database is being updated in the background." -msgstr "" - -#: includes/admin/views/html-notice-updating.php:12 -msgid "Taking a while? Click here to run it now." -msgstr "" - -#: includes/class-wpm-ajax.php:145 -msgid "No locale sending" -msgstr "" - -#: includes/class-wpm-ajax.php:150 -msgid "Localization using" -msgstr "" - -#: includes/class-wpm-ajax.php:189 -msgid "Localization deleted" -msgstr "" - -#: includes/class-wpm-ajax.php:284 -#, php-format -msgid "%d terms were imported successfully." -msgstr "" - -#: includes/class-wpm-install.php:327 -msgid "Translator" -msgstr "" - -#: includes/class-wpm-install.php:420 -msgid "View WP Multilang settings" -msgstr "" - -#: includes/class-wpm-install.php:420 -msgid "Settings" -msgstr "" - -#: includes/class-wpm-menus.php:78 includes/class-wpm-menus.php:132 -#: includes/class-wpm-menus.php:154 -#, php-format -msgid "#%d (no title)" -msgstr "" - -#: includes/class-wpm-menus.php:93 -msgid "Post Type Archive" -msgstr "" - -#: includes/class-wpm-menus.php:116 -msgid "Custom Link" -msgstr "" - -#: includes/class-wpm-rest-settings.php:70 -msgid "Multilingual Settings" -msgstr "" - -#: includes/class-wpm-taxonomies.php:161 -msgid "A term with the name provided already exists in this taxonomy." -msgstr "" - -#: includes/integrations/class-wpm-yoast-seo.php:224 -#: includes/integrations/class-wpm-yoast-seo.php:226 -msgid "Yoast SEO Opengraph Locale" -msgstr "" - -#: includes/integrations/class-wpm-yoast-seo.php:226 -msgid "Opengraph Locale" -msgstr "" - -#: includes/integrations/class-wpm-yoast-seo.php:227 -msgid "Locale must be with country domain. Like en_US" -msgstr "" - -#: includes/libraries/abstract-wp-background-process.php:422 -#, php-format -msgid "Every %d minutes" -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:25 -msgid "Display language switcher." -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:27 -#: templates/language-switcher-select.php:1 -msgid "Language Switcher" -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:32 -msgid "Title" -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:48 -msgid "List" -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:50 -msgid "Select" -msgstr "" - -#: includes/widgets/class-wpm-widget-language-switcher.php:52 -msgid "Switcher Type" -msgstr "" - -#: includes/wpm-template-functions.php:457 -#, php-format -msgid "For multilingual string, use syntax like %s." -msgstr "" - -#. Plugin URI of the plugin/theme -msgid "https://github.com/VaLeXaR/wp-multilang" -msgstr "" - -#. Description of the plugin/theme -msgid "Multilingual plugin for WordPress" -msgstr "" - -#. Author of the plugin/theme -msgid "Valentyn Riaboshtan" -msgstr "" +#, fuzzy +msgid "" +msgstr "" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"Project-Id-Version: WP Multilang\n" +"POT-Creation-Date: 2018-03-09 15:43+0200\n" +"PO-Revision-Date: 2017-05-22 12:43+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.4\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-WPHeader: wp-multilang.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" +"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SearchPathExcluded-1: .idea\n" +"X-Poedit-SearchPathExcluded-2: assets\n" +"X-Poedit-SearchPathExcluded-3: vendor\n" + +#: includes/admin/class-wpm-admin-edit-menus.php:38 +#: includes/admin/class-wpm-admin-menus.php:160 +#: includes/admin/class-wpm-admin-menus.php:175 +#: includes/admin/class-wpm-admin-menus.php:178 +#: includes/admin/class-wpm-admin-meta-boxes.php:101 +#: includes/admin/class-wpm-admin-meta-boxes.php:106 +#: includes/admin/class-wpm-admin-posts.php:80 +#: includes/admin/class-wpm-admin-taxonomies.php:66 +#: includes/admin/settings/class-wpm-settings-languages.php:27 +#: includes/admin/settings/class-wpm-settings-languages.php:43 +#: includes/widgets/class-wpm-widget-language-switcher.php:31 +msgid "Languages" +msgstr "" + +#: includes/admin/class-wpm-admin-edit-menus.php:116 +msgid "Show item only in:" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:113 +msgid "WP Multilang Settings" +msgstr "" + +#. Plugin Name of the plugin/theme +#: includes/admin/class-wpm-admin-menus.php:113 +#: includes/admin/class-wpm-admin.php:90 +msgid "WP Multilang" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:186 +msgid "Add to menu" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:214 +msgid "Inline" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:215 +msgid "Single" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:216 +#: includes/widgets/class-wpm-widget-language-switcher.php:49 +msgid "Dropdown" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:220 +msgid "Languages menu item type" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:236 +#: includes/widgets/class-wpm-widget-language-switcher.php:38 +msgid "Both" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:237 +#: includes/admin/settings/views/html-languages.php:92 +#: includes/admin/settings/views/html-languages.php:94 +#: includes/admin/settings/views/html-languages.php:182 +#: includes/admin/settings/views/html-languages.php:184 +#: includes/widgets/class-wpm-widget-language-switcher.php:39 +msgid "Flag" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:238 +#: includes/admin/settings/views/html-languages.php:38 +#: includes/admin/settings/views/html-languages.php:40 +#: includes/admin/settings/views/html-languages.php:132 +#: includes/admin/settings/views/html-languages.php:134 +#: includes/widgets/class-wpm-widget-language-switcher.php:40 +msgid "Name" +msgstr "" + +#: includes/admin/class-wpm-admin-menus.php:242 +#: includes/widgets/class-wpm-widget-language-switcher.php:42 +msgid "Show" +msgstr "" + +#: includes/admin/class-wpm-admin-notices.php:104 +#: includes/admin/class-wpm-admin-settings.php:66 +msgid "Action failed. Please refresh the page and retry." +msgstr "" + +#: includes/admin/class-wpm-admin-notices.php:108 +#: includes/class-wp-multilang.php:61 includes/class-wp-multilang.php:68 +msgid "Cheatin’ huh?" +msgstr "" + +#: includes/admin/class-wpm-admin-posts.php:138 +msgid "Current edit language:" +msgstr "" + +#: includes/admin/class-wpm-admin-qtranslate.php:31 +#, php-format +msgid "%s is active. Please deactivate it." +msgstr "" + +#: includes/admin/class-wpm-admin-settings.php:74 +msgid "Your settings have been saved." +msgstr "" + +#: includes/admin/class-wpm-admin-settings.php:126 +msgid "" +"The changes you made will be lost if you navigate away from this page." +msgstr "" + +#: includes/admin/class-wpm-admin-taxonomies.php:114 +#: includes/admin/class-wpm-admin-taxonomies.php:140 +msgid "Show term only in:" +msgstr "" + +#: includes/admin/class-wpm-admin-widgets.php:74 +msgid "Show widget only in:" +msgstr "" + +#: includes/admin/class-wpm-admin.php:89 +#, php-format +msgid "" +"If you like %1$s please leave us a %2$s rating. A huge thanks in advance!" +msgstr "" + +#: includes/admin/class-wpm-admin.php:91 +msgid "Thanks :)" +msgstr "" + +#: includes/admin/class-wpm-admin.php:100 +msgid "Thank you for translating with WP Multilang." +msgstr "" + +#: includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php:37 +msgid "Show comment only in:" +msgstr "" + +#: includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php:36 +msgid "Show post only in:" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:26 +msgid "Additional" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:46 +msgid "Actions" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:49 +#: includes/admin/settings/class-wpm-settings-additional.php:103 +msgid "Installed localizations" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:55 +msgid "qTranslate import" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:77 +msgid "Are you sure you want to delete this localization?" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:121 +msgid "Delete localization" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:123 +msgid "Delete unused not built-in language pack" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:149 +msgid "Import" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-additional.php:151 +msgid "Import names for terms from qTranslate." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:27 +msgid "General" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:52 +msgid "General options" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:54 +#, php-format +msgid "Read Google guidelines before." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:59 +#: includes/class-wpm-rest-settings.php:34 +msgid "Site Language" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:60 +msgid "Set default site language." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:70 +msgid "Show untranslated" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:71 +msgid "Show untranslated strings on language by default." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:78 +msgid "Browser redirect" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:79 +msgid "Use redirect to user browser language in first time." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:86 +msgid "Use prefix" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:87 +msgid "Use prefix for language by default." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:111 +msgid "Uninstalling" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:118 +msgid "Delete translations" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-general.php:119 +msgid "" +"Delete translations when uninstalling plugin (some translations may not be " +"deleted and you must delete them manually)." +msgstr "" + +#: includes/admin/settings/class-wpm-settings-languages.php:46 +msgid "Installed languages" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-languages.php:70 +msgid "Are you sure you want to delete this language?" +msgstr "" + +#: includes/admin/settings/class-wpm-settings-languages.php:130 +msgid "New language pack successfully installed" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:25 +msgid "Current" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:27 +msgid "Default" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:44 +#: includes/admin/settings/views/html-languages.php:47 +#: includes/admin/settings/views/html-languages.php:138 +#: includes/admin/settings/views/html-languages.php:141 +msgid "Enable" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:54 +#: includes/admin/settings/views/html-languages.php:56 +#: includes/admin/settings/views/html-languages.php:145 +#: includes/admin/settings/views/html-languages.php:147 +msgid "Language Code (ISO 639-1)*" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:60 +#: includes/admin/settings/views/html-languages.php:62 +#: includes/admin/settings/views/html-languages.php:151 +#: includes/admin/settings/views/html-languages.php:153 +msgid "Locale *" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:66 +#: includes/admin/settings/views/html-languages.php:157 +msgid "Translation" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:80 +#: includes/admin/settings/views/html-languages.php:82 +#: includes/admin/settings/views/html-languages.php:170 +#: includes/admin/settings/views/html-languages.php:172 +msgid "Date Format" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:86 +#: includes/admin/settings/views/html-languages.php:88 +#: includes/admin/settings/views/html-languages.php:176 +#: includes/admin/settings/views/html-languages.php:178 +msgid "Time Format" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:95 +#: includes/admin/settings/views/html-languages.php:185 +msgid "— Select —" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:107 +#: includes/admin/settings/views/html-languages.php:196 +msgid "Delete" +msgstr "" + +#: includes/admin/settings/views/html-languages.php:204 +msgid "Add language" +msgstr "" + +#: includes/admin/views/html-notice-custom.php:12 +#: includes/admin/views/html-notice-updated.php:12 +msgid "Dismiss" +msgstr "" + +#: includes/admin/views/html-notice-update.php:12 +#: includes/admin/views/html-notice-updating.php:12 +msgid "WP Multilang data update" +msgstr "" + +#: includes/admin/views/html-notice-update.php:12 +msgid "We need to update your site database to the latest version." +msgstr "" + +#: includes/admin/views/html-notice-update.php:13 +msgid "Run the updater" +msgstr "" + +#: includes/admin/views/html-notice-update.php:17 +msgid "" +"It is strongly recommended that you backup your database before " +"proceeding. Are you sure you wish to run the updater now?" +msgstr "" + +#: includes/admin/views/html-notice-updated.php:14 +msgid "" +"WP Multilang data update complete. Thank you for updating to the latest " +"version!" +msgstr "" + +#: includes/admin/views/html-notice-updating.php:12 +msgid "Your database is being updated in the background." +msgstr "" + +#: includes/admin/views/html-notice-updating.php:12 +msgid "Taking a while? Click here to run it now." +msgstr "" + +#: includes/class-wpm-ajax.php:145 +msgid "No locale sending" +msgstr "" + +#: includes/class-wpm-ajax.php:150 +msgid "Localization using" +msgstr "" + +#: includes/class-wpm-ajax.php:189 +msgid "Localization deleted" +msgstr "" + +#: includes/class-wpm-ajax.php:284 +#, php-format +msgid "%d terms were imported successfully." +msgstr "" + +#: includes/class-wpm-install.php:327 +msgid "Translator" +msgstr "" + +#: includes/class-wpm-install.php:420 +msgid "View WP Multilang settings" +msgstr "" + +#: includes/class-wpm-install.php:420 +msgid "Settings" +msgstr "" + +#: includes/class-wpm-menus.php:78 includes/class-wpm-menus.php:132 +#: includes/class-wpm-menus.php:154 +#, php-format +msgid "#%d (no title)" +msgstr "" + +#: includes/class-wpm-menus.php:93 +msgid "Post Type Archive" +msgstr "" + +#: includes/class-wpm-menus.php:116 +msgid "Custom Link" +msgstr "" + +#: includes/class-wpm-rest-settings.php:70 +msgid "Multilingual Settings" +msgstr "" + +#: includes/class-wpm-taxonomies.php:161 +msgid "A term with the name provided already exists in this taxonomy." +msgstr "" + +#: includes/integrations/class-wpm-yoast-seo.php:224 +#: includes/integrations/class-wpm-yoast-seo.php:226 +msgid "Yoast SEO Opengraph Locale" +msgstr "" + +#: includes/integrations/class-wpm-yoast-seo.php:226 +msgid "Opengraph Locale" +msgstr "" + +#: includes/integrations/class-wpm-yoast-seo.php:227 +msgid "Locale must be with country domain. Like en_US" +msgstr "" + +#: includes/libraries/abstract-wp-background-process.php:422 +#, php-format +msgid "Every %d minutes" +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:25 +msgid "Display language switcher." +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:27 +#: templates/language-switcher-select.php:1 +msgid "Language Switcher" +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:32 +msgid "Title" +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:48 +msgid "List" +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:50 +msgid "Select" +msgstr "" + +#: includes/widgets/class-wpm-widget-language-switcher.php:52 +msgid "Switcher Type" +msgstr "" + +#: includes/wpm-template-functions.php:457 +#, php-format +msgid "For multilingual string, use syntax like %s." +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "https://github.com/VaLeXaR/wp-multilang" +msgstr "" + +#. Description of the plugin/theme +msgid "Multilingual plugin for WordPress" +msgstr "" + +#. Author of the plugin/theme +msgid "Valentyn Riaboshtan" +msgstr "" diff --git a/plugins/wp-react-custom-multilang/readme.txt b/plugins/wp-react-custom-multilang/readme.txt index 816f8ca32..7d4e53ab7 100644 --- a/plugins/wp-react-custom-multilang/readme.txt +++ b/plugins/wp-react-custom-multilang/readme.txt @@ -1,333 +1,369 @@ -=== WP Multilang - Translation and Multilingual Plugin === - -Contributors: magazine3 -Donate link: https://paypal.me/kaludi -Tags: localization, multilanguage, multilingual, translation, translate -Requires at least: 4.7 -Tested up to: 6.7 -Stable tag: 2.4.16 -Requires PHP: 5.6.20 -License: GPL2 -License URI: https://www.gnu.org/licenses/gpl-3.0.html - -Multilingual plugin for WordPress. Go Multilingual in minutes with full WordPress support. Translate your site easily with this localization plugin. - -== Description == - -WP Multilang is a multilingual plugin for WordPress. - -Translations of post types, taxonomies, meta fields, options, text fields in miltimedia files, menus, titles and text fields in widgets. - -[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium Features](https://wp-multilang.com/#features) - -== New Features of the plugin WP Multilang == -* Support full site editor for block based themes -* Support block based widgets -* Support different feature image for each language -* Support Smart Custom Fields Plugin -* Auto Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-auto-translate-your-website-contents-using-wp-multilang/) -* Support URL Slug Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/) -* Support Base Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-taxonomy-bases-such-as-categories-and-tags-into-selective-languages-using-the-base-translation-option/) - -== Features of the plugin WP Multilang == - -* 100% free. -* Translation at PHP. -* Compatible with REST. -* Support configuration for translate multidimensional arrays in options, meta fields, post content. -* Support multisite. -* Support WordPress in sub-folder. -* Separate menu items, posts, terms, widgets, comments per language. -* Many filters for dynamic applying translation settings. -* No duplicate posts, terms, menus, widgets. -* No sub-domain for each language version. -* No additional tables in database. -* Possibility set many languages with one localization. For example, for localization in the region. -* Possibility to set custom locale for html(If installed locale is en_US, you can set locale like: en, en-UK, en-AU etc. Without installation another localization) -* Possibility for add new languages for any user with capability `manage_options`. -* Exist the role "Translator" for editing posts, terms. It can not publish or delete. -* No limits by languages or by possibilities. - -== WP Multilang compatible with plugins == - -* Elementor ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-elementor-using-wp-multilang/) -* Divi Builder ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-divi-builder-using-wp-multilang/) -* ACF, ACF Pro -* WooCommerce -* WooCommerce Customizer -* Gutenberg -* Yoast Seo -* Contact Form 7 (added mail tag [_language] for send user language in mail) -* WPBakery Visual Composer -* Page Builder by SiteOrigin -* NextGEN Gallery -* All in One SEO Pack -* MailChimp for WordPress -* Newsletter -* Maps Builder -* Max Mega Menu -* MasterSlider -* WP-PageNavi -* BuddyPress -* Meta Slider -* TablePress -* Download Monitor (Redefine templates for links in your theme and translate link texts) -* Better Search -* Rank Math SEO (thanks for @pratikmts) -* WPGraphQL (Add lang to the query parameters in URL. Eg: lang=en) -* Smart Custom Fields -* Team – Team Members Showcase Plugin -* Schema & Structured Data for WP & AMP -* Forminator Forms - -Manage translation settings via json. - -Add in the root of your theme or plugin file `wpm-config.json`. - -Sample configurations can be viewed in config files in folder 'configs' in root the plugin. - -Configuration is updated after switching theme, enable or update any plugins. - -The plugin has filters for dynamic application configuration for translate. - -For turn off translation, set `null` into the desired configuration. -For example, you must turn off translation for a post type `post`. -There are two ways: - -1. In json. - Create in root of a theme or a plugin file `wpm-config.json` with: - `{ - "post_types": { - "post": null - } - }` - -2. Through the filter. - Add in functions.php - `add_filter( 'wpm_post_post_config', '__return_null' );` - -To enable translation pass an empty array in php `array()` or empty object in json `{}`. - -Supports translation multidimensional array of options, meta fields and post_content. -Supports the removal of established localizations. -Supports translation via GET parameter. Add in the GET parameter `lang` code desired language. -Supports clean database of translations when removing the plugin. Translations are only removed from the built-in tables. -Supports import term translations from qTranslate(by Soft79). -Supports automatically redirect to the user's browser language, if he visits for the first time. - -Ideal for developers. - -For display language switcher in any place add the code to your template `if ( function_exists ( 'wpm_language_switcher' ) ) wpm_language_switcher ();` -Function accepts two parameters: -$type - 'list', 'dropdown', 'select'. Default - 'list'. -$show - 'flag', 'name', 'both'. Default - 'both'. - -Or using the shortcode `wpm_lang_switcher`. It accept two not necessary parameters 'type' and 'show'. - -Available features for translation: -`wpm_translate_url( $url, $language = '' );` - translate url -`wpm_translate_string( $string, $language = '' );` - translate multilingual string -`wpm_translate_value( $value, $language = '' );` - translate multidimensional array with multilingual strings - -Update translation occurs at PHP. Therefore plugin has high adaptability, compatibility and easily integrates with other plugins. This is what distinguishes it among similar. - -Available translation html tags by JS for strings what do not have WP filters before output. - -Add your tags in config: -` -"admin_html_tags": { - "admin_screen_id": { - "attribute": [ - "selector" - ] - } -} -` - -Where: -`admin_screen_id` - admin screen id. -`attribute` - attribute what need to translate. Available 'text' - for translate text node, 'value' - for translate form values. Or other tag attribute, like 'title', 'alt'. -`selector` - css selector for search needed tag. Each selector is a new array item. - -If You need to add translation for multidimentional array for repeated elements You can use custom tag 'wpm_each' for set config to each element in array. -Example, add config for each item 'title' in custom post field array: -` -"post_fields": { - "custom_field": { - "wpm_each": { - "title": {} - } - } -} -` - -For set translation uses the syntax: -`[:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:]` - -Added shortcode for translate text in any place: -`[wpm_translate][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` - -If You translate text in established language, add lang parameter: -`[wpm_translate lang="de"][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` - -Support translating from syntax qTranslate, qTranslate-X, WPGlobus etc. - -Compatible with REST-API. -Support transfer the required translation through option `lang` in the GET request to REST. -Has the ability to keep recording the target language through the transmission parameter `lang` in the request. - -== Migration from qTranslate-X == - -1. Before installing/uninstalling, make database backup. -2. Deactivate qTranslate-X. -3. Install and activate WP Multilang. -4. Create in root of your theme file ‘wpm-config.json’. -5. Add all needed post types, taxonomies, options, fields to ‘wpm-config.json’. Setting from qTranslate-X not importing. -6. Import term names from qTranslate. -7. Check that everything is okay. -8. If everything is okay, remove qTranslate-X. If not, make screenshots of errors, restore database from backup and add support issue with your screenshots and description of errors. - -== Warning == - -Not compatible with: -- WP Maintenance - -== Known issues == - -Function 'get_page_by_title' not working, because in title field are stored titles for all languages. Use function 'wpm_get_page_by_title( $title )' as solution. - -NOTE: Because plugins have different ways of storing data, WP Multilang is not compatible with every single plugin out-of-the-box (mostly page builders). This may result in texts not being translatable or translations not being saved. Most of these issues can be resolved using the integration options (wpm-config.json or filters) of WP Multilang. - -Please try WP Multilang in a test-environment before activating it on an existing production site and always make a backup before activating! - -[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium](https://wp-multilang.com/) - -== Support == - -We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://wp-multilang.com/contact-us/) where you can ask us questions and get help about your WP Multilang related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked. - -== Bug Reports == - -Bug reports for WP Multilang are [welcomed on GitHub](https://github.com/ahmedkaludi/wp-multilang/issues). Please note GitHub is not a support forum, and issues that aren't properly qualified as bugs will be closed. - -== Installation == - -1. Upload the plugin files to the `/wp-content/plugins/wp-multilang` directory, or install the plugin through the WordPress plugins screen directly. -2. Activate the plugin through the 'Plugins' screen in WordPress. -3. Adjust languages on WP Multilang Settings page. - -== Upgrade Notice == - -Before installing or uninstalling make the site database backup before. - -== Frequently Asked Questions == - -= I add new translation, but it rewrite another translation on different language. = - -If you have opened several browser tabs for editing this post in different languages, translation will be saved for the language that you opened last. - -== Screenshots == - -1. Settings page -2. Post list page -3. Taxonomy list page -4. Taxonomy edit page -5. Post edit page - -== Changelog == - -= 2.4.16 = -- feature Rankmath multilingual schema and structured data support #56 -- feature Yoast multilingual schema and structured data support #57 -- feature AIOSEO multilingual schema and structured data support #58 -- feature Added a new feature that helps users select different logos as per the language of the site #71 -- feature Compatibility with Forminator form Plugin #132 - -= 2.4.15 = -- feature Added compatibility with Schema & Structured Data for WP & AMP Plugin #59 -- feature Added compatibility with Team – Team Members Showcase Plugin #75 -- feature Added option to reset the translation languages #122 -- fixed WPBakery Builder Meta Descriptions and Meta Titles Not Translating #128 -- fixed Auto translate not working when adding post via elementor #130 - -= 2.4.14 = -- fixed Woocommerce product attributes are not getting translated #93 -- feature Added compatibility with the WP Githuber plugin #99 -- enhancement Use 'translate' keyword for search the plugin from add new plugin section #103 -- feature Added compatibility with Smart Custom Fields Plugin #116 -- feature Added eature to translate slug for 2nd level of hierarchy of urls #121 -- fixed Code improvement #125 -- fixed Compatibility with WordPress 6.7 and updated readme.txt #126 - -= 2.4.13 = -- feature WP GraphQL support #44 -- fixed Post Title translation issue for multiple languages #78 -- enhancement Language switcher disappears too early in Wordpress 6.6 #91 -- enhancement Code improvement #96 -- fixed Out of memory error after update to 2.4.11 #111 -- fixed Issue with yoast meta description #113 -- fixed License key wrong link issue #118 -- fixed Error after the update 2.4.11 #109 - -= 2.4.12 = -- feature URL Slug Translation #25 -- fixed PHP waring #102 -- fixed Yoast meta description translation issue #113 - -= 2.4.11 = -- fixed Product attributers are not getting translated in frontend #94 -- enhancement Code improvement #96 -- fixed Warning: Undefined array key #102 -- feature Automatic translation #77 - -= 2.4.10 = -- feature Added compatibility with Divi #72 -- fixed issue with canonical and href URL as per the language. #85 -- fixed issue with Language switcher block in site editor #86 -- fixed Compatibility with WordPress 6.6 and updated readme.txt - -= 2.4.9 = -- feature WordPress full site editing support #46 -- fixed Conflicts with the Newsletter plugin #61 -- enhancement Changed premium tab to Premium Features in readme.txt #80 -- feature Added Language Switcher Gutenberg Block #82 - -= 2.4.8 = -- fixed admin_html_tags leaving empty fields #41 -- feature Gutenberg view post should redirect to current language post #55 -- fixed Conflicts with the Newsletter plugin #61 -- feature Woocommerce product attributes translation issue #70 -- fixed Issue with CF7 form #73 -- fixed Language switch button interface Guternberg block button #74 - -= 2.4.7 = -- fixed Call to undefined function #65 -- feature Admin settings page UI/UX changes #67 -- feature Added Newsletter Form #68 - -= 2.4.6 = -- enhancement Updated website links like contact page and other info in plugin and wp.org #45 -- feature Adedd feedback popup on deactivation #54 -- feature Added compatibility with Elementor (Premium) - -= 2.4.5 = -- feature Different product or post images for each language #20 -- fixed Widget block translate issue #29 -- fixed Fatal Error with latest Yoast SEO plugin update #30 -- fixed Translation of special mail tags for Contact Form 7 #31 -- fixed Translation of the "title" attribute in the shortcode of Contact Form 7 #32 -- fixed wpseo_og:locale:alternate to be set properly #33 -- fixed Translate escaping text #34 -- fixed Rank Math custom fields getting duplicated on the translated posts #35 -- fixed Issue with language switcher regex for gutenberg #36 - -= 2.4.4 = -- fixed issue with ACF PRO #12 -- fixed An error occurred when deleting a post #13 -- fixed E_ERROR in class-wpm-install.php #16 -- fixed Issue with Gutenberg reusable blocks and create pattern #17 -- fixed No translation for Title, Meta etc. if using AIOSEO plugin #18 -- fixed No Translation of URL, and social meta tags using YOAST plugin in #23 -- fixed Issue with the Rank Math Seo meta field #24 - +=== WP Multilang - Translation and Multilingual Plugin === + +Contributors: magazine3 +Donate link: https://paypal.me/kaludi +Tags: localization, multilanguage, multilingual, translation, translate +Requires at least: 4.7 +Tested up to: 7.1 +Stable tag: 2.4.33 +Requires PHP: 5.6.20 +License: GPL2 +License URI: https://www.gnu.org/licenses/gpl-3.0.html + +Multilingual plugin for WordPress. Go Multilingual in minutes with full WordPress support. Translate your site easily with this localization plugin. + +== Description == + +WP Multilang is a multilingual plugin for WordPress. + +Translations of post types, taxonomies, meta fields, options, text fields in miltimedia files, menus, titles and text fields in widgets. + +[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium Features](https://wp-multilang.com/#features) + +== New Features of the plugin WP Multilang == +* Support full site editor for block based themes +* Support block based widgets +* Support different feature image for each language +* Support Smart Custom Fields Plugin +* Auto Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-auto-translate-your-website-contents-using-wp-multilang/) +* Support URL Slug Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/) +* Support Base Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-taxonomy-bases-such-as-categories-and-tags-into-selective-languages-using-the-base-translation-option/) +* Export and import content in XLIFF or xml format to translate outside +* Activate Multilingual Support for Post Types +* Support Auto URL Slug Translation ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-translate-url-slugs-with-selective-languages/) + +== Features of the plugin WP Multilang == + +* 100% free. +* Translation at PHP. +* Compatible with REST. +* Support configuration for translate multidimensional arrays in options, meta fields, post content. +* Support multisite. +* Support WordPress in sub-folder. +* Separate menu items, posts, terms, widgets, comments per language. +* Many filters for dynamic applying translation settings. +* No duplicate posts, terms, menus, widgets. +* No sub-domain for each language version. +* No additional tables in database. +* Possibility set many languages with one localization. For example, for localization in the region. +* Possibility to set custom locale for html(If installed locale is en_US, you can set locale like: en, en-UK, en-AU etc. Without installation another localization) +* Possibility for add new languages for any user with capability `manage_options`. +* Exist the role "Translator" for editing posts, terms. It can not publish or delete. +* No limits by languages or by possibilities. + +== WP Multilang compatible with plugins == + +* Elementor ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-elementor-using-wp-multilang/) +* Divi Builder ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/how-to-build-a-multilingual-site-with-divi-builder-using-wp-multilang/) +* Bricks Builder ( [available in premium version](https://wp-multilang.com/pricing/) ) - [View Tutorial](https://wp-multilang.com/docs/knowledge-base/) +* ACF, ACF Pro +* WooCommerce +* WooCommerce Customizer +* Gutenberg +* Yoast Seo +* SEOPress +* Contact Form 7 (added mail tag [_language] for send user language in mail) +* WPBakery Visual Composer +* Page Builder by SiteOrigin +* NextGEN Gallery +* All in One SEO Pack +* MailChimp for WordPress +* Newsletter +* Maps Builder +* Max Mega Menu +* MasterSlider +* WP-PageNavi +* BuddyPress +* Meta Slider +* TablePress +* Download Monitor (Redefine templates for links in your theme and translate link texts) +* Better Search +* Rank Math SEO (thanks for @pratikmts) +* WPGraphQL (Add lang to the query parameters in URL. Eg: lang=en) +* Smart Custom Fields +* Team – Team Members Showcase Plugin +* Schema & Structured Data for WP & AMP +* Forminator Forms +* Gravity Forms +* Ultimate Member Form +* Oxygen Builder ( [available in premium version](https://wp-multilang.com/pricing/) ) +* Internal Link Juicer +* Strong Testimonials +* Fluent Forms +* Gamipress +* PublishPress Authors +* Autolinks Manager + +== Advance Woocommerce Support == +* Send emails in customer's selected language +* REST API Support +* Import and export products in customer's selected language +* Translate products (simple products, variable products, grouped products), categories, tags, global attributes +* Cart synchronization across multiple languages + +Manage translation settings via json. + +Add in the root of your theme or plugin file `wpm-config.json`. + +Sample configurations can be viewed in config files in folder 'configs' in root the plugin. + +Configuration is updated after switching theme, enable or update any plugins. + +The plugin has filters for dynamic application configuration for translate. + +For turn off translation, set `null` into the desired configuration. +For example, you must turn off translation for a post type `post`. +There are two ways: + +1. In json. + Create in root of a theme or a plugin file `wpm-config.json` with: + `{ + "post_types": { + "post": null + } + }` + +2. Through the filter. + Add in functions.php + `add_filter( 'wpm_post_post_config', '__return_null' );` + +To enable translation pass an empty array in php `array()` or empty object in json `{}`. + +Supports translation multidimensional array of options, meta fields and post_content. +Supports the removal of established localizations. +Supports translation via GET parameter. Add in the GET parameter `lang` code desired language. +Supports clean database of translations when removing the plugin. Translations are only removed from the built-in tables. +Supports import term translations from qTranslate(by Soft79). +Supports automatically redirect to the user's browser language, if he visits for the first time. + +Ideal for developers. + +For display language switcher in any place add the code to your template `if ( function_exists ( 'wpm_language_switcher' ) ) wpm_language_switcher ();` +Function accepts two parameters: +$type - 'list', 'dropdown', 'select'. Default - 'list'. +$show - 'flag', 'name', 'both'. Default - 'both'. + +Or using the shortcode `wpm_lang_switcher`. It accept two not necessary parameters 'type' and 'show'. + +Available features for translation: +`wpm_translate_url( $url, $language = '' );` - translate url +`wpm_translate_string( $string, $language = '' );` - translate multilingual string +`wpm_translate_value( $value, $language = '' );` - translate multidimensional array with multilingual strings + +Update translation occurs at PHP. Therefore plugin has high adaptability, compatibility and easily integrates with other plugins. This is what distinguishes it among similar. + +Available translation html tags by JS for strings what do not have WP filters before output. + +Add your tags in config: +` +"admin_html_tags": { + "admin_screen_id": { + "attribute": [ + "selector" + ] + } +} +` + +Where: +`admin_screen_id` - admin screen id. +`attribute` - attribute what need to translate. Available 'text' - for translate text node, 'value' - for translate form values. Or other tag attribute, like 'title', 'alt'. +`selector` - css selector for search needed tag. Each selector is a new array item. + +If You need to add translation for multidimentional array for repeated elements You can use custom tag 'wpm_each' for set config to each element in array. +Example, add config for each item 'title' in custom post field array: +` +"post_fields": { + "custom_field": { + "wpm_each": { + "title": {} + } + } +} +` + +For set translation uses the syntax: +`[:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:]` + +Added shortcode for translate text in any place: +`[wpm_translate][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` + +If You translate text in established language, add lang parameter: +`[wpm_translate lang="de"][:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:][wpm_translate]` + +Support translating from syntax qTranslate, qTranslate-X, WPGlobus etc. + +Compatible with REST-API. +Support transfer the required translation through option `lang` in the GET request to REST. +Has the ability to keep recording the target language through the transmission parameter `lang` in the request. + +== Migration from qTranslate-X == + +1. Before installing/uninstalling, make database backup. +2. Deactivate qTranslate-X. +3. Install and activate WP Multilang. +4. Create in root of your theme file ‘wpm-config.json’. +5. Add all needed post types, taxonomies, options, fields to ‘wpm-config.json’. Setting from qTranslate-X not importing. +6. Import term names from qTranslate. +7. Check that everything is okay. +8. If everything is okay, remove qTranslate-X. If not, make screenshots of errors, restore database from backup and add support issue with your screenshots and description of errors. + +== Warning == + +Not compatible with: +- WP Maintenance + +== Known issues == + +Function 'get_page_by_title' not working, because in title field are stored titles for all languages. Use function 'wpm_get_page_by_title( $title )' as solution. + +NOTE: Because plugins have different ways of storing data, WP Multilang is not compatible with every single plugin out-of-the-box (mostly page builders). This may result in texts not being translatable or translations not being saved. Most of these issues can be resolved using the integration options (wpm-config.json or filters) of WP Multilang. + +Please try WP Multilang in a test-environment before activating it on an existing production site and always make a backup before activating! + +[Home](https://wp-multilang.com/) | [Help & Tech Support](https://wp-multilang.com/contact-us/) | [Documentation](https://wp-multilang.com/docs/) | [Premium](https://wp-multilang.com/) + +== Support == + +We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://wp-multilang.com/contact-us/) where you can ask us questions and get help about your WP Multilang related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked. + +== Bug Reports == + +Bug reports for WP Multilang are [welcomed on GitHub](https://github.com/ahmedkaludi/wp-multilang/issues). Please note GitHub is not a support forum, and issues that aren't properly qualified as bugs will be closed. + +== Installation == + +1. Upload the plugin files to the `/wp-content/plugins/wp-multilang` directory, or install the plugin through the WordPress plugins screen directly. +2. Activate the plugin through the 'Plugins' screen in WordPress. +3. Adjust languages on WP Multilang Settings page. + +== Upgrade Notice == + +Before installing or uninstalling make the site database backup before. + +== Frequently Asked Questions == + += I add new translation, but it rewrite another translation on different language. = + +If you have opened several browser tabs for editing this post in different languages, translation will be saved for the language that you opened last. + +== Screenshots == + +1. Settings page +2. Post list page +3. Taxonomy list page +4. Taxonomy edit page +5. Post edit page + +== Changelog == + += 2.4.33 = +- Feature: Added compatibility with a BasePress module plugin #213 +- Feature: Added compatibility with Frontend Post Submission Manager lite plugin #235 +- Fixed: Translations are overwritten by default language when editing multiple translations in Gutenberg #277 +- Tested: Tested with wordpress version 7.0 #278 +- Fixed: Language switcher design issue after updating to wordpress 7.1 #279 + += 2.4.32 = +- Feature: Added Compatibility With Autolink Manager #232 +- Feature: Added Compatibility With PublishPress Authors #233 +- Feature: Added Compatibility With Gamipress #234 +- Enhancement: Ultimate Member compatibility improvement $237 +- Fixed: Vulnerability fix reported by wordfence #272 +- Feature: Product type compatibility with Qodeum theme #275 + += 2.4.31 = +- Fixed: Backslashes lost upon saving different language in custom HTML editor #267 +- Fixed: Yoast global settings not saving values per language #271 +- Enhancement: Improve Post Content Rendering and HTML Entity Handling #272 + += 2.4.30 = +- Feature: Need to add DeepL AI Integration #257 +- Fixed: Language switcher compatibility with wordpress 7.0 #264 +- Feature: Added compaitbility with YMC Filter plugin #266 +- Fixed: Duplicate content creating in post/page using Divi #268 +- Enhancement: Added support to Secure Custom Fields #269 + += 2.4.29 = +- Fixed: With WooCommerce storefront theme customization #252 +- Fixed: issue with Gutslider #253 +- Feature: Need to add compatibility with custom post type #256 +- Feature: Added compatibility with fluent form #261 + += 2.4.28 = +- Feature: Added a Compatibility With Strong Testimonials #238 +- Enhancement: Add Welsh Flag #250 +- Fixed: ACF Fields saving issue with key #254 +- Feature: Added compatibility with bricks builder #255 +- Tested: Tested with wordpress version 7.0 #259 + += 2.4.27 = +- Fixed: other language content is not updating in Elementor #215 +- Enhancement: Issue with ACF blocks #218 +- Feature: Added compatibility with the Internal Link Juicer plugin #219 +- Feature: Added Xliff file support for Oxygen Builder #242 +- Enhancement: Fixed bbPress forum translation issue #244 +- Fixed: Undefined index notice in update_description method #249 + += 2.4.26 = +- Feature: Added OpenAI Integration for Automatic Neural Network Translation #207 +- Feature: Allow override to be configurable in Auto translate #223 +- Feature: Added compatibility with oxygen builder #227 +- Fixed: WooCommerce products marked for single language still appear in other language archives (AUTO-DRAFT/empty titles) #229 +- Feature: Added compatibility with TownPress theme custom post types #230 + += 2.4.25 = +- Fixed: Other language content is not updating in Elementor #215 +- Fixed: Promotion Banner BFCM #221 +- Fixed: Yoast SEO meta tags not translating #225 + += 2.4.24 = +- Added: Promotion Banner BFCM #221 +- Added: OpenAI Integration for Automatic Neural Network Translation #207 +- fixed: Wrong url was added in switcher #220 +- Tested: WordPress version upto 6.9. + += 2.4.23 = +- feature Compatibility Ultimate Member Forms #208 +- fixed Error while adding ACF pro repeater fields #209 +- fixed Critical error while translation #217 + += 2.4.22 = +- enhancement Fixed woocommerce attribute translation issue for third language #175 +- fixed Auto Translate style issue on product taxanomies/terms #196 +- enhancement Added re-translate option for taxonomies #197 +- feature Added an option to exclude page/post from auto translation #200 (Pro) +- fixed Featured image issue on block editor #203 + += 2.4.21 = +- fixed Rankmath title translation improvement #177 +- fixed Flag translation issue on products #185 +- fixed Memory size limit improvement #189 +- feature XLIFF export compatibility with ACF fields on post/pages #190 +- feature Added Bulk Translation Option for Tag and Categories #191 +- fixed Retranslation issue with Elementor pages #192 +- fixed Code improvement for duplicate queries #194 + += 2.4.20 = +- feature Compatibility with SEOpress #170 +- feature Auto url slug translation #171 +- fixed Divi builder content translation improvement #173 +- fixed Conflict with latest pro 1.12 version #178 +- feature Added option to retranslate #180 +- fixed Yoast default title issue #181 +- feature Added support for exporting and importing content in XLIFF or XML format for pages #182 +- fixed Code improvement for custom post taxonomy description #183 + += 2.4.19.1 = +- fixed Vulnerability fix reported by patchstack + += 2.4.19 = +- fixed Code-profiler plugin execution time issue #149 +- fixed Woocommerce settings translation improvement #161 +- feature Compatibility with ACF Pro Pages Option #162 +- fixed Conflict issue with pinnacle theme #163 +- fixed Code improvement of translation #164 +- fixed Compatibility with WordPress 6.8 and updated readme.txt #165 +- feature Added compatibility with Cyr-To-Lat plugin #169 + All changelog available on [GitHub](https://github.com/ahmedkaludi/wp-multilang/releases). \ No newline at end of file diff --git a/plugins/wp-react-custom-multilang/templates/admin-language-switcher-customizer.php b/plugins/wp-react-custom-multilang/templates/admin-language-switcher-customizer.php index 3d71efe58..702fab259 100644 --- a/plugins/wp-react-custom-multilang/templates/admin-language-switcher-customizer.php +++ b/plugins/wp-react-custom-multilang/templates/admin-language-switcher-customizer.php @@ -1,29 +1,29 @@ - + diff --git a/plugins/wp-react-custom-multilang/templates/admin-language-switcher.php b/plugins/wp-react-custom-multilang/templates/admin-language-switcher.php index 017130429..ea3d6a046 100644 --- a/plugins/wp-react-custom-multilang/templates/admin-language-switcher.php +++ b/plugins/wp-react-custom-multilang/templates/admin-language-switcher.php @@ -1,12 +1,12 @@ - + diff --git a/plugins/wp-react-custom-multilang/templates/language-switcher-dropdown.php b/plugins/wp-react-custom-multilang/templates/language-switcher-dropdown.php index f2228b96b..9bf66817a 100644 --- a/plugins/wp-react-custom-multilang/templates/language-switcher-dropdown.php +++ b/plugins/wp-react-custom-multilang/templates/language-switcher-dropdown.php @@ -1,27 +1,27 @@ - -
      -
    • - - - <?php echo esc_attr( $languages[ $lang ]['name'] ); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function ?> - - - - - -
        - $language ) { if ( wpm_get_language() == $code ) continue; ?> -
      • - - - <?php echo esc_attr( $language['name'] ); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function ?> - - - - - -
      • - -
      -
    • -
    + +
      +
    • + + + <?php echo esc_attr( $languages[ $lang ]['name'] ); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function ?> + + + + + +
        + $language ) { if ( wpm_get_language() == $code ) continue; ?> +
      • + + + <?php echo esc_attr( $language['name'] ); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- Reason Using built in function doesn't work in our case, so created custom function ?> + + + + + +
      • + +
      +
    • +
    diff --git a/plugins/wp-react-custom-multilang/templates/language-switcher-list.php b/plugins/wp-react-custom-multilang/templates/language-switcher-list.php index 8877f7823..593d42c7c 100644 --- a/plugins/wp-react-custom-multilang/templates/language-switcher-list.php +++ b/plugins/wp-react-custom-multilang/templates/language-switcher-list.php @@ -1,23 +1,23 @@ - - + + diff --git a/plugins/wp-react-custom-multilang/templates/language-switcher-select.php b/plugins/wp-react-custom-multilang/templates/language-switcher-select.php index 5563f9944..5b2e91668 100644 --- a/plugins/wp-react-custom-multilang/templates/language-switcher-select.php +++ b/plugins/wp-react-custom-multilang/templates/language-switcher-select.php @@ -1,7 +1,7 @@ - + diff --git a/plugins/wp-react-custom-multilang/uninstall.php b/plugins/wp-react-custom-multilang/uninstall.php index 178f4ec77..156c7e8dd 100644 --- a/plugins/wp-react-custom-multilang/uninstall.php +++ b/plugins/wp-react-custom-multilang/uninstall.php @@ -1,28 +1,28 @@ -query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wpm_%';" ); +query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wpm_%';" ); diff --git a/plugins/wp-react-custom-multilang/vendor/autoload.php b/plugins/wp-react-custom-multilang/vendor/autoload.php index 0e6124751..48c4f29fb 100644 --- a/plugins/wp-react-custom-multilang/vendor/autoload.php +++ b/plugins/wp-react-custom-multilang/vendor/autoload.php @@ -1,7 +1,7 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/plugins/wp-react-custom-multilang/vendor/composer/ClassLoader52.php b/plugins/wp-react-custom-multilang/vendor/composer/ClassLoader52.php index d721c7e76..ce5e7ea7c 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/ClassLoader52.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/ClassLoader52.php @@ -1,271 +1,271 @@ - - * - Jordi Boggiano - */ - -class xrstf_Composer52_ClassLoader { - private $prefixes = array(); - private $fallbackDirs = array(); - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoratative = false; - private $allowUnderscore = false; - - /** - * @param boolean $flag true to allow class names with a leading underscore, false to disable - */ - public function setAllowUnderscore($flag) { - $this->allowUnderscore = (boolean) $flag; - } - - /** - * @return array - */ - public function getPrefixes() { - return $this->prefixes; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoratative - */ - public function setClassMapAuthoritative($classMapAuthoratative) { - $this->classMapAuthoratative = $classMapAuthoratative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function getClassMapAuthoratative() { - return $this->classMapAuthoratative; - } - - /** - * @return array - */ - public function getFallbackDirs() { - return $this->fallbackDirs; - } - - /** - * @return array - */ - public function getClassMap() { - return $this->classMap; - } - - /** - * @param array $classMap class to filename map - */ - public function addClassMap(array $classMap) { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } - else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of classes, merging with any others previously set. - * - * @param string $prefix the classes prefix - * @param array|string $paths the location(s) of the classes - * @param bool $prepend prepend the location(s) - */ - public function add($prefix, $paths, $prepend = false) { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirs = array_merge( - (array) $paths, - $this->fallbackDirs - ); - } - else { - $this->fallbackDirs = array_merge( - $this->fallbackDirs, - (array) $paths - ); - } - - return; - } - - if (!isset($this->prefixes[$prefix])) { - $this->prefixes[$prefix] = (array) $paths; - return; - } - - if ($prepend) { - $this->prefixes[$prefix] = array_merge( - (array) $paths, - $this->prefixes[$prefix] - ); - } - else { - $this->prefixes[$prefix] = array_merge( - $this->prefixes[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of classes, replacing any others previously set. - * - * @param string $prefix the classes prefix - * @param array|string $paths the location(s) of the classes - */ - public function set($prefix, $paths) { - if (!$prefix) { - $this->fallbackDirs = (array) $paths; - return; - } - - $this->prefixes[$prefix] = (array) $paths; - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() { - return $this->useIncludePath; - } - - /** - * Registers this instance as an autoloader. - */ - public function register() { - spl_autoload_register(array($this, 'loadClass'), true); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class the name of the class - * @return bool|null true, if loaded - */ - public function loadClass($class) { - if ($file = $this->findFile($class)) { - include $file; - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class the name of the class - * @return string|null the path, if found - */ - public function findFile($class) { - if ('\\' === $class[0]) { - $class = substr($class, 1); - } - - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - elseif ($this->classMapAuthoratative) { - return false; - } - - $classPath = $this->getClassPath($class); - - foreach ($this->prefixes as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { - return $dir.DIRECTORY_SEPARATOR.$classPath; - } - } - } - } - - foreach ($this->fallbackDirs as $dir) { - if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { - return $dir.DIRECTORY_SEPARATOR.$classPath; - } - } - - if ($this->useIncludePath && $file = self::resolveIncludePath($classPath)) { - return $file; - } - - return $this->classMap[$class] = false; - } - - private function getClassPath($class) { - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR; - $className = substr($class, $pos + 1); - } - else { - // PEAR-like class name - $classPath = null; - $className = $class; - } - - $className = str_replace('_', DIRECTORY_SEPARATOR, $className); - - // restore the prefix - if ($this->allowUnderscore && DIRECTORY_SEPARATOR === $className[0]) { - $className[0] = '_'; - } - - $classPath .= $className.'.php'; - - return $classPath; - } - - public static function resolveIncludePath($classPath) { - $paths = explode(PATH_SEPARATOR, get_include_path()); - - foreach ($paths as $path) { - $path = rtrim($path, '/\\'); - - if ($file = file_exists($path.DIRECTORY_SEPARATOR.$file)) { - return $file; - } - } - - return false; - } -} + + * - Jordi Boggiano + */ + +class xrstf_Composer52_ClassLoader { + private $prefixes = array(); + private $fallbackDirs = array(); + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoratative = false; + private $allowUnderscore = false; + + /** + * @param boolean $flag true to allow class names with a leading underscore, false to disable + */ + public function setAllowUnderscore($flag) { + $this->allowUnderscore = (boolean) $flag; + } + + /** + * @return array + */ + public function getPrefixes() { + return $this->prefixes; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoratative + */ + public function setClassMapAuthoritative($classMapAuthoratative) { + $this->classMapAuthoratative = $classMapAuthoratative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function getClassMapAuthoratative() { + return $this->classMapAuthoratative; + } + + /** + * @return array + */ + public function getFallbackDirs() { + return $this->fallbackDirs; + } + + /** + * @return array + */ + public function getClassMap() { + return $this->classMap; + } + + /** + * @param array $classMap class to filename map + */ + public function addClassMap(array $classMap) { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } + else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of classes, merging with any others previously set. + * + * @param string $prefix the classes prefix + * @param array|string $paths the location(s) of the classes + * @param bool $prepend prepend the location(s) + */ + public function add($prefix, $paths, $prepend = false) { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirs = array_merge( + (array) $paths, + $this->fallbackDirs + ); + } + else { + $this->fallbackDirs = array_merge( + $this->fallbackDirs, + (array) $paths + ); + } + + return; + } + + if (!isset($this->prefixes[$prefix])) { + $this->prefixes[$prefix] = (array) $paths; + return; + } + + if ($prepend) { + $this->prefixes[$prefix] = array_merge( + (array) $paths, + $this->prefixes[$prefix] + ); + } + else { + $this->prefixes[$prefix] = array_merge( + $this->prefixes[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of classes, replacing any others previously set. + * + * @param string $prefix the classes prefix + * @param array|string $paths the location(s) of the classes + */ + public function set($prefix, $paths) { + if (!$prefix) { + $this->fallbackDirs = (array) $paths; + return; + } + + $this->prefixes[$prefix] = (array) $paths; + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() { + return $this->useIncludePath; + } + + /** + * Registers this instance as an autoloader. + */ + public function register() { + spl_autoload_register(array($this, 'loadClass'), true); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class the name of the class + * @return bool|null true, if loaded + */ + public function loadClass($class) { + if ($file = $this->findFile($class)) { + include $file; + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class the name of the class + * @return string|null the path, if found + */ + public function findFile($class) { + if ('\\' === $class[0]) { + $class = substr($class, 1); + } + + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + elseif ($this->classMapAuthoratative) { + return false; + } + + $classPath = $this->getClassPath($class); + + foreach ($this->prefixes as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { + return $dir.DIRECTORY_SEPARATOR.$classPath; + } + } + } + } + + foreach ($this->fallbackDirs as $dir) { + if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) { + return $dir.DIRECTORY_SEPARATOR.$classPath; + } + } + + if ($this->useIncludePath && $file = self::resolveIncludePath($classPath)) { + return $file; + } + + return $this->classMap[$class] = false; + } + + private function getClassPath($class) { + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR; + $className = substr($class, $pos + 1); + } + else { + // PEAR-like class name + $classPath = null; + $className = $class; + } + + $className = str_replace('_', DIRECTORY_SEPARATOR, $className); + + // restore the prefix + if ($this->allowUnderscore && DIRECTORY_SEPARATOR === $className[0]) { + $className[0] = '_'; + } + + $classPath .= $className.'.php'; + + return $classPath; + } + + public static function resolveIncludePath($classPath) { + $paths = explode(PATH_SEPARATOR, get_include_path()); + + foreach ($paths as $path) { + $path = rtrim($path, '/\\'); + + if ($file = file_exists($path.DIRECTORY_SEPARATOR.$file)) { + return $file; + } + } + + return false; + } +} diff --git a/plugins/wp-react-custom-multilang/vendor/composer/LICENSE b/plugins/wp-react-custom-multilang/vendor/composer/LICENSE index f27399a04..6256709d3 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/LICENSE +++ b/plugins/wp-react-custom-multilang/vendor/composer/LICENSE @@ -1,21 +1,21 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/plugins/wp-react-custom-multilang/vendor/composer/autoload_classmap.php b/plugins/wp-react-custom-multilang/vendor/composer/autoload_classmap.php index b0249e01e..1d4be89cb 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/autoload_classmap.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/autoload_classmap.php @@ -1,83 +1,99 @@ - $baseDir . '/includes/abstracts/abstract-wpm-object.php', - 'WPM\\Includes\\Abstracts\\WPM_Widget' => $baseDir . '/includes/abstracts/abstract-wpm-widget.php', - 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Comment_Languages' => $baseDir . '/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php', - 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Post_Languages' => $baseDir . '/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Additional' => $baseDir . '/includes/admin/settings/class-wpm-settings-additional.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_General' => $baseDir . '/includes/admin/settings/class-wpm-settings-general.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Languages' => $baseDir . '/includes/admin/settings/class-wpm-settings-languages.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Support' => $baseDir . '/includes/admin/settings/class-wpm-settings-support.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Premium' => $baseDir . '/includes/admin/settings/class-wpm-settings-premium.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Upgrade_Pro' => $baseDir . '/includes/admin/settings/class-wpm-settings-upgradepro.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate' => $baseDir . '/includes/admin/settings/class-wpm-settings-auto-translate.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Page' => $baseDir . '/includes/admin/settings/class-wpm-settings-page.php', - 'WPM\\Includes\\Admin\\WPM_Admin' => $baseDir . '/includes/admin/class-wpm-admin.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Assets' => $baseDir . '/includes/admin/class-wpm-admin-assets.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Customizer' => $baseDir . '/includes/admin/class-wpm-admin-customizer.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Edit_Menus' => $baseDir . '/includes/admin/class-wpm-admin-edit-menus.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Menus' => $baseDir . '/includes/admin/class-wpm-admin-menus.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Meta_Boxes' => $baseDir . '/includes/admin/class-wpm-admin-meta-boxes.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Notices' => $baseDir . '/includes/admin/class-wpm-admin-notices.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Posts' => $baseDir . '/includes/admin/class-wpm-admin-posts.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Qtranslate' => $baseDir . '/includes/admin/class-wpm-admin-qtranslate.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Settings' => $baseDir . '/includes/admin/class-wpm-admin-settings.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Taxonomies' => $baseDir . '/includes/admin/class-wpm-admin-taxonomies.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Widgets' => $baseDir . '/includes/admin/class-wpm-admin-widgets.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Newsletter' => $baseDir . '/includes/admin/class-wpm-admin-newsletter.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Gutenberg_Block' => $baseDir . '/includes/admin/class-wpm-admin-gutenberg-block.php', - 'WPM\\Includes\\Admin\\WPM_Deactivate_Feedback_Form' => $baseDir . '/includes/admin/tracking/class-wpm-feedback-form.php', - 'WPM\\Includes\\Admin\\WPM_Reset_Settings' => $baseDir . '/includes/admin/class-wpm-reset-settings.php', - 'WPM\\Includes\\Integrations\\WPM_AIOSP' => $baseDir . '/includes/integrations/class-wpm-aiosp.php', - 'WPM\\Includes\\Integrations\\WPM_Acf' => $baseDir . '/includes/integrations/class-wpm-acf.php', - 'WPM\\Includes\\Integrations\\WPM_SCF' => $baseDir . '/includes/integrations/class-wpm-scf.php', - 'WPM\\Includes\\Integrations\\WPM_Better_Search' => $baseDir . '/includes/integrations/class-wpm-better-search.php', - 'WPM\\Includes\\Integrations\\WPM_BuddyPress' => $baseDir . '/includes/integrations/class-wpm-buddypress.php', - 'WPM\\Includes\\Integrations\\WPM_CF7' => $baseDir . '/includes/integrations/class-wpm-cf7.php', - 'WPM\\Includes\\Integrations\\WPM_MailChimp_For_WP' => $baseDir . '/includes/integrations/class-wpm-mailchimp-for-wp.php', - 'WPM\\Includes\\Integrations\\WPM_Masterslider' => $baseDir . '/includes/integrations/class-wpm-masterslider.php', - 'WPM\\Includes\\Integrations\\WPM_Megamenu' => $baseDir . '/includes/integrations/class-wpm-megamenu.php', - 'WPM\\Includes\\Integrations\\WPM_NGG' => $baseDir . '/includes/integrations/class-wpm-ngg.php', - 'WPM\\Includes\\Integrations\\WPM_Newsletter' => $baseDir . '/includes/integrations/class-wpm-newsletter.php', - 'WPM\\Includes\\Integrations\\WPM_PBSO' => $baseDir . '/includes/integrations/class-wpm-pbso.php', - 'WPM\\Includes\\Integrations\\WPM_Rank_Math' => $baseDir . '/includes/integrations/class-wpm-rank-math.php', - 'WPM\\Includes\\Integrations\\WPM_Tablepress' => $baseDir . '/includes/integrations/class-wpm-tablepress.php', - 'WPM\\Includes\\Integrations\\WPM_VC' => $baseDir . '/includes/integrations/class-wpm-vc.php', - 'WPM\\Includes\\Integrations\\WPM_WooCommerce' => $baseDir . '/includes/integrations/class-wpm-woocommerce.php', - 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo' => $baseDir . '/includes/integrations/class-wpm-yoast-seo.php', - 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo_Presenters' => $baseDir . '/includes/integrations/class-wpm-yoast-seo-presenters.php', - 'WPM\\Includes\\Integrations\\WPM_Bylaw_Plus' => $baseDir . '/includes/integrations/class-wpm-bylaw-plus.php', - 'WPM\\Includes\\Integrations\\WPM_Schema_Saswp' => $baseDir . '/includes/integrations/class-wpm-schema-and-structured-data.php', - 'WPM\\Includes\\Integrations\\WPM_Team' => $baseDir . '/includes/integrations/class-wpm-team.php', - 'WPM\\Includes\\Integrations\\WPM_Forminator' => $baseDir . '/includes/integrations/class-wpm-forminator.php', - 'WPM\\Includes\\Libraries\\WPM_Walker_Nav_Menu_Edit' => $baseDir . '/includes/libraries/class-wpm-walker-nav-menu-edit.php', - 'WPM\\Includes\\Libraries\\WP_Async_Request' => $baseDir . '/includes/libraries/abstract-wp-async-request.php', - 'WPM\\Includes\\Libraries\\WP_Background_Process' => $baseDir . '/includes/libraries/abstract-wp-background-process.php', - 'WPM\\Includes\\WPM_AJAX' => $baseDir . '/includes/class-wpm-ajax.php', - 'WPM\\Includes\\WPM_Background_Updater' => $baseDir . '/includes/class-wpm-background-updater.php', - 'WPM\\Includes\\WPM_Comments' => $baseDir . '/includes/class-wpm-comments.php', - 'WPM\\Includes\\WPM_Config' => $baseDir . '/includes/class-wpm-config.php', - 'WPM\\Includes\\WPM_Frontend_Scripts' => $baseDir . '/includes/class-wpm-frontend-scripts.php', - 'WPM\\Includes\\WPM_Install' => $baseDir . '/includes/class-wpm-install.php', - 'WPM\\Includes\\WPM_Menus' => $baseDir . '/includes/class-wpm-menus.php', - 'WPM\\Includes\\WPM_Options' => $baseDir . '/includes/class-wpm-options.php', - 'WPM\\Includes\\WPM_Posts' => $baseDir . '/includes/class-wpm-posts.php', - 'WPM\\Includes\\WPM_REST_Settings' => $baseDir . '/includes/class-wpm-rest-settings.php', - 'WPM\\Includes\\WPM_Setup' => $baseDir . '/includes/class-wpm-setup.php', - 'WPM\\Includes\\WPM_Shortcodes' => $baseDir . '/includes/class-wpm-shortcodes.php', - 'WPM\\Includes\\WPM_Site_Options' => $baseDir . '/includes/class-wpm-site-options.php', - 'WPM\\Includes\\WPM_Taxonomies' => $baseDir . '/includes/class-wpm-taxonomies.php', - 'WPM\\Includes\\WPM_Users' => $baseDir . '/includes/class-wpm-users.php', - 'WPM\\Includes\\WPM_Widgets' => $baseDir . '/includes/class-wpm-widgets.php', - 'WPM\\Includes\\WP_Multilang' => $baseDir . '/includes/class-wp-multilang.php', - 'WPM\\Includes\\Widgets\\WPM_Widget_Language_Switcher' => $baseDir . '/includes/widgets/class-wpm-widget-language-switcher.php', -); - -$class_map_array = apply_filters('wpmpro_autoload_classmap', $class_map_array); -return $class_map_array; + $baseDir . '/includes/abstracts/abstract-wpm-object.php', + 'WPM\\Includes\\Abstracts\\WPM_Widget' => $baseDir . '/includes/abstracts/abstract-wpm-widget.php', + 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Comment_Languages' => $baseDir . '/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php', + 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Post_Languages' => $baseDir . '/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Additional' => $baseDir . '/includes/admin/settings/class-wpm-settings-additional.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_General' => $baseDir . '/includes/admin/settings/class-wpm-settings-general.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Languages' => $baseDir . '/includes/admin/settings/class-wpm-settings-languages.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_AI_Integration' => $baseDir . '/includes/admin/settings/class-wpm-settings-ai-integration', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Support' => $baseDir . '/includes/admin/settings/class-wpm-settings-support.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Premium' => $baseDir . '/includes/admin/settings/class-wpm-settings-premium.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Upgrade_Pro' => $baseDir . '/includes/admin/settings/class-wpm-settings-upgradepro.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate' => $baseDir . '/includes/admin/settings/class-wpm-settings-auto-translate.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate_Pro' => $baseDirPro . '/includes/admin/settings/class-wpm-settings-auto-translate-pro.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Page' => $baseDir . '/includes/admin/settings/class-wpm-settings-page.php', + 'WPM\\Includes\\Admin\\WPM_Admin' => $baseDir . '/includes/admin/class-wpm-admin.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Assets' => $baseDir . '/includes/admin/class-wpm-admin-assets.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Customizer' => $baseDir . '/includes/admin/class-wpm-admin-customizer.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Edit_Menus' => $baseDir . '/includes/admin/class-wpm-admin-edit-menus.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Menus' => $baseDir . '/includes/admin/class-wpm-admin-menus.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Meta_Boxes' => $baseDir . '/includes/admin/class-wpm-admin-meta-boxes.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Notices' => $baseDir . '/includes/admin/class-wpm-admin-notices.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Posts' => $baseDir . '/includes/admin/class-wpm-admin-posts.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Qtranslate' => $baseDir . '/includes/admin/class-wpm-admin-qtranslate.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Settings' => $baseDir . '/includes/admin/class-wpm-admin-settings.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Taxonomies' => $baseDir . '/includes/admin/class-wpm-admin-taxonomies.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Widgets' => $baseDir . '/includes/admin/class-wpm-admin-widgets.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Newsletter' => $baseDir . '/includes/admin/class-wpm-admin-newsletter.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Gutenberg_Block' => $baseDir . '/includes/admin/class-wpm-admin-gutenberg-block.php', + 'WPM\\Includes\\Admin\\WPM_Deactivate_Feedback_Form' => $baseDir . '/includes/admin/tracking/class-wpm-feedback-form.php', + 'WPM\\Includes\\Admin\\WPM_Reset_Settings' => $baseDir . '/includes/admin/class-wpm-reset-settings.php', + 'WPM\\Includes\\Admin\\WPM_Bulk_Translate' => $baseDir . '/includes/admin/class-wpm-admin-bulk-translate.php', + 'WPM\\Includes\\Admin\\WPM_OpenAI' => $baseDir . '/includes/admin/class-wpm-openai.php', + 'WPM\\Includes\\Admin\\WPM_Deepl' => $baseDir . '/includes/admin/class-wpm-deepl.php', + 'WPM\\Includes\\Integrations\\WPM_AIOSP' => $baseDir . '/includes/integrations/class-wpm-aiosp.php', + 'WPM\\Includes\\Integrations\\WPM_Acf' => $baseDir . '/includes/integrations/class-wpm-acf.php', + 'WPM\\Includes\\Integrations\\WPM_SCF' => $baseDir . '/includes/integrations/class-wpm-scf.php', + 'WPM\\Includes\\Integrations\\WPM_Better_Search' => $baseDir . '/includes/integrations/class-wpm-better-search.php', + 'WPM\\Includes\\Integrations\\WPM_BuddyPress' => $baseDir . '/includes/integrations/class-wpm-buddypress.php', + 'WPM\\Includes\\Integrations\\WPM_CF7' => $baseDir . '/includes/integrations/class-wpm-cf7.php', + 'WPM\\Includes\\Integrations\\WPM_MailChimp_For_WP' => $baseDir . '/includes/integrations/class-wpm-mailchimp-for-wp.php', + 'WPM\\Includes\\Integrations\\WPM_Masterslider' => $baseDir . '/includes/integrations/class-wpm-masterslider.php', + 'WPM\\Includes\\Integrations\\WPM_Megamenu' => $baseDir . '/includes/integrations/class-wpm-megamenu.php', + 'WPM\\Includes\\Integrations\\WPM_NGG' => $baseDir . '/includes/integrations/class-wpm-ngg.php', + 'WPM\\Includes\\Integrations\\WPM_Newsletter' => $baseDir . '/includes/integrations/class-wpm-newsletter.php', + 'WPM\\Includes\\Integrations\\WPM_PBSO' => $baseDir . '/includes/integrations/class-wpm-pbso.php', + 'WPM\\Includes\\Integrations\\WPM_Rank_Math' => $baseDir . '/includes/integrations/class-wpm-rank-math.php', + 'WPM\\Includes\\Integrations\\WPM_Tablepress' => $baseDir . '/includes/integrations/class-wpm-tablepress.php', + 'WPM\\Includes\\Integrations\\WPM_VC' => $baseDir . '/includes/integrations/class-wpm-vc.php', + 'WPM\\Includes\\Integrations\\WPM_WooCommerce' => $baseDir . '/includes/integrations/class-wpm-woocommerce.php', + 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo' => $baseDir . '/includes/integrations/class-wpm-yoast-seo.php', + 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo_Presenters' => $baseDir . '/includes/integrations/class-wpm-yoast-seo-presenters.php', + 'WPM\\Includes\\Integrations\\WPM_Bylaw_Plus' => $baseDir . '/includes/integrations/class-wpm-bylaw-plus.php', + 'WPM\\Includes\\Integrations\\WPM_Schema_Saswp' => $baseDir . '/includes/integrations/class-wpm-schema-and-structured-data.php', + 'WPM\\Includes\\Integrations\\WPM_Team' => $baseDir . '/includes/integrations/class-wpm-team.php', + 'WPM\\Includes\\Integrations\\WPM_Forminator' => $baseDir . '/includes/integrations/class-wpm-forminator.php', + 'WPM\\Includes\\Integrations\\WPM_Fluentform' => $baseDir . '/includes/integrations/class-wpm-fluentform.php', + 'WPM\\Includes\\Integrations\\WPM_Gravityforms' => $baseDir . '/includes/integrations/class-wpm-gravityforms.php', + 'WPM\\Includes\\Integrations\\WPM_Ultimate_Member' => $baseDir . '/includes/integrations/class-wpm-ultimate-member.php', + 'WPM\\Includes\\Integrations\\WPM_Advanced_Ads' => $baseDir . '/includes/integrations/class-wpm-advanced-ads.php', + 'WPM\\Includes\\Integrations\\WPM_Strong_Testimonials' => $baseDir . '/includes/integrations/class-wpm-strong-testimonials.php', + 'WPM\\Includes\\Integrations\\WPM_Internal_Links' => $baseDir . '/includes/integrations/class-wpm-internal-links.php', + 'WPM\\Includes\\Integrations\\WPM_Daext_Autolinks_Manager' => $baseDir . '/includes/integrations/class-wpm-daext-autolinks-manager.php', + 'WPM\\Includes\\Integrations\\WPM_UX4G_Theme' => $baseDir . '/includes/integrations/class-wpm-ux4g-theme.php', + 'WPM\\Includes\\Integrations\\WPM_Fpsml' => $baseDir . '/includes/integrations/class-wpm-fpsml.php', + 'WPM\\Includes\\Libraries\\WPM_Walker_Nav_Menu_Edit' => $baseDir . '/includes/libraries/class-wpm-walker-nav-menu-edit.php', + 'WPM\\Includes\\Libraries\\WP_Async_Request' => $baseDir . '/includes/libraries/abstract-wp-async-request.php', + 'WPM\\Includes\\Libraries\\WP_Background_Process' => $baseDir . '/includes/libraries/abstract-wp-background-process.php', + 'WPM\\Includes\\WPM_AJAX' => $baseDir . '/includes/class-wpm-ajax.php', + 'WPM\\Includes\\WPM_Background_Updater' => $baseDir . '/includes/class-wpm-background-updater.php', + 'WPM\\Includes\\WPM_Comments' => $baseDir . '/includes/class-wpm-comments.php', + 'WPM\\Includes\\WPM_Config' => $baseDir . '/includes/class-wpm-config.php', + 'WPM\\Includes\\WPM_Frontend_Scripts' => $baseDir . '/includes/class-wpm-frontend-scripts.php', + 'WPM\\Includes\\WPM_Install' => $baseDir . '/includes/class-wpm-install.php', + 'WPM\\Includes\\WPM_Menus' => $baseDir . '/includes/class-wpm-menus.php', + 'WPM\\Includes\\WPM_Options' => $baseDir . '/includes/class-wpm-options.php', + 'WPM\\Includes\\WPM_Posts' => $baseDir . '/includes/class-wpm-posts.php', + 'WPM\\Includes\\WPM_WP_Block_Parser' => $baseDir . '/includes/class-wpm-wp-block-parser.php', + 'WPM\\Includes\\WPM_REST_Settings' => $baseDir . '/includes/class-wpm-rest-settings.php', + 'WPM\\Includes\\WPM_Setup' => $baseDir . '/includes/class-wpm-setup.php', + 'WPM\\Includes\\WPM_Shortcodes' => $baseDir . '/includes/class-wpm-shortcodes.php', + 'WPM\\Includes\\WPM_Site_Options' => $baseDir . '/includes/class-wpm-site-options.php', + 'WPM\\Includes\\WPM_Taxonomies' => $baseDir . '/includes/class-wpm-taxonomies.php', + 'WPM\\Includes\\WPM_Users' => $baseDir . '/includes/class-wpm-users.php', + 'WPM\\Includes\\WPM_Widgets' => $baseDir . '/includes/class-wpm-widgets.php', + 'WPM\\Includes\\WP_Multilang' => $baseDir . '/includes/class-wp-multilang.php', + 'WPM\\Includes\\WPM_Custom_Post_Types' => $baseDir . '/includes/class-wpm-custom-types.php', + 'WPM\\Includes\\Widgets\\WPM_Widget_Language_Switcher' => $baseDir . '/includes/widgets/class-wpm-widget-language-switcher.php', +); + +$class_map_array = apply_filters('wpmpro_autoload_classmap', $class_map_array); +return $class_map_array; diff --git a/plugins/wp-react-custom-multilang/vendor/composer/autoload_namespaces.php b/plugins/wp-react-custom-multilang/vendor/composer/autoload_namespaces.php index 420e84672..3fca6eb95 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/autoload_namespaces.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/autoload_namespaces.php @@ -1,10 +1,10 @@ - array($vendorDir . '/xrstf/composer-php52/lib'), -); + array($vendorDir . '/xrstf/composer-php52/lib'), +); diff --git a/plugins/wp-react-custom-multilang/vendor/composer/autoload_psr4.php b/plugins/wp-react-custom-multilang/vendor/composer/autoload_psr4.php index b265c64a2..5701d36f5 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/autoload_psr4.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/autoload_psr4.php @@ -1,9 +1,9 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit10f68284d303303872430af9e5a79198::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit10f68284d303303872430af9e5a79198::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/plugins/wp-react-custom-multilang/vendor/composer/autoload_real_52.php b/plugins/wp-react-custom-multilang/vendor/composer/autoload_real_52.php index 7dff524a4..0089fa8a9 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/autoload_real_52.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/autoload_real_52.php @@ -1,44 +1,44 @@ - $path) { - $loader->add($namespace, $path); - } - - $classMap = require $dir.'/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - return $loader; - } -} + $path) { + $loader->add($namespace, $path); + } + + $classMap = require $dir.'/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + + $loader->register(true); + + return $loader; + } +} diff --git a/plugins/wp-react-custom-multilang/vendor/composer/autoload_static.php b/plugins/wp-react-custom-multilang/vendor/composer/autoload_static.php index 225612ccb..4e8178119 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/autoload_static.php +++ b/plugins/wp-react-custom-multilang/vendor/composer/autoload_static.php @@ -1,102 +1,118 @@ - - array ( - 'xrstf\\Composer52' => - array ( - 0 => __DIR__ . '/..' . '/xrstf/composer-php52/lib', - ), - ), - ); - - public static $classMap = array ( - 'WPM\\Includes\\Abstracts\\WPM_Object' => __DIR__ . '/../..' . '/includes/abstracts/abstract-wpm-object.php', - 'WPM\\Includes\\Abstracts\\WPM_Widget' => __DIR__ . '/../..' . '/includes/abstracts/abstract-wpm-widget.php', - 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Comment_Languages' => __DIR__ . '/../..' . '/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php', - 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Post_Languages' => __DIR__ . '/../..' . '/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Additional' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-additional.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_General' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-general.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Languages' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-languages.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Support' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-support.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Premium' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-premium.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Upgrade_Pro' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-upgradepro.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-auto-translate.php', - 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Page' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-page.php', - 'WPM\\Includes\\Admin\\WPM_Admin' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Assets' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-assets.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Customizer' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-customizer.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Edit_Menus' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-edit-menus.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Menus' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-menus.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Meta_Boxes' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-meta-boxes.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Notices' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-notices.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Posts' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-posts.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Qtranslate' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-qtranslate.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Settings' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-settings.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Taxonomies' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-taxonomies.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Widgets' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-widgets.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Newsletter' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-newsletter.php', - 'WPM\\Includes\\Admin\\WPM_Admin_Gutenberg_Block' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-gutenberg-block.php', - 'WPM\\Includes\\Admin\\WPM_Deactivate_Feedback_Form' => __DIR__ . '/../..' . '/includes/admin/tracking/class-wpm-feedback-form.php', - 'WPM\\Includes\\Admin\\WPM_Reset_Settings' => __DIR__ . '/../..' . '/includes/admin/class-wpm-reset-settings.php', - 'WPM\\Includes\\Integrations\\WPM_AIOSP' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-aiosp.php', - 'WPM\\Includes\\Integrations\\WPM_Acf' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-acf.php', - 'WPM\\Includes\\Integrations\\WPM_SCF' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-scf.php', - 'WPM\\Includes\\Integrations\\WPM_Better_Search' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-better-search.php', - 'WPM\\Includes\\Integrations\\WPM_BuddyPress' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-buddypress.php', - 'WPM\\Includes\\Integrations\\WPM_CF7' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-cf7.php', - 'WPM\\Includes\\Integrations\\WPM_MailChimp_For_WP' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-mailchimp-for-wp.php', - 'WPM\\Includes\\Integrations\\WPM_Masterslider' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-masterslider.php', - 'WPM\\Includes\\Integrations\\WPM_Megamenu' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-megamenu.php', - 'WPM\\Includes\\Integrations\\WPM_NGG' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-ngg.php', - 'WPM\\Includes\\Integrations\\WPM_Newsletter' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-newsletter.php', - 'WPM\\Includes\\Integrations\\WPM_PBSO' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-pbso.php', - 'WPM\\Includes\\Integrations\\WPM_Rank_Math' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-rank-math.php', - 'WPM\\Includes\\Integrations\\WPM_Tablepress' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-tablepress.php', - 'WPM\\Includes\\Integrations\\WPM_VC' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-vc.php', - 'WPM\\Includes\\Integrations\\WPM_WooCommerce' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-woocommerce.php', - 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-yoast-seo.php', - 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo_Presenters' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-yoast-seo-presenters.php', - 'WPM\\Includes\\Integrations\\WPM_Bylaw_Plus' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-bylaw-plus.php', - 'WPM\\Includes\\Integrations\\WPM_Schema_Saswp' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-schema-and-structured-data.php', - 'WPM\\Includes\\Integrations\\WPM_Team' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-team.php', - 'WPM\\Includes\\Integrations\\WPM_Forminator' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-forminator.php', - 'WPM\\Includes\\Libraries\\WPM_Walker_Nav_Menu_Edit' => __DIR__ . '/../..' . '/includes/libraries/class-wpm-walker-nav-menu-edit.php', - 'WPM\\Includes\\Libraries\\WP_Async_Request' => __DIR__ . '/../..' . '/includes/libraries/abstract-wp-async-request.php', - 'WPM\\Includes\\Libraries\\WP_Background_Process' => __DIR__ . '/../..' . '/includes/libraries/abstract-wp-background-process.php', - 'WPM\\Includes\\WPM_AJAX' => __DIR__ . '/../..' . '/includes/class-wpm-ajax.php', - 'WPM\\Includes\\WPM_Background_Updater' => __DIR__ . '/../..' . '/includes/class-wpm-background-updater.php', - 'WPM\\Includes\\WPM_Comments' => __DIR__ . '/../..' . '/includes/class-wpm-comments.php', - 'WPM\\Includes\\WPM_Config' => __DIR__ . '/../..' . '/includes/class-wpm-config.php', - 'WPM\\Includes\\WPM_Frontend_Scripts' => __DIR__ . '/../..' . '/includes/class-wpm-frontend-scripts.php', - 'WPM\\Includes\\WPM_Install' => __DIR__ . '/../..' . '/includes/class-wpm-install.php', - 'WPM\\Includes\\WPM_Menus' => __DIR__ . '/../..' . '/includes/class-wpm-menus.php', - 'WPM\\Includes\\WPM_Options' => __DIR__ . '/../..' . '/includes/class-wpm-options.php', - 'WPM\\Includes\\WPM_Posts' => __DIR__ . '/../..' . '/includes/class-wpm-posts.php', - 'WPM\\Includes\\WPM_REST_Settings' => __DIR__ . '/../..' . '/includes/class-wpm-rest-settings.php', - 'WPM\\Includes\\WPM_Setup' => __DIR__ . '/../..' . '/includes/class-wpm-setup.php', - 'WPM\\Includes\\WPM_Shortcodes' => __DIR__ . '/../..' . '/includes/class-wpm-shortcodes.php', - 'WPM\\Includes\\WPM_Site_Options' => __DIR__ . '/../..' . '/includes/class-wpm-site-options.php', - 'WPM\\Includes\\WPM_Taxonomies' => __DIR__ . '/../..' . '/includes/class-wpm-taxonomies.php', - 'WPM\\Includes\\WPM_Users' => __DIR__ . '/../..' . '/includes/class-wpm-users.php', - 'WPM\\Includes\\WPM_Widgets' => __DIR__ . '/../..' . '/includes/class-wpm-widgets.php', - 'WPM\\Includes\\WP_Multilang' => __DIR__ . '/../..' . '/includes/class-wp-multilang.php', - 'WPM\\Includes\\Widgets\\WPM_Widget_Language_Switcher' => __DIR__ . '/../..' . '/includes/widgets/class-wpm-widget-language-switcher.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixesPsr0 = ComposerStaticInit10f68284d303303872430af9e5a79198::$prefixesPsr0; - $loader->classMap = ComposerStaticInit10f68284d303303872430af9e5a79198::$classMap; - - $loader->classMap = apply_filters('wpmpro_autoload_static', $loader->classMap); - }, null, ClassLoader::class); - } -} + + array ( + 'xrstf\\Composer52' => + array ( + 0 => __DIR__ . '/..' . '/xrstf/composer-php52/lib', + ), + ), + ); + + public static $classMap = array ( + 'WPM\\Includes\\Abstracts\\WPM_Object' => __DIR__ . '/../..' . '/includes/abstracts/abstract-wpm-object.php', + 'WPM\\Includes\\Abstracts\\WPM_Widget' => __DIR__ . '/../..' . '/includes/abstracts/abstract-wpm-widget.php', + 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Comment_Languages' => __DIR__ . '/../..' . '/includes/admin/meta-boxes/class-wpm-meta-box-comment-languages.php', + 'WPM\\Includes\\Admin\\Meta_Boxes\\WPM_Meta_Box_Post_Languages' => __DIR__ . '/../..' . '/includes/admin/meta-boxes/class-wpm-meta-box-post-languages.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Additional' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-additional.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_General' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-general.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Languages' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-languages.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_AI_Integration' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-ai-integration', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Support' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-support.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Premium' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-premium.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Upgrade_Pro' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-upgradepro.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-auto-translate.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Auto_Translate_Pro' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-auto-translate-pro.php', + 'WPM\\Includes\\Admin\\Settings\\WPM_Settings_Page' => __DIR__ . '/../..' . '/includes/admin/settings/class-wpm-settings-page.php', + 'WPM\\Includes\\Admin\\WPM_Admin' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Assets' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-assets.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Customizer' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-customizer.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Edit_Menus' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-edit-menus.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Menus' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-menus.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Meta_Boxes' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-meta-boxes.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Notices' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-notices.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Posts' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-posts.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Qtranslate' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-qtranslate.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Settings' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-settings.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Taxonomies' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-taxonomies.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Widgets' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-widgets.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Newsletter' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-newsletter.php', + 'WPM\\Includes\\Admin\\WPM_Admin_Gutenberg_Block' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-gutenberg-block.php', + 'WPM\\Includes\\Admin\\WPM_Deactivate_Feedback_Form' => __DIR__ . '/../..' . '/includes/admin/tracking/class-wpm-feedback-form.php', + 'WPM\\Includes\\Admin\\WPM_Reset_Settings' => __DIR__ . '/../..' . '/includes/admin/class-wpm-reset-settings.php', + 'WPM\\Includes\\Admin\\WPM_Bulk_Translate' => __DIR__ . '/../..' . '/includes/admin/class-wpm-admin-bulk-translate.php', + 'WPM\\Includes\\Admin\\WPM_OpenAI' => __DIR__ . '/../..' . '/includes/admin/class-wpm-openai.php', + 'WPM\\Includes\\Admin\\WPM_Deepl' => __DIR__ . '/../..' . '/includes/admin/class-wpm-deepl.php', + 'WPM\\Includes\\Integrations\\WPM_AIOSP' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-aiosp.php', + 'WPM\\Includes\\Integrations\\WPM_Acf' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-acf.php', + 'WPM\\Includes\\Integrations\\WPM_SCF' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-scf.php', + 'WPM\\Includes\\Integrations\\WPM_Better_Search' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-better-search.php', + 'WPM\\Includes\\Integrations\\WPM_BuddyPress' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-buddypress.php', + 'WPM\\Includes\\Integrations\\WPM_CF7' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-cf7.php', + 'WPM\\Includes\\Integrations\\WPM_MailChimp_For_WP' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-mailchimp-for-wp.php', + 'WPM\\Includes\\Integrations\\WPM_Masterslider' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-masterslider.php', + 'WPM\\Includes\\Integrations\\WPM_Megamenu' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-megamenu.php', + 'WPM\\Includes\\Integrations\\WPM_NGG' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-ngg.php', + 'WPM\\Includes\\Integrations\\WPM_Newsletter' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-newsletter.php', + 'WPM\\Includes\\Integrations\\WPM_PBSO' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-pbso.php', + 'WPM\\Includes\\Integrations\\WPM_Rank_Math' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-rank-math.php', + 'WPM\\Includes\\Integrations\\WPM_Tablepress' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-tablepress.php', + 'WPM\\Includes\\Integrations\\WPM_VC' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-vc.php', + 'WPM\\Includes\\Integrations\\WPM_WooCommerce' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-woocommerce.php', + 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-yoast-seo.php', + 'WPM\\Includes\\Integrations\\WPM_Yoast_Seo_Presenters' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-yoast-seo-presenters.php', + 'WPM\\Includes\\Integrations\\WPM_Bylaw_Plus' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-bylaw-plus.php', + 'WPM\\Includes\\Integrations\\WPM_Schema_Saswp' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-schema-and-structured-data.php', + 'WPM\\Includes\\Integrations\\WPM_Team' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-team.php', + 'WPM\\Includes\\Integrations\\WPM_Forminator' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-forminator.php', + 'WPM\\Includes\\Integrations\\WPM_Fluentform' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-fluentform.php', + 'WPM\\Includes\\Integrations\\WPM_Gravityforms' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-gravityforms.php', + 'WPM\\Includes\\Integrations\\WPM_Ultimate_Member' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-ultimate-member.php', + 'WPM\\Includes\\Integrations\\WPM_Advanced_Ads' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-advanced-ads.php', + 'WPM\\Includes\\Integrations\\WPM_Strong_Testimonials' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-strong-testimonials.php', + 'WPM\\Includes\\Integrations\\WPM_Internal_Links' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-internal-links.php', + 'WPM\\Includes\\Integrations\\WPM_Daext_Autolinks_Manager' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-daext-autolinks-manager.php', + 'WPM\\Includes\\Integrations\\WPM_UX4G_Theme' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-ux4g-theme.php', + 'WPM\\Includes\\Integrations\\WPM_Fpsml' => __DIR__ . '/../..' . '/includes/integrations/class-wpm-fpsml.php', + 'WPM\\Includes\\Libraries\\WPM_Walker_Nav_Menu_Edit' => __DIR__ . '/../..' . '/includes/libraries/class-wpm-walker-nav-menu-edit.php', + 'WPM\\Includes\\Libraries\\WP_Async_Request' => __DIR__ . '/../..' . '/includes/libraries/abstract-wp-async-request.php', + 'WPM\\Includes\\Libraries\\WP_Background_Process' => __DIR__ . '/../..' . '/includes/libraries/abstract-wp-background-process.php', + 'WPM\\Includes\\WPM_AJAX' => __DIR__ . '/../..' . '/includes/class-wpm-ajax.php', + 'WPM\\Includes\\WPM_Background_Updater' => __DIR__ . '/../..' . '/includes/class-wpm-background-updater.php', + 'WPM\\Includes\\WPM_Comments' => __DIR__ . '/../..' . '/includes/class-wpm-comments.php', + 'WPM\\Includes\\WPM_Config' => __DIR__ . '/../..' . '/includes/class-wpm-config.php', + 'WPM\\Includes\\WPM_Frontend_Scripts' => __DIR__ . '/../..' . '/includes/class-wpm-frontend-scripts.php', + 'WPM\\Includes\\WPM_Install' => __DIR__ . '/../..' . '/includes/class-wpm-install.php', + 'WPM\\Includes\\WPM_Menus' => __DIR__ . '/../..' . '/includes/class-wpm-menus.php', + 'WPM\\Includes\\WPM_Options' => __DIR__ . '/../..' . '/includes/class-wpm-options.php', + 'WPM\\Includes\\WPM_Posts' => __DIR__ . '/../..' . '/includes/class-wpm-posts.php', + 'WPM\\Includes\\WPM_WP_Block_Parser' => __DIR__ . '/../..' . '/includes/class-wpm-wp-block-parser.php', + 'WPM\\Includes\\WPM_REST_Settings' => __DIR__ . '/../..' . '/includes/class-wpm-rest-settings.php', + 'WPM\\Includes\\WPM_Setup' => __DIR__ . '/../..' . '/includes/class-wpm-setup.php', + 'WPM\\Includes\\WPM_Shortcodes' => __DIR__ . '/../..' . '/includes/class-wpm-shortcodes.php', + 'WPM\\Includes\\WPM_Site_Options' => __DIR__ . '/../..' . '/includes/class-wpm-site-options.php', + 'WPM\\Includes\\WPM_Taxonomies' => __DIR__ . '/../..' . '/includes/class-wpm-taxonomies.php', + 'WPM\\Includes\\WPM_Users' => __DIR__ . '/../..' . '/includes/class-wpm-users.php', + 'WPM\\Includes\\WPM_Widgets' => __DIR__ . '/../..' . '/includes/class-wpm-widgets.php', + 'WPM\\Includes\\WP_Multilang' => __DIR__ . '/../..' . '/includes/class-wp-multilang.php', + 'WPM\\Includes\\WPM_Custom_Post_Types' => __DIR__ . '/../..' . '/includes/class-wpm-custom-types.php', + 'WPM\\Includes\\Widgets\\WPM_Widget_Language_Switcher' => __DIR__ . '/../..' . '/includes/widgets/class-wpm-widget-language-switcher.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixesPsr0 = ComposerStaticInit10f68284d303303872430af9e5a79198::$prefixesPsr0; + $loader->classMap = ComposerStaticInit10f68284d303303872430af9e5a79198::$classMap; + + $loader->classMap = apply_filters('wpmpro_autoload_static', $loader->classMap); + }, null, ClassLoader::class); + } +} diff --git a/plugins/wp-react-custom-multilang/vendor/composer/installed.json b/plugins/wp-react-custom-multilang/vendor/composer/installed.json index 38208ed37..a057f4148 100644 --- a/plugins/wp-react-custom-multilang/vendor/composer/installed.json +++ b/plugins/wp-react-custom-multilang/vendor/composer/installed.json @@ -1,35 +1,35 @@ -[ - { - "name": "xrstf/composer-php52", - "version": "v1.0.20", - "version_normalized": "1.0.20.0", - "source": { - "type": "git", - "url": "https://github.com/composer-php52/composer-php52.git", - "reference": "bd41459d5e27df8d33057842b32377c39e97a5a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/bd41459d5e27df8d33057842b32377c39e97a5a8", - "reference": "bd41459d5e27df8d33057842b32377c39e97a5a8", - "shasum": "" - }, - "time": "2016-04-16T21:52:24+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-default": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "xrstf\\Composer52": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ] - } -] +[ + { + "name": "xrstf/composer-php52", + "version": "v1.0.20", + "version_normalized": "1.0.20.0", + "source": { + "type": "git", + "url": "https://github.com/composer-php52/composer-php52.git", + "reference": "bd41459d5e27df8d33057842b32377c39e97a5a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/bd41459d5e27df8d33057842b32377c39e97a5a8", + "reference": "bd41459d5e27df8d33057842b32377c39e97a5a8", + "shasum": "" + }, + "time": "2016-04-16T21:52:24+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-default": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "xrstf\\Composer52": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ] + } +] diff --git a/plugins/wp-react-custom-multilang/wp-multilang.php b/plugins/wp-react-custom-multilang/wp-multilang.php index 93bb59a4e..d4ca5f6cc 100644 --- a/plugins/wp-react-custom-multilang/wp-multilang.php +++ b/plugins/wp-react-custom-multilang/wp-multilang.php @@ -1,103 +1,103 @@ - -
    -

    - - WP Multilang! - id, 'wpm' ) === false ) { - ?> - - -

    -
    '; - +
    +

    + + WP Multilang! + id, 'wpm' ) === false ) { + ?> + + +

    +
    '; +