Skip to content

Instantly share code, notes, and snippets.

@Junex123
Last active September 22, 2025 19:17
Show Gist options
  • Select an option

  • Save Junex123/fe8dadd53bfbfd2a658d0049039dc34d to your computer and use it in GitHub Desktop.

Select an option

Save Junex123/fe8dadd53bfbfd2a658d0049039dc34d to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
<?php
/**
* homeo functions and definitions
*
* Set up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter
* hooks in WordPress to change core functionality.
*
* When using a child theme you can override certain functions (those wrapped
* in a function_exists() call) by defining them first in your child theme's
* functions.php file. The child theme's functions.php file is included before
* the parent theme's file, so the child theme functions would be used.
*
* @link https://codex.wordpress.org/Theme_Development
* @link https://codex.wordpress.org/Child_Themes
*
* Functions that are not pluggable (not wrapped in function_exists()) are
* instead attached to a filter or action hook.
*
* For more information on hooks, actions, and filters,
* {@link https://codex.wordpress.org/Plugin_API}
*
* @package WordPress
* @subpackage Homeo
* @since Homeo 1.2.57
*/
define( 'HOMEO_THEME_VERSION', '1.2.57' );
define( 'HOMEO_DEMO_MODE', false );
if ( ! isset( $content_width ) ) {
$content_width = 660;
}
if ( ! function_exists( 'homeo_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*
* @since Homeo 1.0
*/
function homeo_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on homeo, use a find and replace
* to change 'homeo' to the name of your theme in all the template files
*/
load_theme_textdomain( 'homeo', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_image_size( 'homeo-property-list', 260, 240, true );
add_image_size( 'homeo-property-grid', 850, 550, true );
add_image_size( 'homeo-property-grid1', 836, 950, true );
add_image_size( 'homeo-agent-grid', 425, 325, true );
add_image_size( 'homeo-slider', 1920, 870, true );
add_image_size( 'homeo-gallery-v1', 1920, 600, true );
add_image_size( 'homeo-gallery-v2-large', 960, 600, true );
add_image_size( 'homeo-gallery-v2-small', 480, 600, true );
add_image_size( 'homeo-gallery-v3', 640, 540, true );
add_image_size( 'homeo-gallery-v4-large', 750, 450, true );
add_image_size( 'homeo-gallery-v4-small', 165, 130, true );
add_image_size( 'homeo-gallery-v5', 1920, 500, true );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'homeo' ),
'agent-menu' => esc_html__( 'Agent Account Menu', 'homeo' ),
'agency-menu' => esc_html__( 'Agency Account Menu', 'homeo' ),
'user-menu' => esc_html__( 'User Account Menu', 'homeo' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
add_theme_support( "woocommerce", array('gallery_thumbnail_image_width' => 410) );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
) );
$color_scheme = homeo_get_color_scheme();
$default_color = trim( $color_scheme[0], '#' );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'homeo_custom_background_args', array(
'default-color' => $default_color,
'default-attachment' => 'fixed',
) ) );
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
// Add support for Block Styles.
add_theme_support( 'wp-block-styles' );
// Add support for full and wide align images.
add_theme_support( 'align-wide' );
// Add support for editor styles.
add_theme_support( 'editor-styles' );
// Add support for responsive embeds.
add_theme_support( 'responsive-embeds' );
// Enqueue editor styles.
add_editor_style( array( 'css/style-editor.css', homeo_get_fonts_url() ) );
}
endif; // homeo_setup
add_action( 'after_setup_theme', 'homeo_setup' );
/**
* Load Google Front
*/
function homeo_get_fonts_url() {
$fonts_url = '';
/* Translators: If there are characters in your language that are not
* supported by Montserrat, translate this to 'off'. Do not translate
* into your own language.
*/
$nunito = _x( 'on', 'Nunito font: on or off', 'homeo' );
if ( 'off' !== $nunito ) {
$font_families = array();
if ( 'off' !== $nunito ) {
$font_families[] = 'Nunito:300,400,600,700,800,900';
}
$query_args = array(
'family' => ( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$protocol = is_ssl() ? 'https:' : 'http:';
$fonts_url = add_query_arg( $query_args, $protocol .'//fonts.googleapis.com/css' );
}
return esc_url( $fonts_url );
}
/**
* Enqueue styles.
*
* @since Homeo 1.0
*/
function homeo_enqueue_styles() {
// load font
wp_enqueue_style( 'homeo-theme-fonts', homeo_get_fonts_url(), array(), null );
//load font awesome
wp_enqueue_style( 'all-awesome', get_template_directory_uri() . '/css/all-awesome.css', array(), '5.11.2' );
//load font flaticon
wp_enqueue_style( 'flaticon', get_template_directory_uri() . '/css/flaticon.css', array(), '1.0.0' );
// load font themify icon
wp_enqueue_style( 'themify-icons', get_template_directory_uri() . '/css/themify-icons.css', array(), '1.0.0' );
// load animate version 3.6.0
wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css', array(), '3.6.0' );
// load bootstrap style
if( is_rtl() ){
wp_enqueue_style( 'bootstrap-rtl', get_template_directory_uri() . '/css/bootstrap-rtl.css', array(), '3.2.0' );
} else {
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.2.0' );
}
// slick
wp_enqueue_style( 'slick', get_template_directory_uri() . '/css/slick.css', array(), '1.8.0' );
// magnific-popup
wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css', array(), '1.1.0' );
// perfect scrollbar
wp_enqueue_style( 'perfect-scrollbar', get_template_directory_uri() . '/css/perfect-scrollbar.css', array(), '0.6.12' );
// mobile menu
wp_enqueue_style( 'jquery-mmenu', get_template_directory_uri() . '/css/jquery.mmenu.css', array(), '0.6.12' );
// main style
wp_enqueue_style( 'homeo-template', get_template_directory_uri() . '/css/template.css', array(), '1.0' );
$custom_style = homeo_custom_styles();
if ( !empty($custom_style) ) {
wp_add_inline_style( 'homeo-template', $custom_style );
}
wp_enqueue_style( 'homeo-style', get_template_directory_uri() . '/style.css', array(), '1.0' );
}
add_action( 'wp_enqueue_scripts', 'homeo_enqueue_styles', 100 );
function homeo_admin_enqueue_styles() {
//load font awesome
wp_enqueue_style( 'all-awesome', get_template_directory_uri() . '/css/all-awesome.css', array(), '5.11.2' );
//load font flaticon
wp_enqueue_style( 'flaticon', get_template_directory_uri() . '/css/flaticon.css', array(), '1.0.0' );
// load font themify icon
wp_enqueue_style( 'themify-icons', get_template_directory_uri() . '/css/themify-icons.css', array(), '1.0.0' );
}
add_action( 'admin_enqueue_scripts', 'homeo_admin_enqueue_styles', 100 );
function homeo_login_enqueue_styles() {
wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.css', array(), '4.5.0' );
wp_enqueue_style( 'homeo-login-style', get_template_directory_uri() . '/css/login-style.css', array(), '1.0' );
}
add_action( 'login_enqueue_scripts', 'homeo_login_enqueue_styles', 10 );
/**
* Enqueue scripts.
*
* @since Homeo 1.0
*/
function homeo_enqueue_scripts() {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
// bootstrap
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '20150330', true );
// slick
wp_enqueue_script( 'slick', get_template_directory_uri() . '/js/slick.min.js', array( 'jquery' ), '1.8.0', true );
// countdown
wp_register_script( 'countdown', get_template_directory_uri() . '/js/countdown.js', array( 'jquery' ), '20150315', true );
wp_localize_script( 'countdown', 'homeo_countdown_opts', array(
'days' => esc_html__('Days', 'homeo'),
'hours' => esc_html__('Hrs', 'homeo'),
'mins' => esc_html__('Mins', 'homeo'),
'secs' => esc_html__('Secs', 'homeo'),
));
wp_enqueue_script( 'countdown' );
// popup
wp_enqueue_script( 'jquery-magnific-popup', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
// unviel
wp_enqueue_script( 'jquery-unveil', get_template_directory_uri() . '/js/jquery.unveil.js', array( 'jquery' ), '1.1.0', true );
// perfect scrollbar
wp_enqueue_script( 'perfect-scrollbar', get_template_directory_uri() . '/js/perfect-scrollbar.min.js', array( 'jquery' ), '1.5.0', true );
if ( homeo_get_config('keep_header') ) {
wp_enqueue_script( 'jquery-waypoints', get_template_directory_uri() . '/js/jquery.waypoints.min.js', array( 'jquery' ), '4.0.1', true );
wp_enqueue_script( 'sticky', get_template_directory_uri() . '/js/sticky.min.js', array( 'jquery', 'jquery-waypoints' ), '4.0.1', true );
}
// mobile menu script
wp_enqueue_script( 'jquery-mmenu', get_template_directory_uri() . '/js/jquery.mmenu.js', array( 'jquery' ), '0.6.12', true );
// main script
wp_register_script( 'homeo-functions', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
wp_localize_script( 'homeo-functions', 'homeo_ajax', array(
'ajaxurl' => esc_url(admin_url( 'admin-ajax.php' )),
'previous' => esc_html__('Previous', 'homeo'),
'next' => esc_html__('Next', 'homeo'),
'mmenu_title' => esc_html__('Menu', 'homeo')
));
wp_enqueue_script( 'homeo-functions' );
wp_add_inline_script( 'homeo-functions', "(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);" );
}
add_action( 'wp_enqueue_scripts', 'homeo_enqueue_scripts', 1 );
/**
* Add a `screen-reader-text` class to the search form's submit button.
*
* @since Homeo 1.0
*
* @param string $html Search form HTML.
* @return string Modified search form HTML.
*/
function homeo_search_form_modify( $html ) {
return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html );
}
add_filter( 'get_search_form', 'homeo_search_form_modify' );
/**
* Function get opt_name
*
*/
function homeo_get_opt_name() {
return 'homeo_theme_options';
}
add_filter( 'apus_framework_get_opt_name', 'homeo_get_opt_name' );
function homeo_register_demo_mode() {
if ( defined('HOMEO_DEMO_MODE') && HOMEO_DEMO_MODE ) {
return true;
}
return false;
}
add_filter( 'apus_framework_register_demo_mode', 'homeo_register_demo_mode' );
function homeo_get_demo_preset() {
$preset = '';
if ( defined('HOMEO_DEMO_MODE') && HOMEO_DEMO_MODE ) {
if ( isset($_REQUEST['_preset']) && $_REQUEST['_preset'] ) {
$presets = get_option( 'apus_framework_presets' );
if ( is_array($presets) && isset($presets[$_REQUEST['_preset']]) ) {
$preset = $_REQUEST['_preset'];
}
} else {
$preset = get_option( 'apus_framework_preset_default' );
}
}
return $preset;
}
function homeo_get_config($name, $default = '') {
global $homeo_options;
if ( isset($homeo_options[$name]) ) {
return $homeo_options[$name];
}
return $default;
}
function homeo_set_exporter_ocdi_settings_option_keys($option_keys) {
return array(
'elementor_disable_color_schemes',
'elementor_disable_typography_schemes',
'elementor_allow_tracking',
'elementor_cpt_support',
'wp_realestate_settings',
'wp_realestate_fields_data',
);
}
add_filter( 'apus_exporter_ocdi_settings_option_keys', 'homeo_set_exporter_ocdi_settings_option_keys' );
function homeo_disable_one_click_import() {
return false;
}
add_filter('apus_frammework_enable_one_click_import', 'homeo_disable_one_click_import');
function homeo_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar Default', 'homeo' ),
'id' => 'sidebar-default',
'description' => esc_html__( 'Add widgets here to appear in your Sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Properties filter sidebar', 'homeo' ),
'id' => 'properties-filter-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Properties filter sidebar fixed', 'homeo' ),
'id' => 'properties-filter-sidebar-fixed',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Properties filter Top sidebar', 'homeo' ),
'id' => 'properties-filter-top-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Properties filter Top Half Map', 'homeo' ),
'id' => 'properties-filter-top-half-map',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Property single sidebar', 'homeo' ),
'id' => 'property-single-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Agents filter sidebar', 'homeo' ),
'id' => 'agents-filter-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Agent single sidebar', 'homeo' ),
'id' => 'agent-single-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Agencies filter sidebar', 'homeo' ),
'id' => 'agencies-filter-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Agency single sidebar', 'homeo' ),
'id' => 'agency-single-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'User Profile sidebar', 'homeo' ),
'id' => 'user-profile-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Blog sidebar', 'homeo' ),
'id' => 'blog-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Shop sidebar', 'homeo' ),
'id' => 'shop-sidebar',
'description' => esc_html__( 'Add widgets here to appear in your sidebar.', 'homeo' ),
'before_widget' => '<aside class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title"><span>',
'after_title' => '</span></h2>',
) );
}
add_action( 'widgets_init', 'homeo_widgets_init' );
function homeo_get_load_plugins() {
$plugins[] = array(
'name' => esc_html__( 'Apus Framework For Themes', 'homeo' ),
'slug' => 'apus-framework',
'required' => true ,
'source' => get_template_directory() . '/inc/plugins/apus-framework.zip'
);
$plugins[] = array(
'name' => esc_html__( 'Elementor Page Builder', 'homeo' ),
'slug' => 'elementor',
'required' => true,
);
$plugins[] = array(
'name' => esc_html__( 'Revolution Slider', 'homeo' ),
'slug' => 'revslider',
'required' => true ,
'source' => get_template_directory() . '/inc/plugins/revslider.zip'
);
$plugins[] = array(
'name' => esc_html__( 'Cmb2', 'homeo' ),
'slug' => 'cmb2',
'required' => true,
);
$plugins[] = array(
'name' => esc_html__( 'MailChimp for WordPress', 'homeo' ),
'slug' => 'mailchimp-for-wp',
'required' => true
);
$plugins[] = array(
'name' => esc_html__( 'Contact Form 7', 'homeo' ),
'slug' => 'contact-form-7',
'required' => true,
);
// woocommerce plugins
$plugins[] = array(
'name' => esc_html__( 'Woocommerce', 'homeo' ),
'slug' => 'woocommerce',
'required' => true,
);
// Property plugins
$plugins[] = array(
'name' => esc_html__( 'WP RealEstate', 'homeo' ),
'slug' => 'wp-realestate',
'required' => true ,
'source' => get_template_directory() . '/inc/plugins/wp-realestate.zip'
);
$plugins[] = array(
'name' => esc_html__( 'WP RealEstate - WooCommerce Paid Listings', 'homeo' ),
'slug' => 'wp-realestate-wc-paid-listings',
'required' => true ,
'source' => get_template_directory() . '/inc/plugins/wp-realestate-wc-paid-listings.zip'
);
$plugins[] = array(
'name' => esc_html__( 'WP Private Message', 'homeo' ),
'slug' => 'wp-private-message',
'required' => true ,
'source' => get_template_directory() . '/inc/plugins/wp-private-message.zip'
);
$plugins[] = array(
'name' => esc_html__( 'One Click Demo Import', 'homeo' ),
'slug' => 'one-click-demo-import',
'required' => false,
);
$config = array(
'id' => 'homeo',
'default_path' => '',
'menu' => 'tgmpa-install-plugins',
'has_notices' => true,
'dismissable' => true,
'dismiss_msg' => '',
'is_automatic' => false,
'message' => '',
'strings' => array(
'bulk_install' => esc_html__( 'Install Selected Plugins', 'homeo' ),
),
);
tgmpa( $plugins, $config );
}
add_action( 'tgmpa_register', 'homeo_get_load_plugins' );
require get_template_directory() . '/inc/plugins/class-tgm-plugin-activation.php';
require get_template_directory() . '/inc/functions-helper.php';
require get_template_directory() . '/inc/functions-frontend.php';
/**
* Implement the Custom Header feature.
*
*/
require get_template_directory() . '/inc/custom-header.php';
require get_template_directory() . '/inc/classes/megamenu.php';
require get_template_directory() . '/inc/classes/mobilemenu.php';
/**
* Custom template tags for this theme.
*
*/
require get_template_directory() . '/inc/template-tags.php';
if ( defined( 'APUS_FRAMEWORK_REDUX_ACTIVED' ) ) {
require get_template_directory() . '/inc/vendors/redux-framework/redux-config.php';
define( 'HOMEO_REDUX_FRAMEWORK_ACTIVED', true );
}
if( homeo_is_cmb2_activated() ) {
require get_template_directory() . '/inc/vendors/cmb2/page.php';
define( 'HOMEO_CMB2_ACTIVED', true );
}
if( homeo_is_woocommerce_activated() ) {
require get_template_directory() . '/inc/vendors/woocommerce/functions.php';
require get_template_directory() . '/inc/vendors/woocommerce/functions-redux-configs.php';
define( 'HOMEO_WOOCOMMERCE_ACTIVED', true );
}
if( homeo_is_wp_realestate_activated() ) {
require get_template_directory() . '/inc/vendors/wp-realestate/functions-redux-configs.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions-agent.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions-agency.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions-property-display.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions-agent-display.php';
require get_template_directory() . '/inc/vendors/wp-realestate/functions-agency-display.php';
}
if ( homeo_is_wp_realestate_wc_paid_listings_activated() ) {
require get_template_directory() . '/inc/vendors/wp-realestate-wc-paid-listings/functions.php';
}
if( homeo_is_apus_framework_activated() ) {
function homeo_init_widgets() {
require get_template_directory() . '/inc/widgets/custom_menu.php';
require get_template_directory() . '/inc/widgets/recent_post.php';
require get_template_directory() . '/inc/widgets/search.php';
require get_template_directory() . '/inc/widgets/socials.php';
require get_template_directory() . '/inc/widgets/elementor-template.php';
if ( homeo_is_wp_realestate_activated() ) {
require get_template_directory() . '/inc/widgets/mortgage_calculator.php';
require get_template_directory() . '/inc/widgets/contact-form.php';
require get_template_directory() . '/inc/widgets/property-contact-form.php';
require get_template_directory() . '/inc/widgets/property-list.php';
require get_template_directory() . '/inc/widgets/user-short-profile.php';
if ( homeo_is_wp_private_message() ) {
require get_template_directory() . '/inc/widgets/private-message-form.php';
}
}
}
add_action( 'widgets_init', 'homeo_init_widgets' );
define( 'HOMEO_FRAMEWORK_ACTIVED', true );
}
if ( homeo_is_wp_private_message() ) {
require get_template_directory() . '/inc/vendors/wp-private-message/functions.php';
}
require get_template_directory() . '/inc/vendors/elementor/functions.php';
require get_template_directory() . '/inc/vendors/one-click-demo-import/functions.php';
function homeo_register_post_types($post_types) {
foreach ($post_types as $key => $post_type) {
if ( $post_type == 'brand' || $post_type == 'testimonial' ) {
unset($post_types[$key]);
}
}
if ( !in_array('header', $post_types) ) {
$post_types[] = 'header';
}
return $post_types;
}
add_filter( 'apus_framework_register_post_types', 'homeo_register_post_types' );
/**
* Customizer additions.
*
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Custom Styles
*
*/
require get_template_directory() . '/inc/custom-styles.php';
<?php
/**
* Property Filter
*
* @package wp-realestate
* @author Habq
* @license GNU General Public License, version 3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WP_RealEstate_Property_Filter extends WP_RealEstate_Abstract_Filter {
public static function init() {
add_action( 'pre_get_posts', array( __CLASS__, 'archive' ) );
add_action( 'pre_get_posts', array( __CLASS__, 'taxonomy' ) );
add_filter( 'wp-realestate-property-filter-query', array( __CLASS__, 'filter_query_property' ), 10, 2 );
add_filter( 'wp-realestate-property-query-args', array( __CLASS__, 'filter_query_args_property' ), 10, 2 );
}
public static function get_fields() {
return apply_filters( 'wp-realestate-default-property-filter-fields', array(
'center-location' => array(
'name' => __( 'Location', 'wp-realestate' ),
'field_call_back' => array( 'WP_RealEstate_Abstract_Filter', 'filter_field_input_location'),
'placeholder' => __( 'All Location', 'wp-realestate' ),
'show_distance' => true,
'toggle' => true,
'for_post_type' => 'property',
),
));
}
public static function archive($query) {
$suppress_filters = ! empty( $query->query_vars['suppress_filters'] ) ? $query->query_vars['suppress_filters'] : '';
if ( ! is_post_type_archive( 'property' ) || ! $query->is_main_query() || is_admin() || $query->query_vars['post_type'] != 'property' || $suppress_filters ) {
return;
}
$limit = wp_realestate_get_option('number_properties_per_page', 10);
$query_vars = &$query->query_vars;
$query_vars['posts_per_page'] = $limit;
$query->query_vars = $query_vars;
return self::filter_query( $query );
}
public static function taxonomy($query) {
$is_correct_taxonomy = false;
if ( is_tax( 'property_type' ) || is_tax( 'property_amenity' ) || is_tax( 'property_location' ) || is_tax( 'property_status' ) || is_tax( 'property_label' ) || is_tax( 'property_material' ) || apply_filters( 'wp-realestate-property-query-taxonomy', false ) ) {
$is_correct_taxonomy = true;
}
if ( ! $is_correct_taxonomy || ! $query->is_main_query() || is_admin() ) {
return;
}
$limit = wp_realestate_get_option('number_properties_per_page', 10);
$query_vars = $query->query_vars;
$query_vars['posts_per_page'] = $limit;
$query->query_vars = $query_vars;
return self::filter_query( $query );
}
public static function filter_query( $query = null, $params = array() ) {
global $wpdb, $wp_query;
if ( empty( $query ) ) {
$query = $wp_query;
}
if ( empty( $params ) ) {
$params = $_GET;
}
// Filter params
$params = apply_filters( 'wp_realestate_property_filter_params', $params );
// Initialize variables
$query_vars = $query->query_vars;
$query_vars = self::get_query_var_filter($query_vars, $params);
$query->query_vars = $query_vars;
// Meta query
$meta_query = self::get_meta_filter($params);
if ( $meta_query ) {
$query->set( 'meta_query', $meta_query );
}
// Tax query
$tax_query = self::get_tax_filter($params);
if ( $tax_query ) {
$query->set( 'tax_query', $tax_query );
}
return apply_filters('wp-realestate-property-filter-query', $query, $params);
}
public static function get_query_var_filter($query_vars, $params) {
$ids = null;
$query_vars = self::orderby($query_vars, $params);
// Property title
if ( ! empty( $params['filter-title'] ) ) {
global $wp_realestate_property_keyword;
$wp_realestate_property_keyword = sanitize_text_field( wp_unslash($params['filter-title']) );
$query_vars['s'] = sanitize_text_field( wp_unslash($params['filter-title']) );
add_filter( 'posts_search', array( __CLASS__, 'get_properties_keyword_search' ) );
}
$distance_ids = self::filter_by_distance($params, 'property');
if ( !empty($distance_ids) ) {
$ids = self::build_post_ids( $ids, $distance_ids );
}
if ( ! empty( $params['filter-author'] ) ) {
$query_vars['author'] = sanitize_text_field( wp_unslash($params['filter-author']) );
}
// Post IDs
if ( is_array( $ids ) && count( $ids ) > 0 ) {
$query_vars['post__in'] = $ids;
}
return $query_vars;
}
public static function get_meta_filter($params) {
$meta_query = array();
// price
if ( isset($params['filter-price-from']) && intval($params['filter-price-from']) >= 0 && isset($params['filter-price-to']) && intval($params['filter-price-to']) > 0) {
$price_from = WP_RealEstate_Price::convert_current_currency_to_default($params['filter-price-from']);
$price_to = WP_RealEstate_Price::convert_current_currency_to_default($params['filter-price-to']);
if ( $price_from == 0 ) {
$meta_query[] = array(
'relation' => 'OR',
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'price',
'value' => array( intval($price_from), intval($price_to) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'price',
'value' => '',
'compare' => '==',
),
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'price',
'value' => array( intval($price_from), intval($price_to) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
);
}
}
if ( ! empty( $params['filter-featured'] ) ) {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'featured',
'value' => 'on',
'compare' => '==',
);
}
// Rooms
if ( ! empty( $params['filter-rooms'] ) ) {
$value = sanitize_text_field( wp_unslash($params['filter-rooms']) );
if (strpos($value, '+') !== false) {
$value = rtrim($value, '+');
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'rooms',
'value' => $value,
'compare' => '>=',
'type' => 'NUMERIC',
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'rooms',
'value' => $value,
'compare' => '=',
'type' => 'NUMERIC',
);
}
}
// Beds
if ( ! empty( $params['filter-beds'] ) ) {
$value = sanitize_text_field( wp_unslash($params['filter-beds']) );
if (strpos($value, '+') !== false) {
$value = rtrim($value, '+');
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'beds',
'value' => $value,
'compare' => '>=',
'type' => 'NUMERIC',
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'beds',
'value' => $value,
'compare' => '=',
'type' => 'NUMERIC',
);
}
}
// Baths
if ( ! empty( $params['filter-baths'] ) ) {
$value = sanitize_text_field( wp_unslash($params['filter-baths']) );
if (strpos($value, '+') !== false) {
$value = rtrim($value, '+');
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'baths',
'value' => $value,
'compare' => '>=',
'type' => 'NUMERIC',
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'baths',
'value' => $value,
'compare' => '=',
'type' => 'NUMERIC',
);
}
}
// Garages
if ( ! empty( $params['filter-garages'] ) ) {
$value = sanitize_text_field( wp_unslash($params['filter-garages']) );
if (strpos($value, '+') !== false) {
$value = rtrim($value, '+');
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'garages',
'value' => $value,
'compare' => '>=',
'type' => 'NUMERIC',
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'garages',
'value' => $value,
'compare' => '=',
'type' => 'NUMERIC',
);
}
}
if ( isset($params['filter-home_area-from']) && intval($params['filter-home_area-from']) >= 0 && isset($params['filter-home_area-to']) && intval($params['filter-home_area-to']) > 0) {
if ( $params['filter-home_area-from'] == 0 ) {
$meta_query[] = array(
'relation' => 'OR',
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'home_area',
'value' => array( intval($params['filter-home_area-from']), intval($params['filter-home_area-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'home_area',
'value' => '',
'compare' => '==',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'home_area',
'compare' => 'NOT EXISTS',
),
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'home_area',
'value' => array( intval($params['filter-home_area-from']), intval($params['filter-home_area-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
);
}
}
if ( isset($params['filter-lot_area-from']) && intval($params['filter-lot_area-from']) >= 0 && isset($params['filter-lot_area-to']) && intval($params['filter-lot_area-to']) > 0) {
if ( $params['filter-lot_area-from'] == 0 ) {
$meta_query[] = array(
'relation' => 'OR',
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'lot_area',
'value' => array( intval($params['filter-lot_area-from']), intval($params['filter-lot_area-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'lot_area',
'value' => '',
'compare' => '==',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'lot_area',
'compare' => 'NOT EXISTS',
),
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'lot_area',
'value' => array( intval($params['filter-lot_area-from']), intval($params['filter-lot_area-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
);
}
}
// Year built
if ( isset($params['filter-year_built-from']) && intval($params['filter-year_built-from']) >= 0 && isset($params['filter-year_built-to']) && intval($params['filter-year_built-to']) > 0) {
if ( $params['filter-year_built-from'] == 0 ) {
$meta_query[] = array(
'relation' => 'OR',
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'year_built',
'value' => array( intval($params['filter-year_built-from']), intval($params['filter-year_built-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'year_built',
'value' => '',
'compare' => '==',
),
array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'year_built',
'compare' => 'NOT EXISTS',
),
);
} else {
$meta_query[] = array(
'key' => WP_REALESTATE_PROPERTY_PREFIX . 'year_built',
'value' => array( intval($params['filter-year_built-from']), intval($params['filter-year_built-to']) ),
'compare' => 'BETWEEN',
'type' => 'NUMERIC',
);
}
}
return $meta_query;
}
public static function get_tax_filter($params) {
$tax_query = array();
if ( ! empty( $params['filter-status'] ) ) {
if ( is_array($params['filter-status']) ) {
$field = is_numeric( $params['filter-status'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-status'] ) ) );
if ( !empty($values) ) {
$tax_query[] = array(
'taxonomy' => 'property_status',
'field' => $field,
'terms' => array_values($values),
'compare' => 'IN',
);
}
} else {
$field = is_numeric( $params['filter-status'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_status',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-status']) ),
'compare' => '==',
);
}
}
if ( ! empty( $params['filter-type'] ) ) {
if ( is_array($params['filter-type']) ) {
$field = is_numeric( $params['filter-type'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-type'] ) ) );
if ( !empty($values) ) {
$tax_query[] = array(
'taxonomy' => 'property_type',
'field' => $field,
'terms' => array_values($values),
'compare' => 'IN',
);
}
} else {
$field = is_numeric( $params['filter-type'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_type',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-type']) ),
'compare' => '==',
);
}
}
if ( ! empty( $params['filter-location'] ) ) {
if ( is_array($params['filter-location']) ) {
$field = is_numeric( $params['filter-location'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-location'] ) ) );
// if ( !empty($values) ) {
// $tax_query[] = array(
// 'taxonomy' => 'property_location',
// 'field' => $field,
// 'terms' => array_values($values),
// 'compare' => 'IN',
// );
// }
if ( !empty($values) ) {
$location_tax_query = array('relation' => 'AND');
foreach ($values as $key => $value) {
$location_tax_query[] = array(
'taxonomy' => 'property_location',
'field' => $field,
'terms' => $value,
'compare' => '==',
);
}
$tax_query[] = $location_tax_query;
}
} else {
$field = is_numeric( $params['filter-location'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_location',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-location']) ),
'compare' => '==',
);
}
}
if ( ! empty( $params['filter-amenity'] ) ) {
if ( is_array($params['filter-amenity']) ) {
$field = is_numeric( $params['filter-amenity'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-amenity'] ) ) );
if ( !empty($values) ) {
$tax_query[] = array(
'taxonomy' => 'property_amenity',
'field' => $field,
'terms' => array_values($values),
'compare' => 'IN',
);
}
} else {
$field = is_numeric( $params['filter-amenity'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_amenity',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-amenity']) ),
'compare' => '==',
);
}
}
if ( ! empty( $params['filter-material'] ) ) {
if ( is_array($params['filter-material']) ) {
$field = is_numeric( $params['filter-material'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-material'] ) ) );
if ( !empty($values) ) {
$tax_query[] = array(
'taxonomy' => 'property_material',
'field' => $field,
'terms' => array_values($values),
'compare' => 'IN',
);
}
} else {
$field = is_numeric( $params['filter-material'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_material',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-material']) ),
'compare' => '==',
);
}
}
if ( ! empty( $params['filter-label'] ) ) {
if ( is_array($params['filter-label']) ) {
$field = is_numeric( $params['filter-label'][0] ) ? 'term_id' : 'slug';
$values = array_filter( array_map( 'sanitize_title', wp_unslash( $params['filter-label'] ) ) );
if ( !empty($values) ) {
$tax_query[] = array(
'taxonomy' => 'property_label',
'field' => $field,
'terms' => array_values($values),
'compare' => 'IN',
);
}
} else {
$field = is_numeric( $params['filter-label'] ) ? 'term_id' : 'slug';
$tax_query[] = array(
'taxonomy' => 'property_label',
'field' => $field,
'terms' => sanitize_text_field( wp_unslash($params['filter-label']) ),
'compare' => '==',
);
}
}
return $tax_query;
}
public static function get_properties_keyword_search( $search ) {
global $wpdb, $wp_realestate_property_keyword;
// Searchable Meta Keys: set to empty to search all meta keys.
$searchable_meta_keys = array(
WP_REALESTATE_PROPERTY_PREFIX.'address',
WP_REALESTATE_PROPERTY_PREFIX.'property_id',
);
$searchable_meta_keys = apply_filters( 'wp_realestate_searchable_meta_keys', $searchable_meta_keys );
// Set Search DB Conditions.
$conditions = array();
// Search Post Meta.
if ( apply_filters( 'wp_realestate_search_post_meta', true ) ) {
// Only selected meta keys.
if ( $searchable_meta_keys ) {
$conditions[] = "{$wpdb->posts}.ID IN ( SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key IN ( '" . implode( "','", array_map( 'esc_sql', $searchable_meta_keys ) ) . "' ) AND meta_value LIKE '%" . esc_sql( $wp_realestate_property_keyword ) . "%' )";
} else {
// No meta keys defined, search all post meta value.
$conditions[] = "{$wpdb->posts}.ID IN ( SELECT post_id FROM {$wpdb->postmeta} WHERE meta_value LIKE '%" . esc_sql( $wp_realestate_property_keyword ) . "%' )";
}
}
// Search taxonomy.
$conditions[] = "{$wpdb->posts}.ID IN ( SELECT object_id FROM {$wpdb->term_relationships} AS tr LEFT JOIN {$wpdb->term_taxonomy} AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id LEFT JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id WHERE t.name LIKE '%" . esc_sql( $wp_realestate_property_keyword ) . "%' )";
$conditions = apply_filters( 'wp_realestate_search_conditions', $conditions, $wp_realestate_property_keyword );
if ( empty( $conditions ) ) {
return $search;
}
$conditions_str = implode( ' OR ', $conditions );
if ( ! empty( $search ) ) {
$search = preg_replace( '/^ AND /', '', $search );
$search = " AND ( {$search} OR ( {$conditions_str} ) )";
} else {
$search = " AND ( {$conditions_str} )";
}
remove_filter( 'posts_search', array( __CLASS__, 'get_properties_keyword_search' ) );
return $search;
}
public static function filter_query_property($query, $params) {
$query_vars = $query->query_vars;
$meta_query = self::filter_meta($query_vars, $params);
$query->set('meta_query', $meta_query);
return $query;
}
public static function filter_query_args_property($query_vars, $params) {
$meta_query = self::filter_meta($query_vars, $params);
$query_vars['meta_query'] = $meta_query;
return $query_vars;
}
public static function filter_meta($query_args, $params) {
if ( isset($query_args['meta_query']) ) {
$meta_query = $query_args['meta_query'];
} else {
$meta_query = array();
}
if ( empty($params) || !is_array($params) ) {
return $meta_query;
}
$filter_fields = WP_RealEstate_Custom_Fields::filter_custom_fields(array());
$cfielddate = [];
foreach ( $params as $key => $value ) {
if ( !empty($value) && strrpos( $key, 'filter-cfielddate-', -strlen( $key ) ) !== false ) {
$cfielddate[$key] = $value;
}
if ( !empty($value) && strrpos( $key, 'filter-cfield-', -strlen( $key ) ) !== false ) {
$custom_key = str_replace( 'filter-cfield-', '', $key );
if ( !empty($filter_fields[$custom_key]) ) {
$fielddata = $filter_fields[$custom_key];
$field_type = $fielddata['type'];
$meta_key = $custom_key;
switch ($field_type) {
case 'text':
case 'textarea':
case 'wysiwyg':
case 'number':
case 'url':
case 'email':
$meta_query[] = array(
'key' => $meta_key,
'value' => $value,
'compare' => 'LIKE',
);
break;
case 'radio':
case 'select':
case 'pw_select':
$meta_query[] = array(
'key' => $meta_key,
'value' => $value,
'compare' => '=',
);
break;
case 'checkbox':
$meta_query[] = array(
'key' => $meta_key,
'value' => 'on',
'compare' => '=',
);
break;
case 'pw_multiselect':
case 'multiselect':
case 'multicheck':
if ( is_array($value) ) {
$multi_meta = array( 'relation' => 'OR' );
foreach ($value as $val) {
$multi_meta[] = array(
'key' => $meta_key,
'value' => '"'.$val.'"',
'compare' => 'LIKE',
);
}
$meta_query[] = $multi_meta;
} else {
$meta_query[] = array(
'key' => $meta_key,
'value' => '"'.$value.'"',
'compare' => 'LIKE',
);
}
break;
}
}
}
}
if ( !empty($cfielddate) ) {
foreach ( $cfielddate as $key => $values ) {
if ( !empty($values) && is_array($values) && count($values) == 2 ) {
$custom_key = str_replace( 'filter-cfielddate-', '', $key );
if ( !empty($filter_fields[$custom_key]) ) {
$fielddata = $filter_fields[$custom_key];
$field_type = $fielddata['type'];
$meta_key = $custom_key;
if ( !empty($values['from']) && !empty($values['to']) ) {
$meta_query[] = array(
'key' => $meta_key,
'value' => array($values['from'], $values['to']),
'compare' => 'BETWEEN',
'type' => 'DATE',
);
} elseif ( !empty($values['from']) && empty($values['to']) ) {
$meta_query[] = array(
'key' => $meta_key,
'value' => $values['from'],
'compare' => '>',
'type' => 'DATE',
);
} elseif (empty($values['from']) && !empty($values['to']) ) {
$meta_query[] = array(
'key' => $meta_key,
'value' => $values['to'],
'compare' => '<',
'type' => 'DATE',
);
}
}
}
}
}
if ( !empty($params['filter-counter']) ) {
foreach ( $params['filter-counter'] as $key => $value ) {
if ( !empty($value) && strrpos( $key, 'filter-cfield-', -strlen( $key ) ) !== false ) {
$custom_key = str_replace( 'filter-cfield-', '', $key );
if ( !empty($filter_fields[$custom_key]) ) {
$fielddata = $filter_fields[$custom_key];
$field_type = $fielddata['type'];
$meta_key = $custom_key;
switch ($field_type) {
case 'text':
case 'textarea':
case 'wysiwyg':
case 'number':
case 'url':
case 'email':
$meta_query[] = array(
'key' => $meta_key,
'value' => $value,
'compare' => 'LIKE',
);
break;
case 'radio':
case 'select':
case 'pw_select':
$meta_query[] = array(
'key' => $meta_key,
'value' => $value,
'compare' => '=',
);
break;
case 'checkbox':
$meta_query[] = array(
'key' => $meta_key,
'value' => 'on',
'compare' => '=',
);
break;
case 'pw_multiselect':
case 'multiselect':
case 'multicheck':
if ( is_array($value) ) {
$multi_meta = array( 'relation' => 'OR' );
foreach ($value as $val) {
$multi_meta[] = array(
'key' => $meta_key,
'value' => '"'.$val.'"',
'compare' => 'LIKE',
);
}
$meta_query[] = $multi_meta;
} else {
$meta_query[] = array(
'key' => $meta_key,
'value' => '"'.$value.'"',
'compare' => 'LIKE',
);
}
break;
}
}
}
}
}
return $meta_query;
}
public static function display_filter_value($key, $value, $filters) {
$url = urldecode(WP_RealEstate_Mixes::get_full_current_url());
if ( is_array($value) ) {
$value = array_filter( array_map( 'sanitize_title', wp_unslash( $value ) ) );
} else {
$value = sanitize_text_field( wp_unslash($value) );
}
switch ($key) {
case 'filter-status':
self::render_filter_tax($key, $value, 'property_status', $url);
break;
case 'filter-location':
self::render_filter_tax($key, $value, 'property_location', $url);
break;
case 'filter-type':
self::render_filter_tax($key, $value, 'property_type', $url);
break;
case 'filter-amenity':
self::render_filter_tax($key, $value, 'property_amenity', $url);
break;
case 'filter-price':
if ( isset($value[0]) && isset($value[1]) ) {
$from = WP_RealEstate_Price::format_price($value[0], true);
$to = WP_RealEstate_Price::format_price($value[1], true);
$rm_url = self::remove_url_var($key . '-from=' . $value[0], $url);
$rm_url = self::remove_url_var($key . '-to=' . $value[1], $rm_url);
self::render_filter_result_item( $from.' - '.$to, $rm_url );
}
break;
case 'filter-distance':
if ( !empty($filters['filter-center-location']) ) {
$distance_type = apply_filters( 'wp_realestate_filter_distance_type', 'miles' );
$title = $value.' '.$distance_type;
$rm_url = self::remove_url_var( $key . '=' . $value, $url);
self::render_filter_result_item( $title, $rm_url );
}
break;
case 'filter-featured':
$title = esc_html__('Featured', 'wp-realestate');
$rm_url = self::remove_url_var($key . $key . '=' . $value, $url);
self::render_filter_result_item( $title, $rm_url );
break;
case 'filter-author':
$user_info = get_userdata($value);
if ( is_object($user_info) ) {
$title = $user_info->display_name;
} else {
$title = $value;
}
$rm_url = self::remove_url_var( $key . '=' . $value, $url);
self::render_filter_result_item( $title, $rm_url );
break;
case 'filter-orderby':
$orderby_options = apply_filters( 'wp-realestate-properties-orderby', array(
'menu_order' => esc_html__('Default', 'wp-realestate'),
'newest' => esc_html__('Newest', 'wp-realestate'),
'oldest' => esc_html__('Oldest', 'wp-realestate'),
'random' => esc_html__('Random', 'wp-realestate'),
));
$title = $value;
if ( !empty($orderby_options[$value]) ) {
$title = $orderby_options[$value];
}
$rm_url = self::remove_url_var( $key . '=' . $value, $url);
self::render_filter_result_item( $title, $rm_url );
break;
default:
if ( is_array($value) ) {
foreach ($value as $val) {
$rm_url = self::remove_url_var( $key . '[]=' . $val, $url);
self::render_filter_result_item( $val, $rm_url);
}
} else {
$rm_url = self::remove_url_var( $key . '=' . $value, $url);
self::render_filter_result_item( $value, $rm_url);
}
break;
}
}
public static function display_filter_value_simple($key, $value, $filters) {
if ( is_array($value) ) {
$value = array_filter( array_map( 'sanitize_title', wp_unslash( $value ) ) );
} else {
$value = sanitize_text_field( wp_unslash($value) );
}
switch ($key) {
case 'filter-status':
self::render_filter_tax_simple($key, $value, 'property_status', esc_html__('Status', 'wp-realestate'));
break;
case 'filter-location':
self::render_filter_tax_simple($key, $value, 'property_location', esc_html__('Location', 'wp-realestate'));
break;
case 'filter-type':
self::render_filter_tax_simple($key, $value, 'property_type', esc_html__('Type', 'wp-realestate'));
break;
case 'filter-amenity':
self::render_filter_tax_simple($key, $value, 'property_amenity', esc_html__('Tag', 'wp-realestate'));
break;
case 'filter-price':
if ( isset($value[0]) && isset($value[1]) ) {
$from = WP_RealEstate_Price::format_price($value[0]);
$to = WP_RealEstate_Price::format_price($value[1]);
self::render_filter_result_item_simple( $from.' - '.$to, esc_html__('Price', 'wp-realestate') );
}
break;
case 'filter-distance':
if ( !empty($filters['filter-center-location']) ) {
$distance_type = apply_filters( 'wp_realestate_filter_distance_type', 'miles' );
$title = $value.' '.$distance_type;
self::render_filter_result_item_simple( $title, esc_html__('Distance', 'wp-realestate') );
}
break;
case 'filter-featured':
$title = esc_html__('Yes', 'wp-realestate');
self::render_filter_result_item_simple( $title, esc_html__('Featured', 'wp-realestate') );
break;
case 'filter-author':
$user_info = get_userdata($value);
if ( is_object($user_info) ) {
$title = $user_info->display_name;
} else {
$title = $value;
}
self::render_filter_result_item_simple( $title, esc_html__('Author', 'wp-realestate') );
break;
case 'filter-orderby':
$orderby_options = apply_filters( 'wp-realestate-properties-orderby', array(
'menu_order' => esc_html__('Default', 'wp-realestate'),
'newest' => esc_html__('Newest', 'wp-realestate'),
'oldest' => esc_html__('Oldest', 'wp-realestate'),
'random' => esc_html__('Random', 'wp-realestate'),
));
$title = $value;
if ( !empty($orderby_options[$value]) ) {
$title = $orderby_options[$value];
}
self::render_filter_result_item_simple( $title, esc_html__('Orderby', 'wp-realestate') );
break;
default:
$meta_obj = WP_RealEstate_Property_Meta::get_instance(0);
$label_key = str_replace('filter-', '', $key);
$label_key = str_replace('filter-', '', $label_key);
$prefix = '';
if (preg_match("/-to/i", $key)) {
$prefix = esc_html__('to', 'wp-realestate');
$label_key = str_replace('-to', '', $label_key);
} elseif (preg_match("/-from/i", $key)) {
$prefix = esc_html__('from', 'wp-realestate');
$label_key = str_replace('-from', '', $label_key);
}
$label = $meta_obj->get_post_meta_title($label_key);
if ( empty($label) ) {
$label = $label_key;
}
if ( $prefix ) {
$label .= ' '.$prefix;
}
if ( is_array($value) ) {
foreach ($value as $val) {
self::render_filter_result_item_simple( $val, $label);
}
} else {
self::render_filter_result_item_simple( $value, $label);
}
break;
}
}
}
WP_RealEstate_Property_Filter::init();
(function($) {
"use strict";
$.extend($.apusThemeCore, {
/**
* Initialize scripts
*/
property_init: function() {
var self = this;
self.select2Init();
self.searchAjaxInit();
self.mortgageCalculator();
self.submitProperty();
self.listingDetail();
self.filterListingFnc();
self.userLoginRegister();
self.listingBtnFilter();
self.changePaddingTopContent();
self.dashboardChartInit();
$(window).resize(function(){
setTimeout(function(){
self.changePaddingTopContent();
}, 50);
});
self.agentAgencyLoadMore();
self.propertyCompare();
if ( $('.properties-listing-wrapper.main-items-wrapper, .agents-listing-wrapper.main-items-wrapper, .agencies-listing-wrapper.main-items-wrapper').length ) {
$(document).on('change', 'form.filter-listing-form input, form.filter-listing-form select', function (e) {
var form = $(this).closest('form.filter-listing-form');
setTimeout(function(){
form.trigger('submit');
}, 200);
});
$(document).on('submit', 'form.filter-listing-form', function (e) {
e.preventDefault();
var url = $(this).attr('action');
var formData = $(this).find(":input").filter(function(index, element) {
return $(element).val() != '';
}).serialize();
if( url.indexOf('?') != -1 ) {
url = url + '&' + formData;
} else{
url = url + '?' + formData;
}
self.propertiesGetPage( url );
return false;
});
// Sort Action
$(document).on('change', 'form.properties-ordering select.orderby', function(e) {
e.preventDefault();
$('form.properties-ordering').trigger('submit');
});
$(document).on('submit', 'form.properties-ordering', function (e) {
var url = $(this).attr('action');
var formData = $(this).find(":input").filter(function(index, element) {
return $(element).val() != '';
}).serialize();
if( url.indexOf('?') != -1 ) {
url = url + '&' + formData;
} else{
url = url + '?' + formData;
}
self.propertiesGetPage( url );
return false;
});
// display mode
$(document).on('change', 'form.properties-display-mode input', function(e) {
e.preventDefault();
$('form.properties-display-mode').trigger('submit');
});
$(document).on('submit', 'form.properties-display-mode', function (e) {
var url = $(this).attr('action');
if( url.indexOf('?') != -1 ) {
url = url + '&' + $(this).serialize();
} else{
url = url + '?' + $(this).serialize();
}
self.propertiesGetPage( url );
return false;
});
}
$(document).on('click', '. -btn', function(e) {
e.preventDefault();
$(this).closest('.search-form-inner').find('.advance-search-wrapper-fields').removeClass('overflow-visible').slideToggle('fast', 'swing', function(){
if ( !$(this).hasClass('overflow-visible') ) {
$(this).addClass('overflow-visible');
}
});
});
// ajax pagination
if ( $('.ajax-pagination').length ) {
self.ajaxPaginationLoad();
}
if ( $('.page-template-page-dashboard .sidebar-wrapper:not(.offcanvas-filter-sidebar) > .sidebar-right, .page-template-page-dashboard .sidebar-wrapper:not(.offcanvas-filter-sidebar) > .sidebar-left').length ) {
var ps = new PerfectScrollbar('.page-template-page-dashboard .sidebar-wrapper:not(.offcanvas-filter-sidebar) > .sidebar-right, .page-template-page-dashboard .sidebar-wrapper:not(.offcanvas-filter-sidebar) > .sidebar-left', {
wheelPropagation: true
});
}
// filter fixed
if ( $('.properties-filter-sidebar-wrapper .inner').length ) {
var ps = new PerfectScrollbar('.properties-filter-sidebar-wrapper .inner', {
wheelPropagation: true
});
}
self.galleryPropery();
$('.btn-send-mail').on('click', function(){
var target = $('form.contact-form-wrapper');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top - 100
}, 1000);
return false;
}
return false;
});
$(document).on('after_nearby_yelp_content', function(e, $this, data){
if ( !data.status && $('.property-single-layout').hasClass('property-single-v5') ) {
$('a[href="#property-single-nearby_yelp"]').parent().remove();
$('#property-single-nearby_yelp').remove();
}
});
$(document).on('after_nearby_google_place_content', function(e, $this, data){
if ( !data.status && $('.property-single-layout').hasClass('property-single-v5') ) {
$('a[href="#property-single-nearby_google_places"]').parent().remove();
$('#property-single-nearby_google_places').remove();
}
});
$(document).on('after_walk_score_content', function(e, $this, data){
if ( !data.status && $('.property-single-layout').hasClass('property-single-v5') ) {
$('a[href="#property-single-walk_score"]').parent().remove();
$('#property-single-walk_score').remove();
}
});
},
select2Init: function() {
// select2
if ( $.isFunction( $.fn.select2 ) && typeof wp_realestate_select2_opts !== 'undefined' ) {
var select2_args = wp_realestate_select2_opts;
select2_args['allowClear'] = true;
select2_args['minimumResultsForSearch'] = 10;
if ( typeof wp_realestate_select2_opts.language_result !== 'undefined' ) {
select2_args['language'] = {
noResults: function(){
return wp_realestate_select2_opts.language_result;
}
};
}
var filter_select2_args = select2_args;
select2_args['allowClear'] = false;
select2_args['theme'] = 'default';
var register_select2_args = select2_args;
register_select2_args['minimumResultsForSearch'] = -1;
// filter
$('select[name=email_frequency]').select2( select2_args );
$('.register-form select').select2( register_select2_args );
// fix for widget search
if( $('.widget-property-search-form.horizontal select').length ){
filter_select2_args.theme = 'default customizer-search';
}
if ( $('.layout-type-half-map .widget-property-search-form.horizontal select').length ){
filter_select2_args.theme = 'default customizer-search customizer-search-halpmap';
}
filter_select2_args['allowClear'] = true;
$('.filter-listing-form select').select2( filter_select2_args );
}
},
searchAjaxInit: function() {
if ( $.isFunction( $.fn.typeahead ) ) {
$('.apus-autocompleate-input').each(function(){
var $this = $(this);
$this.typeahead({
'hint': true,
'highlight': true,
'minLength': 2,
'limit': 10
}, {
name: 'search',
source: function (query, processSync, processAsync) {
processSync([homeo_property_opts.empty_msg]);
$this.closest('.twitter-typeahead').addClass('loading');
var values = {};
$.each($this.closest('form').serializeArray(), function (i, field) {
values[field.name] = field.value;
});
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'homeo_autocomplete_search_properties' );
}
return $.ajax({
url: ajaxurl,
type: 'GET',
data: {
'search': query,
'action': 'homeo_autocomplete_search_properties',
'data': values
},
dataType: 'json',
success: function (json) {
$this.closest('.twitter-typeahead').removeClass('loading');
$this.closest('.has-suggestion').removeClass('active');
return processAsync(json);
}
});
},
templates: {
empty : [
'<div class="empty-message">',
homeo_property_opts.empty_msg,
'</div>'
].join('\n'),
suggestion: Handlebars.compile( homeo_property_opts.template )
},
}
);
$this.on('typeahead:selected', function (e, data) {
e.preventDefault();
setTimeout(function(){
$('.apus-autocompleate-input').val(data.title);
}, 5);
return false;
});
});
}
},
mortgageCalculator: function() {
$('#btn_mortgage_get_results').on('click', function (e) {
e.preventDefault();
var property_price = $('#apus_mortgage_property_price').val();
var deposit = $('#apus_mortgage_deposit').val();
var interest_rate = parseFloat($('#apus_mortgage_interest_rate').val(), 10) / 100;
var years = parseInt($('#apus_mortgage_term_years').val(), 10);
var interest_rate_month = interest_rate / 12;
var nbp_month = years * 12;
var loan_amount = property_price - deposit;
var monthly_payment = parseFloat((loan_amount * interest_rate_month) / (1 - Math.pow(1 + interest_rate_month, -nbp_month))).toFixed(2);
if (monthly_payment === 'NaN') {
monthly_payment = 0;
}
$('.apus_mortgage_results').html( homeo_property_opts.monthly_text + homeo_property_opts.currency + monthly_payment);
});
},
dashboardChartInit: function() {
var self = this;
var $this = $('#dashboard_property_chart_wrapper');
if( $this.length <= 0 ) {
return;
}
// select2
if ( $.isFunction( $.fn.select2 ) && typeof wp_realestate_select2_opts !== 'undefined' ) {
var select2_args = wp_realestate_select2_opts;
select2_args['allowClear'] = false;
select2_args['minimumResultsForSearch'] = 10;
if ( typeof wp_realestate_select2_opts.language_result !== 'undefined' ) {
select2_args['language'] = {
noResults: function(){
return wp_realestate_select2_opts.language_result;
}
};
}
select2_args['width'] = '100%';
$('.stats-graph-search-form select').select2( select2_args );
}
var property_id = $this.data('property_id');
var nb_days = $this.data('nb_days');
self.dashboardChartAjaxInit($this, property_id, nb_days);
$('form.stats-graph-search-form select[name="property_id"]').on('change', function(){
$('form.stats-graph-search-form').trigger('submit');
});
$('form.stats-graph-search-form select[name="nb_days"]').on('change', function(){
$('form.stats-graph-search-form').trigger('submit');
});
$('form.stats-graph-search-form').on('submit', function(e){
e.preventDefault();
var property_id = $('form.stats-graph-search-form select[name="property_id"]').val();
var nb_days = $('form.stats-graph-search-form select[name="nb_days"]').val();
self.dashboardChartAjaxInit($this, property_id, nb_days);
return false;
});
},
dashboardChartAjaxInit: function($this, property_id, nb_days) {
var self = this;
if( $this.length <= 0 ) {
return;
}
if ( $this.hasClass('loading') ) {
return;
}
$this.addClass('loading');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'wp_realestate_get_property_chart' );
}
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'json',
data: {
action: 'wp_realestate_get_property_chart',
property_id: property_id,
nb_days: nb_days,
nonce: $this.data('nonce'),
}
}).done(function(response) {
if (response.status == 'error') {
$this.remove();
} else {
var ctx = $this.get(0).getContext("2d");
var data = {
labels: response.stats_labels,
datasets: [
{
label: response.stats_view,
backgroundColor: response.bg_color,
borderColor: response.border_color,
borderWidth: 1,
data: response.stats_values
},
]
};
var options = {
//Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
scaleBeginAtZero : true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines : false,
//String - Colour of the grid lines
scaleGridLineColor : "rgba(0,0,0,.05)",
//Number - Width of the grid lines
scaleGridLineWidth : 1,
//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - If there is a stroke on each bar
barShowStroke : false,
//Number - Pixel width of the bar stroke
barStrokeWidth : 2,
//Number - Spacing between each of the X value sets
barValueSpacing : 5,
//Number - Spacing between data sets within X values
barDatasetSpacing : 1,
legend: { display: false },
tooltips: {
enabled: true,
mode: 'x-axis',
cornerRadius: 4
},
}
if (typeof self.myBarChart !== 'undefined') {
self.myBarChart.destroy();
}
self.myBarChart = new Chart(ctx, {
type: response.chart_type,
data: data,
options: options
});
}
$this.removeClass('loading');
});
},
submitProperty: function() {
$(document).on('click', 'ul.submit-property-heading li a', function(e) {
e.preventDefault();
var href = $(this).attr('href');
if ( $(href).length ) {
$('ul.submit-property-heading li').removeClass('active');
$(this).closest('li').addClass('active');
$('.before-group-row').removeClass('active');
$(href).addClass('active');
$( "input" ).trigger( "pxg:simplerefreshmap" );
}
});
$(document).on('click', '.job-submission-previous-btn, .job-submission-next-btn', function(e) {
e.preventDefault();
var index = $(this).data('index');
if ( $('.before-group-row-'+index).length ) {
$('.before-group-row').removeClass('active');
$('.before-group-row-'+index).addClass('active');
$('.submit-property-heading li').removeClass('active');
$('.submit-property-heading-'+index).addClass('active');
$( "input" ).trigger( "pxg:simplerefreshmap" );
}
});
},
changePaddingTopContent: function() {
var header_h = 0;
if ($(window).width() >= 1200) {
if ( $('#apus-header').length ) {
var header_h = $('#apus-header').outerHeight();
$('#apus-main-content').css({ 'padding-top': 0 });
$('body.page-template-page-dashboard #apus-main-content').css({ 'padding-top': header_h });
} else if( $('div[data-elementor-type="header"]').length ) {
var header_h = $('div[data-elementor-type="header"]').outerHeight();
$('#apus-main-content').css({ 'padding-top': 0 });
$('body.page-template-page-dashboard #apus-main-content').css({ 'padding-top': header_h });
var wpadminbar_h = 0;
if ( $('#wpadminbar').length ) {
var wpadminbar_h = $('#wpadminbar').outerHeight();
}
header_h = header_h + wpadminbar_h;
}
} else {
var header_h = $('#apus-header-mobile').outerHeight();
$('#apus-main-content').css({ 'padding-top': header_h });
}
if ($('#properties-google-maps').is('.fix-map')) {
$('#properties-google-maps').css({ 'top': header_h, 'height': 'calc(100vh - ' + header_h+ 'px)' });
// filter for half 3
if ($(window).width() >= 1200) {
$('.layout-type-half-map-v3 .properties-filter-sidebar-wrapper ').css({ 'top': header_h, 'height': 'calc(100vh - ' + header_h+ 'px)' });
$('#apus-main-content').css({ 'padding-top': header_h });
}
}
// fix for half map
$('.layout-type-half-map .filter-sidebar').css({ 'padding-top': header_h + 30 });
// $('.layout-type-half-map .filter-scroll').perfectScrollbar();
if ( $('.layout-type-half-map .filter-scroll').length ) {
var ps = new PerfectScrollbar('.layout-type-half-map .filter-scroll', {
wheelPropagation: true
});
}
// offcanvas-filter-sidebar
$('.offcanvas-filter-sidebar').css({ 'padding-top': header_h + 10 });
},
agentAgencyLoadMore: function() {
$(document).on('click', '.ajax-properties-pagination .apus-loadmore-btn', function(e){
e.preventDefault();
var $this = $(this);
$this.addClass('loading');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'homeo_get_ajax_properties_load_more' );
}
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'json',
data: {
action: 'homeo_get_ajax_properties_load_more',
paged: $this.data('paged'),
post_id: $this.data('post_id'),
type: $this.data('type'),
}
}).done(function(data) {
$this.removeClass('loading');
$this.closest('.agent-agency-detail-properties').find('.row').append(data.output);
$this.data('paged', data.paged);
if ( !data.load_more ) {
$this.closest('.ajax-properties-pagination').addClass('all-properties-loaded');
}
});
});
$(document).on('click', '.ajax-agents-pagination .apus-loadmore-btn', function(e){
e.preventDefault();
var $this = $(this);
$this.addClass('loading');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'homeo_get_ajax_agents_load_more' );
}
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'json',
data: {
action: 'homeo_get_ajax_agents_load_more',
paged: $this.data('paged'),
post_id: $this.data('post_id'),
}
}).done(function(data) {
$this.removeClass('loading');
$this.closest('.agent-detail-agents').find('.row').append(data.output);
$this.data('paged', data.paged);
if ( !data.load_more ) {
$this.closest('.ajax-agents-pagination').addClass('all-properties-loaded');
}
});
});
},
propertyChangeMarginTopAffix: function() {
var affix_height = 0;
//if ($(window).width() > 991) {
if ( $('.panel-affix').length > 0 ) {
affix_height = $('.panel-affix').outerHeight();
$('.panel-affix-wrapper').css({'height': affix_height});
}
//}
return affix_height;
},
listingDetail: function() {
var self = this;
// sticky tabs
var affix_height = 0;
var affix_height_top = 0;
setTimeout(function(){
affix_height = affix_height_top = self.propertyChangeMarginTopAffix();
}, 50);
$(window).resize(function(){
affix_height = affix_height_top = self.propertyChangeMarginTopAffix();
});
if ($(window).width() >= 1200) {
//Function from Bluthemes, lets you add li elemants to affix object without having to alter and data attributes set out by bootstrap
setTimeout(function(){
// name your elements here
var stickyElement = '.panel-affix', // the element you want to make sticky
bottomElement = '#apus-footer'; // the bottom element where you want the sticky element to stop (usually the footer)
// make sure the element exists on the page before trying to initalize
if($( stickyElement ).length){
$( stickyElement ).each(function(){
var header_height = 0;
if ($(window).width() >= 1200) {
if ($('.main-sticky-header').length > 0) {
header_height = $('.main-sticky-header').outerHeight();
affix_height_top = affix_height + header_height;
}
} else {
header_height = $('#apus-header-mobile').outerHeight();
affix_height_top = affix_height + header_height;
header_height = 0;
}
affix_height_top = affix_height_top + 10;
// let's save some messy code in clean variables
// when should we start affixing? (the amount of pixels to the top from the element)
var fromTop = $( this ).offset().top,
// where is the bottom of the element?
fromBottom = $( document ).height()-($( this ).offset().top + $( this ).outerHeight()),
// where should we stop? (the amount of pixels from the top where the bottom element is)
// also add the outer height mismatch to the height of the element to account for padding and borders
stopOn = ($( this ).outerHeight() - $( this ).height());
// if the element doesn't need to get sticky, then skip it so it won't mess up your layout
if( (fromBottom-stopOn) > 200 ){
// let's put a sticky width on the element and assign it to the top
$( this ).css('width', $( this ).width()).css('top', 0).css('position', '');
// assign the affix to the element
$( this ).affix({
offset: {
// make it stick where the top pixel of the element is
top: fromTop - header_height,
// make it stop where the top pixel of the bottom element is
bottom: stopOn
}
// when the affix get's called then make sure the position is the default (fixed) and it's at the top
}).on('affix.bs.affix', function(){
var header_height = 0;
if ($(window).width() >= 1200) {
if ($('.main-sticky-header').length > 0) {
header_height = $('.main-sticky-header').outerHeight();
affix_height_top = affix_height + header_height;
}
} else {
header_height = $('#apus-header-mobile').outerHeight();
affix_height_top = affix_height + header_height;
header_height = 0;
}
affix_height_top = affix_height_top + 10;
$( this ).css('top', header_height).css('position', header_height);
});
}
// trigger the scroll event so it always activates
$( window ).trigger('scroll');
});
}
//Offset scrollspy height to highlight li elements at good window height
$('body').scrollspy({
target: ".header-tabs-wrapper",
offset: affix_height_top + 20
});
}, 50);
}
//Smooth Scrolling For Internal Page Links
$('.panel-affix a[href*="#"]:not([href="#"])').on('click', function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top - affix_height_top
}, 1000);
return false;
}
}
});
$(document).on('click', '.add-a-review', function(e) {
e.preventDefault();
var $id = $(this).attr('href');
if ( $($id).length > 0 ) {
$('html,body').animate({
scrollTop: $($id).offset().top - 100
}, 1000);
}
});
$(document).on('click', '.btn-view-all-photos', function(e){
$(this).closest('.property-detail-gallery').find('a:first').trigger('click');
});
$('.btn-print-property').on('click', function(e){
e.preventDefault();
var $this = $(this);
$this.addClass('loading');
var property_id = $(this).data('property_id');
var nonce = $(this).data('nonce');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'homeo_ajax_print_property' );
}
var printWindow = window.open('', 'Print Me', 'width=700 ,height=842');
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'html',
data: {
'property_id': property_id,
'nonce': nonce,
'action': 'homeo_ajax_print_property',
}
}).done(function(data) {
$this.removeClass('loading');
printWindow.document.write(data);
printWindow.document.close();
printWindow.focus();
// setTimeout(function(){
// printWindow.print();
// }, 2000);
// printWindow.close();
});
});
},
listingBtnFilter: function(){
$('.btn-view-map').on('click', function(e){
e.preventDefault();
$('#properties-google-maps').removeClass('hidden-sm').removeClass('hidden-xs');
$('.content-listing .properties-listing-wrapper, .content-listing .agencies-listing-wrapper').addClass('hidden-sm').addClass('hidden-xs');
$('.btn-view-listing').removeClass('hidden-sm').removeClass('hidden-xs');
$(this).addClass('hidden-sm').addClass('hidden-xs');
$('.properties-pagination-wrapper, .agencies-pagination-wrapper').addClass('p-fix-pagination');
setTimeout(function() {
$(window).trigger('pxg:refreshmap');
}, 100);
});
$('.btn-view-listing').on('click', function(e){
e.preventDefault();
$('#properties-google-maps').addClass('hidden-sm').addClass('hidden-xs');
$('.content-listing .properties-listing-wrapper, .content-listing .agencies-listing-wrapper').removeClass('hidden-sm').removeClass('hidden-xs');
$('.btn-view-map').removeClass('hidden-sm').removeClass('hidden-xs');
$(this).addClass('hidden-sm').addClass('hidden-xs');
$('.properties-pagination-wrapper, .agencies-pagination-wrapper').removeClass('p-fix-pagination');
});
$('.show-filter-properties, .filter-in-sidebar').on('click', function(e){
e.stopPropagation();
$('.layout-type-half-map .filter-sidebar').toggleClass('active');
$('.filter-sidebar + .over-dark').toggleClass('active');
});
$(document).on('click', '.filter-sidebar + .over-dark', function(){
$('.layout-type-half-map .filter-sidebar').removeClass('active');
$('.filter-sidebar + .over-dark').removeClass('active');
});
// filter sidebar fixed
$(document).on('click', '.properties-filter-sidebar-wrapper .close-filter, .btn-show-filter, .properties-filter-sidebar-wrapper + .over-dark-filter', function(){
$('.properties-filter-sidebar-wrapper').toggleClass('active');
});
},
userLoginRegister: function(){
var self = this;
// login/register
$('.user-login-form, .must-log-in').on('click', function(e){
e.preventDefault();
if ( $('.apus-user-login').length ) {
$('.apus-user-login').trigger('click');
}
});
$('.apus-user-login, .apus-user-register').on('click', function(){
self.layzyLoadImage();
});
$('.apus-user-login, .apus-user-register').magnificPopup({
mainClass: 'apus-mfp-zoom-in login-popup',
type:'inline',
midClick: true,
callbacks: {
open: function() {
self.layzyLoadImage();
$(window).trigger('resize');
}
}
});
},
filterListingFnc: function(){
var self = this;
$('body').on('click', '.btn-show-filter, .offcanvas-filter-sidebar + .over-dark', function(){
$('.offcanvas-filter-sidebar, .offcanvas-filter-sidebar + .over-dark').toggleClass('active');
// $('.offcanvas-filter-sidebar').perfectScrollbar();
if ( $('.offcanvas-filter-sidebar').length ) {
var ps = new PerfectScrollbar('.offcanvas-filter-sidebar', {
wheelPropagation: true
});
}
});
$(document).on('after_add_property_favorite', function(e, $this, data) {
$this.attr('data-original-title', homeo_property_opts.favorite_added_tooltip_title);
});
$(document).on('after_remove_property_favorite', function( event, $this, data ) {
$this.attr('data-original-title', homeo_property_opts.favorite_add_tooltip_title);
});
$('body').on('click', function() {
if ( $(this).find('.price-input-wrapper').length ) {
$(this).find('.price-input-wrapper').slideUp();
}
});
$('body').on('click', '.form-group-price.text, .form-group-price.list, .form-group-home_area.text, .form-group-lot_area.text, .form-group-year_built.text', function(e){
e.stopPropagation();
});
$('body').on('click', '.heading-filter-price', function(){
$(this).closest('.from-to-wrapper').find('.price-input-wrapper').slideToggle();
});
$('body').on('keyup', '.price-input-wrapper input', function(){
var $from_val = $(this).closest('.price-input-wrapper').find('.filter-from').val();
var $to_val = $(this).closest('.price-input-wrapper').find('.filter-to').val();
var $wrapper = $(this).closest('.from-to-text-wrapper');
if ( $wrapper.hasClass('price') ) {
if ( wp_realestate_opts.enable_multi_currencies === 'yes' ) {
$from_val = self.shortenNumber($from_val);
$to_val = self.shortenNumber($to_val);
} else {
$from_val = self.addCommas($from_val);
$to_val = self.addCommas($to_val);
}
$wrapper.find('.from-text .price-text').text( $from_val );
$wrapper.find('.to-text .price-text').text( $to_val );
} else {
$wrapper.find('.from-text').text( $from_val );
$wrapper.find('.to-text').text( $to_val );
}
});
$('body').on('change', '.price-input-wrapper input', function(){
var $from_val = $(this).closest('.price-input-wrapper').find('.filter-from').val();
var $to_val = $(this).closest('.price-input-wrapper').find('.filter-to').val();
var $wrapper = $(this).closest('.from-to-text-wrapper');
if ( $wrapper.hasClass('price') ) {
if ( wp_realestate_opts.enable_multi_currencies === 'yes' ) {
$from_val = self.shortenNumber($from_val);
$to_val = self.shortenNumber($to_val);
} else {
$from_val = self.addCommas($from_val);
$to_val = self.addCommas($to_val);
}
$wrapper.find('.from-text .price-text').text( $from_val );
$wrapper.find('.to-text .price-text').text( $to_val );
} else {
$wrapper.find('.from-text').text( $from_val );
$wrapper.find('.to-text').text( $to_val );
}
});
$('body').on('click', '.from-to-wrapper.price-list .price-filter li', function(){
var $parent = $(this).closest('.from-to-wrapper');
var $min = $(this).data('min');
var $max = $(this).data('max');
$parent.find('input.filter-from').val($min);
$parent.find('input.filter-to').val($max);
$(this).closest('.from-to-wrapper').find('.heading-filter-price .price-text').html($(this).find('.price-text').html());
$(this).closest('.price-input-wrapper').slideUp();
$(this).closest('form').trigger('submit');
});
},
propertyCompare: function(){
var self = this;
if ( $('.compare-sidebar-inner .compare-list').length ) {
var ps = new PerfectScrollbar('.compare-sidebar-inner .compare-list', {
wheelPropagation: true
});
}
$(document).on('after_add_property_compare', function(e, $this, data) {
var html_output = '';
if ( data.html_output ) {
html_output = data.html_output;
}
$('#compare-sidebar .compare-sidebar-inner').html(html_output);
$('.compare-sidebar-btn .count').html(data.count);
if ( $('.compare-sidebar-inner .compare-list').length ) {
var ps = new PerfectScrollbar('.compare-sidebar-inner .compare-list', {
wheelPropagation: true
});
}
self.layzyLoadImage();
if ( !$('#compare-sidebar').hasClass('active') ) {
$('#compare-sidebar').addClass('active');
}
if ( !$('#compare-sidebar').hasClass('open') ) {
$('#compare-sidebar').addClass('open');
}
$this.attr('data-original-title', homeo_property_opts.compare_added_tooltip_title);
});
$(document).on('after_remove_property_compare', function( event, $this, data ) {
var html_output = '';
if ( data.html_output ) {
html_output = data.html_output;
}
$('#compare-sidebar .compare-sidebar-inner').html(html_output);
$('.compare-sidebar-btn .count').html(data.count);
if ( $('.compare-sidebar-inner .compare-list').length ) {
var ps = new PerfectScrollbar('.compare-sidebar-inner .compare-list', {
wheelPropagation: true
});
}
if ( data.count == '0' ) {
$('#compare-sidebar').removeClass('active');
}
$this.attr('data-original-title', homeo_property_opts.compare_add_tooltip_title);
self.layzyLoadImage();
});
$('.compare-sidebar-inner').on('click', '.btn-remove-property-compare-list', function(e) {
e.stopPropagation();
var $this = $(this);
$this.addClass('loading');
var property_id = $(this).data('property_id');
var nonce = $(this).data('nonce');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'wp_realestate_ajax_remove_property_compare' );
}
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'json',
data: {
'property_id': property_id,
'nonce': nonce,
'action': 'wp_realestate_ajax_remove_property_compare',
}
}).done(function(data) {
$this.removeClass('loading');
if ( data.status ) {
$(document).trigger( "after_remove_property_compare", [$this, data] );
if ( $('.btn-remove-property-compare-list').length <= 0 ) {
$('#compare-sidebar').removeClass('active');
$('#compare-sidebar').removeClass('open');
}
$('a.btn-added-property-compare').each(function(){
if ( property_id == $(this).data('property_id') ) {
$(this).removeClass('btn-added-property-compare').addClass('btn-add-property-compare');
$(this).data('nonce', data.nonce);
}
});
}
});
});
$('.compare-sidebar-inner').on('click', '.btn-remove-compare-all', function(e) {
e.stopPropagation();
var $this = $(this);
$this.addClass('loading');
var nonce = $(this).data('nonce');
var ajaxurl = homeo_property_opts.ajaxurl;
if ( typeof wp_realestate_opts.ajaxurl_endpoint !== 'undefined' ) {
var ajaxurl = wp_realestate_opts.ajaxurl_endpoint.toString().replace( '%%endpoint%%', 'wp_realestate_ajax_remove_all_property_compare' );
}
$.ajax({
url: ajaxurl,
type:'POST',
dataType: 'json',
data: {
'nonce': nonce,
'action': 'wp_realestate_ajax_remove_all_property_compare',
}
}).done(function(data) {
$this.removeClass('loading');
if ( data.status ) {
$(document).trigger( "after_remove_property_compare", [$this, data] );
$('a.btn-added-property-compare').each(function(){
$(this).removeClass('btn-added-property-compare').addClass('btn-add-property-compare');
$(this).data('nonce', data.nonce);
});
}
});
});
$('body').on('click', '#compare-sidebar .compare-sidebar-btn', function(e){
e.stopPropagation();
$('#compare-sidebar').toggleClass('open');
if ($('#compare-sidebar').hasClass('open')) {
$('body').css({ 'overflow': 'hidden' });
} else {
$('body').css({ 'overflow': 'initial' });
}
});
$('body').on('click', function() {
if ($('#compare-sidebar').hasClass('open')) {
$('#compare-sidebar').removeClass('open');
$('body').css({ 'overflow': 'initial' });
}
});
$('.compare-sidebar-inner').on('click', function(e) {
e.stopPropagation();
});
},
propertiesGetPage: function(pageUrl, isBackButton){
var self = this;
if (self.filterAjax) { return false; }
self.propertiesSetCurrentUrl();
if (pageUrl) {
// Show 'loader' overlay
self.propertiesShowLoader();
// Make sure the URL has a trailing-slash before query args (301 redirect fix)
pageUrl = pageUrl.replace(/\/?(\?|#|$)/, '/$1');
if (!isBackButton) {
self.setPushState(pageUrl);
}
self.filterAjax = $.ajax({
url: pageUrl,
data: {
load_type: 'full'
},
dataType: 'html',
cache: false,
headers: {'cache-control': 'no-cache'},
method: 'POST', // Note: Using "POST" method for the Ajax request to avoid "load_type" query-string in pagination links
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log('Apus: AJAX error - propertiesGetPage() - ' + errorThrown);
// Hide 'loader' overlay (after scroll animation)
self.propertiesHideLoader();
self.filterAjax = false;
},
success: function(response) {
// Update properties content
self.propertiesUpdateContent(response);
self.filterAjax = false;
}
});
}
},
propertiesHideLoader: function(){
$('body').find('.main-items-wrapper').removeClass('loading');
},
propertiesShowLoader: function(){
$('body').find('.main-items-wrapper').addClass('loading');
},
setPushState: function(pageUrl) {
window.history.pushState({apusShop: true}, '', pageUrl);
},
propertiesSetCurrentUrl: function() {
var self = this;
// Set current page URL
self.searchAndTagsResetURL = window.location.href;
},
/**
* Properties: Update properties content with AJAX HTML
*/
propertiesUpdateContent: function(ajaxHTML) {
var self = this,
$ajaxHTML = $('<div>' + ajaxHTML + '</div>');
var $properties = $ajaxHTML.find('.main-items-wrapper'),
$display_mode = $ajaxHTML.find('.properties-display-mode-wrapper-ajax .properties-display-mode-wrapper'),
$pagination = $ajaxHTML.find('.main-pagination-wrapper');
// Replace properties
if ($properties.length) {
$('.main-items-wrapper').replaceWith($properties);
}
if ($display_mode.length) {
$('.properties-display-mode-wrapper').replaceWith($display_mode);
}
// Replace pagination
if ($pagination.length) {
$('.main-pagination-wrapper').replaceWith($pagination);
}
// Load images (init Unveil)
self.layzyLoadImage();
// pagination
if ( $('.ajax-pagination').length ) {
self.infloadScroll = false;
self.ajaxPaginationLoad();
}
if ( $.isFunction( $.fn.select2 ) && typeof wp_realestate_select2_opts !== 'undefined' ) {
var select2_args = wp_realestate_select2_opts;
select2_args['allowClear'] = false;
select2_args['minimumResultsForSearch'] = 10;
select2_args['width'] = 'auto';
if ( typeof wp_realestate_select2_opts.language_result !== 'undefined' ) {
select2_args['language'] = {
noResults: function(){
return wp_realestate_select2_opts.language_result;
}
};
}
$('select.orderby').select2( select2_args );
}
$('.btn-saved-search').magnificPopup({
mainClass: 'wp-realestate-mfp-container',
type:'inline',
midClick: true
});
self.updateMakerCards('properties-google-maps');
setTimeout(function() {
// Hide 'loader'
self.propertiesHideLoader();
}, 100);
},
/**
* Shop: Initialize infinite load
*/
ajaxPaginationLoad: function() {
var self = this,
$infloadControls = $('body').find('.ajax-pagination'),
nextPageUrl;
self.infloadScroll = ($infloadControls.hasClass('infinite-action')) ? true : false;
if (self.infloadScroll) {
self.infscrollLock = false;
var pxFromWindowBottomToBottom,
pxFromMenuToBottom = Math.round($(document).height() - $infloadControls.offset().top);
/* Bind: Window resize event to re-calculate the 'pxFromMenuToBottom' value (so the items load at the correct scroll-position) */
var to = null;
$(window).resize(function() {
if (to) { clearTimeout(to); }
to = setTimeout(function() {
var $infloadControls = $('.ajax-pagination'); // Note: Don't cache, element is dynamic
pxFromMenuToBottom = Math.round($(document).height() - $infloadControls.offset().top);
}, 100);
});
$(window).scroll(function(){
if (self.infscrollLock) {
return;
}
pxFromWindowBottomToBottom = 0 + $(document).height() - ($(window).scrollTop()) - $(window).height();
// If distance remaining in the scroll (including buffer) is less than the pagination element to bottom:
if (pxFromWindowBottomToBottom < pxFromMenuToBottom) {
self.ajaxPaginationGet();
}
});
} else {
var $productsWrap = $('body');
/* Bind: "Load" button */
$productsWrap.on('click', '.main-pagination-wrapper .apus-loadmore-btn', function(e) {
e.preventDefault();
self.ajaxPaginationGet();
});
}
if (self.infloadScroll) {
$(window).trigger('scroll'); // Trigger scroll in case the pagination element (+buffer) is above the window bottom
}
},
/**
* Shop: AJAX load next page
*/
ajaxPaginationGet: function() {
var self = this;
if (self.filterAjax) return false;
// Get elements (these can be replaced with AJAX, don't pre-cache)
var $nextPageLink = $('.apus-pagination-next-link').find('a'),
$infloadControls = $('.ajax-pagination'),
nextPageUrl = $nextPageLink.attr('href');
if (nextPageUrl) {
// Show 'loader'
$infloadControls.addClass('apus-loader');
// self.setPushState(nextPageUrl);
self.filterAjax = $.ajax({
url: nextPageUrl,
data: {
load_type: 'items'
},
dataType: 'html',
cache: false,
headers: {'cache-control': 'no-cache'},
method: 'GET',
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log('APUS: AJAX error - ajaxPaginationGet() - ' + errorThrown);
},
complete: function() {
// Hide 'loader'
$infloadControls.removeClass('apus-loader');
},
success: function(response) {
var $response = $('<div>' + response + '</div>'), // Wrap the returned HTML string in a dummy 'div' element we can get the elements
$gridItemElement = $('.items-wrapper', $response).html(),
$resultCount = $('.results-count .last', $response).html(),
$display_mode = $('.main-items-wrapper').data('display_mode');
// Append the new elements
if ( $display_mode == 'grid') {
$('.main-items-wrapper .items-wrapper .row').append($gridItemElement);
} else {
$('.main-items-wrapper .items-wrapper').append($gridItemElement);
}
// Append results
$('.main-items-wrapper .results-count .last').html($resultCount);
// Update Maps
self.updateMakerCards('properties-google-maps');
// Load images (init Unveil)
self.layzyLoadImage();
// Get the 'next page' URL
nextPageUrl = $response.find('.apus-pagination-next-link').children('a').attr('href');
if (nextPageUrl) {
$nextPageLink.attr('href', nextPageUrl);
} else {
$('.main-items-wrapper').addClass('all-properties-loaded');
if (self.infloadScroll) {
self.infscrollLock = true;
}
$infloadControls.find('.apus-loadmore-btn').addClass('hidden');
$nextPageLink.removeAttr('href');
}
self.filterAjax = false;
if (self.infloadScroll) {
$(window).trigger('scroll'); // Trigger 'scroll' in case the pagination element (+buffer) is still above the window bottom
}
}
});
} else {
if (self.infloadScroll) {
self.infscrollLock = true; // "Lock" scroll (no more products/pages)
}
}
},
shortenNumber: function($number) {
var self = this;
var divisors = wp_realestate_opts.divisors;
var $key_sign = '';
$.each(divisors, function( $index, $value ) {
if ($number < ($value['divisor'] * 1000)) {
$key_sign = $value['key'];
$number = $number / $value['divisor'];
return false;
}
});
return self.addCommas($number) + $key_sign;
},
addCommas: function(str) {
var parts = (str + "").split("."),
main = parts[0],
len = main.length,
output = "",
first = main.charAt(0),
i;
if (first === '-') {
main = main.slice(1);
len = main.length;
} else {
first = "";
}
i = len - 1;
while(i >= 0) {
output = main.charAt(i) + output;
if ((len - i) % 3 === 0 && i > 0) {
output = wp_realestate_opts.money_thousands_separator + output;
}
--i;
}
// put sign back
output = first + output;
// put decimal part back
if (parts.length > 1) {
output += wp_realestate_opts.money_dec_point + parts[1];
}
return output;
},
galleryPropery: function() {
var self = this;
$(document).on( 'mouseenter', 'article.property-item', function(){
if ( !$(this).hasClass('loaded-gallery') && $(this).data('images') ) {
var $this = $(this);
var href = $(this).find('a.property-image').attr('href')
var images = $(this).data('images');
var html = '<div class="slick-carousel-gallery-properties hidden" style="width: ' + $(this).find('.property-thumbnail-wrapper').width() + 'px;"><div class="slick-carousel" data-items="1" data-smallmedium="1" data-extrasmall="1" data-pagination="false" data-nav="true" data-disable_draggable="true">';
images.forEach(function(img_url, index){
html += '<div class="item"><a class="property-image" href="'+ href +'"><img src="'+img_url+'"></a></div>';
});
html += '</div></div>';
$(this).find('.property-thumbnail-wrapper .image-thumbnail').append(html);
$(this).find('.slick-carousel-gallery-properties').imagesLoaded( function(){
$this.find('.slick-carousel-gallery-properties').removeClass("hidden").delay(200).queue(function(){
$(this).addClass("active").dequeue();
});
self.initSlick($this.find('.slick-carousel'));
}).progress( function( instance, image ) {
$this.addClass('images-loading');
}).done( function( instance ) {
$this.addClass('images-loaded').removeClass('images-loading');
});
$(this).addClass('loaded-gallery');
}
});
}
});
$.apusThemeExtensions.property = $.apusThemeCore.property_init;
})(jQuery);
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Homeo_Elementor_RealEstate_Search_Form_Tabs extends Elementor\Widget_Base {
public function get_name() {
return 'apus_element_realestate_search_form_tabs';
}
public function get_title() {
return esc_html__( 'Apus Properties Search Form Tabs', 'homeo' );
}
public function get_categories() {
return [ 'homeo-elements' ];
}
public function get_statues() {
$args = [
'taxonomy' => 'property_status',
'hide_empty' => false,
'meta_key' => 'menu_order',
'meta_compare' => 'NUMERIC',
'orderby' => 'meta_value_num',
'order' => 'ASC',
];
$statuses = get_terms( $args );
return $statuses;
}
protected function register_controls() {
$columns = array();
for ($i=1; $i <= 12 ; $i++) {
$columns[$i] = sprintf(esc_html__('%d Columns', 'homeo'), $i);
}
$this->start_controls_section(
'content_section',
[
'label' => esc_html__( 'Search Form: General', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'title',
[
'label' => esc_html__( 'Title', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'placeholder' => esc_html__( 'Enter your title here', 'homeo' ),
]
);
$this->add_control(
'layout_type',
[
'label' => esc_html__( 'Layout Type', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => array(
'horizontal' => esc_html__('Horizontal', 'homeo'),
'vertical' => esc_html__('Vertical', 'homeo'),
),
'default' => 'horizontal'
]
);
$this->add_control(
'style',
[
'label' => esc_html__( 'Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => array(
'' => esc_html__('Default', 'homeo'),
'style1' => esc_html__('Style 1', 'homeo'),
'style2' => esc_html__('Style 2', 'homeo'),
),
'default' => ''
]
);
$this->add_control(
'el_class',
[
'label' => esc_html__( 'Extra class name', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'placeholder' => esc_html__( 'If you wish to style particular content element differently, please add a class name to this field and refer to it in your custom CSS file.', 'homeo' ),
]
);
$this->end_controls_section();
// tabs
$fields = apply_filters( 'wp-realestate-default-property-filter-fields', array() );
$search_fields = array( '' => esc_html__('Choose a field', 'homeo') );
foreach ($fields as $key => $field) {
if ( $key !== 'status' ) {
$name = $field['name'];
if ( empty($field['name']) ) {
$name = $key;
}
$search_fields[$key] = $name;
}
}
// repeater
$repeater = new Elementor\Repeater();
$repeater->add_control(
'filter_field',
[
'label' => esc_html__( 'Filter field', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $search_fields
]
);
$repeater->add_control(
'placeholder',
[
'label' => esc_html__( 'Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
]
);
$repeater->add_control(
'enable_autocompleate_search',
[
'label' => esc_html__( 'Enable autocompleate search', 'homeo' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'default' => '',
'label_on' => esc_html__( 'Yes', 'homeo' ),
'label_off' => esc_html__( 'No', 'homeo' ),
'condition' => [
'filter_field' => 'title',
],
]
);
$repeater->add_control(
'style',
[
'label' => esc_html__( 'Price Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'slider' => esc_html__('Price Slider', 'homeo'),
'text' => esc_html__('Pice Min/max Input Text', 'homeo'),
'list' => esc_html__('Price List', 'homeo'),
],
'default' => 'slider',
'condition' => [
'filter_field' => 'price',
],
]
);
$repeater->add_control(
'price_range_size',
[
'label' => esc_html__( 'Price range size', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 1000,
'condition' => [
'filter_field' => 'price',
'style' => 'list',
],
]
);
$repeater->add_control(
'price_range_max',
[
'label' => esc_html__( 'Max price ranges', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 10,
'condition' => [
'filter_field' => 'price',
'style' => 'list',
],
]
);
$repeater->add_control(
'min_price_placeholder',
[
'label' => esc_html__( 'Min Price Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Min Price',
'condition' => [
'filter_field' => 'price',
'style' => 'text',
],
]
);
$repeater->add_control(
'max_price_placeholder',
[
'label' => esc_html__( 'Max Price Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Max Price',
'condition' => [
'filter_field' => 'price',
'style' => 'text',
],
]
);
$repeater->add_control(
'slider_style',
[
'label' => esc_html__( 'Layout Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'slider' => esc_html__('Slider', 'homeo'),
'text' => esc_html__('Input Text', 'homeo'),
],
'default' => 'slider',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
],
]
);
$repeater->add_control(
'min_placeholder',
[
'label' => esc_html__( 'Min Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Min',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
'slider_style' => 'text',
],
]
);
$repeater->add_control(
'max_placeholder',
[
'label' => esc_html__( 'Max Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Max',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
'slider_style' => 'text',
],
]
);
$repeater->add_control(
'number_style',
[
'label' => esc_html__( 'Layout', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'number-plus' => esc_html__('Number +', 'homeo'),
'number' => esc_html__('Number', 'homeo'),
],
'default' => 'number-plus',
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$repeater->add_control(
'min_number',
[
'label' => esc_html__( 'Min Number', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 1,
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$repeater->add_control(
'max_number',
[
'label' => esc_html__( 'Max Number', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 5,
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$repeater->add_control(
'columns',
[
'label' => esc_html__( 'Columns', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $columns,
'default' => 1
]
);
$repeater->add_control(
'icon',
[
'label' => esc_html__( 'Icon', 'homeo' ),
'type' => Elementor\Controls_Manager::ICON
]
);
// form fields
$statuses = $this->get_statues();
if ( !empty($statuses) ) {
$i = 0;
foreach ($statuses as $term) {
$this->start_controls_section(
'content_'.$i.'_section',
[
'label' => esc_html__( 'Tab: ', 'homeo' ).$term->name,
'tab' => Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'show_this_tab_'.$i,
[
'label' => esc_html__( 'Show this tab', 'homeo' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'default' => 'yes',
'label_on' => esc_html__( 'Yes', 'homeo' ),
'label_off' => esc_html__( 'No', 'homeo' ),
]
);
$this->add_control(
'title_'.$i,
[
'label' => esc_html__( 'Tab Title', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'placeholder' => esc_html__( 'Enter your title here', 'homeo' ),
]
);
$this->add_control(
'main_search_fields_'.$i,
[
'label' => esc_html__( 'Main Search Fields', 'homeo' ),
'type' => Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'show_advance_search_'.$i,
[
'label' => esc_html__( 'Show Advanced Search', 'homeo' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Show', 'homeo' ),
'label_off' => esc_html__( 'Hide', 'homeo' ),
'return_value' => true,
'default' => true,
]
);
$this->add_control(
'advance_search_fields_'.$i,
[
'label' => esc_html__( 'Advanced Search Fields', 'homeo' ),
'type' => Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'filter_btn_text_'.$i,
[
'label' => esc_html__( 'Button Text', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Find Property',
]
);
$this->add_control(
'advanced_btn_text_'.$i,
[
'label' => esc_html__( 'Advanced Text', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Advanced',
]
);
$this->add_control(
'btn_columns_'.$i,
[
'label' => esc_html__( 'Button Columns', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $columns,
'default' => 1
]
);
$this->end_controls_section();
$i++;
}
}
// star tab style
$this->start_controls_section(
'section_tab_style',
[
'label' => esc_html__( 'Tab', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'tab_active_color',
[
'label' => esc_html__( 'Tab Active BG Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
// Stronger selector to avoid section style from overwriting
'{{WRAPPER}} .nav-tabs > li.active > a' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .nav-tabs > li.active > a:before' => 'border-color: {{VALUE}} transparent transparent;',
],
]
);
$this->add_control(
'margin',
[
'label' => esc_html__( 'Margin', 'homeo' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .nav-tabs' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'alignment',
[
'label' => esc_html__( 'Alignment', 'homeo' ),
'type' => Elementor\Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'homeo' ),
'icon' => 'fa fa-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'homeo' ),
'icon' => 'fa fa-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'homeo' ),
'icon' => 'fa fa-align-right',
],
'justify' => [
'title' => esc_html__( 'Justified', 'homeo' ),
'icon' => 'fa fa-align-justify',
],
],
'default' => '',
'selectors' => [
'{{WRAPPER}} .nav-tabs' => 'text-align: {{VALUE}};',
],
]
);
$this->end_controls_section();
// end tab style
$this->start_controls_section(
'section_button_style',
[
'label' => esc_html__( 'Button', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->start_controls_tabs( 'tabs_button_style' );
$this->start_controls_tab(
'tab_button_normal',
[
'label' => esc_html__( 'Normal', 'homeo' ),
]
);
$this->add_control(
'button_color',
[
'label' => esc_html__( 'Button Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .btn-submit' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Elementor\Group_Control_Background::get_type(),
[
'name' => 'background_button',
'label' => esc_html__( 'Background', 'homeo' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .btn-submit',
]
);
$this->add_group_control(
Elementor\Group_Control_Border::get_type(),
[
'name' => 'border_button',
'label' => esc_html__( 'Border', 'homeo' ),
'selector' => '{{WRAPPER}} .btn-submit',
]
);
$this->add_control(
'padding_button',
[
'label' => esc_html__( 'Padding', 'homeo' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .btn-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_tab();
// tab hover
$this->start_controls_tab(
'tab_button_hover',
[
'label' => esc_html__( 'Hover', 'homeo' ),
]
);
$this->add_control(
'button_hover_color',
[
'label' => esc_html__( 'Button Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Elementor\Group_Control_Background::get_type(),
[
'name' => 'background_button_hover',
'label' => esc_html__( 'Background', 'homeo' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus',
]
);
$this->add_control(
'button_hover_border_color',
[
'label' => esc_html__( 'Border Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'condition' => [
'border_button_border!' => '',
],
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'border-color: {{VALUE}};',
],
]
);
$this->add_control(
'padding_button_hover',
[
'label' => esc_html__( 'Padding', 'homeo' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
// end tab
$this->end_controls_section();
$this->start_controls_section(
'section_border_style',
[
'label' => esc_html__( 'Border', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'box_shadow',
'label' => esc_html__( 'Box Shadow', 'homeo' ),
'selector' => '{{WRAPPER}} .content-main-inner',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_typography_style',
[
'label' => esc_html__( 'Typography', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'text_color',
[
'label' => esc_html__( 'Text Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .form-search' => 'color: {{VALUE}};',
'{{WRAPPER}} .advance-search-btn' => 'color: {{VALUE}};',
'{{WRAPPER}} .circle-check' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control::-webkit-input-placeholder' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control:-ms-input-placeholder ' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control::placeholder ' => 'color: {{VALUE}};',
'{{WRAPPER}} .select2-selection--single .select2-selection__rendered' => 'color: {{VALUE}};',
'{{WRAPPER}} .select2-selection--single .select2-selection__placeholder' => 'color: {{VALUE}};',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings();
extract( $settings );
$search_page_url = WP_RealEstate_Mixes::get_properties_page_url();
homeo_load_select2();
$_id = homeo_random_key();
?>
<div class="widget-property-search-form <?php echo esc_attr($el_class); ?> <?php echo esc_attr($layout_type.' '.$style); ?>">
<?php if ( $title ) { ?>
<h2 class="title"><?php echo esc_html($title); ?></h2>
<?php } ?>
<?php
$statuses = $this->get_statues();
if ( !empty($statuses) ) {
?>
<ul role="tablist" class="nav nav-tabs">
<?php $i = $j = 0; foreach ($statuses as $term) :
if ( empty($settings['show_this_tab_'.$i]) || !$settings['show_this_tab_'.$i] ) {
$i++;
continue;
}
?>
<li class="<?php echo esc_attr($j == 0 ? 'active' : '');?>">
<a href="#tab-<?php echo esc_attr($_id);?>-<?php echo esc_attr($j); ?>" data-toggle="tab">
<?php
$tab_title = !empty($settings['title_'.$i]) ? $settings['title_'.$i] : $term->name;
echo trim($tab_title);
?>
</a>
</li>
<?php $i++; $j++; endforeach; ?>
</ul>
<div class="tab-content">
<?php
$filter_fields = apply_filters( 'wp-realestate-default-property-filter-fields', array() );
$instance = array();
$i = $j = 0;
foreach ($statuses as $term) {
if ( empty($settings['show_this_tab_'.$i]) || !$settings['show_this_tab_'.$i] ) {
$i++;
continue;
}
$widget_id = homeo_random_key();
$args = array( 'widget_id' => $widget_id );
$main_search_fields = !empty($settings['main_search_fields_'.$i]) ? $settings['main_search_fields_'.$i] : '';
$advance_search_fields = !empty($settings['advance_search_fields_'.$i]) ? $settings['advance_search_fields_'.$i] : '';
$show_advance_search = !empty($settings['show_advance_search_'.$i]) ? $settings['show_advance_search_'.$i] : false;
$btn_columns = !empty($settings['btn_columns_'.$i]) ? $settings['btn_columns_'.$i] : 1;
$filter_btn_text = !empty($settings['filter_btn_text_'.$i]) ? $settings['filter_btn_text_'.$i] : '';
$advanced_btn_text = !empty($settings['advanced_btn_text_'.$i]) ? $settings['advanced_btn_text_'.$i] : '';
?>
<div id="tab-<?php echo esc_attr($_id);?>-<?php echo esc_attr($j); ?>" class="tab-pane fade <?php echo esc_attr($j == 0 ? 'active in' : ''); ?>">
<form action="<?php echo esc_url($search_page_url); ?>" class="form-search filter-listing-form <?php echo esc_attr($style); ?>" method="GET">
<?php if ( ! get_option('permalink_structure') ) {
$properties_page_id = wp_realestate_get_option('properties_page_id');
$properties_page_id = WP_RealEstate_Mixes::get_lang_post_id( $properties_page_id, 'page');
if ( !empty($properties_page_id) ) {
echo '<input type="hidden" name="p" value="' . $properties_page_id . '">';
}
} ?>
<input type="hidden" name="filter-status" value="<?php echo esc_attr($term->term_id); ?>">
<div class="search-form-inner">
<?php if ( $layout_type == 'horizontal' ) { ?>
<div class="main-inner clearfix">
<div class="content-main-inner">
<div class="row row-20">
<?php
if ( !empty($main_search_fields) ) {
foreach ($main_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( $item['filter_field'] == 'title' ) {
if ($item['enable_autocompleate_search']) {
wp_enqueue_script( 'handlebars', get_template_directory_uri() . '/js/handlebars.min.js', array(), null, true);
wp_enqueue_script( 'typeahead-jquery', get_template_directory_uri() . '/js/typeahead.bundle.min.js', array('jquery', 'handlebars'), null, true);
$filter_field['add_class'] = 'apus-autocompleate-input';
}
} elseif ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
}
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($btn_columns); ?> form-group form-group-search">
<div class="flex-middle justify-content-end-lg">
<?php if ( $show_advance_search && !empty($advance_search_fields) ) { ?>
<div class="advance-link">
<a href="javascript:void(0);" class="advance-search-btn">
<?php
if ( !empty($advanced_btn_text) ) {
echo esc_html($advanced_btn_text);
} else {
esc_html_e('Advanced', 'homeo');
}
?>
<i class="flaticon-more"></i>
</a>
</div>
<?php } ?>
<button class="btn-submit btn btn-theme btn-inverse" type="submit">
<?php echo trim($filter_btn_text); ?>
</button>
</div>
</div>
</div>
</div>
</div>
<?php
if ( $show_advance_search && !empty($advance_search_fields) ) {
?>
<div class="advance-search-wrapper">
<div class="advance-search-wrapper-fields">
<div class="row row-20">
<?php
$sub_class = '';
foreach ($advance_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if($item['filter_field'] == 'amenity'){
$sub_class = 'wrapper-amenity';
$filter_field['show_title'] = true;
}else{
$filter_field['show_title'] = false;
$sub_class = '';
}
if ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns.' '.$sub_class); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<?php } else { ?>
<div class="main-inner clearfix">
<div class="content-main-inner">
<div class="row">
<?php
if ( !empty($main_search_fields) ) {
foreach ($main_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( $item['filter_field'] == 'title' ) {
if ($item['enable_autocompleate_search']) {
wp_enqueue_script( 'handlebars', get_template_directory_uri() . '/js/handlebars.min.js', array(), null, true);
wp_enqueue_script( 'typeahead-jquery', get_template_directory_uri() . '/js/typeahead.bundle.min.js', array('jquery', 'handlebars'), null, true);
$filter_field['add_class'] = 'apus-autocompleate-input';
}
} elseif ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
}
?>
<?php if ( $show_advance_search && !empty($advance_search_fields)) { ?>
<div class="col-xs-12">
<div class="form-group">
<div class="advance-link">
<a href="javascript:void(0);" class="advance-search-btn">
<?php
if ( !empty($advanced_btn_text) ) {
echo esc_html($advanced_btn_text);
} else {
esc_html_e('Advanced', 'homeo');
}
?>
<i class="flaticon-more"></i>
</a>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="row">
<div class="col-xs-12 col-md-<?php echo esc_attr($btn_columns); ?> form-group-search">
<button class="btn-submit btn-block btn btn-theme btn-inverse" type="submit">
<?php echo trim($filter_btn_text); ?>
</button>
</div>
</div>
</div>
</div>
<?php
if ( $show_advance_search && !empty($advance_search_fields) ) {
?>
<div class="advance-search-wrapper">
<div class="advance-search-wrapper-fields">
<div class="row">
<?php
foreach ($advance_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
if ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<?php } ?>
</div>
</form>
</div>
<?php
$j++; $i++;
}
?>
</div>
<?php } ?>
</div>
<?php
}
}
if ( version_compare(ELEMENTOR_VERSION, '3.5.0', '<') ) {
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Homeo_Elementor_RealEstate_Search_Form_Tabs );
} else {
Elementor\Plugin::instance()->widgets_manager->register( new Homeo_Elementor_RealEstate_Search_Form_Tabs );
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Homeo_Elementor_RealEstate_Search_Form extends Elementor\Widget_Base {
public function get_name() {
return 'apus_element_realestate_search_form';
}
public function get_title() {
return esc_html__( 'Apus Properties Search Form', 'homeo' );
}
public function get_categories() {
return [ 'homeo-elements' ];
}
protected function register_controls() {
$this->start_controls_section(
'content_section',
[
'label' => esc_html__( 'Search Form', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'title',
[
'label' => esc_html__( 'Title', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'placeholder' => esc_html__( 'Enter your title here', 'homeo' ),
]
);
$fields = apply_filters( 'wp-realestate-default-property-filter-fields', array() );
$search_fields = array( '' => esc_html__('Choose a field', 'homeo') );
foreach ($fields as $key => $field) {
$name = $field['name'];
if ( empty($field['name']) ) {
$name = $key;
}
$search_fields[$key] = $name;
}
$repeater = new Elementor\Repeater();
$repeater->add_control(
'filter_field',
[
'label' => esc_html__( 'Filter field', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $search_fields
]
);
$repeater->add_control(
'placeholder',
[
'label' => esc_html__( 'Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
]
);
$repeater->add_control(
'enable_autocompleate_search',
[
'label' => esc_html__( 'Enable autocompleate search', 'homeo' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'default' => '',
'label_on' => esc_html__( 'Yes', 'homeo' ),
'label_off' => esc_html__( 'No', 'homeo' ),
'condition' => [
'filter_field' => 'title',
],
]
);
$repeater->add_control(
'style',
[
'label' => esc_html__( 'Price Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'slider' => esc_html__('Price Slider', 'homeo'),
'text' => esc_html__('Pice Min/max Input Text', 'homeo'),
'list' => esc_html__('Price List', 'homeo'),
],
'default' => 'slider',
'condition' => [
'filter_field' => 'price',
],
]
);
$repeater->add_control(
'price_range_size',
[
'label' => esc_html__( 'Price range size', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 1000,
'condition' => [
'filter_field' => 'price',
'style' => 'list',
],
]
);
$repeater->add_control(
'price_range_max',
[
'label' => esc_html__( 'Max price ranges', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 10,
'condition' => [
'filter_field' => 'price',
'style' => 'list',
],
]
);
$repeater->add_control(
'min_price_placeholder',
[
'label' => esc_html__( 'Min Price Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Min Price',
'condition' => [
'filter_field' => 'price',
'style' => 'text',
],
]
);
$repeater->add_control(
'max_price_placeholder',
[
'label' => esc_html__( 'Max Price Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Max Price',
'condition' => [
'filter_field' => 'price',
'style' => 'text',
],
]
);
$repeater->add_control(
'slider_style',
[
'label' => esc_html__( 'Layout Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'slider' => esc_html__('Slider', 'homeo'),
'text' => esc_html__('Input Text', 'homeo'),
],
'default' => 'slider',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
],
]
);
$repeater->add_control(
'min_placeholder',
[
'label' => esc_html__( 'Min Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Min',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
'slider_style' => 'text',
],
]
);
$repeater->add_control(
'max_placeholder',
[
'label' => esc_html__( 'Max Placeholder', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Max',
'condition' => [
'filter_field' => ['home_area', 'lot_area', 'year_built'],
'slider_style' => 'text',
],
]
);
$repeater->add_control(
'suffix',
[
'label' => esc_html__( 'Suffix', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Sqft',
'condition' => [
'filter_field' => ['home_area', 'lot_area'],
],
]
);
$repeater->add_control(
'number_style',
[
'label' => esc_html__( 'Layout Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => [
'number-plus' => esc_html__('Number +', 'homeo'),
'number' => esc_html__('Number', 'homeo'),
],
'default' => 'number-plus',
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$repeater->add_control(
'min_number',
[
'label' => esc_html__( 'Min Number', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 1,
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$repeater->add_control(
'max_number',
[
'label' => esc_html__( 'Max Number', 'homeo' ),
'type' => Elementor\Controls_Manager::NUMBER,
'input_type' => 'text',
'default' => 5,
'condition' => [
'filter_field' => ['baths', 'beds', 'rooms', 'garages'],
],
]
);
$columns = array();
for ($i=1; $i <= 12 ; $i++) {
$columns[$i] = sprintf(esc_html__('%d Columns', 'homeo'), $i);
}
$repeater->add_control(
'columns',
[
'label' => esc_html__( 'Columns', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $columns,
'default' => 1
]
);
$repeater->add_control(
'icon',
[
'label' => esc_html__( 'Icon', 'homeo' ),
'type' => Elementor\Controls_Manager::ICON
]
);
$this->add_control(
'main_search_fields',
[
'label' => esc_html__( 'Main Search Fields', 'homeo' ),
'type' => Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'show_advance_search',
[
'label' => esc_html__( 'Show Advanced Search', 'homeo' ),
'type' => Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Show', 'homeo' ),
'label_off' => esc_html__( 'Hide', 'homeo' ),
'return_value' => true,
'default' => true,
]
);
$this->add_control(
'advance_search_fields',
[
'label' => esc_html__( 'Advanced Search Fields', 'homeo' ),
'type' => Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
]
);
$this->add_control(
'filter_btn_text',
[
'label' => esc_html__( 'Button Text', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Find Property',
]
);
$this->add_control(
'advanced_btn_text',
[
'label' => esc_html__( 'Advanced Text', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'input_type' => 'text',
'default' => 'Advanced',
]
);
$this->add_control(
'btn_columns',
[
'label' => esc_html__( 'Button Columns', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => $columns,
'default' => 1
]
);
$this->add_control(
'layout_type',
[
'label' => esc_html__( 'Layout Type', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => array(
'horizontal' => esc_html__('Horizontal', 'homeo'),
'vertical' => esc_html__('Vertical', 'homeo'),
),
'default' => 'horizontal'
]
);
$this->add_control(
'style',
[
'label' => esc_html__( 'Style', 'homeo' ),
'type' => Elementor\Controls_Manager::SELECT,
'options' => array(
'' => esc_html__('Default', 'homeo'),
'style1' => esc_html__('Style 1', 'homeo'),
'style2' => esc_html__('Style 2', 'homeo'),
'style3' => esc_html__('Style 3', 'homeo'),
'style4' => esc_html__('Style Icon', 'homeo'),
),
'default' => ''
]
);
$this->add_control(
'el_class',
[
'label' => esc_html__( 'Extra class name', 'homeo' ),
'type' => Elementor\Controls_Manager::TEXT,
'placeholder' => esc_html__( 'If you wish to style particular content element differently, please add a class name to this field and refer to it in your custom CSS file.', 'homeo' ),
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_button_style',
[
'label' => esc_html__( 'Button', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->start_controls_tabs( 'tabs_button_style' );
$this->start_controls_tab(
'tab_button_normal',
[
'label' => esc_html__( 'Normal', 'homeo' ),
]
);
$this->add_control(
'button_color',
[
'label' => esc_html__( 'Button Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .btn-submit' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Elementor\Group_Control_Background::get_type(),
[
'name' => 'background_button',
'label' => esc_html__( 'Background', 'homeo' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .btn-submit',
]
);
$this->add_group_control(
Elementor\Group_Control_Border::get_type(),
[
'name' => 'border_button',
'label' => esc_html__( 'Border', 'homeo' ),
'selector' => '{{WRAPPER}} .btn-submit',
]
);
$this->add_control(
'padding_button',
[
'label' => esc_html__( 'Padding', 'homeo' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .btn-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_tab();
// tab hover
$this->start_controls_tab(
'tab_button_hover',
[
'label' => esc_html__( 'Hover', 'homeo' ),
]
);
$this->add_control(
'button_hover_color',
[
'label' => esc_html__( 'Button Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Elementor\Group_Control_Background::get_type(),
[
'name' => 'background_button_hover',
'label' => esc_html__( 'Background', 'homeo' ),
'types' => [ 'classic', 'gradient', 'video' ],
'selector' => '{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus',
]
);
$this->add_control(
'button_hover_border_color',
[
'label' => esc_html__( 'Border Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'condition' => [
'border_button_border!' => '',
],
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'border-color: {{VALUE}};',
],
]
);
$this->add_control(
'padding_button_hover',
[
'label' => esc_html__( 'Padding', 'homeo' ),
'type' => Elementor\Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
'{{WRAPPER}} .btn-submit:hover, {{WRAPPER}} .btn-submit:focus' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
// end tab
$this->end_controls_section();
$this->start_controls_section(
'section_border_style',
[
'label' => esc_html__( 'Border', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
Elementor\Group_Control_Box_Shadow::get_type(),
[
'name' => 'box_shadow',
'label' => esc_html__( 'Box Shadow', 'homeo' ),
'selector' => '{{WRAPPER}} .content-main-inner',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_typography_style',
[
'label' => esc_html__( 'Typography', 'homeo' ),
'tab' => Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'text_color',
[
'label' => esc_html__( 'Text Color', 'homeo' ),
'type' => Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .form-search' => 'color: {{VALUE}};',
'{{WRAPPER}} .advance-search-btn' => 'color: {{VALUE}};',
'{{WRAPPER}} .circle-check' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control::-webkit-input-placeholder' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control:-ms-input-placeholder ' => 'color: {{VALUE}};',
'{{WRAPPER}} .form-control::placeholder ' => 'color: {{VALUE}};',
'{{WRAPPER}} .select2-selection--single .select2-selection__rendered' => 'color: {{VALUE}};',
'{{WRAPPER}} .select2-selection--single .select2-selection__placeholder' => 'color: {{VALUE}};',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings();
extract( $settings );
$search_page_url = WP_RealEstate_Mixes::get_properties_page_url();
homeo_load_select2();
$filter_fields = apply_filters( 'wp-realestate-default-property-filter-fields', array() );
$instance = array();
$widget_id = homeo_random_key();
$args = array( 'widget_id' => $widget_id );
?>
<div class="widget-property-search-form <?php echo esc_attr($el_class.' '.$style.' '.$layout_type); ?>">
<?php if ( $title ) { ?>
<h2 class="title"><?php echo esc_html($title); ?></h2>
<?php } ?>
<form action="<?php echo esc_url($search_page_url); ?>" class="form-search filter-listing-form <?php echo esc_attr($style); ?>" method="GET">
<?php if ( ! get_option('permalink_structure') ) {
$properties_page_id = wp_realestate_get_option('properties_page_id');
$properties_page_id = WP_RealEstate_Mixes::get_lang_post_id( $properties_page_id, 'page');
if ( !empty($properties_page_id) ) {
echo '<input type="hidden" name="p" value="' . $properties_page_id . '">';
}
} ?>
<div class="search-form-inner">
<?php if ( $layout_type == 'horizontal' ) { ?>
<div class="main-inner clearfix">
<div class="content-main-inner">
<div class="row row-20">
<?php
if ( !empty($main_search_fields) ) {
foreach ($main_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( $item['filter_field'] == 'title' ) {
if ($item['enable_autocompleate_search']) {
wp_enqueue_script( 'handlebars', get_template_directory_uri() . '/js/handlebars.min.js', array(), null, true);
wp_enqueue_script( 'typeahead-jquery', get_template_directory_uri() . '/js/typeahead.bundle.min.js', array('jquery', 'handlebars'), null, true);
$filter_field['add_class'] = 'apus-autocompleate-input';
}
} elseif ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( in_array($item['filter_field'], ['home_area', 'lot_area']) ) {
$filter_field['suffix'] = $item['suffix'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
}
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($btn_columns); ?> form-group form-group-search">
<div class="flex-middle justify-content-end-lg">
<?php if ( $show_advance_search && !empty($advance_search_fields) ) { ?>
<div class="advance-link">
<a href="javascript:void(0);" class=" advance-search-btn">
<?php
if ( !empty($advanced_btn_text) ) {
echo esc_html($advanced_btn_text);
} else {
esc_html_e('Advanced', 'homeo');
}
?>
<i class="flaticon-more"></i>
</a>
</div>
<?php } ?>
<?php if($style == 'style4') {?>
<button class="btn-submit btn" type="submit">
<i class="flaticon-magnifying-glass"></i>
</button>
<?php }else{ ?>
<button class="btn-submit btn btn-theme btn-inverse" type="submit">
<?php echo trim($filter_btn_text); ?>
</button>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<?php
if ( $show_advance_search && !empty($advance_search_fields) ) {
?>
<div class="advance-search-wrapper">
<div class="advance-search-wrapper-fields">
<div class="row row-20">
<?php
$sub_class = '';
foreach ($advance_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if($item['filter_field'] == 'amenity'){
$sub_class = 'wrapper-amenity';
$filter_field['show_title'] = true;
}else{
$filter_field['show_title'] = false;
$sub_class = '';
}
if ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( in_array($item['filter_field'], ['home_area', 'lot_area']) ) {
$filter_field['suffix'] = $item['suffix'];
}
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns.' '.$sub_class); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<?php } else { ?>
<div class="main-inner clearfix">
<div class="content-main-inner">
<div class="row">
<?php
if ( !empty($main_search_fields) ) {
foreach ($main_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( $item['filter_field'] == 'title' ) {
if ($item['enable_autocompleate_search']) {
wp_enqueue_script( 'handlebars', get_template_directory_uri() . '/js/handlebars.min.js', array(), null, true);
wp_enqueue_script( 'typeahead-jquery', get_template_directory_uri() . '/js/typeahead.bundle.min.js', array('jquery', 'handlebars'), null, true);
$filter_field['add_class'] = 'apus-autocompleate-input';
}
} elseif ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( in_array($item['filter_field'], ['home_area', 'lot_area']) ) {
$filter_field['suffix'] = $item['suffix'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
}
?>
<?php if( $show_advance_search && !empty($advance_search_fields)){ ?>
<div class="col-xs-12">
<div class="form-group">
<div class="advance-link">
<a href="javascript:void(0);" class=" advance-search-btn">
<?php
if ( !empty($advanced_btn_text) ) {
echo esc_html($advanced_btn_text);
} else {
esc_html_e('Advanced', 'homeo');
}
?>
<i class="flaticon-more"></i>
</a>
</div>
</div>
</div>
<?php } ?>
</div>
<?php
if ( $show_advance_search && !empty($advance_search_fields) ) {
?>
<div class="advance-search-wrapper">
<div class="advance-search-wrapper-fields">
<div class="row">
<?php
foreach ($advance_search_fields as $item) {
if ( empty($filter_fields[$item['filter_field']]['field_call_back']) ) {
continue;
}
$filter_field = $filter_fields[$item['filter_field']];
if ( isset($item['placeholder']) ) {
$filter_field['placeholder'] = $item['placeholder'];
}
if ( isset($item['icon']) ) {
$filter_field['icon'] = $item['icon'];
}
$filter_field['show_title'] = false;
$columns = !empty($item['columns']) ? $item['columns'] : '1';
if ( $item['filter_field'] == 'price' ) {
$filter_field['style'] = $item['style'];
$filter_field['min_price_placeholder'] = $item['min_price_placeholder'];
$filter_field['max_price_placeholder'] = $item['max_price_placeholder'];
$filter_field['price_range_size'] = $item['price_range_size'];
$filter_field['price_range_max'] = $item['price_range_max'];
} elseif ( in_array($item['filter_field'], ['baths', 'beds', 'rooms', 'garages']) ) {
$filter_field['number_style'] = $item['number_style'];
$filter_field['min_number'] = $item['min_number'];
$filter_field['max_number'] = $item['max_number'];
} elseif ( in_array($item['filter_field'], ['home_area', 'lot_area', 'year_built']) ) {
$filter_field['slider_style'] = $item['slider_style'];
$filter_field['min_placeholder'] = $item['min_placeholder'];
$filter_field['max_placeholder'] = $item['max_placeholder'];
}
if ( in_array($item['filter_field'], ['home_area', 'lot_area']) ) {
$filter_field['suffix'] = $item['suffix'];
}
?>
<div class="col-xs-12 col-md-<?php echo esc_attr($columns); ?>">
<?php call_user_func( $filter_field['field_call_back'], $instance, $args, $item['filter_field'], $filter_field ); ?>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col-xs-12 col-md-<?php echo esc_attr($btn_columns); ?> form-group-search">
<?php if($style == 'style4') {?>
<button class="btn-submit btn-block btn" type="submit">
<i class="flaticon-magnifying-glass"></i>
</button>
<?php }else{ ?>
<button class="btn-submit btn-block btn btn-theme btn-inverse" type="submit">
<?php echo trim($filter_btn_text); ?>
</button>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</form>
</div>
<?php
}
}
if ( version_compare(ELEMENTOR_VERSION, '3.5.0', '<') ) {
Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Homeo_Elementor_RealEstate_Search_Form );
} else {
Elementor\Plugin::instance()->widgets_manager->register( new Homeo_Elementor_RealEstate_Search_Form );
}
<?php
/**
* Widget: Property Filter
*
* @package wp-realestate
* @author Habq
* @license GNU General Public License, version 3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WP_RealEstate_Widget_Property_Filter extends WP_Widget {
/**
* Initialize widget
*
* @access public
* @return void
*/
function __construct() {
parent::__construct(
'property_filter_widget',
__( 'Property Filter', 'wp-realestate' ),
array(
'description' => __( 'Filter for filtering properties.', 'wp-realestate' ),
)
);
}
/**
* Frontend
*
* @access public
* @param array $args
* @param array $instance
* @return void
*/
function widget( $args, $instance ) {
include WP_RealEstate_Template_Loader::locate( 'widgets/property-filter' );
}
/**
* Update
*
* @access public
* @param array $new_instance
* @param array $old_instance
* @return array
*/
function update( $new_instance, $old_instance ) {
return $new_instance;
}
/**
* Backend
*
* @access public
* @param array $instance
* @return void
*/
function form( $instance ) {
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
$button_text = ! empty( $instance['button_text'] ) ? $instance['button_text'] : '';
$sort = ! empty( $instance['sort'] ) ? $instance['sort'] : '';
$_id = rand(100, 100000);
?>
<div id="filter-property-<?php echo esc_attr($_id); ?>">
<!-- TITLE -->
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
<?php echo __( 'Title', 'wp-realestate' ); ?>
</label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
</p>
<!-- BUTTON TEXT -->
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'button_text' ) ); ?>">
<?php echo __( 'Button text', 'wp-realestate' ); ?>
</label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'button_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'button_text' ) ); ?>" type="text" value="<?php echo esc_attr( $button_text ); ?>">
</p>
<h3><?php _e('Filter Fields', 'wp-realestate'); ?></h3>
<ul class="wp-realestate-filter-fields wp-realestate-filter-property-fields">
<?php
$fields = $adv_fields = $all_fields = WP_RealEstate_Property_Filter::get_fields();
if ( ! empty( $sort ) ) {
$filtered_keys = array_filter( explode( ',', $sort ) );
$fields = array_replace( array_flip( $filtered_keys ), $all_fields );
}
?>
<input type="hidden" value="<?php echo esc_attr( $sort ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'sort' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'sort' ) ); ?>" value="<?php echo esc_attr( $sort ); ?>">
<?php foreach ( $fields as $key => $value ) :
if ( !empty($all_fields[$key]) ) {
?>
<li data-field-id="<?php echo esc_attr( $key ); ?>" <?php if ( ! empty( $instance[ 'hide_' . $key ] ) ) : ?>class="invisible"<?php endif; ?>>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'hide_' . $key ) ); ?>">
<?php echo esc_attr( $value['name'] ); ?>
</label>
<span class="visibility">
<input type="checkbox" class="checkbox field-visibility" <?php echo ! empty( $instance[ 'hide_'. $key ] ) ? 'checked="checked"' : ''; ?> name="<?php echo esc_attr( $this->get_field_name( 'hide_' . $key ) ); ?>">
<i class="dashicons dashicons-visibility"></i>
</span>
</p>
</li>
<?php } ?>
<?php endforeach ?>
</ul>
<p>
<h3><label><?php echo esc_html__( 'Show Advance Filter Fields', 'wp-realestate' ); ?></label></h3>
<label>
<input type="checkbox" class="checkbox field-visibility show_adv_fields"
<?php echo trim(! empty( $instance['show_adv_fields'] ) ? 'checked="checked"' : ''); ?>
name="<?php echo esc_attr( $this->get_field_name( 'show_adv_fields' ) ); ?>">
<?php echo esc_html__( 'Show Advance Filter Fields', 'wp-realestate' ); ?>
</label>
</p>
<hr>
<div class="wp-realestate-advance-filter-fields-wrapper">
<h3><?php echo esc_html__('Advance Filter Fields', 'wp-realestate'); ?></h3>
<ul class="wp-realestate-filter-fields wp-realestate-advance-filter-fields">
<?php if ( ! empty( $instance['sort_adv'] ) ) : ?>
<?php
$filtered_keys = array_filter( explode( ',', $instance['sort_adv'] ) );
$adv_fields = array_replace( array_flip( $filtered_keys ), $all_fields );
?>
<?php endif; ?>
<input type="hidden" value="<?php echo esc_attr( $sort_adv ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'sort_adv' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'sort_adv' ) ); ?>" value="<?php echo esc_attr( $sort_adv ); ?>">
<?php foreach ( $adv_fields as $key => $value ) :
if ( !empty($all_fields[$key]) ) {
?>
<li data-field-id="<?php echo esc_attr( $key ); ?>" <?php if ( ! empty( $instance[ 'hide_adv_' . $key ] ) ) : ?>class="invisible"<?php endif; ?>>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'hide_adv_' . $key ) ); ?>">
<?php echo esc_attr( $value['name'] ); ?>
</label>
<span class="visibility">
<input type="checkbox" class="checkbox field-visibility" <?php echo ! empty( $instance[ 'hide_adv_'. $key ] ) ? 'checked="checked"' : ''; ?> name="<?php echo esc_attr( $this->get_field_name( 'hide_adv_' . $key ) ); ?>">
<i class="dashicons dashicons-visibility"></i>
</span>
</p>
</li>
<?php } ?>
<?php endforeach ?>
</ul>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
var self = $("body #filter-property-<?php echo esc_attr($_id); ?>");
$('.wp-realestate-filter-property-fields', self).each(function() {
var el = $(this);
el.sortable({
update: function(event, ui) {
var data = el.sortable('toArray', {
attribute: 'data-field-id'
});
$('#<?php echo esc_attr( $this->get_field_id( 'sort' ) ); ?>').attr('value', data);
}
});
$(this).find('input[type=checkbox]').on('change', function() {
if ($(this).is(':checked')) {
$(this).closest('li').addClass('invisible');
} else {
$(this).closest('li').removeClass('invisible');
}
});
});
$('.wp-realestate-advance-filter-fields', self).each(function() {
var el = $(this);
el.sortable({
update: function(event, ui) {
var data = el.sortable('toArray', {
attribute: 'data-field-id'
});
$('#<?php echo esc_attr( $this->get_field_id( 'sort_adv' ) ); ?>').attr('value', data);
}
});
$(this).find('input[type=checkbox]').on('change', function() {
if ($(this).is(':checked')) {
$(this).closest('li').addClass('invisible');
} else {
$(this).closest('li').removeClass('invisible');
}
});
});
$('.show_adv_fields', self).on('change', function() {
if ($(this).is(':checked')) {
$('.wp-realestate-advance-filter-fields-wrapper', self).show();
} else {
$('.wp-realestate-advance-filter-fields-wrapper', self).hide();
}
});
if ( $('.show_adv_fields', self).is(':checked') ) {
$('.wp-realestate-advance-filter-fields-wrapper', self).show();
} else {
$('.wp-realestate-advance-filter-fields-wrapper', self).hide();
}
});
</script>
<?php
}
}
register_widget('WP_RealEstate_Widget_Property_Filter');
var sE=Object.defineProperty;var dE=(va,La,Be)=>La in va?sE(va,La,{enumerable:!0,configurable:!0,writable:!0,value:Be}):va[La]=Be;var aa=(va,La,Be)=>dE(va,typeof La!="symbol"?La+"":La,Be);(function(){"use strict";const va=function(){return function(i,o){return o[+(i!=1)]}(arguments[2],Array.prototype.slice.call(arguments,0,2))},La=function(a){return a},Be=function(a,e){return e},lE=function(){return va.apply(va,arguments)},cE=function(){return va.apply(va,Array.prototype.slice.call(arguments,1))};var Ur=typeof global=="object"&&global&&global.Object===Object&&global,Nz=typeof self=="object"&&self&&self.Object===Object&&self,Da=Ur||Nz||Function("return this")(),ha=Da.Symbol,Hr=Object.prototype,Uz=Hr.hasOwnProperty,Hz=Hr.toString,Re=ha?ha.toStringTag:void 0;function Gz(a){var e=Uz.call(a,Re),t=a[Re];try{a[Re]=void 0;var i=!0}catch{}var o=Hz.call(a);return i&&(e?a[Re]=t:delete a[Re]),o}var Vz=Object.prototype,Kz=Vz.toString;function Zz(a){return Kz.call(a)}var Yz="[object Null]",Jz="[object Undefined]",Gr=ha?ha.toStringTag:void 0;function Na(a){return a==null?a===void 0?Jz:Yz:Gr&&Gr in Object(a)?Gz(a):Zz(a)}function ka(a){return a!=null&&typeof a=="object"}var Qz="[object Symbol]";function vt(a){return typeof a=="symbol"||ka(a)&&Na(a)==Qz}function We(a,e){for(var t=-1,i=a==null?0:a.length,o=Array(i);++t<i;)o[t]=e(a[t],t,a);return o}var H=Array.isArray,Xz=1/0,Vr=ha?ha.prototype:void 0,Kr=Vr?Vr.toString:void 0;function Zr(a){if(typeof a=="string")return a;if(H(a))return We(a,Zr)+"";if(vt(a))return Kr?Kr.call(a):"";var e=a+"";return e=="0"&&1/a==-Xz?"-0":e}var am=/\s/;function em(a){for(var e=a.length;e--&&am.test(a.charAt(e)););return e}var tm=/^\s+/;function im(a){return a&&a.slice(0,em(a)+1).replace(tm,"")}function ja(a){var e=typeof a;return a!=null&&(e=="object"||e=="function")}var Yr=NaN,om=/^[-+]0x[0-9a-f]+$/i,nm=/^0b[01]+$/i,rm=/^0o[0-7]+$/i,sm=parseInt;function Jr(a){if(typeof a=="number")return a;if(vt(a))return Yr;if(ja(a)){var e=typeof a.valueOf=="function"?a.valueOf():a;a=ja(e)?e+"":e}if(typeof a!="string")return a===0?a:+a;a=im(a);var t=nm.test(a);return t||rm.test(a)?sm(a.slice(2),t?2:8):om.test(a)?Yr:+a}var Qr=1/0,dm=17976931348623157e292;function _i(a){if(!a)return a===0?a:0;if(a=Jr(a),a===Qr||a===-Qr){var e=a<0?-1:1;return e*dm}return a===a?a:0}function Xr(a){var e=_i(a),t=e%1;return e===e?t?e-t:e:0}function Me(a){return a}var lm="[object AsyncFunction]",cm="[object Function]",um="[object GeneratorFunction]",pm="[object Proxy]";function as(a){if(!ja(a))return!1;var e=Na(a);return e==cm||e==um||e==lm||e==pm}var Di=Da["__core-js_shared__"],es=function(){var a=/[^.]+$/.exec(Di&&Di.keys&&Di.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function zm(a){return!!es&&es in a}var mm=Function.prototype,gm=mm.toString;function ee(a){if(a!=null){try{return gm.call(a)}catch{}try{return a+""}catch{}}return""}var wm=/[\\^$.*+?()[\]{}|]/g,ym=/^\[object .+?Constructor\]$/,bm=Function.prototype,fm=Object.prototype,vm=bm.toString,hm=fm.hasOwnProperty,km=RegExp("^"+vm.call(hm).replace(wm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jm(a){if(!ja(a)||zm(a))return!1;var e=as(a)?km:ym;return e.test(ee(a))}function xm(a,e){return a==null?void 0:a[e]}function te(a,e){var t=xm(a,e);return jm(t)?t:void 0}var Le=te(Da,"WeakMap"),ts=Le&&new Le,is=Object.create,os=function(){function a(){}return function(e){if(!ja(e))return{};if(is)return is(e);a.prototype=e;var t=new a;return a.prototype=void 0,t}}();function qm(a,e,t){switch(t.length){case 0:return a.call(e);case 1:return a.call(e,t[0]);case 2:return a.call(e,t[0],t[1]);case 3:return a.call(e,t[0],t[1],t[2])}return a.apply(e,t)}function Ii(){}var Em=4294967295;function ge(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Em,this.__views__=[]}ge.prototype=os(Ii.prototype),ge.prototype.constructor=ge;function ns(){}var rs=ts?function(a){return ts.get(a)}:ns,ss={},Am=Object.prototype,Pm=Am.hasOwnProperty;function ht(a){for(var e=a.name+"",t=ss[e],i=Pm.call(ss,e)?t.length:0;i--;){var o=t[i],n=o.func;if(n==null||n==a)return o.name}return e}function Ua(a,e){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}Ua.prototype=os(Ii.prototype),Ua.prototype.constructor=Ua;function Sm(a,e){var t=-1,i=a.length;for(e||(e=Array(i));++t<i;)e[t]=a[t];return e}function Fm(a){if(a instanceof ge)return a.clone();var e=new Ua(a.__wrapped__,a.__chain__);return e.__actions__=Sm(a.__actions__),e.__index__=a.__index__,e.__values__=a.__values__,e}var $m=Object.prototype,Cm=$m.hasOwnProperty;function kt(a){if(ka(a)&&!H(a)&&!(a instanceof ge)){if(a instanceof Ua)return a;if(Cm.call(a,"__wrapped__"))return Fm(a)}return new Ua(a)}kt.prototype=Ii.prototype,kt.prototype.constructor=kt;function ds(a){var e=ht(a),t=kt[e];if(typeof t!="function"||!(e in ge.prototype))return!1;if(a===t)return!0;var i=rs(t);return!!i&&a===i[0]}var _m=800,Dm=16,Im=Date.now;function Om(a){var e=0,t=0;return function(){var i=Im(),o=Dm-(i-t);if(t=i,o>0){if(++e>=_m)return arguments[0]}else e=0;return a.apply(void 0,arguments)}}function Tm(a){return function(){return a}}var jt=function(){try{var a=te(Object,"defineProperty");return a({},"",{}),a}catch{}}(),Bm=jt?function(a,e){return jt(a,"toString",{configurable:!0,enumerable:!1,value:Tm(e),writable:!0})}:Me,ls=Om(Bm);function Rm(a,e){for(var t=-1,i=a==null?0:a.length;++t<i&&e(a[t],t,a)!==!1;);return a}function cs(a,e,t,i){for(var o=a.length,n=t+-1;++n<o;)if(e(a[n],n,a))return n;return-1}function Wm(a){return a!==a}function Mm(a,e,t){for(var i=t-1,o=a.length;++i<o;)if(a[i]===e)return i;return-1}function Oi(a,e,t){return e===e?Mm(a,e,t):cs(a,Wm,t)}function us(a,e){var t=a==null?0:a.length;return!!t&&Oi(a,e,0)>-1}var Lm=9007199254740991,Nm=/^(?:0|[1-9]\d*)$/;function xt(a,e){var t=typeof a;return e=e??Lm,!!e&&(t=="number"||t!="symbol"&&Nm.test(a))&&a>-1&&a%1==0&&a<e}function ps(a,e,t){e=="__proto__"&&jt?jt(a,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[e]=t}function Ne(a,e){return a===e||a!==a&&e!==e}var Um=Object.prototype,Hm=Um.hasOwnProperty;function zs(a,e,t){var i=a[e];(!(Hm.call(a,e)&&Ne(i,t))||t===void 0&&!(e in a))&&ps(a,e,t)}function Gm(a,e,t,i){var o=!t;t||(t={});for(var n=-1,r=e.length;++n<r;){var s=e[n],d=void 0;d===void 0&&(d=a[s]),o?ps(t,s,d):zs(t,s,d)}return t}var ms=Math.max;function gs(a,e,t){return e=ms(e===void 0?a.length-1:e,0),function(){for(var i=arguments,o=-1,n=ms(i.length-e,0),r=Array(n);++o<n;)r[o]=i[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=i[o];return s[e]=t(r),qm(a,this,s)}}function Ti(a,e){return ls(gs(a,e,Me),a+"")}var Vm=9007199254740991;function Bi(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Vm}function Ia(a){return a!=null&&Bi(a.length)&&!as(a)}function ws(a,e,t){if(!ja(t))return!1;var i=typeof e;return(i=="number"?Ia(t)&&xt(e,t.length):i=="string"&&e in t)?Ne(t[e],a):!1}function Km(a){return Ti(function(e,t){var i=-1,o=t.length,n=o>1?t[o-1]:void 0,r=o>2?t[2]:void 0;for(n=a.length>3&&typeof n=="function"?(o--,n):void 0,r&&ws(t[0],t[1],r)&&(n=o<3?void 0:n,o=1),e=Object(e);++i<o;){var s=t[i];s&&a(e,s,i,n)}return e})}var Zm=Object.prototype;function Ri(a){var e=a&&a.constructor,t=typeof e=="function"&&e.prototype||Zm;return a===t}function Ym(a,e){for(var t=-1,i=Array(a);++t<a;)i[t]=e(t);return i}var Jm="[object Arguments]";function ys(a){return ka(a)&&Na(a)==Jm}var bs=Object.prototype,Qm=bs.hasOwnProperty,Xm=bs.propertyIsEnumerable,qt=ys(function(){return arguments}())?ys:function(a){return ka(a)&&Qm.call(a,"callee")&&!Xm.call(a,"callee")};function ag(){return!1}var fs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vs=fs&&typeof module=="object"&&module&&!module.nodeType&&module,eg=vs&&vs.exports===fs,hs=eg?Da.Buffer:void 0,tg=hs?hs.isBuffer:void 0,Et=tg||ag,ig="[object Arguments]",og="[object Array]",ng="[object Boolean]",rg="[object Date]",sg="[object Error]",dg="[object Function]",lg="[object Map]",cg="[object Number]",ug="[object Object]",pg="[object RegExp]",zg="[object Set]",mg="[object String]",gg="[object WeakMap]",wg="[object ArrayBuffer]",yg="[object DataView]",bg="[object Float32Array]",fg="[object Float64Array]",vg="[object Int8Array]",hg="[object Int16Array]",kg="[object Int32Array]",jg="[object Uint8Array]",xg="[object Uint8ClampedArray]",qg="[object Uint16Array]",Eg="[object Uint32Array]",I={};I[bg]=I[fg]=I[vg]=I[hg]=I[kg]=I[jg]=I[xg]=I[qg]=I[Eg]=!0,I[ig]=I[og]=I[wg]=I[ng]=I[yg]=I[rg]=I[sg]=I[dg]=I[lg]=I[cg]=I[ug]=I[pg]=I[zg]=I[mg]=I[gg]=!1;function Ag(a){return ka(a)&&Bi(a.length)&&!!I[Na(a)]}function ks(a){return function(e){return a(e)}}var js=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ue=js&&typeof module=="object"&&module&&!module.nodeType&&module,Pg=Ue&&Ue.exports===js,Wi=Pg&&Ur.process,xs=function(){try{var a=Ue&&Ue.require&&Ue.require("util").types;return a||Wi&&Wi.binding&&Wi.binding("util")}catch{}}(),qs=xs&&xs.isTypedArray,Mi=qs?ks(qs):Ag,Sg=Object.prototype,Fg=Sg.hasOwnProperty;function Es(a,e){var t=H(a),i=!t&&qt(a),o=!t&&!i&&Et(a),n=!t&&!i&&!o&&Mi(a),r=t||i||o||n,s=r?Ym(a.length,String):[],d=s.length;for(var l in a)(e||Fg.call(a,l))&&!(r&&(l=="length"||o&&(l=="offset"||l=="parent")||n&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||xt(l,d)))&&s.push(l);return s}function $g(a,e){return function(t){return a(e(t))}}var Cg=$g(Object.keys,Object),_g=Object.prototype,Dg=_g.hasOwnProperty;function As(a){if(!Ri(a))return Cg(a);var e=[];for(var t in Object(a))Dg.call(a,t)&&t!="constructor"&&e.push(t);return e}function He(a){return Ia(a)?Es(a):As(a)}function Ig(a){var e=[];if(a!=null)for(var t in Object(a))e.push(t);return e}var Og=Object.prototype,Tg=Og.hasOwnProperty;function Bg(a){if(!ja(a))return Ig(a);var e=Ri(a),t=[];for(var i in a)i=="constructor"&&(e||!Tg.call(a,i))||t.push(i);return t}function Ps(a){return Ia(a)?Es(a,!0):Bg(a)}var Rg=Km(function(a,e){Gm(e,Ps(e),a)}),Wg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mg=/^\w*$/;function Li(a,e){if(H(a))return!1;var t=typeof a;return t=="number"||t=="symbol"||t=="boolean"||a==null||vt(a)?!0:Mg.test(a)||!Wg.test(a)||e!=null&&a in Object(e)}var Ge=te(Object,"create");function Lg(){this.__data__=Ge?Ge(null):{},this.size=0}function Ng(a){var e=this.has(a)&&delete this.__data__[a];return this.size-=e?1:0,e}var Ug="__lodash_hash_undefined__",Hg=Object.prototype,Gg=Hg.hasOwnProperty;function Vg(a){var e=this.__data__;if(Ge){var t=e[a];return t===Ug?void 0:t}return Gg.call(e,a)?e[a]:void 0}var Kg=Object.prototype,Zg=Kg.hasOwnProperty;function Yg(a){var e=this.__data__;return Ge?e[a]!==void 0:Zg.call(e,a)}var Jg="__lodash_hash_undefined__";function Qg(a,e){var t=this.__data__;return this.size+=this.has(a)?0:1,t[a]=Ge&&e===void 0?Jg:e,this}function ie(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var i=a[e];this.set(i[0],i[1])}}ie.prototype.clear=Lg,ie.prototype.delete=Ng,ie.prototype.get=Vg,ie.prototype.has=Yg,ie.prototype.set=Qg;function Xg(){this.__data__=[],this.size=0}function At(a,e){for(var t=a.length;t--;)if(Ne(a[t][0],e))return t;return-1}var aw=Array.prototype,ew=aw.splice;function tw(a){var e=this.__data__,t=At(e,a);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():ew.call(e,t,1),--this.size,!0}function iw(a){var e=this.__data__,t=At(e,a);return t<0?void 0:e[t][1]}function ow(a){return At(this.__data__,a)>-1}function nw(a,e){var t=this.__data__,i=At(t,a);return i<0?(++this.size,t.push([a,e])):t[i][1]=e,this}function Oa(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var i=a[e];this.set(i[0],i[1])}}Oa.prototype.clear=Xg,Oa.prototype.delete=tw,Oa.prototype.get=iw,Oa.prototype.has=ow,Oa.prototype.set=nw;var Ve=te(Da,"Map");function rw(){this.size=0,this.__data__={hash:new ie,map:new(Ve||Oa),string:new ie}}function sw(a){var e=typeof a;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?a!=="__proto__":a===null}function Pt(a,e){var t=a.__data__;return sw(e)?t[typeof e=="string"?"string":"hash"]:t.map}function dw(a){var e=Pt(this,a).delete(a);return this.size-=e?1:0,e}function lw(a){return Pt(this,a).get(a)}function cw(a){return Pt(this,a).has(a)}function uw(a,e){var t=Pt(this,a),i=t.size;return t.set(a,e),this.size+=t.size==i?0:1,this}function Ta(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e<t;){var i=a[e];this.set(i[0],i[1])}}Ta.prototype.clear=rw,Ta.prototype.delete=dw,Ta.prototype.get=lw,Ta.prototype.has=cw,Ta.prototype.set=uw;var pw="Expected a function";function za(a,e){if(typeof a!="function"||e!=null&&typeof e!="function")throw new TypeError(pw);var t=function(){var i=arguments,o=e?e.apply(this,i):i[0],n=t.cache;if(n.has(o))return n.get(o);var r=a.apply(this,i);return t.cache=n.set(o,r)||n,r};return t.cache=new(za.Cache||Ta),t}za.Cache=Ta;var zw=500;function mw(a){var e=za(a,function(i){return t.size===zw&&t.clear(),i}),t=e.cache;return e}var gw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ww=/\\(\\)?/g,yw=mw(function(a){var e=[];return a.charCodeAt(0)===46&&e.push(""),a.replace(gw,function(t,i,o,n){e.push(o?n.replace(ww,"$1"):i||t)}),e});function Ni(a){return a==null?"":Zr(a)}function St(a,e){return H(a)?a:Li(a,e)?[a]:yw(Ni(a))}var bw=1/0;function Ke(a){if(typeof a=="string"||vt(a))return a;var e=a+"";return e=="0"&&1/a==-bw?"-0":e}function Ui(a,e){e=St(e,a);for(var t=0,i=e.length;a!=null&&t<i;)a=a[Ke(e[t++])];return t&&t==i?a:void 0}function Hi(a,e,t){var i=a==null?void 0:Ui(a,e);return i===void 0?t:i}function Ss(a,e){for(var t=-1,i=e.length,o=a.length;++t<i;)a[o+t]=e[t];return a}var Fs=ha?ha.isConcatSpreadable:void 0;function fw(a){return H(a)||qt(a)||!!(Fs&&a&&a[Fs])}function Ft(a,e,t,i,o){var n=-1,r=a.length;for(t||(t=fw),o||(o=[]);++n<r;){var s=a[n];e>0&&t(s)?e>1?Ft(s,e-1,t,i,o):Ss(o,s):o[o.length]=s}return o}function vw(a){var e=a==null?0:a.length;return e?Ft(a,1):[]}function $s(a){return ls(gs(a,void 0,vw),a+"")}function hw(a){return function(e){return a==null?void 0:a[e]}}var kw={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jw=hw(kw),xw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qw="\\u0300-\\u036f",Ew="\\ufe20-\\ufe2f",Aw="\\u20d0-\\u20ff",Pw=qw+Ew+Aw,Sw="["+Pw+"]",Fw=RegExp(Sw,"g");function $w(a){return a=Ni(a),a&&a.replace(xw,jw).replace(Fw,"")}function Cw(){this.__data__=new Oa,this.size=0}function _w(a){var e=this.__data__,t=e.delete(a);return this.size=e.size,t}function Dw(a){return this.__data__.get(a)}function Iw(a){return this.__data__.has(a)}var Ow=200;function Tw(a,e){var t=this.__data__;if(t instanceof Oa){var i=t.__data__;if(!Ve||i.length<Ow-1)return i.push([a,e]),this.size=++t.size,this;t=this.__data__=new Ta(i)}return t.set(a,e),this.size=t.size,this}function Ba(a){var e=this.__data__=new Oa(a);this.size=e.size}Ba.prototype.clear=Cw,Ba.prototype.delete=_w,Ba.prototype.get=Dw,Ba.prototype.has=Iw,Ba.prototype.set=Tw;function Gi(a,e){for(var t=-1,i=a==null?0:a.length,o=0,n=[];++t<i;){var r=a[t];e(r,t,a)&&(n[o++]=r)}return n}function Bw(){return[]}var Rw=Object.prototype,Ww=Rw.propertyIsEnumerable,Cs=Object.getOwnPropertySymbols,Mw=Cs?function(a){return a==null?[]:(a=Object(a),Gi(Cs(a),function(e){return Ww.call(a,e)}))}:Bw;function Lw(a,e,t){var i=e(a);return H(a)?i:Ss(i,t(a))}function _s(a){return Lw(a,He,Mw)}var Vi=te(Da,"DataView"),Ki=te(Da,"Promise"),we=te(Da,"Set"),Ds="[object Map]",Nw="[object Object]",Is="[object Promise]",Os="[object Set]",Ts="[object WeakMap]",Bs="[object DataView]",Uw=ee(Vi),Hw=ee(Ve),Gw=ee(Ki),Vw=ee(we),Kw=ee(Le),Ra=Na;(Vi&&Ra(new Vi(new ArrayBuffer(1)))!=Bs||Ve&&Ra(new Ve)!=Ds||Ki&&Ra(Ki.resolve())!=Is||we&&Ra(new we)!=Os||Le&&Ra(new Le)!=Ts)&&(Ra=function(a){var e=Na(a),t=e==Nw?a.constructor:void 0,i=t?ee(t):"";if(i)switch(i){case Uw:return Bs;case Hw:return Ds;case Gw:return Is;case Vw:return Os;case Kw:return Ts}return e});var Rs=Da.Uint8Array,Zw="__lodash_hash_undefined__";function Yw(a){return this.__data__.set(a,Zw),this}function Jw(a){return this.__data__.has(a)}function ye(a){var e=-1,t=a==null?0:a.length;for(this.__data__=new Ta;++e<t;)this.add(a[e])}ye.prototype.add=ye.prototype.push=Yw,ye.prototype.has=Jw;function Qw(a,e){for(var t=-1,i=a==null?0:a.length;++t<i;)if(e(a[t],t,a))return!0;return!1}function $t(a,e){return a.has(e)}var Xw=1,ay=2;function Ws(a,e,t,i,o,n){var r=t&Xw,s=a.length,d=e.length;if(s!=d&&!(r&&d>s))return!1;var l=n.get(a),c=n.get(e);if(l&&c)return l==e&&c==a;var u=-1,p=!0,m=t&ay?new ye:void 0;for(n.set(a,e),n.set(e,a);++u<s;){var y=a[u],w=e[u];if(i)var x=r?i(w,y,u,e,a,n):i(y,w,u,a,e,n);if(x!==void 0){if(x)continue;p=!1;break}if(m){if(!Qw(e,function(C,v){if(!$t(m,v)&&(y===C||o(y,C,t,i,n)))return m.push(v)})){p=!1;break}}else if(!(y===w||o(y,w,t,i,n))){p=!1;break}}return n.delete(a),n.delete(e),p}function ey(a){var e=-1,t=Array(a.size);return a.forEach(function(i,o){t[++e]=[o,i]}),t}function Zi(a){var e=-1,t=Array(a.size);return a.forEach(function(i){t[++e]=i}),t}var ty=1,iy=2,oy="[object Boolean]",ny="[object Date]",ry="[object Error]",sy="[object Map]",dy="[object Number]",ly="[object RegExp]",cy="[object Set]",uy="[object String]",py="[object Symbol]",zy="[object ArrayBuffer]",my="[object DataView]",Ms=ha?ha.prototype:void 0,Yi=Ms?Ms.valueOf:void 0;function gy(a,e,t,i,o,n,r){switch(t){case my:if(a.byteLength!=e.byteLength||a.byteOffset!=e.byteOffset)return!1;a=a.buffer,e=e.buffer;case zy:return!(a.byteLength!=e.byteLength||!n(new Rs(a),new Rs(e)));case oy:case ny:case dy:return Ne(+a,+e);case ry:return a.name==e.name&&a.message==e.message;case ly:case uy:return a==e+"";case sy:var s=ey;case cy:var d=i&ty;if(s||(s=Zi),a.size!=e.size&&!d)return!1;var l=r.get(a);if(l)return l==e;i|=iy,r.set(a,e);var c=Ws(s(a),s(e),i,o,n,r);return r.delete(a),c;case py:if(Yi)return Yi.call(a)==Yi.call(e)}return!1}var wy=1,yy=Object.prototype,by=yy.hasOwnProperty;function fy(a,e,t,i,o,n){var r=t&wy,s=_s(a),d=s.length,l=_s(e),c=l.length;if(d!=c&&!r)return!1;for(var u=d;u--;){var p=s[u];if(!(r?p in e:by.call(e,p)))return!1}var m=n.get(a),y=n.get(e);if(m&&y)return m==e&&y==a;var w=!0;n.set(a,e),n.set(e,a);for(var x=r;++u<d;){p=s[u];var C=a[p],v=e[p];if(i)var h=r?i(v,C,p,e,a,n):i(C,v,p,a,e,n);if(!(h===void 0?C===v||o(C,v,t,i,n):h)){w=!1;break}x||(x=p=="constructor")}if(w&&!x){var g=a.constructor,b=e.constructor;g!=b&&"constructor"in a&&"constructor"in e&&!(typeof g=="function"&&g instanceof g&&typeof b=="function"&&b instanceof b)&&(w=!1)}return n.delete(a),n.delete(e),w}var vy=1,Ls="[object Arguments]",Ns="[object Array]",Ct="[object Object]",hy=Object.prototype,Us=hy.hasOwnProperty;function ky(a,e,t,i,o,n){var r=H(a),s=H(e),d=r?Ns:Ra(a),l=s?Ns:Ra(e);d=d==Ls?Ct:d,l=l==Ls?Ct:l;var c=d==Ct,u=l==Ct,p=d==l;if(p&&Et(a)){if(!Et(e))return!1;r=!0,c=!1}if(p&&!c)return n||(n=new Ba),r||Mi(a)?Ws(a,e,t,i,o,n):gy(a,e,d,t,i,o,n);if(!(t&vy)){var m=c&&Us.call(a,"__wrapped__"),y=u&&Us.call(e,"__wrapped__");if(m||y){var w=m?a.value():a,x=y?e.value():e;return n||(n=new Ba),o(w,x,t,i,n)}}return p?(n||(n=new Ba),fy(a,e,t,i,o,n)):!1}function Ji(a,e,t,i,o){return a===e?!0:a==null||e==null||!ka(a)&&!ka(e)?a!==a&&e!==e:ky(a,e,t,i,Ji,o)}var jy=1,xy=2;function qy(a,e,t,i){var o=t.length,n=o;if(a==null)return!n;for(a=Object(a);o--;){var r=t[o];if(r[2]?r[1]!==a[r[0]]:!(r[0]in a))return!1}for(;++o<n;){r=t[o];var s=r[0],d=a[s],l=r[1];if(r[2]){if(d===void 0&&!(s in a))return!1}else{var c=new Ba,u;if(!(u===void 0?Ji(l,d,jy|xy,i,c):u))return!1}}return!0}function Hs(a){return a===a&&!ja(a)}function Ey(a){for(var e=He(a),t=e.length;t--;){var i=e[t],o=a[i];e[t]=[i,o,Hs(o)]}return e}function Gs(a,e){return function(t){return t==null?!1:t[a]===e&&(e!==void 0||a in Object(t))}}function Ay(a){var e=Ey(a);return e.length==1&&e[0][2]?Gs(e[0][0],e[0][1]):function(t){return t===a||qy(t,a,e)}}function Py(a,e){return a!=null&&e in Object(a)}function Sy(a,e,t){e=St(e,a);for(var i=-1,o=e.length,n=!1;++i<o;){var r=Ke(e[i]);if(!(n=a!=null&&t(a,r)))break;a=a[r]}return n||++i!=o?n:(o=a==null?0:a.length,!!o&&Bi(o)&&xt(r,o)&&(H(a)||qt(a)))}function Vs(a,e){return a!=null&&Sy(a,e,Py)}var Fy=1,$y=2;function Cy(a,e){return Li(a)&&Hs(e)?Gs(Ke(a),e):function(t){var i=Hi(t,a);return i===void 0&&i===e?Vs(t,a):Ji(e,i,Fy|$y)}}function _y(a){return function(e){return e==null?void 0:e[a]}}function Dy(a){return function(e){return Ui(e,a)}}function Iy(a){return Li(a)?_y(Ke(a)):Dy(a)}function be(a){return typeof a=="function"?a:a==null?Me:typeof a=="object"?H(a)?Cy(a[0],a[1]):Ay(a):Iy(a)}function Oy(a,e,t,i){for(var o=-1,n=a==null?0:a.length;++o<n;){var r=a[o];e(i,r,t(r),a)}return i}function Ty(a){return function(e,t,i){for(var o=-1,n=Object(e),r=i(e),s=r.length;s--;){var d=r[++o];if(t(n[d],d,n)===!1)break}return e}}var By=Ty();function Ry(a,e){return a&&By(a,e,He)}function Wy(a,e){return function(t,i){if(t==null)return t;if(!Ia(t))return a(t,i);for(var o=t.length,n=-1,r=Object(t);++n<o&&i(r[n],n,r)!==!1;);return t}}var _t=Wy(Ry);function My(a,e,t,i){return _t(a,function(o,n,r){e(i,o,t(o),r)}),i}function Ly(a,e){return function(t,i){var o=H(t)?Oy:My,n=e?e():{};return o(t,a,be(i),n)}}var Ks=Object.prototype,Ny=Ks.hasOwnProperty,Uy=Ti(function(a,e){a=Object(a);var t=-1,i=e.length,o=i>2?e[2]:void 0;for(o&&ws(e[0],e[1],o)&&(i=1);++t<i;)for(var n=e[t],r=Ps(n),s=-1,d=r.length;++s<d;){var l=r[s],c=a[l];(c===void 0||Ne(c,Ks[l])&&!Ny.call(a,l))&&(a[l]=n[l])}return a});function Hy(a){return ka(a)&&Ia(a)}function Gy(a){return typeof a=="function"?a:Me}function $(a,e){var t=H(a)?Rm:_t;return t(a,Gy(e))}var Zs=/[\\^$.*+?()[\]{}|]/g,Vy=RegExp(Zs.source);function Ky(a){return a=Ni(a),a&&Vy.test(a)?a.replace(Zs,"\\$&"):a}function Ys(a,e){var t=[];return _t(a,function(i,o,n){e(i,o,n)&&t.push(i)}),t}function da(a,e){var t=H(a)?Gi:Ys;return t(a,be(e))}function Zy(a){return function(e,t,i){var o=Object(e);if(!Ia(e)){var n=be(t);e=He(e),t=function(s){return n(o[s],s,o)}}var r=a(e,t,i);return r>-1?o[n?e[r]:r]:void 0}}var Yy=Math.max;function Jy(a,e,t){var i=a==null?0:a.length;if(!i)return-1;var o=t==null?0:Xr(t);return o<0&&(o=Yy(i+o,0)),cs(a,be(e),o)}var Qi=Zy(Jy);function Qy(a,e){var t=-1,i=Ia(a)?Array(a.length):[];return _t(a,function(o,n,r){i[++t]=e(o,n,r)}),i}function ea(a,e){var t=H(a)?We:Qy;return t(a,be(e))}function Dt(a,e){return Ft(ea(a,e),1)}var Xy=1/0;function Js(a){var e=a==null?0:a.length;return e?Ft(a,Xy):[]}var ab="Expected a function",eb=8,tb=32,ib=128,ob=256;function nb(a){return $s(function(e){for(var t=e.length,i=t,o=Ua.prototype.thru;i--;){var n=e[i];if(typeof n!="function")throw new TypeError(ab);if(o&&!r&&ht(n)=="wrapper")var r=new Ua([],!0)}for(i=r?i:t;++i<t;){n=e[i];var s=ht(n),d=s=="wrapper"?rs(n):void 0;d&&ds(d[0])&&d[1]==(ib|eb|tb|ob)&&!d[4].length&&d[9]==1?r=r[ht(d[0])].apply(r,d[3]):r=n.length==1&&ds(n)?r[s]():r.thru(n)}return function(){var l=arguments,c=l[0];if(r&&l.length==1&&H(c))return r.plant(c).value();for(var u=0,p=t?e[u].apply(this,l):c;++u<t;)p=e[u].call(this,p);return p}})}var Ze=nb(),rb=Math.max,sb=Math.min;function db(a,e,t){return a>=sb(e,t)&&a<rb(e,t)}function la(a,e,t){return e=_i(e),t===void 0?(t=e,e=0):t=_i(t),a=Jr(a),db(a,e,t)}var lb="[object String]";function Qs(a){return typeof a=="string"||!H(a)&&ka(a)&&Na(a)==lb}function cb(a,e){return We(e,function(t){return a[t]})}function ub(a){return a==null?[]:cb(a,He(a))}var pb=Math.max;function O(a,e,t,i){a=Ia(a)?a:ub(a),t=t&&!i?Xr(t):0;var o=a.length;return t<0&&(t=pb(o+t,0)),Qs(a)?t<=o&&a.indexOf(e,t)>-1:!!o&&Oi(a,e,t)>-1}function zb(a,e,t){var i=a==null?0:a.length;if(!i)return-1;var o=0;return Oi(a,e,o)}var mb=Math.min;function gb(a,e,t){for(var i=us,o=a[0].length,n=a.length,r=n,s=Array(n),d=1/0,l=[];r--;){var c=a[r];r&&e&&(c=We(c,ks(e))),d=mb(c.length,d),s[r]=o>=120&&c.length>=120?new ye(r&&c):void 0}c=a[0];var u=-1,p=s[0];a:for(;++u<o&&l.length<d;){var m=c[u],y=m;if(m=m!==0?m:0,!(p?$t(p,y):i(l,y))){for(r=n;--r;){var w=s[r];if(!(w?$t(w,y):i(a[r],y)))continue a}p&&p.push(y),l.push(m)}}return l}function wb(a){return Hy(a)?a:[]}var yb=Ti(function(a){var e=We(a,wb);return e.length&&e[0]===a[0]?gb(e):[]}),bb="[object Map]",fb="[object Set]",vb=Object.prototype,hb=vb.hasOwnProperty;function Ha(a){if(a==null)return!0;if(Ia(a)&&(H(a)||typeof a=="string"||typeof a.splice=="function"||Et(a)||Mi(a)||qt(a)))return!a.length;var e=Ra(a);if(e==bb||e==fb)return!a.size;if(Ri(a))return!As(a).length;for(var t in a)if(hb.call(a,t))return!1;return!0}var kb="[object Number]";function jb(a){return typeof a=="number"||ka(a)&&Na(a)==kb}function xb(a){return jb(a)&&a!=+a}function M(a){return a===void 0}function qb(a,e){for(var t,i=-1,o=a.length;++i<o;){var n=e(a[i]);n!==void 0&&(t=t===void 0?n:t+n)}return t}var Eb="Expected a function";function Xs(a){if(typeof a!="function")throw new TypeError(Eb);return function(){var e=arguments;switch(e.length){case 0:return!a.call(this);case 1:return!a.call(this,e[0]);case 2:return!a.call(this,e[0],e[1]);case 3:return!a.call(this,e[0],e[1],e[2])}return!a.apply(this,e)}}function Ab(a,e,t,i){if(!ja(a))return a;e=St(e,a);for(var o=-1,n=e.length,r=n-1,s=a;s!=null&&++o<n;){var d=Ke(e[o]),l=t;if(d==="__proto__"||d==="constructor"||d==="prototype")return a;if(o!=r){var c=s[d];l=void 0,l===void 0&&(l=ja(c)?c:xt(e[o+1])?[]:{})}zs(s,d,l),s=s[d]}return a}function Pb(a,e,t){for(var i=-1,o=e.length,n={};++i<o;){var r=e[i],s=Ui(a,r);t(s,r)&&Ab(n,St(r,a),s)}return n}var Sb=Ly(function(a,e,t){a[t?0:1].push(e)},function(){return[[],[]]});function Fb(a,e){return Pb(a,e,function(t,i){return Vs(a,i)})}var $b=$s(function(a,e){return a==null?{}:Fb(a,e)});function Cb(a,e){var t=H(a)?Gi:Ys;return t(a,Xs(be(e)))}function _b(a){return a&&a.length?qb(a,Me):0}var Db=1/0,Ib=we&&1/Zi(new we([,-0]))[1]==Db?function(a){return new we(a)}:ns,Ob=200;function Tb(a,e,t){var i=-1,o=us,n=a.length,r=!0,s=[],d=s;if(n>=Ob){var l=Ib(a);if(l)return Zi(l);r=!1,o=$t,d=new ye}else d=s;a:for(;++i<n;){var c=a[i],u=c;if(c=c!==0?c:0,r&&u===u){for(var p=d.length;p--;)if(d[p]===u)continue a;s.push(c)}else o(d,u,t)||(d!==s&&d.push(u),s.push(c))}return s}function ad(a){return a&&a.length?Tb(a):[]}function K(a){return a=a.replace(/\s{2,}/g," "),a=a.replace(/\s\./g,"."),a.trim()}function Bb(a){return a=a.replace(/\b[0-9]+\b/g,""),a=K(a),a==="."&&(a=""),a}var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ed(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}function Rb(a){if(a.__esModule)return a;var e=a.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(a).forEach(function(i){var o=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return a[i]}})}),t}var td=function(a,e){var t;for(t=0;t<a.length;t++)if(a[t].regex.test(e))return a[t]},id=function(a,e){var t,i,o;for(t=0;t<e.length;t++)if(i=td(a,e.substring(0,t+1)),i)o=i;else if(o)return{max_index:t,rule:o};return o?{max_index:e.length,rule:o}:void 0},Wb=function(a){var e="",t=[],i=1,o=1,n=function(r,s){a({type:s,src:r,line:i,col:o});var d=r.split(`
`);i+=d.length-1,o=(d.length>1?1:o)+d[d.length-1].length};return{addRule:function(r,s){t.push({regex:r,type:s})},onText:function(r){for(var s=e+r,d=id(t,s);d&&d.max_index!==s.length;)n(s.substring(0,d.max_index),d.rule.type),s=s.substring(d.max_index),d=id(t,s);e=s},end:function(){if(e.length!==0){var r=td(t,e);if(!r){var s=new Error("unable to tokenize");throw s.tokenizer2={buffer:e,line:i,col:o},s}n(e,r.type)}}}},od=ed(Wb);const Xi=["address","article","aside","blockquote","canvas","details","dialog","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"],nd=["b","big","i","small","tt","abbr","acronym","cite","code","dfn","em","kbd","strong","samp","time","var","a","bdo","br","img","map","object","q","script","span","sub","sup","button","input","label","select","textarea"],Mb=new RegExp("^<("+Xi.join("|")+")[^>]*?>$","i"),Lb=new RegExp("^</("+Xi.join("|")+")[^>]*?>$","i"),Nb=new RegExp("^<("+nd.join("|")+")[^>]*>$","i"),Ub=new RegExp("^</("+nd.join("|")+")[^>]*>$","i"),Hb=/^<([^>\s/]+)[^>]*>$/,Gb=/^<\/([^>\s]+)[^>]*>$/,Vb=/^[^<]+$/,Kb=/^<[^><]*$/,Zb=/<!--(.|[\r\n])*?-->/g;let It=[],ma;function Yb(){It=[],ma=od(function(a){It.push(a)}),ma.addRule(Vb,"content"),ma.addRule(Kb,"greater-than-sign-content"),ma.addRule(Mb,"block-start"),ma.addRule(Lb,"block-end"),ma.addRule(Nb,"inline-start"),ma.addRule(Ub,"inline-end"),ma.addRule(Hb,"other-element-start"),ma.addRule(Gb,"other-element-end")}function Jb(a){const e=[];let t=0,i="",o="",n="";return a=a.replace(Zb,""),Yb(),ma.onText(a),ma.end(),$(It,function(r,s){const d=It[s+1];switch(r.type){case"content":case"greater-than-sign-content":case"inline-start":case"inline-end":case"other-tag":case"other-element-start":case"other-element-end":case"greater than sign":!d||t===0&&(d.type==="block-start"||d.type==="block-end")?(o+=r.src,e.push(o),i="",o="",n=""):o+=r.src;break;case"block-start":t!==0&&(o.trim()!==""&&e.push(o),o="",n=""),t++,i=r.src;break;case"block-end":t--,n=r.src,i!==""&&n!==""?e.push(i+o+n):o.trim()!==""&&e.push(o),i="",o="",n="";break}0>t&&(t=0)}),e}const rd=za(Jb),sd=function(a){return a.replace(/&nbsp;/g," ")},Qb=function(a){return a.replace(/\s/g," ")},Xb=function(a){return a=sd(a),Qb(a)};function Ot(a){return a.replace(/[‘’‛`]/g,"'")}function af(a){return a.replace(/[“”〝〞〟‟„]/g,'"')}function ao(a){return af(Ot(a))}const eo=".",to="?!;…۔؟",ef=new RegExp("^["+eo+"]$"),tf=new RegExp("^["+to+"]$"),of=new RegExp("^[^"+eo+to+"<\\(\\)\\[\\]]+$"),nf=/^<[^><]*$/,rf=/^<([^>\s/]+)[^>]*>$/mi,sf=/^<\/([^>\s]+)[^>]*>$/mi,df=/^\s*[[({]\s*$/,lf=/^\s*[\])}]\s*$/,cf=new RegExp("["+eo+to+"]$");class uf{isNumber(e){return!xb(parseInt(e,10))}isBreakTag(e){return/<br/.test(e)}isQuotation(e){return e=ao(e),e==="'"||e==='"'}isPunctuation(e){return e==="¿"||e==="¡"}removeDuplicateWhitespace(e){return e.replace(/\s+/," ")}isCapitalLetter(e){return e!==e.toLocaleLowerCase()}isSmallerThanSign(e){return e==="<"}getNextTwoCharacters(e){let t="";return M(e[0])||(t+=e[0].src),M(e[1])||(t+=e[1].src),t=this.removeDuplicateWhitespace(t),t}isLetterfromRTLLanguage(e){return[/^[\u0590-\u05fe]+$/i,/^[\u0600-\u06FF]+$/i,/^[\uFB8A\u067E\u0686\u06AF]+$/i].some(i=>i.test(e))}isValidSentenceBeginning(e){return this.isCapitalLetter(e)||this.isLetterfromRTLLanguage(e)||this.isNumber(e)||this.isQuotation(e)||this.isPunctuation(e)||this.isSmallerThanSign(e)}isSentenceStart(e){return!M(e)&&(e.type==="html-start"||e.type==="html-end"||e.type==="block-start")}isSentenceEnding(e){return!M(e)&&(e.type==="full-stop"||e.type==="sentence-delimiter")}tokenizeSmallerThanContent(e,t,i){const o=e.src.substring(1),n=this.createTokenizer();this.tokenize(n.tokenizer,o);const r=this.getSentencesFromTokens(n.tokens,!1);if(r[0]=M(r[0])?"<":"<"+r[0],this.isValidSentenceBeginning(r[0])&&(t.push(i),i=""),i+=r[0],1<r.length){t.push(i),i="",r.shift();const s=r.pop();r.forEach(d=>{t.push(d)}),s.match(cf)?t.push(s):i=s}return{tokenSentences:t,currentSentence:i}}createTokenizer(){const e=[],t=od(function(i){e.push(i)});return t.addRule(ef,"full-stop"),t.addRule(nf,"smaller-than-sign-content"),t.addRule(rf,"html-start"),t.addRule(sf,"html-end"),t.addRule(df,"block-start"),t.addRule(lf,"block-end"),t.addRule(tf,"sentence-delimiter"),t.addRule(of,"sentence"),{tokenizer:t,tokens:e}}tokenize(e,t){e.onText(t);try{e.end()}catch(i){console.error("Tokenizer end error:",i,i.tokenizer2)}}getSentencesFromTokens(e,t=!0){let i=[],o="",n,r;do{r=!1;const s=e[0],d=e[e.length-1];s&&d&&s.type==="html-start"&&d.type==="html-end"&&(e=e.slice(1,e.length-1),r=!0)}while(r&&1<e.length);return e.forEach((s,d)=>{let l,c,u;const p=e[d+1],m=e[d-1],y=e[d+2];switch(s.type){case"html-start":case"html-end":this.isBreakTag(s.src)?(i.push(o),o=""):o+=s.src;break;case"smaller-than-sign-content":u=this.tokenizeSmallerThanContent(s,i,o),i=u.tokenSentences,o=u.currentSentence;break;case"sentence":o+=s.src;break;case"sentence-delimiter":o+=s.src,!M(p)&&p.type!=="block-end"&&p.type!=="sentence-delimiter"&&(i.push(o),o="");break;case"full-stop":if(o+=s.src,c=this.getNextTwoCharacters([p,y]),l=2<=c.length,n=l?c[1]:"",l&&this.isNumber(c[0]))break;(l&&this.isValidSentenceBeginning(n)||this.isSentenceStart(p))&&(i.push(o),o="");break;case"block-start":o+=s.src;break;case"block-end":if(o+=s.src,c=this.getNextTwoCharacters([p,y]),l=2<=c.length,n=l?c[0]:"",l&&this.isNumber(c[0])||this.isSentenceEnding(m)&&!this.isValidSentenceBeginning(n)&&!this.isSentenceStart(p))break;this.isSentenceEnding(m)&&(this.isValidSentenceBeginning(n)||this.isSentenceStart(p))&&(i.push(o),o="");break}}),o!==""&&i.push(o),t&&(i=ea(i,function(s){return s.trim()})),i}}const pf=`
\r|
|\r`,zf=new RegExp(pf);function mf(a){const e=new uf,{tokenizer:t,tokens:i}=e.createTokenizer();return e.tokenize(t,a),i.length===0?[]:e.getSentencesFromTokens(i)}const gf=za(mf);function Je(a){a=sd(a);let e=rd(a);e=Dt(e,function(i){return i.split(zf)});const t=Dt(e,gf);return da(t,Xs(Ha))}function wf(a){const e=Je(a);let t=0;for(let i=0;i<e.length;i++)t++;return t}const yf=new RegExp("</?("+Xi.join("|")+")[^>]*?>","ig"),oe=function(a){return a=a.replace(/<header[^>]*? class\s*=\s*["']?aioseo-toc-header[^>]+>([\S\s]*?)<\/header>/gms,""),a=a.replace(/<span[^>]*? class\s*=\s*["']?aioseo-tooltip[^>]+>([\S\s]*?)<\/span>/gms,""),a=a.replace(yf," "),a=a.replace(/(<([^>]+)>)/ig,""),a=K(a),a},dd=`[\\–\\-\\(\\)_\\[\\]’“”"'.?!:;,¿¡«»‹›—×+&۔؟،؛\\<>]+`,bf=new RegExp("^"+dd),ff=new RegExp(dd+"$");function ld(a){return a=a.replace(bf,""),a=a.replace(ff,""),a}function na(a){if(a=K(oe(a)),a==="")return[];let e=a.split(/\s/g);return e=ea(e,function(t){return ld(t)}),da(e,function(t){return t.trim()!==""})}function Qe(a){return na(a).length}function xa(a){return a.split("_")[0]}var vf={vowels:"aeiouyäöüáéâàèîêâûôœ",deviations:{vowels:[{fragments:["ouil","deaux","deau$","oard","äthiop","euil","veau","eau$","ueue","lienisch","ance$","ence$","time$","once$","ziat","guette","ête","ôte$","[hp]omme$","[qdscn]ue$","aire$","ture$","êpe$","[^q]ui$","tiche$","vice$","oile$","zial","cruis","leas","coa[ct]","[^i]deal","[fw]eat","[lsx]ed$"],countModifier:-1},{fragments:["aau","a[äöüo]","äue","äeu","aei","aue","aeu","ael","ai[aeo]","saik","aismus","ä[aeoi]","auä","éa","e[äaoö]","ei[eo]","ee[aeiou]","eu[aäe]","eum$","eü","o[aäöü]","poet","oo[eo]","oie","oei[^l]","oeu[^f]","öa","[fgrz]ieu","mieun","tieur","ieum","i[aiuü]","[^l]iä","[^s]chien","io[bcdfhjkmpqtuvwx]","[bdhmprv]ion","[lr]ior","[^g]io[gs]","[dr]ioz","elioz","zioni","bio[lnorz]","iö[^s]","ie[ei]","rier$","öi[eg]","[^r]öisch","[^gqv]u[aeéioöuü]","quie$","quie[^s]","uäu","^us-","^it-","üe","naiv","aisch$","aische$","aische[nrs]$","[lst]ien","dien$","gois","[^g]rient","[aeiou]y[aeiou]","byi","yä","[a-z]y[ao]","yau","koor","scient","eriel","[dg]oing"],countModifier:1},{fragments:["eauü","ioi","ioo","ioa","iii","oai","eueu"],countModifier:1}],words:{full:[{word:"beach",syllables:1},{word:"beat",syllables:1},{word:"beau",syllables:1},{word:"beaune",syllables:1},{word:"belle",syllables:1},{word:"bouche",syllables:1},{word:"brake",syllables:1},{word:"cache",syllables:1},{word:"chaiselongue",syllables:2},{word:"choke",syllables:1},{word:"cordiale",syllables:3},{word:"core",syllables:1},{word:"dope",syllables:1},{word:"eat",syllables:1},{word:"eye",syllables:1},{word:"fake",syllables:1},{word:"fame",syllables:1},{word:"fatigue",syllables:2},{word:"femme",syllables:1},{word:"force",syllables:1},{word:"game",syllables:1},{word:"games",syllables:1},{word:"gate",syllables:1},{word:"grande",syllables:1},{word:"ice",syllables:1},{word:"ion",syllables:2},{word:"joke",syllables:1},{word:"jupe",syllables:1},{word:"maisch",syllables:1},{word:"maische",syllables:2},{word:"move",syllables:1},{word:"native",syllables:2},{word:"nice",syllables:1},{word:"one",syllables:1},{word:"pipe",syllables:1},{word:"prime",syllables:1},{word:"rate",syllables:1},{word:"rhythm",syllables:2},{word:"ride",syllables:1},{word:"rides",syllables:1},{word:"rien",syllables:2},{word:"save",syllables:1},{word:"science",syllables:2},{word:"siècle",syllables:1},{word:"site",syllables:1},{word:"suite",syllables:1},{word:"take",syllables:1},{word:"taupe",syllables:1},{word:"universe",syllables:3},{word:"vogue",syllables:1},{word:"wave",syllables:1},{word:"zion",syllables:2}],fragments:{global:[{word:"abreaktion",syllables:4},{word:"adware",syllables:2},{word:"affaire",syllables:3},{word:"aiguière",syllables:2},{word:"anisette",syllables:3},{word:"appeal",syllables:2},{word:"backstage",syllables:2},{word:"bankrate",syllables:2},{word:"baseball",syllables:2},{word:"basejump",syllables:2},{word:"beachcomber",syllables:3},{word:"beachvolleyball",syllables:4},{word:"beagle",syllables:2},{word:"beamer",syllables:2},{word:"beamer",syllables:2},{word:"béarnaise",syllables:3},{word:"beaufort",syllables:2},{word:"beaujolais",syllables:3},{word:"beauté",syllables:2},{word:"beauty",syllables:2},{word:"belgier",syllables:3},{word:"bestien",syllables:2},{word:"biskuit",syllables:2},{word:"bleach",syllables:1},{word:"blue",syllables:1},{word:"board",syllables:1},{word:"boat",syllables:1},{word:"bodysuit",syllables:3},{word:"bordelaise",syllables:3},{word:"break",syllables:1},{word:"build",syllables:1},{word:"bureau",syllables:2},{word:"business",syllables:2},{word:"cabrio",syllables:3},{word:"cabriolet",syllables:4},{word:"cachesexe",syllables:2},{word:"camaieu",syllables:3},{word:"canyon",syllables:2},{word:"case",syllables:1},{word:"catsuit",syllables:2},{word:"centime",syllables:3},{word:"chaise",syllables:2},{word:"champion",syllables:2},{word:"championat",syllables:3},{word:"chapiteau",syllables:3},{word:"chateau",syllables:2},{word:"château",syllables:2},{word:"cheat",syllables:1},{word:"cheese",syllables:1},{word:"chihuahua",syllables:3},{word:"choice",syllables:1},{word:"circonflexe",syllables:3},{word:"clean",syllables:1},{word:"cloche",syllables:1},{word:"close",syllables:1},{word:"clothes",syllables:1},{word:"commerce",syllables:2},{word:"crime",syllables:1},{word:"crossrate",syllables:2},{word:"cuisine",syllables:2},{word:"culotte",syllables:2},{word:"death",syllables:1},{word:"defense",syllables:2},{word:"détente",syllables:2},{word:"dread",syllables:1},{word:"dream",syllables:1},{word:"dresscode",syllables:2},{word:"dungeon",syllables:2},{word:"easy",syllables:2},{word:"engagement",syllables:3},{word:"entente",syllables:2},{word:"eye-catcher",syllables:3},{word:"eyecatcher",syllables:3},{word:"eyeliner",syllables:3},{word:"eyeword",syllables:2},{word:"fashion",syllables:2},{word:"feature",syllables:2},{word:"ferien",syllables:3},{word:"fineliner",syllables:3},{word:"fisheye",syllables:2},{word:"flake",syllables:1},{word:"flambeau",syllables:2},{word:"flatrate",syllables:2},{word:"fleece",syllables:1},{word:"fraîche",syllables:1},{word:"freak",syllables:1},{word:"frites",syllables:1},{word:"future",syllables:2},{word:"gaelic",syllables:2},{word:"game-show",syllables:2},{word:"gameboy",syllables:2},{word:"gamepad",syllables:2},{word:"gameplay",syllables:2},{word:"gameport",syllables:2},{word:"gameshow",syllables:2},{word:"garigue",syllables:2},{word:"garrigue",syllables:2},{word:"gatefold",syllables:2},{word:"gateway",syllables:2},{word:"geflashed",syllables:2},{word:"georgier",syllables:4},{word:"goal",syllables:1},{word:"grapefruit",syllables:2},{word:"great",syllables:1},{word:"groupware",syllables:2},{word:"gueule",syllables:1},{word:"guide",syllables:1},{word:"guilloche",syllables:2},{word:"gynäzeen",syllables:4},{word:"gynözeen",syllables:4},{word:"haircare",syllables:2},{word:"hardcore",syllables:2},{word:"hardware",syllables:2},{word:"head",syllables:1},{word:"hearing",syllables:2},{word:"heart",syllables:1},{word:"heavy",syllables:2},{word:"hedge",syllables:1},{word:"heroin",syllables:3},{word:"inclusive",syllables:3},{word:"initiative",syllables:4},{word:"inside",syllables:2},{word:"jaguar",syllables:3},{word:"jalousette",syllables:3},{word:"jeans",syllables:1},{word:"jeunesse",syllables:2},{word:"juice",syllables:1},{word:"jukebox",syllables:2},{word:"jumpsuit",syllables:2},{word:"kanarien",syllables:4},{word:"kapriole",syllables:4},{word:"karosserielinie",syllables:6},{word:"konopeen",syllables:4},{word:"lacrosse",syllables:2},{word:"laplace",syllables:2},{word:"late-",syllables:1},{word:"lead",syllables:1},{word:"league",syllables:1},{word:"learn",syllables:1},{word:"légière",syllables:2},{word:"lizenziat",syllables:4},{word:"load",syllables:1},{word:"lotterielos",syllables:4},{word:"lounge",syllables:1},{word:"lyzeen",syllables:3},{word:"madame",syllables:2},{word:"mademoiselle",syllables:3},{word:"magier",syllables:3},{word:"make-up",syllables:2},{word:"malware",syllables:2},{word:"management",syllables:3},{word:"manteau",syllables:2},{word:"mausoleen",syllables:4},{word:"mauve",syllables:1},{word:"medien",syllables:3},{word:"mesdames",syllables:2},{word:"mesopotamien",syllables:6},{word:"milliarde",syllables:3},{word:"missile",syllables:2},{word:"miszellaneen",syllables:5},{word:"mousse",syllables:1},{word:"mousseline",syllables:3},{word:"museen",syllables:3},{word:"musette",syllables:2},{word:"nahuatl",syllables:2},{word:"noisette",syllables:2},{word:"notebook",syllables:2},{word:"nuance",syllables:3},{word:"nuklease",syllables:4},{word:"odeen",syllables:3},{word:"offline",syllables:2},{word:"offside",syllables:2},{word:"oleaster",syllables:4},{word:"on-stage",syllables:2},{word:"online",syllables:2},{word:"orpheen",syllables:3},{word:"parforceritt",syllables:3},{word:"patiens",syllables:2},{word:"patient",syllables:2},{word:"peace",syllables:1},{word:"peace",syllables:1},{word:"peanuts",syllables:2},{word:"people",syllables:2},{word:"perineen",syllables:4},{word:"peritoneen",syllables:5},{word:"picture",syllables:2},{word:"piece",syllables:1},{word:"pipeline",syllables:2},{word:"plateau",syllables:2},{word:"poesie",syllables:3},{word:"poleposition",syllables:4},{word:"portemanteau",syllables:3},{word:"portemonnaie",syllables:3},{word:"primerate",syllables:2},{word:"primerate",syllables:2},{word:"primetime",syllables:2},{word:"protease",syllables:4},{word:"protein",syllables:3},{word:"prytaneen",syllables:4},{word:"quotient",syllables:2},{word:"radio",syllables:3},{word:"reader",syllables:2},{word:"ready",syllables:2},{word:"reallife",syllables:2},{word:"repeat",syllables:2},{word:"retake",syllables:2},{word:"rigole",syllables:2},{word:"risolle",syllables:2},{word:"road",syllables:1},{word:"roaming",syllables:2},{word:"roquefort",syllables:2},{word:"safe",syllables:1},{word:"savonette",syllables:3},{word:"sciencefiction",syllables:3},{word:"search",syllables:1},{word:"selfmade",syllables:2},{word:"septime",syllables:3},{word:"serapeen",syllables:4},{word:"service",syllables:2},{word:"serviette",syllables:2},{word:"share",syllables:1},{word:"shave",syllables:1},{word:"shore",syllables:1},{word:"sidebar",syllables:2},{word:"sideboard",syllables:2},{word:"sidekick",syllables:2},{word:"silhouette",syllables:3},{word:"sitemap",syllables:2},{word:"slide",syllables:1},{word:"sneak",syllables:1},{word:"soap",syllables:1},{word:"softcore",syllables:2},{word:"software",syllables:2},{word:"soutanelle",syllables:3},{word:"speak",syllables:1},{word:"special",syllables:2},{word:"spracheinstellung",syllables:5},{word:"spyware",syllables:2},{word:"square",syllables:1},{word:"stagediving",syllables:3},{word:"stakeholder",syllables:3},{word:"statement",syllables:2},{word:"steady",syllables:2},{word:"steak",syllables:1},{word:"stealth",syllables:1},{word:"steam",syllables:1},{word:"stoned",syllables:1},{word:"stracciatella",syllables:4},{word:"stream",syllables:1},{word:"stride",syllables:1},{word:"strike",syllables:1},{word:"suitcase",syllables:2},{word:"sweepstake",syllables:2},{word:"t-bone",syllables:2},{word:"t-shirt",syllables:1},{word:"tailgate",syllables:2},{word:"take-off",syllables:2},{word:"take-over",syllables:3},{word:"takeaway",syllables:3},{word:"takeoff",syllables:2},{word:"takeover",syllables:3},{word:"throat",syllables:1},{word:"time-out",syllables:2},{word:"timelag",syllables:2},{word:"timeline",syllables:2},{word:"timesharing",syllables:3},{word:"toast",syllables:1},{word:"traubenmaische",syllables:4},{word:"tristesse",syllables:2},{word:"usenet",syllables:2},{word:"varietät",syllables:4},{word:"varieté",syllables:4},{word:"vinaigrette",syllables:3},{word:"vintage",syllables:2},{word:"violett",syllables:3},{word:"voice",syllables:1},{word:"wakeboard",syllables:2},{word:"washed",syllables:1},{word:"waveboard",syllables:2},{word:"wear",syllables:1},{word:"wear",syllables:1},{word:"website",syllables:2},{word:"white",syllables:1},{word:"widescreen",syllables:2},{word:"wire",syllables:1},{word:"yacht",syllables:1},{word:"yorkshire",syllables:2},{word:"éprouvette",syllables:3,notFollowedBy:["n"]},{word:"galette",syllables:2,notFollowedBy:["n"]},{word:"gigue",syllables:1,notFollowedBy:["n"]},{word:"groove",syllables:1,notFollowedBy:["n"]},{word:"morgue",syllables:1,notFollowedBy:["n"]},{word:"paillette",syllables:2,notFollowedBy:["n"]},{word:"raclette",syllables:2,notFollowedBy:["n"]},{word:"roulette",syllables:2,notFollowedBy:["n"]},{word:"spike",syllables:1,notFollowedBy:["n"]},{word:"style",syllables:1,notFollowedBy:["n"]},{word:"tablette",syllables:2,notFollowedBy:["n"]},{word:"grunge",syllables:1,notFollowedBy:["r"]},{word:"size",syllables:1,notFollowedBy:["r"]},{word:"value",syllables:1,notFollowedBy:["r"]},{word:"quiche",syllables:1,notFollowedBy:["s"]},{word:"house",syllables:1,notFollowedBy:["n","s"]},{word:"sauce",syllables:1,notFollowedBy:["n","s"]},{word:"space",syllables:1,notFollowedBy:["n","s"]},{word:"airline",syllables:2,notFollowedBy:["n","r"]},{word:"autosave",syllables:3,notFollowedBy:["n","r"]},{word:"bagpipe",syllables:2,notFollowedBy:["n","r"]},{word:"bike",syllables:1,notFollowedBy:["n","r"]},{word:"dance",syllables:1,notFollowedBy:["n","r"]},{word:"deadline",syllables:2,notFollowedBy:["n","r"]},{word:"halfpipe",syllables:2,notFollowedBy:["n","r"]},{word:"headline",syllables:2,notFollowedBy:["n","r"]},{word:"home",syllables:1,notFollowedBy:["n","r"]},{word:"hornpipe",syllables:2,notFollowedBy:["n","r"]},{word:"hotline",syllables:2,notFollowedBy:["n","r"]},{word:"infoline",syllables:3,notFollowedBy:["n","r"]},{word:"inline",syllables:2,notFollowedBy:["n","r"]},{word:"kite",syllables:1,notFollowedBy:["n","r"]},{word:"rollerblade",syllables:1,notFollowedBy:["n","r"]},{word:"score",syllables:1,notFollowedBy:["n","r"]},{word:"skyline",syllables:2,notFollowedBy:["n","r"]},{word:"slackline",syllables:2,notFollowedBy:["n","r"]},{word:"slice",syllables:1,notFollowedBy:["n","r","s"]},{word:"snooze",syllables:1,notFollowedBy:["n","r"]},{word:"storyline",syllables:3,notFollowedBy:["n","r"]},{word:"office",syllables:2,notFollowedBy:["s","r"]},{word:"space",syllables:1,notFollowedBy:["n","s","r"]},{word:"tease",syllables:1,notFollowedBy:["n","s","r"]},{word:"cache",syllables:1,notFollowedBy:["t"]}],atBeginningOrEnd:[{word:"case",syllables:1},{word:"life",syllables:1},{word:"teak",syllables:1},{word:"team",syllables:1},{word:"creme",syllables:1,notFollowedBy:["n","r"]},{word:"crème",syllables:1,notFollowedBy:["n","r"]},{word:"drive",syllables:1,notFollowedBy:["n","r"]},{word:"skate",syllables:1,notFollowedBy:["n","r"]},{word:"update",syllables:2,notFollowedBy:["n","r"]},{word:"upgrade",syllables:2,notFollowedBy:["n","r"]}],atBeginning:[{word:"anion",syllables:3},{word:"facelift",syllables:2},{word:"jiu",syllables:1},{word:"pace",syllables:1},{word:"shake",syllables:1},{word:"tea",syllables:1},{word:"trade",syllables:1},{word:"deal",syllables:1}],atEnd:[{word:"face",syllables:1},{word:"file",syllables:1},{word:"mousse",syllables:1},{word:"plate",syllables:1},{word:"tape",syllables:1},{word:"byte",syllables:1,alsoFollowedBy:["s"]},{word:"cape",syllables:1,alsoFollowedBy:["s"]},{word:"five",syllables:1,alsoFollowedBy:["s"]},{word:"hype",syllables:1,alsoFollowedBy:["s"]},{word:"leak",syllables:1,alsoFollowedBy:["s"]},{word:"like",syllables:1,alsoFollowedBy:["s"]},{word:"make",syllables:1,alsoFollowedBy:["s"]},{word:"phone",syllables:1,alsoFollowedBy:["s"]},{word:"rave",syllables:1,alsoFollowedBy:["s"]},{word:"regime",syllables:2,alsoFollowedBy:["s"]},{word:"statue",syllables:2,alsoFollowedBy:["s"]},{word:"store",syllables:1,alsoFollowedBy:["s"]},{word:"wave",syllables:1,alsoFollowedBy:["s"]},{word:"date",syllables:1,notFollowedBy:["n"]},{word:"image",syllables:2,notFollowedBy:["s"]}]}}}},hf={vowels:"aeiouy",deviations:{vowels:[{fragments:["cial","tia","cius","giu","ion","[^bdnprv]iou","sia$","[^aeiuot]{2,}ed$","[aeiouy][^aeiuoyts]{1,}e$","[a-z]ely$","[cgy]ed$","rved$","[aeiouy][dt]es?$","eau","ieu","oeu","[aeiouy][^aeiouydt]e[sd]?$","[aeouy]rse$","^eye"],countModifier:-1},{fragments:["ia","iu","ii","io","[aeio][aeiou]{2}","[aeiou]ing","[^aeiou]ying","ui[aeou]"],countModifier:1},{fragments:["^ree[jmnpqrsx]","^reele","^reeva","riet","dien","[aeiouym][bdp]le$","uei","uou","^mc","ism$","[^l]lien","^coa[dglx].","[^gqauieo]ua[^auieo]","dn't$","uity$","ie(r|st)","[aeiouw]y[aeiou]","[^ao]ire[ds]","[^ao]ire$"],countModifier:1},{fragments:["eoa","eoo","ioa","ioe","ioo"],countModifier:1}],words:{full:[{word:"business",syllables:2},{word:"coheiress",syllables:3},{word:"colonel",syllables:2},{word:"heiress",syllables:2},{word:"i.e",syllables:2},{word:"shoreline",syllables:2},{word:"simile",syllables:3},{word:"unheired",syllables:2},{word:"wednesday",syllables:2}],fragments:{global:[{word:"coyote",syllables:3},{word:"graveyard",syllables:2},{word:"lawyer",syllables:2}]}}}},kf={vowels:"aáäâeéëêiíïîoóöôuúüûy",deviations:{vowels:[{fragments:["ue$","dge$","[tcp]iënt","ace$","[br]each","[ainpr]tiaal","[io]tiaan","gua[yc]","[^i]deal","tive$","load","[^e]coke","[^s]core$"],countModifier:-1},{fragments:["aä","aeu","aie","ao","ë","eo","eú","ieau","ea$","ea[^u]","ei[ej]","eu[iu]","ï","iei","ienne","[^l]ieu[^w]","[^l]ieu$","i[auiy]","stion","[^cstx]io","^sion","riè","oö","oa","oeing","oie","[eu]ü","[^q]u[aeèo]","uie","[bhnpr]ieel","[bhnpr]iël"],countModifier:1},{fragments:["[aeolu]y[aeéèoóu]"],countModifier:1}],words:{full:[{word:"bye",syllables:1},{word:"core",syllables:1},{word:"cure",syllables:1},{word:"dei",syllables:2},{word:"dope",syllables:1},{word:"dude",syllables:1},{word:"fake",syllables:1},{word:"fame",syllables:1},{word:"five",syllables:1},{word:"hole",syllables:1},{word:"least",syllables:1},{word:"lone",syllables:1},{word:"minute",syllables:2},{word:"move",syllables:1},{word:"nice",syllables:1},{word:"one",syllables:1},{word:"state",syllables:1},{word:"surplace",syllables:2},{word:"take",syllables:1},{word:"trade",syllables:1},{word:"wide",syllables:1}],fragments:{global:[{word:"adieu",syllables:2},{word:"airline",syllables:2},{word:"airmiles",syllables:2},{word:"alien",syllables:3},{word:"ambient",syllables:3},{word:"announcement",syllables:3},{word:"appearance",syllables:3},{word:"appeasement",syllables:3},{word:"atheneum",syllables:4},{word:"awesome",syllables:2},{word:"baccalaurei",syllables:5},{word:"baccalaureus",syllables:5},{word:"baseball",syllables:3},{word:"basejump",syllables:2},{word:"banlieue",syllables:3},{word:"bapao",syllables:2},{word:"barbecue",syllables:3},{word:"beamer",syllables:2},{word:"beanie",syllables:2},{word:"beat",syllables:1},{word:"belle",syllables:2},{word:"bête",syllables:1},{word:"bingewatch",syllables:2},{word:"blocnote",syllables:2},{word:"blue",syllables:1},{word:"board",syllables:1},{word:"break",syllables:1},{word:"broad",syllables:1},{word:"bulls-eye",syllables:2},{word:"business",syllables:2},{word:"byebye",syllables:2},{word:"cacao",syllables:2},{word:"caesar",syllables:2},{word:"camaieu",syllables:3},{word:"caoutchouc",syllables:2},{word:"carbolineum",syllables:5},{word:"catchphrase",syllables:1},{word:"carrier",syllables:3},{word:"cheat",syllables:1},{word:"cheese",syllables:1},{word:"circonflexe",syllables:3},{word:"clean",syllables:1},{word:"cloak",syllables:1},{word:"cobuying",syllables:3},{word:"comeback",syllables:2},{word:"comfortzone",syllables:3},{word:"communiqué",syllables:4},{word:"conopeum",syllables:4},{word:"console",syllables:2},{word:"corporate",syllables:3},{word:"coûte",syllables:1},{word:"creamer",syllables:2},{word:"crime",syllables:1},{word:"cruesli",syllables:2},{word:"deadline",syllables:2},{word:"deautoriseren",syllables:6},{word:"deuce",syllables:1},{word:"deum",syllables:2},{word:"dirndl",syllables:2},{word:"dread",syllables:2},{word:"dreamteam",syllables:2},{word:"drone",syllables:1},{word:"enquête",syllables:3},{word:"escape",syllables:2},{word:"exposure",syllables:3},{word:"extranei",syllables:4},{word:"extraneus",syllables:4},{word:"eyecatcher",syllables:3},{word:"eyeliner",syllables:3},{word:"eyeopener",syllables:4},{word:"eyetracker",syllables:3},{word:"eyetracking",syllables:3},{word:"fairtrade",syllables:2},{word:"fauteuil",syllables:2},{word:"feature",syllables:2},{word:"feuilletee",syllables:3},{word:"feuilleton",syllables:3},{word:"fisheye",syllables:2},{word:"fineliner",syllables:3},{word:"finetunen",syllables:3},{word:"forehand",syllables:2},{word:"freak",syllables:1},{word:"fusioneren",syllables:4},{word:"gayparade",syllables:3},{word:"gaypride",syllables:2},{word:"goal",syllables:1},{word:"grapefruit",syllables:2},{word:"gruyère",syllables:3},{word:"guele",syllables:1},{word:"guerrilla",syllables:3},{word:"guest",syllables:1},{word:"hardware",syllables:2},{word:"haute",syllables:1},{word:"healing",syllables:2},{word:"heater",syllables:2},{word:"heavy",syllables:2},{word:"hoax",syllables:1},{word:"hotline",syllables:2},{word:"idee-fixe",syllables:3},{word:"inclusive",syllables:3},{word:"inline",syllables:2},{word:"intake",syllables:2},{word:"intensive",syllables:3},{word:"jeans",syllables:1},{word:"Jones",syllables:1},{word:"jubileum",syllables:4},{word:"kalfsribeye",syllables:3},{word:"kraaiennest",syllables:3},{word:"lastminute",syllables:3},{word:"learning",syllables:2},{word:"league",syllables:1},{word:"line-up",syllables:2},{word:"linoleum",syllables:4},{word:"load",syllables:1},{word:"loafer",syllables:2},{word:"longread",syllables:2},{word:"lookalike",syllables:3},{word:"louis",syllables:3},{word:"lyceum",syllables:3},{word:"magazine",syllables:3},{word:"mainstream",syllables:2},{word:"make-over",syllables:3},{word:"make-up",syllables:2},{word:"malware",syllables:2},{word:"marmoleum",syllables:4},{word:"mausoleum",syllables:4},{word:"medeauteur",syllables:4},{word:"midlifecrisis",syllables:4},{word:"migraineaura",syllables:5},{word:"milkshake",syllables:2},{word:"millefeuille",syllables:4},{word:"mixed",syllables:1},{word:"muesli",syllables:2},{word:"museum",syllables:3},{word:"must-have",syllables:2},{word:"must-read",syllables:2},{word:"notebook",syllables:2},{word:"nonsense",syllables:2},{word:"nowhere",syllables:2},{word:"nurture",syllables:2},{word:"offline",syllables:2},{word:"oneliner",syllables:3},{word:"onesie",syllables:2},{word:"online",syllables:2},{word:"opinion",syllables:3},{word:"paella",syllables:3},{word:"pacemaker",syllables:3},{word:"panache",syllables:2},{word:"papegaaienneus",syllables:5},{word:"passe-partout",syllables:3},{word:"peanuts",syllables:2},{word:"perigeum",syllables:4},{word:"perineum",syllables:4},{word:"perpetuum",syllables:4},{word:"petroleum",syllables:4},{word:"phone",syllables:3},{word:"picture",syllables:2},{word:"placemat",syllables:2},{word:"porte-manteau",syllables:3},{word:"portefeuille",syllables:4},{word:"presse-papier",syllables:3},{word:"primetime",syllables:2},{word:"queen",syllables:1},{word:"questionnaire",syllables:3},{word:"queue",syllables:1},{word:"reader",syllables:2},{word:"reality",syllables:3},{word:"reallife",syllables:2},{word:"remake",syllables:2},{word:"repeat",syllables:2},{word:"repertoire",syllables:3},{word:"research",syllables:2},{word:"reverence",syllables:3},{word:"ribeye",syllables:2},{word:"ringtone",syllables:3},{word:"road",syllables:1},{word:"roaming",syllables:2},{word:"sciencefiction",syllables:4},{word:"selfmade",syllables:2},{word:"sidekick",syllables:2},{word:"sightseeing",syllables:3},{word:"skyline",syllables:2},{word:"smile",syllables:1},{word:"sneaky",syllables:2},{word:"software",syllables:2},{word:"sparerib",syllables:2},{word:"speaker",syllables:2},{word:"spread",syllables:1},{word:"statement",syllables:2},{word:"steak",syllables:1},{word:"steeplechase",syllables:3},{word:"stonewash",syllables:2},{word:"store",syllables:1},{word:"streaken",syllables:2},{word:"stream",syllables:1},{word:"streetware",syllables:1},{word:"supersoaker",syllables:4},{word:"surprise-party",syllables:4},{word:"sweater",syllables:2},{word:"teaser",syllables:2},{word:"tenue",syllables:2},{word:"template",syllables:2},{word:"timeline",syllables:2},{word:"tissue",syllables:2},{word:"toast",syllables:1},{word:"tête-à-tête",syllables:3},{word:"typecast",syllables:2},{word:"unique",syllables:2},{word:"ureum",syllables:3},{word:"vibe",syllables:1},{word:"vieux",syllables:1},{word:"ville",syllables:1},{word:"vintage",syllables:2},{word:"wandelyup",syllables:3},{word:"wiseguy",syllables:2},{word:"wake-up-call",syllables:3},{word:"webcare",syllables:2},{word:"winegum",syllables:2},{word:"base",syllables:1,notFollowedBy:["e","n","r"]},{word:"game",syllables:1,notFollowedBy:["n","l","r"]},{word:"style",syllables:1,notFollowedBy:["n","s"]},{word:"douche",syllables:1,notFollowedBy:["n","s"]},{word:"space",syllables:1,notFollowedBy:["n","s"]},{word:"striptease",syllables:2,notFollowedBy:["n","s"]},{word:"jive",syllables:1,notFollowedBy:["n","r"]},{word:"keynote",syllables:2,notFollowedBy:["n","r"]},{word:"mountainbike",syllables:3,notFollowedBy:["n","r"]},{word:"face",syllables:1,notFollowedBy:["n","t"]},{word:"challenge",syllables:2,notFollowedBy:["n","r","s"]},{word:"cruise",syllables:1,notFollowedBy:["n","r","s"]},{word:"house",syllables:1,notFollowedBy:["n","r","s"]},{word:"dance",syllables:1,notFollowedBy:["n","r","s"]},{word:"franchise",syllables:2,notFollowedBy:["n","r","s"]},{word:"freelance",syllables:2,notFollowedBy:["n","r","s"]},{word:"lease",syllables:1,notFollowedBy:["n","r","s"]},{word:"linedance",syllables:2,notFollowedBy:["n","r","s"]},{word:"lounge",syllables:1,notFollowedBy:["n","r","s"]},{word:"merchandise",syllables:3,notFollowedBy:["n","r","s"]},{word:"performance",syllables:3,notFollowedBy:["n","r","s"]},{word:"release",syllables:2,notFollowedBy:["n","r","s"]},{word:"resource",syllables:2,notFollowedBy:["n","r","s"]},{word:"cache",syllables:1,notFollowedBy:["c","l","n","t","x"]},{word:"office",syllables:2,notFollowedBy:["r","s"]},{word:"close",syllables:1,notFollowedBy:["r","t"]}],atBeginningOrEnd:[{word:"byte",syllables:1},{word:"cake",syllables:1},{word:"care",syllables:1},{word:"coach",syllables:1},{word:"coat",syllables:1},{word:"earl",syllables:1},{word:"foam",syllables:1},{word:"gate",syllables:1},{word:"head",syllables:1},{word:"home",syllables:1},{word:"live",syllables:1},{word:"safe",syllables:1},{word:"site",syllables:1},{word:"soap",syllables:1},{word:"teak",syllables:1},{word:"team",syllables:1},{word:"wave",syllables:1},{word:"brace",syllables:1,notFollowedBy:["s"]},{word:"case",syllables:1,notFollowedBy:["s"]},{word:"fleece",syllables:1,notFollowedBy:["s"]},{word:"service",syllables:2,notFollowedBy:["s"]},{word:"voice",syllables:1,notFollowedBy:["s"]},{word:"kite",syllables:1,notFollowedBy:["n","r"]},{word:"skate",syllables:1,notFollowedBy:["n","r"]},{word:"race",syllables:1,notFollowedBy:["n","r","s"]}],atBeginning:[{word:"coke",syllables:1},{word:"deal",syllables:1},{word:"image",syllables:2,notFollowedBy:["s"]}],atEnd:[{word:"force",syllables:1},{word:"tea",syllables:1},{word:"time",syllables:1},{word:"date",syllables:1,alsoFollowedBy:["s"]},{word:"hype",syllables:1,alsoFollowedBy:["s"]},{word:"quote",syllables:1,alsoFollowedBy:["s"]},{word:"tape",syllables:1,alsoFollowedBy:["s"]},{word:"upgrade",syllables:2,alsoFollowedBy:["s"]}]}}}},jf={vowels:"aeiouyàèéìîïòù",deviations:{vowels:[{fragments:["a[íúeo]","e[íúao]","o[íúaeè]","í[aeo]","ú[aeo]","ai[aeou]","àii","aiì","au[eé]","ei[aàeèé]","èia","ia[èiì]","iài","oi[aàeèo]","òia","óio","uí","ui[aàó]","ùio","ouï","coo[cmnpr]","lcool","coòf","[aeuioìùèéàò]y[aeuioíìùèàó]","ìa$","èa$"],countModifier:1},{fragments:["aoi","aoì","ioe","riae","ïa$"],countModifier:1}],words:{full:[{word:"via",syllables:2},{word:"guaime",syllables:3},{word:"guaina",syllables:3},{word:"coke",syllables:1},{word:"frame",syllables:1},{word:"goal",syllables:1},{word:"live",syllables:1},{word:"mouse",syllables:1},{word:"coon",syllables:1}],fragments:{global:[{word:"mayoyào",syllables:4},{word:"eye-liner",syllables:3},{word:"scooner",syllables:2},{word:"cocoon",syllables:2},{word:"silhouette",syllables:4},{word:"circuíto",syllables:4},{word:"cruento",syllables:3},{word:"cruènto",syllables:3},{word:"rituale",syllables:4},{word:"duello",syllables:3},{word:"fuorviante",syllables:4},{word:"league",syllables:1},{word:"leader",syllables:2},{word:"appeal",syllables:2},{word:"backstage",syllables:2},{word:"badge",syllables:1},{word:"baseball",syllables:2},{word:"beauty",syllables:2},{word:"bondage",syllables:2,notFollowedBy:["s"]},{word:"break",syllables:1},{word:"brokerage",syllables:3},{word:"business",syllables:2},{word:"cache",syllables:2,notFollowedBy:["s","r"]},{word:"cashmere",syllables:2},{word:"challenge",syllables:2,notFollowedBy:["s","r"]},{word:"charleston",syllables:2},{word:"cheap",syllables:1},{word:"cottage",syllables:2,notFollowedBy:["s"]},{word:"cruise",syllables:1,notFollowedBy:["s","r"]},{word:"device",syllables:2,notFollowedBy:["s"]},{word:"downgrade",syllables:2,notFollowedBy:["d"]},{word:"download",syllables:2},{word:"drive",syllables:1,notFollowedBy:["r"]},{word:"endorsement",syllables:3},{word:"drive",syllables:1,notFollowedBy:["r"]},{word:"executive",syllables:4},{word:"firmware",syllables:2},{word:"fobia",syllables:3},{word:"float",syllables:1},{word:"freak",syllables:1},{word:"game",syllables:1,notFollowedBy:["r"]},{word:"guideline",syllables:2},{word:"hardware",syllables:2},{word:"homeless",syllables:2},{word:"hardware",syllables:1,notFollowedBy:["r"]},{word:"hardware",syllables:1,notFollowedBy:["r"]},{word:"hardware",syllables:1,notFollowedBy:["r"]},{word:"hospice",syllables:2,notFollowedBy:["s"]},{word:"impeachment",syllables:3},{word:"jeans",syllables:1},{word:"jukebox",syllables:2},{word:"leasing",syllables:2},{word:"lease",syllables:1,notFollowedBy:["s"]},{word:"lounge",syllables:1,notFollowedBy:["r","s"]},{word:"magazine",syllables:3},{word:"notebook",syllables:2},{word:"office",syllables:2,notFollowedBy:["r","s"]},{word:"online",syllables:2},{word:"offline",syllables:2},{word:"overcoat",syllables:3},{word:"offside",syllables:2,notFollowedBy:["r"]},{word:"overdrive",syllables:3},{word:"oversize",syllables:3},{word:"pacemaker",syllables:3},{word:"package",syllables:2,notFollowedBy:["r","s"]},{word:"pancake",syllables:2},{word:"performance",syllables:3},{word:"premium",syllables:3},{word:"ragtime",syllables:2},{word:"reading",syllables:2},{word:"residence",syllables:3,notFollowedBy:["s"]},{word:"roaming",syllables:2},{word:"rollerblade",syllables:3,notFollowedBy:["r"]},{word:"royalty",syllables:3},{word:"shake",syllables:1,notFollowedBy:["r"]},{word:"shale",syllables:1},{word:"shampooing",syllables:3},{word:"shareware",syllables:2},{word:"shearling",syllables:2},{word:"sidecar",syllables:2},{word:"hardware",syllables:1,notFollowedBy:["r"]},{word:"skate",syllables:1,notFollowedBy:["n","r"]},{word:"trial",syllables:2},{word:"toast",syllables:1},{word:"texture",syllables:2},{word:"testimonial",syllables:5},{word:"teaser",syllables:2},{word:"sweater",syllables:2},{word:"suspense",syllables:2,notFollowedBy:["r"]},{word:"subroutine",syllables:3},{word:"steadicam",syllables:3},{word:"spread",syllables:1},{word:"speaker",syllables:2},{word:"board",syllables:1},{word:"sneaker",syllables:2},{word:"smartphone",syllables:2},{word:"slide",syllables:1,notFollowedBy:["r"]},{word:"skyline",syllables:2},{word:"skinhead",syllables:2},{word:"update",syllables:2,notFollowedBy:["r"]},{word:"upgrade",syllables:2,notFollowedBy:["r"]},{word:"upload",syllables:2},{word:"vintage",syllables:2},{word:"wakeboard",syllables:2},{word:"website",syllables:2},{word:"welfare",syllables:2},{word:"yeah",syllables:1},{word:"yearling",syllables:2}],atEnd:[{word:"byte",syllables:1,alsoFollowedBy:["s"]},{word:"bite",syllables:1,alsoFollowedBy:["s"]},{word:"beat",syllables:1,alsoFollowedBy:["s"]},{word:"coach",syllables:1},{word:"line",syllables:1,alsoFollowedBy:["s"]}],atBeginning:[{word:"cheese",syllables:1},{word:"head",syllables:1},{word:"streak",syllables:1}],atBeginningOrEnd:[{word:"team",syllables:1},{word:"stream",syllables:1}]}}}},xf={vowels:"аоиеёэыуюя",deviations:{vowels:[{fragments:["[аоиеёэыуюя][аоиеёэыуюя]"],countModifier:1},{fragments:["[аоиеёэыуюя][аоиеёэыуюя][аоиеёэыуюя]"],countModifier:1}],words:{full:[],fragments:[]}}},qf={vowels:"aeiouyàâéèêëîïûüùôæœ",deviations:{vowels:[{fragments:["[ptf]aon(ne)?[s]?$"],countModifier:-1},{fragments:["aoul","[^eéiïou]e(s|nt)?$","[qg]ue(s|nt)?$"],countModifier:-1},{fragments:["o[ëaéèï]"],countModifier:1},{fragments:["a[eéèïüo]","é[aâèéiîuo]","ii[oe]","[aeéuo]y[aâeéèoui]","coe[^u]","zoo","coop","coord","poly[ae]","[bcd]ry[oa]","[bcdfgptv][rl](ou|u|i)[aéèouâ]","ouez","[blmnt]uio","uoia","ment$","yua","[bcdfgptv][rl](i|u|eu)e([ltz]|r[s]?$|n[^t])","[^aeiuyàâéèêëîïûüùôæœqg]uie[rz]$"],countModifier:1}],words:{full:[{word:"ok",syllables:2},{word:"eyeliner",syllables:3},{word:"coati",syllables:3},{word:"que",syllables:1},{word:"flouer",syllables:2},{word:"relouer",syllables:3},{word:"évaluons",syllables:4},{word:"instituons",syllables:4},{word:"atténuons",syllables:4},{word:"remuons",syllables:3},{word:"redestribuons",syllables:5},{word:"suons",syllables:2},{word:"reconstituons",syllables:5},{word:"dent",syllables:1},{word:"fréquent",syllables:2},{word:"permanent",syllables:3},{word:"mécontent",syllables:3},{word:"grandiloquent",syllables:4},{word:"continent",syllables:3},{word:"occident",syllables:3},{word:"référent",syllables:3},{word:"indigent",syllables:3},{word:"concurrent",syllables:3},{word:"gent",syllables:1},{word:"différent",syllables:3},{word:"strident",syllables:2},{word:"équivalent",syllables:4},{word:"ardent",syllables:2},{word:"impotent",syllables:3},{word:"argent",syllables:2},{word:"immanent",syllables:3},{word:"indécent",syllables:3},{word:"effluent",syllables:3},{word:"agent",syllables:2},{word:"dolent",syllables:2},{word:"contingent",syllables:3},{word:"impénitent",syllables:4},{word:"adjacent",syllables:3},{word:"incident",syllables:3},{word:"content",syllables:2},{word:"incontinent",syllables:4},{word:"éloquent",syllables:3},{word:"convent",syllables:2},{word:"dissident",syllables:3},{word:"innocent",syllables:3},{word:"ventripotent",syllables:4},{word:"convalescent",syllables:4},{word:"accident",syllables:3},{word:"récent",syllables:2},{word:"absent",syllables:2},{word:"décadent",syllables:3},{word:"réticent",syllables:3},{word:"évent",syllables:2},{word:"souvent",syllables:2},{word:"intelligent",syllables:3},{word:"inhérent",syllables:3},{word:"adolescent",syllables:4},{word:"couvent",syllables:2},{word:"cent",syllables:1},{word:"urgent",syllables:2},{word:"précédent",syllables:3},{word:"imprudent",syllables:3},{word:"torrent",syllables:2},{word:"abstinent",syllables:3},{word:"indifférent",syllables:4},{word:"excédent",syllables:3},{word:"déférent",syllables:3},{word:"incandescent",syllables:4},{word:"intermittent",syllables:4},{word:"présent",syllables:3},{word:"astringent",syllables:3},{word:"trident",syllables:2},{word:"impertinent",syllables:4},{word:"détergent",syllables:3},{word:"évident",syllables:3},{word:"influent",syllables:3},{word:"pertinent",syllables:3},{word:"subséquent",syllables:3},{word:"féculent",syllables:3},{word:"déférent",syllables:3},{word:"ambivalent",syllables:4},{word:"omnipotent",syllables:4},{word:"décent",syllables:2},{word:"compétent",syllables:3},{word:"adhérent",syllables:3},{word:"afférent",syllables:3},{word:"luminescent",syllables:4},{word:"lent",syllables:1},{word:"apparent",syllables:3},{word:"effervescent",syllables:4},{word:"parent",syllables:2},{word:"pénitent",syllables:3},{word:"fluorescent",syllables:3},{word:"impudent",syllables:3},{word:"diligent",syllables:3},{word:"entregent",syllables:3},{word:"flatulent",syllables:3},{word:"serpent",syllables:2},{word:"violent",syllables:2},{word:"somnolent",syllables:3},{word:"déliquescent",syllables:4},{word:"proéminent",syllables:4},{word:"résident",syllables:3},{word:"putrescent",syllables:3},{word:"talent",syllables:2},{word:"spumescent",syllables:3},{word:"tangent",syllables:2},{word:"chiendent",syllables:2},{word:"négligent",syllables:3},{word:"antécédent",syllables:4},{word:"régent",syllables:2},{word:"polyvalent",syllables:4},{word:"latent",syllables:2},{word:"opulent",syllables:3},{word:"arpent",syllables:2},{word:"adent",syllables:2},{word:"concupiscent",syllables:4},{word:"sanguinolent",syllables:4},{word:"opalescent",syllables:4},{word:"prudent",syllables:2},{word:"conséquent",syllables:3},{word:"pourcent",syllables:2},{word:"transparent",syllables:3},{word:"sergent",syllables:2},{word:"diligent",syllables:3},{word:"inconséquent",syllables:4},{word:"turbulent",syllables:3},{word:"fervent",syllables:2},{word:"truculent",syllables:3},{word:"interférent",syllables:4},{word:"confluent",syllables:3},{word:"succulent",syllables:3},{word:"purulent",syllables:3},{word:"patent",syllables:2},{word:"indulgent",syllables:3},{word:"engoulevent",syllables:4},{word:"auvent",syllables:2},{word:"président",syllables:3},{word:"confident",syllables:3},{word:"incompétent",syllables:4},{word:"accent",syllables:2},{word:"arborescent",syllables:4},{word:"contrevent",syllables:3},{word:"cohérent",syllables:3},{word:"relent",syllables:2},{word:"insolent",syllables:3},{word:"virulent",syllables:3},{word:"rémanent",syllables:3},{word:"vent",syllables:1},{word:"turgescent",syllables:3},{word:"incohérent",syllables:4},{word:"malcontent",syllables:3},{word:"lactescent",syllables:3},{word:"inintelligent",syllables:5},{word:"omniprésent",syllables:4},{word:"récurrent",syllables:3},{word:"covalent",syllables:3},{word:"éminent",syllables:3},{word:"onguent",syllables:2},{word:"indolent",syllables:3},{word:"event",syllables:2},{word:"corpulent",syllables:3},{word:"divergent",syllables:3},{word:"excellent",syllables:3},{word:"phosphorescent",syllables:4},{word:"évanescent",syllables:4},{word:"paravent",syllables:3},{word:"avent",syllables:2},{word:"iridescent",syllables:4},{word:"prénomment",syllables:2},{word:"consument",syllables:2},{word:"dégomment",syllables:2},{word:"enveniment",syllables:3},{word:"proclament",syllables:2},{word:"chôment",syllables:1},{word:"infirment",syllables:2},{word:"briment",syllables:1},{word:"fument",syllables:1},{word:"acclament",syllables:2},{word:"referment",syllables:2},{word:"impriment",syllables:2},{word:"paument",syllables:1},{word:"déciment",syllables:2},{word:"accoutument",syllables:3},{word:"essaiment",syllables:2},{word:"ferment",syllables:1},{word:"dépriment",syllables:2},{word:"raniment",syllables:2},{word:"programment",syllables:2},{word:"fantasment",syllables:2},{word:"animent",syllables:2},{word:"affirment",syllables:2},{word:"filment",syllables:1},{word:"dament",syllables:1},{word:"parsèment",syllables:3},{word:"priment",syllables:1},{word:"assomment",syllables:2},{word:"rament",syllables:1},{word:"pâment",syllables:1},{word:"conforment",syllables:2},{word:"embaument",syllables:2},{word:"calment",syllables:1},{word:"blasphèment",syllables:2},{word:"désarment",syllables:2},{word:"consomment",syllables:2},{word:"griment",syllables:1},{word:"abîment",syllables:2},{word:"blâment",syllables:1},{word:"endorment",syllables:2},{word:"allument",syllables:2},{word:"blâment",syllables:1},{word:"confirment",syllables:2},{word:"escriment",syllables:2},{word:"trament",syllables:1},{word:"hument",syllables:1},{word:"surnomment",syllables:2},{word:"écument",syllables:2},{word:"triment",syllables:1},{word:"estiment",syllables:2},{word:"rallument",syllables:2},{word:"enflamment",syllables:2},{word:"riment",syllables:1},{word:"plument",syllables:1},{word:"suppriment",syllables:2},{word:"gomment",syllables:1},{word:"affament",syllables:2},{word:"friment",syllables:1},{word:"clament",syllables:1},{word:"dorment",syllables:1},{word:"dénomment",syllables:2},{word:"entament",syllables:2},{word:"arriment",syllables:2},{word:"résument",syllables:2},{word:"enrhument",syllables:2},{word:"rendorment",syllables:2},{word:"compriment",syllables:2},{word:"aiment",syllables:1},{word:"rythment",syllables:1},{word:"périment",syllables:2},{word:"réclament",syllables:2},{word:"subliment",syllables:2},{word:"brument",syllables:1},{word:"embrument",syllables:2},{word:"germent",syllables:1},{word:"renferment",syllables:2},{word:"sèment",syllables:1},{word:"reforment",syllables:2},{word:"liment",syllables:1},{word:"cament",syllables:1},{word:"parfument",syllables:2},{word:"arment",syllables:1},{word:"brament",syllables:1},{word:"déforment",syllables:2},{word:"assument",syllables:2},{word:"crament",syllables:1},{word:"exclament",syllables:2},{word:"forment",syllables:1},{word:"diffament",syllables:2},{word:"somment",syllables:1},{word:"oppriment",syllables:2},{word:"miment",syllables:1},{word:"enferment",syllables:2},{word:"nomment",syllables:1},{word:"reprogramment",syllables:3},{word:"transforment",syllables:2},{word:"expriment",syllables:2},{word:"informent",syllables:2},{word:"légitiment",syllables:3},{word:"de",syllables:1},{word:"le",syllables:1},{word:"je",syllables:1},{word:"te",syllables:1},{word:"ce",syllables:1},{word:"ne",syllables:1},{word:"re",syllables:1},{word:"me",syllables:1},{word:"se",syllables:1},{word:"ses",syllables:1},{word:"mes",syllables:1},{word:"mes",syllables:1},{word:"ces",syllables:1},{word:"des",syllables:1},{word:"tes",syllables:1},{word:"les",syllables:1},{word:"oye",syllables:1},{word:"es",syllables:1},{word:"remerciâmes",syllables:4},{word:"herniaires",syllables:3},{word:"autopsiais",syllables:4},{word:"août",syllables:1}],fragments:{global:[{word:"business",syllables:2},{word:"skate",syllables:1},{word:"board",syllables:1},{word:"coach",syllables:1},{word:"roadster",syllables:2},{word:"soap",syllables:1},{word:"goal",syllables:1},{word:"coaltar",syllables:2},{word:"loader",syllables:2},{word:"coat",syllables:1},{word:"baseball",syllables:2},{word:"foëne",syllables:1},{word:"cacaoyer",syllables:4},{word:"scoop",syllables:1},{word:"zoom",syllables:1},{word:"bazooka",syllables:3},{word:"tatoueu",syllables:3},{word:"cloueu",syllables:2},{word:"déchouer",syllables:2},{word:"écrouelles",syllables:3},{word:"maestria",syllables:3},{word:"maestro",syllables:3},{word:"vitae",syllables:3},{word:"paella",syllables:3},{word:"vae",syllables:2},{word:"thaï",syllables:1},{word:"skaï",syllables:1},{word:"masaï",syllables:2},{word:"samouraï",syllables:3},{word:"bonsaï",syllables:2},{word:"bonzaï",syllables:2},{word:"aïkido",syllables:3},{word:"daïquiri",syllables:3},{word:"pagaïe",syllables:2},{word:"chiite",syllables:2},{word:"pays",syllables:2},{word:"antiaérien",syllables:5},{word:"bleui",syllables:2},{word:"remerciai",syllables:4},{word:"monstrueu",syllables:3},{word:"niakoué",syllables:3},{word:"minoen",syllables:3},{word:"groenlandais",syllables:4},{word:"remerciant",syllables:4},{word:"skiant",syllables:2},{word:"ruade",syllables:2},{word:"weltanschauung",syllables:4}],atBeginning:[{word:"roast",syllables:1},{word:"taï",syllables:1}],atEnd:[{word:"écrouer",syllables:3},{word:"clouer",syllables:2}]}}}},Ef={vowels:"aeiouáéíóúü",deviations:{vowels:[{fragments:["i[ií]","[íú][aeo]","o[aáeéíóú]","uu","flu[iea]","ru[ie]","eio","eu[aá]","oi[aó]","[iu]ei","ui[éu]","^anti[aeoá]","^zoo","coo","microo"],countModifier:1},{fragments:["[eéó][aáeéíoóú]"],countModifier:1},{fragments:["[aáü][aáeéiíoóú]","eoi","oeu","[eu]au"],countModifier:1}],words:{full:[{word:"scooter",syllables:2},{word:"y",syllables:1},{word:"beat",syllables:1},{word:"via",syllables:2},{word:"ok",syllables:2}],fragments:{global:[{word:"business",syllables:2},{word:"coach",syllables:1},{word:"reggae",syllables:2},{word:"mail",syllables:1},{word:"airbag",syllables:2},{word:"affaire",syllables:2},{word:"training",syllables:2},{word:"hawaian",syllables:3},{word:"saharaui",syllables:3},{word:"nouveau",syllables:2},{word:"chapeau",syllables:2},{word:"free",syllables:1},{word:"green",syllables:1},{word:"jeep",syllables:1},{word:"toffee",syllables:2},{word:"tweet",syllables:1},{word:"tweed",syllables:1},{word:"semiautomátic",syllables:6},{word:"estadou",syllables:4},{word:"broadway",syllables:2},{word:"board",syllables:1},{word:"load",syllables:1},{word:"roaming",syllables:2},{word:"heavy",syllables:2},{word:"break",syllables:1}]}}}},Af={vowels:"aeiouáéíóúàâêôãõü",deviations:{vowels:[{fragments:["(gu|qu)[aeoáéíóúêã]"],countModifier:-1},{fragments:["[^(g|q|a)][aeiou][aeo]$"],countModifier:-1},{fragments:["[aeiouáéíóúàâêôü][aeo]","[aeiou][íúáéóãê]"],countModifier:1},{fragments:["aí[ae]"],countModifier:1}],words:{full:[{word:"delegacia",syllables:5},{word:"democracia",syllables:5},{word:"parceria",syllables:4},{word:"secretaria",syllables:5}],fragments:[]}}};const io={de:vf,nl:kf,en:hf,it:jf,ru:xf,fr:qf,es:Ef,pt:Af};function Tt(a="en_US"){const e=xa(a);return Object.prototype.hasOwnProperty.call(io,e)?io[e]:io.en}const oo=typeof window<"u"?window:typeof self<"u"?self:{};function Xe(a,e=!1,t="",i=""){let o,n;const r=["®","™","℠","©","℗"].join("");o=` \\u200B\\u00a0\\u06d4\\u061f\\u060C\\u061B\\n\\r\\t.,()”“〝〞〟‟„"+\\-;!¡?¿:/»«‹›${r}${t}<>`,i==="id_ID"&&(o=` \\u200B\\u00a0\\n\\r\\t.,()”“〝〞〟‟„"+;!¡?¿:/»«‹›${r}${t}<>`),oo&&oo.aioseoAnalyzer&&oo.aioseoAnalyzer.separator.split("").forEach(d=>{o+=`\\${d}`});const s=`(^|[${o}'‘’‛\`])`;return e?n=`($|((?=[${o}]))|((['‘’‛\`])([${o}])))`:n=`($|([${o}])|((['‘’‛\`])([${o}])))`,s+Ky(a)+n}function Pf(){return[{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}]}function Sf(a){const e=Pf();for(let t=0;t<e.length;t++)a=a.replace(e[t].letters,e[t].base);return a}function Ff(a){return a=oe(a),a=K(a),a}function L(a,e=!1,t="",i=!1){a=ea(a,function(n){return i&&(n=Sf(n)),n=Ff(n),e?n:Xe(n,!0,t)});const o="("+a.join(")|(")+")";return new RegExp(o,"ig")}const at=function(a){this._hasRegex=!1,this._regex="",this._multiplier="",this.createRegex(a)};at.prototype.hasRegex=function(){return this._hasRegex},at.prototype.createRegex=function(a){!M(a)&&!M(a.fragments)&&(this._hasRegex=!0,this._regex=L(a.fragments,!0),this._multiplier=a.countModifier)},at.prototype.getRegex=function(){return this._regex},at.prototype.countSyllables=function(a){return this._hasRegex?(a.match(this._regex)||[]).length*this._multiplier:0};const Bt=function(a){this.countSteps=[],M(a)||this.createSyllableCountSteps(a.deviations.vowels)};Bt.prototype.createSyllableCountSteps=function(a){$(a,(function(e){this.countSteps.push(new at(e))}).bind(this))},Bt.prototype.getAvailableSyllableCountSteps=function(){return this.countSteps},Bt.prototype.countSyllables=function(a){let e=0;return $(this.countSteps,function(t){e+=t.countSyllables(a)}),e};function fe(a){this._location=a.location,this._fragment=a.word,this._syllables=a.syllables,this._regex=null,this._options=$b(a,["notFollowedBy","alsoFollowedBy"])}fe.prototype.createRegex=function(){let a="",e=this._fragment;const t=this._options;switch(M(t.notFollowedBy)||(e+="(?!["+t.notFollowedBy.join("")+"])"),M(t.alsoFollowedBy)||(e+="["+t.alsoFollowedBy.join("")+"]?"),this._location){case"atBeginning":a="^"+e;break;case"atEnd":a=e+"$";break;case"atBeginningOrEnd":a="(^"+e+")|("+e+"$)";break;default:a=e;break}this._regex=new RegExp(a)},fe.prototype.getRegex=function(){return this._regex===null&&this.createRegex(),this._regex},fe.prototype.occursIn=function(a){return this.getRegex().test(a)},fe.prototype.removeFrom=function(a){return a.replace(this._fragment," ")},fe.prototype.getSyllables=function(){return this._syllables};const $f=function(a,e){let t=0;const i=new RegExp("[^"+Tt(e).vowels+"]","ig"),o=a.split(i),n=da(o,function(r){return r!==""});return t+=n.length,t},Cf=function(a,e){return new Bt(Tt(e)).countSyllables(a)},_f=function(a,e){const t=Tt(e).deviations.words.full,i=Qi(t,function(o){return o.word===a});return M(i)?0:i.syllables};function Df(a){let e=[];const t=a.deviations;return!M(t.words)&&!M(t.words.fragments)&&(e=Dt(t.words.fragments,function(i,o){return ea(i,function(n){return n.location=o,new fe(n)})})),e}const If=za(Df),Of=function(a,e){const t=If(Tt(e));let i=a,o=0;return $(t,function(n){n.occursIn(i)&&(i=n.removeFrom(i),o+=n.getSyllables())}),{word:i,syllableCount:o}},Tf=function(a,e){let t=0;return t+=$f(a,e),t+=Cf(a,e),t},Bf=function(a,e){let t=0;const i=_f(a,e);if(i!==0)return i;const o=Of(a,e);return a=o.word,t+=o.syllableCount,t+=Tf(a,e),t},Rf=function(a,e){a=a.toLocaleLowerCase();const t=na(a),i=ea(t,function(o){return Bf(o,e)});return _b(i)};function ve(a){return Math.round(a)===a?Math.round(a):Math.round(a*10)/10}const Wf=function(a,e){return a/e};function Mf(a,e){let t;const i=xa(e);if(a==="")return 0;a=Bb(a);const o=wf(a),n=Qe(a);if(o===0||n===0)return 0;const r=Rf(a,e),s=Wf(n,o),d=r*(100/n);switch(i){case"nl":t=206.84-.77*d-.93*s;break;case"de":t=180-s-58.5*r/n;break;case"it":t=217-1.3*s-.6*d;break;case"ru":t=206.835-1.3*n/o-60.1*r/n;break;case"es":t=206.84-1.02*n/o-.6*d;break;case"fr":t=207-1.015*n/o-73.6*r/n;break;case"pt":t=248.835-1.015*s-84.6*r/n;break;case"en":default:t=206.835-1.015*s-84.6*(r/n);break}return ve(t)}function Lf(a,e){const t=xa(a);return-1<zb(e,t)}function Nf(a,e){var t=0,i,o;e=e||{};function n(){var r=i,s=arguments.length,d,l;a:for(;r;){if(r.args.length!==arguments.length){r=r.next;continue}for(l=0;l<s;l++)if(r.args[l]!==arguments[l]){r=r.next;continue a}return r!==i&&(r===o&&(o=r.prev),r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=i,r.prev=null,i.prev=r,i=r),r.val}for(d=new Array(s),l=0;l<s;l++)d[l]=arguments[l];return r={args:d,val:a.apply(null,d)},i?(i.prev=r,r.next=i):o=r,t===e.maxSize?(o=o.prev,o.next=null):t++,i=r,r.val}return n.clear=function(){i=null,o=null,t=0},n}var cd={};(function(a){(function(){var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(s){return o(r(s),arguments)}function i(s,d){return t.apply(null,[s].concat(d||[]))}function o(s,d){var l=1,c=s.length,u,p="",m,y,w,x,C,v,h,g;for(m=0;m<c;m++)if(typeof s[m]=="string")p+=s[m];else if(typeof s[m]=="object"){if(w=s[m],w.keys)for(u=d[l],y=0;y<w.keys.length;y++){if(u==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',w.keys[y],w.keys[y-1]));u=u[w.keys[y]]}else w.param_no?u=d[w.param_no]:u=d[l++];if(e.not_type.test(w.type)&&e.not_primitive.test(w.type)&&u instanceof Function&&(u=u()),e.numeric_arg.test(w.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(t("[sprintf] expecting number but found %T",u));switch(e.number.test(w.type)&&(h=u>=0),w.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,w.width?parseInt(w.width):0);break;case"e":u=w.precision?parseFloat(u).toExponential(w.precision):parseFloat(u).toExponential();break;case"f":u=w.precision?parseFloat(u).toFixed(w.precision):parseFloat(u);break;case"g":u=w.precision?String(Number(u.toPrecision(w.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=w.precision?u.substring(0,w.precision):u;break;case"t":u=String(!!u),u=w.precision?u.substring(0,w.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=w.precision?u.substring(0,w.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=w.precision?u.substring(0,w.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}e.json.test(w.type)?p+=u:(e.number.test(w.type)&&(!h||w.sign)?(g=h?"+":"-",u=u.toString().replace(e.sign,"")):g="",C=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",v=w.width-(g+u).length,x=w.width&&v>0?C.repeat(v):"",p+=w.align?g+u+x:C==="0"?g+x+u:x+g+u)}return p}var n=Object.create(null);function r(s){if(n[s])return n[s];for(var d=s,l,c=[],u=0;d;){if((l=e.text.exec(d))!==null)c.push(l[0]);else if((l=e.modulo.exec(d))!==null)c.push("%");else if((l=e.placeholder.exec(d))!==null){if(l[2]){u|=1;var p=[],m=l[2],y=[];if((y=e.key.exec(m))!==null)for(p.push(y[1]);(m=m.substring(y[0].length))!=="";)if((y=e.key_access.exec(m))!==null)p.push(y[1]);else if((y=e.index_access.exec(m))!==null)p.push(y[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=p}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");d=d.substring(l[0].length)}return n[s]=c}a.sprintf=t,a.vsprintf=i,typeof window<"u"&&(window.sprintf=t,window.vsprintf=i)})()})(cd);var Uf=ed(cd);const Hf=Nf(console.error);function D(a,...e){try{return Uf.sprintf(a,...e)}catch(t){return t instanceof Error&&Hf(`sprintf error:
`+t.toString()),a}}var no,ud,et,pd;no={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},ud=["(","?"],et={")":["("],":":["?","?:"]},pd=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function Gf(a){for(var e=[],t=[],i,o,n,r;i=a.match(pd);){for(o=i[0],n=a.substr(0,i.index).trim(),n&&e.push(n);r=t.pop();){if(et[o]){if(et[o][0]===r){o=et[o][1]||o;break}}else if(ud.indexOf(r)>=0||no[r]<no[o]){t.push(r);break}e.push(r)}et[o]||t.push(o),a=a.substr(i.index+o.length)}return a=a.trim(),a&&e.push(a),e.concat(t.reverse())}var Vf={"!":function(a){return!a},"*":function(a,e){return a*e},"/":function(a,e){return a/e},"%":function(a,e){return a%e},"+":function(a,e){return a+e},"-":function(a,e){return a-e},"<":function(a,e){return a<e},"<=":function(a,e){return a<=e},">":function(a,e){return a>e},">=":function(a,e){return a>=e},"==":function(a,e){return a===e},"!=":function(a,e){return a!==e},"&&":function(a,e){return a&&e},"||":function(a,e){return a||e},"?:":function(a,e,t){if(a)throw e;return t}};function Kf(a,e){var t=[],i,o,n,r,s,d;for(i=0;i<a.length;i++){if(s=a[i],r=Vf[s],r){for(o=r.length,n=Array(o);o--;)n[o]=t.pop();try{d=r.apply(null,n)}catch(l){return l}}else e.hasOwnProperty(s)?d=e[s]:d=+s;t.push(d)}return t[0]}function Zf(a){var e=Gf(a);return function(t){return Kf(e,t)}}function Yf(a){var e=Zf(a);return function(t){return+e({n:t})}}var zd={contextDelimiter:"",onMissingKey:null};function Jf(a){var e,t,i;for(e=a.split(";"),t=0;t<e.length;t++)if(i=e[t].trim(),i.indexOf("plural=")===0)return i.substr(7)}function ro(a,e){var t;this.data=a,this.pluralForms={},this.options={};for(t in zd)this.options[t]=e!==void 0&&t in e?e[t]:zd[t]}ro.prototype.getPluralForm=function(a,e){var t=this.pluralForms[a],i,o,n;return t||(i=this.data[a][""],n=i["Plural-Forms"]||i["plural-forms"]||i.plural_forms,typeof n!="function"&&(o=Jf(i["Plural-Forms"]||i["plural-forms"]||i.plural_forms),n=Yf(o)),t=this.pluralForms[a]=n),t(e)},ro.prototype.dcnpgettext=function(a,e,t,i,o){var n,r,s;return o===void 0?n=0:n=this.getPluralForm(a,o),r=t,e&&(r=e+this.options.contextDelimiter+t),s=this.data[a][r],s&&s[n]?s[n]:(this.options.onMissingKey&&this.options.onMissingKey(t,a),n===0?t:i)};const md={"":{plural_forms(a){return a===1?0:1}}},Qf=/^i18n\.(n?gettext|has_translation)(_|$)/,Xf=(a,e,t)=>{const i=new ro({}),o=new Set,n=()=>{o.forEach(g=>g())},r=g=>(o.add(g),()=>o.delete(g)),s=(g="default")=>i.data[g],d=(g,b="default")=>{var j;i.data[b]={...i.data[b],...g},i.data[b][""]={...md[""],...(j=i.data[b])==null?void 0:j[""]},delete i.pluralForms[b]},l=(g,b)=>{d(g,b),n()},c=(g,b="default")=>{var j;i.data[b]={...i.data[b],...g,"":{...md[""],...(j=i.data[b])==null?void 0:j[""],...g==null?void 0:g[""]}},delete i.pluralForms[b],n()},u=(g,b)=>{i.data={},i.pluralForms={},l(g,b)},p=(g="default",b,j,S,E)=>(i.data[g]||d(void 0,g),i.dcnpgettext(g,b,j,S,E)),m=(g="default")=>g,y=(g,b)=>{let j=p(b,void 0,g);return t?(j=t.applyFilters("i18n.gettext",j,g,b),t.applyFilters("i18n.gettext_"+m(b),j,g,b)):j},w=(g,b,j)=>{let S=p(j,b,g);return t?(S=t.applyFilters("i18n.gettext_with_context",S,g,b,j),t.applyFilters("i18n.gettext_with_context_"+m(j),S,g,b,j)):S},x=(g,b,j,S)=>{let E=p(S,void 0,g,b,j);return t?(E=t.applyFilters("i18n.ngettext",E,g,b,j,S),t.applyFilters("i18n.ngettext_"+m(S),E,g,b,j,S)):E},C=(g,b,j,S,E)=>{let _=p(E,S,g,b,j);return t?(_=t.applyFilters("i18n.ngettext_with_context",_,g,b,j,S,E),t.applyFilters("i18n.ngettext_with_context_"+m(E),_,g,b,j,S,E)):_},v=()=>w("ltr","text direction")==="rtl",h=(g,b,j)=>{var _,R;const S=b?b+""+g:g;let E=!!((R=(_=i.data)==null?void 0:_[j??"default"])!=null&&R[S]);return t&&(E=t.applyFilters("i18n.has_translation",E,g,b,j),E=t.applyFilters("i18n.has_translation_"+m(j),E,g,b,j)),E};if(t){const g=b=>{Qf.test(b)&&n()};t.addAction("hookAdded","core/i18n",g),t.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:s,setLocaleData:l,addLocaleData:c,resetLocaleData:u,subscribe:r,__:y,_x:w,_n:x,_nx:C,isRTL:v,hasTranslation:h}};function gd(a){return typeof a!="string"||a===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(a)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function so(a){return typeof a!="string"||a===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(a)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(a)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function wd(a,e){return function(i,o,n,r=10){const s=a[e];if(!so(i)||!gd(o))return;if(typeof n!="function"){console.error("The hook callback must be a function.");return}if(typeof r!="number"){console.error("If specified, the hook priority must be a number.");return}const d={callback:n,priority:r,namespace:o};if(s[i]){const l=s[i].handlers;let c;for(c=l.length;c>0&&!(r>=l[c-1].priority);c--);c===l.length?l[c]=d:l.splice(c,0,d),s.__current.forEach(u=>{u.name===i&&u.currentIndex>=c&&u.currentIndex++})}else s[i]={handlers:[d],runs:0};i!=="hookAdded"&&a.doAction("hookAdded",i,o,n,r)}}function Rt(a,e,t=!1){return function(o,n){const r=a[e];if(!so(o)||!t&&!gd(n))return;if(!r[o])return 0;let s=0;if(t)s=r[o].handlers.length,r[o]={runs:r[o].runs,handlers:[]};else{const d=r[o].handlers;for(let l=d.length-1;l>=0;l--)d[l].namespace===n&&(d.splice(l,1),s++,r.__current.forEach(c=>{c.name===o&&c.currentIndex>=l&&c.currentIndex--}))}return o!=="hookRemoved"&&a.doAction("hookRemoved",o,n),s}}function yd(a,e){return function(i,o){const n=a[e];return typeof o<"u"?i in n&&n[i].handlers.some(r=>r.namespace===o):i in n}}function bd(a,e,t=!1){return function(o,...n){const r=a[e];r[o]||(r[o]={handlers:[],runs:0}),r[o].runs++;const s=r[o].handlers;if(!s||!s.length)return t?n[0]:void 0;const d={name:o,currentIndex:0};for(r.__current.push(d);d.currentIndex<s.length;){const c=s[d.currentIndex].callback.apply(null,n);t&&(n[0]=c),d.currentIndex++}if(r.__current.pop(),t)return n[0]}}function fd(a,e){return function(){var n;var i;const o=a[e];return(i=(n=o.__current[o.__current.length-1])==null?void 0:n.name)!==null&&i!==void 0?i:null}}function vd(a,e){return function(i){const o=a[e];return typeof i>"u"?typeof o.__current[0]<"u":o.__current[0]?i===o.__current[0].name:!1}}function hd(a,e){return function(i){const o=a[e];if(so(i))return o[i]&&o[i].runs?o[i].runs:0}}class av{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=wd(this,"actions"),this.addFilter=wd(this,"filters"),this.removeAction=Rt(this,"actions"),this.removeFilter=Rt(this,"filters"),this.hasAction=yd(this,"actions"),this.hasFilter=yd(this,"filters"),this.removeAllActions=Rt(this,"actions",!0),this.removeAllFilters=Rt(this,"filters",!0),this.doAction=bd(this,"actions"),this.applyFilters=bd(this,"filters",!0),this.currentAction=fd(this,"actions"),this.currentFilter=fd(this,"filters"),this.doingAction=vd(this,"actions"),this.doingFilter=vd(this,"filters"),this.didAction=hd(this,"actions"),this.didFilter=hd(this,"filters")}}function ev(){return new av}const tv=ev(),N=Xf(void 0,void 0,tv);N.getLocaleData.bind(N),N.setLocaleData.bind(N),N.resetLocaleData.bind(N),N.subscribe.bind(N);const z=N.__.bind(N);N._x.bind(N);const iv=N._n.bind(N);N._nx.bind(N),N.isRTL.bind(N),N.hasTranslation.bind(N);const ne="all-in-one-seo-pack",ov=["en","nl","de","it","ru","fr","es","pt"],ga={veryEasy:90,easy:80,fairlyEasy:70,okay:60,fairlyDifficult:50,difficult:30,veryDifficult:0},Ga={veryEasy:9,easy:9,fairlyEasy:9,okay:9,fairlyDifficult:6,difficult:3,veryDifficult:3};function nv(a,e){if(!a)return{};let t=Mf(a,e);if(Lf(e,ov)){0>t&&(t=0),100<t&&(t=100);let o=0,n="",r=z("Good job!",ne);return t>=ga.veryEasy?(o=Ga.veryEasy,n=z("very easy",ne)):la(t,ga.easy,ga.veryEasy)?(o=Ga.easy,n="easy"):la(t,ga.fairlyEasy,ga.easy)?(o=Ga.fairlyEasy,n="fairly easy"):la(t,ga.okay,ga.fairlyEasy)?(o=Ga.okay,n="ok"):la(t,ga.fairlyDifficult,ga.okay)?(o=Ga.fairlyDifficult,n="fairly difficult",r="Try to make shorter sentences to improve readability."):la(t,ga.difficult,ga.fairlyDifficult)?(o=Ga.difficult,n="difficult",r="Try to make shorter sentences, using less difficult words to improve readability."):(o=Ga.veryDifficult,n="very difficult",r="Try to make shorter sentences, using less difficult words to improve readability."),o>=Ga.okay?{title:z("Flesch reading ease",ne),description:D(z("The copy scores %1$s in the test, which is considered %2$s to read.",ne),t,n),score:o,maxScore:9,error:0}:{title:z("Flesch reading ease",ne),description:D(z("The copy scores %1$s in the test, which is considered %2$s to read. %3$s",ne),t,n,r),score:o,maxScore:9,error:1}}return{title:z("Flesch reading ease N/A",ne),description:":-)",score:0,maxScore:0,error:1}}function kd(){return["the","a","an","one","two","three","four","five","six","seven","eight","nine","ten","this","that","these","those","step"]}function rv(){return["das","dem","den","der","des","die","ein","eine","einem","einen","einer","eines","eins","zwei","drei","vier","fünf","sechs","sieben","acht","neun","zehn","denen","deren","derer","dessen","diese","diesem","diesen","dieser","dieses","jene","jenem","jenen","jener","jenes","welch","welcher","welches"]}function sv(){return["el","los","la","las","un","una","unas","unos","uno","dos","tres","cuatro","cinco","seis","siete","ocho","nueve","diez","este","estos","esta","estas","ese","esos","esa","esas","aquel","aquellos","aquella","aquellas","esto","eso","aquello"]}function dv(){return["le","la","les","un","une","deux","trois","quatre","cinq","six","sept","huit","neuf","dix","celui","celle","ceux","celles","celui-ci","celle-là","celui-là","celle-ci"]}function lv(){return["de","het","een","één","eén","twee","drie","vier","vijf","zes","zeven","acht","negen","tien","dit","dat","die","deze"]}function cv(){return["il","lo","la","i","gli","le","uno","un","una","due","tre","quattro","cinque","sei","sette","otto","nove","dieci","questo","questa","quello","quella","questi","queste","quelli","quelle","codesto","codesti","codesta","codeste"]}function uv(){return["один","одна","одно","два","две","три","четыре","пять","шесть","семь","восемь","девять","десять","этот","этого","этому","этим","этом","эта","этой","эту","это","этого","этому","эти","этих","этим","этими","тот","того","тому","тем","том","та","той","ту","те","тех","тем","теми","тех","такой","такого","такому","таким","такая","такую","такое","такие","таких","таким","такими","стольких","стольким","столько","столькими","вот"]}function pv(){return["jeden","jedna","jedno","dwa","dwie","trzy","cztery","pięć","sześć","siedem","osiem","dziewięć","dziesięć","ta","to","ten","te","ci","taki","tacy","taka","taką","takich","takie","takiego","takiej","takiemu","takim","takimi","tamten","tamta","tamto","tamci","tamte","tamtą","tamtego","tamtej","tamtemu","tamtych","tamtym","tamtymi","tą","tę","tego","tej","temu","tych","tymi","tym","tak"]}function zv(){return["ett","det","den","de","en","två","tre","fyra","fem","sex","sju","åtta","nio","tio","denne","denna","detta","dessa"]}function mv(){return["o","a","os","as","um","uma","uns","umas","um","dois","três","quatro","cinco","seis","sete","oito","nove","dez","este","estes","esta","estas","esse","esses","essa","essas","aquele","aqueles","aquela","aquelas","isto","isso","aquilo"]}function gv(){return["sebuah","seorang","sang","si","satu","dua","tiga","empat","lima","enam","tujuh","delapan","sembilan","sepuluh","sebelas","seratus","seribu","sejuta","semiliar","setriliun","ini","itu","hal","ia"]}function wv(){return["قليل","بعض","واحد","واحد","إثنان","ثلاثة","أربعة","خمسة","ستة","سبعة","ثمانية","تسعة","عشرة","هذا","هذه","ذلك","تلك","هذين","هذان","هتين","هتان","هؤلا","أولائك","هؤلاء"]}function yv(a){const e={en:kd,de:rv,fr:dv,es:sv,nl:lv,it:cv,ru:uv,pl:pv,sv:zv,pt:mv,id:gv,ar:wv};return Object.keys(e).includes(xa(a))?e[xa(a)]:kd}function bv(a){return Je(a)}const fv=function(a,e){return!Ha(a)&&a===e},vv=function(a,e){const t=[];let i=[],o=1;return $(a,function(n,r){const s=n,d=a[r+1];i.push(e[r]),fv(s,d)?o++:(t.push({word:s,count:o,sentences:i}),o=1,i=[])}),t};function hv(a,e){const t=na(oe(K(a)));if(t.length===0)return"";let i=t[0].toLocaleLowerCase();return-1<e.indexOf(i)&&1<t.length&&(i+=" "+t[1]),i}function kv(a,e){const t=yv(e)();let i=bv(a),o=i.map(function(n){return hv(n,t)});return i=i.filter(function(n){return 0<na(K(n)).length}),o=da(o),vv(o,i)}const Wt="all-in-one-seo-pack";function jv(a){const[e]=Sb(a,t=>2<t.count);return e.length===0?{total:0}:{total:e.length,lowestCount:Math.min(...e.map(t=>t.count)),sentenceResults:e.map(t=>t.sentences)}}function xv(a,e){if(!a)return{};const t=[],i=jv(kv(a,e));return 0<i.total?(Array.isArray(i.sentenceResults)&&i.sentenceResults.length&&t.push(...i.sentenceResults),{title:z("Consecutive sentences",Wt),description:D(z("The text contains at least %1$d consecutive sentences starting with the same word. Try to mix things up!",Wt),i.lowestCount),score:3,maxScore:9,error:1,highlightSentences:t}):{title:z("Consecutive sentences",Wt),description:z("There is enough variety in your sentences. That's great!",Wt),score:9,maxScore:9,error:0,highlightSentences:t}}const he="all-in-one-seo-pack";function qv(a){return a=typeof a=="string"?a:a instanceof HTMLImageElement?a.outerHTML:(a==null?void 0:a.innerHTML)||"",[].concat(ke(a,"<img(?:[^>]+)?>"),ke(a,"\\[gallery( [^\\]]+?)?\\]")).length}function Ev(a){return a=typeof a=="string"?a:a instanceof HTMLIFrameElement||a instanceof HTMLVideoElement?a.outerHTML:(a==null?void 0:a.innerHTML)||"",[].concat(ke(a,"<iframe(?:[^>]+)?>"),ke(a,"\\[video( [^\\]]+?)?\\]"),ke(a,"<video(?:[^>]+)?>"),ke(a,/(http:\/\/|https:\/\/|)(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/)).length}function ke(a,e){const t=new RegExp(e,"ig"),i=a.match(t);return i===null?[]:i}function Av(a){if(!a)return{error:1,title:z("No content yet",he),description:z("Please add some content first.",he),score:1,maxScore:5};const e=qv(a),t=Ev(a);return 0<e||0<t?{error:0,title:z("Images/videos in content",he),description:z("Your content contains images and/or video(s).",he),score:5,maxScore:5}:{error:1,title:z("Images/videos in content",he),description:z("You are not using rich media like images or videos.",he),score:1,maxScore:5}}var re={},Mt={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Mt.exports,function(a,e){(function(t){var i=e&&!e.nodeType&&e,o=a&&!a.nodeType&&a,n=typeof Ye=="object"&&Ye;(n.global===n||n.window===n||n.self===n)&&(t=n);var r,s=2147483647,d=36,l=1,c=26,u=38,p=700,m=72,y=128,w="-",x=/^xn--/,C=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=d-l,b=Math.floor,j=String.fromCharCode,S;function E(k){throw new RangeError(h[k])}function _(k,q){for(var F=k.length,T=[];F--;)T[F]=q(k[F]);return T}function R(k,q){var F=k.split("@"),T="";F.length>1&&(T=F[0]+"@",k=F[1]),k=k.replace(v,".");var W=k.split("."),oa=_(W,q).join(".");return T+oa}function wa(k){for(var q=[],F=0,T=k.length,W,oa;F<T;)W=k.charCodeAt(F++),W>=55296&&W<=56319&&F<T?(oa=k.charCodeAt(F++),(oa&64512)==56320?q.push(((W&1023)<<10)+(oa&1023)+65536):(q.push(W),F--)):q.push(W);return q}function ya(k){return _(k,function(q){var F="";return q>65535&&(q-=65536,F+=j(q>>>10&1023|55296),q=56320|q&1023),F+=j(q),F}).join("")}function V(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:d}function ta(k,q){return k+22+75*(k<26)-((q!=0)<<5)}function ia(k,q,F){var T=0;for(k=F?b(k/p):k>>1,k+=b(k/q);k>g*c>>1;T+=d)k=b(k/g);return b(T+(g+1)*k/(k+u))}function ra(k){var q=[],F=k.length,T,W=0,oa=y,Y=m,sa,ba,_a,Ma,X,pa,fa,ae,me;for(sa=k.lastIndexOf(w),sa<0&&(sa=0),ba=0;ba<sa;++ba)k.charCodeAt(ba)>=128&&E("not-basic"),q.push(k.charCodeAt(ba));for(_a=sa>0?sa+1:0;_a<F;){for(Ma=W,X=1,pa=d;_a>=F&&E("invalid-input"),fa=V(k.charCodeAt(_a++)),(fa>=d||fa>b((s-W)/X))&&E("overflow"),W+=fa*X,ae=pa<=Y?l:pa>=Y+c?c:pa-Y,!(fa<ae);pa+=d)me=d-ae,X>b(s/me)&&E("overflow"),X*=me;T=q.length+1,Y=ia(W-Ma,T,Ma==0),b(W/T)>s-oa&&E("overflow"),oa+=b(W/T),W%=T,q.splice(W++,0,oa)}return ya(q)}function Xa(k){var q,F,T,W,oa,Y,sa,ba,_a,Ma,X,pa=[],fa,ae,me,Nr;for(k=wa(k),fa=k.length,q=y,F=0,oa=m,Y=0;Y<fa;++Y)X=k[Y],X<128&&pa.push(j(X));for(T=W=pa.length,W&&pa.push(w);T<fa;){for(sa=s,Y=0;Y<fa;++Y)X=k[Y],X>=q&&X<sa&&(sa=X);for(ae=T+1,sa-q>b((s-F)/ae)&&E("overflow"),F+=(sa-q)*ae,q=sa,Y=0;Y<fa;++Y)if(X=k[Y],X<q&&++F>s&&E("overflow"),X==q){for(ba=F,_a=d;Ma=_a<=oa?l:_a>=oa+c?c:_a-oa,!(ba<Ma);_a+=d)Nr=ba-Ma,me=d-Ma,pa.push(j(ta(Ma+Nr%me,0))),ba=b(Nr/me);pa.push(j(ta(ba,0))),oa=ia(F,ae,T==W),F=0,++T}++F,++q}return pa.join("")}function Lr(k){return R(k,function(q){return x.test(q)?ra(q.slice(4).toLowerCase()):q})}function Ci(k){return R(k,function(q){return C.test(q)?"xn--"+Xa(q):q})}if(r={version:"1.4.1",ucs2:{decode:wa,encode:ya},decode:ra,encode:Xa,toASCII:Ci,toUnicode:Lr},i&&o)if(a.exports==i)o.exports=r;else for(S in r)r.hasOwnProperty(S)&&(i[S]=r[S]);else t.punycode=r})(Ye)}(Mt,Mt.exports);var Pv=Mt.exports,Sv=Error,Fv=EvalError,$v=RangeError,Cv=ReferenceError,jd=SyntaxError,tt=TypeError,_v=URIError,Dv=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var n=Object.getOwnPropertySymbols(e);if(n.length!==1||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(e,t);if(r.value!==o||r.enumerable!==!0)return!1}return!0},xd=typeof Symbol<"u"&&Symbol,Iv=Dv,Ov=function(){return typeof xd!="function"||typeof Symbol!="function"||typeof xd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Iv()},lo={__proto__:null,foo:{}},Tv=Object,Bv=function(){return{__proto__:lo}.foo===lo.foo&&!(lo instanceof Tv)},Rv="Function.prototype.bind called on incompatible ",Wv=Object.prototype.toString,Mv=Math.max,Lv="[object Function]",qd=function(e,t){for(var i=[],o=0;o<e.length;o+=1)i[o]=e[o];for(var n=0;n<t.length;n+=1)i[n+e.length]=t[n];return i},Nv=function(e,t){for(var i=[],o=t,n=0;o<e.length;o+=1,n+=1)i[n]=e[o];return i},Uv=function(a,e){for(var t="",i=0;i<a.length;i+=1)t+=a[i],i+1<a.length&&(t+=e);return t},Hv=function(e){var t=this;if(typeof t!="function"||Wv.apply(t)!==Lv)throw new TypeError(Rv+t);for(var i=Nv(arguments,1),o,n=function(){if(this instanceof o){var c=t.apply(this,qd(i,arguments));return Object(c)===c?c:this}return t.apply(e,qd(i,arguments))},r=Mv(0,t.length-i.length),s=[],d=0;d<r;d++)s[d]="$"+d;if(o=Function("binder","return function ("+Uv(s,",")+"){ return binder.apply(this,arguments); }")(n),t.prototype){var l=function(){};l.prototype=t.prototype,o.prototype=new l,l.prototype=null}return o},Gv=Hv,co=Function.prototype.bind||Gv,Vv=Function.prototype.call,Kv=Object.prototype.hasOwnProperty,Zv=co,Yv=Zv.call(Vv,Kv),A,Jv=Sv,Qv=Fv,Xv=$v,ah=Cv,je=jd,xe=tt,eh=_v,Ed=Function,uo=function(a){try{return Ed('"use strict"; return ('+a+").constructor;")()}catch{}},se=Object.getOwnPropertyDescriptor;if(se)try{se({},"")}catch{se=null}var po=function(){throw new xe},th=se?function(){try{return arguments.callee,po}catch{try{return se(arguments,"callee").get}catch{return po}}}():po,qe=Ov(),ih=Bv(),Z=Object.getPrototypeOf||(ih?function(a){return a.__proto__}:null),Ee={},oh=typeof Uint8Array>"u"||!Z?A:Z(Uint8Array),de={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?A:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&Z?Z([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Ee,"%AsyncGenerator%":Ee,"%AsyncGeneratorFunction%":Ee,"%AsyncIteratorPrototype%":Ee,"%Atomics%":typeof Atomics>"u"?A:Atomics,"%BigInt%":typeof BigInt>"u"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jv,"%eval%":eval,"%EvalError%":Qv,"%Float32Array%":typeof Float32Array>"u"?A:Float32Array,"%Float64Array%":typeof Float64Array>"u"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?A:FinalizationRegistry,"%Function%":Ed,"%GeneratorFunction%":Ee,"%Int8Array%":typeof Int8Array>"u"?A:Int8Array,"%Int16Array%":typeof Int16Array>"u"?A:Int16Array,"%Int32Array%":typeof Int32Array>"u"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&Z?Z(Z([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map>"u"?A:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe||!Z?A:Z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?A:Promise,"%Proxy%":typeof Proxy>"u"?A:Proxy,"%RangeError%":Xv,"%ReferenceError%":ah,"%Reflect%":typeof Reflect>"u"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?A:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe||!Z?A:Z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&Z?Z(""[Symbol.iterator]()):A,"%Symbol%":qe?Symbol:A,"%SyntaxError%":je,"%ThrowTypeError%":th,"%TypedArray%":oh,"%TypeError%":xe,"%Uint8Array%":typeof Uint8Array>"u"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?A:Uint32Array,"%URIError%":eh,"%WeakMap%":typeof WeakMap>"u"?A:WeakMap,"%WeakRef%":typeof WeakRef>"u"?A:WeakRef,"%WeakSet%":typeof WeakSet>"u"?A:WeakSet};if(Z)try{null.error}catch(a){var nh=Z(Z(a));de["%Error.prototype%"]=nh}var rh=function a(e){var t;if(e==="%AsyncFunction%")t=uo("async function () {}");else if(e==="%GeneratorFunction%")t=uo("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=uo("async function* () {}");else if(e==="%AsyncGenerator%"){var i=a("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=a("%AsyncGenerator%");o&&Z&&(t=Z(o.prototype))}return de[e]=t,t},Ad={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},it=co,Lt=Yv,sh=it.call(Function.call,Array.prototype.concat),dh=it.call(Function.apply,Array.prototype.splice),Pd=it.call(Function.call,String.prototype.replace),Nt=it.call(Function.call,String.prototype.slice),lh=it.call(Function.call,RegExp.prototype.exec),ch=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uh=/\\(\\)?/g,ph=function(e){var t=Nt(e,0,1),i=Nt(e,-1);if(t==="%"&&i!=="%")throw new je("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new je("invalid intrinsic syntax, expected opening `%`");var o=[];return Pd(e,ch,function(n,r,s,d){o[o.length]=s?Pd(d,uh,"$1"):r||n}),o},zh=function(e,t){var i=e,o;if(Lt(Ad,i)&&(o=Ad[i],i="%"+o[0]+"%"),Lt(de,i)){var n=de[i];if(n===Ee&&(n=rh(i)),typeof n>"u"&&!t)throw new xe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:i,value:n}}throw new je("intrinsic "+e+" does not exist!")},Ae=function(e,t){if(typeof e!="string"||e.length===0)throw new xe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new xe('"allowMissing" argument must be a boolean');if(lh(/^%?[^%]*%?$/,e)===null)throw new je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=ph(e),o=i.length>0?i[0]:"",n=zh("%"+o+"%",t),r=n.name,s=n.value,d=!1,l=n.alias;l&&(o=l[0],dh(i,sh([0,1],l)));for(var c=1,u=!0;c<i.length;c+=1){var p=i[c],m=Nt(p,0,1),y=Nt(p,-1);if((m==='"'||m==="'"||m==="`"||y==='"'||y==="'"||y==="`")&&m!==y)throw new je("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(d=!0),o+="."+p,r="%"+o+"%",Lt(de,r))s=de[r];else if(s!=null){if(!(p in s)){if(!t)throw new xe("base intrinsic for "+e+" exists, but the property is not available.");return}if(se&&c+1>=i.length){var w=se(s,p);u=!!w,u&&"get"in w&&!("originalValue"in w.get)?s=w.get:s=s[p]}else u=Lt(s,p),s=s[p];u&&!d&&(de[r]=s)}}return s},Sd={exports:{}},zo,Fd;function mo(){if(Fd)return zo;Fd=1;var a=Ae,e=a("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return zo=e,zo}var mh=Ae,Ut=mh("%Object.getOwnPropertyDescriptor%",!0);if(Ut)try{Ut([],"length")}catch{Ut=null}var $d=Ut,Cd=mo(),gh=jd,Pe=tt,_d=$d,wh=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Pe("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Pe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Pe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Pe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Pe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Pe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,r=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,d=!!_d&&_d(e,t);if(Cd)Cd(e,t,{configurable:r===null&&d?d.configurable:!r,enumerable:o===null&&d?d.enumerable:!o,value:i,writable:n===null&&d?d.writable:!n});else if(s||!o&&!n&&!r)e[t]=i;else throw new gh("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},go=mo(),Dd=function(){return!!go};Dd.hasArrayLengthDefineBug=function(){if(!go)return null;try{return go([],"length",{value:1}).length!==1}catch{return!0}};var yh=Dd,bh=Ae,Id=wh,fh=yh(),Od=$d,Td=tt,vh=bh("%Math.floor%"),hh=function(e,t){if(typeof e!="function")throw new Td("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||vh(t)!==t)throw new Td("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],o=!0,n=!0;if("length"in e&&Od){var r=Od(e,"length");r&&!r.configurable&&(o=!1),r&&!r.writable&&(n=!1)}return(o||n||!i)&&(fh?Id(e,"length",t,!0,!0):Id(e,"length",t)),e};(function(a){var e=co,t=Ae,i=hh,o=tt,n=t("%Function.prototype.apply%"),r=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(r,n),d=mo(),l=t("%Math.max%");a.exports=function(p){if(typeof p!="function")throw new o("a function is required");var m=s(e,r,arguments);return i(m,1+l(0,p.length-(arguments.length-1)),!0)};var c=function(){return s(e,n,arguments)};d?d(a.exports,"apply",{value:c}):a.exports.apply=c})(Sd);var kh=Sd.exports,Bd=Ae,Rd=kh,jh=Rd(Bd("String.prototype.indexOf")),xh=function(e,t){var i=Bd(e,!!t);return typeof i=="function"&&jh(e,".prototype.")>-1?Rd(i):i},qh={},Eh=Object.freeze({__proto__:null,default:qh}),Ah=Rb(Eh),wo=typeof Map=="function"&&Map.prototype,yo=Object.getOwnPropertyDescriptor&&wo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ht=wo&&yo&&typeof yo.get=="function"?yo.get:null,Wd=wo&&Map.prototype.forEach,bo=typeof Set=="function"&&Set.prototype,fo=Object.getOwnPropertyDescriptor&&bo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gt=bo&&fo&&typeof fo.get=="function"?fo.get:null,Md=bo&&Set.prototype.forEach,Ph=typeof WeakMap=="function"&&WeakMap.prototype,ot=Ph?WeakMap.prototype.has:null,Sh=typeof WeakSet=="function"&&WeakSet.prototype,nt=Sh?WeakSet.prototype.has:null,Fh=typeof WeakRef=="function"&&WeakRef.prototype,Ld=Fh?WeakRef.prototype.deref:null,$h=Boolean.prototype.valueOf,Ch=Object.prototype.toString,_h=Function.prototype.toString,Dh=String.prototype.match,vo=String.prototype.slice,Va=String.prototype.replace,Ih=String.prototype.toUpperCase,Nd=String.prototype.toLowerCase,Ud=RegExp.prototype.test,Hd=Array.prototype.concat,qa=Array.prototype.join,Oh=Array.prototype.slice,Gd=Math.floor,ho=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ko=Object.getOwnPropertySymbols,jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Se=typeof Symbol=="function"&&typeof Symbol.iterator=="object",J=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Se||!0)?Symbol.toStringTag:null,Vd=Object.prototype.propertyIsEnumerable,Kd=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(a){return a.__proto__}:null);function Zd(a,e){if(a===1/0||a===-1/0||a!==a||a&&a>-1e3&&a<1e3||Ud.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof a=="number"){var i=a<0?-Gd(-a):Gd(a);if(i!==a){var o=String(i),n=vo.call(e,o.length+1);return Va.call(o,t,"$&_")+"."+Va.call(Va.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Va.call(e,t,"$&_")}var xo=Ah,Yd=xo.custom,Jd=al(Yd)?Yd:null,Th=function a(e,t,i,o){var n=t||{};if(Ka(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ka(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var r=Ka(n,"customInspect")?n.customInspect:!0;if(typeof r!="boolean"&&r!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ka(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ka(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return tl(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return s?Zd(e,d):d}if(typeof e=="bigint"){var l=String(e)+"n";return s?Zd(e,l):l}var c=typeof n.depth>"u"?5:n.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof e=="object")return qo(e)?"[Array]":"[Object]";var u=ek(n,i);if(typeof o>"u")o=[];else if(el(o,e)>=0)return"[Circular]";function p(V,ta,ia){if(ta&&(o=Oh.call(o),o.push(ta)),ia){var ra={depth:n.depth};return Ka(n,"quoteStyle")&&(ra.quoteStyle=n.quoteStyle),a(V,ra,i+1,o)}return a(V,n,i+1,o)}if(typeof e=="function"&&!Xd(e)){var m=Gh(e),y=Vt(e,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(y.length>0?" { "+qa.call(y,", ")+" }":"")}if(al(e)){var w=Se?Va.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):jo.call(e);return typeof e=="object"&&!Se?rt(w):w}if(Qh(e)){for(var x="<"+Nd.call(String(e.nodeName)),C=e.attributes||[],v=0;v<C.length;v++)x+=" "+C[v].name+"="+Qd(Bh(C[v].value),"double",n);return x+=">",e.childNodes&&e.childNodes.length&&(x+="..."),x+="</"+Nd.call(String(e.nodeName))+">",x}if(qo(e)){if(e.length===0)return"[]";var h=Vt(e,p);return u&&!ak(h)?"["+Ao(h,u)+"]":"[ "+qa.call(h,", ")+" ]"}if(Wh(e)){var g=Vt(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!Vd.call(e,"cause")?"{ ["+String(e)+"] "+qa.call(Hd.call("[cause]: "+p(e.cause),g),", ")+" }":g.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+qa.call(g,", ")+" }"}if(typeof e=="object"&&r){if(Jd&&typeof e[Jd]=="function"&&xo)return xo(e,{depth:c-i});if(r!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Vh(e)){var b=[];return Wd&&Wd.call(e,function(V,ta){b.push(p(ta,e,!0)+" => "+p(V,e))}),il("Map",Ht.call(e),b,u)}if(Yh(e)){var j=[];return Md&&Md.call(e,function(V){j.push(p(V,e))}),il("Set",Gt.call(e),j,u)}if(Kh(e))return Eo("WeakMap");if(Jh(e))return Eo("WeakSet");if(Zh(e))return Eo("WeakRef");if(Lh(e))return rt(p(Number(e)));if(Uh(e))return rt(p(ho.call(e)));if(Nh(e))return rt($h.call(e));if(Mh(e))return rt(p(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Ye<"u"&&e===Ye)return"{ [object globalThis] }";if(!Rh(e)&&!Xd(e)){var S=Vt(e,p),E=Kd?Kd(e)===Object.prototype:e instanceof Object||e.constructor===Object,_=e instanceof Object?"":"null prototype",R=!E&&J&&Object(e)===e&&J in e?vo.call(Za(e),8,-1):_?"Object":"",wa=E||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ya=wa+(R||_?"["+qa.call(Hd.call([],R||[],_||[]),": ")+"] ":"");return S.length===0?ya+"{}":u?ya+"{"+Ao(S,u)+"}":ya+"{ "+qa.call(S,", ")+" }"}return String(e)};function Qd(a,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+a+i}function Bh(a){return Va.call(String(a),/"/g,"&quot;")}function qo(a){return Za(a)==="[object Array]"&&(!J||!(typeof a=="object"&&J in a))}function Rh(a){return Za(a)==="[object Date]"&&(!J||!(typeof a=="object"&&J in a))}function Xd(a){return Za(a)==="[object RegExp]"&&(!J||!(typeof a=="object"&&J in a))}function Wh(a){return Za(a)==="[object Error]"&&(!J||!(typeof a=="object"&&J in a))}function Mh(a){return Za(a)==="[object String]"&&(!J||!(typeof a=="object"&&J in a))}function Lh(a){return Za(a)==="[object Number]"&&(!J||!(typeof a=="object"&&J in a))}function Nh(a){return Za(a)==="[object Boolean]"&&(!J||!(typeof a=="object"&&J in a))}function al(a){if(Se)return a&&typeof a=="object"&&a instanceof Symbol;if(typeof a=="symbol")return!0;if(!a||typeof a!="object"||!jo)return!1;try{return jo.call(a),!0}catch{}return!1}function Uh(a){if(!a||typeof a!="object"||!ho)return!1;try{return ho.call(a),!0}catch{}return!1}var Hh=Object.prototype.hasOwnProperty||function(a){return a in this};function Ka(a,e){return Hh.call(a,e)}function Za(a){return Ch.call(a)}function Gh(a){if(a.name)return a.name;var e=Dh.call(_h.call(a),/^function\s*([\w$]+)/);return e?e[1]:null}function el(a,e){if(a.indexOf)return a.indexOf(e);for(var t=0,i=a.length;t<i;t++)if(a[t]===e)return t;return-1}function Vh(a){if(!Ht||!a||typeof a!="object")return!1;try{Ht.call(a);try{Gt.call(a)}catch{return!0}return a instanceof Map}catch{}return!1}function Kh(a){if(!ot||!a||typeof a!="object")return!1;try{ot.call(a,ot);try{nt.call(a,nt)}catch{return!0}return a instanceof WeakMap}catch{}return!1}function Zh(a){if(!Ld||!a||typeof a!="object")return!1;try{return Ld.call(a),!0}catch{}return!1}function Yh(a){if(!Gt||!a||typeof a!="object")return!1;try{Gt.call(a);try{Ht.call(a)}catch{return!0}return a instanceof Set}catch{}return!1}function Jh(a){if(!nt||!a||typeof a!="object")return!1;try{nt.call(a,nt);try{ot.call(a,ot)}catch{return!0}return a instanceof WeakSet}catch{}return!1}function Qh(a){return!a||typeof a!="object"?!1:typeof HTMLElement<"u"&&a instanceof HTMLElement?!0:typeof a.nodeName=="string"&&typeof a.getAttribute=="function"}function tl(a,e){if(a.length>e.maxStringLength){var t=a.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return tl(vo.call(a,0,e.maxStringLength),e)+i}var o=Va.call(Va.call(a,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Xh);return Qd(o,"single",e)}function Xh(a){var e=a.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Ih.call(e.toString(16))}function rt(a){return"Object("+a+")"}function Eo(a){return a+" { ? }"}function il(a,e,t,i){var o=i?Ao(t,i):qa.call(t,", ");return a+" ("+e+") {"+o+"}"}function ak(a){for(var e=0;e<a.length;e++)if(el(a[e],`
`)>=0)return!1;return!0}function ek(a,e){var t;if(a.indent===" ")t=" ";else if(typeof a.indent=="number"&&a.indent>0)t=qa.call(Array(a.indent+1)," ");else return null;return{base:t,prev:qa.call(Array(e+1),t)}}function Ao(a,e){if(a.length===0)return"";var t=`
`+e.prev+e.base;return t+qa.call(a,","+t)+`
`+e.prev}function Vt(a,e){var t=qo(a),i=[];if(t){i.length=a.length;for(var o=0;o<a.length;o++)i[o]=Ka(a,o)?e(a[o],a):""}var n=typeof ko=="function"?ko(a):[],r;if(Se){r={};for(var s=0;s<n.length;s++)r["$"+n[s]]=n[s]}for(var d in a)Ka(a,d)&&(t&&String(Number(d))===d&&d<a.length||Se&&r["$"+d]instanceof Symbol||(Ud.call(/[^\w$]/,d)?i.push(e(d,a)+": "+e(a[d],a)):i.push(d+": "+e(a[d],a))));if(typeof ko=="function")for(var l=0;l<n.length;l++)Vd.call(a,n[l])&&i.push("["+e(n[l])+"]: "+e(a[n[l]],a));return i}var ol=Ae,Fe=xh,tk=Th,ik=tt,Kt=ol("%WeakMap%",!0),Zt=ol("%Map%",!0),ok=Fe("WeakMap.prototype.get",!0),nk=Fe("WeakMap.prototype.set",!0),rk=Fe("WeakMap.prototype.has",!0),sk=Fe("Map.prototype.get",!0),dk=Fe("Map.prototype.set",!0),lk=Fe("Map.prototype.has",!0),Po=function(a,e){for(var t=a,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=a.next,a.next=i,i},ck=function(a,e){var t=Po(a,e);return t&&t.value},uk=function(a,e,t){var i=Po(a,e);i?i.value=t:a.next={key:e,next:a.next,value:t}},pk=function(a,e){return!!Po(a,e)},zk=function(){var e,t,i,o={assert:function(n){if(!o.has(n))throw new ik("Side channel does not contain "+tk(n))},get:function(n){if(Kt&&n&&(typeof n=="object"||typeof n=="function")){if(e)return ok(e,n)}else if(Zt){if(t)return sk(t,n)}else if(i)return ck(i,n)},has:function(n){if(Kt&&n&&(typeof n=="object"||typeof n=="function")){if(e)return rk(e,n)}else if(Zt){if(t)return lk(t,n)}else if(i)return pk(i,n);return!1},set:function(n,r){Kt&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new Kt),nk(e,n,r)):Zt?(t||(t=new Zt),dk(t,n,r)):(i||(i={key:{},next:null}),uk(i,n,r))}};return o},mk=String.prototype.replace,gk=/%20/g,So={RFC1738:"RFC1738",RFC3986:"RFC3986"},Fo={default:So.RFC3986,formatters:{RFC1738:function(a){return mk.call(a,gk,"+")},RFC3986:function(a){return String(a)}},RFC1738:So.RFC1738,RFC3986:So.RFC3986},wk=Fo,$o=Object.prototype.hasOwnProperty,le=Array.isArray,Ea=function(){for(var a=[],e=0;e<256;++e)a.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return a}(),yk=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(le(i)){for(var o=[],n=0;n<i.length;++n)typeof i[n]<"u"&&o.push(i[n]);t.obj[t.prop]=o}}},nl=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(i[o]=e[o]);return i},bk=function a(e,t,i){if(!t)return e;if(typeof t!="object"){if(le(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!$o.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var o=e;return le(e)&&!le(t)&&(o=nl(e,i)),le(e)&&le(t)?(t.forEach(function(n,r){if($o.call(e,r)){var s=e[r];s&&typeof s=="object"&&n&&typeof n=="object"?e[r]=a(s,n,i):e.push(n)}else e[r]=n}),e):Object.keys(t).reduce(function(n,r){var s=t[r];return $o.call(n,r)?n[r]=a(n[r],s,i):n[r]=s,n},o)},fk=function(e,t){return Object.keys(t).reduce(function(i,o){return i[o]=t[o],i},e)},vk=function(a,e,t){var i=a.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},Co=1024,hk=function(e,t,i,o,n){if(e.length===0)return e;var r=e;if(typeof e=="symbol"?r=Symbol.prototype.toString.call(e):typeof e!="string"&&(r=String(e)),i==="iso-8859-1")return escape(r).replace(/%u[0-9a-f]{4}/gi,function(m){return"%26%23"+parseInt(m.slice(2),16)+"%3B"});for(var s="",d=0;d<r.length;d+=Co){for(var l=r.length>=Co?r.slice(d,d+Co):r,c=[],u=0;u<l.length;++u){var p=l.charCodeAt(u);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||n===wk.RFC1738&&(p===40||p===41)){c[c.length]=l.charAt(u);continue}if(p<128){c[c.length]=Ea[p];continue}if(p<2048){c[c.length]=Ea[192|p>>6]+Ea[128|p&63];continue}if(p<55296||p>=57344){c[c.length]=Ea[224|p>>12]+Ea[128|p>>6&63]+Ea[128|p&63];continue}u+=1,p=65536+((p&1023)<<10|l.charCodeAt(u)&1023),c[c.length]=Ea[240|p>>18]+Ea[128|p>>12&63]+Ea[128|p>>6&63]+Ea[128|p&63]}s+=c.join("")}return s},kk=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],o=0;o<t.length;++o)for(var n=t[o],r=n.obj[n.prop],s=Object.keys(r),d=0;d<s.length;++d){var l=s[d],c=r[l];typeof c=="object"&&c!==null&&i.indexOf(c)===-1&&(t.push({obj:r,prop:l}),i.push(c))}return yk(t),e},jk=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},xk=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},qk=function(e,t){return[].concat(e,t)},Ek=function(e,t){if(le(e)){for(var i=[],o=0;o<e.length;o+=1)i.push(t(e[o]));return i}return t(e)},rl={arrayToObject:nl,assign:fk,combine:qk,compact:kk,decode:vk,encode:hk,isBuffer:xk,isRegExp:jk,maybeMap:Ek,merge:bk},sl=zk,Yt=rl,st=Fo,Ak=Object.prototype.hasOwnProperty,dl={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Aa=Array.isArray,Pk=Array.prototype.push,ll=function(a,e){Pk.apply(a,Aa(e)?e:[e])},Sk=Date.prototype.toISOString,cl=st.default,G={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Yt.encode,encodeValuesOnly:!1,format:cl,formatter:st.formatters[cl],indices:!1,serializeDate:function(e){return Sk.call(e)},skipNulls:!1,strictNullHandling:!1},Fk=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},_o={},$k=function a(e,t,i,o,n,r,s,d,l,c,u,p,m,y,w,x,C,v){for(var h=e,g=v,b=0,j=!1;(g=g.get(_o))!==void 0&&!j;){var S=g.get(e);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");j=!0}typeof g.get(_o)>"u"&&(b=0)}if(typeof c=="function"?h=c(t,h):h instanceof Date?h=m(h):i==="comma"&&Aa(h)&&(h=Yt.maybeMap(h,function(k){return k instanceof Date?m(k):k})),h===null){if(r)return l&&!x?l(t,G.encoder,C,"key",y):t;h=""}if(Fk(h)||Yt.isBuffer(h)){if(l){var E=x?t:l(t,G.encoder,C,"key",y);return[w(E)+"="+w(l(h,G.encoder,C,"value",y))]}return[w(t)+"="+w(String(h))]}var _=[];if(typeof h>"u")return _;var R;if(i==="comma"&&Aa(h))x&&l&&(h=Yt.maybeMap(h,l)),R=[{value:h.length>0?h.join(",")||null:void 0}];else if(Aa(c))R=c;else{var wa=Object.keys(h);R=u?wa.sort(u):wa}var ya=d?t.replace(/\./g,"%2E"):t,V=o&&Aa(h)&&h.length===1?ya+"[]":ya;if(n&&Aa(h)&&h.length===0)return V+"[]";for(var ta=0;ta<R.length;++ta){var ia=R[ta],ra=typeof ia=="object"&&typeof ia.value<"u"?ia.value:h[ia];if(!(s&&ra===null)){var Xa=p&&d?ia.replace(/\./g,"%2E"):ia,Lr=Aa(h)?typeof i=="function"?i(V,Xa):V:V+(p?"."+Xa:"["+Xa+"]");v.set(e,b);var Ci=sl();Ci.set(_o,v),ll(_,a(ra,Lr,i,o,n,r,s,d,i==="comma"&&x&&Aa(h)?null:l,c,u,p,m,y,w,x,C,Ci))}}return _},Ck=function(e){if(!e)return G;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||G.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=st.default;if(typeof e.format<"u"){if(!Ak.call(st.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var o=st.formatters[i],n=G.filter;(typeof e.filter=="function"||Aa(e.filter))&&(n=e.filter);var r;if(e.arrayFormat in dl?r=e.arrayFormat:"indices"in e?r=e.indices?"indices":"repeat":r=G.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:G.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:G.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:G.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:G.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?G.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:G.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:G.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:G.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:G.encodeValuesOnly,filter:n,format:i,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:G.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:G.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:G.strictNullHandling}},_k=function(a,e){var t=a,i=Ck(e),o,n;typeof i.filter=="function"?(n=i.filter,t=n("",t)):Aa(i.filter)&&(n=i.filter,o=n);var r=[];if(typeof t!="object"||t===null)return"";var s=dl[i.arrayFormat],d=s==="comma"&&i.commaRoundTrip;o||(o=Object.keys(t)),i.sort&&o.sort(i.sort);for(var l=sl(),c=0;c<o.length;++c){var u=o[c];i.skipNulls&&t[u]===null||ll(r,$k(t[u],u,s,d,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,l))}var p=r.join(i.delimiter),m=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),p.length>0?m+p:""},$e=rl,Do=Object.prototype.hasOwnProperty,Dk=Array.isArray,B={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:$e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Ik=function(a){return a.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},ul=function(a,e){return a&&typeof a=="string"&&e.comma&&a.indexOf(",")>-1?a.split(","):a},Ok="utf8=%26%2310003%3B",Tk="utf8=%E2%9C%93",Bk=function(e,t){var i={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var n=t.parameterLimit===1/0?void 0:t.parameterLimit,r=o.split(t.delimiter,n),s=-1,d,l=t.charset;if(t.charsetSentinel)for(d=0;d<r.length;++d)r[d].indexOf("utf8=")===0&&(r[d]===Tk?l="utf-8":r[d]===Ok&&(l="iso-8859-1"),s=d,d=r.length);for(d=0;d<r.length;++d)if(d!==s){var c=r[d],u=c.indexOf("]="),p=u===-1?c.indexOf("="):u+1,m,y;p===-1?(m=t.decoder(c,B.decoder,l,"key"),y=t.strictNullHandling?null:""):(m=t.decoder(c.slice(0,p),B.decoder,l,"key"),y=$e.maybeMap(ul(c.slice(p+1),t),function(x){return t.decoder(x,B.decoder,l,"value")})),y&&t.interpretNumericEntities&&l==="iso-8859-1"&&(y=Ik(y)),c.indexOf("[]=")>-1&&(y=Dk(y)?[y]:y);var w=Do.call(i,m);w&&t.duplicates==="combine"?i[m]=$e.combine(i[m],y):(!w||t.duplicates==="last")&&(i[m]=y)}return i},Rk=function(a,e,t,i){for(var o=i?e:ul(e,t),n=a.length-1;n>=0;--n){var r,s=a[n];if(s==="[]"&&t.parseArrays)r=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{r=t.plainObjects?Object.create(null):{};var d=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=t.decodeDotInKeys?d.replace(/%2E/g,"."):d,c=parseInt(l,10);!t.parseArrays&&l===""?r={0:o}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(r=[],r[c]=o):l!=="__proto__"&&(r[l]=o)}o=r}return o},Wk=function(e,t,i,o){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,d=i.depth>0&&r.exec(n),l=d?n.slice(0,d.index):n,c=[];if(l){if(!i.plainObjects&&Do.call(Object.prototype,l)&&!i.allowPrototypes)return;c.push(l)}for(var u=0;i.depth>0&&(d=s.exec(n))!==null&&u<i.depth;){if(u+=1,!i.plainObjects&&Do.call(Object.prototype,d[1].slice(1,-1))&&!i.allowPrototypes)return;c.push(d[1])}if(d){if(i.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+i.depth+" and strictDepth is true");c.push("["+n.slice(d.index)+"]")}return Rk(c,t,i,o)}},Mk=function(e){if(!e)return B;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?B.charset:e.charset,i=typeof e.duplicates>"u"?B.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:B.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:B.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:B.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:B.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:B.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:B.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:B.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:B.decoder,delimiter:typeof e.delimiter=="string"||$e.isRegExp(e.delimiter)?e.delimiter:B.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:B.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:B.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:B.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:B.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:B.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},Lk=function(a,e){var t=Mk(e);if(a===""||a===null||typeof a>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof a=="string"?Bk(a,t):a,o=t.plainObjects?Object.create(null):{},n=Object.keys(i),r=0;r<n.length;++r){var s=n[r],d=Wk(s,i[s],t,typeof a=="string");o=$e.merge(o,d,t)}return t.allowSparse===!0?o:$e.compact(o)},Nk=_k,Uk=Lk,Hk=Fo,Gk={formats:Hk,parse:Uk,stringify:Nk},Vk=Pv;function ca(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Kk=/^([a-z0-9.+-]+:)/i,Zk=/:[0-9]*$/,Yk=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Jk=["<",">",'"',"`"," ","\r",`
`," "],Qk=["{","}","|","\\","^","`"].concat(Jk),Io=["'"].concat(Qk),pl=["%","/","?",";","#"].concat(Io),zl=["/","?","#"],Xk=255,ml=/^[+a-z0-9A-Z_-]{0,63}$/,a0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,e0={javascript:!0,"javascript:":!0},Oo={javascript:!0,"javascript:":!0},Ce={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},To=Gk;function dt(a,e,t){if(a&&typeof a=="object"&&a instanceof ca)return a;var i=new ca;return i.parse(a,e,t),i}ca.prototype.parse=function(a,e,t){if(typeof a!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var i=a.indexOf("?"),o=i!==-1&&i<a.indexOf("#")?"?":"#",n=a.split(o),r=/\\/g;n[0]=n[0].replace(r,"/"),a=n.join(o);var s=a;if(s=s.trim(),!t&&a.split("#").length===1){var d=Yk.exec(s);if(d)return this.path=s,this.href=s,this.pathname=d[1],d[2]?(this.search=d[2],e?this.query=To.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var l=Kk.exec(s);if(l){l=l[0];var c=l.toLowerCase();this.protocol=c,s=s.substr(l.length)}if(t||l||s.match(/^\/\/[^@/]+@[^@/]+/)){var u=s.substr(0,2)==="//";u&&!(l&&Oo[l])&&(s=s.substr(2),this.slashes=!0)}if(!Oo[l]&&(u||l&&!Ce[l])){for(var p=-1,m=0;m<zl.length;m++){var y=s.indexOf(zl[m]);y!==-1&&(p===-1||y<p)&&(p=y)}var w,x;p===-1?x=s.lastIndexOf("@"):x=s.lastIndexOf("@",p),x!==-1&&(w=s.slice(0,x),s=s.slice(x+1),this.auth=decodeURIComponent(w)),p=-1;for(var m=0;m<pl.length;m++){var y=s.indexOf(pl[m]);y!==-1&&(p===-1||y<p)&&(p=y)}p===-1&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var C=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!C)for(var v=this.hostname.split(/\./),m=0,h=v.length;m<h;m++){var g=v[m];if(g&&!g.match(ml)){for(var b="",j=0,S=g.length;j<S;j++)g.charCodeAt(j)>127?b+="x":b+=g[j];if(!b.match(ml)){var E=v.slice(0,m),_=v.slice(m+1),R=g.match(a0);R&&(E.push(R[1]),_.unshift(R[2])),_.length&&(s="/"+_.join(".")+s),this.hostname=E.join(".");break}}}this.hostname.length>Xk?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=Vk.toASCII(this.hostname));var wa=this.port?":"+this.port:"",ya=this.hostname||"";this.host=ya+wa,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!e0[c])for(var m=0,h=Io.length;m<h;m++){var V=Io[m];if(s.indexOf(V)!==-1){var ta=encodeURIComponent(V);ta===V&&(ta=escape(V)),s=s.split(V).join(ta)}}var ia=s.indexOf("#");ia!==-1&&(this.hash=s.substr(ia),s=s.slice(0,ia));var ra=s.indexOf("?");if(ra!==-1?(this.search=s.substr(ra),this.query=s.substr(ra+1),e&&(this.query=To.parse(this.query)),s=s.slice(0,ra)):e&&(this.search="",this.query={}),s&&(this.pathname=s),Ce[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var wa=this.pathname||"",Xa=this.search||"";this.path=wa+Xa}return this.href=this.format(),this};function t0(a){return typeof a=="string"&&(a=dt(a)),a instanceof ca?a.format():ca.prototype.format.call(a)}ca.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var e=this.protocol||"",t=this.pathname||"",i=this.hash||"",o=!1,n="";this.host?o=a+this.host:this.hostname&&(o=a+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(n=To.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var r=this.search||n&&"?"+n||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||Ce[e])&&o!==!1?(o="//"+(o||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):o||(o=""),i&&i.charAt(0)!=="#"&&(i="#"+i),r&&r.charAt(0)!=="?"&&(r="?"+r),t=t.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),r=r.replace("#","%23"),e+o+t+r+i};function i0(a,e){return dt(a,!1,!0).resolve(e)}ca.prototype.resolve=function(a){return this.resolveObject(dt(a,!1,!0)).format()};function o0(a,e){return a?dt(a,!1,!0).resolveObject(e):e}ca.prototype.resolveObject=function(a){if(typeof a=="string"){var e=new ca;e.parse(a,!1,!0),a=e}for(var t=new ca,i=Object.keys(this),o=0;o<i.length;o++){var n=i[o];t[n]=this[n]}if(t.hash=a.hash,a.href==="")return t.href=t.format(),t;if(a.slashes&&!a.protocol){for(var r=Object.keys(a),s=0;s<r.length;s++){var d=r[s];d!=="protocol"&&(t[d]=a[d])}return Ce[t.protocol]&&t.hostname&&!t.pathname&&(t.pathname="/",t.path=t.pathname),t.href=t.format(),t}if(a.protocol&&a.protocol!==t.protocol){if(!Ce[a.protocol]){for(var l=Object.keys(a),c=0;c<l.length;c++){var u=l[c];t[u]=a[u]}return t.href=t.format(),t}if(t.protocol=a.protocol,!a.host&&!Oo[a.protocol]){for(var h=(a.pathname||"").split("/");h.length&&!(a.host=h.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),h[0]!==""&&h.unshift(""),h.length<2&&h.unshift(""),t.pathname=h.join("/")}else t.pathname=a.pathname;if(t.search=a.search,t.query=a.query,t.host=a.host||"",t.auth=a.auth,t.hostname=a.hostname||a.host,t.port=a.port,t.pathname||t.search){var p=t.pathname||"",m=t.search||"";t.path=p+m}return t.slashes=t.slashes||a.slashes,t.href=t.format(),t}var y=t.pathname&&t.pathname.charAt(0)==="/",w=a.host||a.pathname&&a.pathname.charAt(0)==="/",x=w||y||t.host&&a.pathname,C=x,v=t.pathname&&t.pathname.split("/")||[],h=a.pathname&&a.pathname.split("/")||[],g=t.protocol&&!Ce[t.protocol];if(g&&(t.hostname="",t.port=null,t.host&&(v[0]===""?v[0]=t.host:v.unshift(t.host)),t.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(h[0]===""?h[0]=a.host:h.unshift(a.host)),a.host=null),x=x&&(h[0]===""||v[0]==="")),w)t.host=a.host||a.host===""?a.host:t.host,t.hostname=a.hostname||a.hostname===""?a.hostname:t.hostname,t.search=a.search,t.query=a.query,v=h;else if(h.length)v||(v=[]),v.pop(),v=v.concat(h),t.search=a.search,t.query=a.query;else if(a.search!=null){if(g){t.host=v.shift(),t.hostname=t.host;var b=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;b&&(t.auth=b.shift(),t.hostname=b.shift(),t.host=t.hostname)}return t.search=a.search,t.query=a.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!v.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var j=v.slice(-1)[0],S=(t.host||a.host||v.length>1)&&(j==="."||j==="..")||j==="",E=0,_=v.length;_>=0;_--)j=v[_],j==="."?v.splice(_,1):j===".."?(v.splice(_,1),E++):E&&(v.splice(_,1),E--);if(!x&&!C)for(;E--;E)v.unshift("..");x&&v[0]!==""&&(!v[0]||v[0].charAt(0)!=="/")&&v.unshift(""),S&&v.join("/").substr(-1)!=="/"&&v.push("");var R=v[0]===""||v[0]&&v[0].charAt(0)==="/";if(g){t.hostname=R?"":v.length?v.shift():"",t.host=t.hostname;var b=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;b&&(t.auth=b.shift(),t.hostname=b.shift(),t.host=t.hostname)}return x=x||t.host&&v.length,x&&!R&&v.unshift(""),v.length>0?t.pathname=v.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=a.auth||t.auth,t.slashes=t.slashes||a.slashes,t.href=t.format(),t},ca.prototype.parseHost=function(){var a=this.host,e=Zk.exec(a);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),a=a.substr(0,a.length-e.length)),a&&(this.hostname=a)},re.parse=dt,re.resolve=i0,re.resolveObject=o0,re.format=t0,re.Url=ca;const n0=/href=(["'])([^"']+)\1/i;function gl(a){return a[0]==="#"}function r0(a){return re.parse(a).protocol}function s0(a){const e=n0.exec(a);return e===null?"":e[2]}function d0(a){return a?a==="http:"||a==="https:":!0}function l0(a,e){if(!O(a,"//")&&a[0]==="/")return!0;if(gl(a))return!1;const t=re.parse(a,!1,!0);return t.host?t.host===e:!0}function c0(a,e){const t=s0(a);return!d0(r0(t))||gl(t)?"other":l0(t,e)?"internal":"external"}function u0(a){return a=a.toLowerCase(),!O(a,"<a")||!O(a,"rel=")?"Dofollow":O(a,"nofollow")?"Nofollow":"Dofollow"}function p0(a){return a.match(/<a(?:[^>]+)?>/gi)}var wl=(a,e)=>{const t=p0(a),i={total:0,internalTotal:0,internalDofollow:0,internalNofollow:0,externalTotal:0,externalDofollow:0,externalNofollow:0,otherTotal:0,otherDofollow:0,otherNofollow:0,anchors:t};return t===null||(i.total=t.length,t.forEach(o=>{const n=c0(o,e),r=u0(o);i[n+"Total"]++,i[n+r]++})),i};const Jt="all-in-one-seo-pack",Qt={noMatches:3,goodNumberOfMatches:9};function z0(a,e){return a?0<wl(a,e).externalTotal?{title:z("External links",Jt),description:z("Great! You are linking to external resources.",Jt),score:Qt.goodNumberOfMatches,maxScore:Qt.goodNumberOfMatches,error:0}:{title:z("External links",Jt),description:z("No outbound links were found. Link out to external resources.",Jt),score:Qt.noMatches,maxScore:Qt.goodNumberOfMatches,error:1}:{}}const Xt="all-in-one-seo-pack",ai={noMatches:3,goodNumberOfMatches:9};function m0(a,e){return a?0<wl(a,e).internalTotal?{title:z("Internal links",Xt),description:z("You are linking to other resources on your website which is great.",Xt),score:ai.goodNumberOfMatches,maxScore:ai.goodNumberOfMatches,error:0}:{title:z("Internal links",Xt),description:z("We couldn't find any internal links in your content. Add internal links in your content.",Xt),score:ai.noMatches,maxScore:ai.goodNumberOfMatches,error:1}:{}}const ei="all-in-one-seo-pack";function g0(a,e){if(!a)return{};const t=a.toLowerCase(),i=e.toLowerCase(),o=t.indexOf(i),n=Math.floor(t.length/2);return 0<=o&&o<n?{title:z("Focus Keyword at the beginning of SEO Title",ei),description:z("Focus Keyword used at the beginning of SEO title.",ei),score:9,maxScore:9,error:0}:{title:z("Focus Keyword at the beginning of SEO Title",ei),description:z("Focus Keyword doesn't appear at the beginning of SEO title.",ei),score:3,maxScore:9,error:1}}function w0(a){return a?(a=a.replace(/<(?!li|\/li|p|\/p|h1|\/h1|h2|\/h2|h3|\/h3|h4|\/h4|h5|\/h5|h6|\/h6|dd).*?>/g,""),a=K(a),a):""}const f={es:[{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"},{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00C1]/g,alternative:"A"},{letter:/[\u00E9]/g,alternative:"e"},{letter:/[\u00C9]/g,alternative:"E"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u00F3]/g,alternative:"o"},{letter:/[\u00D3]/g,alternative:"O"},{letter:/[\u00FA\u00FC]/g,alternative:"u"},{letter:/[\u00DA\u00DC]/g,alternative:"U"}],pl:[{letter:/[\u0105]/g,alternative:"a"},{letter:/[\u0104]/g,alternative:"A"},{letter:/[\u0107]/g,alternative:"c"},{letter:/[\u0106]/g,alternative:"C"},{letter:/[\u0119]/g,alternative:"e"},{letter:/[\u0118]/g,alternative:"E"},{letter:/[\u0142]/g,alternative:"l"},{letter:/[\u0141]/g,alternative:"L"},{letter:/[\u0144]/g,alternative:"n"},{letter:/[\u0143]/g,alternative:"N"},{letter:/[\u00F3]/g,alternative:"o"},{letter:/[\u00D3]/g,alternative:"O"},{letter:/[\u015B]/g,alternative:"s"},{letter:/[\u015A]/g,alternative:"S"},{letter:/[\u017A\u017C]/g,alternative:"z"},{letter:/[\u0179\u017B]/g,alternative:"Z"}],de:[{letter:/[\u00E4]/g,alternative:"ae"},{letter:/[\u00C4]/g,alternative:"Ae"},{letter:/[\u00FC]/g,alternative:"ue"},{letter:/[\u00DC]/g,alternative:"Ue"},{letter:/[\u00F6]/g,alternative:"oe"},{letter:/[\u00D6]/g,alternative:"Oe"},{letter:/[\u00DF]/g,alternative:"ss"},{letter:/[\u1E9E]/g,alternative:"SS"}],nbnn:[{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"},{letter:/[\u00E5]/g,alternative:"aa"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00F8]/g,alternative:"oe"},{letter:/[\u00D8]/g,alternative:"Oe"},{letter:/[\u00E9\u00E8\u00EA]/g,alternative:"e"},{letter:/[\u00C9\u00C8\u00CA]/g,alternative:"E"},{letter:/[\u00F3\u00F2\u00F4]/g,alternative:"o"},{letter:/[\u00D3\u00D2\u00D4]/g,alternative:"O"}],sv:[{letter:/[\u00E5]/g,alternative:"aa"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00E4]/g,alternative:"ae"},{letter:/[\u00C4]/g,alternative:"Ae"},{letter:/[\u00F6]/g,alternative:"oe"},{letter:/[\u00D6]/g,alternative:"Oe"},{letter:/[\u00E9]/g,alternative:"e"},{letter:/[\u00C9]/g,alternative:"E"},{letter:/[\u00E0]/g,alternative:"a"},{letter:/[\u00C0]/g,alternative:"A"}],fi:[{letter:/[\u00E5]/g,alternative:"aa"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00E4]/g,alternative:"a"},{letter:/[\u00C4]/g,alternative:"A"},{letter:/[\u00F6]/g,alternative:"o"},{letter:/[\u00D6]/g,alternative:"O"},{letter:/[\u017E]/g,alternative:"zh"},{letter:/[\u017D]/g,alternative:"Zh"},{letter:/[\u0161]/g,alternative:"sh"},{letter:/[\u0160]/g,alternative:"Sh"}],da:[{letter:/[\u00E5]/g,alternative:"aa"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"},{letter:/[\u00C4]/g,alternative:"Ae"},{letter:/[\u00F8]/g,alternative:"oe"},{letter:/[\u00D8]/g,alternative:"Oe"},{letter:/[\u00E9]/g,alternative:"e"},{letter:/[\u00C9]/g,alternative:"E"}],tr:[{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u011F]/g,alternative:"g"},{letter:/[\u011E]/g,alternative:"G"},{letter:/[\u00F6]/g,alternative:"o"},{letter:/[\u00D6]/g,alternative:"O"},{letter:/[\u015F]/g,alternative:"s"},{letter:/[\u015E]/g,alternative:"S"},{letter:/[\u00E2]/g,alternative:"a"},{letter:/[\u00C2]/g,alternative:"A"},{letter:/[\u0131\u00EE]/g,alternative:"i"},{letter:/[\u0130\u00CE]/g,alternative:"I"},{letter:/[\u00FC\u00FB]/g,alternative:"u"},{letter:/[\u00DC\u00DB]/g,alternative:"U"}],lv:[{letter:/[\u0101]/g,alternative:"a"},{letter:/[\u0100]/g,alternative:"A"},{letter:/[\u010D]/g,alternative:"c"},{letter:/[\u010C]/g,alternative:"C"},{letter:/[\u0113]/g,alternative:"e"},{letter:/[\u0112]/g,alternative:"E"},{letter:/[\u0123]/g,alternative:"g"},{letter:/[\u0122]/g,alternative:"G"},{letter:/[\u012B]/g,alternative:"i"},{letter:/[\u012A]/g,alternative:"I"},{letter:/[\u0137]/g,alternative:"k"},{letter:/[\u0136]/g,alternative:"K"},{letter:/[\u013C]/g,alternative:"l"},{letter:/[\u013B]/g,alternative:"L"},{letter:/[\u0146]/g,alternative:"n"},{letter:/[\u0145]/g,alternative:"N"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u016B]/g,alternative:"u"},{letter:/[\u016A]/g,alternative:"U"},{letter:/[\u017E]/g,alternative:"z"},{letter:/[\u017D]/g,alternative:"Z"}],is:[{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00C1]/g,alternative:"A"},{letter:/[\u00F0]/g,alternative:"d"},{letter:/[\u00D0]/g,alternative:"D"},{letter:/[\u00E9]/g,alternative:"e"},{letter:/[\u00C9]/g,alternative:"E"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u00F3\u00F6]/g,alternative:"o"},{letter:/[\u00D3\u00D6]/g,alternative:"O"},{letter:/[\u00FA]/g,alternative:"u"},{letter:/[\u00DA]/g,alternative:"U"},{letter:/[\u00FD]/g,alternative:"y"},{letter:/[\u00DD]/g,alternative:"Y"},{letter:/[\u00FE]/g,alternative:"th"},{letter:/[\u00DE]/g,alternative:"Th"},{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"}],fa:[{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00C1]/g,alternative:"A"},{letter:/[\u00F0]/g,alternative:"d"},{letter:/[\u00D0]/g,alternative:"D"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u00FD]/g,alternative:"y"},{letter:/[\u00DD]/g,alternative:"Y"},{letter:/[\u00FA]/g,alternative:"u"},{letter:/[\u00DA]/g,alternative:"U"},{letter:/[\u00F3\u00F8]/g,alternative:"o"},{letter:/[\u00D3\u00D8]/g,alternative:"O"},{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"}],cs:[{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00C1]/g,alternative:"A"},{letter:/[\u010D]/g,alternative:"c"},{letter:/[\u010C]/g,alternative:"C"},{letter:/[\u010F]/g,alternative:"d"},{letter:/[\u010E]/g,alternative:"D"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u0148]/g,alternative:"n"},{letter:/[\u0147]/g,alternative:"N"},{letter:/[\u00F3]/g,alternative:"o"},{letter:/[\u00D3]/g,alternative:"O"},{letter:/[\u0159]/g,alternative:"r"},{letter:/[\u0158]/g,alternative:"R"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u0165]/g,alternative:"t"},{letter:/[\u0164]/g,alternative:"T"},{letter:/[\u00FD]/g,alternative:"y"},{letter:/[\u00DD]/g,alternative:"Y"},{letter:/[\u017E]/g,alternative:"z"},{letter:/[\u017D]/g,alternative:"Z"},{letter:/[\u00E9\u011B]/g,alternative:"e"},{letter:/[\u00C9\u011A]/g,alternative:"E"},{letter:/[\u00FA\u016F]/g,alternative:"u"},{letter:/[\u00DA\u016E]/g,alternative:"U"}],ru:[{letter:/[\u0430]/g,alternative:"a"},{letter:/[\u0410]/g,alternative:"A"},{letter:/[\u0431]/g,alternative:"b"},{letter:/[\u0411]/g,alternative:"B"},{letter:/[\u0432]/g,alternative:"v"},{letter:/[\u0412]/g,alternative:"V"},{letter:/[\u0433]/g,alternative:"g"},{letter:/[\u0413]/g,alternative:"G"},{letter:/[\u0434]/g,alternative:"d"},{letter:/[\u0414]/g,alternative:"D"},{letter:/[\u0435]/g,alternative:"e"},{letter:/[\u0415]/g,alternative:"E"},{letter:/[\u0436]/g,alternative:"zh"},{letter:/[\u0416]/g,alternative:"Zh"},{letter:/[\u0437]/g,alternative:"z"},{letter:/[\u0417]/g,alternative:"Z"},{letter:/[\u0456\u0438\u0439]/g,alternative:"i"},{letter:/[\u0406\u0418\u0419]/g,alternative:"I"},{letter:/[\u043A]/g,alternative:"k"},{letter:/[\u041A]/g,alternative:"K"},{letter:/[\u043B]/g,alternative:"l"},{letter:/[\u041B]/g,alternative:"L"},{letter:/[\u043C]/g,alternative:"m"},{letter:/[\u041C]/g,alternative:"M"},{letter:/[\u043D]/g,alternative:"n"},{letter:/[\u041D]/g,alternative:"N"},{letter:/[\u0440]/g,alternative:"r"},{letter:/[\u0420]/g,alternative:"R"},{letter:/[\u043E]/g,alternative:"o"},{letter:/[\u041E]/g,alternative:"O"},{letter:/[\u043F]/g,alternative:"p"},{letter:/[\u041F]/g,alternative:"P"},{letter:/[\u0441]/g,alternative:"s"},{letter:/[\u0421]/g,alternative:"S"},{letter:/[\u0442]/g,alternative:"t"},{letter:/[\u0422]/g,alternative:"T"},{letter:/[\u0443]/g,alternative:"u"},{letter:/[\u0423]/g,alternative:"U"},{letter:/[\u0444]/g,alternative:"f"},{letter:/[\u0424]/g,alternative:"F"},{letter:/[\u0445]/g,alternative:"kh"},{letter:/[\u0425]/g,alternative:"Kh"},{letter:/[\u0446]/g,alternative:"ts"},{letter:/[\u0426]/g,alternative:"Ts"},{letter:/[\u0447]/g,alternative:"ch"},{letter:/[\u0427]/g,alternative:"Ch"},{letter:/[\u0448]/g,alternative:"sh"},{letter:/[\u0428]/g,alternative:"Sh"},{letter:/[\u0449]/g,alternative:"shch"},{letter:/[\u0429]/g,alternative:"Shch"},{letter:/[\u044A]/g,alternative:"ie"},{letter:/[\u042A]/g,alternative:"Ie"},{letter:/[\u044B]/g,alternative:"y"},{letter:/[\u042B]/g,alternative:"Y"},{letter:/[\u044C]/g,alternative:""},{letter:/[\u042C]/g,alternative:""},{letter:/[\u0451\u044D]/g,alternative:"e"},{letter:/[\u0401\u042D]/g,alternative:"E"},{letter:/[\u044E]/g,alternative:"iu"},{letter:/[\u042E]/g,alternative:"Iu"},{letter:/[\u044F]/g,alternative:"ia"},{letter:/[\u042F]/g,alternative:"Ia"}],eo:[{letter:/[\u0109]/g,alternative:"ch"},{letter:/[\u0108]/g,alternative:"Ch"},{letter:/[\u011d]/g,alternative:"gh"},{letter:/[\u011c]/g,alternative:"Gh"},{letter:/[\u0125]/g,alternative:"hx"},{letter:/[\u0124]/g,alternative:"Hx"},{letter:/[\u0135]/g,alternative:"jx"},{letter:/[\u0134]/g,alternative:"Jx"},{letter:/[\u015d]/g,alternative:"sx"},{letter:/[\u015c]/g,alternative:"Sx"},{letter:/[\u016d]/g,alternative:"ux"},{letter:/[\u016c]/g,alternative:"Ux"}],af:[{letter:/[\u00E8\u00EA\u00EB]/g,alternative:"e"},{letter:/[\u00CB\u00C8\u00CA]/g,alternative:"E"},{letter:/[\u00EE\u00EF]/g,alternative:"i"},{letter:/[\u00CE\u00CF]/g,alternative:"I"},{letter:/[\u00F4\u00F6]/g,alternative:"o"},{letter:/[\u00D4\u00D6]/g,alternative:"O"},{letter:/[\u00FB\u00FC]/g,alternative:"u"},{letter:/[\u00DB\u00DC]/g,alternative:"U"}],ca:[{letter:/[\u00E0]/g,alternative:"a"},{letter:/[\u00C0]/g,alternative:"A"},{letter:/[\u00E9|\u00E8]/g,alternative:"e"},{letter:/[\u00C9|\u00C8]/g,alternative:"E"},{letter:/[\u00ED|\u00EF]/g,alternative:"i"},{letter:/[\u00CD|\u00CF]/g,alternative:"I"},{letter:/[\u00F3|\u00F2]/g,alternative:"o"},{letter:/[\u00D3|\u00D2]/g,alternative:"O"},{letter:/[\u00FA|\u00FC]/g,alternative:"u"},{letter:/[\u00DA|\u00DC]/g,alternative:"U"},{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"}],ast:[{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"}],an:[{letter:/[\u00FC]/g,alternative:"u"},{letter:/[\u00F1]/g,alternative:"ny"},{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00F3]/g,alternative:"o"},{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00DC]/g,alternative:"U"},{letter:/[\u00D1]/g,alternative:"Ny"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u00D3]/g,alternative:"O"},{letter:/[\u00C1]/g,alternative:"A"}],ay:[{letter:/(([\u00EF])|([\u00ED]))/g,alternative:"i"},{letter:/(([\u00CF])|([\u00CD]))/g,alternative:"I"},{letter:/[\u00E4]/g,alternative:"a"},{letter:/[\u00C4]/g,alternative:"A"},{letter:/[\u00FC]/g,alternative:"u"},{letter:/[\u00DC]/g,alternative:"U"},{letter:/[\u0027]/g,alternative:""},{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"}],en:[{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"},{letter:/[\u0153]/g,alternative:"oe"},{letter:/[\u0152]/g,alternative:"Oe"},{letter:/[\u00EB\u00E9]/g,alternative:"e"},{letter:/[\u00C9\u00CB]/g,alternative:"E"},{letter:/[\u00F4\u00F6]/g,alternative:"o"},{letter:/[\u00D4\u00D6]/g,alternative:"O"},{letter:/[\u00EF]/g,alternative:"i"},{letter:/[\u00CF]/g,alternative:"I"},{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"},{letter:/[\u00FC]/g,alternative:"u"},{letter:/[\u00DC]/g,alternative:"U"},{letter:/[\u00E4]/g,alternative:"a"},{letter:/[\u00C4]/g,alternative:"A"}],fr:[{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"},{letter:/[\u0153]/g,alternative:"oe"},{letter:/[\u0152]/g,alternative:"Oe"},{letter:/[\u00E9\u00E8\u00EB\u00EA]/g,alternative:"e"},{letter:/[\u00C9\u00C8\u00CB\u00CA]/g,alternative:"E"},{letter:/[\u00E0\u00E2]/g,alternative:"a"},{letter:/[\u00C0\u00C2]/g,alternative:"A"},{letter:/[\u00EF\u00EE]/g,alternative:"i"},{letter:/[\u00CF\u00CE]/g,alternative:"I"},{letter:/[\u00F9\u00FB\u00FC]/g,alternative:"u"},{letter:/[\u00D9\u00DB\u00DC]/g,alternative:"U"},{letter:/[\u00F4]/g,alternative:"o"},{letter:/[\u00D4]/g,alternative:"O"},{letter:/[\u00FF]/g,alternative:"y"},{letter:/[\u0178]/g,alternative:"Y"},{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"}],it:[{letter:/[\u00E0]/g,alternative:"a"},{letter:/[\u00C0]/g,alternative:"A"},{letter:/[\u00E9\u00E8]/g,alternative:"e"},{letter:/[\u00C9\u00C8]/g,alternative:"E"},{letter:/[\u00EC\u00ED\u00EE]/g,alternative:"i"},{letter:/[\u00CC\u00CD\u00CE]/g,alternative:"I"},{letter:/[\u00F3\u00F2]/g,alternative:"o"},{letter:/[\u00D3\u00D2]/g,alternative:"O"},{letter:/[\u00F9\u00FA]/g,alternative:"u"},{letter:/[\u00D9\u00DA]/g,alternative:"U"}],nl:[{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00D1]/g,alternative:"N"},{letter:/[\u00E9\u00E8\u00EA\u00EB]/g,alternative:"e"},{letter:/[\u00C9\u00C8\u00CA\u00CB]/g,alternative:"E"},{letter:/[\u00F4\u00F6]/g,alternative:"o"},{letter:/[\u00D4\u00D6]/g,alternative:"O"},{letter:/[\u00EF]/g,alternative:"i"},{letter:/[\u00CF]/g,alternative:"I"},{letter:/[\u00FC]/g,alternative:"u"},{letter:/[\u00DC]/g,alternative:"U"},{letter:/[\u00E4]/g,alternative:"a"},{letter:/[\u00C4]/g,alternative:"A"}],bm:[{letter:/[\u025B]/g,alternative:"e"},{letter:/[\u0190]/g,alternative:"E"},{letter:/[\u0272]/g,alternative:"ny"},{letter:/[\u019D]/g,alternative:"Ny"},{letter:/[\u014B]/g,alternative:"ng"},{letter:/[\u014A]/g,alternative:"Ng"},{letter:/[\u0254]/g,alternative:"o"},{letter:/[\u0186]/g,alternative:"O"}],uk:[{letter:/[\u0431]/g,alternative:"b"},{letter:/[\u0411]/g,alternative:"B"},{letter:/[\u0432]/g,alternative:"v"},{letter:/[\u0412]/g,alternative:"V"},{letter:/[\u0433]/g,alternative:"h"},{letter:/[\u0413]/g,alternative:"H"},{letter:/[\u0491]/g,alternative:"g"},{letter:/[\u0490]/g,alternative:"G"},{letter:/[\u0434]/g,alternative:"d"},{letter:/[\u0414]/g,alternative:"D"},{letter:/[\u043A]/g,alternative:"k"},{letter:/[\u041A]/g,alternative:"K"},{letter:/[\u043B]/g,alternative:"l"},{letter:/[\u041B]/g,alternative:"L"},{letter:/[\u043C]/g,alternative:"m"},{letter:/[\u041C]/g,alternative:"M"},{letter:/[\u0070]/g,alternative:"r"},{letter:/[\u0050]/g,alternative:"R"},{letter:/[\u043F]/g,alternative:"p"},{letter:/[\u041F]/g,alternative:"P"},{letter:/[\u0441]/g,alternative:"s"},{letter:/[\u0421]/g,alternative:"S"},{letter:/[\u0442]/g,alternative:"t"},{letter:/[\u0422]/g,alternative:"T"},{letter:/[\u0443]/g,alternative:"u"},{letter:/[\u0423]/g,alternative:"U"},{letter:/[\u0444]/g,alternative:"f"},{letter:/[\u0424]/g,alternative:"F"},{letter:/[\u0445]/g,alternative:"kh"},{letter:/[\u0425]/g,alternative:"Kh"},{letter:/[\u0446]/g,alternative:"ts"},{letter:/[\u0426]/g,alternative:"Ts"},{letter:/[\u0447]/g,alternative:"ch"},{letter:/[\u0427]/g,alternative:"Ch"},{letter:/[\u0448]/g,alternative:"sh"},{letter:/[\u0428]/g,alternative:"Sh"},{letter:/[\u0449]/g,alternative:"shch"},{letter:/[\u0429]/g,alternative:"Shch"},{letter:/[\u044C\u042C]/g,alternative:""},{letter:/[\u0436]/g,alternative:"zh"},{letter:/[\u0416]/g,alternative:"Zh"},{letter:/[\u0437]/g,alternative:"z"},{letter:/[\u0417]/g,alternative:"Z"},{letter:/[\u0438]/g,alternative:"y"},{letter:/[\u0418]/g,alternative:"Y"},{letter:/^[\u0454]/g,alternative:"ye"},{letter:/[\s][\u0454]/g,alternative:" ye"},{letter:/[\u0454]/g,alternative:"ie"},{letter:/^[\u0404]/g,alternative:"Ye"},{letter:/[\s][\u0404]/g,alternative:" Ye"},{letter:/[\u0404]/g,alternative:"IE"},{letter:/^[\u0457]/g,alternative:"yi"},{letter:/[\s][\u0457]/g,alternative:" yi"},{letter:/[\u0457]/g,alternative:"i"},{letter:/^[\u0407]/g,alternative:"Yi"},{letter:/[\s][\u0407]/g,alternative:" Yi"},{letter:/[\u0407]/g,alternative:"I"},{letter:/^[\u0439]/g,alternative:"y"},{letter:/[\s][\u0439]/g,alternative:" y"},{letter:/[\u0439]/g,alternative:"i"},{letter:/^[\u0419]/g,alternative:"Y"},{letter:/[\s][\u0419]/g,alternative:" Y"},{letter:/[\u0419]/g,alternative:"I"},{letter:/^[\u044E]/g,alternative:"yu"},{letter:/[\s][\u044E]/g,alternative:" yu"},{letter:/[\u044E]/g,alternative:"iu"},{letter:/^[\u042E]/g,alternative:"Yu"},{letter:/[\s][\u042E]/g,alternative:" Yu"},{letter:/[\u042E]/g,alternative:"IU"},{letter:/^[\u044F]/g,alternative:"ya"},{letter:/[\s][\u044F]/g,alternative:" ya"},{letter:/[\u044F]/g,alternative:"ia"},{letter:/^[\u042F]/g,alternative:"Ya"},{letter:/[\s][\u042F]/g,alternative:" Ya"},{letter:/[\u042F]/g,alternative:"IA"}],br:[{letter:/\u0063\u0027\u0068/g,alternative:"ch"},{letter:/\u0043\u0027\u0048/g,alternative:"CH"},{letter:/[\u00e2]/g,alternative:"a"},{letter:/[\u00c2]/g,alternative:"A"},{letter:/[\u00ea]/g,alternative:"e"},{letter:/[\u00ca]/g,alternative:"E"},{letter:/[\u00ee]/g,alternative:"i"},{letter:/[\u00ce]/g,alternative:"I"},{letter:/[\u00f4]/g,alternative:"o"},{letter:/[\u00d4]/g,alternative:"O"},{letter:/[\u00fb\u00f9\u00fc]/g,alternative:"u"},{letter:/[\u00db\u00d9\u00dc]/g,alternative:"U"},{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"}],ch:[{letter:/[\u0027]/g,alternative:""},{letter:/[\u00e5]/g,alternative:"a"},{letter:/[\u00c5]/g,alternative:"A"},{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"}],co:[{letter:/[\u00e2\u00e0]/g,alternative:"a"},{letter:/[\u00c2\u00c0]/g,alternative:"A"},{letter:/[\u00e6\u04d5]/g,alternative:"ae"},{letter:/[\u00c6\u04d4]/g,alternative:"Ae"},{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00e9\u00ea\u00e8\u00eb]/g,alternative:"e"},{letter:/[\u00c9\u00ca\u00c8\u00cb]/g,alternative:"E"},{letter:/[\u00ec\u00ee\u00ef]/g,alternative:"i"},{letter:/[\u00cc\u00ce\u00cf]/g,alternative:"I"},{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"},{letter:/[\u00f4\u00f2]/g,alternative:"o"},{letter:/[\u00d4\u00d2]/g,alternative:"O"},{letter:/[\u0153]/g,alternative:"oe"},{letter:/[\u0152]]/g,alternative:"Oe"},{letter:/[\u00f9\u00fc]/g,alternative:"u"},{letter:/[\u00d9\u00dc]/g,alternative:"U"},{letter:/[\u00ff]/g,alternative:"y"},{letter:/[\u0178]/g,alternative:"Y"}],csb:[{letter:/[\u0105\u00e3]/g,alternative:"a"},{letter:/[\u0104\u00c3]/g,alternative:"A"},{letter:/[\u00e9\u00eb]/g,alternative:"e"},{letter:/[\u00c9\u00cb]/g,alternative:"E"},{letter:/[\u0142]/g,alternative:"l"},{letter:/[\u0141]/g,alternative:"L"},{letter:/[\u0144]/g,alternative:"n"},{letter:/[\u0143]/g,alternative:"N"},{letter:/[\u00f2\u00f3\u00f4]/g,alternative:"o"},{letter:/[\u00d2\u00d3\u00d4]/g,alternative:"O"},{letter:/[\u00f9]/g,alternative:"u"},{letter:/[\u00d9]/g,alternative:"U"},{letter:/[\u017c]/g,alternative:"z"},{letter:/[\u017b]/g,alternative:"Z"}],cy:[{letter:/[\u00e2]/g,alternative:"a"},{letter:/[\u00c2]/g,alternative:"A"},{letter:/[\u00ea]/g,alternative:"e"},{letter:/[\u00ca]/g,alternative:"E"},{letter:/[\u00ee]/g,alternative:"i"},{letter:/[\u00ce]/g,alternative:"I"},{letter:/[\u00f4]/g,alternative:"o"},{letter:/[\u00d4]/g,alternative:"O"},{letter:/[\u00fb]/g,alternative:"u"},{letter:/[\u00db]/g,alternative:"U"},{letter:/[\u0175]/g,alternative:"w"},{letter:/[\u0174]/g,alternative:"W"},{letter:/[\u0177]/g,alternative:"y"},{letter:/[\u0176]/g,alternative:"Y"}],ee:[{letter:/[\u0256]/g,alternative:"d"},{letter:/[\u0189]/g,alternative:"D"},{letter:/[\u025b]/g,alternative:"e"},{letter:/[\u0190]/g,alternative:"E"},{letter:/[\u0192]/g,alternative:"f"},{letter:/[\u0191]/g,alternative:"F"},{letter:/[\u0263]/g,alternative:"g"},{letter:/[\u0194]/g,alternative:"G"},{letter:/[\u014b]/g,alternative:"ng"},{letter:/[\u014a]/g,alternative:"Ng"},{letter:/[\u0254]/g,alternative:"o"},{letter:/[\u0186]/g,alternative:"O"},{letter:/[\u028b]/g,alternative:"w"},{letter:/[\u01b2]/g,alternative:"W"},{letter:/\u0061\u0303/g,alternative:"a"},{letter:/[\u00e1\u00e0\u01ce\u00e2\u00e3]/g,alternative:"a"},{letter:/\u0041\u0303/g,alternative:"A"},{letter:/[\u00c1\u00c0\u01cd\u00c2\u00c3]/g,alternative:"A"},{letter:/[\u00e9\u00e8\u011b\u00ea]/g,alternative:"e"},{letter:/[\u00c9\u00c8\u011a\u00ca]/g,alternative:"E"},{letter:/[\u00f3\u00f2\u01d2\u00f4]/g,alternative:"o"},{letter:/[\u00d3\u00d2\u01d1\u00d4]/g,alternative:"O"},{letter:/[\u00fa\u00f9\u01d4\u00fb]/g,alternative:"u"},{letter:/[\u00da\u00d9\u01d3\u00db]/g,alternative:"U"},{letter:/[\u00ed\u00ec\u01d0\u00ee]/g,alternative:"i"},{letter:/[\u00cd\u00cc\u01cf\u00ce]/g,alternative:"I"}],et:[{letter:/[\u0161]/g,alternative:"sh"},{letter:/[\u0160]/g,alternative:"Sh"},{letter:/[\u017e]/g,alternative:"zh"},{letter:/[\u017d]/g,alternative:"Zh"},{letter:/[\u00f5\u00f6]/g,alternative:"o"},{letter:/[\u00d6\u00d5]/g,alternative:"O"},{letter:/[\u00e4]/g,alternative:"a"},{letter:/[\u00c4]/g,alternative:"A"},{letter:/[\u00fc]/g,alternative:"u"},{letter:/[\u00dc]/g,alternative:"U"}],eu:[{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"},{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00fc]/g,alternative:"u"},{letter:/[\u00dc]/g,alternative:"U"}],fuc:[{letter:/[\u0253]/g,alternative:"b"},{letter:/[\u0181]/g,alternative:"B"},{letter:/[\u0257]/g,alternative:"d"},{letter:/[\u018a]/g,alternative:"D"},{letter:/[\u014b]/g,alternative:"ng"},{letter:/[\u014a]/g,alternative:"Ng"},{letter:/[\u0272\u00f1]/g,alternative:"ny"},{letter:/[\u019d\u00d1]/g,alternative:"Ny"},{letter:/[\u01b4]/g,alternative:"y"},{letter:/[\u01b3]/g,alternative:"Y"},{letter:/[\u0260]/g,alternative:"g"},{letter:/[\u0193]/g,alternative:"G"}],fj:[{letter:/[\u0101]/g,alternative:"a"},{letter:/[\u0100]/g,alternative:"A"},{letter:/[\u0113]/g,alternative:"e"},{letter:/[\u0112]/g,alternative:"E"},{letter:/[\u012b]/g,alternative:"i"},{letter:/[\u012a]/g,alternative:"I"},{letter:/[\u016b]/g,alternative:"u"},{letter:/[\u016a]/g,alternative:"U"},{letter:/[\u014d]/g,alternative:"o"},{letter:/[\u014c]/g,alternative:"O"}],frp:[{letter:/[\u00e2]/g,alternative:"a"},{letter:/[\u00c2]/g,alternative:"A"},{letter:/[\u00ea\u00e8\u00e9]/g,alternative:"e"},{letter:/[\u00ca\u00c8\u00c9]/g,alternative:"E"},{letter:/[\u00ee]/g,alternative:"i"},{letter:/[\u00ce]/g,alternative:"I"},{letter:/[\u00fb\u00fc]/g,alternative:"u"},{letter:/[\u00db\u00dc]/g,alternative:"U"},{letter:/[\u00f4]/g,alternative:"o"},{letter:/[\u00d4]/g,alternative:"O"}],fur:[{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00e0\u00e2]/g,alternative:"a"},{letter:/[\u00c0\u00c2]/g,alternative:"A"},{letter:/[\u00e8\u00ea]/g,alternative:"e"},{letter:/[\u00c8\u00ca]/g,alternative:"E"},{letter:/[\u00ec\u00ee]/g,alternative:"i"},{letter:/[\u00cc\u00ce]/g,alternative:"I"},{letter:/[\u00f2\u00f4]/g,alternative:"o"},{letter:/[\u00d2\u00d4]/g,alternative:"O"},{letter:/[\u00f9\u00fb]/g,alternative:"u"},{letter:/[\u00d9\u00db]/g,alternative:"U"},{letter:/[\u010d]/g,alternative:"c"},{letter:/[\u010c]/g,alternative:"C"},{letter:/[\u011f]/g,alternative:"g"},{letter:/[\u011e]/g,alternative:"G"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"}],fy:[{letter:/[\u00e2\u0101\u00e4\u00e5]/g,alternative:"a"},{letter:/[\u00c2\u0100\u00c4\u00c5]/g,alternative:"A"},{letter:/[\u00ea\u00e9\u0113]/g,alternative:"e"},{letter:/[\u00ca\u00c9\u0112]/g,alternative:"E"},{letter:/[\u00f4\u00f6]/g,alternative:"o"},{letter:/[\u00d4\u00d6]/g,alternative:"O"},{letter:/[\u00fa\u00fb\u00fc]/g,alternative:"u"},{letter:/[\u00da\u00db\u00dc]/g,alternative:"U"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"},{letter:/[\u0111\u00f0]/g,alternative:"d"},{letter:/[\u0110\u00d0]/g,alternative:"D"}],ga:[{letter:/[\u00e1]/g,alternative:"a"},{letter:/[\u00c1]/g,alternative:"A"},{letter:/[\u00e9]/g,alternative:"e"},{letter:/[\u00c9]/g,alternative:"E"},{letter:/[\u00f3]/g,alternative:"o"},{letter:/[\u00d3]/g,alternative:"O"},{letter:/[\u00fa]/g,alternative:"u"},{letter:/[\u00da]/g,alternative:"U"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"}],gd:[{letter:/[\u00e0]/g,alternative:"a"},{letter:/[\u00c0]/g,alternative:"A"},{letter:/[\u00e8]/g,alternative:"e"},{letter:/[\u00c8]/g,alternative:"E"},{letter:/[\u00f2]/g,alternative:"o"},{letter:/[\u00d2]/g,alternative:"O"},{letter:/[\u00f9]/g,alternative:"u"},{letter:/[\u00d9]/g,alternative:"U"},{letter:/[\u00ec]/g,alternative:"i"},{letter:/[\u00cc]/g,alternative:"I"}],gl:[{letter:/[\u00e1\u00e0]/g,alternative:"a"},{letter:/[\u00c1\u00c0]/g,alternative:"A"},{letter:/[\u00e9\u00ea]/g,alternative:"e"},{letter:/[\u00c9\u00ca]/g,alternative:"E"},{letter:/[\u00ed\u00ef]/g,alternative:"i"},{letter:/[\u00cd\u00cf]/g,alternative:"I"},{letter:/[\u00f3]/g,alternative:"o"},{letter:/[\u00d3]/g,alternative:"O"},{letter:/[\u00fa\u00fc]/g,alternative:"u"},{letter:/[\u00da\u00dc]/g,alternative:"U"},{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"}],gn:[{letter:/[\u2019]/g,alternative:""},{letter:/\u0067\u0303/g,alternative:"g"},{letter:/\u0047\u0303/g,alternative:"G"},{letter:/[\u00e3]/g,alternative:"a"},{letter:/[\u00c3]/g,alternative:"A"},{letter:/[\u1ebd]/g,alternative:"e"},{letter:/[\u1ebc]/g,alternative:"E"},{letter:/[\u0129]/g,alternative:"i"},{letter:/[\u0128]/g,alternative:"I"},{letter:/[\u00f5]/g,alternative:"o"},{letter:/[\u00d5]/g,alternative:"O"},{letter:/[\u00f1]/g,alternative:"n"},{letter:/[\u00d1]/g,alternative:"N"},{letter:/[\u0169]/g,alternative:"u"},{letter:/[\u0168]/g,alternative:"U"},{letter:/[\u1ef9]/g,alternative:"y"},{letter:/[\u1ef8]/g,alternative:"Y"}],gsw:[{letter:/[\u00e4]/g,alternative:"a"},{letter:/[\u00c4]/g,alternative:"A"},{letter:/[\u00f6]/g,alternative:"o"},{letter:/[\u00d6]/g,alternative:"O"},{letter:/[\u00fc]/g,alternative:"u"},{letter:/[\u00dc]/g,alternative:"U"}],hat:[{letter:/[\u00e8]/g,alternative:"e"},{letter:/[\u00c8]/g,alternative:"E"},{letter:/[\u00f2]/g,alternative:"o"},{letter:/[\u00d2]/g,alternative:"O"}],haw:[{letter:/[\u02bb\u0027\u2019]/g,alternative:""},{letter:/[\u0101]/g,alternative:"a"},{letter:/[\u0113]/g,alternative:"e"},{letter:/[\u012b]/g,alternative:"i"},{letter:/[\u014d]/g,alternative:"o"},{letter:/[\u016b]/g,alternative:"u"},{letter:/[\u0100]/g,alternative:"A"},{letter:/[\u0112]/g,alternative:"E"},{letter:/[\u012a]/g,alternative:"I"},{letter:/[\u014c]/g,alternative:"O"},{letter:/[\u016a]/g,alternative:"U"}],hr:[{letter:/[\u010d\u0107]/g,alternative:"c"},{letter:/[\u010c\u0106]/g,alternative:"C"},{letter:/[\u0111]/g,alternative:"dj"},{letter:/[\u0110]/g,alternative:"Dj"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u017e]/g,alternative:"z"},{letter:/[\u017d]/g,alternative:"Z"},{letter:/[\u01c4]/g,alternative:"DZ"},{letter:/[\u01c5]/g,alternative:"Dz"},{letter:/[\u01c6]/g,alternative:"dz"}],ka:[{letter:/[\u10d0]/g,alternative:"a"},{letter:/[\u10d1]/g,alternative:"b"},{letter:/[\u10d2]/g,alternative:"g"},{letter:/[\u10d3]/g,alternative:"d"},{letter:/[\u10d4]/g,alternative:"e"},{letter:/[\u10d5]/g,alternative:"v"},{letter:/[\u10d6]/g,alternative:"z"},{letter:/[\u10d7]/g,alternative:"t"},{letter:/[\u10d8]/g,alternative:"i"},{letter:/[\u10d9]/g,alternative:"k"},{letter:/[\u10da]/g,alternative:"l"},{letter:/[\u10db]/g,alternative:"m"},{letter:/[\u10dc]/g,alternative:"n"},{letter:/[\u10dd]/g,alternative:"o"},{letter:/[\u10de]/g,alternative:"p"},{letter:/[\u10df]/g,alternative:"zh"},{letter:/[\u10e0]/g,alternative:"r"},{letter:/[\u10e1]/g,alternative:"s"},{letter:/[\u10e2]/g,alternative:"t"},{letter:/[\u10e3]/g,alternative:"u"},{letter:/[\u10e4]/g,alternative:"p"},{letter:/[\u10e5]/g,alternative:"k"},{letter:/[\u10e6]/g,alternative:"gh"},{letter:/[\u10e7]/g,alternative:"q"},{letter:/[\u10e8]/g,alternative:"sh"},{letter:/[\u10e9]/g,alternative:"ch"},{letter:/[\u10ea]/g,alternative:"ts"},{letter:/[\u10eb]/g,alternative:"dz"},{letter:/[\u10ec]/g,alternative:"ts"},{letter:/[\u10ed]/g,alternative:"ch"},{letter:/[\u10ee]/g,alternative:"kh"},{letter:/[\u10ef]/g,alternative:"j"},{letter:/[\u10f0]/g,alternative:"h"}],kal:[{letter:/[\u00E5]/g,alternative:"aa"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00E6\u04D5]/g,alternative:"ae"},{letter:/[\u00C6\u04D4]/g,alternative:"Ae"},{letter:/[\u00C4]/g,alternative:"Ae"},{letter:/[\u00F8]/g,alternative:"oe"},{letter:/[\u00D8]/g,alternative:"Oe"}],kin:[{letter:/[\u2019\u0027]/g,alternative:""}],lb:[{letter:/[\u00e4]/g,alternative:"a"},{letter:/[\u00c4]/g,alternative:"A"},{letter:/[\u00eb\u00e9]/g,alternative:"e"},{letter:/[\u00cb\u00c9]/g,alternative:"E"}],li:[{letter:/[\u00e1\u00e2\u00e0\u00e4]/g,alternative:"a"},{letter:/[\u00c1\u00c2\u00c0\u00c4]/g,alternative:"A"},{letter:/[\u00eb\u00e8\u00ea]/g,alternative:"e"},{letter:/[\u00cb\u00c8\u00ca]/g,alternative:"E"},{letter:/[\u00f6\u00f3]/g,alternative:"o"},{letter:/[\u00d6\u00d3]/g,alternative:"O"}],lin:[{letter:/[\u00e1\u00e2\u01ce]/g,alternative:"a"},{letter:/[\u00c1\u00c2\u01cd]/g,alternative:"A"},{letter:/\u025b\u0301/g,alternative:"e"},{letter:/\u025b\u0302/g,alternative:"e"},{letter:/\u025b\u030c/g,alternative:"e"},{letter:/[\u00e9\u00ea\u011b\u025b]/g,alternative:"e"},{letter:/\u0190\u0301/g,alternative:"E"},{letter:/\u0190\u0302/g,alternative:"E"},{letter:/\u0190\u030c/g,alternative:"E"},{letter:/[\u00c9\u00ca\u011a\u0190]/g,alternative:"E"},{letter:/[\u00ed\u00ee\u01d0]/g,alternative:"i"},{letter:/[\u00cd\u00ce\u01cf]/g,alternative:"I"},{letter:/\u0254\u0301/g,alternative:"o"},{letter:/\u0254\u0302/g,alternative:"o"},{letter:/\u0254\u030c/g,alternative:"o"},{letter:/[\u00f3\u00f4\u01d2\u0254]/g,alternative:"o"},{letter:/\u0186\u0301/g,alternative:"O"},{letter:/\u0186\u0302/g,alternative:"O"},{letter:/\u0186\u030c/g,alternative:"O"},{letter:/[\u00d3\u00d4\u01d1\u0186]/g,alternative:"O"},{letter:/[\u00fa]/g,alternative:"u"},{letter:/[\u00da]/g,alternative:"U"}],lt:[{letter:/[\u0105]/g,alternative:"a"},{letter:/[\u0104]/g,alternative:"A"},{letter:/[\u010d]/g,alternative:"c"},{letter:/[\u010c]/g,alternative:"C"},{letter:/[\u0119\u0117]/g,alternative:"e"},{letter:/[\u0118\u0116]/g,alternative:"E"},{letter:/[\u012f]/g,alternative:"i"},{letter:/[\u012e]/g,alternative:"I"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u0173\u016b]/g,alternative:"u"},{letter:/[\u0172\u016a]/g,alternative:"U"},{letter:/[\u017e]/g,alternative:"z"},{letter:/[\u017d]/g,alternative:"Z"}],mg:[{letter:/[\u00f4]/g,alternative:"ao"},{letter:/[\u00d4]/g,alternative:"Ao"}],mk:[{letter:/[\u0430]/g,alternative:"a"},{letter:/[\u0410]/g,alternative:"A"},{letter:/[\u0431]/g,alternative:"b"},{letter:/[\u0411]/g,alternative:"B"},{letter:/[\u0432]/g,alternative:"v"},{letter:/[\u0412]/g,alternative:"V"},{letter:/[\u0433]/g,alternative:"g"},{letter:/[\u0413]/g,alternative:"G"},{letter:/[\u0434]/g,alternative:"d"},{letter:/[\u0414]/g,alternative:"D"},{letter:/[\u0453]/g,alternative:"gj"},{letter:/[\u0403]/g,alternative:"Gj"},{letter:/[\u0435]/g,alternative:"e"},{letter:/[\u0415]/g,alternative:"E"},{letter:/[\u0436]/g,alternative:"zh"},{letter:/[\u0416]/g,alternative:"Zh"},{letter:/[\u0437]/g,alternative:"z"},{letter:/[\u0417]/g,alternative:"Z"},{letter:/[\u0455]/g,alternative:"dz"},{letter:/[\u0405]/g,alternative:"Dz"},{letter:/[\u0438]/g,alternative:"i"},{letter:/[\u0418]/g,alternative:"I"},{letter:/[\u0458]/g,alternative:"j"},{letter:/[\u0408]/g,alternative:"J"},{letter:/[\u043A]/g,alternative:"k"},{letter:/[\u041A]/g,alternative:"K"},{letter:/[\u043B]/g,alternative:"l"},{letter:/[\u041B]/g,alternative:"L"},{letter:/[\u0459]/g,alternative:"lj"},{letter:/[\u0409]/g,alternative:"Lj"},{letter:/[\u043C]/g,alternative:"m"},{letter:/[\u041C]/g,alternative:"M"},{letter:/[\u043D]/g,alternative:"n"},{letter:/[\u041D]/g,alternative:"N"},{letter:/[\u045A]/g,alternative:"nj"},{letter:/[\u040A]/g,alternative:"Nj"},{letter:/[\u043E]/g,alternative:"o"},{letter:/[\u041E]/g,alternative:"O"},{letter:/[\u0440]/g,alternative:"r"},{letter:/[\u0420]/g,alternative:"R"},{letter:/[\u043F]/g,alternative:"p"},{letter:/[\u041F]/g,alternative:"P"},{letter:/[\u0441]/g,alternative:"s"},{letter:/[\u0421]/g,alternative:"S"},{letter:/[\u0442]/g,alternative:"t"},{letter:/[\u0422]/g,alternative:"T"},{letter:/[\u045C]/g,alternative:"kj"},{letter:/[\u040C]/g,alternative:"Kj"},{letter:/[\u0443]/g,alternative:"u"},{letter:/[\u0423]/g,alternative:"U"},{letter:/[\u0444]/g,alternative:"f"},{letter:/[\u0424]/g,alternative:"F"},{letter:/[\u0445]/g,alternative:"h"},{letter:/[\u0425]/g,alternative:"H"},{letter:/[\u0446]/g,alternative:"c"},{letter:/[\u0426]/g,alternative:"C"},{letter:/[\u0447]/g,alternative:"ch"},{letter:/[\u0427]/g,alternative:"Ch"},{letter:/[\u045F]/g,alternative:"dj"},{letter:/[\u040F]/g,alternative:"Dj"},{letter:/[\u0448]/g,alternative:"sh"},{letter:/[\u0428]/g,alternative:"Sh"}],mri:[{letter:/[\u0101]/g,alternative:"aa"},{letter:/[\u0100]/g,alternative:"Aa"},{letter:/[\u0113]/g,alternative:"ee"},{letter:/[\u0112]/g,alternative:"Ee"},{letter:/[\u012b]/g,alternative:"ii"},{letter:/[\u012a]/g,alternative:"Ii"},{letter:/[\u014d]/g,alternative:"oo"},{letter:/[\u014c]/g,alternative:"Oo"},{letter:/[\u016b]/g,alternative:"uu"},{letter:/[\u016a]/g,alternative:"Uu"}],mwl:[{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00e1]/g,alternative:"a"},{letter:/[\u00c1]/g,alternative:"A"},{letter:/[\u00e9\u00ea]/g,alternative:"e"},{letter:/[\u00c9\u00ca]/g,alternative:"E"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"},{letter:/[\u00f3\u00f4]/g,alternative:"o"},{letter:/[\u00d3\u00d4]/g,alternative:"O"},{letter:/[\u00fa\u0169]/g,alternative:"u"},{letter:/[\u00da\u0168]/g,alternative:"U"}],oci:[{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00e0\u00e1]/g,alternative:"a"},{letter:/[\u00c0\u00c1]/g,alternative:"A"},{letter:/[\u00e8\u00e9]/g,alternative:"e"},{letter:/[\u00c8\u00c9]/g,alternative:"E"},{letter:/[\u00ed\u00ef]/g,alternative:"i"},{letter:/[\u00cd\u00cf]/g,alternative:"I"},{letter:/[\u00f2\u00f3]/g,alternative:"o"},{letter:/[\u00d2\u00d3]/g,alternative:"O"},{letter:/[\u00fa\u00fc]/g,alternative:"u"},{letter:/[\u00da\u00dc]/g,alternative:"U"},{letter:/[\u00b7]/g,alternative:""}],orm:[{letter:/[\u0027]/g,alternative:""}],pt:[{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00e1\u00e2\u00e3\u00e0]/g,alternative:"a"},{letter:/[\u00c1\u00c2\u00c3\u00c0]/g,alternative:"A"},{letter:/[\u00e9\u00ea]/g,alternative:"e"},{letter:/[\u00c9\u00ca]/g,alternative:"E"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"},{letter:/[\u00f3\u00f4\u00f5]/g,alternative:"o"},{letter:/[\u00d3\u00d4\u00d5]/g,alternative:"O"},{letter:/[\u00fa]/g,alternative:"u"},{letter:/[\u00da]/g,alternative:"U"}],roh:[{letter:/[\u00e9\u00e8\u00ea]/g,alternative:"e"},{letter:/[\u00c9\u00c8\u00ca]/g,alternative:"E"},{letter:/[\u00ef]/g,alternative:"i"},{letter:/[\u00cf]/g,alternative:"I"},{letter:/[\u00f6]/g,alternative:"oe"},{letter:/[\u00d6]/g,alternative:"Oe"},{letter:/[\u00fc]/g,alternative:"ue"},{letter:/[\u00dc]/g,alternative:"Ue"},{letter:/[\u00e4]/g,alternative:"ae"},{letter:/[\u00c4]/g,alternative:"Ae"}],rup:[{letter:/[\u00e3]/g,alternative:"a"},{letter:/[\u00c3]/g,alternative:"A"}],ro:[{letter:/[\u0103\u00e2]/g,alternative:"a"},{letter:/[\u0102\u00c2]/g,alternative:"A"},{letter:/[\u00ee]/g,alternative:"i"},{letter:/[\u00ce]/g,alternative:"I"},{letter:/[\u0219\u015f]/g,alternative:"s"},{letter:/[\u0218\u015e]/g,alternative:"S"},{letter:/[\u021b\u0163]/g,alternative:"t"},{letter:/[\u021a\u0162]/g,alternative:"T"}],tlh:[{letter:/[\u2019\u0027]/g,alternative:""}],sk:[{letter:/[\u01c4]/g,alternative:"DZ"},{letter:/[\u01c5]/g,alternative:"Dz"},{letter:/[\u01c6]/g,alternative:"dz"},{letter:/[\u00e1\u00e4]/g,alternative:"a"},{letter:/[\u00c1\u00c4]/g,alternative:"A"},{letter:/[\u010d]/g,alternative:"c"},{letter:/[\u010c]/g,alternative:"C"},{letter:/[\u010f]/g,alternative:"d"},{letter:/[\u010e]/g,alternative:"D"},{letter:/[\u00e9]/g,alternative:"e"},{letter:/[\u00c9]/g,alternative:"E"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"},{letter:/[\u013e\u013a]/g,alternative:"l"},{letter:/[\u013d\u0139]/g,alternative:"L"},{letter:/[\u0148]/g,alternative:"n"},{letter:/[\u0147]/g,alternative:"N"},{letter:/[\u00f3\u00f4]/g,alternative:"o"},{letter:/[\u00d3\u00d4]/g,alternative:"O"},{letter:/[\u0155]/g,alternative:"r"},{letter:/[\u0154]/g,alternative:"R"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u0165]/g,alternative:"t"},{letter:/[\u0164]/g,alternative:"T"},{letter:/[\u00fa]/g,alternative:"u"},{letter:/[\u00da]/g,alternative:"U"},{letter:/[\u00fd]/g,alternative:"y"},{letter:/[\u00dd]/g,alternative:"Y"},{letter:/[\u017e]/g,alternative:"z"},{letter:/[\u017d]/g,alternative:"Z"}],sl:[{letter:/[\u010d\u0107]/g,alternative:"c"},{letter:/[\u010c\u0106]/g,alternative:"C"},{letter:/[\u0111]/g,alternative:"d"},{letter:/[\u0110]/g,alternative:"D"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u017e]/g,alternative:"z"},{letter:/[\u017d]/g,alternative:"Z"},{letter:/[\u00e0\u00e1\u0203\u0201]/g,alternative:"a"},{letter:/[\u00c0\u00c1\u0202\u0200]/g,alternative:"A"},{letter:/[\u00e8\u00e9\u0207\u0205]/g,alternative:"e"},{letter:/\u01dd\u0300/g,alternative:"e"},{letter:/\u01dd\u030f/g,alternative:"e"},{letter:/\u1eb9\u0301/g,alternative:"e"},{letter:/\u1eb9\u0311/g,alternative:"e"},{letter:/[\u00c8\u00c9\u0206\u0204]/g,alternative:"E"},{letter:/\u018e\u030f/g,alternative:"E"},{letter:/\u018e\u0300/g,alternative:"E"},{letter:/\u1eb8\u0311/g,alternative:"E"},{letter:/\u1eb8\u0301/g,alternative:"E"},{letter:/[\u00ec\u00ed\u020b\u0209]/g,alternative:"i"},{letter:/[\u00cc\u00cd\u020a\u0208]/g,alternative:"I"},{letter:/[\u00f2\u00f3\u020f\u020d]/g,alternative:"o"},{letter:/\u1ecd\u0311/g,alternative:"o"},{letter:/\u1ecd\u0301/g,alternative:"o"},{letter:/\u1ecc\u0311/g,alternative:"O"},{letter:/\u1ecc\u0301/g,alternative:"O"},{letter:/[\u00d2\u00d3\u020e\u020c]/g,alternative:"O"},{letter:/[\u00f9\u00fa\u0217\u0215]/g,alternative:"u"},{letter:/[\u00d9\u00da\u0216\u0214]/g,alternative:"U"},{letter:/[\u0155\u0213]/g,alternative:"r"},{letter:/[\u0154\u0212]/g,alternative:"R"}],sq:[{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00eb]/g,alternative:"e"},{letter:/[\u00cb]/g,alternative:"E"}],hu:[{letter:/[\u00e1]/g,alternative:"a"},{letter:/[\u00c1]/g,alternative:"A"},{letter:/[\u00e9]/g,alternative:"e"},{letter:/[\u00c9]/g,alternative:"E"},{letter:/[\u00ed]/g,alternative:"i"},{letter:/[\u00cd]/g,alternative:"I"},{letter:/[\u00f3\u00f6\u0151]/g,alternative:"o"},{letter:/[\u00d3\u00d6\u0150]/g,alternative:"O"},{letter:/[\u00fa\u00fc\u0171]/g,alternative:"u"},{letter:/[\u00da\u00dc\u0170]/g,alternative:"U"}],srd:[{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00e0\u00e1]/g,alternative:"a"},{letter:/[\u00c0\u00c1]/g,alternative:"A"},{letter:/[\u00e8\u00e9]/g,alternative:"e"},{letter:/[\u00c8\u00c9]/g,alternative:"E"},{letter:/[\u00ed\u00ef]/g,alternative:"i"},{letter:/[\u00cd\u00cf]/g,alternative:"I"},{letter:/[\u00f2\u00f3]/g,alternative:"o"},{letter:/[\u00d2\u00d3]/g,alternative:"O"},{letter:/[\u00fa\u00f9]/g,alternative:"u"},{letter:/[\u00da\u00d9]/g,alternative:"U"}],szl:[{letter:/[\u0107]/g,alternative:"c"},{letter:/[\u0106]/g,alternative:"C"},{letter:/[\u00e3]/g,alternative:"a"},{letter:/[\u00c3]/g,alternative:"A"},{letter:/[\u0142]/g,alternative:"u"},{letter:/[\u0141]/g,alternative:"U"},{letter:/[\u006e]/g,alternative:"n"},{letter:/[\u004e]/g,alternative:"N"},{letter:/[\u014f\u014d\u00f4\u00f5]/g,alternative:"o"},{letter:/[\u014e\u014c\u00d4\u00d5]/g,alternative:"O"},{letter:/[\u015b]/g,alternative:"s"},{letter:/[\u015a]/g,alternative:"S"},{letter:/[\u017a\u017c\u017e]/g,alternative:"z"},{letter:/[\u0179\u017b\u017d]/g,alternative:"Z"},{letter:/[\u016f]/g,alternative:"u"},{letter:/[\u016e]/g,alternative:"U"},{letter:/[\u010d]/g,alternative:"cz"},{letter:/[\u010c]/g,alternative:"Cz"},{letter:/[\u0159]/g,alternative:"rz"},{letter:/[\u0158]/g,alternative:"Rz"},{letter:/[\u0161]/g,alternative:"sz"},{letter:/[\u0160]/g,alternative:"Sz"}],tah:[{letter:/[\u0101\u00e2\u00e0]/g,alternative:"a"},{letter:/[\u0100\u00c2\u00c0]/g,alternative:"A"},{letter:/[\u00ef\u00ee\u00ec]/g,alternative:"i"},{letter:/[\u00cf\u00ce\u00cc]/g,alternative:"I"},{letter:/[\u0113\u00ea\u00e9]/g,alternative:"e"},{letter:/[\u0112\u00ca\u00c9]/g,alternative:"E"},{letter:/[\u016b\u00fb\u00fa]/g,alternative:"u"},{letter:/[\u016a\u00db\u00da]/g,alternative:"U"},{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/[\u00f2\u00f4\u014d]/g,alternative:"o"},{letter:/[\u00d2\u00d4\u014c]/g,alternative:"O"},{letter:/[\u2019\u0027\u2018]/g,alternative:""}],vec:[{letter:/\u0073\u002d\u0063/g,alternative:"sc"},{letter:/\u0053\u002d\u0043/g,alternative:"SC"},{letter:/\u0073\u0027\u0063/g,alternative:"sc"},{letter:/\u0053\u0027\u0043/g,alternative:"SC"},{letter:/\u0073\u2019\u0063/g,alternative:"sc"},{letter:/\u0053\u2019\u0043/g,alternative:"SC"},{letter:/\u0073\u2018\u0063/g,alternative:"sc"},{letter:/\u0053\u2018\u0043/g,alternative:"SC"},{letter:/\u0053\u002d\u0063/g,alternative:"Sc"},{letter:/\u0053\u0027\u0063/g,alternative:"Sc"},{letter:/\u0053\u2019\u0063/g,alternative:"Sc"},{letter:/\u0053\u2018\u0063/g,alternative:"Sc"},{letter:/\u0063\u2019/g,alternative:"c"},{letter:/\u0043\u2019/g,alternative:"C"},{letter:/\u0063\u2018/g,alternative:"c"},{letter:/\u0043\u2018/g,alternative:"C"},{letter:/\u0063\u0027/g,alternative:"c"},{letter:/\u0043\u0027/g,alternative:"C"},{letter:/[\u00e0\u00e1\u00e2]/g,alternative:"a"},{letter:/[\u00c0\u00c1\u00c2]/g,alternative:"A"},{letter:/[\u00e8\u00e9]/g,alternative:"e"},{letter:/[\u00c8\u00c9]/g,alternative:"E"},{letter:/[\u00f2\u00f3]/g,alternative:"o"},{letter:/[\u00d2\u00d3]/g,alternative:"O"},{letter:/[\u00f9\u00fa]/g,alternative:"u"},{letter:/[\u00d9\u00da]/g,alternative:"U"},{letter:/[\u00e7\u010d\u010b]/g,alternative:"c"},{letter:/[\u00c7\u010c\u010a]/g,alternative:"C"},{letter:/[\u0142]/g,alternative:"l"},{letter:/[\u00a3\u0141]/g,alternative:"L"},{letter:/\ud835\udeff/g,alternative:"dh"},{letter:/[\u0111\u03b4]/g,alternative:"dh"},{letter:/[\u0110\u0394]/g,alternative:"Dh"}],wa:[{letter:/[\u00e2\u00e5]/g,alternative:"a"},{letter:/[\u00c2\u00c5]/g,alternative:"A"},{letter:/[\u00e7]/g,alternative:"c"},{letter:/[\u00c7]/g,alternative:"C"},{letter:/\u0065\u030a/g,alternative:"e"},{letter:/\u0045\u030a/g,alternative:"E"},{letter:/[\u00eb\u00ea\u00e8\u00e9]/g,alternative:"e"},{letter:/[\u00c9\u00c8\u00ca\u00cb]/g,alternative:"E"},{letter:/[\u00ee]/g,alternative:"i"},{letter:/[\u00ce]/g,alternative:"I"},{letter:/[\u00f4\u00f6]/g,alternative:"o"},{letter:/[\u00d6\u00d4]/g,alternative:"O"},{letter:/[\u00fb]/g,alternative:"u"},{letter:/[\u00db]/g,alternative:"U"}],yor:[{letter:/[\u00e1\u00e0]/g,alternative:"a"},{letter:/[\u00c1\u00c0]/g,alternative:"A"},{letter:/[\u00ec\u00ed]/g,alternative:"i"},{letter:/[\u00cc\u00cd]/g,alternative:"I"},{letter:/\u1ecd\u0301/g,alternative:"o"},{letter:/\u1ecc\u0301/g,alternative:"O"},{letter:/\u1ecd\u0300/g,alternative:"o"},{letter:/\u1ecc\u0300/g,alternative:"O"},{letter:/[\u00f3\u00f2\u1ecd]/g,alternative:"o"},{letter:/[\u00d3\u00d2\u1ecc]/g,alternative:"O"},{letter:/[\u00fa\u00f9]/g,alternative:"u"},{letter:/[\u00da\u00d9]/g,alternative:"U"},{letter:/\u1eb9\u0301/g,alternative:"e"},{letter:/\u1eb8\u0301/g,alternative:"E"},{letter:/\u1eb9\u0300/g,alternative:"e"},{letter:/\u1eb8\u0300/g,alternative:"E"},{letter:/[\u00e9\u00e8\u1eb9]/g,alternative:"e"},{letter:/[\u00c9\u00c8\u1eb8]/g,alternative:"E"},{letter:/[\u1e63]/g,alternative:"s"},{letter:/[\u1e62]/g,alternative:"S"}]};function y0(a){if(M(a))return[];switch(xa(a)){case"es":return f.es;case"pl":return f.pl;case"de":return f.de;case"nb":case"nn":return f.nbnn;case"sv":return f.sv;case"fi":return f.fi;case"da":return f.da;case"tr":return f.tr;case"lv":return f.lv;case"is":return f.is;case"fa":return f.fa;case"cs":return f.cs;case"ru":return f.ru;case"eo":return f.eo;case"af":return f.af;case"bal":case"ca":return f.ca;case"ast":return f.ast;case"an":return f.an;case"ay":return f.ay;case"en":return f.en;case"fr":return f.fr;case"it":return f.it;case"nl":return f.nl;case"bm":return f.bm;case"uk":return f.uk;case"br":return f.br;case"ch":return f.ch;case"csb":return f.csb;case"cy":return f.cy;case"ee":return f.ee;case"et":return f.et;case"eu":return f.eu;case"fuc":return f.fuc;case"fj":return f.fj;case"frp":return f.frp;case"fur":return f.fur;case"fy":return f.fy;case"ga":return f.ga;case"gd":return f.gd;case"gl":return f.gl;case"gn":return f.gn;case"gsw":return f.gsw;case"hat":return f.hat;case"haw":return f.haw;case"hr":return f.hr;case"ka":return f.ka;case"kal":return f.kal;case"kin":return f.kin;case"lb":return f.lb;case"li":return f.li;case"lin":return f.lin;case"lt":return f.lt;case"mg":return f.mg;case"mk":return f.mk;case"mri":return f.mri;case"mwl":return f.mwl;case"oci":return f.oci;case"orm":return f.orm;case"pt":return f.pt;case"roh":return f.roh;case"rup":return f.rup;case"ro":return f.ro;case"tlh":return f.tlh;case"sk":return f.sk;case"sl":return f.sl;case"sq":return f.sq;case"hu":return f.hu;case"srd":return f.srd;case"szl":return f.szl;case"tah":return f.tah;case"vec":return f.vec;case"wa":return f.wa;case"yor":return f.yor;default:return[]}}function b0(a,e){const t=y0(e);for(let i=0;i<t.length;i++)a=a.replace(t[i].letter,t[i].alternative);return a}const f0=[{letter:/[\u00A3]/g,alternative:""},{letter:/[\u20AC]/g,alternative:"E"},{letter:/[\u00AA]/g,alternative:"a"},{letter:/[\u00BA]/g,alternative:"o"},{letter:/[\u00C0]/g,alternative:"A"},{letter:/[\u00C1]/g,alternative:"A"},{letter:/[\u00C2]/g,alternative:"A"},{letter:/[\u00C3]/g,alternative:"A"},{letter:/[\u00C4]/g,alternative:"A"},{letter:/[\u00C5]/g,alternative:"A"},{letter:/[\u00C6]/g,alternative:"AE"},{letter:/[\u00C7]/g,alternative:"C"},{letter:/[\u00C8]/g,alternative:"E"},{letter:/[\u00C9]/g,alternative:"E"},{letter:/[\u00CA]/g,alternative:"E"},{letter:/[\u00CB]/g,alternative:"E"},{letter:/[\u00CC]/g,alternative:"I"},{letter:/[\u00CD]/g,alternative:"I"},{letter:/[\u00CE]/g,alternative:"I"},{letter:/[\u00CF]/g,alternative:"I"},{letter:/[\u00D0]/g,alternative:"D"},{letter:/[\u00D1]/g,alternative:"N"},{letter:/[\u00D2]/g,alternative:"O"},{letter:/[\u00D3]/g,alternative:"O"},{letter:/[\u00D4]/g,alternative:"O"},{letter:/[\u00D5]/g,alternative:"O"},{letter:/[\u00D6]/g,alternative:"O"},{letter:/[\u00D8]/g,alternative:"O"},{letter:/[\u00D9]/g,alternative:"U"},{letter:/[\u00DA]/g,alternative:"U"},{letter:/[\u00DB]/g,alternative:"U"},{letter:/[\u00DC]/g,alternative:"U"},{letter:/[\u00DD]/g,alternative:"Y"},{letter:/[\u00DE]/g,alternative:"TH"},{letter:/[\u00DF]/g,alternative:"s"},{letter:/[\u00E0]/g,alternative:"a"},{letter:/[\u00E1]/g,alternative:"a"},{letter:/[\u00E2]/g,alternative:"a"},{letter:/[\u00E3]/g,alternative:"a"},{letter:/[\u00E4]/g,alternative:"a"},{letter:/[\u00E5]/g,alternative:"a"},{letter:/[\u00E6]/g,alternative:"ae"},{letter:/[\u00E7]/g,alternative:"c"},{letter:/[\u00E8]/g,alternative:"e"},{letter:/[\u00E9]/g,alternative:"e"},{letter:/[\u00EA]/g,alternative:"e"},{letter:/[\u00EB]/g,alternative:"e"},{letter:/[\u00EC]/g,alternative:"i"},{letter:/[\u00ED]/g,alternative:"i"},{letter:/[\u00EE]/g,alternative:"i"},{letter:/[\u00EF]/g,alternative:"i"},{letter:/[\u00F0]/g,alternative:"d"},{letter:/[\u00F1]/g,alternative:"n"},{letter:/[\u00F2]/g,alternative:"o"},{letter:/[\u00F3]/g,alternative:"o"},{letter:/[\u00F4]/g,alternative:"o"},{letter:/[\u00F5]/g,alternative:"o"},{letter:/[\u00F6]/g,alternative:"o"},{letter:/[\u00F8]/g,alternative:"o"},{letter:/[\u00F9]/g,alternative:"u"},{letter:/[\u00FA]/g,alternative:"u"},{letter:/[\u00FB]/g,alternative:"u"},{letter:/[\u00FC]/g,alternative:"u"},{letter:/[\u00FD]/g,alternative:"y"},{letter:/[\u00FE]/g,alternative:"th"},{letter:/[\u00FF]/g,alternative:"y"},{letter:/[\u0100]/g,alternative:"A"},{letter:/[\u0101]/g,alternative:"a"},{letter:/[\u0102]/g,alternative:"A"},{letter:/[\u0103]/g,alternative:"a"},{letter:/[\u0104]/g,alternative:"A"},{letter:/[\u0105]/g,alternative:"a"},{letter:/[\u0106]/g,alternative:"C"},{letter:/[\u0107]/g,alternative:"c"},{letter:/[\u0108]/g,alternative:"C"},{letter:/[\u0109]/g,alternative:"c"},{letter:/[\u010A]/g,alternative:"C"},{letter:/[\u010B]/g,alternative:"c"},{letter:/[\u010C]/g,alternative:"C"},{letter:/[\u010D]/g,alternative:"c"},{letter:/[\u010E]/g,alternative:"D"},{letter:/[\u010F]/g,alternative:"d"},{letter:/[\u0110]/g,alternative:"D"},{letter:/[\u0111]/g,alternative:"d"},{letter:/[\u0112]/g,alternative:"E"},{letter:/[\u0113]/g,alternative:"e"},{letter:/[\u0114]/g,alternative:"E"},{letter:/[\u0115]/g,alternative:"e"},{letter:/[\u0116]/g,alternative:"E"},{letter:/[\u0117]/g,alternative:"e"},{letter:/[\u0118]/g,alternative:"E"},{letter:/[\u0119]/g,alternative:"e"},{letter:/[\u011A]/g,alternative:"E"},{letter:/[\u011B]/g,alternative:"e"},{letter:/[\u011C]/g,alternative:"G"},{letter:/[\u011D]/g,alternative:"g"},{letter:/[\u011E]/g,alternative:"G"},{letter:/[\u011F]/g,alternative:"g"},{letter:/[\u0120]/g,alternative:"G"},{letter:/[\u0121]/g,alternative:"g"},{letter:/[\u0122]/g,alternative:"G"},{letter:/[\u0123]/g,alternative:"g"},{letter:/[\u0124]/g,alternative:"H"},{letter:/[\u0125]/g,alternative:"h"},{letter:/[\u0126]/g,alternative:"H"},{letter:/[\u0127]/g,alternative:"h"},{letter:/[\u0128]/g,alternative:"I"},{letter:/[\u0129]/g,alternative:"i"},{letter:/[\u012A]/g,alternative:"I"},{letter:/[\u012B]/g,alternative:"i"},{letter:/[\u012C]/g,alternative:"I"},{letter:/[\u012D]/g,alternative:"i"},{letter:/[\u012E]/g,alternative:"I"},{letter:/[\u012F]/g,alternative:"i"},{letter:/[\u0130]/g,alternative:"I"},{letter:/[\u0131]/g,alternative:"i"},{letter:/[\u0132]/g,alternative:"IJ"},{letter:/[\u0133]/g,alternative:"ij"},{letter:/[\u0134]/g,alternative:"J"},{letter:/[\u0135]/g,alternative:"j"},{letter:/[\u0136]/g,alternative:"K"},{letter:/[\u0137]/g,alternative:"k"},{letter:/[\u0138]/g,alternative:"k"},{letter:/[\u0139]/g,alternative:"L"},{letter:/[\u013A]/g,alternative:"l"},{letter:/[\u013B]/g,alternative:"L"},{letter:/[\u013C]/g,alternative:"l"},{letter:/[\u013D]/g,alternative:"L"},{letter:/[\u013E]/g,alternative:"l"},{letter:/[\u013F]/g,alternative:"L"},{letter:/[\u0140]/g,alternative:"l"},{letter:/[\u0141]/g,alternative:"L"},{letter:/[\u0142]/g,alternative:"l"},{letter:/[\u0143]/g,alternative:"N"},{letter:/[\u0144]/g,alternative:"n"},{letter:/[\u0145]/g,alternative:"N"},{letter:/[\u0146]/g,alternative:"n"},{letter:/[\u0147]/g,alternative:"N"},{letter:/[\u0148]/g,alternative:"n"},{letter:/[\u0149]/g,alternative:"n"},{letter:/[\u014A]/g,alternative:"N"},{letter:/[\u014B]/g,alternative:"n"},{letter:/[\u014C]/g,alternative:"O"},{letter:/[\u014D]/g,alternative:"o"},{letter:/[\u014E]/g,alternative:"O"},{letter:/[\u014F]/g,alternative:"o"},{letter:/[\u0150]/g,alternative:"O"},{letter:/[\u0151]/g,alternative:"o"},{letter:/[\u0152]/g,alternative:"OE"},{letter:/[\u0153]/g,alternative:"oe"},{letter:/[\u0154]/g,alternative:"R"},{letter:/[\u0155]/g,alternative:"r"},{letter:/[\u0156]/g,alternative:"R"},{letter:/[\u0157]/g,alternative:"r"},{letter:/[\u0158]/g,alternative:"R"},{letter:/[\u0159]/g,alternative:"r"},{letter:/[\u015A]/g,alternative:"S"},{letter:/[\u015B]/g,alternative:"s"},{letter:/[\u015C]/g,alternative:"S"},{letter:/[\u015D]/g,alternative:"s"},{letter:/[\u015E]/g,alternative:"S"},{letter:/[\u015F]/g,alternative:"s"},{letter:/[\u0160]/g,alternative:"S"},{letter:/[\u0161]/g,alternative:"s"},{letter:/[\u0162]/g,alternative:"T"},{letter:/[\u0163]/g,alternative:"t"},{letter:/[\u0164]/g,alternative:"T"},{letter:/[\u0165]/g,alternative:"t"},{letter:/[\u0166]/g,alternative:"T"},{letter:/[\u0167]/g,alternative:"t"},{letter:/[\u0168]/g,alternative:"U"},{letter:/[\u0169]/g,alternative:"u"},{letter:/[\u016A]/g,alternative:"U"},{letter:/[\u016B]/g,alternative:"u"},{letter:/[\u016C]/g,alternative:"U"},{letter:/[\u016D]/g,alternative:"u"},{letter:/[\u016E]/g,alternative:"U"},{letter:/[\u016F]/g,alternative:"u"},{letter:/[\u0170]/g,alternative:"U"},{letter:/[\u0171]/g,alternative:"u"},{letter:/[\u0172]/g,alternative:"U"},{letter:/[\u0173]/g,alternative:"u"},{letter:/[\u0174]/g,alternative:"W"},{letter:/[\u0175]/g,alternative:"w"},{letter:/[\u0176]/g,alternative:"Y"},{letter:/[\u0177]/g,alternative:"y"},{letter:/[\u0178]/g,alternative:"Y"},{letter:/[\u0179]/g,alternative:"Z"},{letter:/[\u017A]/g,alternative:"z"},{letter:/[\u017B]/g,alternative:"Z"},{letter:/[\u017C]/g,alternative:"z"},{letter:/[\u017D]/g,alternative:"Z"},{letter:/[\u017E]/g,alternative:"z"},{letter:/[\u017F]/g,alternative:"s"},{letter:/[\u01A0]/g,alternative:"O"},{letter:/[\u01A1]/g,alternative:"o"},{letter:/[\u01AF]/g,alternative:"U"},{letter:/[\u01B0]/g,alternative:"u"},{letter:/[\u01CD]/g,alternative:"A"},{letter:/[\u01CE]/g,alternative:"a"},{letter:/[\u01CF]/g,alternative:"I"},{letter:/[\u01D0]/g,alternative:"i"},{letter:/[\u01D1]/g,alternative:"O"},{letter:/[\u01D2]/g,alternative:"o"},{letter:/[\u01D3]/g,alternative:"U"},{letter:/[\u01D4]/g,alternative:"u"},{letter:/[\u01D5]/g,alternative:"U"},{letter:/[\u01D6]/g,alternative:"u"},{letter:/[\u01D7]/g,alternative:"U"},{letter:/[\u01D8]/g,alternative:"u"},{letter:/[\u01D9]/g,alternative:"U"},{letter:/[\u01DA]/g,alternative:"u"},{letter:/[\u01DB]/g,alternative:"U"},{letter:/[\u01DC]/g,alternative:"u"},{letter:/[\u0218]/g,alternative:"S"},{letter:/[\u0219]/g,alternative:"s"},{letter:/[\u021A]/g,alternative:"T"},{letter:/[\u021B]/g,alternative:"t"},{letter:/[\u0251]/g,alternative:"a"},{letter:/[\u1EA0]/g,alternative:"A"},{letter:/[\u1EA1]/g,alternative:"a"},{letter:/[\u1EA2]/g,alternative:"A"},{letter:/[\u1EA3]/g,alternative:"a"},{letter:/[\u1EA4]/g,alternative:"A"},{letter:/[\u1EA5]/g,alternative:"a"},{letter:/[\u1EA6]/g,alternative:"A"},{letter:/[\u1EA7]/g,alternative:"a"},{letter:/[\u1EA8]/g,alternative:"A"},{letter:/[\u1EA9]/g,alternative:"a"},{letter:/[\u1EAA]/g,alternative:"A"},{letter:/[\u1EAB]/g,alternative:"a"},{letter:/[\u1EA6]/g,alternative:"A"},{letter:/[\u1EAD]/g,alternative:"a"},{letter:/[\u1EAE]/g,alternative:"A"},{letter:/[\u1EAF]/g,alternative:"a"},{letter:/[\u1EB0]/g,alternative:"A"},{letter:/[\u1EB1]/g,alternative:"a"},{letter:/[\u1EB2]/g,alternative:"A"},{letter:/[\u1EB3]/g,alternative:"a"},{letter:/[\u1EB4]/g,alternative:"A"},{letter:/[\u1EB5]/g,alternative:"a"},{letter:/[\u1EB6]/g,alternative:"A"},{letter:/[\u1EB7]/g,alternative:"a"},{letter:/[\u1EB8]/g,alternative:"E"},{letter:/[\u1EB9]/g,alternative:"e"},{letter:/[\u1EBA]/g,alternative:"E"},{letter:/[\u1EBB]/g,alternative:"e"},{letter:/[\u1EBC]/g,alternative:"E"},{letter:/[\u1EBD]/g,alternative:"e"},{letter:/[\u1EBE]/g,alternative:"E"},{letter:/[\u1EBF]/g,alternative:"e"},{letter:/[\u1EC0]/g,alternative:"E"},{letter:/[\u1EC1]/g,alternative:"e"},{letter:/[\u1EC2]/g,alternative:"E"},{letter:/[\u1EC3]/g,alternative:"e"},{letter:/[\u1EC4]/g,alternative:"E"},{letter:/[\u1EC5]/g,alternative:"e"},{letter:/[\u1EC6]/g,alternative:"E"},{letter:/[\u1EC7]/g,alternative:"e"},{letter:/[\u1EC8]/g,alternative:"I"},{letter:/[\u1EC9]/g,alternative:"i"},{letter:/[\u1ECA]/g,alternative:"I"},{letter:/[\u1ECB]/g,alternative:"i"},{letter:/[\u1ECC]/g,alternative:"O"},{letter:/[\u1ECD]/g,alternative:"o"},{letter:/[\u1ECE]/g,alternative:"O"},{letter:/[\u1ECF]/g,alternative:"o"},{letter:/[\u1ED0]/g,alternative:"O"},{letter:/[\u1ED1]/g,alternative:"o"},{letter:/[\u1ED2]/g,alternative:"O"},{letter:/[\u1ED3]/g,alternative:"o"},{letter:/[\u1ED4]/g,alternative:"O"},{letter:/[\u1ED5]/g,alternative:"o"},{letter:/[\u1ED6]/g,alternative:"O"},{letter:/[\u1ED7]/g,alternative:"o"},{letter:/[\u1ED8]/g,alternative:"O"},{letter:/[\u1ED9]/g,alternative:"o"},{letter:/[\u1EDA]/g,alternative:"O"},{letter:/[\u1EDB]/g,alternative:"o"},{letter:/[\u1EDC]/g,alternative:"O"},{letter:/[\u1EDD]/g,alternative:"o"},{letter:/[\u1EDE]/g,alternative:"O"},{letter:/[\u1EDF]/g,alternative:"o"},{letter:/[\u1EE0]/g,alternative:"O"},{letter:/[\u1EE1]/g,alternative:"o"},{letter:/[\u1EE2]/g,alternative:"O"},{letter:/[\u1EE3]/g,alternative:"o"},{letter:/[\u1EE4]/g,alternative:"U"},{letter:/[\u1EE5]/g,alternative:"u"},{letter:/[\u1EE6]/g,alternative:"U"},{letter:/[\u1EE7]/g,alternative:"u"},{letter:/[\u1EE8]/g,alternative:"U"},{letter:/[\u1EE9]/g,alternative:"u"},{letter:/[\u1EEA]/g,alternative:"U"},{letter:/[\u1EEB]/g,alternative:"u"},{letter:/[\u1EEC]/g,alternative:"U"},{letter:/[\u1EED]/g,alternative:"u"},{letter:/[\u1EEE]/g,alternative:"U"},{letter:/[\u1EEF]/g,alternative:"u"},{letter:/[\u1EF0]/g,alternative:"U"},{letter:/[\u1EF1]/g,alternative:"u"},{letter:/[\u1EF2]/g,alternative:"Y"},{letter:/[\u1EF3]/g,alternative:"y"},{letter:/[\u1EF4]/g,alternative:"Y"},{letter:/[\u1EF5]/g,alternative:"y"},{letter:/[\u1EF6]/g,alternative:"Y"},{letter:/[\u1EF7]/g,alternative:"y"},{letter:/[\u1EF8]/g,alternative:"Y"},{letter:/[\u1EF9]/g,alternative:"y"}],lt={de:[{letter:/[\u00C4]/g,alternative:"Ae"},{letter:/[\u00E4]/g,alternative:"ae"},{letter:/[\u00D6]/g,alternative:"Oe"},{letter:/[\u00F6]/g,alternative:"oe"},{letter:/[\u00DC]/g,alternative:"Ue"},{letter:/[\u00FC]/g,alternative:"ue"},{letter:/[\u1E9E]/g,alternative:"SS"},{letter:/[\u00DF]/g,alternative:"ss"}],da:[{letter:/[\u00C6]/g,alternative:"Ae"},{letter:/[\u00E6]/g,alternative:"ae"},{letter:/[\u00D8]/g,alternative:"Oe"},{letter:/[\u00F8]/g,alternative:"oe"},{letter:/[\u00C5]/g,alternative:"Aa"},{letter:/[\u00E5]/g,alternative:"aa"}],ca:[{letter:/[\u00B7]/g,alternative:"ll"}],srAndBs:[{letter:/[\u0110]/g,alternative:"DJ"},{letter:/[\u0111]/g,alternative:"dj"}]},v0=function(a){switch(a){case"de":return lt.de;case"da":return lt.da;case"ca":return lt.ca;case"sr":return lt.srAndBs;case"bs":return lt.srAndBs;default:return[]}};function h0(a){if(M(a))return[];let e=f0;return e=e.concat(v0(xa(a))),e}function k0(a,e){const t=h0(e);for(let i=t.length-1;0<=i;i--)a=a.replace(t[i].letter,t[i].alternative);return a}function j0(a){const e=[],t=na(a);let i=0;return t.forEach(function(o){const n=a.indexOf(o,i);e.push(n),i=n+o.length}),e}function ti(a,e){const t=[];if(-1<a.indexOf(e))for(let i=0;i<a.length;i++)a[i]===e&&t.push(i);return t}function Bo(a,e){return da(a,function(t){return!O(e,t)})}function x0(a,e){return da(a,function(t){return O(e,t)})}function Ro(a){function e(t,i){const o=t[0];if(typeof o>"u")return i;for(let n=0,r=i.length;n<r;++n)i.push(i[n].concat(o));return e(t.slice(1),i)}return e(a,[[]]).slice(1).concat([[]])}function ii(a,e,t){const i=a.split("");return e.forEach(function(o){i.splice(o,1,t)}),i.join("")}function q0(a){const e=ti(a,"İ").concat(ti(a,"I"),ti(a,"i"),ti(a,"ı"));if(e.sort(),e.length===0)return[a];const t=x0(j0(a),e),i=[];Ro(t).forEach(function(r){if(r===t)i.push([r,[],[],[]]);else{const s=Bo(t,r);Ro(s).forEach(function(l){if(l===s)i.push([r,l,[],[]]);else{const c=Bo(s,l);Ro(c).forEach(function(p){if(p===c)i.push([r,l,p,[]]);else{const m=Bo(c,p);i.push([r,l,p,m])}})}})}});const n=[];return i.forEach(function(r){const s=ii(a,r[0],"İ"),d=ii(s,r[1],"I"),l=ii(d,r[2],"i"),c=ii(l,r[3],"ı");n.push(c)}),n}const E0=za(q0),Wo=function(a,e){return a=Xe(a,!1,"\\]\\[",e),new RegExp(a,"ig")};function A0(a,e,t){let i=Wo(e,t),o;if(t==="tr_TR"){const c=E0(e);i=new RegExp(c.map(u=>Xe(u)).join("|"),"ig")}const n=a.match(i)||[];a=a.replace(i,"");const r=b0(e,t),s=Wo(r,t),d=a.match(s)||[],l=k0(e,t);if(o=n.concat(d),l!==r){const c=Wo(l,t),u=a.match(c)||[];o=o.concat(u)}return ea(o,function(c){return K(c)})}function ct(a,e,t){a=w0(a),a=Xb(a),a=ao(a),e=K(ao(e));let i=A0(a,e,t);i=ea(i,function(n){return K(ld(n))});const o=ea(i,function(n){return a.indexOf(n)});return{count:i.length,matches:i,position:Math.min(...o)}}const oi="all-in-one-seo-pack",ni={noMatches:3,matches:9};function P0(a,e,t){return a?0<ct(a,e,t).count?{title:z("Focus Keyword in content",oi),description:z("Focus Keyword found in content.",oi),score:ni.matches,maxScore:ni.matches,error:0}:{title:z("Focus Keyword in content",oi),description:z("Focus Keyword not found in content.",oi),score:ni.noMatches,maxScore:ni.matches,error:1}:{}}const yl="all-in-one-seo-pack";function ut(a){return z(a==="focus"?"Focus keyword":"Keyword",yl)}const Mo="all-in-one-seo-pack",ri={noMatches:3,matches:9};function S0(a,e,t,i){if(!a)return{};const o=ut(t),n=ct(a,e,i),r=D(z("%1$s in meta description",Mo),o);return 0<n.count?{title:r,description:D(z("%1$s found in meta description.",Mo),o),score:ri.matches,maxScore:ri.matches,error:0}:{title:r,description:D(z("%1$s not found in meta description.",Mo),o),score:ri.noMatches,maxScore:ri.matches,error:1}}const si="all-in-one-seo-pack",di={noMatches:3,goodNumberOfMatches:9};function F0(a,e,t){if(!a)return{};const i=new RegExp("<img*","gi");if(a.match(i)===null)return{};const n=ut(t),s=ad(e.split(" ")).join(" ").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/ /g,".*"),d=new RegExp(`<img[^>]*alt=['"][^'"]*`+s+`[^'"]*['"]`,"gi");return a.toLowerCase().match(d)!==null?{title:D(z("%1$s in image alt attributes",si),n),description:D(z("%1$s found in image alt attribute(s).",si),n),score:di.goodNumberOfMatches,maxScore:di.goodNumberOfMatches,error:0}:{title:D(z("%1$s in image alt attributes",si),n),description:D(z("%1$s not found in image alt attribute(s). Add an image with your %1$s as alt text.",si),n),score:di.noMatches,maxScore:di.goodNumberOfMatches,error:1}}const $0=function(a){const e=[],t=/<p(?:[^>]+)?>(.+?)<\/p>|\[.+?](.+?)\[\/.+?]/ig;let i;for(;(i=t.exec(a))!==null;){const o=i[1]||i[2]||"";o&&e.push(o)}return e};function C0(a){let e=$0(a),t=rd(a);return 0<e.length||(t=da(t,function(i){return i.indexOf("<h")!==0}),e=Dt(t,function(i){return i.split(`
`)}),0<e.length)?e:[a]}const li="all-in-one-seo-pack",_e={noContent:0,noMatches:3,matches:9};function _0(a,e,t,i){if(!a)return{};const o=ut(t),n=D(z("%1$s in introduction",li),o);if(!a)return{title:n,description:z("No content added yet.",li),score:_e.noContent,maxScore:_e.matches,error:1};let r=C0(a);return r=Cb(r,Ha),0<ct(r[0],e,i).count?{title:n,description:D(z("Your %1$s appears in the first paragraph. Well done!",li),o),score:_e.matches,maxScore:_e.matches,error:0}:{title:n,description:D(z("Your %1$s does not appear in the first paragraph. Make sure the topic is clear immediately.",li),o),score:_e.noMatches,maxScore:_e.matches,error:1}}function D0(a){const e=[],t=/<h([2-3])(?:[^>]+)?>(.*?)<\/h\1>/ig;let i;for(;(i=t.exec(a))!==null;)e.push(i);return e}function I0(a){return D0(a).map(t=>t[0])}function O0(a,e,t){return a>=e&&a<=t}const Pa="all-in-one-seo-pack",ci={lowerBoundary:.3,upperBoundary:.75},Sa={noMatches:3,tooFewMatches:3,goodNumberOfMatches:9,tooManyMatches:3},ua={count:0,matches:0,percentReflectingTopic:0};let ce,Lo,No;function T0(){return 0<ua.matches&&ua.matches<Lo}function B0(){return 1<ua.count&&ua.matches>No}function R0(){return ua.count===1&&ua.matches===1}function W0(){return O0(ua.matches,Lo,No)}function M0(a,e,t){return e.filter(i=>0<ct(oe(i),a,t).count).length}function L0(a,e,t){return a?(ce=I0(a),ce.length?(Lo=Math.ceil(ce.length*ci.lowerBoundary),No=Math.floor(ce.length*ci.upperBoundary),ce.length!==0&&(ua.count=ce.length,ua.matches=M0(e,ce,t),ua.percentReflectingTopic=ua.matches/ua.count*100),T0()?{title:z("Focus Keyword in Subheadings",Pa),description:D(z("Less than %1$s of your H2 and H3 subheadings reflect the topic of your copy. That's too few.",Pa),ci.lowerBoundary*100+"%"),score:Sa.tooFewMatches,maxScore:Sa.goodNumberOfMatches,error:1}:B0()?{title:z("Focus Keyword in Subheadings",Pa),description:D(z("More than %1$s of your H2 and H3 subheadings reflect the topic of your copy. That's too much. Don't over-optimize!",Pa),ci.upperBoundary*100+"%"),score:Sa.tooManyMatches,maxScore:Sa.goodNumberOfMatches,error:1}:R0()?{title:z("Focus Keyword in Subheadings",Pa),description:z("Your H2 or H3 subheading reflects the topic of your copy. Good job!",Pa),score:Sa.goodNumberOfMatches,maxScore:Sa.goodNumberOfMatches,error:0}:W0()?{title:z("Focus Keyword in Subheadings",Pa),description:z("Your H2 and H3 subheadings reflects the topic of your copy. Good job!",Pa),score:Sa.goodNumberOfMatches,maxScore:Sa.goodNumberOfMatches,error:0}:{title:z("Focus Keyword in Subheadings",Pa),description:z("Use your Focus Keyword more in your H2 and H3 subheadings.",Pa),score:Sa.noMatches,maxScore:Sa.goodNumberOfMatches,error:1}):{}):{}}const ui="all-in-one-seo-pack",pi={noMatches:3,matches:9};function N0(a,e,t){return a?0<ct(a,e,t).count?{title:z("Focus Keyword in SEO title",ui),description:z("Focus Keyword found in SEO title.",ui),score:pi.matches,maxScore:pi.matches,error:0}:{title:z("Focus Keyword in SEO title",ui),description:z("Focus Keyword not found in SEO title.",ui),score:pi.noMatches,maxScore:pi.matches,error:1}:{}}function U0(a){return a?$w(a).replace(/[\s./]+/g,"-").replace(/[^\p{L}\p{N}\p{M}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}const zi="all-in-one-seo-pack",mi={noMatches:1,matches:5};function H0(a,e){if(!a)return{};const t=a.replace(/\s/g,"-"),i=U0(e);return O(t,i)?{title:z("Focus Keyword in URL",zi),description:z("Focus Keyword used in the URL.",zi),score:mi.matches,maxScore:mi.matches,error:0}:{title:z("Focus Keyword in URL",zi),description:z("Focus Keyword not found in the URL.",zi),score:mi.noMatches,maxScore:mi.matches,error:1}}const G0={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/&nbsp;|&#160;/gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\b\w/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function bl(a,e){if(a.HTMLRegExp)return e.replace(a.HTMLRegExp,`
`)}function V0(a,e){return a.astralRegExp?e.replace(a.astralRegExp,"a"):e}function K0(a,e){return a.HTMLEntityRegExp?e.replace(a.HTMLEntityRegExp,""):e}function Z0(a,e){return a.connectorRegExp?e.replace(a.connectorRegExp," "):e}function Y0(a,e){return a.removeRegExp?e.replace(a.removeRegExp,""):e}function fl(a,e){return a.HTMLcommentRegExp?e.replace(a.HTMLcommentRegExp,""):e}function vl(a,e){return a.shortcodesRegExp?e.replace(a.shortcodesRegExp,`
`):e}function hl(a,e){if(a.spaceRegExp)return e.replace(a.spaceRegExp," ")}function J0(a,e){return a.HTMLEntityRegExp?e.replace(a.HTMLEntityRegExp,"a"):e}function Q0(a,e){const t=Rg(G0,e);return t.shortcodes=t.l10n.shortcodes||{},t.shortcodes&&t.shortcodes.length&&(t.shortcodesRegExp=new RegExp("\\[\\/?(?:"+t.shortcodes.join("|")+")[^\\]]*?\\]","g")),t.type=a||t.l10n.type,t.type!=="characters_excluding_spaces"&&t.type!=="characters_including_spaces"&&(t.type="words"),t}function X0(a,e,t){return a=Ze(bl.bind(this,t),fl.bind(this,t),vl.bind(this,t),hl.bind(this,t),K0.bind(this,t),Z0.bind(this,t),Y0.bind(this,t))(a),a=a+`
`,a.match(e)}function aj(a,e,t){return a=Ze(bl.bind(this,t),fl.bind(this,t),vl.bind(this,t),hl.bind(this,t),V0.bind(this,t),J0.bind(this,t))(a),a=a+`
`,a.match(e)}function ue(a,e,t={}){if(a==="")return 0;if(a){const i=Q0(e,t),o=i[e+"RegExp"],n=i.type==="words"?X0(a,o,i):aj(a,o,i);return n?n.length:0}}const pt="all-in-one-seo-pack",zt={recommendedMinimum:1,recommendedMaximum:4,acceptableMaximum:8},gi={veryBad:-999,bad:3,okay:6,good:9};function ej(a,e){const t=ut(e),i=ue(a,"words"),o=D(z("%1$s length",pt),t);return i<zt.recommendedMinimum?{title:o,description:D(z("No %1$s was set. Set a %1$s in order to calculate your SEO score.",pt),t),score:gi.veryBad,maxScore:9,error:1,length:i}:la(i,zt.recommendedMinimum,zt.recommendedMaximum+1)?{title:o,description:z("Good job!",pt),score:gi.good,maxScore:9,error:0,length:i}:la(i,zt.recommendedMaximum+1,zt.acceptableMaximum+1)?{title:o,description:D(z("%1$s is slightly long. Try to make it shorter.",pt),t),score:gi.okay,maxScore:9,error:1,length:i}:{title:o,description:D(z("%1$s is too long. Try to make it shorter.",pt),t),score:gi.bad,maxScore:9,error:1,length:i}}var tj=a=>a.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"),kl=a=>a.replace(/<\/?[a-z][^>]*?>/gi,`
`),ij=a=>a.replace(/<style[^>]*>.*?<\/style>/gi,""),jl=a=>a.replace(/&nbsp;|&#160;/gi," ").replace(/\s{2,}/g," ").replace(/\s\./g,".").replace(/^\s+/g,"").replace(/\s+$/g,""),oj=a=>a.replace(/<script[^>]*>.*?<\/script>/gi,""),nj=a=>a.replace(/[‘’‛`]/g,"'").replace(/[“”〝〞〟‟„]/g,'"'),xl=a=>a.replace(/<!--[\s\S]*?-->/g,""),rj=a=>a.replace(/&\S+?;/g,"");function sj(a){return M(a)?"":Ze([ij,oj,kl,xl,rj,jl,nj])(a)}function dj(a){return M(a)?"":Ze([kl,jl])(a)}const wi="all-in-one-seo-pack",De={fail:0,fair:3,good:6,best:9};function lj(a,e,t){if(!a)return{};const i=ut(t),o=new RegExp(ea([e],tj).join("|"),"gi"),n=ue(a,"words"),r=(dj(a).match(o)||[]).length,s=parseFloat((r/n*100).toFixed(2)),d=D(z("%1$s density",wi),i);return .5>s?{title:d,description:D(z("%1$s Density is low at %2$s, the keyword appears %3$s times. For better results, try to aim for more than %4$s.",wi),i,`${s}%`,r,"0.5%"),score:De.fail,type:"low",maxScore:De.best,error:1}:2.5<s?{title:d,description:D(z("%1$s Density is high at %2$s, the keyword appears %3$s times. For better results, try to aim for lower than %4$s.",wi),i,`${s}%`,r,"2.5%"),type:"high",score:De.fail,maxScore:De.best,error:1}:{title:d,description:D(z("%1$s Density is %2$s, the keyword appears %3$s times.",wi),i,`${s}%`,r),type:"best",score:De.best,maxScore:De.best,error:0}}const Fa="all-in-one-seo-pack",mt={recommendedMinimum:300,slightlyBelowMinimum:250,belowMinimum:200,veryFarBelowMinimum:100},ql={recommendedMinimum:9,slightlyBelowMinimum:6,belowMinimum:3,farBelowMinimum:-10,veryFarBelowMinimum:-20};function cj(a){if(!a)return{error:1,title:z("No content yet",Fa),description:z("Please add some content first.",Fa),score:1,maxScore:5};const e=ue(a,"words");if(mt.recommendedMinimum<e)return{title:z("Content length",Fa),description:z("The content length is ok. Good job!",Fa),score:9,maxScore:9,error:0};if(la(e,0,mt.belowMinimum)){let t=ql.farBelowMinimum;return la(e,0,mt.veryFarBelowMinimum)&&(t=ql.veryFarBelowMinimum),{title:z("Content length",Fa),description:z("This is far below the recommended minimum of words.",Fa),score:t,maxScore:9,error:1}}return la(e,mt.slightlyBelowMinimum,mt.recommendedMinimum)?{title:z("Content length",Fa),description:z("The content is below the minimum of words. Add more content.",Fa),score:6,maxScore:9,error:1}:{title:z("Content length",Fa),description:z("The content is below the minimum of words. Add more content.",Fa),score:3,maxScore:9,error:1}}const Ya="all-in-one-seo-pack",El=120,Al=160,yi={noMetaDescription:1,tooLong:6,tooShort:6,correctLength:9};function uj(a){if(!a)return{};const e=ue(a,"characters_including_spaces");if(e===0)return{title:z("Meta description length",Ya),description:z("No meta description has been specified. Search engines will display copy from the page instead. Make sure to write one!",Ya),score:yi.noMetaDescription,maxScore:9,error:1};if(e<=El)return{title:z("Meta description length",Ya),description:z("The meta description is too short.",Ya),score:yi.tooShort,maxScore:9,error:1};if(e>Al)return{title:z("Meta description length",Ya),description:z("The meta description is over 160 characters.",Ya),score:yi.tooLong,maxScore:9,error:1};if(e>=El&&e<=Al)return{title:z("Meta description length",Ya),description:z("Well done!",Ya),score:yi.correctLength,maxScore:9,error:0}}var pj=a=>ue(a,"words");const zj=(()=>{const i="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(i)})();function mj(a){const e=[];let t=a,i;for(;i=t.match(zj);){const o=i.index;e.push(t.slice(0,o)),e.push(i[0]),t=t.slice(o+i[0].length)}return t.length&&e.push(t),e}function gj(a,e){const t=mj(a);let i=!1;const o=Object.keys(e);for(let n=1;n<t.length;n+=2)for(let r=0;r<o.length;r++){const s=o[r];if(t[n].indexOf(s)!==-1){t[n]=t[n].replace(new RegExp(s,"g"),e[s]),i=!0;break}}return i&&(a=t.join("")),a}function wj(a,e=!0){const t=[];if(a.trim()==="")return"";if(a=a+`
`,a.indexOf("<pre")!==-1){const n=a.split("</pre>"),r=n.pop();a="";for(let s=0;s<n.length;s++){const d=n[s],l=d.indexOf("<pre");if(l===-1){a+=d;continue}const c="<pre wp-pre-tag-"+s+"></pre>";t.push([c,d.substr(l)+"</pre>"]),a+=d.substr(0,l)+c}a+=r}a=a.replace(/<br\s*\/?>\s*<br\s*\/?>/g,`
`);const i="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";a=a.replace(new RegExp("(<"+i+"[\\s/>])","g"),`
$1`),a=a.replace(new RegExp("(</"+i+">)","g"),`$1
`),a=a.replace(/\r\n|\r/g,`
`),a=gj(a,{"\n":" <!-- wpnl --> "}),a.indexOf("<option")!==-1&&(a=a.replace(/\s*<option/g,"<option"),a=a.replace(/<\/option>\s*/g,"</option>")),a.indexOf("</object>")!==-1&&(a=a.replace(/(<object[^>]*>)\s*/g,"$1"),a=a.replace(/\s*<\/object>/g,"</object>"),a=a.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(a.indexOf("<source")!==-1||a.indexOf("<track")!==-1)&&(a=a.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1"),a=a.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),a=a.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),a.indexOf("<figcaption")!==-1&&(a=a.replace(/\s*(<figcaption[^>]*>)/,"$1"),a=a.replace(/<\/figcaption>\s*/,"</figcaption>")),a=a.replace(/\n\n+/g,`
`);const o=a.split(/\n\s*\n/).filter(Boolean);return a="",o.forEach(n=>{a+="<p>"+n.replace(/^\n*|\n*$/g,"")+`</p>
`}),a=a.replace(/<p>\s*<\/p>/g,""),a=a.replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>"),a=a.replace(new RegExp("<p>\\s*(</?"+i+"[^>]*>)\\s*</p>","g"),"$1"),a=a.replace(/<p>(<li.+?)<\/p>/g,"$1"),a=a.replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>"),a=a.replace(/<\/blockquote><\/p>/g,"</p></blockquote>"),a=a.replace(new RegExp("<p>\\s*(</?"+i+"[^>]*>)","g"),"$1"),a=a.replace(new RegExp("(</?"+i+"[^>]*>)\\s*</p>","g"),"$1"),e&&(a=a.replace(/<(script|style).*?<\/\\1>/g,n=>n[0].replace(/\n/g,"<WPPreserveNewline />")),a=a.replace(/<br>|<br\/>/g,"<br />"),a=a.replace(/(<br \/>)?\s*\n/g,(n,r)=>r?n:`<br />
`),a=a.replace(/<WPPreserveNewline \/>/g,`
`)),a=a.replace(new RegExp("(</?"+i+"[^>]*>)\\s*<br />","g"),"$1"),a=a.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1"),a=a.replace(/\n<\/p>$/g,"</p>"),t.forEach(n=>{const[r,s]=n;a=a.replace(r,s)}),a.indexOf("<!-- wpnl -->")!==-1&&(a=a.replace(/\s?<!-- wpnl -->\s?/g,`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment